// JavaScript Document

$(document).ready(function() {

	//dn: accordion menu
	//add .acc_header class to only the top level "li a" - not "li li a". 
	//I'm doing it here because it's not easy in the template/php.
	$('#accordion li a').addClass('acc_header'); 	//add the class to the top level UL
	$('#accordion li li a').removeClass('acc_header'); //remove from the lower-level ULs
	$('#accordion').accordion({navigation: true, autoheight: false, event: 'mouseover', header: '.acc_header' });


	var maxHeight = 0;
	$('.Content .ProductList li').each(function() {
			if($(this).height() > maxHeight) {
				maxHeight = $(this).height();
			}
	});
	$('.Content .ProductList li').css('height', maxHeight);
	
	if(document.all) {
		$('.CategoryList ul > li').hover(function(event) {
			$(this).addClass('Over');
			event.preventDefault();
			event.stopPropagation();
		}, function(event) {
			if(event.target == this) {
				$(this).removeClass('Over');
			}
			event.preventDefault();
			event.stopPropagation();
		});
	}
	
	
});

