$(document).ready(function(){ $('#imgCP').click(function() { $('#logonForm').attr('action', 'https://manage.hostess.com.au/execute/logon'); $('#logonForm').submit(); return false; }); $('#imgWM').click(function() { $('#logonForm').attr('action', 'https://webmail.netregistry.net'); $('#logonForm').submit(); return false; }); $('#logonForm input[name=login]').focus(function() { if ($(this).val() == 'Username') { $(this).data('default',$(this).val()); $(this).val(''); $(this).blur(function() { if ($(this).val() == '') { $(this).val($(this).data('default')); } }); } }); $('#logonForm input[name=password_clone]').focus(function() { $(this).hide(); $('#logonForm input[name=password]').show().focus(); }); $('#logonForm input[name=password]').blur(function() { if ($(this).val() == '') { $(this).hide(); $('#logonForm input[name=password_clone]').show(); } }); $('a.demo').click(function() { popUp($(this).attr('href')); return false; }); $('a.rorBtn').click(function() { $('.rorDiv').slideUp('fast'); $($(this).attr('href')).slideDown(); return false; }); }); function popUp(URL) { day = new Date(); id = day.getTime(); eval("page" + id + " = window.open(URL, '" + id + "', 'status=yes,menubar=yes,scrollbars=yes,resizable=yes,width=760,height=640');"); }