var handlerAjaxLink=function(){$url=$(this).attr('href');$.ajax({type:'GET',url:$url,dataType:'html',cache:false,success:function(data,textStatus){while(!$('#header').next().is('#footer')&&$('#header').next().size())$('#header').next().remove();$('#header').after(data);$('a.ajax').click(handlerAjaxLink);},error:function(XMLHttpRequest,textStatus,errorThrown){while(!$('#header').next().is('#footer')&&$('#header').next().size())$('#header').next().remove();$('#header').after(XMLHttpRequest.responseText);$('a.ajax').click(handlerAjaxLink);}});return false;};var reloadCaptcha=function(){var _src=$(this).attr('src');_src=_src.split('?_c=')[0]+'?_c='+(new Date().getTime());var _newCaptcha=new Image();var _oldCaptcha=$('#'+$(this).attr('id'));$(_oldCaptcha).unbind('click');$(_newCaptcha).load(function(){$(this).hide();_oldCaptcha.fadeOut('fast',function(){$(_oldCaptcha).replaceWith($(_newCaptcha));$(_newCaptcha).attr({id:'captcha',alt:'captcha',title:'Click to reload'}).fadeIn('fast').css({display:'',opacity:'100%'}).bind('click',reloadCaptcha);});}).attr('src',_src);};$.fn.hoverClass=function(c){return this.each(function(){$(this).hover(function(){$(this).addClass(c);},function(){$(this).removeClass(c);});});};function equalHeight(group){tallest=0;group.each(function(){thisHeight=$(this).height();if(thisHeight>tallest){tallest=thisHeight;}});group.height(tallest);}$(document).ready(function(){$('a.ajax').click(handlerAjaxLink);$('.email').antiSpamBot();$('#login-home').submit(function(){_pass=$('#login-home :input[name=_password]').attr('value');$('#login-home :input[name=password]').attr('value',SHA256(_pass));$('#login-home :input[name=_password]').attr('value','');});$('#newsletter :input').focus(function(){if($(this).val()=='Email Address')$(this).val('');}).blur(function(){if($(this).val()=='')$(this).val('Email Address');});$('#nav').lavaLamp({fx:'swing',speed:400});$("#ver-nav").lavaLamp({fx:"easeOutExpo",speed:400});$("#nav li").hover(function(){$("ul",this).fadeIn("fast");},function(){});if(document.all){$("#nav li").hoverClass("sfHover");}equalHeight($(".set-listing li h3"));equalHeight($(".set-listing li .desc"));$('a[href*=#]').unbind('click');});