1// ======= Placeholder Plugin ========================================= 2/*! http://mths.be/placeholder v2.0.7 by @mathias */ 3;(function(f,h,$){var a='placeholder' in h.createElement('input'),d='placeholder' in h.createElement('textarea'),i=$.fn,c=$.valHooks,k,j;if(a&&d){j=i.placeholder=function(){return this};j.input=j.textarea=true}else{j=i.placeholder=function(){var l=this;l.filter((a?'textarea':':input')+'[placeholder]').not('.placeholder').bind({'focus.placeholder':b,'blur.placeholder':e}).data('placeholder-enabled',true).trigger('blur.placeholder');return l};j.input=a;j.textarea=d;k={get:function(m){var l=$(m);return l.data('placeholder-enabled')&&l.hasClass('placeholder')?'':m.value},set:function(m,n){var l=$(m);if(!l.data('placeholder-enabled')){return m.value=n}if(n==''){m.value=n;if(m!=h.activeElement){e.call(m)}}else{if(l.hasClass('placeholder')){b.call(m,true,n)||(m.value=n)}else{m.value=n}}return l}};a||(c.input=k);d||(c.textarea=k);$(function(){$(h).delegate('form','submit.placeholder',function(){var l=$('.placeholder',this).each(b);setTimeout(function(){l.each(e)},10)})});$(f).bind('beforeunload.placeholder',function(){$('.placeholder').each(function(){this.value=''})})}function g(m){var l={},n=/^jQuery\d+$/;$.each(m.attributes,function(p,o){if(o.specified&&!n.test(o.name)){l[o.name]=o.value}});return l}function b(m,n){var l=this,o=$(l);if(l.value==o.attr('placeholder')&&o.hasClass('placeholder')){if(o.data('placeholder-password')){o=o.hide().next().show().attr('id',o.removeAttr('id').data('placeholder-id'));if(m===true){return o[0].value=n}o.focus()}else{l.value='';o.removeClass('placeholder');l==h.activeElement&&l.select()}}}function e(){var q,l=this,p=$(l),m=p,o=this.id;if(l.value==''){if(l.type=='password'){if(!p.data('placeholder-textinput')){try{q=p.clone().attr({type:'text'})}catch(n){q=$('<input>').attr($.extend(g(this),{type:'text'}))}q.removeAttr('name').data({'placeholder-password':true,'placeholder-id':o}).bind('focus.placeholder',b);p.data({'placeholder-textinput':q,'placeholder-id':o}).before(q)}p=p.removeAttr('id').hide().prev().attr('id',o).show()}p.addClass('placeholder');p[0].value=p.attr('placeholder')}else{p.removeClass('placeholder')}}}(this,document,jQuery)); 4$('select').change(function () {if($(this).val() == "0" || $(this).val() == "") $(this).addClass("empty"); else $(this).removeClass("empty")}); $('select').change(); 5 6 7// ======= Active Nav ================================================= 8var path = location.pathname.substring(1); 9if (path) { // if there is a value for the varible path 10 11 /*-- for the primary nav - if path equals the href give the parent a class of selected 12 example: nav ul li.selected a --*/ 13 $('nav a[href$="' + path + '"]').parent().addClass('selected'); 14 15 /*-- for dropdown nav - if path equals the href of the drop down links give the top level link a class of selected 16 example: nav ul li.selected a --*/ 17 $('nav ul ul a[href$="' + path + '"]').parents(':eq(2)').addClass('selected'); 18 19 /*-- for the aside nav - if path equals the href give the parent a class of selected 20 example: aside ul li.selected a --*/ 21 $('aside li a[href$="' + path + '"]').parent().addClass('selected'); 22}; 23 24 25 26// ======= On Page Load ============================================== 27$(function () { 28 29 // ======= Placeholder =========================================== 30 $('input, textarea').placeholder(); 31 32 // ======= Hide/Show Account Nav ===================================== 33 if (_isLoggedIn) // if _isLoggedIn equals true (or 1) 34 { 35 $(".util-nav .uty1").css({ 36 "display": "block" 37 }); 38 } else // if _isLoggedIn does not equal true (or 0) 39 { 40 $(".util-nav .uty0").css({ 41 "display": "block" 42 }); 43 } 44}); 45 46 47 48//======= Search ============// 49$('.search-icon').click(function(){ 50 $(this).parent().toggleClass('active'); 51}); 52 53 54// ======= Account Nav ===================================== 55 56// When user clicks on forgot password link: 57// Sign In form hides, Forgot password form shows 58$("#btn-password").on('click', function (e) { 59 e.preventDefault(); 60 $("#form-login").fadeOut(function(){ 61 $("#form-password").fadeIn(); 62 }); 63}); 64 65// When user clicks on Nevermind link: 66// Sign In form shows, Forgot password form hides 67$("#btn-login").on('click', function (e) { 68 e.preventDefault(); 69 $("#form-password").fadeOut(function(){ 70 $("#form-login").fadeIn(); 71 }); 72}); 73 74//smoot scroll to top 75 $(function() { 76 $('section.top').click(function() { 77 $('iframe').animate({scrollTop:0},1000); 78 return false; 79 80 81 }); 82}); 83// Will show the Create Account form once clicked 84$("#needCreate").on('click', function (e) { 85 e.preventDefault(); 86 $(".create-form").fadeIn(); 87}); 88 89 90(function($){ 91 $.fn.shuffle = function() { 92 93 var allElems = this.get(), 94 getRandom = function(max) { 95 return Math.floor(Math.random() * max); 96 }, 97 shuffled = $.map(allElems, function(){ 98 var random = getRandom(allElems.length), 99 randEl = $(allElems[random]).clone(true)[0]; 100 allElems.splice(random, 1); 101 return randEl; 102 }); 103 104 this.each(function(i){ 105 $(this).replaceWith($(shuffled[i])); 106 }); 107 108 return $(shuffled); 109 110 }; 111 112})(jQuery); 113 114 115jQuery(document).ready(function() { 116jQuery('#logoParade div').shuffle(); 117jQuery("#logoParade").smoothDivScroll({ 118 autoScrollingMode: "always", 119 autoScrollingDirection: "endlessLoopRight", 120 autoScrollingStep: 1, 121 autoScrollingInterval: 25 122}); 123}); 124 125 $(function () { 126 $('a[href*=#]:not([href=#])').not('.accordion-navigation a').click(function () {
127 if (location.pathname.replace(/^\//, '') === this.pathname.replace(/^\//, '') && location.hostname === this.hostname) { 128 129 var target = $(this.hash); 130 target = target.length ? target : $('[name=' + this.hash.slice(1) + ']'); 131 console.log(target); 132 if (target.length) { 133 $('html,body').animate({ 134 scrollTop: target.offset().top - 60 135 }, 2000); 136 return false; 137 } 138 } 139 }); 140 141}); 142 $(".faq-question a").click(function(e) { 143 $(this).toggleClass("active"); 144 }); 145
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.