// source --> //beganovic.ba/wp-content/plugins/woocommerce/assets/js/frontend/add-to-cart.min.js?ver=2.6.3 /*! * WooCommerce Add to Cart JS */ jQuery(function(a){return"undefined"!=typeof wc_add_to_cart_params&&void a(document).on("click",".add_to_cart_button",function(){var b=a(this);if(b.is(".ajax_add_to_cart")){if(!b.attr("data-product_id"))return!0;b.removeClass("added"),b.addClass("loading");var c={};return a.each(b.data(),function(a,b){c[a]=b}),a(document.body).trigger("adding_to_cart",[b,c]),a.post(wc_add_to_cart_params.wc_ajax_url.toString().replace("%%endpoint%%","add_to_cart"),c,function(c){if(c){var d=window.location.toString();if(d=d.replace("add-to-cart","added-to-cart"),c.error&&c.product_url)return void(window.location=c.product_url);if("yes"===wc_add_to_cart_params.cart_redirect_after_add)return void(window.location=wc_add_to_cart_params.cart_url);b.removeClass("loading");var e=c.fragments,f=c.cart_hash;e&&a.each(e,function(b){a(b).addClass("updating")}),a(".shop_table.cart, .updating, .cart_totals").fadeTo("400","0.6").block({message:null,overlayCSS:{opacity:.6}}),b.addClass("added"),wc_add_to_cart_params.is_cart||0!==b.parent().find(".added_to_cart").length||b.after(' '+wc_add_to_cart_params.i18n_view_cart+""),e&&a.each(e,function(b,c){a(b).replaceWith(c)}),a(".widget_shopping_cart, .updating").stop(!0).css("opacity","1").unblock(),a(".shop_table.cart").load(d+" .shop_table.cart:eq(0) > *",function(){a(".shop_table.cart").stop(!0).css("opacity","1").unblock(),a(document.body).trigger("cart_page_refreshed")}),a(".cart_totals").load(d+" .cart_totals:eq(0) > *",function(){a(".cart_totals").stop(!0).css("opacity","1").unblock()}),a(document.body).trigger("added_to_cart",[e,f,b])}}),!1}return!0})}); // source --> http://beganovic.ba/wp-content/plugins/js_composer/assets/js/vendors/woocommerce-add-to-cart.js?ver=4.11.2 window.jQuery( document ).ready( function ( $ ) { $( 'body' ).on( 'adding_to_cart', function ( event, $button, data ) { $button && $button.hasClass( 'vc_gitem-link' ) && $button .addClass( 'vc-gitem-add-to-cart-loading-btn' ) .parents( '.vc_grid-item-mini' ) .addClass( 'vc-woocommerce-add-to-cart-loading' ) .append( $( '
' ) ); } ).on( 'added_to_cart', function ( event, fragments, cart_hash, $button ) { if ( 'undefined' === typeof($button) ) { $button = $( '.vc-gitem-add-to-cart-loading-btn' ); } $button && $button.hasClass( 'vc_gitem-link' ) && $button .removeClass( 'vc-gitem-add-to-cart-loading-btn' ) .parents( '.vc_grid-item-mini' ) .removeClass( 'vc-woocommerce-add-to-cart-loading' ) .find( '.vc_wc-load-add-to-loader-wrapper' ).remove(); } ); } ); // source --> http://beganovic.ba/wp-content/plugins/text-slider/public/assets/js/text-slider.min.js?ver=1.0.0 (function(e,t,n,r){function o(t,n){this.element=t;this.settings=e.extend({},s,n);this._defaults=s;this._name=i;this.timeId=null;this.resizeThrottle=null;this.$container=e(this.element).find(".text-slideshow:first");this.$slides=this.$container.children();this.$nextButton=e(this.element).find(".next:first");this.$prevButton=e(this.element).find(".prev:first");this.init()}var i="textSlider",s={intervalTime:9e3,duration:4,definedHeight:false};o.prototype={init:function(){function r(){n.initAutoHeight()}this.$slides.not(":first").not(".dummy-slide").hide();if(this.$slides.length>1){this.start();this.$nextButton.on("click",{plugin:this},this.pressForward);this.$prevButton.on("click",{plugin:this},this.pressBackwards)}this.settings._autoHeightOnResize=function(){clearTimeout(this.resizeThrottle);this.resizeThrottle=setTimeout(this.initAutoHeight,50)};e(t).on("resize orientationchange",this.settings._autoHeightOnResize);var n=this;setTimeout(r,30)},initAutoHeight:function(){var t,n;n=this.calcDummyIndex();if(n==this.settings._sentinelIndex)return;this.settings._sentinelIndex=n;if(this.settings._sentinel)this.settings._sentinel.remove();t=e(this.$slides[n]).clone();t.removeAttr("id name rel").find("[id],[name],[rel]").removeAttr("id name rel");t.css({position:"static",visibility:"hidden",display:"block"}).prependTo(this.$container).addClass(".dummy-slide");t.find("*").css("visibility","hidden");if(this.settings.definedHeight!==false){this.settings.definedHeight=parseInt(this.settings.definedHeight);if(e.type(this.settings.definedHeight)=="number"){t.height(this.settings.definedHeight)}}this.settings._sentinel=t},calcDummyIndex:function(){var t=0,n=-1;this.$slides.each(function(r){var i=e(this).height();if(i>n){n=i;t=r}});return t},start:function(){clearTimeout(this.timeId);var e=this;this.timeId=setInterval(function(){e.moveForward()},this.settings.intervalTime)},moveForward:function(){this.$container.children().filter(":first").next().fadeOut(this.settings.duration).next().fadeIn(this.settings.duration).end().appendTo(this.$container)},moveBackwards:function(){this.$container.children().filter(":first").next().fadeOut(this.settings.duration);this.$container.children().filter(":last").fadeIn(this.settings.duration).insertAfter(this.$container.children().filter(":first"))},pressForward:function(e){clearTimeout(e.data.plugin.timeId);e.data.plugin.moveForward();e.data.plugin.timeId=setInterval(function(){e.data.plugin.moveForward()},e.data.plugin.settings.intervalTime);e.preventDefault()},pressBackwards:function(e){clearTimeout(e.data.plugin.timeId);e.data.plugin.moveBackwards();e.data.plugin.timeId=setInterval(function(){e.data.plugin.moveForward()},e.data.plugin.settings.intervalTime);e.preventDefault()},stop:function(){clearTimeout(this.timeId)}};e.fn[i]=function(t){this.each(function(){if(!e.data(this,"plugin_"+i)){e.data(this,"plugin_"+i,new o(this,t))}});return this}})(jQuery,window,document); // source --> http://beganovic.ba/wp-content/themes/motors/assets/js/classie.js?ver=2.3 /*! * classie v1.0.1 * class helper functions * from bonzo https://github.com/ded/bonzo * MIT license * * classie.has( elem, 'my-class' ) -> true/false * classie.add( elem, 'my-new-class' ) * classie.remove( elem, 'my-unwanted-class' ) * classie.toggle( elem, 'my-class' ) */ /*jshint browser: true, strict: true, undef: true, unused: true */ /*global define: false, module: false */ ( function( window ) { 'use strict'; // class helper functions from bonzo https://github.com/ded/bonzo function classReg( className ) { return new RegExp("(^|\\s+)" + className + "(\\s+|$)"); } // classList support for class management // altho to be fair, the api sucks because it won't accept multiple classes at once var hasClass, addClass, removeClass; if ( 'classList' in document.documentElement ) { hasClass = function( elem, c ) { return elem.classList.contains( c ); }; addClass = function( elem, c ) { elem.classList.add( c ); }; removeClass = function( elem, c ) { elem.classList.remove( c ); }; } else { hasClass = function( elem, c ) { return classReg( c ).test( elem.className ); }; addClass = function( elem, c ) { if ( !hasClass( elem, c ) ) { elem.className = elem.className + ' ' + c; } }; removeClass = function( elem, c ) { elem.className = elem.className.replace( classReg( c ), ' ' ); }; } function toggleClass( elem, c ) { var fn = hasClass( elem, c ) ? removeClass : addClass; fn( elem, c ); } var classie = { // full names hasClass: hasClass, addClass: addClass, removeClass: removeClass, toggleClass: toggleClass, // short names has: hasClass, add: addClass, remove: removeClass, toggle: toggleClass }; // transport if ( typeof define === 'function' && define.amd ) { // AMD define( classie ); } else if ( typeof exports === 'object' ) { // CommonJS module.exports = classie; } else { // browser global window.classie = classie; } })( window ); // source --> http://beganovic.ba/wp-content/themes/motors/assets/js/vivus.min.js?ver=2.3 /** * vivus - JavaScript library to make drawing animation on SVG * @version v0.3.0 * @link https://github.com/maxwellito/vivus * @license MIT */ "use strict";!function(t,e){function r(r){if("undefined"==typeof r)throw new Error('Pathformer [constructor]: "element" parameter is required');if(r.constructor===String&&(r=e.getElementById(r),!r))throw new Error('Pathformer [constructor]: "element" parameter is not related to an existing ID');if(!(r.constructor instanceof t.SVGElement||/^svg$/i.test(r.nodeName)))throw new Error('Pathformer [constructor]: "element" parameter must be a string or a SVGelement');this.el=r,this.scan(r)}function n(t,e,r){this.isReady=!1,this.setElement(t,e),this.setOptions(e),this.setCallback(r),this.isReady&&this.init()}r.prototype.TYPES=["line","ellipse","circle","polygon","polyline","rect"],r.prototype.ATTR_WATCH=["cx","cy","points","r","rx","ry","x","x1","x2","y","y1","y2"],r.prototype.scan=function(t){for(var e,r,n,i,a=t.querySelectorAll(this.TYPES.join(",")),o=0;o=this.duration)throw new Error("Vivus [constructor]: delay must be shorter than duration")},n.prototype.setCallback=function(t){if(t&&t.constructor!==Function)throw new Error('Vivus [constructor]: "callback" parameter must be a function');this.callback=t||function(){}},n.prototype.mapping=function(){var e,r,n,i,a,s,h,u;for(u=s=h=0,r=this.el.querySelectorAll("path"),e=0;e1?r.length-1:1),e=0;e=this.frameLength?(this.stop(),this.currentFrame=this.frameLength,this.trace(),this.selfDestroy&&this.destroy(),this.callback(this)):(this.trace(),this.handle=i(function(){t.drawer()}))},n.prototype.trace=function(){var t,e,r,n;for(n=this.animTimingFunction(this.currentFrame/this.frameLength)*this.frameLength,t=0;t=o+a*e&&s>=r},n.prototype.docElem=t.document.documentElement,n.prototype.getViewportH=function(){var e=this.docElem.clientHeight,r=t.innerHeight;return r>e?r:e},n.prototype.scrollY=function(){return t.pageYOffset||this.docElem.scrollTop},i=function(){return t.requestAnimationFrame||t.webkitRequestAnimationFrame||t.mozRequestAnimationFrame||t.oRequestAnimationFrame||t.msRequestAnimationFrame||function(e){return t.setTimeout(e,1e3/60)}}(),a=function(){return t.cancelAnimationFrame||t.webkitCancelAnimationFrame||t.mozCancelAnimationFrame||t.oCancelAnimationFrame||t.msCancelAnimationFrame||function(e){return t.clearTimeout(e)}}(),o=function(t,e){var r=parseInt(t,10);return r>=0?r:e},"function"==typeof define&&define.amd?define([],function(){return n}):"object"==typeof exports?module.exports=n:t.Vivus=n}(window,document);