PageSourceSearch

https://isham.com/wp-content/themes/lush/js/main.js?t=1442859001&ver=1790289434

js isham.com collected 2026-09-24 22:39:16 UTC 38,597 bytes, 1,347 lines download raw bytes

1
2var iron_vars = window.iron_vars || {}
3, IRON = window.IRON || {};
4
5var AudioPlaylists = [];
6
7var isiPad = /ipad/i.test(navigator.userAgent.toLowerCase());
8var isMobile = jQuery.browser.mobile;
9
10(function($) {
11    "use strict";
12
13    IRON.$ = window.IRON.$ || {};
14
15    IRON.XHR = {
16        settings: {
17            url: iron_vars.ajaxurl
18            , type: 'POST'
19        }
20    };
21
22    var jcf = window.jcf || {};
23    var DocumentTouch = window.DocumentTouch || {};
24    var ResponsiveHelper = window.ResponsiveHelper || {};
25    var jPlayerPlaylist = window.jPlayerPlaylist || {};
26    var PlaceholderInput = window.PlaceholderInput || {};
27    var TouchNav = window.TouchNav || {};
28    var lib = window.lib || {};
29
30    // page init
31    jQuery(function() {
32
33        IRON.initFreeWall();
34        IRON.initPopups();
35        IRON.initInputs();
36        IRON.initFitVids();
37        IRON.initDropDownClasses();
38        IRON.initPlayer();
39        IRON.initAjaxBlocksLoad();
40        IRON.initLightbox();
41        IRON.initFacebookLikebox();
42        IRON.initTwitter();
43		IRON.initSideMenu();
44		
45		if(iron_vars.header_logo_hide_on_scroll == 1)
46			IRON.initHeaderLogo();
47			
48		if(iron_vars.header_top_menu_hide_on_scroll == 1)
49			IRON.initTopMenu();	
50			
51		IRON.initCircleCentering();
52		IRON.initGridDisplayPhoto();
53		IRON.initGridDisplayAlbum();
54		IRON.initGridDisplayNews();
55		IRON.initGridDisplayVideo();
56		
57		if(!isMobile && !isiPad)
58			IRON.initPusherHeight();
59			
60		IRON.initEventCenter();
61		IRON.initTwitterCenter();
62		IRON.initHeadsetCenter();
63		IRON.initIOSCenter();
64		IRON.initCountdownLang();
65		IRON.initCountdownCenter();
66		IRON.initMenuHierarchy();
67		IRON.initSubmenuPosition();
68		IRON.initSingleDisco();
69		IRON.initNewsletterLabel();
70		IRON.initBackToTop();
71		IRON.initScrollToSection();
72        IRON.initParallax();
73		IRON.initDisableHovers();
74		IRON.initVcAnimations();
75		IRON.initIsotope();
76		IRON.initWooImageBack();
77		
78		setTimeout(function() {
79			IRON.setTracksBuyButtons();
80		}, 3000)
81		
82
83        if (iron_vars.enable_fixed_header)
84            IRON.initFixedBar();
85
86        if (iron_vars.enable_nice_scroll)
87            IRON.initNiceScroll();
88
89
90		IRON.initCustomJS();	
91
92
93        /* Fancybox overlay fix */
94        // detect device type
95        var isTouchDevice = (function() {
96            try {
97                return ('ontouchstart' in window) || window.DocumentTouch && document instanceof DocumentTouch;
98            } catch (e) {
99                return false;
100            }
101        }());
102
103        // fix options
104        var supportPositionFixed = !((jQuery.browser.msie && jQuery.browser.version < 8) || isTouchDevice);
105        var overlaySelector = '#fancybox-overlay';
106
107        if (supportPositionFixed) {
108            // create <style> rules
109            var head = document.getElementsByTagName('head')[0],
110                    style = document.createElement('style'),
111                    rules = document.createTextNode(overlaySelector + '{' +
112                            'position:fixed;' +
113                            'top:0;' +
114                            'left:0;' +
115                            '}');
116
117            // append style element
118            style.type = 'text/css';
119            if (style.styleSheet) {
120                style.styleSheet.cssText = rules.nodeValue;
121            } else {
122                style.appendChild(rules);
123            }
124            head.appendChild(style);
125        }
126    });
127
128    jQuery(window).load(function() {
129        setTimeout(function() {
130            IRON.initSameHeight();
131            jQuery(window).trigger('resize');
132        }, 200);
133    });
134
135    IRON.pagination = {
136        XHR: {}
137        , $: {}
138        , loadingClass: 'ajax-load'
139        , ajaxBusy: false
140        , isotope: false
141    };
142
143    IRON.pagination.XHR = {
144        done: function(response, status, xhr) { // success : data, status, xhr
145
146            var IB = IRON.pagination;
147
148            if (response)
149            {
150            
151            	if(IB.isotope) {
152	            	var $newItems = $(response);
153					IB.$.container.append( $newItems ).isotope( 'addItems', $newItems ).isotope( 'reLayout' );
154					IB.$.container.fadeIn();
155            	}else{
156                	IB.$.container.append(response).fadeIn();
157				}
158				
159				var newMoreButton = IB.$.container.find('.button-more');
160				if(newMoreButton.length > 0) {
161					IB.$.loadButton.replaceWith(newMoreButton[0].outerHTML );
162					newMoreButton.remove();
163					IB.$.loadButton = $('.button-more');
164					
165				}else{
166					IB.$.loadButton.remove();
167				}
168
169
170                IB.ajaxBusy = false;
171
172                //IRON.initTouchNav();
173
174                var callbacks = IB.$.loadButton.data('callback');
175                if (callbacks) {
176                    callbacks = callbacks.split(',');
177
178                    for (var i = 0; i < callbacks.length; i++)
179                    {
180                        var callback = IRON[callbacks[i]];
181
182                        if (typeof callback === 'function') {
183                            callback();
184                        }
185                    }
186                }
187
188                if (IB.method == 'paginate_scroll') {
189
190                    $('#pusher').on('scroll', function(event) {
191                        if (!IB.ajaxBusy) {
192                            var $win = $(this)
193                                    , $doc = $(document)
194                                    , $foot = $('body > footer');
195
196                            if ($win.scrollTop() >= ($doc.height() - $win.height() - ($foot.height()))) {
197                                IB.$.loadButton.click();
198                            }
199                        }
200                    });
201
202                } else {
203                    IB.$.loadButton.css('visibility', 'visible').fadeIn();
204                }
205                
206                IRON.initAjaxBlocksLoadEvent();
207
208            } else {
209
210                IB.$.loadButton.remove();
211                IB.XHR.fail(xhr, 'error', 404);
212            }
213        }
214        , fail: function(xhr, status, error) { // error : xhr, status, error
215
216            var IB = IRON.pagination;
217
218            setTimeout(function() {
219                alert(IB.$.loadButton.data('warning'));
220            }, 100);
221        }
222        , always: function() { // complete : data|xhr, status, xhr|error
223
224            var IB = IRON.pagination;
225            IB.$.loadButton.prop('disabled', false);
226
227            IB.$.container.removeClass(IB.loadingClass);
228
229            if (iron_vars.enable_nice_scroll && !jcf.isTouchDevice)
230                IRON.niceScroll.resize();
231        }
232        , before: function(xhr) {
233
234            var IB = IRON.pagination;
235            IB.$.loadButton.prop('disabled', true);
236        }
237    };
238
239
240    IRON.initFacebookLikebox = function() {
241        if ($('#fb-likebox').length === 0) {
242            return false;
243        }
244
245        var fb_app_id = $('#fb-likebox').data('appid');
246        var fb_page_url = $('#fb-likebox').data('pageurl');
247        fb_page_url = encodeURI(fb_page_url);
248
249        var iframe = '<iframe src="//www.facebook.com/plugins/likebox.php?href=' + fb_page_url + '&amp;width=200&amp;height=62&amp;show_faces=false&amp;colorscheme=dark&amp;stream=false&amp;border_color&amp;header=false&amp;appId=' + fb_app_id + '" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:200px; height:62px;" allowTransparency="true"></iframe>';
250
251        $('#fb-likebox').html(iframe);
252    }
253
254
255    IRON.initTwitter = function() {
256
257        $('.iron_widget_twitter .query').each(function() {
258
259            var $query = $(this);
260            var username = $(this).data('username');
261
262            $(function($) {
263                $query.tweet({
264                    modpath: iron_vars.theme_url + '/js/twitter/',
265                    join_text: 'auto',
266                    username: (username ? username : 'envato'),
267                    count: 1,
268                    auto_join_text_default: '',
269                    auto_join_text_ed: '',
270                    auto_join_text_ing: '',
271                    auto_join_text_reply: '',
272                    auto_join_text_url: '',
273                    loading_text: 'loading tweets...'
274                }).bind('loaded', function() {
275                    $(window).resize();
276                });
277            });
278
279        })
280    }
281
282    IRON.initNiceScroll = function() {
283        $(document).ready(function() {
284
285			if (isMobile == true || isiPad == true){
286				/* Listen to orientation changes and trigger resize */
287				window.addEventListener('orientationchange', function(){
288					$(window).resize();
289				});
290			} else {
291				IRON.niceScroll = $('#pusher').niceScroll();
292			};
293        });
294    }
295
296
297    IRON.initFixedBar = function() {
298
299        var top = 0;
300        $('#pusher').waypoint(function(direction) {
301            if (direction == 'down') {
302                $('#fixed-panel').animate({
303                    opacity: "1",
304                    top: top
305                }, 400);
306            } else if (direction == 'up') {
307                $('#fixed-panel').animate({
308                    opacity: "0",
309                    top: "-78"
310                }, 200);
311            }
312        }, {
313            offset: -1
314        });
315    }
316
317
318    IRON.initAjaxBlocksLoad = function() {
319
320        IRON.pagination.XHR.request = {
321            dataType: 'text',
322            data: {
323	            ajax: 1
324            },
325			beforeSend: IRON.pagination.XHR.before
326        };
327
328        IRON.pagination.XHR.request = $.extend(true, IRON.pagination.XHR.request, IRON.XHR.settings);
329		IRON.initAjaxBlocksLoadEvent(); 
330
331        $('a.button-more').trigger('click');
332
333    }
334    
335    IRON.initAjaxBlocksLoadEvent = function() {
336	    
337
338		$(document).off('click', 'a.button-more');
339        $(document).on('click', 'a.button-more', function(e) {
340            e.preventDefault();
341
342            var IB = IRON.pagination
343                    , $this = $(this);
344
345			IB.isotope = ($('.isotope-wrap').length > 0);
346			
347            if (IB.ajaxBusy)
348                return;
349
350            IB.$.loadButton = $this;
351            IB.$.container = $('#' + IB.$.loadButton.data('rel'));
352            IRON.pagination.XHR.request.url = IB.$.loadButton.attr('href');
353            IRON.XHR.settings.url = IB.$.loadButton.attr('href');
354
355            IB.method = $this.data('paginate');
356
357            $.ajax(IB.XHR.request)
358                    .done(IB.XHR.done)
359                    .fail(IB.XHR.fail)
360                    .always(IB.XHR.always);
361        });	    
362    }
363
364    // add classes if item has dropdown
365    IRON.initDropDownClasses = function() {
366        jQuery('.side-menu #nav li').each(function() {
367            var item = jQuery(this);
368            var drop = item.find('ul');
369            var link = item.find('a').eq(0);
370            if (drop.length) {
371                item.addClass('has-drop-down');
372                if (link.length) {
373                    link.addClass('has-drop-down-a');
374                }
375            }
376        });
377    }
378
379    IRON.initPlayer = function() {
380
381        jQuery('.player-holder').each(function(ind) {
382            var set = jQuery(this);
383            var dataUrl = set.attr('data-url-playlist');
384            var autoplay = set.attr('data-autoplay');
385            var posterImage = set.find('.poster-image');
386            var defURl = posterImage.attr('src');
387            var titleBox = set.find('.player-title-box');
388            var player = set.find('.jp-jplayer');
389            var playerBox = set.find('.player-box');
390            var uiPlayer = 'jplayer-custom-' + new Date().getMilliseconds() + ind;
391            var uiPlayerBox = 'jplayerBox-custom-' + new Date().getMilliseconds() + ind;
392            var Playlist = {};
393
394            player.attr('id', uiPlayer);
395            playerBox.attr('id', uiPlayerBox);
396
397            jQuery.ajax({
398                url: dataUrl,
399                type: 'get',
400                dataType: 'script',
401                success: function() {
402                    startPlayer(autoplay);
403                }
404            });
405
406            function startPlayer(autoplay) {
407                Playlist = new jPlayerPlaylist({
408                    jPlayer: '#' + uiPlayer,
409                    cssSelectorAncestor: '#' + uiPlayerBox
410                }, musicPlayList || [], {
411	                playlistOptions: {
412                    	loopOnPrevious: true,
413					},
414                    swfPath: iron_vars.theme_url + '/js/',
415                    supplied: 'mp3',
416                    wmode: 'window',
417                    ready: function() {
418                        refreshInfo();
419                        if(autoplay) {
420	                        playerBox.find('.jp-play').click();
421                        }
422                        $( '#' + uiPlayer).jPlayer("option", 'loop', true);
423                    },
424                    play: function() {
425                        refreshInfo();
426                        
427                    }
428                });
429                
430                AudioPlaylists.push(Playlist);
431
432
433            }
434
435            function refreshInfo() {
436                if (Playlist.original.length)
437                {
438                    if (Playlist.original[Playlist.current].poster) {
439                        posterImage.attr('src', Playlist.original[Playlist.current].poster);
440                    } else {
441                        posterImage.attr('src', defURl);
442                    }
443
444                    if (Playlist.original[Playlist.current].title) {
445                        titleBox.html(Playlist.original[Playlist.current].title);
446                    }
447                }
448            }
449        });
450        
451        $('.tracks-list li').on('click', function() {
452	       	$(this).find('a.jp-playlist-item').click(); 
453        });
454	
455    }
456    
457    
458    IRON.setTracksBuyButtons = function() {
459	    
460	    $('.iron_widget_radio.playlist_enabled .tracks-list').each(function() {
461	    
462	    	var tracklist = $(this);
463		    var placeholder = tracklist.closest('.player-holder');
464		    var buttons = placeholder.data('storebuttons');
465		    buttons = base64_decode(buttons);
466		    buttons = $.parseJSON(buttons);
467	
468		    for(var i = 0; i < buttons.length ; i++) {
469		    
470			    tracklist.find('li').eq(i).prepend(buttons[i]);
471			    tracklist.find('li').eq(i).find('.button').fadeIn();
472		    }
473	    
474	    });
475
476    }
477
478
479    // handle flexible video size
480    IRON.initFitVids = function() {
481        jQuery('.video-block').fitVids();
482    }
483
484    // popups init
485    IRON.initPopups = function() {
486        jQuery('.panel').contentPopup({
487            mode: 'click',
488            popup: '.nav-holder',
489            btnOpen: '.opener'
490        });
491    }
492
493    // clear inputs on focus
494    IRON.initInputs = function() {
495        PlaceholderInput.replaceByOptions({
496            // filter options
497            clearInputs: true,
498            clearTextareas: true,
499            clearPasswords: true,
500            skipClass: 'default',
501            // input options
502            wrapWithElement: false,
503            showUntilTyping: false,
504            getParentByClass: false,
505            placeholderAttr: 'value'
506        });
507    }
508
509    // align blocks height
510    IRON.initSameHeight = function() {
511        jQuery('.widget-area.grid-cols').sameHeight({
512            elements: '.widget'
513            , flexible: true
514            , multiLine: true
515        });
516    }
517
518
519    // fancybox modal popup init
520    IRON.initLightbox = function() {
521		var lightboxtransition = iron_vars.lightbox_transition;
522        jQuery('a.lightbox, a[rel*="lightbox"]').fancybox({
523            padding: 10,
524            cyclic: false,
525            overlayShow: true,
526            overlayOpacity: 0.65,
527            overlayColor: '#000000',
528            titlePosition: 'inside',
529			transitionIn: 'fade',
530			transitionOut: 'fade',
531			prevEffect : lightboxtransition,
532			nextEffect : lightboxtransition
533        });
534    }
535    
536    IRON.initFreeWall = function() {
537
538
539			$(".free-wall").each(function() {
540			
541				var single_album = $('body').hasClass('single-photo-album');
542				var layout = $(this).data('layout');
543				var height = parseInt($(this).data('height'));
544				
545				
546				if(single_album || layout == 'show_all') {
547
548					var wall = new freewall($(this));
549
550					var multiplier = 0.69;
551				
552					var original_height = $(this).height() * multiplier;
553					
554					wall.reset({
555						selector: '.brick',
556						gutterX: 1,
557						gutterY: 1,
558						animate:false,
559						onResize: function() {
560						
561							if(single_album)
562								original_height =  wall.container.height();
563								
564							wall.fitZone();
565							
566							if(!single_album)
567								wall.container.height(original_height);
568						}
569					});
570					if(single_album)
571						original_height = wall.container.height();
572								
573					// caculator width and height for IE7;
574					wall.fitWidth();
575					
576					if(!single_album)
577						wall.container.height(original_height);
578						
579					$(window).resize();
580					
581				}else{
582			
583					if(layout != 'window_height' && height != '' && height != 0) {
584						var gallery_height = height;
585					}else{
586						gallery_height = $(window).height();
587					}
588					
589					var wall = new freewall($(this));
590					wall.container.height(gallery_height);
591					wall.reset({
592						selector: '.brick',
593						animate: false,
594						cellW: 150,
595						cellH: 150,
596						gutterX: 1,
597						gutterY: 1,
598						delay: 30,
599						onResize: function() {
600							wall.refresh($(wall.container).width(), gallery_height);
601	
602						}
603					});
604		
605					// caculator width and height for IE7;
606					wall.fitZone($(wall.container).width(), gallery_height);
607					$(window).resize();
608				}
609			});
610		
611
612    }
613	
614	/* SIDE MENU */
615	IRON.initSideMenu = function() {
616		/* Variable pour changer si le menu affiche a gauche(lefttype) ou droite(righttype) */
617		var typeside = iron_vars.menu_position;
618		/* Variable pour changer l'animation du menu (type1,type2,type3) */
619		var typeclass = iron_vars.menu_transition;
620		jQuery('.site-logo,.menu-toggle,.side-menu,#pusher').addClass(typeside);
621		jQuery(".menu-toggle,.alt-menu-toggle").click(function(event) {
622			event.preventDefault();
623			var timeout = 1;
624			if(isMobile || isiPad) {
625				IRON.initPusherHeight();
626				timeout = 500;
627			}
628
629			setTimeout(function() {
630				if(typeclass == 'type1' || typeclass == 'type2'){
631					setTimeout(function() {
632						jQuery('#pusher').addClass(typeclass);
633					},50);
634					jQuery('.side-menu').addClass('open');
635					jQuery('#overlay').css('display', 'block');
636					jQuery('.menu-toggle').css('display', 'none');
637					jQuery('.site-logo').css('opacity', '0');
638					jQuery('.header-top-menu').fadeOut();
639				}else{
640					jQuery('#pusher').addClass(typeclass);
641					jQuery('.side-menu').addClass('open');
642					jQuery('#overlay').css('display', 'block');
643					jQuery('.menu-toggle').css('display', 'none');
644					jQuery('.site-logo').css('opacity', '0');
645					jQuery('.header-top-menu').fadeOut();
646				}
647			}, timeout);
648
649		});
650		jQuery("#overlay,.menu-toggle-off").click(function() {
651			if(typeclass == 'type1' || typeclass == 'type2'){
652				setTimeout(function() {
653					jQuery('.side-menu').removeClass('open');
654				},50);
655				jQuery('#pusher').removeClass(typeclass);
656				jQuery('.sub-menu').removeClass('active');
657				jQuery('#overlay').css('display', 'none');
658				jQuery('.menu-toggle').css('display', 'block');
659				jQuery('ul.nav-menu a').css('opacity','1');
660				jQuery('.panel-networks').css('opacity','1');
661				jQuery('.site-logo').css('opacity', '1');
662				jQuery('.nav-menu li a, ul.nav-menu ul a, .nav-menu ul ul a').css('pointer-events','auto');
663				jQuery('.header-top-menu').fadeIn();
664			}else{
665				jQuery('#pusher').removeClass(typeclass);
666				jQuery('.side-menu').removeClass('open');
667				jQuery('.sub-menu').removeClass('active');
668				jQuery('#overlay').css('display', 'none');
669				jQuery('.menu-toggle').css('display', 'block');
670				jQuery('ul.nav-menu a').css('opacity','1');
671				jQuery('.panel-networks').css('opacity','1');
672				jQuery('.site-logo').css('opacity', '1');
673				jQuery('.nav-menu li a, ul.nav-menu ul a, .nav-menu ul ul a').css('pointer-events','auto');
674				jQuery('.header-top-menu').fadeIn();
675			}
676			
677			if(isMobile || isiPad) {
678				setTimeout(function() {
679					IRON.resetPusherHeight();
680				}, 500);	
681			}	
682		});
683		jQuery('.side-menu').css('display','block');
684	}
685	
686	
687	IRON.initHeaderLogo = function() {
688		
689		$('#pusher').on('scroll', function() {
690		
691			if ($(this).scrollTop() >= 400) {
692			
693		       	jQuery('header .site-logo').stop().animate({
694					top: '-150px',
695				}, 250);
696		    }
697		    else {
698		    
699		       	jQuery('header .site-logo').stop().animate({
700					top: '40px',
701				}, 250);
702		    }
703
704		});
705			
706	}
707	
708	IRON.initTopMenu = function() {
709		
710		$('#pusher').on('scroll', function() {
711		
712			if ($(this).scrollTop() >= 400) {
713			
714		       	jQuery('.header-top-menu').stop().animate({
715					top: '-100px',
716					opacity:0
717				}, 600);
718		    }
719		    else {
720		    
721		       	jQuery('.header-top-menu').stop().animate({
722					top: '28px',
723					opacity: 1
724				}, 600);
725		    }
726
727		});
728			
729	}
730	
731	/* CIRCLE CENTERING */
732	IRON.initCircleCentering = function() {
733		jQuery(".centering, .circle .wpb_wrapper").each(function(){
734			var halfheight = (jQuery(this).height())/2;
735			jQuery(this).css('margin-top',(-halfheight));
736		});
737		
738		jQuery(window).resize(function(){
739			if(jQuery(window).innerWidth() < 660){
740				if(jQuery(".circle").length > 0){
741					jQuery(".circle").each(function(){
742						jQuery(this).closest(".wpb_column").css({
743							"float" : "none",
744							"margin-left" : "0",
745							"width" : "100%"
746						});
747					})
748				}
749			} else {
750				if(jQuery(".circle").length > 0){
751					jQuery(".circle").each(function(){
752						jQuery(this).closest(".wpb_column").removeAttr("style")
753					})
754				}
755			}
756		});
757	}
758	
759	/* PHOTO ALBUM GRID DISPLAY */
760	IRON.initGridDisplayPhoto = function() {
761		setTimeout(function() {
762		jQuery('.listing-section.photo').each(function(){
763			var leftColumnHeight = 0;
764			var rightColumnHeight = 0;
765			var $articles = jQuery(this).find('.photo-wrap');
766			for (var i = 0; i < $articles.length; i++) {
767				if (leftColumnHeight > rightColumnHeight) {
768					rightColumnHeight += $articles.eq(i).addClass('right').outerHeight(true);
769				} else {
770					leftColumnHeight += $articles.eq(i).outerHeight(true);
771				}
772			} 
773			jQuery(this).css('visibility','visible')
774		});
775		},250);
776		setTimeout(function() {
777			jQuery('.photo-wrap').css('opacity','1');
778		},250);
779	}
780	
781	/* MUSIC ALBUM GRID DISPLAY */
782	IRON.initGridDisplayAlbum = function() {
783		setTimeout(function() {
784		jQuery('.two_column_album').each(function(){
785			var leftColumnHeight = 0;
786			var rightColumnHeight = 0;
787			var $articles = jQuery(this).find('.media-block');
788			for (var i = 0; i < $articles.length; i++) {
789				if (leftColumnHeight > rightColumnHeight) {
790					rightColumnHeight += $articles.eq(i).addClass('right').outerHeight(true);
791				} else {
792					leftColumnHeight += $articles.eq(i).outerHeight(true);
793				}
794			} 
795			jQuery(this).css('visibility','visible')
796		});
797		},250);
798		setTimeout(function() {
799			jQuery('.two_column_album .media-block').css('opacity','1');
800		},250);
801	}
802	
803	/* NEWS GRID DISPLAY */
804	IRON.initGridDisplayNews = function() {
805		setTimeout(function() {
806		jQuery('.iron_widget_posts, .articles-section').each(function(){
807			var leftColumnHeight = 0;
808			var rightColumnHeight = 0;
809			var $articles = jQuery(this).find('.news-grid-wrap');
810			for (var i = 0; i < $articles.length; i++) {
811				if (leftColumnHeight > rightColumnHeight) {
812					rightColumnHeight += $articles.eq(i).addClass('right').outerHeight(true);
813				} else {
814					leftColumnHeight += $articles.eq(i).outerHeight(true);
815				}
816			} 
817			jQuery(this).css('visibility','visible')
818		});
819		},250);
820		setTimeout(function() {
821			jQuery('.news-grid-wrap').css('opacity','1');
822		},250);
823	}
824	
825	/* VIDEO GRID DISPLAY */
826	IRON.initGridDisplayVideo = function() {
827		setTimeout(function() {
828		jQuery('.iron_widget_videos, .listing-section.videos').each(function(){
829			var leftColumnHeight = 0;
830			var rightColumnHeight = 0;
831			var $articles = jQuery(this).find('.videogrid');
832			for (var i = 0; i < $articles.length; i++) {
833				if (leftColumnHeight > rightColumnHeight) {
834					rightColumnHeight += $articles.eq(i).addClass('right').outerHeight(true);
835				} else {
836					leftColumnHeight += $articles.eq(i).outerHeight(true);
837				}
838			} 
839			jQuery(this).css('visibility','visible')
840		});
841		},250);
842		setTimeout(function() {
843			jQuery('.videogrid').css('opacity','1');
844		},250);
845	}
846	
847	/* PUSHER FORCED HEIGHT */
848	IRON.initPusherHeight = function() {
849		var forcedheight = jQuery(window).height();
850		jQuery("#pusher").height(forcedheight);
851		jQuery(window).on('resize', function(){
852			var forcedheight = jQuery(window).height();
853			jQuery("#pusher").height(forcedheight);
854		});
855	}
856	
857	/* RESET PUSHER HEIGHT */
858	IRON.resetPusherHeight = function() {
859		jQuery("#pusher").css('height', '100%');
860		jQuery(window).off('resize');
861	}
862	
863	/* EVENT WIDGET CENTERING */
864	IRON.initEventCenter = function() {
865		if(jQuery(window).width() >= 767){
866			jQuery(".event-text-wrap, .event-text-wrap-single").each(function(){
867				var halfheight = (jQuery(this).height())/2;
868				jQuery(this).css('margin-top',(-halfheight));
869			});
870		} else {
871			jQuery(".event-text-wrap").css('margin-top',0);
872		};
873		
874		jQuery(window).resize(function(){
875			if(jQuery(window).width() >= 767){
876				jQuery(".event-text-wrap, .event-text-wrap-single").each(function(){
877					var halfheight = (jQuery(this).height())/2;
878					jQuery(this).css('margin-top',(-halfheight));
879				});
880			} else {
881				jQuery(".event-text-wrap").css('margin-top',0);
882			};
883		});
884		
885		jQuery('.title-row').mouseenter(function(){
886			if(jQuery(window).width() >= 767){
887				jQuery(".event-text-wrap.btn").each(function(){
888					var halfheight = (jQuery(this).height())/2;
889					jQuery(this).css('margin-top',(-halfheight));
890				});
891			} else {
892				jQuery(".event-text-wrap.btn").css('margin-top',0);
893			};
894		});
895	}
896	
897	/* TWITTER WIDGET CENTERING */
898	IRON.initTwitterCenter = function() {
899		jQuery(".twitter-center").each(function(){
900			var halfheight = (jQuery(this).height())/2;
901			jQuery(this).css('margin-top',(-halfheight));
902		});
903		jQuery(window).resize(function(){
904			jQuery(".twitter-center").each(function(){
905				var halfheight = (jQuery(this).height())/2;
906				jQuery(this).css('margin-top',(-halfheight));
907			});
908		});
909	}
910	
911	/* HEADSET ICON CENTERING */
912	IRON.initHeadsetCenter = function() {
913		jQuery(".album-listen").each(function(){
914			var halfheight = (jQuery(this).height())/2;
915			jQuery(this).css('margin-top',(-halfheight));
916		});
917		jQuery(window).resize(function(){
918			jQuery(".album-listen").each(function(){
919				var halfheight = (jQuery(this).height())/2;
920				jQuery(this).css('margin-top',(-halfheight));
921			});
922		});
923	}
924	
925	/* IOS SLIDER TEXT CENTERING */
926	IRON.initIOSCenter = function() {
927		jQuery(".iosSlider .slider .item .inner a").each(function(){
928			var halfheight = (jQuery(this).height())/2;
929			jQuery(this).css('margin-top',(-halfheight));
930		});
931		jQuery(window).resize(function(){
932			jQuery(".album-listen").each(function(){
933				var halfheight = (jQuery(this).height())/2;
934				jQuery(this).css('margin-top',(-halfheight));
935			});
936		});
937	}
938	
939	IRON.initCountdownLang = function() {
940		
941		if(iron_vars.lang)
942			$.countdown.setDefaults($.countdown.regionalOptions[iron_vars.lang]);
943		
944	}
945	
946	/* COUNTDOWNS CENTERING */
947	IRON.initCountdownCenter = function() {
948		jQuery(".countdown-wrap,.event-centering").each(function(){
949			var halfheight = (jQuery(this).height())/2;
950			jQuery(this).css('margin-top',(-halfheight));
951		});
952		jQuery(window).resize(function(){
953			jQuery(".countdown-wrap,.event-centering").each(function(){
954				var halfheight = (jQuery(this).height())/2;
955				jQuery(this).css('margin-top',(-halfheight));
956			});
957		});
958	}
959	
960	/* MENU HIERARCHY */
961	IRON.initMenuHierarchy = function() {
962		var menulevel = 0;
963		jQuery(".menu-item").each(function(){
964			if(jQuery(this).has("ul").length){
965				jQuery(this).children(".has-drop-down-a").append("<div class='sub-arrow'><i class='fa fa-angle-right'></i></div>");
966			};
967		});
968		jQuery(".has-drop-down-a").click(function(event) {
969			event.preventDefault();
970			menulevel = menulevel+1
971			jQuery(this).parent('li').parent('ul').children('li').each(function(){
972				jQuery(this).children('a').css('opacity','0');
973				jQuery(this).children('a').css('pointer-events','none');
974				if(menulevel > 0){
975					jQuery('.panel-networks').css('opacity','0');
976					jQuery('.panel-networks').css('pointer-events','none');
977				};
978			});
979			jQuery(this).next('ul').addClass('active');
980		});
981		jQuery(".backlist").click(function(event) {
982			event.preventDefault();
983			menulevel = menulevel-1
984			jQuery(this).parent('ul.sub-menu').parent('li').parent('ul').children('li').each(function(){
985				jQuery(this).children('a').css('opacity','1');
986				jQuery(this).children('a').css('pointer-events','auto');
987				if(menulevel == 0){
988					jQuery('.panel-networks').css('opacity','1');
989					jQuery('.panel-networks').css('pointer-events','auto');
990				};
991			});
992			jQuery(this).parent("ul").removeClass('active');
993		});
994	}
995	
996	/* SUB-MENU DYNAMIC POSITIONING */
997	IRON.initSubmenuPosition = function() {
998		function sidemenuoffset(){
999			var menuoffset = jQuery('.nav-menu').offset();
1000			jQuery('.sub-menu').css('top',menuoffset);
1001		}
1002		jQuery(window).resize(function(){
1003			sidemenuoffset();
1004		});
1005		sidemenuoffset();
1006	}
1007	
1008	/* LARGE SINGLE DISCOGRAPHY */
1009	IRON.initSingleDisco = function() {
1010		var discocount = $('.two_column_album .media-block').length;
1011		if(discocount == 1){
1012			$('.two_column_album .media-block').addClass('single');
1013		}
1014	}
1015	
1016	/* NEWSLETTER LABEL TRANSFORM */
1017	IRON.initNewsletterLabel = function() {
1018		jQuery(".nm_mc_input").each(function(){
1019			var thelabel = $(this).prev("label").text();
1020			$(this).attr('placeholder',thelabel);
1021		});
1022		$(".nm_mc_form label").css('display','none');
1023	}
1024	
1025	/* DISABLE HOVERS ON MOBILE */
1026	IRON.initDisableHovers = function() {
1027		$(document).ready(function() {
1028
1029			if (isMobile == true || isiPad == true){
1030				jQuery('.countdown-wrap').css('display','none');
1031				jQuery('.button-wrap').css('display','none');
1032				jQuery('.buttons').removeClass('no-touch');
1033				jQuery('html').removeClass('no-touch');
1034			};
1035        });
1036	}
1037	
1038	/* ISOTOPE NEWS GRID */
1039	IRON.initIsotope = function() {
1040		$.Isotope.prototype._getCenteredMasonryColumns = function() {
1041			this.width = this.element.width();
1042			var parentWidth = this.element.parent().width();
1043			var colW = this.options.masonry && this.options.masonry.columnWidth || // i.e. options.masonry && options.masonry.columnWidth
1044			this.$filteredAtoms.outerWidth(true) || // or use the size of the first item
1045			parentWidth; // if there's no items, use size of container
1046			var cols = Math.floor(parentWidth / colW);
1047			cols = Math.max(cols, 1);
1048			this.masonry.cols = cols; // i.e. this.masonry.cols = ....
1049			this.masonry.columnWidth = colW; // i.e. this.masonry.columnWidth = ...
1050		};
1051		$.Isotope.prototype._masonryReset = function() {
1052			this.masonry = {}; // layout-specific props
1053			this._getCenteredMasonryColumns(); // FIXME shouldn't have to call this again
1054			var i = this.masonry.cols;
1055			this.masonry.colYs = [];
1056				while (i--) {
1057				this.masonry.colYs.push(0);
1058			}
1059		};
1060		$.Isotope.prototype._masonryResizeChanged = function() {
1061			var prevColCount = this.masonry.cols;
1062			this._getCenteredMasonryColumns(); // get updated colCount
1063			return (this.masonry.cols !== prevColCount);
1064		};
1065		$.Isotope.prototype._masonryGetContainerSize = function() {
1066			var unusedCols = 0,
1067			i = this.masonry.cols;
1068				while (--i) { // count unused columns
1069				if (this.masonry.colYs[i] !== 0) {
1070					break;
1071				}
1072				unusedCols++;
1073			}
1074			return {
1075				height: Math.max.apply(Math, this.masonry.colYs),
1076				width: (this.masonry.cols - unusedCols) * this.masonry.columnWidth // fit container to columns that have been used;
1077			};
1078		};
1079		$('.isotope-wrap').isotope({
1080		  itemSelector : '.news-grid-wrap'
1081		});
1082		setTimeout(function() {
1083			$('.isotope-wrap').isotope('reloadItems').isotope('reLayout');
1084		},200);
1085	}
1086	
1087	IRON.initParallax = function (){
1088		setTimeout(function(){
1089			$("div.wpb_row.parallax").each(function() {
1090				var bgimage = $(this).css('background-image');
1091				if(bgimage && bgimage != '' && bgimage != 'none') {
1092					if(!( /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) )) {	
1093						$(this).parallax("50%", 0.4, false);
1094						$('.parallax').addClass('enabled');
1095						$('#pusher').addClass('normalbg');
1096					}	
1097					// Parallax Fix for Mobile Devices
1098					if( /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) ) {
1099						//$(this).css({'background-attachment': 'scroll'});
1100						$('.parallax').addClass('disabled');
1101						$('#pusher').addClass('mobilebg');
1102					}
1103				}
1104			});		
1105		},1000);
1106	}
1107	
1108	
1109	IRON.initBackToTop = function() {
1110		
1111		$('#back-to-top').on('click', function (e) {
1112		
1113			e.preventDefault();
1114			
1115			var selector = '#pusher';
1116			if (isMobile == true || isiPad == true){
1117				selector = 'html,body';
1118			}
1119				
1120			$(selector).animate({
1121				scrollTop: 0
1122			}, 800);
1123		});
1124	}
1125	
1126	IRON.initScrollToSection = function() {
1127
1128		var animating = false;
1129		// Iterate over all nav links, setting the "selected" class as-appropriate.
1130		$("a[href*=#]").on('click', function(e){
1131		
1132			
1133			if(animating || $(this).hasClass('ui-tabs-anchor'))
1134				return false;
1135				
1136			
1137		  	var target = $(this).attr('href');
1138		  	if(target.charAt(0) != '#') {
1139			  	target = target.split('#');
1140			  	target = '#'+target[1];
1141		  	}
1142		  	if($(target).length > 0) {
1143		  		e.preventDefault();
1144		  		animating = true;
1145		  		
1146		  		var menu_open = $('.side-menu').hasClass('open');
1147		  		var timeout = 10;
1148		  		
1149		  		if(menu_open) {
1150		  			$('.side-menu.open .menu-toggle-off').click();
1151		  			timeout = 400;
1152		  		}	
1153		  		
1154		  		setTimeout(function() {
1155			  
1156			  		var top = $(target).position().top;
1157			  		
1158			  		animating = true;
1159			  		
1160			  		var selector = '#pusher';
1161					if (isMobile == true || isiPad == true){
1162						selector = 'html,body';
1163					}
1164			
1165			  		$(selector).animate({
1166						scrollTop: top
1167					}, 800, function() {
1168						
1169						animating = false;
1170					});
1171				
1172		  		}, timeout);
1173			  	
1174			  	
1175		  	}
1176		  	
1177		});
1178
1179	}
1180	
1181	
1182	IRON.initVcAnimations = function() {
1183
1184		if(navigator.userAgent.match(/iPhone|iPad|iPod/i))
1185            jQuery('.wpb_animate_when_almost_visible').removeClass('wpb_animate_when_almost_visible');
1186            			
1187		var single_album = $('body').hasClass('single-photo-album');
1188
1189		if(!single_album) {
1190						
1191			$('#pusher').on('scroll', function() {
1192	
1193				$(window).resize();
1194	    	
1195			});
1196		}
1197		
1198	}
1199	
1200	IRON.initWooImageBack = function (){
1201		$('.attachment-shop_catalog').each(function() {
1202			$(this).wrap('<div class="tint"></div>');
1203		});  
1204	}
1205	
1206	IRON.initCustomJS = function() {
1207		
1208		if(iron_vars.custom_js != '') {
1209			eval(iron_vars.custom_js);
1210		}
1211		
1212	}
1213	
1214	IRON.css = function (a) {
1215	    var sheets = document.styleSheets, o = {};
1216	    for (var i in sheets) {
1217	        var rules = sheets[i].rules || sheets[i].cssRules;
1218	        for (var r in rules) {
1219	            if (a.is(rules[r].selectorText)) {
1220	                o = $.extend(o, IRON.css2json(rules[r].style), IRON.css2json(a.attr('style')));
1221	            }
1222	        }
1223	    }
1224	    return o;
1225	}
1226	
1227	IRON.css2json = function (css) {
1228	    var s = {};
1229	    if (!css) return s;
1230	    if (css instanceof CSSStyleDeclaration) {
1231	        for (var i in css) {
1232	            if ((css[i]).toLowerCase) {
1233	                s[(css[i]).toLowerCase()] = (css[css[i]]);
1234	            }
1235	        }
1236	    } else if (typeof css == "string") {
1237	        css = css.split("; ");
1238	        for (var i in css) {
1239	            var l = css[i].split(": ");
1240	            s[l[0].toLowerCase()] = (l[1]);
1241	        }
1242	    }
1243	    return s;
1244	}
1245		
1246	/* BACKTOTOP BUTTON */
1247	$(document).ready(function(){
1248		$('#footer').waypoint(function(direction) {
1249			if (direction == 'down'){
1250				$('.footer-wrapper-backtotop').addClass('active');
1251			} else if (direction == 'up'){
1252				$('.footer-wrapper-backtotop').removeClass('active');
1253			}
1254		}, { offset:2000});
1255	});
1256		
1257		
1258		
1259	/* Widget Button Hover */
1260	$(document).ready(function(){
1261		$('.button-widget').each(function() {
1262			var initialcolor = $(this).css('color');
1263			var initialbg = $(this).css('background-color');
1264			var initialborder = $(this).css('border-color');
1265			
1266			$(this).mouseover(function(){
1267				var bghovercolor = $(this).attr('data-hoverbg');
1268				var texthovercolor = $(this).attr('data-hovertext');
1269				var borderhovercolor = $(this).attr('data-hoverborder');
1270				$(this).css('border-color',borderhovercolor);
1271				$(this).css('background-color',bghovercolor);
1272				$(this).css('color',texthovercolor);
1273			});
1274			$(this).mouseout(function(){
1275				$(this).css('border-color',initialborder);
1276				$(this).css('background-color',initialbg);
1277				$(this).css('color',initialcolor);
1278			});
1279		})
1280	});
1281	
1282		
1283	$(document).ready(function() {
1284		$(window).resize();
1285		setTimeout(function() {
1286			$(window).resize();
1287			jQuery('header').animate({'opacity': 1});
1288		},1000);
1289		
1290	});
1291	
1292})(jQuery);
1293
1294function base64_decode(data) {
1295  //  discuss at: http://phpjs.org/functions/base64_decode/
1296  // original by: Tyler Akins (http://rumkin.com)
1297  // improved by: Thunder.m
1298  // improved by: Kevin van Zonneveld (http://kevin.vanzonneveld.net)
1299  // improved by: Kevin van Zonneveld (http://kevin.vanzonneveld.net)
1300  //    input by: Aman Gupta
1301  //    input by: Brett Zamir (http://brett-zamir.me)
1302  // bugfixed by: Onno Marsman
1303  // bugfixed by: Pellentesque Malesuada
1304  // bugfixed by: Kevin van Zonneveld (http://kevin.vanzonneveld.net)
1305  //   example 1: base64_decode('S2V2aW4gdmFuIFpvbm5ldmVsZA==');
1306  //   returns 1: 'Kevin van Zonneveld'
1307  //   example 2: base64_decode('YQ===');
1308  //   returns 2: 'a'
1309
1310  var b64 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';
1311  var o1, o2, o3, h1, h2, h3, h4, bits, i = 0,
1312    ac = 0,
1313    dec = '',
1314    tmp_arr = [];
1315
1316  if (!data) {
1317    return data;
1318  }
1319
1320  data += '';
1321
1322  do { // unpack four hexets into three octets using index points in b64
1323    h1 = b64.indexOf(data.charAt(i++));
1324    h2 = b64.indexOf(data.charAt(i++));
1325    h3 = b64.indexOf(data.charAt(i++));
1326    h4 = b64.indexOf(data.charAt(i++));
1327
1328    bits = h1 << 18 | h2 << 12 | h3 << 6 | h4;
1329
1330    o1 = bits >> 16 & 0xff;
1331    o2 = bits >> 8 & 0xff;
1332    o3 = bits & 0xff;
1333
1334    if (h3 == 64) {
1335      tmp_arr[ac++] = String.fromCharCode(o1);
1336    } else if (h4 == 64) {
1337      tmp_arr[ac++] = String.fromCharCode(o1, o2);
1338    } else {
1339      tmp_arr[ac++] = String.fromCharCode(o1, o2, o3);
1340    }
1341  } while (i < data.length);
1342
1343  dec = tmp_arr.join('');
1344
1345  return dec.replace(/\0+$/, '');
1346}
1347

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.