$j(function(){
	if ($j('#pageSplash>div.splash-frame').size() < 2) return;

	$j('#pageSplash>div.splash-frame').hide();
	$j($j('#pageSplash>div.splash-frame')[0]).show();
	
	$j('#pageSplash').data('current', 0);
	$j('#pageSplash').data('getNext', function(){
		var c = $j('#pageSplash').data('current');
		var s = $j('#pageSplash>div.splash-frame').size();
		
		var n = ((c + 1) >= s)? 0 : c + 1;
		
		$j('#pageSplash').data('current', n);
		
		return n;
	});
	
	$j('#pageSplash').data('play', function(){
		$j('#pageSplash').data('timer', setInterval($j('#pageSplash').data('gotonext'), 7000));
	});
	
	$j('#pageSplash').data('pause', function(){
		clearInterval($j('#pageSplash').data('timer'));
	});
	
	$j('#pageSplash').data('gotonext', function(){
		var c = $j('#pageSplash').data('current');
		var n = $j('#pageSplash').data('getNext')();
		
		$j($j('#pageSplash>div.splash-frame')[c]).fadeOut(400, function(){
			$j($j('#pageSplash>div.splash-frame')[n]).fadeIn(400);
		});
	});
	
	$j('#pageSplash').bind('mouseenter', function(){
		$j('#pageSplash').data('pause')();
	}).bind('mouseleave', function(){
		$j('#pageSplash').data('play')();
	});
	
	$j('#pageSplash').data('play')();
});

$j(window).bind('load', function(){
	var h = 0;
	
	$j('#pageSplash>div.splash-frame').show().each(function(){
		var h2 = $j(this).outerHeight();
		h = (h2 > h)? h2 : h;
	});
	
	$j('#pageSplash>div.splash-frame').hide();
	
	$j($j('#pageSplash>div.splash-frame')[$j('#pageSplash').data('current')]).show();
	
	$j('#pageSplash').height(h);
});

$j(function(){
	sameHeight('.product-item-name', '.product-item-row');
});

$j(window).bind('load', function(){
	vCenterImg('.product-item-image');
});