window.addEvent('domready',function() {
	var subNav = $$('.wyn_subNavigation');
	
	// hide sub navigation at start //
	subNav.setStyles({
		display:'block',
		opacity: 0
	});
	// link 1
	
	var el1 = $$('.wyn_link1 .wyn_subNavigation');
	
	$$('.wyn_link1').addEvent('mouseenter', function(e) {
		// stop propagation of the event
		e.stop();
		el1.fade(1);
	});
	
	$$('.wyn_link1').addEvent('mouseleave', function(e) {
		e.stop();
		el1.fade(0);
	});

	// link 2
	
	var el2 = $$('.wyn_link2 .wyn_subNavigation');
	
	$$('.wyn_link2').addEvent('mouseenter', function(e) {
		// stop propagation of the event
		e.stop();
		el2.fade(1);
	});
	
	$$('.wyn_link2').addEvent('mouseleave', function(e) {
		e.stop();
		el2.fade(0);
	});
	
	// link 3
	
	var el3 = $$('.wyn_link3 .wyn_subNavigation');
	
	$$('.wyn_link3').addEvent('mouseenter', function(e) {
		// stop propagation of the event
		e.stop();
		el3.fade(1);
	});
	
	$$('.wyn_link3').addEvent('mouseleave', function(e) {
		e.stop();
		el3.fade(0);
	});
	
	// link 4
	
	var el4 = $$('.wyn_link4 .wyn_subNavigation');
	
	$$('.wyn_link4').addEvent('mouseenter', function(e) {
		// stop propagation of the event
		e.stop();
		el4.fade(1);
	});
	
	$$('.wyn_link4').addEvent('mouseleave', function(e) {
		e.stop();
		el4.fade(0);
	});
	
	// link 5
	
	var el5 = $$('.wyn_link5 .wyn_subNavigation');
	
	$$('.wyn_link5').addEvent('mouseenter', function(e) {
		// stop propagation of the event
		e.stop();
		el5.fade(1);
	});
	
	$$('.wyn_link5').addEvent('mouseleave', function(e) {
		e.stop();
		el5.fade(0);
	});
	
	// link 6
	
	var el6 = $$('.wyn_link6 .wyn_subNavigation');
	
	$$('.wyn_link6').addEvent('mouseenter', function(e) {
		// stop propagation of the event
		e.stop();
		el6.fade(1);
	});
	
	$$('.wyn_link6').addEvent('mouseleave', function(e) {
		e.stop();
		el6.fade(0);
	});
	
	// link 7
	
	var el7 = $$('.wyn_link7 .wyn_subNavigation');
	
	$$('.wyn_link7').addEvent('mouseenter', function(e) {
		// stop propagation of the event
		e.stop();
		el7.fade(1);
	});
	
	$$('.wyn_link7').addEvent('mouseleave', function(e) {
		e.stop();
		el7.fade(0);
	});
});

startList = function() {
	if (document.all&&document.getElementById) {
		navRoot = document.getElementById("sf_navigation");
		if (!navRoot) return;
		for (i=0; i<navRoot.childNodes.length; i++) {
			node = navRoot.childNodes[i];
			if (node.nodeName=="LI") {
				node.onmouseover=function() {
					this.className+=" over";
				}
				node.onmouseout=function() {
					this.className=this.className.replace(" over", "");
				}
			}
		}
	}
	if (document.all&&document.getElementById) {
		navRoot = document.getElementById("sf_headerLinks");
		if (!navRoot) return;
		for (i=0; i<navRoot.childNodes.length; i++) {
			node = navRoot.childNodes[i];
			if (node.nodeName=="LI") {
				node.onmouseover=function() {
					this.className+=" over";
				}
				node.onmouseout=function() {
					this.className=this.className.replace(" over", "");
				}
			}
		}
	}
}
window.onload=startList;