//for the future we should use this to open links in new windows because target is being deprecated
$().ready(function() {
	$('a.newWindow').each(function() {
		$(this).click(function(event) {
			event.preventDefault();
			window.open($(this).href,'_blank');
		});
	});
});


function initReviewCarousel(){
/*	$('#reviewCarousel').jcarousel({
        animation: animationLength,
		auto: animationTiming,
		easing: 'easeInOutCubic',
		//initCallback: jc_initCallback,
		scroll: 1,
		wrap: 'circular'
	});
*/	
	$('#reviewCarousel').cycle({
		fx: 'fade', // choose your transition type, ex: fade, scrollUp, shuffle, etc...
		timeout:         5000,  // milliseconds between slide transitions (0 to disable auto advance) 
	    speed:           500,
		delay:   4000,
		random:1,
		sync: 0,
		pause: 1
	
	});
	
	
	
}

function initAppCarousel() {
	$('#appNav').find('ul').first().children('li').each(function(item){
		$(this).css('height',$(this).children('a').first().css('height'));
		$(this).css('width',$(this).children('a').first().css('width'));
	});
	$('.appNavCarousel').jac({
		childSizeFixed : false,
		enableMouse : false,
		easingStyle : 'swing',
		leftArrowSelector : 'leftAppArrow',
		rightArrowSelector : 'rightAppArrow',
		leftText : '',
		rightText : ''
	});
}

function carouselWillMoveFromClick(from,to){
	$('#selectArrow').animate({left:(parseInt($('#selectArrow').css('left')) + (parseInt(to) - parseInt(from)))},{duration:600});
}
