
window.FCUK = window.FCUK || {};

FCUK.Home = function(){
	var setupCarousel = function(){
		var k1 = $('#promoCell').carrotCell({
			navi: true,
			auto: true,
			sideways: false,
			speed: 800,
			delay: 5000
		});
		
		var myAPI = $('#promoCell').data('carrotCell')
		
		$(".navi li").bind("click", function(e){
			e.preventDefault();
			myAPI.stop();
		});
	}
	
	return {
		init : function(){
			setupCarousel();
		}
	}
}();


$(document).ready(function(){
	// chrome can not calculate the width correctly because it is foolish
	var is_chrome = navigator.userAgent.toLowerCase().indexOf('chrome') > -1;
	if (is_chrome) {
		$(window).load(function(){ FCUK.Home.init(); });
	} else {
		FCUK.Home.init();
	}
});
