// Easing equation, borrowed from jQuery easing plugin
// http://gsgd.co.uk/sandbox/jquery/easing/
jQuery.easing.easeOutQuart = function (x, t, b, c, d) {
	return -c * ((t=t/d-1)*t*t*t - 1) + b;
};

	
jQuery(function( $ ){

	$('#passfake_rounded input').bind('focus',function(e){
		$(this).parent().hide();
		$('#pass_rounded').show();
		$('#pass_rounded input').focus();
	});

	$('#pass_rounded input').bind('blur',function(e){
		if ($(this).val()=='')
		{
			$(this).parent().hide();
			$('#passfake_rounded').show();
		}
													
	});

	var numof = Math.floor($('#scrollable').width()/150);
	var liwidth = $('#scrollable').width()/numof;	
	$('#scrollable li').css({ width : liwidth});	
	$('#scrollable').serialScroll({
		target:'.product_list',
		items:'li.home_new_product', // Selector to the items ( relative to the matched elements, '#sections' in this case )
		prev:'#slider_left',// Selector to the 'prev' button (absolute!, meaning it's relative to the document)
		next:'#slider_right',// Selector to the 'next' button (absolute too)
		axis:'x',// The default is 'y' scroll on both ways
		//navigation:'#navigation li a',
		duration:120,// Length of the animation (if you scroll 2 axes and use queue, then each axis take half this time)
		force:true, // Force a scroll to the element specified by 'start' (some browsers don't reset on refreshes)
		stop:true,
		interval:3000,
		exclude: numof-1
	});
	
	$('.prdbrief_comparison label').toggle(
		function () {
			$(this).addClass("selected");
			$(this).html('<span class="red">Добавлено в сравнение</span>')
			$(this).parent().find('input').attr('checked', true);
		},
		function () {
			$(this).removeClass("selected");
			$(this).html('Добавить в сравнение');
			$(this).parent().find('input').attr('checked', false);
		}

	);
	
});



 

