$(window).load(function() { $('#slide').cycle({ fx: 'fade' }); /*$('a').each(function() { var path = $(this).attr('href'); gclidvar = gup('gclid'); $(this).attr('href',path+'?gclid='+gclidvar); });*/ $('.wpcf7 input[name="name"]').change(function () { document.cookie = 'pg_form_name='+$(this).val()+ ';path=/'; }); $('.wpcf7 input[name="phone"]').change(function () { document.cookie = 'pg_form_phone='+$(this).val()+ ';path=/'; }); $('.wpcf7 input[name="email"]').change(function () { document.cookie = 'pg_form_email='+$(this).val()+ ';path=/'; }); $('.wpcf7 input[name="city"]').change(function () { document.cookie = 'pg_form_city='+$(this).val()+ ';path=/'; }); $('.wpcf7 input[name="state"]').change(function () { document.cookie = 'pg_form_state='+$(this).val()+ ';path=/'; }); $('.wpcf7 select[name="service"]').change(function () { document.cookie = 'pg_form_service='+$(this).val()+ ';path=/'; }); $('.wpcf7 textarea[name="comment"]').change(function () { document.cookie = 'pg_form_comment='+$(this).val()+ ';path=/'; }); }); function gup( name ) { name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]"); var regexS = "[\\?&]"+name+"=([^&#]*)"; var regex = new RegExp( regexS ); var results = regex.exec( window.location.href ); if( results == null ) return ""; else return results[1]; }