$(function(){ 
  /*$("#search_string").focus(function(){
  $(this).val("");
   });
  
   $("#search_string").blur(function(){
   $val = $(this).val() != '' ? $(this).val() : 'SEARCH ...';
  $(this).val($val);
   }); */
   
   
  //fade the thumbnails to an opacity
  $(".custom_albums,.thumb,.video_thumb").each(function () {
      $(this).fadeTo("slow", 0.5);
    });
    
 //on hover remove the opacity
$(".custom_albums,.thumb,.video_thumb").hover(
      function () {
        $(this).fadeTo("slow", 1);
      }, 
      function () {
        $(this).fadeTo("slow", 0.5);
      }
    );
    
  //loop through all a tags that have the class shadowboximage and set the rel for it
  $(".shadowboximage").each(function () {
      $(this).attr("rel", "shadowbox[Thumbs]");
    });
 
  
  //initialise shadowbox
   var options = {
        handleOversize:     'drag',
        handleUnsupported:  'remove',
        flvPlayer: shadowboxPath+'flvplayer.swf',
        autoplayMovies:     true
    };
  
   Shadowbox.init(options);
});

//display video in a popup
function doModal(el) {
$('#player'+el.id).jqm({ toTop: true, modal: true });
$('#player'+el.id).jqmShow();
}

//load the shadowbox stuff
Shadowbox.loadSkin('classic', shadowboxPath+'src/skin');
Shadowbox.loadLanguage('en', shadowboxPath+'src/lang');
Shadowbox.loadPlayer(['flv', 'html', 'iframe', 'img', 'qt', 'swf', 'wmp'], shadowboxPath+'src/player');
