1// tfsmartresize helper 2!function(a,b){var c=function(a,b,c){var d;return function(){function g(){c||a.apply(e,f),d=null}var e=this,f=arguments;d?clearTimeout(d):c&&a.apply(e,f),d=setTimeout(g,b||100)}};jQuery.fn[b]=function(a){return a?this.bind("resize",c(a)):this.trigger(b)}}(jQuery,"tfsmartresize"); 3 4var Themify, ThemifyGallery; 5(function ($, window, document, undefined) { 6 'use strict'; 7 8 /* window load fires only once in IE */ 9 window.addEventListener( "load", function () { 10 window.loaded = true; 11 Themify.triggerEvent( window, 'resize' ); 12 $( 'body' ).addClass( 'page-loaded' ); 13 }); 14 15 Themify = { 16 wow: null, 17 triggerEvent: function (a, b) { 18 var c; 19 document.createEvent ? (c = document.createEvent("HTMLEvents"), c.initEvent(b, !0, !0)) : document.createEventObject && (c = document.createEventObject(), c.eventType = b), c.eventName = b, a.dispatchEvent ? a.dispatchEvent(c) : a.fireEvent && htmlEvents["on" + b] ? a.fireEvent("on" + c.eventType, c) : a[b] ? a[b]() : a["on" + b] && a["on" + b]() 20 }, 21 Init: function () { 22 if (typeof tbLocalScript !== 'undefined' && tbLocalScript) { 23 var $self = Themify; 24 $(document).ready(function () { 25 tbLocalScript.isTouch = $('body').hasClass('touch'); 26 $self.LoadAsync(tbLocalScript.builder_url + '/js/themify.builder.script.js'); // this script should be always loaded even there is no builder content because it's also requires for themify_shortcode for exp: animation js 27 }); 28 $('body').on('builderscriptsloaded.themify', function () { 29 $self.LoadAsync(tbLocalScript.builder_url + '/js/themify.builder.script.js'); 30 }); 31 } 32 else { 33 this.bindEvents(); 34 } 35 }, 36 bindEvents: function () { 37 var $self = Themify; 38 if (window.loaded) { 39 $('.shortcode.slider, .shortcode.post-slider, .slideshow-wrap').css({'height': 'auto', 'visibility': 'visible'}); 40 $self.InitCarousel(); 41 $self.InitGallery(); 42 $self.InitMap(); 43 $self.wowInit(); 44 } 45 else { 46 $(window).load(function () { 47 $('.shortcode.slider, .shortcode.post-slider, .slideshow-wrap').css({'height': 'auto', 'visibility': 'visible'}); 48 $self.InitGallery(); 49 }); 50 $(document).ready(function () { 51 $self.InitCarousel(); 52 $self.InitMap(); 53 $self.wowInit(); 54 }); 55 } 56 $('body').on('builder_load_module_partial builder_toggle_frontend', this.InitMap); // builder toggle/update module map. 57 }, 58 InitCarousel: function () { 59 if ($('.slides[data-slider]').length > 0) { 60 var $self = this; 61 $self.LoadAsync(themify_vars.url + '/js/jquery.imagesloaded.min.js', function () { 62 if('undefined' === typeof $.fn.carouFredSel){ 63 $self.LoadAsync(themify_vars.url + '/js/carousel.js', $self.carouselCalback, null, null, function () { 64 return ('undefined' !== typeof $.fn.carouFredSel); 65 }); 66 } 67 else{ 68 $self.carouselCalback(); 69 } 70 }, null, null, function () { 71 return ('undefined' !== typeof $.fn.imagesLoaded); 72 }); 73 } 74 }, 75 carouselCalback: function () { 76 77 $('.slides[data-slider]').each(function () { 78 $(this).find("> br, > p").remove(); 79 var $this = $(this), 80 $data = JSON.parse(window.atob($(this).data('slider'))), 81 height = (typeof $data.height === 'undefined') ? 'auto' : $data.height, 82 $numsldr = $data.numsldr, 83 $slideContainer = 'undefined' !== typeof $data.custom_numsldr ? '#' + $data.custom_numsldr : '#slider-' + $numsldr, 84 $speed = $data.speed >= 1000 ? $data.speed : 1000 * $data.speed, 85 $args = { 86 responsive: true, 87 swipe: true, 88 circular: $data.wrapvar, 89 infinite: $data.wrapvar, 90 auto: { 91 play: $data.auto == 0 ? false : true, 92 timeoutDuration: $data.auto >= 1000 ? $data.auto : 1000 * $data.auto, 93 duration: $speed, 94 pauseOnHover: $data.pause_hover 95 }, 96 scroll: { 97 items: parseInt($data.scroll), 98 duration: $speed, 99 fx: $data.effect 100 }, 101 items: { 102 visible: { 103 min: 1, 104 max: parseInt($data.visible) 105 }, 106 width: 120, 107 height: height 108 }, 109 onCreate: function (items) { 110 $this.closest('.caroufredsel_wrapper').outerHeight($this.outerHeight(true)); 111 $($slideContainer).css({'visibility': 'visible', 'height': 'auto'}); 112 } 113 }; 114 if ($data.slider_nav) { 115 $args.prev = $slideContainer + ' .carousel-prev'; 116 $args.next = $slideContainer + ' .carousel-next'; 117 } 118 if ($data.pager) { 119 $args.pagination = $slideContainer + ' .carousel-pager'; 120 }
121 $this.imagesLoaded().always(function () { 122 $this.carouFredSel($args); 123 }); 124 }); 125 126 var tscpsDidResize = false; 127 $(window).on("resize", function () { 128 tscpsDidResize = true; 129 }); 130 setInterval(function () { 131 if (tscpsDidResize) { 132 tscpsDidResize = false; 133 $(".slides[data-slider]").each(function () { 134 var heights = [], 135 newHeight, 136 $self = $(this); 137 $self.find("li").each(function () { 138 heights.push($(this).outerHeight(true)); 139 }); 140 newHeight = Math.max.apply(Math, heights); 141 $self.outerHeight(newHeight); 142 $(".caroufredsel_wrapper").outerHeight(newHeight); 143 }); 144 } 145 }, 500); 146 147 }, 148 InitMap: function () { 149 var $self = Themify; 150 if ($('.themify_map').length > 0) { 151 if (typeof google !== 'object' || typeof google.maps !== 'object') { 152 if(!themify_vars.map_key){ 153 themify_vars.map_key = ''; 154 } 155 $self.LoadAsync('//maps.googleapis.com/maps/api/js?v=3.exp&callback=Themify.MapCallback&key='+themify_vars.map_key, false, true, true); 156 } 157 else { 158 $self.MapCallback(); 159 } 160 } 161 }, 162 MapCallback: function () { 163 var $maps = $('.themify_map'); 164 $maps.each(function ($i) { 165 var $data = JSON.parse(window.atob($(this).data('map'))), 166 address = $data.address, 167 zoom = parseInt($data.zoom), 168 type = $data.type, 169 scroll = $data.scroll, 170 drag = $data.drag, 171 node = this; 172 var delay = $i * 1000; 173 setTimeout(function () { 174 var geo = new google.maps.Geocoder(), 175 latlng = new google.maps.LatLng(-34.397, 150.644), 176 mapOptions = { 177 zoom: zoom, 178 center: latlng, 179 mapTypeId: google.maps.MapTypeId.ROADMAP, 180 scrollwheel: scroll, 181 draggable: drag 182 }; 183 switch (type.toUpperCase()) { 184 case 'ROADMAP': 185 mapOptions.mapTypeId = google.maps.MapTypeId.ROADMAP; 186 break; 187 case 'SATELLITE': 188 mapOptions.mapTypeId = google.maps.MapTypeId.SATELLITE; 189 break; 190 case 'HYBRID': 191 mapOptions.mapTypeId = google.maps.MapTypeId.HYBRID; 192 break; 193 case 'TERRAIN': 194 mapOptions.mapTypeId = google.maps.MapTypeId.TERRAIN; 195 break; 196 } 197 198 var map = new google.maps.Map(node, mapOptions), 199 revGeocoding = $(node).data('reverse-geocoding') ? true : false; 200 201 /* store a copy of the map object in the dom node, for future reference */ 202 $(node).data('gmap_object', map); 203 204 if (revGeocoding) { 205 var latlngStr = address.split(',', 2), 206 lat = parseFloat(latlngStr[0]), 207 lng = parseFloat(latlngStr[1]), 208 geolatlng = new google.maps.LatLng(lat, lng), 209 geoParams = {'latLng': geolatlng}; 210 } else { 211 var geoParams = {'address': address}; 212 } 213 214 geo.geocode(geoParams, function (results, status) { 215 if (status == google.maps.GeocoderStatus.OK) { 216 var position = revGeocoding ? geolatlng : results[0].geometry.location; 217 map.setCenter(position); 218 var marker = new google.maps.Marker({ 219 map: map, 220 position: position 221 }), 222 info = $(node).data('info-window'); 223 if (undefined !== info) { 224 var contentString = '<div class="themify_builder_map_info_window">' + info + '</div>', 225 infowindow = new google.maps.InfoWindow({ 226 content: contentString 227 }); 228 229 google.maps.event.addListener(marker, 'click', function () { 230 infowindow.open(map, marker); 231 }); 232 } 233 } 234 }); 235 }, delay); 236 }); 237 }, 238 wowInit: function () { 239 if ((typeof tbLocalScript === 'undefined' || !tbLocalScript) || tbLocalScript.animationInviewSelectors && tbLocalScript.animationInviewSelectors.length > 0) { 240 if (!Themify.wow) { 241 Themify.LoadAsync(themify_vars.url + '/js/wow.js', Themify.wowCallback, null, null, function () { 242 return (Themify.wow); 243 }); 244 } 245 else { 246 Themify.wowCallback(); 247 return (Themify.wow); 248 } 249 } 250 }, 251 wowCallback: function () { 252 var self = Themify; 253 if (themify_vars.TB) { 254 ThemifyBuilderModuleJs.animationOnScroll(); 255 } 256 self.wow = new WOW({ 257 live: true, 258 offset: typeof tbLocalScript !== 'undefined' && tbLocalScript ? parseInt(tbLocalScript.animationOffset)
258: 100 259 }); 260 self.wow.init(); 261 262 $('body').on('builder_load_module_partial builder_toggle_frontend', function () { 263 self.wow.doSync(); 264 self.wow.sync(); 265 }); 266 267 // duck-punching WOW to get delay and iteration from classnames 268 if (typeof self.wow.__proto__ !== 'undefined') { 269 self.wow.__proto__.applyStyle = function (box, hidden) { 270 var delay, duration, iteration; 271 duration = box.getAttribute('data-wow-duration'); 272 delay = box.getAttribute('class').match(/animation_effect_delay_((?:\d+\.?\d*|\.\d+))/); 273 if (null != delay) 274 delay = delay[1] + 's'; 275 iteration = box.getAttribute('class').match(/animation_effect_repeat_(\d*)/); 276 if (null != iteration) 277 iteration = iteration[1]; 278 return this.animate((function (_this) { 279 return function () { 280 return _this.customStyle(box, hidden, duration, delay, iteration); 281 }; 282 })(this)); 283 }; 284 } 285 }, 286 LoadAsync: function (src, callback, version, defer, test) { 287 var id = src.split("/").pop().replace(/\./g, '_'), // Make script filename as ID 288 existElemens = document.getElementById(id); 289 290 if (existElemens) { 291 if (callback) { 292 if (test) { 293 var callbackTimer = setInterval(function () { 294 var call = false; 295 try { 296 call = test.call(); 297 } catch (e) { 298 } 299 300 if (call) { 301 clearInterval(callbackTimer); 302 callback.call(); 303 } 304 }, 100); 305 } else { 306 setTimeout(callback, 110); 307 } 308 } 309 return; 310 } 311 var s, r, t; 312 r = false; 313 s = document.createElement('script'); 314 s.type = 'text/javascript'; 315 s.id = id; 316 s.src = !version && 'undefined' !== typeof tbLocalScript ? src + '?version=' + tbLocalScript.version : src; 317 if (!defer) { 318 s.async = true; 319 } 320 else { 321 s.defer = true; 322 } 323 s.onload = s.onreadystatechange = function () { 324 if (!r && (!this.readyState || this.readyState === 'complete')) 325 { 326 r = true; 327 if (callback) { 328 callback(); 329 } 330 } 331 }; 332 t = document.getElementsByTagName('script')[0]; 333 t.parentNode.insertBefore(s, t); 334 }, 335 LoadCss: function (href, version, before, media) { 336 337 if ($("link[href='" + href + "']").length > 0) { 338 return; 339 } 340 var doc = window.document; 341 var ss = doc.createElement("link"); 342 var ref; 343 if (before) { 344 ref = before; 345 } 346 else { 347 var refs = (doc.body || doc.getElementsByTagName("head")[ 0 ]).childNodes; 348 ref = refs[ refs.length - 1]; 349 } 350 351 var sheets = doc.styleSheets; 352 ss.rel = "stylesheet"; 353 ss.href = version ? href + '?version=' + version : href; 354 // temporarily set media to something inapplicable to ensure it'll fetch without blocking render 355 ss.media = "only x"; 356 ss.async = 'async'; 357 358 // Inject link 359 // Note: `insertBefore` is used instead of `appendChild`, for safety re: http://www.paulirish.com/2011/surefire-dom-element-insertion/ 360 ref.parentNode.insertBefore(ss, (before ? ref : ref.nextSibling)); 361 // A method (exposed on return object for external use) that mimics onload by polling until document.styleSheets until it includes the new sheet. 362 var onloadcssdefined = function (cb) { 363 var resolvedHref = ss.href; 364 var i = sheets.length; 365 while (i--) { 366 if (sheets[ i ].href === resolvedHref) { 367 return cb(); 368 } 369 } 370 setTimeout(function () { 371 onloadcssdefined(cb); 372 }); 373 }; 374 375 // once loaded, set link's media back to `all` so that the stylesheet applies once it loads 376 ss.onloadcssdefined = onloadcssdefined; 377 onloadcssdefined(function () { 378 ss.media = media || "all"; 379 }); 380 return ss; 381 }, 382 video: function () { 383 if ($('.themify_video_desktop a').length > 0) { 384 if (typeof flowplayer === 'undefined') { 385 this.LoadAsync(themify_vars.url + '/js/flowplayer-3.2.4.min.js', this.videoCalback); 386 } 387 else { 388 this.videoCalback(); 389 } 390 } 391 }, 392 videoCalback: function () { 393 $('.themify_video_desktop a').each(function () { 394 flowplayer( 395 $(this).attr('id'), 396 themify_vars.url + "/js/flowplayer-3.2.5.swf", 397 { 398 clip: {autoPlay: false} 399 } 400 ); 401 }); 402 }, 403 lightboxCallback: function ($el, $args) { 404 this.LoadAsync(themify_vars.url + '/js/themify.gallery.js', function () { 405 Themify.GalleryCallBack($el, $args); 406 }, null, null, function () { 407 return ('undefined' !== typeof ThemifyGallery); 408 }); 409 }, 410 InitGallery: function ($el, $args) { 411 var lightboxConditions = typeof themifyScript == 'object' && ( ( themifyScript.lightbox.lightboxContentImages && $(themifyScript.lightbox.c
411ontentImagesAreas).length) || themifyScript.lightbox.lightboxGalleryOn || $(themifyScript.lightbox.lightboxSelector).length > 0 ) ? true : false; 412 if (lightboxConditions || $('.module.module-gallery').length > 0 || $('.module.module-image').length > 0 || $('.themify_lightbox').length > 0 ) { 413 this.LoadCss(themify_vars.url + '/css/lightbox.css', null); 414 this.LoadAsync(themify_vars.url + '/js/lightbox.js', function () { 415 Themify.lightboxCallback($el, $args); 416 }, null, null, function () { 417 return ('undefined' !== typeof $.fn.magnificPopup); 418 }); 419 } 420 else { 421 $('body').addClass('themify_lightbox_loaded').removeClass('themify_lightboxed_images'); 422 } 423 }, 424 GalleryCallBack: function ($el, $args) { 425 if (!$el) { 426 $el = $(themifyScript.lightboxContext); 427 } 428 $args = !$args && themifyScript.extraLightboxArgs ? themifyScript.extraLightboxArgs : {}; 429 ThemifyGallery.init({'context': $el, 'extraLightboxArgs': $args}); 430 $('body').addClass('themify_lightbox_loaded').removeClass('themify_lightboxed_images'); 431 }, 432 isPageHasBuilderContent: function () { 433 var check_builder = $('.themify_builder_content').filter(function () { 434 return $.trim($(this).html().toString()).length > 0; 435 }); 436 return check_builder.length; 437 } 438 }; 439 440 Themify.Init(); 441 442}(jQuery, window, document));
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.