if(typeof os==="undefined")var os={};os.Plug={extend:function(a,b,c){var d=function(){};d.prototype=b.prototype;a.prototype=new d;a.prototype.constructor=a;a._super=b.prototype;for(var e in c)a.prototype[e]=c[e]}};os.Plug.config={Tabs:{MENU_EFFECT_SPEED:200},SlideShow:{SLIDE_EFFECT_SPEED:800,SLIDE_INTERVAL:5E3,DATA_SRC:"data-src"}};os.Plug.Core=function(){os.Plug.Core._super.init.apply(this,arguments)};
os.Plug.extend(os.Plug.Core,jQuery,{_create:function(){this.initialize.apply(this,arguments)},setContext:function(a){this.element=jQuery(a);this._this=a;return this},applySettings:function(a,b){b=b||{};for(var c in a)this[c]=typeof b[c]!=="undefined"?b[c]:a[c]},mixin:function(a,b){var c=this;b=b||false;for(var d in a)if(!c[d]||c[d]&&b)c[d]=a[d]},getObjectClass:function(a){return Object.prototype.toString.call(a).slice(8,-1)},returnWithinRange:function(a,b,c){return Math.max(Math.min(a,c),b)},getPosition:function(a){var b=
{x:0,y:0};for(a=a||this[0];a&&a.nodeName.toLowerCase()!=="html";){b.x+=a.offsetLeft;b.y+=a.offsetTop;a=a.offsetParent}return b}});os.Component=function(a,b){os.Component._super.constructor.apply(this,arguments);this.applySettings({name:"os.Component"},b)};os.Plug.extend(os.Component,os.Plug.Core,{});os.Module=function(a,b){os.Module._super.constructor.apply(this,arguments);this.applySettings({name:"os.Module",previousHeight:null},b)};
os.Plug.extend(os.Module,os.Plug.Core,{getDataTarget:function(a){a=this.element.find(a);var b=null;if(a.size()>0)b=a.attr("data-target");return b||null},showPanel:function(a){if(a){var b=this;this.adjustPanelSize(a,function(){var c=jQuery(a),d=c.attr(b.attributes.ORG_DISPLAY);d&&c.css({display:d});c.animate({opacity:1},{duration:this.menuEffectSpeed,queue:false,complete:function(){b.element.trigger({type:"menu-open",panelId:a})}})})}},hidePanel:function(a,b){b=b||function(){};var c=this;a?jQuery(a).animate({opacity:0},
{duration:this.menuEffectSpeed,queue:false,complete:function(){c.panel.children().hide();b();c.element.trigger({type:"menu-close",panelId:a})}}):b()},adjustPanelSize:function(a,b){b=b||function(){};var c=this;a=jQuery(a).css({opacity:this.currentPanel===a?1:0,display:"block"});if(this.animatePanel){c=this;this.trigger("before-inner-tab-changed");this.panel.height(this.currentTabHeight+"px").animate({height:a.attr("offsetHeight")},{duration:this.menuEffectSpeed,queue:false,complete:function(){c.trigger("inner-tab-changed");
jQuery(this).height("auto");c.setCurrentTabHeight();b()}})}else b()},setCurrentTabHeight:function(a){this.currentTabHeight=parseInt(a)||this.panel.attr("offsetHeight")}});
