$(document).ready(function(){
	$.NiceJForms.build();
	
	// Get the source directory of this script
	scriptSrc = $('script[@src$=jquery.js]').attr('src').match(/^((?:\.\.\/)*)/)[1];
	
	// Image mouseover hover function
	$('.hoverimage').hover(
		function(){	
			try {
			if (this.src != null) {
				if(this.src.match('_passief.')){
					this.src = this.src.replace(/_passief./, "_over.");
				}
			}
			} catch (e) {}
		},
		function(){
			try {
			if (this.src != null) {
				if(this.src.match('_over.')){
					this.src = this.src.replace(/_over./, "_passief.");
				}
			}
			} catch (e) {}
		} 
	);
	
	if($('#animation').width() != null){
		// flash element
		var so = new SWFObject("/swf/loader.swf", "mymovie", "980", "420", "8", "");
		so.addParam('scale','noscale');
		so.addParam('wmode','transparent');
		so.addVariable('mainMcFolder','/swf/');
		so.addVariable('wauwLanguage','../animation');
		so.addVariable('downloadUrl','http://www.wauw.fm');
		so.addVariable('showPresent','yes');
		so.addVariable('presentUrl','http://www.wauw.fm');
		so.write("animation");
	};	
	
	if($('#myMusicFlash')){
	        try {
		// flash element
		var so = new SWFObject("../swf/myMusic_animation.swf", "myMusicFlash", "420", "360", "8", "");
		so.addParam('scale','noscale');
		so.write("myMusicFlash");
		} catch (e) {}
	};	

});

function Send()
{
	//check mail
	if(document.getElementById('email').value == '')
	{
		alert('Email must be filled in!');
	}
	else
	{
		if(document.getElementById('phone').value =='')
		{
			alert('Mobile serialnumber must be filled in!');
		}
		else
		{
			document.getElementById('frmMail').submit();
		}
	}
}