/*jQuery(document).ready(function() {*/
$(document).ready(function(){

	//slideshow used on cases
	$('#slides').cycle({
		fx:			'blindX', 
		speed:       1000, 
		timeout:     0, 
		prev:    	'#prev',
        next:    	'#next',
        slideExpr:	'li',
        after: 		onAfter
	});
	
	function onAfter(curr, next, opts, fwd) {
 		var $ht = $(this).height();
		//set the container's height to that of the current slide
		$(this).parent().animate({height: $ht});
	}
	
	//slideshow on the homepage
	$('#slideshow').cycle({
		fx:			'scrollHorz', 
		speed:      1000, 
		timeout:    5000,
		pager:      '#slideNav',
		pagerEvent: 'mouseover',
		pause:      1,
		pauseOnPagerHover: 1,
		random: 	1,
		slideExpr: 	'li',
		fastOnEvent:   1,
		allowPagerClickBubble: true,
		pagerAnchorBuilder: function(idx, slide) { 
			// return selector string for existing anchor 
			return '#slideNav li:eq(' + idx + ') a'; 
		}
	});
	
	// Coverflow start
	$(".jCarouselLite").jCarouselLite({
        btnNext: ".next",
        btnPrev: ".prev",
		auto: 10000,
        speed: 1000,
		visible: 8,
		scroll: 4
		});
 	// Coverlow end
});
