1 2var ww = document.body.clientWidth; 3 4 5$(document).ready(function(){ 6 $("[rel=\'tooltip\']").tooltip(); 7}); 8 9var adjustMenu = function() { 10 if (ww < 980) { 11 $("._toggleMenu").css("display", "block"); 12 $(".navbar").css("display", "none"); 13 $(".navbar_member").css("display", "block"); 14 if (!$(".toggleMenu").hasClass("active")) { 15 $("._toggleMenu .nav").hide(); 16 } else { 17 $("._toggleMenu .nav").show(); 18 } 19 $("._toggleMenu .nav li").unbind('mouseenter mouseleave'); 20 $("._toggleMenu .nav li a.parent").unbind('click').bind('click', function(e) { 21 // must be attached to anchor element to prevent bubbling 22 e.preventDefault(); 23 $(this).parent("li").toggleClass("hover"); 24 }); 25 $("ul").removeClass("dropdown-menu"); 26 } 27 else if (ww >= 980) { 28 $(".navbar").css("display", "block"); 29 $(".nav li ul").addClass("dropdown-menu"); 30 $("._toggleMenu").css("display", "none"); 31 $("._toggleMenu .nav").show(); 32 $("._toggleMenu .nav li").removeClass("hover"); 33 $("._toggleMenu .nav li a").unbind('click'); 34 $("._toggleMenu .nav li").unbind('mouseenter mouseleave').bind('mouseenter mouseleave', function() { 35 // must be attached to li so that mouseleave is not triggered when hover over submenu 36 $(this).toggleClass('hover'); 37 }); 38 } 39} 40 41 42 43 44 45 46 !function ($) { 47 $(function(){ 48 // carousel demo 49 $('#myCarousel').carousel() 50 }) 51 }(window.jQuery) 52 53 54$(document).ready(function(){ 55 $('#slider1').bxSlider({ 56 slideWidth: 240, 57 minSlides: 1, 58 maxSlides:3, 59 slideMargin: 15, 60 nextSelector: '.slider1-next', 61 prevSelector: '.slider1-prev', 62 nextText: '>', 63 prevText: '<' 64 }); 65}); 66$(document).ready(function(){ 67 $('#slider2').bxSlider({ 68 slideWidth: 355, 69 minSlides: 1, 70 maxSlides:3, 71 slideMargin: 15, 72 nextSelector: '.slider2-next', 73 prevSelector: '.slider2-prev', 74 nextText: '>', 75 prevText: '<' 76 77 }); 78}); 79$(document).ready(function(){ 80 $('#slider3').bxSlider({ 81 slideWidth: 240, 82 minSlides: 1, 83 maxSlides:3, 84 slideMargin: 15, 85 nextSelector: '.slider3-next', 86 prevSelector: '.slider3-prev', 87 nextText: '>', 88 prevText: '<' 89 90 }); 91}); 92 93$(document).ready(function(){ 94 $('#slider5').bxSlider({ 95 slideWidth: 240, 96 minSlides: 1, 97 maxSlides:3, 98 slideMargin: 15, 99 nextSelector: '.slider5-next', 100 prevSelector: '.slider5-prev', 101 nextText: '>', 102 prevText: '<' 103 104 }); 105}); 106 107// 108// Vertical Slider 109// 110$(document).ready(function(){ 111 $('#slider6').bxSlider({ 112 auto: true, 113 mode: 'vertical', 114 minSlides: 1, 115 slideMargin: 5 116 }); 117}); 118 119$(document).ready(function(){ 120 $('#slider7').bxSlider({ 121 slideWidth: 240, 122 minSlides: 1, 123 maxSlides:3, 124 slideMargin: 15, 125 nextSelector: '.slider7-next', 126 prevSelector: '.slider7-prev', 127 nextText: '>', 128 prevText: '<' 129 130 }); 131}); 132 133$(document).ready(function(){ 134 if ($('.page_content li').size() > 20) { 135$('#paging_container') 136.pajinate( 137{ 138items_per_page : 20, 139nav_label_first : '<<', 140nav_label_last : '>>', 141nav_label_prev : '< Previous ', 142nav_label_next : ' Next >' 143}); 144} 145}); 146/*Date Picker*/ 147 148 149 $(function() { 150 $("#dob").datepicker({ 151 dateFormat:"dd M yy", 152 153 changeMonth: true, 154 changeYear: true, 155 yearRange: "-120:+0" 156 }); 157 158 }); 159 160 $(function() { 161 $("#pdob").datepicker({ 162 dateFormat:"dd M yy", 163 changeMonth: true, 164 changeYear: true, 165 yearRange: "-120:+0" 166 167 }); 168 }); 169 $(function() { 170 $("#anniversary").datepicker({ 171 dateFormat:"dd M yy", 172 changeMonth: true, 173 changeYear: true, 174 yearRange: "-120:+0" 175 176 }); 177 }); 178 179 /**************Contact Validation************************/ 180 $(function(){ 181 182 $.metadata.setType("attr", "validate"); 183 184 185 186 $(".contact_form").validate({ 187 188 189 submitHandler: function(form) { 190 191 $("#securitycode_error").html(""); 192 $.post('/post.php',{action : 'captchaAction', 193 security_code: $("#security_code").val()},function(data){ 194 if (data !=""){ 195 $("#securitycode_error").html('<span class="bodytext_red">
195Please enter a valid security code</span>'); 196 }else{ 197 form.submit(); 198 199 } 200 }); 201 } 202 }); 203 204 205 206 207 }); 208$(document).ready(function(){ 209 210 211 212 213$("#email").keyup(function(){ 214 var email_format = $("#email").val(); 215 if(validateEmail(email_format)){ 216 $("#EmailErr").html(''); 217 }else{ 218 $("#EmailErr").html('<span class="bodytext_red">Please enter a valid email address</span>'); 219 } 220}); 221 222function validateEmail(email_format){ 223var filter = /^([a-zA-Z0-9_\.\-\+])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/; 224if(filter.test(email_format)){ 225 return true; 226}else{ 227 return false; 228} 229} 230}); 231 232 233 234$().ready(function() { 235 236 237 238 var validator = $(".contact_form").bind("invalid-form.validate", function() { 239 240 $("#error_summary").html("You haven't filled in " + validator.numberOfInvalids() + " mandatory fields, please fill in the missing fields below and try again."); 241 }).validate({ 242 243 244 }); 245 246 247 }); 248 249 $(".fancypdf").click(function(){ 250 $.fancybox({ 251 type: 'html', 252 autoSize: false, 253 width:1000, 254 content: '<embed src="'+this.href+'#nameddest=self&page=1&view=FitH,0&zoom=80,0,0" type="application/pdf" height="99%" width="100%" />', 255 beforeClose: function() { 256 $(".fancybox-inner").unwrap(); 257 } 258 }); //fancybox 259 return false; 260 }); //click 261 262 263$(document).ready(function() { 264 /* 265 * Thumbnail helper. Disable animations, hide close button, arrows and slide to next gallery item if clicked 266 */ 267 268 $('.fancybox-thumbs').fancybox({ 269 type : 'image', 270 openEffect : 'none', 271 closeEffect : 'none', 272 prevEffect : 'none', 273 nextEffect : 'none', 274 closeBtn : false, 275 arrows : true, 276 nextClick : true, 277 helpers : { 278 title : { 279 type : 'inside' 280 }, 281 buttons : {}, 282 thumbs : { 283 width : 50, 284 height : 50 285 } 286 }, 287 afterLoad : function() { 288 this.title = 'Image ' + (this.index + 1) + ' of ' + this.group.length + (this.title ? ' - ' + this.title : ''); 289 } 290 }); 291 292 }); 293
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.