// JavaScript Document

var isIe=(window.ActiveXObject)? true:false;
	function load_menu(){
		
		var nav=document.getElementById('nav');
		var li=nav.childNodes;
		var n=li.length
		if(isIe){
			//li[n-1].style.cssText="background:none;";
			li[0].style.cssText="padding-right:0px;";
		}else{
			//li[n-2].style.cssText="background:none;";
			li[1].style.cssText="padding-right:0px;";
		}
		for(var i=0;i<li.length;i++){
			var lis=li[i].childNodes;
			for(var j=0;j<lis.length;j++){
				if(lis[j].nodeName=="UL"){
					if(isIe){						
						li[i].onmouseover=function(){hello(this);};
						li[i].onmouseout=function(){bye(this);};
					}else{
						li[i].setAttribute("onmouseover","hello(this);");
						li[i].setAttribute("onmouseout","bye(this);");
					}
				}
			}
		}
		
	}
	function hello(object){
		//window.alert(object.className);
		var li=object.childNodes;
		for(var i=0;i<li.length;i++){
			if(isIe){
				if(li[i].nodeName=="A"){
					var text=li[i].innerHTML;
					var l=object.scrollWidth-20;
				}
			}
			if(li[i].nodeName=="UL"){
					if(isIe){
						li[i].style.cssText="margin-left:-"+l+"px;";
					}
					li[i].style.display="block";
					
					
			}
		}
	}
	function bye(object){
		var li=object.childNodes;
		for(var i=0;i<li.length;i++){
			if(li[i].nodeName=="UL"){
				li[i].style.display="none";
			}
		}
	}

jQuery(document).ready(function(){
	 
	jQuery('#subscribe_dialog').hide();
	jQuery('#dialog').click(function(e){
		e.preventDefault();
		jQuery('#subscribe_dialog').dialog({
			autoOpen: true,
			width:400,
			modal:true
		});
	});
});

