1/* Animation */ 2var canvas, stage, exportRoot, anim_container, dom_overlay_container, fnStartAnimation; 3function init() { 4 canvas = document.getElementById("canvas"); 5 anim_container = document.getElementById("animation_container"); 6 dom_overlay_container = document.getElementById("dom_overlay_container"); 7 var comp=AdobeAn.getComposition("93453618240B4ABDADA1A7DDA07FDDFB"); 8 var lib=comp.getLibrary(); 9 handleComplete({},comp); 10} 11function handleComplete(evt,comp) { 12 //This function is always called, irrespective of the content. You can use the variable "stage" after it is created in token create_stage. 13 var lib=comp.getLibrary(); 14 var ss=comp.getSpriteSheet(); 15 exportRoot = new lib.essbahnhoflaschenanimation(); 16 stage = new lib.Stage(canvas); 17 //Registers the "tick" event listener. 18 fnStartAnimation = function() { 19 stage.addChild(exportRoot); 20 createjs.Ticker.setFPS(lib.properties.fps); 21 createjs.Ticker.addEventListener("tick", stage); 22 } 23 //Code to support hidpi screens and responsive scaling. 24 function makeResponsive(isResp, respDim, isScale, scaleType) { 25 var lastW, lastH, lastS=1; 26 window.addEventListener('resize', resizeCanvas); 27 resizeCanvas(); 28 function resizeCanvas() { 29 var w = lib.properties.width, h = lib.properties.height; 30 var iw = window.innerWidth, ih=window.innerHeight; 31 var pRatio = window.devicePixelRatio || 1, xRatio=iw/w, yRatio=ih/h, sRatio=1; 32 if(isResp) { 33 if((respDim=='width'&&lastW==iw) || (respDim=='height'&&lastH==ih)) { 34 sRatio = lastS; 35 } 36 else if(!isScale) { 37 if(iw<w || ih<h) 38 sRatio = Math.min(xRatio, yRatio); 39 } 40 else if(scaleType==1) { 41 sRatio = Math.min(xRatio, yRatio); 42 } 43 else if(scaleType==2) { 44 sRatio = Math.max(xRatio, yRatio); 45 } 46 } 47 canvas.width = w*pRatio*sRatio; 48 canvas.height = h*pRatio*sRatio; 49 canvas.style.width = dom_overlay_container.style.width = anim_container.style.width = w*sRatio+'px'; 50 canvas.style.height = anim_container.style.height = dom_overlay_container.style.height = h*sRatio+'px'; 51 stage.scaleX = pRatio*sRatio; 52 stage.scaleY = pRatio*sRatio; 53 lastW = iw; lastH = ih; lastS = sRatio; 54 stage.tickOnUpdate = false; 55 stage.update(); 56 stage.tickOnUpdate = true; 57 } 58 } 59 makeResponsive(false,'both',false,1); 60 AdobeAn.compositionLoaded(lib.properties.id); 61 fnStartAnimation(); 62} 63/* End Animation */ 64 65 66jQuery(function ($) { 67 68 /** 69 * Toggles accordion plus/minus icon 70 */ 71 function toggleAccordionIcon (e) { 72 jQuery(e.target) 73 .prev('.card-header') 74 .find('.fa') 75 .toggleClass('fa-plus-circle fa-minus-circle'); 76 console.log('toggleAccordionIcon'); 77 } 78 79 /** 80 * Smooth scroll to anchor 81 */ 82 $('a[href^="#"]').not('[href="#"], [data-toggle="collapse"]').on('click', function (event) { 83 // On-page links 84 if ( 85 location.pathname.replace(/^\//, '') === this.pathname.replace(/^\//, '') && 86 location.hostname === this.hostname 87 ) { 88 // Figure out element to scroll to 89 var $target = $(this.hash); 90 $target = $target.length ? $target : $('[name=' + this.hash.slice(1) + ']'); 91 92 // Does a scroll target exist? 93 if ($target.length) { 94 // Only prevent default if animation is actually gonna happen 95 event.preventDefault(); 96 $('html, body').animate({ 97 scrollTop: $target.offset().top - 100, 98 }, 500, function () { 99 // Callback after animation 100 // Must change focus! 101 var $target = $($target); 102 $target.focus(); 103 104 // Checking if the $target was focused 105 if ($target.is(':focus')) { 106 return false; 107 } else { 108 // Adding tabindex for elements (not focusable) 109 $target.attr('tabindex', '-1'); 110 111 // Set focus again
112 $target.focus(); 113 } 114 }); 115 } 116 } 117 }); 118 119 /** 120 * Mobile menu 121 */ 122 $('#wpadminbar').addClass('Fixed'); 123 124 var $mobilemenu = $('#mobilemenu').mmenu({ 125 extensions: [ 126 'multiline', 127 'pagedim-black', 128 ], 129 searchfield: false, 130 offCanvas: { 131 pageSelector: '#page', 132 position: 'right', 133 }, 134 }); 135 136 var $mobilebutton = $('#mobilemenubutton'); 137 var api = $mobilemenu.data('mmenu'); 138 139 $mobilebutton.on('click', function () { 140 api.open(); 141 }); 142 143 api.bind('open:finish', function () { 144 setTimeout(function () { 145 $mobilebutton.addClass('is-active'); 146 }, 100); 147 }); 148 149 api.bind('close:finish', function () { 150 setTimeout(function () { 151 $mobilebutton.removeClass('is-active'); 152 }, 100); 153 }); 154 155 /** 156 * CE: Image Tabs (1/2) 157 */ 158 var $imageTabButtons = $('.ce-image-tabs .tile .btn'); 159 $imageTabButtons.on('click', function () { 160 $imageTabButtons.removeClass('active'); 161 $(this).addClass('active'); 162 }); 163 164 /** 165 * CE: Accordion 166 */ 167 var $ceAccordion = $('.ce-accordion'); 168 169 // Toggles accordion plus/minus icon 170 if ($ceAccordion.length) { 171 $card = $ceAccordion.find('.card'); 172 $card.on('hidden.bs.collapse', toggleAccordionIcon); 173 $card.on('shown.bs.collapse', toggleAccordionIcon); 174 } 175 176 /** 177 * Contact Form 7 178 */ 179 180 // Adds active class on label, when input has focus 181 if ($('.wpcf7').length > 0) { 182 var $input = $('input, textarea'); 183 184 $input.focus(function () { 185 $(this).parent().find('label').addClass('active'); 186 }); 187 188 $('label,textarea').click(function () { 189 $(this).parent().find('input,textarea').focus(); 190 }); 191 192 $input.blur(function () { 193 if (!$(this).val()) { 194 $(this).parent().find('label').removeClass('active').removeClass('filled'); 195 } else { 196 $(this).parent().find('label').removeClass('active').addClass('filled'); 197 } 198 }); 199 } 200 201 /** 202 * Cookie notification 203 */ 204 var $cookieNotification = $('#cookie-notification'); 205 206 if ($cookieNotification.length && document.cookie.indexOf('CONSENT=YES') === -1) { 207 setTimeout(function () { 208 $cookieNotification.addClass('show'); 209 }, 1000); 210 211 $cookieNotification.on('closed.bs.alert', function () { 212 var now = new Date(); 213 var oneYearFromNow = new Date(now.setFullYear(now.getFullYear() + 1)); 214 document.cookie = 'CONSENT=YES; expires=' + oneYearFromNow.toUTCString() + '; path=/'; 215 }); 216 } 217}); 218 219jQuery(window).on('load resize scroll', function () { 220 // Adds class to body if scrolled down so that the navbar gets smaller 221 var scrolledAmount = $(document).scrollTop(); 222 var $body = $('body'); 223 var windowHeight = $(window).height(); 224 225 if (scrolledAmount) { 226 if (!$body.hasClass('scrolled')) { 227 $body.addClass('scrolled'); 228 } 229 } else { 230 if ($body.hasClass('scrolled')) { 231 $body.removeClass('scrolled'); 232 } 233 } 234 235 // Navbar gets retracted by 22px 236 if (scrolledAmount >= 22) { 237 if (!$body.hasClass('scrolled-22')) { 238 $body.addClass('scrolled-22'); 239 } 240 } else { 241 if ($body.hasClass('scrolled-22')) { 242 $body.removeClass('scrolled-22'); 243 } 244 } 245 246 // WP Admin Bar height on desktop is 32px 247 if (scrolledAmount >= 32) { 248 if (!$body.hasClass('scrolled-32')) { 249 $body.addClass('scrolled-32'); 250 } 251 } else { 252 if ($body.hasClass('scrolled-32')) { 253 $body.removeClass('scrolled-32'); 254 } 255 } 256 257 // WP Admin Bar height on mobile is 46px 258 if (scrolledAmount >= 46) { 259 if (!$body.hasClass('scrolled-46')) { 260 $body.addClass('scrolled-46'); 261 } 262 } else { 263 if ($body.hasClass('scrolled-46')) { 264 $body.removeClass('scrolled-46'); 265 } 266 } 267 268 // Shows #scroll-top button 269 if (scrolledAmount >= 2 * windowHeight) { 270 if (!$body.hasClass('scrolled-two-pages')) { 271 $body.addClass('scrolled-two-pages'); 272 } 273 } else { 274 if ($body.hasClass('scrolled-two-pages')) { 275 $body.removeClass('scrolled-two-pages'); 276 } 277 } 278}); 279 280/** 281 * CE: Image Tabs (2/2) 282 */ 283var viewportSize = 'xs'; 284$(window).on('load resize', function () { 285 var actualViewportSize = 'xs'; 286 287 if (window.matchMedia('(min-width: 992px)').matches) { 288 actualViewportSize = 'lg'; 289 } else if (window.matchMedia('(min-width: 768px)').matches) { 290 actualViewportSize = 'md'; 291 } else if (window.matchMedia('(min-width: 576px)').matches) { 292 actualViewportSize = 'sm'; 293 } 294 295 if (actualViewportSize !== viewportSize) { 296 $('.ce-image-tabs .col-12').each( 297 function (index, element) { 298 var $element = $(element); 299 var targetNth = $element.data('target-' + actualViewportSize); 300 var $parent = $($element.data('parent')); 301 302 $parent.find('.tile:nth-of-type(' + targetNth + ')').after($element); 303 }); 304 305 viewportSize = actualViewportSize; 306 } 307});
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.