function form_input_classes(){ jQuery('input[type="text"]').addClass('text'); jQuery('input[type="password"]').addClass('text'); jQuery('input[type="checkbox"]').addClass('checkbox'); jQuery('input[type="radio"]').addClass('radiobutton'); jQuery('input[type="submit"]').addClass('submit'); jQuery('input[type="image"]').addClass('buttonImage'); jQuery('input[name=email]').addClass('input_email'); jQuery('input[name=firstname]').addClass('input_firstname'); jQuery('input[name=lastname]').addClass('input_lastname'); jQuery('input[name=addr1]').addClass('input_addr1'); jQuery('input[name=addr2]').addClass('input_addr2'); jQuery('input[name=city]').addClass('input_city'); jQuery('input[name=zip]').addClass('input_zip'); jQuery('select[name=state_cd]').addClass('select_state_cd'); jQuery('select[name=country]').addClass('select_country'); jQuery('input[name=phone]').addClass('input_phone'); } function form_swap_values(){ swapValues = []; jQuery(".swap_value").each(function(i){ swapValues[i] = jQuery(this).val(); jQuery(this).focus(function(){ if (jQuery(this).val() == swapValues[i]) {jQuery(this).val("");}}).blur(function(){ if (jQuery.trim(jQuery(this).val()) == "") {jQuery(this).val(swapValues[i]);}}); }); } function switchStylestyle(styleName){ jQuery('link[rel*=style]').each(function(i) { jQuery(this).disabled = true; if (jQuery(this).getAttribute('title') == styleName) jQuery(this).disabled = false; }); } function bsd_invite_manip(){ jQuery('#invitationpage').wrap('
'); jQuery('#invitation-wrapper').prepend('

The Next Step: Tell a Friend

'); } jQuery(document).ready(function() { form_input_classes(); bsd_invite_manip(); }); //Detection Code for Navigation /* jQuery(function(){ var url2 = window.location.href; //take action var takeActionLink = jQuery('li.takeAction a').attr('href'); var tAL = takeActionLink.split('/').join('\\/'); var tAL2 = new RegExp(tAL); //future var futureLink = jQuery('li.future a').attr('href'); var fL = futureLink.split('/').join('\\/'); var fL2 = new RegExp(fL); if(tAL2.test(url2)){jQuery('body').addClass('action');} else if(fL2.test(url2)) {jQuery('body').addClass('future');} }); */