﻿/*
 * Compressed by JSA(www.xidea.org)
 */
jQuery.extend({chk:function($){return!!($||$===0)},defined:function($){return($!=undefined)},pick:function(){for(var A=0,_=arguments.length;A<_;A++)if($.defined(arguments[A]))return arguments[A];return null},random:function($,_){return Math.floor(Math.random()*(_-$+1)+$)},parseNum:function(C,_,A){var B=(C=="float")?parseFloat(_):parseInt(_);return isNaN(B)?($.defined(A)?A:0):B},toInt:function(_,A){return $.parseNum("int",_,A)},toFloat:function(_,A){return $.parseNum("float",_,A)},id:function($){return document.getElementById($)},gmp:function($){var A=0,_=0;if(!$)var $=window.event;if($.pageX||$.pageY){A=$.pageX;_=$.pageY}else if($.clientX||$.clientY){A=$.clientX+document.body.scrollLeft+document.documentElement.scrollLeft;_=$.clientY+document.body.scrollTop+document.documentElement.scrollTop}return{"x":A,"y":_}},url:function(E){var D=E.split("?"),C=D[0].split("/"),B=C[C.length-1],A=new Object();A.pageName=B;var _=arguments;if(E.indexOf("?")!=-1)$.each(D[1].split("&"),function(B,_){var $=_.split("=");A[$[0]]=$[1]});function F(){E=D[0]+"?";$.each(A,function(_,$){E=_!="pageName"?E+_+"="+$+"&":E.replace(B,$)});return E.substr(0,E.length-1)}if(!$.defined(_[1]))return A;if(typeof _[1]=="object"){$.extend(A,_[1]);return F()}if(typeof _[1]=="string")if($.defined(_[2])){A[_[1]]=_[2];return F()}else return A[_[1]]},GetMousePosition:function($){var A=0,_=0;if(!$)var $=window.event;if($.pageX||$.pageY){A=$.pageX;_=$.pageY}else if($.clientX||$.clientY){A=$.clientX+document.body.scrollLeft+document.documentElement.scrollLeft;_=$.clientY+document.body.scrollTop+document.documentElement.scrollTop}return{"x":A,"y":_}},cookie:function(E,F,J){if(typeof F!="undefined"){J=J||{};if(F===null){F="";J.expires=-1}var D="";if(J.expires&&(typeof J.expires=="number"||J.expires.toUTCString)){var _;if(typeof J.expires=="number"){_=new Date();_.setTime(_.getTime()+(J.expires*24*60*60*1000))}else _=J.expires;D="; expires="+_.toUTCString()}var G=J.path?"; path="+J.path:"",H=J.domain?"; domain="+J.domain:"",$=J.secure?"; secure":"";document.cookie=[E,"=",encodeURIComponent(F),D,G,H,$].join("")}else{var A=null;if(document.cookie&&document.cookie!=""){var I=document.cookie.split(";");for(var B=0;B<I.length;B++){var C=jQuery.trim(I[B]);if(C.substring(0,E.length+1)==(E+"=")){A=decodeURIComponent(C.substring(E.length+1));break}}}return A}}});jQuery.fn.extend({Opacity:function(_){return this.each(function(){if(_!=null)if($.browser.msie)this.style.filter="alpha(opacity = "+_+")";else this.style.MozOpacity=$.toInt(_)/100})}});jQuery.fn.extend({Drag:function(H){H=$.extend({handle:"",range:""},H);var _=false,G=null,A=null,E,C,B,D;function F(F){var N=$.GetMousePosition(F),J=(N.x-E),K=(N.y-C),M=B+K,L=D+J;if(H.range=="")G.css({top:M,left:L});else{var I=$("#"+H.range),_=$.toInt(I.css("height"))-$.toInt(G.css("height"))-$.toInt(G.css("borderTopWidth"),true)-$.toInt(G.css("borderBottomWidth"),true),A=$.toInt(I.css("width"))-$.toInt(G.css("width"))-$.toInt(G.css("borderLeftWidth"),true)-$.toInt(G.css("borderRightWidth"),true);if(M>0&&M<_)G.css("top",M);else G.css("top",M>0?_:0);if(L>0&&L<A)G.css("left",L);else G.css("left",L>0?A:0)}}$(document).mousemove(function($){if(_){F($);return false}});$(document).mouseup(function($){if(_){_=false;return false}});return this.each(function(){var I=this;A=(H.handle==""?$(this):$(H.handle));A.css("cursor","move");A.mousedown(function(A){G=$(I);G.css("position","absolute");_=true;var H=$.GetMousePosition(A);E=H.x;C=H.y;B=I.offsetTop;D=I.offsetLeft;F(A)})})}});(function($){var m={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r","\"":"\\\"","\\":"\\\\"},s={"array":function(E){var B=["["],A,$,D,C=E.length,_;for(D=0;D<C;D+=1){_=E[D];$=s[typeof _];if($){_=$(_);if(typeof _=="string"){if(A)B[B.length]=",";B[B.length]=_;A=true}}}B[B.length]="]";return B.join("")},"boolean":function($){return String($)},"null":function($){return"null"},"number":function($){return isFinite($)?String($):"null"},"object":function(D){if(D){if(D instanceof Array)return s.array(D);var B=["{"],A,$,C,_;for(C in D){_=D[C];$=s[typeof _];if($){_=$(_);if(typeof _=="string"){if(A)B[B.length]=",";B.push(s.string(C),":",_);A=true}}}B[B.length]="}";return B.join("")}return"null"},"string":function($){if(/["\\\x00-\x1f]/.test($))$=$.replace(/([\x00-\x1f\\"])/g,function(A,$){var _=m[$];if(_)return _;_=$.charCodeAt();return"\\u00"+Math.floor(_/16).toString(16)+(_%16).toString(16)});return"\""+$+"\""}};$.toJSON=function(_){var $=isNaN(_)?s[typeof _]:s["number"];if($)return $(_)};$.parseJSON=function(v,safe){if(safe===undefined)safe=$.parseJSON.safe;if(safe&&!/^("(\\.|[^"\\\n\r])*?"|[,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t])+?$/.test(v))return undefined;return eval("("+v+")")};$.parseJSON.safe=false})(jQuery);AjaxService=function(E,D,B,A,_,C){$.ajax({data:C,url:E,type:"POST",async:D,dataType:_,contentType:"application/json;utf-8",cache:false,success:function($){B($)},error:function(B,_){if(_=="error"){try{A(B.statusText)}catch($){}}else A(_)},beforeSend:function($){if(!C)$.setRequestHeader("Content-Type","application/json;utf-8")}})};renderDate=function(value){return eval("new "+value.substr(1,value.length-2)).format("yyyy-MM-dd")};Date.prototype.format=function(_){var $={"M+":this.getMonth()+1,"d+":this.getDate(),"h+":this.getHours(),"m+":this.getMinutes(),"s+":this.getSeconds(),"q+":Math.floor((this.getMonth()+3)/3),"S":this.getMilliseconds()};if(/(y+)/.test(_))_=_.replace(RegExp.$1,(this.getFullYear()+"").substr(4-RegExp.$1.length));for(var A in $)if(new RegExp("("+A+")").test(_))_=_.replace(RegExp.$1,RegExp.$1.length==1?$[A]:("00"+$[A]).substr((""+$[A]).length));return _};var _st=window.setTimeout;window.setTimeout=function(A,B){if(typeof A=="function"){var _=Array.prototype.slice.call(arguments,2),$=(function(){A.apply(null,_)});return _st($,B)}return _st(A,B)};jQuery.extend({init_slide:function(I,G,Q,C,S,T,P,L,H){if(!H)H="_blank";if(!T)T=6000;if(!L)L="#fff";var O,K,F,_,J;F=$("#"+I+" img:eq(0)").clone();_=$(F).attr("rel");J=$(F).attr("src");var M=new Image();M.src=$(F).attr("src");var B=new Array(),N,E,R,D,A;$("#"+G).append("<div class=myslide style=\"width:"+Q+"px;height:"+C+"px\"><div id="+G+"show class=slideshowbg\" ></div><div class=\"slidelink\" id="+G+"link align=center valign=top></div></div>"+"<div class=slidetitle style=\"width:"+Q+"px;background-color:"+L+"\" id="+G+"linktitle ></div>");$("#"+I+" img").each(function(A){var _=A+1;N=$(this).attr("title");R=$(this).attr("rel");E=$(this).attr("src");if(N)D=N;if(N===undefined){D=$(this).attr("src");D=D.replace(new RegExp(/\.*\w*\//g),"")}B[A]="<span rel=\""+E+"\" link=\""+R+"\" title=\""+D+"\" no=\""+_+"\" >"+_+"</span>"});if(!P)$("#"+G+"link").hide();if(!S)$("#"+G+"linktitle").hide();$("#"+G+"link").html(B.join(""));$("#"+G+"link span").addClass("link_nor");$("#"+G+"link span:eq(0)").addClass("link_act");$("#"+G+"link span").click(function(){var _=$(this).attr("rel"),A=this.title,B=$(this).attr("link"),C=$(this).text();C=parseInt(C,10);clearTimeout(O);O=setTimeout(function(){q=C;if(!q)q=1;K=$("#"+G+"link span").size()-1;if(q>K)q=0;$("#"+G+"link span").eq(q).click();q=q+1},T);$("#"+G+"link span").removeClass("link_act");$(this).addClass("link_act");$("#"+G+"show").html("<a href="+B+" target="+H+" ><img border=\"0\" src="+_+" style=\"display:none\"></a>");$("#"+G+"show img").fadeIn("slow");$("#"+G+"linktitle").html("<a href="+B+" target="+H+" >"+A+"</a>");$("#"+G+"show img").hover(function(){clearTimeout(O);$(this).fadeTo("slow",0.8)},function(){$(this).fadeTo("slow",1);K=$("#"+G+"link span").size();if(C>K)C=0;clearTimeout(O);O=setTimeout(function(){q=C;if(!q)q=1;K=$("#"+G+"link span").size()-1;if(q>K)q=0;$("#"+G+"link span").eq(q).click();q=q+1},100)})});$("#"+G+"link span").eq(0).click()}});jQuery.fn.extend({Dialog:function(_){_=$.extend({animate:"",showmask:true,maskColor:"#000000",maskOpacity:"5",left:"",right:"",top:"",draggable:false,dragHandle:"",bodyHandle:"",footHandle:"",dragRange:"",minimize:"",minimizecallback:"",restore:"",restorecallback:"",close:"",state:"max",aferRun:""},_);return this.each(function(){var B=$(this);if(_.showmask){$("body").append("<div id='dialogmask'><div>");$("#dialogmask").css({position:"absolute",top:"0px",left:"0px",width:$(window).width()+"px",height:$("body").height()+"px",zIndex:"999",background:_.maskColor});$("#dialogmask").Opacity(_.maskOpacity)}var D=(_.left=="")?(($(window).width()-B.width())/2):_.left,A=(_.top=="")?(($(window).height()-B.height())/3):_.top;if(_.animate==""){B.css({position:"absolute",top:(A+document.documentElement.scrollTop)+"px",zIndex:"1000"});if(_.right)B.css("right",_.right+"px");else B.css("left",D+"px");B.show("",_.aferRun)}else{B.css({position:"absolute",top:"0px",zIndex:"1000"});if(_.right)B.css("right",_.right+"px");else B.css("left",D+"px");B.slideDown(200);B.animate({top:(A+document.documentElement.scrollTop)+"px"},{easing:_.animate,duration:800})}if(_.draggable)B.Drag({handle:_.dragHandle,range:_.dragRange});if(_.close!="")$(_.close).click(function(){B.CloseDialog(_.showmask);$(this).unbind("click")});if(_.minimize!="")$(_.minimize).click(function(){A=B.MinDialog(B,_.bodyHandle,_.footHandle,_.minimize,_.restore,_.minimizecallback)});if(_.restore!=""){$(_.restore).hide();$(_.restore).click(function(){A=B.restoreDialog(B,_.bodyHandle,_.footHandle,_.minimize,_.restore,_.restorecallback)})}if(_.state=="min")$(_.minimize).click();var C;$(window).scroll(function(){if(C)clearInterval(C);C=setInterval(function(){B.css({top:(A+$(this).scrollTop())+"px"});clearInterval(C)},100)})})},CloseDialog:function(_){return this.each(function(){$(this).slideUp(100,function(){if(_)$("#dialogmask").remove()})})},MinDialog:function(E,D,_,C,A,B){E.saveViewState(E);$(C).hide();$(A).show();$(D).hide();$(_).hide();E.css("width","150px");E.css("right","2px");E.css("left","auto");E.css("top",($(window).height()-E.height()+$(window).scrollTop()-2)+"px");if(typeof B=="function")B();return($(window).height()-E.height()-2)},restoreDialog:function(E,D,_,C,A,B){$(C).show();$(A).hide();$(D).show();$(_).show();E.css("width",E.lastwidth+"px");E.css("left",E.lastleft+"px");E.css("top",E.lasttop+$(window).scrollTop()+"px");if(typeof B=="function")B();return E.lasttop},saveViewState:function(_){_.lasttop=parseInt(_.css("top"))-$(window).scrollTop();_.lastleft=parseInt(_.css("left"));_.lastwidth=parseInt(_.css("width"))},DialogRange:function(){return this.each(function(){$(this).width($(window).width()-3);$(this).height($(window).height()-8)})}});jQuery.extend({easing:{easein:function(C,_,A,B,$){return B*(_/=$)*_+A},easeinout:function(D,_,B,C,$){if(_<$/2)return 2*C*_*_/($*$)+B;var A=_-$/2;return-2*C*A*A/($*$)+2*C*A/$+C/2+B},easeout:function(C,_,A,B,$){return-B*_*_/($*$)+2*B*_/$+A},expoin:function(D,_,A,B,$){var C=1;if(B<0){C*=-1;B*=-1}return C*(Math.exp(Math.log(B)/$*_))+A},expoout:function(D,_,A,B,$){var C=1;if(B<0){C*=-1;B*=-1}return C*(-Math.exp(-Math.log(B)/$*(_-$))+B+1)+A},expoinout:function(D,_,A,B,$){var C=1;if(B<0){C*=-1;B*=-1}if(_<$/2)return C*(Math.exp(Math.log(B/2)/($/2)*_))+A;return C*(-Math.exp(-2*Math.log(B/2)/$*(_-$))+B+1)+A},bouncein:function(C,_,A,B,$){return B-jQuery.easing["bounceout"](C,$-_,0,B,$)+A},bounceout:function(C,_,A,B,$){if((_/=$)<(1/2.75))return B*(7.5625*_*_)+A;else if(_<(2/2.75))return B*(7.5625*(_-=(1.5/2.75))*_+0.75)+A;else if(_<(2.5/2.75))return B*(7.5625*(_-=(2.25/2.75))*_+0.9375)+A;else return B*(7.5625*(_-=(2.625/2.75))*_+0.984375)+A},bounceinout:function(C,_,A,B,$){if(_<$/2)return jQuery.easing["bouncein"](C,_*2,0,B,$)*0.5+A;return jQuery.easing["bounceout"](C,_*2-$,0,B,$)*0.5+B*0.5+A},elasin:function(F,_,B,C,$){var A=1.70158,E=0,D=C;if(_==0)return B;if((_/=$)==1)return B+C;if(!E)E=$*0.3;if(D<Math.abs(C)){D=C;A=E/4}else A=E/(2*Math.PI)*Math.asin(C/D);return-(D*Math.pow(2,10*(_-=1))*Math.sin((_*$-A)*(2*Math.PI)/E))+B},elasout:function(F,_,B,C,$){var A=1.70158,E=0,D=C;if(_==0)return B;if((_/=$)==1)return B+C;if(!E)E=$*0.3;if(D<Math.abs(C)){D=C;A=E/4}else A=E/(2*Math.PI)*Math.asin(C/D);return D*Math.pow(2,-10*_)*Math.sin((_*$-A)*(2*Math.PI)/E)+C+B},elasinout:function(F,_,B,C,$){var A=1.70158,E=0,D=C;if(_==0)return B;if((_/=$/2)==2)return B+C;if(!E)E=$*(0.3*1.5);if(D<Math.abs(C)){D=C;A=E/4}else A=E/(2*Math.PI)*Math.asin(C/D);if(_<1)return-0.5*(D*Math.pow(2,10*(_-=1))*Math.sin((_*$-A)*(2*Math.PI)/E))+B;return D*Math.pow(2,-10*(_-=1))*Math.sin((_*$-A)*(2*Math.PI)/E)*0.5+C+B},backin:function(D,_,B,C,$){var A=1.70158;return C*(_/=$)*_*((A+1)*_-A)+B},backout:function(D,_,B,C,$){var A=1.70158;return C*((_=_/$-1)*_*((A+1)*_+A)+1)+B},backinout:function(D,_,B,C,$){var A=1.70158;if((_/=$/2)<1)return C/2*(_*_*(((A*=(1.525))+1)*_-A))+B;return C/2*((_-=2)*_*(((A*=(1.525))+1)*_+A)+2)+B},linear:function(C,_,A,B,$){return B*_/$+A}}});(function($){$.fn.idTabs=function(){var _={"start":null,"return":false,"click":null};for(var F=0;F<arguments.length;++F){var C={},B=arguments[F];switch(typeof B){case"object":$.extend(C,B);break;case"number":case"string":C.start=B;break;case"boolean":C["return"]=B;break;case"function":C.click=B;break}$.extend(_,C)}var E=this,D=$("a",this).click(function(){if($("a.selected",E)[0]==this)return _["return"];var A="#"+this.href.split("#")[1],B=[],C=[];$("a",E).each(function(){if(this.href.match(/#/)){B[B.length]=this;C[C.length]="#"+this.href.split("#")[1]}});if(_.click&&!_.click(A,C,E))return _["return"];for(F in B)$(B[F]).removeClass("selected");for(F in C)$(C[F]).hide();$(this).addClass("selected");$(A).show();return _["return"]}),A;if(typeof _.start=="number"&&(A=D.filter(":eq("+_.start+")")).length)A.click();else if(typeof _.start=="string"&&(A=D.filter("[@href='#"+_.start+"']")).length)A.click();else if((A=D.filter(".selected")).length)A.removeClass("selected").click();else D.filter(":first").click();return this};$(function(){$(".idTabs").each(function(){$(this).idTabs()})})})(jQuery);jQuery.fn.rater=function(D,K,I){var A={url:D,maxvalue:3,curvalue:0,enabled:true};if(K)jQuery.extend(A,K);jQuery.extend(A,{cancel:(A.maxvalue>1)?true:false});var H=jQuery(this);jQuery.extend(H,{averageRating:A.curvalue,url:A.url});var G=25,B=A.maxvalue*G,C=A.curvalue*G,F="";if(typeof A.title=="object"&&typeof A.title[A.curvalue]=="string")F=A.title[A.curvalue];else F=A.curvalue+"/"+A.maxvalue;var J="<ul class=\"rating\" style=\"width:"+B+"px\" title=\""+F+"\">";H.html(J);var _="<li class=\"current\" style=\"width:"+C+"px\"></li>";if(A.enabled)for(var E=1;E<=A.maxvalue;E++){if(typeof A.title=="object"&&typeof A.title[E]=="string")F=A.title[E];else F=E+"/"+A.maxvalue;_+="<li class=\"star\" style=\"width:"+E*G+"px;z-index:"+(A.maxvalue-E+1)+"\" title=\""+F+"\"></li>"}H.find(".rating").html(_);H.find(".rating").find(".star").hover(function(){H.find(".rating").find(".current").hide();this.className="star_hover"},function(){H.find(".rating").find(".current").show();this.className="star"});H.find(".rating").find(".star").click(function(){var _=A.maxvalue-$(this).css("z-index")+1;H.find(".rating").find(".current").width(G*_);if(D){$.post(D,{value:_},function($){if(typeof I=="function")I(H,_,$)});return}if(typeof I=="function"){I(H,_);return}})};(function($){$.fn.corner=function(E){var A=$.browser.msie&&/MSIE 6.0/.test(navigator.userAgent);function L(_,A){return parseInt($.css(_,A))||0}function D($){var $=parseInt($).toString(16);return($.length<2)?"0"+$:$}function G(A){for(;A&&A.nodeName.toLowerCase()!="html";A=A.parentNode){var _=$.css(A,"backgroundColor");if(_.indexOf("rgb")>=0){if($.browser.safari&&_=="rgba(0, 0, 0, 0)")continue;var B=_.match(/\d+/g);return"#"+D(B[0])+D(B[1])+D(B[2])}if(_&&_!="transparent")return _}return"#ffffff"}function K($){switch(B){case"round":return Math.round(C*(1-Math.cos(Math.asin($/C))));case"cool":return Math.round(C*(1+Math.cos(Math.asin($/C))));case"sharp":return Math.round(C*(1-Math.cos(Math.acos($/C))));case"bite":return Math.round(C*(Math.cos(Math.asin((C-$-1)/C))));case"slide":return Math.round(C*(Math.atan2($,C/$)));case"jut":return Math.round(C*(Math.atan2(C,(C-$-1))));case"curl":return Math.round(C*(Math.atan($)));case"tear":return Math.round(C*(Math.cos($)));case"wicked":return Math.round(C*(Math.tan($)));case"long":return Math.round(C*(Math.sqrt($)));case"sculpt":return Math.round(C*(Math.log((C-$-1),C)));case"dog":return($&1)?($+1):C;case"dog2":return($&2)?($+1):C;case"dog3":return($&3)?($+1):C;case"fray":return($%2)*C;case"notch":return C;case"bevel":return $+1}}E=(E||"").toLowerCase();var N=/keep/.test(E),M=((E.match(/cc:(#[0-9a-f]+)/)||[])[1]),F=((E.match(/sc:(#[0-9a-f]+)/)||[])[1]),C=parseInt((E.match(/(\d+)px/)||[])[1])||10,I=/round|bevel|notch|bite|cool|sharp|slide|jut|curl|tear|fray|wicked|sculpt|long|dog3|dog2|dog/,B=((E.match(I)||["round"])[0]),J={T:0,B:1},_={TL:/top|tl/.test(E),TR:/top|tr/.test(E),BL:/bottom|bl/.test(E),BR:/bottom|br/.test(E)};if(!_.TL&&!_.TR&&!_.BL&&!_.BR)_={TL:1,TR:1,BL:1,BR:1};var H=document.createElement("div");H.style.overflow="hidden";H.style.height="1px";H.style.backgroundColor=F||"transparent";H.style.borderStyle="solid";return this.each(function(I){var E={T:parseInt($.css(this,"paddingTop"))||0,R:parseInt($.css(this,"paddingRight"))||0,B:parseInt($.css(this,"paddingBottom"))||0,L:parseInt($.css(this,"paddingLeft"))||0};if($.browser.msie)this.style.zoom=1;if(!N)this.style.border="none";H.style.borderColor=M||G(this.parentNode);var D=$.curCSS(this,"height");for(var R in J){var P=J[R];if((P&&(_.BL||_.BR))||(!P&&(_.TL||_.TR))){H.style.borderStyle="none "+(_[R+"R"]?"solid":"none")+" none "+(_[R+"L"]?"solid":"none");var F=document.createElement("div");$(F).addClass("jquery-corner");var S=F.style;P?this.appendChild(F):this.insertBefore(F,this.firstChild);if(P&&D!="auto"){if($.css(this,"position")=="static")this.style.position="relative";S.position="absolute";S.bottom=S.left=S.padding=S.margin="0";if($.browser.msie)S.setExpression("width","this.parentNode.offsetWidth");else S.width="100%"}else if(!P&&$.browser.msie){if($.css(this,"position")=="static")this.style.position="relative";S.position="absolute";S.top=S.left=S.right=S.padding=S.margin="0";var Q=0;if(A||!$.boxModel)Q=L(this,"borderLeftWidth")+L(this,"borderRightWidth");A?S.setExpression("width","this.parentNode.offsetWidth - "+Q+"+ \"px\""):S.width="100%"}else S.margin=!P?"-"+E.T+"px -"+E.R+"px "+(E.T-C)+"px -"+E.L+"px":(E.B-C)+"px -"+E.R+"px -"+E.B+"px -"+E.L+"px";for(var T=0;T<C;T++){var B=Math.max(0,K(T)),O=H.cloneNode(false);O.style.borderWidth="0 "+(_[R+"R"]?B:0)+"px 0 "+(_[R+"L"]?B:0)+"px";P?F.appendChild(O):F.insertBefore(O,F.firstChild)}}}})};$.fn.uncorner=function(_){return $(".jquery-corner",this).remove()}})(jQuery);(function(C){var _=C.fn.height,D=C.fn.width;C.fn.extend({height:function(){if(!this[0])B();if(this[0]==window)if(C.browser.opera||(C.browser.safari&&parseInt(C.browser.version)>520))return self.innerHeight-((C(document).height()>self.innerHeight)?E():0);else if(C.browser.safari)return self.innerHeight;else return C.boxModel&&document.documentElement.clientHeight||document.body.clientHeight;if(this[0]==document)return Math.max((C.boxModel&&document.documentElement.scrollHeight||document.body.scrollHeight),document.body.offsetHeight);return _.apply(this,arguments)},width:function(){if(!this[0])B();if(this[0]==window)if(C.browser.opera||(C.browser.safari&&parseInt(C.browser.version)>520))return self.innerWidth-((C(document).width()>self.innerWidth)?E():0);else if(C.browser.safari)return self.innerWidth;else return C.boxModel&&document.documentElement.clientWidth||document.body.clientWidth;if(this[0]==document)if(C.browser.mozilla){var $=self.pageXOffset;self.scrollTo(99999999,self.pageYOffset);var _=self.pageXOffset;self.scrollTo($,self.pageYOffset);return document.body.offsetWidth+_}else return Math.max(((C.boxModel&&!C.browser.safari)&&document.documentElement.scrollWidth||document.body.scrollWidth),document.body.offsetWidth);return D.apply(this,arguments)},innerHeight:function(){if(!this[0])B();return this[0]==window||this[0]==document?this.height():this.is(":visible")?this[0].offsetHeight-$(this,"borderTopWidth")-$(this,"borderBottomWidth"):this.height()+$(this,"paddingTop")+$(this,"paddingBottom")},innerWidth:function(){if(!this[0])B();return this[0]==window||this[0]==document?this.width():this.is(":visible")?this[0].offsetWidth-$(this,"borderLeftWidth")-$(this,"borderRightWidth"):this.width()+$(this,"paddingLeft")+$(this,"paddingRight")},outerHeight:function(_){if(!this[0])B();_=C.extend({margin:false},_||{});return this[0]==window||this[0]==document?this.height():this.is(":visible")?this[0].offsetHeight+(_.margin?($(this,"marginTop")+$(this,"marginBottom")):0):this.height()+$(this,"borderTopWidth")+$(this,"borderBottomWidth")+$(this,"paddingTop")+$(this,"paddingBottom")+(_.margin?($(this,"marginTop")+$(this,"marginBottom")):0)},outerWidth:function(_){if(!this[0])B();_=C.extend({margin:false},_||{});return this[0]==window||this[0]==document?this.width():this.is(":visible")?this[0].offsetWidth+(_.margin?($(this,"marginLeft")+$(this,"marginRight")):0):this.width()+$(this,"borderLeftWidth")+$(this,"borderRightWidth")+$(this,"paddingLeft")+$(this,"paddingRight")+(_.margin?($(this,"marginLeft")+$(this,"marginRight")):0)},scrollLeft:function($){if(!this[0])B();if($!=undefined)return this.each(function(){if(this==window||this==document)window.scrollTo($,C(window).scrollTop());else this.scrollLeft=$});if(this[0]==window||this[0]==document)return self.pageXOffset||C.boxModel&&document.documentElement.scrollLeft||document.body.scrollLeft;return this[0].scrollLeft},scrollTop:function($){if(!this[0])B();if($!=undefined)return this.each(function(){if(this==window||this==document)window.scrollTo(C(window).scrollLeft(),$);else this.scrollTop=$});if(this[0]==window||this[0]==document)return self.pageYOffset||C.boxModel&&document.documentElement.scrollTop||document.body.scrollTop;return this[0].scrollTop},position:function($){return this.offset({margin:false,scroll:false,relativeTo:this.offsetParent()},$)},offset:function(T,K){if(!this[0])B();var U=0,S=0,_=0,Q=0,L=this[0],I=this[0],E,R,M=C.css(L,"position"),D=C.browser.mozilla,O=C.browser.msie,N=C.browser.opera,J=C.browser.safari,G=C.browser.safari&&parseInt(C.browser.version)>520,F=false,P=false,T=C.extend({margin:true,border:false,padding:false,scroll:true,lite:false,relativeTo:document.body},T||{});if(T.lite)return this.offsetLite(T,K);if(T.relativeTo.jquery)T.relativeTo=T.relativeTo[0];if(L.tagName=="BODY"){U=L.offsetLeft;S=L.offsetTop;if(D){U+=$(L,"marginLeft")+($(L,"borderLeftWidth")*2);S+=$(L,"marginTop")+($(L,"borderTopWidth")*2)}else if(N){U+=$(L,"marginLeft");S+=$(L,"marginTop")}else if((O&&jQuery.boxModel)){U+=$(L,"borderLeftWidth");S+=$(L,"borderTopWidth")}else if(G){U+=$(L,"marginLeft")+$(L,"borderLeftWidth");S+=$(L,"marginTop")+$(L,"borderTopWidth")}}else do{R=C.css(I,"position");U+=I.offsetLeft;S+=I.offsetTop;if((D&&!I.tagName.match(/^t[d|h]$/i))||O||G){U+=$(I,"borderLeftWidth");S+=$(I,"borderTopWidth");if(D&&R=="absolute")F=true;if(O&&R=="relative")P=true}E=I.offsetParent||document.body;if(T.scroll||D)do{if(T.scroll){_+=I.scrollLeft;Q+=I.scrollTop}if(N&&(C.css(I,"display")||"").match(/table-row|inline/)){_=_-((I.scrollLeft==I.offsetLeft)?I.scrollLeft:0);Q=Q-((I.scrollTop==I.offsetTop)?I.scrollTop:0)}if(D&&I!=L&&C.css(I,"overflow")!="visible"){U+=$(I,"borderLeftWidth");S+=$(I,"borderTopWidth")}I=I.parentNode}while(I!=E);I=E;if(I==T.relativeTo&&!(I.tagName=="BODY"||I.tagName=="HTML")){if(D&&I!=L&&C.css(I,"overflow")!="visible"){U+=$(I,"borderLeftWidth");S+=$(I,"borderTopWidth")}if(((J&&!G)||N)&&R!="static"){U-=$(E,"borderLeftWidth");S-=$(E,"borderTopWidth")}break}if(I.tagName=="BODY"||I.tagName=="HTML"){if(((J&&!G)||(O&&C.boxModel))&&M!="absolute"&&M!="fixed"){U+=$(I,"marginLeft");S+=$(I,"marginTop")}if(G||(D&&!F&&M!="fixed")||(O&&M=="static"&&!P)){U+=$(I,"borderLeftWidth");S+=$(I,"borderTopWidth")}break}}while(I);var H=A(L,T,U,S,_,Q);if(K){C.extend(K,H);return this}else return H},offsetLite:function(J,G){if(!this[0])B();var I=0,H=0,$=0,F=0,E=this[0],_,J=C.extend({margin:true,border:false,padding:false,scroll:true,relativeTo:document.body},J||{});if(J.relativeTo.jquery)J.relativeTo=J.relativeTo[0];do{I+=E.offsetLeft;H+=E.offsetTop;_=E.offsetParent||document.body;if(J.scroll)do{$+=E.scrollLeft;F+=E.scrollTop;E=E.parentNode}while(E!=_);E=_}while(E&&E.tagName!="BODY"&&E.tagName!="HTML"&&E!=J.relativeTo);var D=A(this[0],J,I,H,$,F);if(G){C.extend(G,D);return this}else return D},offsetParent:function(){if(!this[0])B();var $=this[0].offsetParent;while($&&($.tagName!="BODY"&&C.css($,"position")=="static"))$=$.offsetParent;return C($)}});var B=function(){throw"Dimensions: jQuery collection is empty"},$=function($,_){return parseInt(C.css($.jquery?$[0]:$,_))||0},A=function(A,F,E,D,_,B){if(!F.margin){E-=$(A,"marginLeft");D-=$(A,"marginTop")}if(F.border&&((C.browser.safari&&parseInt(C.browser.version)<520)||C.browser.opera)){E+=$(A,"borderLeftWidth");D+=$(A,"borderTopWidth")}else if(!F.border&&!((C.browser.safari&&parseInt(C.browser.version)<520)||C.browser.opera)){E-=$(A,"borderLeftWidth");D-=$(A,"borderTopWidth")}if(F.padding){E+=$(A,"paddingLeft");D+=$(A,"paddingTop")}if(F.scroll&&(!C.browser.opera||A.offsetLeft!=A.scrollLeft&&A.offsetTop!=A.scrollLeft)){_-=A.scrollLeft;B-=A.scrollTop}return F.scroll?{top:D-B,left:E-_,scrollTop:B,scrollLeft:_}:{top:D,left:E}},F=0,E=function(){if(!F){var $=C("<div>").css({width:100,height:100,overflow:"auto",position:"absolute",top:-1000,left:-1000}).appendTo("body");F=100-$.append("<div>").find("div").css({width:"100%",height:200}).width();$.remove()}return F}})(jQuery);(function(A){var $=[];A.fn.jdNewsScroll=function(_){_=A.extend({},arguments.callee.defaults,_);A(this).css({"position":"relative","overflow":"hidden","width":"100%","height":_.divHeight});A(this).find("ul").css({"position":"relative","list-style-type":"none","margin":"0px"});A(this).find("li").css({"line-height":_.lineHeight,"margin":"0px","white-space":"normal","text-overflow":"ellipsis"});A(this).each(function(){this.$settings=_;this.$pause=false;this.$counter=_.beginTime;A(this).hover(function(){A(this).jdNewsScrollPause(true)},function(){A(this).jdNewsScrollPause(false)});$.push(this)});return this};A.fn.jdNewsScroll.defaults={beginTime:10,scrollRows:1,divHeight:"200px",lineHeight:"20px",delay:30,step:2};A.fn.jdNewsScrollPause=function($){return this.each(function(){this.$pause=$})};setInterval(_,85);function _(){for(var D=0;D<$.length;D++){var B=$[D];if(B&&!B.$pause)if(B.$counter==0){var _=A("> ul",B)[0];if(!B.$steps){B.$steps=A("> li:last-child",_).outerHeight()*B.$settings.scrollRows;B.$step=0}if((B.$steps+B.$step)<=0){B.$counter=B.$settings.delay;B.$steps=false;for(var C=0;C<B.$settings.scrollRows;C++){A(_).css("top","0").find("> li:last-child").after(A("> li:first-child",_));A("> *",_).not("li").remove()}}else{B.$step-=B.$settings.step;if(-B.$step>B.$steps)B.$step=-B.$steps;_.style.top=B.$step+"px"}}else B.$counter--}}})(jQuery);(function($){$.fn.bgIframe=$.fn.bgiframe=function(_){if($.browser.msie){_=$.extend({top:"auto",left:"auto",width:"auto",height:"auto",opacity:true,src:"javascript:false;"},_||{});var A=function($){return $&&$.constructor==Number?$+"px":$},B="<iframe class=\"bgiframe\"frameborder=\"0\"tabindex=\"-1\"src=\""+_.src+"\""+"style=\"display:block;position:absolute;z-index:-1;"+(_.opacity!==false?"filter:Alpha(Opacity='0');":"")+"top:"+(_.top=="auto"?"expression(((parseInt(this.parentNode.currentStyle.borderTopWidth)||0)*-1)+'px')":A(_.top))+";"+"left:"+(_.left=="auto"?"expression(((parseInt(this.parentNode.currentStyle.borderLeftWidth)||0)*-1)+'px')":A(_.left))+";"+"width:"+(_.width=="auto"?"expression(this.parentNode.offsetWidth+'px')":A(_.width))+";"+"height:"+(_.height=="auto"?"expression(this.parentNode.offsetHeight+'px')":A(_.height))+";"+"\"/>";return this.each(function(){if($("> iframe.bgiframe",this).length==0)this.insertBefore(document.createElement(B),this.firstChild)})}return this}})(jQuery);(function($){$.fn.superfish=function(A){var E=$.fn.superfish,B=E.c,C=$(["<span class=\"",B.arrowClass,"\"> &#187;</span>"].join("")),_=function(){var _=$(this),A=D(_);clearTimeout(A.sfTimer);_.showSuperfishUl().siblings().hideSuperfishUl()},G=function(){var A=$(this),B=D(A),C=E.op;clearTimeout(B.sfTimer);B.sfTimer=setTimeout(function(){C.retainPath=($.inArray(A[0],C.$path)>-1);A.hideSuperfishUl();if(C.$path.length&&A.parents(["li.",C.hoverClass].join("")).length<1)_.call(C.$path)},C.delay)},D=function($){var _=$.parents(["ul.",B.menuClass,":first"].join(""))[0];E.op=E.o[_.serial];return _},F=function($){$.addClass(B.anchorClass).append(C.clone())};return this.each(function(){var C=this.serial=E.o.length,D=$.extend({},E.defaults,A);D.$path=$("li."+D.pathClass,this).slice(0,D.pathLevels).each(function(){$(this).addClass([D.hoverClass,B.bcClass].join(" ")).filter("li:has(ul)").removeClass(D.pathClass)});E.o[C]=E.op=D;$("li:has(ul)",this)[($.fn.hoverIntent&&!D.disableHI)?"hoverIntent":"hover"](_,G).each(function(){if(D.autoArrows)F($(">a:first-child",this))}).not("."+B.bcClass).hideSuperfishUl();var H=$("a",this);H.each(function(A){var $=H.eq(A).parents("li");H.eq(A).focus(function(){_.call($)}).blur(function(){G.call($)})});D.onInit.call(this)}).each(function(){var _=[B.menuClass];if(E.op.dropShadows&&!($.browser.msie&&$.browser.version<7))_.push(B.shadowClass);$(this).addClass(_.join(" "))})};var _=$.fn.superfish;_.o=[];_.op={};_.IE7fix=function(){var A=_.op;if($.browser.msie&&$.browser.version>6&&A.dropShadows&&A.animation.opacity!=undefined)this.toggleClass(_.c.shadowClass+"-off")};_.c={bcClass:"sf-breadcrumb",menuClass:"sf-js-enabled",anchorClass:"sf-with-ul",arrowClass:"sf-sub-indicator",shadowClass:"sf-shadow"};_.defaults={hoverClass:"sfHover",pathClass:"overideThisToUse",pathLevels:1,delay:800,animation:{opacity:"show"},speed:"normal",autoArrows:true,dropShadows:true,disableHI:false,onInit:function(){},onBeforeShow:function(){},onShow:function(){},onHide:function(){}};$.fn.extend({hideSuperfishUl:function(){var C=_.op,A=(C.retainPath===true)?C.$path:"";C.retainPath=false;var B=$(["li.",C.hoverClass].join(""),this).add(this).not(A).removeClass(C.hoverClass).find(">ul").hide().css("visibility","hidden");C.onHide.call(B);return this},showSuperfishUl:function(){var A=_.op,B=_.c.shadowClass+"-off",$=this.addClass(A.hoverClass).find(">ul:hidden").css("visibility","visible");_.IE7fix.call($);A.onBeforeShow.call($);$.animate(A.animation,A.speed,function(){_.IE7fix.call($);A.onShow.call($)});return this}})})(jQuery);(function($){$.fn.supersubs=function(A){var _=$.extend({},$.fn.supersubs.defaults,A);return this.each(function(){var A=$(this),B=$.meta?$.extend({},_,A.data()):_,C=$("<li id=\"menu-fontsize\">&#8212;</li>").css({"padding":0,"position":"absolute","top":"-999em","width":"auto"}).appendTo(A).width();$("#menu-fontsize").remove();$ULs=A.find("ul");$ULs.each(function(G){var A=$ULs.eq(G),_=A.children(),E=_.children("a"),F=_.css("white-space","nowrap").css("float"),D=A.add(_).add(E).css({"float":"none","width":"auto"}).end().end()[0].clientWidth/C;D+=B.extraWidth;if(D>B.maxWidth)D=B.maxWidth;else if(D<B.minWidth)D=B.minWidth;D+="em";A.css("width",D);_.css({"float":F,"width":"100%","white-space":"normal"}).each(function(){var A=$(">ul",this),_=A.css("left")!==undefined?"left":"right";A.css(_,D)})})})};$.fn.supersubs.defaults={minWidth:9,maxWidth:25,extraWidth:0}})(jQuery);(function($){$.fn.hoverIntent=function(_,A){var H={sensitivity:7,interval:100,timeout:0};H=$.extend(H,A?{over:_,out:A}:_);var E,G,J,I,D=function($){E=$.pageX;G=$.pageY},C=function(_,A){A.hoverIntent_t=clearTimeout(A.hoverIntent_t);if((Math.abs(J-E)+Math.abs(I-G))<H.sensitivity){$(A).unbind("mousemove",D);A.hoverIntent_s=1;return H.over.apply(A,[_])}else{J=E;I=G;A.hoverIntent_t=setTimeout(function(){C(_,A)},H.interval)}},F=function($,_){_.hoverIntent_t=clearTimeout(_.hoverIntent_t);_.hoverIntent_s=0;return H.out.apply(_,[$])},B=function(A){var E=(A.type=="mouseover"?A.fromElement:A.toElement)||A.relatedTarget;while(E&&E!=this){try{E=E.parentNode}catch(A){E=this}}if(E==this)return false;var _=jQuery.extend({},A),B=this;if(B.hoverIntent_t)B.hoverIntent_t=clearTimeout(B.hoverIntent_t);if(A.type=="mouseover"){J=_.pageX;I=_.pageY;$(B).bind("mousemove",D);if(B.hoverIntent_s!=1)B.hoverIntent_t=setTimeout(function(){C(_,B)},H.interval)}else{$(B).unbind("mousemove",D);if(B.hoverIntent_s==1)B.hoverIntent_t=setTimeout(function(){F(_,B)},H.timeout)}};return this.mouseover(B).mouseout(B)}})(jQuery);if(window.jQuery&&!window.jQuery.createTemplate)(function(){var Template=function($,A,_){this._tree=[];this._param={};this._includes=null;this._templates={};this._templates_code={};this.settings=jQuery.extend({disallow_functions:false,filter_data:true,filter_params:false,runnable_functions:false},_);this.splitTemplates($,A);if($)this.setTemplate(this._templates_code["MAIN"],A);this._templates_code=null};Template.prototype.version="0.6.6";Template.prototype.splitTemplates=function(_,E){var A=/\{#template *(\w*?)\}/g,D,B,C,$=null;while((D=A.exec(_))!=null){$=A.lastIndex;B=D[1];C=_.indexOf("{#/template "+B+"}",$);if(C==-1)throw new Error("jTemplates: Template \""+B+"\" is not closed.");this._templates_code[B]=_.substring($,C)}if($===null){this._templates_code["MAIN"]=_;return}for(var F in this._templates_code)if(F!="MAIN")this._templates[F]=new Template();for(F in this._templates_code)if(F!="MAIN"){this._templates[F].setTemplate(this._templates_code[F],jQuery.extend({},E||{},this._templates||{}));this._templates_code[F]=null}};Template.prototype.setTemplate=function(I,E){if(I==undefined){this._tree.push(new TextNode("",1));return}I=I.replace(/[\n\r]/g,"");I=I.replace(/\{\*.*?\*\}/g,"");this._includes=jQuery.extend({},this._templates||{},E||{});var H=this._tree,_=I.match(/\{#.*?\}/g),J=0,D=0,$,K=0,A=0;for(var F=0,C=(_)?(_.length):(0);F<C;++F){if(K){D=I.indexOf("{#/literal}");if(D==-1)throw new Error("jTemplates: No end of literal.");if(D>J)H.push(new TextNode(I.substring(J,D),1));J=D+11;K=0;F=jQuery.inArray("{#/literal}",_);continue}D=I.indexOf(_[F],J);if(D>J)H.push(new TextNode(I.substring(J,D),K));var B=_[F].match(/\{#([\w\/]+).*?\}/),G=RegExp.$1;switch(G){case"elseif":++A;H.switchToElse();case"if":$=new opIF(_[F],H);H.push($);H=$;break;case"else":H.switchToElse();break;case"/if":while(A){H=H.getParent();--A}case"/for":case"/foreach":H=H.getParent();break;case"foreach":$=new opFOREACH(_[F],H);H.push($);H=$;break;case"include":H.push(new Include(_[F],this._includes));break;case"param":H.push(new UserParam(_[F]));break;case"cycle":H.push(new Cycle(_[F]));break;case"ldelim":H.push(new TextNode("{"));break;case"rdelim":H.push(new TextNode("}"));break;case"literal":K=1;break;case"/literal":throw new Error("jTemplates: No begin of literal.");default:throw new Error("jTemplates: unknown tag "+G+".")}J=D+_[F].length}if(I.length>J)H.push(new TextNode(I.substr(J),K))};Template.prototype.get=function(B,C,_){var A=this.cloneData(B,{escapeData:this.settings.filter_data,noFunc:this.settings.disallow_functions}),G=jQuery.extend(this._param,C);if(this.settings.filter_params)G=this.cloneData(G,{escapeData:this.settings.filter_params,noFunc:false});var E=_;E.version=this.version;var $="";for(var F=0,D=this._tree.length;F<D;++F)$+=this._tree[F].get(A,G,E);return $};Template.prototype.setParam=function($,_){this._param[$]=_};Template.prototype.escapeHTML=function($){return $.replace(/&/g,"&amp;").replace(/>/g,"&gt;").replace(/</g,"&lt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;")};Template.prototype.cloneData=function($,B){if($==null)return $;switch($.constructor){case Object:var _={};for(var C in $)_[C]=this.cloneData($[C],B);return _;case Array:_=[];for(var C=0,A=$.length;C<A;++C)_[C]=this.cloneData($[C],B);return _;case String:return(B.escapeData)?(this.escapeHTML($)):($);case Function:if(B.noFunc)throw new Error("jTemplates: Functions are not allowed.");default:return $}};var TextNode=function($,_){this._value=$;this._literalMode=_};TextNode.prototype.get=function(d,param,element){var t=this._value;if(!this._literalMode){var $T=d,$P=param,$Q=element;t=t.replace(/\{(.*?)\}/g,function(__a0,__a1){var tmp=eval(__a1);if(typeof tmp=="function"){var settings=jQuery.data(element,"jTemplate").settings;if(settings.disallow_functions||!settings.runnable_functions)return"";else tmp=tmp($T,$P,$Q)}return(tmp===undefined)?(""):(String(tmp))})}return t};var opIF=function(_,$){this._parent=$;_.match(/\{#(?:else)*if (.*?)\}/);this._cond=RegExp.$1;this._onTrue=[];this._onFalse=[];this._currentState=this._onTrue};opIF.prototype.push=function($){this._currentState.push($)};opIF.prototype.getParent=function(){return this._parent};opIF.prototype.switchToElse=function(){this._currentState=this._onFalse};opIF.prototype.get=function(d,param,element){var $T=d,$P=param,$Q=element,tab=(eval(this._cond))?(this._onTrue):(this._onFalse),ret="";for(var i=0,l=tab.length;i<l;++i)ret+=tab[i].get(d,param,element);return ret};var opFOREACH=function(_,$){this._parent=$;_.match(/\{#foreach (.+?) as (\w+?)( .+)*\}/);this._arg=RegExp.$1;this._name=RegExp.$2;this._option=RegExp.$3||null;if(this._option!==null){var A=this._option.split(/[= ]/);if(A[0]==="")A.shift();this._option={};for(var C=0,B=A.length;C<B;C+=2)this._option[A[C]]=A[C+1]}else this._option={};this._onTrue=[];this._onFalse=[];this._currentState=this._onTrue};opFOREACH.prototype.push=function($){this._currentState.push($)};opFOREACH.prototype.getParent=function(){return this._parent};opFOREACH.prototype.switchToElse=function(){this._currentState=this._onFalse};opFOREACH.prototype.get=function(d,param,element){var $T=d,$P=param,$Q=element,count=eval(this._arg),key=[],mode=typeof count;if(mode=="object"){var arr=[];jQuery.each(count,function(_,$){key.push(_);arr.push($)});count=arr}var s=Number(eval(this._option.begin)||0),step=Number(eval(this._option.step)||1),e=count.length,ret="",i,l;if(this._option.count){var tmp=s+Number(eval(this._option.count));e=(tmp>e)?(e):(tmp)}if(e>s){var iteration=0,_total=Math.ceil((e-s)/step),ckey,cval;for(;s<e;s+=step,++iteration){ckey=key[s];cval=count[s];if((mode=="object")&&(ckey in Object)&&(Object[ckey]===$T[ckey]))continue;var p=$T[this._name]=cval;p.$index=s;p.$iteration=iteration;p.$first=(iteration==0);p.$last=(s+step>=e);p.$total=_total;$T[this._name+"$index"]=s;$T[this._name+"$iteration"]=iteration;$T[this._name+"$first"]=(iteration==0);$T[this._name+"$last"]=(s+step>=e);$T[this._name+"$total"]=_total;$T[this._name+"$key"]=ckey;$T[this._name+"$typeof"]=typeof cval;for(i=0,l=this._onTrue.length;i<l;++i)ret+=this._onTrue[i].get($T,param,element);delete p.$index;delete p.$iteration;delete p.$first;delete p.$last;delete p.$total;delete $T[this._name+"$index"];delete $T[this._name+"$iteration"];delete $T[this._name+"$first"];delete $T[this._name+"$last"];delete $T[this._name+"$total"];delete $T[this._name+"$key"];delete $T[this._name+"$typeof"];delete $T[this._name]}}else for(i=0,l=this._onFalse.length;i<l;++i)ret+=this._onFalse[i].get($T,param,element);return ret};var Include=function($,_){$.match(/\{#include (.*?)(?: root=(.*?))?\}/);this._template=_[RegExp.$1];if(this._template==undefined)throw new Error("jTemplates: Cannot find include: "+RegExp.$1);this._root=RegExp.$2};Include.prototype.get=function(d,param,element){var $T=d;return this._template.get(eval(this._root),param,element)};var UserParam=function($){$.match(/\{#param name=(\w*?) value=(.*?)\}/);this._name=RegExp.$1;this._value=RegExp.$2};UserParam.prototype.get=function(d,param,element){var $T=d,$P=param,$Q=element;param[this._name]=eval(this._value);return""};var Cycle=function(oper){oper.match(/\{#cycle values=(.*?)\}/);this._values=eval(RegExp.$1);this._length=this._values.length;if(this._length<=0)throw new Error("jTemplates: cycle has no elements");this._index=0;this._lastSessionID=-1};Cycle.prototype.get=function(A,B,_){var $=jQuery.data(_,"jTemplateSID");if($!=this._lastSessionID){this._lastSessionID=$;this._index=0}var C=this._index++%this._length;return this._values[C]};jQuery.fn.setTemplate=function($,A,_){if($.constructor===Template)jQuery(this).each(function(){jQuery.data(this,"jTemplate",$);jQuery.data(this,"jTemplateSID",0)});else jQuery(this).each(function(){jQuery.data(this,"jTemplate",new Template($,A,_));jQuery.data(this,"jTemplateSID",0)})};jQuery.fn.setTemplateURL=function($,B,A){var _=jQuery.ajax({url:$,async:false}).responseText;jQuery(this).setTemplate(_,B,A)};jQuery.fn.setTemplateElement=function(_,C,B){var A=$("#"+_).val();if(A==null){A=$("#"+_).html();A=A.replace(/&lt;/g,"<").replace(/&gt;/g,">")}A=jQuery.trim(A);A=A.replace(/^<\!\[CDATA\[([\s\S]*)\]\]>$/im,"$1");jQuery(this).setTemplate(A,C,B)};jQuery.fn.hasTemplate=function(){var $=0;jQuery(this).each(function(){if(jQuery.data(this,"jTemplate"))++$});return $};jQuery.fn.removeTemplate=function(){jQuery(this).processTemplateStop();jQuery(this).each(function(){jQuery.removeData(this,"jTemplate")})};jQuery.fn.setParam=function($,_){jQuery(this).each(function(){var A=jQuery.data(this,"jTemplate");if(A===undefined)throw new Error("jTemplates: Template is not defined.");A.setParam($,_)})};jQuery.fn.processTemplate=function($,_){jQuery(this).each(function(){var A=jQuery.data(this,"jTemplate");if(A===undefined)throw new Error("jTemplates: Template is not defined.");jQuery.data(this,"jTemplateSID",jQuery.data(this,"jTemplateSID")+1);jQuery(this).html(A.get($,_,this))})};jQuery.fn.processTemplateURL=function(_,B){var $=this,A=jQuery.ajax({url:_,async:false,cache:false,dataType:"json",success:function(_){jQuery($).processTemplate(_,B)}})};var Updater=function(D,B,A,C,_){this._url=D;this._param=B;this._interval=A;this._args=C;this.objs=_;this.timer=null;var $=this;jQuery(_).each(function(){jQuery.data(this,"jTemplateUpdater",$)});this.run()};Updater.prototype.run=function(){this.detectDeletedNodes();if(this.objs.length==0)return;var $=this;jQuery.getJSON(this._url,this._args,function(_){jQuery($.objs).processTemplate(_,$._param)});this.timer=setTimeout(function(){$.run()},this._interval)};Updater.prototype.detectDeletedNodes=function(){this.objs=jQuery.grep(this.objs,function(_){if(jQuery.browser.msie){var $=_.parentNode;while($&&$!=document)$=$.parentNode;return $!=null}else return _.parentNode!=null})};jQuery.fn.processTemplateStart=function(C,A,_,B){var $=new Updater(C,A,_,B,this);return $.timer};jQuery.fn.processTemplateStop=function(){jQuery(this).each(function(){var $=jQuery.data(this,"jTemplateUpdater");if($==null)return;var _=this;$.objs=jQuery.grep($.objs,function($){return $!=_});jQuery.removeData(this,"jTemplateUpdater")})};jQuery.extend({createTemplate:function($,A,_){return new Template($,A,_)},createTemplateURL:function($,B,A){var _=jQuery.ajax({url:$,async:false}).responseText;return new Template(_,B,A)}})})(jQuery)
