var player = null;

$(document).ready(function() {
	
  $('div.sub').show();
  $('div.sub').hide();

  $("a.external").click(function(event) {
	window.open(this.href);
	event.preventDefault();
  }); 
  
  $("a.fb-image").fancybox({
		'transitionIn'	:	'elastic',
		'transitionOut'	:	'elastic',
		'speedIn'		:	600, 
		'speedOut'		:	200, 
		'titlePosition'	:	'over',
		'cyclic'			:	true
	});

  /* sidebar toggle */
  $("div.slide-full").mouseenter(function(){
	$(this).children('div.slide-hidden').slideDown('slow');
	$(this).children('h2').toggleClass('over');
  });
  $("div.slide-full").mouseleave(function(){
	$(this).children('div.slide-hidden').slideUp('slow');
	$(this).children('h2').toggleClass('over');
  });
  $("div.clip-sidebar").mouseenter(function(){
    $(this).toggleClass('over');
  });
  $("div.clip-sidebar").mouseleave(function(){
    $(this).toggleClass('over');
  });
  $("div.clip-content").mouseenter(function(){
    $(this).toggleClass('over');
  });
  $("div.clip-content").mouseleave(function(){
    $(this).toggleClass('over');
  });
  
  /* navigation drop down */
  $("div#navigation-menu ul li").mouseleave(function(){
	$(this).children('div').stop(true, true);
	$(this).children('div').hide();
  });
  $("div#navigation-menu ul li").mouseenter(function(){
	$(this).children('div').slideDown();
  });


});

$(window).load(function() {
  $('#slider').nivoSlider({
        effect:'fade', //Specify sets like: 'fold,fade,sliceDown, random'
        animSpeed:300, //Slide transition speed
        pauseTime:10000,
        startSlide:0 //Set starting Slide (0 index));
  });
});

