// source --> https://2020exhibits.com/wp-content/themes/custom/js/main.js?ver=1770032728 


jQuery(function ($) {

	$(document).on('scroll', function () {
		$(".home .flexBox").fadeIn(1000).css("display", "flex");
	});


	$('.home .readMore').click(function (e) {
		e.preventDefault();
		$(this).hide();
		$('.hiddenDiv').slideToggle();
	});

	$('.accordion').on('show', function (e) {
		$(e.target).prev('.accordion-heading').find('.accordion-toggle').addClass('active').find('i').toggleClass('icon-caret-right icon-caret-down');
	});

	$('.accordion').on('hide', function (e) {
		$(e.target).prev('.accordion-heading').find('.accordion-toggle').removeClass('active').find('i').toggleClass('icon-caret-down icon-caret-right');
	});

	$('.accordion-toggle').click(function (e) {
		e.preventDefault();
	});

	$('.exhibitHolder-2 video').css('width', '100%');

	// Add iframe attribute to widget for SEO purposes
	function findIframe() {
		$('.zopim iframe').attr("title", "Chat with Us");
		$('iframe.gmap').attr("title", "Find us on Google Maps");
	}
	setTimeout(findIframe, 2000);

	$('input.slider-range').attr('aria-label', 'Scroll For Booth Size');

	// Stop enter key from sending the form
	$('.quickContact').keypress(function (e) {
		var charCode = e.charCode || e.keyCode || e.which;
		if (charCode == 13) {
			return false;
		}
	});

	// Display mobile only quick contact form
	$('.showForm').click(function () {
		//$('.mobileFormWrap').appendTo('.mobileFormHolder');
		//$('.submitQuickContact').addClass('btn-large');
		$('.mobileFormHolder').slideToggle('fast');
		$('.mobileFormHolder a, .mobileFormHolder h2').hide();
		//$('#error, #success').appendTo('.formHolder');
		//$('#secondary .mobileFormWrap, #content .mobileFormWrap').hide();
	});

	// Main contact form
	$('.mainContact').appendTo('.contactRight');

	// Quick contact
	var form = $('.quickContact'); // contact form
	var submit = $('.submitQuickContact');	// submit button
	var alert = $('.alert'); // alert div for show alert message


	form.keydown(function (event) {
		if (event.keyCode == 13) {
			event.preventDefault();
			return false;
		};

	});


	$('.quickContact .disabledSubmit').attr('disabled', 'disabled');

	$('.quickContact .checkBox').on('click', function () {
		if ($(this).is(':checked') &&
			$('input[name="FirstName"]').val() != '' && 
			$('input[name="LastName"]').val() != '' &&
			$('input[name="email"]').val() != '' &&
			$('input[name="phone"]').val() != '' &&
			$('textarea[name="comments"]').val() != '') {
			$('.quickContact .disabledSubmit').removeAttr('disabled');
		} else {
			$('.quickContact .disabledSubmit').attr('disabled', 'disabled');
		}
	});

	// form submit event
	form.on('submit', function (e) {
		e.preventDefault(); // prevent default form submit
		// sending ajax request through jQuery
		if ($('#lastName').val()) { } else {
			$.ajax({
				url: '/quick-contact/', // form action url
				type: 'POST', // form submit method get/post
				dataType: 'html', // request type html/json/xml
				data: form.serialize(), // serialize form data
				beforeSend: function () {
					alert.fadeOut();
					submit.html('Sending....'); // change submit button text
				},
				success: function (data) {
					$('#success').slideToggle(1000); // success message
					setTimeout(function () {
						$('#success').slideToggle(600);
						$.fancybox.close();
					}, 4000);
					form.trigger('reset'); // reset form
					submit.html('SUBMIT'); // reset submit button text

					setTimeout(function () {
						$('.mobileFormHolder').slideToggle('fast');
					}, 6000);
				},
				error: function (data) {
					$('#error').fadeIn(1000); // error message
				}
			});
		}
	});




	// Pop up Quick contact
	var form2 = $('.quickContactModal'); // contact form
	var submit2 = $('.quickContactModal .submitQuickContact');	// submit button
	var alert2 = $('.quickContactModal .alert'); // alert div for show alert message


	form2.keydown(function (event) {
		if (event.keyCode == 13) {
			event.preventDefault();
			return false;
		};

	});


	$('.quickContactModal .disabledSubmit').attr('disabled', 'disabled');


	$('.quickContactModal .checkBox').on('click', function () {
		if ($(this).is(':checked') &&
			$('.quickContactModal input[name="FirstName"]').val() != '' && 
			$('.quickContactModal input[name="LastName"]').val() != '' &&
			$('.quickContactModal input[name="email"]').val() != '' &&
			$('.quickContactModal input[name="phone"]').val() != '' &&
			$('.quickContactModal input[name="comments"]').val() != '') {
			$('.quickContactModal .disabledSubmit').removeAttr('disabled');
		} else {
			$('.quickContactModal .disabledSubmit').attr('disabled', 'disabled');
		}
	});

	// form submit event
	form2.on('submit', function (e) {
		e.preventDefault(); // prevent default form submit
		// sending ajax request through jQuery
		if ($('.quickContactModal #lastName').val()) { } else {
			$.ajax({
				url: '/quick-contact/', // form action url
				type: 'POST', // form submit method get/post
				dataType: 'html', // request type html/json/xml
				data: form2.serialize(), // serialize form data
				beforeSend: function () {
					alert2.fadeOut();
					submit2.html('Sending....'); // change submit button text
				},
				success: function (data) {
					$('#hidden-quick-contact #success').slideToggle(1000); // success message
					setTimeout(function () {
						$('#hidden-quick-contact #success').slideToggle(600);
						$.fancybox.close();
					}, 4000);
					form2.trigger('reset'); // reset form
					submit2.html('SUBMIT'); // reset submit button text


				},
				error: function (data) {
					$('.quickContactModal #error').fadeIn(1000); // error message
				}
			});
		}
	});

	// Pop up Quick contact
	var form3 = $('.quickContactFooter'); // contact form
	var submit3 = $('.quickContactFooter .submitQuickContact');	// submit button
	var alert3 = $('.quickContactFooter .alert'); // alert div for show alert message

	form3.keydown(function (event) {
		if (event.keyCode == 13) {
			event.preventDefault();
			return false;
		};

	});

	$('.quickContactFooter .disabledSubmit').attr('disabled', 'disabled');

	$('.quickContactFooter .footerCheckbox').on('click', function () {
		if ($(this).is(':checked') &&
			$('.quickContactFooter input[name="FirstName"]').val() != '' && 
			$('.quickContactFooter input[name="LastName"]').val() != '' &&
			$('.quickContactFooter input[name="email"]').val() != '' &&
			$('.quickContactFooter input[name="phone"]').val() != '' &&
			$('.quickContactFooter input[name="comments"]').val() != '') {
			$('.quickContactFooter .disabledSubmit').removeAttr('disabled');
		} else {
			$('.quickContactFooter .disabledSubmit').attr('disabled', 'disabled');
		}
	});

	// form submit event
	form3.on('submit', function (e) {
		e.preventDefault(); // prevent default form submit
		// sending ajax request through jQuery
		if ($('.quickContactFooter #lastName2').val()) { } else {
			$.ajax({
				url: '/quick-contact/', // form action url
				type: 'POST', // form submit method get/post
				dataType: 'html', // request type html/json/xml
				data: form3.serialize(), // serialize form data
				beforeSend: function () {
					alert3.fadeOut();
					submit3.html('Sending....'); // change submit button text
				},
				success: function (data) {
					$('.greenBox #footerSuccess').slideToggle(1000); // success message
					setTimeout(function () {
						$('.greenBox #footerSuccess').slideToggle(600);
						$.fancybox.close();
					}, 4000);
					form3.trigger('reset'); // reset form
					submit3.html('SUBMIT'); // reset submit button text


				},
				error: function (data) {
					$('.quickContactFooter #footerError').fadeIn(1000); // error message
				}
			});
		}
	});



	// go to specific tab via href
	var hash = window.location.hash,
		hashPart = hash.split('!')[1],
		activeTab = $('ul#myTab  a[href="#' + hashPart + '"]');
	activeTab && activeTab.tab('show');

	$('ul#myTab a').click(function (e) {
		$(this).tab('show');
		window.location.hash = '#!' + $(this).attr('href').split('#')[1];
	});

	//Bootstrap nav
	$('ul#menu-main-menu li a.dropdown-toggle, ul.dropdown-menu li ul.sub-menu li a').addClass('desktopNav disabled');



	// Highlight location pages


	if ($('body').hasClass('page-contact')) {
		$('ul.cityList li a img[alt="HOUSTON"]').css('opacity', '1').addClass('shadow');

	} else if ($('body').hasClass('page-houston')) {
		$('ul.cityList li a img[alt="HOUSTON"]').css('opacity', '1').addClass('shadow');

	} else if ($('body').hasClass('page-chicago')) {
		$('ul.cityList li a img[alt="CHICAGO"]').css('opacity', '1').addClass('shadow');

	} else if ($('body').hasClass('page-cincinnati')) {
		$('ul.cityList li a img[alt="CINCINNATI"]').css('opacity', '1').addClass('shadow');

	} else if ($('body').hasClass('page-cleveland')) {
		$('ul.cityList li a img[alt="CLEVELAND"]').css('opacity', '1').addClass('shadow');

	} else if ($('body').hasClass('page-grand-rapids')) {
		$('ul.cityList li a img[alt="GRAND RAPIDS"]').css('opacity', '1').addClass('shadow');

	} else if ($('body').hasClass('page-lasvegas')) {
		$('ul.cityList li a img[alt="LAS VEGAS"]').css('opacity', '1').addClass('shadow');

	} else if ($('body').hasClass('page-saltlakecity')) {
		$('ul.cityList li a img[alt="SALT LAKE CITY"]').css('opacity', '1').addClass('shadow');

	} else if ($('body').hasClass('page-st-louis')) {
		$('ul.cityList li a img[alt="ST. LOUIS"]').css('opacity', '1').addClass('shadow');

	} else if ($('body').hasClass('page-greenville')) {
		$('ul.cityList li a img[alt="GREENVILLE"]').css('opacity', '1').addClass('shadow');

	} else if ($('body').hasClass('page-toledo')) {
		$('ul.cityList li a img[alt="TOLEDO"]').css('opacity', '1').addClass('shadow');

	}





	// Animate the search field
	$('.topSearch input.search').on('focus', function () {
		$(this).animate({ width: ($(this).width() + 60) + 'px' }, 300);
	}).on('blur', function () {

		if ($(this).val() == '')
			$(this).animate({ width: ($(this).width() - 60) + 'px' }, 300);
	});

	var supportsTouch = 'ontouchstart' in window || navigator.msMaxTouchPoints;

	if (supportsTouch) {
		//$('.desktopNav').removeClass('disabled');
		$('li.hidden').removeClass('hidden');
		$('.newsUpdatesSpan').removeClass('newsUpdatesSpan');
		$('.nav-previous a, .nav-next a').addClass('mobileBtn');
	} else {
		//Tooltip for My Gallery
		$('.gallery a, .topSocial a').tooltip({ 
            container: '#stickyheader',
            //position: { my: "left+15 center", at: "right center" }
        });
	}


	// upload attachments - contact form
	$('input[name="upload_files"]').change(function () {
		var filename = $(this).val();
		$('<label class="labelUpload">Filename selected: ' + filename + '</label>').appendTo($('#label'));
	});

	// retrieve query string
	function getQuerystring(key, default_) {
		if (default_ == null) default_ = "";
		key = key.replace(/[\[]/, "\\\[").replace(/[\]]/, "\\\]");
		var regex = new RegExp("[\\?&]" + key + "=([^&#]*)");
		var qs = regex.exec(window.location.href);
		if (qs == null)
			return default_;
		else
			return qs[1];
	}

	var pageurl = getQuerystring('page');


	//Event Intelligence modal
	if (pageurl == 'modal') {
		$('#ei-onload').modal('show');
	} else {
		$('#ei-onload .modal-body .youtubeVid').remove();
	}


	$('.show_mobile_nav').click(function (e) {
		e.preventDefault();
		$('.mobile-nav').slideToggle();
	});

	var open = $();

	$('.companyLink').click(function (e) {
		e.preventDefault();

		$(this).addClass('selectedNav');

		var clicked = $(this).parent();

		if (!clicked.hasClass('activeNav')) {
			clicked.addClass('activeNav').siblings().removeClass('activeNav');
		}

		open.slideUp();
		open = $(this).closest('div').find('.hiddenLink');
		open.not(':animated').slideToggle();


		$('.parent-nav').not('.activeNav').find('i').removeClass('pointDown');
		$('.parent-nav').not('.activeNav').find('a').removeClass('selectedNav');

		var clicks = $(this).data('clicks');

		if (clicks) {
			$(this).find('i').removeClass('pointDown');
		} else {
			$(this).find('i').addClass('pointDown');
		}
		$(this).data("clicks", !clicks);
	});


	// Scroll to top
	$("a.scrollUp").click(function () {
		$("html, body").animate({ scrollTop: 0 }, "medium");
		return false;
	});

	// Continue reading link
	$('.newsUpdates span.meta-nav').html('&nbsp; <span class="icon-arrow-right"></span>');


	// Fancybox plugin
	$(".fancybox").fancybox({
		maxWidth: 700,
		transitionIn: 'elastic',
		transitionOut: 'elastic',
		fitToView: true,
		width: '100%',
		height: '100%',
		autoSize: true,
		closeClick: false,
		openEffect: 'none',
		closeEffect: 'none',
		beforeLoad: function () {
			this.title = $(this.element).attr('caption');
		},
		helpers: {
			overlay: {
				css: {
					'background': 'rgba(0, 0, 0, 0.7)'
				}
			}
		}
	});

	$(".fancyModal").fancybox({
		maxWidth: 700,
		transitionIn: 'elastic',
		transitionOut: 'elastic',
		fitToView: true,
		width: '100%',
		height: '100%',
		autoSize: true,
		closeClick: false,
		openEffect: 'none',
		closeEffect: 'none',
		wrapCSS: "questionModal",
		beforeLoad: function () {
			this.title = $(this.element).attr('caption');
		},
		helpers: {
			overlay: {
				css: {
					'background': 'rgba(0, 0, 0, 0.7)'
				}
			}
		}
	});

	$(".newsletter").fancybox({
		maxWidth: 600,
		maxHeight: 610,
		transitionIn: 'elastic',
		transitionOut: 'elastic',
		fitToView: true,
		width: '100%',
		height: '70%',
		autoSize: true,
		closeClick: false,
		openEffect: 'none',
		closeEffect: 'none',
		wrapCSS: "newsletterModal",
		helpers: {
			overlay: {
				css: {
					'background': 'rgba(0, 0, 0, 0.7)'
				}
			}
		}
	});

	$(".various").fancybox({
		maxWidth: 800,
		maxHeight: 600,
		fitToView: true,
		transitionIn: 'elastic',
		transitionOut: 'elastic',
		width: '80%',
		height: '80%',
		autoSize: true,
		closeClick: false,
		openEffect: 'none',
		closeEffect: 'none',
		helpers: {
			overlay: {
				css: {
					'background': 'rgba(0, 0, 0, 0.7)'
				}
			}
		}
	});

	$(".iframe").fancybox({
		maxWidth: 600,
		maxHeight: 760,
		fitToView: true,
		transitionIn: 'elastic',
		transitionOut: 'elastic',
		width: '80%',
		height: '80%',
		autoSize: true,
		closeClick: false,
		openEffect: 'none',
		closeEffect: 'none',
		helpers: {
			overlay: {
				css: {
					'background': 'rgba(0, 0, 0, 0.7)'
				}
			}
		}
	});

	$(".ei").fancybox({
		maxWidth: 1000,
		maxHeight: 573,
		fitToView: true,
		transitionIn: 'elastic',
		transitionOut: 'elastic',
		width: '80%',
		height: '80%',
		autoSize: true,
		closeClick: false,
		openEffect: 'none',
		closeEffect: 'none',
		topRatio: 0.180,
		helpers: {
			overlay: {
				css: {
					'background': 'rgba(0, 0, 0, 0.7)'
				}
			}
		}
	});



	$(".environments-vid").fancybox({
		maxWidth: 1280,
		maxHeight: 720,
		fitToView: true,
		transitionIn: 'elastic',
		transitionOut: 'elastic',
		width: '100%',
		height: '100%',
		autoSize: true,
		closeClick: false,
		openEffect: 'none',
		closeEffect: 'none',

		helpers: {
			overlay: {
				css: {
					'background': 'rgba(0, 0, 0, 0.9)'
				}
			}
		}
	});

	$(".resources-vid").fancybox({
		maxWidth: 1280,
		maxHeight: 720,
		fitToView: true,
		transitionIn: 'elastic',
		transitionOut: 'elastic',
		width: '100%',
		height: '100%',
		autoSize: true,
		closeClick: false,
		openEffect: 'none',
		closeEffect: 'none',

		helpers: {
			overlay: {
				css: {
					'background': 'rgba(0, 0, 0, 0.9)'
				}
			}
		}
	});

	$(".highlights-vid").fancybox({
		maxWidth: 1280,
		maxHeight: 720,
		fitToView: true,
		transitionIn: 'elastic',
		transitionOut: 'elastic',
		width: '100%',
		height: '100%',
		autoSize: true,
		closeClick: false,
		openEffect: 'none',
		closeEffect: 'none',

		helpers: {
			overlay: {
				css: {
					'background': 'rgba(0, 0, 0, 0.9)'
				}
			}
		}
	});



	$('#ei-onload').on('hidden', function (e) {
		var vidcontent = jQuery('#ei-onload .modal-body .youtubeVid').remove();
	});

	//Footer always at the bottom
	var docHeight = $(window).height();
	var footerHeight = $('footer#colophon').height();
	var footerTop = $('footer#colophon').position().top + footerHeight;

	if (footerTop < docHeight) {
		$('footer#colophon').css('margin-top', 10 + (docHeight - footerTop) + 'px');
	}


	//fade image on hover
	$(".fadeImg").hover(function () {
		$(this).stop().animate({ "opacity": "0.7" }, "fast");
	},
		function () {
			$(this).stop().animate({ "opacity": "1" }, "fast");
		});

	// Remember ftp login
	if (localStorage.chkbx && localStorage.chkbx != '') {
		$('#remember_me').attr('checked', 'checked');
		$('#login').val(localStorage.usrname);
		$('#pwd').val(localStorage.pass);

	} else {

		$('#remember_me').removeAttr('checked');
		$('#login').val('');
		$('#pwd').val('');
	};

	$('#remember_me').click(function () {
		if ($('#remember_me').is(':checked')) {
			// save username and password
			localStorage.usrname = $('#login').val();
			localStorage.pass = $('#pwd').val();
			localStorage.chkbx = $('#remember_me').val();

		} else {

			localStorage.usrname = '';
			localStorage.pass = '';
			localStorage.chkbx = '';
		}
	});

	// Magic CSS - Add to My Gallery animations
	$('.item_add').click(function () {
		$('.count.simpleCart_quantity').addClass('magictime tinUpIn');
		window.setTimeout(function () {
			$('.count.simpleCart_quantity').removeClass('magictime tinUpIn')
		}, 600);
	});



	$('.showHiddenForm').click(function (e) {
		e.preventDefault();
		$('.hiddenForm').slideToggle('fast');
	});

	// Environments page
	setTimeout(function () {
		$('.leftBLocks').show().addClass('magictime tinRightIn');
		$('.rightMetals').show().addClass('magictime tinLeftIn');
	}, 1000);



	// add a class to the gallery modal on click
	$('.gallery a, a.item_add').click(function () {
		$('div.modal-body > div.simpleCart_items > table').addClass('galleryTable table table-striped');


		if ($('.modal-body > .simpleCart_items > table > tbody > tr').hasClass('itemRow')) {
			$('.galleryModal > .modal-footer > .confirm').show();

		} else {
			$('.empty_gallery_message').html('<div class="center alert alert-error">YOUR GALLERY IS CURRENTLY EMPTY</div>');

			$('.galleryModal > .modal-footer > .dropDown').hide();
			$('.modal-body > .simpleCart_items > table > tbody > tr.headerRow').hide();
		}
	});

	// Hide these classes when the modal closes
	$('.galleryModal').on('hidden', function () {
		$('.confirm, .dropDown').hide();

	});

	$('a.modalBtn').click(function () {

		$('a.modalBtn').removeClass('btn-active');
		$(this).addClass('btn-active');
	});


	// hide Upcoming Show based on its expiration
	$('ul.exhibitLists li.shows').each(function (index) {
		var today = new Date();
		var dd = today.getDate();
		var mm = today.getMonth() + 1; //January is 0!
		var yyyy = today.getFullYear();

		if (dd < 10) {
			dd = '0' + dd
		}

		if (mm < 10) {
			mm = '0' + mm
		}

		today = yyyy + '-' + mm + '-' + dd;
		//today = mm+'-'+dd+'-'+yyyy;

		var expiration = $(this).attr("datetime");

		if (expiration < today) {
			$(this).remove();
		}

		if (expiration > yyyy + '-12-31') {
			$(this).appendTo('.nextYear ul');
		}
	});

	$('a.moreInfoBtn').click(function (e) {
		e.preventDefault();
	});

	//No need to use SimpleCart on the homepage
	var page = window.location.toString();
	page = page.substring(page.lastIndexOf('/'));

    //console.log(page);
	if (page != '/' && page != '/#') {

		// my gallery customer notification
		simpleCart.ready(function () {
			if (simpleCart.items().length > 0) {
				$('#breadcrumb .count, .headingHolder .myGallery, .headingHolder .gallery a, .headingHolder .myGallery .count').css('color', '#ff0000');
				$('#breadcrumb .gallery a').next().css('color', '#ff0000');
			}
		});

		simpleCart.bind("afterAdd", function (item) {
			$('#breadcrumb .count, .headingHolder .myGallery, .headingHolder .gallery a, .headingHolder .myGallery .count').css('color', '#ff0000');
			$('#breadcrumb .gallery a').next().css('color', '#ff0000');
		});

		simpleCart.bind('update', function () {
			if (simpleCart.items().length < 1) {
				$('#breadcrumb .count, .headingHolder .myGallery, .headingHolder .gallery a, .headingHolder .myGallery .count').removeAttr('style');
				$('#breadcrumb .gallery a').next().removeAttr('style');
			}
		});

	}

	if (Modernizr.touch || window.location.href.indexOf('exhibit-peninsula') > 0) {
		// Disable fixed header on Exhibit Peninsula page only
		// Disable fixed header on touch devices because user cannot scroll when menu is open

	} else {

		// Desktop only
		$(window).on('scroll', function () {
			if ($(window).scrollTop() > 250) {
				$('.headTop').addClass('fixed-header magictime slideUpReturn shadow');
			}

			if ($(window).scrollTop() == 0) {
				$('.headTop').removeClass('fixed-header magictime slideUpReturn shadow');
			}
		});

	}




	//Exhibits & Rental Portfolio pages
	if (Modernizr.touch) {
		//Remove hover after the modal closes
		$('.galleryModal').on('hidden', function () {
			$('.img').removeClass('hover');
		});

		// show the close overlay button
		$(".close-overlay").removeClass("hidden");

		$('a.exhibitLink').hide();

		// handle the adding of hover class when clicked
		$(".img").click(function (e) {
			if (!$(this).hasClass("hover")) {
				$(".img").removeClass("hover");
				$(this).addClass("hover");
			}

			//Hide the links and show them again
			$('a.exhibitLink').hide();

			var links = $(this).find('a.exhibitLink');

			setTimeout(function () {
				$(links).fadeIn(500);
			}, 100);

		});

		// handle the closing of the overlay
		$(".close-overlay").click(function (e) {
			e.preventDefault();
			e.stopPropagation();
			if ($(this).closest(".img").hasClass("hover")) {
				$(this).closest(".img").removeClass("hover");

			}
		});
	} else {
		// handle the mouseenter functionality
		$(".img").mouseenter(function () {
			$(this).addClass("hover");
		})
			// handle the mouseleave functionality
			.mouseleave(function () {
				$(this).removeClass("hover");
			});
	}




    console.log($('.fancy').length);
	jQuery('.fancy').fancybox({
		beforeShow: function () {
			$('.fancybox-inner .center img').removeAttr('style');

		},
		margin: [50, 0, 50, 0],
		maxWidth: 900,
		maxHeight: 780,
		fitToView: true,
		width: '100%',
		height: '100%',
		autoResize: true,
		closeClick: false,
		openEffect: 'elastic',
		closeEffect: 'elastic',
		autoCenter: true,
		aspectRatio: true,
		autoHeight: true,
		openSpeed: 150,
		autoSize: false,
		padding: 0,
		scrolling: false,
		helpers: {
			overlay: {
				css: {
					'background': 'rgba(0, 0, 0, .9)',
					'z-index': 999
				}
			}
		},
		beforeClose: function () {
			$('.img').removeClass('hover');

			if (Modernizr.touch) {
				$('a.exhibitLink').hide();
			}
		},
		beforeLoad: function () {

			console.log('Show lightbox');
			//Slick plugin
			$('.exhibit-slider').slick({
				dots: true,
				infinite: true,
				centerMode: true,
				cssEase: 'ease-out',
				lazyLoad: 'progressive',
				useTransform: false,
				speed: 500,
				variableWidth: true,
				mobileFirst: true,
				autoplay: true,
				centerMode: true,
				slidesToShow: 1,
				slidesToScroll: 1,
				prevArrow: '<button type="button" class="slick-arrow slick-prev" data-role="none"></button>',
				nextArrow: '<button type="button" class="slick-arrow slick-next" data-role="none"></button>',
				centerPadding: '300px'
			});

            setTimeout(function () {
                window.dispatchEvent(new Event('resize'));
                console.log("REFRESH");
            },150);


		},
		afterClose: function () {

			console.log('CLOSED');
			$('.exhibit-slider').slick('unslick');

		}
	});


	//For Rental AV & Rental Accessories only
	$(".fancy-rentals").fancybox({
		beforeShow: function () {
			$('.fancybox-inner .center img').removeAttr('style');
			//$('.carousel').carousel();
		},
		maxWidth: 980,
		maxHeight: 1080,
		fitToView: true,
		width: '100%',
		height: '100%',
		autoResize: true,
		closeClick: false,
		openEffect: 'elastic',
		closeEffect: 'elastic',
		autoCenter: 'true',
		aspectRatio: 'true',
		autoHeight: 'true',
		openSpeed: 150,
		autoSize: false,
		padding: 0,
		helpers: {
			overlay: {
				css: {
					'background': 'rgba(0, 0, 0, 0.9)',
					'z-index': 999
				}
			}
		},
		beforeClose: function () {
			$('.img').removeClass('hover');

			if (Modernizr.touch) {
				$('a.exhibitLink').hide();
			}
		},
		beforeLoad: function () {

			console.log('SHOWN');

		},
		afterClose: function () {

			console.log('CLOSED');

		}
	});

	/*
	* rwdImageMaps jQuery plugin v1.5
	*
	* Allows image maps to be used in a responsive design by recalculating the area coordinates to match the actual image size on load and window.resize
	*
	* Copyright (c) 2013 Matt Stow
	* https://github.com/stowball/jQuery-rwdImageMaps
	* http://mattstow.com
	* Licensed under the MIT license
	*/
	; (function (a) { a.fn.rwdImageMaps = function () { var c = this; var b = function () { c.each(function () { if (typeof (a(this).attr("usemap")) == "undefined") { return } var e = this, d = a(e); a("<img />").load(function () { var g = "width", m = "height", n = d.attr(g), j = d.attr(m); if (!n || !j) { var o = new Image(); o.src = d.attr("src"); if (!n) { n = o.width } if (!j) { j = o.height } } var f = d.width() / 100, k = d.height() / 100, i = d.attr("usemap").replace("#", ""), l = "coords"; a('map[name="' + i + '"]').find("area").each(function () { var r = a(this); if (!r.data(l)) { r.data(l, r.attr(l)) } var q = r.data(l).split(","), p = new Array(q.length); for (var h = 0; h < p.length; ++h) { if (h % 2 === 0) { p[h] = parseInt(((q[h] / n) * 100) * f) } else { p[h] = parseInt(((q[h] / j) * 100) * k) } } r.attr(l, p.toString()) }) }).attr("src", d.attr("src")) }) }; a(window).resize(b).trigger("resize"); return this } })(jQuery);



	// Event Intelligence page

	$('.closePopup').on('click', function (e) {
		e.preventDefault();
		$('.ei-popup').removeClass('magictime slideRightReturn');
		$('.ei-popup').addClass('magictime slideRight').fadeOut(2500);
		//$('.ei-popup').hide( "slide", {direction: "right" }, 500 );

	});


	$('.showSlider').on('click', function (e) {
		e.preventDefault();
		//$('.ei-popup').show( "slide", {direction: "right" }, 1250 );
		$('.ei-popup').removeClass('magictime slideRight');
		$('.ei-popup').fadeIn('fast').addClass('magictime slideRightReturn');

	});

	var selector = $('.leftList ul li a');
	var inactiveIcon = $('.leftList ul li a span');

	$(selector).click(function (e) {
        console.log("click");
		e.preventDefault();
		var icon = $(this).find('span');

		$(selector).removeClass('active');
		$(this).addClass('active');

		inactiveIcon.removeClass('icons-white').addClass('icons');

		icon.removeClass('icons').addClass('icons-white');

		$('.ipad-global').hide();

		if ($(this).hasClass('link-global')) {
			$('.div-global').fadeIn(600);
		} else if ($(this).hasClass('link-customized')) {
			$('.div-customized').fadeIn(600);
		} else if ($(this).hasClass('link-integration')) {
			$('.div-integration').fadeIn(600);
		} else if ($(this).hasClass('link-measurement')) {
			$('.div-measurement').fadeIn(600);
		} else if ($(this).hasClass('link-analytics')) {
			$('.div-analytics').fadeIn(600);
		} else if ($(this).hasClass('link-event')) {
			$('.div-event').fadeIn(600);
		} else {
			$('.div-automation').fadeIn(600);
		}
	});

	$('img[usemap]').rwdImageMaps();

	if ($('body').hasClass('page-id-1430')) {
		$('a.env').attr("href", '../branded-environments-request-quote/');
	}

	$(".scrollToQuote").click(function (e) {
		e.preventDefault();
		$('html, body').animate({
			scrollTop: $("#getQuote").offset().top
		}, 800);
	});



	/* HTML5 Placeholder jQuery Plugin - v2.3.1
		* Copyright (c)2015 Mathias Bynens
		* 2015-12-16
		*/
	!function (a) { "function" == typeof define && define.amd ? define(["jquery"], a) : a("object" == typeof module && module.exports ? require("jquery") : jQuery) }(function (a) { function b(b) { var c = {}, d = /^jQuery\d+$/; return a.each(b.attributes, function (a, b) { b.specified && !d.test(b.name) && (c[b.name] = b.value) }), c } function c(b, c) { var d = this, f = a(this); if (d.value === f.attr(h ? "placeholder-x" : "placeholder") && f.hasClass(n.customClass)) if (d.value = "", f.removeClass(n.customClass), f.data("placeholder-password")) { if (f = f.hide().nextAll('input[type="password"]:first').show().attr("id", f.removeAttr("id").data("placeholder-id")), b === !0) return f[0].value = c, c; f.focus() } else d == e() && d.select() } function d(d) { var e, f = this, g = a(this), i = f.id; if (!d || "blur" !== d.type || !g.hasClass(n.customClass)) if ("" === f.value) { if ("password" === f.type) { if (!g.data("placeholder-textinput")) { try { e = g.clone().prop({ type: "text" }) } catch (j) { e = a("<input>").attr(a.extend(b(this), { type: "text" })) } e.removeAttr("name").data({ "placeholder-enabled": !0, "placeholder-password": g, "placeholder-id": i }).bind("focus.placeholder", c), g.data({ "placeholder-textinput": e, "placeholder-id": i }).before(e) } f.value = "", g = g.removeAttr("id").hide().prevAll('input[type="text"]:first').attr("id", g.data("placeholder-id")).show() } else { var k = g.data("placeholder-password"); k && (k[0].value = "", g.attr("id", g.data("placeholder-id")).show().nextAll('input[type="password"]:last').hide().removeAttr("id")) } g.addClass(n.customClass), g[0].value = g.attr(h ? "placeholder-x" : "placeholder") } else g.removeClass(n.customClass) } function e() { try { return document.activeElement } catch (a) { } } var f, g, h = !1, i = "[object OperaMini]" === Object.prototype.toString.call(window.operamini), j = "placeholder" in document.createElement("input") && !i && !h, k = "placeholder" in document.createElement("textarea") && !i && !h, l = a.valHooks, m = a.propHooks, n = {}; j && k ? (g = a.fn.placeholder = function () { return this }, g.input = !0, g.textarea = !0) : (g = a.fn.placeholder = function (b) { var e = { customClass: "placeholder" }; return n = a.extend({}, e, b), this.filter((j ? "textarea" : ":input") + "[" + (h ? "placeholder-x" : "placeholder") + "]").not("." + n.customClass).not(":radio, :checkbox, [type=hidden]").bind({ "focus.placeholder": c, "blur.placeholder": d }).data("placeholder-enabled", !0).trigger("blur.placeholder") }, g.input = j, g.textarea = k, f = { get: function (b) { var c = a(b), d = c.data("placeholder-password"); return d ? d[0].value : c.data("placeholder-enabled") && c.hasClass(n.customClass) ? "" : b.value }, set: function (b, f) { var g, h, i = a(b); return "" !== f && (g = i.data("placeholder-textinput"), h = i.data("placeholder-password"), g ? (c.call(g[0], !0, f) || (b.value = f), g[0].value = f) : h && (c.call(b, !0, f) || (h[0].value = f), b.value = f)), i.data("placeholder-enabled") ? ("" === f ? (b.value = f, b != e() && d.call(b)) : (i.hasClass(n.customClass) && c.call(b), b.value = f), i) : (b.value = f, i) } }, j || (l.input = f, m.value = f), k || (l.textarea = f, m.value = f), a(function () { a(document).delegate("form", "submit.placeholder", function () { var b = a("." + n.customClass, this).each(function () { c.call(this, !0, "") }); setTimeout(function () { b.each(d) }, 10) }) }), a(window).bind("beforeunload.placeholder", function () { var b = !0; try { "javascript:void(0)" === document.activeElement.toString() && (b = !1) } catch (c) { } b && a("." + n.customClass).each(function () { this.value = "" }) })) });


	$('form input, form textarea').placeholder({ customClass: 'my-placeholder' });



	$('.homePanels .readMore').click(function (e) {
		e.preventDefault();
		$(this).hide();
		$(this).next('div').fadeIn();
	});

	$('.homePanels .readLess').click(function (e) {
		e.preventDefault();

		if ($('.hidden-panel').is(':visible')) {
			$('.homePanels .readMore').show();
		}

		//$('.homePanels .readMore').show();
		$(this).parent('div').fadeOut();
	});

	$('.exhibit-islands .exhibitLists li:not(.size20), .exhibit-inlines .exhibitLists li:not(.size20)').hide();


	// Range Slider filter
	var rangeSlider = function () {
		var slider = $('.battery-slider'),
			range = $('.slider-range'),
			value = $('.slider-value');

		slider.each(function () {
			value.each(function () {
				var value = $(this).prev().attr('value');
				$(this).html(value);
			});

			range.on('input', function () {
				$('.output').val(this.value + "'");
			}).trigger("change");

			range.on('input', function () {
				if (this.value >= 0 && this.value < 20) {
					$('.size10').fadeIn('fast');
					$('.exhibitLists li:not(.size10)').fadeOut();
				} else if (this.value >= 0 && this.value < 30) {
					$('.size20').fadeIn('fast');
					$('.exhibitLists li:not(.size20)').fadeOut();
				} else if (this.value >= 30 && this.value < 40) {
					$('.size30').fadeIn('fast');
					$('.exhibitLists li:not(.size30)').fadeOut();
				} else if (this.value >= 40 && this.value < 50) {
					$('.size40').fadeIn('fast');
					$('.exhibitLists li:not(.size40)').fadeOut();
				} else if (this.value >= 50 && this.value < 60) {
					$('.size50').fadeIn('fast');
					$('.exhibitLists li:not(.size50)').fadeOut();
				} else if (this.value > 60) {
					$('.sizeBigger').fadeIn('fast');
					$('.exhibitLists li:not(.sizeBigger)').fadeOut();
				}

			});
		});
	};
	rangeSlider();

	// YouTube videos script defer
	function init() {
		var vidDefer = document.getElementsByTagName('iframe');
		for (var i = 0; i < vidDefer.length; i++) {
			if (vidDefer[i].getAttribute('data-src')) {
				vidDefer[i].setAttribute('src', vidDefer[i].getAttribute('data-src'));
			}
		}
	}
	window.onload = init;


	//EXHIBITS
	$('.click-exhibits').click(function () {
		window.location = "/exhibits/";
	}).hover(function () {
		$(this).css('cursor', 'pointer');
	});

	//EVENTS
	$('.click-events').click(function () {
		window.location = "/events/";
	}).hover(function () {
		$(this).css('cursor', 'pointer');
	});

	//ENVIRONMENTS
	$('.click-interiors').click(function () {
		window.location = "/corporate-interiors/";
	}).hover(function () {
		$(this).css('cursor', 'pointer');
	});

	//SIGNAGE
	$('.click-signage').click(function () {
		window.location = "/signage/";
	}).hover(function () {
		$(this).css('cursor', 'pointer');
	});

	//EVENT INTELLIGENCE
	$('.click-intelligence').click(function () {
		window.location = "/event-intelligence/";
	}).hover(function () {
		$(this).css('cursor', 'pointer');
	});



	$('.showCta').click(function (e) {
		e.preventDefault();
		$('.hiddenCta').slideToggle();
	});

    //if (jQuery('.elementor-page-4031').length) {
        //Count items in list
        var exb_items = jQuery('.divWrap >ul > li').length;
        console.log('Total items: ' + exb_items);
        if (exb_items>12) {
            var max_pages = Math.ceil(exb_items / 12);
            jQuery('<div id="exb_load_more_wrapper"><div id="exb_load_more" class="btn-primary">Load More</div></div>').insertAfter('.divWrap');
            var exb_page = 1;
            // Initially hide all items beyond the first 12
            jQuery('.divWrap > ul > li').slice(12).hide();
            // On click of Load More button
            jQuery('#exb_load_more').on('click', function () {
                if (exb_page >= max_pages) {
                    jQuery('#exb_load_more').html('<span class="noMoreItems">No more items to load</span>');
                    return;
                }
                console.log('Loading page ' + (exb_page + 1) + ' of ' + max_pages);
                var exb_start = exb_page * 12;
                var exb_end = exb_start + 12;
                jQuery('.divWrap >ul > li').slice(exb_start, exb_end).fadeIn(800);
                exb_page++;
                if (exb_page >= max_pages) {
                    jQuery('#exb_load_more').html('<span class="noMoreItems">No more items to load</span>');
                }
            });
        }        
        
    //}



});

//This code was on the live site (it was already commented) and located at js-global/quickContact-insite.js
/*jQuery(document).ready(function(){
	jQuery('.quickContact').submit(function(event) {
		event.preventDefault();
		jQuery('.quickContact').attr('id', 'quickForm');
 
		var insiteform = document.getElementById('quickForm');
		var insiteForm = jQuery('#quickForm');
 
		if (jQuery(':input[name="fullName"]').val() != "") {
 
			trackurl = "//www.topfloortech.com/insitemetrics/uRMJ/uniformv2.php";
			trackurl += "?actk=t58vlg-6hih145rb4";
			trackurl += "&imReferrerField=" + encodeURIComponent(document.referrer);
 
			trackurl += "&Name=" + escape(insiteForm.find(':input[name="fullName"]').val());
			trackurl += "&imEmailField=" + escape(insiteForm.find(':input[name="email"]').val());
			trackurl += "&Phone=" + escape(insiteForm.find(':input[name="phone"]').val());
			trackurl += "&Comments=" + escape(insiteForm.find(':input[name="comments"]').val());
 
			trackimg = new Image(1,1);
			trackimg.src = trackurl;
			setTimeout( function(){insiteform.submit();}, 500 );
		} else {
			insiteform.submit();
		}
	});
});*/;
// source --> https://2020exhibits.com/wp-content/themes/custom/another-mix/js/front.js?ver=1770034091 

/* Magnific Popup - v0.9.9 - 2013-11-15
* http://dimsemenov.com/plugins/magnific-popup/
* Copyright (c) 2013 Dmitry Semenov; */
(function(e){var t,n,i,o,r,a,s,l="Close",c="BeforeClose",d="AfterClose",u="BeforeAppend",p="MarkupParse",f="Open",m="Change",g="mfp",v="."+g,h="mfp-ready",C="mfp-removing",y="mfp-prevent-close",w=function(){},b=!!window.jQuery,I=e(window),x=function(e,n){t.ev.on(g+e+v,n)},k=function(t,n,i,o){var r=document.createElement("div");return r.className="mfp-"+t,i&&(r.innerHTML=i),o?n&&n.appendChild(r):(r=e(r),n&&r.appendTo(n)),r},T=function(n,i){t.ev.triggerHandler(g+n,i),t.st.callbacks&&(n=n.charAt(0).toLowerCase()+n.slice(1),t.st.callbacks[n]&&t.st.callbacks[n].apply(t,e.isArray(i)?i:[i]))},E=function(n){return n===s&&t.currTemplate.closeBtn||(t.currTemplate.closeBtn=e(t.st.closeMarkup.replace("%title%",t.st.tClose)),s=n),t.currTemplate.closeBtn},_=function(){e.magnificPopup.instance||(t=new w,t.init(),e.magnificPopup.instance=t)},S=function(){var e=document.createElement("p").style,t=["ms","O","Moz","Webkit"];if(void 0!==e.transition)return!0;for(;t.length;)if(t.pop()+"Transition"in e)return!0;return!1};w.prototype={constructor:w,init:function(){var n=navigator.appVersion;t.isIE7=-1!==n.indexOf("MSIE 7."),t.isIE8=-1!==n.indexOf("MSIE 8."),t.isLowIE=t.isIE7||t.isIE8,t.isAndroid=/android/gi.test(n),t.isIOS=/iphone|ipad|ipod/gi.test(n),t.supportsTransition=S(),t.probablyMobile=t.isAndroid||t.isIOS||/(Opera Mini)|Kindle|webOS|BlackBerry|(Opera Mobi)|(Windows Phone)|IEMobile/i.test(navigator.userAgent),i=e(document.body),o=e(document),t.popupsCache={}},open:function(n){var i;if(n.isObj===!1){t.items=n.items.toArray(),t.index=0;var r,s=n.items;for(i=0;s.length>i;i++)if(r=s[i],r.parsed&&(r=r.el[0]),r===n.el[0]){t.index=i;break}}else t.items=e.isArray(n.items)?n.items:[n.items],t.index=n.index||0;if(t.isOpen)return t.updateItemHTML(),void 0;t.types=[],a="",t.ev=n.mainEl&&n.mainEl.length?n.mainEl.eq(0):o,n.key?(t.popupsCache[n.key]||(t.popupsCache[n.key]={}),t.currTemplate=t.popupsCache[n.key]):t.currTemplate={},t.st=e.extend(!0,{},e.magnificPopup.defaults,n),t.fixedContentPos="auto"===t.st.fixedContentPos?!t.probablyMobile:t.st.fixedContentPos,t.st.modal&&(t.st.closeOnContentClick=!1,t.st.closeOnBgClick=!1,t.st.showCloseBtn=!1,t.st.enableEscapeKey=!1),t.bgOverlay||(t.bgOverlay=k("bg").on("click"+v,function(){t.close()}),t.wrap=k("wrap").attr("tabindex",-1).on("click"+v,function(e){t._checkIfClose(e.target)&&t.close()}),t.container=k("container",t.wrap)),t.contentContainer=k("content"),t.st.preloader&&(t.preloader=k("preloader",t.container,t.st.tLoading));var l=e.magnificPopup.modules;for(i=0;l.length>i;i++){var c=l[i];c=c.charAt(0).toUpperCase()+c.slice(1),t["init"+c].call(t)}T("BeforeOpen"),t.st.showCloseBtn&&(t.st.closeBtnInside?(x(p,function(e,t,n,i){n.close_replaceWith=E(i.type)}),a+=" mfp-close-btn-in"):t.wrap.append(E())),t.st.alignTop&&(a+=" mfp-align-top"),t.fixedContentPos?t.wrap.css({overflow:t.st.overflowY,overflowX:"hidden",overflowY:t.st.overflowY}):t.wrap.css({top:I.scrollTop(),position:"absolute"}),(t.st.fixedBgPos===!1||"auto"===t.st.fixedBgPos&&!t.fixedContentPos)&&t.bgOverlay.css({height:o.height(),position:"absolute"}),t.st.enableEscapeKey&&o.on("keyup"+v,function(e){27===e.keyCode&&t.close()}),I.on("resize"+v,function(){t.updateSize()}),t.st.closeOnContentClick||(a+=" mfp-auto-cursor"),a&&t.wrap.addClass(a);var d=t.wH=I.height(),u={};if(t.fixedContentPos&&t._hasScrollBar(d)){var m=t._getScrollbarSize();m&&(u.marginRight=m)}t.fixedContentPos&&(t.isIE7?e("body, html").css("overflow","hidden"):u.overflow="hidden");var g=t.st.mainClass;return t.isIE7&&(g+=" mfp-ie7"),g&&t._addClassToMFP(g),t.updateItemHTML(),T("BuildControls"),e("html").css(u),t.bgOverlay.add(t.wrap).prependTo(document.body),t._lastFocusedEl=document.activeElement,setTimeout(function(){t.content?(t._addClassToMFP(h),t._setFocus()):t.bgOverlay.addClass(h),o.on("focusin"+v,t._onFocusIn)},16),t.isOpen=!0,t.updateSize(d),T(f),n},close:function(){t.isOpen&&(T(c),t.isOpen=!1,t.st.removalDelay&&!t.isLowIE&&t.supportsTransition?(t._addClassToMFP(C),setTimeout(function(){t._close()},t.st.removalDelay)):t._close())},_close:function(){T(l);var n=C+" "+h+" ";if(t.bgOverlay.detach(),t.wrap.detach(),t.container.empty(),t.st.mainClass&&(n+=t.st.mainClass+" "),t._removeClassFromMFP(n),t.fixedContentPos){var i={marginRight:""};t.isIE7?e("body, html").css("overflow",""):i.overflow="",e("html").css(i)}o.off("keyup"+v+" focusin"+v),t.ev.off(v),t.wrap.attr("class","mfp-wrap").removeAttr("style"),t.bgOverlay.attr("class","mfp-bg"),t.container.attr("class","mfp-container"),!t.st.showCloseBtn||t.st.closeBtnInside&&t.currTemplate[t.currItem.type]!==!0||t.currTemplate.closeBtn&&t.currTemplate.closeBtn.detach(),t._lastFocusedEl&&e(t._lastFocusedEl).focus(),t.currItem=null,t.content=null,t.currTemplate=null,t.prevHeight=0,T(d)},updateSize:function(e){if(t.isIOS){var n=document.documentElement.clientWidth/window.innerWidth,i=window.innerHeight*n;t.wrap.css("height",i),t.wH=i}else t.wH=e||I.height();t.fixedContentPos||t.wrap.css("height",t.wH),T("Resize")},updateItemHTML:function(){var n=t.items[t.index];t.contentContainer.detach(),t.content&&t.content.detach(),n.parsed||(n=t.parseEl(t.index));var i=n.type;if(T("BeforeChange",[t.currItem?t.currItem.type:"",i]),t.currItem=n,!t.currTemplate[i]){var o=t.st[i]?t.st[i].markup:!1;T("FirstMarkupParse",o),t.currTemplate[i]=o?e(o):!0}r&&r!==n.type&&t.container.removeClass("mfp-"+r+"-holder");var a=t["get"+i.charAt(0).toUpperCase()+i.slice(1)](n,t.currTemplate[i]);t.appendContent(a,i),n.preloaded=!0,T(m,n),r=n.type,t.container.prepend(t.contentContainer),T("AfterChange")},appendContent:function(e,n){t.content=e,e?t.st.showCloseBtn&&t.st.closeBtnInside&&t.currTemplate[n]===!0?t.content.find(".mfp-close").length||t.content.append(E()):t.content=e:t.content="",T(u),t.container.addClass("mfp-"+n+"-holder"),t.contentContainer.append(t.content)},parseEl:function(n){var i=t.items[n],o=i.type;if(i=i.tagName?{el:e(i)}:{data:i,src:i.src},i.el){for(var r=t.types,a=0;r.length>a;a++)if(i.el.hasClass("mfp-"+r[a])){o=r[a];break}i.src=i.el.attr("data-mfp-src"),i.src||(i.src=i.el.attr("href"))}return i.type=o||t.st.type||"inline",i.index=n,i.parsed=!0,t.items[n]=i,T("ElementParse",i),t.items[n]},addGroup:function(e,n){var i=function(i){i.mfpEl=this,t._openClick(i,e,n)};n||(n={});var o="click.magnificPopup";n.mainEl=e,n.items?(n.isObj=!0,e.off(o).on(o,i)):(n.isObj=!1,n.delegate?e.off(o).on(o,n.delegate,i):(n.items=e,e.off(o).on(o,i)))},_openClick:function(n,i,o){var r=void 0!==o.midClick?o.midClick:e.magnificPopup.defaults.midClick;if(r||2!==n.which&&!n.ctrlKey&&!n.metaKey){var a=void 0!==o.disableOn?o.disableOn:e.magnificPopup.defaults.disableOn;if(a)if(e.isFunction(a)){if(!a.call(t))return!0}else if(a>I.width())return!0;n.type&&(n.preventDefault(),t.isOpen&&n.stopPropagation()),o.el=e(n.mfpEl),o.delegate&&(o.items=i.find(o.delegate)),t.open(o)}},updateStatus:function(e,i){if(t.preloader){n!==e&&t.container.removeClass("mfp-s-"+n),i||"loading"!==e||(i=t.st.tLoading);var o={status:e,text:i};T("UpdateStatus",o),e=o.status,i=o.text,t.preloader.html(i),t.preloader.find("a").on("click",function(e){e.stopImmediatePropagation()}),t.container.addClass("mfp-s-"+e),n=e}},_checkIfClose:function(n){if(!e(n).hasClass(y)){var i=t.st.closeOnContentClick,o=t.st.closeOnBgClick;if(i&&o)return!0;if(!t.content||e(n).hasClass("mfp-close")||t.preloader&&n===t.preloader[0])return!0;if(n===t.content[0]||e.contains(t.content[0],n)){if(i)return!0}else if(o&&e.contains(document,n))return!0;return!1}},_addClassToMFP:function(e){t.bgOverlay.addClass(e),t.wrap.addClass(e)},_removeClassFromMFP:function(e){this.bgOverlay.removeClass(e),t.wrap.removeClass(e)},_hasScrollBar:function(e){return(t.isIE7?o.height():document.body.scrollHeight)>(e||I.height())},_setFocus:function(){(t.st.focus?t.content.find(t.st.focus).eq(0):t.wrap).focus()},_onFocusIn:function(n){return n.target===t.wrap[0]||e.contains(t.wrap[0],n.target)?void 0:(t._setFocus(),!1)},_parseMarkup:function(t,n,i){var o;i.data&&(n=e.extend(i.data,n)),T(p,[t,n,i]),e.each(n,function(e,n){if(void 0===n||n===!1)return!0;if(o=e.split("_"),o.length>1){var i=t.find(v+"-"+o[0]);if(i.length>0){var r=o[1];"replaceWith"===r?i[0]!==n[0]&&i.replaceWith(n):"img"===r?i.is("img")?i.attr("src",n):i.replaceWith('<img src="'+n+'" class="'+i.attr("class")+'" />'):i.attr(o[1],n)}}else t.find(v+"-"+e).html(n)})},_getScrollbarSize:function(){if(void 0===t.scrollbarSize){var e=document.createElement("div");e.id="mfp-sbm",e.style.cssText="width: 99px; height: 99px; overflow: scroll; position: absolute; top: -9999px;",document.body.appendChild(e),t.scrollbarSize=e.offsetWidth-e.clientWidth,document.body.removeChild(e)}return t.scrollbarSize}},e.magnificPopup={instance:null,proto:w.prototype,modules:[],open:function(t,n){return _(),t=t?e.extend(!0,{},t):{},t.isObj=!0,t.index=n||0,this.instance.open(t)},close:function(){return e.magnificPopup.instance&&e.magnificPopup.instance.close()},registerModule:function(t,n){n.options&&(e.magnificPopup.defaults[t]=n.options),e.extend(this.proto,n.proto),this.modules.push(t)},defaults:{disableOn:0,key:null,midClick:!1,mainClass:"",preloader:!0,focus:"",closeOnContentClick:!1,closeOnBgClick:!0,closeBtnInside:!0,showCloseBtn:!0,enableEscapeKey:!0,modal:!1,alignTop:!1,removalDelay:0,fixedContentPos:"auto",fixedBgPos:"auto",overflowY:"auto",closeMarkup:'<button title="%title%" type="button" class="mfp-close">&times;</button>',tClose:"Close (Esc)",tLoading:"Loading..."}},e.fn.magnificPopup=function(n){_();var i=e(this);if("string"==typeof n)if("open"===n){var o,r=b?i.data("magnificPopup"):i[0].magnificPopup,a=parseInt(arguments[1],10)||0;r.items?o=r.items[a]:(o=i,r.delegate&&(o=o.find(r.delegate)),o=o.eq(a)),t._openClick({mfpEl:o},i,r)}else t.isOpen&&t[n].apply(t,Array.prototype.slice.call(arguments,1));else n=e.extend(!0,{},n),b?i.data("magnificPopup",n):i[0].magnificPopup=n,t.addGroup(i,n);return i};var P,O,z,M="inline",B=function(){z&&(O.after(z.addClass(P)).detach(),z=null)};e.magnificPopup.registerModule(M,{options:{hiddenClass:"hide",markup:"",tNotFound:"Content not found"},proto:{initInline:function(){t.types.push(M),x(l+"."+M,function(){B()})},getInline:function(n,i){if(B(),n.src){var o=t.st.inline,r=e(n.src);if(r.length){var a=r[0].parentNode;a&&a.tagName&&(O||(P=o.hiddenClass,O=k(P),P="mfp-"+P),z=r.after(O).detach().removeClass(P)),t.updateStatus("ready")}else t.updateStatus("error",o.tNotFound),r=e("<div>");return n.inlineElement=r,r}return t.updateStatus("ready"),t._parseMarkup(i,{},n),i}}});var F,H="ajax",L=function(){F&&i.removeClass(F)},A=function(){L(),t.req&&t.req.abort()};e.magnificPopup.registerModule(H,{options:{settings:null,cursor:"mfp-ajax-cur",tError:'<a href="%url%">The content</a> could not be loaded.'},proto:{initAjax:function(){t.types.push(H),F=t.st.ajax.cursor,x(l+"."+H,A),x("BeforeChange."+H,A)},getAjax:function(n){F&&i.addClass(F),t.updateStatus("loading");var o=e.extend({url:n.src,success:function(i,o,r){var a={data:i,xhr:r};T("ParseAjax",a),t.appendContent(e(a.data),H),n.finished=!0,L(),t._setFocus(),setTimeout(function(){t.wrap.addClass(h)},16),t.updateStatus("ready"),T("AjaxContentAdded")},error:function(){L(),n.finished=n.loadError=!0,t.updateStatus("error",t.st.ajax.tError.replace("%url%",n.src))}},t.st.ajax.settings);return t.req=e.ajax(o),""}}});var j,N=function(n){if(n.data&&void 0!==n.data.title)return n.data.title;var i=t.st.image.titleSrc;if(i){if(e.isFunction(i))return i.call(t,n);if(n.el)return n.el.attr(i)||""}return""};e.magnificPopup.registerModule("image",{options:{markup:'<div class="mfp-figure"><div class="mfp-close"></div><figure><div class="mfp-img"></div><figcaption><div class="mfp-bottom-bar"><div class="mfp-title"></div><div class="mfp-counter"></div></div></figcaption></figure></div>',cursor:"mfp-zoom-out-cur",titleSrc:"title",verticalFit:!0,tError:'<a href="%url%">The image</a> could not be loaded.'},proto:{initImage:function(){var e=t.st.image,n=".image";t.types.push("image"),x(f+n,function(){"image"===t.currItem.type&&e.cursor&&i.addClass(e.cursor)}),x(l+n,function(){e.cursor&&i.removeClass(e.cursor),I.off("resize"+v)}),x("Resize"+n,t.resizeImage),t.isLowIE&&x("AfterChange",t.resizeImage)},resizeImage:function(){var e=t.currItem;if(e&&e.img&&t.st.image.verticalFit){var n=0;t.isLowIE&&(n=parseInt(e.img.css("padding-top"),10)+parseInt(e.img.css("padding-bottom"),10)),e.img.css("max-height",t.wH-n)}},_onImageHasSize:function(e){e.img&&(e.hasSize=!0,j&&clearInterval(j),e.isCheckingImgSize=!1,T("ImageHasSize",e),e.imgHidden&&(t.content&&t.content.removeClass("mfp-loading"),e.imgHidden=!1))},findImageSize:function(e){var n=0,i=e.img[0],o=function(r){j&&clearInterval(j),j=setInterval(function(){return i.naturalWidth>0?(t._onImageHasSize(e),void 0):(n>200&&clearInterval(j),n++,3===n?o(10):40===n?o(50):100===n&&o(500),void 0)},r)};o(1)},getImage:function(n,i){var o=0,r=function(){n&&(n.img[0].complete?(n.img.off(".mfploader"),n===t.currItem&&(t._onImageHasSize(n),t.updateStatus("ready")),n.hasSize=!0,n.loaded=!0,T("ImageLoadComplete")):(o++,200>o?setTimeout(r,100):a()))},a=function(){n&&(n.img.off(".mfploader"),n===t.currItem&&(t._onImageHasSize(n),t.updateStatus("error",s.tError.replace("%url%",n.src))),n.hasSize=!0,n.loaded=!0,n.loadError=!0)},s=t.st.image,l=i.find(".mfp-img");if(l.length){var c=document.createElement("img");c.className="mfp-img",n.img=e(c).on("load.mfploader",r).on("error.mfploader",a),c.src=n.src,l.is("img")&&(n.img=n.img.clone()),n.img[0].naturalWidth>0&&(n.hasSize=!0)}return t._parseMarkup(i,{title:N(n),img_replaceWith:n.img},n),t.resizeImage(),n.hasSize?(j&&clearInterval(j),n.loadError?(i.addClass("mfp-loading"),t.updateStatus("error",s.tError.replace("%url%",n.src))):(i.removeClass("mfp-loading"),t.updateStatus("ready")),i):(t.updateStatus("loading"),n.loading=!0,n.hasSize||(n.imgHidden=!0,i.addClass("mfp-loading"),t.findImageSize(n)),i)}}});var W,R=function(){return void 0===W&&(W=void 0!==document.createElement("p").style.MozTransform),W};e.magnificPopup.registerModule("zoom",{options:{enabled:!1,easing:"ease-in-out",duration:300,opener:function(e){return e.is("img")?e:e.find("img")}},proto:{initZoom:function(){var e,n=t.st.zoom,i=".zoom";if(n.enabled&&t.supportsTransition){var o,r,a=n.duration,s=function(e){var t=e.clone().removeAttr("style").removeAttr("class").addClass("mfp-animated-image"),i="all "+n.duration/1e3+"s "+n.easing,o={position:"fixed",zIndex:9999,left:0,top:0,"-webkit-backface-visibility":"hidden"},r="transition";return o["-webkit-"+r]=o["-moz-"+r]=o["-o-"+r]=o[r]=i,t.css(o),t},d=function(){t.content.css("visibility","visible")};x("BuildControls"+i,function(){if(t._allowZoom()){if(clearTimeout(o),t.content.css("visibility","hidden"),e=t._getItemToZoom(),!e)return d(),void 0;r=s(e),r.css(t._getOffset()),t.wrap.append(r),o=setTimeout(function(){r.css(t._getOffset(!0)),o=setTimeout(function(){d(),setTimeout(function(){r.remove(),e=r=null,T("ZoomAnimationEnded")},16)},a)},16)}}),x(c+i,function(){if(t._allowZoom()){if(clearTimeout(o),t.st.removalDelay=a,!e){if(e=t._getItemToZoom(),!e)return;r=s(e)}r.css(t._getOffset(!0)),t.wrap.append(r),t.content.css("visibility","hidden"),setTimeout(function(){r.css(t._getOffset())},16)}}),x(l+i,function(){t._allowZoom()&&(d(),r&&r.remove(),e=null)})}},_allowZoom:function(){return"image"===t.currItem.type},_getItemToZoom:function(){return t.currItem.hasSize?t.currItem.img:!1},_getOffset:function(n){var i;i=n?t.currItem.img:t.st.zoom.opener(t.currItem.el||t.currItem);var o=i.offset(),r=parseInt(i.css("padding-top"),10),a=parseInt(i.css("padding-bottom"),10);o.top-=e(window).scrollTop()-r;var s={width:i.width(),height:(b?i.innerHeight():i[0].offsetHeight)-a-r};return R()?s["-moz-transform"]=s.transform="translate("+o.left+"px,"+o.top+"px)":(s.left=o.left,s.top=o.top),s}}});var Z="iframe",q="//about:blank",D=function(e){if(t.currTemplate[Z]){var n=t.currTemplate[Z].find("iframe");n.length&&(e||(n[0].src=q),t.isIE8&&n.css("display",e?"block":"none"))}};e.magnificPopup.registerModule(Z,{options:{markup:'<div class="mfp-iframe-scaler"><div class="mfp-close"></div><iframe class="mfp-iframe" src="//about:blank" frameborder="0" allowfullscreen></iframe></div>',srcAction:"iframe_src",patterns:{youtube:{index:"youtube.com",id:"v=",src:"//www.youtube.com/embed/%id%?autoplay=1"},vimeo:{index:"vimeo.com/",id:"/",src:"//player.vimeo.com/video/%id%?autoplay=1"},gmaps:{index:"//maps.google.",src:"%id%&output=embed"}}},proto:{initIframe:function(){t.types.push(Z),x("BeforeChange",function(e,t,n){t!==n&&(t===Z?D():n===Z&&D(!0))}),x(l+"."+Z,function(){D()})},getIframe:function(n,i){var o=n.src,r=t.st.iframe;e.each(r.patterns,function(){return o.indexOf(this.index)>-1?(this.id&&(o="string"==typeof this.id?o.substr(o.lastIndexOf(this.id)+this.id.length,o.length):this.id.call(this,o)),o=this.src.replace("%id%",o),!1):void 0});var a={};return r.srcAction&&(a[r.srcAction]=o),t._parseMarkup(i,a,n),t.updateStatus("ready"),i}}});var K=function(e){var n=t.items.length;return e>n-1?e-n:0>e?n+e:e},Y=function(e,t,n){return e.replace(/%curr%/gi,t+1).replace(/%total%/gi,n)};e.magnificPopup.registerModule("gallery",{options:{enabled:!1,arrowMarkup:'<button title="%title%" type="button" class="mfp-arrow mfp-arrow-%dir%"></button>',preload:[0,2],navigateByImgClick:!0,arrows:!0,tPrev:"Previous (Left arrow key)",tNext:"Next (Right arrow key)",tCounter:"%curr% of %total%"},proto:{initGallery:function(){var n=t.st.gallery,i=".mfp-gallery",r=Boolean(e.fn.mfpFastClick);return t.direction=!0,n&&n.enabled?(a+=" mfp-gallery",x(f+i,function(){n.navigateByImgClick&&t.wrap.on("click"+i,".mfp-img",function(){return t.items.length>1?(t.next(),!1):void 0}),o.on("keydown"+i,function(e){37===e.keyCode?t.prev():39===e.keyCode&&t.next()})}),x("UpdateStatus"+i,function(e,n){n.text&&(n.text=Y(n.text,t.currItem.index,t.items.length))}),x(p+i,function(e,i,o,r){var a=t.items.length;o.counter=a>1?Y(n.tCounter,r.index,a):""}),x("BuildControls"+i,function(){if(t.items.length>1&&n.arrows&&!t.arrowLeft){var i=n.arrowMarkup,o=t.arrowLeft=e(i.replace(/%title%/gi,n.tPrev).replace(/%dir%/gi,"left")).addClass(y),a=t.arrowRight=e(i.replace(/%title%/gi,n.tNext).replace(/%dir%/gi,"right")).addClass(y),s=r?"mfpFastClick":"click";o[s](function(){t.prev()}),a[s](function(){t.next()}),t.isIE7&&(k("b",o[0],!1,!0),k("a",o[0],!1,!0),k("b",a[0],!1,!0),k("a",a[0],!1,!0)),t.container.append(o.add(a))}}),x(m+i,function(){t._preloadTimeout&&clearTimeout(t._preloadTimeout),t._preloadTimeout=setTimeout(function(){t.preloadNearbyImages(),t._preloadTimeout=null},16)}),x(l+i,function(){o.off(i),t.wrap.off("click"+i),t.arrowLeft&&r&&t.arrowLeft.add(t.arrowRight).destroyMfpFastClick(),t.arrowRight=t.arrowLeft=null}),void 0):!1},next:function(){t.direction=!0,t.index=K(t.index+1),t.updateItemHTML()},prev:function(){t.direction=!1,t.index=K(t.index-1),t.updateItemHTML()},goTo:function(e){t.direction=e>=t.index,t.index=e,t.updateItemHTML()},preloadNearbyImages:function(){var e,n=t.st.gallery.preload,i=Math.min(n[0],t.items.length),o=Math.min(n[1],t.items.length);for(e=1;(t.direction?o:i)>=e;e++)t._preloadItem(t.index+e);for(e=1;(t.direction?i:o)>=e;e++)t._preloadItem(t.index-e)},_preloadItem:function(n){if(n=K(n),!t.items[n].preloaded){var i=t.items[n];i.parsed||(i=t.parseEl(n)),T("LazyLoad",i),"image"===i.type&&(i.img=e('<img class="mfp-img" />').on("load.mfploader",function(){i.hasSize=!0}).on("error.mfploader",function(){i.hasSize=!0,i.loadError=!0,T("LazyLoadError",i)}).attr("src",i.src)),i.preloaded=!0}}}});var U="retina";e.magnificPopup.registerModule(U,{options:{replaceSrc:function(e){return e.src.replace(/\.\w+$/,function(e){return"@2x"+e})},ratio:1},proto:{initRetina:function(){if(window.devicePixelRatio>1){var e=t.st.retina,n=e.ratio;n=isNaN(n)?n():n,n>1&&(x("ImageHasSize."+U,function(e,t){t.img.css({"max-width":t.img[0].naturalWidth/n,width:"100%"})}),x("ElementParse."+U,function(t,i){i.src=e.replaceSrc(i,n)}))}}}}),function(){var t=1e3,n="ontouchstart"in window,i=function(){I.off("touchmove"+r+" touchend"+r)},o="mfpFastClick",r="."+o;e.fn.mfpFastClick=function(o){return e(this).each(function(){var a,s=e(this);if(n){var l,c,d,u,p,f;s.on("touchstart"+r,function(e){u=!1,f=1,p=e.originalEvent?e.originalEvent.touches[0]:e.touches[0],c=p.clientX,d=p.clientY,I.on("touchmove"+r,function(e){p=e.originalEvent?e.originalEvent.touches:e.touches,f=p.length,p=p[0],(Math.abs(p.clientX-c)>10||Math.abs(p.clientY-d)>10)&&(u=!0,i())}).on("touchend"+r,function(e){i(),u||f>1||(a=!0,e.preventDefault(),clearTimeout(l),l=setTimeout(function(){a=!1},t),o())})})}s.on("click"+r,function(){a||o()})})},e.fn.destroyMfpFastClick=function(){e(this).off("touchstart"+r+" click"+r),n&&I.off("touchmove"+r+" touchend"+r)}}(),_()})(window.jQuery||window.Zepto);

/*
* jQuery Easing v1.3 - http://gsgd.co.uk/sandbox/jquery/easing/
*
* Uses the built in easing capabilities added In jQuery 1.1
* to offer multiple easing options
*
* TERMS OF USE - jQuery Easing
*
* Open source under the BSD License.
*
* Copyright © 2008 George McGinley Smith
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice, this list of
* conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice, this list
* of conditions and the following disclaimer in the documentation and/or other materials
* provided with the distribution.
*
* Neither the name of the author nor the names of contributors may be used to endorse
* or promote products derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
*  COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
*  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
*  GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
*  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
* OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/

// t: current time, b: begInnIng value, c: change In value, d: duration
jQuery.easing['jswing']=jQuery.easing['swing'];jQuery.extend(jQuery.easing,{def:'easeOutQuad',swing:function(x,t,b,c,d){return jQuery.easing[jQuery.easing.def](x,t,b,c,d)},easeInQuad:function(x,t,b,c,d){return c*(t/=d)*t+b},easeOutQuad:function(x,t,b,c,d){return-c*(t/=d)*(t-2)+b},easeInOutQuad:function(x,t,b,c,d){if((t/=d/2)<1)return c/2*t*t+b;return-c/2*((--t)*(t-2)-1)+b},easeInCubic:function(x,t,b,c,d){return c*(t/=d)*t*t+b},easeOutCubic:function(x,t,b,c,d){return c*((t=t/d-1)*t*t+1)+b},easeInOutCubic:function(x,t,b,c,d){if((t/=d/2)<1)return c/2*t*t*t+b;return c/2*((t-=2)*t*t+2)+b},easeInQuart:function(x,t,b,c,d){return c*(t/=d)*t*t*t+b},easeOutQuart:function(x,t,b,c,d){return-c*((t=t/d-1)*t*t*t-1)+b},easeInOutQuart:function(x,t,b,c,d){if((t/=d/2)<1)return c/2*t*t*t*t+b;return-c/2*((t-=2)*t*t*t-2)+b},easeInQuint:function(x,t,b,c,d){return c*(t/=d)*t*t*t*t+b},easeOutQuint:function(x,t,b,c,d){return c*((t=t/d-1)*t*t*t*t+1)+b},easeInOutQuint:function(x,t,b,c,d){if((t/=d/2)<1)return c/2*t*t*t*t*t+b;return c/2*((t-=2)*t*t*t*t+2)+b},easeInSine:function(x,t,b,c,d){return-c*Math.cos(t/d*(Math.PI/2))+c+b},easeOutSine:function(x,t,b,c,d){return c*Math.sin(t/d*(Math.PI/2))+b},easeInOutSine:function(x,t,b,c,d){return-c/2*(Math.cos(Math.PI*t/d)-1)+b},easeInExpo:function(x,t,b,c,d){return(t==0)?b:c*Math.pow(2,10*(t/d-1))+b},easeOutExpo:function(x,t,b,c,d){return(t==d)?b+c:c*(-Math.pow(2,-10*t/d)+1)+b},easeInOutExpo:function(x,t,b,c,d){if(t==0)return b;if(t==d)return b+c;if((t/=d/2)<1)return c/2*Math.pow(2,10*(t-1))+b;return c/2*(-Math.pow(2,-10*--t)+2)+b},easeInCirc:function(x,t,b,c,d){return-c*(Math.sqrt(1-(t/=d)*t)-1)+b},easeOutCirc:function(x,t,b,c,d){return c*Math.sqrt(1-(t=t/d-1)*t)+b},easeInOutCirc:function(x,t,b,c,d){if((t/=d/2)<1)return-c/2*(Math.sqrt(1-t*t)-1)+b;return c/2*(Math.sqrt(1-(t-=2)*t)+1)+b},easeInElastic:function(x,t,b,c,d){var s=1.70158;var p=0;var a=c;if(t==0)return b;if((t/=d)==1)return b+c;if(!p)p=d*.3;if(a<Math.abs(c)){a=c;var s=p/4}else var s=p/(2*Math.PI)*Math.asin(c/a);return-(a*Math.pow(2,10*(t-=1))*Math.sin((t*d-s)*(2*Math.PI)/p))+b},easeOutElastic:function(x,t,b,c,d){var s=1.70158;var p=0;var a=c;if(t==0)return b;if((t/=d)==1)return b+c;if(!p)p=d*.3;if(a<Math.abs(c)){a=c;var s=p/4}else var s=p/(2*Math.PI)*Math.asin(c/a);return a*Math.pow(2,-10*t)*Math.sin((t*d-s)*(2*Math.PI)/p)+c+b},easeInOutElastic:function(x,t,b,c,d){var s=1.70158;var p=0;var a=c;if(t==0)return b;if((t/=d/2)==2)return b+c;if(!p)p=d*(.3*1.5);if(a<Math.abs(c)){a=c;var s=p/4}else var s=p/(2*Math.PI)*Math.asin(c/a);if(t<1)return-.5*(a*Math.pow(2,10*(t-=1))*Math.sin((t*d-s)*(2*Math.PI)/p))+b;return a*Math.pow(2,-10*(t-=1))*Math.sin((t*d-s)*(2*Math.PI)/p)*.5+c+b},easeInBack:function(x,t,b,c,d,s){if(s==undefined)s=1.70158;return c*(t/=d)*t*((s+1)*t-s)+b},easeOutBack:function(x,t,b,c,d,s){if(s==undefined)s=1.70158;return c*((t=t/d-1)*t*((s+1)*t+s)+1)+b},easeInOutBack:function(x,t,b,c,d,s){if(s==undefined)s=1.70158;if((t/=d/2)<1)return c/2*(t*t*(((s*=(1.525))+1)*t-s))+b;return c/2*((t-=2)*t*(((s*=(1.525))+1)*t+s)+2)+b},easeInBounce:function(x,t,b,c,d){return c-jQuery.easing.easeOutBounce(x,d-t,0,c,d)+b},easeOutBounce:function(x,t,b,c,d){if((t/=d)<(1/2.75)){return c*(7.5625*t*t)+b}else if(t<(2/2.75)){return c*(7.5625*(t-=(1.5/2.75))*t+.75)+b}else if(t<(2.5/2.75)){return c*(7.5625*(t-=(2.25/2.75))*t+.9375)+b}else{return c*(7.5625*(t-=(2.625/2.75))*t+.984375)+b}},easeInOutBounce:function(x,t,b,c,d){if(t<d/2)return jQuery.easing.easeInBounce(x,t*2,0,c,d)*.5+b;return jQuery.easing.easeOutBounce(x,t*2-d,0,c,d)*.5+c*.5+b}});


jQuery('html').addClass('twex_theme');

var vrv_header_height=0;
var scrollbar_width = 0;
if (jQuery(window).width() < (768 - scrollbar_width)) {
    if (!jQuery('html').hasClass('menu_at_top')) {
        jQuery('html').addClass('menu_at_top');
        vrv_header_height = 68;
    }
}
else {
    if (jQuery('html').hasClass('menu_at_top')) {
        jQuery('html').removeClass('menu_at_top');
    }
}

function twex_init() {

    //https://2020exhibits.com/#clientLoginModal

    var hash = jQuery(location).prop('hash').substr(1);

    if (hash && hash=="clientLoginModal") {
        console.log(hash);
        jQuery('#menu-main-menu a[href="#clientLoginModal"]').trigger('click');
    }
    console.log("hash");

    var twex_on_mobile = is_mobile() === true ? true : false;

    jQuery(window).on('scroll', function () {
        //BACK TO TOP BUTTON
        if (jQuery(window).scrollTop() >= 240) {
            jQuery('#twex_to_top').addClass('twex_top_shown');
        }
        else {
            jQuery('#twex_to_top').removeClass('twex_top_shown');
        }
    });
    jQuery(window).trigger('scroll');

    //BACK TO TOP BUTTON
    jQuery('#twex_to_top').on('click', function (e) {
        e.preventDefault();
        jQuery('html,body').stop().animate({
            'scrollTop': 0
        }, 1200, 'easeInOutExpo'
        );
    });

    //HEXADECIMAL TO RGB:#CCCCCC=>rgb(204,204,204)
    function hex2rgb(hexStr, alpha) {
        "use strict";
        var hex = parseInt(hexStr.substring(1), 16);
        var r = (hex & 0xff0000) >> 16;
        var g = (hex & 0x00ff00) >> 8;
        var b = hex & 0x0000ff;
        if (alpha > 1) {
            alpha = alpha / 100;
        }
        return "rgba(" + [r, g, b] + "," + alpha + ")";
    }

    //PORTFOLIO FUNCTIONS
    var curr_filter = "p_all";
    var curr_filter_blog = "b_all";
    function init_portfolio() {
        jQuery('.twex_folio_filter .p_filter>a').on('click', function (e) {
            e.preventDefault();
            jQuery(this).parent().parent().children('.p_filter').removeClass('active');
            curr_filter = jQuery(this).attr('data-filter').split(' ');
            jQuery(this).parent().addClass('active');
            setTimeout(function () {
                jQuery(window).trigger("smartresize");
            }, 5);
            var $thisa = jQuery(this).parent().parent().parent().parent().parent().children('.folio_masonry');
            $thisa.isotope({
                filter: '.' + curr_filter
            });
            setTimeout(function () {
                var elems = $thisa.isotope('getFilteredItemElements');
                jQuery($thisa).find('.portfolio_entry_li').removeClass('twex_inactive');
                jQuery($thisa).find('.portfolio_entry_li').not(jQuery(elems)).addClass('twex_inactive');
                //console.log (jQuery($thisa).find('.portfolio_entry_li').not(jQuery(elems)));
            }, 5);
        });
        jQuery('#twex_related_grid').find('.grid_image').each(function () {
            jQuery(this).attr('src', jQuery(this).attr('data-src'));
        });
        var img_load = imagesLoaded('#twex_related_grid');
        img_load.on('always', function () {
            jQuery('#twex_related_grid').find('.centerized_father').each(function () {
                jQuery(this).height(jQuery(this).closest(".portfolio_entry_li").innerHeight());
            });
            jQuery('#twex_related_grid').find('.twex_video-bg').each(function () {
                var $par_video = jQuery(this);
                $par_video.on("play", function () {
                    $par_video.css({ 'width': '' });
                    $par_video.css({ 'height': '' });
                    $par_video.css({ 'width': $par_video.closest('.grid_image_wrapper').children('.twex_image_parent').width() });
                    if ($par_video.height() < $par_video.closest('.grid_image_wrapper').children('.twex_image_parent').outerHeight()) {// || jQuery('html').hasClass('twex_edge')
                        $par_video.css({ 'width': '' });
                        $par_video.css({ 'height': $par_video.closest('.grid_image_wrapper').children('.twex_image_parent').outerHeight() });
                    }
                });
            });
            setTimeout(function () {
                jQuery(window).trigger('debouncedresize');
            }, 5);
        });
        jQuery('.portfolio_entry_li,.pf_load_more,.blog_load_more,.blog_hover').on({
            mouseenter: function () {
                if (!twex_on_mobile) {
                    jQuery(this).addClass('hover_trigger hover');
                    jQuery(this).closest('.folio_menu').addClass('twex_hover_folio');
                    if (jQuery(this).hasClass('portfolio_entry_li') && jQuery(this).closest('.recentfolio_ul_wp').hasClass('vrv_autoplay') && jQuery(this).find('.twex_video-bg').length && jQuery(this).closest('.iso_folio').hasClass('folio_masonry')) {
                        if (!jQuery(this).closest('.recentfolio_ul_wp').hasClass('vrv_resume')) {
                            jQuery(this).find('.twex_video-bg').get(0).currentTime = 0;
                        }
                        var $par_video = jQuery(this).find('.twex_video-bg');
                        var playPromise = $par_video.get(0).play();
                        if (playPromise !== undefined) {
                            playPromise.then(function () {
                                $par_video.get(0).play();
                                $par_video.closest('.portfolio_entry_li').find('.prk_play_promise').addClass('prk_play_hide');
                            }).catch(function (error) {
                                // Automatic playback failed.
                                // Show a UI element to let the user manually start playback.
                                if (!$par_video.closest('.portfolio_entry_li').hasClass('prk_with_promise')) {
                                    $par_video.closest('.portfolio_entry_li').addClass('prk_with_promise');
                                    $par_video.closest('.portfolio_entry_li').find('.twex_image_parent').prepend('<div class="prk_play_promise"><svg class="video-overlay-play-button" viewBox="0 0 200 200" alt="Play video"><circle cx="100" cy="100" r="90" fill="none" stroke-width="15" stroke="#fff"/><polygon points="70, 55 70, 145 145, 100" fill="#fff"/></svg></div>');
                                    $par_video.closest('.portfolio_entry_li').find('.prk_play_promise').on('click', function (event) {
                                        $par_video.get(0).play();
                                        $par_video.closest('.portfolio_entry_li').find('.prk_play_promise').addClass('prk_play_hide');
                                        $par_video.closest('.portfolio_entry_li').removeClass('prk_with_promise');
                                        $par_video.on("play", function () {
                                            $par_video.css({ 'width': '' });
                                            $par_video.css({ 'height': '' });
                                            $par_video.css({ 'width': $par_video.closest('.grid_image_wrapper').children('.twex_image_parent').width() });
                                            if ($par_video.height() < $par_video.closest('.grid_image_wrapper').children('.twex_image_parent').outerHeight()) {
                                                $par_video.css({ 'width': '' });
                                                $par_video.css({ 'height': $par_video.closest('.grid_image_wrapper').children('.twex_image_parent').outerHeight() });
                                            }
                                        });
                                    });
                                }
                            });
                        }
                    }
                }
            },
            mouseleave: function () {
                if (!twex_on_mobile) {
                    jQuery(this).removeClass('hover_trigger');
                    jQuery(this).removeClass('hover');
                    jQuery(this).closest('.folio_menu').removeClass('twex_hover_folio');
                    if (jQuery(this).hasClass('portfolio_entry_li') && jQuery(this).closest('.recentfolio_ul_wp').hasClass('vrv_autoplay') && jQuery(this).find('.twex_video-bg').length && jQuery(this).closest('.iso_folio').hasClass('folio_masonry')) {
                        jQuery(this).find('.twex_video-bg').get(0).pause();
                    }
                }
            }
        });
        jQuery('.folio_masonry.per_init').each(function () {
            var $container = jQuery(this);
            $container.removeClass('per_init');
            $container.fitVids({ customSelector: "iframe[src^='https://media.flixel.com']" });
            $container.find('.centerized_father').each(function () {
                jQuery(this).height(jQuery(this).closest(".portfolio_entry_li").height());
            });

            jQuery('#caseStudySelector').on('change',function(){
                jQuery('.well.well-small').hide();
                jQuery('.' + jQuery(this).val()).show();
                        
                if(jQuery(this).val() == 'span6'){
                    jQuery('.well.well-small').show(); 
                }
                setTimeout(function () {
                    jQuery(window).trigger('debouncedresize');
                    $container.isotope('layout');
                    //scroll_listener();
                }, 30);
                setTimeout(function () {
                    jQuery(window).trigger('debouncedresize');
                    $container.isotope('layout');
                    //scroll_listener();
                }, 300);
            });

            jQuery('#myTab a').on('click',function (e) {
                e.preventDefault();
                jQuery(this).tab('show');
                setTimeout(function () {
                    jQuery(window).trigger('debouncedresize');
                    $container.isotope('layout');
                    //scroll_listener();
                }, 30);
                setTimeout(function () {
                    jQuery(window).trigger('debouncedresize');
                    $container.isotope('layout');
                    //scroll_listener();
                }, 300);
            });

            jQuery('#homeTabs a').on('click',function (e) {
                e.preventDefault();
                jQuery(this).tab('show');
                setTimeout(function () {
                    jQuery(window).trigger('debouncedresize');
                    $container.isotope('layout');
                    //scroll_listener();
                }, 30);
                setTimeout(function () {
                    jQuery(window).trigger('debouncedresize');
                    $container.isotope('layout');
                    //scroll_listener();
                }, 300);
            });

            var img_load = imagesLoaded($container);
            img_load.on('always', function () {
                if (!$container.hasClass('default_colored_th')) {
                    jQuery('.portfolio_entry_li').each(function () {
                        if (jQuery(this).attr('data-color') !== undefined && jQuery(this).attr('data-color') !== "default") {
                            jQuery(this).find('.grid_colored_block').css({ 'background-color': hex2rgb(jQuery(this).attr('data-color'), 86) });
                            jQuery(this).find('.lone_linker a').css({ 'color': hex2rgb(jQuery(this).attr('data-color'), 86) });
                            jQuery(this).find('.lone_linker a').attr('data-color', jQuery(this).attr('data-color'));
                            jQuery(this).find('.vrv_thumb_tag').css({ 'background-color': jQuery(this).attr('data-color') });
                        }
                    });
                }
                $container.css({ 'display': 'block' });
                var initial_filter = '*'
                if ($container.attr('data-filter') !== undefined && $container.attr('data-filter') !== "") {
                    initial_filter = $container.attr('data-filter');
                }

                $container.isotope({
                    itemSelector: '.portfolio_entry_li',
                    masonry: { columnWidth: '.grid-sizer' },
                    transitionDuration: '0.6s',
                    filter: initial_filter,
                });
                //ADJUST FILTER DISPLAY
                if (initial_filter !== '*') {
                    $container.parent().find('.p_filter').removeClass('active');
                    curr_filter = initial_filter.substr(1);
                    $container.parent().find('.twex_folio_filter').find(initial_filter).parent().addClass('active');
                    //jQuery(this).parent().addClass('active');
                }
                $container.find('.centerized_father').each(function () {
                    jQuery(this).height(jQuery(this).closest(".portfolio_entry_li").height());
                });
                $container.isotope('on', 'layoutComplete', function () {
                    $container.find('.centerized_father').each(function () {
                        jQuery(this).height(jQuery(this).closest(".portfolio_entry_li").height());
                    });
                });
                setTimeout(function () {
                    jQuery(window).trigger('debouncedresize');
                    $container.isotope('layout');
                    //scroll_listener();
                }, 30);
            });
            $container.find('.twex_video-bg').each(function () {
                var $par_video = jQuery(this);
                $par_video.on("play", function () {
                    $par_video.css({ 'width': '' });
                    $par_video.css({ 'height': '' });
                    $par_video.css({ 'width': $par_video.closest('.grid_image_wrapper').children('.twex_image_parent').width() });
                    if ($par_video.height() < $par_video.closest('.grid_image_wrapper').children('.twex_image_parent').outerHeight()) {
                        $par_video.css({ 'width': '' });
                        $par_video.css({ 'height': $par_video.closest('.grid_image_wrapper').children('.twex_image_parent').outerHeight() });
                    }
                });
                //FORCE VIDEO RESIZE IF AUTOPLAY IS OFF
                if (jQuery(this).closest('.recentfolio_ul_wp').hasClass('vrv_autoplay')) {
                    var playPromise = $par_video.get(0).play();
                    if (playPromise !== undefined) {
                        playPromise.then(function () {
                            $par_video.get(0).pause();
                            $par_video.closest('.portfolio_entry_li').find('.prk_play_promise').addClass('prk_play_hide');
                        }).catch(function (error) {
                            // Automatic playback failed.
                            // Show a UI element to let the user manually start playback.
                            if (!$par_video.closest('.portfolio_entry_li').hasClass('prk_with_promise')) {
                                $par_video.closest('.portfolio_entry_li').addClass('prk_with_promise');
                                console.log($par_video.closest('.portfolio_entry_li').find('.twex_image_parent'));
                                $par_video.closest('.portfolio_entry_li').find('.twex_image_parent').prepend('<div class="prk_play_promise"><svg class="video-overlay-play-button" viewBox="0 0 200 200" alt="Play video"><circle cx="100" cy="100" r="90" fill="none" stroke-width="15" stroke="#fff"/><polygon points="70, 55 70, 145 145, 100" fill="#fff"/></svg></div>');
                                $par_video.closest('.portfolio_entry_li').find('.prk_play_promise').on('click', function (event) {
                                    $par_video.get(0).play();
                                    $par_video.closest('.portfolio_entry_li').find('.prk_play_promise').addClass('prk_play_hide');
                                    $par_video.closest('.portfolio_entry_li').removeClass('prk_with_promise');
                                    $par_video.on("play", function () {
                                        $par_video.css({ 'width': '' });
                                        $par_video.css({ 'height': '' });
                                        $par_video.css({ 'width': $par_video.parent().parent().width() });
                                        if ($par_video.height() < $par_video.parent().parent().outerHeight()) {
                                            $par_video.css({ 'width': '' });
                                            $par_video.css({ 'height': $par_video.parent().parent().outerHeight() });
                                        }
                                    });
                                });
                            }
                        });
                    }
                    //HIDE ROLLOVER BACKGROUND
                    jQuery(this).closest('.portfolio_entry_li').find('.grid_colored_block').css({ 'visibility': 'hidden' });
                }
            });
            jQuery(window).on('debouncedresize', function (event) {

                jQuery('.grid_image_wrapper .twex_video-bg,.recentfolio_ul_wp.vrv_autoplay .twex_video-bg').each(function () {

                    var $par_video = jQuery(this);
                    //console.log($par_video.closest('.portfolio_entry_li').attr('id'));
                    $par_video.css({ 'width': '' });
                    $par_video.css({ 'height': '' });
                    $par_video.css({ 'width': $par_video.closest('.grid_image_wrapper').children('.twex_image_parent').width() });
                    if ($par_video.height() < $par_video.closest('.grid_image_wrapper').children('.twex_image_parent').outerHeight()) {
                        $par_video.css({ 'width': '' });
                        $par_video.css({ 'height': $par_video.closest('.grid_image_wrapper').children('.twex_image_parent').outerHeight() });
                    }
                });

            });
            jQuery(window).trigger('debouncedresize');

            var exb_items_v2 = $container.find('.portfolio_entry_li').length;
            var exb_items_nodes = $container.find('.portfolio_entry_li');
            console.log('Total items: ' + exb_items_v2);
            if (exb_items_v2>12) {
                var max_pages_v2 = Math.ceil(exb_items_v2 / 12);
                jQuery('<div class="exb_load_more_wrapper"><div class="exb_load_more btn-primary">Load More</div></div>').insertAfter($container);
                var exb_page_v2 = 1;
                // Initially hide all items beyond the first 12
                exb_items_nodes.slice(12).hide();
                // On click of Load More button
                $container.parent().find('.exb_load_more').on('click', function () {
                    if (exb_page_v2 >= max_pages_v2) {
                        $container.find('.exb_load_more').html('<span class="noMoreItems">No more items to load</span>');
                        return;
                    }
                    console.log('Loading page ' + (exb_page_v2 + 1) + ' of ' + max_pages_v2);
                    var exb_start_v2 = exb_page_v2 * 12;
                    var exb_end_v2 = exb_start_v2 + 12;
                    exb_items_nodes.slice(exb_start_v2, exb_end_v2).fadeIn(800);
                    exb_page_v2++;
                    if (exb_page_v2 >= max_pages_v2) {
                        $container.parent().find('.exb_load_more').html('<span class="noMoreItems">No more items to load</span>');
                    }

                    setTimeout(function () {
                        jQuery(window).trigger('debouncedresize');
                        $container.isotope('layout');
                        //scroll_listener();
                    }, 300);

                });
            }

        });

        

        jQuery('#vrv_close_portfolio').attr({ 'data-color': 'default' });
        jQuery('.pirenko_portfolios.featured_color').each(function () {
            var faster_color = jQuery(this).attr('data-color');
            jQuery(this).find('#half-entry-right a').not(jQuery(this).find('#half-entry-right #single_folio_sharer a,.theme_button a,.colored_theme_button a')).css({ 'color': faster_color });
            jQuery(this).find('#single_meta_header a,.pirenko_highlighted,.theme_button a,#single_meta_header .prk_prev_folio,#single_meta_header .prk_next_folio,.colored_theme_button a').attr('data-color', faster_color);
            jQuery('#prk_full_folio.featured_color #single_entry_content a,#single_blog_meta a,.twex_info_block a').css({ 'color': faster_color });
            jQuery('#vrv_close_portfolio').attr({ 'data-color': faster_color });
            jQuery('#half-entry-right').find('.colored_theme_button a').css({ 'background-color': faster_color, 'border-color': faster_color });
            jQuery(this).find('.prk_blockquote.plain.vrv_df').css('border-color', faster_color);
            jQuery(this).find('.prk_blockquote.vrv_active_colored.vrv_df').css('background-color', faster_color);
        });
        if (jQuery('#twex_main_wrapper').hasClass('vrv_showing_ajax')) {
            jQuery('#single_meta_header a,#twex_related_grid a').addClass('overlayed_anchor per_init');
        }
        else {
            jQuery('#single_meta_header a,#twex_related_grid a,#twex_to_parent a').addClass('twex_anchor');
        }

        jQuery('.twex_iso_gallery.per_init').each(function () {
            var $container_gals = jQuery(this);
            var iso_gallery_gutter = parseInt($container_gals.attr('data-margin'), 10);
            $container_gals.children('.portfolio_entry_li').find('.grid_image').each(function () {
                jQuery(this).attr('src', jQuery(this).attr('data-src'));
            });
            setTimeout(function () {
                var img_load = imagesLoaded($container_gals);
                img_load.on('always', function () {
                    $container_gals.removeClass('per_init');
                    if (iso_gallery_gutter !== 0) {
                        $container_gals.css({ 'margin-right': -iso_gallery_gutter });
                    }
                    else {
                        $container_gals.css({ 'margin-right': '' });
                    }
                    if (!jQuery('#filter_top').length) {
                        $container_gals.css({ 'margin-top': iso_gallery_gutter });
                    }
                    $container_gals.find('.centerized_father').each(function () {
                        jQuery(this).height(jQuery(this).closest(".portfolio_entry_li").height());
                    });
                    $container_gals.isotope({
                        itemSelector: '.portfolio_entry_li',
                        masonry: { columnWidth: '.grid-sizer' },
                        transitionDuration: '0.6s'
                    });
                    $container_gals.find('.centerized_father').each(function () {
                        jQuery(this).height(jQuery(this).closest(".portfolio_entry_li").height());
                    });
                    $container_gals.isotope('on', 'layoutComplete', function () {
                        $container_gals.find('.centerized_father').each(function () {
                            jQuery(this).height(jQuery(this).closest(".portfolio_entry_li").height());
                        });
                    });
                    setTimeout(function () {
                        $container_gals.isotope('layout');
                    }, 30);
                });
            }, 15);
        });
    }
    init_portfolio();

    jQuery('span.viewBy a').click(function(e){
		e.preventDefault();
		jQuery('span.viewBy a').removeClass('active');
		jQuery(this).addClass('active');
		
		if(jQuery(this).hasClass('viewPreview')){
			jQuery('.view-preview').fadeIn();
			$jQuery('.view-list').fadeOut('fast');
		} else {
			jQuery('.view-preview').fadeOut('fast')
			jQuery('.view-list').fadeIn();
		}
	});

	

    jQuery('.testimonials_slider.per_init,.comments_slider.per_init,.featured_posts_ul_slider.per_init,.vrv_insta_slider .vrv_instagram').each(function () {
        var $this_slider = jQuery(this);
        $this_slider.removeClass('per_init');
        if ($this_slider.find('.item').length > 1 && $this_slider.attr('data-autoplay') === "true") {
            var autoplayer = $this_slider.attr('data-delay');
        }
        else {
            var autoplayer = false;
        }
        var img_load = imagesLoaded($this_slider);
        img_load.on('always', function () {
            setTimeout(function () {
                $this_slider.owlCarousel({
                    autoPlay: autoplayer,
                    navigation: $this_slider.attr('data-navigation') === "true" ? true : false,
                    navigationText: ['<i class="mdi-chevron-left"></i>', '<i class="mdi-chevron-right"></i>'],
                    pagination: $this_slider.attr('data-pagination') === "true" ? true : false,
                    slideSpeed: 300,
                    paginationSpeed: 400,
                    items: 1,
                    itemsDesktop: false,
                    itemsDesktopSmall: false,
                    itemsTablet: false,
                    itemsMobile: false,
                    itemsScaleUp: true,
                    transitionStyle: is_mobile() === true ? "fade" : $this_slider.attr('data-anim'),
                    autoHeight: false,
                    touchDrag: false,
                    addClassActive: true,
                    afterInit: function () {
                        setTimeout(function () {
                            $this_slider.parent().removeClass('prk_first_anim');
                        }, 1000);
                    },
                });
            }, 25);
        });
    });

    var mfp_string="";
    if (false && theme_options.linked_mfp==="1") {
        mfp_string=theme_options.launch_text;
    }
    jQuery('.single_post_magni').each(function() {
        jQuery(this).magnificPopup({
            delegate: '.magnificent',
            src:'data-src',
            type: 'image',
            tLoading: 'Loading image #%curr%...',
            fixedContentPos: false,
            fixedBgPos: true,
            closeOnContentClick: true,
            closeBtnInside: false,
            mainClass: 'mfp-no-margins my-mfp-zoom-in header_font',
            removalDelay: 300,
            closeMarkup:'<button title="%title%" class="mfp-close"><div class="mfp-close_inner"></div></button>',
            gallery: {
                enabled: true,
                navigateByImgClick: true,
                arrowMarkup: '<button title="%title%" type="button" class="mfp-arrow mfp-arrow-%dir% mdi-chevron-%dir%"></button>',
                preload: [0,1] // Will preload 0 - before current, and 1 after the current image
            },
            image: {
                markup:
                    '<div class="mfp-figure">'+
                    '<div id="mfp-vrv">'+mfp_string+'</div>'+
                    '<div class="mfp-close"></div>'+
                    '<div class="mfp-img"></div>'+
                    '<figcaption><div class="mfp-bottom-bar">'+
                    '<div class="mfp-title"></div>'+
                    '<div class="mfp-counter"></div>'+
                    '</div></figcaption>'+
                    '</div>', // Popup HTML markup. `.mfp-img` div will be replaced with img tag, `.mfp-close` by close button

                tError: '<a href="%url%">The image #%curr%</a> could not be loaded.',
                titleSrc: function(item) {
                    return item.el.attr('title');
                }
            },
            iframe: {
                markup:
                    '<div id="mfp-vrv">'+mfp_string+'</div>'+
                    '<div class="mfp-iframe-scaler">'+
                    '<div class="mfp-close"></div>'+
                    '<iframe class="mfp-iframe" frameborder="0" allowfullscreen></iframe>'+
                    '<figcaption><div class="mfp-bottom-bar"><div class="mfp-title">Text</div><div class="mfp-counter">Number</div></div></figcaption>'+
                    '</div>'
            },
            callbacks: {
                open: function() {
                    jQuery('html').css({'overflow':'hidden','height':'100%'});
                    jQuery('#mfp-vrv').on('click',function() {
                        window.location=jQuery('#folio_father').attr('data-link');
                    });
                },
                close: function() {
                    jQuery('html').css({'overflow-y':'visible','height':''});
                },
                markupParse: function(template, values, item) {
                    if (item.el.attr('data-exc')!==undefined && item.el.attr('data-exc')!=="") {
                        values.title = item.el.attr('data-title')+" <small>"+item.el.attr('data-exc')+"</small>";
                    }
                    else {
                        values.title = item.el.attr('data-title');
                    }
                    jQuery('#folio_father').attr('data-link',item.el.attr('href'));
                },
            }
        });
    });

    //Single Post
    jQuery('.blog_hover').on({
        mouseenter:function() {
            if (!twex_on_mobile) {
                jQuery(this).addClass('hover_trigger');
            }
        },
        mouseleave:function() {
            if (!twex_on_mobile) {
                jQuery(this).removeClass('hover_trigger');
            }
        }
    });
    jQuery(".twex_read a").on('click', function(event) {
        event.preventDefault();
        var offsetter="";
        var fragment=jQuery(this).attr('href').split('#');
        if ((jQuery(this).attr('href')==="#" || fragment[1]==="") && fragment[0]===current_URL)  {
            offsetter=0;
        }
        else {
            var target = this.hash;
            var $target = jQuery(target);
            //IS IT AN ANCHOR LINK
            if (target!=="") {
                //IS IT AN EXISITNG ID
                if ($target.offset()!==undefined) {
                    offsetter=$target.offset().top;
                }
            }
        }
        if (offsetter!=="") {
            //console.log(jQuery('#vrv_sticky_menu').length);
            jQuery('html,body').stop().animate({
                    'scrollTop': offsetter - admin_bar_height - vrv_header_height
                },
                500,
                'easeInOutExpo'
            );
        }
    });
    
    jQuery('.twex_shortcode_slider.super_height.per_init').each(function() {
        var $this_id=jQuery(this).attr('id');
        var $this_slider=jQuery(this);
        $this_slider.removeClass('per_init');
        $this_slider.addClass('just_init');
        jQuery(window).on('debouncedresize', function(event) {
            setTimeout(function() {
                $this_slider.find('.owl-wrapper-outer,.owl-item').css({'height':height_fix-vrv_header_height});
                var min_width=jQuery(window).width();
                var min_height=height_fix-vrv_header_height;
                $this_slider.find('.owl-item img.twex_vsbl').each(function() {
                    var $this_image=jQuery(this);
                    var or_width=parseInt($this_image.attr('data-or_w'),10);
                    var or_height=parseInt($this_image.attr('data-or_h'),10);
                    var ratio=min_height / or_height;
                    //FILL HEIGHT
                    $this_image.css("height", min_height);
                    $this_image.css("width", or_width * ratio);
                    //UPDATE VARS
                    or_width=$this_image.width();
                    or_height=$this_image.height();
                    //FILL WIDTH IF NEEDED
                    if(or_width<min_width) {
                        ratio=min_width/or_width;
                        $this_image.css("width", min_width);
                        $this_image.css("height", or_height * ratio);
                    }
                    //ADJUST MARGINS
                    $this_image.css({"margin-left":-($this_image.width()-min_width)/2});
                    if (jQuery(window).width()<780) {
                        $this_image.css("margin-top",0);
                    }
                    else {
                        $this_image.css("margin-top",-($this_image.height()-$this_slider.find('.owl-wrapper-outer').height())/2);
                    }
                });
                $this_slider.find('.sld_v_center').each(function() {
                    jQuery(this).css({'margin-top':-parseInt(jQuery(this).height()/2,10)});
                });
            },50);
        });
        if ($this_slider.find('.item').length>1 && $this_slider.attr('data-autoplay') === "true") {
            var autoplayer=$this_slider.attr('data-delay')
        }
        else {
            var autoplayer=false;
        }
        $this_slider.fitVids().owlCarousel({
            autoPlay:autoplayer,
            navigation : $this_slider.attr('data-navigation') === "true" ? true : false,
            navigationText:	['<i class="mdi-chevron-left site_background_colored"></i><div class="vrv_naver site_background_colored prk_65_em"></div>','<i class="mdi-chevron-right site_background_colored"></i><div class="vrv_naver site_background_colored prk_65_em"></div>'],
            pagination:$this_slider.attr('data-pagination') === "true" ? true : false,
            paginationNumbers:true,
            slideSpeed : 300,
            paginationSpeed : 400,
            lazyLoad : true,
            items : 1,
            itemsDesktop : false,
            itemsDesktopSmall : false,
            itemsTablet: false,
            itemsMobile : false,
            itemsScaleUp:true,
            transitionStyle : is_mobile() === true ? "fade" : $this_slider.attr('data-anim'),
            touchDrag:false,
            addClassActive:true,
            afterInit: function() {
                var img_load=imagesLoaded($this_slider.find('#twex_slide_0'));
                img_load.on('always', function() {
                    $this_slider.parent().addClass('vrv_active_slider');
                    setTimeout(function() {
                        //singleLetters($this_slider.find('.cd-headline.letters').find('b'));
                        //animateHeadline($this_slider.find('.cd-headline'));
                        setTimeout(function() {
                            $this_slider.find('.sld_v_center').each(function() {
                                jQuery(this).css({'margin-top':-parseInt(jQuery(this).height()/2,10)});
                            });
                        },10);
                        //LOAD ALL OTHER IMAGES NOW
                        $this_slider.find('.lazy_vrv').each(function() {
                            jQuery(this).attr('src',jQuery(this).attr('data-src'));
                            jQuery(this).css({'display':'block'});
                        });
                    },750);
                });
                $this_slider.find('.owl-pagination').css({'margin-top':-$this_slider.find('.owl-pagination').height()/2});
                jQuery(window).trigger('debouncedresize');
                var izer=0;
                $this_slider.find('.owl-pagination').find('.owl-numbers').each(function() {
                    var slide_id='#twex_slide_'+izer;
                    jQuery(this).html($this_slider.find(slide_id).find('.headings_top>div').html());
                    izer++;
                });
            },
            afterAction : function() {
                $this_slider.find('.headings_top,.headings_body,.slider_action_button,.twex_at_slider').removeClass('twex_animate_slide');
                $this_slider.find('.wpb_animate_when_almost_visible').removeClass('wpb_start_animation');
                $this_slider.find('.wpb_animate_when_almost_visible').addClass('vrv_manual_anim');
                var slide_id='#twex_slide_'+this.owl.currentItem;
                if ($this_slider.hasClass('just_init')) {
                    var in_count=800;
                    $this_slider.removeClass('just_init');
                }
                else {
                    var in_count=500;
                }
                $this_slider.find('.vrv_naver').html(parseInt(this.owl.currentItem+1,10)+' / '+this.owl.owlItems.length);
                setTimeout(function() {
                    if ($this_slider.find(slide_id).find('.slider_action_button a').attr('data-color')!=="default") {
                        $this_slider.find(slide_id).find('.slider_action_button a').css({'border-color':$this_slider.find(slide_id).find('.slider_action_button a').attr('data-color'),'color':$this_slider.find(slide_id).find('.slider_action_button a').attr('data-color')});
                    }
                    if ($this_slider.find(slide_id).find('.slider_scroll_button a').attr('data-color')!=="default") {
                        $this_slider.find(slide_id).find('.slider_scroll_button a').css({'border-color':$this_slider.find(slide_id).find('.slider_scroll_button a').attr('data-color'),'color':$this_slider.find(slide_id).find('.slider_scroll_button a').attr('data-color')});
                    }
                    $this_slider.find(slide_id).find('.headings_top').addClass('twex_animate_slide');
                    $this_slider.find(slide_id).find('.headings_body').addClass('twex_animate_slide');
                    $this_slider.find(slide_id).find('.slider_action_button').addClass('twex_animate_slide');
                    $this_slider.find(slide_id).find('.twex_at_slider').addClass('twex_animate_slide');
                    $this_slider.find(slide_id).find('.wpb_animate_when_almost_visible').each(function() {
                        var $this_el=jQuery(this);
                        if (!$this_el.is('[class*="delay-"]')) {
                            $this_el.addClass('wpb_start_animation');
                        }
                        else {
                            var classes = $this_el.attr("class").split(" ");
                            var delayer=0;
                            for (var i = 0; i < classes.length; i++) {
                                if ( classes[i].substr(0,6) === "delay-" ) {
                                    delayer=classes[i].substr(6,classes[i].length);
                                    break;
                                }
                            }
                            setTimeout(function() {
                                $this_el.addClass('wpb_start_animation');
                            },parseInt(delayer,10)+100);
                        }
                    });
                },in_count);
            },
        });
    });

    //FULLSCREEN FEATURE
    var fullscreen_mode = false;
    //CHECK IF IT'S POSSIBLE TO USE
    if (is_mobile() === false && document.documentElement.requestFullScreen || document.documentElement.mozRequestFullScreen || document.documentElement.webkitRequestFullScreen) {
        jQuery("#prk_fs_wrapper").css({ 'display': 'block' });
        jQuery("body").on('click', "#prk_fs_wrapper", function (event) {
            jQuery(document).toggleFullScreen();
        });
        jQuery(document).bind("fullscreenchange", function () {
            fullscreen_mode = jQuery(document).fullScreen() ? true : false;
            if (fullscreen_mode === true) {
                jQuery("#prk_fs_wrapper").addClass('vrv_full');
            }
            else {
                jQuery("#prk_fs_wrapper").removeClass('vrv_full');
            }
            setTimeout(function () {
                jQuery(window).trigger('debouncedresize');
            }, 100);
        });
    }
    else {
        jQuery("#prk_fs_wrapper").css({ 'display': 'none' });
    }

    var delayed_anim = "";
    var menu_is_open = false;
    var sidebar_is_open = false;
    var hiddenbar_is_open = false;
    var prk_menu_element = jQuery('#prk_hidden_menu');
    var admin_bar_height = 0;
    if (jQuery('body.admin-bar').length) {
        admin_bar_height = 32;
    }
    //FIX FOR MEDIA QUERIES ON SOME BROWSERS
    scrollbar_width = window.innerWidth - jQuery("body").width();

    var ua = navigator.userAgent.toLowerCase();
    //console.log(ua);
    if (ua.indexOf('edge/') > 0) {
        jQuery('html').addClass('twex_edge');
    }
    else if (ua.indexOf('safari') != -1) {
        if (ua.indexOf('chrome') > -1) {
            jQuery('html').addClass('twex_chrome');
        } else {
            jQuery('html').addClass('twex_safari');
        }
    }
    else {
        if (((ua.indexOf('mozilla/5.0') > -1 && ua.indexOf('android ') > -1 && ua.indexOf('applewebkit') > -1))) {
            jQuery('html').addClass('twex_android');
        }
        else {
            var msie = ua.indexOf('msie');
            var trident = ua.indexOf('trident/');
            if (msie > 0 || trident > 0) {
                jQuery('html').addClass('twex_ie');
            }
            else if (ua.indexOf('firefox') > -1) {
                jQuery('html').addClass('twex_mozilla');
            }
        }
    }

    jQuery('html').addClass('twex_ready');
    jQuery('html').addClass('twex_ready');
    jQuery('#prk_hidden_menu,#prk_hidden_bar').addClass('tw_anim');

    function prk_toggle_menu() {
        if (menu_is_open === false) {
            menu_is_open = true;
            if (sidebar_is_open === true) {
                prk_toggle_sidebar();
            }
            jQuery('body').addClass('twex_showing_menu');
            jQuery('#prk_hidden_menu,#body_hider').addClass('twex_second_menu_anims');
            jQuery('#prk_blocks_wrapper').addClass('tw_1_anim');
            jQuery('#body_hider').css({ 'z-index': '991' });
            jQuery('#twex_main_wrapper').addClass('twex_menu_fade');
            clearTimeout(delayed_anim);
            delayed_anim = setTimeout(function () {
                jQuery('#prk_blocks_wrapper').addClass('twex_second_menu_anims');
            }, 350);
        }
        else {
            menu_is_open = false;
            jQuery('#prk_hidden_menu,#prk_blocks_wrapper').removeClass('twex_second_menu_anims');
            jQuery('body').removeClass('twex_showing_menu');
            clearTimeout(delayed_anim);
            delayed_anim = setTimeout(function () {
                jQuery('#twex_main_wrapper').removeClass('twex_menu_fade');
                jQuery('#body_hider').removeClass('twex_second_menu_anims');
                jQuery('#body_hider').css({ 'z-index': '' });
                jQuery('#prk_blocks_wrapper').removeClass('tw_1_anim');
            }, 350);
        }
    }

    //MOBILE MODE
    function prk_toggle_hidden() {
        if (sidebar_is_open === true) {
            prk_toggle_sidebar();
        }
        if (hiddenbar_is_open === true) {
            hiddenbar_is_open = false;
            jQuery('#body_hider').css({ 'opacity': '0' });
            setTimeout(function () {
                jQuery('body').removeClass('prk_shifted');
                jQuery('#prk_mobile_bar').removeClass('twex_showing_mobile');
                jQuery('body').removeClass('twex_showing_mobile');
            }, 200);
            setTimeout(function () {
                jQuery('#body_hider').css({ 'visibility': '', 'opacity': '' });
                jQuery('body').removeClass('second_anims');
                jQuery('#prk_mobile_bar').removeClass('second_anims');
                jQuery('#body_hider').removeClass('second_anims');
                jQuery('#body_hider').removeClass('prk_shifted_hider');
            }, 500);
        }
        else {
            hiddenbar_is_open = true;
            jQuery('body').removeClass('hover_blocks');
            jQuery('#prk_mobile_bar').addClass('twex_showing_mobile second_anims');
            jQuery('body').addClass('second_anims prk_shifted twex_showing_mobile');
            jQuery('#body_hider').css({ 'visibility': 'visible' });
            jQuery('#body_hider').addClass('prk_shifted_hider second_anims');
            setTimeout(function () {
                jQuery('#body_hider').css({ 'opacity': '1' });
            }, 600);
        }
    }

    //HIDDEN SIDEBAR FUNCTIONS
    jQuery('#body_hider').on('click', function () {
        //MAIN MENU
        if (menu_is_open === true) {
            prk_toggle_menu();
        }
        //MOBILE MODE
        if (hiddenbar_is_open === true) {
            prk_toggle_hidden();
        }
        //HIDDEN SIDEBAR
        if (sidebar_is_open === true) {
            prk_toggle_sidebar();
        }
    });

    //TOGGLE HOVER FUNCTIONS
    jQuery('#prk_blocks_wrapper').on({
        mouseenter: function () {
            jQuery('body').addClass('hover_blocks');
        },
        mouseleave: function () {
            jQuery('body').removeClass('hover_blocks');
        }
    });

    jQuery('#prk_blocks_wrapper').on('click', function () {
        if (!jQuery('html').hasClass('menu_at_top')) {
            prk_toggle_menu();
        }
        else {
            prk_toggle_hidden();
        }
    });

    jQuery('.prk_popper_menu a').each(function () {
        jQuery(this).addClass('twex_anchor');
    });

    jQuery(document).on('click', "a.twex_anchor", function (event) {

        var $thisa = jQuery(this);

        if (jQuery(this).attr("target") === "_blank" || jQuery(this).parent().hasClass('regular_load') || event.metaKey) {
            //OPEN LINK NORMALLY - TODO?
        }
        else {
            event.preventDefault();
            if (jQuery(this).hasClass('tw_unlinked')) {
                event.preventDefault();
                return;
            }
            var offsetter = "";
            var fragment = jQuery(this).attr('href').split('#');
            if ($thisa.parent().children('.sub-menu').length) {
                console.log($thisa.parents());
                jQuery('#prk_hidden_menu_scroller .prk_popper_menu .sub-menu').not($thisa.parents()).slideUp({
                    'duration': 250,
                    easing: 'linear'
                });
                $thisa.parent().children('.sub-menu').stop();
                $thisa.parent().children('.sub-menu').css({ 'height': '' });
                $thisa.parent().children('.sub-menu').slideToggle({
                    'duration': 250,
                    easing: 'linear'
                });

                //jQuery("#prk_hidden_bar_scroller").mCustomScrollbar("update");
                //jQuery("#prk_mobile_bar_scroller").mCustomScrollbar("update");
            }
            /*if ((jQuery(this).attr('href')==="#" || fragment[1]==="") && fragment[0]===current_URL)  {
                offsetter=0;
            }
            else {
                var target = this.hash;
                var $target = jQuery(target);
                //IS IT AN ANCHOR LINK
                if (target!=="") {
                    //IS IT AN EXISITNG ID
                    if ($target.offset()!==undefined) {
                        offsetter=$target.offset().top;
                    }
                }
            }*/
            if (false && offsetter !== "") {
                jQuery('html,body').stop().animate({
                    'scrollTop': offsetter - admin_bar_height - tw_header_height
                },
                    1200,
                    'easeInOutExpo'
                );
                if (hiddenbar_is_open === true) {
                    hiddenbar_is_open = false;
                    jQuery('body').removeClass('prk_shifted');
                    jQuery('#prk_mobile_bar').removeClass('twex_showing_mobile');
                    jQuery('body').removeClass('twex_showing_mobile');
                    jQuery('#body_hider').css({ 'opacity': '0' });
                }
                if (menu_is_open === true) {
                    prk_toggle_menu();
                }
            }
            if (false) {

            }
            else {
                if (offsetter === "") {
                    window.location = jQuery(this).attr("href");
                }
                else {
                    if (hiddenbar_is_open === true && jQuery(this).attr("href") !== "#") {
                        prk_toggle_hidden();
                        close_mobile_submenus();
                    }
                }
            }
        }
    });

    //Hidden Sidebar
    function prk_toggle_sidebar() {
        if (sidebar_is_open === false) {
            jQuery(window).trigger('debouncedresize');
            sidebar_is_open = true;
            jQuery('body').addClass('twex_showing_sidebar');
            jQuery('#body_hider').addClass('twex_second_bar_anims');
            if (menu_is_open === true) {
                //prk_toggle_menu();
                menu_is_open = false;
                jQuery('#prk_hidden_menu,#prk_blocks_wrapper').removeClass('twex_second_menu_anims');
                jQuery('body').removeClass('twex_showing_menu');
                clearTimeout(delayed_anim);
                delayed_anim = setTimeout(function () {
                    jQuery('#prk_blocks_wrapper').removeClass('tw_1_anim');
                }, 350);
            }
            jQuery('#body_hider').css({ 'z-index': '991' });
        }
        else {
            sidebar_is_open = false;
            jQuery('body').removeClass('twex_showing_sidebar');
            clearTimeout(delayed_anim);
            delayed_anim = setTimeout(function () {
                jQuery('#body_hider').removeClass('twex_second_bar_anims');
                jQuery('#body_hider').css({ 'z-index': '' });
            }, 350);
        }
    }

    jQuery('#prk_sidebar_trigger,.prk_sidebar_toggle').on('click', function () {
        prk_toggle_sidebar();
    });

    jQuery("#prk_hidden_bar_scroller").mCustomScrollbar({
        scrollInertia: 450,
        autoHideScrollbar: true,
        scrollButtons: {
            enable: false
        },
    });
    jQuery("#prk_mobile_bar_scroller").mCustomScrollbar({
        scrollInertia: 450,
        autoHideScrollbar: true,
        setTop: '0px',
        scrollButtons: {
            enable: false
        },
    });

    //DELAYED RESIZE LISTENTERS
    jQuery.event.special.debouncedresize.threshold = 100;
    jQuery(window).on('debouncedresize', function () {

        prk_menu_element.css({ 'height': '' });
        prk_menu_element.css({ 'height': jQuery(window).height() - admin_bar_height });

        if (jQuery(window).width() < (768 - scrollbar_width)) {
            if (!jQuery('html').hasClass('menu_at_top')) {
                jQuery('html').addClass('menu_at_top');
                vrv_header_height = 68;
            }
        }
        else {
            if (jQuery('html').hasClass('menu_at_top')) {
                jQuery('html').removeClass('menu_at_top');
            }
        }

        jQuery("#prk_hidden_bar_scroller").mCustomScrollbar("update");
        jQuery("#prk_mobile_bar_scroller").mCustomScrollbar("update");

        jQuery('.forced_row>div,.forced_row>.row,.vertical_forced_row>div').not('.twex_read').each(function() {
            jQuery(this).css({'height':''});
            var compensation=0;
            if (jQuery(this).attr('data-adjust')!==undefined) {
                compensation=jQuery(this).attr('data-adjust');
            }
            jQuery(this).css({'height':jQuery(window).height()-admin_bar_height-vrv_header_height-compensation});
        });

    });

    //RESIZE LISTENER
    function pirenko_resize() {
        height_fix = window.innerHeight ? window.innerHeight : jQuery(window).height();
        if (jQuery('#wpadminbar').length) {
            height_fix = height_fix - jQuery('#wpadminbar').height();
        }
        jQuery("#prk_hidden_bar_scroller,#prk_mobile_bar_scroller").outerHeight(height_fix);
    }
    jQuery(window).on('resize', function () {
        pirenko_resize();
    });

    function is_on_viewport(elem) {
        if (!jQuery(elem).length) {
            return false;
        }
        else {
            var docViewTop = jQuery(window).scrollTop();
            var docViewBottom = docViewTop + jQuery(window).height();
            var elemTop = jQuery(elem).offset().top;
            var elemBottom = elemTop + jQuery(elem).height();
            return ((elemBottom >= docViewTop) && (elemTop <= docViewBottom));
        }
    }

    function scroll_listener() {
        //LOAD MORE CONTENT
        if (jQuery('.folio_masonry.shortcoded').length && (is_on_viewport(jQuery('.folio_masonry.shortcoded')) || twex_on_mobile)) {
            var $elemeter = jQuery('.folio_masonry.shortcoded');
            if (!$elemeter.hasClass('twex_effect')) {
                $elemeter.addClass('twex_effect')
                var counter = 100;
                $elemeter.find('.portfolio_entry_li').each(function () {
                    var $new_item = jQuery(this);
                    setTimeout(function () {
                        $new_item.removeClass('hidden_by_css');
                        $new_item.addClass('animate');
                    }, counter);
                    counter = counter + 150;
                });
            }
        }
        if (jQuery('.masonry_blog.trigger_anim').length && (is_on_viewport(jQuery('.masonry_blog.trigger_anim')) || twex_on_mobile)) {
            var $elemeter = jQuery('.masonry_blog.trigger_anim');
            if (!$elemeter.hasClass('twex_effect')) {
                $elemeter.addClass('twex_effect')
                var counter = 100;
                $elemeter.find('.blog_entry_li').each(function () {
                    var $new_item = jQuery(this);
                    setTimeout(function () {
                        $new_item.removeClass('hidden_by_css');
                        $new_item.addClass('animate');
                    }, counter);
                    counter = counter + 150;
                });
            }
        }
        //END - LOAD MORE CONTENT
    }

    //BLOG FUNCTIONS
    function init_blog() {
        jQuery('.blog_entries').each(function () {
            var $inner_blog = jQuery(this);
            $inner_blog.find('.blog_top_image').each(function () {
                if (jQuery(this).attr('data-src') !== undefined) {
                    jQuery(this).css({ 'background-image': 'url(' + jQuery(this).attr('data-src') + ')' });
                }
            });
            jQuery(this).parent().find('.filter_blog .b_filter>a').on('click', function (e) {
                e.preventDefault();
                jQuery(this).parent().parent().children('.b_filter').removeClass('active');
                curr_filter_blog = jQuery(this).attr('data-filter').split(' ');
                jQuery(this).parent().addClass('active');
                setTimeout(function () { jQuery(window).trigger("smartresize"); }, 5);
                $inner_blog.isotope({
                    filter: '.' + curr_filter_blog
                });
            });
            $inner_blog.find('.featured_color').each(function () {
                jQuery(this).find('.squared_date.colorized,.not_zero_color,a.not_zero_color').css({ 'color': jQuery(this).attr('data-color') });
                jQuery(this).find('.zero_color a,a.zero_color,.body_colored a,.small_headings_color a').attr('data-color', jQuery(this).attr('data-color'));
                jQuery(this).find('.blog_fader_grid').css({ 'background-color': hex2rgb(jQuery(this).attr('data-color'), theme_options.custom_opacity) });
                jQuery(this).find('.vrv_colored_link>a').attr('data-forced-color', jQuery(this).attr('data-color'));
                jQuery(this).find('.twex_date_box').css({ 'background-color': jQuery(this).attr('data-color') });
            });
            $inner_blog.fitVids();
            $inner_blog.addClass('prk_first_anim');
            var img_load = imagesLoaded($inner_blog);
            img_load.on('always', function () {
                $inner_blog.isotope({
                    itemSelector: '.blog_entry_li',
                    masonry: { columnWidth: '.grid-sizer' },
                    transitionDuration: '0.6s'
                });
                setTimeout(function () {
                    $inner_blog.isotope('layout');
                }, 30);
            });
        });
        jQuery('.masonry_blog').each(function () {
            var $inner_blog = jQuery(this);
            var $custom_selector = $inner_blog.parent().find('.twex_blog_filter');
            jQuery(this).parent().find('.filter_blog .b_filter>a').on('click', function (e) {
                e.preventDefault();
                jQuery(this).parent().parent().children('.b_filter').removeClass('active');
                curr_filter_blog = jQuery(this).attr('data-filter').split(' ');
                jQuery(this).parent().addClass('active');
                setTimeout(function () {
                    jQuery(window).trigger("smartresize");
                }, 5);
                $inner_blog.isotope({
                    filter: '.' + curr_filter_blog
                });
            });
            $inner_blog.find('.featured_color').each(function () {
                jQuery(this).find('a.not_zero_color,span.not_zero_color').css({ 'color': jQuery(this).attr('data-color') });
                jQuery(this).find('a.zero_color,.zero_color a,.small_headings_color a,a.small_headings_color,.blog_categories a').attr('data-color', jQuery(this).attr('data-color'));
                jQuery(this).find('.vrv_colored_link>a').attr('data-forced-color', jQuery(this).attr('data-color'));
                jQuery(this).find('.blog_fader_grid').not('.vrv_gridy').stop().css({ 'background-color': hex2rgb(jQuery(this).attr('data-color'), theme_options.custom_opacity) });
            });
            $inner_blog.fitVids();
            var img_load = imagesLoaded($inner_blog);
            img_load.on('always', function () {
                jQuery("#twex_wrap,#prk_footer_wrapper").addClass('prk_first_anim');
                jQuery('#main_loader').addClass('prk_tweaked');
                /*setTimeout(function(){
                    jQuery('#main_loader').addClass('prk_hidden_loader');
                },300);*/
                $inner_blog.removeClass('per_init');
                if ($inner_blog.hasClass('templated')) {
                    $inner_blog.addClass('trigger_anim');
                    $inner_blog.removeClass('templated');
                    scroll_listener();
                }
                $inner_blog.isotope({
                    itemSelector: '.blog_entry_li',
                    masonry: { columnWidth: '.grid-sizer' },
                    transitionDuration: '0.6s'
                });
                setTimeout(function () {
                    $inner_blog.isotope('layout');
                    $inner_blog.find('.centerized_child_blog').each(function () {
                        jQuery(this).css({ 'margin-top': -Math.round(jQuery(this).height() / 2) });
                    });
                }, 30);
                $inner_blog.isotope('on', 'layoutComplete', function () {
                    $inner_blog.find('.centerized_child_blog').each(function () {
                        jQuery(this).css({ 'margin-top': -Math.round(jQuery(this).height() / 2) });
                    });
                });
            });
        });
        jQuery('.recentposts_ul_slider,.recentposts_ul_wp').each(function () {
            var $inner_blog = jQuery(this);
            $inner_blog.fitVids();
            $inner_blog.find('.featured_color').each(function () {
                jQuery(this).find('a.not_zero_color,span.not_zero_color').css({ 'color': jQuery(this).attr('data-color') });
                jQuery(this).find('a.zero_color,.zero_color a,.small_headings_color a,a.small_headings_color,.blog_categories a').attr('data-color', jQuery(this).attr('data-color'));
                jQuery(this).find('.vrv_colored_link>a').attr('data-forced-color', jQuery(this).attr('data-color'));
                jQuery(this).find('.blog_fader_grid').not('.vrv_gridy').stop().css({ 'background-color': hex2rgb(jQuery(this).attr('data-color'), theme_options.custom_opacity) });
            });
        });
        if (jQuery('.vrv_blog_single').length) {
            jQuery('.vrv_blog_single').fitVids();
            jQuery('.vrv_blog_single.featured_color').each(function () {
                var faster_color = jQuery(this).attr('data-color');
                jQuery('#twex_ajax_inner #twex_content, #twex_ajax_inner #comments, #twex_ajax_inner #respond_wrapper').find('.not_zero_color,.not_zero_color>p>a,.comment-reply-link,.logged-in-as a').css({ 'color': faster_color });
                jQuery('.twex_forced_menu #single_post_teaser .twex_author_color').css({ 'color': faster_color });
                jQuery('#twex_ajax_inner').find('.comments_meta_wrapper .not_zero_color a,.pirenko_highlighted,.theme_button a,.zero_color a,a.zero_color,.body_colored a,.small_headings_color a,#vrv_right_sidebar li a,#submit_comment_div>a,#vrv_back_lnk').attr('data-color', faster_color);
                jQuery('#vrv_back_lnk').attr('data-color', faster_color);
                jQuery('.twex_read a,#single_blog_meta a').attr('data-color', faster_color);
                jQuery('#twex_ajax_inner').find('.prk_blockquote.plain').css('border-color', faster_color);
                jQuery('#submit_comment_div>a').css({ 'border-color': faster_color, 'background-color': faster_color });
            });
        }
    }
    init_blog();

    //TOP BAR SEARCH FORM
    jQuery('#prk_search_trigger').on('click', function () {
        jQuery('body').addClass('twex_showing_search');
        jQuery('body').addClass('twex_second_menu_search_anims');
        if (!jQuery('html').hasClass('twex_ie')) {
            jQuery('#searchform_top input').focus();
        }
    });
    function twex_close_search() {
        jQuery('body').removeClass('twex_second_menu_search_anims');
        setTimeout(function () {
            jQuery('body').removeClass('twex_showing_search');
        }, 300);
    }
    jQuery('#top_form_close').on('click', function () {
        twex_close_search();
    });

}

jQuery(document).on('ready', function () {

    twex_init();

});

/*
 * imagesLoaded PACKAGED v4.1.0
 * JavaScript is all like "You images are done yet or what?"
 * MIT License
 */
!function (t, e) { "function" == typeof define && define.amd ? define("ev-emitter/ev-emitter", e) : "object" == typeof module && module.exports ? module.exports = e() : t.EvEmitter = e() }(this, function () { function t() { } var e = t.prototype; return e.on = function (t, e) { if (t && e) { var i = this._events = this._events || {}, n = i[t] = i[t] || []; return -1 == n.indexOf(e) && n.push(e), this } }, e.once = function (t, e) { if (t && e) { this.on(t, e); var i = this._onceEvents = this._onceEvents || {}, n = i[t] = i[t] || []; return n[e] = !0, this } }, e.off = function (t, e) { var i = this._events && this._events[t]; if (i && i.length) { var n = i.indexOf(e); return -1 != n && i.splice(n, 1), this } }, e.emitEvent = function (t, e) { var i = this._events && this._events[t]; if (i && i.length) { var n = 0, o = i[n]; e = e || []; for (var r = this._onceEvents && this._onceEvents[t]; o;) { var s = r && r[o]; s && (this.off(t, o), delete r[o]), o.apply(this, e), n += s ? 0 : 1, o = i[n] } return this } }, t }), function (t, e) { "use strict"; "function" == typeof define && define.amd ? define(["ev-emitter/ev-emitter"], function (i) { return e(t, i) }) : "object" == typeof module && module.exports ? module.exports = e(t, require("ev-emitter")) : t.imagesLoaded = e(t, t.EvEmitter) }(window, function (t, e) { function i(t, e) { for (var i in e) t[i] = e[i]; return t } function n(t) { var e = []; if (Array.isArray(t)) e = t; else if ("number" == typeof t.length) for (var i = 0; i < t.length; i++)e.push(t[i]); else e.push(t); return e } function o(t, e, r) { return this instanceof o ? ("string" == typeof t && (t = document.querySelectorAll(t)), this.elements = n(t), this.options = i({}, this.options), "function" == typeof e ? r = e : i(this.options, e), r && this.on("always", r), this.getImages(), h && (this.jqDeferred = new h.Deferred), void setTimeout(function () { this.check() }.bind(this))) : new o(t, e, r) } function r(t) { this.img = t } function s(t, e) { this.url = t, this.element = e, this.img = new Image } var h = t.jQuery, a = t.console; o.prototype = Object.create(e.prototype), o.prototype.options = {}, o.prototype.getImages = function () { this.images = [], this.elements.forEach(this.addElementImages, this) }, o.prototype.addElementImages = function (t) { "IMG" == t.nodeName && this.addImage(t), this.options.background === !0 && this.addElementBackgroundImages(t); var e = t.nodeType; if (e && d[e]) { for (var i = t.querySelectorAll("img"), n = 0; n < i.length; n++) { var o = i[n]; this.addImage(o) } if ("string" == typeof this.options.background) { var r = t.querySelectorAll(this.options.background); for (n = 0; n < r.length; n++) { var s = r[n]; this.addElementBackgroundImages(s) } } } }; var d = { 1: !0, 9: !0, 11: !0 }; return o.prototype.addElementBackgroundImages = function (t) { var e = getComputedStyle(t); if (e) for (var i = /url\((['"])?(.*?)\1\)/gi, n = i.exec(e.backgroundImage); null !== n;) { var o = n && n[2]; o && this.addBackground(o, t), n = i.exec(e.backgroundImage) } }, o.prototype.addImage = function (t) { var e = new r(t); this.images.push(e) }, o.prototype.addBackground = function (t, e) { var i = new s(t, e); this.images.push(i) }, o.prototype.check = function () { function t(t, i, n) { setTimeout(function () { e.progress(t, i, n) }) } var e = this; return this.progressedCount = 0, this.hasAnyBroken = !1, this.images.length ? void this.images.forEach(function (e) { e.once("progress", t), e.check() }) : void this.complete() }, o.prototype.progress = function (t, e, i) { this.progressedCount++, this.hasAnyBroken = this.hasAnyBroken || !t.isLoaded, this.emitEvent("progress", [this, t, e]), this.jqDeferred && this.jqDeferred.notify && this.jqDeferred.notify(this, t), this.progressedCount == this.images.length && this.complete(), this.options.debug && a && a.log("progress: " + i, t, e) }, o.prototype.complete = function () { var t = this.hasAnyBroken ? "fail" : "done"; if (this.isComplete = !0, this.emitEvent(t, [this]), this.emitEvent("always", [this]), this.jqDeferred) { var e = this.hasAnyBroken ? "reject" : "resolve"; this.jqDeferred[e](this) } }, r.prototype = Object.create(e.prototype), r.prototype.check = function () { var t = this.getIsImageComplete(); return t ? void this.confirm(0 !== this.img.naturalWidth, "naturalWidth") : (this.proxyImage = new Image, this.proxyImage.addEventListener("load", this), this.proxyImage.addEventListener("error", this), this.img.addEventListener("load", this), this.img.addEventListener("error", this), void (this.proxyImage.src = this.img.src)) }, r.prototype.getIsImageComplete = function () { return this.img.complete && void 0 !== this.img.naturalWidth }, r.prototype.confirm = function (t, e) { this.isLoaded = t, this.emitEvent("progress", [this, this.img, e]) }, r.prototype.handleEvent = function (t) { var e = "on" + t.type; this[e] && this[e](t) }, r.prototype.onload = function () { this.confirm(!0, "onload"), this.unbindEvents() }, r.prototype.onerror = function () { this.confirm(!1, "onerror"), this.unbindEvents() }, r.prototype.unbindEvents = function () { this.proxyImage.removeEventListener("load", this), this.proxyImage.removeEventListener("error", this), this.img.removeEventListener("load", this), this.img.removeEventListener("error", this) }, s.prototype = Object.create(r.prototype), s.prototype.check = function () { this.img.addEventListener("load", this), this.img.addEventListener("error", this), this.img.src = this.url; var t = this.getIsImageComplete(); t && (this.confirm(0 !== this.img.naturalWidth, "naturalWidth"), this.unbindEvents()) }, s.prototype.unbindEvents = function () { this.img.removeEventListener("load", this), this.img.removeEventListener("error", this) }, s.prototype.confirm = function (t, e) { this.isLoaded = t, this.emitEvent("progress", [this, this.element, e]) }, o.makeJQueryPlugin = function (e) { e = e || t.jQuery, e && (h = e, h.fn.imagesLoaded = function (t, e) { var i = new o(this, t, e); return i.jqDeferred.promise(h(this)) }) }, o.makeJQueryPlugin(), o });

/*
* jQuery Easing v1.3 - http://gsgd.co.uk/sandbox/jquery/easing/
*
* Uses the built in easing capabilities added In jQuery 1.1
* to offer multiple easing options
*
* TERMS OF USE - jQuery Easing
*
* Open source under the BSD License.
*
* Copyright © 2008 George McGinley Smith
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice, this list of
* conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice, this list
* of conditions and the following disclaimer in the documentation and/or other materials
* provided with the distribution.
*
* Neither the name of the author nor the names of contributors may be used to endorse
* or promote products derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
*  COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
*  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
*  GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
*  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
* OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/

// t: current time, b: begInnIng value, c: change In value, d: duration
jQuery.easing['jswing'] = jQuery.easing['swing']; jQuery.extend(jQuery.easing, { def: 'easeOutQuad', swing: function (x, t, b, c, d) { return jQuery.easing[jQuery.easing.def](x, t, b, c, d) }, easeInQuad: function (x, t, b, c, d) { return c * (t /= d) * t + b }, easeOutQuad: function (x, t, b, c, d) { return -c * (t /= d) * (t - 2) + b }, easeInOutQuad: function (x, t, b, c, d) { if ((t /= d / 2) < 1) return c / 2 * t * t + b; return -c / 2 * ((--t) * (t - 2) - 1) + b }, easeInCubic: function (x, t, b, c, d) { return c * (t /= d) * t * t + b }, easeOutCubic: function (x, t, b, c, d) { return c * ((t = t / d - 1) * t * t + 1) + b }, easeInOutCubic: function (x, t, b, c, d) { if ((t /= d / 2) < 1) return c / 2 * t * t * t + b; return c / 2 * ((t -= 2) * t * t + 2) + b }, easeInQuart: function (x, t, b, c, d) { return c * (t /= d) * t * t * t + b }, easeOutQuart: function (x, t, b, c, d) { return -c * ((t = t / d - 1) * t * t * t - 1) + b }, easeInOutQuart: function (x, t, b, c, d) { if ((t /= d / 2) < 1) return c / 2 * t * t * t * t + b; return -c / 2 * ((t -= 2) * t * t * t - 2) + b }, easeInQuint: function (x, t, b, c, d) { return c * (t /= d) * t * t * t * t + b }, easeOutQuint: function (x, t, b, c, d) { return c * ((t = t / d - 1) * t * t * t * t + 1) + b }, easeInOutQuint: function (x, t, b, c, d) { if ((t /= d / 2) < 1) return c / 2 * t * t * t * t * t + b; return c / 2 * ((t -= 2) * t * t * t * t + 2) + b }, easeInSine: function (x, t, b, c, d) { return -c * Math.cos(t / d * (Math.PI / 2)) + c + b }, easeOutSine: function (x, t, b, c, d) { return c * Math.sin(t / d * (Math.PI / 2)) + b }, easeInOutSine: function (x, t, b, c, d) { return -c / 2 * (Math.cos(Math.PI * t / d) - 1) + b }, easeInExpo: function (x, t, b, c, d) { return (t == 0) ? b : c * Math.pow(2, 10 * (t / d - 1)) + b }, easeOutExpo: function (x, t, b, c, d) { return (t == d) ? b + c : c * (-Math.pow(2, -10 * t / d) + 1) + b }, easeInOutExpo: function (x, t, b, c, d) { if (t == 0) return b; if (t == d) return b + c; if ((t /= d / 2) < 1) return c / 2 * Math.pow(2, 10 * (t - 1)) + b; return c / 2 * (-Math.pow(2, -10 * --t) + 2) + b }, easeInCirc: function (x, t, b, c, d) { return -c * (Math.sqrt(1 - (t /= d) * t) - 1) + b }, easeOutCirc: function (x, t, b, c, d) { return c * Math.sqrt(1 - (t = t / d - 1) * t) + b }, easeInOutCirc: function (x, t, b, c, d) { if ((t /= d / 2) < 1) return -c / 2 * (Math.sqrt(1 - t * t) - 1) + b; return c / 2 * (Math.sqrt(1 - (t -= 2) * t) + 1) + b }, easeInElastic: function (x, t, b, c, d) { var s = 1.70158; var p = 0; var a = c; if (t == 0) return b; if ((t /= d) == 1) return b + c; if (!p) p = d * .3; if (a < Math.abs(c)) { a = c; var s = p / 4 } else var s = p / (2 * Math.PI) * Math.asin(c / a); return -(a * Math.pow(2, 10 * (t -= 1)) * Math.sin((t * d - s) * (2 * Math.PI) / p)) + b }, easeOutElastic: function (x, t, b, c, d) { var s = 1.70158; var p = 0; var a = c; if (t == 0) return b; if ((t /= d) == 1) return b + c; if (!p) p = d * .3; if (a < Math.abs(c)) { a = c; var s = p / 4 } else var s = p / (2 * Math.PI) * Math.asin(c / a); return a * Math.pow(2, -10 * t) * Math.sin((t * d - s) * (2 * Math.PI) / p) + c + b }, easeInOutElastic: function (x, t, b, c, d) { var s = 1.70158; var p = 0; var a = c; if (t == 0) return b; if ((t /= d / 2) == 2) return b + c; if (!p) p = d * (.3 * 1.5); if (a < Math.abs(c)) { a = c; var s = p / 4 } else var s = p / (2 * Math.PI) * Math.asin(c / a); if (t < 1) return -.5 * (a * Math.pow(2, 10 * (t -= 1)) * Math.sin((t * d - s) * (2 * Math.PI) / p)) + b; return a * Math.pow(2, -10 * (t -= 1)) * Math.sin((t * d - s) * (2 * Math.PI) / p) * .5 + c + b }, easeInBack: function (x, t, b, c, d, s) { if (s == undefined) s = 1.70158; return c * (t /= d) * t * ((s + 1) * t - s) + b }, easeOutBack: function (x, t, b, c, d, s) { if (s == undefined) s = 1.70158; return c * ((t = t / d - 1) * t * ((s + 1) * t + s) + 1) + b }, easeInOutBack: function (x, t, b, c, d, s) { if (s == undefined) s = 1.70158; if ((t /= d / 2) < 1) return c / 2 * (t * t * (((s *= (1.525)) + 1) * t - s)) + b; return c / 2 * ((t -= 2) * t * (((s *= (1.525)) + 1) * t + s) + 2) + b }, easeInBounce: function (x, t, b, c, d) { return c - jQuery.easing.easeOutBounce(x, d - t, 0, c, d) + b }, easeOutBounce: function (x, t, b, c, d) { if ((t /= d) < (1 / 2.75)) { return c * (7.5625 * t * t) + b } else if (t < (2 / 2.75)) { return c * (7.5625 * (t -= (1.5 / 2.75)) * t + .75) + b } else if (t < (2.5 / 2.75)) { return c * (7.5625 * (t -= (2.25 / 2.75)) * t + .9375) + b } else { return c * (7.5625 * (t -= (2.625 / 2.75)) * t + .984375) + b } }, easeInOutBounce: function (x, t, b, c, d) { if (t < d / 2) return jQuery.easing.easeInBounce(x, t * 2, 0, c, d) * .5 + b; return jQuery.easing.easeOutBounce(x, t * 2 - d, 0, c, d) * .5 + c * .5 + b } });


/*
 * Isotope PACKAGED v2.2.0
 *
 * Licensed GPLv3 for open source use
 * or Isotope Commercial License for commercial use
 *
 * http://isotope.metafizzy.co
 * Copyright 2015 Metafizzy
 */

(function (t) { function e() { } function i(t) { function i(e) { e.prototype.option || (e.prototype.option = function (e) { t.isPlainObject(e) && (this.options = t.extend(!0, this.options, e)) }) } function n(e, i) { t.fn[e] = function (n) { if ("string" == typeof n) { for (var s = o.call(arguments, 1), a = 0, u = this.length; u > a; a++) { var p = this[a], h = t.data(p, e); if (h) if (t.isFunction(h[n]) && "_" !== n.charAt(0)) { var f = h[n].apply(h, s); if (void 0 !== f) return f } else r("no such method '" + n + "' for " + e + " instance"); else r("cannot call methods on " + e + " prior to initialization; " + "attempted to call '" + n + "'") } return this } return this.each(function () { var o = t.data(this, e); o ? (o.option(n), o._init()) : (o = new i(this, n), t.data(this, e, o)) }) } } if (t) { var r = "undefined" == typeof console ? e : function (t) { console.error(t) }; return t.bridget = function (t, e) { i(e), n(t, e) }, t.bridget } } var o = Array.prototype.slice; "function" == typeof define && define.amd ? define("jquery-bridget/jquery.bridget", ["jquery"], i) : "object" == typeof exports ? i(require("jquery")) : i(t.jQuery) })(window), function (t) { function e(e) { var i = t.event; return i.target = i.target || i.srcElement || e, i } var i = document.documentElement, o = function () { }; i.addEventListener ? o = function (t, e, i) { t.addEventListener(e, i, !1) } : i.attachEvent && (o = function (t, i, o) { t[i + o] = o.handleEvent ? function () { var i = e(t); o.handleEvent.call(o, i) } : function () { var i = e(t); o.call(t, i) }, t.attachEvent("on" + i, t[i + o]) }); var n = function () { }; i.removeEventListener ? n = function (t, e, i) { t.removeEventListener(e, i, !1) } : i.detachEvent && (n = function (t, e, i) { t.detachEvent("on" + e, t[e + i]); try { delete t[e + i] } catch (o) { t[e + i] = void 0 } }); var r = { bind: o, unbind: n }; "function" == typeof define && define.amd ? define("eventie/eventie", r) : "object" == typeof exports ? module.exports = r : t.eventie = r }(window), function () { function t() { } function e(t, e) { for (var i = t.length; i--;)if (t[i].listener === e) return i; return -1 } function i(t) { return function () { return this[t].apply(this, arguments) } } var o = t.prototype, n = this, r = n.EventEmitter; o.getListeners = function (t) { var e, i, o = this._getEvents(); if (t instanceof RegExp) { e = {}; for (i in o) o.hasOwnProperty(i) && t.test(i) && (e[i] = o[i]) } else e = o[t] || (o[t] = []); return e }, o.flattenListeners = function (t) { var e, i = []; for (e = 0; t.length > e; e += 1)i.push(t[e].listener); return i }, o.getListenersAsObject = function (t) { var e, i = this.getListeners(t); return i instanceof Array && (e = {}, e[t] = i), e || i }, o.addListener = function (t, i) { var o, n = this.getListenersAsObject(t), r = "object" == typeof i; for (o in n) n.hasOwnProperty(o) && -1 === e(n[o], i) && n[o].push(r ? i : { listener: i, once: !1 }); return this }, o.on = i("addListener"), o.addOnceListener = function (t, e) { return this.addListener(t, { listener: e, once: !0 }) }, o.once = i("addOnceListener"), o.defineEvent = function (t) { return this.getListeners(t), this }, o.defineEvents = function (t) { for (var e = 0; t.length > e; e += 1)this.defineEvent(t[e]); return this }, o.removeListener = function (t, i) { var o, n, r = this.getListenersAsObject(t); for (n in r) r.hasOwnProperty(n) && (o = e(r[n], i), -1 !== o && r[n].splice(o, 1)); return this }, o.off = i("removeListener"), o.addListeners = function (t, e) { return this.manipulateListeners(!1, t, e) }, o.removeListeners = function (t, e) { return this.manipulateListeners(!0, t, e) }, o.manipulateListeners = function (t, e, i) { var o, n, r = t ? this.removeListener : this.addListener, s = t ? this.removeListeners : this.addListeners; if ("object" != typeof e || e instanceof RegExp) for (o = i.length; o--;)r.call(this, e, i[o]); else for (o in e) e.hasOwnProperty(o) && (n = e[o]) && ("function" == typeof n ? r.call(this, o, n) : s.call(this, o, n)); return this }, o.removeEvent = function (t) { var e, i = typeof t, o = this._getEvents(); if ("string" === i) delete o[t]; else if (t instanceof RegExp) for (e in o) o.hasOwnProperty(e) && t.test(e) && delete o[e]; else delete this._events; return this }, o.removeAllListeners = i("removeEvent"), o.emitEvent = function (t, e) { var i, o, n, r, s = this.getListenersAsObject(t); for (n in s) if (s.hasOwnProperty(n)) for (o = s[n].length; o--;)i = s[n][o], i.once === !0 && this.removeListener(t, i.listener), r = i.listener.apply(this, e || []), r === this._getOnceReturnValue() && this.removeListener(t, i.listener); return this }, o.trigger = i("emitEvent"), o.emit = function (t) { var e = Array.prototype.slice.call(arguments, 1); return this.emitEvent(t, e) }, o.setOnceReturnValue = function (t) { return this._onceReturnValue = t, this }, o._getOnceReturnValue = function () { return this.hasOwnProperty("_onceReturnValue") ? this._onceReturnValue : !0 }, o._getEvents = function () { return this._events || (this._events = {}) }, t.noConflict = function () { return n.EventEmitter = r, t }, "function" == typeof define && define.amd ? define("eventEmitter/EventEmitter", [], function () { return t }) : "object" == typeof module && module.exports ? module.exports = t : n.EventEmitter = t }.call(this), function (t) { function e(t) { if (t) { if ("string" == typeof o[t]) return t; t = t.charAt(0).toUpperCase() + t.slice(1); for (var e, n = 0, r = i.length; r > n; n++)if (e = i[n] + t, "string" == typeof o[e]) return e } } var i = "Webkit Moz ms Ms O".split(" "), o = document.documentElement.style; "function" == typeof define && define.amd ? define("get-style-property/get-style-property", [], function () { return e }) : "object" == typeof exports ? module.exports = e : t.getStyleProperty = e }(window), function (t) { function e(t) { var e = parseFloat(t), i = -1 === t.indexOf("%") && !isNaN(e); return i && e } function i() { } function o() { for (var t = { width: 0, height: 0, innerWidth: 0, innerHeight: 0, outerWidth: 0, outerHeight: 0 }, e = 0, i = s.length; i > e; e++) { var o = s[e]; t[o] = 0 } return t } function n(i) { function n() { if (!d) { d = !0; var o = t.getComputedStyle; if (p = function () { var t = o ? function (t) { return o(t, null) } : function (t) { return t.currentStyle }; return function (e) { var i = t(e); return i || r("Style returned " + i + ". Are you running this code in a hidden iframe on Firefox? " + "See http://bit.ly/getsizebug1"), i } }(), h = i("boxSizing")) { var n = document.createElement("div"); n.style.width = "200px", n.style.padding = "1px 2px 3px 4px", n.style.borderStyle = "solid", n.style.borderWidth = "1px 2px 3px 4px", n.style[h] = "border-box"; var s = document.body || document.documentElement; s.appendChild(n); var a = p(n); f = 200 === e(a.width), s.removeChild(n) } } } function a(t) { if (n(), "string" == typeof t && (t = document.querySelector(t)), t && "object" == typeof t && t.nodeType) { var i = p(t); if ("none" === i.display) return o(); var r = {}; r.width = t.offsetWidth, r.height = t.offsetHeight; for (var a = r.isBorderBox = !(!h || !i[h] || "border-box" !== i[h]), d = 0, l = s.length; l > d; d++) { var c = s[d], m = i[c]; m = u(t, m); var y = parseFloat(m); r[c] = isNaN(y) ? 0 : y } var g = r.paddingLeft + r.paddingRight, v = r.paddingTop + r.paddingBottom, _ = r.marginLeft + r.marginRight, I = r.marginTop + r.marginBottom, z = r.borderLeftWidth + r.borderRightWidth, L = r.borderTopWidth + r.borderBottomWidth, x = a && f, E = e(i.width); E !== !1 && (r.width = E + (x ? 0 : g + z)); var b = e(i.height); return b !== !1 && (r.height = b + (x ? 0 : v + L)), r.innerWidth = r.width - (g + z), r.innerHeight = r.height - (v + L), r.outerWidth = r.width + _, r.outerHeight = r.height + I, r } } function u(e, i) { if (t.getComputedStyle || -1 === i.indexOf("%")) return i; var o = e.style, n = o.left, r = e.runtimeStyle, s = r && r.left; return s && (r.left = e.currentStyle.left), o.left = i, i = o.pixelLeft, o.left = n, s && (r.left = s), i } var p, h, f, d = !1; return a } var r = "undefined" == typeof console ? i : function (t) { console.error(t) }, s = ["paddingLeft", "paddingRight", "paddingTop", "paddingBottom", "marginLeft", "marginRight", "marginTop", "marginBottom", "borderLeftWidth", "borderRightWidth", "borderTopWidth", "borderBottomWidth"]; "function" == typeof define && define.amd ? define("get-size/get-size", ["get-style-property/get-style-property"], n) : "object" == typeof exports ? module.exports = n(require("desandro-get-style-property")) : t.getSize = n(t.getStyleProperty) }(window), function (t) { function e(t) { "function" == typeof t && (e.isReady ? t() : s.push(t)) } function i(t) { var i = "readystatechange" === t.type && "complete" !== r.readyState; e.isReady || i || o() } function o() { e.isReady = !0; for (var t = 0, i = s.length; i > t; t++) { var o = s[t]; o() } } function n(n) { return "complete" === r.readyState ? o() : (n.bind(r, "DOMContentLoaded", i), n.bind(r, "readystatechange", i), n.bind(t, "load", i)), e } var r = t.document, s = []; e.isReady = !1, "function" == typeof define && define.amd ? define("doc-ready/doc-ready", ["eventie/eventie"], n) : "object" == typeof exports ? module.exports = n(require("eventie")) : t.docReady = n(t.eventie) }(window), function (t) { function e(t, e) { return t[s](e) } function i(t) { if (!t.parentNode) { var e = document.createDocumentFragment(); e.appendChild(t) } } function o(t, e) { i(t); for (var o = t.parentNode.querySelectorAll(e), n = 0, r = o.length; r > n; n++)if (o[n] === t) return !0; return !1 } function n(t, o) { return i(t), e(t, o) } var r, s = function () { if (t.matches) return "matches"; if (t.matchesSelector) return "matchesSelector"; for (var e = ["webkit", "moz", "ms", "o"], i = 0, o = e.length; o > i; i++) { var n = e[i], r = n + "MatchesSelector"; if (t[r]) return r } }(); if (s) { var a = document.createElement("div"), u = e(a, "div"); r = u ? e : n } else r = o; "function" == typeof define && define.amd ? define("matches-selector/matches-selector", [], function () { return r }) : "object" == typeof exports ? module.exports = r : window.matchesSelector = r }(Element.prototype), function (t, e) { "function" == typeof define && define.amd ? define("fizzy-ui-utils/utils", ["doc-ready/doc-ready", "matches-selector/matches-selector"], function (i, o) { return e(t, i, o) }) : "object" == typeof exports ? module.exports = e(t, require("doc-ready"), require("desandro-matches-selector")) : t.fizzyUIUtils = e(t, t.docReady, t.matchesSelector) }(window, function (t, e, i) { var o = {}; o.extend = function (t, e) { for (var i in e) t[i] = e[i]; return t }, o.modulo = function (t, e) { return (t % e + e) % e }; var n = Object.prototype.toString; o.isArray = function (t) { return "[object Array]" == n.call(t) }, o.makeArray = function (t) { var e = []; if (o.isArray(t)) e = t; else if (t && "number" == typeof t.length) for (var i = 0, n = t.length; n > i; i++)e.push(t[i]); else e.push(t); return e }, o.indexOf = Array.prototype.indexOf ? function (t, e) { return t.indexOf(e) } : function (t, e) { for (var i = 0, o = t.length; o > i; i++)if (t[i] === e) return i; return -1 }, o.removeFrom = function (t, e) { var i = o.indexOf(t, e); -1 != i && t.splice(i, 1) }, o.isElement = "function" == typeof HTMLElement || "object" == typeof HTMLElement ? function (t) { return t instanceof HTMLElement } : function (t) { return t && "object" == typeof t && 1 == t.nodeType && "string" == typeof t.nodeName }, o.setText = function () { function t(t, i) { e = e || (void 0 !== document.documentElement.textContent ? "textContent" : "innerText"), t[e] = i } var e; return t }(), o.getParent = function (t, e) { for (; t != document.body;)if (t = t.parentNode, i(t, e)) return t }, o.getQueryElement = function (t) { return "string" == typeof t ? document.querySelector(t) : t }, o.handleEvent = function (t) { var e = "on" + t.type; this[e] && this[e](t) }, o.filterFindElements = function (t, e) { t = o.makeArray(t); for (var n = [], r = 0, s = t.length; s > r; r++) { var a = t[r]; if (o.isElement(a)) if (e) { i(a, e) && n.push(a); for (var u = a.querySelectorAll(e), p = 0, h = u.length; h > p; p++)n.push(u[p]) } else n.push(a) } return n }, o.debounceMethod = function (t, e, i) { var o = t.prototype[e], n = e + "Timeout"; t.prototype[e] = function () { var t = this[n]; t && clearTimeout(t); var e = arguments, r = this; this[n] = setTimeout(function () { o.apply(r, e), delete r[n] }, i || 100) } }, o.toDashed = function (t) { return t.replace(/(.)([A-Z])/g, function (t, e, i) { return e + "-" + i }).toLowerCase() }; var r = t.console; return o.htmlInit = function (i, n) { e(function () { for (var e = o.toDashed(n), s = document.querySelectorAll(".js-" + e), a = "data-" + e + "-options", u = 0, p = s.length; p > u; u++) { var h, f = s[u], d = f.getAttribute(a); try { h = d && JSON.parse(d) } catch (l) { r && r.error("Error parsing " + a + " on " + f.nodeName.toLowerCase() + (f.id ? "#" + f.id : "") + ": " + l); continue } var c = new i(f, h), m = t.jQuery; m && m.data(f, n, c) } }) }, o }), function (t, e) { "function" == typeof define && define.amd ? define("outlayer/item", ["eventEmitter/EventEmitter", "get-size/get-size", "get-style-property/get-style-property", "fizzy-ui-utils/utils"], function (i, o, n, r) { return e(t, i, o, n, r) }) : "object" == typeof exports ? module.exports = e(t, require("wolfy87-eventemitter"), require("get-size"), require("desandro-get-style-property"), require("fizzy-ui-utils")) : (t.Outlayer = {}, t.Outlayer.Item = e(t, t.EventEmitter, t.getSize, t.getStyleProperty, t.fizzyUIUtils)) }(window, function (t, e, i, o, n) { function r(t) { for (var e in t) return !1; return e = null, !0 } function s(t, e) { t && (this.element = t, this.layout = e, this.position = { x: 0, y: 0 }, this._create()) } var a = t.getComputedStyle, u = a ? function (t) { return a(t, null) } : function (t) { return t.currentStyle }, p = o("transition"), h = o("transform"), f = p && h, d = !!o("perspective"), l = { WebkitTransition: "webkitTransitionEnd", MozTransition: "transitionend", OTransition: "otransitionend", transition: "transitionend" }[p], c = ["transform", "transition", "transitionDuration", "transitionProperty"], m = function () { for (var t = {}, e = 0, i = c.length; i > e; e++) { var n = c[e], r = o(n); r && r !== n && (t[n] = r) } return t }(); n.extend(s.prototype, e.prototype), s.prototype._create = function () { this._transn = { ingProperties: {}, clean: {}, onEnd: {} }, this.css({ position: "absolute" }) }, s.prototype.handleEvent = function (t) { var e = "on" + t.type; this[e] && this[e](t) }, s.prototype.getSize = function () { this.size = i(this.element) }, s.prototype.css = function (t) { var e = this.element.style; for (var i in t) { var o = m[i] || i; e[o] = t[i] } }, s.prototype.getPosition = function () { var t = u(this.element), e = this.layout.options, i = e.isOriginLeft, o = e.isOriginTop, n = parseInt(t[i ? "left" : "right"], 10), r = parseInt(t[o ? "top" : "bottom"], 10); n = isNaN(n) ? 0 : n, r = isNaN(r) ? 0 : r; var s = this.layout.size; n -= i ? s.paddingLeft : s.paddingRight, r -= o ? s.paddingTop : s.paddingBottom, this.position.x = n, this.position.y = r }, s.prototype.layoutPosition = function () { var t = this.layout.size, e = this.layout.options, i = {}, o = e.isOriginLeft ? "paddingLeft" : "paddingRight", n = e.isOriginLeft ? "left" : "right", r = e.isOriginLeft ? "right" : "left", s = this.position.x + t[o]; s = e.percentPosition && !e.isHorizontal ? 100 * (s / t.width) + "%" : s + "px", i[n] = s, i[r] = ""; var a = e.isOriginTop ? "paddingTop" : "paddingBottom", u = e.isOriginTop ? "top" : "bottom", p = e.isOriginTop ? "bottom" : "top", h = this.position.y + t[a]; h = e.percentPosition && e.isHorizontal ? 100 * (h / t.height) + "%" : h + "px", i[u] = h, i[p] = "", this.css(i), this.emitEvent("layout", [this]) }; var y = d ? function (t, e) { return "translate3d(" + t + "px, " + e + "px, 0)" } : function (t, e) { return "translate(" + t + "px, " + e + "px)" }; s.prototype._transitionTo = function (t, e) { this.getPosition(); var i = this.position.x, o = this.position.y, n = parseInt(t, 10), r = parseInt(e, 10), s = n === this.position.x && r === this.position.y; if (this.setPosition(t, e), s && !this.isTransitioning) return this.layoutPosition(), void 0; var a = t - i, u = e - o, p = {}, h = this.layout.options; a = h.isOriginLeft ? a : -a, u = h.isOriginTop ? u : -u, p.transform = y(a, u), this.transition({ to: p, onTransitionEnd: { transform: this.layoutPosition }, isCleaning: !0 }) }, s.prototype.goTo = function (t, e) { this.setPosition(t, e), this.layoutPosition() }, s.prototype.moveTo = f ? s.prototype._transitionTo : s.prototype.goTo, s.prototype.setPosition = function (t, e) { this.position.x = parseInt(t, 10), this.position.y = parseInt(e, 10) }, s.prototype._nonTransition = function (t) { this.css(t.to), t.isCleaning && this._removeStyles(t.to); for (var e in t.onTransitionEnd) t.onTransitionEnd[e].call(this) }, s.prototype._transition = function (t) { if (!parseFloat(this.layout.options.transitionDuration)) return this._nonTransition(t), void 0; var e = this._transn; for (var i in t.onTransitionEnd) e.onEnd[i] = t.onTransitionEnd[i]; for (i in t.to) e.ingProperties[i] = !0, t.isCleaning && (e.clean[i] = !0); if (t.from) { this.css(t.from); var o = this.element.offsetHeight; o = null } this.enableTransition(t.to), this.css(t.to), this.isTransitioning = !0 }; var g = h && n.toDashed(h) + ",opacity"; s.prototype.enableTransition = function () { this.isTransitioning || (this.css({ transitionProperty: g, transitionDuration: this.layout.options.transitionDuration }), this.element.addEventListener(l, this, !1)) }, s.prototype.transition = s.prototype[p ? "_transition" : "_nonTransition"], s.prototype.onwebkitTransitionEnd = function (t) { this.ontransitionend(t) }, s.prototype.onotransitionend = function (t) { this.ontransitionend(t) }; var v = { "-webkit-transform": "transform", "-moz-transform": "transform", "-o-transform": "transform" }; s.prototype.ontransitionend = function (t) { if (t.target === this.element) { var e = this._transn, i = v[t.propertyName] || t.propertyName; if (delete e.ingProperties[i], r(e.ingProperties) && this.disableTransition(), i in e.clean && (this.element.style[t.propertyName] = "", delete e.clean[i]), i in e.onEnd) { var o = e.onEnd[i]; o.call(this), delete e.onEnd[i] } this.emitEvent("transitionEnd", [this]) } }, s.prototype.disableTransition = function () { this.removeTransitionStyles(), this.element.removeEventListener(l, this, !1), this.isTransitioning = !1 }, s.prototype._removeStyles = function (t) { var e = {}; for (var i in t) e[i] = ""; this.css(e) }; var _ = { transitionProperty: "", transitionDuration: "" }; return s.prototype.removeTransitionStyles = function () { this.css(_) }, s.prototype.removeElem = function () { this.element.parentNode.removeChild(this.element), this.css({ display: "" }), this.emitEvent("remove", [this]) }, s.prototype.remove = function () { if (!p || !parseFloat(this.layout.options.transitionDuration)) return this.removeElem(), void 0; var t = this; this.once("transitionEnd", function () { t.removeElem() }), this.hide() }, s.prototype.reveal = function () { delete this.isHidden, this.css({ display: "" }); var t = this.layout.options, e = {}, i = this.getHideRevealTransitionEndProperty("visibleStyle"); e[i] = this.onRevealTransitionEnd, this.transition({ from: t.hiddenStyle, to: t.visibleStyle, isCleaning: !0, onTransitionEnd: e }) }, s.prototype.onRevealTransitionEnd = function () { this.isHidden || this.emitEvent("reveal") }, s.prototype.getHideRevealTransitionEndProperty = function (t) { var e = this.layout.options[t]; if (e.opacity) return "opacity"; for (var i in e) return i }, s.prototype.hide = function () { this.isHidden = !0, this.css({ display: "" }); var t = this.layout.options, e = {}, i = this.getHideRevealTransitionEndProperty("hiddenStyle"); e[i] = this.onHideTransitionEnd, this.transition({ from: t.visibleStyle, to: t.hiddenStyle, isCleaning: !0, onTransitionEnd: e }) }, s.prototype.onHideTransitionEnd = function () { this.isHidden && (this.css({ display: "none" }), this.emitEvent("hide")) }, s.prototype.destroy = function () { this.css({ position: "", left: "", right: "", top: "", bottom: "", transition: "", transform: "" }) }, s }), function (t, e) { "function" == typeof define && define.amd ? define("outlayer/outlayer", ["eventie/eventie", "eventEmitter/EventEmitter", "get-size/get-size", "fizzy-ui-utils/utils", "./item"], function (i, o, n, r, s) { return e(t, i, o, n, r, s) }) : "object" == typeof exports ? module.exports = e(t, require("eventie"), require("wolfy87-eventemitter"), require("get-size"), require("fizzy-ui-utils"), require("./item")) : t.Outlayer = e(t, t.eventie, t.EventEmitter, t.getSize, t.fizzyUIUtils, t.Outlayer.Item) }(window, function (t, e, i, o, n, r) { function s(t, e) { var i = n.getQueryElement(t); if (!i) return a && a.error("Bad element for " + this.constructor.namespace + ": " + (i || t)), void 0; this.element = i, u && (this.$element = u(this.element)), this.options = n.extend({}, this.constructor.defaults), this.option(e); var o = ++h; this.element.outlayerGUID = o, f[o] = this, this._create(), this.options.isInitLayout && this.layout() } var a = t.console, u = t.jQuery, p = function () { }, h = 0, f = {}; return s.namespace = "outlayer", s.Item = r, s.defaults = { containerStyle: { position: "relative" }, isInitLayout: !0, isOriginLeft: !0, isOriginTop: !0, isResizeBound: !0, isResizingContainer: !0, transitionDuration: "0.4s", hiddenStyle: { opacity: 0, transform: "scale(0.001)" }, visibleStyle: { opacity: 1, transform: "scale(1)" } }, n.extend(s.prototype, i.prototype), s.prototype.option = function (t) { n.extend(this.options, t) }, s.prototype._create = function () { this.reloadItems(), this.stamps = [], this.stamp(this.options.stamp), n.extend(this.element.style, this.options.containerStyle), this.options.isResizeBound && this.bindResize() }, s.prototype.reloadItems = function () { this.items = this._itemize(this.element.children) }, s.prototype._itemize = function (t) { for (var e = this._filterFindItemElements(t), i = this.constructor.Item, o = [], n = 0, r = e.length; r > n; n++) { var s = e[n], a = new i(s, this); o.push(a) } return o }, s.prototype._filterFindItemElements = function (t) { return n.filterFindElements(t, this.options.itemSelector) }, s.prototype.getItemElements = function () { for (var t = [], e = 0, i = this.items.length; i > e; e++)t.push(this.items[e].element); return t }, s.prototype.layout = function () { this._resetLayout(), this._manageStamps(); var t = void 0 !== this.options.isLayoutInstant ? this.options.isLayoutInstant : !this._isLayoutInited; this.layoutItems(this.items, t), this._isLayoutInited = !0 }, s.prototype._init = s.prototype.layout, s.prototype._resetLayout = function () { this.getSize() }, s.prototype.getSize = function () { this.size = o(this.element) }, s.prototype._getMeasurement = function (t, e) { var i, r = this.options[t]; r ? ("string" == typeof r ? i = this.element.querySelector(r) : n.isElement(r) && (i = r), this[t] = i ? o(i)[e] : r) : this[t] = 0 }, s.prototype.layoutItems = function (t, e) { t = this._getItemsForLayout(t), this._layoutItems(t, e), this._postLayout() }, s.prototype._getItemsForLayout = function (t) { for (var e = [], i = 0, o = t.length; o > i; i++) { var n = t[i]; n.isIgnored || e.push(n) } return e }, s.prototype._layoutItems = function (t, e) { if (this._emitCompleteOnItems("layout", t), t && t.length) { for (var i = [], o = 0, n = t.length; n > o; o++) { var r = t[o], s = this._getItemLayoutPosition(r); s.item = r, s.isInstant = e || r.isLayoutInstant, i.push(s) } this._processLayoutQueue(i) } }, s.prototype._getItemLayoutPosition = function () { return { x: 0, y: 0 } }, s.prototype._processLayoutQueue = function (t) { for (var e = 0, i = t.length; i > e; e++) { var o = t[e]; this._positionItem(o.item, o.x, o.y, o.isInstant) } }, s.prototype._positionItem = function (t, e, i, o) { o ? t.goTo(e, i) : t.moveTo(e, i) }, s.prototype._postLayout = function () { this.resizeContainer() }, s.prototype.resizeContainer = function () { if (this.options.isResizingContainer) { var t = this._getContainerSize(); t && (this._setContainerMeasure(t.width, !0), this._setContainerMeasure(t.height, !1)) } }, s.prototype._getContainerSize = p, s.prototype._setContainerMeasure = function (t, e) { if (void 0 !== t) { var i = this.size; i.isBorderBox && (t += e ? i.paddingLeft + i.paddingRight + i.borderLeftWidth + i.borderRightWidth : i.paddingBottom + i.paddingTop + i.borderTopWidth + i.borderBottomWidth), t = Math.max(t, 0), this.element.style[e ? "width" : "height"] = t + "px" } }, s.prototype._emitCompleteOnItems = function (t, e) { function i() { n.emitEvent(t + "Complete", [e]) } function o() { s++, s === r && i() } var n = this, r = e.length; if (!e || !r) return i(), void 0; for (var s = 0, a = 0, u = e.length; u > a; a++) { var p = e[a]; p.once(t, o) } }, s.prototype.ignore = function (t) { var e = this.getItem(t); e && (e.isIgnored = !0) }, s.prototype.unignore = function (t) { var e = this.getItem(t); e && delete e.isIgnored }, s.prototype.stamp = function (t) { if (t = this._find(t)) { this.stamps = this.stamps.concat(t); for (var e = 0, i = t.length; i > e; e++) { var o = t[e]; this.ignore(o) } } }, s.prototype.unstamp = function (t) { if (t = this._find(t)) for (var e = 0, i = t.length; i > e; e++) { var o = t[e]; n.removeFrom(this.stamps, o), this.unignore(o) } }, s.prototype._find = function (t) { return t ? ("string" == typeof t && (t = this.element.querySelectorAll(t)), t = n.makeArray(t)) : void 0 }, s.prototype._manageStamps = function () { if (this.stamps && this.stamps.length) { this._getBoundingRect(); for (var t = 0, e = this.stamps.length; e > t; t++) { var i = this.stamps[t]; this._manageStamp(i) } } }, s.prototype._getBoundingRect = function () { var t = this.element.getBoundingClientRect(), e = this.size; this._boundingRect = { left: t.left + e.paddingLeft + e.borderLeftWidth, top: t.top + e.paddingTop + e.borderTopWidth, right: t.right - (e.paddingRight + e.borderRightWidth), bottom: t.bottom - (e.paddingBottom + e.borderBottomWidth) } }, s.prototype._manageStamp = p, s.prototype._getElementOffset = function (t) { var e = t.getBoundingClientRect(), i = this._boundingRect, n = o(t), r = { left: e.left - i.left - n.marginLeft, top: e.top - i.top - n.marginTop, right: i.right - e.right - n.marginRight, bottom: i.bottom - e.bottom - n.marginBottom }; return r }, s.prototype.handleEvent = function (t) { var e = "on" + t.type; this[e] && this[e](t) }, s.prototype.bindResize = function () { this.isResizeBound || (e.bind(t, "resize", this), this.isResizeBound = !0) }, s.prototype.unbindResize = function () { this.isResizeBound && e.unbind(t, "resize", this), this.isResizeBound = !1 }, s.prototype.onresize = function () { function t() { e.resize(), delete e.resizeTimeout } this.resizeTimeout && clearTimeout(this.resizeTimeout); var e = this; this.resizeTimeout = setTimeout(t, 100) }, s.prototype.resize = function () { this.isResizeBound && this.needsResizeLayout() && this.layout() }, s.prototype.needsResizeLayout = function () { var t = o(this.element), e = this.size && t; return e && t.innerWidth !== this.size.innerWidth }, s.prototype.addItems = function (t) { var e = this._itemize(t); return e.length && (this.items = this.items.concat(e)), e }, s.prototype.appended = function (t) { var e = this.addItems(t); e.length && (this.layoutItems(e, !0), this.reveal(e)) }, s.prototype.prepended = function (t) { var e = this._itemize(t); if (e.length) { var i = this.items.slice(0); this.items = e.concat(i), this._resetLayout(), this._manageStamps(), this.layoutItems(e, !0), this.reveal(e), this.layoutItems(i) } }, s.prototype.reveal = function (t) { this._emitCompleteOnItems("reveal", t); for (var e = t && t.length, i = 0; e && e > i; i++) { var o = t[i]; o.reveal() } }, s.prototype.hide = function (t) { this._emitCompleteOnItems("hide", t); for (var e = t && t.length, i = 0; e && e > i; i++) { var o = t[i]; o.hide() } }, s.prototype.revealItemElements = function (t) { var e = this.getItems(t); this.reveal(e) }, s.prototype.hideItemElements = function (t) { var e = this.getItems(t); this.hide(e) }, s.prototype.getItem = function (t) { for (var e = 0, i = this.items.length; i > e; e++) { var o = this.items[e]; if (o.element === t) return o } }, s.prototype.getItems = function (t) { t = n.makeArray(t); for (var e = [], i = 0, o = t.length; o > i; i++) { var r = t[i], s = this.getItem(r); s && e.push(s) } return e }, s.prototype.remove = function (t) { var e = this.getItems(t); if (this._emitCompleteOnItems("remove", e), e && e.length) for (var i = 0, o = e.length; o > i; i++) { var r = e[i]; r.remove(), n.removeFrom(this.items, r) } }, s.prototype.destroy = function () { var t = this.element.style; t.height = "", t.position = "", t.width = ""; for (var e = 0, i = this.items.length; i > e; e++) { var o = this.items[e]; o.destroy() } this.unbindResize(); var n = this.element.outlayerGUID; delete f[n], delete this.element.outlayerGUID, u && u.removeData(this.element, this.constructor.namespace) }, s.data = function (t) { t = n.getQueryElement(t); var e = t && t.outlayerGUID; return e && f[e] }, s.create = function (t, e) { function i() { s.apply(this, arguments) } return Object.create ? i.prototype = Object.create(s.prototype) : n.extend(i.prototype, s.prototype), i.prototype.constructor = i, i.defaults = n.extend({}, s.defaults), n.extend(i.defaults, e), i.prototype.settings = {}, i.namespace = t, i.data = s.data, i.Item = function () { r.apply(this, arguments) }, i.Item.prototype = new r, n.htmlInit(i, t), u && u.bridget && u.bridget(t, i), i }, s.Item = r, s }), function (t, e) { "function" == typeof define && define.amd ? define("isotope/js/item", ["outlayer/outlayer"], e) : "object" == typeof exports ? module.exports = e(require("outlayer")) : (t.Isotope = t.Isotope || {}, t.Isotope.Item = e(t.Outlayer)) }(window, function (t) { function e() { t.Item.apply(this, arguments) } e.prototype = new t.Item, e.prototype._create = function () { this.id = this.layout.itemGUID++, t.Item.prototype._create.call(this), this.sortData = {} }, e.prototype.updateSortData = function () { if (!this.isIgnored) { this.sortData.id = this.id, this.sortData["original-order"] = this.id, this.sortData.random = Math.random(); var t = this.layout.options.getSortData, e = this.layout._sorters; for (var i in t) { var o = e[i]; this.sortData[i] = o(this.element, this) } } }; var i = e.prototype.destroy; return e.prototype.destroy = function () { i.apply(this, arguments), this.css({ display: "" }) }, e }), function (t, e) { "function" == typeof define && define.amd ? define("isotope/js/layout-mode", ["get-size/get-size", "outlayer/outlayer"], e) : "object" == typeof exports ? module.exports = e(require("get-size"), require("outlayer")) : (t.Isotope = t.Isotope || {}, t.Isotope.LayoutMode = e(t.getSize, t.Outlayer)) }(window, function (t, e) { function i(t) { this.isotope = t, t && (this.options = t.options[this.namespace], this.element = t.element, this.items = t.filteredItems, this.size = t.size) } return function () { function t(t) { return function () { return e.prototype[t].apply(this.isotope, arguments) } } for (var o = ["_resetLayout", "_getItemLayoutPosition", "_manageStamp", "_getContainerSize", "_getElementOffset", "needsResizeLayout"], n = 0, r = o.length; r > n; n++) { var s = o[n]; i.prototype[s] = t(s) } }(), i.prototype.needsVerticalResizeLayout = function () { var e = t(this.isotope.element), i = this.isotope.size && e; return i && e.innerHeight != this.isotope.size.innerHeight }, i.prototype._getMeasurement = function () { this.isotope._getMeasurement.apply(this, arguments) }, i.prototype.getColumnWidth = function () { this.getSegmentSize("column", "Width") }, i.prototype.getRowHeight = function () { this.getSegmentSize("row", "Height") }, i.prototype.getSegmentSize = function (t, e) { var i = t + e, o = "outer" + e; if (this._getMeasurement(i, o), !this[i]) { var n = this.getFirstItemSize(); this[i] = n && n[o] || this.isotope.size["inner" + e] } }, i.prototype.getFirstItemSize = function () { var e = this.isotope.filteredItems[0]; return e && e.element && t(e.element) }, i.prototype.layout = function () { this.isotope.layout.apply(this.isotope, arguments) }, i.prototype.getSize = function () { this.isotope.getSize(), this.size = this.isotope.size }, i.modes = {}, i.create = function (t, e) { function o() { i.apply(this, arguments) } return o.prototype = new i, e && (o.options = e), o.prototype.namespace = t, i.modes[t] = o, o }, i }), function (t, e) { "function" == typeof define && define.amd ? define("masonry/masonry", ["outlayer/outlayer", "get-size/get-size", "fizzy-ui-utils/utils"], e) : "object" == typeof exports ? module.exports = e(require("outlayer"), require("get-size"), require("fizzy-ui-utils")) : t.Masonry = e(t.Outlayer, t.getSize, t.fizzyUIUtils) }(window, function (t, e, i) { var o = t.create("masonry"); return o.prototype._resetLayout = function () { this.getSize(), this._getMeasurement("columnWidth", "outerWidth"), this._getMeasurement("gutter", "outerWidth"), this.measureColumns(); var t = this.cols; for (this.colYs = []; t--;)this.colYs.push(0); this.maxY = 0 }, o.prototype.measureColumns = function () { if (this.getContainerWidth(), !this.columnWidth) { var t = this.items[0], i = t && t.element; this.columnWidth = i && e(i).outerWidth || this.containerWidth } var o = this.columnWidth += this.gutter, n = this.containerWidth + this.gutter, r = n / o, s = o - n % o, a = s && 1 > s ? "round" : "floor"; r = Math[a](r), this.cols = Math.max(r, 1) }, o.prototype.getContainerWidth = function () { var t = this.options.isFitWidth ? this.element.parentNode : this.element, i = e(t); this.containerWidth = i && i.innerWidth }, o.prototype._getItemLayoutPosition = function (t) { t.getSize(); var e = t.size.outerWidth % this.columnWidth, o = e && 1 > e ? "round" : "ceil", n = Math[o](t.size.outerWidth / this.columnWidth); n = Math.min(n, this.cols); for (var r = this._getColGroup(n), s = Math.min.apply(Math, r), a = i.indexOf(r, s), u = { x: this.columnWidth * a, y: s }, p = s + t.size.outerHeight, h = this.cols + 1 - r.length, f = 0; h > f; f++)this.colYs[a + f] = p; return u }, o.prototype._getColGroup = function (t) { if (2 > t) return this.colYs; for (var e = [], i = this.cols + 1 - t, o = 0; i > o; o++) { var n = this.colYs.slice(o, o + t); e[o] = Math.max.apply(Math, n) } return e }, o.prototype._manageStamp = function (t) { var i = e(t), o = this._getElementOffset(t), n = this.options.isOriginLeft ? o.left : o.right, r = n + i.outerWidth, s = Math.floor(n / this.columnWidth); s = Math.max(0, s); var a = Math.floor(r / this.columnWidth); a -= r % this.columnWidth ? 0 : 1, a = Math.min(this.cols - 1, a); for (var u = (this.options.isOriginTop ? o.top : o.bottom) + i.outerHeight, p = s; a >= p; p++)this.colYs[p] = Math.max(u, this.colYs[p]) }, o.prototype._getContainerSize = function () { this.maxY = Math.max.apply(Math, this.colYs); var t = { height: this.maxY }; return this.options.isFitWidth && (t.width = this._getContainerFitWidth()), t }, o.prototype._getContainerFitWidth = function () { for (var t = 0, e = this.cols; --e && 0 === this.colYs[e];)t++; return (this.cols - t) * this.columnWidth - this.gutter }, o.prototype.needsResizeLayout = function () { var t = this.containerWidth; return this.getContainerWidth(), t !== this.containerWidth }, o }), function (t, e) { "function" == typeof define && define.amd ? define("isotope/js/layout-modes/masonry", ["../layout-mode", "masonry/masonry"], e) : "object" == typeof exports ? module.exports = e(require("../layout-mode"), require("masonry-layout")) : e(t.Isotope.LayoutMode, t.Masonry) }(window, function (t, e) { function i(t, e) { for (var i in e) t[i] = e[i]; return t } var o = t.create("masonry"), n = o.prototype._getElementOffset, r = o.prototype.layout, s = o.prototype._getMeasurement; i(o.prototype, e.prototype), o.prototype._getElementOffset = n, o.prototype.layout = r, o.prototype._getMeasurement = s; var a = o.prototype.measureColumns; o.prototype.measureColumns = function () { this.items = this.isotope.filteredItems, a.call(this) }; var u = o.prototype._manageStamp; return o.prototype._manageStamp = function () { this.options.isOriginLeft = this.isotope.options.isOriginLeft, this.options.isOriginTop = this.isotope.options.isOriginTop, u.apply(this, arguments) }, o }), function (t, e) { "function" == typeof define && define.amd ? define("isotope/js/layout-modes/fit-rows", ["../layout-mode"], e) : "object" == typeof exports ? module.exports = e(require("../layout-mode")) : e(t.Isotope.LayoutMode) }(window, function (t) {
    var e = t.create("fitRows"); return e.prototype._resetLayout = function () {
        this.x = 0, this.y = 0, this.maxY = 0, this._getMeasurement("gutter", "outerWidth")
    }, e.prototype._getItemLayoutPosition = function (t) { t.getSize(); var e = t.size.outerWidth + this.gutter, i = this.isotope.size.innerWidth + this.gutter; 0 !== this.x && e + this.x > i && (this.x = 0, this.y = this.maxY); var o = { x: this.x, y: this.y }; return this.maxY = Math.max(this.maxY, this.y + t.size.outerHeight), this.x += e, o }, e.prototype._getContainerSize = function () { return { height: this.maxY } }, e
}), function (t, e) { "function" == typeof define && define.amd ? define("isotope/js/layout-modes/vertical", ["../layout-mode"], e) : "object" == typeof exports ? module.exports = e(require("../layout-mode")) : e(t.Isotope.LayoutMode) }(window, function (t) { var e = t.create("vertical", { horizontalAlignment: 0 }); return e.prototype._resetLayout = function () { this.y = 0 }, e.prototype._getItemLayoutPosition = function (t) { t.getSize(); var e = (this.isotope.size.innerWidth - t.size.outerWidth) * this.options.horizontalAlignment, i = this.y; return this.y += t.size.outerHeight, { x: e, y: i } }, e.prototype._getContainerSize = function () { return { height: this.y } }, e }), function (t, e) { "function" == typeof define && define.amd ? define(["outlayer/outlayer", "get-size/get-size", "matches-selector/matches-selector", "fizzy-ui-utils/utils", "isotope/js/item", "isotope/js/layout-mode", "isotope/js/layout-modes/masonry", "isotope/js/layout-modes/fit-rows", "isotope/js/layout-modes/vertical"], function (i, o, n, r, s, a) { return e(t, i, o, n, r, s, a) }) : "object" == typeof exports ? module.exports = e(t, require("outlayer"), require("get-size"), require("desandro-matches-selector"), require("fizzy-ui-utils"), require("./item"), require("./layout-mode"), require("./layout-modes/masonry"), require("./layout-modes/fit-rows"), require("./layout-modes/vertical")) : t.Isotope = e(t, t.Outlayer, t.getSize, t.matchesSelector, t.fizzyUIUtils, t.Isotope.Item, t.Isotope.LayoutMode) }(window, function (t, e, i, o, n, r, s) { function a(t, e) { return function (i, o) { for (var n = 0, r = t.length; r > n; n++) { var s = t[n], a = i.sortData[s], u = o.sortData[s]; if (a > u || u > a) { var p = void 0 !== e[s] ? e[s] : e, h = p ? 1 : -1; return (a > u ? 1 : -1) * h } } return 0 } } var u = t.jQuery, p = String.prototype.trim ? function (t) { return t.trim() } : function (t) { return t.replace(/^\s+|\s+$/g, "") }, h = document.documentElement, f = h.textContent ? function (t) { return t.textContent } : function (t) { return t.innerText }, d = e.create("isotope", { layoutMode: "masonry", isJQueryFiltering: !0, sortAscending: !0 }); d.Item = r, d.LayoutMode = s, d.prototype._create = function () { this.itemGUID = 0, this._sorters = {}, this._getSorters(), e.prototype._create.call(this), this.modes = {}, this.filteredItems = this.items, this.sortHistory = ["original-order"]; for (var t in s.modes) this._initLayoutMode(t) }, d.prototype.reloadItems = function () { this.itemGUID = 0, e.prototype.reloadItems.call(this) }, d.prototype._itemize = function () { for (var t = e.prototype._itemize.apply(this, arguments), i = 0, o = t.length; o > i; i++) { var n = t[i]; n.id = this.itemGUID++ } return this._updateItemsSortData(t), t }, d.prototype._initLayoutMode = function (t) { var e = s.modes[t], i = this.options[t] || {}; this.options[t] = e.options ? n.extend(e.options, i) : i, this.modes[t] = new e(this) }, d.prototype.layout = function () { return !this._isLayoutInited && this.options.isInitLayout ? (this.arrange(), void 0) : (this._layout(), void 0) }, d.prototype._layout = function () { var t = this._getIsInstant(); this._resetLayout(), this._manageStamps(), this.layoutItems(this.filteredItems, t), this._isLayoutInited = !0 }, d.prototype.arrange = function (t) { function e() { o.reveal(i.needReveal), o.hide(i.needHide) } this.option(t), this._getIsInstant(); var i = this._filter(this.items); this.filteredItems = i.matches; var o = this; this._bindArrangeComplete(), this._isInstant ? this._noTransition(e) : e(), this._sort(), this._layout() }, d.prototype._init = d.prototype.arrange, d.prototype._getIsInstant = function () { var t = void 0 !== this.options.isLayoutInstant ? this.options.isLayoutInstant : !this._isLayoutInited; return this._isInstant = t, t }, d.prototype._bindArrangeComplete = function () { function t() { e && i && o && n.emitEvent("arrangeComplete", [n.filteredItems]) } var e, i, o, n = this; this.once("layoutComplete", function () { e = !0, t() }), this.once("hideComplete", function () { i = !0, t() }), this.once("revealComplete", function () { o = !0, t() }) }, d.prototype._filter = function (t) { var e = this.options.filter; e = e || "*"; for (var i = [], o = [], n = [], r = this._getFilterTest(e), s = 0, a = t.length; a > s; s++) { var u = t[s]; if (!u.isIgnored) { var p = r(u); p && i.push(u), p && u.isHidden ? o.push(u) : p || u.isHidden || n.push(u) } } return { matches: i, needReveal: o, needHide: n } }, d.prototype._getFilterTest = function (t) { return u && this.options.isJQueryFiltering ? function (e) { return u(e.element).is(t) } : "function" == typeof t ? function (e) { return t(e.element) } : function (e) { return o(e.element, t) } }, d.prototype.updateSortData = function (t) { var e; t ? (t = n.makeArray(t), e = this.getItems(t)) : e = this.items, this._getSorters(), this._updateItemsSortData(e) }, d.prototype._getSorters = function () { var t = this.options.getSortData; for (var e in t) { var i = t[e]; this._sorters[e] = l(i) } }, d.prototype._updateItemsSortData = function (t) { for (var e = t && t.length, i = 0; e && e > i; i++) { var o = t[i]; o.updateSortData() } }; var l = function () { function t(t) { if ("string" != typeof t) return t; var i = p(t).split(" "), o = i[0], n = o.match(/^\[(.+)\]$/), r = n && n[1], s = e(r, o), a = d.sortDataParsers[i[1]]; return t = a ? function (t) { return t && a(s(t)) } : function (t) { return t && s(t) } } function e(t, e) { var i; return i = t ? function (e) { return e.getAttribute(t) } : function (t) { var i = t.querySelector(e); return i && f(i) } } return t }(); d.sortDataParsers = { parseInt: function (t) { return parseInt(t, 10) }, parseFloat: function (t) { return parseFloat(t) } }, d.prototype._sort = function () { var t = this.options.sortBy; if (t) { var e = [].concat.apply(t, this.sortHistory), i = a(e, this.options.sortAscending); this.filteredItems.sort(i), t != this.sortHistory[0] && this.sortHistory.unshift(t) } }, d.prototype._mode = function () { var t = this.options.layoutMode, e = this.modes[t]; if (!e) throw Error("No layout mode: " + t); return e.options = this.options[t], e }, d.prototype._resetLayout = function () { e.prototype._resetLayout.call(this), this._mode()._resetLayout() }, d.prototype._getItemLayoutPosition = function (t) { return this._mode()._getItemLayoutPosition(t) }, d.prototype._manageStamp = function (t) { this._mode()._manageStamp(t) }, d.prototype._getContainerSize = function () { return this._mode()._getContainerSize() }, d.prototype.needsResizeLayout = function () { return this._mode().needsResizeLayout() }, d.prototype.appended = function (t) { var e = this.addItems(t); if (e.length) { var i = this._filterRevealAdded(e); this.filteredItems = this.filteredItems.concat(i) } }, d.prototype.prepended = function (t) { var e = this._itemize(t); if (e.length) { this._resetLayout(), this._manageStamps(); var i = this._filterRevealAdded(e); this.layoutItems(this.filteredItems), this.filteredItems = i.concat(this.filteredItems), this.items = e.concat(this.items) } }, d.prototype._filterRevealAdded = function (t) { var e = this._filter(t); return this.hide(e.needHide), this.reveal(e.matches), this.layoutItems(e.matches, !0), e.matches }, d.prototype.insert = function (t) { var e = this.addItems(t); if (e.length) { var i, o, n = e.length; for (i = 0; n > i; i++)o = e[i], this.element.appendChild(o.element); var r = this._filter(e).matches; for (i = 0; n > i; i++)e[i].isLayoutInstant = !0; for (this.arrange(), i = 0; n > i; i++)delete e[i].isLayoutInstant; this.reveal(r) } }; var c = d.prototype.remove; return d.prototype.remove = function (t) { t = n.makeArray(t); var e = this.getItems(t); c.call(this, t); var i = e && e.length; if (i) for (var o = 0; i > o; o++) { var r = e[o]; n.removeFrom(this.filteredItems, r) } }, d.prototype.shuffle = function () { for (var t = 0, e = this.items.length; e > t; t++) { var i = this.items[t]; i.sortData.random = Math.random() } this.options.sortBy = "random", this._sort(), this._layout() }, d.prototype._noTransition = function (t) { var e = this.options.transitionDuration; this.options.transitionDuration = 0; var i = t.call(this); return this.options.transitionDuration = e, i }, d.prototype.getFilteredItemElements = function () { for (var t = [], e = 0, i = this.filteredItems.length; i > e; e++)t.push(this.filteredItems[e].element); return t }, d });


/*!
* FitVids 1.1
*
* Copyright 2013, Chris Coyier - http://css-tricks.com + Dave Rupert - http://daverupert.com
* Credit to Thierry Koblentz - http://www.alistapart.com/articles/creating-intrinsic-ratios-for-video/
* Released under the WTFPL license - http://sam.zoy.org/wtfpl/
*
*/

; (function ($) {

    'use strict';

    $.fn.fitVids = function (options) {
        var settings = {
            customSelector: null,
            ignore: null
        };

        if (!document.getElementById('fit-vids-style')) {
            // appendStyles: https://github.com/toddmotto/fluidvids/blob/master/dist/fluidvids.js
            var head = document.head || document.getElementsByTagName('head')[0];
            var css = '.fluid-width-video-wrapper{width:100%;position:relative;padding:0;}.fluid-width-video-wrapper iframe,.fluid-width-video-wrapper object,.fluid-width-video-wrapper embed {position:absolute;top:0;left:0;width:100%;height:100%;}';
            var div = document.createElement("div");
            div.innerHTML = '<p>x</p><style id="fit-vids-style">' + css + '</style>';
            head.appendChild(div.childNodes[1]);
        }

        if (options) {
            $.extend(settings, options);
        }

        return this.each(function () {
            var selectors = [
                'iframe[src*="player.vimeo.com"]',
                'iframe[src*="dailymotion.com"]',
                'iframe[src*="youtube.com"]',
                'iframe[src*="youtube-nocookie.com"]',
                'iframe[src*="kickstarter.com"][src*="video.html"]',
                'object',
                'embed'
            ];

            if (settings.customSelector) {
                selectors.push(settings.customSelector);
            }

            var ignoreList = '.fitvidsignore';

            if (settings.ignore) {
                ignoreList = ignoreList + ', ' + settings.ignore;
            }

            var $allVideos = $(this).find(selectors.join(','));
            $allVideos = $allVideos.not('.wpb_video_wrapper iframe'); //Visual Composer fix
            $allVideos = $allVideos.not('object object'); // SwfObj conflict patch
            $allVideos = $allVideos.not(ignoreList); // Disable FitVids on this video.

            $allVideos.each(function (count) {
                var $this = $(this);
                if ($this.parents(ignoreList).length > 0) {
                    return; // Disable FitVids on this video.
                }
                if (this.tagName.toLowerCase() === 'embed' && $this.parent('object').length || $this.parent('.fluid-width-video-wrapper').length) { return; }
                if ((!$this.css('height') && !$this.css('width')) && (isNaN($this.attr('height')) || isNaN($this.attr('width')))) {
                    $this.attr('height', 9);
                    $this.attr('width', 16);
                }
                var height = (this.tagName.toLowerCase() === 'object' || ($this.attr('height') && !isNaN(parseInt($this.attr('height'), 10)))) ? parseInt($this.attr('height'), 10) : $this.height(),
                    width = !isNaN(parseInt($this.attr('width'), 10)) ? parseInt($this.attr('width'), 10) : $this.width(),
                    aspectRatio = height / width;
                if (!$this.attr('id')) {
                    var videoID = 'fitvid' + count;
                    $this.attr('id', videoID);
                }
                $this.wrap('<div class="fluid-width-video-wrapper"></div>').parent('.fluid-width-video-wrapper').css('padding-top', (aspectRatio * 100) + '%');
                $this.removeAttr('height').removeAttr('width');
            });
        });
    };
    // Works with either jQuery or Zepto
})(window.jQuery || window.Zepto);


/*
 *  jQuery OwlCarousel v1.3.3
 *
 *  Copyright (c) 2013 Bartosz Wojciechowski
 *  http://www.owlgraphic.com/owlcarousel/
 *
 *  Licensed under MIT
 *
 */


if (typeof Object.create !== "function") {
    Object.create = function (obj) {
        function F() { }
        F.prototype = obj;
        return new F();
    };
}
(function ($, window, document) {

    var Carousel = {
        init: function (options, el) {
            var base = this;

            base.$elem = $(el);
            base.options = $.extend({}, $.fn.owlCarousel.options, base.$elem.data(), options);

            base.userOptions = options;
            base.loadContent();
        },

        loadContent: function () {
            var base = this, url;

            function getData(data) {
                var i, content = "";
                if (typeof base.options.jsonSuccess === "function") {
                    base.options.jsonSuccess.apply(this, [data]);
                } else {
                    for (i in data.owl) {
                        if (data.owl.hasOwnProperty(i)) {
                            content += data.owl[i].item;
                        }
                    }
                    base.$elem.html(content);
                }
                base.logIn();
            }

            if (typeof base.options.beforeInit === "function") {
                base.options.beforeInit.apply(this, [base.$elem]);
            }

            if (typeof base.options.jsonPath === "string") {
                url = base.options.jsonPath;
                $.getJSON(url, getData);
            } else {
                base.logIn();
            }
        },

        logIn: function () {
            var base = this;

            base.$elem.data("owl-originalStyles", base.$elem.attr("style"));
            base.$elem.data("owl-originalClasses", base.$elem.attr("class"));

            //base.$elem.css({opacity: 0}); PIRENKO
            base.orignalItems = base.options.items;
            base.checkBrowser();
            base.wrapperWidth = 0;
            base.checkVisible = null;
            base.setVars();
        },

        setVars: function () {
            var base = this;
            if (base.$elem.children().length === 0) { return false; }
            base.baseClass();
            base.eventTypes();
            base.$userItems = base.$elem.children();
            base.itemsAmount = base.$userItems.length;
            base.wrapItems();
            base.$owlItems = base.$elem.find(".owl-item");
            base.$owlWrapper = base.$elem.find(".owl-wrapper");
            base.playDirection = "next";
            base.prevItem = 0;
            base.prevArr = [0];
            base.currentItem = 0;
            base.customEvents();
            base.onStartup();
        },

        onStartup: function () {
            var base = this;
            base.updateItems();
            base.calculateAll();
            base.buildControls();
            base.updateControls();
            base.response();
            base.moveEvents();
            base.stopOnHover();
            base.owlStatus();

            if (base.options.transitionStyle !== false) {
                //PIRENKO
                //base.transitionTypes(base.options.transitionStyle); - WAS
                if (base.options.transitionStyle === "slide" || base.options.transitionStyle === "") {
                    base.options.transitionStyle = false;
                }
                else {
                    base.transitionTypes(base.options.transitionStyle);
                }
            }
            if (base.options.autoPlay === true) {
                base.options.autoPlay = 5000;
            }
            base.play();

            base.$elem.find(".owl-wrapper").css("display", "block");

            if (!base.$elem.is(":visible")) {
                base.watchVisibility();
            } else {
                //base.$elem.css("opacity", 1); PIRENKO
            }
            base.onstartup = false;
            base.eachMoveUpdate();
            if (typeof base.options.afterInit === "function") {
                base.options.afterInit.apply(this, [base.$elem]);
            }
        },

        eachMoveUpdate: function () {
            var base = this;

            if (base.options.lazyLoad === true) {
                base.lazyLoad();
            }
            if (base.options.autoHeight === true) {
                base.autoHeight();
            }
            base.onVisibleItems();

            if (typeof base.options.afterAction === "function") {
                base.options.afterAction.apply(this, [base.$elem]);
            }
        },

        updateVars: function () {
            var base = this;
            if (typeof base.options.beforeUpdate === "function") {
                base.options.beforeUpdate.apply(this, [base.$elem]);
            }
            base.watchVisibility();
            base.updateItems();
            base.calculateAll();
            base.updatePosition();
            base.updateControls();
            base.eachMoveUpdate();
            if (typeof base.options.afterUpdate === "function") {
                base.options.afterUpdate.apply(this, [base.$elem]);
            }
        },

        reload: function () {
            var base = this;
            window.setTimeout(function () {
                base.updateVars();
            }, 0);
        },

        watchVisibility: function () {
            var base = this;

            if (base.$elem.is(":visible") === false) {
                //base.$elem.css({opacity: 0}); PIRENKO
                window.clearInterval(base.autoPlayInterval);
                window.clearInterval(base.checkVisible);
            } else {
                return false;
            }
            base.checkVisible = window.setInterval(function () {
                if (base.$elem.is(":visible")) {
                    base.reload();
                    //base.$elem.animate({opacity: 1}, 200); PIRENKO
                    window.clearInterval(base.checkVisible);
                }
            }, 500);
        },

        wrapItems: function () {
            var base = this;
            base.$userItems.wrapAll("<div class=\"owl-wrapper\">").wrap("<div class=\"owl-item\"></div>");
            base.$elem.find(".owl-wrapper").wrap("<div class=\"owl-wrapper-outer\">");
            base.wrapperOuter = base.$elem.find(".owl-wrapper-outer");
            base.$elem.css("display", "block");
        },

        baseClass: function () {
            var base = this,
                hasBaseClass = base.$elem.hasClass(base.options.baseClass),
                hasThemeClass = base.$elem.hasClass(base.options.theme);

            if (!hasBaseClass) {
                base.$elem.addClass(base.options.baseClass);
            }

            if (!hasThemeClass) {
                base.$elem.addClass(base.options.theme);
            }
        },

        updateItems: function () {
            var base = this, width, i;

            if (base.options.responsive === false) {
                return false;
            }
            if (base.options.singleItem === true) {
                base.options.items = base.orignalItems = 1;
                base.options.itemsCustom = false;
                base.options.itemsDesktop = false;
                base.options.itemsDesktopSmall = false;
                base.options.itemsTablet = false;
                base.options.itemsTabletSmall = false;
                base.options.itemsMobile = false;
                return false;
            }

            width = $(base.options.responsiveBaseWidth).width();

            if (width > (base.options.itemsDesktop[0] || base.orignalItems)) {
                base.options.items = base.orignalItems;
            }
            if (base.options.itemsCustom !== false) {
                //Reorder array by screen size
                base.options.itemsCustom.sort(function (a, b) { return a[0] - b[0]; });

                for (i = 0; i < base.options.itemsCustom.length; i += 1) {
                    if (base.options.itemsCustom[i][0] <= width) {
                        base.options.items = base.options.itemsCustom[i][1];
                    }
                }

            } else {

                if (width <= base.options.itemsDesktop[0] && base.options.itemsDesktop !== false) {
                    base.options.items = base.options.itemsDesktop[1];
                }

                if (width <= base.options.itemsDesktopSmall[0] && base.options.itemsDesktopSmall !== false) {
                    base.options.items = base.options.itemsDesktopSmall[1];
                }

                if (width <= base.options.itemsTablet[0] && base.options.itemsTablet !== false) {
                    base.options.items = base.options.itemsTablet[1];
                }

                if (width <= base.options.itemsTabletSmall[0] && base.options.itemsTabletSmall !== false) {
                    base.options.items = base.options.itemsTabletSmall[1];
                }

                if (width <= base.options.itemsMobile[0] && base.options.itemsMobile !== false) {
                    base.options.items = base.options.itemsMobile[1];
                }
            }

            //if number of items is less than declared
            if (base.options.items > base.itemsAmount && base.options.itemsScaleUp === true) {
                base.options.items = base.itemsAmount;
            }
        },

        response: function () {
            var base = this,
                smallDelay,
                lastWindowWidth;

            if (base.options.responsive !== true) {
                return false;
            }
            lastWindowWidth = $(window).width();

            base.resizer = function () {
                if ($(window).width() !== lastWindowWidth) {
                    if (base.options.autoPlay !== false) {
                        window.clearInterval(base.autoPlayInterval);
                    }
                    window.clearTimeout(smallDelay);
                    smallDelay = window.setTimeout(function () {
                        lastWindowWidth = $(window).width();
                        base.updateVars();
                    }, base.options.responsiveRefreshRate);
                }
            };
            $(window).resize(base.resizer);
        },

        updatePosition: function () {
            var base = this;
            base.jumpTo(base.currentItem);
            if (base.options.autoPlay !== false) {
                base.checkAp();
            }
        },

        appendItemsSizes: function () {
            var base = this,
                roundPages = 0,
                lastItem = base.itemsAmount - base.options.items;

            base.$owlItems.each(function (index) {
                var $this = $(this);
                $this
                    .css({ "width": base.itemWidth })
                    .data("owl-item", Number(index));

                if (index % base.options.items === 0 || index === lastItem) {
                    if (!(index > lastItem)) {
                        roundPages += 1;
                    }
                }
                $this.data("owl-roundPages", roundPages);
            });
        },

        appendWrapperSizes: function () {
            var base = this,
                width = base.$owlItems.length * base.itemWidth;

            base.$owlWrapper.css({
                "width": width * 2,
                "left": 0
            });
            base.appendItemsSizes();
        },

        calculateAll: function () {
            var base = this;
            base.calculateWidth();
            base.appendWrapperSizes();
            base.loops();
            base.max();
        },

        calculateWidth: function () {
            var base = this;
            base.itemWidth = Math.round(base.$elem.width() / base.options.items);
        },

        max: function () {
            var base = this,
                maximum = ((base.itemsAmount * base.itemWidth) - base.options.items * base.itemWidth) * -1;
            if (base.options.items > base.itemsAmount) {
                base.maximumItem = 0;
                maximum = 0;
                base.maximumPixels = 0;
            } else {
                base.maximumItem = base.itemsAmount - base.options.items;
                base.maximumPixels = maximum;
            }
            return maximum;
        },

        min: function () {
            return 0;
        },

        loops: function () {
            var base = this,
                prev = 0,
                elWidth = 0,
                i,
                item,
                roundPageNum;

            base.positionsInArray = [0];
            base.pagesInArray = [];

            for (i = 0; i < base.itemsAmount; i += 1) {
                elWidth += base.itemWidth;
                base.positionsInArray.push(-elWidth);

                if (base.options.scrollPerPage === true) {
                    item = $(base.$owlItems[i]);
                    roundPageNum = item.data("owl-roundPages");
                    if (roundPageNum !== prev) {
                        base.pagesInArray[prev] = base.positionsInArray[i];
                        prev = roundPageNum;
                    }
                }
            }
        },

        buildControls: function () {
            var base = this;
            if (base.options.navigation === true || base.options.pagination === true) {
                base.owlControls = $("<div class=\"owl-controls\"/>").toggleClass("clickable", !base.browser.isTouch).appendTo(base.$elem);
            }
            if (base.options.pagination === true) {
                base.buildPagination();
            }
            if (base.options.navigation === true) {
                base.buildButtons();
            }
        },

        buildButtons: function () {
            var base = this,
                buttonsWrapper = $("<div class=\"owl-buttons\"/>");
            base.owlControls.append(buttonsWrapper);

            base.buttonPrev = $("<div/>", {
                "class": "owl-prev",
                "html": base.options.navigationText[0] || ""
            });

            base.buttonNext = $("<div/>", {
                "class": "owl-next",
                "html": base.options.navigationText[1] || ""
            });

            buttonsWrapper
                .append(base.buttonPrev)
                .append(base.buttonNext);

            buttonsWrapper.on("touchstart.owlControls mousedown.owlControls", "div[class^=\"owl\"]", function (event) {
                event.preventDefault();
            });

            buttonsWrapper.on("touchend.owlControls mouseup.owlControls", "div[class^=\"owl\"]", function (event) {
                event.preventDefault();
                if ($(this).hasClass("owl-next")) {
                    base.next();
                } else {
                    base.prev();
                }
            });
        },

        buildPagination: function () {
            var base = this;

            base.paginationWrapper = $("<div class=\"owl-pagination\"/>");
            base.owlControls.append(base.paginationWrapper);

            base.paginationWrapper.on("touchend.owlControls mouseup.owlControls", ".owl-page", function (event) {
                event.preventDefault();
                if (Number($(this).data("owl-page")) !== base.currentItem) {
                    base.goTo(Number($(this).data("owl-page")), true);
                }
            });
        },

        updatePagination: function () {
            var base = this,
                counter,
                lastPage,
                lastItem,
                i,
                paginationButton,
                paginationButtonInner;

            if (base.options.pagination === false) {
                return false;
            }

            base.paginationWrapper.html("");

            counter = 0;
            lastPage = base.itemsAmount - base.itemsAmount % base.options.items;

            for (i = 0; i < base.itemsAmount; i += 1) {
                if (i % base.options.items === 0) {
                    counter += 1;
                    if (lastPage === i) {
                        lastItem = base.itemsAmount - base.options.items;
                    }
                    paginationButton = $("<div/>", {
                        "class": "owl-page"
                    });
                    paginationButtonInner = $("<span></span>", {
                        "text": base.options.paginationNumbers === true ? counter : "",
                        "class": base.options.paginationNumbers === true ? "owl-numbers" : ""
                    });
                    paginationButton.append(paginationButtonInner);

                    paginationButton.data("owl-page", lastPage === i ? lastItem : i);
                    paginationButton.data("owl-roundPages", counter);

                    base.paginationWrapper.append(paginationButton);
                }
            }
            base.checkPagination();
        },
        checkPagination: function () {
            var base = this;
            if (base.options.pagination === false) {
                return false;
            }
            base.paginationWrapper.find(".owl-page").each(function () {
                if ($(this).data("owl-roundPages") === $(base.$owlItems[base.currentItem]).data("owl-roundPages")) {
                    base.paginationWrapper
                        .find(".owl-page")
                        .removeClass("active");
                    $(this).addClass("active");
                }
            });
        },

        checkNavigation: function () {
            var base = this;

            if (base.options.navigation === false) {
                return false;
            }
            if (base.options.rewindNav === false) {
                if (base.currentItem === 0 && base.maximumItem === 0) {
                    base.buttonPrev.addClass("disabled");
                    base.buttonNext.addClass("disabled");
                } else if (base.currentItem === 0 && base.maximumItem !== 0) {
                    base.buttonPrev.addClass("disabled");
                    base.buttonNext.removeClass("disabled");
                } else if (base.currentItem === base.maximumItem) {
                    base.buttonPrev.removeClass("disabled");
                    base.buttonNext.addClass("disabled");
                } else if (base.currentItem !== 0 && base.currentItem !== base.maximumItem) {
                    base.buttonPrev.removeClass("disabled");
                    base.buttonNext.removeClass("disabled");
                }
            }
        },

        updateControls: function () {
            var base = this;
            base.updatePagination();
            base.checkNavigation();
            if (base.owlControls) {
                if (base.options.items >= base.itemsAmount) {
                    base.owlControls.hide();
                } else {
                    base.owlControls.show();
                }
            }
        },

        destroyControls: function () {
            var base = this;
            if (base.owlControls) {
                base.owlControls.remove();
            }
        },

        next: function (speed) {
            var base = this;

            if (base.isTransition) {
                return false;
            }

            base.currentItem += base.options.scrollPerPage === true ? base.options.items : 1;
            if (base.currentItem > base.maximumItem + (base.options.scrollPerPage === true ? (base.options.items - 1) : 0)) {
                if (base.options.rewindNav === true) {
                    base.currentItem = 0;
                    speed = "rewind";
                } else {
                    base.currentItem = base.maximumItem;
                    return false;
                }
            }
            base.goTo(base.currentItem, speed);
        },

        prev: function (speed) {
            var base = this;

            if (base.isTransition) {
                return false;
            }

            if (base.options.scrollPerPage === true && base.currentItem > 0 && base.currentItem < base.options.items) {
                base.currentItem = 0;
            } else {
                base.currentItem -= base.options.scrollPerPage === true ? base.options.items : 1;
            }
            if (base.currentItem < 0) {
                if (base.options.rewindNav === true) {
                    base.currentItem = base.maximumItem;
                    speed = "rewind";
                } else {
                    base.currentItem = 0;
                    return false;
                }
            }
            base.goTo(base.currentItem, speed);
        },

        goTo: function (position, speed, drag) {
            var base = this,
                goToPixel;

            if (base.isTransition) {
                return false;
            }
            if (typeof base.options.beforeMove === "function") {
                base.options.beforeMove.apply(this, [base.$elem]);
            }
            if (position >= base.maximumItem) {
                position = base.maximumItem;
            } else if (position <= 0) {
                position = 0;
            }

            base.currentItem = base.owl.currentItem = position;
            if (base.options.transitionStyle !== false && drag !== "drag" && base.options.items === 1 && base.browser.support3d === true) {
                base.swapSpeed(0);
                if (base.browser.support3d === true) {
                    base.transition3d(base.positionsInArray[position]);
                } else {
                    base.css2slide(base.positionsInArray[position], 1);
                }
                base.afterGo();
                base.singleItemTransition();
                return false;
            }
            goToPixel = base.positionsInArray[position];

            if (base.browser.support3d === true) {
                base.isCss3Finish = false;

                if (speed === true) {
                    base.swapSpeed("paginationSpeed");
                    window.setTimeout(function () {
                        base.isCss3Finish = true;
                    }, base.options.paginationSpeed);

                } else if (speed === "rewind") {
                    base.swapSpeed(base.options.rewindSpeed);
                    window.setTimeout(function () {
                        base.isCss3Finish = true;
                    }, base.options.rewindSpeed);

                } else {
                    base.swapSpeed("slideSpeed");
                    window.setTimeout(function () {
                        base.isCss3Finish = true;
                    }, base.options.slideSpeed);
                }
                base.transition3d(goToPixel);
            } else {
                if (speed === true) {
                    base.css2slide(goToPixel, base.options.paginationSpeed);
                } else if (speed === "rewind") {
                    base.css2slide(goToPixel, base.options.rewindSpeed);
                } else {
                    base.css2slide(goToPixel, base.options.slideSpeed);
                }
            }
            base.afterGo();
        },

        jumpTo: function (position) {
            var base = this;
            if (typeof base.options.beforeMove === "function") {
                base.options.beforeMove.apply(this, [base.$elem]);
            }
            if (position >= base.maximumItem || position === -1) {
                position = base.maximumItem;
            } else if (position <= 0) {
                position = 0;
            }
            base.swapSpeed(0);
            if (base.browser.support3d === true) {
                base.transition3d(base.positionsInArray[position]);
            } else {
                base.css2slide(base.positionsInArray[position], 1);
            }
            base.currentItem = base.owl.currentItem = position;
            base.afterGo();
        },

        afterGo: function () {
            var base = this;

            base.prevArr.push(base.currentItem);
            base.prevItem = base.owl.prevItem = base.prevArr[base.prevArr.length - 2];
            base.prevArr.shift(0);

            if (base.prevItem !== base.currentItem) {
                base.checkPagination();
                base.checkNavigation();
                base.eachMoveUpdate();

                if (base.options.autoPlay !== false) {
                    base.checkAp();
                }
            }
            if (typeof base.options.afterMove === "function" && base.prevItem !== base.currentItem) {
                base.options.afterMove.apply(this, [base.$elem]);
            }
        },

        stop: function () {
            var base = this;
            base.apStatus = "stop";
            window.clearInterval(base.autoPlayInterval);
        },

        checkAp: function () {
            var base = this;
            if (base.apStatus !== "stop") {
                base.play();
            }
        },

        play: function () {
            var base = this;
            base.apStatus = "play";
            if (base.options.autoPlay === false) {
                return false;
            }
            window.clearInterval(base.autoPlayInterval);
            base.autoPlayInterval = window.setInterval(function () {
                base.next(true);
            }, base.options.autoPlay);
        },

        swapSpeed: function (action) {
            var base = this;
            if (action === "slideSpeed") {
                base.$owlWrapper.css(base.addCssSpeed(base.options.slideSpeed));
            } else if (action === "paginationSpeed") {
                base.$owlWrapper.css(base.addCssSpeed(base.options.paginationSpeed));
            } else if (typeof action !== "string") {
                base.$owlWrapper.css(base.addCssSpeed(action));
            }
        },

        addCssSpeed: function (speed) {
            return {
                "-webkit-transition": "all " + speed + "ms ease",
                "-moz-transition": "all " + speed + "ms ease",
                "-o-transition": "all " + speed + "ms ease",
                "transition": "all " + speed + "ms ease"
            };
        },

        removeTransition: function () {
            return {
                "-webkit-transition": "",
                "-moz-transition": "",
                "-o-transition": "",
                "transition": ""
            };
        },

        doTranslate: function (pixels) {
            return {
                "-webkit-transform": "translate3d(" + pixels + "px, 0px, 0px)",
                "-moz-transform": "translate3d(" + pixels + "px, 0px, 0px)",
                "-o-transform": "translate3d(" + pixels + "px, 0px, 0px)",
                "-ms-transform": "translate3d(" + pixels + "px, 0px, 0px)",
                "transform": "translate3d(" + pixels + "px, 0px,0px)"
            };
        },

        transition3d: function (value) {
            var base = this;
            base.$owlWrapper.css(base.doTranslate(value));
        },

        css2move: function (value) {
            var base = this;
            base.$owlWrapper.css({ "left": value });
        },

        css2slide: function (value, speed) {
            var base = this;

            base.isCssFinish = false;
            base.$owlWrapper.stop(true, true).animate({
                "left": value
            }, {
                duration: speed || base.options.slideSpeed,
                complete: function () {
                    base.isCssFinish = true;
                }
            });
        },

        checkBrowser: function () {
            var base = this,
                translate3D = "translate3d(0px, 0px, 0px)",
                tempElem = document.createElement("div"),
                regex,
                asSupport,
                support3d,
                isTouch;

            tempElem.style.cssText = "  -moz-transform:" + translate3D +
                "; -ms-transform:" + translate3D +
                "; -o-transform:" + translate3D +
                "; -webkit-transform:" + translate3D +
                "; transform:" + translate3D;
            regex = /translate3d\(0px, 0px, 0px\)/g;
            asSupport = tempElem.style.cssText.match(regex);
            //PIRENKO
            //WAS support3d = (asSupport !== null && asSupport.length);
            support3d = false;
            if (asSupport !== null && asSupport.length) {
                support3d = true;
            }
            //END PIRENKO

            isTouch = "ontouchstart" in window || window.navigator.msMaxTouchPoints;

            base.browser = {
                "support3d": support3d,
                "isTouch": isTouch
            };
        },

        moveEvents: function () {
            var base = this;
            if (base.options.mouseDrag !== false || base.options.touchDrag !== false) {
                base.gestures();
                base.disabledEvents();
            }
        },

        eventTypes: function () {
            var base = this,
                types = ["s", "e", "x"];

            base.ev_types = {};

            if (base.options.mouseDrag === true && base.options.touchDrag === true) {
                types = [
                    "touchstart.owl mousedown.owl",
                    "touchmove.owl mousemove.owl",
                    "touchend.owl touchcancel.owl mouseup.owl"
                ];
            } else if (base.options.mouseDrag === false && base.options.touchDrag === true) {
                types = [
                    "touchstart.owl",
                    "touchmove.owl",
                    "touchend.owl touchcancel.owl"
                ];
            } else if (base.options.mouseDrag === true && base.options.touchDrag === false) {
                types = [
                    "mousedown.owl",
                    "mousemove.owl",
                    "mouseup.owl"
                ];
            }

            base.ev_types.start = types[0];
            base.ev_types.move = types[1];
            base.ev_types.end = types[2];
        },

        disabledEvents: function () {
            var base = this;
            base.$elem.on("dragstart.owl", function (event) { event.preventDefault(); });
            base.$elem.on("mousedown.disableTextSelect", function (e) {
                return $(e.target).is('input, textarea, select, option');
            });
        },

        gestures: function () {
            /*jslint unparam: true*/
            var base = this,
                locals = {
                    offsetX: 0,
                    offsetY: 0,
                    baseElWidth: 0,
                    relativePos: 0,
                    position: null,
                    minSwipe: null,
                    maxSwipe: null,
                    sliding: null,
                    dargging: null,
                    targetElement: null
                };

            base.isCssFinish = true;

            function getTouches(event) {
                if (event.touches !== undefined) {
                    return {
                        x: event.touches[0].pageX,
                        y: event.touches[0].pageY
                    };
                }

                if (event.touches === undefined) {
                    if (event.pageX !== undefined) {
                        return {
                            x: event.pageX,
                            y: event.pageY
                        };
                    }
                    if (event.pageX === undefined) {
                        return {
                            x: event.clientX,
                            y: event.clientY
                        };
                    }
                }
            }

            function swapEvents(type) {
                if (type === "on") {
                    $(document).on(base.ev_types.move, dragMove);
                    $(document).on(base.ev_types.end, dragEnd);
                } else if (type === "off") {
                    $(document).off(base.ev_types.move);
                    $(document).off(base.ev_types.end);
                }
            }

            function dragStart(event) {
                var ev = event.originalEvent || event || window.event,
                    position;

                if (ev.which === 3) {
                    return false;
                }
                if (base.itemsAmount <= base.options.items) {
                    return;
                }
                if (base.isCssFinish === false && !base.options.dragBeforeAnimFinish) {
                    return false;
                }
                if (base.isCss3Finish === false && !base.options.dragBeforeAnimFinish) {
                    return false;
                }

                if (base.options.autoPlay !== false) {
                    window.clearInterval(base.autoPlayInterval);
                }

                if (base.browser.isTouch !== true && !base.$owlWrapper.hasClass("grabbing")) {
                    base.$owlWrapper.addClass("grabbing");
                }

                base.newPosX = 0;
                base.newRelativeX = 0;

                $(this).css(base.removeTransition());

                position = $(this).position();
                locals.relativePos = position.left;

                locals.offsetX = getTouches(ev).x - position.left;
                locals.offsetY = getTouches(ev).y - position.top;

                swapEvents("on");

                locals.sliding = false;
                locals.targetElement = ev.target || ev.srcElement;
            }

            function dragMove(event) {
                var ev = event.originalEvent || event || window.event,
                    minSwipe,
                    maxSwipe;

                base.newPosX = getTouches(ev).x - locals.offsetX;
                base.newPosY = getTouches(ev).y - locals.offsetY;
                base.newRelativeX = base.newPosX - locals.relativePos;

                if (typeof base.options.startDragging === "function" && locals.dragging !== true && base.newRelativeX !== 0) {
                    locals.dragging = true;
                    base.options.startDragging.apply(base, [base.$elem]);
                }

                if ((base.newRelativeX > 8 || base.newRelativeX < -8) && (base.browser.isTouch === true)) {
                    if (ev.preventDefault !== undefined) {
                        ev.preventDefault();
                    } else {
                        ev.returnValue = false;
                    }
                    locals.sliding = true;
                }

                if ((base.newPosY > 10 || base.newPosY < -10) && locals.sliding === false) {
                    $(document).off("touchmove.owl");
                }

                minSwipe = function () {
                    return base.newRelativeX / 5;
                };

                maxSwipe = function () {
                    return base.maximumPixels + base.newRelativeX / 5;
                };

                base.newPosX = Math.max(Math.min(base.newPosX, minSwipe()), maxSwipe());
                if (base.browser.support3d === true) {
                    base.transition3d(base.newPosX);
                } else {
                    base.css2move(base.newPosX);
                }
            }

            function dragEnd(event) {
                var ev = event.originalEvent || event || window.event,
                    newPosition,
                    handlers,
                    owlStopEvent;

                ev.target = ev.target || ev.srcElement;

                locals.dragging = false;

                if (base.browser.isTouch !== true) {
                    base.$owlWrapper.removeClass("grabbing");
                }

                if (base.newRelativeX < 0) {
                    base.dragDirection = base.owl.dragDirection = "left";
                } else {
                    base.dragDirection = base.owl.dragDirection = "right";
                }

                if (base.newRelativeX !== 0) {
                    newPosition = base.getNewPosition();
                    base.goTo(newPosition, false, "drag");
                    if (locals.targetElement === ev.target && base.browser.isTouch !== true) {
                        $(ev.target).on("click.disable", function (ev) {
                            ev.stopImmediatePropagation();
                            ev.stopPropagation();
                            ev.preventDefault();
                            $(ev.target).off("click.disable");
                        });
                        handlers = $._data(ev.target, "events").click;
                        owlStopEvent = handlers.pop();
                        handlers.splice(0, 0, owlStopEvent);
                    }
                }
                swapEvents("off");
            }
            base.$elem.on(base.ev_types.start, ".owl-wrapper", dragStart);
        },

        getNewPosition: function () {
            var base = this,
                newPosition = base.closestItem();

            if (newPosition > base.maximumItem) {
                base.currentItem = base.maximumItem;
                newPosition = base.maximumItem;
            } else if (base.newPosX >= 0) {
                newPosition = 0;
                base.currentItem = 0;
            }
            return newPosition;
        },
        closestItem: function () {
            var base = this,
                array = base.options.scrollPerPage === true ? base.pagesInArray : base.positionsInArray,
                goal = base.newPosX,
                closest = null;

            $.each(array, function (i, v) {
                if (goal - (base.itemWidth / 20) > array[i + 1] && goal - (base.itemWidth / 20) < v && base.moveDirection() === "left") {
                    closest = v;
                    if (base.options.scrollPerPage === true) {
                        base.currentItem = $.inArray(closest, base.positionsInArray);
                    } else {
                        base.currentItem = i;
                    }
                } else if (goal + (base.itemWidth / 20) < v && goal + (base.itemWidth / 20) > (array[i + 1] || array[i] - base.itemWidth) && base.moveDirection() === "right") {
                    if (base.options.scrollPerPage === true) {
                        closest = array[i + 1] || array[array.length - 1];
                        base.currentItem = $.inArray(closest, base.positionsInArray);
                    } else {
                        closest = array[i + 1];
                        base.currentItem = i + 1;
                    }
                }
            });
            return base.currentItem;
        },

        moveDirection: function () {
            var base = this,
                direction;
            if (base.newRelativeX < 0) {
                direction = "right";
                base.playDirection = "next";
            } else {
                direction = "left";
                base.playDirection = "prev";
            }
            return direction;
        },

        customEvents: function () {
            /*jslint unparam: true*/
            var base = this;
            base.$elem.on("owl.next", function () {
                base.next();
            });
            base.$elem.on("owl.prev", function () {
                base.prev();
            });
            base.$elem.on("owl.play", function (event, speed) {
                base.options.autoPlay = speed;
                base.play();
                base.hoverStatus = "play";
            });
            base.$elem.on("owl.stop", function () {
                base.stop();
                base.hoverStatus = "stop";
            });
            base.$elem.on("owl.goTo", function (event, item) {
                base.goTo(item);
            });
            base.$elem.on("owl.jumpTo", function (event, item) {
                base.jumpTo(item);
            });
        },

        stopOnHover: function () {
            var base = this;
            if (base.options.stopOnHover === true && base.browser.isTouch !== true && base.options.autoPlay !== false) {
                base.$elem.on("mouseover", function () {
                    base.stop();
                });
                base.$elem.on("mouseout", function () {
                    if (base.hoverStatus !== "stop") {
                        base.play();
                    }
                });
            }
        },

        lazyLoad: function () {
            var base = this,
                i,
                $item,
                itemNumber,
                $lazyImg,
                follow;

            if (base.options.lazyLoad === false) {
                return false;
            }
            for (i = 0; i < base.itemsAmount; i += 1) {
                $item = $(base.$owlItems[i]);

                if ($item.data("owl-loaded") === "loaded") {
                    continue;
                }

                itemNumber = $item.data("owl-item");
                $lazyImg = $item.find(".lazyOwl");

                if (typeof $lazyImg.data("src") !== "string") {
                    $item.data("owl-loaded", "loaded");
                    continue;
                }
                if ($item.data("owl-loaded") === undefined) {
                    $lazyImg.hide();
                    $item.addClass("loading").data("owl-loaded", "checked");
                }
                if (base.options.lazyFollow === true) {
                    follow = itemNumber >= base.currentItem;
                } else {
                    follow = true;
                }
                if (follow && itemNumber < base.currentItem + base.options.items && $lazyImg.length) {
                    base.lazyPreload($item, $lazyImg);
                }
            }
        },

        lazyPreload: function ($item, $lazyImg) {
            var base = this,
                iterations = 0,
                isBackgroundImg;

            if ($lazyImg.prop("tagName") === "DIV") {
                $lazyImg.css("background-image", "url(" + $lazyImg.data("src") + ")");
                isBackgroundImg = true;
            } else {
                $lazyImg[0].src = $lazyImg.data("src");
            }

            function showImage() {
                $item.data("owl-loaded", "loaded").removeClass("loading");
                $lazyImg.removeAttr("data-src");
                if (base.options.lazyEffect === "fade") {
                    $lazyImg.fadeIn(400);
                } else {
                    $lazyImg.show();
                }
                if (typeof base.options.afterLazyLoad === "function") {
                    base.options.afterLazyLoad.apply(this, [base.$elem]);
                }
            }

            function checkLazyImage() {
                iterations += 1;
                if (base.completeImg($lazyImg.get(0)) || isBackgroundImg === true) {
                    showImage();
                } else if (iterations <= 100) {//if image loads in less than 10 seconds 
                    window.setTimeout(checkLazyImage, 100);
                } else {
                    showImage();
                }
            }

            checkLazyImage();
        },

        autoHeight: function () {
            var base = this,
                $currentimg = $(base.$owlItems[base.currentItem]).find("img"),
                iterations;

            function addHeight() {
                var $currentItem = $(base.$owlItems[base.currentItem]).height();
                base.wrapperOuter.css("height", $currentItem + "px");
                if (!base.wrapperOuter.hasClass("autoHeight")) {
                    window.setTimeout(function () {
                        base.wrapperOuter.addClass("autoHeight");
                    }, 0);
                }
            }

            function checkImage() {
                iterations += 1;
                if (base.completeImg($currentimg.get(0))) {
                    addHeight();
                } else if (iterations <= 100) { //if image loads in less than 10 seconds 
                    window.setTimeout(checkImage, 100);
                } else {
                    base.wrapperOuter.css("height", ""); //Else remove height attribute
                }
            }

            if ($currentimg.get(0) !== undefined) {
                iterations = 0;
                checkImage();
            } else {
                addHeight();
            }
        },

        completeImg: function (img) {
            var naturalWidthType;

            if (!img.complete) {
                return false;
            }
            naturalWidthType = typeof img.naturalWidth;
            if (naturalWidthType !== "undefined" && img.naturalWidth === 0) {
                return false;
            }
            return true;
        },

        onVisibleItems: function () {
            var base = this,
                i;

            if (base.options.addClassActive === true) {
                base.$owlItems.removeClass("active");
            }
            base.visibleItems = [];
            for (i = base.currentItem; i < base.currentItem + base.options.items; i += 1) {
                base.visibleItems.push(i);

                if (base.options.addClassActive === true) {
                    $(base.$owlItems[i]).addClass("active");
                }
            }
            base.owl.visibleItems = base.visibleItems;
        },

        transitionTypes: function (className) {
            var base = this;
            //Currently available: "fade", "backSlide", "goDown", "fadeUp"
            base.outClass = "owl-" + className + "-out";
            base.inClass = "owl-" + className + "-in";
        },

        singleItemTransition: function () {
            var base = this,
                outClass = base.outClass,
                inClass = base.inClass,
                $currentItem = base.$owlItems.eq(base.currentItem),
                $prevItem = base.$owlItems.eq(base.prevItem),
                prevPos = Math.abs(base.positionsInArray[base.currentItem]) + base.positionsInArray[base.prevItem],
                origin = Math.abs(base.positionsInArray[base.currentItem]) + base.itemWidth / 2,
                animEnd = 'webkitAnimationEnd oAnimationEnd MSAnimationEnd animationend';

            base.isTransition = true;

            base.$owlWrapper
                .addClass('owl-origin')
                .css({
                    "-webkit-transform-origin": origin + "px",
                    "-moz-perspective-origin": origin + "px",
                    "perspective-origin": origin + "px"
                });
            function transStyles(prevPos) {
                return {
                    "position": "relative",
                    "left": prevPos + "px"
                };
            }

            $prevItem
                .css(transStyles(prevPos, 10))
                .addClass(outClass)
                .on(animEnd, function () {
                    base.endPrev = true;
                    $prevItem.off(animEnd);
                    base.clearTransStyle($prevItem, outClass);
                });

            $currentItem
                .addClass(inClass)
                .on(animEnd, function () {
                    base.endCurrent = true;
                    $currentItem.off(animEnd);
                    base.clearTransStyle($currentItem, inClass);
                });
        },

        clearTransStyle: function (item, classToRemove) {
            var base = this;
            item.css({
                "position": "",
                "left": ""
            }).removeClass(classToRemove);

            if (base.endPrev && base.endCurrent) {
                base.$owlWrapper.removeClass('owl-origin');
                base.endPrev = false;
                base.endCurrent = false;
                base.isTransition = false;
            }
        },

        owlStatus: function () {
            var base = this;
            base.owl = {
                "userOptions": base.userOptions,
                "baseElement": base.$elem,
                "userItems": base.$userItems,
                "owlItems": base.$owlItems,
                "currentItem": base.currentItem,
                "prevItem": base.prevItem,
                "visibleItems": base.visibleItems,
                "isTouch": base.browser.isTouch,
                "browser": base.browser,
                "dragDirection": base.dragDirection
            };
        },

        clearEvents: function () {
            var base = this;
            base.$elem.off(".owl owl mousedown.disableTextSelect");
            $(document).off(".owl owl");
            $(window).off("resize", base.resizer);
        },

        unWrap: function () {
            var base = this;
            if (base.$elem.children().length !== 0) {
                base.$owlWrapper.unwrap();
                base.$userItems.unwrap().unwrap();
                if (base.owlControls) {
                    base.owlControls.remove();
                }
            }
            base.clearEvents();
            base.$elem
                .attr("style", base.$elem.data("owl-originalStyles") || "")
                .attr("class", base.$elem.data("owl-originalClasses"));
        },

        destroy: function () {
            var base = this;
            base.stop();
            window.clearInterval(base.checkVisible);
            base.unWrap();
            base.$elem.removeData();
        },

        reinit: function (newOptions) {
            var base = this,
                options = $.extend({}, base.userOptions, newOptions);
            base.unWrap();
            base.init(options, base.$elem);
        },

        addItem: function (htmlString, targetPosition) {
            var base = this,
                position;

            if (!htmlString) { return false; }

            if (base.$elem.children().length === 0) {
                base.$elem.append(htmlString);
                base.setVars();
                return false;
            }
            base.unWrap();
            if (targetPosition === undefined || targetPosition === -1) {
                position = -1;
            } else {
                position = targetPosition;
            }
            if (position >= base.$userItems.length || position === -1) {
                base.$userItems.eq(-1).after(htmlString);
            } else {
                base.$userItems.eq(position).before(htmlString);
            }

            base.setVars();
        },

        removeItem: function (targetPosition) {
            var base = this,
                position;

            if (base.$elem.children().length === 0) {
                return false;
            }
            if (targetPosition === undefined || targetPosition === -1) {
                position = -1;
            } else {
                position = targetPosition;
            }

            base.unWrap();
            base.$userItems.eq(position).remove();
            base.setVars();
        }

    };

    $.fn.owlCarousel = function (options) {
        return this.each(function () {
            if ($(this).data("owl-init") === true) {
                return false;
            }
            $(this).data("owl-init", true);
            var carousel = Object.create(Carousel);
            carousel.init(options, this);
            $.data(this, "owlCarousel", carousel);
        });
    };

    $.fn.owlCarousel.options = {

        items: 5,
        itemsCustom: false,
        itemsDesktop: [1199, 4],
        itemsDesktopSmall: [979, 3],
        itemsTablet: [768, 2],
        itemsTabletSmall: false,
        itemsMobile: [479, 1],
        singleItem: false,
        itemsScaleUp: false,

        slideSpeed: 200,
        paginationSpeed: 800,
        rewindSpeed: 1000,

        autoPlay: false,
        stopOnHover: false,

        navigation: false,
        navigationText: ["prev", "next"],
        rewindNav: true,
        scrollPerPage: false,

        pagination: true,
        paginationNumbers: false,

        responsive: true,
        responsiveRefreshRate: 200,
        responsiveBaseWidth: window,

        baseClass: "owl-carousel",
        theme: "owl-theme",

        lazyLoad: false,
        lazyFollow: true,
        lazyEffect: "fade",

        autoHeight: false,

        jsonPath: false,
        jsonSuccess: false,

        dragBeforeAnimFinish: true,
        mouseDrag: true,
        touchDrag: true,

        addClassActive: false,
        transitionStyle: false,

        beforeUpdate: false,
        afterUpdate: false,
        beforeInit: false,
        afterInit: false,
        beforeMove: false,
        afterMove: false,
        afterAction: false,
        startDragging: false,
        afterLazyLoad: false
    };
}(jQuery, window, document));

/*CUSTOM SCROLLBAR */

/*! Copyright (c) 2013 Brandon Aaron (http://brandon.aaron.sh)
 * Licensed under the MIT License (LICENSE.txt).
 *
 * Version: 3.1.12
 *
 * Requires: jQuery 1.2.2+
 */
!function (a) { "function" == typeof define && define.amd ? define(["jquery"], a) : "object" == typeof exports ? module.exports = a : a(jQuery) }(function (a) { function b(b) { var g = b || window.event, h = i.call(arguments, 1), j = 0, l = 0, m = 0, n = 0, o = 0, p = 0; if (b = a.event.fix(g), b.type = "mousewheel", "detail" in g && (m = -1 * g.detail), "wheelDelta" in g && (m = g.wheelDelta), "wheelDeltaY" in g && (m = g.wheelDeltaY), "wheelDeltaX" in g && (l = -1 * g.wheelDeltaX), "axis" in g && g.axis === g.HORIZONTAL_AXIS && (l = -1 * m, m = 0), j = 0 === m ? l : m, "deltaY" in g && (m = -1 * g.deltaY, j = m), "deltaX" in g && (l = g.deltaX, 0 === m && (j = -1 * l)), 0 !== m || 0 !== l) { if (1 === g.deltaMode) { var q = a.data(this, "mousewheel-line-height"); j *= q, m *= q, l *= q } else if (2 === g.deltaMode) { var r = a.data(this, "mousewheel-page-height"); j *= r, m *= r, l *= r } if (n = Math.max(Math.abs(m), Math.abs(l)), (!f || f > n) && (f = n, d(g, n) && (f /= 40)), d(g, n) && (j /= 40, l /= 40, m /= 40), j = Math[j >= 1 ? "floor" : "ceil"](j / f), l = Math[l >= 1 ? "floor" : "ceil"](l / f), m = Math[m >= 1 ? "floor" : "ceil"](m / f), k.settings.normalizeOffset && this.getBoundingClientRect) { var s = this.getBoundingClientRect(); o = b.clientX - s.left, p = b.clientY - s.top } return b.deltaX = l, b.deltaY = m, b.deltaFactor = f, b.offsetX = o, b.offsetY = p, b.deltaMode = 0, h.unshift(b, j, l, m), e && clearTimeout(e), e = setTimeout(c, 200), (a.event.dispatch || a.event.handle).apply(this, h) } } function c() { f = null } function d(a, b) { return k.settings.adjustOldDeltas && "mousewheel" === a.type && b % 120 === 0 } var e, f, g = ["wheel", "mousewheel", "DOMMouseScroll", "MozMousePixelScroll"], h = "onwheel" in document || document.documentMode >= 9 ? ["wheel"] : ["mousewheel", "DomMouseScroll", "MozMousePixelScroll"], i = Array.prototype.slice; if (a.event.fixHooks) for (var j = g.length; j;)a.event.fixHooks[g[--j]] = a.event.mouseHooks; var k = a.event.special.mousewheel = { version: "3.1.12", setup: function () { if (this.addEventListener) for (var c = h.length; c;)this.addEventListener(h[--c], b, !1); else this.onmousewheel = b; a.data(this, "mousewheel-line-height", k.getLineHeight(this)), a.data(this, "mousewheel-page-height", k.getPageHeight(this)) }, teardown: function () { if (this.removeEventListener) for (var c = h.length; c;)this.removeEventListener(h[--c], b, !1); else this.onmousewheel = null; a.removeData(this, "mousewheel-line-height"), a.removeData(this, "mousewheel-page-height") }, getLineHeight: function (b) { var c = a(b), d = c["offsetParent" in a.fn ? "offsetParent" : "parent"](); return d.length || (d = a("body")), parseInt(d.css("fontSize"), 10) || parseInt(c.css("fontSize"), 10) || 16 }, getPageHeight: function (b) { return a(b).height() }, settings: { adjustOldDeltas: !0, normalizeOffset: !0 } }; a.fn.extend({ mousewheel: function (a) { return a ? this.bind("mousewheel", a) : this.trigger("mousewheel") }, unmousewheel: function (a) { return this.unbind("mousewheel", a) } }) });


(function (c) { var b = { init: function (e) { var f = { set_width: false, set_height: false, horizontalScroll: false, scrollInertia: 950, mouseWheel: true, mouseWheelPixels: "auto", autoDraggerLength: true, autoHideScrollbar: false, snapAmount: null, snapOffset: 0, scrollButtons: { enable: false, scrollType: "continuous", scrollSpeed: "auto", scrollAmount: 40 }, advanced: { updateOnBrowserResize: true, updateOnContentResize: false, autoExpandHorizontalScroll: false, autoScrollOnFocus: true, normalizeMouseWheelDelta: false }, contentTouchScroll: true, callbacks: { onScrollStart: function () { }, onScroll: function () { }, onTotalScroll: function () { }, onTotalScrollBack: function () { }, onTotalScrollOffset: 0, onTotalScrollBackOffset: 0, whileScrolling: function () { } }, theme: "light" }, e = c.extend(true, f, e); return this.each(function () { var m = c(this); if (e.set_width) { m.css("width", e.set_width) } if (e.set_height) { m.css("height", e.set_height) } if (!c(document).data("mCustomScrollbar-index")) { c(document).data("mCustomScrollbar-index", "1") } else { var t = parseInt(c(document).data("mCustomScrollbar-index")); c(document).data("mCustomScrollbar-index", t + 1) } m.wrapInner("<div class='mCustomScrollBox mCS-" + e.theme + "' id='mCSB_" + c(document).data("mCustomScrollbar-index") + "' style='position:relative; height:100%; overflow:hidden; max-width:100%;' />").addClass("mCustomScrollbar _mCS_" + c(document).data("mCustomScrollbar-index")); var g = m.children(".mCustomScrollBox"); if (e.horizontalScroll) { g.addClass("mCSB_horizontal").wrapInner("<div class='mCSB_h_wrapper' style='position:relative; left:0; width:999999px;' />"); var k = g.children(".mCSB_h_wrapper"); k.wrapInner("<div class='mCSB_container' style='position:absolute; left:0;' />").children(".mCSB_container").css({ width: k.children().outerWidth(), position: "relative" }).unwrap() } else { g.wrapInner("<div class='mCSB_container' style='position:relative; top:0;' />") } var o = g.children(".mCSB_container"); if (c.support.touch) { o.addClass("mCS_touch") } o.after("<div class='mCSB_scrollTools' style='position:absolute;'><div class='mCSB_draggerContainer'><div class='mCSB_dragger' style='position:absolute;' oncontextmenu='return false;'><div class='mCSB_dragger_bar' style='position:relative;'></div></div><div class='mCSB_draggerRail'></div></div></div>"); var l = g.children(".mCSB_scrollTools"), h = l.children(".mCSB_draggerContainer"), q = h.children(".mCSB_dragger"); if (e.horizontalScroll) { q.data("minDraggerWidth", q.width()) } else { q.data("minDraggerHeight", q.height()) } if (e.scrollButtons.enable) { if (e.horizontalScroll) { l.prepend("<a class='mCSB_buttonLeft' oncontextmenu='return false;'></a>").append("<a class='mCSB_buttonRight' oncontextmenu='return false;'></a>") } else { l.prepend("<a class='mCSB_buttonUp' oncontextmenu='return false;'></a>").append("<a class='mCSB_buttonDown' oncontextmenu='return false;'></a>") } } g.bind("scroll", function () { if (!m.is(".mCS_disabled")) { g.scrollTop(0).scrollLeft(0) } }); m.data({ mCS_Init: true, mCustomScrollbarIndex: c(document).data("mCustomScrollbar-index"), horizontalScroll: e.horizontalScroll, scrollInertia: e.scrollInertia, scrollEasing: "mcsEaseOut", mouseWheel: e.mouseWheel, mouseWheelPixels: e.mouseWheelPixels, autoDraggerLength: e.autoDraggerLength, autoHideScrollbar: e.autoHideScrollbar, snapAmount: e.snapAmount, snapOffset: e.snapOffset, scrollButtons_enable: e.scrollButtons.enable, scrollButtons_scrollType: e.scrollButtons.scrollType, scrollButtons_scrollSpeed: e.scrollButtons.scrollSpeed, scrollButtons_scrollAmount: e.scrollButtons.scrollAmount, autoExpandHorizontalScroll: e.advanced.autoExpandHorizontalScroll, autoScrollOnFocus: e.advanced.autoScrollOnFocus, normalizeMouseWheelDelta: e.advanced.normalizeMouseWheelDelta, contentTouchScroll: e.contentTouchScroll, onScrollStart_Callback: e.callbacks.onScrollStart, onScroll_Callback: e.callbacks.onScroll, onTotalScroll_Callback: e.callbacks.onTotalScroll, onTotalScrollBack_Callback: e.callbacks.onTotalScrollBack, onTotalScroll_Offset: e.callbacks.onTotalScrollOffset, onTotalScrollBack_Offset: e.callbacks.onTotalScrollBackOffset, whileScrolling_Callback: e.callbacks.whileScrolling, bindEvent_scrollbar_drag: false, bindEvent_content_touch: false, bindEvent_scrollbar_click: false, bindEvent_mousewheel: false, bindEvent_buttonsContinuous_y: false, bindEvent_buttonsContinuous_x: false, bindEvent_buttonsPixels_y: false, bindEvent_buttonsPixels_x: false, bindEvent_focusin: false, bindEvent_autoHideScrollbar: false, mCSB_buttonScrollRight: false, mCSB_buttonScrollLeft: false, mCSB_buttonScrollDown: false, mCSB_buttonScrollUp: false }); if (e.horizontalScroll) { if (m.css("max-width") !== "none") { if (!e.advanced.updateOnContentResize) { e.advanced.updateOnContentResize = true } } } else { if (m.css("max-height") !== "none") { var s = false, r = parseInt(m.css("max-height")); if (m.css("max-height").indexOf("%") >= 0) { s = r, r = m.parent().height() * s / 100 } m.css("overflow", "hidden"); g.css("max-height", r) } } m.mCustomScrollbar("update"); if (e.advanced.updateOnBrowserResize) { var i, j = c(window).width(), u = c(window).height(); c(window).bind("resize." + m.data("mCustomScrollbarIndex"), function () { if (i) { clearTimeout(i) } i = setTimeout(function () { if (!m.is(".mCS_disabled") && !m.is(".mCS_destroyed")) { var w = c(window).width(), v = c(window).height(); if (j !== w || u !== v) { if (m.css("max-height") !== "none" && s) { g.css("max-height", m.parent().height() * s / 100) } m.mCustomScrollbar("update"); j = w; u = v } } }, 150) }) } if (e.advanced.updateOnContentResize) { var p; if (e.horizontalScroll) { var n = o.outerWidth() } else { var n = o.outerHeight() } p = setInterval(function () { if (e.horizontalScroll) { if (e.advanced.autoExpandHorizontalScroll) { o.css({ position: "absolute", width: "auto" }).wrap("<div class='mCSB_h_wrapper' style='position:relative; left:0; width:999999px;' />").css({ width: o.outerWidth(), position: "relative" }).unwrap() } var v = o.outerWidth() } else { var v = o.outerHeight() } if (v != n) { m.mCustomScrollbar("update"); n = v } }, 300) } }) }, update: function () { var n = c(this), k = n.children(".mCustomScrollBox"), q = k.children(".mCSB_container"); q.removeClass("mCS_no_scrollbar"); n.removeClass("mCS_disabled mCS_destroyed"); k.scrollTop(0).scrollLeft(0); var y = k.children(".mCSB_scrollTools"), o = y.children(".mCSB_draggerContainer"), m = o.children(".mCSB_dragger"); if (n.data("horizontalScroll")) { var A = y.children(".mCSB_buttonLeft"), t = y.children(".mCSB_buttonRight"), f = k.width(); if (n.data("autoExpandHorizontalScroll")) { q.css({ position: "absolute", width: "auto" }).wrap("<div class='mCSB_h_wrapper' style='position:relative; left:0; width:999999px;' />").css({ width: q.outerWidth(), position: "relative" }).unwrap() } var z = q.outerWidth() } else { var w = y.children(".mCSB_buttonUp"), g = y.children(".mCSB_buttonDown"), r = k.height(), i = q.outerHeight() } if (i > r && !n.data("horizontalScroll")) { y.css("display", "block"); var s = o.height(); if (n.data("autoDraggerLength")) { var u = Math.round(r / i * s), l = m.data("minDraggerHeight"); if (u <= l) { m.css({ height: l }) } else { if (u >= s - 10) { var p = s - 10; m.css({ height: p }) } else { m.css({ height: u }) } } m.children(".mCSB_dragger_bar").css({ "line-height": m.height() + "px" }) } var B = m.height(), x = (i - r) / (s - B); n.data("scrollAmount", x).mCustomScrollbar("scrolling", k, q, o, m, w, g, A, t); var D = Math.abs(q.position().top); n.mCustomScrollbar("scrollTo", D, { scrollInertia: 0, trigger: "internal" }) } else { if (z > f && n.data("horizontalScroll")) { y.css("display", "block"); var h = o.width(); if (n.data("autoDraggerLength")) { var j = Math.round(f / z * h), C = m.data("minDraggerWidth"); if (j <= C) { m.css({ width: C }) } else { if (j >= h - 10) { var e = h - 10; m.css({ width: e }) } else { m.css({ width: j }) } } } var v = m.width(), x = (z - f) / (h - v); n.data("scrollAmount", x).mCustomScrollbar("scrolling", k, q, o, m, w, g, A, t); var D = Math.abs(q.position().left); n.mCustomScrollbar("scrollTo", D, { scrollInertia: 0, trigger: "internal" }) } else { k.unbind("mousewheel focusin"); if (n.data("horizontalScroll")) { m.add(q).css("left", 0) } else { m.add(q).css("top", 0) } y.css("display", "none"); q.addClass("mCS_no_scrollbar"); n.data({ bindEvent_mousewheel: false, bindEvent_focusin: false }) } } }, scrolling: function (h, p, m, j, w, e, A, v) { var k = c(this); if (!k.data("bindEvent_scrollbar_drag")) { var n, o; if (c.support.msPointer) { j.bind("MSPointerDown", function (H) { H.preventDefault(); k.data({ on_drag: true }); j.addClass("mCSB_dragger_onDrag"); var G = c(this), J = G.offset(), F = H.originalEvent.pageX - J.left, I = H.originalEvent.pageY - J.top; if (F < G.width() && F > 0 && I < G.height() && I > 0) { n = I; o = F } }); c(document).bind("MSPointerMove." + k.data("mCustomScrollbarIndex"), function (H) { H.preventDefault(); if (k.data("on_drag")) { var G = j, J = G.offset(), F = H.originalEvent.pageX - J.left, I = H.originalEvent.pageY - J.top; D(n, o, I, F) } }).bind("MSPointerUp." + k.data("mCustomScrollbarIndex"), function (x) { k.data({ on_drag: false }); j.removeClass("mCSB_dragger_onDrag") }) } else { j.bind("mousedown touchstart", function (H) { H.preventDefault(); H.stopImmediatePropagation(); var G = c(this), K = G.offset(), F, J; if (H.type === "touchstart") { var I = H.originalEvent.touches[0] || H.originalEvent.changedTouches[0]; F = I.pageX - K.left; J = I.pageY - K.top } else { k.data({ on_drag: true }); j.addClass("mCSB_dragger_onDrag"); F = H.pageX - K.left; J = H.pageY - K.top } if (F < G.width() && F > 0 && J < G.height() && J > 0) { n = J; o = F } }).bind("touchmove", function (H) { H.preventDefault(); H.stopImmediatePropagation(); var K = H.originalEvent.touches[0] || H.originalEvent.changedTouches[0], G = c(this), J = G.offset(), F = K.pageX - J.left, I = K.pageY - J.top; D(n, o, I, F) }); c(document).bind("mousemove." + k.data("mCustomScrollbarIndex"), function (H) { if (k.data("on_drag")) { var G = j, J = G.offset(), F = H.pageX - J.left, I = H.pageY - J.top; D(n, o, I, F) } }).bind("mouseup." + k.data("mCustomScrollbarIndex"), function (x) { k.data({ on_drag: false }); j.removeClass("mCSB_dragger_onDrag") }) } k.data({ bindEvent_scrollbar_drag: true }) } function D(G, H, I, F) { if (k.data("horizontalScroll")) { k.mCustomScrollbar("scrollTo", (j.position().left - (H)) + F, { moveDragger: true, trigger: "internal" }) } else { k.mCustomScrollbar("scrollTo", (j.position().top - (G)) + I, { moveDragger: true, trigger: "internal" }) } } if (c.support.touch && k.data("contentTouchScroll")) { if (!k.data("bindEvent_content_touch")) { var l, B, r, s, u, C, E; p.bind("touchstart", function (x) { x.stopImmediatePropagation(); l = x.originalEvent.touches[0] || x.originalEvent.changedTouches[0]; B = c(this); r = B.offset(); u = l.pageX - r.left; s = l.pageY - r.top; C = s; E = u }); p.bind("touchmove", function (x) { x.preventDefault(); x.stopImmediatePropagation(); l = x.originalEvent.touches[0] || x.originalEvent.changedTouches[0]; B = c(this).parent(); r = B.offset(); u = l.pageX - r.left; s = l.pageY - r.top; if (k.data("horizontalScroll")) { k.mCustomScrollbar("scrollTo", E - u, { trigger: "internal" }) } else { k.mCustomScrollbar("scrollTo", C - s, { trigger: "internal" }) } }) } } if (!k.data("bindEvent_scrollbar_click")) { m.bind("click", function (F) { var x = (F.pageY - m.offset().top) * k.data("scrollAmount"), y = c(F.target); if (k.data("horizontalScroll")) { x = (F.pageX - m.offset().left) * k.data("scrollAmount") } if (y.hasClass("mCSB_draggerContainer") || y.hasClass("mCSB_draggerRail")) { k.mCustomScrollbar("scrollTo", x, { trigger: "internal", scrollEasing: "draggerRailEase" }) } }); k.data({ bindEvent_scrollbar_click: true }) } if (k.data("mouseWheel")) { if (!k.data("bindEvent_mousewheel")) { h.bind("mousewheel", function (H, J) { var G, F = k.data("mouseWheelPixels"), x = Math.abs(p.position().top), I = j.position().top, y = m.height() - j.height(); if (k.data("normalizeMouseWheelDelta")) { if (J < 0) { J = -1 } else { J = 1 } } if (F === "auto") { F = 100 + Math.round(k.data("scrollAmount") / 2) } if (k.data("horizontalScroll")) { I = j.position().left; y = m.width() - j.width(); x = Math.abs(p.position().left) } if ((J > 0 && I !== 0) || (J < 0 && I !== y)) { H.preventDefault(); H.stopImmediatePropagation() } G = x - (J * F); k.mCustomScrollbar("scrollTo", G, { trigger: "internal" }) }); k.data({ bindEvent_mousewheel: true }) } } if (k.data("scrollButtons_enable")) { if (k.data("scrollButtons_scrollType") === "pixels") { if (k.data("horizontalScroll")) { v.add(A).unbind("mousedown touchstart MSPointerDown mouseup MSPointerUp mouseout MSPointerOut touchend", i, g); k.data({ bindEvent_buttonsContinuous_x: false }); if (!k.data("bindEvent_buttonsPixels_x")) { v.bind("click", function (x) { x.preventDefault(); q(Math.abs(p.position().left) + k.data("scrollButtons_scrollAmount")) }); A.bind("click", function (x) { x.preventDefault(); q(Math.abs(p.position().left) - k.data("scrollButtons_scrollAmount")) }); k.data({ bindEvent_buttonsPixels_x: true }) } } else { e.add(w).unbind("mousedown touchstart MSPointerDown mouseup MSPointerUp mouseout MSPointerOut touchend", i, g); k.data({ bindEvent_buttonsContinuous_y: false }); if (!k.data("bindEvent_buttonsPixels_y")) { e.bind("click", function (x) { x.preventDefault(); q(Math.abs(p.position().top) + k.data("scrollButtons_scrollAmount")) }); w.bind("click", function (x) { x.preventDefault(); q(Math.abs(p.position().top) - k.data("scrollButtons_scrollAmount")) }); k.data({ bindEvent_buttonsPixels_y: true }) } } function q(x) { if (!j.data("preventAction")) { j.data("preventAction", true); k.mCustomScrollbar("scrollTo", x, { trigger: "internal" }) } } } else { if (k.data("horizontalScroll")) { v.add(A).unbind("click"); k.data({ bindEvent_buttonsPixels_x: false }); if (!k.data("bindEvent_buttonsContinuous_x")) { v.bind("mousedown touchstart MSPointerDown", function (y) { y.preventDefault(); var x = z(); k.data({ mCSB_buttonScrollRight: setInterval(function () { k.mCustomScrollbar("scrollTo", Math.abs(p.position().left) + x, { trigger: "internal", scrollEasing: "easeOutCirc" }) }, 17) }) }); var i = function (x) { x.preventDefault(); clearInterval(k.data("mCSB_buttonScrollRight")) }; v.bind("mouseup touchend MSPointerUp mouseout MSPointerOut", i); A.bind("mousedown touchstart MSPointerDown", function (y) { y.preventDefault(); var x = z(); k.data({ mCSB_buttonScrollLeft: setInterval(function () { k.mCustomScrollbar("scrollTo", Math.abs(p.position().left) - x, { trigger: "internal", scrollEasing: "easeOutCirc" }) }, 17) }) }); var g = function (x) { x.preventDefault(); clearInterval(k.data("mCSB_buttonScrollLeft")) }; A.bind("mouseup touchend MSPointerUp mouseout MSPointerOut", g); k.data({ bindEvent_buttonsContinuous_x: true }) } } else { e.add(w).unbind("click"); k.data({ bindEvent_buttonsPixels_y: false }); if (!k.data("bindEvent_buttonsContinuous_y")) { e.bind("mousedown touchstart MSPointerDown", function (y) { y.preventDefault(); var x = z(); k.data({ mCSB_buttonScrollDown: setInterval(function () { k.mCustomScrollbar("scrollTo", Math.abs(p.position().top) + x, { trigger: "internal", scrollEasing: "easeOutCirc" }) }, 17) }) }); var t = function (x) { x.preventDefault(); clearInterval(k.data("mCSB_buttonScrollDown")) }; e.bind("mouseup touchend MSPointerUp mouseout MSPointerOut", t); w.bind("mousedown touchstart MSPointerDown", function (y) { y.preventDefault(); var x = z(); k.data({ mCSB_buttonScrollUp: setInterval(function () { k.mCustomScrollbar("scrollTo", Math.abs(p.position().top) - x, { trigger: "internal", scrollEasing: "easeOutCirc" }) }, 17) }) }); var f = function (x) { x.preventDefault(); clearInterval(k.data("mCSB_buttonScrollUp")) }; w.bind("mouseup touchend MSPointerUp mouseout MSPointerOut", f); k.data({ bindEvent_buttonsContinuous_y: true }) } } function z() { var x = k.data("scrollButtons_scrollSpeed"); if (k.data("scrollButtons_scrollSpeed") === "auto") { x = Math.round((k.data("scrollInertia") + 100) / 40) } return x } } } if (k.data("autoScrollOnFocus")) { if (!k.data("bindEvent_focusin")) { h.bind("focusin", function () { h.scrollTop(0).scrollLeft(0); var x = c(document.activeElement); if (x.is("input,textarea,select,button,a[tabindex],area,object")) { var G = p.position().top, y = x.position().top, F = h.height() - x.outerHeight(); if (k.data("horizontalScroll")) { G = p.position().left; y = x.position().left; F = h.width() - x.outerWidth() } if (G + y < 0 || G + y > F) { k.mCustomScrollbar("scrollTo", y, { trigger: "internal" }) } } }); k.data({ bindEvent_focusin: true }) } } if (k.data("autoHideScrollbar")) { if (!k.data("bindEvent_autoHideScrollbar")) { h.bind("mouseenter", function (x) { h.addClass("mCS-mouse-over"); d.showScrollbar.call(h.children(".mCSB_scrollTools")) }).bind("mouseleave touchend", function (x) { h.removeClass("mCS-mouse-over"); if (x.type === "mouseleave") { d.hideScrollbar.call(h.children(".mCSB_scrollTools")) } }); k.data({ bindEvent_autoHideScrollbar: true }) } } }, scrollTo: function (e, f) { var i = c(this), o = { moveDragger: false, trigger: "external", callbacks: true, scrollInertia: i.data("scrollInertia"), scrollEasing: i.data("scrollEasing") }, f = c.extend(o, f), p, g = i.children(".mCustomScrollBox"), k = g.children(".mCSB_container"), r = g.children(".mCSB_scrollTools"), j = r.children(".mCSB_draggerContainer"), h = j.children(".mCSB_dragger"), t = draggerSpeed = f.scrollInertia, q, s, m, l; if (!k.hasClass("mCS_no_scrollbar")) { i.data({ mCS_trigger: f.trigger }); if (i.data("mCS_Init")) { f.callbacks = false } if (e || e === 0) { if (typeof (e) === "number") { if (f.moveDragger) { p = e; if (i.data("horizontalScroll")) { e = h.position().left * i.data("scrollAmount") } else { e = h.position().top * i.data("scrollAmount") } draggerSpeed = 0 } else { p = e / i.data("scrollAmount") } } else { if (typeof (e) === "string") { var v; if (e === "top") { v = 0 } else { if (e === "bottom" && !i.data("horizontalScroll")) { v = k.outerHeight() - g.height() } else { if (e === "left") { v = 0 } else { if (e === "right" && i.data("horizontalScroll")) { v = k.outerWidth() - g.width() } else { if (e === "first") { v = i.find(".mCSB_container").find(":first") } else { if (e === "last") { v = i.find(".mCSB_container").find(":last") } else { v = i.find(e) } } } } } } if (v.length === 1) { if (i.data("horizontalScroll")) { e = v.position().left } else { e = v.position().top } p = e / i.data("scrollAmount") } else { p = e = v } } } if (i.data("horizontalScroll")) { if (i.data("onTotalScrollBack_Offset")) { s = -i.data("onTotalScrollBack_Offset") } if (i.data("onTotalScroll_Offset")) { l = g.width() - k.outerWidth() + i.data("onTotalScroll_Offset") } if (p < 0) { p = e = 0; clearInterval(i.data("mCSB_buttonScrollLeft")); if (!s) { q = true } } else { if (p >= j.width() - h.width()) { p = j.width() - h.width(); e = g.width() - k.outerWidth(); clearInterval(i.data("mCSB_buttonScrollRight")); if (!l) { m = true } } else { e = -e } } var n = i.data("snapAmount"); if (n) { e = Math.round(e / n) * n - i.data("snapOffset") } d.mTweenAxis.call(this, h[0], "left", Math.round(p), draggerSpeed, f.scrollEasing); d.mTweenAxis.call(this, k[0], "left", Math.round(e), t, f.scrollEasing, { onStart: function () { if (f.callbacks && !i.data("mCS_tweenRunning")) { u("onScrollStart") } if (i.data("autoHideScrollbar")) { d.showScrollbar.call(r) } }, onUpdate: function () { if (f.callbacks) { u("whileScrolling") } }, onComplete: function () { if (f.callbacks) { u("onScroll"); if (q || (s && k.position().left >= s)) { u("onTotalScrollBack") } if (m || (l && k.position().left <= l)) { u("onTotalScroll") } } h.data("preventAction", false); i.data("mCS_tweenRunning", false); if (i.data("autoHideScrollbar")) { if (!g.hasClass("mCS-mouse-over")) { d.hideScrollbar.call(r) } } } }) } else { if (i.data("onTotalScrollBack_Offset")) { s = -i.data("onTotalScrollBack_Offset") } if (i.data("onTotalScroll_Offset")) { l = g.height() - k.outerHeight() + i.data("onTotalScroll_Offset") } if (p < 0) { p = e = 0; clearInterval(i.data("mCSB_buttonScrollUp")); if (!s) { q = true } } else { if (p >= j.height() - h.height()) { p = j.height() - h.height(); e = g.height() - k.outerHeight(); clearInterval(i.data("mCSB_buttonScrollDown")); if (!l) { m = true } } else { e = -e } } var n = i.data("snapAmount"); if (n) { e = Math.round(e / n) * n - i.data("snapOffset") } d.mTweenAxis.call(this, h[0], "top", Math.round(p), draggerSpeed, f.scrollEasing); d.mTweenAxis.call(this, k[0], "top", Math.round(e), t, f.scrollEasing, { onStart: function () { if (f.callbacks && !i.data("mCS_tweenRunning")) { u("onScrollStart") } if (i.data("autoHideScrollbar")) { d.showScrollbar.call(r) } }, onUpdate: function () { if (f.callbacks) { u("whileScrolling") } }, onComplete: function () { if (f.callbacks) { u("onScroll"); if (q || (s && k.position().top >= s)) { u("onTotalScrollBack") } if (m || (l && k.position().top <= l)) { u("onTotalScroll") } } h.data("preventAction", false); i.data("mCS_tweenRunning", false); if (i.data("autoHideScrollbar")) { if (!g.hasClass("mCS-mouse-over")) { d.hideScrollbar.call(r) } } } }) } if (i.data("mCS_Init")) { i.data({ mCS_Init: false }) } } } function u(w) { this.mcs = { top: k.position().top, left: k.position().left, draggerTop: h.position().top, draggerLeft: h.position().left, topPct: Math.round((100 * Math.abs(k.position().top)) / Math.abs(k.outerHeight() - g.height())), leftPct: Math.round((100 * Math.abs(k.position().left)) / Math.abs(k.outerWidth() - g.width())) }; switch (w) { case "onScrollStart": i.data("mCS_tweenRunning", true).data("onScrollStart_Callback").call(i, this.mcs); break; case "whileScrolling": i.data("whileScrolling_Callback").call(i, this.mcs); break; case "onScroll": i.data("onScroll_Callback").call(i, this.mcs); break; case "onTotalScrollBack": i.data("onTotalScrollBack_Callback").call(i, this.mcs); break; case "onTotalScroll": i.data("onTotalScroll_Callback").call(i, this.mcs); break } } }, stop: function () { var g = c(this), e = g.children().children(".mCSB_container"), f = g.children().children().children().children(".mCSB_dragger"); d.mTweenAxisStop.call(this, e[0]); d.mTweenAxisStop.call(this, f[0]) }, disable: function (e) { var j = c(this), f = j.children(".mCustomScrollBox"), h = f.children(".mCSB_container"), g = f.children(".mCSB_scrollTools"), i = g.children().children(".mCSB_dragger"); f.unbind("mousewheel focusin mouseenter mouseleave touchend"); h.unbind("touchstart touchmove"); if (e) { if (j.data("horizontalScroll")) { i.add(h).css("left", 0) } else { i.add(h).css("top", 0) } } g.css("display", "none"); h.addClass("mCS_no_scrollbar"); j.data({ bindEvent_mousewheel: false, bindEvent_focusin: false, bindEvent_content_touch: false, bindEvent_autoHideScrollbar: false }).addClass("mCS_disabled") }, destroy: function () { var e = c(this); e.removeClass("mCustomScrollbar _mCS_" + e.data("mCustomScrollbarIndex")).addClass("mCS_destroyed").children().children(".mCSB_container").unwrap().children().unwrap().siblings(".mCSB_scrollTools").remove(); c(document).unbind("mousemove." + e.data("mCustomScrollbarIndex") + " mouseup." + e.data("mCustomScrollbarIndex") + " MSPointerMove." + e.data("mCustomScrollbarIndex") + " MSPointerUp." + e.data("mCustomScrollbarIndex")); c(window).unbind("resize." + e.data("mCustomScrollbarIndex")) } }, d = { showScrollbar: function () { this.stop().animate({ opacity: 1 }, "fast") }, hideScrollbar: function () { this.stop().animate({ opacity: 0 }, "fast") }, mTweenAxis: function (g, i, h, f, o, y) { var y = y || {}, v = y.onStart || function () { }, p = y.onUpdate || function () { }, w = y.onComplete || function () { }; var n = t(), l, j = 0, r = g.offsetTop, s = g.style; if (i === "left") { r = g.offsetLeft } var m = h - r; q(); e(); function t() { if (window.performance && window.performance.now) { return window.performance.now() } else { if (window.performance && window.performance.webkitNow) { return window.performance.webkitNow() } else { if (Date.now) { return Date.now() } else { return new Date().getTime() } } } } function x() { if (!j) { v.call() } j = t() - n; u(); if (j >= g._time) { g._time = (j > g._time) ? j + l - (j - g._time) : j + l - 1; if (g._time < j + 1) { g._time = j + 1 } } if (g._time < f) { g._id = _request(x) } else { w.call() } } function u() { if (f > 0) { g.currVal = k(g._time, r, m, f, o); s[i] = Math.round(g.currVal) + "px" } else { s[i] = h + "px" } p.call() } function e() { l = 1000 / 60; g._time = j + l; _request = (!window.requestAnimationFrame) ? function (z) { u(); return setTimeout(z, 0.01) } : window.requestAnimationFrame; g._id = _request(x) } function q() { if (g._id == null) { return } if (!window.requestAnimationFrame) { clearTimeout(g._id) } else { window.cancelAnimationFrame(g._id) } g._id = null } function k(B, A, F, E, C) { switch (C) { case "linear": return F * B / E + A; break; case "easeOutQuad": B /= E; return -F * B * (B - 2) + A; break; case "easeInOutQuad": B /= E / 2; if (B < 1) { return F / 2 * B * B + A } B--; return -F / 2 * (B * (B - 2) - 1) + A; break; case "easeOutCubic": B /= E; B--; return F * (B * B * B + 1) + A; break; case "easeOutQuart": B /= E; B--; return -F * (B * B * B * B - 1) + A; break; case "easeOutQuint": B /= E; B--; return F * (B * B * B * B * B + 1) + A; break; case "easeOutCirc": B /= E; B--; return F * Math.sqrt(1 - B * B) + A; break; case "easeOutSine": return F * Math.sin(B / E * (Math.PI / 2)) + A; break; case "easeOutExpo": return F * (-Math.pow(2, -10 * B / E) + 1) + A; break; case "mcsEaseOut": var D = (B /= E) * B, z = D * B; return A + F * (0.499999999999997 * z * D + -2.5 * D * D + 5.5 * z + -6.5 * D + 4 * B); break; case "draggerRailEase": B /= E / 2; if (B < 1) { return F / 2 * B * B * B + A } B -= 2; return F / 2 * (B * B * B + 2) + A; break } } }, mTweenAxisStop: function (e) { if (e._id == null) { return } if (!window.requestAnimationFrame) { clearTimeout(e._id) } else { window.cancelAnimationFrame(e._id) } e._id = null }, rafPolyfill: function () { var f = ["ms", "moz", "webkit", "o"], e = f.length; while (--e > -1 && !window.requestAnimationFrame) { window.requestAnimationFrame = window[f[e] + "RequestAnimationFrame"]; window.cancelAnimationFrame = window[f[e] + "CancelAnimationFrame"] || window[f[e] + "CancelRequestAnimationFrame"] } } }; d.rafPolyfill.call(); c.support.touch = !!("ontouchstart" in window); c.support.msPointer = window.navigator.msPointerEnabled; var a = ("https:" == document.location.protocol) ? "https:" : "http:"; c.event.special.mousewheel; c.fn.mCustomScrollbar = function (e) { if (b[e]) { return b[e].apply(this, Array.prototype.slice.call(arguments, 1)) } else { if (typeof e === "object" || !e) { return b.init.apply(this, arguments) } else { c.error("Method " + e + " does not exist") } } } })(jQuery);


/*
 * debouncedresize: special jQuery event that happens once after a window resize
 *
 * latest version and complete README available on Github:
 * https://github.com/louisremi/jquery-smartresize
 *
 * Copyright 2012 @louis_remi
 * Licensed under the MIT license.
 *
 * This saved you an hour of work? 
 * Send me music http://www.amazon.co.uk/wishlist/HNTU0468LQON
 */
(function ($) {

    var $event = $.event,
        $special,
        resizeTimeout;

    $special = $event.special.debouncedresize = {
        setup: function () {
            $(this).on("resize", $special.handler);
        },
        teardown: function () {
            $(this).off("resize", $special.handler);
        },
        handler: function (event, execAsap) {
            // Save the context
            var context = this,
                args = arguments,
                dispatch = function () {
                    // set correct event type
                    event.type = "debouncedresize";
                    $event.dispatch.apply(context, args);
                };

            if (resizeTimeout) {
                clearTimeout(resizeTimeout);
            }

            execAsap ?
                dispatch() :
                resizeTimeout = setTimeout(dispatch, $special.threshold);
        },
        threshold: 150
    };

})(jQuery);

//FUNCTION TO DETECT IF A TOUCH DEVICE IS IN USE
function is_mobile() {
    "use strict";
    var check = false;
    (function (a) {
        if ((/android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini/i.test(navigator.userAgent.toLowerCase())) || /(android|ipad|playbook|silk|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|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(a.toLowerCase()) || /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(a.substr(0, 4).toLowerCase())) { check = true; }
    })(navigator.userAgent || navigator.vendor || window.opera);
    return check;
}

/*
 jquery.fullscreen 1.1.5
 https://github.com/kayahr/jquery-fullscreen-plugin
 Copyright (C) 2012-2013 Klaus Reimer <k@ailis.de>
 Licensed under the MIT license
 (See http://www.opensource.org/licenses/mit-license)
*/
function d(c) {
    var b, a; if (!this.length) return this; b = this[0]; b.ownerDocument ? a = b.ownerDocument : (a = b, b = a.documentElement); if (null == c) { if (!a.exitFullscreen && !a.webkitExitFullscreen && !a.webkitCancelFullScreen && !a.msExitFullscreen && !a.mozCancelFullScreen) return null; c = !!a.fullscreenElement || !!a.msFullscreenElement || !!a.webkitIsFullScreen || !!a.mozFullScreen; return !c ? c : a.fullscreenElement || a.webkitFullscreenElement || a.webkitCurrentFullScreenElement || a.msFullscreenElement || a.mozFullScreenElement || c } c ? (c =
        b.requestFullscreen || b.webkitRequestFullscreen || b.webkitRequestFullScreen || b.msRequestFullscreen || b.mozRequestFullScreen) && c.call(b) : (c = a.exitFullscreen || a.webkitExitFullscreen || a.webkitCancelFullScreen || a.msExitFullscreen || a.mozCancelFullScreen) && c.call(a); return this
} jQuery.fn.fullScreen = d; jQuery.fn.toggleFullScreen = function () { return d.call(this, !d.call(this)) }; var e, f, g; e = document;
e.webkitCancelFullScreen ? (f = "webkitfullscreenchange", g = "webkitfullscreenerror") : e.msExitFullscreen ? (f = "MSFullscreenChange", g = "MSFullscreenError") : e.mozCancelFullScreen ? (f = "mozfullscreenchange", g = "mozfullscreenerror") : (f = "fullscreenchange", g = "fullscreenerror"); jQuery(document).bind(f, function () { jQuery(document).trigger(new jQuery.Event("fullscreenchange")) }); jQuery(document).bind(g, function () { jQuery(document).trigger(new jQuery.Event("fullscreenerror")) });
// source --> https://2020exhibits.com/wp-content/plugins/elementor-pro/assets/js/page-transitions.min.js?ver=4.0.2 
/*! elementor-pro - v4.0.0 - 13-04-2026 */
(()=>{var e={37772(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"PageTransition",{enumerable:!0,get:function(){return n.PageTransition}}),Object.defineProperty(t,"Preloader",{enumerable:!0,get:function(){return o.Preloader}});var n=r(37539),o=r(17739)},16017(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;const r=/.*#[\w\-/$.+()*@?~!&',;=:%]*$/;t.default={isDisabled:e=>Object.prototype.hasOwnProperty.call(e.dataset,"eDisablePageTransition"),isEmptyHref:e=>!e.getAttribute("href"),isTargetBlank:e=>"_blank"===e.target,notSameOrigin:e=>!e.href.startsWith(window.location.origin),hasFragment:e=>!!e.href.match(r),isPopup:e=>"true"===e.getAttribute("aria-haspopup")&&"false"===e.getAttribute("aria-expanded"),isWoocommerce:e=>{const t=e.href.match(/\?add-to-cart=/),r=e.href.match(/\?remove_item=/),n=e.href.match(/\?undo_item=/),o=e.href.match(/\?product-page=/),a=e.href.match(/\?elementor_wc_logout=/),s=e.parentElement?.classList.contains("woocommerce-MyAccount-navigation-link");return t||r||n||o||a||s},isExcluded:(e,t)=>e.href.match(new RegExp(t))}},37539(e,t,r){"use strict";var n=r(96784);Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.PageTransition=void 0,r(14846),r(63333),r(69655);var o=n(r(99733)),a=n(r(16017));class PageTransition extends HTMLElement{constructor(){super(),this.classes=this.getClasses(),this.elements=this.getElements(),this.bindEvents()}getClasses(){return{preloader:"e-page-transition--preloader",entering:"e-page-transition--entering",exiting:"e-page-transition--exiting",entered:"e-page-transition--entered",preview:"e-page-transition--preview"}}getStyle(){return`<style>${o.default.toString()}</style>`}static get observedAttributes(){return["preloader-type","preloader-icon","preloader-image-url","preloader-animation-type","disabled"]}getElements(){const e=this.getAttribute("triggers")||'a:not( [data-elementor-open-lightbox="yes"] )';return{links:document.querySelectorAll(e)}}shouldPageTriggerTransition(e){return Object.values(a.default).every(t=>!t(e,this.getAttribute("exclude")))}onPageShow(){this.classList.contains(this.classes.exiting)&&(this.classList.add(this.classes.entered),this.classList.remove(this.classes.exiting)),this.animateState("entering").then(()=>{this.classList.add(this.classes.entered)})}onLinkClick(e){if(!this.shouldPageTriggerTransition(e.currentTarget))return;e.preventDefault();const t=e.currentTarget.href;this.classList.remove(this.classes.entered),this.animateState("exiting",this.getPreloaderDelay()).then(()=>{this.classList.add(this.classes.exiting),location.href=t})}prerender(e){if(document.querySelector(`link[href="${e}"]`))return;const t=document.createElement("link");t.setAttribute("rel","prerender"),t.setAttribute("href",e),document.head.appendChild(t)}onLinkMouseEnter(e){this.shouldPageTriggerTransition(e.currentTarget)&&this.prerender(e.currentTarget.href)}bindEvents(){window.addEventListener("pageshow",this.onPageShow.bind(this)),window.addEventListener("DOMContentLoaded",()=>{this.elements=this.getElements(),this.elements.links.forEach(e=>{e.addEventListener("click",this.onLinkClick.bind(this)),e.addEventListener("mouseenter",this.onLinkMouseEnter.bind(this)),e.addEventListener("touchstart",this.onLinkMouseEnter.bind(this))})})}escapeHTML(e){const t={"&":"&amp;","<":"&lt;",">":"&gt;","'":"&#39;",'"':"&quot;"};return e.replace(/[&<>'"]/g,e=>t[e]||e)}getIconLoader(){const e=this.getAttribute("preloader-icon")||"";return`\n\t\t\t<i class="${this.escapeHTML(e)} ${this.classes.preloader}"></i>\n\t\t`}getImageLoader(){const e=this.getAttribute("preloader-image-url")||"";return`\n\t\t\t<img class="${this.classes.preloader}" src="${this.escapeHTML(e)}" />\n\t\t`}getAnimationLoader(){const e=this.getAttribute("preloader-animation-type");return e?`\n\t\t\t<e-preloader type="${e}"></e-preloader>\n\t\t`:""}render(){if(this.hasAttribute("disabled"))return void(this.innerHTML="");switch(this.getAttribute("preloader-type")){case"icon":this.innerHTML=this.getIconLoader();break;case"image":this.innerHTML=this.getImageLoader();break;case"animation":this.innerHTML=this.getAnimationLoader();break;default:this.innerHTML=""}this.innerHTML+=this.getStyle()}getCssVar(e,t="e-page-transition-"){return window.getComputedStyle(this).getPropertyValue(`--${t}${e}`)}getAnimationDuration(){return parseInt(this.getCssVar("animation-duration"))||0}getPreloaderDelay(){return parseInt(this.getCssVar("delay","e-preloader-"))||0}animate(){if(this.isAnimating)return new Promise((e,t)=>{t("Animation is already in progress.")});this.isAnimating=!0;const e=this.getPreloaderDelay()+1500;return this.classList.remove(this.classes.entered),new Promise(t=>{setTimeout(()=>{this.animateState("exiting",e).then(()=>{this.animateState("entering").then(()=>{this.classList.add(this.classes.entered),this.isAnimating=!1,t()})})})})}animateState(e,t=0){const r=this.classes?.[e];if(!r)return new Promise((t,r)=>{r(e)});this.classList.remove(r),this.classList.add(r);const n=this.getAnimationDuration();return new Promise(o=>{setTimeout(()=>{this.classList.remove(r),o(e)},n+t)})}attributeChangedCallback(){this.render()}connectedCallback(){this.render()}}t.PageTransition=PageTransition;t.default=PageTransition},17739(e,t,r){"use strict";var n=r(96784);Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.Preloader=void 0;var o=n(r(19653));class Preloader extends HTMLElement{static get observedAttributes(){return["type"]}attributeChangedCallback(){this.render()}getStyle(){return`<style>${o.default.toString()}</style>`}render(){const e=this.getAttribute("type");this.innerHTML="",e&&(["bouncing-dots","pulsing-dots"].includes(e)&&(this.innerHTML+="\n\t\t\t\t<i></i>\n\t\t\t\t<i></i>\n\t\t\t\t<i></i>\n\t\t\t\t<i></i>\n\t\t\t"),this.innerHTML+=this.getStyle())}connectedCallback(){this.render()}}t.Preloader=Preloader;t.default=Preloader},99733(e,t,r){"use strict";r.r(t),r.d(t,{default:()=>c});var n=r(8645),o=r.n(n),a=r(60278),s=r.n(a)()(o());s.push([e.id,"e-page-transition{--preloader-fade-duration: .5s;--preloader-delay: calc( var( --e-page-transition-animation-duration, 0s ) + var( --e-preloader-delay, 0s ) );--page-transition-delay: var( --preloader-fade-duration );position:fixed;inset:0;display:grid;place-items:center;z-index:10000;background:#fff;animation-fill-mode:both;animation-duration:var(--e-page-transition-animation-duration)}e-page-transition[disabled]{display:none}e-page-transition e-preloader,e-page-transition .e-page-transition--preloader{opacity:0}e-page-transition .e-page-transition--preloader{position:absolute;font-size:var(--e-preloader-size);color:var(--e-preloader-color);fill:var(--e-preloader-color);width:var(--e-preloader-width);max-width:var(--e-preloader-max-width);transform:rotate(var(--e-preloader-rotate, 0deg));animation-name:var(--e-preloader-animation);animation-duration:var(--e-preloader-animation-duration, 1000ms);animation-iteration-count:infinite;animation-timing-function:linear}e-page-transition svg.e-page-transition--preloader{width:var(--e-preloader-size)}.e-page-transition--entering{animation-name:var(--e-page-transition-entrance-animation);animation-delay:var(--preloader-fade-duration, 0s)}.e-page-transition--entering e-preloader,.e-page-transition--entering .e-page-transition--preloader{animation:var(--e-preloader-animation, none) var(--e-preloader-animation-duration, 0s) linear infinite,e-page-transition-fade-out var(--preloader-fade-duration) both;transition:none}.e-page-transition--exiting{animation-name:var(--e-page-transition-exit-animation)}.e-page-transition--exiting e-preloader,.e-page-transition--exiting .e-page-transition--preloader{opacity:var(--e-preloader-opacity, 1);transition:var(--preloader-fade-duration) all;transition-delay:var(--preloader-delay, 0s)}.e-page-transition--entered:not(.e-page-transition--preview){display:none}.e-page-transition--preview{animation-fill-mode:initial}.e-page-transition--preview.e-page-transition--entered e-preloader,.e-page-transition--preview.e-page-transition--entered .e-page-transition--preloader{opacity:var(--e-preloader-opacity, 1)}@media(prefers-reduced-motion: reduce){e-page-transition{display:none}}@keyframes e-page-transition-fade-in{from{opacity:0}to{opacity:1}}@keyframes e-page-transition-fade-in-down{from{opacity:0;transform:translate3d(0, -100%, 0)}to{opacity:1;transform:none}}@keyframes e-page-transition-fade-in-left{from{opacity:0;transform:translate3d(-100%, 0, 0)}to{opacity:1;transform:none}}@keyframes e-page-transition-fade-in-right{from{opacity:0;transform:translate3d(100%, 0, 0)}to{opacity:1;transform:none}}@keyframes e-page-transition-fade-in-up{from{opacity:0;transform:translate3d(0, 100%, 0)}to{opacity:1;transform:none}}@keyframes e-page-transition-zoom-in{from{opacity:0;transform:scale3d(0.3, 0.3, 0.3)}50%{opacity:1}}@keyframes e-page-transition-slide-in-down{from{transform:translate3d(0, -100%, 0);visibility:visible}to{transform:translate3d(0, 0, 0)}}@keyframes e-page-transition-slide-in-left{from{transform:translate3d(-100%, 0, 0);visibility:visible}to{transform:translate3d(0, 0, 0)}}@keyframes e-page-transition-slide-in-right{from{transform:translate3d(100%, 0, 0);visibility:visible}to{transform:translate3d(0, 0, 0)}}@keyframes e-page-transition-slide-in-up{from{transform:translate3d(0, 100%, 0);visibility:visible}to{transform:translate3d(0, 0, 0)}}@keyframes e-page-transition-fade-out{from{opacity:1}to{opacity:0}}@keyframes e-page-transition-fade-out-up{from{opacity:1;transform:none}to{opacity:0;transform:translate3d(0, -100%, 0)}}@keyframes e-page-transition-fade-out-left{from{opacity:1;transform:none}to{opacity:0;transform:translate3d(-100%, 0, 0)}}@keyframes e-page-transition-fade-out-right{from{opacity:1;transform:none}to{opacity:0;transform:translate3d(100%, 0, 0)}}@keyframes e-page-transition-fade-out-down{from{opacity:1;transform:none}to{opacity:0;transform:translate3d(0, 100%, 0)}}@keyframes e-page-transition-slide-out-up{from{transform:translate3d(0, 0, 0)}to{transform:translate3d(0, -100%, 0);visibility:visible}}@keyframes e-page-transition-slide-out-left{from{transform:translate3d(0, 0, 0)}to{transform:translate3d(-100%, 0, 0);visibility:visible}}@keyframes e-page-transition-slide-out-right{from{transform:translate3d(0, 0, 0)}to{transform:translate3d(100%, 0, 0);visibility:visible}}@keyframes e-page-transition-slide-out-down{from{transform:translate3d(0, 0, 0)}to{transform:translate3d(0, 100%, 0);visibility:visible}}@keyframes e-page-transition-zoom-out{from{opacity:1}50%{opacity:0;transform:scale3d(0.3, 0.3, 0.3)}}",""]);const c=s},19653(e,t,r){"use strict";r.r(t),r.d(t,{default:()=>c});var n=r(8645),o=r.n(n),a=r(60278),s=r.n(a)()(o());s.push([e.id,'e-preloader{--default-duartion: 1000ms;--duration: var( --e-preloader-animation-duration, var( --default-duration ) );display:block;font-size:var(--e-preloader-size)}e-preloader[type=circle],e-preloader[type=circle-dashed],e-preloader[type=spinners]{--e-preloader-animation: e-preloader-spin;height:1em;width:1em;border:.1em solid var(--e-preloader-color);border-top-color:rgba(0,0,0,0);border-radius:100%;animation:var(--duration) var(--e-preloader-animation) linear infinite}e-preloader[type=circle-dashed]{border:.1em solid hsla(0,0%,100%,.3);border-top-color:var(--e-preloader-color)}e-preloader[type=spinners]{border-bottom-color:rgba(0,0,0,0)}e-preloader[type=bouncing-dots],e-preloader[type=pulsing-dots]{display:flex;gap:1em}e-preloader[type=bouncing-dots] i,e-preloader[type=pulsing-dots] i{height:1em;width:1em;border-radius:100%;background-color:var(--e-preloader-color)}e-preloader[type=bouncing-dots] i:nth-child(2),e-preloader[type=pulsing-dots] i:nth-child(2){animation-delay:var(--delay)}e-preloader[type=bouncing-dots] i:nth-child(3),e-preloader[type=pulsing-dots] i:nth-child(3){animation-delay:calc(var(--delay)*2)}e-preloader[type=bouncing-dots] i:nth-child(4),e-preloader[type=pulsing-dots] i:nth-child(4){animation-delay:calc(var(--delay)*3)}e-preloader[type=bouncing-dots] i{--delay: calc( var( --duration ) / 10 );animation:var(--duration) e-preloader-bounce linear infinite}e-preloader[type=pulsing-dots] i{--delay: calc( var( --duration ) / 6 );animation:var(--duration) e-preloader-pulsing-dots linear infinite}e-preloader[type=pulse]{height:1em;width:1em;position:relative}e-preloader[type=pulse]::before,e-preloader[type=pulse]::after{content:"";position:absolute;inset:0;border:.05em solid var(--e-preloader-color);border-radius:100%;animation:1.2s e-preloader-pulse infinite both ease-out}e-preloader[type=pulse]::after{animation-delay:.6s}e-preloader[type=overlap]{height:1em;width:1em;position:relative}e-preloader[type=overlap]::before,e-preloader[type=overlap]::after{content:"";inset:0;position:absolute;background:var(--e-preloader-color);border-radius:100%;opacity:.5;animation:2s e-preloader-overlap infinite both ease-in-out}e-preloader[type=overlap]::after{animation-delay:-1s;animation-direction:reverse}e-preloader[type=nested-spinners],e-preloader[type=opposing-nested-spinners],e-preloader[type=opposing-nested-rings]{height:1em;width:1em;position:relative}e-preloader[type=nested-spinners]::before,e-preloader[type=nested-spinners]::after,e-preloader[type=opposing-nested-spinners]::before,e-preloader[type=opposing-nested-spinners]::after,e-preloader[type=opposing-nested-rings]::before,e-preloader[type=opposing-nested-rings]::after{content:"";display:block;position:absolute;border-radius:100%;border:.1em solid var(--e-preloader-color);border-top-color:rgba(0,0,0,0);animation:var(--duration) e-preloader-spin linear infinite}e-preloader[type=nested-spinners]::before,e-preloader[type=opposing-nested-spinners]::before,e-preloader[type=opposing-nested-rings]::before{inset:-0.3em}e-preloader[type=nested-spinners]::after,e-preloader[type=opposing-nested-spinners]::after,e-preloader[type=opposing-nested-rings]::after{animation-duration:calc(var(--duration) - .2s);inset:0;opacity:.5}e-preloader[type=nested-spinners]::before,e-preloader[type=nested-spinners]::after,e-preloader[type=opposing-nested-spinners]::before,e-preloader[type=opposing-nested-spinners]::after{border-bottom-color:rgba(0,0,0,0)}e-preloader[type=opposing-nested-rings]::after,e-preloader[type=opposing-nested-spinners]::after{animation-direction:reverse}e-preloader[type=progress-bar],e-preloader[type=two-way-progress-bar],e-preloader[type=repeating-bar]{--e-preloader-animation: e-preloader-progress-bar;height:.05em;width:5em;max-width:50vw;background:var(--e-preloader-color);animation:var(--duration) var(--e-preloader-animation) linear infinite both}e-preloader[type=progress-bar]{transform-origin:0 50%}e-preloader[type=repeating-bar]{--e-preloader-animation: e-preloader-repeating-bar}@media(prefers-reduced-motion: reduce){e-preloader{display:none}}@keyframes e-preloader-spin{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}@keyframes e-preloader-bounce{0%,40%,100%{transform:translateY(0)}20%{transform:translateY(-80%)}}@keyframes e-preloader-pulsing-dots{0%,40%,100%{transform:scale(1)}20%{transform:scale(1.5)}}@keyframes e-preloader-pulse{from{transform:scale(0);opacity:1}to{transform:scale(1);opacity:0}}@keyframes e-preloader-overlap{0%,100%{transform:scale(0.2)}50%{transform:scale(1)}}@keyframes e-preloader-progress-bar{0%{transform:scaleX(0)}100%{transform:scaleX(1)}}@keyframes e-preloader-repeating-bar{0%{transform:scaleX(0);transform-origin:0 50%}49%{transform-origin:0 50%}50%{transform:scaleX(1);transform-origin:100% 50%}100%{transform:scaleX(0);transform-origin:100% 50%}}',""]);const c=s},60278(e){"use strict";e.exports=function(e){var t=[];return t.toString=function toString(){return this.map(function(t){var r="",n=void 0!==t[5];return t[4]&&(r+="@supports (".concat(t[4],") {")),t[2]&&(r+="@media ".concat(t[2]," {")),n&&(r+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),r+=e(t),n&&(r+="}"),t[2]&&(r+="}"),t[4]&&(r+="}"),r}).join("")},t.i=function i(e,r,n,o,a){"string"==typeof e&&(e=[[null,e,void 0]]);var s={};if(n)for(var c=0;c<this.length;c++){var p=this[c][0];null!=p&&(s[p]=!0)}for(var u=0;u<e.length;u++){var l=[].concat(e[u]);n&&s[l[0]]||(void 0!==a&&(void 0===l[5]||(l[1]="@layer".concat(l[5].length>0?" ".concat(l[5]):""," {").concat(l[1],"}")),l[5]=a),r&&(l[2]?(l[1]="@media ".concat(l[2]," {").concat(l[1],"}"),l[2]=r):l[2]=r),o&&(l[4]?(l[1]="@supports (".concat(l[4],") {").concat(l[1],"}"),l[4]=o):l[4]="".concat(o)),t.push(l))}},t}},8645(e){"use strict";e.exports=function(e){return e[1]}},96784(e){e.exports=function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}},e.exports.__esModule=!0,e.exports.default=e.exports},68120(e,t,r){"use strict";var n=r(1483),o=r(18761),a=TypeError;e.exports=function(e){if(n(e))return e;throw new a(o(e)+" is not a function")}},96021(e,t,r){"use strict";var n=r(4815),o=TypeError;e.exports=function(e,t){if(n(t,e))return e;throw new o("Incorrect invocation")}},2293(e,t,r){"use strict";var n=r(71704),o=String,a=TypeError;e.exports=function(e){if(n(e))return e;throw new a(o(e)+" is not an object")}},86651(e,t,r){"use strict";var n=r(35599),o=r(33392),a=r(66960),createMethod=function(e){return function(t,r,s){var c=n(t),p=a(c);if(0===p)return!e&&-1;var u,l=o(s,p);if(e&&r!=r){for(;p>l;)if((u=c[l++])!=u)return!0}else for(;p>l;l++)if((e||l in c)&&c[l]===r)return e||l||0;return!e&&-1}};e.exports={includes:createMethod(!0),indexOf:createMethod(!1)}},91278(e,t,r){"use strict";var n=r(14762),o=n({}.toString),a=n("".slice);e.exports=function(e){return a(o(e),8,-1)}},26145(e,t,r){"use strict";var n=r(34338),o=r(1483),a=r(91278),s=r(70001)("toStringTag"),c=Object,p="Arguments"===a(function(){return arguments}());e.exports=n?a:function(e){var t,r,n;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(r=function(e,t){try{return e[t]}catch(e){}}(t=c(e),s))?r:p?a(t):"Object"===(n=a(t))&&o(t.callee)?"Arguments":n}},16726(e,t,r){"use strict";var n=r(55755),o=r(89497),a=r(4961),s=r(25835);e.exports=function(e,t,r){for(var c=o(t),p=s.f,u=a.f,l=0;l<c.length;l++){var d=c[l];n(e,d)||r&&n(r,d)||p(e,d,u(t,d))}}},19441(e,t,r){"use strict";var n=r(28473);e.exports=!n(function(){function F(){}return F.prototype.constructor=null,Object.getPrototypeOf(new F)!==F.prototype})},69037(e,t,r){"use strict";var n=r(20382),o=r(25835),a=r(57738);e.exports=n?function(e,t,r){return o.f(e,t,a(1,r))}:function(e,t,r){return e[t]=r,e}},57738(e){"use strict";e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},30670(e,t,r){"use strict";var n=r(20382),o=r(25835),a=r(57738);e.exports=function(e,t,r){n?o.f(e,t,a(0,r)):e[t]=r}},83864(e,t,r){"use strict";var n=r(90169),o=r(25835);e.exports=function(e,t,r){return r.get&&n(r.get,t,{getter:!0}),r.set&&n(r.set,t,{setter:!0}),o.f(e,t,r)}},77914(e,t,r){"use strict";var n=r(1483),o=r(25835),a=r(90169),s=r(82095);e.exports=function(e,t,r,c){c||(c={});var p=c.enumerable,u=void 0!==c.name?c.name:t;if(n(r)&&a(r,u,c),c.global)p?e[t]=r:s(t,r);else{try{c.unsafe?e[t]&&(p=!0):delete e[t]}catch(e){}p?e[t]=r:o.f(e,t,{value:r,enumerable:!1,configurable:!c.nonConfigurable,writable:!c.nonWritable})}return e}},82095(e,t,r){"use strict";var n=r(85578),o=Object.defineProperty;e.exports=function(e,t){try{o(n,e,{value:t,configurable:!0,writable:!0})}catch(r){n[e]=t}return t}},20382(e,t,r){"use strict";var n=r(28473);e.exports=!n(function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]})},3145(e,t,r){"use strict";var n=r(85578),o=r(71704),a=n.document,s=o(a)&&o(a.createElement);e.exports=function(e){return s?a.createElement(e):{}}},44741(e){"use strict";e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},19461(e,t,r){"use strict";var n=r(85578).navigator,o=n&&n.userAgent;e.exports=o?String(o):""},66477(e,t,r){"use strict";var n,o,a=r(85578),s=r(19461),c=a.process,p=a.Deno,u=c&&c.versions||p&&p.version,l=u&&u.v8;l&&(o=(n=l.split("."))[0]>0&&n[0]<4?1:+(n[0]+n[1])),!o&&s&&(!(n=s.match(/Edge\/(\d+)/))||n[1]>=74)&&(n=s.match(/Chrome\/(\d+)/))&&(o=+n[1]),e.exports=o},28612(e,t,r){"use strict";var n=r(85578),o=r(4961).f,a=r(69037),s=r(77914),c=r(82095),p=r(16726),u=r(98730);e.exports=function(e,t){var r,l,d,f,g,m=e.target,y=e.global,h=e.stat;if(r=y?n:h?n[m]||c(m,{}):n[m]&&n[m].prototype)for(l in t){if(f=t[l],d=e.dontCallGetSet?(g=o(r,l))&&g.value:r[l],!u(y?l:m+(h?".":"#")+l,e.forced)&&void 0!==d){if(typeof f==typeof d)continue;p(f,d)}(e.sham||d&&d.sham)&&a(f,"sham",!0),s(r,l,f,e)}}},28473(e){"use strict";e.exports=function(e){try{return!!e()}catch(e){return!0}}},32914(e,t,r){"use strict";var n=r(23786),o=r(68120),a=r(274),s=n(n.bind);e.exports=function(e,t){return o(e),void 0===t?e:a?s(e,t):function(){return e.apply(t,arguments)}}},274(e,t,r){"use strict";var n=r(28473);e.exports=!n(function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")})},21807(e,t,r){"use strict";var n=r(274),o=Function.prototype.call;e.exports=n?o.bind(o):function(){return o.apply(o,arguments)}},42048(e,t,r){"use strict";var n=r(20382),o=r(55755),a=Function.prototype,s=n&&Object.getOwnPropertyDescriptor,c=o(a,"name"),p=c&&"something"===function something(){}.name,u=c&&(!n||n&&s(a,"name").configurable);e.exports={EXISTS:c,PROPER:p,CONFIGURABLE:u}},23786(e,t,r){"use strict";var n=r(91278),o=r(14762);e.exports=function(e){if("Function"===n(e))return o(e)}},14762(e,t,r){"use strict";var n=r(274),o=Function.prototype,a=o.call,s=n&&o.bind.bind(a,a);e.exports=n?s:function(e){return function(){return a.apply(e,arguments)}}},11409(e,t,r){"use strict";var n=r(85578),o=r(1483);e.exports=function(e,t){return arguments.length<2?(r=n[e],o(r)?r:void 0):n[e]&&n[e][t];var r}},40041(e){"use strict";e.exports=function(e){return{iterator:e,next:e.next,done:!1}}},26665(e,t,r){"use strict";var n=r(26145),o=r(92564),a=r(15983),s=r(86775),c=r(70001)("iterator");e.exports=function(e){if(!a(e))return o(e,c)||o(e,"@@iterator")||s[n(e)]}},14887(e,t,r){"use strict";var n=r(21807),o=r(68120),a=r(2293),s=r(18761),c=r(26665),p=TypeError;e.exports=function(e,t){var r=arguments.length<2?c(e):t;if(o(r))return a(n(r,e));throw new p(s(e)+" is not iterable")}},92564(e,t,r){"use strict";var n=r(68120),o=r(15983);e.exports=function(e,t){var r=e[t];return o(r)?void 0:n(r)}},85578(e,t,r){"use strict";var check=function(e){return e&&e.Math===Math&&e};e.exports=check("object"==typeof globalThis&&globalThis)||check("object"==typeof window&&window)||check("object"==typeof self&&self)||check("object"==typeof r.g&&r.g)||check("object"==typeof this&&this)||function(){return this}()||Function("return this")()},55755(e,t,r){"use strict";var n=r(14762),o=r(22347),a=n({}.hasOwnProperty);e.exports=Object.hasOwn||function hasOwn(e,t){return a(o(e),t)}},11507(e){"use strict";e.exports={}},42811(e,t,r){"use strict";var n=r(11409);e.exports=n("document","documentElement")},1799(e,t,r){"use strict";var n=r(20382),o=r(28473),a=r(3145);e.exports=!n&&!o(function(){return 7!==Object.defineProperty(a("div"),"a",{get:function(){return 7}}).a})},32121(e,t,r){"use strict";var n=r(14762),o=r(28473),a=r(91278),s=Object,c=n("".split);e.exports=o(function(){return!s("z").propertyIsEnumerable(0)})?function(e){return"String"===a(e)?c(e,""):s(e)}:s},17268(e,t,r){"use strict";var n=r(14762),o=r(1483),a=r(91831),s=n(Function.toString);o(a.inspectSource)||(a.inspectSource=function(e){return s(e)}),e.exports=a.inspectSource},64483(e,t,r){"use strict";var n,o,a,s=r(74644),c=r(85578),p=r(71704),u=r(69037),l=r(55755),d=r(91831),f=r(65409),g=r(11507),m="Object already initialized",y=c.TypeError,h=c.WeakMap;if(s||d.state){var v=d.state||(d.state=new h);v.get=v.get,v.has=v.has,v.set=v.set,n=function(e,t){if(v.has(e))throw new y(m);return t.facade=e,v.set(e,t),t},o=function(e){return v.get(e)||{}},a=function(e){return v.has(e)}}else{var b=f("state");g[b]=!0,n=function(e,t){if(l(e,b))throw new y(m);return t.facade=e,u(e,b,t),t},o=function(e){return l(e,b)?e[b]:{}},a=function(e){return l(e,b)}}e.exports={set:n,get:o,has:a,enforce:function(e){return a(e)?o(e):n(e,{})},getterFor:function(e){return function(t){var r;if(!p(t)||(r=o(t)).type!==e)throw new y("Incompatible receiver, "+e+" required");return r}}}},95299(e,t,r){"use strict";var n=r(70001),o=r(86775),a=n("iterator"),s=Array.prototype;e.exports=function(e){return void 0!==e&&(o.Array===e||s[a]===e)}},1483(e){"use strict";var t="object"==typeof document&&document.all;e.exports=void 0===t&&void 0!==t?function(e){return"function"==typeof e||e===t}:function(e){return"function"==typeof e}},98730(e,t,r){"use strict";var n=r(28473),o=r(1483),a=/#|\.prototype\./,isForced=function(e,t){var r=c[s(e)];return r===u||r!==p&&(o(t)?n(t):!!t)},s=isForced.normalize=function(e){return String(e).replace(a,".").toLowerCase()},c=isForced.data={},p=isForced.NATIVE="N",u=isForced.POLYFILL="P";e.exports=isForced},15983(e){"use strict";e.exports=function(e){return null==e}},71704(e,t,r){"use strict";var n=r(1483);e.exports=function(e){return"object"==typeof e?null!==e:n(e)}},19557(e){"use strict";e.exports=!1},31423(e,t,r){"use strict";var n=r(11409),o=r(1483),a=r(4815),s=r(45022),c=Object;e.exports=s?function(e){return"symbol"==typeof e}:function(e){var t=n("Symbol");return o(t)&&a(t.prototype,c(e))}},11506(e,t,r){"use strict";var n=r(32914),o=r(21807),a=r(2293),s=r(18761),c=r(95299),p=r(66960),u=r(4815),l=r(14887),d=r(26665),f=r(46721),g=TypeError,Result=function(e,t){this.stopped=e,this.result=t},m=Result.prototype;e.exports=function(e,t,r){var y,h,v,b,w,x,_,O=r&&r.that,P=!(!r||!r.AS_ENTRIES),S=!(!r||!r.IS_RECORD),k=!(!r||!r.IS_ITERATOR),T=!(!r||!r.INTERRUPTED),E=n(t,O),stop=function(e){return y&&f(y,"normal"),new Result(!0,e)},callFn=function(e){return P?(a(e),T?E(e[0],e[1],stop):E(e[0],e[1])):T?E(e,stop):E(e)};if(S)y=e.iterator;else if(k)y=e;else{if(!(h=d(e)))throw new g(s(e)+" is not iterable");if(c(h)){for(v=0,b=p(e);b>v;v++)if((w=callFn(e[v]))&&u(m,w))return w;return new Result(!1)}y=l(e,h)}for(x=S?e.next:y.next;!(_=o(x,y)).done;){try{w=callFn(_.value)}catch(e){f(y,"throw",e)}if("object"==typeof w&&w&&u(m,w))return w}return new Result(!1)}},46721(e,t,r){"use strict";var n=r(21807),o=r(2293),a=r(92564);e.exports=function(e,t,r){var s,c;o(e);try{if(!(s=a(e,"return"))){if("throw"===t)throw r;return r}s=n(s,e)}catch(e){c=!0,s=e}if("throw"===t)throw r;if(c)throw s;return o(s),r}},75267(e,t,r){"use strict";var n=r(85578);e.exports=function(e,t){var r=n.Iterator,o=r&&r.prototype,a=o&&o[e],s=!1;if(a)try{a.call({next:function(){return{done:!0}},return:function(){s=!0}},-1)}catch(e){e instanceof t||(s=!1)}if(!s)return a}},21851(e,t,r){"use strict";var n,o,a,s=r(28473),c=r(1483),p=r(71704),u=r(25290),l=r(53181),d=r(77914),f=r(70001),g=r(19557),m=f("iterator"),y=!1;[].keys&&("next"in(a=[].keys())?(o=l(l(a)))!==Object.prototype&&(n=o):y=!0),!p(n)||s(function(){var e={};return n[m].call(e)!==e})?n={}:g&&(n=u(n)),c(n[m])||d(n,m,function(){return this}),e.exports={IteratorPrototype:n,BUGGY_SAFARI_ITERATORS:y}},86775(e){"use strict";e.exports={}},66960(e,t,r){"use strict";var n=r(58324);e.exports=function(e){return n(e.length)}},90169(e,t,r){"use strict";var n=r(14762),o=r(28473),a=r(1483),s=r(55755),c=r(20382),p=r(42048).CONFIGURABLE,u=r(17268),l=r(64483),d=l.enforce,f=l.get,g=String,m=Object.defineProperty,y=n("".slice),h=n("".replace),v=n([].join),b=c&&!o(function(){return 8!==m(function(){},"length",{value:8}).length}),w=String(String).split("String"),x=e.exports=function(e,t,r){"Symbol("===y(g(t),0,7)&&(t="["+h(g(t),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),r&&r.getter&&(t="get "+t),r&&r.setter&&(t="set "+t),(!s(e,"name")||p&&e.name!==t)&&(c?m(e,"name",{value:t,configurable:!0}):e.name=t),b&&r&&s(r,"arity")&&e.length!==r.arity&&m(e,"length",{value:r.arity});try{r&&s(r,"constructor")&&r.constructor?c&&m(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}var n=d(e);return s(n,"source")||(n.source=v(w,"string"==typeof t?t:"")),e};Function.prototype.toString=x(function toString(){return a(this)&&f(this).source||u(this)},"toString")},61703(e){"use strict";var t=Math.ceil,r=Math.floor;e.exports=Math.trunc||function trunc(e){var n=+e;return(n>0?r:t)(n)}},25290(e,t,r){"use strict";var n,o=r(2293),a=r(95799),s=r(44741),c=r(11507),p=r(42811),u=r(3145),l=r(65409),d="prototype",f="script",g=l("IE_PROTO"),EmptyConstructor=function(){},scriptTag=function(e){return"<"+f+">"+e+"</"+f+">"},NullProtoObjectViaActiveX=function(e){e.write(scriptTag("")),e.close();var t=e.parentWindow.Object;return e=null,t},NullProtoObject=function(){try{n=new ActiveXObject("htmlfile")}catch(e){}var e,t,r;NullProtoObject="undefined"!=typeof document?document.domain&&n?NullProtoObjectViaActiveX(n):(t=u("iframe"),r="java"+f+":",t.style.display="none",p.appendChild(t),t.src=String(r),(e=t.contentWindow.document).open(),e.write(scriptTag("document.F=Object")),e.close(),e.F):NullProtoObjectViaActiveX(n);for(var o=s.length;o--;)delete NullProtoObject[d][s[o]];return NullProtoObject()};c[g]=!0,e.exports=Object.create||function create(e,t){var r;return null!==e?(EmptyConstructor[d]=o(e),r=new EmptyConstructor,EmptyConstructor[d]=null,r[g]=e):r=NullProtoObject(),void 0===t?r:a.f(r,t)}},95799(e,t,r){"use strict";var n=r(20382),o=r(3896),a=r(25835),s=r(2293),c=r(35599),p=r(33658);t.f=n&&!o?Object.defineProperties:function defineProperties(e,t){s(e);for(var r,n=c(t),o=p(t),u=o.length,l=0;u>l;)a.f(e,r=o[l++],n[r]);return e}},25835(e,t,r){"use strict";var n=r(20382),o=r(1799),a=r(3896),s=r(2293),c=r(83815),p=TypeError,u=Object.defineProperty,l=Object.getOwnPropertyDescriptor,d="enumerable",f="configurable",g="writable";t.f=n?a?function defineProperty(e,t,r){if(s(e),t=c(t),s(r),"function"==typeof e&&"prototype"===t&&"value"in r&&g in r&&!r[g]){var n=l(e,t);n&&n[g]&&(e[t]=r.value,r={configurable:f in r?r[f]:n[f],enumerable:d in r?r[d]:n[d],writable:!1})}return u(e,t,r)}:u:function defineProperty(e,t,r){if(s(e),t=c(t),s(r),o)try{return u(e,t,r)}catch(e){}if("get"in r||"set"in r)throw new p("Accessors not supported");return"value"in r&&(e[t]=r.value),e}},4961(e,t,r){"use strict";var n=r(20382),o=r(21807),a=r(37611),s=r(57738),c=r(35599),p=r(83815),u=r(55755),l=r(1799),d=Object.getOwnPropertyDescriptor;t.f=n?d:function getOwnPropertyDescriptor(e,t){if(e=c(e),t=p(t),l)try{return d(e,t)}catch(e){}if(u(e,t))return s(!o(a.f,e,t),e[t])}},12278(e,t,r){"use strict";var n=r(56742),o=r(44741).concat("length","prototype");t.f=Object.getOwnPropertyNames||function getOwnPropertyNames(e){return n(e,o)}},74347(e,t){"use strict";t.f=Object.getOwnPropertySymbols},53181(e,t,r){"use strict";var n=r(55755),o=r(1483),a=r(22347),s=r(65409),c=r(19441),p=s("IE_PROTO"),u=Object,l=u.prototype;e.exports=c?u.getPrototypeOf:function(e){var t=a(e);if(n(t,p))return t[p];var r=t.constructor;return o(r)&&t instanceof r?r.prototype:t instanceof u?l:null}},4815(e,t,r){"use strict";var n=r(14762);e.exports=n({}.isPrototypeOf)},56742(e,t,r){"use strict";var n=r(14762),o=r(55755),a=r(35599),s=r(86651).indexOf,c=r(11507),p=n([].push);e.exports=function(e,t){var r,n=a(e),u=0,l=[];for(r in n)!o(c,r)&&o(n,r)&&p(l,r);for(;t.length>u;)o(n,r=t[u++])&&(~s(l,r)||p(l,r));return l}},33658(e,t,r){"use strict";var n=r(56742),o=r(44741);e.exports=Object.keys||function keys(e){return n(e,o)}},37611(e,t){"use strict";var r={}.propertyIsEnumerable,n=Object.getOwnPropertyDescriptor,o=n&&!r.call({1:2},1);t.f=o?function propertyIsEnumerable(e){var t=n(this,e);return!!t&&t.enumerable}:r},348(e,t,r){"use strict";var n=r(21807),o=r(1483),a=r(71704),s=TypeError;e.exports=function(e,t){var r,c;if("string"===t&&o(r=e.toString)&&!a(c=n(r,e)))return c;if(o(r=e.valueOf)&&!a(c=n(r,e)))return c;if("string"!==t&&o(r=e.toString)&&!a(c=n(r,e)))return c;throw new s("Can't convert object to primitive value")}},89497(e,t,r){"use strict";var n=r(11409),o=r(14762),a=r(12278),s=r(74347),c=r(2293),p=o([].concat);e.exports=n("Reflect","ownKeys")||function ownKeys(e){var t=a.f(c(e)),r=s.f;return r?p(t,r(e)):t}},53312(e,t,r){"use strict";var n=r(15983),o=TypeError;e.exports=function(e){if(n(e))throw new o("Can't call method on "+e);return e}},65409(e,t,r){"use strict";var n=r(47255),o=r(81866),a=n("keys");e.exports=function(e){return a[e]||(a[e]=o(e))}},91831(e,t,r){"use strict";var n=r(19557),o=r(85578),a=r(82095),s="__core-js_shared__",c=e.exports=o[s]||a(s,{});(c.versions||(c.versions=[])).push({version:"3.48.0",mode:n?"pure":"global",copyright:"© 2013–2025 Denis Pushkarev (zloirock.ru), 2025–2026 CoreJS Company (core-js.io). All rights reserved.",license:"https://github.com/zloirock/core-js/blob/v3.48.0/LICENSE",source:"https://github.com/zloirock/core-js"})},47255(e,t,r){"use strict";var n=r(91831);e.exports=function(e,t){return n[e]||(n[e]=t||{})}},86029(e,t,r){"use strict";var n=r(66477),o=r(28473),a=r(85578).String;e.exports=!!Object.getOwnPropertySymbols&&!o(function(){var e=Symbol("symbol detection");return!a(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&n&&n<41})},33392(e,t,r){"use strict";var n=r(73005),o=Math.max,a=Math.min;e.exports=function(e,t){var r=n(e);return r<0?o(r+t,0):a(r,t)}},35599(e,t,r){"use strict";var n=r(32121),o=r(53312);e.exports=function(e){return n(o(e))}},73005(e,t,r){"use strict";var n=r(61703);e.exports=function(e){var t=+e;return t!=t||0===t?0:n(t)}},58324(e,t,r){"use strict";var n=r(73005),o=Math.min;e.exports=function(e){var t=n(e);return t>0?o(t,9007199254740991):0}},22347(e,t,r){"use strict";var n=r(53312),o=Object;e.exports=function(e){return o(n(e))}},22355(e,t,r){"use strict";var n=r(21807),o=r(71704),a=r(31423),s=r(92564),c=r(348),p=r(70001),u=TypeError,l=p("toPrimitive");e.exports=function(e,t){if(!o(e)||a(e))return e;var r,p=s(e,l);if(p){if(void 0===t&&(t="default"),r=n(p,e,t),!o(r)||a(r))return r;throw new u("Can't convert object to primitive value")}return void 0===t&&(t="number"),c(e,t)}},83815(e,t,r){"use strict";var n=r(22355),o=r(31423);e.exports=function(e){var t=n(e,"string");return o(t)?t:t+""}},34338(e,t,r){"use strict";var n={};n[r(70001)("toStringTag")]="z",e.exports="[object z]"===String(n)},18761(e){"use strict";var t=String;e.exports=function(e){try{return t(e)}catch(e){return"Object"}}},81866(e,t,r){"use strict";var n=r(14762),o=0,a=Math.random(),s=n(1.1.toString);e.exports=function(e){return"Symbol("+(void 0===e?"":e)+")_"+s(++o+a,36)}},45022(e,t,r){"use strict";var n=r(86029);e.exports=n&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},3896(e,t,r){"use strict";var n=r(20382),o=r(28473);e.exports=n&&o(function(){return 42!==Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype})},74644(e,t,r){"use strict";var n=r(85578),o=r(1483),a=n.WeakMap;e.exports=o(a)&&/native code/.test(String(a))},70001(e,t,r){"use strict";var n=r(85578),o=r(47255),a=r(55755),s=r(81866),c=r(86029),p=r(45022),u=n.Symbol,l=o("wks"),d=p?u.for||u:u&&u.withoutSetter||s;e.exports=function(e){return a(l,e)||(l[e]=c&&a(u,e)?u[e]:d("Symbol."+e)),l[e]}},43617(e,t,r){"use strict";var n=r(28612),o=r(85578),a=r(96021),s=r(2293),c=r(1483),p=r(53181),u=r(83864),l=r(30670),d=r(28473),f=r(55755),g=r(70001),m=r(21851).IteratorPrototype,y=r(20382),h=r(19557),v="constructor",b="Iterator",w=g("toStringTag"),x=TypeError,_=o[b],O=h||!c(_)||_.prototype!==m||!d(function(){_({})}),P=function Iterator(){if(a(this,m),p(this)===m)throw new x("Abstract class Iterator not directly constructable")},defineIteratorPrototypeAccessor=function(e,t){y?u(m,e,{configurable:!0,get:function(){return t},set:function(t){if(s(this),this===m)throw new x("You can't redefine this property");f(this,e)?this[e]=t:l(this,e,t)}}):m[e]=t};f(m,w)||defineIteratorPrototypeAccessor(w,b),!O&&f(m,v)&&m[v]!==Object||defineIteratorPrototypeAccessor(v,P),P.prototype=m,n({global:!0,constructor:!0,forced:O},{Iterator:P})},35214(e,t,r){"use strict";var n=r(28612),o=r(21807),a=r(11506),s=r(68120),c=r(2293),p=r(40041),u=r(46721),l=r(75267)("every",TypeError);n({target:"Iterator",proto:!0,real:!0,forced:l},{every:function every(e){c(this);try{s(e)}catch(e){u(this,"throw",e)}if(l)return o(l,this,e);var t=p(this),r=0;return!a(t,function(t,n){if(!e(t,r++))return n()},{IS_RECORD:!0,INTERRUPTED:!0}).stopped}})},99930(e,t,r){"use strict";var n=r(28612),o=r(21807),a=r(11506),s=r(68120),c=r(2293),p=r(40041),u=r(46721),l=r(75267)("forEach",TypeError);n({target:"Iterator",proto:!0,real:!0,forced:l},{forEach:function forEach(e){c(this);try{s(e)}catch(e){u(this,"throw",e)}if(l)return o(l,this,e);var t=p(this),r=0;a(t,function(t){e(t,r++)},{IS_RECORD:!0})}})},14846(e,t,r){"use strict";r(43617)},63333(e,t,r){"use strict";r(35214)},69655(e,t,r){"use strict";r(99930)}},t={};function __webpack_require__(r){var n=t[r];if(void 0!==n)return n.exports;var o=t[r]={id:r,exports:{}};return e[r].call(o.exports,o,o.exports,__webpack_require__),o.exports}__webpack_require__.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return __webpack_require__.d(t,{a:t}),t},__webpack_require__.d=(e,t)=>{for(var r in t)__webpack_require__.o(t,r)&&!__webpack_require__.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},__webpack_require__.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),__webpack_require__.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),__webpack_require__.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};(()=>{"use strict";var e=__webpack_require__(37772);class PageTransitionsFrontend{constructor(){customElements.define("e-preloader",e.Preloader),customElements.define("e-page-transition",e.PageTransition)}}new PageTransitionsFrontend})()})();