1jQuery(document).ready(function($) { 2 3 /* FACEBOOK LIKE BOX */ 4 $('#a7-facebook-like-box .a7-facebook-title').hover( 5 function() { 6 $('#a7-facebook-like-box').animate({ marginLeft:294} , '500', 'swing'); 7 } 8 ); 9 10 jQuery('#a7-facebook-like-box').hover( 11 function() { 12 // Do Nothing 13 }, 14 function() { 15 jQuery('#a7-facebook-like-box').animate({ marginLeft:0} , '500', 'swing'); 16 } 17 ); 18 19 20 21 //make formatted phone numbers clickable on mobile devices 22 if (navigator.userAgent.match(/(iPhone|iPod|iPad|Android|BlackBerry|IEMobile)/)) { 23 //do nothing 24 } else { 25 //remove telephone links for desktops 26 $('a[href^="tel:"]').each( function(){ 27 tel = $(this).html(); 28 $(this).replaceWith(tel); 29 }); 30 } 31 32 33 //stop default value validating the form 34 $.validator.addMethod("exclude_default", function(value, element) { 35 return !(element.value == element.defaultValue); 36 }); 37 38 39 40 //remove/add default value from field when focussed/blurred 41 $.fn.toggleInputValue = function(){ 42 return $(this).each(function(){ 43 var input = $(this); 44 var default_value = input.val(); 45 46 input.focus(function() { 47 if(input.val() == default_value) input.val(""); 48 }).blur(function(){ 49 if(input.val().length == 0) input.val(default_value); 50 }); 51 }); 52 } 53 54 //toggle default om search form 55 $('#search').toggleInputValue(); 56 //toggle email subscribe 57 $('#a7-email-subscribe-form #email-address').toggleInputValue(); 58 59 //comment form validation 60 $('#commentform').validate({ 61 ignore: [], 62 rules: { 63 author: "required", //FIRST NAME 64 email: { //EMAIL 65 required: true, 66 email: true 67 }, 68/* rating: "required", //RATING */ 69 comment: "required" //REVIEW 70 }, 71 messages: { 72 author: "Please tell us your first name", 73 email: { 74 required: "Please tell us your email address", 75 email: "Please enter a valid email address" 76 }, 77/* rating: "Please rate this product", */ 78 comment: "Don't forget to write your comment!" 79 }, 80 validClass: "success", 81 errorElement: "div", 82 errorPlacement: function(error, element) { 83 error.insertAfter(element); 84 } 85 86 }); 87 88 //email subscribe validation 89/* 90 $('#a7-email-subscribe-form').validate({ 91 ignore: [], 92 rules: { 93 email_address: { //EMAIL 94 required: true, 95 email: true 96 } 97 }, 98 messages: { 99 email_address: { 100 required: "Please tell us your email address", 101 email: "Please enter a valid email address" 102 } 103 }, 104 validClass: "success", 105 errorElement: "div", 106 errorPlacement: function(error, element) { 107 error.insertBefore(element); 108 } 109 110 }); 111*/ 112 if ($('#a7-contact-form ').length > 0) { 113 $('input#name').focus(); 114 } 115 116 117 //contact form validation 118 $('#a7-contact-form ').validate({ 119 ignore: [], 120 rules: { 121 name: "required", //FIRST NAME 122 email: { //EMAIL 123 required: true, 124 email: true 125 }, 126 message: "required" //REVIEW 127 }, 128 messages: { 129 name: "Please tell us your name", 130 email: { 131 required: "Please tell us your email address", 132 email: "Please enter a valid email address" 133 }, 134 message: "Don't forget to write your message!" 135 }, 136 validClass: "success", 137 errorElement: "div", 138 errorPlacement: function(error, element) { 139 error.insertAfter(element); 140 } 141 142 }); 143 144 145 $("#start_date").datepicker({ dateFormat: 'dd-mm-yy' }); 146 147 148 149 $('#a7-slider ul').cycle({ 150 speed: 600, 151 fx: "scrollHorz", 152 timeout: 10000, 153 slides: " > li", 154 next: "#a7-slider .cycle-next", 155 prev: "#a7-slider .cycle-prev" 156 }); 157 158 159 160 //close popup 161 function close_popup() { 162 $("#container").fadeTo(500, 1); 163 $("#a7-overlay").fadeOut(500, function(){ 164 $("#a7-overlay").html(''); 165 }); 166 $('#container').unbind('click'); 167 } 168 169 170 //position the popup at the center of the page 171 function position_popup(){ 172 if(!$("#a7-overlay").is(':visible')){ 173 return; 174 } 175 $("#a7-overlay").css({ 176 left: ($(window).width() - $('#a7-overlay').width()) / 2, 177 top: $(window).scrollTop() + (($(window).height() - $('#a7-overlay').height()) / 2), 178 position:'absolute' 179 }); 180 } 181 182 //maintain the popup at center of the page when browser resized 183 $(window).bind('resize',position_popup); 184 185 186 $('.audio-search-filter').change(function() { 187 if ( $(this).val() != '' ) { 188 location.href = $(this).val(); 189 } 190 }); 191 192 $("#audio-archive-month").chosen({ 193 width: "100%", 194 allow_single_deselect: true, 195 placeholder_text_single: 'Choose a Month' 196 }); 197 198 $("#audio-archive-year").chosen({ 199 width: "100%", 200 allow_single_deselect: true, 201 placeholder_text_single: 'Choose a Year' 202 }); 203 204 $("#audio-category-filter").chosen({ 205 width: "100%", 206 allow_single_deselect: true, 207 placeholder_text_single: 'Choose a Category' 208 }); 209 210 211/* 212 $("#menu-responsive-navigation").chosen({ 213 width: "100%", 214 allow_single_deselect: true, 215 placeholder_text_single: 'Menu' 216 }); 217*/ 218 219 $('#menu-responsive-navigation').change(function() { 220 if ( $(this).val() != '' ) { 221 location.href = $(this).val(); 222 } 223 }); 224 225 226});
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.