????

Your IP : 3.14.131.240


Current Path : /home2/morganrand/backup.morganrand.com/wp-content/themes/wanderfuls/js/lib/
Upload File :
Current File : /home2/morganrand/backup.morganrand.com/wp-content/themes/wanderfuls/js/lib/sidr.js

!function(e){var t=!1,i=!1,n={isUrl:function(e){var t=new RegExp("^(https?:\\/\\/)?((([a-z\\d]([a-z\\d-]*[a-z\\d])*)\\.)+[a-z]{2,}|((\\d{1,3}\\.){3}\\d{1,3}))(\\:\\d+)?(\\/[-a-z\\d%_.~+]*)*(\\?[;&a-z\\d%_.~+=-]*)?(\\#[-a-z\\d_]*)?$","i");return t.test(e)?!0:!1},loadContent:function(e,t){e.html(t)},addPrefix:function(e){var t=e.attr("id"),i=e.attr("class");e.hasClass("fa")||("string"==typeof t&&""!==t&&e.attr("id",t.replace(/([A-Za-z0-9_.\-]+)/g,"sidr-id-$1")),"string"==typeof i&&""!==i&&"sidr-inner"!==i&&e.attr("class",i.replace(/([A-Za-z0-9_.\-]+)/g,"sidr-class-$1")),e.removeAttr("style"))},execute:function(n,s,r){"function"==typeof s?(r=s,s="sidr"):s||(s="sidr");var a,d,l,c=e("#"+s),f=e(c.data("body")),u=e("html"),p=c.outerWidth(!0),g=c.data("speed"),y=c.data("side"),m=c.data("displace"),v=c.data("onOpen"),h=c.data("onClose"),C="sidr"===s?"sidr-open":"sidr-open "+s+"-open";if("open"===n||"toggle"===n&&!c.is(":visible")){if(c.is(":visible")||t)return;if(i!==!1)return void o.close(i,function(){o.open(s)});t=!0,"left"===y?(a={left:p+"px"},d={left:"0px"}):(a={right:p+"px"},d={right:"0px"}),f.is("body")&&(l=u.scrollTop(),u.css("overflow-x","hidden").scrollTop(l)),m?f.addClass("sidr-animating").css({width:f.width(),position:"absolute"}).animate(a,g,function(){e(this).addClass(C)}):setTimeout(function(){e(this).addClass(C)},g),c.css("display","block").animate(d,g,function(){t=!1,i=s,"function"==typeof r&&r(s),f.removeClass("sidr-animating")}),v()}else{if(!c.is(":visible")||t)return;t=!0,"left"===y?(a={left:0},d={left:"-"+p+"px"}):(a={right:0},d={right:"-"+p+"px"}),f.is("body")&&(l=u.scrollTop(),u.removeAttr("style").scrollTop(l)),f.addClass("sidr-animating").animate(a,g).removeClass(C),c.animate(d,g,function(){c.removeAttr("style").hide(),f.removeAttr("style"),e("html").removeAttr("style"),t=!1,i=!1,"function"==typeof r&&r(s),f.removeClass("sidr-animating")}),h()}}},o={open:function(e,t){n.execute("open",e,t)},close:function(e,t){n.execute("close",e,t)},toggle:function(e,t){n.execute("toggle",e,t)},toogle:function(e,t){n.execute("toggle",e,t)}};e.sidr=function(t){return o[t]?o[t].apply(this,Array.prototype.slice.call(arguments,1)):"function"!=typeof t&&"string"!=typeof t&&t?void e.error("Method "+t+" does not exist on jQuery.sidr"):o.toggle.apply(this,arguments)},e.fn.sidr=function(t){var i=e.extend({name:"sidr",speed:200,side:"left",source:null,renaming:!0,body:"body",displace:!0,onOpen:function(){},onClose:function(){}},t),s=i.name,r=e("#"+s);if(0===r.length&&(r=e("<div />").attr("id",s).appendTo(e("body"))),r.addClass("sidr").addClass(i.side).data({speed:i.speed,side:i.side,body:i.body,displace:i.displace,onOpen:i.onOpen,onClose:i.onClose}),"function"==typeof i.source){var a=i.source(s);n.loadContent(r,a)}else if("string"==typeof i.source&&n.isUrl(i.source))e.get(i.source,function(e){n.loadContent(r,e)});else if("string"==typeof i.source){var d="",l=i.source.split(",");if(e.each(l,function(t,i){d+='<div class="sidr-inner">'+e(i).html()+"</div>"}),i.renaming){var c=e("<div />").html(d);c.find("*").each(function(t,i){var o=e(i);n.addPrefix(o)}),d=c.html()}n.loadContent(r,d)}else null!==i.source&&e.error("Invalid Sidr Source");return this.each(function(){var t=e(this),i=t.data("sidr");i||t.click(function(e){return o.toggle(s),!1})})}}(jQuery);