
function scrollTo(selector,callback){var targetOffset=$(selector).offset().top;if(typeof callback=='function'){$('html,body').animate({scrollTop:targetOffset},1000,callback($(selector)));}
else{$('html,body').animate({scrollTop:targetOffset},1000);}}
function click_confirm(text){var r=confirm(text);if(r===false){return false;}else{return true;}}
$(document).ready(function(){$('#success').hide();$('#success').fadeIn(2000);$('.roll-top').bind('click',function(){scrollTo('body,html');return false;});$('#query').example(function(){return this.title;});$('form').bind('submit',function(){if($('#query').val()===''){return false;}});$(".external").bind("click",function(){window.open(this.href);return false;});$('#previous').bind('click',function(){var text='Are you sure?\nf you go back you will lose all the information you have entered on this page. If you CONTINUE to the final preview page, you will have an opportunity to edit all information.';if(!click_confirm(text)){return false;}});if($('#step3').val()!=='1'){$('#cancel').bind('click',function(){var text='Are you sure?\nYou will lose all of the information you have entered';if(!click_confirm(text)){return false;}});}
if(navigator.appVersion.indexOf("MSIE 7.")===-1){$('#content input,#content textarea','.form').not('input:radio, input:checkbox').bind('focus',function(){if($(this).hasClass('error')){$(this).css('background-color','#FFE7C9');}
else{$(this).css('background-color','#F5FEE2');}});}
else{$('#content input,#content textarea').not('input:radio, input:checkbox').bind('focus',function(){if($(this).hasClass('error')){$(this).css('background-color','#FFE7C9');}
else{$(this).css('background-color','#F5FEE2');}});$('#content input,#content textarea').not('input:radio').blur(function(){if($(this).hasClass('error')){$(this).css('background-color','#FFE7C9');}
else{}});}
$('#login-button, #signup-button').hover(function(){$(this).addClass('hover-background');$(this).find('a').addClass('button-hover');},function(){$(this).removeClass('hover-background');$(this).find('a').removeClass('button-hover');});$('#login-button, #signup-button','#user-buttons').bind('click',function(){window.location.assign($(this).find('a').attr('href'));});});