/* Any specific javascript functions can go in here */

jQuery(document).ready(function($){

//For showing and hiding the product information on the homepage 
//First we hide them all
jQuery('[class^=toggle-item]').hide();

jQuery('[class^=link-]').click(function() {
	var $this = $(this);
	var x = $this.attr("className").split(' ');
	$('.toggle-item-' + x).toggle();
	$($this).toggleClass('open');
	return false;
});

//For showing and hiding the all products dropdown
jQuery('a.products-drop-down').toggle(
	function(){
		$('#product-categories').show();
		$('a.products-drop-down').addClass('open');
	},
	function(){
		$('#product-categories').hide();
		$('a.products-drop-down').removeClass('open');
});

//For showing more products on the homepage
jQuery('ul#large-products li.product:nth-child(3n+0)').css({'margin-right':"0"});

jQuery('ul#small-products li:last-child').css({margin:"0"});

});
