1 2var iron_vars = window.iron_vars || {}, 3 IRON = window.IRON || {}; 4 5var AudioPlaylists = []; 6 7var isMobile = false; 8if (/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|ipad|iris|kindle|Android|Silk|lge |maemo|midp|mmp|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i.test(navigator.userAgent) 9 || /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(navigator.userAgent.
9substr(0, 4))) { 10 isMobile = true; 11} 12var isiPad = /ipad/i.test(navigator.userAgent.toLowerCase()); 13var isiPhone = /iphone/i.test(navigator.userAgent.toLowerCase()); 14var isSafari = /safari/i.test(navigator.userAgent.toLowerCase()); 15 16function detectBrowser() { 17 if (navigator.userAgent.indexOf("Opera") != -1 || navigator.userAgent.indexOf('OPR') != -1) { 18 return 'Opera'; 19 } else if (navigator.userAgent.indexOf("Chrome") != -1) { 20 return 'Chrome'; 21 } else if (navigator.userAgent.indexOf("Safari") != -1) { 22 return 'Safari'; 23 } else if (navigator.userAgent.indexOf("Firefox") != -1) { 24 return 'Firefox'; 25 } else { 26 return 'Unknown'; 27 } 28} 29var cr_browser = detectBrowser() 30 31var waypoints; 32(function ($) { 33 "use strict"; 34 35 IRON.$ = window.IRON.$ || {}; 36 37 IRON.XHR = { 38 settings: { 39 url: iron_vars.ajaxurl, 40 type: 'POST' 41 } 42 }; 43 44 IRON.state = iron_vars; 45 IRON.libraries = []; 46 47 var jcf = window.jcf || {}; 48 var DocumentTouch = window.DocumentTouch || {}; 49 var ResponsiveHelper = window.ResponsiveHelper || {}; 50 var jPlayerPlaylist = window.jPlayerPlaylist || {}; 51 var PlaceholderInput = window.PlaceholderInput || {}; 52 var TouchNav = window.TouchNav || {}; 53 var lib = window.lib || {}; 54 55 56 // page init 57 jQuery(function () { 58 var libraries = $(document).find('head script[src], #pusher-wrap ~ script[src]') 59 libraries.each(function () { 60 IRON.libraries.push($(this).attr('src')) 61 }) 62 63 /* Fancybox overlay fix */ 64 // detect device type 65 var isTouchDevice = (function () { 66 try { 67 return ('ontouchstart' in window) || window.DocumentTouch && document instanceof DocumentTouch; 68 } catch (e) { 69 return false; 70 } 71 }()); 72 73 74 IRON.initFreeWall(); 75 IRON.initPopups(); 76 IRON.initInputs(); 77 IRON.initFitVids(); 78 IRON.initVideoLinks();
79 IRON.initDropDownClasses(); 80 IRON.initAjaxBlocksLoad(); 81 IRON.initLightbox(); 82 IRON.initFacebookLikebox(); 83 IRON.initTwitter(); 84 IRON.initSideMenu(); 85 86 if (iron_vars.header_top_menu_hide_on_scroll == 1) 87 IRON.initTopMenu(); 88 89 IRON.initCircleCentering(); 90 IRON.initGridDisplayPhoto(); 91 IRON.initGridDisplayAlbum(); 92 IRON.initGridDisplayNews(); 93 IRON.initGridDisplayVideo(); 94 95 // if(!isMobile && !isiPad) 96 IRON.initPusherHeight(); 97 98 IRON.initEventCenter(); 99 IRON.initTwitterCenter(); 100 IRON.initHeadsetCenter(); 101 IRON.initIOSCenter(); 102 IRON.initCountdownLang(); 103 IRON.initCountdownCenter(); 104 IRON.initMenuHierarchy(); 105 IRON.initSubmenuPosition(); 106 IRON.initSingleDisco(); 107 IRON.initNewsletterLabel(); 108 IRON.initBackToTop(); 109 IRON.initScrollToSection(); 110 IRON.initParallax(); 111 IRON.initDisableHovers(); 112 IRON.initVcAnimations(); 113 IRON.initIsotope(); 114 IRON.initWooImageBack(); 115 IRON.initWpAdminBar(); 116 IRON.initSocialShare(); 117 IRON.btnPlayAudio() 118 IRON.pjax.init(); 119 120 if (iron_vars.enable_fixed_header) 121 IRON.initFixedBar(); 122 123 IRON.initCustomJS(); 124 125 // fix options 126 var overlaySelector = '#fancybox-overlay'; 127 128 if (!isTouchDevice) { 129 // create <style> rules 130 var head = document.getElementsByTagName('head')[0], 131 style = document.createElement('style'), 132 rules = document.createTextNode(overlaySelector + '{' + 133 'position:fixed;' + 134 'top:0;' + 135 'left:0;' + 136 '}'); 137 138 // append style element 139 style.type = 'text/css'; 140 if (style.styleSheet) { 141 style.styleSheet.cssText = rules.nodeValue; 142 } else { 143 style.appendChild(rules); 144 } 145 head.appendChild(style); 146 } 147 }); 148 149 IRON.initWpAdminBar = function () { 150 if (iron_vars.wp_admin_bar) { 151 $('html').addClass('wp-admin-bar') 152 } 153 } 154 155 jQuery(window).on('load', function () { 156 setTimeout(function () { 157 IRON.initSameHeight(); 158 jQuery(window).trigger('resize'); 159 }, 200); 160 }); 161 162 IRON.initSocialShare = function () { 163 if ($('.sharing_toolbox').length) { 164 165 if (iron_vars.social_enabled == "1") { 166 167 168 var image = $('.sharing_toolbox').data('image-social'); 169 var url = document.URL 170 var shareFacebook = ''; 171 var shareTwitter = ''; 172 var shareGoogle = ''; 173 var shareLinkedin = ''; 174 var sharePinterest = ''; 175 176 if (Object.prototype.hasOwnProperty.call(iron_vars.social, 'facebook')) { 177 shareFacebook = '<a title="Share on Facebook" class="shareFacebook" href="http://www.facebook.com/sharer/sharer.php?u=' + url + '" target="_blank"><i class="fab fa-facebook-square" aria-hidden="true"></i></a>'; 178 } 179 if (Object.prototype.hasOwnProperty.call(iron_vars.social, 'twitter')) { 180 shareTwitter = '<a title="Share on Twitter" class="shareTwitter" href= " ' + encodeURI('https://twitter.com/intent/tweet?url=' + url + '&text=' + document.title) + ' " target="_blank"><i class="fab fa-twitter-square" aria-hidden="true"></i></a>'; 181 } 182 if (Object.prototype.hasOwnProperty.call(iron_vars.social, 'linkedin')) { 183 shareLinkedin = '<a title="Share on LinkedIn" class="shareLinkedin" href="http://www.linkedin.com/shareArticle?mini=true&url=' + url + '" target="_blank"><i class="fab fa-linkedin" aria-hidden="true"></i></a>'; 184 } 185 if (Object.prototype.hasOwnProperty.call(iron_vars.social, 'pinterest')) { 186 sharePinterest = '<a title="Share on Pinterest" class="sharePinterest" href="https://pinterest.com/pin/create/bookmarklet/?url=' + url + '&description=' + document.title + '&media=' + image + '" target="_blank"><i class="fab fa-pinterest-square" aria-hidden="true"></i></a>'; 187 } 188 189 $('.sharing_toolbox').append(shareFacebook + shareTwitter + shareGoogle + shareLinkedin + sharePinterest) 190 } 191 192 } 193 } 194 195 IRON.pagination = { 196 XHR: {}, 197 $: {}, 198 loadingClass: 'ajax-load', 199 ajaxBusy: false, 200 isotope: false 201 }; 202 203 IRON.pagination.XHR = { 204 done: function (response, status, xhr) { // success : data, status, xhr 205 206 var IB = IRON.pagination; 207 208 if (response) { 209 210 if (IB.isotope) { 211 var $newItems = $(response); 212 IB.$.container.append($newItems).isotope('addItems', $newItems).isotope('reLayout'); 213 IB.$.container.fadeIn(); 214 } else { 215 IB.$.container.append(response).fadeIn(); 216 } 217 218 var newMoreButton = IB.$.container.find('.button-more'); 219 if (newMoreButton.length > 0) { 220 IB.$.loadButton.replaceWith(newMoreButton[0].outerHTML); 221 newMoreButton.remove(); 222 IB.$.loadButton = $('.button-more'); 223 224 } else { 225 IB.$.loadButton.remove(); 226 } 227 228 229 IB.ajaxBusy = false;
230 231 //IRON.initTouchNav(); 232 233 var callbacks = IB.$.loadButton.data('callback'); 234 if (callbacks) { 235 callbacks = callbacks.split(','); 236 237 for (var i = 0; i < callbacks.length; i++) { 238 var callback = IRON[callbacks[i]]; 239 240 if (typeof callback === 'function') { 241 callback(); 242 } 243 } 244 } 245 246 if (IB.method == 'paginate_scroll') { 247 248 $(document).on('scroll', function (event) { 249 if (!IB.ajaxBusy) { 250 var $win = $(this), 251 $doc = $(document), 252 $foot = $('body > footer'); 253 254 if ($win.scrollTop() >= ($doc.height() - $win.height() - ($foot.height()))) { 255 IB.$.loadButton.click(); 256 } 257 } 258 }); 259 260 } else { 261 IB.$.loadButton.css('visibility', 'visible').fadeIn(); 262 } 263 264 IRON.initAjaxBlocksLoadEvent(); 265 266 } else { 267 268 IB.$.loadButton.remove(); 269 IB.XHR.fail(xhr, 'error', 404); 270 } 271 }, 272 fail: function (xhr, status, error) { // error : xhr, status, error 273 274 var IB = IRON.pagination; 275 276 setTimeout(function () { 277 alert(IB.$.loadButton.data('warning')); 278 }, 100); 279 }, 280 always: function () { // complete : data|xhr, status, xhr|error 281 282 var IB = IRON.pagination; 283 IB.$.loadButton.prop('disabled', false); 284 285 IB.$.container.removeClass(IB.loadingClass); 286 }, 287 before: function (xhr) { 288 289 var IB = IRON.pagination; 290 IB.$.loadButton.prop('disabled', true); 291 } 292 }; 293 294 295 IRON.initFacebookLikebox = function () { 296 if ($('#fb-likebox').length === 0) { 297 return false; 298 } 299 300 var fb_app_id = $('#fb-likebox').data('appid'); 301 var fb_page_url = $('#fb-likebox').data('pageurl'); 302 fb_page_url = encodeURI(fb_page_url); 303 304 var iframe = '<iframe src="//www.facebook.com/plugins/likebox.php?href=' + fb_page_url + '&width=200&height=62&show_faces=false&colorscheme=dark&stream=false&border_color&header=false&appId=' + fb_app_id + '" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:200px; height:62px;" allowTransparency="true"></iframe>'; 305 306 $('#fb-likebox').html(iframe); 307 }; 308 309 310 IRON.initTwitter = function () { 311 312 $('.iron_widget_twitter .query').each(function () { 313 314 var $query = $(this); 315 var username = $(this).data('username'); 316 317 $(function ($) { 318 $query.tweet({ 319 modpath: iron_vars.plugins_url + 'js/twitter/', 320 join_text: 'auto', 321 username: (username ? username : 'envato'), 322 count: 1, 323 auto_join_text_default: '', 324 auto_join_text_ed: '', 325 auto_join_text_ing: '', 326 auto_join_text_reply: '', 327 auto_join_text_url: '', 328 loading_text: 'loading tweets...' 329 }).bind('loaded', function () { 330 $(window).resize(); 331 }); 332 }); 333 334 }); 335 }; 336 337 IRON.initFixedBar = function () { 338 339 var top = 0; 340 341 var waypoint = new Waypoint({ 342 element: document.getElementById('wrapper'), 343 handler: function (direction) { 344 if (direction == 'down') { 345 $('#fixed-panel').animate({ 346 opacity: "1", 347 top: top 348 }, 400); 349 } else if (direction == 'up') { 350 $('#fixed-panel').animate({ 351 opacity: "0", 352 top: "-78" 353 }, 200); 354 } 355 }, 356 offset: -1 357 }) 358 }; 359 360 361 IRON.initAjaxBlocksLoad = function () { 362 363 IRON.pagination.XHR.request = { 364 dataType: 'text', 365 data: { 366 ajax: 1 367 }, 368 beforeSend: IRON.pagination.XHR.before 369 }; 370 371 IRON.pagination.XHR.request = $.extend(true, IRON.pagination.XHR.request, IRON.XHR.settings); 372 IRON.initAjaxBlocksLoadEvent(); 373 374 $('a.button-more').trigger('click'); 375 376 }; 377 378 IRON.initAjaxBlocksLoadEvent = function () { 379 380 381 $(document).off('click', 'a.button-more'); 382 $(document).on('click', 'a.button-more', function (e) { 383 e.preventDefault(); 384 385 var IB = IRON.pagination, 386 $this = $(this); 387 388 IB.isotope = ($('.isotope-wrap').length > 0); 389 390 if (IB.ajaxBusy) 391 return; 392 393 IB.$.loadButton = $this; 394 IB.$.container = $('#' + IB.$.loadButton.data('rel')); 395 IRON.pagination.XHR.request.url = IB.$.loadButton.attr('href'); 396 IRON.XHR.settings.url = IB.$.loadButton.attr('href'); 397 398 IB.method = $this.data('paginate'); 399 400 $.ajax(IB.XHR.request) 401 .done(IB.XHR.done) 402 .fail(IB.XHR.fail) 403 .always(IB.XHR.always); 404 }); 405 }; 406 407 // add classes if item has dropdown
408 IRON.initDropDownClasses = function () { 409 jQuery('.side-menu #nav li').each(function () { 410 var item = jQuery(this); 411 var drop = item.find('ul'); 412 var link = item.find('a').eq(0); 413 if (drop.length) { 414 item.addClass('has-drop-down'); 415 if (link.length) { 416 link.addClass('has-drop-down-a'); 417 } 418 } 419 }); 420 }; 421 422 // handle flexible video size 423 IRON.initFitVids = function () { 424 jQuery('.video-block').fitVids(); 425 }; 426 427 428 IRON.initVideoLinks = function () { 429 430 $('.link-mode-inline a').off('click'); 431 $('.link-mode-inline a').on('click', function (e) { 432 433 e.preventDefault(); 434 435 var wrap = $(this).find('.image'); 436 var permalink = $(this).attr('href'); 437 var wrap_height = wrap.css('height'); 438 439 440 $('.link-mode-inline a').not($(this)).find('.fluid-width-video-wrapper').each(function () { 441 442 var parent = $(this).parent(); 443 $(this).remove(); 444 445 parent.find('.loader').remove(); 446 parent.find('.play-button').fadeIn(); 447 parent.find('img').fadeIn(); 448 parent.animate({ opacity: 1 }, 1000); 449 450 }); 451 452 453 454 wrap.css('height', wrap_height); 455 wrap.animate({ opacity: 0 }); 456 457 $.ajax({ 458 url: permalink, 459 dataType: 'html', 460 type: 'post', 461 data: { ajax: 1 }, 462 success: function (embed) { 463 464 wrap.find('.play-button').hide(); 465 wrap.find('img').hide(); 466 if ((isiPhone || isiPad) && isSafari) { 467 wrap.append(embed); 468 } else { 469 wrap.append(embed).fitVids(); 470 } 471 472 wrap.animate({ opacity: 1 }, 1000); 473 } 474 475 }); 476 }); 477 478 var scrolling = false; 479 $(document).on('scrollstart', function () { 480 scrolling = true; 481 }); 482 $(document).on('scrollstop', function () { 483 scrolling = false; 484 }); 485 486 487 $(window).on('resize', function () { 488 489 if ((window.outerWidth == screen.width) || scrolling) 490 return false; 491 492 493 $('.link-mode-inline a .image').each(function () { 494 495 $(this).css('height', ''); 496 497 }); 498 $('.link-mode-inline a').not($(this)).find('.fluid-width-video-wrapper').each(function () { 499 500 var parent = $(this).parent(); 501 $(this).remove(); 502 503 parent.find('.loader').remove(); 504 parent.find('.play-button').fadeIn(); 505 parent.find('img').fadeIn(); 506 parent.animate({ opacity: 1 }, 1000); 507 508 }); 509 510 511 }); 512 513 $('.link-mode-lightbox a').off('click'); 514 $('.link-mode-lightbox a').on('click', function (e) { 515 516 e.preventDefault(); 517 518 var wrap = $(this).find('.image'); 519 var permalink = $(this).attr('href'); 520 var wrap_height = wrap.height(); 521 522 $.ajax({ 523 url: permalink, 524 dataType: 'html', 525 type: 'post', 526 data: { ajax: 1 }, 527 success: function (embed) { 528 529 $.fancybox(embed, { 530 // fancybox API options 531 fitToView: false, 532 autoSize: true, 533 closeClick: false, 534 //openEffect: 'none', 535 //closeEffect: 'none' 536 }); // fancybox 537 538 539 } 540 541 542 }); 543 }); 544 545 }; 546 547 // popups init 548 IRON.initPopups = function () { 549 jQuery('.panel').contentPopup({ 550 mode: 'click', 551 popup: '.nav-holder', 552 btnOpen: '.opener' 553 }); 554 }; 555 556 // clear inputs on focus 557 IRON.initInputs = function () { 558 PlaceholderInput.replaceByOptions({ 559 // filter options 560 clearInputs: true, 561 clearTextareas: true, 562 clearPasswords: true, 563 skipClass: 'default', 564 // input options 565 wrapWithElement: false, 566 showUntilTyping: false, 567 getParentByClass: false, 568 placeholderAttr: 'value' 569 }); 570 }; 571 572 // align blocks height 573 IRON.initSameHeight = function () { 574 jQuery('.widget-area.grid-cols').sameHeight({ 575 elements: '.widget', 576 flexible: true, 577 multiLine: true 578 }); 579 }; 580 581 582 // fancybox modal popup init 583 IRON.initLightbox = function () { 584 var lightboxtransition = iron_vars.lightbox_transition; 585 jQuery('a.lightbox, a[rel*="lightbox"]').fancybox({ 586 padding: 10, 587 cyclic: false, 588 overlayShow: true, 589 overlayOpacity: 0.65, 590 overlayColor: '#000000', 591 titlePosition: 'inside', 592 transitionIn: 'fade', 593 transitionOut: 'fade', 594 prevEffect: lightboxtransition, 595 nextEffect: lightboxtransition 596 }); 597 }; 598 599 IRON.initFreeWall = function () { 600 601 602 $(".free-wall").each(function () { 603 604 var single_album = $('body').hasClass('single-photo-album'); 605 var layout = $(this).data('layout'); 606 var height = parseInt($(this).data('height')); 607 608 609 if (single_album || layout == 'show_all') { 610 611 var wall = new freewall($(this)); 612 613 var multiplier = 0.69; 614 615 var original_height = $(this).height() * multiplier; 616 617 wall.reset({ 618 selector: '.brick', 619 gutterX: 1, 620 gutterY: 1, 621 animate: false, 622 onResize: function () { 623 624 if (single_album) 625 original_height = wall.container.height(); 626 627 wall.fitZone(); 628 629 if (!single_album) 630 wall.container.height(original_height); 631 } 632 }); 633 if (single_album) 634 original_height = wall.container.height(); 635 636 // caculator width and height for IE7; 637 wall.fitWidth(); 638 639 if (!single_album) 640 wall.container.height(original_height); 641 642 $(window).resize(); 643 644 } else { 645 var gallery_height; 646 if (layout != 'window_height' && height !== '' && height !== 0) { 647 gallery_height = height; 648 } else { 649 gallery_height = $(window).height(); 650 } 651 652 var wall = new freewall($(this)); 653 wall.container.height(gallery_height); 654 wall.reset({ 655 selector: '.brick', 656 animate: false, 657 cellW: 150, 658 cellH: 150, 659 gutterX: 1, 660 gutterY: 1, 661 delay: 30, 662 onResize: function () { 663 wall.refresh($(wall.container).width(), gallery_height); 664 665 } 666 }); 667 668 // caculator width and height for IE7; 669 wall.fitZone($(wall.container).width(), gallery_height); 670 $(window).resize(); 671 } 672 }); 673 674 675 }; 676 677 678 // Animation for side menu 679 680 IRON.animation = { 681 right: { 682 push: anime({ 683 targets: ['#pusher', '#overlay .perspective'], 684 translateX: -300, 685 autoplay: false, 686 easing: 'linear', 687 duration: 300 688 }), 689 pushRotate: anime({ 690 targets: ['#pusher', '#overlay .perspective'], 691 translateX: -330, 692 translateY: 0, 693 translateZ: 0, 694 rotateY: 15, 695 autoplay: false, 696 easing: 'linear', 697 duration: 350 698 }), 699 perspective: anime({ 700 targets: ['#pusher', '#overlay .perspective'], 701 translateX: 0, 702 translateY: 0, 703 translateZ: -1000, 704 rotateY: 15, 705 autoplay: false, 706 easing: 'linear', 707 duration: 350 708 }) 709 710 }, 711 left: { 712 push: anime({ 713 targets: ['#pusher', '#overlay .perspective'], 714 translateX: 370, 715 autoplay: false, 716 easing: 'linear', 717 duration: 350 718 }), 719 pushRotate: anime({ 720 targets: ['#pusher', '#overlay .perspective'], 721 translateX: 330, 722 translateY: 0, 723 translateZ: 0, 724 rotateY: -15, 725 autoplay: false, 726 easing: 'linear', 727 duration: 350 728 }), 729 perspective: anime({ 730 targets: ['#pusher', '#overlay .perspective'], 731 translateX: 0, 732 translateY: 0, 733 translateZ: -1000, 734 rotateY: -15, 735 autoplay: false, 736 easing: 'linear', 737 duration: 350 738 }) 739 } 740 } 741 742 743 /* SIDE MENU */ 744 IRON.initSideMenu = function () { 745 var typeside = iron_vars.menu.top_menu_position; 746 var typeclass = iron_vars.menu.menu_transition; 747 var bodyScroll = {} 748 var pusherScroll = {} 749 // debugger 750 jQuery('.site-logo,.menu-toggle,.side-menu,#pusher').addClass(typeside); 751 752
753 jQuery(".menu-toggle,.alt-menu-toggle").click(function (event) { 754 var bodyScroll = $(document).scrollTop() 755 756 event.preventDefault(); 757 var timeout = 1; 758 if (isMobile || isiPad) { 759 IRON.initPusherHeight(); 760 timeout = 500; 761 } 762 763 setTimeout(function () { 764 if (typeclass == 'type1' || typeclass == 'type2') { 765 setTimeout(function () { 766 jQuery('#pusher').addClass(typeclass); 767 $('#pusher').scrollTop(bodyScroll) 768 $('body').addClass('pushMenu'); 769 }, 50); 770 switch (typeclass) { 771 case 'type1': 772 IRON.animation.right.push.reset() 773 IRON.animation.right.push.play() 774 break; 775 776 case 'type2': 777 IRON.animation.right.pushRotate.reset() 778 IRON.animation.right.pushRotate.play() 779 break; 780 781 default: 782 return 783 784 } 785 jQuery('.side-menu').addClass('open'); 786 jQuery('.menu-toggle').css('display', 'none'); 787 jQuery('.site-logo').css('opacity', '0'); 788 jQuery('.header-top-menu').fadeOut(); 789 } else { 790 791 IRON.animation.right.perspective.reset() 792 IRON.animation.right.perspective.play() 793 794 jQuery('#pusher').addClass(typeclass); 795 $('body').addClass('pushMenu'); 796 $('#pusher').scrollTop(bodyScroll) 797 jQuery('.side-menu').addClass('open'); 798 jQuery('.menu-toggle').css('display', 'none'); 799 jQuery('.site-logo').css('opacity', '0'); 800 jQuery('.header-top-menu').fadeOut(); 801 } 802 }, timeout); 803 804 }); 805 jQuery("#pusher-wrap,.menu-toggle-off").click(function () { 806 var pusherScroll = $('#pusher').scrollTop() 807 808 if (!$('.side-menu.open').length) 809 return 810 811 812 if (typeclass == 'type1' || typeclass == 'type2') { 813 814 switch (typeclass) { 815 case 'type1': 816 IRON.animation.right.push.reverse() 817 IRON.animation.right.push.play() 818 break; 819 820 case 'type2': 821 IRON.animation.right.pushRotate.reverse() 822 IRON.animation.right.pushRotate.play() 823 break; 824 825 default: 826 return 827 } 828 829 830 setTimeout(function () { 831 jQuery('.side-menu').removeClass('open'); 832 833 834 835 836 }, 50); 837 838 setTimeout(function () { 839 jQuery('#pusher').removeClass(typeclass); 840 $(document).scrollTop(pusherScroll); 841 $('body').removeClass('pushMenu'); 842 }, 500) 843 jQuery('.sub-menu').removeClass('active'); 844 jQuery('.menu-toggle').css('display', 'block'); 845 jQuery('ul.nav-menu a').css('opacity', '1'); 846 jQuery('.panel-networks').css('opacity', '1'); 847 jQuery('.site-logo').css('opacity', '1'); 848 jQuery('.nav-menu li a, ul.nav-menu ul a, .nav-menu ul ul a').css('pointer-events', 'auto'); 849 jQuery('.header-top-menu').fadeIn(); 850 } else { 851 852 853 setTimeout(function () { 854 jQuery('#pusher').removeClass(typeclass); 855 $(document).scrollTop(pusherScroll) 856 $('body').removeClass('pushMenu'); 857 }, 500) 858 859 IRON.animation.right.perspective.reverse() 860 IRON.animation.right.perspective.play() 861 862 jQuery('.side-menu').removeClass('open'); 863 jQuery('.sub-menu').removeClass('active'); 864 jQuery('.menu-toggle').css('display', 'block'); 865 jQuery('ul.nav-menu a').css('opacity', '1'); 866 jQuery('.panel-networks').css('opacity', '1'); 867 jQuery('.site-logo').css('opacity', '1'); 868 jQuery('.nav-menu li a, ul.nav-menu ul a, .nav-menu ul ul a').css('pointer-events', 'auto'); 869 jQuery('.header-top-menu').fadeIn(); 870 } 871 872 // if(isMobile || isiPad) { 873 // setTimeout(function() { 874 // IRON.resetPusherHeight(); 875 // }, 500); 876 // } 877 }); 878 jQuery('.side-menu').css('display', 'block'); 879 }; 880 881 IRON.initTopMenu = function () { 882 883 $(document).on('scroll', function () { 884 885 if ($(this).scrollTop() >= 400) { 886 887 jQuery('.header-top-menu').stop().animate({ 888 top: '-100px', 889 opacity: 0 890 }, 600); 891 } 892 else { 893 894 jQuery('.header-top-menu').stop().animate({ 895 top: '12px', 896 opacity: 1 897 }, 600); 898 } 899 900 }); 901 902 }; 903 904 /* CIRCLE CENTERING */ 905 IRON.initCircleCentering = function () { 906 jQuery(".centering, .circle .wpb_wrapper").each(function () { 907 var halfheight = (jQuery(this).height()) / 2; 908 jQuery(this).css('margin-top', (-halfheight)); 909 }); 910 911 jQuery(window).resize(function () { 912 if (jQuery(window).innerWidth() < 660) { 913 if (jQuery(".circle").length > 0) { 914 jQuery(".circle").each(function () { 915 jQuery(this).closest(".wpb_column").css({ 916 "float": "none", 917 "margin-left": "0", 918 "width": "100%" 919 }); 920 }); 921 } 922 } else { 923 if (jQuery(".circle").length > 0) { 924 jQuery(".circle").each(function () { 925 jQuery(this).closest(".wpb_column").removeAttr("style"); 926 }); 927 } 928 } 929 }); 930 }; 931 932 /* PHOTO ALBUM GRID DISPLAY */ 933 IRON.initGridDisplayPhoto = function () { 934 setTimeout(function () { 935 jQuery('.listing-section.photo').each(function () { 936 var leftColumnHeight = 0; 937 var rightColumnHeight = 0; 938 var $articles = jQuery(this).find('.photo-wrap'); 939 for (var i = 0; i < $articles.length; i++) { 940 if (leftColumnHeight > rightColumnHeight) { 941 rightColumnHeight += $articles.eq(i).addClass('right').outerHeight(true); 942 } else { 943 leftColumnHeight += $articles.eq(i).outerHeight(true); 944 } 945 } 946 jQuery(this).css('visibility', 'visible'); 947 }); 948 }, 250); 949 setTimeout(function () { 950 jQuery('.photo-wrap').css('opacity', '1'); 951 }, 250); 952 }; 953 954 /* MUSIC ALBUM GRID DISPLAY */ 955 IRON.initGridDisplayAlbum = function () { 956 setTimeout(function () {
957 jQuery('.two_column_album').each(function () { 958 var leftColumnHeight = 0; 959 var rightColumnHeight = 0; 960 var $articles = jQuery(this).find('.media-block'); 961 for (var i = 0; i < $articles.length; i++) { 962 if (leftColumnHeight > rightColumnHeight) { 963 rightColumnHeight += $articles.eq(i).addClass('right').outerHeight(true); 964 } else { 965 leftColumnHeight += $articles.eq(i).outerHeight(true); 966 } 967 } 968 jQuery(this).css('visibility', 'visible'); 969 }); 970 }, 250); 971 setTimeout(function () { 972 jQuery('.two_column_album .media-block').css('opacity', '1'); 973 }, 250); 974 }; 975 976 /* NEWS GRID DISPLAY */ 977 IRON.initGridDisplayNews = function () { 978 setTimeout(function () { 979 jQuery('.iron_widget_posts, .articles-section').each(function () { 980 var leftColumnHeight = 0; 981 var rightColumnHeight = 0; 982 var $articles = jQuery(this).find('.news-grid-wrap'); 983 for (var i = 0; i < $articles.length; i++) { 984 if (leftColumnHeight > rightColumnHeight) { 985 rightColumnHeight += $articles.eq(i).addClass('right').outerHeight(true); 986 } else { 987 leftColumnHeight += $articles.eq(i).outerHeight(true); 988 } 989 } 990 jQuery(this).css('visibility', 'visible'); 991 }); 992 }, 250); 993 setTimeout(function () { 994 jQuery('.news-grid-wrap').css('opacity', '1'); 995 }, 250); 996 }; 997 998 /* VIDEO GRID DISPLAY */ 999 IRON.initGridDisplayVideo = function () { 1000 setTimeout(function () { 1001 jQuery('.iron_widget_videos, .listing-section.videos').each(function () { 1002 var leftColumnHeight = 0; 1003 var rightColumnHeight = 0; 1004 var $articles = jQuery(this).find('.videogrid'); 1005 for (var i = 0; i < $articles.length; i++) { 1006 if (leftColumnHeight > rightColumnHeight) { 1007 rightColumnHeight += $articles.eq(i).addClass('right').outerHeight(true); 1008 } else { 1009 leftColumnHeight += $articles.eq(i).outerHeight(true); 1010 } 1011 } 1012 jQuery(this).css('visibility', 'visible'); 1013 }); 1014 }, 250); 1015 setTimeout(function () { 1016 jQuery('.videogrid').css('opacity', '1'); 1017 }, 250); 1018 }; 1019 1020 // pjax 1021 1022 IRON.btnPlayAudio = function () { 1023 jQuery('.pjax-container').on('click', '.vc_btn3[data-album="1"]', function () { 1024 event.preventDefault(); 1025 IRON.continuousPlayer.setPlaylist(jQuery(this)) 1026 IRON.continuousPlayer.setCurrentTrack(0, jQuery(this)) 1027 }) 1028 } 1029 1030 IRON.pjax = { 1031 1032 oldDocument: '', 1033 newDocument: '', 1034 enablePjax: IRON.state.enable_ajax, 1035 1036 defaultBarba: function () { 1037 var pjax = this; 1038 var originalFn = Barba.Pjax.Dom.parseResponse; 1039 var originalCheck = Barba.Pjax.preventCheck 1040 1041 Barba.Pjax.Dom.wrapperId = 'pusher'; 1042 Barba.Pjax.Dom.containerClass = 'pjax-container'; 1043 Barba.Pjax.ignoreClassLink = 'no-ajax'; 1044 1045 Barba.Pjax.Dom.parseResponse = function (response) { 1046 // $(window).off(); 1047 // $(document).off(); 1048 pjax.oldDocument = window.document; 1049 var parser = new DOMParser(); 1050 pjax.newDocument = parser.parseFromString(response, "text/html"); 1051 1052 1053 1054 return originalFn.apply(Barba.Pjax.Dom, arguments); 1055 1056 }; 1057 1058 Barba.Pjax.preventCheck = function (evt, element) { 1059 if (element == null || element.hasAttribute('data-vc-container') || element.hasAttribute('data-slide')) { 1060 return false 1061 } 1062 1063 var elementToAvoidList = $("#wpadminbar a, .esgbox, .link-mode-inline a, .link-mode-lightbox a, .languages-selector a, .lang-item a, .no-ajax a"); 1064 var YouCanGo = true; 1065 1066 elementToAvoidList.each(function (e, el) { 1067 if (el == element) 1068 YouCanGo = false; 1069 }) 1070 //debugger 1071 if (element.hash != '' && element != null) { 1072 1073 var scrollToElement = $(element.hash).position(); 1074 1075 $('html, body').animate({ 1076 scrollTop: scrollToElement.top 1077 }, 50); 1078 } 1079 1080 if (!YouCanGo) 1081 return YouCanGo; 1082 1083 return originalCheck.apply(Barba.Pjax, arguments); 1084 } 1085 }, 1086 1087 init: function () { 1088 1089 var pjax = this; 1090 pjax.defaultBarba(); 1091 1092 if (pjax.enablePjax && !$('body').hasClass('woocommerce-page')) { 1093 Barba.Pjax.start(); 1094 $('body').addClass('pjax'); 1095 } 1096 1097 1098 Barba.Pjax.getTransition = function () { 1099 return pjax.HideShowTransition(); 1100 }; 1101 1102 Barba.Dispatcher.on('transitionCompleted', function () { 1103 1104 pjax.customJs() 1105 IRON.initCustomJS() 1106 IRON.btnPlayAudio() 1107 IRON.initCountdownLang(); 1108 IRON.initCountdownCenter(); 1109 pjax.ironAudioPlayer(); 1110 pjax.wooCommerce(); 1111 eventsFilter(); 1112 vc_js() 1113 1114 // if ($("[data-vc-grid-settings]").length) { 1115 // $("[data-vc-grid-settings]").vcGrid() 1116 // } 1117 1118 }); 1119 1120 Barba.Dispatcher.on('initStateChange', function () { 1121 if (typeof ga === 'function') { 1122 ga('send', 'pageview', location.pathname); 1123 } 1124 }) 1125 1126 Barba.Dispatcher.on('newPageReady', function () { 1127 1128 1129 1130 pjax.swapMenuClass() 1131 pjax.swapWPAdminbar() 1132 pjax.swapLanguageLink() 1133 1134 1135 pjax.cleanHtml() 1136 // pjax.activateSlider() 1137 // pjax.activateEsgGrid() 1138 pjax.updateState() 1139 if (IRON.state.menu.menu_type == 'classic-menu') { 1140 calculateTopPadding('pjax'); 1141 IRON.setupMenu() 1142 } 1143 1144 pjax.swapLogo(); 1145 IRON.initFreeWall(); 1146 IRON.initPopups(); 1147 IRON.initInputs(); 1148 IRON.initFitVids(); 1149 IRON.initVideoLinks();
1150 IRON.initDropDownClasses(); 1151 IRON.initAjaxBlocksLoad(); 1152 IRON.initLightbox(); 1153 IRON.initFacebookLikebox(); 1154 IRON.initTwitter(); 1155 // IRON.initSideMenu(); 1156 1157 if (iron_vars.header_top_menu_hide_on_scroll == 1) 1158 IRON.initTopMenu(); 1159 1160 IRON.initCircleCentering(); 1161 IRON.initGridDisplayPhoto(); 1162 IRON.initGridDisplayAlbum(); 1163 IRON.initGridDisplayNews(); 1164 IRON.initGridDisplayVideo(); 1165 1166 if (!isMobile && !isiPad) 1167 IRON.initPusherHeight(); 1168 1169 IRON.initEventCenter(); 1170 IRON.initTwitterCenter(); 1171 IRON.initHeadsetCenter(); 1172 IRON.initIOSCenter(); 1173 IRON.initSubmenuPosition(); 1174 IRON.initSingleDisco(); 1175 IRON.initNewsletterLabel(); 1176 // IRON.initScrollToSection(); 1177 IRON.initParallax(); 1178 IRON.initDisableHovers(); 1179 IRON.initVcAnimations(); 1180 IRON.initIsotope(); 1181 IRON.initWooImageBack(); 1182 IRON.initWpAdminBar(); 1183 IRON.initSocialShare(); 1184 1185 if (IRON.state.menu.menu_type == 'classic-menu') { 1186 $(window).on('resize', responsiveMenu); 1187 } 1188 1189 }); 1190 1191 1192 }, 1193 1194 AjaxPagePass: function () { 1195 var pjax = this; 1196 if ($(pjax.newDocument).find('body.woocommerce').length) { 1197 window.location.reload() 1198 return false; 1199 } else { 1200 return true; 1201 } 1202 }, 1203 swapMenuClass: function () { 1204 var pjax = this; 1205 $('#menu-main-menu li').removeClass('current-menu-ancestor current-menu-parent current-menu-item current_page_item') 1206 1207 $('#' + $(pjax.newDocument).find('#menu-main-menu li.current-menu-ancestor').attr('id')).addClass('current-menu-ancestor') 1208 $('#' + $(pjax.newDocument).find('#menu-main-menu li.current-menu-parent').attr('id')).addClass('current-menu-parent') 1209 $('#' + $(pjax.newDocument).find('#menu-main-menu li.current-menu-item').attr('id')).find('a:not([href*="#"])').parent('li').addClass('current-menu-item') 1210 $('#' + $(pjax.newDocument).find('#menu-main-menu li.current_page_item').attr('id')).addClass('current_page_item') 1211 }, 1212 swapLogo: function () { 1213 if (IRON.state.logo.use_alternative_logo == true) { 1214 var logo_url = IRON.state.logo.logo_page_url 1215 var retina_logo_url = IRON.state.logo.logo_page_retina_url 1216 } else { 1217 var logo_url = IRON.state.logo.logo_url 1218 var retina_logo_url = IRON.state.logo.retina_logo_url 1219 } 1220 $('.site-logo img').attr('src', logo_url); 1221 $('.site-logo img').attr('srcset', logo_url + ' 1x, ' + retina_logo_url + ' 2x'); 1222 }, 1223 swapLanguageLink: function () { 1224 var pjax = this; 1225 1226 if ($(pjax.newDocument).find('.languages-selector').length) { 1227 var langContent = $(pjax.newDocument).find('.languages-selector').html() 1228 $(pjax.oldDocument).find('.languages-selector').html(langContent) 1229 } 1230 }, 1231 1232 updateState: function () { 1233 var pjax = this; 1234 1235 var pjax_iron_vars = $(pjax.newDocument).find('script[src*="croma/js/main.js"]').prev('script').text(); 1236 var pos1 = pjax_iron_vars.indexOf('{'); 1237 var pos2 = pjax_iron_vars.lastIndexOf('}') - pjax_iron_vars.length + 1; 1238 1239 if (pjax_iron_vars.length > 0) { 1240 pjax_iron_vars = JSON.parse(pjax_iron_vars.slice(pos1, pos2)); 1241 for (var prop in pjax_iron_vars) { 1242 IRON.state[prop] = pjax_iron_vars[prop]; 1243 } 1244 } 1245 1246 1247 }, 1248 1249 HideShowTransition: function () { 1250 var pjax = this; 1251 var overlay = $('#overlay .perspective'); 1252 var transition = Barba.BaseTransition.extend({ 1253 start: function () { 1254 Promise 1255 .all([this.newContainerLoading, this.fadeOut()]) 1256 .then(this.fadeIn.bind(this)) 1257 }, 1258 1259 fadeOut: function () { 1260 var _this = this; 1261 1262 $('html, body').animate({ 1263 scrollTop: 0 1264 }, 800); 1265 1266 if ($('.side-menu').hasClass('open')) { 1267 $('.side-menu .menu-toggle-off').trigger('click') 1268 } 1269 // $('#pusher').removeAttr('style') 1270 var fadeOut = anime({ 1271 targets: [this.oldContainer, '#overlay .perspective'], 1272 opacity: 0, 1273 // scale:0.9, 1274 easing: 'easeOutExpo', 1275 duration: 1000 1276 }) 1277 return fadeOut.finished; 1278 }, 1279 1280 1281 fadeIn: function () { 1282 var _this = this; 1283 var $el = $(this.newContainer); 1284 // pjax.AjaxPagePass(); 1285 if (pjax.AjaxPagePass()) { 1286 1287 pjax.swapBodyClass(); 1288 $(this.oldContainer).hide(); 1289 pjax.customCss(); 1290 $el.css({ 1291 visibility: 'visible', 1292 opacity: 0 1293 }); 1294 1295 var fadeIn = anime({ 1296 targets: [this.newContainer, '#overlay .perspective'], 1297 opacity: 1, 1298 // scale:1, 1299 easing: 'easeOutExpo', 1300 duration: 1000, 1301 }) 1302 return fadeIn.finished.then(_this.done()) 1303 1304 } 1305 } 1306 }); 1307 1308 return transition; 1309 1310 }, 1311 customCss: function () { 1312 var pjax = this; 1313 var oldStyleSheet = $(pjax.oldDocument).find('link[rel="stylesheet"]') 1314 var newStyleSheet = $(pjax.newDocument).find('link[rel="stylesheet"]') 1315 1316 1317 $(pjax.oldDocument).find('style[data-type*="vc"]').remove() 1318 $(pjax.newDocument).find('style[data-type*="vc"]').appendTo('head') 1319 $(pjax.oldDocument).find('#iron-custom-styles-inline-css').remove() 1320 $(pjax.newDocument).find('#iron-custom-styles-inline-css').appendTo('head') 1321 1322 oldStyleSheet.each(function (index, element) { 1323 if (!$(pjax.newDocument).find('link[id="' + $(this).attr('id') + '"]').length) { 1324 $(this).remove() 1325 } 1326 }) 1327 1328 newStyleSheet.each(function (index, element) { 1329 if (!$(pjax.oldDocument).find('link[id="' + $(this).attr('id') + '"]').length) { 1330 $(this).appendTo('body') 1331 } 1332 }) 1333 1334 var customStyle = $(pjax.oldDocument).find('#custom-styles-inline-css') 1335 var newStyle = $(pjax.newDocument).find('#custom-styles-inline-css') 1336 1337 1338 customStyle.remove() 1339 newStyle.appendTo('head') 1340 1341 1342 1343 }, 1344 1345 swapWPAdminbar: function () { 1346 var pjax = this; 1347 var newBar = $(pjax.newDocument).find('#wpadminbar') 1348 $('#wpadminbar').html(newBar.html()) 1349 1350 }, 1351 customJs: function () { 1352 var pjax = this; 1353 1354 function loadInline() { 1355 $('script').not('[type="text/json"]').each(function () { 1356 var text = $(this).text() 1357 if (text == '') 1358 return 1359 1360 if (text.substring(7, 12) == 'CDATA') { 1361 try { 1362 eval(text.substring(16, text.length - 10)); 1363 return true; 1364 } catch (error) { 1365 console.error(error); 1366 } 1367 } else { 1368 try { 1369 eval(text); 1370 } catch (error) { 1371 console.error(error); 1372 } 1373 } 1374 1375 }) 1376 } 1377 1378 1379 var newScript = $(pjax.newDocument).find('head script[src], #pusher-wrap ~ script[src]'); 1380 1381 var DocumentScript = $(pjax.newDocument).find('#pusher-wrap script[src]'); 1382 var loadScript = []; 1383 1384 newScript.each(function () { 1385 var script = $(this).attr('src'); 1386 1387 var found = IRON.libraries.find(function (element) { 1388 return element == script; 1389 }) 1390 1391 if (typeof found == "undefined") { 1392 loadScript.push($(this).attr('src')) 1393 } 1394 }) 1395 DocumentScript.each(function () { 1396 loadScript.push($(this).attr('src')) 1397 }) 1398 1399 if (loadScript.length) { 1400 $.ajaxSetup({ async: false }); 1401 1402 for (var i = 0; i < loadScript.length; i++) { 1403 $.getScript(loadScript[i], function () { 1404 if (i == loadScript.length - 1) { 1405 loadInline() 1406 } 1407 }) 1408 } 1409 $.ajaxSetup({ async: true }); 1410 } else { 1411 loadInline(); 1412 } 1413 1414 1415 }, 1416 1417 cleanHtml: function () { 1418 var pjax = this; 1419 $(pjax.oldDocument).find('.esgbox-overlay, .esgbox-wrap').remove() 1420 }, 1421 swapBodyClass: function () { 1422 var pjax = this; 1423 var newClass = $(pjax.newDocument).find('body').attr('class'); 1424 $('.vc_row.wpb_row.vc_row-fluid.in_container').has('.rev_slider_wrapper.fullscreen-container, .rev_slider_wrapper.fullwidthbanner-container').removeClass('in_container').addClass('full_width'); 1425 $('body').attr('class', newClass); 1426 $('body').addClass('pjax'); 1427 1428 1429 1430 if ($('.continuousPlayer').hasClass('enable')) { 1431 $('body').addClass('continuousPlayer-enable'); 1432 } 1433 }, 1434 activateEsgGrid: function () { 1435 $('.esg-grid').parents('.wpb_wrapper').find('script').each(function () { 1436 eval($(this).text()) 1437 }) 1438 }, 1439 wooCommerce: function () { 1440 $('.product.has-default-attributes.has-children>.images').css('opacity', 1) 1441 }, 1442 1443 ironAudioPlayer: function () { 1444 $('.iron-audioplayer').each(function () { 1445 var player = Object.create(IRON.audioPlayer); 1446 player.init($(this)); 1447 }) 1448 if ($('.artist_player').length) { 1449 IRON.artistPlayer.setPlayer() 1450 } 1451 1452 if (elementAudio.src && elementAudio.played.length) { 1453 IRON.initPusherHeight() 1454 $('.continuousPlayer').addClass('enable') 1455 $('body').addClass('continuousPlayer-enable') 1456 if (IRON.continuousPlayer.wavesurfer.isPlaying()) { 1457 IRON.continuousPlayer.play() 1458 IRON.continuousPlayer.play() 1459 } 1460 } 1461 } 1462 1463 1464 1465 } 1466 1467 1468 1469 /* PUSHER FORCED HEIGHT */ 1470 IRON.initPusherHeight = function () { 1471 return 1472 }; 1473 1474 /* RESET PUSHER HEIGHT */ 1475 IRON.resetPusherHeight = function () { 1476 return 1477 }; 1478 1479 /* EVENT WIDGET CENTERING */ 1480 IRON.initEventCenter = function () { 1481 if (jQuery(window).width() >= 767) { 1482 jQuery(".event-text-wrap, .event-text-wrap-single").each(function () { 1483 var halfheight = (jQuery(this).height()) / 2; 1484 jQuery(this).css('margin-top', (-halfheight)); 1485 }); 1486 } else { 1487 jQuery(".event-text-wrap").css('margin-top', 0); 1488 } 1489 1490 jQuery(window).resize(function () { 1491 if (jQuery(window).width() >= 767) { 1492 jQuery(".event-text-wrap, .event-text-wrap-single").each(function () { 1493 var halfheight = (jQuery(this).height()) / 2; 1494 jQuery(this).css('margin-top', (-halfheight)); 1495 }); 1496 } else { 1497 jQuery(".event-text-wrap").css('margin-top', 0); 1498 } 1499 }); 1500 1501 jQuery('.title-row').mouseenter(function () { 1502 if (jQuery(window).width() >= 767) { 1503 jQuery(".event-text-wrap.btn").each(function () { 1504 var halfheight = (jQuery(this).height()) / 2; 1505 jQuery(this).css('margin-top', (-halfheight)); 1506 }); 1507 } else { 1508 jQuery(".event-text-wrap.btn").css('margin-top', 0); 1509 } 1510 }); 1511 }; 1512 1513 /* TWITTER WIDGET CENTERING */ 1514 IRON.initTwitterCenter = function () { 1515 jQuery(".twitter-center").each(function () { 1516 var halfheight = (jQuery(this).height()) / 2; 1517 jQuery(this).css('margin-top', (-halfheight)); 1518 }); 1519 jQuery(window).resize(function () { 1520 jQuery(".twitter-center").each(function () { 1521 var halfheight = (jQuery(this).height()) / 2; 1522 jQuery(this).css('margin-top', (-halfheight)); 1523 }); 1524 }); 1525 }; 1526 1527 /* HEADSET ICON CENTERING */ 1528 IRON.initHeadsetCenter = function () { 1529 jQuery(".album-listen").each(function () { 1530 var halfheight = (jQuery(this).height()) / 2; 1531 jQuery(this).css('margin-top', (-halfheight)); 1532 }); 1533 jQuery(window).resize(function () { 1534 jQuery(".album-listen").each(function () { 1535 var halfheight = (jQuery(this).height()) / 2; 1536 jQuery(this).css('margin-top', (-halfheight)); 1537 }); 1538 }); 1539 }; 1540 1541 /* IOS SLIDER TEXT CENTERING */ 1542 IRON.initIOSCenter = function () { 1543 jQuery(".iosSlider .slider .item .inner a").each(function () { 1544 var halfheight = (jQuery(this).height()) / 2; 1545 jQuery(this).css('margin-top', (-halfheight)); 1546 }); 1547 jQuery(window).resize(function () { 1548 jQuery(".album-listen").each(function () { 1549 var halfheight = (jQuery(this).height()) / 2; 1550 jQuery(this).css('margin-top', (-halfheight)); 1551 }); 1552 }); 1553 }; 1554 1555 IRON.initCountdownLang = function () { 1556 1557 if (iron_vars.lang) 1558 $.countdown.setDefaults($.countdown.regionalOptions[iron_vars.lang]); 1559 1560 }; 1561 1562 /* COUNTDOWNS CENTERING */ 1563 IRON.initCountdownCenter = function () { 1564 jQuery(".countdown-wrap,.event-centering").each(function () { 1565 var halfheight = (jQuery(this).height()) / 2; 1566 jQuery(this).css('margin-top', (-halfheight)); 1567 }); 1568 jQuery(window).resize(function () { 1569 jQuery(".countdown-wrap,.event-centering").each(function () { 1570 var halfheight = (jQuery(this).height()) / 2; 1571 jQuery(this).css('margin-top', (-halfheight)); 1572 }); 1573 }); 1574 1575 /* New Type */ 1576 jQuery(".event-line-countdown-wrap .countdown-block").each(function () { 1577 var halfheight = (jQuery(this).height()) / 2; 1578 jQuery(this).css('margin-top', (-halfheight)); 1579 }); 1580 jQuery(window).resize(function () { 1581 jQuery(".event-line-countdown-wrap .countdown-block").each(function () { 1582 var halfheight = (jQuery(this).height()) / 2; 1583 jQuery(this).css('margin-top', (-halfheight)); 1584 }); 1585 }); 1586 1587 }; 1588 1589 /* MENU HIERARCHY */ 1590 IRON.initMenuHierarchy = function () { 1591 var menulevel = 0; 1592 jQuery(".menu-item").each(function () { 1593 if (jQuery(this).has("ul").length) { 1594 jQuery(this).children(".has-drop-down-a").append("<div class='sub-
1594arrow'><i class='fas fa fa-angle-right'></i></div>"); 1595 } 1596 }); 1597 jQuery(".has-drop-down-a").click(function (event) { 1598 event.preventDefault(); 1599 menulevel = menulevel + 1; 1600 jQuery(this).parent('li').parent('ul').children('li').each(function () { 1601 jQuery(this).children('a').css('opacity', '0'); 1602 jQuery(this).children('a').css('pointer-events', 'none'); 1603 if (menulevel > 0) { 1604 jQuery('.panel-networks').css('opacity', '0'); 1605 jQuery('.panel-networks').css('pointer-events', 'none'); 1606 } 1607 }); 1608 jQuery(this).next('ul').addClass('active'); 1609 }); 1610 jQuery(".backlist").click(function (event) { 1611 event.preventDefault(); 1612 menulevel = menulevel - 1; 1613 jQuery(this).parent('ul.sub-menu').parent('li').parent('ul').children('li').each(function () { 1614 jQuery(this).children('a').css('opacity', '1'); 1615 jQuery(this).children('a').css('pointer-events', 'auto'); 1616 if (menulevel === 0) { 1617 jQuery('.panel-networks').css('opacity', '1'); 1618 jQuery('.panel-networks').css('pointer-events', 'auto'); 1619 } 1620 }); 1621 jQuery(this).parent("ul").removeClass('active'); 1622 }); 1623 }; 1624 1625 /* SUB-MENU DYNAMIC POSITIONING */ 1626 IRON.initSubmenuPosition = function () { 1627 function sidemenuoffset() { 1628 var menuoffset = jQuery('.nav-menu').offset(); 1629 jQuery('.sub-menu').css('top', menuoffset); 1630 } 1631 jQuery(window).resize(function () { 1632 sidemenuoffset(); 1633 }); 1634 sidemenuoffset(); 1635 }; 1636 1637 /* LARGE SINGLE DISCOGRAPHY */ 1638 IRON.initSingleDisco = function () { 1639 var discocount = $('.two_column_album .media-block').length; 1640 if (discocount == 1) { 1641 $('.two_column_album .media-block').addClass('single'); 1642 } 1643 }; 1644 1645 /* NEWSLETTER LABEL TRANSFORM */ 1646 IRON.initNewsletterLabel = function () { 1647 jQuery(".nm_mc_input").each(function () { 1648 var thelabel = $(this).prev("label").text(); 1649 $(this).attr('placeholder', thelabel); 1650 }); 1651 $(".nm_mc_form label").css('display', 'none'); 1652 }; 1653 1654 /* DISABLE HOVERS ON MOBILE */ 1655 IRON.initDisableHovers = function () { 1656 $(document).ready(function () { 1657 1658 if (isMobile === true || isiPad === true) { 1659 jQuery('.countdown-wrap').css('display', 'none'); 1660 jQuery('.button-wrap').css('display', 'none'); 1661 jQuery('.buttons').removeClass('no-touchevents'); 1662 jQuery('html').removeClass('no-touchevents'); 1663 } 1664 }); 1665 }; 1666 1667 /* ISOTOPE NEWS GRID */ 1668 IRON.initIsotope = function () { 1669 var grid = document.querySelector('.isotope-wrap'); 1670 if ($(grid).length) { 1671 var iso = new Isotope(grid, { 1672 // options... 1673 itemSelector: '.isotope-item', 1674 masonry: { 1675 isFitWidth: true 1676 } 1677 }); 1678 } 1679 }; 1680 1681 IRON.initParallax = function () { 1682 setTimeout(function () { 1683 $("div.wpb_row.parallax").each(function () { 1684 var bgimage = $(this).css('background-image'); 1685 if (bgimage && bgimage !== '' && bgimage !== 'none') { 1686 if (!(/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent))) { 1687 $(this).parallax("50%", 0.4, false); 1688 $('.parallax, .page-banner-bg').addClass('enabled'); 1689 } 1690 // Parallax Fix for Mobile Devices 1691 if (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)) { 1692 //$(this).css({'background-attachment': 'scroll'}); 1693 $('.parallax').addClass('disabled'); 1694 } 1695 } 1696 }); 1697 }, 1000); 1698 1699 }; 1700 1701 IRON.initBackToTop = function () { 1702 1703 $('#back-to-top, #back-to-top-mobile').on('click', function (e) { 1704 1705 e.preventDefault(); 1706 1707 $('html, body').animate({ 1708 scrollTop: 0 1709 }, 800); 1710 }); 1711 }; 1712 1713 IRON.initScrollToSection = function () { 1714 1715 var animating = false; 1716 // Iterate over all nav links, setting the "selected" class as-appropriate. 1717 1718 $(document).on('click', 'a[href*="#"]:not([data-vc-tabs]):not(.sandwich-icon):not([data-slide])', function (e) { 1719 1720 var target = $(this).attr('href'); 1721 1722 if (target.charAt(0) != '#') { 1723 target = target.split('#'); 1724 target = '#' + target[1]; 1725 } 1726 var $target = $(target); 1727 if ($(target).hasClass('vc_tta-panel')) 1728 // e.preventDefault() 1729 return 1730 1731 if ($(this).parents('.comment-navigation').length) { 1732 return true; 1733 } 1734 1735 1736 if (animating || $(this).hasClass('ui-tabs-anchor')) 1737 return false;
1738 1739 1740 1741 if ($(target).length > 0) { 1742 e.preventDefault(); 1743 animating = true; 1744 1745 var menu_open = $('.side-menu').hasClass('open'); 1746 var timeout = 10; 1747 1748 if (menu_open) { 1749 $('.side-menu.open .menu-toggle-off').click(); 1750 timeout = 400; 1751 } 1752 1753 setTimeout(function () { 1754 1755 var top = $(target).position().top; 1756 1757 animating = true; 1758 $('html, body').animate({ 1759 scrollTop: top 1760 }, 800, function () { 1761 1762 animating = false; 1763 }); 1764 1765 }, timeout); 1766 1767 } 1768 1769 }); 1770 1771 }; 1772 1773 IRON.initVcAnimations = function () { 1774 1775 if (navigator.userAgent.match(/iPhone|iPad|iPod/i)) 1776 jQuery('.wpb_animate_when_almost_visible').removeClass('wpb_animate_when_almost_visible'); 1777 1778 var single_album = $('body').hasClass('single-photo-album'); 1779 1780 1781 }; 1782 1783 IRON.initWooImageBack = function () { 1784 $('.attachment-shop_catalog').each(function () { 1785 $(this).wrap('<div class="tint"></div>'); 1786 }); 1787 }; 1788 1789 1790 IRON.initCustomJS = function () { 1791 // debugger 1792 jQuery('.event-no-redirect a.event-link').on('click', function (e) { 1793 e.preventDefault(); 1794 return false 1795 }) 1796 if (iron_vars.custom_js !== '') { 1797 // debugger 1798 eval(iron_vars.custom_js); 1799 } 1800 1801 }; 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 $(document).ready(function () { 1813 1814 $(window).resize(); 1815 setTimeout(function () { 1816 $(window).resize(); 1817 jQuery('header').animate({ 'opacity': 1 }); 1818 }, 1000); 1819 1820 1821 $('.vc_row.wpb_row.vc_row-fluid.in_container').has('.rev_slider_wrapper.fullscreen-container, .rev_slider_wrapper.fullwidthbanner-container').removeClass('in_container').addClass('full_width'); 1822 1823 1824 $('.button-widget').each(function () { 1825 var initialcolor = $(this).css('color'); 1826 var initialbg = $(this).css('background-color'); 1827 var initialborder = $(this).css('border-top-color'); 1828 1829 $(this).mouseover(function () { 1830 var bghovercolor = $(this).attr('data-hoverbg'); 1831 var texthovercolor = $(this).attr('data-hovertext'); 1832 var borderhovercolor = $(this).attr('data-hoverborder'); 1833 $(this).css('border-color', borderhovercolor); 1834 $(this).css('background-color', bghovercolor); 1835 $(this).css('color', texthovercolor); 1836 }); 1837 $(this).mouseout(function () { 1838 $(this).css('border-color', initialborder); 1839 $(this).css('background-color', initialbg); 1840 $(this).css('color', initialcolor); 1841 }); 1842 }); 1843 }); 1844 1845 /* Portfolio Button Hover */ 1846 $(document).ready(function () { 1847 $('.portfolio-button').each(function () { 1848 var initialcolor = $(this).css('color'); 1849 var initialbg = $(this).css('background-color'); 1850 var initialborder = $(this).css('border-top-color'); 1851 1852 $(this).mouseover(function () { 1853 $(this).css('background-color', initialborder); 1854 $(this).css('color', '#FFF'); 1855 }); 1856 $(this).mouseout(function () { 1857 $(this).css('background-color', initialbg); 1858 $(this).css('color', initialcolor); 1859 }); 1860 }); 1861 }); 1862 1863 /* Fit Text - Auto-Resize page titles */ 1864 $(document).ready(function () { 1865 /*$('.page-title h1, h1.page-title').fitText(1.2,{maxFontSize:'60px'});*/ 1866 $('.fittext h1, .fittext h2, .fittext h3, .fittext h4, .fittext h5, .fittext h6').fitText(1.2, { maxFontSize: '85px' }); 1867 }); 1868 1869 /* SUB-MENU ARROW CENTERING */ 1870 $(document).ready(function () { 1871 jQuery(".sub-arrow i").each(function () { 1872 var halfheight = (jQuery(this).height()) / 2; 1873 jQuery(this).css('margin-top', (-halfheight)); 1874 }); 1875 jQuery(window).resize(function () { 1876 jQuery(".sub-arrow i").each(function () { 1877 var halfheight = (jQuery(this).height()) / 2; 1878 jQuery(this).css('margin-top', (-halfheight)); 1879 }); 1880 }); 1881 }); 1882 1883 /* Remove link on ancestor item from responsive menu */ 1884 $(document).ready(function () { 1885 if ($('.responsive-header').length || $('.side-menu').length) { 1886 $('.menu-item-has-children>a').attr('href', '#'); 1887 } 1888 }); 1889 1890 /* FOOTER TEXT CENTERING */ 1891 $(document).ready(function () { 1892 function footertext() { 1893 var footerheight = $('.footer-wrapper').height(); 1894 $(".footer-wrapper .text").each(function () { 1895 var footertextheight = $(this).height(); 1896 var centeredtext = (footerheight / 2) - (footertextheight / 2); 1897 $(this).css('top', centeredtext); 1898 }); 1899 } 1900 footertext(); 1901 $(window).resize(function () { 1902 footertext(); 1903 }); 1904 }); 1905 1906 1907 /* BACKTOTOP BUTTON */ 1908 $(document).ready(function () { 1909 var wrapper = document.getElementById("wrapper") 1910 var offsetNeg = $(wrapper).height() / 2 1911 waypoints = new Waypoint({ 1912 element: wrapper, 1913 handler: function (direction) { 1914 if (direction == 'down') { 1915 $('.footer-wrapper-backtotop').addClass('active'); 1916 } else if (direction == 'up') { 1917 $('.footer-wrapper-backtotop').removeClass('active'); 1918 } 1919 }, 1920 offset: '-' + offsetNeg + 'px', 1921 }) 1922 }); 1923 1924 /* MENU correction*/ 1925 $(document).ready(function () { 1926 $('.menu-item-language').first().css("display", "none"); 1927 $('.current-menu-item').find('[href*="#"]').parent('.current-menu-item').removeClass('current-menu-item'); 1928 }); 1929 1930 /* Force Width of pagination */ 1931 $(document).ready(function () { 1932 $('.pages').width($('#post-list').width()); 1933 $(window).resize(function () { 1934 $('.pages').width($('#post-list').width()); 1935 }); 1936 setTimeout(function () { 1937 if ($('.isotope-wrap').length) { 1938 $('.pages .alignleft').css('margin-left', '7.5px'); 1939 $('.pages .alignright').css('margin-right', '7.5px'); 1940 } 1941 }, 500); 1942 }); 1943 1944 1945 jQuery(window).on('load', function () { 1946 jQuery('header').animate({ 'opacity': 1 }); 1947 }); 1948 1949 1950})(jQuery); 1951
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.