(function($) { 'use strict'; var accordions = {}; mkdf.modules.accordions = accordions; accordions.mkdfInitAccordions = mkdfInitAccordions; accordions.mkdfOnDocumentReady = mkdfOnDocumentReady; $(document).ready(mkdfOnDocumentReady); /* All functions to be called on $(document).ready() should be in this function */ function mkdfOnDocumentReady() { mkdfInitAccordions(); } /** * Init accordions shortcode */ function mkdfInitAccordions(){ var accordion = $('.mkdf-accordion-holder'); if(accordion.length){ accordion.each(function(){ var thisAccordion = $(this); if(thisAccordion.hasClass('mkdf-accordion')){ thisAccordion.accordion({ animate: "swing", collapsible: true, active: 0, icons: "", heightStyle: "content" }); } if(thisAccordion.hasClass('mkdf-toggle')){ var toggleAccordion = $(this), toggleAccordionTitle = toggleAccordion.find('.mkdf-accordion-title'), toggleAccordionContent = toggleAccordionTitle.next(); toggleAccordion.addClass("accordion ui-accordion ui-accordion-icons ui-widget ui-helper-reset"); toggleAccordionTitle.addClass("ui-accordion-header ui-state-default ui-corner-top ui-corner-bottom"); toggleAccordionContent.addClass("ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom").hide(); toggleAccordionTitle.each(function(){ var thisTitle = $(this); thisTitle.on('mouseenter mouseleave',function(){ thisTitle.toggleClass("ui-state-hover"); }); thisTitle.on('click',function(){ thisTitle.toggleClass('ui-accordion-header-active ui-state-active ui-state-default ui-corner-bottom'); thisTitle.next().toggleClass('ui-accordion-content-active').slideToggle(400); }); }); } }); } } })(jQuery); (function($) { 'use strict'; var animationHolder = {}; mkdf.modules.animationHolder = animationHolder; animationHolder.mkdfInitAnimationHolder = mkdfInitAnimationHolder; animationHolder.mkdfOnDocumentReady = mkdfOnDocumentReady; $(document).ready(mkdfOnDocumentReady); /* All functions to be called on $(document).ready() should be in this function */ function mkdfOnDocumentReady() { mkdfInitAnimationHolder(); } /* * Init animation holder shortcode */ function mkdfInitAnimationHolder(){ var elements = $('.mkdf-grow-in, .mkdf-fade-in-down, .mkdf-element-from-fade, .mkdf-element-from-left, .mkdf-element-from-right, .mkdf-element-from-top, .mkdf-element-from-bottom, .mkdf-flip-in, .mkdf-x-rotate, .mkdf-z-rotate, .mkdf-y-translate, .mkdf-fade-in, .mkdf-fade-in-left-x-rotate'), animationClass, animationData, animationDelay; if(elements.length){ elements.each(function(){ var thisElement = $(this); thisElement.appear(function() { animationData = thisElement.data('animation'); animationDelay = parseInt(thisElement.data('animation-delay')); if(typeof animationData !== 'undefined' && animationData !== '') { animationClass = animationData; var newClass = animationClass+'-on'; setTimeout(function(){ thisElement.addClass(newClass); },animationDelay); } },{accX: 0, accY: mkdfGlobalVars.vars.mkdfElementAppearAmount}); }); } } })(jQuery); (function($) { 'use strict'; var button = {}; mkdf.modules.button = button; button.mkdfButton = mkdfButton; button.mkdfOnDocumentReady = mkdfOnDocumentReady; $(document).ready(mkdfOnDocumentReady); /* All functions to be called on $(document).ready() should be in this function */ function mkdfOnDocumentReady() { mkdfButton().init(); } /** * Button object that initializes whole button functionality * @type {Function} */ var mkdfButton = function() { //all buttons on the page var buttons = $('.mkdf-btn'); /** * Initializes button hover color * @param button current button */ var buttonHoverColor = function(button) { if(typeof button.data('hover-color') !== 'undefined') { var changeButtonColor = function(event) { event.data.button.css('color', event.data.color); }; var originalColor = button.css('color'); var hoverColor = button.data('hover-color'); button.on('mouseenter', { button: button, color: hoverColor }, changeButtonColor); button.on('mouseleave', { button: button, color: originalColor }, changeButtonColor); } }; /** * Initializes button hover background color * @param button current button */ var buttonHoverBgColor = function(button) { if(typeof button.data('hover-bg-color') !== 'undefined') { var changeButtonBg = function(event) { event.data.button.css('background-color', event.data.color); }; var originalBgColor = button.css('background-color'); var hoverBgColor = button.data('hover-bg-color'); button.on('mouseenter', { button: button, color: hoverBgColor }, changeButtonBg); button.on('mouseleave', { button: button, color: originalBgColor }, changeButtonBg); } }; /** * Initializes button border color * @param button */ var buttonHoverBorderColor = function(button) { if(typeof button.data('hover-border-color') !== 'undefined') { var changeBorderColor = function(event) { event.data.button.css('border-color', event.data.color); }; var originalBorderColor = button.css('borderTopColor'); //take one of the four sides var hoverBorderColor = button.data('hover-border-color'); button.on('mouseenter', { button: button, color: hoverBorderColor }, changeBorderColor); button.on('mouseleave', { button: button, color: originalBorderColor }, changeBorderColor); } }; return { init: function() { if(buttons.length) { buttons.each(function() { buttonHoverColor($(this)); buttonHoverBgColor($(this)); buttonHoverBorderColor($(this)); }); } } }; }; })(jQuery); (function($) { 'use strict'; var countdown = {}; mkdf.modules.countdown = countdown; countdown.mkdfInitCountdown = mkdfInitCountdown; countdown.mkdfOnDocumentReady = mkdfOnDocumentReady; $(document).ready(mkdfOnDocumentReady); /* All functions to be called on $(document).ready() should be in this function */ function mkdfOnDocumentReady() { mkdfInitCountdown(); } /** * Countdown Shortcode */ function mkdfInitCountdown() { var countdowns = $('.mkdf-countdown'), date = new Date(), currentMonth = date.getMonth(), year, month, day, hour, minute, timezone, monthLabel, dayLabel, hourLabel, minuteLabel, secondLabel; if (countdowns.length) { countdowns.each(function(){ //Find countdown elements by id-s var countdownId = $(this).attr('id'), countdown = $('#'+countdownId), digitFontSize, labelFontSize; //Get data for countdown year = countdown.data('year'); month = countdown.data('month'); day = countdown.data('day'); hour = countdown.data('hour'); minute = countdown.data('minute'); timezone = countdown.data('timezone'); monthLabel = countdown.data('month-label'); dayLabel = countdown.data('day-label'); hourLabel = countdown.data('hour-label'); minuteLabel = countdown.data('minute-label'); secondLabel = countdown.data('second-label'); digitFontSize = countdown.data('digit-size'); labelFontSize = countdown.data('label-size'); if( currentMonth != month ) { month = month - 1; } //Initialize countdown countdown.countdown({ until: new Date(year, month, day, hour, minute, 44), labels: ['', monthLabel, '', dayLabel, hourLabel, minuteLabel, secondLabel], format: 'ODHMS', timezone: timezone, padZeroes: true, onTick: setCountdownStyle }); function setCountdownStyle() { countdown.find('.countdown-amount').css({ 'font-size' : digitFontSize+'px', 'line-height' : digitFontSize+'px' }); countdown.find('.countdown-period').css({ 'font-size' : labelFontSize+'px' }); } }); } } })(jQuery); (function($) { 'use strict'; var counter = {}; mkdf.modules.counter = counter; counter.mkdfInitCounter = mkdfInitCounter; counter.mkdfOnDocumentReady = mkdfOnDocumentReady; $(document).ready(mkdfOnDocumentReady); /* All functions to be called on $(document).ready() should be in this function */ function mkdfOnDocumentReady() { mkdfInitCounter(); } /** * Counter Shortcode */ function mkdfInitCounter() { var counterHolder = $('.mkdf-counter-holder'); if (counterHolder.length) { counterHolder.each(function() { var thisCounterHolder = $(this), thisCounter = thisCounterHolder.find('.mkdf-counter'); thisCounterHolder.appear(function() { thisCounterHolder.css('opacity', '1'); //Counter zero type if (thisCounter.hasClass('mkdf-zero-counter')) { var max = parseFloat(thisCounter.text()); thisCounter.countTo({ from: 0, to: max, speed: 1500, refreshInterval: 100 }); } else { thisCounter.absoluteCounter({ speed: 2000, fadeInDelay: 1000 }); } },{accX: 0, accY: mkdfGlobalVars.vars.mkdfElementAppearAmount}); }); } } })(jQuery); (function ($) { 'use strict'; var customFont = {}; mkdf.modules.customFont = customFont; customFont.mkdfCustomFontResize = mkdfCustomFontResize; customFont.mkdfCustomFontTypeOut = mkdfCustomFontTypeOut; customFont.mkdfOnDocumentReady = mkdfOnDocumentReady; customFont.mkdfOnWindowLoad = mkdfOnWindowLoad; $(document).ready(mkdfOnDocumentReady); $(window).on('load', mkdfOnWindowLoad); /* All functions to be called on $(document).ready() should be in this function */ function mkdfOnDocumentReady() { mkdfCustomFontResize(); } /* All functions to be called on $(window).load() should be in this function */ function mkdfOnWindowLoad() { mkdfCustomFontTypeOut(); } /* ** Custom Font resizing style */ function mkdfCustomFontResize() { var holder = $('.mkdf-custom-font-holder'); if (holder.length) { holder.each(function () { var thisItem = $(this), itemClass = '', smallLaptopStyle = '', ipadLandscapeStyle = '', ipadPortraitStyle = '', mobileLandscapeStyle = '', style = '', responsiveStyle = ''; if (typeof thisItem.data('item-class') !== 'undefined' && thisItem.data('item-class') !== false) { itemClass = thisItem.data('item-class'); } if (typeof thisItem.data('font-size-1280') !== 'undefined' && thisItem.data('font-size-1280') !== false) { smallLaptopStyle += 'font-size: ' + thisItem.data('font-size-1280') + ' !important;'; } if (typeof thisItem.data('font-size-1024') !== 'undefined' && thisItem.data('font-size-1024') !== false) { ipadLandscapeStyle += 'font-size: ' + thisItem.data('font-size-1024') + ' !important;'; } if (typeof thisItem.data('font-size-768') !== 'undefined' && thisItem.data('font-size-768') !== false) { ipadPortraitStyle += 'font-size: ' + thisItem.data('font-size-768') + ' !important;'; } if (typeof thisItem.data('font-size-680') !== 'undefined' && thisItem.data('font-size-680') !== false) { mobileLandscapeStyle += 'font-size: ' + thisItem.data('font-size-680') + ' !important;'; } if (typeof thisItem.data('line-height-1280') !== 'undefined' && thisItem.data('line-height-1280') !== false) { smallLaptopStyle += 'line-height: ' + thisItem.data('line-height-1280') + ' !important;'; } if (typeof thisItem.data('line-height-1024') !== 'undefined' && thisItem.data('line-height-1024') !== false) { ipadLandscapeStyle += 'line-height: ' + thisItem.data('line-height-1024') + ' !important;'; } if (typeof thisItem.data('line-height-768') !== 'undefined' && thisItem.data('line-height-768') !== false) { ipadPortraitStyle += 'line-height: ' + thisItem.data('line-height-768') + ' !important;'; } if (typeof thisItem.data('line-height-680') !== 'undefined' && thisItem.data('line-height-680') !== false) { mobileLandscapeStyle += 'line-height: ' + thisItem.data('line-height-680') + ' !important;'; } if (smallLaptopStyle.length || ipadLandscapeStyle.length || ipadPortraitStyle.length || mobileLandscapeStyle.length) { if (smallLaptopStyle.length) { responsiveStyle += "@media only screen and (max-width: 1280px) {.mkdf-custom-font-holder." + itemClass + " { " + smallLaptopStyle + " } }"; } if (ipadLandscapeStyle.length) { responsiveStyle += "@media only screen and (max-width: 1024px) {.mkdf-custom-font-holder." + itemClass + " { " + ipadLandscapeStyle + " } }"; } if (ipadPortraitStyle.length) { responsiveStyle += "@media only screen and (max-width: 768px) {.mkdf-custom-font-holder." + itemClass + " { " + ipadPortraitStyle + " } }"; } if (mobileLandscapeStyle.length) { responsiveStyle += "@media only screen and (max-width: 680px) {.mkdf-custom-font-holder." + itemClass + " { " + mobileLandscapeStyle + " } }"; } } if (responsiveStyle.length) { style = ''; } if (style.length) { $('head').append(style); } }); } } /* * Init Type out functionality for Custom Font shortcode */ function mkdfCustomFontTypeOut() { var mkdfTyped = $('.mkdf-cf-typed'); if (mkdfTyped.length) { mkdfTyped.each(function () { //vars var thisTyped = $(this), typedWrap = thisTyped.parent('.mkdf-cf-typed-wrap'), customFontHolder = typedWrap.parent('.mkdf-custom-font-holder'), str = [], string_1 = thisTyped.find('.mkdf-cf-typed-1').text(), string_2 = thisTyped.find('.mkdf-cf-typed-2').text(), string_3 = thisTyped.find('.mkdf-cf-typed-3').text(), string_4 = thisTyped.find('.mkdf-cf-typed-4').text(); if (string_1.length) { str.push(string_1); } if (string_2.length) { str.push(string_2); } if (string_3.length) { str.push(string_3); } if (string_4.length) { str.push(string_4); } customFontHolder.appear(function () { thisTyped.typed({ strings: str, typeSpeed: 90, backDelay: 700, loop: true, contentType: 'text', loopCount: false, cursorChar: '_' }); }, {accX: 0, accY: mkdfGlobalVars.vars.mkdfElementAppearAmount}); }); } } })(jQuery); (function($) { 'use strict'; var elementsHolder = {}; mkdf.modules.elementsHolder = elementsHolder; elementsHolder.mkdfInitElementsHolderResponsiveStyle = mkdfInitElementsHolderResponsiveStyle; elementsHolder.mkdfOnDocumentReady = mkdfOnDocumentReady; $(document).ready(mkdfOnDocumentReady); /* All functions to be called on $(document).ready() should be in this function */ function mkdfOnDocumentReady() { mkdfInitElementsHolderResponsiveStyle(); } /* ** Elements Holder responsive style */ function mkdfInitElementsHolderResponsiveStyle(){ var elementsHolder = $('.mkdf-elements-holder'); if(elementsHolder.length){ elementsHolder.each(function() { var thisElementsHolder = $(this), elementsHolderItem = thisElementsHolder.children('.mkdf-eh-item'), style = '', responsiveStyle = ''; elementsHolderItem.each(function() { var thisItem = $(this), itemClass = '', largeLaptop = '', smallLaptop = '', ipadLandscape = '', ipadPortrait = '', mobileLandscape = '', mobilePortrait = ''; if (typeof thisItem.data('item-class') !== 'undefined' && thisItem.data('item-class') !== false) { itemClass = thisItem.data('item-class'); } if (typeof thisItem.data('1280-1600') !== 'undefined' && thisItem.data('1280-1600') !== false) { largeLaptop = thisItem.data('1280-1600'); } if (typeof thisItem.data('1024-1280') !== 'undefined' && thisItem.data('1024-1280') !== false) { smallLaptop = thisItem.data('1024-1280'); } if (typeof thisItem.data('768-1024') !== 'undefined' && thisItem.data('768-1024') !== false) { ipadLandscape = thisItem.data('768-1024'); } if (typeof thisItem.data('680-768') !== 'undefined' && thisItem.data('680-768') !== false) { ipadPortrait = thisItem.data('680-768'); } if (typeof thisItem.data('680') !== 'undefined' && thisItem.data('680') !== false) { mobileLandscape = thisItem.data('680'); } if(largeLaptop.length || smallLaptop.length || ipadLandscape.length || ipadPortrait.length || mobileLandscape.length || mobilePortrait.length) { if(largeLaptop.length) { responsiveStyle += "@media only screen and (min-width: 1281px) and (max-width: 1600px) {.mkdf-eh-item-content."+itemClass+" { padding: "+largeLaptop+" !important; } }"; } if(smallLaptop.length) { responsiveStyle += "@media only screen and (min-width: 1025px) and (max-width: 1280px) {.mkdf-eh-item-content."+itemClass+" { padding: "+smallLaptop+" !important; } }"; } if(ipadLandscape.length) { responsiveStyle += "@media only screen and (min-width: 769px) and (max-width: 1024px) {.mkdf-eh-item-content."+itemClass+" { padding: "+ipadLandscape+" !important; } }"; } if(ipadPortrait.length) { responsiveStyle += "@media only screen and (min-width: 681px) and (max-width: 768px) {.mkdf-eh-item-content."+itemClass+" { padding: "+ipadPortrait+" !important; } }"; } if(mobileLandscape.length) { responsiveStyle += "@media only screen and (max-width: 680px) {.mkdf-eh-item-content."+itemClass+" { padding: "+mobileLandscape+" !important; } }"; } } }); if(responsiveStyle.length) { style = ''; } if(style.length) { $('head').append(style); } if (typeof mkdf.modules.common.mkdfOwlSlider === "function") { mkdf.modules.common.mkdfOwlSlider(); } }); } } })(jQuery); (function($) { 'use strict'; var expandedGallery = {}; mkdf.modules.expandedGallery = expandedGallery; expandedGallery.mkdfInitExpandedGallery = mkdfInitExpandedGallery; expandedGallery.mkdfOnDocumentReady = mkdfOnDocumentReady; $(document).ready(mkdfOnDocumentReady); /* All functions to be called on $(document).ready() should be in this function */ function mkdfOnDocumentReady() { mkdfInitExpandedGallery(); } /* ** Init Expanded Gallery shortcode */ function mkdfInitExpandedGallery(){ var holder = $('.mkdf-expanded-gallery'); if(holder.length){ holder.each(function() { var thisHolder = $(this), thisHolderImages = thisHolder.find('.mkdf-eg-image'); thisHolder.find('.mkdf-eg-image:nth-child('+Math.ceil(thisHolderImages.length / 2)+')').addClass('mkdf-eg-middle-item'); thisHolder.appear(function() { thisHolder.find('.mkdf-eg-middle-item').addClass('mkdf-eg-show'); setTimeout(function(){ thisHolder.find('.mkdf-eg-middle-item').prev().addClass('mkdf-eg-show'); thisHolder.find('.mkdf-eg-middle-item').next().addClass('mkdf-eg-show'); },250); if (thisHolder.hasClass('mkdf-eg-five')) { setTimeout(function(){ thisHolder.find('.mkdf-eg-middle-item').prev().prev().addClass('mkdf-eg-show'); thisHolder.find('.mkdf-eg-middle-item').next().next().addClass('mkdf-eg-show'); },500); } }, {accX: 0, accY: mkdfGlobalVars.vars.mkdfElementAppearAmount}); }); } } })(jQuery); (function($) { 'use strict'; var googleMap = {}; mkdf.modules.googleMap = googleMap; googleMap.mkdfShowGoogleMap = mkdfShowGoogleMap; googleMap.mkdfOnDocumentReady = mkdfOnDocumentReady; $(document).ready(mkdfOnDocumentReady); /* All functions to be called on $(document).ready() should be in this function */ function mkdfOnDocumentReady() { mkdfShowGoogleMap(); } /* ** Show Google Map */ function mkdfShowGoogleMap(){ var googleMap = $('.mkdf-google-map'); if(googleMap.length){ googleMap.each(function(){ var element = $(this); var predefinedStyle = false; if(typeof element.data('predefined-style') !== 'undefined' && element.data('predefined-style') === 'yes') { predefinedStyle = true; } var customMapStyle; if(typeof element.data('custom-map-style') !== 'undefined') { customMapStyle = element.data('custom-map-style'); } var colorOverlay; if(typeof element.data('color-overlay') !== 'undefined' && element.data('color-overlay') !== false) { colorOverlay = element.data('color-overlay'); } var saturation; if(typeof element.data('saturation') !== 'undefined' && element.data('saturation') !== false) { saturation = element.data('saturation'); } var lightness; if(typeof element.data('lightness') !== 'undefined' && element.data('lightness') !== false) { lightness = element.data('lightness'); } var zoom; if(typeof element.data('zoom') !== 'undefined' && element.data('zoom') !== false) { zoom = element.data('zoom'); } var pin; if(typeof element.data('pin') !== 'undefined' && element.data('pin') !== false) { pin = element.data('pin'); } var mapHeight; if(typeof element.data('height') !== 'undefined' && element.data('height') !== false) { mapHeight = element.data('height'); } var uniqueId; if(typeof element.data('unique-id') !== 'undefined' && element.data('unique-id') !== false) { uniqueId = element.data('unique-id'); } var scrollWheel; if(typeof element.data('scroll-wheel') !== 'undefined') { scrollWheel = element.data('scroll-wheel'); } var addresses; if(typeof element.data('addresses') !== 'undefined' && element.data('addresses') !== false) { addresses = element.data('addresses'); } var map = "map_"+ uniqueId; var geocoder = "geocoder_"+ uniqueId; var holderId = "mkdf-map-"+ uniqueId; mkdfInitializeGoogleMap(predefinedStyle, customMapStyle, colorOverlay, saturation, lightness, scrollWheel, zoom, holderId, mapHeight, pin, map, geocoder, addresses); }); } } /* ** Init Google Map */ function mkdfInitializeGoogleMap(predefinedStyle, customMapStyle, color, saturation, lightness, wheel, zoom, holderId, height, pin, map, geocoder, data){ if(typeof google !== 'object') { return; } var mapStyles = []; if(predefinedStyle) { mapStyles = [ { "featureType": "administrative", "elementType": "labels.text.fill", "stylers": [ { "color": "#444444" } ] }, { "featureType": "landscape", "elementType": "all", "stylers": [ { "color": "#f2f2f2" } ] }, { "featureType": "landscape", "elementType": "geometry.fill", "stylers": [ { "saturation": "23" }, { "color": "#ffffff" }, { "visibility": "on" } ] }, { "featureType": "landscape", "elementType": "geometry.stroke", "stylers": [ { "visibility": "on" } ] }, { "featureType": "landscape", "elementType": "labels.text", "stylers": [ { "visibility": "on" } ] }, { "featureType": "landscape", "elementType": "labels.text.fill", "stylers": [ { "color": "#8396d7" } ] }, { "featureType": "landscape", "elementType": "labels.text.stroke", "stylers": [ { "hue": "#ff0000" }, { "visibility": "off" } ] }, { "featureType": "poi", "elementType": "all", "stylers": [ { "visibility": "off" } ] }, { "featureType": "road", "elementType": "all", "stylers": [ { "saturation": -100 }, { "lightness": 45 } ] }, { "featureType": "road", "elementType": "geometry.fill", "stylers": [ { "color": "#efe0c3" }, { "visibility": "on" } ] }, { "featureType": "road", "elementType": "labels.text.fill", "stylers": [ { "color": "#85a1ca" }, { "visibility": "on" } ] }, { "featureType": "road", "elementType": "labels.icon", "stylers": [ { "invert_lightness": true } ] }, { "featureType": "road.highway", "elementType": "labels", "stylers": [ { "visibility": "on" } ] }, { "featureType": "road.highway", "elementType": "labels.icon", "stylers": [ { "invert_lightness": true } ] }, { "featureType": "road.arterial", "elementType": "labels.icon", "stylers": [ { "visibility": "off" } ] }, { "featureType": "transit", "elementType": "all", "stylers": [ { "visibility": "off" } ] }, { "featureType": "water", "elementType": "all", "stylers": [ { "color": "#c9e4f3" }, { "visibility": "on" } ] } ]; } else { mapStyles = [ { stylers: [ {hue: color }, {saturation: saturation}, {lightness: lightness}, {gamma: 1} ] } ]; } var googleMapStyleId; if(predefinedStyle || customMapStyle === 'yes'){ googleMapStyleId = 'mkdf-style'; } else { googleMapStyleId = google.maps.MapTypeId.ROADMAP; } if(wheel === 'yes'){ wheel = true; } else { wheel = false; } var qoogleMapType = new google.maps.StyledMapType(mapStyles, {name: "Mikado Google Map"}); geocoder = new google.maps.Geocoder(); var latlng = new google.maps.LatLng(-34.397, 150.644); if (!isNaN(height)){ height = height + 'px'; } var myOptions = { zoom: zoom, scrollwheel: wheel, center: latlng, zoomControl: true, zoomControlOptions: { style: google.maps.ZoomControlStyle.SMALL, position: google.maps.ControlPosition.RIGHT_CENTER }, scaleControl: false, scaleControlOptions: { position: google.maps.ControlPosition.LEFT_CENTER }, streetViewControl: false, streetViewControlOptions: { position: google.maps.ControlPosition.LEFT_CENTER }, panControl: false, panControlOptions: { position: google.maps.ControlPosition.LEFT_CENTER }, mapTypeControl: false, mapTypeControlOptions: { mapTypeIds: [google.maps.MapTypeId.ROADMAP, 'mkdf-style'], style: google.maps.MapTypeControlStyle.HORIZONTAL_BAR, position: google.maps.ControlPosition.LEFT_CENTER }, mapTypeId: googleMapStyleId }; map = new google.maps.Map(document.getElementById(holderId), myOptions); map.mapTypes.set('mkdf-style', qoogleMapType); var index; for (index = 0; index < data.length; ++index) { mkdfInitializeGoogleAddress(data[index], pin, map, geocoder); } var holderElement = document.getElementById(holderId); holderElement.style.height = height; } /* ** Init Google Map Addresses */ function mkdfInitializeGoogleAddress(data, pin, map, geocoder){ if (data === '') { return; } var contentString = '
'+ '
'+ '
'+ '
'+ '

'+data+'

'+ '
'+ '
'; var infowindow = new google.maps.InfoWindow({ content: contentString }); geocoder.geocode( { 'address': data}, function(results, status) { if (status === google.maps.GeocoderStatus.OK) { map.setCenter(results[0].geometry.location); var marker = new google.maps.Marker({ map: map, position: results[0].geometry.location, icon: pin, title: data.store_title }); google.maps.event.addListener(marker, 'click', function() { infowindow.open(map,marker); }); google.maps.event.addDomListener(window, 'resize', function() { map.setCenter(results[0].geometry.location); }); } }); } })(jQuery); (function($) { 'use strict'; var hidingImages = {}; mkdf.modules.hidingImages = hidingImages; hidingImages.mkdfInitHidingImages = mkdfInitHidingImages; hidingImages.mkdfOnDocumentReady = mkdfOnDocumentReady; $(document).ready(mkdfOnDocumentReady); /* ** All functions to be called on $(document).ready() should be in this function */ function mkdfOnDocumentReady() { mkdfInitHidingImages(); } function mkdfInitHidingImages() { var containers = $('.mkdf-hiding-images'); if (containers.length && !mkdf.htmlEl.hasClass('touch')) { containers.appear(function(){ var container = $(this); container.waitForImages(function(){ container.addClass('mkdf-appeared'); }); },{accX: 0, accY: mkdfGlobalVars.vars.mkdfElementAppearAmount}); } } })(jQuery); (function($) { 'use strict'; var icon = {}; mkdf.modules.icon = icon; icon.mkdfIcon = mkdfIcon; icon.mkdfOnDocumentReady = mkdfOnDocumentReady; $(document).ready(mkdfOnDocumentReady); /* All functions to be called on $(document).ready() should be in this function */ function mkdfOnDocumentReady() { mkdfIcon().init(); } /** * Object that represents icon shortcode * @returns {{init: Function}} function that initializes icon's functionality */ var mkdfIcon = function() { var icons = $('.mkdf-icon-shortcode'); /** * Function that triggers icon animation and icon animation delay */ var iconAnimation = function(icon) { if(icon.hasClass('mkdf-icon-animation')) { icon.appear(function() { icon.parent('.mkdf-icon-animation-holder').addClass('mkdf-icon-animation-show'); }, {accX: 0, accY: mkdfGlobalVars.vars.mkdfElementAppearAmount}); } }; /** * Function that triggers icon hover color functionality */ var iconHoverColor = function(icon) { if(typeof icon.data('hover-color') !== 'undefined') { var changeIconColor = function(event) { event.data.icon.css('color', event.data.color); }; var iconElement = icon.find('.mkdf-icon-element'); var hoverColor = icon.data('hover-color'); var originalColor = iconElement.css('color'); if(hoverColor !== '') { icon.on('mouseenter', {icon: iconElement, color: hoverColor}, changeIconColor); icon.on('mouseleave', {icon: iconElement, color: originalColor}, changeIconColor); } } }; /** * Function that triggers icon holder background color hover functionality */ var iconHolderBackgroundHover = function(icon) { if(typeof icon.data('hover-background-color') !== 'undefined') { var changeIconBgColor = function(event) { event.data.icon.css('background-color', event.data.color); }; var hoverBackgroundColor = icon.data('hover-background-color'); var originalBackgroundColor = icon.css('background-color'); if(hoverBackgroundColor !== '') { icon.on('mouseenter', {icon: icon, color: hoverBackgroundColor}, changeIconBgColor); icon.on('mouseleave', {icon: icon, color: originalBackgroundColor}, changeIconBgColor); } } }; /** * Function that initializes icon holder border hover functionality */ var iconHolderBorderHover = function(icon) { if(typeof icon.data('hover-border-color') !== 'undefined') { var changeIconBorder = function(event) { event.data.icon.css('border-color', event.data.color); }; var hoverBorderColor = icon.data('hover-border-color'); var originalBorderColor = icon.css('borderTopColor'); if(hoverBorderColor !== '') { icon.on('mouseenter', {icon: icon, color: hoverBorderColor}, changeIconBorder); icon.on('mouseleave', {icon: icon, color: originalBorderColor}, changeIconBorder); } } }; return { init: function() { if(icons.length) { icons.each(function() { iconAnimation($(this)); iconHoverColor($(this)); iconHolderBackgroundHover($(this)); iconHolderBorderHover($(this)); }); } } }; }; })(jQuery); (function($) { 'use strict'; var iconListItem = {}; mkdf.modules.iconListItem = iconListItem; iconListItem.mkdfInitIconList = mkdfInitIconList; iconListItem.mkdfOnDocumentReady = mkdfOnDocumentReady; $(document).ready(mkdfOnDocumentReady); /* All functions to be called on $(document).ready() should be in this function */ function mkdfOnDocumentReady() { mkdfInitIconList().init(); } /** * Button object that initializes icon list with animation * @type {Function} */ var mkdfInitIconList = function() { var iconList = $('.mkdf-animate-list'); /** * Initializes icon list animation * @param list current slider */ var iconListInit = function(list) { setTimeout(function(){ list.appear(function(){ list.addClass('mkdf-appeared'); },{accX: 0, accY: mkdfGlobalVars.vars.mkdfElementAppearAmount}); },30); }; return { init: function() { if(iconList.length) { iconList.each(function() { iconListInit($(this)); }); } } }; }; })(jQuery); (function($) { 'use strict'; var imageGallery = {}; mkdf.modules.imageGallery = imageGallery; imageGallery.mkdfInitImageGalleryMasonry = mkdfInitImageGalleryMasonry; imageGallery.mkdfOnWindowLoad = mkdfOnWindowLoad; $(window).on('load', mkdfOnWindowLoad); /* ** All functions to be called on $(window).load() should be in this function */ function mkdfOnWindowLoad() { mkdfInitImageGalleryMasonry(); } /* ** Init Image Gallery shortcode - Masonry layout */ function mkdfInitImageGalleryMasonry(){ var holder = $('.mkdf-image-gallery.mkdf-ig-masonry-type'); if(holder.length){ holder.each(function(){ var thisHolder = $(this), masonry = thisHolder.find('.mkdf-ig-masonry'); masonry.waitForImages(function() { masonry.isotope({ layoutMode: 'packery', itemSelector: '.mkdf-ig-image', percentPosition: true, packery: { gutter: '.mkdf-ig-grid-gutter', columnWidth: '.mkdf-ig-grid-sizer' } }); setTimeout(function() { masonry.isotope('layout'); mkdf.modules.common.mkdfInitParallax(); }, 800); masonry.css('opacity', '1'); }); }); } } })(jQuery); (function($) { 'use strict'; var imageMarquee = {}; mkdf.modules.imageMarquee = imageMarquee; imageMarquee.mkdfInitimageMarquee = mkdfInitimageMarquee; imageMarquee.mkdfOnDocumentReady = mkdfOnDocumentReady; $(document).ready(mkdfOnDocumentReady); /* All functions to be called on $(document).ready() should be in this function */ function mkdfOnDocumentReady() { mkdfInitimageMarquee(); } /** * Init Text Marquee effect */ function mkdfInitimageMarquee() { var imageMarqueeShortcodes = $('.mkdf-image-marquee'); if (imageMarqueeShortcodes.length) { imageMarqueeShortcodes.each(function(){ var imageMarqueeShortcode = $(this), marqueeElements = imageMarqueeShortcode.find('.mkdf-image'), originalItem = marqueeElements.filter('.mkdf-original'), auxItem = marqueeElements.filter('.mkdf-aux'); var marqueeEffect = function () { mkdfRequestAnimationFrame(); var delta = 1, //pixel movement speedCoeff = 0.8, // below 1 to slow down, above 1 to speed up marqueeWidth = originalItem.width(); auxItem.css('width', marqueeWidth); //same width as the initial marquee element auxItem.css('left', marqueeWidth); //set to the right of the initial marquee element //movement loop marqueeElements.each(function(i){ var marqueeElement = $(this), currentPos = 0; var mkdfInfiniteScrollEffect = function() { currentPos -= delta; //move marquee element if (marqueeElement.position().left <= -marqueeWidth) { marqueeElement.css('left', parseInt(marqueeWidth - delta)); currentPos = 0; } marqueeElement.css('transform','translate3d('+speedCoeff*currentPos+'px,0,0)'); requestNextAnimationFrame(mkdfInfiniteScrollEffect); $(window).resize(function(){ marqueeWidth = originalItem.width(); currentPos = 0; originalItem.css('left',0); // reset auxItem.css('width', marqueeWidth); //same width as the initial marquee element auxItem.css('left', marqueeWidth); //set to the right of the inital marquee element }); }; mkdfInfiniteScrollEffect(); }); }; imageMarqueeShortcode.waitForImages(function(){ marqueeEffect(); }); }); } } /* * Request Animation Frame shim */ function mkdfRequestAnimationFrame() { window.requestNextAnimationFrame = (function () { var originalWebkitRequestAnimationFrame, wrapper, callback, geckoVersion = 0, userAgent = navigator.userAgent, index = 0, self = this; // Workaround for Chrome 10 bug where Chrome // does not pass the time to the animation function if (window.webkitRequestAnimationFrame) { // Define the wrapper wrapper = function (time) { if (time === undefined) { time = +new Date(); } self.callback(time); }; // Make the switch originalWebkitRequestAnimationFrame = window.webkitRequestAnimationFrame; window.webkitRequestAnimationFrame = function (callback, element) { self.callback = callback; // Browser calls the wrapper and wrapper calls the callback originalWebkitRequestAnimationFrame(wrapper, element); }; } // Workaround for Gecko 2.0, which has a bug in // mozRequestAnimationFrame() that restricts animations // to 30-40 fps. if (window.mozRequestAnimationFrame) { // Check the Gecko version. Gecko is used by browsers // other than Firefox. Gecko 2.0 corresponds to // Firefox 4.0. index = userAgent.indexOf('rv:'); if (userAgent.indexOf('Gecko') !== -1) { geckoVersion = userAgent.substr(index + 3, 3); if (geckoVersion === '2.0') { // Forces the return statement to fall through // to the setTimeout() function. window.mozRequestAnimationFrame = undefined; } } } return window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.oRequestAnimationFrame || window.msRequestAnimationFrame || function (callback, element) { var start, finish; window.setTimeout( function () { start = +new Date(); callback(start); finish = +new Date(); self.timeout = 1000 / 60 - (finish - start); }, self.timeout); }; } )(); } })(jQuery); (function($) { 'use strict'; var pieChart = {}; mkdf.modules.pieChart = pieChart; pieChart.mkdfInitPieChart = mkdfInitPieChart; pieChart.mkdfOnDocumentReady = mkdfOnDocumentReady; $(document).ready(mkdfOnDocumentReady); /* All functions to be called on $(document).ready() should be in this function */ function mkdfOnDocumentReady() { mkdfInitPieChart(); } /** * Init Pie Chart shortcode */ function mkdfInitPieChart() { var pieChartHolder = $('.mkdf-pie-chart-holder'); if (pieChartHolder.length) { pieChartHolder.each(function () { var thisPieChartHolder = $(this), pieChart = thisPieChartHolder.children('.mkdf-pc-percentage'), barColor = '#25abd1', trackColor = '#f7f7f7', lineWidth = 3, size = 176; if(typeof pieChart.data('size') !== 'undefined' && pieChart.data('size') !== '') { size = pieChart.data('size'); } if(typeof pieChart.data('bar-color') !== 'undefined' && pieChart.data('bar-color') !== '') { barColor = pieChart.data('bar-color'); } if(typeof pieChart.data('track-color') !== 'undefined' && pieChart.data('track-color') !== '') { trackColor = pieChart.data('track-color'); } pieChart.appear(function() { initToCounterPieChart(pieChart); thisPieChartHolder.css('opacity', '1'); pieChart.easyPieChart({ barColor: barColor, trackColor: trackColor, scaleColor: false, lineCap: 'butt', lineWidth: lineWidth, animate: 1500, size: size }); },{accX: 0, accY: mkdfGlobalVars.vars.mkdfElementAppearAmount}); }); } } /* ** Counter for pie chart number from zero to defined number */ function initToCounterPieChart(pieChart){ var counter = pieChart.find('.mkdf-pc-percent'), max = parseFloat(counter.text()); counter.countTo({ from: 0, to: max, speed: 1500, refreshInterval: 50 }); } })(jQuery); (function($) { 'use strict'; var process = {}; mkdf.modules.process = process; process.mkdfInitProcess = mkdfInitProcess; process.mkdfOnDocumentReady = mkdfOnDocumentReady; $(document).ready(mkdfOnDocumentReady); /* All functions to be called on $(document).ready() should be in this function */ function mkdfOnDocumentReady() { mkdfInitProcess(); } /** * Inti process shortcode on appear */ function mkdfInitProcess() { var holder = $('.mkdf-process-holder'); if(holder.length) { holder.each(function(){ var thisHolder = $(this); thisHolder.appear(function(){ thisHolder.addClass('mkdf-process-appeared'); },{accX: 0, accY: mkdfGlobalVars.vars.mkdfElementAppearAmount}); }); } } })(jQuery); (function($) { 'use strict'; var progressBar = {}; mkdf.modules.progressBar = progressBar; progressBar.mkdfInitProgressBars = mkdfInitProgressBars; progressBar.mkdfOnDocumentReady = mkdfOnDocumentReady; $(document).ready(mkdfOnDocumentReady); /* All functions to be called on $(document).ready() should be in this function */ function mkdfOnDocumentReady() { mkdfInitProgressBars(); } /* ** Horizontal progress bars shortcode */ function mkdfInitProgressBars(){ var progressBar = $('.mkdf-progress-bar'); if(progressBar.length){ progressBar.each(function() { var thisBar = $(this), thisBarContent = thisBar.find('.mkdf-pb-content'), percentage = thisBarContent.data('percentage'); thisBar.appear(function() { mkdfInitToCounterProgressBar(thisBar, percentage); thisBarContent.css('width', '0%'); thisBarContent.animate({'width': percentage+'%'}, 2000); }); }); } } /* ** Counter for horizontal progress bars percent from zero to defined percent */ function mkdfInitToCounterProgressBar(progressBar, $percentage){ var percentage = parseFloat($percentage), percent = progressBar.find('.mkdf-pb-percent'); if(percent.length) { percent.each(function() { var thisPercent = $(this); thisPercent.css('opacity', '1'); thisPercent.countTo({ from: 0, to: percentage, speed: 2000, refreshInterval: 50 }); }); } } })(jQuery); (function($) { 'use strict'; var tabs = {}; mkdf.modules.tabs = tabs; tabs.mkdfInitTabs = mkdfInitTabs; tabs.mkdfOnDocumentReady = mkdfOnDocumentReady; $(document).ready(mkdfOnDocumentReady); /* All functions to be called on $(document).ready() should be in this function */ function mkdfOnDocumentReady() { mkdfInitTabs(); } /* ** Init tabs shortcode */ function mkdfInitTabs(){ var tabs = $('.mkdf-tabs'); if(tabs.length){ tabs.each(function(){ var thisTabs = $(this); thisTabs.children('.mkdf-tab-container').each(function(index){ index = index + 1; var that = $(this), link = that.attr('id'), navItem = that.parent().find('.mkdf-tabs-nav li:nth-child('+index+') a'), navLink = navItem.attr('href'); link = '#'+link; if(link.indexOf(navLink) > -1) { navItem.attr('href',link); } }); thisTabs.tabs(); $('.mkdf-tabs a.mkdf-external-link').off('click'); }); } } })(jQuery); (function($) { 'use strict'; var workflow = {}; mkdf.modules.workflow = workflow; workflow.mkdfWorkflow = mkdfWorkflow; workflow.mkdfOnDocumentReady = mkdfOnDocumentReady; $(document).ready(mkdfOnDocumentReady); /* All functions to be called on $(document).ready() should be in this function */ function mkdfOnDocumentReady() { mkdfWorkflow(); } /* * Animate Workflow shortcode */ function mkdfWorkflow() { var workflowShortcodes = $('.mkdf-workflow'); if (workflowShortcodes.length) { workflowShortcodes.each(function () { var workflowShortcode = $(this); if (workflowShortcode.hasClass('mkdf-workflow-animate')) { var workflowItems = workflowShortcode.find('.mkdf-workflow-item'); workflowShortcode.appear(function () { workflowShortcode.addClass('mkdf-appeared'); }, {accX: 0, accY: mkdfGlobalVars.vars.mkdfElementAppearAmount}); workflowItems.each(function (i) { var workflowItem = $(this); workflowItem.appear(function () { setTimeout(function(){ workflowItem.addClass('mkdf-appeared'); },100); }); }, {accX: 0, accY: mkdfGlobalVars.vars.mkdfElementAppearAmount}); } }); } } })(jQuery);