function openwin(URL,naam,wdt,hgt) {
  window.open(URL, naam, 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=' +wdt+ ',height=' +hgt+ '');
}

function checkdomain(domainname,domaintld,wdt,hgt) {
  window.open('http://www.visualweb.nl/whois/whois.php?domainname=' + domainname + '&domaintld=' + domaintld, 'popup', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=' +wdt+ ',height=' +hgt+ '');
}

$(document).ready(function(){  

	Modernizr._fontfaceready(function(bool){
	  // if @font-face isn't supported, we employ CufÑn
	  if (!bool) $.getScript('./lay-out/js/cufon.with.font.js',function(){
		Cufon.replace('ul.topnav li a'); 
	    Cufon.now();
	  });
	});
	
   
   /*
     $('li.dropdown').hover(  
         function () {  
             //show its submenu  
             $('ul', this).slideDown('normal');  
   
         },   
         function () {  
             //hide its submenu               
             $('ul', this).slideUp('normal');           
         }  
     ); 
   */      
   
     $("ul.topnav li").mouseover(function() { //When trigger is clicked...  
   
         //Following events are applied to the subnav itself (moving subnav up and down)  
         $(this).find("ul.subnav").slideDown('fast	').show(); //Drop down the subnav on click  
   
         $(this).hover(function() {  
         }, function(){  
             $(this).find("ul.subnav").slideUp('normal'); //When the mouse hovers out of the subnav, move it back up  
         });  
   
         //Following events are applied to the trigger (Hover events for the trigger)  
         }).hover(function() {  
             $(this).addClass("subhover"); //On hover over, add class "subhover"  
         }, function(){  //On Hover Out  
             $(this).removeClass("subhover"); //On hover out, remove class "subhover"  
     }); 
     
     
		$("#webmail-atmail").bind('submit', function() {
			email = $("#atmail-email").val();
			emailArgs = email.split('@');
			$("input[name=emailName]").val(emailArgs[0]);
			
			if( !emailArgs[1] ) {
				$("input[name=emailDomain]").val( $("input[name=emailDomainDefault]").val() );
				
			} else {
				$("input[name=emailDomain]").val(emailArgs[1]);				
			}

			document.body.style.cursor = 'wait';
		});
     
});	
