1//====================================== start code for on load 2function hover($button,$COLOR) { 3 TweenLite.to($button.find(".buttonText"), 1, {css:{color:$COLOR}, ease:Expo.easeOut}); 4 //rotate arrow if has a sub menu 5 if($button.parent().parent().hasClass("hasSubMenu")){ 6 TweenLite.to($button.find(".menuArrow"), .5, {css:{opacity:100, scale: 1.3, rotation: 90, x:2, y:2}, ease:Expo.easeOut}); 7 } else { 8 TweenLite.to($button.find(".menuArrow"), .5, {css:{opacity:100, x:5}, ease:Expo.easeOut}); 9 } 10} 11function unhover($button,$COLOR) { 12 TweenLite.to($button.find(".buttonText"), 1, {css:{color:$COLOR}, ease:Expo.easeOut}); 13 //rotate arrow if has a sub menu 14 if($button.parent().parent().hasClass("hasSubMenu")){ 15 TweenLite.to($button.find(".menuArrow"), .5, {css:{opacity:0, scale: 1, rotation: 0, x:0, y:0}, ease:Expo.easeOut}); 16 } else { 17 TweenLite.to($button.find(".menuArrow"), .5, {css:{opacity:0, x:0}, ease:Expo.easeOut}); 18 } 19} 20 21 22 23 24 //global variables 25 var windowWidth; //retrieve current window width 26 var windowHeight; //retrieve current window height 27 var headerImageHeight; 28 var headerImageHolderHeight; 29 var menuBarHeight = 50; 30 var subBuffer = 5; 31 var templatesSubHeight; 32 var webpresenceSubHeight; 33 var newLocation; 34 35//function to re-work menu based on browser resize 36$(document).ready(function() { 37 38//prevent right img click 39$("body").on("contextmenu", "img", function(e) { return false; 40}); 41 42 43 $(".loaderM").fadeOut("medium"); 44 45//------------------------------------RUN THE FIRST TIME IT IS LOADED 46$('#contentHolder').css('visibility', 'visible'); 47$('#contentHolder').css('display', 'block'); 48//$('#contentHolder').css("opacity", 0).animate({ opacity: 1}, 300); 49 50 51//---------------------------- set the menu widths so it displays nicely, then fade in 52 53 54 $("#topMenu .menuLevel1").each(function(e){ 55 //set max width of main menu buttons 56 $(this).css( {"maxWidth":($(this).find(".buttonText").width()+0), "display":"inline-block"}); 57 TweenMax.staggerTo('.menuLevel1', 0, {scale:1,x:30, autoAlpha:0}); 58 TweenMax.staggerTo('.menuLevel1', .4, {scale:1,x:0, autoAlpha:1, delay:.1,ease: EaseLookup.find($GLOBALAnimationEaseMenu)}, .1); 59 }); 60 61 $("#topMenu .menuLevel2").each(function(e){ 62 //set max width of main menu buttons 63 $(this).css( "maxWidth", ($(this).find(".buttonText").width()+0)); 64 }); 65 $("#topMenu .menuLevel3").each(function(e){ 66 //set max width of main menu buttons 67 $(this).css( "maxWidth", ($(this).width()+0)); 68 }); 69 70 //----------------set the sub menus so they work 71 $(".hasSubMenu").unbind('mouseenter mouseleave'); 72 $(".hasSubMenu").hover(function(e){ 73 e.preventDefault(); 74 var $ID = $(this).attr("data-MenuID"); 75 var $subMenuLevel = 2; 76 //set the OL/sub menu to animate in 77 var $subMenu = $('#SubFor-'+$ID); 78 if ($subMenu.hasClass('subMenuLevel2')) { 79 $subMenuLevel = 3; 80 } 81 82 if(!$subMenu.hasClass("closed")){ 83 TweenMax.staggerTo('#SubFor-'+$ID + ' .menuLevel'+$subMenuLevel, .3, {scale:.5, opacity:0, delay:.1,ease:EaseLookup.find($GLOBALAnimationEaseMenu)}, .2); TweenLite.to($subMenu, 0.2, {height:0, x:0, overflow: "hidden"}); 84 $subMenu.addClass("closed"); 85 }else{ 86 // open up the sub menu 87 TweenLite.set($subMenu, {height:"auto",ease:Expo.easeOut, overflow: "visible"}); 88 TweenLite.from($subMenu, .5, {height:0,ease:Expo.easeOut, overflow: "visible"}); 89 TweenMax.staggerTo('#SubFor-'+$ID + ' .menuLevel'+$subMenuLevel, 0, {scale:.5,x:0, opacity:0}); 90 TweenMax.staggerTo('#SubFor-'+$ID + ' .menuLevel'+$subMenuLevel, .3, {scale:1, x:$GLOBALSubMenuIndent, opacity:1, delay:.1,ease: EaseLookup.find($GLOBALAnimationEaseMenu)}, .2); 91 $subMenu.removeClass("closed"); 92 } 93 94}) 95 96 97//set some functions that will need to be reset throughout the page 98initialize(); 99 100}); 101 102$( window ).resize(function() { 103 //reset all the animations and content 104 initialize(); 105}); 106 107 108window.onpageshow = function(event) { 109 if (event.persisted) { 110 window.location.reload(); 111 } 112}; 113 114 115function initialize(){ 116 117 //set background height 118 $('#Background').height($(window).height()); 119 120 121 //--------------------- set section specific colors 122 if($GLOBALHeaderHolderChangeColor == "true") { 123 $("#headerBreak").addClass("sectionColorBack"); 124 } 125 if($GLOBALHeaderChangeColor == "true") { 126 $("#pageHeader").addClass("sectionColor"); 127 $("#pageHeader").addClass("sectionSideBorder"); 128 } 129 130 if($GLOBALRolloverChangeColor === "true") { 131 $GLOBALMainMenuButtonRolloverColor = $SECTIONCOLOR; 132 $GLOBALSubMenuButtonRolloverColor = $SECTIONCOLOR; 133 } 134
135 if ($GLOBALUseMenuBackground === "true") { 136 $("#mobileMenuOpen").css( "background-color", $GLOBALMenuBackgroundColor); 137 $("#menuBorderBottom").css( "background-color", $SECTIONCOLOR); 138 } else { 139 $("#mobileMenuOpen").css( "background-color", $SECTIONCOLOR); 140 $("#menuBorderBottom").css( "background-color", $SECTIONCOLOR); 141 } 142 143 //set the menu function for mobile 144 $("#mobileMenuOpen").unbind('click'); 145 $("#mobileMenuOpen").click(function(e){ 146 if($("#menuButtons").height() <5) { 147 TweenLite.set($("#menuButtons"), {height:"auto",ease:Expo.easeOut, overflow: "visible"}); 148 TweenLite.from($("#menuButtons"), .5, {height:0,ease:Expo.easeOut, overflow: "visible"}); 149 console.log("in rollover"); 150 TweenMax.to('.menuItem', 0, {scale:.5,x:0, opacity:0}); 151 TweenMax.to('.menuItem', .3, {scale:1, x:$GLOBALSubMenuIndent, opacity:1, delay:.1,ease: EaseLookup.find($GLOBALAnimationEaseMenu)}, .2); 152 } else { 153 TweenLite.to($("#menuButtons"), .5, {height:0,ease:Expo.easeOut, overflow: "visible"}); 154 } 155 }); 156 157 158 159 160 161 162 163 164 if($(window).width() < 1000) { 165 //$("#menuButtons").css( {"padding-top":($("#menuLogoHolder").height()/2-($("#menuButtons").height()/2-5))}); 166 //$(".hasSubMenu").find(".menuArrow").css("display", "block"); 167 } else { 168 //$("#menuButtons").css( {"padding-top":5}); 169 } 170 171 172$(".menuLeafLevel1 a, .menuLeafLevel2 a, .menuLeafLevel3 a").off().finish(); 173$(".newlocation").off().finish(); 174 175$(".menuLeafLevel1 a, .menuLeafLevel2 a, .menuLeafLevel3 a").unbind('mouseenter mouseleave'); 176$('.menuLeafLevel1 a').mouseenter(function(){hover($(this), $GLOBALMainMenuButtonRolloverColor);}); 177$('.menuLeafLevel1 a').mouseleave(function(){unhover($(this), $GLOBALMainMenuButtonColor);}); 178//rollover for sub menu buttons 179$('.menuLeafLevel2 a').mouseenter(function(){hover($(this), $GLOBALSubMenuButtonRolloverColor);}); 180$('.menuLeafLevel2 a').mouseleave(function(){unhover($(this), $GLOBALSubMenuButtonColor);}); 181$('.menuLeafLevel3 a').mouseenter(function(){hover($(this), $GLOBALSubMenuButtonRolloverColor);}); 182$('.menuLeafLevel3 a').mouseleave(function(){unhover($(this), $GLOBALSubMenuButtonColor);}); 183 184//set the menu a href handling 185 $('.newlocation').click(function(e) { 186 e.preventDefault(); 187 if($(this).attr("href") !== "#") { 188 newLocation = this.href; 189 $('body').fadeOut(700, newpage); 190 } 191}); 192 193 194function newpage() { 195 window.location = newLocation; 196} 197 198 199//change language that is being edited 200$( ".changeLanguage" ).off().finish(); 201$( ".changeLanguage" ).unbind('click'); 202$( ".changeLanguage" ).click(function(e) { 203$.post( $ROOTURL+"sitezadmin/php/set_language.php", { language: $(this).attr("data-language") }) 204 //reload the page after the new language is set so the new language displays 205 .done(function( data ) { location.reload(true); }); 206}); 207 208 209 210 211} 212 213 214function goToByScroll(id){ 215 // Scroll 216 $('html,body').animate({scrollTop: $("#"+id).offset().top},'slow'); 217} 218 219 220function absolute(base, relative) { 221 var stack = base.split("/"), 222 parts = relative.split("/"); 223 stack.pop(); // remove current file name (or empty string) 224 // (omit if "base" is the current folder without trailing slash) 225 for (var i=0; i<parts.length; i++) { 226 if (parts[i] == ".") 227 continue; 228 if (parts[i] == "..") 229 stack.pop(); 230 else 231 stack.push(parts[i]); 232 } 233 return stack.join("/"); 234} 235
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.