jQuery.noConflict(); $(document).ready(function() { jQuery('ul.nav').superfish(); }); function form_input_classes(){ $('#password-clear').show(); $('#password-password').hide(); $('#password-clear').focus(function() { $('#password-clear').hide(); $('#password-password').show(); $('#password-password').focus(); }); $('#password-password').blur(function() { if($('#password-password').val() == '') { $('#password-clear').show(); $('#password-password').hide(); } }); } function form_labelize(){ jQuery(".labelize input:password, .labelize input:text").clearingInput(); } function cycle_lite(){ jQuery('#cycle') .cycle({ fx: 'scrollLeft', speed: 'slow', timeout: 10000, pager: '#rotator' }); } //this function changes the href value of .pdf links so that the host name is the same as the domain name function pdfCDNValFix() { //select all anchor tags whose href attributes end with ".pdf" jQuery("a[href$='.pdf']").each(function(){ //pull href value var href = jQuery(this).attr('href'); //regex to test for ethanolrfa domain var domainRegex = /ethanolrfa.org/; //regex to test for relative href val var relativeRegex = /^\//; if(domainRegex.test(href) || relativeRegex.test(href)){ //this suffix added to the url will change the value of "from download url" var suffixString = '?nocdn=1'; //concat suffixString to href var var newHref = href + suffixString; //set the new href value jQuery(this).attr('href', newHref); } }); } jQuery(document).ready(function() { form_input_classes(); form_labelize(); cycle_lite(); pdfCDNValFix(); });