


$(window).load(function(){





$('#footer').mouseenter(function(){
	
	$(this).stop().animate({
	    opacity: 1,
	    height: '300'
	  }, 500, function() {
	    // Animation complete.
	  });

}).mouseleave(function(){
	$(this).stop().animate({
	    opacity: 0.5,
	    height: '50'
	  }, 500, function() {
	    // Animation complete.
	  });
});




$('#slideshow').fadeIn('slow', function() {
});

  $("#slideshow").cycle({
    speed:  '400',
    timeout: 0,
    fx:'scrollHorz',
        prev:   '#prev', 
        next:   '#next', 
     
    
    pagerAnchorBuilder: function(idx, slide) {
      // return selector string for existing anchor
      return '#nav_main a:eq(' + idx + ')';
    },
    
    
    after: function(currSlideElement, nextSlideElement, options, forwardFlag) {
      $("#nav_main a").removeClass("activeSlide");
      $("#nav_main a:eq(" + options.currSlide + ")").addClass("activeSlide");
      var slideClass = $(nextSlideElement).attr("class");
      if( $("#slideshow li." + slideClass + " span.video").length )
      {
         $('#slideshow').cycle('pause'); 
      }
      else{
      	$('#slideshow').cycle('resume');
      }
      var $ht = $(this).height()+100;
      
       //set the container's height to that of the current slide
       $(this).parent().animate({height: $ht});
   	  }
  });
  
  
  
 });
 
 
 
 


