var $j = jQuery.noConflict();
jQuery(document).ready(function(){
		
		jQuery("#about-brand").hide();
	
		jQuery("#brandSwitch").toggle(function() {
			jQuery("#about-brand").show();
		},
		function() {
			jQuery("#about-brand").hide();
		});
		
		jQuery("#gallery .thumbs:first li").click(function(e){
			e.preventDefault();
			jQuery("#gallery .thumbs:first li").removeClass("active");
			jQuery(this).addClass("active");
			var img = jQuery(this).children("a");
			jQuery("#big-image").attr("src",jQuery(img).attr("href"));
		});
		
		jQuery('#featured ul li').click(function(e){
			e.preventDefault();
			jQuery("#featured ul li").removeClass("active");
			jQuery(this).addClass("active");
			var img = jQuery(this).children("a");
			jQuery("#featured-image").hide();
			jQuery("#featured-image").attr("src",jQuery(img).attr("href"));
			jQuery("#featured-image").parent().attr("href",jQuery(img).attr("rel"));
			jQuery("#featured-image").fadeIn("slow");
		});
		
		window.setInterval(autoSlide,5000); 
		
		function autoSlide(){
			var current = jQuery('#featured ul li.active:first');
			if(jQuery(current).next('li').length == 0)
				var next = jQuery('#featured ul li:first');
			else
				var next = jQuery(current).next('li')[0];
			jQuery("#featured ul li").removeClass("active");
			jQuery(next).addClass("active");
			var img = jQuery(next).children("a");
			jQuery("#featured-image").hide();
			jQuery("#featured-image").attr("src",jQuery(img).attr("href"));
			jQuery("#featured-image").parent().attr("href",jQuery(img).attr("rel"));
			jQuery("#featured-image").fadeIn("slow");
		}
		
		jQuery('.prods-carousel').carousel('#prev-prods', '#next-prods',{eachStep:5});
		jQuery('#galleries #prods').carousel('#prev-prods', '#next-prods',{eachStep:1});
		jQuery(".lightbox").colorbox();
	});
