1(function ($) { 2 3/* $('body').append('<div style="" id="loadingDiv"><div class="loader">Loading...</div></div>'); 4 $(window).on('load', function(){ 5 $('#page-container').animate({opacity: 1}, 1000); 6 setTimeout(removeLoader, 1000); //wait for page load PLUS four seconds. 7 }); 8 function removeLoader(){ 9 $( "#loadingDiv" ).fadeOut(500, function() { 10 // fadeOut complete. Remove the loading div 11 $( "#loadingDiv" ).remove(); //makes page more lightweight 12 $('body').addClass("show-page-container"); 13 }); 14 }*/ 15 16$(document).ready(function(){ 17 18 var sliderPaused; 19 20/* $('#video-panel-close').click(function(e){ 21 e.preventDefault(); // avoid to execute the actual following of the link. 22 var video_panel = $('#video_panel'); 23 $('.vid-open > figure > a').removeClass('updating'); // Clear all existing 24 video_panel.removeClass('showme'); 25 video_panel.html(''); 26 });*/ 27 28 $('#menu_caller').click(function () { 29 30 $('body').toggleClass('show_menu'); 31 32 if(sliderPaused){ 33 revapi1.revresume(); 34 sliderPaused = false; 35 } else { 36 revapi1.revpause(); 37 sliderPaused = true; 38 } 39 40 return false; 41 }); 42 43 44 $('.scroll_slider').click(function () { 45 var viewportHeight = $(window).height(); 46 var partViewportHeight = viewportHeight * 0.7; 47 $('html, body').animate({scrollTop: '+='+partViewportHeight}, 800); 48 return false; 49 }); 50 51 $('#back_to_top').click(function () { 52 $('html, body').animate({scrollTop: 0}, 800); 53 return false; 54 }); 55 56 $('#back_to_top_button').click(function () { 57 $('html, body').animate({scrollTop: 0}, 800); 58 return false; 59 }); 60 61 // Smooth scroll 62 function scrollToAnchor(aid){ 63 var aTag = $("a[id='"+ aid +"']"); 64 $('html,body').animate({scrollTop: aTag.offset().top},'slow'); 65 } 66 67 $('a[href^="#"]').click(function(e) { e.preventDefault(); var dest = $(this).attr('href'); console.log(dest); $('html,body').animate({ scrollTop: $(dest).offset().top }, 'slow'); }); 68 69 $('#mobile_nav_icon').click(function(){ 70 $('#mobile_nav_icon_container').hide("slow"); 71 $('#logo_container').hide("slow"); 72 $('#navBar').slideToggle("slow"); 73 $('#search_panel').slideDown("slow"); 74 $('#header_right').hide("slow"); 75 }); 76 77 $('#mobile_nav_close_button').click(function(){ 78 $('#navBar').slideToggle("slow"); 79 $('#logo_container').show("slow"); 80 $('#mobile_nav_icon_container').show("slow"); 81 $('#search_panel').slideUp("slow"); 82 $('#header_right').show("slow"); 83 }); 84 85 $('ul#menu-main-menu.navigation > li.menu-item.menu-item-has-children').click(function () { 86 $('ul#menu-main-menu.navigation > li.menu-item.menu-item-has-children').removeClass('current-menu-parent'); 87 $(this).addClass('current-menu-parent'); 88 }); 89 90 $('ul#menu-main-menu.navigation > li.menu-item').mouseover(function () { 91 $('ul#menu-main-menu.navigation > li.menu-item.menu-item-has-children').removeClass('current-menu-parent'); 92 }); 93 94 $('ul#menu-main-menu.navigation > li.menu-item.menu-item-has-children').mouseover(function () { 95 $(this).addClass('current-menu-parent'); 96 }); 97 98 /* Reduce header when scrolling & hide scroller as appropriate */ 99 $(window).bind('scroll', function() { 100 101 if(($(window).scrollTop() + $(window).height()) > ($(document).height() - $(window).innerHeight())) { 102 $('body').addClass('show_back_to_top'); 103 } 104 else { 105 $('body').removeClass('show_back_to_top'); 106 } 107 108 if ($(window).scrollTop() > 1) { 109 $('body').addClass('fix_menu'); 110 } 111 else { 112 $('body').removeClass('fix_menu'); 113 } 114 if($(window).scrollTop() + $(window).height() > $(document).height() - 400) { // Height of footer 115 $('body').addClass('hide_scroller'); 116 } 117 else { 118 $('body').removeClass('hide_scroller'); 119 } 120 121 }); 122 123 $('#searchcall').click(function(){ 124 if ($('body').hasClass('show_search_panel')) { 125 $('body').removeClass('show_search_panel'); 126 $('#search_panel').slideUp(500); 127 } else { 128 $('body').addClass('show_search_panel'); 129 $('#search_panel').slideDown(500); 130 } 131 }); 132 133 $('#search_panel_close').click(function(){ 134 $('#navBar').hide(); 135 $('#mobile_nav_icon_container').show(); 136 if ($('body').hasClass('show_search_panel')) { 137 $('body').removeClass('show_search_panel'); 138 $('#search_panel').hide(500); 139 } 140 }); 141 142 /* JQuery newwin */ 143 $('a[class="newwin"]').click( function() { 144 window.open( $(this).attr('href') ); 145 return false; 146 }); 147 148 /* Mobile tweaks */ 149 var isPhone = window.matchMedia("only screen and (max-width: 767px)"); 150 if (isPhone.matches) { 151 //Conditional script here 152 153 } 154} 155); 156})(jQuery);
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.