'use strict'; (function ($) { "use strict"; /*------------------------------------------------------------------ [Table of contents] 1. my owl function 2. smooth scroll 3. custom input type number function 4. custom input type select function 5. email patern 6. equalheight function 7. pricing fixedtable function 8. content to center banner section 9. sticky header 10. skew background width calculate function 11. on screen function 12. set logo function 13. prelaoder load done then load wow 14. preloader close button 15. mega navigation menu init 16. twitter api init 17. client slider 18. testimonial slider 19. testimonial slider 2 20. blog post gallery slider 21. contact form init 22. turn off autocomplete 23. service block on hover class add 24. video popup init 25. Side Offset cart menu open 26. wow animation init 27. my custom select init 28. tab swipe indicator 29. pricing matrix expand slider 30. feature section prev class get function 31. pricing expand function 32. accordion add class "isActive" function 33. click and go to current section init 34. input number increase 35. right click , ctrl+u and ctrl+shift+i disabled 36. image dragable false setup 37. ajaxchimp init 38. wave animation use by parallax 39. magnific modal popup 40. tooltip init 41. revulation hero init 42. revulation carousel slider init 43. shuffle letters 44. XpeedStudio Maps -------------------------------------------------------------------*/ /*========================================================== 1. my owl function ======================================================================*/ $.fn.myOwl = function (options) { var settings = $.extend({ items: 1, dots: false, loop: true, mouseDrag: true, touchDrag: true, nav: false, autoplay: true, navText: ['', ''], margin: 0, stagePadding: 0, autoplayTimeout: 5000, autoplayHoverPause: true, navRewind: false, responsive: {}, animateOut: '', animateIn: '', smartSpeed: 900, center: '' }, options); return this.owlCarousel({ items: settings.items, loop: settings.loop, mouseDrag: settings.mouseDrag, touchDrag: settings.touchDrag, nav: settings.nav, navText: settings.navText, dots: settings.dots, margin: settings.margin, stagePadding: settings.stagePadding, autoplay: settings.autoplay, autoplayTimeout: settings.autoplayTimeout, autoplayHoverPause: settings.autoplayHoverPause, animateOut: settings.animateOut, animateIn: settings.animateIn, responsive: settings.responsive, navRewind: settings.navRewind, center: settings.center, smartSpeed: settings.smartSpeed }); }; /*========================================================== 2. smooth scroll ======================================================================*/ $.fn.scrollView = function () { return this.each(function () { $('html, body').animate({ scrollTop: $(this).offset().top }, 1000); }); }; /*========================================================== 3. custom input type number function ======================================================================*/ $.fn.customNumber = function (options) { var settings = $.extend({ plusIcon: '', minusIcon: '' }, options); this.append('' + settings.plusIcon + ''); this.append('' + settings.minusIcon + ''); return this.each(function () { var spinner = $(this), input = spinner.find('input[type="number"]'), add = spinner.find('.add'), sub = spinner.find('.sub'); input.parent().on('click', '.sub', function (event) { event.preventDefault(); if (input.val() > parseInt(input.attr('min'), 10)) { input.val(function (i, oldvalue) { return --oldvalue; }); } }); input.parent().on('click', '.add', function (event) { event.preventDefault(); if (input.val() < parseInt(input.attr('max'), 10)) { input.val(function (i, oldvalue) { return ++oldvalue; }); } }); }); }; /*========================================================== 4. custom input type select function ======================================================================*/ $.fn.mySelect = function (options) { var $this = $(this), numberOfOptions = $(this).children('option'); $this.addClass('select-hidden'); $this.wrap('
'); $this.after('
'); var styledSelect = $this.next('.select-styled'); styledSelect.text($this.children('option').eq(0).text()); var list = $('