//Your JQuery Code Here
$(document).ready(function(){
	
	//Home Page
	
    //Navigation Drop Down
    $('nav li:has(ul)').hover(
      function(){
        $(this).find('ul').prev().addClass('selected');
        $(this).find('ul').show();
      },
      function(){
        $(this).find('ul').prev().removeClass('selected');
        $(this).find('ul').hide();
      }
    );
	
	//Commercials Page - Video Player
	flowplayer("a.video","/images/commercials/flowplayer-3.2.7.swf",{clip:{autoPlay:true,autoBuffering:true}});
	$('.video-preview li:first-child').show();
	$('.video-list li:nth-child(1) a').click(function(){$('.video-list li').removeClass('selected');$(this).parent().addClass('selected');$('.video-preview li').hide();$('.video-preview li:nth-child(1)').show();});
	$('.video-list li:nth-child(2) a').click(function(){$('.video-list li').removeClass('selected');$(this).parent().addClass('selected');$('.video-preview li').hide();$('.video-preview li:nth-child(2)').show();});
	$('.video-list li:nth-child(3) a').click(function(){$('.video-list li').removeClass('selected');$(this).parent().addClass('selected');$('.video-preview li').hide();$('.video-preview li:nth-child(3)').show();});
	$('.video-list li:nth-child(4) a').click(function(){$('.video-list li').removeClass('selected');$(this).parent().addClass('selected');$('.video-preview li').hide();$('.video-preview li:nth-child(4)').show();});		
	$('.video-list li').fadeTo(0,0.5);
	$('.video-list li').hover(function(){$(this).stop().fadeTo(200,1);},function(){$(this).stop().fadeTo(200,0.5);});
	
});
