window.onload = (function(){
	 $("ul.menu li").hover(
  function () {
    $(this).toggleClass('opened');
  }
);
	 
$.easing['BounceEaseOut'] = function(p, t, b, c, d) {
if ((t/=d) < (1/2.75)) {
return c*(7.5625*t*t) + b;
} else if (t < (2/2.75)) {
return c*(7.5625*(t-=(1.5/2.75))*t + .75) + b;
} else if (t < (2.5/2.75)) {
return c*(7.5625*(t-=(2.25/2.75))*t + .9375) + b;
} else {
 return c*(7.5625*(t-=(2.625/2.75))*t + .984375) + b;
}
}; 
	 
 $('#mycarousel').jcarousel({
        easing: 'BounceEaseOut',
        animation: 2000
    });
	
	$('.top').hover(function(){
		$(this).stop().animate({opacity:'.5'}, 800);						 
	}, function(){
		$(this).stop().animate({opacity:'1'}, 800);
	});
	$('.top').click(function(){
		$.scrollTo('#top', 2000);						 
	});
	
	$('.header').cycle({
		fx: 'fade' // choose your transition type, ex: fade, scrollUp, shuffle, etc...
	});
	var li = $('#mycarousel li > a');
	li.hover(function(){
		$(this).addClass("nohover");
		$(this).stop().animate({opacity:'.3'}, 800);
	}, function(){
		$(this).stop().animate({opacity:'1'}, 1500);
		$(this).css({backgroundColor:'none'});
	});


var leftDiv = $('#container');
var content = $('#content');
var parentHeight = leftDiv.parent().height();
content.height(parentHeight);

$('.slide2').cycle({
fx:'fade'
}); 
$('.header2').cycle({
fx:'fade'
}); 

$('a.lightbox').lightBox(); // Select all links with lightbox class

$('.top').click(function(){
	$.scrollTo('#top', 2000);
}); 


	 
});

