1?j.options.decimal+b[1]:"",e=/(\d+)(\d{3})/,j.options.useGrouping)for(;e.test(c);)c=c.replace(e,"$1"+j.options.separator+"$2");return c+d},j.d.innerHTML=j.formatNumber(j.startVal.toFixed(j.decimals))}
/* covervid.min.js */
jQuery.fn.extend({coverVid:function(a,b){function c(){var c=d.parent().height(),e=d.parent().width(),f=a,g=b,h=c/g,i=e/f;d.css({position:"absolute",top:"50%",left:"50%","-webkit-transform":"translate(-50%, -50%)","-moz-transform":"translate(-50%, -50%)","-ms-transform":"translate(-50%, -50%)","-o-transform":"translate(-50%, -50%)",transform:"translate(-50%, -50%)"}),d.parent().css("overflow","hidden"),d.css(i>h?{height:"auto",width:e}:{height:c,width:"auto"})}jQuery(document).ready(c),jQuery(window).smartresize(c);var d=this}});
/*
* jQuery Superfish Menu Plugin - v1.7.4
* Copyright (c) 2013 Joel Birch
*
* Dual licensed under the MIT and GPL licenses:
* http://www.opensource.org/licenses/mit-license.php
* http://www.gnu.org/licenses/gpl.html
*/
;(function(e){"use strict";var s=function(){var s={bcClass:"sf-breadcrumb",menuClass:"sf-js-enabled",anchorClass:"sf-with-ul",menuArrowClass:"sf-arrows"},o=function(){var s=/iPhone|iPad|iPod/i.test(navigator.userAgent);return s&&e(window).load(function(){e("body").children().on("click",e.noop)}),s}(),n=function(){var e=document.documentElement.style;return"behavior"in e&&"fill"in e&&/iemobile/i.test(navigator.userAgent)}(),t=function(e,o){var n=s.menuClass;o.cssArrows&&(n+=" "+s.menuArrowClass),e.toggleClass(n)},i=function(o,n){return o.find("li."+n.pathClass).slice(0,n.pathLevels).addClass(n.hoverClass+" "+s.bcClass).filter(function(){return e(this).children(n.popUpSelector).hide().show().length}).removeClass(n.pathClass)},r=function(e){e.children("a").toggleClass(s.anchorClass)},a=function(e){var s=e.css("ms-touch-action");s="pan-y"===s?"auto":"pan-y",e.css("ms-touch-action",s)},l=function(s,t){var i="li:has("+t.popUpSelector+")";e.fn.hoverIntent&&!t.disableHI?s.hoverIntent(u,p,i):s.on("mouseenter.superfish",i,u).on("mouseleave.superfish",i,p);var r="MSPointerDown.superfish";o||(r+=" touchend.superfish"),n&&(r+=" mousedown.superfish"),s.on("focusin.superfish","li",u).on("focusout.superfish","li",p).on(r,"a",t,h)},h=function(s){var o=e(this),n=o.siblings(s.data.popUpSelector);n.length>0&&n.is(":hidden")&&(o.one("click.superfish",!1),"MSPointerDown"===s.type?o.trigger("focus"):e.proxy(u,o.parent("li"))())},u=function(){var s=e(this),o=d(s);clearTimeout(o.sfTimer),s.siblings().superfish("hide").end().superfish("show")},p=function(){var s=e(this),n=d(s);o?e.proxy(f,s,n)():(clearTimeout(n.sfTimer),n.sfTimer=setTimeout(e.proxy(f,s,n),n.delay))},f=function(s){s.retainPath=e.inArray(this[0],s.$path)>-1,this.superfish("hide"),this.parents("."+s.hoverClass).length||(s.onIdle.call(c(this)),s.$path.length&&e.proxy(u,s.$path)())},c=function(e){return e.closest("."+s.menuClass)},d=function(e){return c(e).data("sf-options")};return{hide:function(s){if(this.length){var o=this,n=d(o);if(!n)return this;var t=n.retainPath===!0?n.$path:"",i=o.find("li."+n.hoverClass).add(this).not(t).removeClass(n.hoverClass).children(n.popUpSelector),r=n.speedOut;s&&(i.show(),r=0),n.retainPath=!1,n.onBeforeHide.call(i),i.stop(!0,!0).animate(n.animationOut,r,function(){var s=e(this);n.onHide.call(s)})}return this},show:function(){var e=d(this);if(!e)return this;var s=this.addClass(e.hoverClass),o=s.children(e.popUpSelector);return e.onBeforeShow.call(o),o.stop(!0,!0).animate(e.animation,e.speed,function(){e.onShow.call(o)}),this},destroy:function(){return this.each(function(){var o,n=e(this),i=n.data("sf-options");return i?(o=n.find(i.popUpSelector).parent("li"),clearTimeout(i.sfTimer),t(n,i),r(o),a(n),n.off(".superfish").off(".hoverIntent"),o.children(i.popUpSelector).attr("style",function(e,s){return s.replace(/display[^;]+;?/g,"")}),i.$path.removeClass(i.hoverClass+" "+s.bcClass).addClass(i.pathClass),n.find("."+i.hoverClass).removeClass(i.hoverClass),i.onDestroy.call(n),n.removeData("sf-options"),void 0):!1})},init:function(o){return this.each(function(){var n=e(this);if(n.data("sf-options"))return!1;var h=e.extend({},e.fn.superfish.defaults,o),u=n.find(h.popUpSelector).parent("li");h.$path=i(n,h),n.data("sf-options",h),t(n,h),r(u),a(n),l(n,h),u.not("."+s.bcClass).superfish("hide",!0),h.onInit.call(this)})}}}();e.fn.superfish=function(o){return s[o]?s[o].apply(this,Array.prototype.slice.call(arguments,1)):"object"!=typeof o&&o?e.error("Method "+o+" does not exist on jQuery.fn.superfish"):s.init.apply(this,arguments)},e.fn.superfish.defaults={popUpSelector:"ul,.sf-mega",hoverClass:"sfHover",pathClass:"overrideThisToUse",pathLevels:1,delay:800,animation:{opacity:"show"},animationOut:{opacity:"hide"},speed:"normal",speedOut:"fast",cssArrows:!0,disableHI:!1,onInit:e.noop,onBeforeShow:e.noop,onShow:e.noop,onBeforeHide:e.noop,onHide:e.noop,onIdle:e.noop,onDestroy:e.noop},e.fn.extend({hideSuperfishUl:s.hide,showSuperfishUl:s.show})})(jQuery);
// debouncing function from John Hann
// http://unscriptable.com/index.php/2009/03/20/debouncing-javascript-methods/
(function(e,t){var n=function(e,t,n){var r;return function(){function u(){if(!n)e.apply(s,o);r=null}var s=this,o=arguments;if(r)clearTimeout(r);else if(n)e.apply(s,o);r=setTimeout(u,t||100)}};jQuery.fn[t]=function(e){return e?this.bind("resize",n(e)):this.trigger(t)}})(jQuery,"smartresize")
// getComputedStyle for IE8
if (!window.getComputedStyle) {
window.getComputedStyle = function(el, pseudo) {
this.el = el;
this.getPropertyValue = function(prop) {
var re = /(\-([a-z]){1})/g;
if (prop == 'float') prop = 'styleFloat';
if (re.test(prop)) {
prop = prop.replace(re, function () {
return arguments[2].toUpperCase();
});
}
return el.currentStyle[prop] ? el.currentStyle[prop] : null;
}
return this;
}
}
/* Waypoints magic
---------------------------------------------------------- */
if ( typeof window['vc_waypoints'] !== 'function' ) {
function vc_waypoints() {
if(!(/Android|iPhone|iPad|iPod|BlackBerry|Windows Phone/i).test(navigator.userAgent || navigator.vendor || window.opera)){
if (typeof jQuery.fn.waypoint !== 'undefined') {
jQuery('.wpb_animate_when_almost_visible').waypoint(function() {
jQuery(this).addClass('wpb_start_animation');
}, { offset: '85%' });
}
} else {
jQuery('.wpb_animate_when_almost_visible').removeClass('wpb_animate_when_almost_visible');
}
}
}
jQuery(document).ready(function($) {
/* Teaser grid: isotope
---------------------------------------------------------- */
// cache jQuery window
var $window = jQuery(window);
// cache container
jQuery('.wpb_grid-alternative .teaser_grid_container:not(.wpb_carousel), .wpb_filtered_grid .teaser_grid_container:not(.wpb_carousel)').each(function(){
var $icontainer = jQuery(this);
var $isotopeItems = jQuery(this).find('.isotope-item');
$isotopeItems.css({ opacity: 0 });
// start up isotope with default settings
$icontainer.imagesLoaded( function(){
vc_teaserGrid_alternative();
$window.smartresize( vc_teaserGrid_alternative );
$('.mt-loader').stop(true,true).fadeOut(200);
var $ithumbs = $icontainer.find('.wpb_thumbnails-alternative');
$ithumbs.css({ opacity: 1 });
$isotopeItems.each(function(i){
jQuery(this).delay(i*125).animate({'opacity':1},700);
});
});
});
function vc_teaserGrid_alternative() {
//var mediaQueryId = getComputedStyle( document.body, ':after' ).getPropertyValue('content');
// fix for firefox, remove double quotes "
//if (navigator.userAgent.match('MSIE 8') == null) {
//mediaQueryId = mediaQueryId.replace( /"/g, '' );
//}
//console.log( mediaQueryId );
jQuery('.wpb_grid-alternative .teaser_grid_container:not(.wpb_carousel), .wpb_filtered_grid .teaser_grid_container:not(.wpb_carousel)').each(function(){
var $container = jQuery(this);
var $thumbs = $container.find('.wpb_thumbnails-alternative');
var teaser_grid = $thumbs.closest('.wpb_teaser_grid');
if ( !teaser_grid.hasClass('columns_count_1') ) {
$thumbs.isotope({
// options
itemSelector : '.isotope-item',
//resizable: false, // disable normal resizing
masonry: {
columnWidth: '.grid-sizer',
gutter: '.gutter-sizer'
}
}).isotope( 'layout' );
}
});
}
// Superfish
var $megaMenu = $('#megaMenu');
var $pageMenu = $('.page-menu');
if ($pageMenu.length && !$megaMenu.length) {
$pageMenu.children('ul').addClass('sf-menu');
}
if (!$megaMenu.length) {
$('ul.sf-menu').superfish({
delay: 100,
animation: {height:'show'},
speed: 0,
speedOut: 0,
});
}
// cache jQuery window
var $window = $(window);
// custom toggle function
//var animateToggle = function( $obj, time ) {
//if ( $obj.is(':visible') ) {
//var h = $obj.height();
//$obj.stop().transition({height: 0}, time, function(){
//$obj.css({display: 'none', height: h});
//});
//} else {
//var h = $obj.stop().css({display: 'block', overflow: 'hidden'}).height();
//$obj.css({height: 0}).transition({height: h}, time);
//}
//}
// Mobile Menu
var mobileMenu = $('#access-mobile');
var menuOpenedTime = 0;
(function mega_menu_listener() {
var $megaMenuDropdown = $('#mobile-menu-dropdown');
// toggle on click
$megaMenuDropdown.click(function(e) {
e.preventDefault();
var tempTime = new Date().getTime();
if ( menuOpenedTime + 300 < tempTime ) {
mobileMenu.stop().slideToggle(0);
menuOpenedTime = new Date().getTime();
}
});
})(); // self calling
var mobileMenuLink = $('#access-mobile li a');
mobileMenuLink.each(function(){
if(typeof $(this).attr('href') == 'undefined') {
$(this).addClass('collapsible');
$(this).next( '.sub-menu' ).css( 'display', 'none' );
var menuOpenedTimeMenuLink = 0;
$(this).click(function(e) {
e.preventDefault();
var tempTimeMenuLink = new Date().getTime();
if ( menuOpenedTimeMenuLink + 300 < tempTimeMenuLink ) {
$(this).toggleClass('m-hover');
$(this).next( '.sub-menu' ).stop().slideToggle(0);
menuOpenedTimeMenuLink = new Date().getTime();
}
});
}
});
// Skrollr
if(!(/Android|iPhone|iPad|iPod|BlackBerry|Windows Phone/i).test(navigator.userAgent || navigator.vendor || window.opera)){
var s = skrollr.init({
forceHeight: false
});
var $header= $('#branding');
$header.imagesLoaded(function(){
s.refresh();
});
var $parallax = $('.parallax');
if ($parallax.length) {
jQuery(window).load(function() {
setTimeout(function(){
s.refresh();
}, 100);
});
}
var $window = $(window);
$window.smartresize(function() {
setTimeout(function(){
s.refresh();
}, 100);
});
}
// countUp.js
var $countWrapper = $('.count-wrapper');
if ($countWrapper.length) {
$( '.count-wrapper' ).each(function( i, el ) {
var $el = $( el ),
target = $el.data( 'count' ),
startVal = 0,
endVal = $el.data( 'end' ),
decimals = 0;
var theAnimation = new countUp( target, startVal, endVal, decimals, 3.5, {
useEasing : true,
useGrouping : false,
separator : '',
decimal : '.',
});
if (typeof jQuery.fn.waypoint !== 'undefined') {
$( '#' + target ).waypoint(function( direction ) {
theAnimation.start();
}, { offset: '85%' });
}
});
}
// covervid.min.js init
$('.covervid-video').coverVid(1920, 1080);
// Submit Comment and Contact Form 7 Send Button
$( "#respond input#submit, .wpcf7-submit" ).wrap( "" );
$(window).load(function() {
var $toolbar = $('.button-cover > .ajax-loader');
$toolbar.parent().after($toolbar);
});
// FlexSlider
var $testimonials = $('.testimonialsslider');
if ($testimonials.length) {
var $randomize_testimonial_order = $testimonials.attr( "data-randomize-testimonial-order" );
if ($testimonials.attr('data-dot-navigation-color')) {
var $dot_navigation_color = $testimonials.attr( "data-dot-navigation-color" );
}
$testimonials.imagesLoaded(function(){
$testimonials.flexslider({
touch: true,
directionNav: true,
smoothHeight: true,
prevText: "",
nextText: "",
animationSpeed: 350,
randomize: $randomize_testimonial_order,
start: function(){
$testimonials.find( '.flex-control-nav li a' ).css({ 'background': $dot_navigation_color, 'color': $dot_navigation_color });
},
slideshow: false,
animation: "slide",
keyboard: false,
useCSS: true
});
});
}
// Magnific Popup
var $magnificpopup = $('.magnific-popup');
if ($magnificpopup.length) {
$('.single_column_ul, .wpb_image_grid_ul, .magnific-popup').each(function() {
$(this).magnificPopup({
delegate: 'a',
type: 'image',
gallery:{
enabled:true,
tCounter: '%curr% / %total%', // markup of counter
},
image: {
titleSrc: 'data-attribute-caption'
},
overflowY: 'hidden',
//removalDelay: 150,
//mainClass: 'mfp-fade',
closeBtnInside: false,
mainClass: 'mfp-zoom-in',
tLoading: '',
removalDelay: 500, //delay removal by X to allow out-animation
callbacks: {
open: function() {
$( '.mfp-preloader' ).append( '' );
},
change: function() {
if (this.isOpen) {
this.wrap.addClass('mfp-open');
}
},
imageLoadComplete: function() {
var self = this;
setTimeout(function() {
self.wrap.addClass('mfp-image-loaded');
}, 16);
},
beforeClose: function() {
if (this.isOpen) {
this.wrap.removeClass('mfp-open');
}
},
close: function() {
this.wrap.removeClass('mfp-image-loadedn');
},
},
});
});
}
// fancyBox
var $fbLightbox = $('.fb-lightbox');
if ($fbLightbox.length) {
(function ($, F) {
F.transitions.resizeIn = function() {
var previous = F.previous,
current = F.current,
startPos = previous.wrap.stop(true).position(),
endPos = $.extend({opacity : 1}, current.pos);
startPos.width = previous.wrap.width();
startPos.height = previous.wrap.height();
previous.wrap.stop(true).trigger('onReset').remove();
delete endPos.position;
current.inner.hide();
current.wrap.css(startPos).animate(endPos, {
duration : current.nextSpeed,
easing : current.nextEasing,
step : F.transitions.step,
complete : function() {
F._afterZoomIn();
current.inner.fadeIn("fast");
}
});
};
}(jQuery, jQuery.fancybox));
// Loading
loadingExtension = {
showLoading: function () {
H = $("html");
W = $(window);
D = $(document);
F = $.fancybox;
var el, viewport;
F.hideLoading();
el = $('').click(F.cancel).appendTo('body');
// If user will press the escape-button, the request will be canceled
D.bind('keydown.loading', function(e) {
if ((e.which || e.keyCode) === 27) {
e.preventDefault();
F.cancel();
}
});
if (!F.defaults.fixed) {
viewport = F.getViewport();
el.css({
position : 'absolute',
top : (viewport.h * 0.5) + viewport.y,
left : (viewport.w * 0.5) + viewport.x
});
}
},
hideLoading: function () {
D.unbind('.loading');
$('#fancybox-loading').remove();
}
};
$.extend($.fancybox, loadingExtension);
$('.fb-lightbox').fancybox({
mouseWheel: false,
padding: 0,
margin: [36, 60, 14, 60],
width: 940,
height: 530,
scrolling: 'auto',
iframe : {
preload: false
},
fitToView: true,
aspectRatio: true,
nextMethod : 'resizeIn',
nextSpeed : 250,
prevMethod : false,
nextClick: true,
helpers : {
overlay : {
locked : false
},
title: {
type: 'outside'
},
media: true
},
afterLoad: function() {
if (this.group.length > 1) {
this.title = this.title + '' + (this.index + 1) + ' / ' + this.group.length + '
';
}
},
beforeLoad: function() {
this.title = $(this.element).attr('data-caption');
},
beforeShow: function(){
$(window).on({
'resize.fancybox' : function(){
$.fancybox.update();
}
});
},
afterClose: function(){
$(window).off('resize.fancybox');
}
});
}
// R Slider
// cache container
var $Slider = jQuery('.gallery-slider');
if ($Slider.length) {
var getMediaQueryId = function() {
var mediaQueryId = getComputedStyle(document.body, ':after').getPropertyValue('content');
if ( navigator.userAgent.match('MSIE 8') == null ) {
mediaQueryId = mediaQueryId.replace( /"/g, '' );
}
return mediaQueryId;
}
// changing slider height depending on screen size
var changeHeightToFit = function() {
var mediaQueryId = getMediaQueryId();
if ( mediaQueryId == 'tiny' || mediaQueryId == 'small' || mediaQueryId == 'medium' ) {
$Slider.css({top: $('#header').outerHeight(true)});
} else {
var $left_menu = jQuery('.left-menu');
if ($left_menu.length) {
$Slider.css({top: 0});
} else {
$Slider.css({top: 78});
}
}
}
//var getImageScalePadding = function() {
//var mediaQueryId = getMediaQueryId();
//if ( mediaQueryId == 'tiny' ) {
//return 0;
//} else {
//return 0;
//}
//}
$Slider.royalSlider({
arrowsNav: true,
numImagesToPreload: 3,
keyboardNavEnabled: true,
controlsInside: false,
imageScaleMode: 'fit-if-smaller',
imageScalePadding: 0,
arrowsNavAutoHide: false,
autoScaleSlider: false,
autoHeight: false,
usePreloader: true,
controlNavigation: 'none',
//thumbs: {
//arrows: false,
//spacing: 0,
//firstMargin: false,
//autoCenter: true,
//fitInViewport: true
//},
navigateByClick: true,
startSlideId: 0,
//autoPlay: {
//enabled: ,
//pauseOnHover: ,
//delay:
//},
transitionType: 'move',
sliderDrag: false,
globalCaption: false,
fadeinLoadedSlide: true,
loop: true,
slidesSpacing: 0,
fullscreen: {
enabled: false,
nativeFS: true
}
});
$('#header-wrapper').imagesLoaded(function(){
changeHeightToFit();
var slider = $Slider.data('royalSlider');
// force updating size by adding "true" to updateSliderSize method
slider.updateSliderSize(true);
});
// updating imageScaleMode and height depending on screen size
jQuery(window).smartresize(function(){
var slider = $Slider.data('royalSlider');
//slider.st.imageScalePadding = getImageScalePadding();
changeHeightToFit();
// force updating size by adding "true" to updateSliderSize method
slider.updateSliderSize(true);
});
}
// Search form (header)
$(document).click(function(event) {
if (!$(event.target).closest("i, .search-wrapper").length) {
$('#search-header-icon').removeClass('search-form-active');
$('.search-wrapper').removeClass("active");
}
});
$('#search-header-icon').on('click', function(event){
if (!$(this).hasClass("search-form-active")) {
$(this).addClass("search-form-active");
$('#header-wrapper .search-wrapper, #top-bar-wrapper .search-wrapper').addClass("active");
} else {
$(this).removeClass("search-form-active");
$('#header-wrapper .search-wrapper, #top-bar-wrapper .search-wrapper').removeClass("active");
}
if(!(/Android|iPhone|iPad|iPod|BlackBerry|Windows Phone/i).test(navigator.userAgent || navigator.vendor || window.opera)){
setTimeout(function() {
$('#header-wrapper #s, #top-bar-wrapper #s').focus();
}, 200);
} else {
$('#header-wrapper #s, #top-bar-wrapper #s').focus();
}
//$('#header-wrapper #s').focus();
event.preventDefault();
});
$('#remove-search').on('click', function(event){
if ($('#search-header-icon').hasClass("search-form-active")) {
$('#search-header-icon').removeClass("search-form-active");
$('#header-wrapper .search-wrapper, #top-bar-wrapper .search-wrapper').removeClass("active");
}
event.preventDefault();
});
/* To Top */
var to_top_settings = {
button: '#to-top',
scrollSpeed: 600
};
$(to_top_settings.button).on('click', function( e ) {
$('html, body').animate({ scrollTop : 0 }, to_top_settings.scrollSpeed );
e.preventDefault();
});
/* WPML */
var $langSelSel = $('#top-bar .lang_sel_sel');
$langSelSel.on('click', function( e ) {
e.preventDefault();
});
// HTML5 Placeholder jQuery Plugin
$('input, textarea').placeholder();
// ShowBiz
var cat;
jQuery('.showbiz .entry-meta').each(function() {
cat = jQuery(this).find('a');
if(cat.length > 1) cat.each(catEach);
});
function catEach(i) {
if(i > 0) {
jQuery(' ').insertBefore(jQuery(this));
}
}
// The slider being synced must be initialized first
var $singleProduct = $( '.single-product' );
if ($singleProduct.length) {
$('#carousel').flexslider({
animation: "slide",
controlNav: false,
animationLoop: false,
slideshow: false,
itemWidth: 119,
itemMargin: 14,
asNavFor: '#slider',
move: 1,
maxItems: 3
});
$('#slider').flexslider({
animation: "slide",
controlNav: false,
animationLoop: false,
slideshow: false,
sync: "#carousel",
animationSpeed: 350
});
}
}); // END jQuery(document).ready