(function(){var g="gapjumper.com",G=window[g],C=G.controls;C[g+":accordion"]={initializer:function(){var E=G.xpath.evaluate("div",this);for(var B=0,A=E.length;B<A;B++){if(!E[B].controlType){G.main.init(E[B],g+":accordionItem")}}var D=this.properties.selectedIndex;for(var B=0,A=E.length;B<A;B++){this.callMethod((B==D)?"open":"close",E[B])}this.setProperty("previousIndex",D);this.setProperty("initialized",true);G.layoutManager.addCallback(this.controlClass.methods.update,this)},destructor:function(){G.layoutManager.removeCallback(this.controlClass.methods.update,this)},template:[{div:{"class":"gapjumper-accordion"}},[{content:{}}]],properties:{initialized:{"default":false},border:{set:function(A){this.style.border=A}},duration:{"default":300},curve:{"default":G.animation.curve.sine},height:{set:function(A){if(this.properties.initialized&&!this.properties.animationActive){this.callMethod("updateHeight",this.callMethod("getComputedBodyHeight"))}}},contentHeight:{"default":"auto",set:function(A){if(this.properties.initialized){this.properties.height=null;if(this.getProperty("open")){this.callMethod("updateHeight",A)}}}},width:{"default":"200px",set:function(A){this.style.width=A}},previousIndex:{},selectedItem:{get:function(){return this.getProperty("childControls")[this.getProperty("selectedIndex")]}},selectedIndex:{"default":0,set:function(A){if(this.getProperty("initialized")&&(A!=this.getProperty("previousIndex"))){var B=this.getProperty("childControls");this.callMethod("close",B[this.getProperty("previousIndex")]);this.callMethod("open",B[A]);this.setProperty("previousIndex",A)}}},animationActive:{"default":false},animate:{"default":true}},methods:{updateHeight:function(A){this.getProperty("selectedItem").getProperty("body").style.height=A},update:function(){if(this.getProperty("height")&&!this.properties.animationActive){var B=this.callMethod("getComputedBodyHeight");var A=this.getProperty("selectedItem").getProperty("body").offsetHeight;if(A!=parseInt(B)){this.callMethod("updateHeight",B)}}},getComputedBodyHeight:function(){var E;if(this.getProperty("height")){var D=0;var I=this.getProperty("childControls");for(var B=0,A=I.length;B<A;B++){D+=I[B].getProperty("head").offsetHeight}this.style.height=this.getProperty("height");E=this.clientHeight-D;if(E<0){E="1px"}else{E=E+"px"}this.style.height=""}else{var H=this.getProperty("selectedItem");H.style.height=G.main.browser.quirks?H.offsetHeight+"px":H.clientHeight+"px";var F=H.getProperty("body").style.height;H.getProperty("body").style.height=this.properties.contentHeight;E=H.getProperty("body").offsetHeight+"px";H.getProperty("body").style.height=F;H.style.height=""}return E},getIndex:function(E){var D=this.getProperty("childControls");for(var B=0,A=D.length;B<A;B++){if(E==D[B]){return B}}},open:function(F){var E=F.getProperty("body");if(!this.getProperty("initialized")||!this.getProperty("animate")){E.style.overflow="";this.callMethod("updateHeight",this.properties.height?this.callMethod("getComputedBodyHeight"):this.getProperty("contentHeight"));E.scrollTop=F.getProperty("scrollPosition");if(E.style.position){E.style.position=""}}else{var D=this;var A=this.callMethod("getComputedBodyHeight");var B=window["gapjumper.com"].main.browser.quirks&&window["gapjumper.com"].main.browser.ie;var I=A,H="0px";if(B){H="2px";I=(parseInt(A)-2)+"px"}this.properties.animationActive=true;G.animation.add({element:E,property:"height",duration:this.getProperty("duration"),from:H,to:I,curve:this.getProperty("curve"),onstart:function(){if(E.style.position){E.style.position=""}},callback:function(){if(B){E.style.height=A}E.style.overflow="auto";E.scrollTop=F.getProperty("scrollPosition");if(!D.properties.height){D.callMethod("updateHeight",D.getProperty("contentHeight"))}D.setProperty("animationActive",false)}})}},close:function(F){var E=F.getProperty("body");if(!this.getProperty("initialized")||!this.getProperty("animate")){F.setProperty("scrollPosition",E.scrollTop);E.style.overflow="hidden";if(!this.getProperty("initialized")&&G.main.browser.ie){E.style.position="absolute"}if(window["gapjumper.com"].main.browser.quirks&&window["gapjumper.com"].main.browser.ie){E.style.height="1px";E.style.position="absolute"}else{E.style.height="0px"}}else{if(E.style.position){E.style.position=""}F.setProperty("scrollPosition",E.scrollTop);var A=E.offsetHeight;E.style.overflow="hidden";var D=this;var B=window["gapjumper.com"].main.browser.quirks&&window["gapjumper.com"].main.browser.ie;var I="0px",H=A+"px";if(B){H=(A-2)+"px";I="2px"}this.properties.animationActive=true;G.animation.add({element:E,property:"height",duration:this.getProperty("duration"),from:H,to:I,curve:this.getProperty("curve"),callback:function(){if(B){E.style.position="absolute"}D.setProperty("animationActive",false)}})}}}};C[g+":accordionItem"]={initializer:function(){G.utils.disableSelection(this.getProperty("head"));this.setProperty("initialized",true)},template:[{div:{"class":"gapjumper-accordionItem"}},[{div:{"class":"gapjumper-accordionItem-head"}},[{label:{"class":"gapjumper-accordionItem-title"}}],{div:{"class":"gapjumper-accordionItem-body"}},[{content:{}}]]],properties:{initialized:{"default":false},head:{get:function(){if(!this.properties.head){this.properties.head=G.xpath.evaluate("div",this)[0]}return this.properties.head}},body:{get:function(){if(!this.properties.body){this.properties.body=G.xpath.evaluate("div",this)[1]}return this.properties.body}},title:{set:function(A){this.getProperty("head").getElementsByTagName("label")[0].innerHTML=A}},scrollPosition:{"default":0}},handlers:{mousedown:function(B){if(!this.getProperty("parentControl").getProperty("animationActive")){if(G.dom.isDescendantOrSelf(B.target,this.getProperty("head"))){var A=this.getProperty("parentControl").callMethod("getIndex",this);this.getProperty("parentControl").setProperty("selectedIndex",A)}}}}};C[g+":panel"]={initializer:function(){G.utils.disableSelection(this.getProperty("head"));this.callMethod(this.properties.open?"open":"close");this.setProperty("initialized",true);G.layoutManager.addCallback(this.controlClass.methods.update,this)},destructor:function(){G.layoutManager.removeCallback(this.controlClass.methods.update,this)},template:[{div:{"class":"gapjumper-panel"}},[{div:{"class":"gapjumper-panel-head"}},[{label:{"class":"gapjumper-panel-title"}}],{div:{"class":"gapjumper-panel-body"}},[{content:{}}]]],properties:{initialized:{"default":false},head:{get:function(){if(!this.properties.head){this.properties.head=G.xpath.evaluate("div",this)[0]}return this.properties.head}},body:{get:function(){if(!this.properties.body){this.properties.body=G.xpath.evaluate("div",this)[1]}return this.properties.body}},open:{"default":true,set:function(A){if(this.properties.initialized){if(A){this.callMethod("open")}else{this.callMethod("close")}}}},title:{set:function(A){this.getProperty("head").getElementsByTagName("label")[0].innerHTML=A}},border:{set:function(A){this.style.border=A}},dimensionDiv:{},height:{set:function(B){if(B=="auto"){this.properties.height=null}else{if(!this.properties.dimensionDiv){var A=document.createElement("div");this.setProperty("dimensionDiv",A);A.style.visibility="hidden"}if(this.properties.open&&!this.properties.animationActive&&this.properties.initialized){this.callMethod("updateHeight",this.callMethod("getComputedBodyHeight"))}}}},width:{"default":"200px",set:function(A){this.style.width=A}},contentHeight:{"default":"auto",set:function(A){if(this.properties.initialized){this.properties.height=null;if(this.getProperty("open")){this.callMethod("updateHeight",A)}}}},animate:{"default":true},animationActive:{"default":false},scrollPosition:{"default":0}},methods:{getComputedBodyHeight:function(){var B;if(this.getProperty("height")){if(G.main.browser.gecko){var A=this.properties.dimensionDiv;A.style.height=this.properties.height;if(this.properties.border&&G.main.browser.quirks){A.style.border=this.properties.border;A.style.mozBoxSizing="borderBox"}this.parentNode.appendChild(A);B=A.clientHeight-this.getProperty("head").offsetHeight+"px";this.parentNode.removeChild(A)}else{this.style.height=this.properties.height;B=this.clientHeight-this.getProperty("head").offsetHeight+"px";this.style.height=""}}else{this.style.height=G.main.browser.quirks?this.offsetHeight+"px":this.clientHeight+"px";var D=this.getProperty("body").style.height;this.getProperty("body").style.height=this.properties.contentHeight;B=this.getProperty("body").offsetHeight+"px";this.getProperty("body").style.height=D;this.style.height=""}return B},updateHeight:function(A){this.getProperty("body").style.height=A},update:function(){if(this.getProperty("height")&&this.properties.open&&!this.properties.animationActive){var A=this.callMethod("getComputedBodyHeight");if(this.getProperty("body").offsetHeight!=parseInt(A)){this.callMethod("updateHeight",A)}}},close:function(){if(!this.getProperty("initialized")||!this.getProperty("animate")){var B=this.getProperty("body");this.setProperty("scrollPosition",B.scrollTop);B.style.overflow="hidden";if(G.main.browser.ie){B.style.height="1px";B.style.position="absolute"}else{B.style.height="0px"}}else{if(this.getProperty("body").style.position){this.getProperty("body").style.position=""}var D=this;var B=this.getProperty("body");this.setProperty("scrollPosition",B.scrollTop);var A=B.offsetHeight;B.style.overflow="hidden";var D=this;this.properties.animationActive=true;G.animation.add({element:this.getProperty("body"),property:"height",duration:300,from:A+"px",to:(window["gapjumper.com"].main.browser.quirks&&window["gapjumper.com"].main.browser.ie)?"1px":"0px",curve:G.animation.curve.sine,callback:function(){if(window["gapjumper.com"].main.browser.quirks&&window["gapjumper.com"].main.browser.ie){B.style.position="absolute"}D.setProperty("animationActive",false)}})}},open:function(){if(!this.getProperty("initialized")||!this.getProperty("animate")){this.getProperty("body").style.overflow="";this.callMethod("updateHeight",this.properties.height?this.callMethod("getComputedBodyHeight"):this.getProperty("contentHeight"));this.getProperty("body").scrollTop=this.getProperty("scrollPosition");if(this.getProperty("body").style.position){this.getProperty("body").style.position=""}}else{if(this.getProperty("body").style.position){this.getProperty("body").style.position=""}var B=this;var A=this.callMethod("getComputedBodyHeight");this.properties.animationActive=true;G.animation.add({element:this.getProperty("body"),property:"height",duration:300,from:((G.main.browser.quirks&&G.main.browser.ie)?"1px":"0px"),to:A,curve:G.animation.curve.sine,callback:function(){var D=B.getProperty("body");D.style.overflow="auto";D.scrollTop=B.getProperty("scrollPosition");if(!B.properties.height){B.callMethod("updateHeight",B.getProperty("contentHeight"))}B.setProperty("animationActive",false)}})}}},handlers:{mousedown:function(A){if(G.dom.isDescendantOrSelf(A.target,this.getProperty("head"))){this.setProperty("open",!this.getProperty("open"))}}}};C[g+":tabSet"]={initializer:function(){var D=G.xpath.evaluate("div",this.getProperty("content"));for(var B=0,A=D.length;B<A;B++){if(!D[B].controlType&&D[B].className=="gapjumper-tab"){G.main.init(D[B],g+":tab")}}this.properties.initialized=true;this.callMethod("refresh");G.utils.disableSelection(this.getProperty("tabStrip"));if(this.properties.height){this.setProperty("height",this.properties.height)}G.layoutManager.addCallback(this.controlClass.methods.update,this)},destructor:function(){G.layoutManager.removeCallback(this.controlClass.methods.update,this)},template:[{div:{"class":"gapjumper-tabSet"}},[{div:{"class":"gapjumper-tabSet-tabStrip"}},[],{div:{"class":"gapjumper-tabSet-content"}},[{content:{}}]]],properties:{initialized:{"default":false},width:{set:function(A){this.style.width=A}},height:{"default":"200px",set:function(A){if(this.properties.initialized){if(A=="auto"){this.setProperty("contentHeight",this.callMethod("getMaxContentHeight"))}this.style.height=A;this.callMethod("setContentHeight",this.callMethod("getComputedContentHeight"))}}},contentHeight:{set:function(A){this.properties.height=null;this.callMethod("setContentHeight",A)}},loop:{},selectedIndex:{"default":0,set:function(A){if(this.properties.initialized){var B=this.getProperty("items");if(A>=0&&A<B.length&&this.properties.previousIndex!==this.properties.selectedIndex){this.callMethod("setIndex",A);this.callMethod("updateTabStrip");this.setProperty("previousIndex",A)}}}},previousIndex:{},tabStrip:{get:function(){if(!this.properties.tabStrip){this.properties.tabStrip=G.xpath.evaluate("div[1]",this)[0]}return this.properties.tabStrip}},content:{get:function(){if(!this.properties.content){this.properties.content=G.xpath.evaluate("div[2]",this)[0]}return this.properties.content}},tabs:{get:function(){return G.xpath.evaluate("span",this.getProperty("tabStrip"))}},items:{get:function(){return G.dom.getElementChildNodes(this.getProperty("content"))}},border:{set:function(A){this.style.border=A}},animate:{"default":false,set:function(E){var F=this.getProperty("items");var D=E?"visible":"hidden";for(var B=0,A=F.length;B<A;B++){F[B].style.visibility=D;F[B].style.zIndex="1"}if(this.properties.initialized){if(E){F[this.properties.selectedIndex].style.zIndex="2"}else{F[this.properties.selectedIndex].style.visibility="visible"}}}}},methods:{getMaxContentHeight:function(){var B=0;var F=this.getProperty("tabs");for(var D=0,A=F.length;D<A;D++){var E=F[D].offsetHeight;if(E>B){B=E}}return B+"px"},setContentHeight:function(B){var A=this.getProperty("content");A.style.height=B},getComputedContentHeight:function(){var A=this.getProperty("tabStrip");var B=Math.max(this.clientHeight-A.offsetHeight,0);return B+"px"},update:function(){if(this.properties&&this.getProperty("height")){var B=this.getProperty("content");var A=this.callMethod("getComputedContentHeight");if(B.offsetHeight!=parseInt(A)){this.callMethod("setContentHeight",A)}}},refresh:function(){var D=this.getProperty("items");this.properties.previousIndex=null;for(var B=0,A=D.length;B<A;B++){D[B].style.zIndex="1"}this.callMethod("renderTabStrip");this.setProperty("selectedIndex",this.properties.selectedIndex)},setIndex:function(A){var E=this.getProperty("items");if(this.properties.animate&&this.properties.previousIndex!==null){var B=E[A];var D=E[this.properties.previousIndex];G.utils.setStyleProperty(E[A],"opacity","0");E[A].style.zIndex="3";G.animation.add({element:E[A],duration:500,property:"opacity",from:"0",to:"1",callback:function(){D.style.zIndex="1";B.style.zIndex="2";B.callMethod("doOnSelect")}})}else{if(this.properties.animate){E[A].style.zIndex="2";E[A].callMethod("doOnSelect")}else{E[A].style.visibility="visible";if(this.properties.previousIndex!==null){E[this.properties.previousIndex].style.visibility="hidden"}E[A].callMethod("doOnSelect")}}},next:function(){var A=this.getProperty("items");if(this.getProperty("selectedIndex")<(A.length-2)){this.setProperty("selectedIndex",this.getProperty("selectedIndex")+1)}else{if(this.getProperty("loop")){this.setProperty("selectedIndex",0)}}},previous:function(){if(this.getProperty("selectedIndex")>0){this.setProperty("selectedIndex",this.getProperty("selectedIndex")-1)}else{if(this.getProperty("loop")){var A=this.getProperty("items");this.setProperty("selectedIndex",A.length-1)}}},renderTabStrip:function(){var E=this.getProperty("items");var D="";for(var B=0,A=E.length;B<A;B++){D+='<span class="gapjumper-tabStrip-tab">'+E[B].properties.title+"</span>"}this.getProperty("tabStrip").innerHTML=D},updateTabStrip:function(){var A=this.getProperty("tabs");if(this.properties.previousIndex!==null){G.utils.removeClass(A[this.properties.previousIndex],"gapjumper-selected")}G.utils.addClass(A[this.properties.selectedIndex],"gapjumper-selected")}},handlers:{mousedown:function(E){var A=E.target;if(G.dom.isDescendant(A,this.getProperty("tabStrip"))){var F=this.getProperty("tabs");for(var D=0,B=F.length;D<B;D++){if(G.dom.isDescendantOrSelf(A,F[D])){this.setProperty("selectedIndex",D);break}}}}}};C[g+":tab"]={initializer:function(){if(!this.properties.title){if(this.title){this.properties.title=this.title;this.title=""}}},template:[{div:{"class":"gapjumper-tab"}},[{content:{}}]],properties:{title:{},onselect:{}},methods:{doOnSelect:function(){if(this.properties.onselect){if(typeof (this.properties.onselect)=="string"){eval(this.properties.onselect)}else{this.properties.onselect.call(this)}}}}};C[g+":menu"]={initializer:function(){this.setProperty("initialized",true)},template:[{div:{"class":"gapjumper-menu"}},[{content:{}}]],properties:{initialized:{},display:{"default":false,set:function(value){if(value){var onshow=this.getProperty("onshow");if(onshow&&this.getProperty("initialized")){if(typeof (onshow)=="string"){eval(this.getProperty("onshow"))}else{if(typeof (onshow)=="function"){onshow.call(this)}}}this.style.display="block";if(this.getProperty("context")||(this.getProperty("root")!=this)){this.callMethod("setPosition")}if(this.getProperty("context")||(this.getProperty("root").getProperty("submenu")==this)){G.events.addHandler(document.documentElement,"click",this.controlClass.methods.clickHandler,this)}}else{var onclose=this.getProperty("onclose");if(onclose&&this.getProperty("initialized")){if(typeof (onclose)=="string"){eval(this.getProperty("onclose"))}else{if(typeof (onclose)=="function"){onclose.call(this)}}}this.style.display="none";if(this.getProperty("context")||(this.getProperty("root").getProperty("submenu")==this)){G.events.removeHandler(document.documentElement,"click",this.controlClass.methods.clickHandler)}if(this.getProperty("item")){this.getProperty("item").callMethod("setHighlight",false)}this.callMethod("close")}}},root:{get:function(){return this.properties.root||this}},submenu:{},item:{},items:{get:function(){return G.xpath.evaluate("div",this)}},targets:{},target:{},coords:{},onshow:{},onclose:{},context:{set:function(E){if(this.getProperty("targets")){this.callMethod("removeContextHandlers")}var D=G.xpath.evaluate(E,this);this.setProperty("targets",D);for(var B=0,A=D.length;B<A;B++){G.events.addHandler(D[B],"contextmenu",this.controlClass.methods.contextHandler,this)}}},contextEvent:{},animate:{"default":true}},destructor:function(){this.callMethod("removeContextHandlers");if(this.getProperty("display")){this.setProperty("display",false)}},methods:{close:function(){var A=this.getProperty("submenu");if(A){A.setProperty("display",false);this.setProperty("submenu",null)}},setPosition:function(){this.style.top=this.style.left="0px";var H=G.utils.getBoxObject(this);var A=G.utils.getClientDimensions();if(this.getProperty("context")){var J=this.getProperty("coords");var E=J.y+H.height;var F=J.y-H.height;var D=J.x+H.width;var I=J.x-H.width;if(E<A.height){this.style.top=(J.y-H.top)+"px"}else{if(F>=0){this.style.top=(J.y-H.top-H.height)+"px"}else{this.style.top=(H.top+H.height-A.height)+"px"}}if(D<A.width){this.style.left=(J.x-H.left)+"px"}else{if(I>=0){this.style.left=(J.x-H.left-H.width)+"px"}else{this.style.left=(H.left+H.width-A.width)+"px"}}}else{var B=G.utils.getBoxObject(this.getProperty("item"));if(this.getProperty("item").controlType=="gapjumper.com:menuBarItem"){var J={x:B.left,y:B.top+B.height};this.style.left=(J.x-H.left)+"px";var F=J.y-H.height-B.height;var E=J.y+H.height;if(E<A.height){this.style.top=(J.y-H.top)+"px"}else{if(F>=0){this.style.top=(J.y-B.height-H.top-H.height)+"px"}else{this.style.top=(H.top+H.height-A.height)+"px"}}}else{var J={x:B.left+B.width,y:B.top};var E=J.y+H.height;var F=J.y-H.height+B.height;var D=J.x+H.width;var I=J.x-H.width-B.width;if(E<A.height){this.style.top=(J.y-H.top)+"px"}else{if(F>=0){this.style.top=(J.y+B.height-H.top-H.height)+"px"}else{this.style.top=(H.top+H.height-A.height)+"px"}}if(D<A.width){this.style.left=(J.x-H.left)+"px"}else{if(I>=0){this.style.left=(J.x-H.left-H.width)+"px"}else{this.style.left=(H.left+H.width-A.width)+"px"}}}}},clickHandler:function(A){this.setProperty("display",false)},contextHandler:function(A){A.preventDefault();if(this.getProperty("display")){this.setProperty("display",false)}this.setProperty("contextEvent",A);this.setProperty("target",A.currentTarget);this.setProperty("coords",{x:A.clientX,y:A.clientY});this.setProperty("display",true)},removeContextHandlers:function(){var D=this.getProperty("targets");for(var B=0,A=D.length;B<A;B++){G.events.removeHandler(D[B],"contextmenu",this.controlClass.methods.contextHandler)}}},handlers:{load:function(A){if(this.getProperty("context")&&!this.getProperty("targets").length){this.setProperty("context",this.getProperty("context"))}},mouseleave:function(A){if(this.getProperty("item")&&G.dom.isDescendantOrSelf(A.relatedTarget,this.getProperty("item").getProperty("parentMenu"))){this.setProperty("display",false)}else{if(!this.getProperty("submenu")||!G.dom.isDescendantOrSelf(A.relatedTarget,this.getProperty("submenu"))){if(this.getProperty("root").getProperty("submenu")){this.getProperty("root").getProperty("submenu").setProperty("display",false)}}}}}};C[g+":menuBar"]={"extends":["gapjumper.com:menu"],template:[{div:{"class":"gapjumper-menuBar"}},[{content:{}}]],properties:{display:{"default":true,set:function(A){}},animate:{"default":false}}};C[g+":menuItem"]={template:[{div:{"class":"gapjumper-menuItem"}},[]],properties:{parentMenu:{get:function(){if(!this.properties.parentMenu){this.properties.parentMenu=this.parentNode}return this.properties.parentMenu}},submenu:{get:function(){if(this.properties.submenu){return G.xpath.evaluate(this.properties.submenu)[0]}}},title:{set:function(A){this.innerHTML=A}},action:{},disabled:{"default":false},hidden:{"default":false}},methods:{animateEnter:function(){G.animation.add({element:this,duration:250,property:"backgroundColor",from:"#ffffff",to:"#ffbb44",curve:G.animation.curve.linear})},animateLeave:function(){G.animation.add({element:this,duration:250,property:"backgroundColor",to:"#ffffff",from:"#ffbb44",curve:G.animation.curve.linear})},setHighlight:function(A){if(this.getProperty("parentMenu").getProperty("animate")){A?this.callMethod("animateEnter"):this.callMethod("animateLeave")}else{A?G.utils.addClass(this,"active"):G.utils.removeClass(this,"active")}}},handlers:{mouseenter:function(B){this.callMethod("setHighlight",true);var A=this.getProperty("submenu");if(A){this.parentNode.setProperty("submenu",A);A.setProperty("item",this);A.setProperty("root",this.parentNode.getProperty("root"));A.setProperty("display",true)}},mouseleave:function(B){var A=this.getProperty("submenu");if(A&&!G.dom.isDescendantOrSelf(B.relatedTarget,A)){A.setProperty("display",false)}if(!A||!G.dom.isDescendantOrSelf(B.relatedTarget,A)){this.callMethod("setHighlight",false)}},click:function(event){if(!this.getProperty("disabled")&&!this.properties.submenu){var root=this.parentNode.getProperty("root");if(root.getProperty("context")){root.setProperty("display",false)}else{if(root.getProperty("submenu")){root.getProperty("submenu").setProperty("display",false)}}var action=this.getProperty("action");if(action){if(typeof (action)=="string"){eval(this.getProperty("action"))}else{if(typeof (action)=="function"){action.call(this)}}}}event.stopPropagation()}}};C[g+":menuBarItem"]={"extends":["gapjumper.com:menuItem"],template:[{span:{"class":"gapjumper-menuBarItem"}},[]]};C[g+":ticker"]={template:[{a:{"class":"gapjumper-ticker"}},[]],properties:{charInterval:{"default":20},itemInterval:{"default":4000},items:{set:function(A){this.callMethod("playItems")}},itemIndex:{"default":0},charIndex:{},blinks:{"default":2},blinkCount:{},timerRef:{}},destructor:function(){this.callMethod("stop")},methods:{stop:function(){clearTimeout(this.getProperty("timerRef"))},playItems:function(){var A=this.getProperty("items")[this.getProperty("itemIndex")].url;var B=this.getProperty("items")[this.getProperty("itemIndex")].target;if(A){this.href=A}else{this.removeAttribute("href")}if(B){this.target=B}else{this.removeAttribute("target")}this.callMethod("playItem")},playItem:function(){this.innerHTML="";this.setProperty("charIndex",0);this.setProperty("blinkCount",0);this.callMethod("doPrint")},doPrint:function(){var D=this.getProperty("items")[this.getProperty("itemIndex")].html;var B=D.length;if(B>0&&this.getProperty("charIndex")<B){if(this.getProperty("blinkCount")<this.getProperty("blinks")){if(this.getProperty("blinkCount")%2==0){this.innerHTML+="_"}else{this.innerHTML=this.innerHTML.slice(0,-1)}this.setProperty("blinkCount",this.getProperty("blinkCount")+1)}else{this.setProperty("blinkCount",0);this.setProperty("charIndex",this.getProperty("charIndex")+1);this.innerHTML=D.slice(0,this.getProperty("charIndex"))}var A=this;var E=setTimeout(function(){A.callMethod("doPrint")},this.getProperty("charInterval"));this.setProperty("timerRef",E)}else{this.setProperty("itemIndex",(this.getProperty("itemIndex")+1)%this.getProperty("items").length);var A=this;var E=setTimeout(function(){A.callMethod("playItems")},this.getProperty("itemInterval"));this.setProperty("timerRef",E)}}}};C[g+":box"]={finalizer:function(){this.setProperty("finalized",true);this.callMethod("normalizeWidth");this.callMethod("normalizeHeight");if(this.getProperty("width").test(/%$/)||this.getProperty("height").test(/%$/)){G.layoutManager.addCallback(this.controlClass.methods.update,this)}},destructor:function(){G.layoutManager.removeCallback(this.controlClass.methods.update,this)},template:[{div:{"class":"gapjumper-box"}},[{content:{}}]],properties:{finalized:{"default":false},updating:{"default":false},width:{"default":"100%",set:function(A){if(this.getProperty("finalized")){this.callMethod("normalizeWidth");if(A.test(/%$/)&&!this.getProperty("updating")){this.setProperty("updating",true);G.layoutManager.addCallback(this.controlClass.methods.update,this)}else{if(this.getProperty("updating")&&!A.test(/%$/)&&!this.getProperty("height").test(/%$/)){G.layoutManager.removeCallback(this.controlClass.methods.update,this);this.setProperty("updating",false)}}}}},height:{"default":"100%",set:function(A){if(this.getProperty("finalized")){this.callMethod("normalizeHeight");if(A.test(/%$/)&&!this.getProperty("updating")){this.setProperty("updating",true);G.layoutManager.addCallback(this.controlClass.methods.update,this)}else{if(this.getProperty("updating")&&!A.test(/%$/)&&!this.getProperty("width").test(/%$/)){G.layoutManager.removeCallback(this.controlClass.methods.update,this);this.setProperty("updating",false)}}}}},parentWidth:{},parentHeight:{},borderColor:{set:function(A){this.style.borderColor=A}},borderWidth:{set:function(A){this.style.borderWidth=A;if(this.getProperty("finalized")){this.callMethod("normalizeWidth");this.callMethod("normalizeHeight")}}},padding:{set:function(A){this.style.padding=A;if(this.getProperty("finalized")){this.callMethod("normalizeWidth");this.callMethod("normalizeHeight")}}}},methods:{update:function(){if(this.getProperty("parentWidth")!=this.parentNode.offsetWidth){this.callMethod("normalizeWidth")}if(this.getProperty("parentHeight")!=this.parentNode.offsetHeight){this.callMethod("normalizeHeight")}},normalizeWidth:function(){var A=G.utils.parseRectangleString(this.getProperty("borderWidth"));var B=G.utils.parseRectangleString(this.getProperty("padding"));this.setProperty("parentWidth",this.offsetWidth);this.style.width=(this.getProperty("parentWidth")-2*(parseInt(A.left)+parseInt(A.right)+parseInt(B.left)+parseInt(B.right)))+"px"},normalizeHeight:function(){var A=G.utils.parseRectangleString(this.getProperty("borderWidth"));var B=G.utils.parseRectangleString(this.getProperty("padding"));this.setProperty("parentHeight",this.offsetHeight);this.style.height=(this.getProperty("parentHeight")-2*(parseInt(A.top)+parseInt(A.bottom)+parseInt(B.top)+parseInt(B.bottom)))+"px"}}};C[g+":rows"]={finalizer:function(){this.setProperty("finalized",true);this.callMethod("init");this.callMethod("setDimensions");G.layoutManager.addCallback(this.controlClass.methods.update,this)},destructor:function(){G.layoutManager.removeCallback(this.controlClass.methods.update,this)},template:[{div:{"class":"gapjumper-rows"}},[{content:{}}]],properties:{finalized:{"default":false},rowHeights:{get:function(){var E=0,A=this.getProperty("items");for(var D=0,B=A.length;D<B;D++){E+=A[D].offsetHeight}return E}},width:{"default":"100%",set:function(A){this.style.width=A}},height:{"default":"100%",set:function(A){this.style.height=A}},previousHeight:{},previousWidth:{},items:{get:function(){if(!this.properties.items){this.properties.items=G.dom.getElementChildNodes(this)}return this.properties.items}}},methods:{init:function(){var A=this.getProperty("items");for(var D=0,B=A.length;D<B;D++){if(A[D].controlType==g+":splitter"){G.utils.addClass(A[D],"gapjumper-splitter-horizontal")}}},setDimensions:function(){this.setProperty("previousHeight",this.offsetHeight);this.setProperty("previousWidth",this.offsetWidth);var I=this.getProperty("items"),A=[],K=0;for(var E=0,D=I.length;E<D;E++){var H=G.utils.parseRectangleString(I[E].getProperty("borderWidth"));var F=G.utils.parseRectangleString(I[E].getProperty("padding"));I[E].style.width=(this.getProperty("previousWidth")-(parseInt(H.left)+parseInt(H.right)+parseInt(F.left)+parseInt(F.right)))+"px";var J=I[E].getProperty("height");if(J!="*"){I[E].style.height=J;if(J!="auto"){I[E].style.height=(I[E].offsetHeight-2*(parseInt(H.top)+parseInt(H.bottom)+parseInt(F.top)+parseInt(F.bottom)))+"px"}K+=I[E].offsetHeight}else{A.push(E)}}var B=this.getProperty("previousHeight")-K;for(var E=0,D=A.length;E<D;E++){var H=G.utils.parseRectangleString(I[A[E]].getProperty("borderWidth"));var F=G.utils.parseRectangleString(I[A[E]].getProperty("padding"));if(B<0){B=0}var J=Math.round(B/(A.length-E));I[A[E]].style.height=(J-parseInt(H.top)-parseInt(H.bottom)-parseInt(F.top)-parseInt(F.bottom))+"px";B-=J}},update:function(){if(this.parentNode&&(this.getProperty("previousHeight")!=this.offsetHeight||this.getProperty("previousWidth")!=this.offsetWidth)){this.callMethod("setDimensions")}}}};C[g+":columns"]={finalizer:function(){this.setProperty("finalized",true);this.callMethod("init");this.callMethod("render");G.layoutManager.addCallback(this.controlClass.methods.update,this)},destructor:function(){G.layoutManager.removeCallback(this.controlClass.methods.update,this)},template:[{div:{"class":"gapjumper-columns"}},[{content:{}}]],properties:{finalized:{"default":false},columnWidths:{get:function(){var E=0,A=this.getProperty("items");for(var D=0,B=A.length;D<B;D++){E+=A[D].offsetWidth}return E}},width:{"default":"100%",set:function(A){this.style.width=A}},height:{"default":"100%",set:function(A){this.style.height=A}},previousHeight:{},previousWidth:{},items:{get:function(){if(!this.properties.items){this.properties.items=G.dom.getElementChildNodes(this)}return this.properties.items}}},methods:{init:function(){var A=this.getProperty("items");for(var D=0,B=A.length;D<B;D++){if(A[D].controlType==g+":splitter"){G.utils.addClass(A[D],"gapjumper-splitter-vertical")}}},setDimensions:function(){this.setProperty("previousHeight",this.offsetHeight);this.setProperty("previousWidth",this.offsetWidth);var J=this.getProperty("items"),B=[],D=0;for(var F=0,E=J.length;F<E;F++){var I=G.utils.parseRectangleString(J[F].getProperty("borderWidth"));var H=G.utils.parseRectangleString(J[F].getProperty("padding"));J[F].style.height=(this.getProperty("previousHeight")-(parseInt(I.top)+parseInt(I.bottom)+parseInt(H.top)+parseInt(H.bottom)))+"px";var A=J[F].getProperty("width");if(A!="*"){J[F].style.width=A;if(A!="auto"){J[F].style.width=(J[F].offsetWidth-2*(parseInt(I.left)+parseInt(I.right)+parseInt(H.left)+parseInt(H.right)))+"px"}D+=J[F].offsetWidth}else{B.push(F)}}var K=this.getProperty("previousWidth")-D;for(var F=0,E=B.length;F<E;F++){var I=G.utils.parseRectangleString(J[B[F]].getProperty("borderWidth"));var H=G.utils.parseRectangleString(J[B[F]].getProperty("padding"));if(K<0){K=0}var A=Math.round(K/(B.length-F));J[B[F]].style.width=(A-parseInt(I.left)-parseInt(I.right)-parseInt(H.left)-parseInt(H.right))+"px";K-=A}},setPositions:function(){var D=this.getProperty("items"),E=D[0].offsetWidth;for(var B=1,A=D.length;B<A;B++){D[B].style.left=E+"px";E+=D[B].offsetWidth}},render:function(){this.callMethod("setDimensions");this.callMethod("setPositions")},update:function(){if(this.parentNode&&(this.getProperty("previousWidth")!=this.offsetWidth||this.getProperty("previousHeight")!=this.offsetHeight)){this.callMethod("render")}}}};C[g+":column"]={finalizer:function(){this.setProperty("finalized",true)},template:[{div:{"class":"gapjumper-column"}},[{content:{}}]],properties:{finalized:{"default":false},width:{"default":"*",set:function(A){if(this.getProperty("finalized")){this.parentNode.callMethod("setDimensions")}}},borderColor:{set:function(A){this.style.borderColor=A}},borderWidth:{"default":"0px",set:function(A){this.style.borderWidth=A;if(this.getProperty("finalized")){this.parentNode.callMethod("setDimensions")}}},padding:{"default":"0px",set:function(A){this.style.padding=A;if(this.getProperty("finalized")){this.parentNode.callMethod("setDimensions")}}}}};C[g+":row"]={finalizer:function(){this.setProperty("finalized",true)},template:[{div:{"class":"gapjumper-row"}},[{content:{}}]],properties:{finalized:{"default":false},height:{"default":"*",set:function(A){if(this.getProperty("finalized")){this.parentNode.callMethod("setDimensions")}}},borderColor:{set:function(A){this.style.borderColor=A}},borderWidth:{"default":"0px",set:function(A){this.style.borderWidth=A;if(this.getProperty("finalized")){this.parentNode.callMethod("setDimensions")}}},padding:{"default":"0px",set:function(A){this.style.padding=A;if(this.getProperty("finalized")){this.parentNode.callMethod("setDimensions")}}}}};C[g+":splitter"]={finalizer:function(){this.properties.panel1=G.dom.getPrecedingElementSiblings(this)[0];this.properties.panel2=G.dom.getFollowingElementSiblings(this)[0];this.setProperty("finalized",true)},template:[{div:{}},[]],properties:{finalized:{"default":false},coords:{},width:{get:function(){return(this.properties.width||this.offsetWidth+"px")},set:function(A){this.style.width=A;if(this.getProperty("finalized")){this.parentNode.callMethod("setDimensions")}}},height:{get:function(){return(this.properties.height||this.offsetHeight+"px")},set:function(A){this.style.height=A;if(this.getProperty("finalized")){this.parentNode.callMethod("setDimensions")}}},borderWidth:{"default":"0px"},padding:{"default":"0px"},panel1:{},panel2:{},width1:{},height1:{},width2:{},height2:{}},methods:{resizePanels:function(A){var E;var D=this.properties.panel1;var B=this.properties.panel2;if(this.parentNode.controlType==g+":rows"){E=A.clientY-this.getProperty("coords").Y;if(D.properties.height!="*"||B.properties.height=="*"){D.properties.height=(this.properties.height1+E)+"px"}if(B.properties.height!="*"){B.properties.height=(this.properties.height2-E)+"px"}D.style.height=(this.properties.height1+E)+"px";B.style.height=(this.properties.height2-E)+"px"}else{if(this.parentNode.controlType==g+":columns"){E=A.clientX-this.getProperty("coords").X;if(D.properties.width!="*"||B.properties.width=="*"){D.properties.width=(this.properties.width1+E)+"px"}if(B.properties.width!="*"){B.properties.width=(this.properties.width2-E)+"px"}D.style.width=(this.properties.width1+E)+"px";B.style.width=(this.properties.width2-E)+"px";this.parentNode.callMethod("setPositions")}}},endResize:function(){G.events.removeHandler(document.documentElement,"mousemove",this.controlClass.methods.resizePanels);G.events.removeHandler(document.documentElement,"mouseup",this.controlClass.methods.endResize)}},handlers:{mousedown:function(A){var E=this.properties.panel1;var B=this.properties.panel2;var I=G.utils.parseRectangleString(E.getProperty("borderWidth"));var F=G.utils.parseRectangleString(E.getProperty("padding"));var H=G.utils.parseRectangleString(B.getProperty("borderWidth"));var D=G.utils.parseRectangleString(B.getProperty("padding"));this.setProperty("coords",{X:A.clientX,Y:A.clientY});this.properties.width1=E.offsetWidth-parseInt(I.left)-parseInt(I.right)-parseInt(F.left)-parseInt(F.right);this.properties.height1=E.offsetHeight-parseInt(I.top)-parseInt(I.bottom)-parseInt(F.top)-parseInt(F.bottom);this.properties.width2=B.offsetWidth-parseInt(H.left)-parseInt(H.right)-parseInt(D.left)-parseInt(D.right);this.properties.height2=B.offsetHeight-parseInt(H.top)-parseInt(H.bottom)-parseInt(D.top)-parseInt(D.bottom);G.events.addHandler(document.documentElement,"mousemove",this.controlClass.methods.resizePanels,this);G.events.addHandler(document.documentElement,"mouseup",this.controlClass.methods.endResize,this);G.utils.preventDefault(A)}}};}())
