function addLoadEvent(func) {
  var oldonload = window.onload;
  if (typeof window.onload != 'function') {
    window.onload = func;
  } else {
    window.onload = function() {
      oldonload();
      func();
    }
  }
}

function popupWindow(url) {
	window.open(url,'popupWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,copyhistory=no,width=100,height=100,screenX=150,screenY=150,top=150,left=150')
}

function initNav() {
	$S('#primary-nav li').action ({
		initialize: function(){ 
			if(this.className == "menuparent") {
				//alert('HU');
				this.onmouseover=function() {
					this.className += " over";
				}
				this.onmouseout=function() {
					this.className = "menuparent";
				}
			} else {
				this.onmouseover=function() {
					this.className += " over2";
				}
				this.onmouseout=function() {
					this.className = "";
				}
			}
		}
	});
}

var myrules = {
			'#primary-nav li' : function(element){
				if(element.className == "menuparent") {
					element.onmouseover=function() {
						this.className += " over";
					}
					element.onmouseout=function() {
						this.className = "menuparent";
					}
				} else {
					element.onmouseover=function() {
						this.className += " over2";
					}
					element.onmouseout=function() {
						this.className = "";
					}
				}
			},
			'div.roundobject' : function(element){
				Rico.Corner.round(element, {bgColor:'#adba8c'});
			}
		};

addLoadEvent(initNav);