$(function()
{$('input[type=button], input[type=submit]').css({'cursor':'pointer'});$('a.external').click(function()
{$(this).attr('target','_blank');});$('#logoWrap').css({'cursor':'pointer'}).click(function()
{window.location.href='/';});$('label.required').append('<img src="/img/forms/required.gif" alt="Required Field" style="margin:0 0 5px 5px;" />');var errorAlert='<div id="errorAlert" class="message error"><p style="margin:0;">\
						<strong>Error</strong><br/>\
						Please fill in all required fields (marked with a <img src="/img/forms/required.gif" style="background:#fff;padding:3px;" />)</p></div>';$('form').submit(function()
{$('.error').remove();var ret=true;var f=$(this).parent();var errorText='<p><strong>Please fix the following errors:</strong><br/>';$('label[class="required"]',$(this)).each(function()
{var lf=$(this).attr('for');var e=$('*[name="'+lf+'"]',f);var v=e.val();if(v=='')
{e.addClass('errorInput').effect("pulsate",{times:3},150);$('#errorAlert').remove();$('p.message').after(errorAlert);$('#errorAlert').show();errorText+='<span style="width:30%;float:left;">'+lf.replace(/_/g,' ').replace('cust','').replace('del','Delivery')+'</span>';ret=false;}
else
{$('#errorAlert').hide();e.removeClass('errorInput');}});if(ret===false)
{$('#errorAlert').remove();errorText+'</p>';$(this).before(errorAlert);window.location.href.split('#')[0]+='#';}
return ret;});corners();});
