function slideMenu(D,C,B,A){this.obj=D;this.width=C;this.showEvent=B||0;this.viewType=A||0;this.showEffect="fade";this.showDelay=200;this.hideEvent=0;this.hoverDelay=200;this.leaveDelay=800;this.align="center";this.topOffset=0;this.leftOffset=0;this.content=undefined;this.contentFunc=undefined;this.objOverCls="";this.position="";this.onShow="";this.onHide="";this._isOpen=0;this._panel=undefined;this._isBlinded=false;this.id=++slideMenu.prototype.ID;this.onResizeEvent=jQuery.proxy(this._movePanel,this);if(this.showEvent==0){$(D).unbind("click");$(D).click(jQuery.proxy(this._onclick,this))}else{if(this.showEvent==1){$(D).unbind("click");$(D).unbind("mouseenter");$(D).unbind("mouseleave");$(D).mouseleave(jQuery.proxy(this._onleave,this));$(D).mouseenter(jQuery.proxy(this._onenter,this));$(D).click(function(E){E.preventDefault()})}}}slideMenu.prototype.ID=1;slideMenu.prototype.NAMESPACE="tt_sm_";slideMenu.prototype.PATTERN='<div class="panel" style="display:none;"> <div class="pTL"></div><div class="pTR"></div> <div class="pTC"></div> <div class="pH">  <div class="pV">   <div class="pML"></div><div class="pMR"></div>   <div class="panelCont"></div>  </div> </div> <div class="pBC"></div> <div class="pBL"></div><div class="pBR"></div></div>';slideMenu.prototype.SHADOW='<div id="slideMenuShadow" style="position: fixed; z-index: 90; top: 0; left: 0; width: 100%; height: 100%; background-color: black; display: none;"></div>';slideMenu.prototype._configurePanel=function(){$(this._panel).css("width",this.width+"px");$(this._panel).find(".pTC, .pBC").css("width",(parseInt(this.width)-20)+"px");if((this.viewType&1)==1){$(this._panel).find(".pTL").addClass("pTL-flat")}else{if((this.viewType&2)==2){$(this._panel).find(".pTR").addClass("pTR-flat")}}};slideMenu.prototype._movePanel=function(){var D=$(this.obj).offset();var C=$(this.obj).outerHeight(true);var A=$(this.obj).outerWidth(true);var B=$(window).width();if(this.position=="absolute"){if(this.align=="center"){$(this._panel).css({top:(this.topOffset)+"px",left:((B/2)-(this.width/2)+this.leftOffset)+"px"})}else{if(this.align=="left"){$(this._panel).css({top:(this.topOffset)+"px",left:(this.leftOffset)+"px"})}else{if(this.align=="right"){$(this._panel).css({top:(this.topOffset)+"px",left:(B-this.width+this.leftOffset)+"px"})}}}}else{if(this.align=="center"){$(this._panel).css({top:(D.top+C+this.topOffset)+"px",left:(D.left+(A/2)-(this.width/2)+this.leftOffset)+"px"})}else{if(this.align=="left"){$(this._panel).css({top:(D.top+C+this.topOffset)+"px",left:(D.left+this.leftOffset)+"px"})}else{if(this.align=="right"){$(this._panel).css({top:(D.top+C+this.topOffset)+"px",left:(D.left+A-this.width+this.leftOffset)+"px"})}}}}};slideMenu.prototype.show=function(B){if(!this._isOpen){this._isOpen=1;this.showTimer=undefined;var A=$("body")[0];this._panel=$(this.PATTERN).appendTo(A);if(this.contentFunc){this.contentFunc.call($(this._panel).find(".panelCont"))}else{$(this._panel).find(".panelCont").append(this.content)}this._configurePanel();this._movePanel();$(window).bind("resize."+slideMenu.prototype.NAMESPACE+this.id,jQuery.proxy(this._movePanel,this));if(this.hideEvent==0){$(this._panel).click(function(C){C.stopPropagation()});$("body").click(jQuery.proxy(this.hide,this))}else{if(this.hideEvent==1&&this.showEvent==0){$(this.obj).mouseleave(jQuery.proxy(this._onleave,this));$(this._panel).mouseleave(jQuery.proxy(this._onleave,this));$(this.obj).mouseenter(jQuery.proxy(this._onenter,this));$(this._panel).mouseenter(jQuery.proxy(this._onenter,this))}}if(this.showEvent==1){$(this._panel).mouseleave(jQuery.proxy(this._onleave,this));$(this._panel).mouseenter(jQuery.proxy(this._onenter,this))}$(this.obj).addClass(this.objOverCls);if(B){this._isBlinded=true;$(A).append(slideMenu.prototype.SHADOW);$("#slideMenuShadow").click(jQuery.proxy(this.hide,this));if(!jQuery.support.boxModel){$("#slideMenuShadow").css({position:"absolute",height:($(A).scrollTop()+$(A).outerHeight(true))+"px"});$(window).bind("resize.shadow"+slideMenu.prototype.NAMESPACE+this.id,function(){$("#slideMenuShadow").css({height:($("body:first").scrollTop()+$("body:first").outerHeight(true))+"px"})})}$("#slideMenuShadow").fadeTo("fast",0.6,jQuery.proxy(function(){if(this.showEffect=="fade"){$(this._panel).fadeIn(this.showDelay,(this.onShow?jQuery.proxy(this.onShow,this):undefined))}else{if(this.showEffect=="slide"){$(this._panel).slideDown(this.showDelay,(this.onShow?jQuery.proxy(this.onShow,this):undefined))}}},this))}else{this._isBlinded=false;if(this.showEffect=="fade"){$(this._panel).fadeIn(this.showDelay,(this.onShow?jQuery.proxy(this.onShow,this):undefined))}else{if(this.showEffect=="slide"){$(this._panel).slideDown(this.showDelay,(this.onShow?jQuery.proxy(this.onShow,this):undefined))}}}}};slideMenu.prototype.hide=function(){if(this._isOpen){this._isOpen=0;this.hideTimer=undefined;$(window).unbind("resize."+slideMenu.prototype.NAMESPACE+this.id);if(this.hideEvent==0){$("body").unbind("click")}else{if(this.hideEvent==1&&this.showEvent==0){$(this.obj).unbind("mouseleave");$(this.obj).unbind("mouseenter")}}if(this._isBlinded){$(window).unbind("resize.shadow"+slideMenu.prototype.NAMESPACE+this.id);$("#slideMenuShadow").remove()}if(this.onHide){jQuery.proxy(this.onHide,this)()}$(this.obj).removeClass(this.objOverCls);$(this._panel).remove();this._panel=undefined}};slideMenu.prototype._onclick=function(A){A.preventDefault();A.stopPropagation();if(this._isOpen){this.hide()}else{this.show()}};slideMenu.prototype._onleave=function(A){if(this._isOpen){if(this.hideEvent==1){if(!this.hideTimer){this.hideTimer=window.setTimeout(jQuery.proxy(this.hide,this),this.leaveDelay)}}}else{if(this.showEvent==1){if(this.showTimer){clearTimeout(this.showTimer);this.showTimer=undefined}}}};slideMenu.prototype._onenter=function(A){if(this._isOpen){if(this.hideEvent==1){if(this.hideTimer){clearTimeout(this.hideTimer);this.hideTimer=undefined}}}else{if(this.showEvent==1){if(!this.showTimer){this.showTimer=window.setTimeout(jQuery.proxy(this.show,this),this.hoverDelay)}}}};

jQuery.cookie=function(B,I,L){if(typeof I!="undefined"){L=L||{};if(I===null){I="";L.expires=-1}var E="";if(L.expires&&(typeof L.expires=="number"||L.expires.toUTCString)){var F;if(typeof L.expires=="number"){F=new Date();F.setTime(F.getTime()+(L.expires*24*60*60*1000))}else{F=L.expires}E="; expires="+F.toUTCString()}var K=L.path?"; path="+(L.path):"";var G=L.domain?"; domain="+(L.domain):"";var A=L.secure?"; secure":"";document.cookie=[B,"=",encodeURIComponent(I),E,K,G,A].join("")}else{var D=null;if(document.cookie&&document.cookie!=""){var J=document.cookie.split(";");for(var H=0;H<J.length;H++){var C=jQuery.trim(J[H]);if(C.substring(0,B.length+1)==(B+"=")){D=decodeURIComponent(C.substring(B.length+1));break}}}return D}};
