$(document).ready( function() {
/*	*///IE
	 if($.browser.msie) { $( function() { 
		$('input[@type=submit]').addClass('submit');
		$('input[@type=text], input[@type=password]').addClass('input_text');
		$('.imagini li').hover(
			function() { $(this).toggleClass('hover');},
			function() { $(this).toggleClass('hover');}
		);
		
		//NAV
		$('#nav li').hover(
			function() { $(this).toggleClass('hover');},
			function() { $(this).toggleClass('hover');}
		);
		
		//SUBNAV
		$('#subnav li:first-child').addClass('first-child');
		/**/
	 })};
	 

	 //TABLES
	$('table tbody tr').mouseover(function() { $(this).addClass('hover'); });
	$('table tbody tr').mouseout(function() { $(this).removeClass('hover'); });
	
	 
	//TABLES
	$('table tbody tr:even').addClass('odd');
	
	
	//NAV
	$('#nav li').each(function(i) {
		var j = i+1;
		$(this).children('a').append('<i class="nav'+j+'"></i>');
		$(this).not('.active').children('a').children('i').css("opacity", "0.5");
		$(this).not('.active').children('a')
			.mouseover(function(){
				//$(this).children('i').fadeTo("fast", 1);
				$(this).children('i').css("opacity", "0.9999");
			})
			.mouseout(function(){
				//$(this).children('i').fadeTo("fast", 0.5);
				$(this).children('i').css("opacity", "0.5");
			});
	});
	
	//SUBNAV
	$('#subnav li.active').children('a').wrap('<i></i>');
	
	//LIST
	$('#list li:even').addClass('even');
	
	//COLUMN EQUALISER
	if (!document.getElementById('home1')) {
		if (document.getElementById('content')) {
			var subnav = document.getElementById('subnav').offsetHeight;
			var content = document.getElementById('content').offsetHeight;
			var max = content;
			var change = $('#subnav');
			if (subnav>content) {
				max = subnav;
				change = $('#content')
			} else {
				change.css("height",max);
			}
		}
	}
	if (document.getElementById('intranet')){
		/*EQUAL HEIGHTS*/
		var max=$('#intranet #home1').height();	
		var ch=$('#intranet #subnav').height();	
		var rh=$('#intranet #home2').height();	
		//console.log(ch, max, rh);
		if (max < rh) max = rh;
		//console.log(ch, max, rh);
		if(ch < max) { $('#intranet #subnav').height(max+65); }
		//console.log(ch, max, rh);
	}
	
	//NEWS HACK
	$("#content .newsList").parent().addClass('noBorder');

} );

function Submitit(){
	if (document.getElementById('yourname').value == '') {
		document.getElementById('yourname').style.background = '#ffdbdb';
		document.getElementById('yourname').focus();
		alert('U dient uw naam in te voeren');
		return false;
	} else if (document.getElementById('voorwaarden').checked == false) {
		alert('U dient akkoord te gaan met de voorwaarden');
		return false;
	} else {
		if (document.getElementById('emailId')) {
			if (document.getElementById('emailId').value=="") {
				alert('Email required');
				return false;
			} else {
				return true;
			}
		} else { 
			return true; 
		}
	}
}