// relojes
$(function($) {
  var madrid = {
	timeNotation: '12h',
	am_pm: true,
    foreground: '#FFD200'
  }
  $('#jclock1').jclock(madrid);

  var london = {
	timeNotation: '12h',
	am_pm: true,
    utc: true,
    utc_offset: 1,
    foreground: '#FFD200'
  }
  $('#jclock2').jclock(london);

  var newYork = {
	timeNotation: '12h',
	am_pm: true,
    utc: true,
    utc_offset: -5,
    foreground: '#FFD200'
  }
  $('#jclock3').jclock(newYork);

  var tokio = {
	timeNotation: '12h',
	am_pm: true,
    utc: true,
    utc_offset: 9,
    foreground: '#FFD200'
  }
  $('#jclock4').jclock(tokio);
  
  var mexico = {
	timeNotation: '12h',
	am_pm: true,
    utc: true,
    utc_offset: -6,
    foreground: '#FFD200'
  }
  $('#jclock5').jclock(mexico);

});

$(document).ready(function(){

	if ($('#acceder'))
	{
		$("#acceder").hover(
			function () {
				$(this).attr({src:'img/loginOK_esp_over.gif'});
			},
			function () {
				$(this).attr({src:'img/loginOK_esp.gif'});
			}
		);

	}

	$("input[type='submit']").css({'cursor':'pointer','background-color':'#6A5746','color':'#fff','border':'none','font-weight':'bold','font-family':'Arial','font-size':'11px','-moz-border-radius':'1px','-webkit-border-radius':'1px','padding':'1px 2px'});

	//when key is pressed in the textbox
	$(".solonumeros").keypress(function (e)
	{
	  //if the letter is not digit then display error and don't type anything
	  if( e.which!=8 && e.which!=0 && (e.which<48 || e.which>57))
	  {
	    return false;
	  }
	});

	// esquinas redondeadas con jquery.corners.min.js
	$('.msg').addClass('radius');
	$('.alerta').addClass('radius');
	$('.radius').corners();

})

function abrir(url) {
	h = 564
	w = 800
	t = (screen.availHeight-h)/2
	l = (screen.availWidth-w)/2
	window.open(url,'bases','scrollbars=yes,toolbar=yes,width='+w+',height='+h+',top='+t+',left='+l+'').focus();
}
