$(document).ready(function() {     
	
	// Menu
	$("header nav ul ul").hide();
	$(function() {
		$("header nav ul li").hover(function(){
			$(this).addClass("hover");
			$('ul:first',this).show();
		}, function(){
			$(this).removeClass("hover");
			$('ul:first',this).hide();
		});
	});
	
});


/* slider homepage jcarousel */
jQuery.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;
	}
};



function mycarousel_initCallback(carousel)
{
    // Disable autoscrolling if the user clicks the prev or next button.
    carousel.buttonNext.bind('click', function() {
        carousel.startAuto(0);
    });

    carousel.buttonPrev.bind('click', function() {
        carousel.startAuto(0);
    });

    // Pause autoscrolling if the user moves with the cursor over the clip.
    carousel.clip.hover(function() {
        carousel.stopAuto();
    }, function() {
        carousel.startAuto();
    });
};

jQuery(document).ready(function() {
    jQuery('#mycarousel').jcarousel({
        vertical: true,
        scroll: 1,
        easing: 'BounceEaseOut',
		animation: 1000,
		auto: 0,
        wrap: 'last',
        initCallback: mycarousel_initCallback
    });
});
