$(document).ready(function() {
	$('.a').click(function() {
		$this   = $(this);
		$_value = $this.attr('rel');
		if ($('.' + $_value).hasClass('ups')) {
			$('.' + $_value).removeClass('ups').slideDown();
		}else{
			$('.' + $_value).slideUp().addClass('ups');
		};
		
	});
	
	$('.me li a').hover(function() {
		//mouse in
		$(this).stop().animate({"paddingLeft": "10px"}, "fast");
	},function() {
		//mouse out
		$(this).stop().animate({"paddingLeft": "0px"}, "fast");
	});
	
	$('.comment-form input,textarea').focus(function() {
		$this = $(this);
		$this.stop().animate({'backgroundColor' : '#eee'},1500);
	});
	
	$('.comment-form input,textarea').blur(function() {
		$this = $(this);
		$this.stop().animate({'backgroundColor' : '#fff'},1500);
	});
	$('.contact-table tr').find('td:first').css('width','60px');
	$('.contact-table tr:last').find('td').css('borderBottom','none');
	
	if ($.browser.msie) {
		$('.contact-table td').css({'borderBottom' : '1px solid #e5e5e5'});
		$('.contact-table tr').find('td:eq(1)').css({'borderRight' : 'none'});
	}
	
	
	function isValidURL(url){ 
    var RegExp = /^(([\w]+:)?\/\/)?(([\d\w]|%[a-fA-f\d]{2,2})+(:([\d\w]|%[a-fA-f\d]{2,2})+)?@)?([\d\w][-\d\w]{0,253}[\d\w]\.)+[\w]{2,4}(:[\d]+)?(\/([-+_~.\d\w]|%[a-fA-f\d]{2,2})*)*(\?(&?([-+_~.\d\w]|%[a-fA-f\d]{2,2})=?)*)?(#([-+_~.\d\w]|%[a-fA-f\d]{2,2})*)?$/; 
    if(RegExp.test(url)){ 
        return true; 
    }else{ 
        return false; 
    } 
} 

function isValidEmail(email){ 
    var RegExp = /^((([a-z]|[0-9]|!|#|$|%|&|'|\*|\+|\-|\/|=|\?|\^|_|`|\{|\||\}|~)+(\.([a-z]|[0-9]|!|#|$|%|&|'|\*|\+|\-|\/|=|\?|\^|_|`|\{|\||\}|~)+)*)@((((([a-z]|[0-9])([a-z]|[0-9]|\-){0,61}([a-z]|[0-9])\.))*([a-z]|[0-9])([a-z]|[0-9]|\-){0,61}([a-z]|[0-9])\.)[\w]{2,4}|(((([0-9]){1,3}\.){3}([0-9]){1,3}))|(\[((([0-9]){1,3}\.){3}([0-9]){1,3})\])))$/ 
    if(RegExp.test(email)){ 
        return true; 
    }else{ 
        return false; 
    } 
} 
/*
	$('.comment-form button').submit(function(){
		theEmail = $('#email').val();
		theWebsite = $('#website').val();
		if(!isValidEmail(theEmail) || !isValidURL(theWebsite))
		{
			alert('Te rog sa revalidezi adresa de email 
			Te rog sa revalidezi adresa web!');
			return false;
		}
	
	});
	*/

});