$(function(){
	initDropDown();
	selection();
});
function selection(){
	var location = window.location.href;
	if (location.indexOf('vitamin-B12-cat') != -1){
		var select = $('.catProdAttributeItem select').get(0);
		if (select) select.selectedIndex = 1;
	}
	
}
function initDropDown()
{
	var nav = document.getElementById("nav");
	if(nav) {
		var lis = nav.getElementsByTagName("li");
		for (var i=0; i<lis.length; i++) {
			if(lis[i].getElementsByTagName("ul").length > 0) {
				lis[i].className += " has-drop-down"
				lis[i].getElementsByTagName("a")[0].className += " has-drop-down-a"
			}
			lis[i].onmouseover = function()	{
				this.className += " hover";
			}
			lis[i].onmouseout = function() {
				this.className = this.className.replace(" hover", "");
			}
		}
	}
}

