// JavaScript Document



var $j = jQuery.noConflict();


$j.fn.equalHeight = function () {
	var height		= 0;
	var maxHeight	= 0;

	// Store the tallest element's height
	this.each(function () {
		height		= $j(this).outerHeight();
		maxHeight	= (height > maxHeight) ? height : maxHeight;
	});

	// Set element's min-height to tallest element's height
	return this.each(function () {
		var t			= $j(this);
		var minHeight	= maxHeight - (t.outerHeight() - t.height());
		var property	= $j.browser.msie && $j.browser.version < 7 ? 'height' : 'min-height';

		t.css(property, minHeight + 'px');
	});
};


$j(document).ready(function(e) {
	/*
	$j(".vertNav2 #nav a").click(function() { 
		$j(this).next('ul').toggleClass('shower');
		return false;		
	});
	*/

	$j('.products-grid .product-name').equalHeight();

	//$j('.vertNav2 #nav ul').css('display','none');
		
		$j(".vertNav2 #nav li a").click(function(e) {
												 //alert($j(this).parent().html());
			//$j(this).parent().has('ul li').next('ul').toggleClass('shower');
			$j(this).parent().has('ul li').children('ul').toggleClass('shower');
			if($j(this).parent().has('ul li').length>0) e.preventDefault();
			/*if ($j(this).parent().has('ul li')){
				$j(this).next('ul').toggleClass('shower');
				return false;
			}*/
		});
	
	//$j('.vertNav2 #nav ul').css('display','none');

/*	
	$j(".primary").css('display','block'); //Open Element (accordContent)
	$j(".active").parent(".accordContent").css("display","block");
	$j('.accordHeader').click(function(){ //On Click of a header
		
		if($j(this).next().is(':hidden') == true) {  // If the Next Element (accordContent) is hidden
			
			//Close other SLIDEs
			$j(this).siblings('.accordContent').slideUp('slow');//Close Siblings .accordContent 
			$j(this).parent().siblings().children('.accordContent').slideUp('slow'); //Close Parents Siblings Children (Cousins) .accordContent
			//OPEN THE SLIDE
			$j(this).next().slideDown('slow'); //Open Next Element (accordContent)
		 
		
		} 
		
		else if($j(this).next('.accordContent').is(':hidden') == false)  {
			$j(this).next('.accordContent').slideUp('slow');
		}
		  
	 });
*/
});

