function mainmenu(){
$(" #nav ul ").css({display: "none"}); // Opera Fix
$(" #nav li").hover(function(){
		$(this).find('ul:first').css({visibility: "visible",display: "none"}).show(400);
		},function(){
		$(this).find('ul:first').css({visibility: "hidden"});
		});
        
        
      var zIndexNumber2 = 10000;
    $('#nav ul').each(function() {
        $(this).css('zIndex', zIndexNumber2);
        zIndexNumber2 -= 10;    
        });
}



 
 
 $(document).ready(function(){					
	mainmenu();
    
});






/**
Vertigo Tip by www.vertigo-project.com
Requires jQuery
*/

this.vtip = function() {    
    this.xOffset = -10; // x distance from mouse
    this.yOffset = 10; // y distance from mouse       
    
    $(".vtip").unbind().hover(    
        function(e) {
            this.t = this.title;
            this.title = ''; 
            this.top = (e.pageY + yOffset); this.left = (e.pageX + xOffset);
            
            $('body').append( '<p id="vtip"><img id="vtipArrow" />' + this.t + '</p>' );
                        
            $('p#vtip #vtipArrow').attr("src", 'images/vtip_arrow.png');
            $('p#vtip').css("top", this.top+"px").css("left", this.left+"px").fadeIn("slow");
            
        },
        function() {
            this.title = this.t;
            $("p#vtip").fadeOut("slow").remove();
        }
    ).mousemove(
        function(e) {
            this.top = (e.pageY + yOffset);
            this.left = (e.pageX + xOffset);
                         
            $("p#vtip").css("top", this.top+"px").css("left", this.left+"px");
        }
    );            
    
};

jQuery(document).ready(function($){vtip();}) 



function openWindow(mypage, myname, w, h, t, l, scroll,resizable) {                
    if (t == 0 || l == 0){
        var winl = (screen.width - w) / 2;
        var wint = (screen.height - h) / 2;
    }else{
        var winl = l;
        var wint = t;
    }
    
    var winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',resizable='+resizable+',toolbar=no'
    var win = window.open(mypage, myname, winprops)
        if (parseInt(navigator.appVersion) >= 4)
        {
            win.window.focus();
        }
}

