$(document).ready(function() { $('select[name="authtype"]').change(function(){ var el = $(this).val(); if (el=="pass") { $('#div2').css('display','none'); $('#div1').css('display','block') } else { $('#div1').css('display','none'); $('#div2').css('display','block'); } }); }); function superMsg() { $.each($('.super-msg .ugl'), function(k, v) { var par = $(this).parent(); $(this).css('margin-top', ((par.height() - $(this).height())/2) + 'px'); }); } jQuery('#errjs').ready(function() { $('#errjs').remove(); }); var timestamp = 0; jQuery(document).ready(function() { function setDateTime() { if (!timestamp) timestamp = parseInt($('#header .clock').text()); else timestamp++; var datetime = new Date(timestamp*1000); var months = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"]; var date = datetime.getDate() + ' ' +months[datetime.getMonth()] + ' ' + datetime.getFullYear(); var timeH = datetime.getUTCHours(); var timeM = datetime.getUTCMinutes(); var timeS = datetime.getUTCSeconds(); var time = ((timeH<10) ? '0'+timeH : timeH) + ':' + ((timeM<10) ? '0'+timeM : timeM) + ':' + ((timeS<10) ? '0'+timeS : timeS) + ' GMT'; $('#header .clock').text(date+" "+time); setTimeout(function(data){ setDateTime(); }, 1000); } setDateTime(); // langs $('#langs li').live('click', function() { var href = (!$(this).hasClass('active')) ? $(this).find('a').attr('href') : false; var cont = $(this).closest('#langs'); var lang = cont.find('div.forlang').attr('class'); var sel = $(this).attr('id'); cont.toggleClass('open'); if (cont.hasClass('open')) { var th = cont.find('li.active'); var repl = '
  • ' + th.html() + '
  • '; $(this).remove(); $(repl).prependTo(cont.find('ul')); } else { cont.find('li').removeClass('active'); cont.find('div#forlang').attr('class', sel); $(this).addClass('active'); } if (href != false) document.location = href; else return false; }); // hover fix $('button') .mouseover(function() { $(this).addClass('hover');}) .mouseout(function() { $(this).removeClass('hover');}); });