idPanelObj=function(){var F,E,B,C,D={};idPanel=function(){arguments.callee.base.apply(this,arguments);this.getDrawer();var G=this;B(window,"scroll",function(H){if(G.container.css("position")=="absolute"){G.handleScroll(H)}})};idPanel.prototype.handleScroll=function(K){var M=F.widgets._scrollPos().y,L=M-(this.previousScrollPosition||0),G=E(window).height(),I=this.container.height(),J=parseInt(this.container.css("top"),10)-M,H=I+J;if(L>0){if(H<G){this.container.css("top",(G-I+M)+"px")}}else{if(L<0){if(J>0){this.container.css("top",M+"px")}}}this.previousScrollPosition=M};idPanel.prototype.showWith=function(J,H){H=(typeof (H)=="undefined")?{}:H;H.callback=("callback" in H)?H.callback:function(){};var K=(this.content.parent().css("visibility")=="visible");panelcontent=this.content.get(".c");var I=this.getMetrics(H);this.body.empty().append(J).css("visibility","hidden");this.content.addClass("blq-rst");F.dom.get(identity.app.getCSS("css_element_panel")).removeClass(identity.app.getCSS("css_class_panelNoHeader"));this.header.empty().append(this.body.get([".",identity.app.getCSS("css_class_panelContentHead")].join("")).remove()).css("visibility","hidden");if(this.header.length===0){F.dom.get(identity.app.getCSS("css_element_panel")).addClass(identity.app.getCSS("css_class_panelNoHeader"))}this.footer.empty().append(this.body.get([".",identity.app.getCSS("css_class_panelContentFoot")].join("")).remove()).css("visibility","hidden");var L=this.recalculateDimensions(K,I);if(K){this.content.css("width",[I.origwidth,"px"].join(""));this.content.parent().css("width",[I.origwidth,"px"].join(""));panelcontent.css("height",[I.origheight,"px"].join(""));panelcontent.css("overflow","hidden");this.body.css("display","none");this.header.css("display","none");this.footer.css("display","none");var G=this;this.morph(L.width,L.height,{duration:0.2,onComplete:function(){G.body.css("display","block").css("visibility","visible");G.header.css("display","block").css("visibility","visible");G.footer.css("display","block").css("visibility","visible");F.dom.get(identity.app.getCSS("css_element_panel")).parent().css("overflow","visible");H.callback()}})}else{this.body.css("visibility","visible");this.header.css("visibility","visible");this.footer.css("visibility","visible");panelcontent.css("height",L.height);this.content.css("width",L.width);F.dom.get(identity.app.getCSS("css_element_panel")).parent().css("overflow","visible");this.content.get([".",identity.app.getCSS("css_class_panelContent")].join("")).css("overflow","visible");H.callback()}};idPanel.prototype.morph=function(H,U,O){var V=this;this.show();O=(typeof (O)=="undefined")?{}:O;O.duration=("duration" in O)?O.duration:0.5;O.onComplete=("onComplete" in O)?O.onComplete:function(){};var R=function(){O.onComplete();var W=V.content.get([".",identity.app.getCSS("css_class_panelContent")].join(""))};var L=this.content.get([".",identity.app.getCSS("css_class_panelContent")].join(""));var G=[this.content,this.content.parent()];var S=this.content.parent();var P=F.anim.css(L,O.duration,{height:{to:U}},{});var J=[];for(var K=0;K<G.length;K++){J[K]=F.anim.css(G[K],O.duration,{width:{to:H}},{})}var Q=(parseInt(S.offset().top,10)+((L.height()-parseInt(U,10))/2));var I=(parseInt(S.offset().left,10)+((G[0].width()-parseInt(H,10))/2));Q=(Q<0)?0:Q;I=(I<0)?0:I;var N=F.anim.css(S,O.duration,{top:{to:[Q,"px"].join("")}},{});var M=F.anim.css(S,O.duration,{left:{to:[I,"px"].join("")}},{});var T;if((parseInt(H,10)!=G[0].width())&&(parseInt(U,10)!=L.height())){T=new F.anim.Timeline([[J[0]],[J[1]],[P],[N],[M]])}else{if(parseInt(H,10)!=G[0].width()){T=new F.anim.Timeline([[J[0]],[J[1]],[M]])}else{if(parseInt(U,10)!=L.height()){T=new F.anim.Timeline([[P],[N]])}}}if(typeof T!="undefined"){F.events.addListener(T,"complete",function(){R()});T.start()}else{R()}};idPanel.prototype.collapse=function(G){if(typeof G=="undefined"){var G={}}if(!("onComplete" in G)){G.onComplete=function(){}}this.hideContent();this.morph(100,65,{duration:0.2,onComplete:G.onComplete})};idPanel.prototype.getMetrics=function(J){var I=this.contentIsVisible();var H=this.isVisible();if(!H){}this.showContent();this.show();J=(typeof (J)=="undefined")?{}:J;J.width=("width" in J)?J.width:"355px";J.height=("height" in J)?J.height:"auto";var K={};var G=this.content.get([".",identity.app.getCSS("css_class_panelContent")].join(""));K.maxheight=F.dom.get(window).height()-50;K.maxwidth=F.dom.get(window).width()-50;K.origheight=G.height();K.origwidth=this.container.width();K.requiredheight=J.height;K.requiredwidth=J.width;if(!H){this.hide()}if(!I){this.hideContent()}if(this.container.css("visibility")=="hidden"){}return K};idPanel.prototype.recalculateDimensions=function(M,L){var K=this.contentIsVisible();var I=this.isVisible();this.showContent();this.show();var H=this.content.get([".",identity.app.getCSS("css_class_panelContent")].join(""));H.css("height",L.requiredheight);this.content.css("width",L.requiredwidth).parent().css("width",L.requiredwidth);if(!M){this.show()}var G="";if(L.requiredwidth=="retain"){G=L.origwidth}else{if(L.requiredwidth=="auto"){G=[this.content.width(),"px"].join("")}else{G=L.requiredwidth}}if(parseInt(G,10)>L.maxwidth){G=L.maxwidth;H.addClass("xscroll")}this.content.css("width",[parseInt(G,10),"px"].join(""));var J="";if(L.requiredheight=="retain"){J=L.origheight}else{if(L.requiredheight=="auto"){J=H.height()}else{J=L.requiredheight}}if(!I){this.hide()}if(!K){this.hideContent()}return{width:[parseInt(G,10),"px"].join(""),height:[parseInt(J,10),"px"].join("")}};idPanel.prototype.hideContent=function(){this.header.css("display","none");this.body.css("display","none");this.footer.css("display","none")};idPanel.prototype.showContent=function(){this.header.css("display","block");this.body.css("display","block");this.footer.css("display","block")};idPanel.prototype.contentIsVisible=function(){return(this.body.css("display")=="block")};idPanel.prototype.isVisible=function(){return(this.content.parent().css("visibility")=="visible")};idPanel.prototype.hasDrawer=function(){return(this.drawer)?true:false};idPanel.prototype.getDrawer=function(){if(!this.drawer){this.drawer=new A(this)}return this.drawer};var A=function(I){this._panel=I;this._state="";this._timeline=new F.anim.Timeline([]);this._windowResizeListenerId="";this._scrollListenerId="";var H=this;if(!E(".id-panel-drawer").length){var G=F.dom.create('<div class="id-panel-drawer-container glowNoMask"><div class="id-panel-drawer"><div class="topbar"></div><div class="content"><div class="hd"></div><a href="#" class="close">Close</a><div class="bd"></div><div class="ft"></div></div><div class="bottombar"></div></div></div>');E("body").append(G);B(".id-panel-drawer .close","click",function(J){J.preventDefault();H.close()},this);this._drawer=G.get(".id-panel-drawer");this._container=G;this.hide()}else{this._container=E(".id-panel-drawer-container");this._drawer=E(".id-panel-drawer")}};A.prototype._width=307;A.prototype.open=function(I){if(this._state=="closing"){this._timeline.stop();this._state="closed"}if(this._state=="closed"){var G=F.anim.css(this._drawer,0.5,{left:{from:[this._width,"px"].join(""),to:"0px"}},{tween:F.tweens.easeOut()});this._timeline=new F.anim.Timeline([G]);var H=this;F.events.addListener(this._timeline,"complete",function(){H._state="open";if(typeof I=="object"&&"onComplete" in I){I.onComplete()}});this._container.css("display","block");this._timeline.start();this._state="opening"}else{if(this._state=="open"&&typeof I=="object"&&"onComplete" in I){I.onComplete()}}return this};A.prototype.close=function(I){if(this._state=="opening"){this._timeline.stop();this._state="open"}if(this._state=="open"){var G=F.anim.css(this._drawer,0.5,{left:{to:[this._width,"px"].join("")}},{tween:F.tweens.easeIn()});this._timeline=new F.anim.Timeline([G]);var H=this;F.events.addListener(this._timeline,"complete",function(){H._container.css("display","none");H._state="closed";if(typeof I=="object"&&"onComplete" in I){I.onComplete()}});this._timeline.start();this._state="closing"}else{if(this._state=="closed"&&typeof I=="object"&&"onComplete" in I){I.onComplete()}}return this};A.prototype.show=function(){if(this._state!="open"){this._timeline.stop();this._container.css("display","block");this._drawer.css("left","0");this._state="open"}return this};A.prototype.hide=function(){if(this._state!="closed"){this._timeline.stop();this._container.css("display","none");this._drawer.css("left",[this._width,"px"].join(""));this._state="closed"}return this};A.prototype.update=function(M){C(this._windowResizeListenerId);C(this._scrollListenerId);this._content=M;var G=this._drawer.get(".bd");var J=this._drawer.get(".hd");var I=this._drawer.get(".ft");G.css("display","none");G.empty();J.empty();I.empty();G.html(F.dom.create(this._content).html());var K=G.get(".hd");var L=G.get(".ft");if(K.length){J.html(K.remove().html())}if(L.length){I.html(L.remove().html())}this.setPosition();G.css("display","block");var H=this;this._windowResizeListenerId=B(window,"resize",function(){H.setPosition()},H);this._scrollListenerId=B(window,"scroll",function(N){H.setPosition()});return this};A.prototype.setPosition=function(){var H=this._panel.content.parent();var L=this._panel.content.get(".c");var G=this._drawer.get(".content");if(this._state=="open"||this._state=="closed"){this._container.css("display","block");var J=(L.height()-L.get(".panel-hd").height());var I=(J-this._drawer.get(".topbar").height()-this._drawer.get(".bottombar").height());I=(I<0)?0:I;this._container.css("width",[this._width,"px"].join("")).css("z-index",H.css("z-index")-1).css("position","absolute").css("top",[L.get(".panel-hd").offset().top+L.get(".panel-hd").height(),"px"].join("")).css("left",[L.offset().left-this._width,"px"].join("")).css("width",[this._width,"px"].join("")).css("height",[J,"px"].join(""));this._drawer.css("padding",[this._drawer.get(".topbar").height(),"px 0 ",this._drawer.get(".bottombar").height(),"px 0"].join("")).css("width",[this._width,"px"].join("")).css("height",[I,"px"].join("")).css("top","0").css("left",[(this._state=="open")?"0":this._width,"px"].join("")).css("position","relative");G.height(0);G.height(this._drawer.height());var K=(G.height()-G.get(".hd").height()-G.get(".ft").height()-2);K=(K<0)?0:K;G.get(".bd").height([K,"px"].join(""))}if(this._state=="closed"){this._container.css("display","none");this._drawer.css("left",[this._width,"px"].join(""))}return this};idPanel.prototype.drawer=false;D.init=function(G){F=G;E=F.dom.get;B=F.events.addListener;C=F.events.removeListener;F.lang.extend(idPanel,F.widgets.Panel,idPanel.prototype)};return D}();idInfoPanelObj=function(){var D,C,A,B={};idInfoPanel=function(){arguments.callee.base.apply(this,arguments);this.container.width(280)};idInfoPanel.prototype.setHeight=function(){};idInfoPanel.prototype.setOffsetInContext=function(E){this.opts.offsetInContext=E};B.init=function(E){D=E;C=D.dom.get;A=D.events.addListener;removeListener=D.events.removeListener;D.lang.extend(idInfoPanel,D.widgets.InfoPanel,idInfoPanel.prototype)};return B}();