//var PreviewHover = new Array();

$(document).ready(function(){
	$("li.fade a").mouseover(function(){ $(this).css('color','#ffffff'); });
	$("li.fade a").mouseout(function(){ if(!$(this).hasClass('active_menu')){ $(this).css('color','#999999');}}); //$(this).animate({ backgroundColor: "#4b473c" }, 500);
	
	/*
  $('.video_preview').mouseover(function(){ 

    if(PreviewHover[$(this).attr('id')] == undefined || PreviewHover[$(this).attr('id')] == false){
      PreviewHover[$(this).attr('id')] = true;

      $(this).css('position','relative');

      $(this).children().first().append('<div onclick="clickPlay(this);" onmouseout="unPreviewHover(this);" style="position: absolute; cursor:pointer; top: 0px; left: 0px; width: 218px; height: 80px; background: url(\'/images/KTV-button.png\') 32px 50% no-repeat;"></div>');
    }
  });
  */
	
  $('.video_preview_hover').hover(
    function(){
      $(this).css('background','url(\'/images/KTV-button.png\') 32px 50% no-repeat');
    },
    function(){
      if(!$(this).hasClass('video_preview_clicked')){
        $(this).css('background','url(\'/images/KTV-button.png\') -500px -500px no-repeat');
      }
    }
  );
  $('.actueel_preview_hover').hover(
    function(){
      $(this).css('background','url(\'/images/KTV-button.png\') 19px 50% no-repeat');
    },
    function(){
      if(!$(this).hasClass('video_preview_clicked')){
        $(this).css('background','url(\'/images/KTV-button.png\') -500px -500px no-repeat');
      }
    }
  );

  $('.video_preview_hover').click(function(){
    $('.video_preview_clicked').removeClass('video_preview_clicked').css('background','url(\'/images/KTV-button.png\') -500px -500px no-repeat');
    $(this).addClass('video_preview_clicked');
  });
  $('.actueel_preview_hover').click(function(){
    $('.video_preview_clicked').removeClass('video_preview_clicked').css('background','url(\'/images/KTV-button.png\') -500px -500px no-repeat');
    $(this).addClass('video_preview_clicked');
  });

	$('.lightbox').lightBox();

});

function loadMovie(video){

  src = video + 'color1=0x3a3a3a&color2=0x999999&autoplay=1';

  $("#player").html('<object width="660" height="362"><param name="movie" value="'+src+'"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="'+src+'" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="660" height="362"></embed></object>');
}
/*
function unPreviewHover(previewer){ 
    PreviewHover[$(previewer).parent().parent().attr('id')] = false;
    
    $(previewer).parent().parent().css('position','static');
    $(previewer).parent().children().last().detach();
    
  };


function clickPlay(previewer){
  PreviewHover[$(previewer).parent().parent().attr('id')] = false;

  $(previewer).attr('onmouseout','');
  $('.video_preview_clicked').removeClass('video_preview_clicked').addClass('video_preview');

  $(previewer).parent().parent().removeClass('video_preview');
  $(previewer).parent().parent().addClass('video_preview_clicked');
}
*/
