/** * @category Mana * @package Mana_Core * @copyright Copyright (c) http://www.manadev.com * @license http://www.manadev.com/license Proprietary License */ var Mana=Mana||{};!function(e,t,n){e.extend(Mana,{_singletons:{},_defines:{jquery:e,prototype:t},define:function(e,t,n){var o=Mana._resolveDependencyNames(t);return Mana._define(e,o.names,function(){return n.apply(this,Mana._resolveDependencies(arguments,o.deps))})},require:function(e,t){var n=Mana._resolveDependencyNames(e);return Mana._define(null,n.names,function(){return t.apply(this,Mana._resolveDependencies(arguments,n.deps))})},_define:function(t,n,o){var i=[];e.each(n,function(e,t){i.push(Mana._resolveDefine(t))});var r=o.apply(this,i);return t&&(Mana._defines[t]=r),r},_resolveDefine:function(e){return Mana._defines[e]===n&&console.warn("'"+e+"' is not defined"),Mana._defines[e]},requireOptional:function(e,t){var n=Mana._resolveDependencyNames(e);return Mana._define(null,n.names,function(){return t.apply(this,Mana._resolveDependencies(arguments,n.deps))})},_resolveDependencyNames:function(t){var n=[],o=[];return e.each(t,function(e,t){var i=t.indexOf(":"),r={name:t,resolver:""};-1!=i&&(r={name:t.substr(i+1),resolver:t.substr(0,i)}),Mana._resolveDependencyName(r),n.push(r.name),o.push(r)}),{names:n,deps:o}},_resolveDependencies:function(t,n){return e.each(t,function(e,o){t[e]=Mana._resolveDependency(n[e],o)}),t},_resolveDependencyName:function(){},_resolveDependency:function(e,t){if(t!==n)switch(e.resolver){case"singleton":return Mana._singletons[e.name]===n&&(Mana._singletons[e.name]=new t),Mana._singletons[e.name]}return t}})}(jQuery,$);var m_object_initializing=!1;!function(undefined){var fnTest=/xyz/.test(function(){})?/\b_super\b/:/.*/;Mana.Object=function(){},Mana.Object.extend=function(className,prop){prop===undefined&&(prop=className,className=undefined);var _super=this.prototype;m_object_initializing=!0;var prototype=new this;m_object_initializing=!1;for(var name in prop)prototype[name]="function"==typeof prop[name]&&"function"==typeof _super[name]&&fnTest.test(prop[name])?function(e,t){return function(){var n=this._super;this._super=_super[e];var o=t.apply(this,arguments);return this._super=n,o}}(name,prop[name]):prop[name];var Object;return className===undefined?Object=function(){!m_object_initializing&&this._init&&this._init.apply(this,arguments)}:eval("Object = function "+className.replace(/\//g,"_")+"() { if (!m_object_initializing && this._init) this._init.apply(this, arguments); };"),Object.prototype=prototype,Object.prototype.constructor=Object,Object.extend=arguments.callee,Object}}(),Mana.define("Mana/Core",["jquery"],function(e){return Mana.Object.extend("Mana/Core",{getClasses:function(e){return e.className&&e.className.split?e.className.split(/\s+/):[]},getPrefixedClass:function(t,n){var o="";return e.each(this.getClasses(t),function(e,t){return 0==t.indexOf(n)?(o=t.substr(n.length),!1):void 0}),o},arrayRemove:function(e,t,n){var o=e.slice((n||t)+1||e.length);return e.length=0>t?e.length+t:t,e.push.apply(e,o)},getBlockAlias:function(e,t){var n;return 0===(n=t.indexOf(e+"-"))?t.substr((e+"-").length):t},count:function(t){var n=0;return e.each(t,function(){n++}),n},isFunction:function(e){return!!(e&&e.constructor&&e.call&&e.apply)},isString:function(e){return"[object String]"==Object.prototype.toString.call(e)}})}),Mana.define("Mana/Core/Config",["jquery"],function(e){return Mana.Object.extend("Mana/Core/Config",{_init:function(){this._data={debug:!1,showOverlay:!0,showWait:!0}},getData:function(e){return this._data[e]},setData:function(e,t){return this._data[e]=t,this},set:function(t){return e.extend(this._data,t),this},getBaseUrl:function(e){return this.getData(0==e.indexOf(this.getData("url.base"))?"url.base":"url.secureBase")}})}),Mana.define("Mana/Core/Json",["jquery","singleton:Mana/Core"],function(e,t){return Mana.Object.extend("Mana/Core/Json",{parse:function(t){return e.parseJSON(t)},stringify:function(e){return Object.toJSON(e)},decodeAttribute:function(n){if(t.isString(n)){var o=n.split('"'),i=[];e.each(o,function(e,t){i.push(t.replace(/'/g,'"'))});var r=i.join("'");return this.parse(r)}return n}})}),Mana.define("Mana/Core/Utf8",[],function(){return Mana.Object.extend("Mana/Core/Utf8",{decode:function(e){var t=[],n=0,o=0,i=0,r=0,a=0;for(e+="";ni?(t[o++]=String.fromCharCode(i),n++):i>191&&224>i?(r=e.charCodeAt(n+1),t[o++]=String.fromCharCode((31&i)<<6|63&r),n+=2):(r=e.charCodeAt(n+1),a=e.charCodeAt(n+2),t[o++]=String.fromCharCode((15&i)<<12|(63&r)<<6|63&a),n+=3);return t.join("")}})}),Mana.define("Mana/Core/Base64",["singleton:Mana/Core/Utf8"],function(e){return Mana.Object.extend("Mana/Core/Base64",{encode:function(e){for(var t,n,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",i="",r=e.length,a=0;r-->0;){if(t=e.charCodeAt(a++),i+=o.charAt(t>>2&63),r--<=0){i+=o.charAt(t<<4&63),i+="==";break}if(n=e.charCodeAt(a++),i+=o.charAt(63&(t<<4|n>>4&15)),r--<=0){i+=o.charAt(n<<2&63),i+="=";break}t=e.charCodeAt(a++),i+=o.charAt(63&(n<<2|t>>6&3)),i+=o.charAt(63&t)}return i},decode:function(t){var n,o,i,r,a,c,s,u,l="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",d=0,h=0,p="",f=[];if(!t)return t;t+="";do r=l.indexOf(t.charAt(d++)),a=l.indexOf(t.charAt(d++)),c=l.indexOf(t.charAt(d++)),s=l.indexOf(t.charAt(d++)),u=r<<18|a<<12|c<<6|s,n=u>>16&255,o=u>>8&255,i=255&u,f[h++]=64==c?String.fromCharCode(n):64==s?String.fromCharCode(n,o):String.fromCharCode(n,o,i);while(dt.sortOrder?1:0}),this},off:function(n,o,r){this._eventHandlers[n]===i&&(this._eventHandlers[n]=[]);var a=-1;e.each(this._eventHandlers[n],function(e,t){return t.target==o&&t.callback==r?(a=e,!1):!0}),-1!=a&&t.arrayRemove(this._eventHandlers[n],a)},setContent:function(t){if("string"!=e.type(t)){if(!(t.content&&this.getId()&&t.content[this.getId()]))return this;t=t.content[this.getId()]}var o=n.beginGeneratingBlocks(this);return t=e(t),e(this.getElement()).replaceWith(t),this.setElement(t[0]),n.endGeneratingBlocks(o),this},getData:function(e){return this._data[e]},setData:function(e,t){return this._data[e]=t,this},getText:function(e){return this._text[e]===i&&(this._text[e]=this.$().data(e+"-text")),this._text[e]},getJsonData:function(e,t){return this._json[e]===i&&(this._json[e]=o.decodeAttribute(this.$().data(e))),t===i?this._json[e]:this._json[e][t]}})}),Mana.define("Mana/Core/PopupBlock",["jquery","Mana/Core/Block","singleton:Mana/Core/Layout"],function(e,t,n){return t.extend("Mana/Core/PopupBlock",{prepare:function(e){var t=this;this._host=e.host,this.$().find(".btn-close").on("click",function(){return t._close()})},_close:function(){return n.hidePopup(),!1}})}),Mana.define("Mana/Core/PageBlock",["jquery","Mana/Core/Block","singleton:Mana/Core/Config"],function(e,t,n){return t.extend("Mana/Core/PageBlock",{_init:function(){this._defaultOverlayFadeout={overlayTime:0,popupTime:0,callback:null},this._overlayFadeout=this._defaultOverlayFadeout,this._super()},_subscribeToHtmlEvents:function(){function t(){o||(o=!0,n.resize(),o=!1)}var n=this,o=!1;return this._super().on("bind",this,function(){e(window).on("load",t),e(window).on("resize",t)}).on("unbind",this,function(){e(window).off("load",t),e(window).off("resize",t)})},_subscribeToBlockEvents:function(){return this._super().on("load",this,function(){this.resize()})},resize:function(){this.trigger("resize",{},!1,!0)},showOverlay:function(t,n){this._overlayFadeout=n||this._defaultOverlayFadeout;var o=e(t?'
':'
');return o.appendTo(this.getElement()),o.css({left:0,top:0}).width(e(document).width()).height(e(document).height()),o},hideOverlay:function(){var t=this;return e(".m-overlay").fadeOut(this._overlayFadeout.overlayTime,function(){e(".m-overlay").remove(),t._overlayFadeout.callback&&t._overlayFadeout.callback(),t._overlayFadeout=t._defaultOverlayFadeout}),this},showWait:function(){return e("#m-wait").show(),this},hideWait:function(){return e("#m-wait").hide(),this},getShowDebugMessages:function(){return n.getData("debug")},getShowOverlay:function(){return n.getData("showOverlay")},getShowWait:function(){return n.getData("showWait")}})}),Mana.require(["jquery","singleton:Mana/Core/Layout","singleton:Mana/Core/Ajax"],function(e,t,n){function o(){var e=t.beginGeneratingBlocks();t.endGeneratingBlocks(e)}e(function(){o(),n.startIntercepting()})}),Mana.require(["jquery"],function(e){var t={xsmall:479,small:599,medium:770,large:979,xlarge:1199};Mana.rwdIsMobile=!1,e(function(){window.enquire&&enquire.register("screen and (max-width: "+t.medium+"px)",{match:function(){Mana.rwdIsMobile=!0,e(document).trigger("m-rwd-mobile")},unmatch:function(){Mana.rwdIsMobile=!1,e(document).trigger("m-rwd-wide")}})})}),function(e){var t={},n={};e.__=function(n){if("string"==typeof n){var o=arguments;return o[0]=t[n]?t[n]:n,e.vsprintf(o)}t=e.extend(t,n)},e.options=function(t){return"string"==typeof t?n[t]:(n=e.extend(!0,n,t),void e(document).trigger("m-options-changed"))},e.dynamicUpdate=function(t){t&&e.each(t,function(t,n){e(n.selector).html(n.html)})},e.dynamicReplace=function(t,n,o){t&&e.each(t,function(t,i){var r=e(t);if(r.length){var a=e(r[0]);r.length>1&&r.slice(1).remove(),a.replaceWith(o?e.utf8_decode(i):i)}else if(n)throw"There is no content to replace."})},e.errorUpdate=function(t,n){t||(t="#messages");var o=e(t);o.length?o.html('"):alert(n)},e.arrayRemove=function(e,t,n){var o=e.slice((n||t)+1||e.length);return e.length=0>t?e.length+t:t,e.push.apply(e,o)},e.mViewport=function(){var e="CSS1Compat"==document.compatMode;return{l:window.pageXOffset||(e?document.documentElement.scrollLeft:document.body.scrollLeft),t:window.pageYOffset||(e?document.documentElement.scrollTop:document.body.scrollTop),w:window.innerWidth||(e?document.documentElement.clientWidth:document.body.clientWidth),h:window.innerHeight||(e?document.documentElement.clientHeight:document.body.clientHeight)}},e.mStickTo=function(t,n){var o=e(t).offset(),i=e.mViewport(),r=o.top+t.offsetHeight,a=o.left+(t.offsetWidth-n.outerWidth())/2;r+n.outerHeight()>i.t+i.h&&(r=o.top-n.outerHeight()),a+n.outerWidth()>i.l+i.w&&(a=o.left+t.offsetWidth-n.outerWidth()),n.css({left:a+"px",top:r+"px"})},e.fn.mMarkAttr=function(e,t){return t?this.attr(e,e):this.removeAttr(e),this},e(function(){try{window.mainNav&&window.mainNav("nav",{show_delay:"100",hide_delay:"100"})}catch(e){}}),e.base64_decode=function(t){var n,o,i,r,a,c,s,u,l="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",d=0,h=0,p="",f=[];if(!t)return t;t+="";do r=l.indexOf(t.charAt(d++)),a=l.indexOf(t.charAt(d++)),c=l.indexOf(t.charAt(d++)),s=l.indexOf(t.charAt(d++)),u=r<<18|a<<12|c<<6|s,n=u>>16&255,o=u>>8&255,i=255&u,f[h++]=64==c?String.fromCharCode(n):64==s?String.fromCharCode(n,o):String.fromCharCode(n,o,i);while(di?(t[o++]=String.fromCharCode(i),n++):i>191&&224>i?(r=e.charCodeAt(n+1),t[o++]=String.fromCharCode((31&i)<<6|63&r),n+=2):(r=e.charCodeAt(n+1),a=e.charCodeAt(n+2),t[o++]=String.fromCharCode((15&i)<<12|(63&r)<<6|63&a),n+=3);return t.join("")};var o={overlayTime:500,popupTime:1e3,callback:null};e.mSetPopupFadeoutOptions=function(e){o=e},e.fn.extend({mPopup:function(t,n){var o=e.extend({fadeOut:{overlayTime:0,popupTime:500,callback:null},fadeIn:{overlayTime:0,popupTime:500,callback:null},overlay:{opacity:.2},popup:{contentSelector:"."+t+"-text",containerClass:"m-"+t+"-popup-container",top:100}},n);e(this).live("click",function(){if(e.mPopupClosing())return!1;var t=e(o.popup.contentSelector).html();e.mSetPopupFadeoutOptions(o.fadeOut);var n=e('
');return n.appendTo(document.body),n.css({left:0,top:0}).width(e(document).width()).height(e(document).height()),n.animate({opacity:o.overlay.opacity},o.fadeIn.overlayTime,function(){e("#m-popup").css({width:"auto",height:"auto"}).html(t).addClass(o.popup.containerClass).css("top",(e(window).height()-e("#m-popup").outerHeight())/2-o.popup.top+e(window).scrollTop()+"px").css("left",(e(window).width()-e("#m-popup").outerWidth())/2+e(window).scrollLeft()+"px");e("#m-popup").height();e("#m-popup").show().height(0),e("#m-popup").hide().css({height:"auto"});var n={left:e("#m-popup").css("left"),top:e("#m-popup").css("top"),width:e("#m-popup").width()+"px",height:e("#m-popup").height()+"px"};e("#m-popup").children().each(function(){e(this).css({width:e("#m-popup").width()+e(this).width()-e(this).outerWidth()+"px",height:e("#m-popup").height()+e(this).height()-e(this).outerHeight()+"px"})}),e("#m-popup").css({top:e(window).height()/2-o.popup.top+e(window).scrollTop()+"px",left:e(window).width()/2+e(window).scrollLeft()+"px",width:"0px",height:"0px"}).show(),e("#m-popup").animate(n,o.fadeIn.popupTime,function(){o.fadeIn.callback&&o.fadeIn.callback()})}),!1})}});var i=!1;e.mPopupClosing=function(e){return void 0!==e&&(i=e),i},e.mClosePopup=function(){return e.mPopupClosing(!0),e(".m-popup-overlay").fadeOut(o.overlayTime,function(){e(".m-popup-overlay").remove(),e("#m-popup").fadeOut(o.popupTime,function(){o.callback&&o.callback(),e.mPopupClosing(!1)})}),!1}}(jQuery);