// source --> http://jawaherasil.com/wp-includes/js/jquery/jquery.min.js?ver=3.7.1 /*! jQuery v3.7.1 | (c) OpenJS Foundation and other contributors | jquery.org/license */ !function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(ie,e){"use strict";var oe=[],r=Object.getPrototypeOf,ae=oe.slice,g=oe.flat?function(e){return oe.flat.call(e)}:function(e){return oe.concat.apply([],e)},s=oe.push,se=oe.indexOf,n={},i=n.toString,ue=n.hasOwnProperty,o=ue.toString,a=o.call(Object),le={},v=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType&&"function"!=typeof e.item},y=function(e){return null!=e&&e===e.window},C=ie.document,u={type:!0,src:!0,nonce:!0,noModule:!0};function m(e,t,n){var r,i,o=(n=n||C).createElement("script");if(o.text=e,t)for(r in u)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function x(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?n[i.call(e)]||"object":typeof e}var t="3.7.1",l=/HTML$/i,ce=function(e,t){return new ce.fn.init(e,t)};function c(e){var t=!!e&&"length"in e&&e.length,n=x(e);return!v(e)&&!y(e)&&("array"===n||0===t||"number"==typeof t&&0+~]|"+ge+")"+ge+"*"),x=new RegExp(ge+"|>"),j=new RegExp(g),A=new RegExp("^"+t+"$"),D={ID:new RegExp("^#("+t+")"),CLASS:new RegExp("^\\.("+t+")"),TAG:new RegExp("^("+t+"|[*])"),ATTR:new RegExp("^"+p),PSEUDO:new RegExp("^"+g),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+ge+"*(even|odd|(([+-]|)(\\d*)n|)"+ge+"*(?:([+-]|)"+ge+"*(\\d+)|))"+ge+"*\\)|)","i"),bool:new RegExp("^(?:"+f+")$","i"),needsContext:new RegExp("^"+ge+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+ge+"*((?:-\\d)?\\d*)"+ge+"*\\)|)(?=[^-]|$)","i")},N=/^(?:input|select|textarea|button)$/i,q=/^h\d$/i,L=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,H=/[+~]/,O=new RegExp("\\\\[\\da-fA-F]{1,6}"+ge+"?|\\\\([^\\r\\n\\f])","g"),P=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},M=function(){V()},R=J(function(e){return!0===e.disabled&&fe(e,"fieldset")},{dir:"parentNode",next:"legend"});try{k.apply(oe=ae.call(ye.childNodes),ye.childNodes),oe[ye.childNodes.length].nodeType}catch(e){k={apply:function(e,t){me.apply(e,ae.call(t))},call:function(e){me.apply(e,ae.call(arguments,1))}}}function I(t,e,n,r){var i,o,a,s,u,l,c,f=e&&e.ownerDocument,p=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==p&&9!==p&&11!==p)return n;if(!r&&(V(e),e=e||T,C)){if(11!==p&&(u=L.exec(t)))if(i=u[1]){if(9===p){if(!(a=e.getElementById(i)))return n;if(a.id===i)return k.call(n,a),n}else if(f&&(a=f.getElementById(i))&&I.contains(e,a)&&a.id===i)return k.call(n,a),n}else{if(u[2])return k.apply(n,e.getElementsByTagName(t)),n;if((i=u[3])&&e.getElementsByClassName)return k.apply(n,e.getElementsByClassName(i)),n}if(!(h[t+" "]||d&&d.test(t))){if(c=t,f=e,1===p&&(x.test(t)||m.test(t))){(f=H.test(t)&&U(e.parentNode)||e)==e&&le.scope||((s=e.getAttribute("id"))?s=ce.escapeSelector(s):e.setAttribute("id",s=S)),o=(l=Y(t)).length;while(o--)l[o]=(s?"#"+s:":scope")+" "+Q(l[o]);c=l.join(",")}try{return k.apply(n,f.querySelectorAll(c)),n}catch(e){h(t,!0)}finally{s===S&&e.removeAttribute("id")}}}return re(t.replace(ve,"$1"),e,n,r)}function W(){var r=[];return function e(t,n){return r.push(t+" ")>b.cacheLength&&delete e[r.shift()],e[t+" "]=n}}function F(e){return e[S]=!0,e}function $(e){var t=T.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function B(t){return function(e){return fe(e,"input")&&e.type===t}}function _(t){return function(e){return(fe(e,"input")||fe(e,"button"))&&e.type===t}}function z(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&R(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function X(a){return F(function(o){return o=+o,F(function(e,t){var n,r=a([],e.length,o),i=r.length;while(i--)e[n=r[i]]&&(e[n]=!(t[n]=e[n]))})})}function U(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}function V(e){var t,n=e?e.ownerDocument||e:ye;return n!=T&&9===n.nodeType&&n.documentElement&&(r=(T=n).documentElement,C=!ce.isXMLDoc(T),i=r.matches||r.webkitMatchesSelector||r.msMatchesSelector,r.msMatchesSelector&&ye!=T&&(t=T.defaultView)&&t.top!==t&&t.addEventListener("unload",M),le.getById=$(function(e){return r.appendChild(e).id=ce.expando,!T.getElementsByName||!T.getElementsByName(ce.expando).length}),le.disconnectedMatch=$(function(e){return i.call(e,"*")}),le.scope=$(function(){return T.querySelectorAll(":scope")}),le.cssHas=$(function(){try{return T.querySelector(":has(*,:jqfake)"),!1}catch(e){return!0}}),le.getById?(b.filter.ID=function(e){var t=e.replace(O,P);return function(e){return e.getAttribute("id")===t}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&C){var n=t.getElementById(e);return n?[n]:[]}}):(b.filter.ID=function(e){var n=e.replace(O,P);return function(e){var t="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return t&&t.value===n}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&C){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];i=t.getElementsByName(e),r=0;while(o=i[r++])if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),b.find.TAG=function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):t.querySelectorAll(e)},b.find.CLASS=function(e,t){if("undefined"!=typeof t.getElementsByClassName&&C)return t.getElementsByClassName(e)},d=[],$(function(e){var t;r.appendChild(e).innerHTML="",e.querySelectorAll("[selected]").length||d.push("\\["+ge+"*(?:value|"+f+")"),e.querySelectorAll("[id~="+S+"-]").length||d.push("~="),e.querySelectorAll("a#"+S+"+*").length||d.push(".#.+[+~]"),e.querySelectorAll(":checked").length||d.push(":checked"),(t=T.createElement("input")).setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),r.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&d.push(":enabled",":disabled"),(t=T.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||d.push("\\["+ge+"*name"+ge+"*="+ge+"*(?:''|\"\")")}),le.cssHas||d.push(":has"),d=d.length&&new RegExp(d.join("|")),l=function(e,t){if(e===t)return a=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!le.sortDetached&&t.compareDocumentPosition(e)===n?e===T||e.ownerDocument==ye&&I.contains(ye,e)?-1:t===T||t.ownerDocument==ye&&I.contains(ye,t)?1:o?se.call(o,e)-se.call(o,t):0:4&n?-1:1)}),T}for(e in I.matches=function(e,t){return I(e,null,null,t)},I.matchesSelector=function(e,t){if(V(e),C&&!h[t+" "]&&(!d||!d.test(t)))try{var n=i.call(e,t);if(n||le.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){h(t,!0)}return 0":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(O,P),e[3]=(e[3]||e[4]||e[5]||"").replace(O,P),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||I.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&I.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return D.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&j.test(n)&&(t=Y(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(O,P).toLowerCase();return"*"===e?function(){return!0}:function(e){return fe(e,t)}},CLASS:function(e){var t=s[e+" "];return t||(t=new RegExp("(^|"+ge+")"+e+"("+ge+"|$)"))&&s(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(n,r,i){return function(e){var t=I.attr(e,n);return null==t?"!="===r:!r||(t+="","="===r?t===i:"!="===r?t!==i:"^="===r?i&&0===t.indexOf(i):"*="===r?i&&-1:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function T(e,n,r){return v(n)?ce.grep(e,function(e,t){return!!n.call(e,t,e)!==r}):n.nodeType?ce.grep(e,function(e){return e===n!==r}):"string"!=typeof n?ce.grep(e,function(e){return-1)[^>]*|#([\w-]+))$/;(ce.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||k,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:S.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof ce?t[0]:t,ce.merge(this,ce.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:C,!0)),w.test(r[1])&&ce.isPlainObject(t))for(r in t)v(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=C.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):v(e)?void 0!==n.ready?n.ready(e):e(ce):ce.makeArray(e,this)}).prototype=ce.fn,k=ce(C);var E=/^(?:parents|prev(?:Until|All))/,j={children:!0,contents:!0,next:!0,prev:!0};function A(e,t){while((e=e[t])&&1!==e.nodeType);return e}ce.fn.extend({has:function(e){var t=ce(e,this),n=t.length;return this.filter(function(){for(var e=0;e\x20\t\r\n\f]*)/i,Ce=/^$|^module$|\/(?:java|ecma)script/i;xe=C.createDocumentFragment().appendChild(C.createElement("div")),(be=C.createElement("input")).setAttribute("type","radio"),be.setAttribute("checked","checked"),be.setAttribute("name","t"),xe.appendChild(be),le.checkClone=xe.cloneNode(!0).cloneNode(!0).lastChild.checked,xe.innerHTML="",le.noCloneChecked=!!xe.cloneNode(!0).lastChild.defaultValue,xe.innerHTML="",le.option=!!xe.lastChild;var ke={thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};function Se(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&fe(e,t)?ce.merge([e],n):n}function Ee(e,t){for(var n=0,r=e.length;n",""]);var je=/<|&#?\w+;/;function Ae(e,t,n,r,i){for(var o,a,s,u,l,c,f=t.createDocumentFragment(),p=[],d=0,h=e.length;d\s*$/g;function Re(e,t){return fe(e,"table")&&fe(11!==t.nodeType?t:t.firstChild,"tr")&&ce(e).children("tbody")[0]||e}function Ie(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function We(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Fe(e,t){var n,r,i,o,a,s;if(1===t.nodeType){if(_.hasData(e)&&(s=_.get(e).events))for(i in _.remove(t,"handle events"),s)for(n=0,r=s[i].length;n").attr(n.scriptAttrs||{}).prop({charset:n.scriptCharset,src:n.url}).on("load error",i=function(e){r.remove(),i=null,e&&t("error"===e.type?404:200,e.type)}),C.head.appendChild(r[0])},abort:function(){i&&i()}}});var Jt,Kt=[],Zt=/(=)\?(?=&|$)|\?\?/;ce.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Kt.pop()||ce.expando+"_"+jt.guid++;return this[e]=!0,e}}),ce.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,o,a=!1!==e.jsonp&&(Zt.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Zt.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=v(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Zt,"$1"+r):!1!==e.jsonp&&(e.url+=(At.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return o||ce.error(r+" was not called"),o[0]},e.dataTypes[0]="json",i=ie[r],ie[r]=function(){o=arguments},n.always(function(){void 0===i?ce(ie).removeProp(r):ie[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,Kt.push(r)),o&&v(i)&&i(o[0]),o=i=void 0}),"script"}),le.createHTMLDocument=((Jt=C.implementation.createHTMLDocument("").body).innerHTML="
",2===Jt.childNodes.length),ce.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(le.createHTMLDocument?((r=(t=C.implementation.createHTMLDocument("")).createElement("base")).href=C.location.href,t.head.appendChild(r)):t=C),o=!n&&[],(i=w.exec(e))?[t.createElement(i[1])]:(i=Ae([e],t,o),o&&o.length&&ce(o).remove(),ce.merge([],i.childNodes)));var r,i,o},ce.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return-1").append(ce.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},ce.expr.pseudos.animated=function(t){return ce.grep(ce.timers,function(e){return t===e.elem}).length},ce.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=ce.css(e,"position"),c=ce(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=ce.css(e,"top"),u=ce.css(e,"left"),("absolute"===l||"fixed"===l)&&-1<(o+u).indexOf("auto")?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),v(t)&&(t=t.call(e,n,ce.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):c.css(f)}},ce.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){ce.offset.setOffset(this,t,e)});var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===ce.css(r,"position"))t=r.getBoundingClientRect();else{t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;while(e&&(e===n.body||e===n.documentElement)&&"static"===ce.css(e,"position"))e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=ce(e).offset()).top+=ce.css(e,"borderTopWidth",!0),i.left+=ce.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-ce.css(r,"marginTop",!0),left:t.left-i.left-ce.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent;while(e&&"static"===ce.css(e,"position"))e=e.offsetParent;return e||J})}}),ce.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,i){var o="pageYOffset"===i;ce.fn[t]=function(e){return M(this,function(e,t,n){var r;if(y(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===n)return r?r[i]:e[t];r?r.scrollTo(o?r.pageXOffset:n,o?n:r.pageYOffset):e[t]=n},t,e,arguments.length)}}),ce.each(["top","left"],function(e,n){ce.cssHooks[n]=Ye(le.pixelPosition,function(e,t){if(t)return t=Ge(e,n),_e.test(t)?ce(e).position()[n]+"px":t})}),ce.each({Height:"height",Width:"width"},function(a,s){ce.each({padding:"inner"+a,content:s,"":"outer"+a},function(r,o){ce.fn[o]=function(e,t){var n=arguments.length&&(r||"boolean"!=typeof e),i=r||(!0===e||!0===t?"margin":"border");return M(this,function(e,t,n){var r;return y(e)?0===o.indexOf("outer")?e["inner"+a]:e.document.documentElement["client"+a]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+a],r["scroll"+a],e.body["offset"+a],r["offset"+a],r["client"+a])):void 0===n?ce.css(e,t,i):ce.style(e,t,n,i)},s,n?e:void 0,n)}})}),ce.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){ce.fn[t]=function(e){return this.on(t,e)}}),ce.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},hover:function(e,t){return this.on("mouseenter",e).on("mouseleave",t||e)}}),ce.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,n){ce.fn[n]=function(e,t){return 0 http://jawaherasil.com/wp-includes/js/jquery/jquery-migrate.min.js?ver=3.4.1 /*! jQuery Migrate v3.4.1 | (c) OpenJS Foundation and other contributors | jquery.org/license */ "undefined"==typeof jQuery.migrateMute&&(jQuery.migrateMute=!0),function(t){"use strict";"function"==typeof define&&define.amd?define(["jquery"],function(e){return t(e,window)}):"object"==typeof module&&module.exports?module.exports=t(require("jquery"),window):t(jQuery,window)}(function(s,n){"use strict";function e(e){return 0<=function(e,t){for(var r=/^(\d+)\.(\d+)\.(\d+)/,n=r.exec(e)||[],o=r.exec(t)||[],a=1;a<=3;a++){if(+o[a]<+n[a])return 1;if(+n[a]<+o[a])return-1}return 0}(s.fn.jquery,e)}s.migrateVersion="3.4.1";var t=Object.create(null);s.migrateDisablePatches=function(){for(var e=0;e\x20\t\r\n\f]*)[^>]*)\/>/gi;s.UNSAFE_restoreLegacyHtmlPrefilter=function(){s.migrateEnablePatches("self-closed-tags")},i(s,"htmlPrefilter",function(e){var t,r;return(r=(t=e).replace(F,"<$1>"))!==t&&T(t)!==T(r)&&u("self-closed-tags","HTML tags must be properly nested and closed: "+t),e.replace(F,"<$1>")},"self-closed-tags"),s.migrateDisablePatches("self-closed-tags");var D,W,_,I=s.fn.offset;return i(s.fn,"offset",function(){var e=this[0];return!e||e.nodeType&&e.getBoundingClientRect?I.apply(this,arguments):(u("offset-valid-elem","jQuery.fn.offset() requires a valid DOM element"),arguments.length?this:void 0)},"offset-valid-elem"),s.ajax&&(D=s.param,i(s,"param",function(e,t){var r=s.ajaxSettings&&s.ajaxSettings.traditional;return void 0===t&&r&&(u("param-ajax-traditional","jQuery.param() no longer uses jQuery.ajaxSettings.traditional"),t=r),D.call(this,e,t)},"param-ajax-traditional")),c(s.fn,"andSelf",s.fn.addBack,"andSelf","jQuery.fn.andSelf() is deprecated and removed, use jQuery.fn.addBack()"),s.Deferred&&(W=s.Deferred,_=[["resolve","done",s.Callbacks("once memory"),s.Callbacks("once memory"),"resolved"],["reject","fail",s.Callbacks("once memory"),s.Callbacks("once memory"),"rejected"],["notify","progress",s.Callbacks("memory"),s.Callbacks("memory")]],i(s,"Deferred",function(e){var a=W(),i=a.promise();function t(){var o=arguments;return s.Deferred(function(n){s.each(_,function(e,t){var r="function"==typeof o[e]&&o[e];a[t[1]](function(){var e=r&&r.apply(this,arguments);e&&"function"==typeof e.promise?e.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[t[0]+"With"](this===i?n.promise():this,r?[e]:arguments)})}),o=null}).promise()}return c(a,"pipe",t,"deferred-pipe","deferred.pipe() is deprecated"),c(i,"pipe",t,"deferred-pipe","deferred.pipe() is deprecated"),e&&e.call(a,a),a},"deferred-pipe"),s.Deferred.exceptionHook=W.exceptionHook),s}); // source --> http://jawaherasil.com/wp-content/themes/jawaherasil/js/cookie.js?ver=6.4.3 /*! * jQuery Cookie Plugin * https://github.com/carhartl/jquery-cookie * * Copyright 2011, Klaus Hartl * Dual licensed under the MIT or GPL Version 2 licenses. * http://www.opensource.org/licenses/mit-license.php * http://www.opensource.org/licenses/GPL-2.0 */ (function($) { $.cookie = function(key, value, options) { // key and at least value given, set cookie... if (arguments.length > 1 && (!/Object/.test(Object.prototype.toString.call(value)) || value === null || value === undefined)) { options = $.extend({}, options); if (value === null || value === undefined) { options.expires = -1; } if (typeof options.expires === 'number') { var days = options.expires, t = options.expires = new Date(); t.setDate(t.getDate() + days); } value = String(value); return (document.cookie = [ encodeURIComponent(key), '=', options.raw ? value : encodeURIComponent(value), options.expires ? '; expires=' + options.expires.toUTCString() : '', // use expires attribute, max-age is not supported by IE options.path ? '; path=' + options.path : '', options.domain ? '; domain=' + options.domain : '', options.secure ? '; secure' : '' ].join('')); } // key and possibly options given, get cookie... options = value || {}; var decode = options.raw ? function(s) { return s; } : decodeURIComponent; var pairs = document.cookie.split('; '); for (var i = 0, pair; pair = pairs[i] && pairs[i].split('='); i++) { if (decode(pair[0]) === key) return decode(pair[1] || ''); // IE saves cookies with empty string as "c; ", e.g. without "=" as opposed to EOMB, thus pair[1] may be undefined } return null; }; })(jQuery); // source --> http://jawaherasil.com/wp-content/themes/jawaherasil/js/modernizr.custom.js?ver=6.4.3 /* Modernizr 2.6.2 (Custom Build) | MIT & BSD * Build: http://modernizr.com/download/#-csstransitions-shiv-cssclasses-prefixed-testprop-testallprops-domprefixes-load */ ;window.Modernizr=function(a,b,c){function x(a){j.cssText=a}function y(a,b){return x(prefixes.join(a+";")+(b||""))}function z(a,b){return typeof a===b}function A(a,b){return!!~(""+a).indexOf(b)}function B(a,b){for(var d in a){var e=a[d];if(!A(e,"-")&&j[e]!==c)return b=="pfx"?e:!0}return!1}function C(a,b,d){for(var e in a){var f=b[a[e]];if(f!==c)return d===!1?a[e]:z(f,"function")?f.bind(d||b):f}return!1}function D(a,b,c){var d=a.charAt(0).toUpperCase()+a.slice(1),e=(a+" "+n.join(d+" ")+d).split(" ");return z(b,"string")||z(b,"undefined")?B(e,b):(e=(a+" "+o.join(d+" ")+d).split(" "),C(e,b,c))}var d="2.6.2",e={},f=!0,g=b.documentElement,h="modernizr",i=b.createElement(h),j=i.style,k,l={}.toString,m="Webkit Moz O ms",n=m.split(" "),o=m.toLowerCase().split(" "),p={},q={},r={},s=[],t=s.slice,u,v={}.hasOwnProperty,w;!z(v,"undefined")&&!z(v.call,"undefined")?w=function(a,b){return v.call(a,b)}:w=function(a,b){return b in a&&z(a.constructor.prototype[b],"undefined")},Function.prototype.bind||(Function.prototype.bind=function(b){var c=this;if(typeof c!="function")throw new TypeError;var d=t.call(arguments,1),e=function(){if(this instanceof e){var a=function(){};a.prototype=c.prototype;var f=new a,g=c.apply(f,d.concat(t.call(arguments)));return Object(g)===g?g:f}return c.apply(b,d.concat(t.call(arguments)))};return e}),p.csstransitions=function(){return D("transition")};for(var E in p)w(p,E)&&(u=E.toLowerCase(),e[u]=p[E](),s.push((e[u]?"":"no-")+u));return e.addTest=function(a,b){if(typeof a=="object")for(var d in a)w(a,d)&&e.addTest(d,a[d]);else{a=a.toLowerCase();if(e[a]!==c)return e;b=typeof b=="function"?b():b,typeof f!="undefined"&&f&&(g.className+=" "+(b?"":"no-")+a),e[a]=b}return e},x(""),i=k=null,function(a,b){function k(a,b){var c=a.createElement("p"),d=a.getElementsByTagName("head")[0]||a.documentElement;return c.innerHTML="x",d.insertBefore(c.lastChild,d.firstChild)}function l(){var a=r.elements;return typeof a=="string"?a.split(" "):a}function m(a){var b=i[a[g]];return b||(b={},h++,a[g]=h,i[h]=b),b}function n(a,c,f){c||(c=b);if(j)return c.createElement(a);f||(f=m(c));var g;return f.cache[a]?g=f.cache[a].cloneNode():e.test(a)?g=(f.cache[a]=f.createElem(a)).cloneNode():g=f.createElem(a),g.canHaveChildren&&!d.test(a)?f.frag.appendChild(g):g}function o(a,c){a||(a=b);if(j)return a.createDocumentFragment();c=c||m(a);var d=c.frag.cloneNode(),e=0,f=l(),g=f.length;for(;e",f="hidden"in a,j=a.childNodes.length==1||function(){b.createElement("a");var a=b.createDocumentFragment();return typeof a.cloneNode=="undefined"||typeof a.createDocumentFragment=="undefined"||typeof a.createElement=="undefined"}()}catch(c){f=!0,j=!0}})();var r={elements:c.elements||"abbr article aside audio bdi canvas data datalist details figcaption figure footer header hgroup mark meter nav output progress section summary time video",shivCSS:c.shivCSS!==!1,supportsUnknownElements:j,shivMethods:c.shivMethods!==!1,type:"default",shivDocument:q,createElement:n,createDocumentFragment:o};a.html5=r,q(b)}(this,b),e._version=d,e._domPrefixes=o,e._cssomPrefixes=n,e.testProp=function(a){return B([a])},e.testAllProps=D,e.prefixed=function(a,b,c){return b?D(a,b,c):D(a,"pfx")},g.className=g.className.replace(/(^|\s)no-js(\s|$)/,"$1$2")+(f?" js "+s.join(" "):""),e}(this,this.document),function(a,b,c){function d(a){return"[object Function]"==o.call(a)}function e(a){return"string"==typeof a}function f(){}function g(a){return!a||"loaded"==a||"complete"==a||"uninitialized"==a}function h(){var a=p.shift();q=1,a?a.t?m(function(){("c"==a.t?B.injectCss:B.injectJs)(a.s,0,a.a,a.x,a.e,1)},0):(a(),h()):q=0}function i(a,c,d,e,f,i,j){function k(b){if(!o&&g(l.readyState)&&(u.r=o=1,!q&&h(),l.onload=l.onreadystatechange=null,b)){"img"!=a&&m(function(){t.removeChild(l)},50);for(var d in y[c])y[c].hasOwnProperty(d)&&y[c][d].onload()}}var j=j||B.errorTimeout,l=b.createElement(a),o=0,r=0,u={t:d,s:c,e:f,a:i,x:j};1===y[c]&&(r=1,y[c]=[]),"object"==a?l.data=c:(l.src=c,l.type=a),l.width=l.height="0",l.onerror=l.onload=l.onreadystatechange=function(){k.call(this,r)},p.splice(e,0,u),"img"!=a&&(r||2===y[c]?(t.insertBefore(l,s?null:n),m(k,j)):y[c].push(l))}function j(a,b,c,d,f){return q=0,b=b||"j",e(a)?i("c"==b?v:u,a,b,this.i++,c,d,f):(p.splice(this.i++,0,a),1==p.length&&h()),this}function k(){var a=B;return a.loader={load:j,i:0},a}var l=b.documentElement,m=a.setTimeout,n=b.getElementsByTagName("script")[0],o={}.toString,p=[],q=0,r="MozAppearance"in l.style,s=r&&!!b.createRange().compareNode,t=s?l:n.parentNode,l=a.opera&&"[object Opera]"==o.call(a.opera),l=!!b.attachEvent&&!l,u=r?"object":l?"script":"img",v=l?"script":u,w=Array.isArray||function(a){return"[object Array]"==o.call(a)},x=[],y={},z={timeout:function(a,b){return b.length&&(a.timeout=b[0]),a}},A,B;B=function(a){function b(a){var a=a.split("!"),b=x.length,c=a.pop(),d=a.length,c={url:c,origUrl:c,prefixes:a},e,f,g;for(f=0;f http://jawaherasil.com/wp-content/themes/jawaherasil/js/tooltip.js?ver=6.4.3 function imageTooltip(el) { var dw = jQuery(window).width(), dh = jQuery(window).height(), iw, ih, pt, pl; jQuery('.imageHolder').remove(); jQuery('body').append('
'); jQuery('.imageHolder').css('position', 'absolute').css('display', 'none').css('zindex',10001); el.each(function() { jQuery(this).hover(function (e) { var el = jQuery(this), src = el.attr('id'), img = new Image(); dh = jQuery(window).height(); dw = jQuery(window).width(); dh = jQuery(window).height(); el.css('cursor', 'progress'); jQuery('.imageHolder img').remove(); jQuery(img).load(function () { el.css('cursor', 'default'); jQuery('.imageHolder').append(this); iw = jQuery('.imageHolder').width(); ih = jQuery('.imageHolder').height(); //check if image larger than dh if (ih > dh) { jQuery('.imageHolder img').height(dh-40); ih = dh-40; } //check if image larger than dw if (iw > dw) { jQuery('.imageHolder img').width(dw-40); iw = dw-40; } }).error(function () { alert('Error loading image.'); }).attr('src', src); },function () { //jQuery('.imageHolder img').fadeOut(300, function() {jQuery(this).remove()}); jQuery('.imageHolder img').hide().remove(); }).mousemove(function (e) { ih = jQuery('.imageHolder').height(); iw = jQuery('.imageHolder').width(); //if image height not fits to bottom var out = e.pageY+ih-jQuery(document).scrollTop()-dh; //check if image not fits to window if (e.pageY+ih-jQuery(document).scrollTop()>dh) { jQuery('.imageHolder').css('top', e.pageY-out-20); } else { jQuery('.imageHolder').css('top', e.pageY-20); } //check if image on the right and not fits if (e.pageX+iw > dw-20) { jQuery('.imageHolder').css('left', e.pageX-iw-20); } else { jQuery('.imageHolder').css('left', e.pageX+20); } if (!jQuery('.imageHolder').is(':visible')) { jQuery('.imageHolder').fadeIn(200); } }); }) }; // source --> http://jawaherasil.com/wp-content/themes/jawaherasil/js/script.js?ver=6.4.3 jQuery(document).ready(function(){ /* prettyPhoto -------------------------------------------------------------- */ jQuery("a[rel^='prettyPhoto'], a[rel^='lightbox']").prettyPhoto({ animation_speed: 'normal', /* fast/slow/normal */ slideshow: 5000, /* false OR interval time in ms */ autoplay_slideshow: false, /* true/false */ opacity: 0.80, /* Value between 0 and 1 */ show_title: true, /* true/false */ allow_resize: true, /* Resize the photos bigger than viewport. true/false */ default_width: 500, default_height: 344, counter_separator_label: '/', /* The separator for the gallery counter 1 "of" 2 */ theme: 'pp_default', /* light_rounded / dark_rounded / light_square / dark_square / facebook */ horizontal_padding: 20, /* The padding on each side of the picture */ hideflash: false, /* Hides all the flash object on a page, set to TRUE if flash appears over prettyPhoto */ wmode: 'opaque', /* Set the flash wmode attribute */ autoplay: true, /* Automatically start videos: True/False */ modal: false, /* If set to true, only the close button will close the window */ deeplinking: true, /* Allow prettyPhoto to update the url to enable deeplinking. */ overlay_gallery: true, /* If set to true, a gallery will overlay the fullscreen image on mouse over */ keyboard_shortcuts: true, /* Set to false if you open forms inside prettyPhoto */ changepicturecallback: function(){}, /* Called everytime an item is shown/changed */ social_tools: false, gallery_markup: '' }); /* Mobile navigation -------------------------------------------------------------- */ var navList = jQuery('div.menu > ul').clone(); var etOpener = '(open)'; navList.removeClass('menu').addClass('et-mobile-menu'); navList.find('li:has(ul)',this).each(function() { jQuery(this).prepend(etOpener); }) navList.find('.open-child').toggle(function(){ jQuery(this).parent().addClass('over').find('>ul').slideDown(200); },function(){ jQuery(this).parent().removeClass('over').find('>ul').slideUp(200); }); jQuery('.header-bg').after(navList[0]); jQuery('div.menu').after(''); jQuery('.et-menu-title').toggle(function(){ jQuery('.et-mobile-menu').slideDown(200); },function(){ jQuery('.et-mobile-menu').slideUp(200); }); /* Fixed menu */ jQuery(window).scroll(function(){ var fixedHeader = jQuery('.fixed-header-area'); var scrollTop = jQuery(this).scrollTop(); var headerHeight = jQuery('.header-top').height() + jQuery('.header-bg').height(); if(scrollTop > headerHeight){ if(!fixedHeader.hasClass('fixed-already')) { fixedHeader.stop().addClass('fixed-already'); } }else{ if(fixedHeader.hasClass('fixed-already')) { fixedHeader.stop().removeClass('fixed-already'); } } }); /* Hover intent -------------------------------------------------------------- */ jQuery('.shopping-cart-wrapper').hoverIntent( function () { jQuery(".cart-popup").stop().slideDown(100); }, function () { jQuery(".cart-popup").stop().slideUp(100); } ); /* Alerts -------------------------------------------------------------- */ jQuery('.woocommerce_message,.woocommerce_error').append('close'); /* Tabs -------------------------------------------------------------- */ var tabs = jQuery('.tabs'); jQuery('.tabs > p > a').unwrap('p'); var leftTabs = jQuery('.left-tabs'); var newTitles; leftTabs.each(function(){ var currTab = jQuery(this); //currTab.find('> a.tab-title').each(function(){ newTitles = currTab.find('> a.tab-title').clone().removeClass('tab-title').addClass('tab-title-left'); //}); var newHtml = newTitles; var tabNewTitles = jQuery('
').prependTo(currTab); tabNewTitles.html(newTitles); }); tabs.each(function(){ var currTab = jQuery(this); currTab.find('.tab-title, .tab-title-left').click(function(e){ e.preventDefault(); var tabId = jQuery(this).attr('id'); if(jQuery(this).hasClass('opened')){ jQuery(this).removeClass('opened'); jQuery('#content_'+tabId).hide(); }else{ currTab.find('.tab-title, .tab-title-left').each(function(){ var tabId = jQuery(this).attr('id'); jQuery(this).removeClass('opened'); jQuery('#content_'+tabId).hide(); }); jQuery('#content_'+tabId).show(); jQuery(this).addClass('opened'); } }); }); /* Checkout accordion -------------------------------------------------------------- */ var chtAccord = jQuery('.checkout-accordion'); var tabRegister = jQuery('.register-tab-content'); var regCheckbox = jQuery('#createaccount'); var btnNext = jQuery('.checkout-cont'); if(chtAccord.children().first().hasClass('tab-title')){ chtAccord.children().first().addClass('opened').next().show(); }else{ chtAccord.children().first().children().first().addClass('opened').next().show(); } btnNext.click(function(){ if(jQuery(this).hasClass('checkout-cont1')){ var nextTab = jQuery(this).parent().parent().parent().hide().prev().removeClass('opened').next().next().children().first(); if(nextTab.hasClass('skipTab')){ nextTab.next().next().addClass('opened').next().show(); }else{ nextTab.addClass('opened').next().show(); } }else{ jQuery(this).parent().hide().prev().removeClass('opened') .next().next().addClass('opened').next().show(); } }); jQuery('input[name="method"]').change(function(){ if(jQuery(this).val() == 1) { tabRegister.addClass('skipTab').hide(); regCheckbox.attr('checked', false); }else{ tabRegister.removeClass('skipTab').show(); regCheckbox.attr('checked', true); } }); /* Accordion -------------------------------------------------------------- */ var $container = jQuery('.acc-container'), $trigger = jQuery('.acc-trigger'); $container.hide(); $trigger.first().addClass('active').next().show(); var fullWidth = $container.outerWidth(true); $trigger.css('width', fullWidth); $container.css('width', fullWidth); $trigger.on('click', function(e) { if( jQuery(this).next().is(':hidden') ) { $trigger.removeClass('active').next().slideUp(300); jQuery(this).toggleClass('active').next().slideDown(300); } e.preventDefault(); }); // Resize jQuery(window).on('resize', function() { fullWidth = $container.outerWidth(true) $trigger.css('width', $trigger.parent().width() ); $container.css('width', $container.parent().width() ); }); /* Checkout -------------------------------------------------------------- */ jQuery("a#checkout-next").click(function(){ jQuery("#shopping-cart-form").fadeIn(); var checkoutWidth = jQuery("#shopping-cart").width() + 30; jQuery("#checkout-bar-in").animate({width:'+=50%'}); jQuery("#checkout-slider").animate({marginLeft:'-=' + checkoutWidth}, 800, function() { jQuery('body,html').animate({ scrollTop: 0 }, 800); }); return false; }); jQuery("a#checkout-back,a.checkout-back").click(function(){ jQuery("#shopping-cart-form").fadeOut(); var checkoutWidth = jQuery("#shopping-cart").width() + 30; jQuery("#checkout-bar-in").animate({width:'-=50%'}); jQuery("#checkout-slider").animate({marginLeft:'+=' + checkoutWidth}, 800, function() { jQuery('body,html').animate({ scrollTop: 0 }, 800); }); return false; }); /* "Top" button -------------------------------------------------------------- */ var scroll_timer; var displayed = false; var $message = jQuery('#back-to-top'); var $window = jQuery(window); $window.scroll(function () { window.clearTimeout(scroll_timer); scroll_timer = window.setTimeout(function () { if($window.scrollTop() <= 0) { displayed = false; $message.fadeOut(500); } else if(displayed == false) { displayed = true; $message.stop(true, true).fadeIn(500).click(function () { $message.fadeOut(500); }); } }, 400); }); jQuery('#top-link').click(function(e) { jQuery('html, body').animate({scrollTop:0}, 1000); return false; }); /* Accordion Navigation -------------------------------------------------------------- */ jQuery(function(){ if(!nav_accordion){ jQuery('.categories-group .wpsc_category_title .btn-show ').hide(); }else{ jQuery('.block.cats').addClass('acc_enabled'); jQuery('.categories-group').each(function(){ jQuery(this).has('.wpsc_top_level_categories').addClass('has-subnav'); jQuery(this).has('.current-cat').addClass('current-parent opened'); }); var nav_section = jQuery('.categories-group .wpsc_top_level_categories'); var nav_toggle_element = jQuery('.categories-group .wpsc_category_title .btn-show '); var nav_speed = 150; nav_toggle_element.click(function(){ if(jQuery(this).parent().parent().hasClass('opened')){ hideActiveSection(); }else{ showNext(jQuery(this)); } }); if(jQuery('.categories-group.opened').length > 0) { //jQuery('.categories-group.has-subnav').addClass('opened'); }else{ // If doesnt exitst opened point jQuery('.categories-group.has-subnav:first').addClass('opened').find('ul').show(); } function showNext(element) { hideActiveSection(); element.parent().parent().addClass('opened'); element.parent().next().show(nav_speed); } function hideActiveSection(){ jQuery('.categories-group.opened').removeClass('opened').find('.wpsc_top_level_categories').hide(nav_speed); } } }); /* ethemeContactForm -------------------------------------------------------------- */ var ethemeContactForm = jQuery('#ethemeContactForm'); var spinner = jQuery('.contactSpinner'); jQuery('.required-field').focus(function(){ jQuery(this).removeClass('validation-failed'); }); ethemeContactForm.find('button.button').click(function(e){ jQuery('#contactsMsgs').html(''); e.preventDefault(); spinner.show(); var errmsg; errmsg = ''; ethemeContactForm.find('.required-field').each(function(){ if(jQuery(this).val() == '') { errmsg = isRequired; jQuery(this).addClass('validation-failed'); } }); if(errmsg){ jQuery('#contactsMsgs').html('

' + errmsg + '

'); spinner.hide(); }else{ url = ethemeContactForm.attr('action'); data = ethemeContactForm.serialize(); data += '&contactSubmit=true'; jQuery.ajax({ url: url, method: 'GET', data: data, error: function() { jQuery('#contactsMsgs').html('

' + someerrmsg + '

'); spinner.hide(); }, success : function(){ jQuery('#contactsMsgs').html('

' + succmsg + '

'); spinner.hide(); ethemeContactForm.find("input[type=text], textarea").val(""); } }); } }); /* ethemeCommentForm -------------------------------------------------------------- */ var ethemeCommentForm = jQuery('#commentform'); ethemeCommentForm.find('#submit').click(function(e){ jQuery('#commentsMsgs').html(''); var errmsg; errmsg = ''; ethemeCommentForm.find('.required-field').each(function(){ if(jQuery(this).val() == '') { errmsg = isRequired; jQuery(this).addClass('validation-failed');; } }); if(errmsg){ e.preventDefault(); jQuery('#commentsMsgs').html('

' + errmsg + '

'); } }); /* "Close parent" button -------------------------------------------------------------- */ var closeParentBtn = jQuery('.close-parent'); closeParentBtn.click(function(e){ closeParent(this); }); /* sf-with-ul */ jQuery('.menu > ul li').each(function(){ jQuery(this).has('ul').find('>a').addClass('sf-with-ul'); }); /* Icons Preview ----------------------------------------------------------------*/ var modalDiv = jQuery('#iconModal'); jQuery('.the-icons li').click(function(){ var name = jQuery(this).find('i').attr('class'); modalDiv.find('i').each(function(){ jQuery(this).attr('class',name); }); modalDiv.find('#myModalLabel').text(name); modalDiv.modal(); }); jQuery('[rel="tooltip"]').tooltip(); /* Woo -------------------------------------------------------------- */ // Variations images changes jQuery('form.variations_form').on( 'found_variation', function( event, variation ) { var variation_image = variation.image_src; var variation_link = variation.image_link; var variation_title = variation.image_title; if(variation_image != '' && variation_link != '') { if (jQuery('.product_image').hasClass('zoom-enabled')) { jQuery('a#zoom1').swinxyzoom('load', variation_image, variation_link); jQuery('a#zoom1').attr('href', variation_link); jQuery('.lightbox-btn').attr('href', variation_link); //$('.product-thumbnails-slider li:eq(0) img').attr('src', variation_image); } else{ jQuery('a#zoom1').attr('href', variation_image); jQuery('.lightbox-btn').attr('href', variation_link); //$('.product-thumbnails-slider li:eq(0) img').attr('src', variation_image); } } }) // Reset product image .on( 'reset_image', function( event ) { var $product = jQuery(this).closest( '.product' ); var $product_img = $product.find( 'div.product_image' ); var o_src = $product_img.attr('data-img'); var o_href = $product_img.attr('data-original'); if(o_src != '' && o_href != '') { if (jQuery('.product_image').hasClass('zoom-enabled')) { jQuery('a#zoom1').swinxyzoom('load', o_src, o_href); jQuery('a#zoom1').attr('href', o_href); } else{ jQuery('a#zoom1').attr('href', o_src); } } } ); // Ajax add to cart jQuery('.etheme-simple-product').live('click', function() { // AJAX add to cart request var $thisbutton = jQuery(this); if ($thisbutton.is('.etheme-simple-product, .product_type_downloadable, .product_type_virtual')) { showPopup(); jQuery('#top-cart').addClass('updating'); popupOverlay = jQuery('.etheme-popup-overlay'); popupWindow = jQuery('.etheme-popup'); formAction = jQuery('#simple-product-form').attr('action'); var data = { quantity: jQuery('input[name=quantity]').val() }; // Trigger event jQuery('body').trigger('adding_to_cart'); // Ajax action jQuery.ajax({ url: formAction, data: data, method: 'POST', timeout: 10000, dataType: 'text', success: function(data) { jQuery('#top-cart').html(jQuery(data).find('#top-cart').html()); productImageSrc = jQuery('.main-image img').attr('src'); productImage = ''; productName = jQuery('.product_description_mainblock > h1').text(); cartHref = jQuery('#top-cart > a').attr('href'); popupHtml = productImage + ''+productName+'
' + successfullyAdded2; popupWindow.find('.etheme-popup-content').css('backgroundImage','none').html(popupHtml); jQuery('.cont-shop').one('click',function(){ hidePopup(popupOverlay,popupWindow); }); }, error: function(data) { popupWindow.find('.etheme-popup-content').css('backgroundImage','none').text('Something wrong'); } }); return false; } else { return true; } }); // Ajax add to cart (on list page) jQuery('.etheme_add_to_cart_button').live('click', function() { // AJAX add to cart request var $thisbutton = jQuery(this); if ($thisbutton.is('.product_type_simple, .product_type_downloadable, .product_type_virtual')) { if (!$thisbutton.attr('data-product_id')) return true; $thisbutton.removeClass('added'); $thisbutton.parent().parent().parent().parent().addClass('loading'); $thisbutton.after('
'); var data = { action: 'woocommerce_add_to_cart', product_id: $thisbutton.attr('data-product_id'), quantity: $thisbutton.attr('data-quantity'), }; // Trigger event jQuery('body').trigger( 'adding_to_cart', [ $thisbutton, data ] ); // Ajax action jQuery.post( woocommerce_params.ajax_url, data, function( response ) { if ( ! response ) return; var this_page = window.location.toString(); this_page = this_page.replace( 'add-to-cart', 'added-to-cart' ); if ( response.error && response.product_url ) { window.location = response.product_url; return; } // Redirect to cart option if ( woocommerce_params.cart_redirect_after_add == 'yes' ) { window.location = woocommerce_params.cart_url; return; } else { $thisbutton.parent().find('#floatingCirclesG').remove(); //fragments = response.fragments; cart_hash = response.cart_hash; jQuery('.widget_shopping_cart, .shop_table.cart, .updating, .cart_totals').fadeTo('400', '0.6').block({message: null, overlayCSS: {background: 'transparent url(' + woocommerce_params.ajax_loader_url + ') no-repeat center', opacity: 0.6 } } ); // Changes button classes $thisbutton.addClass('added').parent().parent().parent().after('

' + successfullyAdded + '

'); setTimeout(function() { $thisbutton.parent().parent().parent().parent().removeClass('loading'); $thisbutton.removeClass('added'); jQuery('.added-text').fadeOut(300); }, 3000) // Unblock jQuery('.widget_shopping_cart, .updating').stop(true).css('opacity', '1').unblock(); if (jQuery('.widget_shopping_cart').size()>0) { this_pageIe = AddUrlParameter(this_page, 'ei', (new Date()).getTime(), false); jQuery.get(this_pageIe, function(data) { var newCartHtml = jQuery(data).find('.widget_shopping_cart').html(); jQuery('.widget_shopping_cart').html(newCartHtml); }); } } }); return false; } else { return true; } }); /* Ajax Filter */ function ajaxProductLoad(url,blockId) { jQuery.ajax({ url: url, method: 'GET', timeout: 10000, dataType: 'text', success: function(data) { productLoaded(data,blockId); }, error: function(data) { alert('Error loading ajax content!'); window.location.reload(); } }); } function productLoaded(data,blockId) { //hide spinner jQuery('.grid_pagination_block').html(jQuery(data).find('.grid_pagination_block').html()); jQuery('#'+blockId).html(jQuery(data).find('#'+blockId).html()); jQuery('#default_products_page_container').html(jQuery(data).find('#default_products_page_container').html()); jQuery('*').css({'cursor':'auto'}); jQuery('.product-grid').removeClass('loading').find('#floatingCirclesG').remove(); productHover(); check_view_mod(); listSwitcher(); } if(ajaxFilterEnabled == 1) { jQuery('.widget_layered_nav a, .grid_pagination_block .grid_pagination a').live('click', function(event) { var url = jQuery(this).attr('href'); if (url == '') { url = jQuery(this).attr('value'); } blockId = jQuery(this).parent().parent().parent().attr('id'); jQuery('*').css({'cursor':'progress'}); jQuery('#default_products_page_container .product-grid').addClass('loading').prepend('
'); ajaxProductLoad(url,blockId); event.stopPropagation(); return false; }); } /* Testimonials Gallery */ jQuery('.testimonials-slider').cbpQTRotator(); /* Loader */ jQuery("#loader-status").fadeOut().remove(); jQuery("#loader").delay(300).fadeOut("slow").remove(); /* ----------------------------------------------------------------------------- */ jQuery('.more-views-arrow').on("mousedown", function() {event.preventDefault();}); /* banners on low resolutions */ if (window.innerWidth <= 480) { jQuery('.banner-transform').on("click", function() { console.log('clicked on banner!'); return false; }); // .on("click",function() {jQuery('.banner-transform .mask')}) } jQuery('.cloud-zoom').click(function(e){ e.preventDefault(); }); /* Isotope $portfolio = jQuery('.masonry'); jQuery(window).smartresize(function(){ $portfolio.isotope({ itemSelector: '.portfolio-item' }); }); jQuery('.portfolio-filters a').click(function(){ var selector = jQuery(this).attr('data-filter'); jQuery('.portfolio-filters a').removeClass('selected'); if(!jQuery(this).hasClass('selected')) { jQuery(this).addClass('selected'); } $portfolio.isotope({ filter: selector }); return false; }); setTimeout(function(){ jQuery('.portfolio').addClass('with-transition'); jQuery('.portfolio-item').addClass('with-transition'); },500); */ /* Load in view */ var progressBars = jQuery('.progress-bar'); progressBars.bind('inview', function (event, visible) { if (visible == true) { i = 0; progressBars.each(function () { i++; var el = jQuery(this); var width = jQuery(this).data('width'); setTimeout(function(){ el.find('div').animate({ 'width' : width + '%' },300); el.find('span').css({ 'opacity' : 1 }); },i*150, "easeOutCirc"); }); } }); productHover(); }); // End Ready /* Product Hover -------------------------------------------------------------- */ function showPopup(){ html = '
' jQuery('body').prepend(html); popupOverlay = jQuery('.etheme-popup-overlay'); popupWindow = jQuery('.etheme-popup'); popupOverlay.one('click',function(){ hidePopup(popupOverlay,popupWindow); }); } function hidePopup(popupOverlay,popupWindow){ popupOverlay.fadeOut(400); popupWindow.fadeOut(400).html(''); } function closeParent(el) { jQuery(el).parent().slideUp(100); } function productHover(){ jQuery('.img-hided').hover(function(){ if (window.innerWidth > 979) { jQuery(this).animate({ 'opacity' : 1 },200); } }, function(){ if (window.innerWidth > 979) { jQuery(this).animate({ 'opacity' : 0 },200); } }); imageTooltip(jQuery('.imageTooltip')); } function check_view_mod(){ var activeClass = 'switcher-active'; if(jQuery.cookie('products_page') == 'grid') { jQuery('#products-grid').removeClass('products-list').addClass('products-grid'); jQuery('.switchToGrid').addClass(activeClass); }else if(jQuery.cookie('products_page') == 'list') { jQuery('#products-grid').removeClass('products-grid').addClass('products-list'); jQuery('.switchToList').addClass(activeClass); }else{ if(view_mode_default == 'list_grid' || view_mode_default == 'list') { jQuery('.switchToList').addClass(activeClass); }else{ jQuery('.switchToGrid').addClass(activeClass); } } } function listSwitcher() { /* Listswitcher -------------------------------------------------------------- */ var activeClass = 'switcher-active'; var gridClass = 'products-grid'; var listClass = 'products-list'; jQuery('.switchToList').click(function(){ if(!jQuery.cookie('products_page') || jQuery.cookie('products_page') == 'grid'){ switchToList(); } }); jQuery('.switchToGrid').click(function(){ if(!jQuery.cookie('products_page') || jQuery.cookie('products_page') == 'list'){ switchToGrid(); } }); function switchToList(){ jQuery('.switchToList').addClass(activeClass); jQuery('.switchToGrid').removeClass(activeClass); jQuery('#products-grid').fadeOut(300,function(){ jQuery(this).removeClass(gridClass).addClass(listClass).fadeIn(300); jQuery.cookie('products_page', 'list'); }); } function switchToGrid(){ jQuery('.switchToGrid').addClass(activeClass); jQuery('.switchToList').removeClass(activeClass); jQuery('#products-grid').fadeOut(300,function(){ jQuery(this).removeClass(listClass).addClass(gridClass).fadeIn(300); jQuery.cookie('products_page', 'grid'); }); } } function hideLightbox(){ setTimeout(function(){ jQuery('.pp_woocommerce').remove(); jQuery('.pp_overlay').remove(); }, 1); } function AddUrlParameter(sourceUrl, parameterName, parameterValue, replaceDuplicates) { if ((sourceUrl == null) || (sourceUrl.length == 0)) sourceUrl = document.location.href; var urlParts = sourceUrl.split("?"); var newQueryString = ""; if (urlParts.length > 1) { var parameters = urlParts[1].split("&"); for (var i=0; (i < parameters.length); i++) { var parameterParts = parameters[i].split("="); if (!(replaceDuplicates && parameterParts[0] == parameterName)) { if (newQueryString == "") newQueryString = "?"; else newQueryString += "&"; newQueryString += parameterParts[0] + "=" + parameterParts[1]; } } } if (newQueryString == "") newQueryString = "?"; else newQueryString += "&"; newQueryString += parameterName + "=" + parameterValue; return urlParts[0] + newQueryString; };