$.fn.trimval = function() {
	return $(this).val().toString().replace(/^\s+|\s+$/g,"");
};

function isValidEmail(str){
	var filter=/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i;
	return (filter.test(str));
}

function isValidPhone(str){
	//var patt1 = new RegExp(/^(ext|x)*[0-9 \(\)\+\-]{8,20}$/i);
	var patt1 = new RegExp(/^(ext|x)*[0-9 \(\)\+\-]{1,50}$/i);
	return patt1.test(str);
}

function isValidNumber(str){
	var patt1 = new RegExp(/^[0-9]+$/i);
	return patt1.test(str);
}

$(document).ready(function() {
	$('.btn_over').mouseover(function(){
		$(this).attr('src', $(this).attr('src').toString().replace('.g','_over.g'));
		$(this).attr('src', $(this).attr('src').toString().replace('.j','_over.j'));
		$(this).attr('src', $(this).attr('src').toString().replace('.p','_over.p'));
    }).mouseout(function(){
		$(this).attr('src', $(this).attr('src').toString().replace('_over.g','.g'));
		$(this).attr('src', $(this).attr('src').toString().replace('_over.j','.j'));
		$(this).attr('src', $(this).attr('src').toString().replace('_over.p','.p'));
    });

});