
$(document).ready(function() {    
	
	$(".target").attr('target', '_blank');    

	if(jQuery.browser.msie && jQuery.browser.versio == '6.0'){
		$('nav li').hover(
			function() { $('ul', this).css('display', 'block'); },
			function() { $('ul', this).css('display', 'none'); });
	}
}); 

function equalize_columns(b, col1, col2) {  
	
	if(!col1)
		col1 = 'left';
	
	if(!col2)
		col2 = 'right'; 
		
	lh = $("#"+col1).height();
	rh = $("#"+col2).height();
	
	if(lh < rh) {
		if(rh - lh > b)
		$("#"+col1).height(rh-b); 
	}
}

function selectMenu(r) {
	$("#navitem"+r).addClass('current');
}

function scrollWin(el_id){
	$('html, body').animate({
		scrollTop: $("#"+el_id).offset().top
	}, 2000);
}    

String.prototype.trim = function() {
	return this.replace(/^\s+|\s+$/g,"");
}

function emailCheck(email) {
	
	return email.match(/^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,6}$/i);
}  

function roundNumber(rnum, rlength) { // Arguments: number to round, number of decimal places
	return Math.round(rnum*Math.pow(10,rlength))/Math.pow(10,rlength);
}

function myTimestamp(){
    tstmp = new Date();    
    return tstmp.getTime();
} 
