/**
 * @author uil
 * @email uillb@hotmail.com
 */
var SC = {};
(function(){
    SC.UI = {
    
        setMenu: function(el, overstyle){
			
            if (!document.getElementById(el)) {
                return;
            }
            
            var menuRoot = document.getElementById(el);
            var menuItems = menuRoot.getElementsByTagName("li");
			
			var ua = navigator.userAgent;			
            
            for (i = 0; i < menuItems.length; i++) {
				menuItems[i].onmouseover = function(){
					
					this.className = overstyle;
					if(this.getElementsByTagName("ul")[0]){
						this.getElementsByTagName("ul")[0].style.display = "block";
					}
					if(ua.indexOf("Safari")>0){
						window.resizeBy(0,-1);
					}
				}
				menuItems[i].onmouseout = function(){
					
					this.className = "";
					if(this.getElementsByTagName("ul")[0]){
						this.getElementsByTagName("ul")[0].style.display = "none";
					}
					if(ua.indexOf("Safari")>0){
						window.resizeBy(0,1);
					}
				}
            }
        }
    };
})();
var f = function(){
	SC.UI.setMenu("snav","over");
}
if (document.addEventListener) {
    window.addEventListener('load', f, false);
}
else {
    window.attachEvent('onload', f);
}