jQuery(function() {

	var kategoriat=new Array("#main","#collection","#racing","#fighter","#accessories");
	var cookie = '#main';
	
	if (jQuery.cookie('collectionBg')) {
		var cookie = jQuery.cookie('collectionBg');
	}
	
	for (x in kategoriat){
		  
		  if (cookie == kategoriat[x]) {
			var opacity = 1;
		  }
		  
		  else {var opacity = 0;}
			jQuery(kategoriat[x]).animate({ "opacity" : opacity }).css('display', 'block');
			
	}
	
	
	//jQuery('#main').fadeIn("fast");
	//jQuery('#collection').animate({ "opacity" : 0 }).css('display', 'block');
	//jQuery('#racing').animate({ "opacity" : 0 }).css('display', 'block');
	//jQuery('#fighter').animate({ "opacity" : 0 }).css('display', 'block');	
	//jQuery('#accessories').animate({ "opacity" : 0 }).css('display', 'block');	
	
	
// racing banner	
	
	jQuery('#racingTab').click(function () {
		jQuery('#main').stop().animate({ "opacity" : 0 });
		jQuery('#collection').stop().animate({ "opacity" : 0 });
		jQuery('#racing').stop().animate({ "opacity" : 1 });
		jQuery('#fighter').stop().animate({ "opacity" : 0 });
		jQuery('#accessories').stop().animate({ "opacity" : 0 });		
    }, function () {

    });
	
	
	
// classic banner	

	jQuery('#classicTab').click(function () {
		jQuery('#main').stop().animate({ "opacity" : 0 });
		jQuery('#racing').stop().animate({ "opacity" : 0 });
		jQuery('#collection').stop().animate({ "opacity" : 1 });
		jQuery('#fighter').stop().animate({ "opacity" : 0 });
		jQuery('#accessories').stop().animate({ "opacity" : 0 });		
    }, function () {

    });
	
	
// fighter banner	

	jQuery('#fighterTab').click(function () {
		jQuery('#main').stop().animate({ "opacity" : 0 });
		jQuery('#racing').stop().animate({ "opacity" : 0 });
		jQuery('#collection').stop().animate({ "opacity" : 0 });
		jQuery('#fighter').stop().animate({ "opacity" : 1 });
		jQuery('#accessories').stop().animate({ "opacity" : 0 });
    }, function () {

    });
	
	
// accessories banner		
	
	jQuery('#accessoriesTab').click(function () {
		jQuery('#main').stop().animate({ "opacity" : 0 });
		jQuery('#racing').stop().animate({ "opacity" : 0 });
		jQuery('#collection').stop().animate({ "opacity" : 0 });
		jQuery('#fighter').stop().animate({ "opacity" : 0 });
		jQuery('#accessories').stop().animate({ "opacity" : 1 });
    }, function () {

    });
	
});
