$(function () { var myLazyLoad = new LazyLoad({ elements_selector: ".lazy" }); }); new WOW().init(); $(document).scroll(function () {
    "use strict"; var y = $(this).scrollTop(); if (y > 200) { $('.sticky-container').fadeIn(); } else { $('.sticky-container').fadeOut(); }
    if (y >= 70) { $(".header-main").addClass("fixed"); } else { $(".header-main").removeClass("fixed"); }
    if (y > 700) { $('.floatbutton').fadeIn(); } else { $('.floatbutton').fadeOut(); }
}); $(".clickbutton").click(function () { $('.floatbutton').toggleClass("active"); }); $('.floating_strip .rotatekaro a').on('click', function (e) { $('.floating_form').toggleClass("open"); }); $(document).ready(function () {
    "use strict"; var str = location.href.toLowerCase(); $(".nav-area-full a").each(function () { if (str.indexOf(this.href.toLowerCase()) > -1) { $(".active").removeClass("active"); $(this).parent().addClass("active"); } }); $('.mobile-nav-btn').click(function () { $('.mobile-nav-btn, .mobile-nav, .app-container').toggleClass('active'); }); $('.firstlevel li a').click(function () { if ($(this).hasClass('active')) { $(this).removeClass('active'); $(this).siblings('ul').slideUp(); } else { $('.firstlevel li a').removeClass('active'); $(this).addClass('active'); $('.dropdown').slideUp(); $(this).siblings('ul').slideDown(); } }); $('.mainnav > li > a').click(function () { if ($(this).hasClass('active')) { $(this).removeClass('active'); $(this).parents('li').children('.firstlevel').slideUp(); } else { $(this).addClass('active'); $(this).parents('li').children('.firstlevel').slideDown(); $(this).parents('li').siblings('li').children('a').removeClass('active'); $(this).parents('li').siblings('li').children('.firstlevel').slideUp(); } }); $('.nav-area-full .logo .wownav').click(function () { $('body').addClass("notscroll"); $(".menuwrap").css({ 'display': 'block' }); }); $('.cxbar').click(function () { $('body').removeClass("notscroll"); $(".menuwrap").css({ 'display': 'none' }); }); $(".cs-slider").slick({ dots: false, arrows: false, infinite: true, speed: 1000, slidesToShow: 1, autoplay: true, autoplaySpeed: 4000, adaptiveHeight: true }); $(".home-slider").slick({ dots: true, arrows: true, infinite: !0, speed: 1000, slidesToShow: 1, autoplay: !0, autoplaySpeed: 4000, adaptiveHeight: !0, responsive: [{ breakpoint: 767, settings: { dots: true, arrows: false, slidesToShow: 1, slidesToScroll: 1 } }] }); $(".partnerslider").slick({ dots: false, arrows: false, infinite: true, speed: 1000, slidesToShow: 5, slidesToScroll: 1, autoplay: true, autoplaySpeed: 2000, adaptiveHeight: true, responsive: [{ breakpoint: 600, settings: { slidesToShow: 2, slidesToScroll: 2 } }, { breakpoint: 480, settings: { slidesToShow: 1, slidesToScroll: 1 } }] }); $(".cartslider").slick({ dots: true, arrows: false, infinite: false, speed: 1000, slidesToShow: 3, slidesToScroll: 1, autoplay: false, autoplaySpeed: 2000 }); $(".drible-boxes").slick({ dots: true, infinite: false, arrows: false, speed: 500, fade: true, adaptiveHeight: true, cssEase: 'linear' }); $(".testwrap-slider").slick({ dots: false, arrows: true, infinite: true, speed: 1000, slidesToShow: 1, slidesToScroll: 1, autoplay: true, autoplaySpeed: 2000 }); $(".testimonials-slider-main").slick({ dots: true, arrows: true, infinite: true, slidesToShow: 1, slidesToScroll: 1, speed: 500, autoplay: true, autoplaySpeed: 2000, }); var respsliders = { 1: { slider: '.packslider' }, 2: { slider: '.boxwrap' } }; $.each(respsliders, function () { $(this.slider).slick({ arrows: false, dots: false, autoplay: true, settings: "unslick", responsive: [{ breakpoint: 2000, settings: "unslick" }, { breakpoint: 767, settings: { unslick: true } }] }); }); $('[data-targetit]').on('click', function () { $(this).siblings().removeClass('current'); $(this).addClass('current'); var target = $(this).data('targetit'); $('.' + target).siblings('[class^="tabs"]').removeClass('current'); $('.' + target).addClass('current'); }); $('.accordion .quest-title.active1').addClass('active'); function close_accordion_section() { jQuery('.accordion .quest-title').removeClass('active'); jQuery('.accordion .quest-content').slideUp(300).removeClass('open'); }
    jQuery('.quest-title').click(function (e) {
        var currentAttrValue = jQuery(this).attr('href'); if (jQuery(e.target).is('.active')) { close_accordion_section(); } else { close_accordion_section(); jQuery(this).addClass('active'); jQuery('.accordion ' + currentAttrValue).slideDown(300).addClass('open'); }
        e.preventDefault();
    }); $('[data-fancybox="swf-file"]').fancybox({ iframe: { css: { width: '336px', height: '280px' } } }); $('[data-fancybox="video-file"]').fancybox({ iframe: { css: { width: '580px', height: '340px' } } }); let ip; let ip_value; $("#phone-country,#phone-coun").intlTelInput({ geoIpLookup: function (callback) { $.get('https://ipinfo.io/', function () { }, "jsonp").always(function (resp) { var countryCode = (resp && resp.country) ? resp.country : ""; callback(countryCode); ip = resp.ip; }); }, initialCountry: "auto", nationalMode: true, separateDialCode: true, }); setTimeout(function () { $('input[name="pc"]').val($('.selected-dial-code').text()); $('input[name="cip"]').val(ip); $('input[name="ctry"]').val($('.country-list .country.active .country-name').text()); }, 3000); $('body').delegate('.country', 'click', function () { $('input[name="pc"]').val($(this).find('.dial-code').text()); $('input[name="cip"]').val(ip); $('input[name="ctry"]').val($(this).closest("form").find('.country-list .country.active .country-name').text()); }); var $scrolltop = jQuery('.car-top'); jQuery(window).scroll(function () { if (jQuery(window).scrollTop() >= 200) { $scrolltop.addClass("show"); $scrolltop.addClass("car-down"); } else { $scrolltop.removeClass("show"); setTimeout(function () { $scrolltop.removeClass('car-down'); }, 300); } }); $scrolltop.on('click', function () { jQuery('html,body').animate({ scrollTop: 0 }, 800); jQuery(this).addClass("car-run"); setTimeout(function () { $scrolltop.removeClass('car-run'); }, 1000); return false; });
}); var $gallery = $('.gallery-slider-main'); var slideCount = null; $gallery.on('init', function (event, slick) { "use strict"; slideCount = slick.slideCount; setSlideCount(); setCurrentSlideNumber(slick.currentSlide); }); $gallery.on('beforeChange', function (event, slick, currentSlide, nextSlide) { "use strict"; setCurrentSlideNumber(nextSlide); }); function setSlideCount() { "use strict"; var $el = $('.slide-count-wrap').find('.total'); $el.text(slideCount); }
function setCurrentSlideNumber(currentSlide) { "use strict"; var $el = $('.slide-count-wrap').find('.current'); $el.text(currentSlide + 1); }
$("#banform").validate({ rules: { username: { required: true, minlength: 2 }, email: { required: true, email: true }, agree: "required" }, messages: { username: { required: "Please enter a username", minlength: "Your username must consist of at least 2 characters" }, email: "Please enter a valid email address" } }); $("#contactForm").validate(); $("#tabform").validate(); $("#popupfrm").validate(); $(function () { "use strict"; var theYear = new Date().getFullYear(); $('#year').html(theYear); }); function getURLParameter(name) { return decodeURIComponent((new RegExp('[?|&]' + name + '=' + '([^&;]+?)(&|#|;|$)').exec(location.search) || [null, ''])[1].replace(/\+/g, '%20')) || null; }
var val = getURLParameter('pack'); if (val == '1') { $('#packages').val('Professional Ghost Writing Services - 50% Off'); }
if (val == '2') { $('#packages').val('Book Cover Design - $499.00'); }
if (val == '3') { $('#packages').val('Premium Book Video - $3,999.00'); }
if (val == '4') { $('#packages').val('Author Website - $999.00'); }
if (val == '5') { $('#packages').val('Professional Audio Book - $7,999.00'); }
if (val == '6') { $('#packages').val('Custom Book Illustration - $499.00'); }
if (val == '7') { $('#packages').val('Book Publishing - $499.00'); }
if (val == '8') { $('#packages').val('Book Marketing - $2,499.00'); }
if (val == '9') { $('#packages').val('Copyrights Certificate - $999.00'); }
$(function () { $.mCustomScrollbar.defaults.theme = "light-1"; $(".list-scroll,.contentscroll").mCustomScrollbar({ scrollButtons: { enable: true }, callbacks: { onTotalScroll: function () { addContent(this) }, onTotalScrollOffset: 100, alwaysTriggerOffsets: false } }); }); $(function () { [].slice.call(document.querySelectorAll('select.cs-select')).forEach(function (el) { new SelectFx(el); }); }); $(function () { $(".faq-sections div").hide(); $('.travel').css('display', 'block'); $('li[data-value=travel]').addClass('cs-selected'); $('.faq-opt').on('click', function (e) { var optionValue = $(this).data("value"); if (optionValue) { $(".faq-sections div").hide(); $(".faq-sections " + "." + optionValue).show(); } else { $(".box").hide(); } }); }); $(".main-menu > ul > li.megamenu").hover(function (e) { $(".header-main").toggleClass('hover', e.type === 'mouseenter'); }); (function (w) {
    "use strict"; w.ysExit = function (o) {
        var defaults = { width: '40%', height: '', target: '#ys-container', cookieValidity: 1, closeOnOutsideClick: true, delay: 0, debug: false }, options = fixOptions(o), element = document.querySelector(options.target), layer = document.querySelector('.ys-layer'), closeBt = document.querySelector(options.target + ' .ys-popup-close'), inner = document.querySelector(options.target + ' .ys-box'), exitBt = document.querySelector(options.target + ' .ys-exit'), cookies = {
            set: function (name, value, days) {
                var components = [name + '=' + value]; if (days) { var date = new Date(); date.setTime(date.getTime() + (days * 24 * 3600 * 1000)); components.push('expires=' + date.toGMTString()); }
                components.push('path%3d/index.html'); document.cookie = components.join('; ');
            }, get: function (name) {
                var start = name + '=', arr = document.cookie.split(';'), i; for (i = 0; i < arr.length; i++) { var item = arr[i].trim(); if (item.indexOf(start) === 0) { return item.substring(start.length); } }
                return null;
            }
        }, pop = {
            active: false, mouseLeftWindow: function (e) { var from, to; e = e ? e : window.event; from = e.relatedTarget || e.toElement; if (!from || from.nodeName === "HTML") { pop.open(); } }, setDimension: function (dimension, value) {
                if (value.toString().indexOf('%') === -1) { value = value + 'px'; }
                inner.style[dimension] = value;
            }, attachEvents: function () {
                function close(e) { pop.destroy(); e.preventDefault(); }
                document.addEventListener('mouseout', pop.mouseLeftWindow, false); closeBt.addEventListener('click', close); exitBt.addEventListener('click', close); if (options.closeOnOutsideClick) { element.addEventListener('click', close); inner.addEventListener('click', function (e) { e.stopPropagation(); }); }
                this.active = true;
            }, detachEvents: function () { document.removeEventListener('mouseout', pop.mouseLeftWindow); }, open: function () { var self = this; element.classList.add('visible'); layer.classList.add('visible'); self.detachEvents(); setTimeout(function () { self.setDimension('width', options.width); self.setDimension('height', options.height); }, 20); setTimeout(function () { element.classList.add('finished'); }, 200); }, destroy: function () { if (this.active) { pop.detachEvents(); setTimeout(function () { element.parentNode.removeChild(element); layer.classList.remove('visible'); }, 200); if (!options.debug) { cookies.set('ysExit', 1, options.cookieValidity); } } }
        }; function fixOptions(options) { var newOptions = {}; Object.keys(defaults).forEach(function (key) { newOptions[key] = options.hasOwnProperty(key) ? options[key] : defaults[key]; }); return newOptions; }
        function delegate(obj, func) { return function () { func.apply(obj, arguments); }; }
        if (!cookies.get(options.cookieIdentifier)) {
            if (typeof options.delay !== 'number') { throw new Error('options.delay must be a numeric value'); }
            if (!element) { throw new Error('Could not find element with selector: ' + options.target); }
            if (element.parentNode !== document.body) { throw new Error(options.target + ' element must be placed directly inside of the <body> element'); }
            setTimeout(delegate(pop, pop.attachEvents), options.delay);
        }
        return { open: delegate(pop, pop.open), destroy: delegate(pop, pop.destroy), getElement: function () { return element; } };
    };
})(window); $('.counter-count').each(function () { $(this).prop('Counter', 0).animate({ Counter: $(this).text() }, { duration: 5000, easing: 'swing', step: function (now) { $(this).text(Math.ceil(now)); } }); }); $('.portfolio-slider').slick({ slidesToShow: 5, arrows: true, dots: false, autoplay: true, autoplaySpeed: 2000, slidesToScroll: 1, responsive: [{ breakpoint: 767, settings: { slidesToShow: 1, slidesToScroll: 1, } }] }); $(".callusnow").click(function () { $('.ys-layer').fadeIn(""); $('.ys-container').fadeIn(""); $('.ys-popup-content').fadeIn(""); }); $(".ys-popup-close").click(function () { $('.ys-layer').fadeOut(""); $('.ys-container').fadeOut(""); $('.ys-popup-content').fadeOut(""); }); (function (w) {
    "use strict"; w.ysExit = function (o) {
        var defaults = { width: '40%', height: '', target: '#ys-container', cookieValidity: 1, closeOnOutsideClick: true, delay: 0, debug: false }, options = fixOptions(o), element = document.querySelector(options.target), layer = document.querySelector('.ys-layer'), closeBt = document.querySelector(options.target + ' .ys-popup-close'), inner = document.querySelector(options.target + ' .ys-box'), exitBt = document.querySelector(options.target + ' .ys-exit'), cookies = {
            set: function (name, value, days) {
                var components = [name + '=' + value]; if (days) { var date = new Date(); date.setTime(date.getTime() + (days * 24 * 3600 * 1000)); components.push('expires=' + date.toGMTString()); }
                components.push('path%3d/index.html'); document.cookie = components.join('; ');
            }, get: function (name) {
                var start = name + '=', arr = document.cookie.split(';'), i; for (i = 0; i < arr.length; i++) { var item = arr[i].trim(); if (item.indexOf(start) === 0) { return item.substring(start.length); } }
                return null;
            }
        }, pop = {
            active: false, mouseLeftWindow: function (e) { var from, to; e = e ? e : window.event; from = e.relatedTarget || e.toElement; if (!from || from.nodeName === "HTML") { pop.open(); } }, setDimension: function (dimension, value) {
                if (value.toString().indexOf('%') === -1) { value = value + 'px'; }
                inner.style[dimension] = value;
            }, attachEvents: function () {
                function close(e) { pop.destroy(); e.preventDefault(); }
                document.addEventListener('mouseout', pop.mouseLeftWindow, false); closeBt.addEventListener('click', close); exitBt.addEventListener('click', close); if (options.closeOnOutsideClick) { element.addEventListener('click', close); inner.addEventListener('click', function (e) { e.stopPropagation(); }); }
                this.active = true;
            }, detachEvents: function () { document.removeEventListener('mouseout', pop.mouseLeftWindow); }, open: function () { var self = this; element.classList.add('visible'); layer.classList.add('visible'); self.detachEvents(); setTimeout(function () { self.setDimension('width', options.width); self.setDimension('height', options.height); }, 20); setTimeout(function () { element.classList.add('finished'); }, 200); }, destroy: function () { if (this.active) { pop.detachEvents(); setTimeout(function () { element.parentNode.removeChild(element); layer.classList.remove('visible'); }, 200); if (!options.debug) { cookies.set('ysExit', 1, options.cookieValidity); } } }
        }; function fixOptions(options) { var newOptions = {}; Object.keys(defaults).forEach(function (key) { newOptions[key] = options.hasOwnProperty(key) ? options[key] : defaults[key]; }); return newOptions; }
        function delegate(obj, func) { return function () { func.apply(obj, arguments); }; }
        if (!cookies.get(options.cookieIdentifier)) {
            if (typeof options.delay !== 'number') { throw new Error('options.delay must be a numeric value'); }
            if (!element) { throw new Error('Could not find element with selector: ' + options.target); }
            if (element.parentNode !== document.body) { throw new Error(options.target + ' element must be placed directly inside of the <body> element'); }
            setTimeout(delegate(pop, pop.attachEvents), options.delay);
        }
        return { open: delegate(pop, pop.open), destroy: delegate(pop, pop.destroy), getElement: function () { return element; } };
    };
})(window); var options = { debug: false, }
$(document).ready(function () { }); $('.eggoffer').click(function () { $('.mypopup-wrapup').toggle(); }); $('.closebutton').click(function () { $('.mypopup-wrapup').hide(); });