var loadimgs='<img src="css/img/volvero.jpg" />';

function pheight(){

$("div#pleft").height($("div#content").height());
$("div#pright").height($("div#content").height());
}
//window.onload = pheight;


$(document).ready(function(){

	$("#menup a").hover(function() {		
		$(this).animate({ paddingLeft: '4px' }, 50);
		$(this).animate({ opacity: 0.5 }, 50);		
		$(this).animate({ opacity: 1 }, 50);		
		$(this).animate({ paddingLeft: '0px' }, 50);
		$(this).animate({ paddingLeft: '4px' }, 50);
		$(this).animate({ paddingLeft: '0px' }, 50);

	}, function() {
		$(this).animate({ paddingLeft: '4px' }, 50);
		$(this).animate({ paddingLeft: '0px' }, 50);
	});	

  $("#foot").html("DotGestion &copy; 2009");
  $("#loadimgs").html(loadimgs);

   $("#bvolver").hover(
   		function() { $(this).addClass("bvolvero");},
		function() { $(this).removeClass("bvolvero"); }
   );
   $("#bvolver").click(function(){
   		history.back();
   });
   
   $("#phidden").hide();
   $("#paplications").hide();
   $(".more").click(function () {
      $("#phidden").dialog();
	  $("#phidden").show();
   });
    $(".aplications").click(function () {
      $("#paplications").dialog();
	  $("#paplications").show();
   });

   $("img").hover(
   function() { $(this).fadeTo("normal",0.8); },
   function() { $(this).fadeTo("normal",1); }
   );

});



var filters = {
			nombre: function(el) {return ($(el).val() != '' && $(el).val() != -1);},
			apellido: function(el) {return ($(el).val() != '' && $(el).val() != -1);},
			empresa: function(el) {return ($(el).val() != '' && $(el).val() != -1);},
			consulta: function(el) {return ($(el).val() != '' && $(el).val() != -1);},
			email: function(el) {return /^[A-Za-z][A-Za-z0-9_.]*@[A-Za-z0-9_]+\.[A-Za-z0-9_.]+[A-za-z]$/.test($(el).val());},
			telefono: function(el){return /^[0-9- ]*$/.test($(el).val());}
};
