$(document).ready(function() {
	
	
	$('ul#mainNavigation li').hover(function(){
		$('ul', this).addClass('hover');
		$('ul', this).fadeIn(500);

	}, function(){
		$('ul', this).fadeOut(500);	
	});


	$('ul#navigation li').hover(function(){
		if($(this).children('ul').length!=0){
			$(this).children('ul').css({position: 'absolute', top: '24px', left: '12px'});
			$(this).children('ul').slideDown(200);
		}
	}, function(){
		if($(this).children('ul').length!=0){
			$(this).children('ul').slideUp(200);
		}		
	});

});


function openAWindow( pageToLoad, winName, width, height, center)
{   
     
    xposition=0; yposition=0;
    if ((parseInt(navigator.appVersion) >= 4 ) && (center)){
        xposition = (screen.width - width) / 2;
        yposition = (screen.height - height) / 2;
    }
	
	//0 => no
	//1 => yes
    var args = "";
    	args += "width=" + width + "," + "height=" + height + ","
		+ "location=0,"
		+ "menubar=0,"
		+ "resizable=0,"
		+ "scrollbars=0,"
		+ "statusbar=false,dependent,alwaysraised,"
		+ "status=false,"
		+ "titlebar=no,"
		+ "toolbar=0,"
		+ "hotkeys=0,"
		+ "screenx=" + xposition + ","  //NN Only
		+ "screeny=" + yposition + ","  //NN Only
		+ "left=" + xposition + ","     //IE Only
		+ "top=" + yposition;           //IE Only
		//fullscreen=yes, add for full screen
		//alert(pageToLoad)
    	var dmcaWin = window.open(pageToLoad,winName,args );
		//alert(dmcaWin)
    	dmcaWin.focus();
    //window.showModalDialog(pageToLoad,"","dialogWidth:650px;dialogHeight:500px");
}