1(function($) { 2 'use strict'; 3 $(document).ready(function () { 4 // About 5 function authorToggleHandler(o) { var t = $(".about-toggle"),e = $(".author-close");$("body").toggleClass("author-popup-active"), $("body").toggleClass("overlay-enabled"), $("body").hasClass("author-popup-active") ? e.focus() : t.focus(), authorPopupAccessibility() 6 } function hideAuthorPopup(o) { var t = $(".about-toggle"),e = $(".author-popup");$(o.target).closest(t).length || $(o.target).closest(e).length || $("body").hasClass("author-popup-active") && ($("body").removeClass("author-popup-active"), $("body").removeClass("overlay-enabled"), t.focus(), o.stopPropagation()) 7 } function authorPopupAccessibility() { var links,i,len,searchItem=document.querySelector('.author-popup'),fieldToggle=document.querySelector('.author-close');let focusableElements='button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])';let firstFocusableElement=fieldToggle;let focusableContent=searchItem.querySelectorAll(focusableElements);let lastFocusableElement=focusableContent[focusableContent.length-1];if(!searchItem){return!1} 8 links=searchItem.getElementsByTagName('button');for(i=0,len=links.length;i<len;i++){links[i].addEventListener('focus',toggleFocus,!0);links[i].addEventListener('blur',toggleFocus,!0)} 9 function toggleFocus(){var self=this;while(-1===self.className.indexOf('author-anim')){if('input'===self.tagName.toLowerCase()){if(-1!==self.className.indexOf('focus')){self.className=self.className.replace('focus','')}else{self.className+=' focus'}} 10 self=self.parentElement}} document.addEventListener('keydown',function(e){let isTabPressed=e.key==='Tab'||e.keyCode===9;if(!isTabPressed){return} 11 if(e.shiftKey){if(document.activeElement===firstFocusableElement){lastFocusableElement.focus();e.preventDefault()}}else{if(document.activeElement===lastFocusableElement){firstFocusableElement.focus();e.preventDefault()}}}) 12 } $(document).on("click", ".about-toggle", authorToggleHandler), $(document).on("click", ".author-close", authorToggleHandler), $(document).on("click", hideAuthorPopup); 13 14 // Main Slider 15 var owlMainSlider = $('.main-slider'); 16 owlMainSlider.owlCarousel({ 17 /*onChanged: function(e) { 18 progressSim('.owl-item.active .item>img'); 19 },*/ 20 rtl: $("html").attr("dir") == 'rtl' ? true : false, 21 items: 1, 22 autoplay: true, 23 autoplayTimeout: 9000, 24 animateOut: false, 25 animateIn: false, 26 margin: 0, 27 loop: false, 28 navRewind: false, 29 dots: false, 30 nav: true, 31 navText: ['<i class="fa fa-chevron-left"></i> <span>SLIDE</span>', '<span>SLIDE</span> <i class="fa fa-chevron-right"></i>'], 32 singleItem: true, 33 transitionStyle: "fade", 34 touchDrag: true, 35 mouseDrag: false, 36 responsive: { 37 0: { 38 nav: false 39 }, 40 768: { 41 nav: true 42 }, 43 992: { 44 nav: true 45 } 46 } 47 }); 48 owlMainSlider.owlCarousel(); 49 owlMainSlider.on('translate.owl.carousel', function (event) { 50 var data_anim = $("[data-animation]"); 51 data_anim.each(function() { 52 var anim_name = $(this).data('animation'); 53 $(this).removeClass('animated ' + anim_name).css('opacity', '0'); 54 }); 55 }); 56 $("[data-delay]").each(function() { 57 var anim_del = $(this).data('delay'); 58 $(this).css('animation-delay', anim_del); 59 }); 60 $("[data-duration]").each(function() { 61 var anim_dur = $(this).data('duration'); 62 $(this).css('animation-duration', anim_dur); 63 }); 64 owlMainSlider.on('translated.owl.carousel', function() { 65 var data_anim = owlMainSlider.find('.owl-item.active').find("[data-animation]"); 66 data_anim.each(function() { 67 var anim_name = $(this).data('animation'); 68 $(this).addClass('animated ' + anim_name).css('opacity', '1'); 69 }); 70 }); 71 function owlHomeThumb() { 72 $('.owl-item').removeClass('prev next'); 73 var currentSlide = $('.main-slider .owl-item.active'); 74 currentSlide.next('.owl-item').addClass('next'); 75 currentSlide.prev('.owl-item').addClass('prev'); 76 var nextSlideImg = $('.owl-item.next').find('.item img').attr('data-img-url'); 77 var prevSlideImg = $('.owl-item.prev').find('.item img').attr('data-img-url'); 78 $('.owl-nav .owl-prev').css({ 79 backgroundImage: 'url(' + prevSlideImg + ')' 80 }); 81 $('.owl-nav .owl-next').css({ 82 backgroundImage: 'url(' + nextSlideImg + ')' 83 }); 84 } 85 owlMainSlider.on('translated.owl.carousel', function() { 86 owlHomeThumb(); 87 }); 88 89 90 // Blog 91 $(".post-carousel").owlCarousel({ 92 rtl: $("html").attr("dir") == 'rtl' ? true : false, 93 loop: true, 94 dots: false, 95 nav: true, 96 navText: ['<i class="fa fa-arrow-left"></i>', '<i class="fa fa-arrow-right"></i>'], 97 margin: 30, 98 stagePadding: 15, 99 autoplay: false, 100 autoplayTimeout: 10000, 101 animateOut: 'fadeOut', 102 animateIn: 'fadeIn', 103 responsive: { 104 0: { 105 items: 1 106 }, 107 601: { 108 items: 2 109 }, 110 992: { 111 items: 3, 112 } 113 } 114 }); 115 116 117 $(".widget_social_widget").find("li a").each(function () { 118 $(this).on('mouseenter focus', function () { 119 var icon = this.querySelector('i'); 120 if (icon) { 121 var burst = new mojs.Burst({ 122 radius: {15: 45}, 123 parent: icon, 124 children: { 125 fill: ['var(--sp-primary)', 'var(--sp-primary2)', 'var(--sp-primary)'], 126 } 127 }); 128 var shape = new mojs.Shape({ 129 parent: icon, 130 type: 'circle', 131 radius: {0: 30}, 132 fill: 'transparent', 133 stroke: 'var(--sp-primary)', 134 strokeWidth: {15: 0}, 135 opacity: 0.6, 136 duration: 1000, 137 easing: mojs.easing.sin.out 138 }); 139 shape.play(); 140 burst.play(); 141 } 142 }); 143 }); 144 }); 145 //ripples 146 $('.footer-effect-active, .cta-effect-active, .breadcrumb-effect-active').ripples({ 147 resolution: 500, 148 dropRadius: 20, 149 perturbance: 0.04 150 }); 151 //roller 152 var t = $(this).dels = [], 153 e = { 154 attribute: "data-roller", 155 classNames: ["roller", "rollerstart", "rollerended"], 156 start: .75, 157 end: .75, 158 autoInit: !0 159 }; 160 function s() { 161 document.addEventListener("scroll", a); 162 for (var s = document.querySelectorAll("[" + e.attribute + "]"), d = 0; d < s.length; d++) { 163 var n = s[d], 164 r = n.getAttribute(e.attribute, 2).split(";"), 165 i = {}; 166 i.start = e.start, i.end = e.end; 167 for (var l = 0; l < r.length; l++) { 168 var o = r[l].split(":"), 169 c = o[0], 170 u = isNaN(1 * o[1]) ? o[1] : 1 * o[1]; 171 c && (i[c] = void 0 === u || u) 172 } 173 i.el = n, i.id = t.length, t.push(i), n.classList.add(e.classNames[0]), i.debug && (n.style.outline = "solid red 4px") 174 } 175 a() 176 } 177 function a() { 178 for (var s = window.innerHeight, a = 0; a < t.length; a++) { 179 var d = t[a], 180 n = d.el.getBoundingClientRect(), 181 r = n.top / s, 182 i = n.bottom / s; 183 d.debug && (r >= 0 && r <= 1 && (d.startLine || (d.startLine = document.createElement("div"), document.body.appendChild(d.startLine), d.startLine.style = "position:fixed;height:0;width:100%;border-bottom:dotted red 2px;top:" + 100 * d.start + "vh")), (i < d.end || r > 1) && d.startLine && (d.startLine.parentNode.removeChild(d.startLine), delete d.startLine)), r < d.start && !d.rollerstart ? (d.rollerstart = !0, d.el.classList.add(e.classNames[1])) : r > d.start && d.rollerstart && (d.rollerstart = !1, d.el.classList.remove(e.classNames[1])), i < d.end && !d.rollerended ? (d.rollerended = !0, d.el.classList.add(e.classNames[2])) : i > d.end && d.rollerended && (d.rollerended = !1, d.el.classList.remove(e.classNames[2])) 184 } 185 } 186 document.addEventListener("DOMContentLoaded", function() { 187 e.autoInit && s() 188 }), $(this).init = s, $(this).config = function(t) { 189 for (var s in t) e[s] = t[s] 190 } 191})(jQuery); 192 193 194 195;(function(window) { 196 'use strict'; 197 // Helper vars and functions. 198 function extend( a, b ) { 199 for( var key in b ) { 200 if( b.hasOwnProperty( key ) ) { 201 a[key] = b[key]; 202 } 203 } 204 return a; 205 } 206 207 function getMousePos(e) { 208 var posx = 0, posy = 0; 209 if (!e) var e = window.event; 210 if (e.pageX || e.pageY) { 211 posx = e.pageX; 212 posy = e.pageY; 213 } 214 else if (e.clientX || e.clientY) { 215 posx = e.clientX + document.body.scrollLeft + document.documentElement.scrollLeft; 216 posy = e.clientY + document.body.scrollTop + document.documentElement.scrollTop; 217 } 218 return { x : posx, y : posy } 219 } 220 /** 221 * TiltFx obj. 222 */ 223 function TiltFx(el, options) { 224 this.DOM = {}; 225 this.DOM.el = el; 226 this.options = extend({}, this.options); 227 extend(this.options, options); 228 this._init(); 229 } 230 TiltFx.prototype.options = { 231 movement: { 232 imgWrapper : { 233 translation : {x: 0, y: 0, z: 0}, 234 rotation : {x: -5, y: 5, z: 0}, 235 reverseAnimation : { 236 duration : 1200, 237 easing : 'easeOutElastic', 238 elasticity : 600 239 } 240 }, 241 lines : { 242 translation : {x: 10, y: 10, z: [0,10]}, 243 reverseAnimation : { 244 duration : 1000, 245 easing : 'easeOutExpo', 246 elasticity : 600 247 } 248 }, 249 caption : { 250 translation : {x: 20, y: 20, z: 0}, 251 rotation : {x: 0, y: 0, z: 0}, 252 reverseAnimation : { 253 duration : 1500, 254 easing : 'easeOutElastic', 255 elasticity : 600 256 } 257 } 258 } 259 }; 260 /** 261 * Init. 262 */ 263 TiltFx.prototype._init = function() { 264 this.DOM.animatable = {}; 265 this.DOM.animatable.imgWrapper = this.DOM.el.querySelector('.tilter__figure'); 266 this.DOM.animatable.lines = this.DOM.el.querySelector('.tilter__deco--lines'); 267 this.DOM.animatable.caption = this.DOM.el.querySelector('.tilter__caption');
268 //this.DOM.animatable.overlay = this.DOM.el.querySelector('.tilter__deco--overlay'); 269 //this.DOM.animatable.shine = this.DOM.el.querySelector('.tilter__deco--shine > div'); 270 this._initEvents(); 271 }; 272 /** 273 * Init/Bind events. 274 */ 275 TiltFx.prototype._initEvents = function() { 276 var self = this; 277 278 this.mousemoveFn = function(ev) { 279 requestAnimationFrame(function() { self._layout(ev); }); 280 }; 281 282 this.DOM.el.addEventListener('mousemove', this.mousemoveFn); 283 this.DOM.el.addEventListener('mouseleave', this.mouseleaveFn); 284 this.DOM.el.addEventListener('mouseenter', this.mouseenterFn); 285 }; 286 TiltFx.prototype._layout = function(ev) { 287 // Mouse position relative to the document. 288 var mousepos = getMousePos(ev), 289 // Document scrolls. 290 docScrolls = {left : document.body.scrollLeft + document.documentElement.scrollLeft, top : document.body.scrollTop + document.documentElement.scrollTop}, 291 bounds = this.DOM.el.getBoundingClientRect(), 292 // Mouse position relative to the main element (this.DOM.el). 293 relmousepos = { x : mousepos.x - bounds.left - docScrolls.left, y : mousepos.y - bounds.top - docScrolls.top }; 294 // Movement settings for the animatable elements. 295 for(var key in this.DOM.animatable) { 296 if( this.DOM.animatable[key] == undefined || this.options.movement[key] == undefined ) { 297 continue; 298 } 299 var t = this.options.movement[key] != undefined ? this.options.movement[key].translation || {x:0,y:0,z:0} : {x:0,y:0,z:0}, 300 r = this.options.movement[key] != undefined ? this.options.movement[key].rotation || {x:0,y:0,z:0} : {x:0,y:0,z:0}, 301 setRange = function (obj) { 302 for(var k in obj) { 303 if( obj[k] == undefined ) { 304 obj[k] = [0,0]; 305 } 306 else if( typeof obj[k] === 'number' ) { 307 obj[k] = [-1*obj[k],obj[k]]; 308 } 309 } 310 }; 311 setRange(t); 312 setRange(r); 313 314 var transforms = { 315 translation : { 316 x: (t.x[1]-t.x[0])/bounds.width*relmousepos.x + t.x[0], 317 y: (t.y[1]-t.y[0])/bounds.height*relmousepos.y + t.y[0], 318 z: (t.z[1]-t.z[0])/bounds.height*relmousepos.y + t.z[0], 319 }, 320 rotation : { 321 x: (r.x[1]-r.x[0])/bounds.height*relmousepos.y + r.x[0], 322 y: (r.y[1]-r.y[0])/bounds.width*relmousepos.x + r.y[0], 323 z: (r.z[1]-r.z[0])/bounds.width*relmousepos.x + r.z[0] 324 } 325 }; 326 this.DOM.animatable[key].style.WebkitTransform = this.DOM.animatable[key].style.transform = 'translateX(' + transforms.translation.x + 'px) translateY(' + transforms.translation.y + 'px) translateZ(' + transforms.translation.z + 'px) rotateX(' + transforms.rotation.x + 'deg) rotateY(' + transforms.rotation.y + 'deg) rotateZ(' + transforms.rotation.z + 'deg)'; 327 } 328 }; 329 window.TiltFx = TiltFx; 330})(window); 331jQuery(document).ready(function ($) { 332 // Perspective Hover Effect 333 var perspectiveSettings = [ 334 {}, 335 { 336 movement: { 337 imgWrapper : { 338 translation : {x: 10, y: 10, z: 30}, 339 rotation : {x: 0, y: -10, z: 0}, 340 reverseAnimation : {duration : 200, easing : 'easeOutQuad'} 341 }, 342 lines : { 343 translation : {x: 10, y: 10, z: [0,70]}, 344 rotation : {x: 0, y: 0, z: -2}, 345 reverseAnimation : {duration : 2000, easing : 'easeOutExpo'} 346 }, 347 caption : { 348 rotation : {x: 0, y: 0, z: 2}, 349 reverseAnimation : {duration : 200, easing : 'easeOutQuad'} 350 } 351 } 352 }, 353 { 354 movement: { 355 imgWrapper : { 356 rotation : {x: -5, y: 10, z: 0}, 357 reverseAnimation : {duration : 900, easing : 'easeOutCubic'} 358 }, 359 caption : { 360 translation : {x: 30, y: 30, z: [0,40]}, 361 rotation : {x: [0,15], y: 0, z: 0}, 362 reverseAnimation : {duration : 1200, easing : 'easeOutExpo'} 363 } 364 } 365 }, 366 { 367 movement: { 368 imgWrapper : { 369 rotation : {x: -5, y: 10, z: 0}, 370 reverseAnimation : {duration : 50, easing : 'easeOutQuad'} 371 }, 372 caption : { 373 translation : {x: 20, y: 20, z: 0}, 374 reverseAnimation : {duration : 200, easing : 'easeOutQuad'} 375 } 376 } 377 }, 378 { 379 movement: { 380 imgWrapper : { 381 translation : {x: 0, y: -8, z: 0}, 382 rotation : {x: 3, y: 3, z: 0}, 383 reverseAnimation : {duration : 1200, easing : 'easeOutExpo'} 384 }, 385 lines : { 386 translation : {x: 15, y: 15, z: [0,15]}, 387 reverseAnimation : {duration : 1200, easing : 'easeOutExpo'} 388 }, 389 caption : { 390 translation : {x: 10, y: -15, z: 0}, 391 reverseAnimation : {duration : 900, easing : 'easeOutExpo'} 392 } 393 } 394 }, 395 { 396 movement: { 397 lines : { 398 translation : {x: -5, y: 5, z: 0}, 399 reverseAnimation : {duration : 1000, easing : 'easeOutExpo'} 400 }, 401 caption : { 402 translation : {x: 15, y: 15, z: 0}, 403 rotation : {x: 0, y: 0, z: 3}, 404 reverseAnimation : {duration : 1500, easing : 'easeOutElastic', elasticity : 700} 405 } 406 } 407 }, 408 { 409 movement: { 410 imgWrapper : { 411 translation : {x: 5, y: 5, z: 0}, 412 reverseAnimation : {duration : 800, easing : 'easeOutQuart'} 413 }, 414 caption : { 415 translation : {x: 10, y: 10, z: [0,50]}, 416 reverseAnimation : {duration : 1000, easing : 'easeOutQuart'} 417 } 418 } 419 }, 420 { 421 movement: { 422 lines : { 423 translation : {x: 40, y: 40, z: 0}, 424 reverseAnimation : {duration : 1500, easing : 'easeOutElastic'} 425 }, 426 caption : { 427 translation : {x: 20, y: 20, z: 0}, 428 rotation : {x: 0, y: 0, z: -5}, 429 reverseAnimation : {duration : 1000, easing : 'easeOutExpo'} 430 } 431 } 432 }]; 433 var idx = 0;
434 [].slice.call(document.querySelectorAll('.tilter')).forEach(function(el, pos) { 435 idx = pos%2 === 0 ? idx+1 : idx; 436 new TiltFx(el, perspectiveSettings[idx-1]); 437 }); 438});
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.