jQuery(document).ready(function($) { 'use strict'; //*************************** // Sticky Header Function //*************************** jQuery(window).scroll(function() { if (jQuery(this).scrollTop() > 170){ jQuery('body').addClass("ec-sticky"); } else{ jQuery('body').removeClass("ec-sticky"); } }); //*************************** // Silk Slider Functions //*************************** jQuery('.wm-category-slide').slick({ slidesToShow: 12, slidesToScroll: 1, autoplay: true, autoplaySpeed: 2000, infinite: true, prevArrow: "", nextArrow: "", responsive: [ { breakpoint: 1024, settings: { slidesToShow: 7, slidesToScroll: 1, infinite: true, } }, { breakpoint: 800, settings: { slidesToShow: 4, slidesToScroll: 1 } }, { breakpoint: 400, settings: { slidesToShow: 1, slidesToScroll: 1 } } ] }); jQuery('.wm-listing-slider').slick({ slidesToShow: 6, slidesToScroll: 1, autoplay: true, autoplaySpeed: 2000, infinite: true, prevArrow: "", nextArrow: "", responsive: [ { breakpoint: 1024, settings: { slidesToShow: 3, slidesToScroll: 1, infinite: true, } }, { breakpoint: 800, settings: { slidesToShow: 2, slidesToScroll: 1 } }, { breakpoint: 400, settings: { slidesToShow: 1, slidesToScroll: 1 } } ] }); jQuery('.wm-testimonial-slider').slick({ slidesToShow: 1, slidesToScroll: 1, autoplay: true, autoplaySpeed: 2000, infinite: true, fade: true, prevArrow: "", nextArrow: "", responsive: [ { breakpoint: 1024, settings: { slidesToShow: 1, slidesToScroll: 1, infinite: true, } }, { breakpoint: 800, settings: { slidesToShow: 1, slidesToScroll: 1 } }, { breakpoint: 400, settings: { slidesToShow: 1, slidesToScroll: 1 } } ] }); jQuery('.wm-banner').slick({ slidesToShow: 1, slidesToScroll: 1, autoplay: true, autoplaySpeed: 2000, infinite: true, fade: true, dots: true, arrows: false, responsive: [ { breakpoint: 1024, settings: { slidesToShow: 1, slidesToScroll: 1, infinite: true, } }, { breakpoint: 800, settings: { slidesToShow: 1, slidesToScroll: 1 } }, { breakpoint: 400, settings: { slidesToShow: 1, slidesToScroll: 1 } } ] }); jQuery('.wm-partner-widget-slider').slick({ slidesToShow: 3, slidesToScroll: 1, autoplay: true, autoplaySpeed: 2000, infinite: true, arrows: true, vertical: true, prevArrow: "", nextArrow: "", }); jQuery('.wm-listing-detail-slider').slick({ slidesToShow: 1, slidesToScroll: 1, autoplay: true, autoplaySpeed: 2000, infinite: true, fade: true, prevArrow: "", nextArrow: "", responsive: [ { breakpoint: 1024, settings: { slidesToShow: 1, slidesToScroll: 1, infinite: true, } }, { breakpoint: 800, settings: { slidesToShow: 1, slidesToScroll: 1 } }, { breakpoint: 400, settings: { slidesToShow: 1, slidesToScroll: 1 } } ] }); //*************************** // Click to Top Button //*************************** jQuery('.backtop-btn').on("click", function() { jQuery('html, body').animate({ scrollTop: 0 }, 800); return false; }); //*************************** // Countdown Function //*************************** jQuery(function() { var austDay = new Date(); austDay = new Date(austDay.getFullYear() + 1, 1 - 1, 26); jQuery('#ec-Countdown').countdown({ until: austDay }); jQuery('#year').text(austDay.getFullYear()); }); //*************************** // PrettyPhoto Function //*************************** jQuery("area[data-rel^='prettyPhoto']").prettyPhoto(); jQuery(".gallery:first a[data-rel^='prettyPhoto']").prettyPhoto({ animation_speed: 'normal', theme: 'pp_default', social_tools: '', slideshow: 3000, autoplay_slideshow: true }); jQuery(".gallery:gt(0) a[data-rel^='prettyPhoto']").prettyPhoto({ animation_speed: 'fast', slideshow: 10000, hideflash: true }); jQuery("#custom_content a[data-rel^='prettyPhoto']:first").prettyPhoto({ custom_markup: '
', changepicturecallback: function() { initialize(); } }); jQuery("#custom_content a[data-rel^='prettyPhoto']:last").prettyPhoto({ custom_markup: '
', changepicturecallback: function() { _bsap.exec(); } }); //*************************** // Responsive Video Function //*************************** jQuery(".wm-main-section").fitVids(); jQuery('[data-toggle="tooltip"]').tooltip(); //*************************** // Our Partner Function //*************************** var type = 1, //circle type - 1 whole, 0.5 half, 0.25 quarter radius = '24em', //distance from center start = -90, //shift start from 0 $elements = $('.wm-partner-chian li:not(:first-child)'), numberOfElements = (type === 1) ? $elements.length : $elements.length - 1, //adj for even distro of elements when not full circle slice = 360 * type / numberOfElements; $elements.each(function(i) { var $self = $(this), rotate = slice * i + start, rotateReverse = rotate * -1; $self.css({ 'transform': 'rotate(' + rotate + 'deg) translate(' + radius + ') rotate(' + rotateReverse + 'deg)' }); }); }); //*************************** // Google Map Function //*************************** var script = '