(function(a,b,c){function bc(b){if(!U){P=b,_(),y=a(P),Q=0,K.rel!=="nofollow"&&(y=a("."+g).filter(function(){var b=a.data(this,e).rel||this.rel;return b===K.rel}),Q=y.index(P),Q===-1&&(y=y.add(P),Q=y.length-1));if(!S){S=T=!0,r.show();if(K.returnFocus)try{P.blur(),a(P).one(l,function(){try{this.focus()}catch(a){}})}catch(c){}q.css({opacity:+K.opacity,cursor:K.overlayClose?"pointer":"auto"}).show(),K.w=Z(K.initialWidth,"x"),K.h=Z(K.initialHeight,"y"),X.position(),o&&z.bind("resize."+p+" scroll."+p,function(){q.css({width:z.width(),height:z.height(),top:z.scrollTop(),left:z.scrollLeft()})}).trigger("resize."+p),ba(h,K.onOpen),J.add(D).hide(),I.html(K.close).show()}X.load(!0)}}function bb(){var a,b=f+"Slideshow_",c="click."+f,d,e,g;K.slideshow&&y[1]?(d=function(){F.text(K.slideshowStop).unbind(c).bind(j,function(){if(Q<y.length-1||K.loop)a=setTimeout(X.next,K.slideshowSpeed)}).bind(i,function(){clearTimeout(a)}).one(c+" "+k,e),r.removeClass(b+"off").addClass(b+"on"),a=setTimeout(X.next,K.slideshowSpeed)},e=function(){clearTimeout(a),F.text(K.slideshowStart).unbind([j,i,k,c].join(" ")).one(c,d),r.removeClass(b+"on").addClass(b+"off")},K.slideshowAuto?d():e()):r.removeClass(b+"off "+b+"on")}function ba(b,c){c&&c.call(P),a.event.trigger(b)}function _(b){K=a.extend({},a.data(P,e));for(b in K)a.isFunction(K[b])&&b.substring(0,2)!=="on"&&(K[b]=K[b].call(P));K.rel=K.rel||P.rel||"nofollow",K.href=K.href||a(P).attr("href"),K.title=K.title||P.title,typeof K.href=="string"&&(K.href=a.trim(K.href))}function $(a){return K.photo||/\.(gif|png|jpg|jpeg|bmp)(?:\?([^#]*))?(?:#(\.*))?$/i.test(a)}function Z(a,b){return Math.round((/%/.test(a)?(b==="x"?z.width():z.height())/100:1)*parseInt(a,10))}function Y(c,d,e){e=b.createElement("div"),c&&(e.id=f+c),e.style.cssText=d||"";return a(e)}var d={transition:"elastic",speed:300,width:!1,initialWidth:"600",innerWidth:!1,maxWidth:!1,height:!1,initialHeight:"450",innerHeight:!1,maxHeight:!1,scalePhotos:!0,scrolling:!0,inline:!1,html:!1,iframe:!1,fastIframe:!0,photo:!1,href:!1,title:!1,rel:!1,opacity:.9,preloading:!0,current:"image {current} of {total}",previous:"previous",next:"next",close:"close",open:!1,returnFocus:!0,loop:!0,slideshow:!1,slideshowAuto:!0,slideshowSpeed:2500,slideshowStart:"start slideshow",slideshowStop:"stop slideshow",onOpen:!1,onLoad:!1,onComplete:!1,onCleanup:!1,onClosed:!1,overlayClose:!0,escKey:!0,arrowKey:!0,top:!1,bottom:!1,left:!1,right:!1,fixed:!1,data:!1},e="colorbox",f="cbox",g=f+"Element",h=f+"_open",i=f+"_load",j=f+"_complete",k=f+"_cleanup",l=f+"_closed",m=f+"_purge",n=a.browser.msie&&!a.support.opacity,o=n&&a.browser.version<7,p=f+"_IE6",q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X;X=a.fn[e]=a[e]=function(b,c){var f=this;b=b||{};if(!f[0]){if(f.selector)return f;f=a("<a/>"),b.open=!0}c&&(b.onComplete=c),f.each(function(){a.data(this,e,a.extend({},a.data(this,e)||d,b)),a(this).addClass(g)}),(a.isFunction(b.open)&&b.open.call(f)||b.open)&&bc(f[0]);return f},X.init=function(){z=a(c),r=Y().attr({id:e,"class":n?f+(o?"IE6":"IE"):""}),q=Y("Overlay",o?"position:absolute":"").hide(),s=Y("Wrapper"),t=Y("Content").append(A=Y("LoadedContent","width:0; height:0; overflow:hidden"),C=Y("LoadingOverlay").add(Y("LoadingGraphic")),D=Y("Title"),E=Y("Current"),G=Y("Next"),H=Y("Previous"),F=Y("Slideshow").bind(h,bb),I=Y("Close")),s.append(Y().append(Y("TopLeft"),u=Y("TopCenter"),Y("TopRight")),Y(!1,"clear:left").append(v=Y("MiddleLeft"),t,w=Y("MiddleRight")),Y(!1,"clear:left").append(Y("BottomLeft"),x=Y("BottomCenter"),Y("BottomRight"))).children().children().css({"float":"left"}),B=Y(!1,"position:absolute; width:9999px; visibility:hidden; display:none"),a("body").prepend(q,r.append(s,B)),t.children().hover(function(){a(this).addClass("hover")},function(){a(this).removeClass("hover")}).addClass("hover"),L=u.height()+x.height()+t.outerHeight(!0)-t.height(),M=v.width()+w.width()+t.outerWidth(!0)-t.width(),N=A.outerHeight(!0),O=A.outerWidth(!0),r.css({"padding-bottom":L,"padding-right":M}).hide(),G.click(function(){X.next()}),H.click(function(){X.prev()}),I.click(function(){X.close()}),J=G.add(H).add(E).add(F),t.children().removeClass("hover"),q.click(function(){K.overlayClose&&X.close()}),a(b).bind("keydown."+f,function(a){var b=a.keyCode;S&&K.escKey&&b===27&&(a.preventDefault(),X.close()),S&&K.arrowKey&&y[1]&&(b===37?(a.preventDefault(),H.click()):b===39&&(a.preventDefault(),G.click()))})},X.remove=function(){r.add(q).remove(),a("."+g).removeData(e).removeClass(g)},X.position=function(a,c){function g(a){u[0].style.width=x[0].style.width=t[0].style.width=a.style.width,C[0].style.height=C[1].style.height=t[0].style.height=v[0].style.height=w[0].style.height=a.style.height}var d=0,e=0;z.unbind("resize."+f),r.hide(),K.fixed&&!o?r.css({position:"fixed"}):(d=z.scrollTop(),e=z.scrollLeft(),r.css({position:"absolute"})),K.right!==!1?e+=Math.max(z.width()-K.w-O-M-Z(K.right,"x"),0):K.left!==!1?e+=Z(K.left,"x"):e+=Math.round(Math.max(z.width()-K.w-O-M,0)/2),K.bottom!==!1?d+=Math.max(b.documentElement.clientHeight-K.h-N-L-Z(K.bottom,"y"),0):K.top!==!1?d+=Z(K.top,"y"):d+=Math.round(Math.max(b.documentElement.clientHeight-K.h-N-L,0)/2),r.show(),a=r.width()===K.w+O&&r.height()===K.h+N?0:a||0,s[0].style.width=s[0].style.height="9999px",r.dequeue().animate({width:K.w+O,height:K.h+N,top:d,left:e},{duration:a,complete:function(){g(this),T=!1,s[0].style.width=K.w+O+M+"px",s[0].style.height=K.h+N+L+"px",c&&c(),setTimeout(function(){z.bind("resize."+f,X.position)},1)},step:function(){g(this)}})},X.resize=function(a){if(S){a=a||{},a.width&&(K.w=Z(a.width,"x")-O-M),a.innerWidth&&(K.w=Z(a.innerWidth,"x")),A.css({width:K.w}),a.height&&(K.h=Z(a.height,"y")-N-L),a.innerHeight&&(K.h=Z(a.innerHeight,"y"));if(!a.innerHeight&&!a.height){var b=A.wrapInner("<div style='overflow:auto'></div>").children();K.h=b.height(),b.replaceWith(b.children())}A.css({height:K.h}),X.position(K.transition==="none"?0:K.speed)}},X.prep=function(b){function h(){K.h=K.h||A.height(),K.h=K.mh&&K.mh<K.h?K.mh:K.h;return K.h}function g(){K.w=K.w||A.width(),K.w=K.mw&&K.mw<K.w?K.mw:K.w;return K.w}if(!!S){var c,d=K.transition==="none"?0:K.speed;A.remove(),A=Y("LoadedContent").append(b),A.hide().appendTo(B.show()).css({width:g(),overflow:K.scrolling?"auto":"hidden"}).css({height:h()}).prependTo(t),B.hide(),a(R).css({"float":"none"}),o&&a("select").not(r.find("select")).filter(function(){return this.style.visibility!=="hidden"}).css({visibility:"hidden"}).one(k,function(){this.style.visibility="inherit"}),c=function(){function o(){n&&r[0].style.removeAttribute("filter")}var b,c,g,h,i=y.length,k,l;!S||(l=function(){clearTimeout(W),C.hide(),ba(j,K.onComplete)},n&&R&&A.fadeIn(100),D.html(K.title).add(A).show(),i>1?(typeof K.current=="string"&&E.html(K.current.replace("{current}",Q+1).replace("{total}",i)).show(),G[K.loop||Q<i-1?"show":"hide"]().html(K.next),H[K.loop||Q?"show":"hide"]().html(K.previous),b=Q?y[Q-1]:y[i-1],g=Q<i-1?y[Q+1]:y[0],K.slideshow&&F.show(),K.preloading&&(h=a.data(g,e).href||g.href,c=a.data(b,e).href||b.href,h=a.isFunction(h)?h.call(g):h,c=a.isFunction(c)?c.call(b):c,$(h)&&(a("<img/>")[0].src=h),$(c)&&(a("<img/>")[0].src=c))):J.hide(),K.iframe?(k=a("<iframe/>").addClass(f+"Iframe")[0],K.fastIframe?l():a(k).one("load",l),k.name=f+ +(new Date),k.src=K.href,K.scrolling||(k.scrolling="no"),n&&(k.frameBorder=0,k.allowTransparency="true"),a(k).appendTo(A).one(m,function(){k.src="//about:blank"})):l(),K.transition==="fade"?r.fadeTo(d,1,o):o())},K.transition==="fade"?r.fadeTo(d,0,function(){X.position(0,c)}):X.position(d,c)}},X.load=function(b){var c,d,e=X.prep;T=!0,R=!1,P=y[Q],b||_(),ba(m),ba(i,K.onLoad),K.h=K.height?Z(K.height,"y")-N-L:K.innerHeight&&Z(K.innerHeight,"y"),K.w=K.width?Z(K.width,"x")-O-M:K.innerWidth&&Z(K.innerWidth,"x"),K.mw=K.w,K.mh=K.h,K.maxWidth&&(K.mw=Z(K.maxWidth,"x")-O-M,K.mw=K.w&&K.w<K.mw?K.w:K.mw),K.maxHeight&&(K.mh=Z(K.maxHeight,"y")-N-L,K.mh=K.h&&K.h<K.mh?K.h:K.mh),c=K.href,W=setTimeout(function(){C.show()},100),K.inline?(Y().hide().insertBefore(a(c)[0]).one(m,function(){a(this).replaceWith(A.children())}),e(a(c))):K.iframe?e(" "):K.html?e(K.html):$(c)?(a(R=new Image).addClass(f+"Photo").error(function(){K.title=!1,e(Y("Error").text("This image could not be loaded"))}).load(function(){var a;R.onload=null,K.scalePhotos&&(d=function(){R.height-=R.height*a,R.width-=R.width*a},K.mw&&R.width>K.mw&&(a=(R.width-K.mw)/R.width,d()),K.mh&&R.height>K.mh&&(a=(R.height-K.mh)/R.height,d())),K.h&&(R.style.marginTop=Math.max(K.h-R.height,0)/2+"px"),y[1]&&(Q<y.length-1||K.loop)&&(R.style.cursor="pointer",R.onclick=function(){X.next()}),n&&(R.style.msInterpolationMode="bicubic"),setTimeout(function(){e(R)},1)}),setTimeout(function(){R.src=c},1)):c&&B.load(c,K.data,function(b,c,d){e(c==="error"?Y("Error").text("Request unsuccessful: "+d.statusText):a(this).contents())})},X.next=function(){!T&&y[1]&&(Q<y.length-1||K.loop)&&(Q=Q<y.length-1?Q+1:0,X.load())},X.prev=function(){!T&&y[1]&&(Q||K.loop)&&(Q=Q?Q-1:y.length-1,X.load())},X.close=function(){S&&!U&&(U=!0,S=!1,ba(k,K.onCleanup),z.unbind("."+f+" ."+p),q.fadeTo(200,0),r.stop().fadeTo(300,0,function(){r.add(q).css({opacity:1,cursor:"auto"}).hide(),ba(m),A.remove(),setTimeout(function(){U=!1,ba(l,K.onClosed)},1)}))},X.element=function(){return a(P)},X.settings=d,V=function(a){a.button!==0&&typeof a.button!="undefined"||a.ctrlKey||a.shiftKey||a.altKey||(a.preventDefault(),bc(this))},a.fn.delegate?a(b).delegate("."+g,"click",V):a("."+g).live("click",V),a(X.init)})(jQuery,document,this);function WebTrends(){var a=this;if(typeof gDcsId!="undefined"&&gDcsId)this.dcsid=gDcsId;else this.dcsid="dcso6p7z7100004j151amwxpo_5q2j";if(typeof gDomain!="undefined"&&gDomain)this.domain=gDomain;else this.domain="m.webtrends.com";if(typeof gTimeZone!="undefined"&&gTimeZone)this.timezone=gTimeZone;else this.timezone=-8;if(typeof gFpcDom!="undefined"&&gFpcDom)this.fpcdom=gFpcDom;else if(/microsoft.com$/.test(window.location.hostname))this.fpcdom=".microsoft.com";else this.fpcdom=window.location.hostname;if(typeof gOffsite!="undefined"&&gOffsite)if(gOffsite==true||gOffsite=="true")this.fpcdom="";this.navigationtag="div,table";if(typeof gTrackEvents!="undefined"&&gTrackEvents&&(gTrackEvents==1||gTrackEvents=="1"))this.trackevents=true;else this.trackevents=false;this.evi={cookie:"MC1, A",qp:"WT.dcsvid, WT.z_Acookie",crumb:"",sep:""};this.enabled=true;this.i18n=true;this.fpc="WT_FPC";this.paidsearchparams="gclid";this.DCS={};this.WT={};this.DCSext={};this.DCSdir={};this.images=[];this.index=0;this.qp=[];this.exre=function(){return window.RegExp?new RegExp("dcs(uri)|(ref)|(aut)|(met)|(sta)|(sip)|(pro)|(byt)|(dat)|(p3p)|(cfg)|(redirect)|(cip)","i"):""}();this.re=function(){return window.RegExp?a.i18n?{"%25":/\%/g,"%23":/\#/g,"%26":/\&/g}:{"%09":/\t/g,"%20":/ /g,"%23":/\#/g,"%26":/\&/g,"%2B":/\+/g,"%3F":/\?/g,"%5C":/\\/g,"%22":/\"/g,"%7F":/\x7F/g,"%A0":/\xA0/g}:""}()}
WebTrends.prototype.dcsGetId=function(){this.enabled&&document.cookie.indexOf(this.fpc+"=")==-1&&document.cookie.indexOf("WTLOPTOUT=")==-1&&document.write("<script type='text/javascript' src='http"+(window.location.protocol.indexOf("https:")==0?"s":"")+"://"+this.domain+"/"+this.dcsid+"/wtid.js'><\/script>")};WebTrends.prototype.dcsGetCookie=function(e){for(var f=document.cookie.split("; "),b=[],c=0,a=0,h=e.length,k=f.length,a=0;a<k;a++){var j=f[a];if(j.substring(0,h+1)==e+"=")b[c++]=j}
var d=b.length;if(d>0){c=0;if(d>1&&e==this.fpc){var g=new Date(0);for(a=0;a<d;a++){var l=parseInt(this.dcsGetCrumb(b[a],"lv")),i=new Date(l);if(i>g){g.setTime(i.getTime());c=a}}}
return unescape(b[c].substring(h+1))}else return null};WebTrends.prototype.dcsGetCrumb=function(e,d,f){for(var b=e.split(f||":"),a=0;a<b.length;a++){var c=b[a].split("=");if(d==c[0])return c[1]}
return null};WebTrends.prototype.dcsGetIdCrumb=function(b,d){for(var e=b.substring(0,b.indexOf(":lv=")),a=e.split("="),c=0;c<a.length;c++)if(d==a[0])return a[1];return null};WebTrends.prototype.dcsIsFpcSet=function(b,c,d,e){var a=this.dcsGetCookie(b);return a?c==this.dcsGetIdCrumb(a,"id")&&d==this.dcsGetCrumb(a,"lv")&&e==this.dcsGetCrumb(a,"ss")?0:3:2};WebTrends.prototype.dcsFPC=function(){if(document.cookie.indexOf("WTLOPTOUT=")!=-1)return;var a=this.WT,e=this.fpc,b=new Date,f=b.getTimezoneOffset()*6e4+this.timezone*3.6e6;b.setTime(b.getTime()+f);var q=new Date(b.getTime()+3.1536e11),c=new Date(b.getTime());a.co_f=a.vtid=a.vtvs=a.vt_f=a.vt_f_a=a.vt_f_s=a.vt_f_d=a.vt_f_tlh=a.vt_f_tlv="";if(document.cookie.indexOf(e+"=")==-1){if(typeof gWtId!="undefined"&&gWtId!="")a.co_f=gWtId;else if(typeof gTempWtId!="undefined"&&gTempWtId!=""){a.co_f=gTempWtId;a.vt_f="1"}else{a.co_f="2";for(var i=b.getTime().toString(),o=2;o<=32-i.length;o++)a.co_f+=Math.floor(Math.random()*16).toString(16);a.co_f+=i;a.vt_f="1"}
if(typeof gWtAccountRollup=="undefined")a.vt_f_a="1";a.vt_f_s=a.vt_f_d="1";a.vt_f_tlh=a.vt_f_tlv="0"}else{var h=this.dcsGetCookie(e),g=this.dcsGetIdCrumb(h,"id"),l=parseInt(this.dcsGetCrumb(h,"lv")),n=parseInt(this.dcsGetCrumb(h,"ss"));if(g==null||g=="null"||isNaN(l)||isNaN(n))return;a.co_f=g;var d=new Date(l);a.vt_f_tlh=Math.floor((d.getTime()-f)/1e3);c.setTime(n);if(b.getTime()>d.getTime()+1.8e6||b.getTime()>c.getTime()+2.88e7){a.vt_f_tlv=Math.floor((c.getTime()-f)/1e3);c.setTime(b.getTime());a.vt_f_s="1"}
if(b.getDay()!=d.getDay()||b.getMonth()!=d.getMonth()||b.getYear()!=d.getYear())a.vt_f_d="1"}
a.co_f=escape(a.co_f);a.vtid=typeof this.vtid=="undefined"?a.co_f:this.vtid||"";a.vtvs=(c.getTime()-f).toString();var p="; expires="+q.toGMTString(),j=b.getTime().toString(),k=c.getTime().toString();document.cookie=e+"=id="+a.co_f+":lv="+j+":ss="+k+p+"; path=/"+(this.fpcdom!=""?"; domain="+this.fpcdom:"");var m=this.dcsIsFpcSet(e,a.co_f,j,k);if(m!=0){a.co_f=a.vtvs=a.vt_f_s=a.vt_f_d=a.vt_f_tlh=a.vt_f_tlv="";if(typeof this.vtid=="undefined")a.vtid="";a.vt_f=a.vt_f_a=m}};WebTrends.prototype.dcsQP=function(e){if(typeof e=="undefined")return"";var d=location.search.substring(1);if(d!="")for(var b=d.split("&"),a=0;a<b.length;a++){var c=b[a].indexOf("=");if(c!=-1)if(b[a].substring(0,c)==e){this.qp[this.qp.length]=(a==0?"":"&")+b[a];return b[a].substring(c+1)}}
return""};WebTrends.prototype.dcsEvt=function(b,c){var a=b.target||b.srcElement;while(a.tagName&&a.tagName.toLowerCase()!=c.toLowerCase())a=a.parentElement||a.parentNode;return a};WebTrends.prototype.dcsNavigation=function(h){for(var b="",c="",f=this.dcsSplit(this.navigationtag),g=f.length,a,d,e=0;e<g;e++){d=f[e];if(d.length){a=this.dcsEvt(h,d);b=a.getAttribute&&a.getAttribute("id")?a.getAttribute("id"):"";c=a.className||"";if(b.length||c.length)break}}
return b.length?b:c};WebTrends.prototype.dcsBind=function(b,a){if(typeof a=="function"&&document.body)if(document.body.addEventListener)document.body.addEventListener(b,a.wtbind(this),true);else document.body.attachEvent&&document.body.attachEvent("on"+b,a.wtbind(this))};WebTrends.prototype.dcsET=function(){};WebTrends.prototype.dcsMultiTrack=function(){var a=dcsMultiTrack.arguments?dcsMultiTrack.arguments:arguments;if(a.length%2==0){this.dcsSetProps(a);var b=new Date;this.DCS.dcsdat=b.getTime();this.dcsFPC();this.dcsTag();this.DCS.dcssip=window.location.hostname;this.DCS.dcsuri=window.location.pathname}};WebTrends.prototype.dcsJSONTrack=function(c,d){for(var a in c)if(typeof a!="undefined"&&typeof c[a]!="undefined"){var b=[];b[0]=a.toString();b[1]=c[a].toString();this.dcsSetProps(b)}
for(var a in d)if(typeof a!="undefined"&&typeof d[a]!="undefined"){var b=[];b[0]=a.toString();b[1]=d[a].toString();this.dcsSetProps(b);this.DCSdir.ClearVars=this.DCSdir.ClearVars+","+a}
var e=new Date;this.DCS.dcsdat=e.getTime();this.dcsFPC();this.dcsTag();this.DCS.dcssip=window.location.hostname;this.DCS.dcsuri=window.location.pathname};WebTrends.prototype.dcsCleanUp=function(){this.DCS={};this.WT={};this.DCSext={};arguments.length%2==0&&this.dcsSetProps(arguments)};WebTrends.prototype.dcsSetProps=function(b){for(var a=0;a<b.length;a+=2)if(b[a].indexOf("WT.")==0)this.WT[b[a].substring(3)]=b[a+1];else if(b[a].indexOf("DCS.")==0)this.DCS[b[a].substring(4)]=b[a+1];else if(b[a].indexOf("DCSext.")==0)this.DCSext[b[a].substring(7)]=b[a+1];else if(b[a].indexOf("DCSdir.")==0)this.DCSdir[b[a].substring(7)]=b[a+1]};WebTrends.prototype.dcsSplit=function(c){for(var a=c.toLowerCase().split(","),d=a.length,b=0;b<d;b++)a[b]=a[b].replace(/^\s*/,"").replace(/\s*$/,"");return a};WebTrends.prototype.dcsFormButton=function(a){a=a||(window.event||"");if(a&&(typeof a.which!="number"||a.which==1))for(var g=["INPUT","BUTTON"],f=0;f<g.length;f++){var b=this.dcsEvt(a,g[f]),c=b.type||"";if(c&&(c=="submit"||c=="image"||c=="button"||c=="reset")||c=="text"&&(a.which||a.keyCode)==13)if(!this.dcsMSLinkTrackException(b)){var e="",d="",h=0;if(b.form){e=b.form.action||window.location.pathname;d=b.form.id||b.form.name||b.form.className||"Unknown";h=b.form.method&&b.form.method.toLowerCase()=="post"?"27":"26"}else{e=window.location.pathname;d=b.name||b.id||"Unknown";h=g[f].toLowerCase()=="input"?"28":"29"}
e&&d&&a.keyCode!=9&&this.dcsMultiTrack("DCS.dcsuri",e,"WT.ti","FormButton:"+d,"WT.dl",1,"WT.nv",this.dcsNavigation(a),"DCSext.wtNavigation",this.dcsNavigation(a));this.WT.ti=this.WT.dl=this.WT.nv="";break}}};WebTrends.prototype.dcsEvi=function(){var c=this,d=c.evi,b=d.qp,a=c.dcsGetCookie(d.cookie);if(a){if(d.crumb.length>0&&d.sep.length>0)a=c.dcsGetCrumb(a,d.crumb,d.sep);if(a)if(b.indexOf("WT.")==0)c.WT[b.substring(3)]=a;else if(b.indexOf("DCS.")==0)c.DCS[b.substring(4)]=a;else if(b.indexOf("DCSext.")==0)c.DCSext[b.substring(7)]=a;else c.DCSext[b]=a}};WebTrends.prototype.dcsAdv=function(){if(this.trackevents&&typeof this.dcsET=="function")if(window.addEventListener)window.addEventListener("load",this.dcsET.wtbind(this),false);else window.attachEvent&&window.attachEvent("onload",this.dcsET.wtbind(this));this.dcsFPC();this.dcsEvi();this.dcsMSNvr()};WebTrends.prototype.dcsVar=function(){var d=new Date,a=this.WT,b=this.DCS;a.tz=parseInt(d.getTimezoneOffset()/60*-1)||"0";a.bh=d.getHours()||"0";a.ul=navigator.appName=="Netscape"?navigator.language:navigator.userLanguage;if(typeof screen=="object"){a.cd=navigator.appName=="Netscape"?screen.pixelDepth:screen.colorDepth;a.sr=screen.width+"x"+screen.height}
if(typeof navigator.javaEnabled()=="boolean")a.jo=navigator.javaEnabled()?"Yes":"No";if(document.title)if(window.RegExp){var i=new RegExp("^"+window.location.protocol+"//"+window.location.hostname+"\\s-\\s");a.ti=document.title.replace(i,"")}else a.ti=document.title;a.js="Yes";a.jv=function(){var a=navigator.userAgent.toLowerCase(),c=parseInt(navigator.appVersion),r=a.indexOf("mac")!=-1,l=a.indexOf("firefox")!=-1,h=a.indexOf("firefox/0.")!=-1,e=a.indexOf("firefox/1.0")!=-1,f=a.indexOf("firefox/1.5")!=-1,g=a.indexOf("firefox/2.0")!=-1,o=l&&!h&&!e&!f&!g,n=!l&&a.indexOf("mozilla")!=-1&&a.indexOf("compatible")==-1,s=n&&c==4,p=n&&c>=5,m=a.indexOf("msie")!=-1&&a.indexOf("opera")==-1,i=m&&c==4&&a.indexOf("msie 4")!=-1,d=m&&!i,t=a.indexOf("opera")!=-1,j=a.indexOf("opera 5")!=-1||a.indexOf("opera/5")!=-1,k=a.indexOf("opera 6")!=-1||a.indexOf("opera/6")!=-1,q=t&&!j&&!k,b="1.1";if(o)b="1.8";else if(g)b="1.7";else if(f)b="1.6";else if(h||e||p||q)b="1.5";else if(r&&d||k)b="1.4";else if(d||s||j)b="1.3";else if(i)b="1.2";return b}();a.ct="unknown";if(document.body&&document.body.addBehavior)try{document.body.addBehavior("#default#clientCaps");a.ct=document.body.connectionType||"unknown";document.body.addBehavior("#default#homePage");a.hp=document.body.isHomePage(location.href)?"1":"0"}catch(k){}
if(document.all)a.bs=document.body?document.body.offsetWidth+"x"+document.body.offsetHeight:"unknown";else a.bs=window.innerWidth+"x"+window.innerHeight;a.fv=function(){var a,b;if(window.ActiveXObject)for(a=10;a>0;a--)try{b=new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+a);return a+".0"}catch(c){}else if(navigator.plugins&&navigator.plugins.length)for(a=0;a<navigator.plugins.length;a++)if(navigator.plugins[a].name.indexOf("Shockwave Flash")!=-1)return navigator.plugins[a].description.split(" ")[2];return"Not enabled"}();a.slv=function(){var a="Not enabled";try{if(navigator.userAgent.indexOf("MSIE")!=-1){var e=new ActiveXObject("AgControl.AgControl");if(e)a="Unknown"}else if(navigator.plugins["Silverlight Plug-In"])a="Unknown"}catch(f){}
if(a!="Not enabled"){var b,c,d;if(typeof Silverlight=="object"&&typeof Silverlight.isInstalled=="function")for(b=5;b>0;b--){for(c=9;c>=0;c--){d=b+"."+c;if(Silverlight.isInstalled(d)){a=d;break}}
if(a==d)break}}
return a}();if(this.i18n)if(typeof document.defaultCharset=="string")a.le=document.defaultCharset;else if(typeof document.characterSet=="string")a.le=document.characterSet;else a.le="unknown";a.tv="8.6.2";a.dl="0";a.ssl=window.location.protocol.indexOf("https:")==0?"1":"0";b.dcsdat=d.getTime();b.dcssip=window.location.hostname;b.dcsuri=window.location.pathname;a.es=b.dcssip+b.dcsuri;if(window.location.search){b.dcsqry=window.location.search;if(this.qp.length>0)for(var c=0;c<this.qp.length;c++){var e=b.dcsqry.indexOf(this.qp[c]);if(e!=-1){var h=b.dcsqry.substring(0,e),j=b.dcsqry.substring(e+this.qp[c].length,b.dcsqry.length);b.dcsqry=h+j}}}
if(b.dcsqry)for(var g=b.dcsqry.toLowerCase(),f=this.paidsearchparams.length?this.paidsearchparams.toLowerCase().split(","):[],c=0;c<f.length;c++)if(g.indexOf(f[c]+"=")!=-1){a.srch="1";break}
if(window.document.referrer!=""&&window.document.referrer!="-")if(!(navigator.appName=="Microsoft Internet Explorer"&&parseInt(navigator.appVersion)<4))b.dcsref=window.document.referrer};WebTrends.prototype.dcsEscape=function(a,b){if(typeof a!="undefined")if(b!=""){a=a.toString();for(var c in b)if(b[c]instanceof RegExp)a=a.replace(b[c],c);return a}else return escape(a)};WebTrends.prototype.dcsA=function(c,a){if(this.i18n&&this.exre!=""&&!this.exre.test(c)){if(c=="dcsqry"){for(var d="",g=a.substring(1).split("&"),b=0;b<g.length;b++){var e=g[b],f=e.indexOf("=");if(f!=-1){var h=e.substring(0,f),i=e.substring(f+1);if(b!=0)d+="%26";d+=h+"="+this.dcsEncode(i)}}
a=a.substring(0,1)+d}else a=this.dcsEncode(a);return"&"+c+"="+a}
return"&"+c+"="+this.dcsEscape(a,this.re)};WebTrends.prototype.dcsEncode=function(a){if(typeof a!="undefined")return typeof encodeURIComponent=="function"?encodeURIComponent(a):escape(a)};WebTrends.prototype.dcsCreateImage=function(a){if(document.images){this.images[this.index]=new Image;this.images[this.index].src=a;this.index++}else document.write('<IMG ALT="" BORDER="0" NAME="DCSIMG" WIDTH="1" HEIGHT="1" SRC="'+a+'">')};WebTrends.prototype.dcsMeta=function(){var b;if(document.all)b=document.all.tags("meta");else if(document.documentElement)b=document.getElementsByTagName("meta");if(typeof b!="undefined")for(var e=b.length,c=0;c<e;c++){var a=b.item(c).name,d=b.item(c).content,f=b.item(c).httpEquiv;if(a.length>0)if(a.toUpperCase().indexOf("WT.")==0)this.WT[a.substring(3)]=d;else if(a.toUpperCase().indexOf("DCSEXT.")==0)this.DCSext[a.substring(7)]=d;else if(a.toUpperCase().indexOf("DCSDIR.")==0)this.DCSdir[a.substring(7)]=d;else if(a.toUpperCase().indexOf("DCS.")==0)this.DCS[a.substring(4)]=d}
this.dcsMSVar()};WebTrends.prototype.dcsTag=function(){if(document.cookie.indexOf("WTLOPTOUT=")!=-1)return;var b=this.WT,e=this.DCS,d=this.DCSext,g=this.i18n,c="http"+(window.location.protocol.indexOf("https:")==0?"s":"")+"://"+this.domain+(this.dcsid==""?"":"/"+this.dcsid)+"/dcs.gif?";if(g)b.dep="";for(var a in e)if(e[a]&&typeof e[a]!="function")c+=this.dcsA(a,e[a]);for(var i=["co_f","vtid","vtvs","vt_f_tlv"],h=0;h<i.length;h++){var f=i[h];if(b[f]){c+=this.dcsA("WT."+f,b[f]);delete b[f]}}
for(a in b)if(b[a]&&typeof b[a]!="function")c+=this.dcsA("WT."+a,b[a]);for(a in d)if(d[a]&&typeof d[a]!="function"){if(g)b.dep=b.dep.length==0?a:b.dep+";"+a;c+=this.dcsA(a,d[a])}
if(g&&b.dep.length>0)c+=this.dcsA("WT.dep",b.dep);if(c.length>2048&&navigator.userAgent.indexOf("MSIE")>=0)c=c.substring(0,2040)+"&WT.tu=1";this.dcsCreateImage(c);this.WT.ad="";this.dcsMSSplitTag(c);this.dcsMSClearVars()};WebTrends.prototype.dcsDebug=function(){var a=this,d=a.images[0].src,e=d.indexOf("?"),c=d.substring(0,e).split("/"),b="<b>Protocol</b><br><code>"+c[0]+"<br></code>";b+="<b>Domain</b><br><code>"+c[2]+"<br></code>";b+="<b>Path</b><br><code>/"+c[3]+"/"+c[4]+"<br></code>";b+="<b>Query Params</b><code>"+d.substring(e+1).replace(/\&/g,"<br>")+"</code>";b+="<br><b>Cookies</b><br><code>"+document.cookie.replace(/\;/g,"<br>")+"</code>";a.w&&!a.w.closed&&a.w.close();a.w=window.open("","dcsDebug","width=500,height=650,scrollbars=yes,resizable=yes");a.w.document.write(b);a.w.focus()};WebTrends.prototype.dcsCollect=function(){if(this.enabled){this.dcsVar();this.dcsMeta();this.dcsAdv()}};function dcsMultiTrack(){if(typeof _tag!="undefined")return _tag.dcsMultiTrack()}
function dcsDebug(){if(typeof _tag!="undefined")return _tag.dcsDebug()}
function dcsEscape(a){if(typeof _tag!="undefined")return _tag.dcsEscape(a)}
function dcsEncode(a){if(typeof _tag!="undefined")return _tag.dcsEncode(a)}
Function.prototype.wtbind=function(c){var a=this,b=function(){return a.apply(c,arguments)};return b};WebTrends.prototype.dcsMSVar=function(){if(typeof this.DCSdir.ReferrerAsURI!="undefined"&&this.DCSdir.ReferrerAsURI&&typeof this.DCS.dcsref!="undefined"&&this.DCS.dcsref)this.DCSext.wtEvtSrc=this.DCS.dcsref.match(/(?:\w+:\/\/)?([^?\s]+)\??/)[1];else this.DCSext.wtEvtSrc=this.DCS.dcssip+this.DCS.dcsuri;if(typeof this.WT.sp!="undefined")this.WT.sv_sp=this.WT.sp;if(typeof this.WT.z_gTrackExceptions!="undefined")this.DCSdir.gTrackExceptions=this.WT.z_gTrackExceptions;this.DCSext.wtDrillDir=this.dcsMSDrillDir();try{if(navigator.userAgent.indexOf("MSIE")!=-1){var a=new ActiveXObject("AgControl.AgControl");if(a)this.WT.sli="Installed"}else if(navigator.plugins["Silverlight Plug-In"])this.WT.sli="Installed"}catch(b){}
this.WT.sli=this.WT.sli||"Not Installed";this.WT.z_locale=this.dcsMSLocaleScrape();if(this.dcsGetCookie("MC1")!=null)this.WT.dcsvid=this.dcsGetCrumb(this.dcsGetCookie("MC1"),"GUID","&");this.WT.z_anonid=this.dcsMSGetCrumb("A","I","&");this.WT.z_rioid=typeof wt_GetCurrentCellCode!="undefined"?wt_GetCurrentCellCode():this.dcsGetCookie("R");this.WT.z_msresearch_u=this.dcsMSmsresearchRead("userid");this.WT.z_msresearch_s=this.dcsMSmsresearchRead("surveys");this.WT.z_MUID=this.dcsGetCookie("MUID");if(typeof this.DCSdir.OnPremiseSDC!="undefined")this.domain2=this.DCSdir.OnPremiseSDC;else this.domain2="";if(typeof this.DCSdir.OnPremiseDCSID!="undefined")this.dcsid2=this.DCSdir.OnPremiseSDC;else this.dcsid2=this.dcsid;if(typeof this.WT.sp!="undefined"){this.WT.sv_sp=this.WT.sp;if(typeof this.DCSext.wt_pt!="undefined"){this.DCSext.wt_sppt=this.WT.sp+this.DCSext.wt_pt;this.DCSext.wt_sppt=this.DCSext.wt_sppt.toLowerCase()}}};WebTrends.prototype.dcsMSLocaleScrape=function(){this.WT.z_locale=this.dcsMSLocaleFromString(this.WT.z_locale);var g=this.dcsMSLocaleFromString(this.DCS.dcsuri),f=this.dcsMSLocaleFromString(this.DCS.dcsqry),e=this.dcsMSLocaleFromString(this.DCSext.wt_maglocale),a=this.dcsMSLocaleFromString(this.DCSext.oo_ul),d=this.dcsMSLocaleFromString(this.DCSext.dsplc),b=this.dcsMSLocaleFromString(this.DCSext.msintl_locale),c=this.WT.z_locale||g||f||e||a||d||b;return c};WebTrends.prototype.dcsMSLocaleFromString=function(b){var c=/\b\w\w[-\.\/ _]\w\w\b/,d=/[-\.\/ _]/,a="";if(c.test(b)){a=b.match(c)+"";a=a.replace(d,"-");a=a.toLowerCase()}
return a};WebTrends.prototype.dcsMSSplitTag=function(a){if(typeof this.domain2!="undefined"&&this.domain2!=""){a=a.replace(this.domain,this.domain2);a=a.replace(this.dcsid,this.dcsid2);this.dcsCreateImage(a)}};WebTrends.prototype.dcsMSClearVars=function(){if(this.DCSdir.ClearVars){var a=this.DCSdir.ClearVars.split(",");a=a.concat("WT.z_ea_name","WT.z_ea_actionoffer","WT.z_ea_targetcampaign","WT.mc_id");for(var b=0;b<a.length;b++)if(a[b].indexOf("WT.")==0)this.WT[a[b].substring(3)]="";else if(a[b].indexOf("DCS.")==0)this.DCS[a[b].substring(4)]="";else if(a[b].indexOf("DCSext.")==0)this.DCSext[a[b].substring(7)]=""}};WebTrends.prototype.dcsMSDrillDir=function(){var e=5,a=window.location.pathname.substring(window.location.pathname.indexOf("/")+1,window.location.pathname.lastIndexOf("/")+1).toLowerCase();if(a=="")a="/";else{var c=a.split("/");a="";for(var b=1;b<c.length&&b<=e;b++){a+="/";for(var d=0;d<b;d++)a+=c[d]+"/";if(b!=e&&b!=c.length-1)a+=";"}}
return a};WebTrends.prototype.dcsMSLinkTrack=function(b){b=b||(window.event||"");if(b&&(typeof b.which!="number"||b.which==1)){var a=this.dcsEvt(b,"A"),g=this.dcsEvt(b,"IMG");if(a.href&&a.protocol&&a.protocol.indexOf("http")!=-1&&!this.dcsMSLinkTrackException(a)){navigator.appVersion.indexOf("MSIE")==-1&&(a.onclick||a.onmousedown)&&this.dcsMSSetVarCap(a);var f=a.hostname?a.hostname.split(":")[0]:"",e=a.search?a.search.substring(a.search.indexOf("?")+1,a.search.length):"",d=a.pathname?a.pathname.indexOf("/")!=0?"/"+a.pathname:a.pathname:"/",c="";if(g.alt)c=g.alt;else if(document.all)c=a.title||a.innerText||a.innerHTML||"";else c=a.title||a.text||a.innerHTML||"";f=this.DCS.setvar_dcssip||f;d=this.DCS.setvar_dcsuri||d;e=this.DCS.setvar_dcsqry||e;c=this.WT.setvar_ti||c;c=this.dcsTrim(c);this.WT.mc_id=this.WT.setvar_mc_id||"";this.WT.sp=this.WT.ad=this.DCS.setvar_dcsuri=this.DCS.setvar_dcssip=this.DCS.setvar_dcsqry=this.WT.setvar_ti=this.WT.setvar_mc_id="";if(a.attributes.getNamedItem("cid"))this.DCSext.wt_linkid=a.attributes.getNamedItem("cid").value;this.dcsMultiTrack("DCS.dcssip",f,"DCS.dcsuri",d,"DCS.dcsqry",this.trimoffsiteparams?"":e,"DCS.dcsref",window.location,"WT.ti","Link:"+c,"WT.dl","1","WT.nv",this.dcsNavigation(b),"DCSext.wtNavigation",this.dcsNavigation(b),"WT.sp","","WT.ad","");this.DCS.dcsref=this.WT.ti=this.WT.dl=this.WT.nv=""}}};WebTrends.prototype.dcsMSImageMap=function(b){b=b||(window.event||"");if(b&&(typeof b.which!="number"||b.which==1)){var a=this.dcsEvt(b,"AREA"),g=this.dcsEvt(b,"IMG");if(a.href&&a.protocol&&a.protocol.indexOf("http")!=-1&&!this.dcsMSLinkTrackException(a)){navigator.appVersion.indexOf("MSIE")==-1&&(a.onclick||a.onmousedown)&&this.dcsMSSetVarCap(a);var f=a.hostname?a.hostname.split(":")[0]:"",e=a.search?a.search.substring(a.search.indexOf("?")+1,a.search.length):"",d=a.pathname?a.pathname.indexOf("/")!=0?"/"+a.pathname:a.pathname:"/",c="";if(g.alt)c=g.alt;else if(document.all)c=a.title||a.innerText||a.innerHTML||"";else c=a.title||a.text||a.innerHTML||"";f=this.DCS.setvar_dcssip||f;d=this.DCS.setvar_dcsuri||d;e=this.DCS.setvar_dcsqry||e;c=this.WT.setvar_ti||c;c=this.dcsTrim(c);this.WT.mc_id=this.WT.setvar_mc_id||"";this.WT.sp=this.WT.ad=this.DCS.setvar_dcsuri=this.DCS.setvar_dcssip=this.DCS.setvar_dcsqry=this.WT.setvar_ti=this.WT.setvar_mc_id="";if(a.attributes.getNamedItem("cid"))this.DCSext.wt_linkid=a.attributes.getNamedItem("cid").value;this.dcsMultiTrack("DCS.dcssip",f,"DCS.dcsuri",d,"DCS.dcsqry",this.trimoffsiteparams?"":e,"DCS.dcsref",window.location,"WT.ti","Img Map:"+c,"WT.dl","1","WT.nv",this.dcsNavigation(b),"DCSext.wtNavigation",this.dcsNavigation(b),"WT.sp","","WT.ad","");this.DCS.dcsref=this.WT.ti=this.WT.dl=this.WT.nv=""}}};WebTrends.prototype.dcsMSLinkTrackException=function(a){try{var b=0;if(this.DCSdir.gTrackExceptions){var e=this.DCSdir.gTrackExceptions.split(",");while(b!=1){if(a.tagName&&a.tagName=="body"){b=1;return false}else if(a.className)for(var f=String(a.className).split(" "),c=0;c<e.length;c++)for(var d=0;d<f.length;d++)if(f[d]==e[c]){b=1;return true}
a=a.parentNode}}else return false}catch(g){}};WebTrends.prototype.dcsMSSetVar=function(){var a=dcsSetVar.arguments?dcsSetVar.arguments:arguments;if(a.length%2==0)for(var b=0;b<a.length;b+=2)if(a[b].indexOf("WT.")==0)if(this.dcsMSSetVarValidate(a[b]))this.WT["setvar_"+a[b].substring(3)]=a[b+1];else this.WT[a[b].substring(3)]=a[b+1];else if(a[b].indexOf("DCS.")==0)if(this.dcsMSSetVarValidate(a[b]))this.DCS["setvar_"+a[b].substring(4)]=a[b+1];else this.DCS[a[b].substring(4)]=a[b+1];else if(a[b].indexOf("DCSext.")==0)if(this.dcsMSSetVarValidate(a[b]))this.DCSext["setvar_"+a[b].substring(7)]=a[b+1];else this.DCSext[a[b].substring(7)]=a[b+1];else if(a[b].indexOf("DCSdir.")==0)if(this.dcsMSSetVarValidate(a[b]))this.DCSdir["setvar_"+a[b].substring(7)]=a[b+1];else this.DCSdir[a[b].substring(7)]=a[b+1]};WebTrends.prototype.dcsMSSetVarCap=function(d){if(d.onclick)var c=d.onclick.toString();else if(d.onmousedown)var c=d.onmousedown.toString();var e=c.substring(c.indexOf("dcsSetVar(")+10,c.length)||c.substring(c.indexOf("_tag.dcsMSSetVar(")+16,c.length),f=e.substring(0,e.indexOf(");")).replace(/\s"/gi,"").replace(/"/gi,""),a=f.split(",");if(a.length!=-1)for(var b=0;b<a.length;b+=2)if(a[b].indexOf("WT.")==0)if(this.dcsMSSetVarValidate(a[b]))this.WT["setvar_"+a[b].substring(3)]=a[b+1];else this.WT[a[b].substring(3)]=a[b+1];else if(a[b].indexOf("DCS.")==0)if(this.dcsMSSetVarValidate(a[b]))this.DCS["setvar_"+a[b].substring(4)]=a[b+1];else this.DCS[a[b].substring(4)]=a[b+1];else if(a[b].indexOf("DCSext.")==0)if(this.dcsMSSetVarValidate(a[b]))this.DCSext["setvar_"+a[b].substring(7)]=a[b+1];else this.DCSext[a[b].substring(7)]=a[b+1];else if(a[b].indexOf("DCSdir.")==0)if(this.dcsMSSetVarValidate(a[b]))this.DCSdir["setvar_"+a[b].substring(7)]=a[b+1];else this.DCSdir[a[b].substring(7)]=a[b+1]};WebTrends.prototype.dcsMSSetVarValidate=function(c){var a="DCS.dcssip,DCS.dcsuri,DCS.dcsqry,WT.ti,WT.mc_id";a=a.split(",");for(var b=0;b<a.length;b++)if(a[b]==c)return 1;return 0};function dcsSetVar(){if(typeof _tag!="undefined")return _tag.dcsMSSetVar()}
WebTrends.prototype.dcsMSNvr=function(){if(document.cookie.indexOf("WTLOPTOUT=")!=-1)return;var f=new Date,g=new Date(f.getTime()+3.1536e11),b={name:"WT_NVR",value:"",expiry:"; expires="+g.toGMTString(),path:"; path=/",domain:"; domain="+window.location.hostname},c=this.dcsMSNvrRead(b.name),d=this.dcsMSNvrProcess(c);if(d||this.dcsMSNvrFind(b.name,","))for(var e=this.dcsMSNvrCompose(c,b),a=0;a<e.length;a++)document.cookie=e[a];if(d)for(var h=document.cookie.indexOf(b.name+"=")!=-1?"1":"2",a=0;a<c.length;a++)if(c[a][1])this.WT["vt_nvr"+(a+1)]=h};WebTrends.prototype.dcsMSNvrRead=function(h){var a=[],i=0,j=/,/g,c=this.dcsMSNvrGetCookie(h);while(c){for(var f=c.split(":"),d=0;d<f.length;d++){var e=f[d].split("="),b=parseInt(e[0]),g=e[1].replace(j,"|").split("|");if(typeof a[b]!="object")a[b]=[g,false];else a[b][0]=a[b][0].concat(g)}
i++;c=this.dcsMSNvrGetCookie(h+i)}
return a};WebTrends.prototype.dcsMSNvrFind=function(c,e){var b=false,d=0,a=this.dcsMSNvrGetCookie(c);while(a){if(a.indexOf(e)!=-1){b=true;break}
d++;a=this.dcsMSNvrGetCookie(c+d)}
return b};WebTrends.prototype.dcsMSNvrGetCookie=function(c){var d=document.cookie.indexOf(c+"=");if(d!=-1){var b=d+c.length+1,a=document.cookie.indexOf(";",b);if(a==-1)a=document.cookie.length;return document.cookie.substring(b,a)}
return null};WebTrends.prototype.dcsMSNvrProcess=function(b){var f=false,l=3,c=0,e=[],h=window.location.pathname,d=h.substring(h.indexOf("/")+1,h.lastIndexOf("/")).toLowerCase(),i={"%09":/\t/g,"%20":/ /g,"%2C":/,/g,"%3B":/;/g},g=new String(d);for(var k in i)g=g.replace(i[k],k);d=g;if(d.length>1){e=d.split("/",l);c=e.length;d=e.join("/")}
if(b.length>0){var j=false;if(b.length>c){for(var a=0;a<b[c][0].length;a++)if(b[c][0][a]==d){j=true;break}
if(!j){b[c][0][b[c][0].length]=d;b[c][1]=true;f=true}}else{for(var a=0;a<c+1;a++)if(typeof b[a]!="object")b[a]=[[a==0?"/":e.slice(0,a).join("/")],true];f=true}}else{for(var a=0;a<c+1;a++)b[a]=[[a==0?"/":e.slice(0,a).join("/")],true];f=true}
return f};WebTrends.prototype.dcsMSNvrCompose=function(i,a){for(var h=[],g=[],b=0,j=10,k=4e3,f=false,d=0;d<i.length&&!f;d++){g=i[d][0];for(var e=d+"=",c=0;c<g.length&&!f;c++){e+=(c==0?"":"|")+g[c];if((a.name+b).length+a.value.length+e.length+1<=k){if(a.value.length>0&&c==0)a.value+=":";a.value+=e}else if(a.value.length>0){h[b]=a.name+(b||"")+"="+a.value+a.expiry+a.path+a.domain;a.value=d+"="+g[c];if(++b>j-1)f=true}
e=""}}
if(!f)h[b]=a.name+(b||"")+"="+a.value+a.expiry+a.path+a.domain;return h};WebTrends.prototype.dcsMSmsresearchRead=function(c){var a,b,e,d;a=this.dcsGetCookie("msresearch");if(a){b=eval("("+a+")");return b[c]}};WebTrends.prototype.dcsMSGetCrumb=function(f,c,d){var a=this.dcsGetCookie(f);if(a!=null){var b=a.indexOf(c+"=");if(b!=-1){var e=a.indexOf(d,b);return e!=-1?a.substring(b+c.length+d.length,e):a.substring(b+c.length+d.length,a.length)}}
return null};WebTrends.prototype.dcsTrim=function(a){while(a.substring(0,1)==" ")a=a.substring(1,a.length);while(a.substring(a.length-1,a.length)==" ")a=a.substring(0,a.length-1);return a}
if(typeof window.MSCOM=="undefined")window.MSCOM={};window.MSCOM.BI={logenabled:false,skipBiAttr:["bi:track","bi:titleflag","bi:parenttitle","bi:title","bi:index","bi:gridindex","bi:gridtype","bi:type"],isInitialized:false,logCache:[],biInitTime:null,additionalParams:{},linkClickParams:{interactiontype:2,cot:1},log:function(a){if(this.logenabled)try{console.log(a)}catch(b){}},isIE:function(){return navigator.appVersion.indexOf("MSIE")!=-1},init:function(a){if(this.isInitialized)return;this.isInitialized=true;a=a||window.BiMapping;if(a){this.Map=a;this.log(a)}
var b=window.attachEvent?"click":"mousedown";$("a, area").live(b,$.proxy(function(b){var a=true,c=$(b.currentTarget);if(c.attr("bi:track"))a=c.attr("bi:track")=="true";else{var d=c.parents(":not(table)").filter(function(){return $(this).attr("bi:track")?true:false});if(d.length)a=$(d[0]).attr("bi:track")=="true"}
a&&this.linkClick(b.currentTarget,b.target)},this));if(typeof window.WebTrends!="undefined")this.WebTrends=new WebTrends;this.biInitTime=new Date;$($.proxy(this.recordLoad,this));if(window.location.hash.indexOf("bilog")>0)this.logenabled=true},record:function(a){a=a||{};var c=(new Date).getTime();this.logCache=[a];a=this.mapInteractionType(a);if(this.WebTrends&&this.isProviderValid(a,this.Map.Webtrends))try{this.WebTrends.dcsJSONTrack({},this.convertToWebtrends(a))}catch(d){}
if(window.MscomCustomEvent&&this.isProviderValid(a,this.Map.Wedcs))try{MscomCustomEvent.apply(this,this.convertToWedcs(a))}catch(d){}},recordLoad:function(){typeof QosRecord!="undefined"&&QosRecord("domready");var a={interactiontype:0,title:document.title,initial:0};a=this.mapInteractionType(a);var d=(new Date).getTime(),b;if(this.isIE()){b=$("area:visible").filter(function(){return $(this).parent("map").siblings("img").is(":visible")});b=$.merge(b,$("a:visible"))}else b=$("a:visible, area:visible");a=$.extend({},this.additionalParams,a,this.getMergedBiData(b));var c=new Date;this.log([c.getTime()-this.biInitTime.getTime(),c.getTime()-d,"load beacon processing",a]);if(this.WebTrends&&this.isProviderValid(a,this.Map.Webtrends))try{this.WebTrends.dcsCollect();this.WebTrends.dcsJSONTrack({"DCS.dcssip":window.location.hostname,"DCS.dcsuri":window.location.pathname,"DCS.dcsqry":window.location.search},this.convertToWebtrends(a))}catch(e){}
if(window.MscomCustomEvent&&this.isProviderValid(a,this.Map.Wedcs)){a=$.extend(a,{cot:null});try{MscomCustomEvent.apply(this,this.convertToWedcs(a))}catch(e){}}},_queueDelay:350,_queueTimerId:null,_queueStack:[],_recording:false,addRecordQueue:function(a){this._queueStack.push(a);this._queueTimerId==null&&this.startQueueTimer()},queue:function(){this.clearQueueTimer();$(":animated").length==0&&this.record(this._queueStack.shift());this._queueStack.length>0&&this.startQueueTimer()},clearQueueTimer:function(){window.clearTimeout(this._queueTimerId);this._queueTimerId=null},startQueueTimer:function(){this.clearQueueTimer();this._queueTimerId=window.setTimeout($.proxy(this.queue,this),this._queueDelay)},getNestedIndexGridTypeStructure:function(e){var a={},b=[],c=[],d=[];$(e).parents(":not(table)").each(function(){if($(this).attr("bi:gridindex")){var a=$(this).attr("bi:gridtype")?$(this).attr("bi:gridtype"):"";b.push(a+" "+$(this).attr("bi:gridindex"))}
$(this).attr("bi:index")&&c.push($(this).attr("bi:index"));$(this).attr("bi:type")&&d.push($.trim($(this).attr("bi:type")))});a.parenttypestructure=d.reverse().join(";");a.gridstructure=b.reverse().join(";");a.parentindexstructure=c.reverse().join(";");return a},getNestedGridStructure:function(b){var a=[];$(b).parents(":not(table)").filter(function(){if($(this).attr("bi:gridindex")){var b=$(this).attr("bi:gridtype")?$(this).attr("bi:gridtype"):"";a.push(b+" "+$(this).attr("bi:gridindex"));return true}
return false});return a.reverse().join(";")},getNestedIndexStructure:function(b){var a=[],c=false;$(b).parents(":not(table)").filter(function(){if($(this).attr("bi:index")){a.push($(this).attr("bi:index"));return true}
return false});return a.reverse().join(";")},getNestedTypeStructure:function(b){var a=[];$(b).parents(":not(table)").filter(function(){if($(this).attr("bi:type")){a.push($.trim($(this).attr("bi:type")));return true}
return false});return a.reverse().join(";")},getNestedTitleStructure:function(f,j,i){var d=[],e=[],a,b,c="";!i&&d.push($.trim($(f).text()));$(f).attr("bi:parenttitle")&&e.push($(f));$(f).parents(":not(table)").each(function(){$(this).attr("bi:parenttitle")&&e.push($(this))});for(var h=0;h<e.length;h++){var g=e[h];c=g.attr("bi:parenttitle");a=g.siblings(":not(table)").filter(function(){return $(this).attr("bi:titleflag")==c}).first();if(a.length==0)a=g.parents(":not(table)").filter(function(){return $(this).attr("bi:titleflag")==c}).first();if(a.length!=0){if(a.attr("bi:title")==c)b=a;else{b=a.find('[bi\\:title="'+c+'"]').first();if(b.length==0){b=a.find("*").filter(function(){return $(this).attr("bi:title")==c}).first();b.length!=0&&this.log('using fallback on find find([bi\\:title="item") not working')}}
if(b){var k=this.getNestedTitleStructure(b,true);d=d.concat(k);break}}}
return j?d:d.reverse().join(";")},getMergedBiData:function(f){for(var a={},b,d=0,g=f.length;d<g;d++)for(var e=f.get(d).attributes,c=0,h=e.length;c<h;c++){b=e.item(c);if(b.name.indexOf("bi:")===0&&$.inArray(b.name,this.skipBiAttr)<0){index=b.name.substring(3,b.name.length);if(a[index]==undefined)a[index]=[];$.inArray(b.value,a[index])<0&&a[index].push(b.value)}}
for(var c in a)a[c]=a[c].join(";");return a},getBiData:function(e){for(var d={},a,c=e.attributes,b=0,f=c.length;b<f;b++){a=c.item(b);if(a.name.indexOf("bi:")===0&&$.inArray(a.name,this.skipBiAttr)<0)d[a.name.toLowerCase().substring(3,a.name.length)]=a.value}
return d},linkClick:function(b,c){var a=this.getLinkBiParams(b,c);this.record(a)},getLinkBiParams:function(b,d){var a={};$.extend(a,this.additionalParams,this.linkClickParams,this.getBiData(b));var c=$(b).attr("href");a.urifull=c;a.uridomain=$(b)[0].hostname;a.uripath=$(b)[0].pathname;a.urihash=c&&c.indexOf("#")>=0?c.substring(c.indexOf("#")):"";c=a.urihash?c.substring(0,c.indexOf("#")):c;a.uriquery=c&&c.indexOf("?")>=0?c.substring(c.indexOf("?")):"";a.type=$(b).attr("bi:type")?$.trim($(b).attr("bi:type")):"";a.index=$(b).attr("bi:index")?$.trim($(b).attr("bi:index")):"";a.linktitle=this.getTitle(b);a.title=a.linktitle;var e=$(b).get(0).nodeName.toLowerCase();if(e=="area")a.linktitle=a.title=$(b).attr("alt");else if(a.title==""&&d&&$(d).get(0).nodeName=="IMG")a.title=$(d).attr("alt");try{a.parenttitlestructure=this.getNestedTitleStructure(b,null,true);$.extend(a,this.getNestedIndexGridTypeStructure(b))}catch(f){this.log(f)}
return a},getLocation:function(b){var a=document.createElement("a");a.href=b;return a},ignoreLinkClass:[".hpFeat_Arrow",".biLinkIgnore"],getTitle:function(b){var a=$(b).clone();a.find(this.ignoreLinkClass.join(",")).remove();return $.trim(a.text())},mapInteractionType:function(c){var a=$.extend({},c),b={0:0,1:4,2:1,3:2,4:9,5:10,6:11,7:12,8:13,9:14,10:15,11:16,12:17,13:18,14:19,15:20,16:21,17:22,18:23,19:24,20:25};if(a.interactiontype!=undefined&&b[a.interactiontype]!=undefined)a.interactiontype=b[a.interactiontype];if(a.triggertype!=undefined&&b[a.triggertype]!=undefined)a.triggertype=b[a.triggertype];return a},isProviderValid:function(c,a){var b=false;if(!a.enabled)b=false;else if(c.interactiontype==undefined)b=true;else if(!a.settings&&!a.settings.interactiontype)b=true;else b=a.settings.interactiontype[c.interactiontype]!=undefined?a.settings.interactiontype[c.interactiontype]:false;return b},convertToWebtrends:function(a){return this.convertToMapping(a,this.Map.Webtrends.mapping)},convertToWedcs:function(b){var a=$.extend({},b);if(a.uridomain==undefined){a.uridomain=window.location.hostname;a.uripath=window.location.pathname;a.uriquery=window.location.search}
return this.toArray(this.convertToMapping(a,this.Map.Wedcs.mapping))},convertToMapping:function(d,b){var e={};if(b===undefined)return false;for(var a in b){e[a]="";for(var c=0,f=b[a].length;c<f;c++)if(b[a][c].str!==undefined)e[a]+=b[a][c].str;else if(b[a][c].bi&&d[b[a][c].bi]!==undefined){switch(b[a][c].bi){case"uripath":if(d[b[a][c].bi]=="")d[b[a][c].bi]="/";else if(d[b[a][c].bi].substring(0,1)!="/")d[b[a][c].bi]="/"+d[b[a][c].bi];break;case"uriquery":if(d[b[a][c].bi]=="")d[b[a][c].bi]="?"}
e[a]+=d[b[a][c].bi]}else b[a][c].bi;switch(a){default:if(e[a]=="")delete e[a]}}
this.logCache.push(e);return e},toArray:function(a){a=a||{};var b=[];for(var c in a)if(a.hasOwnProperty(c)){b.push(c);b.push(a[c])}
return b},toJson:function(a){a=a||[];for(var c={},d=a.length,b=0;b<d;b+=2)c[a[b]]=a[b+1];return c}}
if(typeof window.MSCOM=="undefined")window.MSCOM={};window.MSCOM.Helper={htmlEncode:function(a){return a=="undefined"||a==null?a:$("<div/>").text(a).html()},htmlDecode:function(a){return a=="undefined"||a==null?a:$("<div/>").html(a).text()},htmlAttrEncode:function(a){a=this.htmlEncode(a);a=a.replace(/"/g,"&quot;");return a.replace(/'/g,"&#039;")},isIE7:function(){return navigator.appVersion.indexOf("MSIE 7.")!=-1}};window.MSCOM.Helper.Content={images:{},doc:{},queue:{},curThread:0,maxThread:2,nextDelay:100,logenabled:false,isBodyLoaded:false,prefetchEnabled:true,onload:function(){this.log("window.MSCOM.Helper.Content: Body Onload");this.isBodyLoaded=true;setTimeout($.proxy(this.next,this),this.nextDelay)},log:function(a){if(this.logenabled)try{console.log(a)}catch(b){}else if(window.location.hash.indexOf("helplog")>0)this.logenabled=true},sortQ:function(){var a=[],c={};for(var b in this.queue)a.push(b);a.sort();for(var b in a)c[a[b]]=this.queue[a[b]];this.queue=c},registerImage:function(b){if(this.prefetchEnabled){var a={path:"",priority:0,type:"img",callback:null,passvar:null,cache:true};$.extend(a,b);this.addToQueue(a)}
return this.prefetchEnabled},registerDoc:function(b){if(this.prefetchEnabled){var a={path:"",priority:0,type:"doc",callback:null,passvar:null,cache:true};$.extend(a,b);this.addToQueue(a)}
return this.prefetchEnabled},unregister:function(c){for(var d in this.queue)for(var b=this.queue[d],a=0;a<b.length;++a)if(b[a].path===c){this.log(["unregister",b[a]]);b.splice(a,1);return true}
return false},addToQueue:function(a){this.log(["addToQueue",a]);if(this.queue[a.priority]==undefined){this.queue[a.priority]=[];this.sortQ()}
this.queue[a.priority].push(a);setTimeout($.proxy(this.next,this),this.nextDelay)},next:function(){if(!this.prefetchEnabled)return false;if(this.curThread>=this.maxThread)return false;if(!$.isReady&&!this.isBodyLoaded)return false;var a;for(var b in this.queue){if(!this.isBodyLoaded&&parseInt(b)>-1)return false;if(this.queue[b].length>0){a=this.queue[b].shift();break}}
if(a){this.log(["Next:starting item",a]);this.curThread++;a.type=="img"&&this.loadImage(a);a.type=="doc"&&this.loadDocument(a)}},loadImage:function(a){if(a.cache&&this.images[a.path]!=undefined&&this.images[a.path].complete)this.imageLoaded(this.images[a.path],a);else if(document.images){var b=new Image,c=this;$(b).load(function(){c.imageLoaded(b,a)});$(b).error(function(){c.imageError(b,a)});b.src=a.path;this.images[a.path]=b}},loadDocument:function(a){if(a.cache&&this.doc[a.path]!=undefined)this.docLoaded(this.doc[a.path],a);else{var b=this;$.get(a.path,function(c){b.docLoaded(c,a)})}},imageLoaded:function(b,a){this.curThread=this.curThread>0?this.curThread-1:0;a.callback&&a.callback(b,a.passvar);setTimeout($.proxy(this.next,this),this.nextDelay)},imageError:function(b,a){this.curThread=this.curThread>0?this.curThread-1:0;a.callback&&a.callback(b,a.passvar);setTimeout($.proxy(this.next,this),this.nextDelay)},docLoaded:function(b,a){this.curThread=this.curThread>0?this.curThread-1:0;try{a.callback&&a.callback(b,a.passvar)}catch(c){this.log(c)}
setTimeout($.proxy(this.next,this),this.nextDelay)}};if(typeof $!="undefined")$("body").load($.proxy(window.MSCOM.Helper.Content.onload,window.MSCOM.Helper.Content));else if(document.addEventListener)window.addEventListener("load",function(){window.MSCOM.Helper.Content.onload()},false);else window.attachEvent&&window.attachEvent("onload",function(){window.MSCOM.Helper.Content.onload()})
if(window.Hp===undefined)window.Hp={};Hp.FlyoutMenu=function(l,k,j,e,f,h,d,i,g,a){this.Control=$("#"+l);this._menuClass="."+k;this._itemClass="."+j;this._flyoutLinkClass="."+e;this._staticLinkClass="."+f;this._flyoutClass="."+h;this._flyoutRegionClass="."+d;this._flyoutColClass=a?"."+a:"";this._onOpenClick=i;this._onCloseEvent=g;this.Control.find(this._flyoutLinkClass).click($.proxy(this.ItemClick,this)).keydown($.proxy(this.ItemKeyDown,this));var b=this.Control.find(this._flyoutClass).toArray(),c;for(c in b)$(b[c]).find("a:last").keydown($.proxy(this.LastLinkKeyDown,this));$(document).click($.proxy(this.DocClick,this))};Hp.FlyoutMenu.prototype={DocClick:function(c){var a=this.Control.find(".selected");if(a.size()>0){var b=$.contains(a.get(0),c.target);!b&&this.HideFlyouts()}},ItemClick:function(a){a.preventDefault();if(this.IsFlyoutVisible(a))this.HideFlyouts();else{this.HideFlyouts();this.ShowFlyout(a);this._onOpenClick!=null&&this._onOpenClick(a)}},ItemKeyDown:function(a){if(a.which==9)a.shiftKey&&this.HideFlyouts()},LastLinkKeyDown:function(a){if(a.which==9)!a.shiftKey&&this.HideFlyouts()},IsFlyoutVisible:function(a){return $(a.target).parents(this._itemClass).find(this._flyoutClass).css("display")!="none"},ShowFlyout:function(b){var a=$(b.target).parents(this._itemClass).addClass("selected").find(this._flyoutClass);this.PositionFlyout(a);if(jQuery.browser.opera||jQuery.browser.msie&&document.documentMode<=7)a.show();else a.slideDown(300)},HideFlyouts:function(){if(jQuery.browser.opera||jQuery.browser.msie&&document.documentMode<=7)$(this._flyoutClass,this.Control).hide();else $(this._flyoutClass,this.Control).slideUp(300);var a=this;this._onCloseEvent!=null&&$(this._itemClass).filter(".selected").each(function(){a._onCloseEvent($(this).find(a._flyoutLinkClass))});$(this._itemClass).removeClass("selected").removeClass("show")},PositionFlyout:function(a){var g="left",b=a.parents(this._itemClass).width(),k=a.parents(this._itemClass).position().left,f=a.outerWidth(),l=a.parents(this._menuClass).width(),n=a.parents(this._menuClass).position().left;if(jQuery.browser.msie&&$.browser.version<=7){l=$("#hpBldTabs").width()+$("#hpBldMSLogo").width();n=$("#hpBldTabs").position().left}
var o=l;if(a.parents(this._flyoutRegionClass).size()>0)o=a.parents(this._flyoutRegionClass).innerWidth();var e=k+n,d=l-k-b;if(document.documentElement.dir=="rtl"){g="right";b-=2;d=o-k-b;var p=e;e=d;d=p}
if(d<0)d=0;if(e<0)e=0;var j=[],i=0;this._flyoutColClass!=""&&a.find(this._flyoutColClass).each(function(a){a!=0&&j.push(i);i+=$(this).outerWidth();i+=parseInt($(this).css("padding-left"),10)+parseInt($(this).css("padding-right"),10);i+=parseInt($(this).css("margin-left"),10)+parseInt($(this).css("margin-right"),10)});var c=0;if(f<=b+d){a.css(g,c);a.addClass("dock-left")}else if(f<b+e){if(document.documentElement.dir=="rtl")c=-f+b+2;else c=-f+b;a.css(g,c);a.addClass("dock-right")}else{for(var m=0;m<j.length;m++){var h=j[m];if(f-h<=b+d&&h<=e){c=-h;a.css(g,c);return}else if(f-h<=d&&h<=e+b){c=-h+b;a.css(g,c);return}}
if(f<e+d+b){c=-f+(d+b);a.css(g,c)}else{c=-e-1;a.css(g,c)}}}}
if(typeof window.Hp=="undefined")window.Hp={};Hp.Feedback=function(c,a,b){this.Control=$("#"+c);this.WorstCaseSubmissionLength=a;this.WorstCaseTextFieldLength=b;this.MaxUrlLength=2083;$($.proxy(this.Ready,this))};Hp.Feedback.prototype={Ready:function(){function d(){var a=MSCOM.BI.WebTrends,b=a.DCS;a.dcsFPC();var c="http://"+a.domain+"/"+a.dcsid+"/dcs.gif?"+a.dcsA("dcssip",b.dcssip)+a.dcsA("dcsuri",b.dcsuri)+a.dcsA("WT.co_f",a.WT.co_f)+a.dcsA("dcsqry",b.dcsqry||"?");return c}
function e(){this.WorstCaseSubmissionLength+=d().length;if(a.WorstCaseSubmissionLength>c){var e=(a.WorstCaseTextFieldLength-(a.WorstCaseSubmissionLength-c))/a.WorstCaseTextFieldLength;b.each(function(){var b=$(this).prev().children("textarea");b.data("maxLength",Math.floor(b.data("maxLength")*e));a.UpdateRemaining(b)})}}
var a=this,c=2e3,b=this.Control.find(".hpFdb_Chars");this.CharsTemplate=b.first().text();this.Control.find(".hpFdb_NormalContent").show();var f=window.attachEvent?"click":"mousedown";this.Control.find(".hpFdb_ActionPrimary").bind(f,function(){var e=MSCOM.BI.WebTrends,c=e.dcsA("SurveyId",a.Control.find('.hpFdb_Body input:[name="surveyId"]').val());c+=e.dcsA("SurveyVersion",a.Control.find('.hpFdb_Body input:[name="surveyVersion"]').val());var b=[];a.Control.find("input:radio:checked").each(function(){b.push(encodeURIComponent(this.name)+":"+encodeURIComponent(this.value))});a.Control.find("div.hpFdb_CheckboxQ").each(function(){var c=$(this),d=c.attr("data-questionId"),a=[];c.find("input:checkbox:checked").each(function(){a.push(encodeURIComponent($(this).attr("name")))});a.length&&b.push(encodeURIComponent(d)+":"+a.join())});if(b.length)c+=e.dcsA("SurveyQuestions",b.join(";"));var f=[];a.Control.find("textarea").each(function(){this.value.length&&f.push(encodeURIComponent(this.name)+":"+encodeURIComponent(this.value))});if(f.length)c+=e.dcsA("SurveyComments",f.join(";"));g(c);a.Control.find(".hpFdb_Form").hide("slow");a.Control.find(".hpFdb_Thanks").show("slow");return false;function g(c){var b=d()+c;if(b.length>a.MaxUrlLength)b=b.substr(0,a.MaxUrlLength);MSCOM.BI.WebTrends.dcsCreateImage(b)}});b.css("display","block").each(function(){var b=$(this).prev().children("textarea");b.data("maxLength",parseInt(b.attr("data-maxlength"),10));a.UpdateRemaining(b)}).prev().bind("change keyup input keypress cut paste",function(c){var b=$(c.target),d=b.data("maxLength")-b.val().length;if(d<0){b.val(b.val().substr(0,b.data("maxLength")));c.target.scrollTop=c.target.scrollHeight}
a.UpdateRemaining(b)});this.Control.one("focus",function(){e()})},UpdateRemaining:function(a){var b=a.data("maxLength")-a.val().length;a.parent().next().text(this.CharsTemplate.replace(new RegExp("\\{count\\}","gm"),b))}}
if(window.Hp===undefined)window.Hp={};Hp.LocalePicker=function(c,b){this.FadeSpeed=200;this.Control=$("#"+c);this.WatermarkText=b;this.TextboxWidth=200;this.BrandWidth=20;this.BrandToggle=false;if(!this.isHighContrastMode()&&this.WatermarkText!=undefined&&this.WatermarkText!=""){this.createWatermark();$(this.Control).find(".hpLcp_SearchTextbox").blur(jQuery.proxy(this.showWaterMark,this)).focus(jQuery.proxy(this.hideWaterMark,this));$(this.Control).find(".hpLcp_SearchWatermark").focus(jQuery.proxy(this.shiftFocus,this));this.showWaterMark()}
$(this.Control).find(".hpLcp_SearchTextbox").bind("keydown",jQuery.proxy(this.defaultClick,this)).bind("keyup",jQuery.proxy(this.filterList,this));var a=function(){$(this.Control).find(".hpLcp_SearchTextbox").val().length>0&&this.hideWaterMark()};$($.proxy(a,this));$(this.Control).find("div.hpLcp_LanguageLinks a").click(function(){})};Hp.LocalePicker.prototype={createWatermark:function(){var a='<span class="hpLcp_Search">';a+='<span class="hpLcp_SearchBorder">';a+='<input class="hpLcp_SearchWatermark" type="text" readonly="readonly" style="display:none; color:#7d7d7d;" value="'+MSCOM.Helper.htmlAttrEncode(this.WatermarkText)+'" />';a+='<input type="text" class="hpLcp_SearchTextbox" />';a+='<span class="hpLcp_SearchIcon search"></span>';a+="</span>";a+="</span>";$(a).insertAfter(".hpLcp_Heading",this._picker);$(".hpLcp_Heading",this._picker).parents(".hpLcp").addClass("hpLcp_SearchOn")},showWaterMark:function(){if($(this.Control).find(".hpLcp_SearchTextbox").val().length==0){$(this.Control).find(".hpLcp_SearchWatermark").fadeIn(this.FadeSpeed,function(){this.style&&this.style.removeAttribute&&this.style.removeAttribute("filter")});if(this.BrandToggle){$(this.Control).find(".src_brand").fadeIn(this.FadeSpeed);$(this.Control).find(".hpLcp_SearchTextbox, .hpLcp_SearchWatermark").width(this.TextboxWidth)}else $(this.Control).find(".hpLcp_SearchWatermark").width(this.TextboxWidth);$(this.Control).find(".hpLcp_SearchIcon").addClass("search").removeClass("clearSearch").unbind("click",jQuery.proxy(this.clearFilter,this))}},hideWaterMark:function(){$(this.Control).find(".hpLcp_SearchWatermark").fadeOut(this.FadeSpeed,function(){this.style&&this.style.removeAttribute&&this.style.removeAttribute("filter")})},shiftFocus:function(){if(jQuery.browser.safari)window.setTimeout(jQuery.proxy(function(){$(this.Control).find(".hpLcp_SearchTextbox").get(0).focus()},this),0);else $(this.Control).find(".hpLcp_SearchTextbox").get(0).focus()},filterList:function(c){var b=c.which;if(b==40)this.shiftHighlight("down");else if(b==38)this.shiftHighlight("up");else if(b==13)return;else{var a=$(c.target).val();if(a.length>0)$(this.Control).find(".hpLcp_SearchIcon").addClass("clearSearch").removeClass("search").bind("click",jQuery.proxy(this.clearFilter,this));else a.length==0&&$(this.Control).find(".hpLcp_SearchIcon").addClass("search").removeClass("clearSearch").unbind("click",jQuery.proxy(this.clearFilter,this));var a=$.trim(a);$(this.Control).find(".hpLcp_LanguageLinks li").removeClass("hpLcp_Hide").removeClass("hpLcp_Highlight");if(a!=null&&a!=""){$(this.Control).find(".hpLcp_LanguageLinks li").find("a").attr("tabindex","").end().filter(function(){var c=$(this).text(),b=new RegExp(a,"i");return!b.test(c)}).addClass("hpLcp_Hide").find("a").attr("tabindex","-1");$(this.Control).find(".hpLcp_LanguageLinks li").not(".hpLcp_Hide").eq(0).addClass("hpLcp_Highlight")}}},shiftHighlight:function(c){var b=this.Control.find(".hpLcp_LanguageLinks li:not(.hpLcp_Hide)").get(),d=$(".hpLcp_Highlight").index(".hpLcp_LanguageLinks li:not(.hpLcp_Hide)"),a=d;if(c=="down"){a++;a=a%b.length}else if(c=="up")if(a==0)a=b.length-1;else a--;$(b[d]).removeClass("hpLcp_Highlight");$(b[a]).addClass("hpLcp_Highlight")},clearFilter:function(){$(this.Control).find(".hpLcp_SearchTextbox").val("");this.showWaterMark();$(this.Control).find(".hpLcp_LanguageLinks li").removeClass("hpLcp_Hide").removeClass("hpLcp_Highlight")},defaultClick:function(a){if(a.which==13){a.preventDefault();if($(this.Control).find(".hpLcp_Highlight").size()>0){var b=$(this.Control).find(".hpLcp_Highlight").find("a");document.location=b.attr("href")}}},isHighContrastMode:function(){var a=$("<div style='background: #888888;'></div>").css("background-color");return a!=="#888888"&&a.replace(/\s/g,"").toLowerCase()!=="rgb(136,136,136)"}}
if(typeof window.Ms=="undefined")window.Ms={};Ms.Search=function(c,a){this.FadeSpeed=200;this.timer=null;this.Control=$("#"+c);this.WatermarkText=$(this.Control).find(".hpSrc_Textbox").attr("title");this.WatermarkColor=a;this.TextboxWidth=$(this.Control).find(".hpSrc_Textbox").width();this.BrandWidth=$(this.Control).find(".hpSrc_InnerBrand").width();this.BrandToggle=$(this.Control).find(".hpSrc_InnerBrand.hpSrc_brandToggle").size()>0;var b=window.attachEvent?"click":"mousedown";$(this.Control).find(".hpSrc_Button").live(b,$.proxy(this.buttonClick,this));$($.proxy(this.init,this))};Ms.Search.prototype={init:function(){if(typeof this.WatermarkText!="undefined"&&this.WatermarkText!=""){$(this.Control).find(".hpSrc_border").prepend('<input class="hpSrc_waterMark" type="text" readonly="readonly" style="display:none; color:'+this.WatermarkColor+';" value="'+this.WatermarkText+'" />');$(this.Control).find(".hpSrc_Textbox").blur($.proxy(this.showWaterMark,this)).focus($.proxy(this.hideWaterMark,this)).change($.proxy(this.textChanged,this));$(this.Control).find(".hpSrc_waterMark").focus($.proxy(this.shiftFocus,this));if($(this.Control).find(".hpSrc_Textbox").val().length>0)this.hideWaterMark();else this.applyWaterMark()}
$(this.Control).find(".hpSrc_Textbox, .hpSrc_Sources a").bind("keyup",jQuery.proxy(this.navigateDropdown,this));$(this.Control).find(".hpSrc_Sources a").bind("keydown",jQuery.proxy(this.preventScroll,this));var a,c=function(){if(a!=null){window.clearTimeout(a);a=null}
var b=$(".hpSrc_border").width();$(".hpSrc_Sources").width(b).slideDown(300);$(".hpSrc_Arrow").show()},b=function(){a=window.setTimeout(function(){$(".hpSrc_Arrow").fadeOut(300);$(".hpSrc_Sources").slideUp(300)},300)};$(this.Control).find(".hpSrc_Textbox, .hpSrc_Button, .hpSrc_Sources a").focus(c).blur(b);$(this.Control).find("ul a").click(function(d){window.clearTimeout(a);a=null;d.preventDefault();$(".hpSrc_Sources li").removeClass("selected");var c=$(this);$("#hpSrc_Source").val(c.parent("li").index(".hpSrc_Sources li"));var b=c.parent("li").addClass("selected").find("a").text();$(".hpSrc_waterMark").val(b);$(".hpSrc_Textbox").attr("title",b);$(".hpSrc_Textbox").get(0).focus();return false})},preventScroll:function(b){var a=b.which;if(a==40||a==38)return false},navigateDropdown:function(a){var b=a.which;if(b==40){this.shiftHighlight(a,"down");return false}else if(b==38){this.shiftHighlight(a,"up");return false}},shiftHighlight:function(e,c){var b=$(this.Control).find(".hpSrc_Textbox, .hpSrc_Sources a").get(),d=$(e.target).index(".hpSrc_Textbox, .hpSrc_Sources a"),a=d;if(c=="down"){a++;a=a%b.length}else if(c=="up")if(a==0)a=b.length-1;else a--;$(b[a]).get(0).focus()},showWaterMark:function(){if(this.timer==null)this.timer=window.setTimeout($.proxy(this.applyWaterMark,this),1e3);else this.applyWaterMark()},applyWaterMark:function(){if($(this.Control).find(".hpSrc_Textbox").val().length==0){$(this.Control).find(".hpSrc_waterMark").fadeIn(this.FadeSpeed,function(){this.style&&this.style.removeAttribute&&this.style.removeAttribute("filter")});if(this.BrandToggle){$(this.Control).find(".hpSrc_InnerBrand").fadeIn(this.FadeSpeed);$(this.Control).find(".hpSrc_Textbox, .src_waterMark").width(this.TextboxWidth)}else $(this.Control).find(".hpSrc_waterMark").width(this.TextboxWidth)}},hideWaterMark:function(){if(this.timer!=null){window.clearTimeout(this.timer);this.timer=null}
$(this.Control).find(".hpSrc_waterMark").fadeOut(this.FadeSpeed,function(){this.style&&this.style.removeAttribute&&this.style.removeAttribute("filter")});this.BrandToggle&&$(this.Control).find(".hpSrc_InnerBrand").fadeOut(this.FadeSpeed,$.proxy(this.enlargeTextbox,this))},textChanged:function(){$(this.Control).find(".hpSrc_Textbox").val().length>0&&this.hideWaterMark()},enlargeTextbox:function(){$(this.Control).find(".hpSrc_waterMark").css("display")=="none"&&$(this.Control).find(".hpSrc_Textbox, .hpSrc_waterMark").width(this.TextboxWidth+this.BrandWidth)},shiftFocus:function(){window.setTimeout($.proxy(function(){$(this.Control).find(".hpSrc_Textbox").get(0).focus()},this),0)},buttonClick:function(){if(MSCOM.BI){var a=MSCOM.BI;params={};params.searchtype=$("#hpSrc_Source").val()==0?"MSCOM":"Bing";params.interactiontype=3;params.index=$("#hpSrc_Source").val();params.searchquery=this.Control.find(".hpSrc_Textbox").val();params.searchitemtitle=$.trim(this.Control.find(".hpSrc_Textbox").attr("title"));params.title=params.searchitemtitle;params.parenttypestructure=a.getNestedTypeStructure(this.Control.find(".hpSrc_Textbox"));params["-bi-description-ignore-"]="search-click";a.record(params)}
return true}}
if(typeof window.Hp=="undefined")window.Hp={};Hp.Pivot=function(b){this.Control=$("#"+b);this.BodyAnimationInProgress=false;this.PrefetchEnabled=true;var a=1;this.PivotAdvanceTime=2e3*a;this.SubPivotHeaderSlideDownTime=2000*a;this.SubPivotFadeTime=2000*a;this.InitialFullHeaderDisplayTime=1000*a;this.HeaderSlideTime_Show=1000*a;this.HeaderSlideTime_Hide=2e3*a;$($.proxy(this.Ready,this))};Hp.Pivot.prototype={Ready:function(){this.HeaderOuterPanel=this.Control.find(".hpPvt_headerOuterPanel");this.HeaderPanel=this.Control.find(".hpPvt_headerPanel");this.BodyPanel=this.Control.find(".hpPvt_bodyPanel");this.InitialFadePosition=parseInt(this.Control.find(".hpPvt_fade:eq(1)").css("left"),10);this.InitialHeaderPanelOffset=parseInt(this.HeaderPanel.css("margin-left"),10);this.AdvanceDistance=this.HeaderPanel.children(":eq(1)").position().left-this.HeaderPanel.children(":eq(0)").position().left;this.DefaultPeekWidth=this.Control.find(".hpPvt_bodyPeek").width();var d=$.proxy(this.AdvancePivot,this),b=$.proxy(this.ShowPeekFeedback,this),a=$.proxy(this.HidePeekFeedback,this),f=this;this.Control.find(".hpPvt_headerContent > a").focusin(b).focusout(a);this.Control.find(".hpPvt_bodyPeek > a").hover(b,a).click(d);this.Control.find(".hpPvt_headerBar.hpPvt_rightPos").live("mouseenter",b).live("mouseleave",a).live("click",d);this.Control.find(".hpPvt_headerBar").addClass("hpPvt_clickable");var c=this.ComputeHeaderPeekExpandAmount();if(c>0){this.HeaderOuterPanel.css("margin-left",-c);var e=this.Control.find(".hpPvt_headerPanel > *:gt(0):lt(2) > .hpPvt_fade");e.css("margin-left",c);setTimeout(a,this.InitialFullHeaderDisplayTime)}
this.Control.find("a.hpPvt_subPivotLink").click(function(a){f.ShowSubPivotFromClick(a);a.preventDefault()});this.GetSelectedSubPivot(this.BodyPanel.find(".hpPvt_subPivots:first")).data("biview",1);$(window).load($.proxy(this.PrefetchContent,this))},AdvancePivot:function(b){if(!this.BodyAnimationInProgress){var a=this.PivotAdvanceTime;this.AdvanceBody(a);this.AdvanceHeader(a);this.MoveHeaderText(a)}
b.preventDefault()},MoveHeaderForHover:function(b,a){var c=this.Control.find(".hpPvt_headerPanel > *:gt(0):lt(2) > .hpPvt_fade"),d=this.BodyPanel.children().first().find(".hpPvt_subPivotBar");this.HeaderOuterPanel.stop(true).animate({"margin-left":b},{duration:a,step:$.proxy(function(a){c.css("margin-left",-a)},this)})},AdvanceHeader:function(b){var a=this.Control.find(".hpPvt_headerPanel > *:eq(2) > .hpPvt_fade");this.HeaderPanel.children(".hpPvt_current").removeClass("hpPvt_current");this.HeaderPanel.children(":eq(1)").addClass("hpPvt_current");this.HeaderPanel.children(":eq(2)").addClass("hpPvt_rightPos");this.MoveHeader(this.InitialHeaderPanelOffset-this.AdvanceDistance,b,$.proxy(function(){this.HeaderPanel.children(":first").appendTo(this.HeaderPanel);this.HeaderPanel.css("margin-left",this.InitialHeaderPanelOffset);this.HeaderPanel.children(":first").removeClass("hpPvt_rightPos");a.css("left",this.InitialFadePosition)},this))},MoveHeader:function(e,d,c){var f=this.Control.find(".hpPvt_headerPanel > *:eq(1) > .hpPvt_fade"),b=this.Control.find(".hpPvt_headerPanel > *:eq(2) > .hpPvt_fade"),a=this.InitialFadePosition+this.InitialHeaderPanelOffset;this.HeaderPanel.animate({"margin-left":e},{duration:d,step:$.proxy(function(d){var c=a-d;f.css("left",c);b.css("left",c-this.AdvanceDistance)},this),complete:c})},AdvanceBody:function(i){var d=false,e=0;function h(){if(++e>=2){this.BodyAnimationInProgress=false;f.hide().addClass("hpPvt_bodyOffScreen").trigger("PivotHide").css({position:"",left:""});a.removeClass("hpPvt_bodyOffScreen").css({position:"",left:""});this.BodyPanel.css("margin-left",0);this.Control.css("height","");a.find(".hpPvt_subPivotBar").slideDown(this.SubPivotSlideDownTime);if(d){this.PivotTrack(["pivotclick","view"],b);window.setTimeout($.proxy(function(){var a=this.GetSelectedSubPivot(b);a.trigger("PivotShow")},this),500)}
this.PrefetchPivotContent(a.find(".hpPvt_bodyGroup"));$.browser.msie&&parseInt($.browser.version)<7&&this.GetSelectedSubPivot(a.find(".hpPvt_subPivots")).find("*").each(function(e,d){var a=$(d),b=a.css("float"),c=a.attr("style");if(b&&b!=="none"){a.css("float",b);(!c||c.indexOf("float:")==-1)&&a.css("float","")}})}}
var a=this.BodyPanel.children(".hpPvt_bodyOffScreen"),f=this.BodyPanel.children(":not(.hpPvt_bodyOffScreen)"),k=this.Control.height(),b=a.find(".hpPvt_subPivots"),l=this.GetSelectionIndexFromHeaders(b);this.ShowSubPivot(b,l,$.proxy(function(){d=true;if(e>=2){this.PivotTrack(["pivotclick","view"],b);window.setTimeout($.proxy(function(){var a=this.GetSelectedSubPivot(b);a.trigger("PivotShow")},this),500)}},this));this.Control.css("height",k);f.css({position:"absolute",left:0});a.show().css({position:"absolute",left:this.AdvanceDistance}).find(".hpPvt_subPivotBar").hide();if(a.find(".hpPvt_selectedSubPivot .hpPvt_dynLoadPlaceholder").length)a.find(".hpPvt_loadingPanel").show();else a.find(".hpPvt_selectedSubPivot").trigger("PivotShow");this.BodyAnimationInProgress=true;this.BodyPanel.animate({"margin-left":-this.AdvanceDistance},{duration:i,complete:$.proxy(h,this)});var c=a.find(".hpPvt_loadingPanel"),g=a.find(".hpPvt_subPivots").outerHeight(),j=parseInt(c.css("min-height"),10)+parseInt(c.css("margin-top"),10)+parseInt(c.css("border-top-width"),10)+parseInt(c.css("border-bottom-width"),10),g=Math.max(g,j);this.Control.animate({height:this.ComputeControlHeight(g,false)},{duration:i,complete:$.proxy(h,this)})},MoveHeaderText:function(c){var a=this.Control.find(".hpPvt_headerContent:eq(1)"),b=this.Control.find(".hpPvt_headerContent:eq(2)"),d=this.Control.find(".hpPvt_headerPanel > *:eq(1)"),e=d.width()-a.children(":first").outerWidth(true);a.css({"text-align":"right","margin-right":e});a.animate({"margin-right":0},{duration:c});b.css("text-align","left")},ShowPeekFeedback:function(){this.Control.find(".hpPvt_Arrow").addClass("hpPvt_hover");var a=this.ComputeHeaderPeekExpandAmount();a>0&&this.MoveHeaderForHover(-a,this.HeaderSlideTime_Show);setTimeout(function(){$(".hpPvt").scrollLeft(0)},0)},ComputeHeaderPeekExpandAmount:function(){var a=this.HeaderPanel.children().slice(1,2);return a.find(".hpPvt_headerContent .hpPvt_headerLink").outerWidth(true)+parseInt(a.css("padding-left"),10)*2-this.DefaultPeekWidth},HidePeekFeedback:function(){this.Control.find(".hpPvt_Arrow").removeClass("hpPvt_hover");this.MoveHeaderForHover(0,this.HeaderSlideTime_Hide)},ComputeControlHeight:function(d,c){var b=this.HeaderPanel.children(".hpPvt_headerBar").outerHeight(),a=c?this.BodyPanel.find(".hpPvt_subPivotBar").outerHeight():0,f=this.BodyPanel.find(".hpPvt_bodyPeek").outerHeight(true),e=parseInt(this.BodyPanel.find(".hpPvt_bodyGroup").css("margin-top"),10);return b+Math.max(f,a+e+d)},ShowSubPivotFromClick:function(d){var c=$(d.target).parent(),b=c.index(),a=c.closest(".hpPvt_subPivots");a.find(".hpPvt_subPivotBar li").removeClass("hpPvt_selectedSubPivot").eq(b).addClass("hpPvt_selectedSubPivot");this.ShowSubPivot(a,b,$.proxy(function(){this.PivotTrack(["subpivotclick","view"],a)},this))},ShowSubPivot:function(b,f,d){var i=b.children(".hpPvt_bodyGroup").children(".hpPvt_body"),a=i.eq(f),g=a.find(".hpPvt_dynLoadPlaceholder"),e=b.children(".hpPvt_bodyGroup").children(".hpPvt_body:visible").not(a),c=b.find(".hpPvt_loadingPanel"),h=this;if(g.length){this.Control.css("height",this.Control.height());c.css("height",b.children(".hpPvt_bodyGroup").outerHeight()-parseInt(c.css("border-top-width"),10)-parseInt(c.css("border-bottom-width"),10));c.fadeIn(this.SubPivotFadeTime);e.fadeOut(this.SubPivotFadeTime);this.LoadDynamic(g,0,function(a){h.ShowDynamicContent(g,a);d&&d(b,f)})}else if(b.parent().filter(".hpPvt_bodyOffScreen").length){e.hide();c.hide();a.show();d&&d(b,f)}else{this.Control.animate({height:this.ComputeControlHeight(a.height(),true)},{duration:this.SubPivotFadeTime,complete:function(){h.Control.css("height","")}});e.css({"z-index":0,position:"absolute"});a.css({"z-index":1e3,position:"absolute"});a.fadeIn(this.SubPivotFadeTime,function(){a.css({"z-index":"",position:""});a.trigger("PivotShow");d&&d(b,f)});e.fadeOut(this.SubPivotFadeTime,function(){e.hide().css({"z-index":"",position:""})});c.filter(":visible").length&&c.fadeOut(this.SubPivotFadeTime)}},LoadDynamic:function(a,d,c){if(a&&a.length){var b=a.attr("data-component");b+=b.indexOf("?")!=-1?"&uid=":"?uid="+a.parent().attr("id");if(d===0){if(!a.filter(".hpPvt_requested").length||MSCOM.Helper.Content.unregister(b)){$.get(b,c);a.addClass("hpPvt_requested")}}else{var e={path:b,priority:d,callback:c};MSCOM.Helper.Content.registerDoc(e)&&a.addClass("hpPvt_requested")}}},GetSelectionIndexFromHeaders:function(b){var a=b.find(".hpPvt_subPivotBar li");return a.length?a.index(a.filter(".hpPvt_selectedSubPivot")):0},GetSelectedSubPivot:function(a){return a.find(".hpPvt_body").eq(this.GetSelectionIndexFromHeaders(a))},ShowDynamicContent:function(a,g){var b=a.closest(".hpPvt_subPivots"),e=this.GetSelectionIndexFromHeaders(b),f=b.find(".hpPvt_body"),d=f.index(a.closest(".hpPvt_body")),c=a.parent();c.hide();a.remove();c.append(g);window.setTimeout(function(){c.trigger("PivotShow")},500);d===e&&this.ShowSubPivot(b,d)},PrefetchContent:function(){var a=this;if(!this.PrefetchEnabled||window.location.hash.indexOf("noprefetch")>0)return false;var e=a.BodyPanel.find(".hpPvt_subPivots:eq(1)"),c=a.GetSelectedSubPivot(e).find(".hpPvt_dynLoadPlaceholder:not(.hpPvt_requested)");a.LoadDynamic(c,30,function(b){a.ShowDynamicContent(c,b)});var d=a.BodyPanel.find(".hpPvt_subPivots:eq(0)"),b=d.find(".hpPvt_body:eq(0) .hpPvt_dynLoadPlaceholder:not(.hpPvt_requested)");b.length>0&&a.LoadDynamic(b,30,function(c){a.ShowDynamicContent(b,c)})},PrefetchPivotContent:function(c){var a=this;if(!this.PrefetchEnabled||window.location.hash.indexOf("noprefetch")>0)return false;var b=c.find(".hpPvt_dynLoadPlaceholder:not(.hpPvt_requested)");b.each(function(d,c){var b=$(c);a.LoadDynamic(b,30,function(c){a.ShowDynamicContent(b,c)})})},PivotTrack:function(k,i){if(MSCOM.BI==undefined)return false;var j=this.HeaderPanel.find(".hpPvt_headerBar.hpPvt_current"),o=i,a=this.GetSelectedSubPivot(i),h=i.closest(".hpPvt_subPivots"),e=o.find(".hpPvt_subPivotBar .hpPvt_selectedSubPivot a"),g=j.find("a.hpPvt_headerLink"),c=j.attr("bi:index"),b=e.length>0,n=e.attr("bi:index"),l=[$.trim(g.text())];b&&l.push($.trim(e.text()));var f=$.extend(f,MSCOM.BI.getNestedIndexGridTypeStructure(j),MSCOM.BI.additionalParams,{title:b?$.trim(e.text()):$.trim(g.text()),parenttitlestructure:l.join(";")});if($.inArray("pivotclick",k)>-1){var m=$.extend({},f,{initial:h.data("pivotclick")!==undefined?h.data("pivotclick"):0,interactiontype:4,title:$.trim(g.text()),parenttitlestructure:"",index:c,parentindexstructure:"","-bi-description-ignore-":"bi-pivot-click"});MSCOM.BI.addRecordQueue(m);h.data("pivotclick",1)}
if($.inArray("subpivotclick",k)>-1){var m=$.extend({},f,{initial:a.data("biclick")!==undefined?a.data("biclick"):0,interactiontype:4,parenttitlestructure:b?$.trim(g.text()):"",index:b?n:c,parentindexstructure:b?c:"","-bi-description-ignore-":"bi-subpivotclick-click"});MSCOM.BI.addRecordQueue(m);a.data("biclick",1)}
if($.inArray("view",k)>-1){var d;if(MSCOM.BI.isIE()){d=a.find("area:visible").filter(function(){return $(this).parents("map").siblings("img").is(":visible")});d=$.merge(d,a.find("a:visible"))}else d=a.find("a:visible,area:visible");var p=$.extend({},f,MSCOM.BI.getMergedBiData(d),{initial:a.data("biview")!==undefined?a.data("biview"):0,interactiontype:1,triggertype:4,index:"",parentindexstructure:b?[c,n].join(";"):c,title:"","-bi-description-ignore-":"bi-pivot-view"});MSCOM.BI.addRecordQueue(p);a.data("biview",1)}}}
if(window.Hp===undefined)window.Hp={};if(typeof window.Hp.Grid=="undefined")window.Hp.Grid={logenabled:false,isInitialized:false,alignmentSwitch:{hpHro:true},init:function(){if(Hp.Grid.isInitialized)return;Hp.Grid.isInitialized=true;var a=this;$(".hpGrd_Row").live("GridResize",Hp.Grid.gridResizeHandler);$(".hpGrd_Row:visible").each(function(){Hp.Grid.rowContentResize($(this),$(this).height())});$(".hpPvt_body").live("PivotShow",Hp.Grid.pivotShowHandler);if($.browser.msie&&parseInt($.browser.version)==7)$.fx.interval=45;if(window.location.hash.indexOf("anilog")>0){$("body").prepend('<div id="JquerySettings" style="position:absolute;z-index:999;font-size:10px;"><a href="#" class="sub">-</a> <a href="#" class="add">+</a><br/><span class="currentInt"></span></div>');$("#JquerySettings a").live("click",function(){$.fx.interval=$(this).hasClass("add")?$.fx.interval+5:$.fx.interval-5;$("#JquerySettings .currentInt").html($.fx.interval)})}},log:function(a){if(this.logenabled)try{console.log(a)}catch(b){}},gridResizeHandler:function(c,b,d){Hp.Grid.log(["grid:gridResizeHandler",c,b,d]);var e=$(c.target).closest(".hpGrd_Row"),g=$(c.target).closest(".hpGrd_Cell"),f=g.siblings(".hpGrd_Cell"),a=0;f.each(function(){var b=Hp.Grid.getHeight($(this),e);if(a<b)a=b});a=b<a?a:b;Hp.Grid.rowContentResize(e,a,d)},pivotShowHandler:function(a){try{$(a.target).find(".hpGrd_Row").each(function(){Hp.Grid.rowContentResize($(this),$(this).height())})}catch(a){}},rowContentResize:function(c,b,a){c.attr("rowheight",b);c.find(".hpGrd_Cell").each(function(){var c=$(this).children("div:not(.hpGrd_Filler)");if(c.length>1){var d=0,e=c.length;c.each(function(g,c){var f=Hp.Grid.getItemHeight($(c));d+=f;if(g==e-1)Hp.Grid.controlResize($(c),f+(b-d),a);else Hp.Grid.controlResize($(c),f,a)})}else Hp.Grid.controlResize(c.first(),b,a)})},getHeight:function(b,c){var a=0;b.children(":not(.hpGrd_Filler)").each(function(){a+=Hp.Grid.getItemHeight($(this),c)});return a},getItemHeight:function(a){var b=0;if(!a)return b;a=$(a);var d="";if(a.hasClass("hpHro")){d="hpHro";if(this.alignmentSwitch.hpHro){var f=0,c,g;a.find(".hpHro_Item").each(function(){g=$(this).css("min-height");$(this).css("min-height","");c=$(this).height();$(this).css("min-height",g);var a=$(this).find(".hpHro_Resize");c=a.length>0?c-a.height():c;if(c>f)f=c});b=f}else b=a.innerHeight()}else if(a.hasClass("hpLst")){d="hpLst";var e=a.find(".hpLst_Resize").innerHeight();e=e?e:0;b=a.outerHeight();b=b-e}else if(a.hasClass("hpCrs"))d="hpCrs";else if(a.hasClass("hpAcc")){d="hpAcc";if(Hp.Accordion.getContainerHeightData)b=Hp.Accordion.getContainerHeightData(a).height}else b=a.innerHeight();this.log("grid:getItemHeight height["+b+"] type["+d+"]");return b},getSiblingMaxHeight:function(b){var e=$(b).closest(".hpGrd_Row"),d=$(b).closest(".hpGrd_Cell"),c=d.siblings(".hpGrd_Cell"),a=0;c.each(function(){var b=Hp.Grid.getHeight($(this),e);if(a<b)a=b});return a},controlResize:function(a,e,b){var c="";b=b||200;if($.browser.msie&&parseInt($.browser.version)==6)b=0;if(a.hasClass("hpHro")){c="hpHro";if(!a.hasClass("init"))return false;this.alignmentSwitch.hpHro&&a.find(".hpHro_Item").each(function(){$(this).css("min-height","");var d=$(this).height(),a=$(this).find(".hpHro_Resize");if(!a.length){$(this).find(".hpHro_Text").append('<div class="hpHro_Resize"></div>');a=$(this).find(".hpHro_Resize")}
var c=a.height();$(this).css("min-height",d-c+"px");var f=e-(d-c);f!=c&&a.animate({height:f},b)})}else if(a.hasClass("hpLst")){c="hpLst";var d=a.find(".hpLst_Resize");if(!d.length){a.find(".hpLst_body").after('<div class="hpLst_Resize"></div>');d=a.find(".hpLst_Resize")}
var g=d.height(),h=this.getItemHeight(a),f=e-h;f!=g&&d.animate({height:f},b)}else if(a.hasClass("hpCrs"))c="hpCrs";else if(a.hasClass("hpAcc")){c="hpAcc";Hp.Accordion.resize&&Hp.Accordion.resize(a,e,b)}
this.log("grid:controlResize id["+a.attr("id")+"] type["+c+"] height["+e+"]")}}
if(typeof window.Hp=="undefined")window.Hp={};Hp.Hero=function(b,a){this.Control=$("#"+b);this._AnimateSpeed;this._SwitchDelay=5e3;this.Items=[];this.BiData={};this.InitialItem;this.CurrentItem;this._FeedUrl=a;this._BiCommonParams;this.SkirtBgSrc="";this.GradBgImageSrc="";this.PrefetchEnabled=true;this.ImagesPrefetched=false;this.AlignmentSwitch=true;this.DeferEnabled=true;this.HeightAdjustment=true;this.AutoRotate=true;$($.proxy(this.Ready,this))};Hp.Hero.prototype={logenabled:false,log:function(a){if(this.logenabled)try{console.log(a)}catch(b){}},DeferredNextSlide:false,Ready:function(){this.CurrentItem=parseInt("0");if(isNaN(this.CurrentItem))this.CurrentItem=0;this.InitialItem=this.CurrentItem;$.ajax({url:this._FeedUrl,success:$.proxy(this.DataLoaded,this),cache:true,dataType:"json"});window.MSCOM.Helper.Content.log(["Hero Init",this.Control]);this.BiData[this.CurrentItem]={next:false,prev:false,view:true,autonext:true};this.SkirtBgSrc=this.Control.find(".hpHro_TextBg img").attr("src");this.GradBgImageSrc=this.Control.find(".hpHro_TextGradBg img").attr("src")},DataLoaded:function(a){if(a!=null&&a.Items!=null){this.Items=a.Items;this.Init()}},PrefetchImages:function(){if(this.ImagesPrefetched||!this.PrefetchEnabled)return false;this.ImagesPrefetched=true;for(var a=0;a<this.Items.length;a++)if(this.Items[a].Image&&this.Items[a].Image.Src)if(!MSCOM.Helper.Content.registerImage({path:this.Items[a].Image.Src,priority:20}))return false},Init:function(){this._AnimateSpeed=this.Control.width();this.Control.find("a.hpHro_Stop").show();if(this.Items.length>0){this.BindButtonEvents();if(this.AutoRotate==true){this.BindAutoPauseEvents();this.Start()}}
this._BiCommonParams={};try{this._BiCommonParams.parenttitlestructure=MSCOM.BI.getNestedTitleStructure(this.Control.children(":first"),null,true);$.extend(this._BiCommonParams,MSCOM.BI.getNestedIndexGridTypeStructure(this.Control.children(":first")),MSCOM.BI.additionalParams)}catch(a){}
this.IsHeroVisible()&&this.PrefetchImages()},Next:function(e){this.PreventClick(e);this.UnbindButtonEvents();this.FreezeHeight();var i=e==undefined;if(this.Control.find(":animated").length>0)return false;!this.ImagesPrefetched&&this.IsHeroVisible()&&this.PrefetchImages();var b=this.CurrentItem+1;if(b>=this.Items.length)b=0;var j=this.InsertItem(b,false),h=this.Control.closest(".hpGrd_Cell").find(":animated").length>0,f=function(){this.RemoveItemsFromStart(1);this.CurrentItem=b;this.Control.find(".hpHro_Item:first").height("");this.BiTrack(e!=undefined?"next":"autonext",this.CurrentItem);if(h){var a=this.AdjustHeight(this.Control.find(".hpHro_Item:first"),Hp.Grid.getSiblingMaxHeight(this.Control));this.Control.trigger("GridResize",[a,200])}},g=this._AnimateSpeed,a=this,c=function(){a.DeferredNextSlide&&a.Control.find(".hpHro_slide").css("overflow","");var d=a.AdjustUpcomingHeight("end",Hp.Grid.getSiblingMaxHeight(a.Control)),c=a.GetHeightAdjustment("end",1);a.Control.trigger("GridResize",[d,a._AnimateSpeed]);if(a.Items[b].IsDark)a.Control.find(".hpHro_Controls").removeClass("dark");else a.Control.find(".hpHro_Controls").addClass("dark");a.Control.find(".hpHro_Controls_Paging div").removeClass("current");a.Control.find(".hpHro_Controls_Paging div:eq("+b+")").addClass("current");arguments.length>0&&a.log("hero:next(autonext):deferredslide: Moving slide now since the image has been loaded");if(a.HeightAdjustment)a.Control.find(".hpHro_slide").animate({left:"-="+g,height:c},a._AnimateSpeed,$.proxy(f,a));else a.Control.find(".hpHro_slide").animate({left:"-="+g},a._AnimateSpeed,$.proxy(f,a));a.DeferredNextSlide=false},d=$(j).find("img:first");if(this.DeferEnabled&&d.length&&!d[0].complete&&i){this.log("hero:next(autonext):-deferring slide till the image loads");this.Control.find(".hpHro_slide").css("overflow","hidden");d.load(c).error(c);this.DeferredNextSlide=true}else c()},Prev:function(g){this.PreventClick(g);this.UnbindButtonEvents();this.FreezeHeight();if(this.Control.find(":animated").length>0)return false;!this.ImagesPrefetched&&this.IsHeroVisible()&&this.PrefetchImages();var a=this.CurrentItem-1;if(a<0)a=this.Items.length-1;var h=this.InsertItem(a,true),d=this.Control.closest(".hpGrd_Cell").find(":animated").length>0,b=function(){this.RemoveItemsFromEnd(1);this.CurrentItem=a;if(this.Items[a].IsDark)this.Control.find(".hpHro_Controls").removeClass("dark");else this.Control.find(".hpHro_Controls").addClass("dark");this.Control.find(".hpHro_Controls_Paging div").removeClass("current");this.Control.find(".hpHro_Controls_Paging div:eq("+a+")").addClass("current");this.Control.find(".hpHro_Item:first").height("");this.BiTrack("prev",this.CurrentItem);if(d){var b=this.AdjustHeight(this.Control.find(".hpHro_Item:first"),Hp.Grid.getSiblingMaxHeight(this.Control));this.Control.trigger("GridResize",[b,200])}},f=this.AdjustUpcomingHeight("start",Hp.Grid.getSiblingMaxHeight(this.Control)),e=this.GetHeightAdjustment("start",1),c=this._AnimateSpeed;this.Control.trigger("GridResize",[f,this._AnimateSpeed]);if(this.HeightAdjustment)this.Control.find(".hpHro_slide").animate({left:"+="+c,height:e},this._AnimateSpeed,$.proxy(b,this));else this.Control.find(".hpHro_slide").animate({left:"+="+c},this._AnimateSpeed,$.proxy(b,this))},Play:function(){this.Start();this.Control.live("mouseleave",$.proxy(this.BindAutoPauseEvents,this));this.Control.find(".hpHro_Stop").show();this.Control.find(".hpHro_Play").hide();this.BiTrack("play",this.CurrentItem)},Stop:function(){this.ClearSwitchTimer();this.UnbindAutoPauseEvents();this.Control.find(".hpHro_Stop").hide();this.Control.find(".hpHro_Play").show();this.BiTrack("stop",this.CurrentItem)},Pause:function(){this.Unpause();this.ClearSwitchTimer()},Unpause:function(){this.Start()},IsHeroVisible:function(){return this.Control.closest(":hidden").length==0},Switch:function(){this.ClearSwitchTimer();if(this.DeferredNextSlide)this.log("switch:skiping next since slide is still deferred loading");else this.IsHeroVisible()&&this.Next();this.Start()},Start:function(){this.StartSwitchTimer()},ClearSwitchTimer:function(){window.clearTimeout(this._SwitchTimerId);this._SwitchTimerId=null},StartSwitchTimer:function(){this.ClearSwitchTimer();this._SwitchTimerId=window.setTimeout($.proxy(this.Switch,this),this._SwitchDelay)},UnbindAutoPauseEvents:function(){this.Control.die("mouseover").die("mouseout");this.Control.find("a, area").die("focus").die("keydown").die("keydown")},BindAutoPauseEvents:function(){this.UnbindAutoPauseEvents();this.Control.live("mouseover",$.proxy(this.Pause,this)).live("mouseout",$.proxy(this.Unpause,this));this.Control.find("a, area").live("focus",$.proxy(this.Pause,this));this.Control.find("a, area").first().live("keydown",$.proxy(this.FirstLinkKeyDown,this));this.Control.find("a, area").last().live("keydown",$.proxy(this.LastLinkKeyDown,this))},FirstLinkKeyDown:function(a){if(a.which==9)a.shiftKey&&this.Unpause()},LastLinkKeyDown:function(a){if(a.which==9)!a.shiftKey&&this.Unpause()},UnbindButtonEvents:function(){this.Control.find(".hpHro_Controls a").unbind("click").click($.proxy(this.PreventClick,this))},BindButtonEvents:function(){this.UnbindButtonEvents();this.Control.find(".hpHro_Controls a.hpHro_Next").click($.proxy(this.Next,this));this.Control.find(".hpHro_Controls a.hpHro_Prev").click($.proxy(this.Prev,this));this.Control.find(".hpHro_Controls a.hpHro_Play").click($.proxy(this.Play,this));this.Control.find(".hpHro_Controls a.hpHro_Stop").click($.proxy(this.Stop,this))},PreventClick:function(a){a&&a.preventDefault()},FreezeHeight:function(){this.Control.find(".hpHro_slide").css("height",this.Control.find(".hpHro_slide").height())},UnfreezeHeight:function(){this.Control.find(".hpHro_slide").css("height","auto")},RemoveItemsFromStart:function(b){for(var a=0;a<b;a++)this.RemoveItem(0,"start");this.Control.find(".hpHro_slide").css("left",0);this.UnfreezeHeight();this.BindButtonEvents()},RemoveItemsFromEnd:function(b){for(var a=0;a<b;a++)this.RemoveItem(1,"end");this.Control.find(".hpHro_slide").css("left",0);this.UnfreezeHeight();this.BindButtonEvents()},RemoveItem:function(c){var b=this.Control.find(".hpHro_Item:eq("+c+")"),a=this.Control.find(".hpHro_slide").position().left;a=a+b.outerWidth(true);this.Control.find(".hpHro_slide").css("left",a);b.remove()},SetMinHeights:function(a){var d=$.browser.msie&&$.browser.version==6?"height":"min-height";if(a.length>1){a.find(".hpHro_TextContent").css(d,0).css("height","auto");var b=0,c,g="";a.each(function(){g+=$(this).find(".hpHro_TextContent").text();c=$(this).find(".hpHro_TextContent").innerHeight();if(c>b)b=c});if(g.length==0)a.find(".hpHro_TextContent").css("height",0);else a.find(".hpHro_TextContent").css(d,b);a.find(".hpHro_Text h4").css(d,0);var b=0,c;a.each(function(){c=$(this).find(".hpHro_Text h4").height();if(c>b)b=c});a.find(".hpHro_Text h4").css(d,b);a.find(".hpHro_Incent").css(d,0);var b=0,c;a.each(function(){c=$(this).find(".hpHro_Incent").height();if(c>b)b=c});a.find(".hpHro_Incent").css(d,b)}
a.css(d,0);var e=0,f;a.each(function(){f=$(this).height();if(f>e)e=f});a.css(d,e);return e},GetItemActualHeight:function(a){var b=$(a).height(),c=$(a).find(".hpHro_Resize");if(c.length>0)b-=c.height();return b},AdjustUpcomingHeight:function(c,a){var d=c=="end"?":gt(0)":":lt(1)",b=this.Control.find(".hpHro_Item"+d);return this.AdjustHeight(b,a)},AdjustHeight:function(a,c){var d=this.GetItemActualHeight(a),b=a.find(".hpHro_Resize");if(!b.length){a.find(".hpHro_Text").append('<div class="hpHro_Resize"></div>');b=a.find(".hpHro_Resize")}
var e=c>d?c-d:0;this.AlignmentSwitch&&b.height(e);return a.height()},GetHeightAdjustment:function(f,e){var c=this.Control.find(".hpHro_slide").height(),d;if(f=="end")d=":gt("+(e-1)+")";else d=":lt("+e+")";var a=this.SetMinHeights(this.Control.find(".hpHro_Item"+d)),b;if(c<a)b="+="+(a-c);else b="-="+(c-a);return b},InsertItem:function(g,i){var c=this.Items[g],b,h=new Hp.Hero.Template(this.SkirtBgSrc,this.GradBgImageSrc),f=h.BuildItem(c,g,this.Control.width());if(i){this.Control.find(".hpHro_slide").prepend(f);var c=this.Control.find(".hpHro_Item:eq(0)"),d=this.Control.find(".hpHro_slide").position().left;d=d-c.outerWidth(true);this.Control.find(".hpHro_slide").css("left",d);b=c}else{this.Control.find(".hpHro_slide .hpHro_Item:last").after(f);b=this.Control.find(".hpHro_slide .hpHro_Item:last")}
$preloader=$(".hpHro_Loader",b);var a=$(b).find("img:first");if(a.length!=0)if(a[0]&&!a[0].complete){var e=function(a){$(a.target).parents(".hpHro_Item").find(".hpHro_Loader").fadeOut("500")};a.load($.proxy(e,this)).error($.proxy(e,this));$preloader.width(a.width()).height(a.height()).css({position:"absolute","z-index":"1"}).show()}else $preloader.hide();return b},BiTrack:function(e,a){var h=(new Date).getTime();if(MSCOM.BI!=undefined){if(this.BiData[a]==undefined)this.BiData[a]={next:false,prev:false,view:false};var d;if(MSCOM.BI.isIE()){d=this.Control.find(".hpHro_Item area:visible").filter(function(){return $(this).parents("map").siblings("img").is(":visible")});d=$.merge(d,this.Control.find(".hpHro_Item a:visible"))}else d=this.Control.find(".hpHro_Item a:visible,.hpHro_Item area:visible");var f=MSCOM.BI.getMergedBiData(d),b=this._BiCommonParams;if(e=="next"){var g=$.extend({},b,{initial:!this.BiData[a].next?0:1,interactiontype:4,title:"Next","-bi-description-ignore-":"hero-next-click"});MSCOM.BI.addRecordQueue(g);var c=$.extend({},b,f,{initial:!this.BiData[a].view?0:1,interactiontype:1,triggertype:4,index:a,parentindexstructure:"","-bi-description-ignore-":"hero-next-view"});setTimeout(function(){MSCOM.BI.addRecordQueue(c)},25);this.BiData[a].next=true;this.BiData[a].view=true}else if(e=="prev"){var g=$.extend({},b,{initial:!this.BiData[a].prev?0:1,interactiontype:5,title:"Prev","-bi-description-ignore-":"hero-prev-click"});MSCOM.BI.addRecordQueue(g);var c=$.extend({},b,f,{initial:!this.BiData[a].view?0:1,interactiontype:1,triggertype:5,index:a,parentindexstructure:"","-bi-description-ignore-":"hero-prev-view"});setTimeout(function(){MSCOM.BI.addRecordQueue(c)},25);this.BiData[a].prev=true;this.BiData[a].view=true}else if(e=="stop"){var c=$.extend({},b,{interactiontype:7,parentindexstructure:a,title:"Stop","-bi-description-ignore-":"hero-stop"});MSCOM.BI.addRecordQueue(c)}else if(e=="play"){var c=$.extend({},b,{interactiontype:8,parentindexstructure:a,title:"Start","-bi-description-ignore-":"hero-play"});MSCOM.BI.addRecordQueue(c)}else if(e=="autonext")if(!this.BiData[a].autonext){var c=$.extend({},b,f,{initial:!this.BiData[a].view?0:1,interactiontype:1,index:a,title:"AutoNext","-bi-description-ignore-":"hero-autonext"});MSCOM.BI.addRecordQueue(c);this.BiData[a].view=true;this.BiData[a].autonext=true}}}};Hp.Hero.Template=function(b,a){this.SkirtBgSrc=b;this.GradBgImageSrc=a};Hp.Hero.Template.prototype={BuildItem:function(b,c,d){var a='<div class="hpHro_Item" style="width:{width}px;" index="{index}" bi:index="{index}" bi:type="infotem">{item.Image}<div class="hpHro_Loader"></div>{item.Text}</div>';a=a.replace(/{width}/g,d);a=a.replace(/{index}/g,c);a=a.replace(/{item.Image}/g,this.BuildImage(b.Image));return a.replace(/{item.Text}/g,this.BuildInfoItem(b.Text))},BuildImage:function(b){if(!b)return"";var a='<img alt="{image.Alt}" src="{image.Src}" {image.UseMap} width="{image.Width}" height="{image.Height}" class="hpImage_Img"/>{image.ImageMap}',c="hero_"+(new Date).getTime();if(b.HasOffset){a='<span class="hpImage_Clip" style="{image.clipstyle}"><img src="{image.Src}" alt="{image.Alt}" width="{image.Width}" height="{image.Height}" {image.UseMap} class="hpImage_Img" style="{image.offsetstyle}"/>{image.ImageMap}</span>';a=a.replace(/{image.clipstyle}/g,"width:"+b.ClipWidth+"px;height:"+b.ClipHeight+"px;");a=a.replace(/{image.offsetstyle}/g,"top:"+b.TopOffset+"px;left:"+b.LeftOffset+"px;")}
if(b&&b.Link&&b.Link.Href){a='<a href="{image.Url}" {bi.Attr}><img alt="{image.Alt}" src="{image.Src}"  width="{image.Width}" height="{image.Height}" {image.UseMap}/>{image.ImageMap}</a>';a=a.replace(/{image.Url}/g,b.Link.Href);a=a.replace(/{bi.Attr}/g,this.GetBiAttributes(b.Link.Bi))}
a=a.replace(/{image.UseMap}/g,b.IsImageMap?'usemap="#'+c+'"':"");a=a.replace(/{image.ImageMap}/g,this.BuildImageMap(b,c));a=a.replace(/{image.Src}/g,b.Src);a=a.replace(/{image.Width}/g,b.Width);a=a.replace(/{image.Height}/g,b.Height);return a.replace(/{image.Alt}/g,MSCOM.Helper.htmlAttrEncode(b.Alt))},BuildInfoItem:function(b){var a='<div class="hpHro_Text">{hero.GradBg}{infoItem.Title}{infoItem.Description}{infoItem.CallToAction}{hero.SkirtBg}</div>';a=a.replace(/{infoItem.Title}/g,this.BuildText(b.Title,"h3",'bi:titleflag="item" bi:title="item"'));a=a.replace(/{infoItem.Description}/g,this.BuildText(b.Description,"p"));if(this.SkirtBgSrc)a=a.replace(/{hero.SkirtBg}/g,'<div class="hpHro_TextBg"><img src="'+this.SkirtBgSrc+'" height="100%" width="100%"/>');else a=a.replace(/{hero.SkirtBg}/g,'<div class="hpHro_TextBg"></div>');if(this.GradBgImageSrc)a=a.replace(/{hero.GradBg}/g,'<div class="hpHro_TextGradBg"><img src="'+this.GradBgImageSrc+'" height="60" width="100%"/></div>');else a=a.replace(/{hero.GradBg}/g,"");return a.replace(/{infoItem.CallToAction}/g,this.BuildText(b.CallToAction,"a",'bi:parenttitle="item" bi:type="cta"',true))},BuildText:function(b,e,c,d){var a="<{tag} {bi.misc} >{text.Value}</{tag}>";if(b.Link&&b.Link.Href){a='<a href="{text.Link.Href}" {bi.attr} {bi.misc}>{text.Value}</a>';if(d)a=a.replace(/{text.Value}/g,'<span class="hpFeat_Text">{text.Value}</span><span class="hpFeat_Arrow">&#155;</span>');a=a.replace(/{text.Link.Href}/g,b.Link.Href);a=a.replace(/{bi.attr}/g,this.GetBiAttributes(b.Link.Bi))}else a=a.replace(/{tag}/g,e);a=a.replace(/{bi.misc}/g,c);return a.replace(/{text.Value}/g,MSCOM.Helper.htmlEncode(b.Value))},BuildImageMap:function(b,c){if(!b.IsImageMap)return"";var a='<map id="{imagemap.id}" name="{imagemap.id}" >{imagemap.Area}</Map>';a=a.replace(/{imagemap.id}/g,c);return a.replace(/{imagemap.Area}/g,this.BuildImageMapAreas(b.ImageMap.Areas))},BuildImageMapAreas:function(c){for(var d="",b=0,e=c.length;b<e;b++){var a='<area {area.shape} {area.coords} href="{area.href}" {area.class} {area.target} {area.alt} {area.tabindex} {bi.attr} />';a=a.replace(/{area.shape}/g,c[b].Shape?'shape="'+c[b].Shape+'"':"");a=a.replace(/{area.coords}/g,c[b].Coords?'coords="'+c[b].Coords+'"':"");a=a.replace(/{area.href}/g,c[b].Link.Href?c[b].Link.Href:"");a=a.replace(/{area.class}/g,c[b].CssClass?'class="'+c[b].CssClass+'"':"");a=a.replace(/{area.target}/g,c[b].Target?'target="'+c[b].Target+'"':"");a=a.replace(/{area.alt}/g,c[b].Alt?'alt="'+MSCOM.Helper.htmlAttrEncode(c[b].Alt)+'"':"");a=a.replace(/{area.tabindex}/g,c[b].TabIndex?'tabindex="'+c[b].TabIndex+'"':"");a=a.replace(/{bi.attr}/g,this.GetBiAttributes(c[b].Link.Bi));d+=a}
return d},GetBiAttributes:function(a){if(!a||!a.Data)return"";for(var c=[],b=0;b<a.Data.length;b++)c.push("bi:"+a.Data[b].Key.toLowerCase()+'="'+a.Data[b].Value+'"');return c.join(" ")}}
if(typeof window.Hp=="undefined")window.Hp={};if(typeof window.Hp.Accordion=="undefined")window.Hp.Accordion={logenabled:false,isInitialized:false,isIE:function(){return navigator.appVersion.indexOf("MSIE")!=-1},init:function(){if(this.isInitialized)return;this.isInitialized=true;$(".hpAcc a.hpAccTitle").live("click",function(){var e=$(this),a=$(this).parents(".hpAcc");$parentLi=$(this).closest("li");$siblingLiOpen=$parentLi.siblings("li.hpAcc_ListOpen");$currentToggle=$(this).parent().next();if(a.hasClass("hpAcc_Animating"))return false;if(a.find(":animated").length>0)return false;var k=Hp.Accordion.getContainerHeightData(a);a.addClass("hpAcc_Animating");var h=k.baseH,b=!$parentLi.hasClass("hpAcc_ListOpen")?$currentToggle.innerHeight():0,d=!$parentLi.hasClass("hpAcc_ListOpen")?$siblingLiOpen.find(".hpAccDetail:first").innerHeight():$currentToggle.innerHeight(),c=h+b;a.data("cheight",c);a.data("bheight",k.baseH);a.data("liheight",b);var g=$(this).closest(".hpGrd_Cell").find(":animated").length>0;if($currentToggle.is(":visible")){$(this).trigger("GridResize",[c,d]);if($.browser.msie&&parseInt($.browser.version)<7){$currentToggle.hide();a.removeClass("hpAcc_Animating");Hp.Accordion.bitrack(e,"close")}else $currentToggle.slideUp(d,function(){a.removeClass("hpAcc_Animating");Hp.Accordion.bitrack(e,"close");g&&e.trigger("GridResize",[c,200])})}else{var f=b>d?b:d;f=b+d;$(this).trigger("GridResize",[c,f]);var j=a.find(".hpLst_body"),i=j.height(),l=i+b-d;if($.browser.msie&&parseInt($.browser.version)<7){$siblingLiOpen.removeClass("hpAcc_ListOpen");$siblingLiOpen.find(".hpAccTitle").removeClass("hpAccTitleOpen");$siblingLiOpen.find(".hpAccDetail").hide();$currentToggle.show();Hp.Accordion.bitrack(e,"open",$currentToggle);a.removeClass("hpAcc_Animating")}else{j.css({height:i,overflow:"hidden"}).animate({height:l},{duration:f,complete:function(){$(this).css({overflow:"",height:""});Hp.Accordion.bitrack(e,"open",$currentToggle);$siblingLiOpen.stop(true,true);$currentToggle.stop(true,true);a.removeClass("hpAcc_Animating");if(b!=$currentToggle.innerHeight()){b=$currentToggle.innerHeight();c=h+b;a.data("liheight",b);a.data("cheight",c);e.trigger("GridResize",[c,200])}else g&&e.trigger("GridResize",[c,200])}});$siblingLiOpen.removeClass("hpAcc_ListOpen");$siblingLiOpen.find(".hpAccTitle").removeClass("hpAccTitleOpen");$siblingLiOpen.find(".hpAccDetail").slideUp(d);$currentToggle.slideDown(b,function(){})}
$siblingLiOpen.length>0&&Hp.Accordion.bitrack($siblingLiOpen.find(".hpAccTitle"),"close")}
$parentLi.toggleClass("hpAcc_ListOpen");$(this).toggleClass("hpAccTitleOpen");return false})},getContainerHeightData:function(b){var a={baseH:0,openliH:0,height:0,adj:0};a.height=b.outerHeight();a.adj=b.find(".hpLst_Resize").outerHeight();a.adj=a.adj?a.adj:0;a.height=a.height-a.adj;a.openliH=$("li.hpAcc_ListOpen .hpAccDetail",b).outerHeight();a.baseH=a.height-a.openliH;if(b.hasClass("hpAcc_Animating")||b.find(":animated").length>0){a.height=parseInt(b.data("cheight"));a.baseH=parseInt(b.data("bheight"));a.openliH=parseInt(b.data("liheight"))}
a.height=a.height!=a.baseH+a.openliH?a.baseH+a.openliH:a.height;return a},bitrack:function(a,g,e){var b={},c={};if(a.data("bicache")==undefined){b={title:$.trim(a.text()),parenttitlestructure:MSCOM.BI.getNestedTitleStructure(a,null,true)};$.extend(b,MSCOM.BI.additionalParams,MSCOM.BI.getNestedIndexGridTypeStructure(a));a.data("bicache",b)}else b=a.data("bicache");if(e&&a.data("bimerged")==undefined){c=MSCOM.BI.getMergedBiData(e.find("a,area"));a.data("bimerged",c)}else if(a.data("bimerged")!=undefined)c=a.data("bimerged");if(g=="open"){var d=$.extend({},b,{initial:a.data("biaccopen")!==undefined?a.data("biaccopen"):0,interactiontype:9,index:b.parentindexstructure,parentindexstructure:"","-bi-description-ignore-":"accordion-open"});MSCOM.BI.addRecordQueue(d);a.data("biaccopen",1);var f=b.parenttitlestructure.split(";");f.push(b.title);var h=$.extend({},b,c,{initial:a.data("biaccview")!==undefined?a.data("biaccview"):0,interactiontype:1,triggertype:9,index:"",parenttitlestructure:f.join(";"),title:"","-bi-description-ignore-":"accordion-view"});MSCOM.BI.addRecordQueue(h);a.data("biaccview",1)}else if(g=="close"){var d=$.extend({},b,{initial:a.data("biaccclose")!==undefined?a.data("biaccclose"):0,interactiontype:10,index:b.parentindexstructure,parentindexstructure:"","-bi-description-ignore-":"accordion-close"});a.data("biaccclose",1);a.data("biaccview",1);MSCOM.BI.addRecordQueue(d)}},resize:function(b,g,c){var e=this.getContainerHeightData(b),a=b.find(".hpLst_Resize");c=c||200;if(!a.length){b.find(".hpLst_body").after('<div class="hpLst_Resize"></div>');a=b.find(".hpLst_Resize")}
var d=g-e.height,f=a.height();d!=f&&a.stop(true,true).animate({height:d},c)},log:function(a){if(this.logenabled)try{console.log(a)}catch(b){}}}
if(typeof window.Hp=="undefined")window.Hp={};Hp.Carousel=function(c,a,b){this.Control=$("#"+c);this._AnimateSpeed=a;this._SwitchDelay=7e3;this._MoveMinPixles=a;this.Categories=[];this.InitialCategory;this.CurrentCategory;this.CurrentItems=[];this._FeedUrl=b;this.SeenCampaignIds=[];this.TitleCID="";this.SetMinHeights(this.Control.find(".hpCrs_Item"));$($.proxy(this.LoadJson,this));this.BiData={}};Hp.Carousel.prototype={LoadJson:function(){this.Control.find("a").unbind("click").unbind("mousedown");this.CurrentCategory=parseInt(this.Control.find(".hpCrs_Cat_Current").attr("index"));if(isNaN(this.CurrentCategory))this.CurrentCategory=0;this.InitialCategory=this.CurrentCategory;$.ajax({url:this._FeedUrl,success:$.proxy(this.JsonSuccess,this),cache:true,dataType:"json"})},JsonSuccess:function(b){if(b!=null){this.Categories=b;for(var a=0;a<this.Control.find(".hpCrs_Item").size();a++)this.CurrentItems[a]=a;this.init()}},init:function(){this.BindInteractionEvents();this.Categories[this.CurrentCategory].Items.length>1&&this.SetButtonsVisibility();$.browser.msie&&$.browser.version<7&&this.Control.find("a.hpCrs_Next, a.hpCrs_Prev").hover(function(){$(this).find("img").addClass("hpCrs_Hover")},function(){$(this).find("img").removeClass("hpCrs_Hover")});for(var e=this.Control.find(".hpCrs_Item").size(),f=[],d=[],b=0;b<e;b++){var g=this.Categories[this.CurrentCategory].Items[b];this.SetCIDSeenList(g,f,d)}
var c=this,a=window.attachEvent?"click":"mousedown";this.Control.find(".hpCrs_ItemFooter a").live(a,$.proxy(this.BiLinkOverride,this));this.Control.find(".hpCrs_Footer a").live(a,$.proxy(this.BiLinkOverride,this));this.Control.find(".hpCrs_slide a").live(a,$.proxy(this.BiLinkOverride,this));this.Control.find(".hpCrs_slide area").live(a,$.proxy(this.BiLinkOverride,this));this.BiData[this.CurrentCategory]={click:false,view:true,items:{}};this.Control.find(".hpCrs_Item").each(function(){try{c.BiData[c.CurrentCategory].items[$(this).attr("index")]={view:true,clknext:false,clkprev:false}}catch(a){MSCOM.BI.log(a)}})},BiLinkOverride:function(b){if(MSCOM&&MSCOM.BI){MSCOM.BI.log("BiLinkOverride"+b.currentTarget);var a=MSCOM.BI.getLinkBiParams(b.currentTarget,b.target),c=a.parentindexstructure.split(";").reverse();c.push(this.CurrentCategory);a.parentindexstructure=c.reverse().join(";");MSCOM.BI.record(a)}},BiCatTrack:function(d,a){if(MSCOM.BI==undefined)return false;var c;if(MSCOM.BI.isIE()){c=this.Control.find(".hpCrs_Item area:visible").filter(function(){return $(this).parents("map").siblings("img").is(":visible")});c=$.merge(c,this.Control.find(".hpCrs_Item a:visible,.hpCrs_ItemFooter a:visible"))}else c=this.Control.find(".hpCrs_Item a:visible,.hpCrs_Item area:visible,.hpCrs_ItemFooter a:visible");var g=MSCOM.BI.getMergedBiData(c),b={};if(this.BiData[a]==undefined)this.BiData[a]={click:false,view:false,items:{}};try{b.parenttitlestructure=MSCOM.BI.getNestedTitleStructure(d,null,true);$.extend(b,MSCOM.BI.getNestedIndexGridTypeStructure(d),MSCOM.BI.additionalParams,MSCOM.BI.getBiData(d))}catch(i){}
var e=$.extend({},b,{initial:!this.BiData[a].click?0:1,interactiontype:6,parentindexstructure:"",title:$.trim($(d).text()),index:a,"-bi-description-ignore-":"carousel-category-click"});MSCOM.BI.addRecordQueue(e);var f=b.parenttitlestructure.split(";");f.push(e.title);var h=$.extend({},b,g,{initial:!this.BiData[a].view?0:1,interactiontype:1,triggertype:6,parentindexstructure:a,title:"",parenttitlestructure:f.join(";"),index:"","-bi-description-ignore-":"carousel-category-view"});MSCOM.BI.addRecordQueue(h);this.BiData[a].view=true;this.BiData[a].click=true},BiPrevNextTrack:function(l,f,b,d){if(MSCOM.BI==undefined)return false;if(this.BiData[f]==undefined)this.BiData[f]={click:false,view:false,items:{}};var g;if(MSCOM.BI.isIE()){g=this.Control.find(".hpCrs_Item area:visible").filter(function(){return $(this).parents("map").siblings("img").is(":visible")});g=$.merge(g,this.Control.find(".hpCrs_Item a:visible"))}else g=this.Control.find(".hpCrs_Item a:visible,.hpCrs_Item area:visible");for(var e={},i=MSCOM.BI.getMergedBiData(g),c={view:true,clknext:true,clkprev:true},a=0;a<b.length;a++)if(this.BiData[this.CurrentCategory].items[b[a]]==undefined){this.BiData[this.CurrentCategory].items[b[a]]={view:false,clknext:false,clkprev:false};c.clknext=false;c.clkprev=false}else{if(!this.BiData[this.CurrentCategory].items[b[a]].clknext)c.clknext=false;if(!this.BiData[this.CurrentCategory].items[b[a]].clkprev)c.clkprev=false}
for(var a=0;a<d.length;a++)if(this.BiData[this.CurrentCategory].items[d[a]]==undefined){this.BiData[this.CurrentCategory].items[d[a]]={view:false,clknext:false,clkprev:false};c.view=false}else if(!this.BiData[this.CurrentCategory].items[d[a]].view)c.view=false;try{var k=this.Control.find(".hpCrs_Item:first");e.parenttitlestructure=MSCOM.BI.getNestedTitleStructure(k,null,true);$.extend(e,MSCOM.BI.getNestedIndexGridTypeStructure(k),MSCOM.BI.additionalParams)}catch(m){}
if(l=="next"){var h=$.extend({},e,{initial:!c.clknext?0:1,interactiontype:4,parentindexstructure:f,title:"Next",index:b.sort().join(";"),"-bi-description-ignore-":"carousel-next-click"});MSCOM.BI.addRecordQueue(h);var j=$.extend({},e,i,{initial:!c.view?0:1,interactiontype:1,triggertype:4,parentindexstructure:f,title:"",index:d.sort().join(";"),"-bi-description-ignore-":"carousel-next-view"});MSCOM.BI.addRecordQueue(j);for(var a=0;a<b.length;a++)this.BiData[this.CurrentCategory].items[b[a]].clknext=true}else if(l=="prev"){var h=$.extend({},e,{initial:!c.clknext?0:1,interactiontype:5,parentindexstructure:f,title:"Prev",index:b.sort().join(";"),"-bi-description-ignore-":"carousel-prev-click"});MSCOM.BI.addRecordQueue(h);var j=$.extend({},e,i,{initial:!c.view?0:1,interactiontype:1,triggertype:5,parentindexstructure:f,title:"",index:d.sort().join(";"),"-bi-description-ignore-":"carousel-prev-view"});MSCOM.BI.addRecordQueue(j);for(var a=0;a<b.length;a++)this.BiData[this.CurrentCategory].items[b[a]].clkprev=true}
for(var a=0;a<d.length;a++)this.BiData[this.CurrentCategory].items[d[a]].view=true},BindInteractionEvents:function(){this.Control.find(".hpCrs_Controls a.hpCrs_Next, .hpCrs_Controls a.hpCrs_Prev, .hpCrs_Categories a").die("click");this.Control.find(".hpCrs_Controls a.hpCrs_Next").click($.proxy(this.Next,this));this.Control.find(".hpCrs_Controls a.hpCrs_Prev").click($.proxy(this.Prev,this));this.Control.find(".hpCrs_Categories a").click($.proxy(this.SwitchCategory,this))},UnbindInteractionEvents:function(){this.Control.find(".hpCrs_Controls a.hpCrs_Next, .hpCrs_Controls a.hpCrs_Prev, .hpCrs_Categories a").unbind("click");this.Control.find(".hpCrs_Controls a.hpCrs_Next, .hpCrs_Controls a.hpCrs_Prev, .hpCrs_Categories a").live("click",function(a){a.preventDefault()})},FreezeHeight:function(){this.Control.find(".hpCrs_slide").css("height",this.Control.find(".hpCrs_slide").height())},UnfreezeHeight:function(){this.Control.find(".hpCrs_slide").css("height","auto")},SetButtonsVisibility:function(){if(this.CurrentItems.length<this.Categories[this.CurrentCategory].Items.length)this.Control.find(".hpCrs_Controls_Buttons").fadeIn(500);else this.Control.find(".hpCrs_Controls_Buttons").fadeOut(500)},SwitchCategory:function(c){c.preventDefault();this.UnbindInteractionEvents();this.FreezeHeight();this.Control.find(".hpCrs_Categories li a.hpCrs_Cat_Current").removeAttr("bi:title").parent().removeClass("hpCrs_Cat_Selected");this.Control.find(".hpCrs_Categories li a").removeClass("hpCrs_Cat_Current");this.CurrentCategory=parseInt($(c.target).closest("a").addClass("hpCrs_Cat_Current").attr("index"));this.Control.find(".hpCrs_Categories li a.hpCrs_Cat_Current").attr("bi:title","itemcat").parent().addClass("hpCrs_Cat_Selected");for(var b=this.Control.find(".hpCrs_Item").size(),f=0,d=0;d<b;d++)f+=this.Control.find(".hpCrs_Item:eq("+d+")").outerWidth(true);var e=0,a=0,o=[],l=[];while(e<=this.Control.width()&&a<this.Categories[this.CurrentCategory].Items.length){this.InsertItem(a,false,"end");var p=this.Categories[this.CurrentCategory].Items[a];this.SetCIDSeenList(p,o,l);var h=this.Control.find(".hpCrs_Item:last");e+=h.outerWidth(true);a++;this.FixContentIE6(h)}
var q=this.Categories[this.CurrentCategory].title,k=this.GetHeightAdjustment("end",b),i=this.Categories[this.CurrentCategory].Header;this.Control.find(".hpCrs_ItemFooter").empty();if(typeof i=="undefined")this.Control.find(".hpCrs_ItemFooter").hide();else{var n=new Hp.InfoItem.Template,g=n.BuildItem(i);if($.trim(g)!=""){this.Control.find(".hpCrs_ItemFooter").append(g);this.Control.find(".hpCrs_ItemFooter").slideDown()}else this.Control.find(".hpCrs_ItemFooter").slideUp()}
var m=c,j=function(){this.RemoveItemsFromStart(b);this.SetButtonsVisibility();try{this.BiCatTrack(m.currentTarget,this.CurrentCategory)}catch(a){}};this.Control.find(".hpCrs_slide").animate({left:"-="+f,height:k},this._AnimateSpeed,$.proxy(j,this))},Next:function(){if(this.isBusy())return false;this.UnbindInteractionEvents();this.FreezeHeight();var i=[],d=[],c=0,f=0,a=this.CurrentItems[0];while(f<this._MoveMinPixles&&c<this.Categories[this.CurrentCategory].Items.length){i.push(a);f+=this.Categories[this.CurrentCategory].Items[a].Layout.Width+1;c++;a++;if(a>=this.Categories[this.CurrentCategory].Items.length)a=0}
for(var h=0,b=0;b<c;b++)h+=this.Control.find(".hpCrs_Item:eq("+b+")").outerWidth(true);for(var e=0,b=c;b<this.CurrentItems.length;b++){d.push(b);e+=this.Control.find(".hpCrs_Item:eq("+b+")").outerWidth(true)}
var g=0,a=this.CurrentItems[this.CurrentItems.length-1],n=[],m=[];while(g+e<=this.Control.width()){a++;if(a>=this.Categories[this.CurrentCategory].Items.length)a=0;d.push(a);this.InsertItem(a,false,"end");var j=this.Control.find(".hpCrs_Item:last");g+=j.outerWidth(true);var o=this.Categories[this.CurrentCategory].Items[a];this.SetCIDSeenList(o,n,m);this.FixContentIE6(j)}
var p=this.Categories[this.CurrentCategory].title,l=this.GetHeightAdjustment("end",c),k=function(){this.RemoveItemsFromStart(c);try{this.BiPrevNextTrack("next",this.CurrentCategory,i,d)}catch(a){MSCOM.BI.log(a)}};this.Control.find(".hpCrs_slide").animate({left:"-="+h,height:l},this._AnimateSpeed,$.proxy(k,this))},SetCIDSeenList:function(a,c,b){if(a.text!=null)if(a.text.title!=null)if(a.text.title.campaignId!=null){var g=a.text.title.campaignId;this.SetCIDSeenListItem(g,c,b)}
if(a.image!=null)if(a.image.campaignId!=null){var f=a.image.campaignId;this.SetCIDSeenListItem(f,c,b)}
if(a.text!=null)if(a.text.primaryAction!=null)if(a.text.primaryAction.campaignId!=null){var d=a.text.primaryAction.campaignId;this.SetCIDSeenListItem(d,c,b)}
if(a.actions!=null)for(i in a.text.actions)if(a.text.actions[i].campaignId!=null){var e=a.text.actions[i].campaignId;this.SetCIDSeenListItem(e,c,b)}},SetCIDSeenListItem:function(a,c,b){var d=this.ItemCIDSeen(a);if(jQuery.inArray(a,b)==-1&&jQuery.inArray(a,c)==-1)if(d)c[c.length]=a;else b[b.length]=a},Prev:function(){if(this.isBusy())return false;this.UnbindInteractionEvents();this.FreezeHeight();var h=[],e=[],c=0,g=0,a=this.CurrentItems[this.CurrentItems.length-1];while(g<this._MoveMinPixles&&c<this.Categories[this.CurrentCategory].Items.length){h.push(a);g+=this.Categories[this.CurrentCategory].Items[a].Layout.Width+1;c++;a--;if(a<0)a=this.Categories[this.CurrentCategory].Items.length-1}
for(var l=0,b=this.CurrentItems.length-c;b<this.CurrentItems.length;b++)l+=this.Control.find(".hpCrs_Item:eq("+b+")").outerWidth(true);for(var f=0,b=0;b<this.CurrentItems.length-c;b++){e.push(b);f+=this.Control.find(".hpCrs_Item:eq("+b+")").outerWidth(true)}
var d=0,a=this.CurrentItems[0],n=[],m=[];while(d+f<=this.Control.width()){a--;if(a<0)a=this.Categories[this.CurrentCategory].Items.length-1;e.push(a);this.InsertItem(a,true,"start");var i=this.Control.find(".hpCrs_Item:first");d+=i.outerWidth(true);var o=this.Categories[this.CurrentCategory].Items[a];this.SetCIDSeenList(o,n,m);this.FixContentIE6(i)}
var p=this.Categories[this.CurrentCategory].title,k=this.GetHeightAdjustment("start",c),j=function(){this.RemoveItemsFromEnd(c);this.BiPrevNextTrack("prev",this.CurrentCategory,h,e)};this.Control.find(".hpCrs_slide").animate({left:"+="+d,height:k},this._AnimateSpeed,$.proxy(j,this))},isBusy:function(){return this.Control.find(":animated").length>0},RemoveItemsFromStart:function(b){for(var a=0;a<b;a++)this.RemoveItem(0,"start");this.Control.find(".hpCrs_slide").css("left",0);this.UnfreezeHeight();this.BindInteractionEvents()},RemoveItemsFromEnd:function(b){for(var a=0;a<b;a++)this.RemoveItem(this.CurrentItems.length-1,"end");this.Control.find(".hpCrs_slide").css("left",0);this.UnfreezeHeight();this.BindInteractionEvents()},RemoveItem:function(d,c){if(c=="end")this.CurrentItems.pop();else this.CurrentItems.shift();var b=this.Control.find(".hpCrs_Item:eq("+d+")"),a=this.Control.find(".hpCrs_slide").position().left;a=a+b.outerWidth(true);this.Control.find(".hpCrs_slide").css("left",a);b.remove()},SetMinHeights:function(a){var d=$.browser.msie&&$.browser.version==6?"height":"min-height";a.find(".hpFeat_FeatureItemContent").css(d,0).css("height","auto");var b=0,c,g="";a.each(function(){g+=$(this).find(".hpFeat_FeatureItemContent").text();c=$(this).find(".hpFeat_FeatureItemContent").innerHeight();if(c>b)b=c});if(g.length==0)a.find(".hpFeat_FeatureItemContent").css("height",0);else a.find(".hpFeat_FeatureItemContent").css(d,b);a.find(".hpFeat_FeatureItem h4").css(d,0);var b=0,c;a.each(function(){c=$(this).find(".hpFeat_FeatureItem h4").height();if(c>b)b=c});a.find(".hpFeat_FeatureItem h4").css(d,b);a.find(".hpCrs_Incent").css(d,0);var b=0,c;a.each(function(){c=$(this).find(".hpCrs_Incent").height();if(c>b)b=c});a.find(".hpCrs_Incent").css(d,b);a.css(d,0);var e=0,f;a.each(function(){f=$(this).height();if(f>e)e=f});a.css(d,e);return e},GetHeightAdjustment:function(f,e){var c=this.Control.find(".hpCrs_slide").height(),d;if(f=="end")d=":gt("+(e-1)+")";else d=":lt("+(this.CurrentItems.length-e)+")";var a=this.SetMinHeights(this.Control.find(".hpCrs_Item"+d)),b;if(c<a)b="+="+(a-c);else b="-="+(c-a);return b},InsertItem:function(a,f,g){if(g=="end")this.CurrentItems.push(a);else this.CurrentItems.unshift(a);var d=this.Categories[this.CurrentCategory].Items[a],e=new Hp.Carousel.Template,c=e.BuildItem(d,a);if(f){this.Control.find(".hpCrs_slide").prepend(c);var d=this.Control.find(".hpCrs_Item:eq(0)"),b=this.Control.find(".hpCrs_slide").position().left;b=b-d.outerWidth(true);this.Control.find(".hpCrs_slide").css("left",b)}else this.Control.find(".hpCrs_slide .hpCrs_Item:last").after(c)},ItemCIDSeen:function(a){var b=false,b=jQuery.inArray(a,this.SeenCampaignIds)>-1;if(!b)this.SeenCampaignIds[this.SeenCampaignIds.length]=a;return b},FixContentIE6:function(a){$.browser.msie&&parseInt($.browser.version)<7&&a.find("*").each(function(e,d){var a=$(d),b=a.css("float"),c=a.attr("style");if(b&&b!=="none"){a.css("float",b);(!c||c.indexOf("float:")==-1)&&a.css("float","")}})}};Hp.Carousel.Template=function(){};Hp.Carousel.Template.prototype={BuildItem:function(b,d){var a='<div class="hpCrs_Item" style="width:{item.Layout.Width}px;" index="{index}" bi:index="{index}">{item.Item}</div>';a=a.replace(/{index}/g,d);a=a.replace(/{item.Layout.Width}/g,b.Layout.Width-20);var c=new Hp.FeatureItem.Template;return a.replace(/{item.Item}/g,c.BuildItem(b.Item))}};Hp.InfoItem=function(){};Hp.InfoItem.Template=function(){this.FeatureItem=new Hp.FeatureItem.Template};Hp.InfoItem.Template.prototype={BuildItem:function(b){if(!b)return"";var a="{item.description}{item.cta}";a=a.replace(/{item.description}/g,this.BuildDescription(b.Description));a=a.replace(/{item.cta}/g,this.BuildCta(b.CallToAction));return a},BuildDescription:function(a){if(!a)return"";var b='<p class="hpFeat_Wrap" >{text}</p>';return b.replace(/{text}/g,MSCOM.Helper.htmlEncode(a.Value))},BuildCta:function(b){if(!b)return"";var a='<div class="hpFeat_Wrap">{title}</div>';if(b.Link){a='<div class="hpFeat_Wrap" bi:parenttitle="item"><a class="hpFeat_Link Arrow" href="{title.Link}" {bi.attr} >{title}</a></div>';a=a.replace(/{title.Link}/g,b.Link.Href);a=a.replace(/{bi.attr}/g,this.FeatureItem.GetBiAttributes(b.Link.Bi))}
a=a.replace(/{title}/g,MSCOM.Helper.htmlEncode(b.Value));return a}};Hp.FeatureItem=function(){};Hp.FeatureItem.Template=function(){};Hp.FeatureItem.Template.prototype={BuildItem:function(b){var a='<div class="hpFeat_FeatureItem {item.ImagePosition}" bi:type="hpfeatureitem">{item.Image}{item.Text}<div class="cssClear"></div></div>';a=a.replace(/{item.Image}/g,this.BuildImage(b.Image));a=a.replace(/{item.Text}/g,this.BuildText(b));return a.replace(/{item.ImagePosition}/g,this.GetPosition(b.ImagePosition))},BuildImage:function(b,d){if(!b)return"";var a='<img src="{image.Src}" alt="{image.Alt}" width="{image.Width}" height="{image.Height}" {image.UseMap} class="hpImage_Img"/>{image.ImageMap}';if(b.HasOffset){a='<span class="hpImage_Clip" style="{image.clipstyle}"><img src="{image.Src}" alt="{image.Alt}" width="{image.Width}" height="{image.Height}" {image.UseMap} class="hpImage_Img" style="{image.offsetstyle}"/>{image.ImageMap}</span>';a=a.replace(/{image.clipstyle}/g,"width:"+b.ClipWidth+"px;height:"+b.ClipHeight+"px;");a=a.replace(/{image.offsetstyle}/g,"top:"+b.TopOffset+"px;left:"+b.LeftOffset+"px;")}
var c="carsl_"+(new Date).getTime();if(b&&b.Link&&b.Link.Href){a='<a href="{image.Url}" {bi.Attr} class="hpImage_Link">'+a+"</a>";a=a.replace(/{image.Url}/g,b.Link.Href);a=a.replace(/{bi.Attr}/g,this.GetBiAttributes(b.Link.Bi))}
a=a.replace(/{image.UseMap}/g,b.IsImageMap?'usemap="#'+c+'"':"");a=a.replace(/{image.ImageMap}/g,this.BuildImageMap(b,c));a=a.replace(/{image.Src}/g,b.Src);a=a.replace(/{image.Width}/g,b.Width);a=a.replace(/{image.Height}/g,b.Height);if(!d)a='<div class="hpFeat_ImageContainer" bi:parenttitle="item">'+a+"</div>";return a.replace(/{image.Alt}/g,MSCOM.Helper.htmlAttrEncode(b.Alt))},BuildImageMap:function(b,c){if(!b.IsImageMap)return"";var a='<map id="{imagemap.id}" name="{imagemap.id}" >{imagemap.Area}</Map>';a=a.replace(/{imagemap.id}/g,c);return a.replace(/{imagemap.Area}/g,this.BuildImageMapAreas(b.ImageMap.Areas))},BuildImageMapAreas:function(c){for(var d="",b=0,e=c.length;b<e;b++){var a='<area {area.shape} {area.coords} href="{area.href}" {area.class} {area.target} {area.alt} {area.tabindex} {bi.attr} />';a=a.replace(/{area.shape}/g,c[b].Shape?'shape="'+c[b].Shape+'"':"");a=a.replace(/{area.coords}/g,c[b].Coords?'coords="'+c[b].Coords+'"':"");a=a.replace(/{area.href}/g,c[b].Link.Href?c[b].Link.Href:"");a=a.replace(/{area.class}/g,c[b].CssClass?'class="'+c[b].CssClass+'"':"");a=a.replace(/{area.target}/g,c[b].Target?'target="'+c[b].Target+'"':"");a=a.replace(/{area.alt}/g,c[b].Alt?'alt="'+MSCOM.Helper.htmlAttrEncode(c[b].Alt)+'"':"");a=a.replace(/{area.tabindex}/g,c[b].TabIndex?'tabindex="'+c[b].TabIndex+'"':"");a=a.replace(/{bi.attr}/g,this.GetBiAttributes(c[b].Link.Bi));d+=a}
return d},BuildText:function(b){if(!b)return"";var a='<div class="hpFeat_ItemContainer"{style} bi:title="item">{item.Title}{item.Description}{item.List}{item.Caption}{item.Incentive}{item.PrimaryCallsToAction}{item.SecondaryCallsToAction}</div>',c="";if(b.ImagePosition=="left"){var d=b&&b.Image&&b.Image.Width?parseInt(b.Image.Width)+20:"0";c='style="margin-left:'+d+'px"'}
a=a.replace(/{style}/g,c);a=a.replace(/{item.Title}/g,this.BuildTitle(b.Title));a=a.replace(/{item.Description}/g,this.BuildDescription(b.Description));a=a.replace(/{item.List}/g,this.BuildList(b.List));a=a.replace(/{item.Caption}/g,this.BuildCaption(b.Caption));a=a.replace(/{item.Incentive}/g,this.BuildIncentives(b.Incentive));a=a.replace(/{item.PrimaryCallsToAction}/g,this.BuildCallsToAction(b.PrimaryCallsToAction,"PrimaryCta"));a=a.replace(/{item.SecondaryCallsToAction}/g,this.BuildCallsToAction(b.SecondaryCallsToAction,"SecondaryCta"));return a},GetPosition:function(a){return"hpFeat_Pos-"+a},GetBiAttributes:function(a){if(!a||!a.Data)return"";for(var c=[],b=0;b<a.Data.length;b++)c.push("bi:"+a.Data[b].Key.toLowerCase()+'="'+a.Data[b].Value+'"');return c.join(" ")},BuildTitle:function(b){if(!b)return"";var a='<h5 bi:titleflag="item" bi:title="item" class="hpFeat_Wrap hpFeat_Title hpFeat_Item">{title}{trailingicon}</h5>';if(b.Link){a='<h5 class="hpFeat_Wrap hpFeat_Title hpFeat_Item"  bi:titleflag="item" bi:title="item"><a href="{title.link}" {bi.attr} bi:type="title">{title}</a>{trailingicon}</h5>';a=a.replace(/{title.link}/g,b.Link.Href);a=a.replace(/{bi.attr}/g,this.GetBiAttributes(b.Link.Bi))}
a=a.replace(/{title}/g,MSCOM.Helper.htmlEncode(b.Value));a=a.replace(/{trailingicon}/g,b.TrailingIcon?this.BuildImage(b.TrailingIcon,true):"");return a},BuildDescription:function(b){if(!b)return"";var a='<p class="hpFeat_Wrap hpFeat_Description hpFeat_Item" bi:parenttitle="item" bi:type="description">{description}{trailingicon}</p>';if(b.Link){a='<p class="hpFeat_Wrap hpFeat_Description hpFeat_Item" bi:parenttitle="item"><a class="hpFeat_Link" href="{description.Link}" {bi.attr} bi:type="description">{description}</a>{trailingicon}</p>';a=a.replace(/{description.Link}/g,b.Link.Href);a=a.replace(/{bi.attr}/g,this.GetBiAttributes(b.Link.Bi))}
a=a.replace(/{trailingicon}/g,b.TrailingIcon?this.BuildImage(b.TrailingIcon,true):"");return a.replace(/{description}/g,MSCOM.Helper.htmlEncode(b.Value))},BuildCaption:function(b){if(!b)return"";var a='<p bi:parenttitle="item" class="hpFeat_Wrap hpFeat_Caption hpFeat_Item">{title}{trailingicon}</p>';if(b.Link){a='<p class="hpFeat_Wrap hpFeat_Caption hpFeat_Item" bi:parenttitle="item"><a class="hpFeat_Link" href="{title.Link}" {bi.attr} bi:type="caption">{title}</a>{trailingicon}</p>';a=a.replace(/{title.Link}/g,b.Link.Href);a=a.replace(/{bi.attr}/g,this.GetBiAttributes(b.Link.Bi))}
a=a.replace(/{title}/g,MSCOM.Helper.htmlEncode(b.Value));a=a.replace(/{trailingicon}/g,b.TrailingIcon?this.BuildImage(b.TrailingIcon,true):"");return a},BuildList:function(b){if(!b)return"";for(var c='<ul class="hpCrs_List hpFeat_List hpFeat_Item" bi:parenttitle="item">',a=0;a<b.length;a++)c+=this.BuildListItem(b[a],a);return c+"</ul>"},BuildListItem:function(b,c){if(!b)return"";var a="<li {index}>{item}{trailingicon}</li>";if(b.Link){var a='<li ><a class="hpFeat_Link" href="{list.link}" {bi.attr} bi:type="list" bi:index="{index}">{item}</a>{trailingicon}</li>';a=a.replace(/{list.link}/g,b.Link.Href);a=a.replace(/{bi.attr}/g,this.GetBiAttributes(b.Link.Bi))}
a=a.replace(/{index}/g,c);a=a.replace(/{trailingicon}/g,b.TrailingIcon?this.BuildImage(b.TrailingIcon,true):"");a=a.replace(/{item}/g,MSCOM.Helper.htmlEncode(b.Value));return a},BuildIncentives:function(a){if(!a)return"";else if(!a.Old&&!a.New)return"";var b='<div class="hpFeat_Incentive hpFeat_Item" >{incentives.old}{incentives.new}</div>';b=b.replace(/{incentives.old}/g,this.BuildIncentive(a.Old,"Old"));b=b.replace(/{incentives.new}/g,this.BuildIncentive(a.New,"New"));return b},BuildIncentive:function(b,c){if(!b||!c)return"";var a='<span class="hpFeat_Incentive{type}">{incentive}</span>';a=a.replace(/{incentive}/g,MSCOM.Helper.htmlEncode(b));return a.replace(/{type}/g,c)},BuildCallsToAction:function(c,e){if(!c||!e)return"";for(var d='<ul class="hpFeat_{type} hpFeat_Item" bi:parenttitle="item">',b=0;b<c.length;b++){var a="<li >{cta.value}{trailingicon}</li>";if(c[b].Link){var a='<li ><a class="hpFeat_Link" href="{cta.link}" bi:index="{index}" {bi.attr} bi:type="{cta.type}"><span class="hpFeat_Text" >{cta.value}</span><span class="hpFeat_Arrow">&#155;</span></a>{trailingicon}</li>';a=a.replace(/{cta.link}/g,c[b].Link.Href);a=a.replace(/{cta.type}/g,e);a=a.replace(/{index}/g,b);a=a.replace(/{bi.attr}/g,this.GetBiAttributes(c[b].Link.Bi))}
a=a.replace(/{cta.value}/g,MSCOM.Helper.htmlEncode(c[b].Value));a=a.replace(/{trailingicon}/g,c[b].TrailingIcon?this.BuildImage(c[b].TrailingIcon,true):"");d+=a}
d+="</ul>";return d.replace(/{type}/g,e)}}
$(document).ready(function(){var news=[{date:"January/18/12",headline:"hCentive announces appearance at Health Insurance Exchange Summit 2012",url:"hcentive-announces-appearance-at-health-insurance-exchange-summit-2012.html"},


{date:"January/06/12",headline:"hCentive Introduces WebInsure Medicare – A Comprehensive Medicare Eligibility & Enrollment Solution for the Healthcare Industry",url:"hcentive-Introduces-webInsure-medicare.html"},



{date:"November/11/11",headline:"hCentive Introduces WebInsure Private Exchange – A Comprehensive Private Exchange Solution for the Healthcare Industry",url:"hcentive-introduces-webInsure-private-exchange.html"},

{date:"November/10/11",headline:"hCentive to Host a Panel discussion on Private Exchanges & Defined Contribution Plans at AHIP Fall Forum, Chicago",url:"hcentive-to-host-a-panel-discussion.html"},

{date:"October/6/11",headline:"hCentive selected as a Finalist for the 2011 Red Herring Top 100 Asia Award",url:
"hcentive-selected-as-a-finalist.html"},

{date:"September/19/11",headline:"hCentive Launches Exchange Connectivity Solution for Health Insurers",url:
"hcentive-launches-exchange-connectivity-solution-for-health-insurers.html"}
];var currentItem=-1;function showNewsItem(index){if(index>=news.length){index=0;}else if(index<0){index=news.length-1;}
var newsItem=news[index];document.getElementById('newsDate').innerHTML=newsItem['date'];var newsHead=document.getElementById('newsHead');newsHead.href=newsItem['url'];newsHead.innerHTML=newsItem['headline'];document.getElementById('newsNav').getElementsByTagName('span')[0].innerHTML=String(index+1)+' of '+String(news.length);currentItem=index;}
function newsNext(){showNewsItem(currentItem+1);}
function newsPrev(){showNewsItem(currentItem-1);}
function newsLoop(){newsNext();setTimeout(newsLoop,'10500');}
newsLoop();});$(document).ready(function(){$('.0').cycle({fx:'scrollUp',timeout:0,speed:500,random:0,cleartype:true,cleartypeNoBg:true,pager:'#services_nav',pagerAnchorBuilder:function(idx,slide){return'#services_nav li:eq('+(idx)+') a';}});$('.slider .container').cycle({fx:'fade',timeout:7000,speed:700,random:0,cleartype:true,cleartypeNoBg:true,pager:'#slide-select',pagerAnchorBuilder:function(idx,slide){return'#slide-select a:eq('+(idx)+')';}});$('.slider1 .container').cycle({fx:'fade',timeout:7000,speed:700,random:0,cleartype:true,cleartypeNoBg:true,pager:'#slide-select1',pagerAnchorBuilder:function(idx,slide){return'#slide-select1 a:eq('+(idx)+')';}});$('.client-logos').cycle({fx:'scrollLeft',timeout:4000,cleartype:true,cleartypeNoBg:true,speed:1000,next:'.client-logos',containerResize:0,random:0,pager:'#logo-select',pagerAnchorBuilder:function(idx,slide){return'#logo-select a:eq('+(idx)+')';}});});var _daprr=new Array('http://rad.msn.com/ADSAdClient31.dll?GetSAd=','http://a.rad.msn.com/ADSAdClient31.dll?GetSAd=','http://b.rad.msn.com/ADSAdClient31.dll?GetSAd=');var _daprs=0;var _daplp='http://ads1.msn.com/library';var acbMinWdth=160;var acbAdBarH=22;var acbDwnLdSt=false;var DPJS_BSC=0;var DPJS_ACB=1;var DPJS_4TH=2;var DPJS_ADV=4;function dap(qs,fw,fh,ob){var rs=_daprr[_daprs++];if(_daprs>=_daprr.length)_daprs=0;var dapIfs="";if(typeof(ob)!='undefined'){ob=true;if(rs.length>0){rs+='&DPJS='+(DPJS_BSC+DPJS_4TH);}}else{ob=false;if(rs.length>0){rs+='&DPJS='+DPJS_BSC;}}
rs+=dapQSTrack;if(_dapUtils.is_ie5up&&_dapUtils.is_win&&!ob){dapIfs='dapIf'+(parseInt(parent.frames.length)+1);document.write('<iframe id="'+dapIfs+'" src="about:blank" width="'+fw+'" height="'+fh+'" frameborder="0" scrolling="no"></iframe>');document.frames[dapIfs].document.open("text/html","replace");document.frames[dapIfs].document.write('<html><head><title>Advertisement</title></head><body id="'+dapIfs+'" leftmargin="0" topmargin="0"><scr'+'ipt type="text/javascript">var inDapIF=true;</scr'+'ipt><scr'+'ipt type="text/javascript" src="'+rs+qs+'" onreadystatechange="startTimer();"></scr'+'ipt><scr'+'ipt type="text/javascript">function startTimer(){if (event.srcElement.readyState == "complete") {window.setTimeout("document.close();", 2000);}}</scr'+'ipt></body></html>');}else{document.write('<scr'+'ipt src="'+rs+qs+'" type="text/javascript" language="JavaScript"></scr'+'ipt>');}}
function verifyDapResize(idx){if(!adCont[idx].resizeCalled&&adCont[idx].acbObj.enabled){dap_Resize(adCont[idx].ifrmid,adCont[idx].w,adCont[idx].h);}}
function dap_Resize(fid,fw,fh){document.getElementById(fid).width=fw;document.getElementById(fid).height=fh;if(fw>0&&fh>0){acbAdResize(fid,fw,fh);}}
function dapOAF(qs,oa,fw,fh){dap(qs,fw,fh);}
_dapUtilClass=function(){var ua=navigator.userAgent.toLowerCase();var av=navigator.appVersion.toLowerCase();this.minorVer=parseFloat(av);this.majorVer=parseInt(this.minorVer);this.is_opera=(ua.indexOf("opera")!=-1);this.is_mac=(ua.indexOf("mac")!=-1);this.is_ff=(ua.indexOf("firefox")!=-1);var iePos=av.indexOf('msie');if(iePos!=-1){if(this.is_mac){var iePos=ua.indexOf('msie');this.minorVer=parseFloat(ua.substring(iePos+5,ua.indexOf(';',iePos)));}else{this.minorVer=parseFloat(av.substring(iePos+5,av.indexOf(';',iePos)));}
this.majorVer=parseInt(this.minorVer);}
this.is_ie=((iePos!=-1)&&(!this.is_opera));this.is_ie3=(this.is_ie&&(this.majorVer<4));this.is_ie4=(this.is_ie&&this.majorVer==4);this.is_ie4up=(this.is_ie&&this.minorVer>=4);this.is_ie5=(this.is_ie&&this.majorVer==5);this.is_ie5up=(this.is_ie&&this.minorVer>=5);this.is_ie5_5=(this.is_ie&&(ua.indexOf("msie 5.5")!=-1));this.is_ie5_5up=(this.is_ie&&this.minorVer>=5.5);this.is_ie6=(this.is_ie&&this.majorVer==6);this.is_ie6up=(this.is_ie&&this.minorVer>=6);this.is_webtv=(ua.indexOf("webtv")!=-1);this.is_msn=(av.indexOf("msn")>=0);this.is_win=((ua.indexOf("win")!=-1)||(ua.indexOf("16bit")!=-1));this.is_mac=(ua.indexOf("mac")!=-1);if(this.is_mac){this.is_win=!this.is_mac;}
if(this.is_ff){this.ffPos=ua.indexOf("firefox");if(ua.length>this.ffPos+8){this.majorVer=parseInt(ua.substring(this.ffPos+8));}
if(ua.length>this.ffPos+10){this.minorVer=parseInt(ua.substring(this.ffPos+10));}
this.is_ff1_5up=(this.is_ff&&((this.majorVer>=1&&this.minorVer>=5)||(this.majorVer>=2)));this.is_ff_closeIfrm=this.is_ff1_5up&&this.majorVer<3;}
this.has_Flash=false;this.FlashVer=0;this.detectFlash=function(){if(this.is_win&&this.is_ie4up){var dynaFrame='<iframe id="flashDetect" src="about:blank" width="1" height="1" frameborder="0" scrolling="no" style="display:none;"></iframe>';document.body.insertAdjacentHTML("afterBegin",dynaFrame);winObject=window["flashDetect"];docObject=winObject.document;top.isFlashVersion=0;top.isFlash=false;docObject.write('<SCR'+'IPT LANGUAGE=VBScript\> \n');docObject.write('Dim hasPlayer, playerversion \n');docObject.write('playerversion = 10 \n');docObject.write('Do While playerversion > 0 \n');docObject.write('On Error Resume Next \n');docObject.write('hasPlayer = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash." & playerversion))) \n');docObject.write('If hasPlayer = true Then Exit Do \n');docObject.write('playerversion = playerversion - 1 \n');docObject.write('Loop \n');docObject.write('top.isFlashVersion = playerversion \n');docObject.write('top.isFlash = hasPlayer \n');docObject.write('</SCR'+'IPT\>');docObject.close();this.has_Flash=top.isFlash;this.FlashVer=top.isFlashVersion;document.all["flashDetect"].removeNode(true);}}
this.hasCookie=function(cookieName){var bHasCookie=false,sCookie=document.cookie,aCookie=sCookie.split(";");for(var i=0;i<aCookie.length;i++){while(aCookie[i].substr(0,1)==' '){aCookie[i]=aCookie[i].substr(1);}
if(aCookie[i].indexOf(cookieName+'=')==0){bHasCookie=true;break;}}
return bHasCookie;}
this.rendMode=function(){var m=document.compatMode;if(m){if(m=="BackCompat"){return"Q";}else if(m=="CSS1Compat"){return"S";}}
return"U";}
this.getCurrentStyle=function(e){if(window.getComputedStyle){if(window.getComputedStyle(e,null)){return window.getComputedStyle(e,null);}else{return document.defaultView.getComputedStyle(e,null);}}else{return e.currentStyle;}}
this.brLanguage="";if(this.is_ie5up){this.brLanguage=navigator.browserLanguage;}else{this.brLanguage=navigator.language;}
this.acbEvtH=false;}
var _dapUtils=new _dapUtilClass();var adCont=new Array();var dapAd=new Object();dapAd=function(qs,divid,fid,fw,fh,iA,adid,th,wc,acbO){this.qs=qs;this.divid=divid;this.ifrmid=fid;this.w=fw;this.h=fh;this.isActive=iA;this.adid=adid;this.threshold=th;this.wc=wc;this.acbObj=acbO;this.documentClosed=false;this.resizeCalled=false;}
var AdControlBar=new Object();AdControlBar=function(enabled){this.enabled=enabled;this.shAcbLbl=false;this.fbFmShwn=false;this.fbSbmted=false;this.G=null;this.nS=null;this.pid=null;this.fn=null;this.mX=-1;this.xY=-1;this.noacb=false;this.lblCls=false;this.winCls=false;}
var eventType=new function(){this.click=1;};var eventPriority=new function(){this.special=2;this.regular=1;};var dapMgr=new function(){this.threshold=eventType.click;this.MAX_AD_NUM=100;this.dtRefresh=new Date().getTime();this.REFESH_ELAPSE=2000;this.MAX_ITR_FF=5;this.TIME_EACH_ITR=2000;this.renderAd=function(divid,qs,fw,fh){var idx=this.getAdItemIndex(divid);if(idx>-1){adCont[idx].qs=qs;adCont[idx].divid=divid;adCont[idx].w=fw;adCont[idx].h=fh;}else{if(adCont.length<this.MAX_AD_NUM){var aO=new dapAd(qs,divid,'dapIfM'+adCont.length,fw,fh,false,-1,this.threshold,0,new AdControlBar(true));if(_dapUtils.is_ie5){adCont[adCont.length]=aO;}else{adCont.push(aO);}}else{return;}
idx=adCont.length-1;}
this.displayAd(idx);}
this.enableACB=function(divid,acb){var idx=this.getAdItemIndex(divid);if(idx>-1){adCont[idx].acb=acb;}else{if(adCont.length<this.MAX_AD_NUM){var aO=new dapAd("",divid,'dapIfM'+adCont.length,0,0,false,-1,this.threshold,0,new AdControlBar(acb));if(_dapUtils.is_ie5){adCont[adCont.length]=aO;}else{adCont.push(aO);}}}}
this.getAdItemIndex=function(divid){var i;for(i=0;i<adCont.length;i++){if(adCont[i].divid==divid){return i;}}}
this.displayAd=function(idx){var rs=_daprr[_daprs++];if(_daprs>=_daprr.length){_daprs=0;}
var elm=document.getElementById(adCont[idx].divid);if(!elm){return;}
if(!adCont[idx].qs||adCont[idx].qs.length==0){return;}
if(adCont[idx].isActive){return;}
if(adCont[idx].acbObj!=null&&adCont[idx].acbObj.fbFmShwn){return;}
for(var i=(elm.childNodes.length-1);i>=0;i--){var fChd=elm.childNodes[i];if(_dapUtils.is_ff1_5up&&(fChd.id==adCont[idx].ifrmid)){if(fChd.contentDocument.body){while(fChd.contentDocument.body.firstChild){fChd.contentDocument.body.removeChild(fChd.contentDocument.body.firstChild);}}
fChd.id=null;fChd.name=null;fChd.style.display='none';fChd=null;}else{if(fChd.nodeName=="IFRAME"&&!_dapUtils.is_ie5_5){fChd.contentWindow.document.location.replace("about:blank");}
elm.removeChild(fChd);if(_dapUtils.is_ie5up){fChd.removeNode(true);}else{fChd=null;}}}
var elmCS=_dapUtils.getCurrentStyle(elm);if(elmCS){var elmStyle=elmCS.display;if(elmStyle=="none"||elmStyle=="hidden"){return;}}
if((_dapUtils.is_ie5_5up||_dapUtils.is_ff1_5up)&&_dapUtils.is_win){var dapIfs=adCont[idx].ifrmid;var ifrm=document.createElement("IFRAME");ifrm.id=dapIfs;ifrm.name=dapIfs;ifrm.src="about:blank";ifrm.width=adCont[idx].w;ifrm.height=adCont[idx].h;ifrm.scrolling="no";ifrm.frameBorder="0";ifrm.allowTransparency=true;elm.insertBefore(ifrm,elm.firstChild);if(rs.length>0){if(adCont[idx].acbObj.enabled){rs+='&DPJS='+(DPJS_ADV+DPJS_ACB);}else{rs+='&DPJS='+DPJS_ADV;}}
rs+=dapQSTrack;var str=this.getDapOutput(rs+adCont[idx].qs,dapIfs,idx);try{var contDoc=ifrm.contentDocument;}catch(err){}
if(_dapUtils.is_ie5_5up){if(contDoc&&contDoc.write){contDoc.write(str);}else{ifrm.src="javascript:void(document.write('"+str+"'));";}}else{contDoc.write(str);contDoc.onload=verifyDapResize(idx);if(_dapUtils.is_ff_closeIfrm){window.setTimeout("checkIFrameClosed("+idx+",1)",this.TIME_EACH_ITR);}else{contDoc.close();}}
if(adCont[idx].acbObj.enabled){initACB(adCont[idx].divid,idx);}}else{if(rs.length>0){rs+='&DPJS='+DPJS_ADV;}
rs+=dapQSTrack;var _dapdownlevel=true;if(parent.frames){var dapIfs=adCont[idx].ifrmid;elm.innerHTML+='<iframe id="'+dapIfs+'" src="about:blank" width="'+adCont[idx].w+'" height="'+adCont[idx].h+'" frameborder="0" scrolling="no"></iframe>';var doc;if(document.frames){if(document.frames[dapIfs]){doc=document.frames[dapIfs].document;}}else{if(document.getElementById(dapIfs)){doc=document.getElementById(dapIfs).contentDocument;}}
if(doc){_dapdownlevel=false;doc.open("text/html","replace");doc.write(this.getDapOutput(rs+adCont[idx].qs,dapIfs,idx));if(_dapUtils.is_ff_closeIfrm){window.setTimeout("checkIFrameClosed("+idx+",1)",this.TIME_EACH_ITR);}else if(!_dapUtils.is_ie){doc.close();}}}
if(_dapdownlevel){document.write('<scr'+'ipt src="'+rs+adCont[idx].qs+'" type="text/javascript" language="JavaScript"></scr'+'ipt>');adCont[idx].ifrmid=null;}}}
this.getDapOutput=function(rs,dapIfs,idx){var s='<html><head><title>Advertisement</title></head><body id="'+dapIfs+'" leftmargin="0" topmargin="0" style="background-color:transparent"><scr'+'ipt type="text/javascript">var inDapIF=true; var inDapMgrIf=true;';if(document.domain&&location.hostname!=document.domain){s+='document.domain="'+document.domain+'";';}
if(_dapUtils.is_ff_closeIfrm){s+='var fnPtr=document.close;document.close=function(){parent.adCont['+idx+'].documentClosed = true;document.close=fnPtr};';}
s+='</scr'+'ipt><scr'+'ipt type="text/javascript">function startTimer()'+'{if (event.srcElement.readyState == "complete") {parent.verifyDapResize('+idx+');window.setTimeout("document.close();", 2000);}}</scr'+'ipt><scr'+'ipt type="text/javascript"  src="'+rs+'" onreadystatechange="startTimer();"></scr'+'ipt></body></html>';return s;}
this.trackEvent=function(evtType,evtPr){var i;var isRef;if(!evtPr){evtPr=eventPriority.regular;}
for(i=0,isRef=false;i<adCont.length;i++){adCont[i].wc+=(evtType*evtPr);var tElp=(new Date()).getTime()-this.dtRefresh;if((adCont[i].wc>=adCont[i].threshold)&&(tElp>this.REFESH_ELAPSE)){adCont[i].wc=0;if(adCont[i].threshold>-1&&adCont[i].ifrmid!=null){this.displayAd(i);isRef=true;if(adCont[i].acbObj.enabled&&adCont[i].acbObj.fbSbmted){adCont[i].acbObj.fbSbmted=false;}}}}
if(isRef){this.dtRefresh=(new Date()).getTime();}}};function checkIFrameClosed(idx,iterations){var ifrm=document.getElementById(adCont[idx].ifrmid);if(ifrm){if(iterations>=dapMgr.MAX_ITR_FF&&!adCont[idx].documentClosed){ifrm.contentDocument.close();}
if(adCont[idx].documentClosed){try{ifrm.contentDocument.close();}catch(e){}}else{window.setTimeout("checkIFrameClosed("+idx+","+(iterations+1)+")",dapMgr.TIME_EACH_ITR);}}}
function acbAdResize(df,w,h){for(var i=0;i<adCont.length;i++){if(adCont[i].ifrmid==df){if(w<acbMinWdth){adCont[i].acbObj.noacb=true;if(_dapUtils.acbEvtH){_acb.removeACBLabel(i);}}else{if(_dapUtils.acbEvtH){_acb.showACBLabel(i);}}
adCont[i].w=w;adCont[i].h=h;var o=document.getElementById(adCont[i].divid);if(o){o.style.width=w+"px";if(_dapUtils.is_ff1_5up&&_dapUtils.rendMode()=="S"&&h>1){var dh=h;if(!adCont[i].acbObj.noacb&&adCont[i].acbObj.enabled){dh+=acbAdBarH;}
o.style.height=dh+"px";}}
var ol=document.getElementById("acbLblfrm"+i);if(ol){ol.style.width=w+"px";}
adCont[i].resizeCalled=true;return;}}}
function initACB(divid,Id){if(!_dapUtils.acbEvtH){if(!acbDwnLdSt){acbDwnLdSt=true;var d=document.createElement("SCRIPT");d.type="text/javascript";d.language="javascript";d.src=_daplp+"/ACB/acb.js";document.body.insertBefore(d,document.body.firstChild);}}else{_acb.initACBLabel(Id);}}
function ShowAcb(idStr,adId,W,H,G,nS,pid,fn){var Id=acbGetIdFrmIdStr(idStr);if(Id>-1){adCont[Id].adid=adId;adCont[Id].w=W;var acbO=adCont[Id].acbObj;acbO.shAcbLbl=true;acbO.fn=fn;acbO.G=G;acbO.nS=nS;acbO.pid=pid;if(_dapUtils.acbEvtH){_acb.showACBLink(Id);}
return;}}
function acbGetIdFrmIdStr(s){var id=s.substring(6,s.length);if(id>=0){return id;}else{return-1;}}
function dapExtractValue(str,key,eS){if(str!=null){var strKeyPS=str.toLowerCase().indexOf(key.toLowerCase()+'=');if(strKeyPS!=-1){strKeyPS+=key.length+1;var strKeyPE=str.indexOf(eS,strKeyPS);strKeyPE=(strKeyPE==-1)?str.length:strKeyPE;return str.substring(strKeyPS,strKeyPE);}}
return'';}
function dapQSTracking(){var c=document.cookie;var mh=escape(dapExtractValue(c,'mh',';'));var qs=(mh!='')?'&PN='+mh:'';var id=escape(dapExtractValue(dapExtractValue(c,'ANON',';'),'A','&'));var muid=escape(dapExtractValue(c,'MUID',';'));if(id==''){id=muid;}
qs+=(id!='')?'&ID='+id:'';qs+=(muid!='')?'&MUID='+muid:'';return qs;}
var dapQSTrack=dapQSTracking();var ddsmoothmenu={arrowimages:{down:['downarrowclass','http://www.hcentive.com/images/spacer.gif'],right:['rightarrowclass','http://www.hcentive.com/images/spacer.gif']},transition:{overtime:300,outtime:300},shadow:{enable:true,offsetx:5,offsety:5},showhidedelay:{showdelay:100,hidedelay:200},detectwebkit:navigator.userAgent.toLowerCase().indexOf("applewebkit")!=-1,detectie6:document.all&&!window.XMLHttpRequest,css3support:window.msPerformance||(!document.all&&document.querySelector),getajaxmenu:function($,setting){var $menucontainer=$('#'+setting.contentsource[0])
$menucontainer.html("Loading Menu...")
$.ajax({url:setting.contentsource[1],async:true,error:function(ajaxrequest){$menucontainer.html('Error fetching content. Server Response: '+ajaxrequest.responseText)},success:function(content){$menucontainer.html(content)
ddsmoothmenu.buildmenu($,setting)}})},buildmenu:function($,setting){var smoothmenu=ddsmoothmenu
var $mainmenu=$("#"+setting.mainmenuid+">ul")
$mainmenu.parent().get(0).className=setting.classname||"ddsmoothmenu"
var $headers=$mainmenu.find("ul").parent()
$headers.hover(function(e){$(this).children('a:eq(0)').addClass('selected')},function(e){$(this).children('a:eq(0)').removeClass('selected')})
$headers.each(function(i){var $curobj=$(this).css({zIndex:100-i})
var $subul=$(this).find('ul:eq(0)').css({display:'block'})
$subul.data('timers',{})
this._dimensions={w:this.offsetWidth,h:this.offsetHeight,subulw:$subul.outerWidth(),subulh:$subul.outerHeight()}
this.istopheader=$curobj.parents("ul").length==1?true:false
$subul.css({top:this.istopheader&&setting.orientation!='v'?this._dimensions.h+"px":0})
$curobj.children("a:eq(0)").css(this.istopheader?{paddingRight:smoothmenu.arrowimages.down[2]}:{}).append('<img src="'+(this.istopheader&&setting.orientation!='v'?smoothmenu.arrowimages.down[1]:smoothmenu.arrowimages.right[1])+'" class="'+(this.istopheader&&setting.orientation!='v'?smoothmenu.arrowimages.down[0]:smoothmenu.arrowimages.right[0])+'" style="border:0;" />')
if(smoothmenu.shadow.enable&&!smoothmenu.css3support){this._shadowoffset={x:(this.istopheader?$subul.offset().left+smoothmenu.shadow.offsetx:this._dimensions.w),y:(this.istopheader?$subul.offset().top+smoothmenu.shadow.offsety:$curobj.position().top)}
if(this.istopheader)
$parentshadow=$(document.body)
else{var $parentLi=$curobj.parents("li:eq(0)")
$parentshadow=$parentLi.get(0).$shadow}
this.$shadow=$('<div class="ddshadow'+(this.istopheader?' toplevelshadow':'')+'"></div>').prependTo($parentshadow).css({left:this._shadowoffset.x+'px',top:this._shadowoffset.y+'px'})}
$curobj.hover(function(e){var $targetul=$subul
var header=$curobj.get(0)
clearTimeout($targetul.data('timers').hidetimer)
$targetul.data('timers').showtimer=setTimeout(function(){header._offsets={left:$curobj.offset().left,top:$curobj.offset().top}
var menuleft=header.istopheader&&setting.orientation!='v'?0:header._dimensions.w
menuleft=(header._offsets.left+menuleft+header._dimensions.subulw>$(window).width())?(header.istopheader&&setting.orientation!='v'?-header._dimensions.subulw+header._dimensions.w:-header._dimensions.w):menuleft
if($targetul.queue().length<=1){$targetul.css({left:menuleft+"px",width:header._dimensions.subulw+'px'}).animate({height:'show',opacity:'show'},ddsmoothmenu.transition.overtime)
if(smoothmenu.shadow.enable&&!smoothmenu.css3support){var shadowleft=header.istopheader?$targetul.offset().left+ddsmoothmenu.shadow.offsetx:menuleft
var shadowtop=header.istopheader?$targetul.offset().top+smoothmenu.shadow.offsety:header._shadowoffset.y
if(!header.istopheader&&ddsmoothmenu.detectwebkit){header.$shadow.css({opacity:1})}
header.$shadow.css({overflow:'',width:header._dimensions.subulw+'px',left:shadowleft+'px',top:shadowtop+'px'}).animate({height:header._dimensions.subulh+'px'},ddsmoothmenu.transition.overtime)}}},ddsmoothmenu.showhidedelay.showdelay)},function(e){var $targetul=$subul
var header=$curobj.get(0)
clearTimeout($targetul.data('timers').showtimer)
$targetul.data('timers').hidetimer=setTimeout(function(){$targetul.animate({height:'hide',opacity:'hide'},ddsmoothmenu.transition.outtime)
if(smoothmenu.shadow.enable&&!smoothmenu.css3support){if(ddsmoothmenu.detectwebkit){header.$shadow.children('div:eq(0)').css({opacity:0})}
header.$shadow.css({overflow:'hidden'}).animate({height:0},ddsmoothmenu.transition.outtime)}},ddsmoothmenu.showhidedelay.hidedelay)})})
if(smoothmenu.shadow.enable&&smoothmenu.css3support){var $toplevelul=$('#'+setting.mainmenuid+' ul li ul')
var css3shadow=parseInt(smoothmenu.shadow.offsetx)+"px "+parseInt(smoothmenu.shadow.offsety)+"px 5px #aaa"
var shadowprop=["boxShadow","MozBoxShadow","WebkitBoxShadow","MsBoxShadow"]
for(var i=0;i<shadowprop.length;i++){$toplevelul.css(shadowprop[i],css3shadow)}}
$mainmenu.find("ul").css({display:'none',visibility:'visible'})},init:function(setting){if(typeof setting.customtheme=="object"&&setting.customtheme.length==2){var mainmenuid='#'+setting.mainmenuid
var mainselector=(setting.orientation=="v")?mainmenuid:mainmenuid+', '+mainmenuid
document.write('<style type="text/css">\n'+mainselector+' ul li a {background:'+setting.customtheme[0]+';}\n'+mainmenuid+' ul li a:hover {background:'+setting.customtheme[1]+';}\n'+'</style>')}
this.shadow.enable=(document.all&&!window.XMLHttpRequest)?false:this.shadow.enable
jQuery(document).ready(function($){if(typeof setting.contentsource=="object"){ddsmoothmenu.getajaxmenu($,setting)}
else{ddsmoothmenu.buildmenu($,setting)}})}}
ddsmoothmenu.init({mainmenuid:"smoothmenu1",orientation:'h',classname:'ddsmoothmenu',contentsource:"markup"});(function($,undefined){if($.cleanData){var _cleanData=$.cleanData;$.cleanData=function(elems){for(var i=0,elem;(elem=elems[i])!=null;i++){$(elem).triggerHandler("remove");}
_cleanData(elems);};}else{var _remove=$.fn.remove;$.fn.remove=function(selector,keepData){return this.each(function(){if(!keepData){if(!selector||$.filter(selector,[this]).length){$("*",this).add([this]).each(function(){$(this).triggerHandler("remove");});}}
return _remove.call($(this),selector,keepData);});};}
$.widget=function(name,base,prototype){var namespace=name.split(".")[0],fullName;name=name.split(".")[1];fullName=namespace+"-"+name;if(!prototype){prototype=base;base=$.Widget;}
$.expr[":"][fullName]=function(elem){return!!$.data(elem,name);};$[namespace]=$[namespace]||{};$[namespace][name]=function(options,element){if(arguments.length){this._createWidget(options,element);}};var basePrototype=new base();basePrototype.options=$.extend(true,{},basePrototype.options);$[namespace][name].prototype=$.extend(true,basePrototype,{namespace:namespace,widgetName:name,widgetEventPrefix:$[namespace][name].prototype.widgetEventPrefix||name,widgetBaseClass:fullName},prototype);$.widget.bridge(name,$[namespace][name]);};$.widget.bridge=function(name,object){$.fn[name]=function(options){var isMethodCall=typeof options==="string",args=Array.prototype.slice.call(arguments,1),returnValue=this;options=!isMethodCall&&args.length?$.extend.apply(null,[true,options].concat(args)):options;if(isMethodCall&&options.charAt(0)==="_"){return returnValue;}
if(isMethodCall){this.each(function(){var instance=$.data(this,name),methodValue=instance&&$.isFunction(instance[options])?instance[options].apply(instance,args):instance;if(methodValue!==instance&&methodValue!==undefined){returnValue=methodValue;return false;}});}else{this.each(function(){var instance=$.data(this,name);if(instance){instance.option(options||{})._init();}else{$.data(this,name,new object(options,this));}});}
return returnValue;};};$.Widget=function(options,element){if(arguments.length){this._createWidget(options,element);}};$.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",options:{disabled:false},_createWidget:function(options,element){$.data(element,this.widgetName,this);this.element=$(element);this.options=$.extend(true,{},this.options,this._getCreateOptions(),options);var self=this;this.element.bind("remove."+this.widgetName,function(){self.destroy();});this._create();this._trigger("create");this._init();},_getCreateOptions:function(){return $.metadata&&$.metadata.get(this.element[0])[this.widgetName];},_create:function(){},_init:function(){},destroy:function(){this.element.unbind("."+this.widgetName).removeData(this.widgetName);this.widget().unbind("."+this.widgetName).removeAttr("aria-disabled").removeClass(this.widgetBaseClass+"-disabled "+"ui-state-disabled");},widget:function(){return this.element;},option:function(key,value){var options=key;if(arguments.length===0){return $.extend({},this.options);}
if(typeof key==="string"){if(value===undefined){return this.options[key];}
options={};options[key]=value;}
this._setOptions(options);return this;},_setOptions:function(options){var self=this;$.each(options,function(key,value){self._setOption(key,value);});return this;},_setOption:function(key,value){this.options[key]=value;if(key==="disabled"){this.widget()[value?"addClass":"removeClass"](this.widgetBaseClass+"-disabled"+" "+"ui-state-disabled").attr("aria-disabled",value);}
return this;},enable:function(){return this._setOption("disabled",false);},disable:function(){return this._setOption("disabled",true);},_trigger:function(type,event,data){var callback=this.options[type];event=$.Event(event);event.type=(type===this.widgetEventPrefix?type:this.widgetEventPrefix+type).toLowerCase();data=data||{};if(event.originalEvent){for(var i=$.event.props.length,prop;i;){prop=$.event.props[--i];event[prop]=event.originalEvent[prop];}}
this.element.trigger(event,data);return!($.isFunction(callback)&&callback.call(this.element[0],event,data)===false||event.isDefaultPrevented());}};})(jQuery);(function($,undefined){$.widget("ui.accordion",{options:{active:0,animated:"slide",autoHeight:true,clearStyle:false,collapsible:false,event:"click",fillSpace:false,header:"> li > :first-child,> :not(li):even",icons:{header:"ui-icon-triangle-1-e",headerSelected:"ui-icon-triangle-1-s"},navigation:false,navigationFilter:function(){return this.href.toLowerCase()===location.href.toLowerCase();}},_create:function(){var self=this,options=self.options;self.running=0;self.element.addClass("ui-accordion ui-widget ui-helper-reset").children("li").addClass("ui-accordion-li-fix");self.headers=self.element.find(options.header).addClass("ui-accordion-header ui-helper-reset ui-state-default ui-corner-all").bind("mouseenter.accordion",function(){if(options.disabled){return;}
$(this).addClass("ui-state-hover");}).bind("mouseleave.accordion",function(){if(options.disabled){return;}
$(this).removeClass("ui-state-hover");}).bind("focus.accordion",function(){if(options.disabled){return;}
$(this).addClass("ui-state-focus");}).bind("blur.accordion",function(){if(options.disabled){return;}
$(this).removeClass("ui-state-focus");});self.headers.next().addClass("ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom");if(options.navigation){var current=self.element.find("a").filter(options.navigationFilter).eq(0);if(current.length){var header=current.closest(".ui-accordion-header");if(header.length){self.active=header;}else{self.active=current.closest(".ui-accordion-content").prev();}}}
self.active=self._findActive(self.active||options.active).addClass("ui-state-default ui-state-active").toggleClass("ui-corner-all").toggleClass("ui-corner-top");self.active.next().addClass("ui-accordion-content-active");self._createIcons();self.resize();self.element.attr("role","tablist");self.headers.attr("role","tab").bind("keydown.accordion",function(event){return self._keydown(event);}).next().attr("role","tabpanel");self.headers.not(self.active||"").attr({"aria-expanded":"false","aria-selected":"false",tabIndex:-1}).next().hide();if(!self.active.length){self.headers.eq(0).attr("tabIndex",0);}else{self.active.attr({"aria-expanded":"true","aria-selected":"true",tabIndex:0});}
if(!$.browser.safari){self.headers.find("a").attr("tabIndex",-1);}
if(options.event){self.headers.bind(options.event.split(" ").join(".accordion")+".accordion",function(event){self._clickHandler.call(self,event,this);event.preventDefault();});}},_createIcons:function(){var options=this.options;if(options.icons){$("<span></span>").addClass("ui-icon "+options.icons.header).prependTo(this.headers);this.active.children(".ui-icon").toggleClass(options.icons.header).toggleClass(options.icons.headerSelected);this.element.addClass("ui-accordion-icons");}},_destroyIcons:function(){this.headers.children(".ui-icon").remove();this.element.removeClass("ui-accordion-icons");},destroy:function(){var options=this.options;this.element.removeClass("ui-accordion ui-widget ui-helper-reset").removeAttr("role");this.headers.unbind(".accordion").removeClass("ui-accordion-header ui-accordion-disabled ui-helper-reset ui-state-default ui-corner-all ui-state-active ui-state-disabled ui-corner-top").removeAttr("role").removeAttr("aria-expanded").removeAttr("aria-selected").removeAttr("tabIndex");this.headers.find("a").removeAttr("tabIndex");this._destroyIcons();var contents=this.headers.next().css("display","").removeAttr("role").removeClass("ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content ui-accordion-content-active ui-accordion-disabled ui-state-disabled");if(options.autoHeight||options.fillHeight){contents.css("height","");}
return $.Widget.prototype.destroy.call(this);},_setOption:function(key,value){$.Widget.prototype._setOption.apply(this,arguments);if(key=="active"){this.activate(value);}
if(key=="icons"){this._destroyIcons();if(value){this._createIcons();}}
if(key=="disabled"){this.headers.add(this.headers.next())[value?"addClass":"removeClass"]("ui-accordion-disabled ui-state-disabled");}},_keydown:function(event){if(this.options.disabled||event.altKey||event.ctrlKey){return;}
var keyCode=$.ui.keyCode,length=this.headers.length,currentIndex=this.headers.index(event.target),toFocus=false;switch(event.keyCode){case keyCode.RIGHT:case keyCode.DOWN:toFocus=this.headers[(currentIndex+1)%length];break;case keyCode.LEFT:case keyCode.UP:toFocus=this.headers[(currentIndex-1+length)%length];break;case keyCode.SPACE:case keyCode.ENTER:this._clickHandler({target:event.target},event.target);event.preventDefault();}
if(toFocus){$(event.target).attr("tabIndex",-1);$(toFocus).attr("tabIndex",0);toFocus.focus();return false;}
return true;},resize:function(){var options=this.options,maxHeight;if(options.fillSpace){if($.browser.msie){var defOverflow=this.element.parent().css("overflow");this.element.parent().css("overflow","hidden");}
maxHeight=this.element.parent().height();if($.browser.msie){this.element.parent().css("overflow",defOverflow);}
this.headers.each(function(){maxHeight-=$(this).outerHeight(true);});this.headers.next().each(function(){$(this).height(Math.max(0,maxHeight-$(this).innerHeight()+$(this).height()));}).css("overflow","auto");}else if(options.autoHeight){maxHeight=0;this.headers.next().each(function(){maxHeight=Math.max(maxHeight,$(this).height("").height());}).height(maxHeight);}
return this;},activate:function(index){this.options.active=index;var active=this._findActive(index)[0];this._clickHandler({target:active},active);return this;},_findActive:function(selector){return selector?typeof selector==="number"?this.headers.filter(":eq("+selector+")"):this.headers.not(this.headers.not(selector)):selector===false?$([]):this.headers.filter(":eq(0)");},_clickHandler:function(event,target){var options=this.options;if(options.disabled){return;}
if(!event.target){if(!options.collapsible){return;}
this.active.removeClass("ui-state-active ui-corner-top").addClass("ui-state-default ui-corner-all").children(".ui-icon").removeClass(options.icons.headerSelected).addClass(options.icons.header);this.active.next().addClass("ui-accordion-content-active");var toHide=this.active.next(),data={options:options,newHeader:$([]),oldHeader:options.active,newContent:$([]),oldContent:toHide},toShow=(this.active=$([]));this._toggle(toShow,toHide,data);return;}
var clicked=$(event.currentTarget||target),clickedIsActive=clicked[0]===this.active[0];options.active=options.collapsible&&clickedIsActive?false:this.headers.index(clicked);if(this.running||(!options.collapsible&&clickedIsActive)){return;}
var active=this.active,toShow=clicked.next(),toHide=this.active.next(),data={options:options,newHeader:clickedIsActive&&options.collapsible?$([]):clicked,oldHeader:this.active,newContent:clickedIsActive&&options.collapsible?$([]):toShow,oldContent:toHide},down=this.headers.index(this.active[0])>this.headers.index(clicked[0]);this.active=clickedIsActive?$([]):clicked;this._toggle(toShow,toHide,data,clickedIsActive,down);active.removeClass("ui-state-active ui-corner-top").addClass("ui-state-default ui-corner-all").children(".ui-icon").removeClass(options.icons.headerSelected).addClass(options.icons.header);if(!clickedIsActive){clicked.removeClass("ui-state-default ui-corner-all").addClass("ui-state-active ui-corner-top").children(".ui-icon").removeClass(options.icons.header).addClass(options.icons.headerSelected);clicked.next().addClass("ui-accordion-content-active");}
return;},_toggle:function(toShow,toHide,data,clickedIsActive,down){var self=this,options=self.options;self.toShow=toShow;self.toHide=toHide;self.data=data;var complete=function(){if(!self){return;}
return self._completed.apply(self,arguments);};self._trigger("changestart",null,self.data);self.running=toHide.size()===0?toShow.size():toHide.size();if(options.animated){var animOptions={};if(options.collapsible&&clickedIsActive){animOptions={toShow:$([]),toHide:toHide,complete:complete,down:down,autoHeight:options.autoHeight||options.fillSpace};}else{animOptions={toShow:toShow,toHide:toHide,complete:complete,down:down,autoHeight:options.autoHeight||options.fillSpace};}
if(!options.proxied){options.proxied=options.animated;}
if(!options.proxiedDuration){options.proxiedDuration=options.duration;}
options.animated=$.isFunction(options.proxied)?options.proxied(animOptions):options.proxied;options.duration=$.isFunction(options.proxiedDuration)?options.proxiedDuration(animOptions):options.proxiedDuration;var animations=$.ui.accordion.animations,duration=options.duration,easing=options.animated;if(easing&&!animations[easing]&&!$.easing[easing]){easing="slide";}
if(!animations[easing]){animations[easing]=function(options){this.slide(options,{easing:easing,duration:duration||700});};}
animations[easing](animOptions);}else{if(options.collapsible&&clickedIsActive){toShow.toggle();}else{toHide.hide();toShow.show();}
complete(true);}
toHide.prev().attr({"aria-expanded":"false","aria-selected":"false",tabIndex:-1}).blur();toShow.prev().attr({"aria-expanded":"true","aria-selected":"true",tabIndex:0}).focus();},_completed:function(cancel){this.running=cancel?0:--this.running;if(this.running){return;}
if(this.options.clearStyle){this.toShow.add(this.toHide).css({height:"",overflow:""});}
this.toHide.removeClass("ui-accordion-content-active");if(this.toHide.length){this.toHide.parent()[0].className=this.toHide.parent()[0].className;}
this._trigger("change",null,this.data);}});$.extend($.ui.accordion,{version:"1.8.11",animations:{slide:function(options,additions){options=$.extend({easing:"swing",duration:300},options,additions);if(!options.toHide.size()){options.toShow.animate({height:"show",paddingTop:"show",paddingBottom:"show"},options);return;}
if(!options.toShow.size()){options.toHide.animate({height:"hide",paddingTop:"hide",paddingBottom:"hide"},options);return;}
var overflow=options.toShow.css("overflow"),percentDone=0,showProps={},hideProps={},fxAttrs=["height","paddingTop","paddingBottom"],originalWidth;var s=options.toShow;originalWidth=s[0].style.width;s.width(parseInt(s.parent().width(),10)-parseInt(s.css("paddingLeft"),10)-parseInt(s.css("paddingRight"),10)-(parseInt(s.css("borderLeftWidth"),10)||0)-(parseInt(s.css("borderRightWidth"),10)||0));$.each(fxAttrs,function(i,prop){hideProps[prop]="hide";var parts=(""+$.css(options.toShow[0],prop)).match(/^([\d+-.]+)(.*)$/);showProps[prop]={value:parts[1],unit:parts[2]||"px"};});options.toShow.css({height:0,overflow:"hidden"}).show();options.toHide.filter(":hidden").each(options.complete).end().filter(":visible").animate(hideProps,{step:function(now,settings){if(settings.prop=="height"){percentDone=(settings.end-settings.start===0)?0:(settings.now-settings.start)/(settings.end-settings.start);}
options.toShow[0].style[settings.prop]=(percentDone*showProps[settings.prop].value)+showProps[settings.prop].unit;},duration:options.duration,easing:options.easing,complete:function(){if(!options.autoHeight){options.toShow.css("height","");}
options.toShow.css({width:originalWidth,overflow:overflow});options.complete();}});},bounceslide:function(options){this.slide(options,{easing:options.down?"easeOutBounce":"swing",duration:options.down?1000:200});}}});})(jQuery);$(function(){$("#accordion").accordion({collapsible:true});});;(function($){var ver='2.88';if($.support==undefined){$.support={opacity:!($.browser.msie)};}
function debug(s){if($.fn.cycle.debug)
log(s);}
function log(){if(window.console&&window.console.log)
window.console.log('[cycle] '+Array.prototype.join.call(arguments,' '));};$.fn.cycle=function(options,arg2){var o={s:this.selector,c:this.context};if(this.length===0&&options!='stop'){if(!$.isReady&&o.s){log('DOM not ready, queuing slideshow');$(function(){$(o.s,o.c).cycle(options,arg2);});return this;}
log('terminating; zero elements found by selector'+($.isReady?'':' (DOM not ready)'));return this;}
return this.each(function(){var opts=handleArguments(this,options,arg2);if(opts===false)
return;opts.updateActivePagerLink=opts.updateActivePagerLink||$.fn.cycle.updateActivePagerLink;if(this.cycleTimeout)
clearTimeout(this.cycleTimeout);this.cycleTimeout=this.cyclePause=0;var $cont=$(this);var $slides=opts.slideExpr?$(opts.slideExpr,this):$cont.children();var els=$slides.get();if(els.length<2){log('terminating; too few slides: '+els.length);return;}
var opts2=buildOptions($cont,$slides,els,opts,o);if(opts2===false)
return;var startTime=opts2.continuous?10:getTimeout(els[opts2.currSlide],els[opts2.nextSlide],opts2,!opts2.rev);if(startTime){startTime+=(opts2.delay||0);if(startTime<10)
startTime=10;debug('first timeout: '+startTime);this.cycleTimeout=setTimeout(function(){go(els,opts2,0,(!opts2.rev&&!opts.backwards))},startTime);}});};function handleArguments(cont,options,arg2){if(cont.cycleStop==undefined)
cont.cycleStop=0;if(options===undefined||options===null)
options={};if(options.constructor==String){switch(options){case'destroy':case'stop':var opts=$(cont).data('cycle.opts');if(!opts)
return false;cont.cycleStop++;if(cont.cycleTimeout)
clearTimeout(cont.cycleTimeout);cont.cycleTimeout=0;$(cont).removeData('cycle.opts');if(options=='destroy')
destroy(opts);return false;case'toggle':cont.cyclePause=(cont.cyclePause===1)?0:1;checkInstantResume(cont.cyclePause,arg2,cont);return false;case'pause':cont.cyclePause=1;return false;case'resume':cont.cyclePause=0;checkInstantResume(false,arg2,cont);return false;case'prev':case'next':var opts=$(cont).data('cycle.opts');if(!opts){log('options not found, "prev/next" ignored');return false;}
$.fn.cycle[options](opts);return false;default:options={fx:options};};return options;}
else if(options.constructor==Number){var num=options;options=$(cont).data('cycle.opts');if(!options){log('options not found, can not advance slide');return false;}
if(num<0||num>=options.elements.length){log('invalid slide index: '+num);return false;}
options.nextSlide=num;if(cont.cycleTimeout){clearTimeout(cont.cycleTimeout);cont.cycleTimeout=0;}
if(typeof arg2=='string')
options.oneTimeFx=arg2;go(options.elements,options,1,num>=options.currSlide);return false;}
return options;function checkInstantResume(isPaused,arg2,cont){if(!isPaused&&arg2===true){var options=$(cont).data('cycle.opts');if(!options){log('options not found, can not resume');return false;}
if(cont.cycleTimeout){clearTimeout(cont.cycleTimeout);cont.cycleTimeout=0;}
go(options.elements,options,1,(!opts.rev&&!opts.backwards));}}};function removeFilter(el,opts){if(!$.support.opacity&&opts.cleartype&&el.style.filter){try{el.style.removeAttribute('filter');}
catch(smother){}}};function destroy(opts){if(opts.next)
$(opts.next).unbind(opts.prevNextEvent);if(opts.prev)
$(opts.prev).unbind(opts.prevNextEvent);if(opts.pager||opts.pagerAnchorBuilder)
$.each(opts.pagerAnchors||[],function(){this.unbind().remove();});opts.pagerAnchors=null;if(opts.destroy)
opts.destroy(opts);};function buildOptions($cont,$slides,els,options,o){var opts=$.extend({},$.fn.cycle.defaults,options||{},$.metadata?$cont.metadata():$.meta?$cont.data():{});if(opts.autostop)
opts.countdown=opts.autostopCount||els.length;var cont=$cont[0];$cont.data('cycle.opts',opts);opts.$cont=$cont;opts.stopCount=cont.cycleStop;opts.elements=els;opts.before=opts.before?[opts.before]:[];opts.after=opts.after?[opts.after]:[];opts.after.unshift(function(){opts.busy=0;});if(!$.support.opacity&&opts.cleartype)
opts.after.push(function(){removeFilter(this,opts);});if(opts.continuous)
opts.after.push(function(){go(els,opts,0,(!opts.rev&&!opts.backwards));});saveOriginalOpts(opts);if(!$.support.opacity&&opts.cleartype&&!opts.cleartypeNoBg)
clearTypeFix($slides);if($cont.css('position')=='static')
$cont.css('position','relative');if(opts.width)
$cont.width(opts.width);if(opts.height&&opts.height!='auto')
$cont.height(opts.height);if(opts.startingSlide)
opts.startingSlide=parseInt(opts.startingSlide);else if(opts.backwards)
opts.startingSlide=els.length-1;if(opts.random){opts.randomMap=[];for(var i=0;i<els.length;i++)
opts.randomMap.push(i);opts.randomMap.sort(function(a,b){return Math.random()-0.5;});opts.randomIndex=1;opts.startingSlide=opts.randomMap[1];}
else if(opts.startingSlide>=els.length)
opts.startingSlide=0;opts.currSlide=opts.startingSlide||0;var first=opts.startingSlide;$slides.css({position:'absolute',top:0,left:0}).hide().each(function(i){var z;if(opts.backwards)
z=first?i<=first?els.length+(i-first):first-i:els.length-i;else
z=first?i>=first?els.length-(i-first):first-i:els.length-i;$(this).css('z-index',z)});$(els[first]).css('opacity',1).show();removeFilter(els[first],opts);if(opts.fit&&opts.width)
$slides.width(opts.width);if(opts.fit&&opts.height&&opts.height!='auto')
$slides.height(opts.height);var reshape=opts.containerResize&&!$cont.innerHeight();if(reshape){var maxw=0,maxh=0;for(var j=0;j<els.length;j++){var $e=$(els[j]),e=$e[0],w=$e.outerWidth(),h=$e.outerHeight();if(!w)w=e.offsetWidth||e.width||$e.attr('width')
if(!h)h=e.offsetHeight||e.height||$e.attr('height');maxw=w>maxw?w:maxw;maxh=h>maxh?h:maxh;}
if(maxw>0&&maxh>0)
$cont.css({width:maxw+'px',height:maxh+'px'});}
if(opts.pause)
$cont.hover(function(){this.cyclePause++;},function(){this.cyclePause--;});if(supportMultiTransitions(opts)===false)
return false;var requeue=false;options.requeueAttempts=options.requeueAttempts||0;$slides.each(function(){var $el=$(this);this.cycleH=(opts.fit&&opts.height)?opts.height:($el.height()||this.offsetHeight||this.height||$el.attr('height')||0);this.cycleW=(opts.fit&&opts.width)?opts.width:($el.width()||this.offsetWidth||this.width||$el.attr('width')||0);if($el.is('img')){var loadingIE=($.browser.msie&&this.cycleW==28&&this.cycleH==30&&!this.complete);var loadingFF=($.browser.mozilla&&this.cycleW==34&&this.cycleH==19&&!this.complete);var loadingOp=($.browser.opera&&((this.cycleW==42&&this.cycleH==19)||(this.cycleW==37&&this.cycleH==17))&&!this.complete);var loadingOther=(this.cycleH==0&&this.cycleW==0&&!this.complete);if(loadingIE||loadingFF||loadingOp||loadingOther){if(o.s&&opts.requeueOnImageNotLoaded&&++options.requeueAttempts<100){log(options.requeueAttempts,' - img slide not loaded, requeuing slideshow: ',this.src,this.cycleW,this.cycleH);setTimeout(function(){$(o.s,o.c).cycle(options)},opts.requeueTimeout);requeue=true;return false;}
else{log('could not determine size of image: '+this.src,this.cycleW,this.cycleH);}}}
return true;});if(requeue)
return false;opts.cssBefore=opts.cssBefore||{};opts.animIn=opts.animIn||{};opts.animOut=opts.animOut||{};$slides.not(':eq('+first+')').css(opts.cssBefore);if(opts.cssFirst)
$($slides[first]).css(opts.cssFirst);if(opts.timeout){opts.timeout=parseInt(opts.timeout);if(opts.speed.constructor==String)
opts.speed=$.fx.speeds[opts.speed]||parseInt(opts.speed);if(!opts.sync)
opts.speed=opts.speed/2;var buffer=opts.fx=='shuffle'?500:250;while((opts.timeout-opts.speed)<buffer)
opts.timeout+=opts.speed;}
if(opts.easing)
opts.easeIn=opts.easeOut=opts.easing;if(!opts.speedIn)
opts.speedIn=opts.speed;if(!opts.speedOut)
opts.speedOut=opts.speed;opts.slideCount=els.length;opts.currSlide=opts.lastSlide=first;if(opts.random){if(++opts.randomIndex==els.length)
opts.randomIndex=0;opts.nextSlide=opts.randomMap[opts.randomIndex];}
else if(opts.backwards)
opts.nextSlide=opts.startingSlide==0?(els.length-1):opts.startingSlide-1;else
opts.nextSlide=opts.startingSlide>=(els.length-1)?0:opts.startingSlide+1;if(!opts.multiFx){var init=$.fn.cycle.transitions[opts.fx];if($.isFunction(init))
init($cont,$slides,opts);else if(opts.fx!='custom'&&!opts.multiFx){log('unknown transition: '+opts.fx,'; slideshow terminating');return false;}}
var e0=$slides[first];if(opts.before.length)
opts.before[0].apply(e0,[e0,e0,opts,true]);if(opts.after.length>1)
opts.after[1].apply(e0,[e0,e0,opts,true]);if(opts.next)
$(opts.next).bind(opts.prevNextEvent,function(){return advance(opts,opts.rev?-1:1)});if(opts.prev)
$(opts.prev).bind(opts.prevNextEvent,function(){return advance(opts,opts.rev?1:-1)});if(opts.pager||opts.pagerAnchorBuilder)
buildPager(els,opts);exposeAddSlide(opts,els);return opts;};function saveOriginalOpts(opts){opts.original={before:[],after:[]};opts.original.cssBefore=$.extend({},opts.cssBefore);opts.original.cssAfter=$.extend({},opts.cssAfter);opts.original.animIn=$.extend({},opts.animIn);opts.original.animOut=$.extend({},opts.animOut);$.each(opts.before,function(){opts.original.before.push(this);});$.each(opts.after,function(){opts.original.after.push(this);});};function supportMultiTransitions(opts){var i,tx,txs=$.fn.cycle.transitions;if(opts.fx.indexOf(',')>0){opts.multiFx=true;opts.fxs=opts.fx.replace(/\s*/g,'').split(',');for(i=0;i<opts.fxs.length;i++){var fx=opts.fxs[i];tx=txs[fx];if(!tx||!txs.hasOwnProperty(fx)||!$.isFunction(tx)){log('discarding unknown transition: ',fx);opts.fxs.splice(i,1);i--;}}
if(!opts.fxs.length){log('No valid transitions named; slideshow terminating.');return false;}}
else if(opts.fx=='all'){opts.multiFx=true;opts.fxs=[];for(p in txs){tx=txs[p];if(txs.hasOwnProperty(p)&&$.isFunction(tx))
opts.fxs.push(p);}}
if(opts.multiFx&&opts.randomizeEffects){var r1=Math.floor(Math.random()*20)+30;for(i=0;i<r1;i++){var r2=Math.floor(Math.random()*opts.fxs.length);opts.fxs.push(opts.fxs.splice(r2,1)[0]);}
debug('randomized fx sequence: ',opts.fxs);}
return true;};function exposeAddSlide(opts,els){opts.addSlide=function(newSlide,prepend){var $s=$(newSlide),s=$s[0];if(!opts.autostopCount)
opts.countdown++;els[prepend?'unshift':'push'](s);if(opts.els)
opts.els[prepend?'unshift':'push'](s);opts.slideCount=els.length;$s.css('position','absolute');$s[prepend?'prependTo':'appendTo'](opts.$cont);if(prepend){opts.currSlide++;opts.nextSlide++;}
if(!$.support.opacity&&opts.cleartype&&!opts.cleartypeNoBg)
clearTypeFix($s);if(opts.fit&&opts.width)
$s.width(opts.width);if(opts.fit&&opts.height&&opts.height!='auto')
$slides.height(opts.height);s.cycleH=(opts.fit&&opts.height)?opts.height:$s.height();s.cycleW=(opts.fit&&opts.width)?opts.width:$s.width();$s.css(opts.cssBefore);if(opts.pager||opts.pagerAnchorBuilder)
$.fn.cycle.createPagerAnchor(els.length-1,s,$(opts.pager),els,opts);if($.isFunction(opts.onAddSlide))
opts.onAddSlide($s);else
$s.hide();};}
$.fn.cycle.resetState=function(opts,fx){fx=fx||opts.fx;opts.before=[];opts.after=[];opts.cssBefore=$.extend({},opts.original.cssBefore);opts.cssAfter=$.extend({},opts.original.cssAfter);opts.animIn=$.extend({},opts.original.animIn);opts.animOut=$.extend({},opts.original.animOut);opts.fxFn=null;$.each(opts.original.before,function(){opts.before.push(this);});$.each(opts.original.after,function(){opts.after.push(this);});var init=$.fn.cycle.transitions[fx];if($.isFunction(init))
init(opts.$cont,$(opts.elements),opts);};function go(els,opts,manual,fwd){if(manual&&opts.busy&&opts.manualTrump){debug('manualTrump in go(), stopping active transition');$(els).stop(true,true);opts.busy=false;}
if(opts.busy){debug('transition active, ignoring new tx request');return;}
var p=opts.$cont[0],curr=els[opts.currSlide],next=els[opts.nextSlide];if(p.cycleStop!=opts.stopCount||p.cycleTimeout===0&&!manual)
return;if(!manual&&!p.cyclePause&&!opts.bounce&&((opts.autostop&&(--opts.countdown<=0))||(opts.nowrap&&!opts.random&&opts.nextSlide<opts.currSlide))){if(opts.end)
opts.end(opts);return;}
var changed=false;if((manual||!p.cyclePause)&&(opts.nextSlide!=opts.currSlide)){changed=true;var fx=opts.fx;curr.cycleH=curr.cycleH||$(curr).height();curr.cycleW=curr.cycleW||$(curr).width();next.cycleH=next.cycleH||$(next).height();next.cycleW=next.cycleW||$(next).width();if(opts.multiFx){if(opts.lastFx==undefined||++opts.lastFx>=opts.fxs.length)
opts.lastFx=0;fx=opts.fxs[opts.lastFx];opts.currFx=fx;}
if(opts.oneTimeFx){fx=opts.oneTimeFx;opts.oneTimeFx=null;}
$.fn.cycle.resetState(opts,fx);if(opts.before.length)
$.each(opts.before,function(i,o){if(p.cycleStop!=opts.stopCount)return;o.apply(next,[curr,next,opts,fwd]);});var after=function(){$.each(opts.after,function(i,o){if(p.cycleStop!=opts.stopCount)return;o.apply(next,[curr,next,opts,fwd]);});};debug('tx firing; currSlide: '+opts.currSlide+'; nextSlide: '+opts.nextSlide);opts.busy=1;if(opts.fxFn)
opts.fxFn(curr,next,opts,after,fwd,manual&&opts.fastOnEvent);else if($.isFunction($.fn.cycle[opts.fx]))
$.fn.cycle[opts.fx](curr,next,opts,after,fwd,manual&&opts.fastOnEvent);else
$.fn.cycle.custom(curr,next,opts,after,fwd,manual&&opts.fastOnEvent);}
if(changed||opts.nextSlide==opts.currSlide){opts.lastSlide=opts.currSlide;if(opts.random){opts.currSlide=opts.nextSlide;if(++opts.randomIndex==els.length)
opts.randomIndex=0;opts.nextSlide=opts.randomMap[opts.randomIndex];if(opts.nextSlide==opts.currSlide)
opts.nextSlide=(opts.currSlide==opts.slideCount-1)?0:opts.currSlide+1;}
else if(opts.backwards){var roll=(opts.nextSlide-1)<0;if(roll&&opts.bounce){opts.backwards=!opts.backwards;opts.nextSlide=1;opts.currSlide=0;}
else{opts.nextSlide=roll?(els.length-1):opts.nextSlide-1;opts.currSlide=roll?0:opts.nextSlide+1;}}
else{var roll=(opts.nextSlide+1)==els.length;if(roll&&opts.bounce){opts.backwards=!opts.backwards;opts.nextSlide=els.length-2;opts.currSlide=els.length-1;}
else{opts.nextSlide=roll?0:opts.nextSlide+1;opts.currSlide=roll?els.length-1:opts.nextSlide-1;}}}
if(changed&&opts.pager)
opts.updateActivePagerLink(opts.pager,opts.currSlide,opts.activePagerClass);var ms=0;if(opts.timeout&&!opts.continuous)
ms=getTimeout(els[opts.currSlide],els[opts.nextSlide],opts,fwd);else if(opts.continuous&&p.cyclePause)
ms=10;if(ms>0)
p.cycleTimeout=setTimeout(function(){go(els,opts,0,(!opts.rev&&!opts.backwards))},ms);};$.fn.cycle.updateActivePagerLink=function(pager,currSlide,clsName){$(pager).each(function(){$(this).children().removeClass(clsName).eq(currSlide).addClass(clsName);});};function getTimeout(curr,next,opts,fwd){if(opts.timeoutFn){var t=opts.timeoutFn.call(curr,curr,next,opts,fwd);while((t-opts.speed)<250)
t+=opts.speed;debug('calculated timeout: '+t+'; speed: '+opts.speed);if(t!==false)
return t;}
return opts.timeout;};$.fn.cycle.next=function(opts){advance(opts,opts.rev?-1:1);};$.fn.cycle.prev=function(opts){advance(opts,opts.rev?1:-1);};function advance(opts,val){var els=opts.elements;var p=opts.$cont[0],timeout=p.cycleTimeout;if(timeout){clearTimeout(timeout);p.cycleTimeout=0;}
if(opts.random&&val<0){opts.randomIndex--;if(--opts.randomIndex==-2)
opts.randomIndex=els.length-2;else if(opts.randomIndex==-1)
opts.randomIndex=els.length-1;opts.nextSlide=opts.randomMap[opts.randomIndex];}
else if(opts.random){opts.nextSlide=opts.randomMap[opts.randomIndex];}
else{opts.nextSlide=opts.currSlide+val;if(opts.nextSlide<0){if(opts.nowrap)return false;opts.nextSlide=els.length-1;}
else if(opts.nextSlide>=els.length){if(opts.nowrap)return false;opts.nextSlide=0;}}
var cb=opts.onPrevNextEvent||opts.prevNextClick;if($.isFunction(cb))
cb(val>0,opts.nextSlide,els[opts.nextSlide]);go(els,opts,1,val>=0);return false;};function buildPager(els,opts){var $p=$(opts.pager);$.each(els,function(i,o){$.fn.cycle.createPagerAnchor(i,o,$p,els,opts);});opts.updateActivePagerLink(opts.pager,opts.startingSlide,opts.activePagerClass);};$.fn.cycle.createPagerAnchor=function(i,el,$p,els,opts){var a;if($.isFunction(opts.pagerAnchorBuilder)){a=opts.pagerAnchorBuilder(i,el);debug('pagerAnchorBuilder('+i+', el) returned: '+a);}
else
a='<a href="#">'+(i+1)+'</a>';if(!a)
return;var $a=$(a);if($a.parents('body').length===0){var arr=[];if($p.length>1){$p.each(function(){var $clone=$a.clone(true);$(this).append($clone);arr.push($clone[0]);});$a=$(arr);}
else{$a.appendTo($p);}}
opts.pagerAnchors=opts.pagerAnchors||[];opts.pagerAnchors.push($a);$a.bind(opts.pagerEvent,function(e){e.preventDefault();opts.nextSlide=i;var p=opts.$cont[0],timeout=p.cycleTimeout;if(timeout){clearTimeout(timeout);p.cycleTimeout=0;}
var cb=opts.onPagerEvent||opts.pagerClick;if($.isFunction(cb))
cb(opts.nextSlide,els[opts.nextSlide]);go(els,opts,1,opts.currSlide<i);});if(!/^click/.test(opts.pagerEvent)&&!opts.allowPagerClickBubble)
$a.bind('click.cycle',function(){return false;});if(opts.pauseOnPagerHover)
$a.hover(function(){opts.$cont[0].cyclePause++;},function(){opts.$cont[0].cyclePause--;});};$.fn.cycle.hopsFromLast=function(opts,fwd){var hops,l=opts.lastSlide,c=opts.currSlide;if(fwd)
hops=c>l?c-l:opts.slideCount-l;else
hops=c<l?l-c:l+opts.slideCount-c;return hops;};function clearTypeFix($slides){debug('applying clearType background-color hack');function hex(s){s=parseInt(s).toString(16);return s.length<2?'0'+s:s;};function getBg(e){for(;e&&e.nodeName.toLowerCase()!='html';e=e.parentNode){var v=$.css(e,'background-color');if(v.indexOf('rgb')>=0){var rgb=v.match(/\d+/g);return'#'+hex(rgb[0])+hex(rgb[1])+hex(rgb[2]);}
if(v&&v!='transparent')
return v;}
return'#ffffff';};$slides.each(function(){$(this).css('background-color',getBg(this));});};$.fn.cycle.commonReset=function(curr,next,opts,w,h,rev){$(opts.elements).not(curr).hide();opts.cssBefore.opacity=1;opts.cssBefore.display='block';if(w!==false&&next.cycleW>0)
opts.cssBefore.width=next.cycleW;if(h!==false&&next.cycleH>0)
opts.cssBefore.height=next.cycleH;opts.cssAfter=opts.cssAfter||{};opts.cssAfter.display='none';$(curr).css('zIndex',opts.slideCount+(rev===true?1:0));$(next).css('zIndex',opts.slideCount+(rev===true?0:1));};$.fn.cycle.custom=function(curr,next,opts,cb,fwd,speedOverride){var $l=$(curr),$n=$(next);var speedIn=opts.speedIn,speedOut=opts.speedOut,easeIn=opts.easeIn,easeOut=opts.easeOut;$n.css(opts.cssBefore);if(speedOverride){if(typeof speedOverride=='number')
speedIn=speedOut=speedOverride;else
speedIn=speedOut=1;easeIn=easeOut=null;}
var fn=function(){$n.animate(opts.animIn,speedIn,easeIn,cb)};$l.animate(opts.animOut,speedOut,easeOut,function(){if(opts.cssAfter)$l.css(opts.cssAfter);if(!opts.sync)fn();});if(opts.sync)fn();};$.fn.cycle.transitions={fade:function($cont,$slides,opts){$slides.not(':eq('+opts.currSlide+')').css('opacity',0);opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts);opts.cssBefore.opacity=0;});opts.animIn={opacity:1};opts.animOut={opacity:0};opts.cssBefore={top:0,left:0};}};$.fn.cycle.ver=function(){return ver;};$.fn.cycle.defaults={fx:'fade',timeout:4000,timeoutFn:null,continuous:0,speed:1000,speedIn:null,speedOut:null,next:null,prev:null,onPrevNextEvent:null,prevNextEvent:'click.cycle',pager:null,onPagerEvent:null,pagerEvent:'click.cycle',allowPagerClickBubble:false,pagerAnchorBuilder:null,before:null,after:null,end:null,easing:null,easeIn:null,easeOut:null,shuffle:null,animIn:null,animOut:null,cssBefore:null,cssAfter:null,fxFn:null,height:'auto',startingSlide:0,sync:1,random:0,fit:0,containerResize:1,pause:0,pauseOnPagerHover:0,autostop:0,autostopCount:0,delay:0,slideExpr:null,cleartype:!$.support.opacity,cleartypeNoBg:false,nowrap:0,fastOnEvent:0,randomizeEffects:1,rev:0,manualTrump:true,requeueOnImageNotLoaded:true,requeueTimeout:250,activePagerClass:'activeSlide',updateActivePagerLink:null,backwards:false};})(jQuery);(function($){$.fn.cycle.transitions.none=function($cont,$slides,opts){opts.fxFn=function(curr,next,opts,after){$(next).show();$(curr).hide();after();};}
$.fn.cycle.transitions.scrollUp=function($cont,$slides,opts){$cont.css('overflow','hidden');opts.before.push($.fn.cycle.commonReset);var h=$cont.height();opts.cssBefore={top:h,left:0};opts.cssFirst={top:0};opts.animIn={top:0};opts.animOut={top:-h};};$.fn.cycle.transitions.scrollDown=function($cont,$slides,opts){$cont.css('overflow','hidden');opts.before.push($.fn.cycle.commonReset);var h=$cont.height();opts.cssFirst={top:0};opts.cssBefore={top:-h,left:0};opts.animIn={top:0};opts.animOut={top:h};};$.fn.cycle.transitions.scrollLeft=function($cont,$slides,opts){$cont.css('overflow','hidden');opts.before.push($.fn.cycle.commonReset);var w=$cont.width();opts.cssFirst={left:0};opts.cssBefore={left:w,top:0};opts.animIn={left:0};opts.animOut={left:0-w};};$.fn.cycle.transitions.scrollRight=function($cont,$slides,opts){$cont.css('overflow','hidden');opts.before.push($.fn.cycle.commonReset);var w=$cont.width();opts.cssFirst={left:0};opts.cssBefore={left:-w,top:0};opts.animIn={left:0};opts.animOut={left:w};};$.fn.cycle.transitions.scrollHorz=function($cont,$slides,opts){$cont.css('overflow','hidden').width();opts.before.push(function(curr,next,opts,fwd){$.fn.cycle.commonReset(curr,next,opts);opts.cssBefore.left=fwd?(next.cycleW-1):(1-next.cycleW);opts.animOut.left=fwd?-curr.cycleW:curr.cycleW;});opts.cssFirst={left:0};opts.cssBefore={top:0};opts.animIn={left:0};opts.animOut={top:0};};$.fn.cycle.transitions.scrollVert=function($cont,$slides,opts){$cont.css('overflow','hidden');opts.before.push(function(curr,next,opts,fwd){$.fn.cycle.commonReset(curr,next,opts);opts.cssBefore.top=fwd?(1-next.cycleH):(next.cycleH-1);opts.animOut.top=fwd?curr.cycleH:-curr.cycleH;});opts.cssFirst={top:0};opts.cssBefore={left:0};opts.animIn={top:0};opts.animOut={left:0};};$.fn.cycle.transitions.slideX=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$(opts.elements).not(curr).hide();$.fn.cycle.commonReset(curr,next,opts,false,true);opts.animIn.width=next.cycleW;});opts.cssBefore={left:0,top:0,width:0};opts.animIn={width:'show'};opts.animOut={width:0};};$.fn.cycle.transitions.slideY=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$(opts.elements).not(curr).hide();$.fn.cycle.commonReset(curr,next,opts,true,false);opts.animIn.height=next.cycleH;});opts.cssBefore={left:0,top:0,height:0};opts.animIn={height:'show'};opts.animOut={height:0};};$.fn.cycle.transitions.shuffle=function($cont,$slides,opts){var i,w=$cont.css('overflow','visible').width();$slides.css({left:0,top:0});opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,true,true,true);});if(!opts.speedAdjusted){opts.speed=opts.speed/2;opts.speedAdjusted=true;}
opts.random=0;opts.shuffle=opts.shuffle||{left:-w,top:15};opts.els=[];for(i=0;i<$slides.length;i++)
opts.els.push($slides[i]);for(i=0;i<opts.currSlide;i++)
opts.els.push(opts.els.shift());opts.fxFn=function(curr,next,opts,cb,fwd){var $el=fwd?$(curr):$(next);$(next).css(opts.cssBefore);var count=opts.slideCount;$el.animate(opts.shuffle,opts.speedIn,opts.easeIn,function(){var hops=$.fn.cycle.hopsFromLast(opts,fwd);for(var k=0;k<hops;k++)
fwd?opts.els.push(opts.els.shift()):opts.els.unshift(opts.els.pop());if(fwd){for(var i=0,len=opts.els.length;i<len;i++)
$(opts.els[i]).css('z-index',len-i+count);}
else{var z=$(curr).css('z-index');$el.css('z-index',parseInt(z)+1+count);}
$el.animate({left:0,top:0},opts.speedOut,opts.easeOut,function(){$(fwd?this:curr).hide();if(cb)cb();});});};opts.cssBefore={display:'block',opacity:1,top:0,left:0};};$.fn.cycle.transitions.turnUp=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,true,false);opts.cssBefore.top=next.cycleH;opts.animIn.height=next.cycleH;});opts.cssFirst={top:0};opts.cssBefore={left:0,height:0};opts.animIn={top:0};opts.animOut={height:0};};$.fn.cycle.transitions.turnDown=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,true,false);opts.animIn.height=next.cycleH;opts.animOut.top=curr.cycleH;});opts.cssFirst={top:0};opts.cssBefore={left:0,top:0,height:0};opts.animOut={height:0};};$.fn.cycle.transitions.turnLeft=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,false,true);opts.cssBefore.left=next.cycleW;opts.animIn.width=next.cycleW;});opts.cssBefore={top:0,width:0};opts.animIn={left:0};opts.animOut={width:0};};$.fn.cycle.transitions.turnRight=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,false,true);opts.animIn.width=next.cycleW;opts.animOut.left=curr.cycleW;});opts.cssBefore={top:0,left:0,width:0};opts.animIn={left:0};opts.animOut={width:0};};$.fn.cycle.transitions.zoom=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,false,false,true);opts.cssBefore.top=next.cycleH/2;opts.cssBefore.left=next.cycleW/2;opts.animIn={top:0,left:0,width:next.cycleW,height:next.cycleH};opts.animOut={width:0,height:0,top:curr.cycleH/2,left:curr.cycleW/2};});opts.cssFirst={top:0,left:0};opts.cssBefore={width:0,height:0};};$.fn.cycle.transitions.fadeZoom=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,false,false);opts.cssBefore.left=next.cycleW/2;opts.cssBefore.top=next.cycleH/2;opts.animIn={top:0,left:0,width:next.cycleW,height:next.cycleH};});opts.cssBefore={width:0,height:0};opts.animOut={opacity:0};};$.fn.cycle.transitions.blindX=function($cont,$slides,opts){var w=$cont.css('overflow','hidden').width();opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts);opts.animIn.width=next.cycleW;opts.animOut.left=curr.cycleW;});opts.cssBefore={left:w,top:0};opts.animIn={left:0};opts.animOut={left:w};};$.fn.cycle.transitions.blindY=function($cont,$slides,opts){var h=$cont.css('overflow','hidden').height();opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts);opts.animIn.height=next.cycleH;opts.animOut.top=curr.cycleH;});opts.cssBefore={top:h,left:0};opts.animIn={top:0};opts.animOut={top:h};};$.fn.cycle.transitions.blindZ=function($cont,$slides,opts){var h=$cont.css('overflow','hidden').height();var w=$cont.width();opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts);opts.animIn.height=next.cycleH;opts.animOut.top=curr.cycleH;});opts.cssBefore={top:h,left:w};opts.animIn={top:0,left:0};opts.animOut={top:h,left:w};};$.fn.cycle.transitions.growX=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,false,true);opts.cssBefore.left=this.cycleW/2;opts.animIn={left:0,width:this.cycleW};opts.animOut={left:0};});opts.cssBefore={width:0,top:0};};$.fn.cycle.transitions.growY=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,true,false);opts.cssBefore.top=this.cycleH/2;opts.animIn={top:0,height:this.cycleH};opts.animOut={top:0};});opts.cssBefore={height:0,left:0};};$.fn.cycle.transitions.curtainX=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,false,true,true);opts.cssBefore.left=next.cycleW/2;opts.animIn={left:0,width:this.cycleW};opts.animOut={left:curr.cycleW/2,width:0};});opts.cssBefore={top:0,width:0};};$.fn.cycle.transitions.curtainY=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,true,false,true);opts.cssBefore.top=next.cycleH/2;opts.animIn={top:0,height:next.cycleH};opts.animOut={top:curr.cycleH/2,height:0};});opts.cssBefore={left:0,height:0};};$.fn.cycle.transitions.cover=function($cont,$slides,opts){var d=opts.direction||'left';var w=$cont.css('overflow','hidden').width();var h=$cont.height();opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts);if(d=='right')
opts.cssBefore.left=-w;else if(d=='up')
opts.cssBefore.top=h;else if(d=='down')
opts.cssBefore.top=-h;else
opts.cssBefore.left=w;});opts.animIn={left:0,top:0};opts.animOut={opacity:1};opts.cssBefore={top:0,left:0};};$.fn.cycle.transitions.uncover=function($cont,$slides,opts){var d=opts.direction||'left';var w=$cont.css('overflow','hidden').width();var h=$cont.height();opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,true,true,true);if(d=='right')
opts.animOut.left=w;else if(d=='up')
opts.animOut.top=-h;else if(d=='down')
opts.animOut.top=h;else
opts.animOut.left=-w;});opts.animIn={left:0,top:0};opts.animOut={opacity:1};opts.cssBefore={top:0,left:0};};$.fn.cycle.transitions.toss=function($cont,$slides,opts){var w=$cont.css('overflow','visible').width();var h=$cont.height();opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,true,true,true);if(!opts.animOut.left&&!opts.animOut.top)
opts.animOut={left:w*2,top:-h/2,opacity:0};else
opts.animOut.opacity=0;});opts.cssBefore={left:0,top:0};opts.animIn={left:0};};$.fn.cycle.transitions.wipe=function($cont,$slides,opts){var w=$cont.css('overflow','hidden').width();var h=$cont.height();opts.cssBefore=opts.cssBefore||{};var clip;if(opts.clip){if(/l2r/.test(opts.clip))
clip='rect(0px 0px '+h+'px 0px)';else if(/r2l/.test(opts.clip))
clip='rect(0px '+w+'px '+h+'px '+w+'px)';else if(/t2b/.test(opts.clip))
clip='rect(0px '+w+'px 0px 0px)';else if(/b2t/.test(opts.clip))
clip='rect('+h+'px '+w+'px '+h+'px 0px)';else if(/zoom/.test(opts.clip)){var top=parseInt(h/2);var left=parseInt(w/2);clip='rect('+top+'px '+left+'px '+top+'px '+left+'px)';}}
opts.cssBefore.clip=opts.cssBefore.clip||clip||'rect(0px 0px 0px 0px)';var d=opts.cssBefore.clip.match(/(\d+)/g);var t=parseInt(d[0]),r=parseInt(d[1]),b=parseInt(d[2]),l=parseInt(d[3]);opts.before.push(function(curr,next,opts){if(curr==next)return;var $curr=$(curr),$next=$(next);$.fn.cycle.commonReset(curr,next,opts,true,true,false);opts.cssAfter.display='block';var step=1,count=parseInt((opts.speedIn/13))-1;(function f(){var tt=t?t-parseInt(step*(t/count)):0;var ll=l?l-parseInt(step*(l/count)):0;var bb=b<h?b+parseInt(step*((h-b)/count||1)):h;var rr=r<w?r+parseInt(step*((w-r)/count||1)):w;$next.css({clip:'rect('+tt+'px '+rr+'px '+bb+'px '+ll+'px)'});(step++<=count)?setTimeout(f,13):$curr.css('display','none');})();});opts.cssBefore={display:'block',opacity:1,top:0,left:0};opts.animIn={left:0};opts.animOut={left:0};};})(jQuery);;(function($){var ver='2.88';if($.support==undefined){$.support={opacity:!($.browser.msie)};}
function debug(s){if($.fn.cycle.debug)
log(s);}
function log(){if(window.console&&window.console.log)
window.console.log('[cycle] '+Array.prototype.join.call(arguments,' '));};$.fn.cycle=function(options,arg2){var o={s:this.selector,c:this.context};if(this.length===0&&options!='stop'){if(!$.isReady&&o.s){log('DOM not ready, queuing slideshow1');$(function(){$(o.s,o.c).cycle(options,arg2);});return this;}
log('terminating; zero elements found by selector'+($.isReady?'':' (DOM not ready)'));return this;}
return this.each(function(){var opts=handleArguments(this,options,arg2);if(opts===false)
return;opts.updateActivePagerLink=opts.updateActivePagerLink||$.fn.cycle.updateActivePagerLink;if(this.cycleTimeout)
clearTimeout(this.cycleTimeout);this.cycleTimeout=this.cyclePause=0;var $cont=$(this);var $slides=opts.slideExpr?$(opts.slideExpr,this):$cont.children();var els=$slides.get();if(els.length<2){log('terminating; too few slides: '+els.length);return;}
var opts2=buildOptions($cont,$slides,els,opts,o);if(opts2===false)
return;var startTime=opts2.continuous?10:getTimeout(els[opts2.currSlide],els[opts2.nextSlide],opts2,!opts2.rev);if(startTime){startTime+=(opts2.delay||0);if(startTime<10)
startTime=10;debug('first timeout: '+startTime);this.cycleTimeout=setTimeout(function(){go(els,opts2,0,(!opts2.rev&&!opts.backwards))},startTime);}});};function handleArguments(cont,options,arg2){if(cont.cycleStop==undefined)
cont.cycleStop=0;if(options===undefined||options===null)
options={};if(options.constructor==String){switch(options){case'destroy':case'stop':var opts=$(cont).data('cycle.opts');if(!opts)
return false;cont.cycleStop++;if(cont.cycleTimeout)
clearTimeout(cont.cycleTimeout);cont.cycleTimeout=0;$(cont).removeData('cycle.opts');if(options=='destroy')
destroy(opts);return false;case'toggle':cont.cyclePause=(cont.cyclePause===1)?0:1;checkInstantResume(cont.cyclePause,arg2,cont);return false;case'pause':cont.cyclePause=1;return false;case'resume':cont.cyclePause=0;checkInstantResume(false,arg2,cont);return false;case'prev':case'next':var opts=$(cont).data('cycle.opts');if(!opts){log('options not found, "prev/next" ignored');return false;}
$.fn.cycle[options](opts);return false;default:options={fx:options};};return options;}
else if(options.constructor==Number){var num=options;options=$(cont).data('cycle.opts');if(!options){log('options not found, can not advance slide');return false;}
if(num<0||num>=options.elements.length){log('invalid slide index: '+num);return false;}
options.nextSlide=num;if(cont.cycleTimeout){clearTimeout(cont.cycleTimeout);cont.cycleTimeout=0;}
if(typeof arg2=='string')
options.oneTimeFx=arg2;go(options.elements,options,1,num>=options.currSlide);return false;}
return options;function checkInstantResume(isPaused,arg2,cont){if(!isPaused&&arg2===true){var options=$(cont).data('cycle.opts');if(!options){log('options not found, can not resume');return false;}
if(cont.cycleTimeout){clearTimeout(cont.cycleTimeout);cont.cycleTimeout=0;}
go(options.elements,options,1,(!opts.rev&&!opts.backwards));}}};function removeFilter(el,opts){if(!$.support.opacity&&opts.cleartype&&el.style.filter){try{el.style.removeAttribute('filter');}
catch(smother){}}};function destroy(opts){if(opts.next)
$(opts.next).unbind(opts.prevNextEvent);if(opts.prev)
$(opts.prev).unbind(opts.prevNextEvent);if(opts.pager||opts.pagerAnchorBuilder)
$.each(opts.pagerAnchors||[],function(){this.unbind().remove();});opts.pagerAnchors=null;if(opts.destroy)
opts.destroy(opts);};function buildOptions($cont,$slides,els,options,o){var opts=$.extend({},$.fn.cycle.defaults,options||{},$.metadata?$cont.metadata():$.meta?$cont.data():{});if(opts.autostop)
opts.countdown=opts.autostopCount||els.length;var cont=$cont[0];$cont.data('cycle.opts',opts);opts.$cont=$cont;opts.stopCount=cont.cycleStop;opts.elements=els;opts.before=opts.before?[opts.before]:[];opts.after=opts.after?[opts.after]:[];opts.after.unshift(function(){opts.busy=0;});if(!$.support.opacity&&opts.cleartype)
opts.after.push(function(){removeFilter(this,opts);});if(opts.continuous)
opts.after.push(function(){go(els,opts,0,(!opts.rev&&!opts.backwards));});saveOriginalOpts(opts);if(!$.support.opacity&&opts.cleartype&&!opts.cleartypeNoBg)
clearTypeFix($slides);if($cont.css('position')=='static')
$cont.css('position','relative');if(opts.width)
$cont.width(opts.width);if(opts.height&&opts.height!='auto')
$cont.height(opts.height);if(opts.startingSlide)
opts.startingSlide=parseInt(opts.startingSlide);else if(opts.backwards)
opts.startingSlide=els.length-1;if(opts.random){opts.randomMap=[];for(var i=0;i<els.length;i++)
opts.randomMap.push(i);opts.randomMap.sort(function(a,b){return Math.random()-0.5;});opts.randomIndex=1;opts.startingSlide=opts.randomMap[1];}
else if(opts.startingSlide>=els.length)
opts.startingSlide=0;opts.currSlide=opts.startingSlide||0;var first=opts.startingSlide;$slides.css({position:'absolute',top:0,left:0}).hide().each(function(i){var z;if(opts.backwards)
z=first?i<=first?els.length+(i-first):first-i:els.length-i;else
z=first?i>=first?els.length-(i-first):first-i:els.length-i;$(this).css('z-index',z)});$(els[first]).css('opacity',1).show();removeFilter(els[first],opts);if(opts.fit&&opts.width)
$slides.width(opts.width);if(opts.fit&&opts.height&&opts.height!='auto')
$slides.height(opts.height);var reshape=opts.containerResize&&!$cont.innerHeight();if(reshape){var maxw=0,maxh=0;for(var j=0;j<els.length;j++){var $e=$(els[j]),e=$e[0],w=$e.outerWidth(),h=$e.outerHeight();if(!w)w=e.offsetWidth||e.width||$e.attr('width')
if(!h)h=e.offsetHeight||e.height||$e.attr('height');maxw=w>maxw?w:maxw;maxh=h>maxh?h:maxh;}
if(maxw>0&&maxh>0)
$cont.css({width:maxw+'px',height:maxh+'px'});}
if(opts.pause)
$cont.hover(function(){this.cyclePause++;},function(){this.cyclePause--;});if(supportMultiTransitions(opts)===false)
return false;var requeue=false;options.requeueAttempts=options.requeueAttempts||0;$slides.each(function(){var $el=$(this);this.cycleH=(opts.fit&&opts.height)?opts.height:($el.height()||this.offsetHeight||this.height||$el.attr('height')||0);this.cycleW=(opts.fit&&opts.width)?opts.width:($el.width()||this.offsetWidth||this.width||$el.attr('width')||0);if($el.is('img')){var loadingIE=($.browser.msie&&this.cycleW==28&&this.cycleH==30&&!this.complete);var loadingFF=($.browser.mozilla&&this.cycleW==34&&this.cycleH==19&&!this.complete);var loadingOp=($.browser.opera&&((this.cycleW==42&&this.cycleH==19)||(this.cycleW==37&&this.cycleH==17))&&!this.complete);var loadingOther=(this.cycleH==0&&this.cycleW==0&&!this.complete);if(loadingIE||loadingFF||loadingOp||loadingOther){if(o.s&&opts.requeueOnImageNotLoaded&&++options.requeueAttempts<100){log(options.requeueAttempts,' - img slide not loaded, requeuing slideshow: ',this.src,this.cycleW,this.cycleH);setTimeout(function(){$(o.s,o.c).cycle(options)},opts.requeueTimeout);requeue=true;return false;}
else{log('could not determine size of image: '+this.src,this.cycleW,this.cycleH);}}}
return true;});if(requeue)
return false;opts.cssBefore=opts.cssBefore||{};opts.animIn=opts.animIn||{};opts.animOut=opts.animOut||{};$slides.not(':eq('+first+')').css(opts.cssBefore);if(opts.cssFirst)
$($slides[first]).css(opts.cssFirst);if(opts.timeout){opts.timeout=parseInt(opts.timeout);if(opts.speed.constructor==String)
opts.speed=$.fx.speeds[opts.speed]||parseInt(opts.speed);if(!opts.sync)
opts.speed=opts.speed/2;var buffer=opts.fx=='shuffle'?500:250;while((opts.timeout-opts.speed)<buffer)
opts.timeout+=opts.speed;}
if(opts.easing)
opts.easeIn=opts.easeOut=opts.easing;if(!opts.speedIn)
opts.speedIn=opts.speed;if(!opts.speedOut)
opts.speedOut=opts.speed;opts.slideCount=els.length;opts.currSlide=opts.lastSlide=first;if(opts.random){if(++opts.randomIndex==els.length)
opts.randomIndex=0;opts.nextSlide=opts.randomMap[opts.randomIndex];}
else if(opts.backwards)
opts.nextSlide=opts.startingSlide==0?(els.length-1):opts.startingSlide-1;else
opts.nextSlide=opts.startingSlide>=(els.length-1)?0:opts.startingSlide+1;if(!opts.multiFx){var init=$.fn.cycle.transitions[opts.fx];if($.isFunction(init))
init($cont,$slides,opts);else if(opts.fx!='custom'&&!opts.multiFx){log('unknown transition: '+opts.fx,'; slideshow terminating');return false;}}
var e0=$slides[first];if(opts.before.length)
opts.before[0].apply(e0,[e0,e0,opts,true]);if(opts.after.length>1)
opts.after[1].apply(e0,[e0,e0,opts,true]);if(opts.next)
$(opts.next).bind(opts.prevNextEvent,function(){return advance(opts,opts.rev?-1:1)});if(opts.prev)
$(opts.prev).bind(opts.prevNextEvent,function(){return advance(opts,opts.rev?1:-1)});if(opts.pager||opts.pagerAnchorBuilder)
buildPager(els,opts);exposeAddSlide(opts,els);return opts;};function saveOriginalOpts(opts){opts.original={before:[],after:[]};opts.original.cssBefore=$.extend({},opts.cssBefore);opts.original.cssAfter=$.extend({},opts.cssAfter);opts.original.animIn=$.extend({},opts.animIn);opts.original.animOut=$.extend({},opts.animOut);$.each(opts.before,function(){opts.original.before.push(this);});$.each(opts.after,function(){opts.original.after.push(this);});};function supportMultiTransitions(opts){var i,tx,txs=$.fn.cycle.transitions;if(opts.fx.indexOf(',')>0){opts.multiFx=true;opts.fxs=opts.fx.replace(/\s*/g,'').split(',');for(i=0;i<opts.fxs.length;i++){var fx=opts.fxs[i];tx=txs[fx];if(!tx||!txs.hasOwnProperty(fx)||!$.isFunction(tx)){log('discarding unknown transition: ',fx);opts.fxs.splice(i,1);i--;}}
if(!opts.fxs.length){log('No valid transitions named; slideshow terminating.');return false;}}
else if(opts.fx=='all'){opts.multiFx=true;opts.fxs=[];for(p in txs){tx=txs[p];if(txs.hasOwnProperty(p)&&$.isFunction(tx))
opts.fxs.push(p);}}
if(opts.multiFx&&opts.randomizeEffects){var r1=Math.floor(Math.random()*20)+30;for(i=0;i<r1;i++){var r2=Math.floor(Math.random()*opts.fxs.length);opts.fxs.push(opts.fxs.splice(r2,1)[0]);}
debug('randomized fx sequence: ',opts.fxs);}
return true;};function exposeAddSlide(opts,els){opts.addSlide=function(newSlide,prepend){var $s=$(newSlide),s=$s[0];if(!opts.autostopCount)
opts.countdown++;els[prepend?'unshift':'push'](s);if(opts.els)
opts.els[prepend?'unshift':'push'](s);opts.slideCount=els.length;$s.css('position','absolute');$s[prepend?'prependTo':'appendTo'](opts.$cont);if(prepend){opts.currSlide++;opts.nextSlide++;}
if(!$.support.opacity&&opts.cleartype&&!opts.cleartypeNoBg)
clearTypeFix($s);if(opts.fit&&opts.width)
$s.width(opts.width);if(opts.fit&&opts.height&&opts.height!='auto')
$slides.height(opts.height);s.cycleH=(opts.fit&&opts.height)?opts.height:$s.height();s.cycleW=(opts.fit&&opts.width)?opts.width:$s.width();$s.css(opts.cssBefore);if(opts.pager||opts.pagerAnchorBuilder)
$.fn.cycle.createPagerAnchor(els.length-1,s,$(opts.pager),els,opts);if($.isFunction(opts.onAddSlide))
opts.onAddSlide($s);else
$s.hide();};}
$.fn.cycle.resetState=function(opts,fx){fx=fx||opts.fx;opts.before=[];opts.after=[];opts.cssBefore=$.extend({},opts.original.cssBefore);opts.cssAfter=$.extend({},opts.original.cssAfter);opts.animIn=$.extend({},opts.original.animIn);opts.animOut=$.extend({},opts.original.animOut);opts.fxFn=null;$.each(opts.original.before,function(){opts.before.push(this);});$.each(opts.original.after,function(){opts.after.push(this);});var init=$.fn.cycle.transitions[fx];if($.isFunction(init))
init(opts.$cont,$(opts.elements),opts);};function go(els,opts,manual,fwd){if(manual&&opts.busy&&opts.manualTrump){debug('manualTrump in go(), stopping active transition');$(els).stop(true,true);opts.busy=false;}
if(opts.busy){debug('transition active, ignoring new tx request');return;}
var p=opts.$cont[0],curr=els[opts.currSlide],next=els[opts.nextSlide];if(p.cycleStop!=opts.stopCount||p.cycleTimeout===0&&!manual)
return;if(!manual&&!p.cyclePause&&!opts.bounce&&((opts.autostop&&(--opts.countdown<=0))||(opts.nowrap&&!opts.random&&opts.nextSlide<opts.currSlide))){if(opts.end)
opts.end(opts);return;}
var changed=false;if((manual||!p.cyclePause)&&(opts.nextSlide!=opts.currSlide)){changed=true;var fx=opts.fx;curr.cycleH=curr.cycleH||$(curr).height();curr.cycleW=curr.cycleW||$(curr).width();next.cycleH=next.cycleH||$(next).height();next.cycleW=next.cycleW||$(next).width();if(opts.multiFx){if(opts.lastFx==undefined||++opts.lastFx>=opts.fxs.length)
opts.lastFx=0;fx=opts.fxs[opts.lastFx];opts.currFx=fx;}
if(opts.oneTimeFx){fx=opts.oneTimeFx;opts.oneTimeFx=null;}
$.fn.cycle.resetState(opts,fx);if(opts.before.length)
$.each(opts.before,function(i,o){if(p.cycleStop!=opts.stopCount)return;o.apply(next,[curr,next,opts,fwd]);});var after=function(){$.each(opts.after,function(i,o){if(p.cycleStop!=opts.stopCount)return;o.apply(next,[curr,next,opts,fwd]);});};debug('tx firing; currSlide: '+opts.currSlide+'; nextSlide: '+opts.nextSlide);opts.busy=1;if(opts.fxFn)
opts.fxFn(curr,next,opts,after,fwd,manual&&opts.fastOnEvent);else if($.isFunction($.fn.cycle[opts.fx]))
$.fn.cycle[opts.fx](curr,next,opts,after,fwd,manual&&opts.fastOnEvent);else
$.fn.cycle.custom(curr,next,opts,after,fwd,manual&&opts.fastOnEvent);}
if(changed||opts.nextSlide==opts.currSlide){opts.lastSlide=opts.currSlide;if(opts.random){opts.currSlide=opts.nextSlide;if(++opts.randomIndex==els.length)
opts.randomIndex=0;opts.nextSlide=opts.randomMap[opts.randomIndex];if(opts.nextSlide==opts.currSlide)
opts.nextSlide=(opts.currSlide==opts.slideCount-1)?0:opts.currSlide+1;}
else if(opts.backwards){var roll=(opts.nextSlide-1)<0;if(roll&&opts.bounce){opts.backwards=!opts.backwards;opts.nextSlide=1;opts.currSlide=0;}
else{opts.nextSlide=roll?(els.length-1):opts.nextSlide-1;opts.currSlide=roll?0:opts.nextSlide+1;}}
else{var roll=(opts.nextSlide+1)==els.length;if(roll&&opts.bounce){opts.backwards=!opts.backwards;opts.nextSlide=els.length-2;opts.currSlide=els.length-1;}
else{opts.nextSlide=roll?0:opts.nextSlide+1;opts.currSlide=roll?els.length-1:opts.nextSlide-1;}}}
if(changed&&opts.pager)
opts.updateActivePagerLink(opts.pager,opts.currSlide,opts.activePagerClass);var ms=0;if(opts.timeout&&!opts.continuous)
ms=getTimeout(els[opts.currSlide],els[opts.nextSlide],opts,fwd);else if(opts.continuous&&p.cyclePause)
ms=10;if(ms>0)
p.cycleTimeout=setTimeout(function(){go(els,opts,0,(!opts.rev&&!opts.backwards))},ms);};$.fn.cycle.updateActivePagerLink=function(pager,currSlide,clsName){$(pager).each(function(){$(this).children().removeClass(clsName).eq(currSlide).addClass(clsName);});};function getTimeout(curr,next,opts,fwd){if(opts.timeoutFn){var t=opts.timeoutFn.call(curr,curr,next,opts,fwd);while((t-opts.speed)<250)
t+=opts.speed;debug('calculated timeout: '+t+'; speed: '+opts.speed);if(t!==false)
return t;}
return opts.timeout;};$.fn.cycle.next=function(opts){advance(opts,opts.rev?-1:1);};$.fn.cycle.prev=function(opts){advance(opts,opts.rev?1:-1);};function advance(opts,val){var els=opts.elements;var p=opts.$cont[0],timeout=p.cycleTimeout;if(timeout){clearTimeout(timeout);p.cycleTimeout=0;}
if(opts.random&&val<0){opts.randomIndex--;if(--opts.randomIndex==-2)
opts.randomIndex=els.length-2;else if(opts.randomIndex==-1)
opts.randomIndex=els.length-1;opts.nextSlide=opts.randomMap[opts.randomIndex];}
else if(opts.random){opts.nextSlide=opts.randomMap[opts.randomIndex];}
else{opts.nextSlide=opts.currSlide+val;if(opts.nextSlide<0){if(opts.nowrap)return false;opts.nextSlide=els.length-1;}
else if(opts.nextSlide>=els.length){if(opts.nowrap)return false;opts.nextSlide=0;}}
var cb=opts.onPrevNextEvent||opts.prevNextClick;if($.isFunction(cb))
cb(val>0,opts.nextSlide,els[opts.nextSlide]);go(els,opts,1,val>=0);return false;};function buildPager(els,opts){var $p=$(opts.pager);$.each(els,function(i,o){$.fn.cycle.createPagerAnchor(i,o,$p,els,opts);});opts.updateActivePagerLink(opts.pager,opts.startingSlide,opts.activePagerClass);};$.fn.cycle.createPagerAnchor=function(i,el,$p,els,opts){var a;if($.isFunction(opts.pagerAnchorBuilder)){a=opts.pagerAnchorBuilder(i,el);debug('pagerAnchorBuilder('+i+', el) returned: '+a);}
else
a='<a href="#">'+(i+1)+'</a>';if(!a)
return;var $a=$(a);if($a.parents('body').length===0){var arr=[];if($p.length>1){$p.each(function(){var $clone=$a.clone(true);$(this).append($clone);arr.push($clone[0]);});$a=$(arr);}
else{$a.appendTo($p);}}
opts.pagerAnchors=opts.pagerAnchors||[];opts.pagerAnchors.push($a);$a.bind(opts.pagerEvent,function(e){e.preventDefault();opts.nextSlide=i;var p=opts.$cont[0],timeout=p.cycleTimeout;if(timeout){clearTimeout(timeout);p.cycleTimeout=0;}
var cb=opts.onPagerEvent||opts.pagerClick;if($.isFunction(cb))
cb(opts.nextSlide,els[opts.nextSlide]);go(els,opts,1,opts.currSlide<i);});if(!/^click/.test(opts.pagerEvent)&&!opts.allowPagerClickBubble)
$a.bind('click.cycle',function(){return false;});if(opts.pauseOnPagerHover)
$a.hover(function(){opts.$cont[0].cyclePause++;},function(){opts.$cont[0].cyclePause--;});};$.fn.cycle.hopsFromLast=function(opts,fwd){var hops,l=opts.lastSlide,c=opts.currSlide;if(fwd)
hops=c>l?c-l:opts.slideCount-l;else
hops=c<l?l-c:l+opts.slideCount-c;return hops;};function clearTypeFix($slides){debug('applying clearType background-color hack');function hex(s){s=parseInt(s).toString(16);return s.length<2?'0'+s:s;};function getBg(e){for(;e&&e.nodeName.toLowerCase()!='html';e=e.parentNode){var v=$.css(e,'background-color');if(v.indexOf('rgb')>=0){var rgb=v.match(/\d+/g);return'#'+hex(rgb[0])+hex(rgb[1])+hex(rgb[2]);}
if(v&&v!='transparent')
return v;}
return'#ffffff';};$slides.each(function(){$(this).css('background-color',getBg(this));});};$.fn.cycle.commonReset=function(curr,next,opts,w,h,rev){$(opts.elements).not(curr).hide();opts.cssBefore.opacity=1;opts.cssBefore.display='block';if(w!==false&&next.cycleW>0)
opts.cssBefore.width=next.cycleW;if(h!==false&&next.cycleH>0)
opts.cssBefore.height=next.cycleH;opts.cssAfter=opts.cssAfter||{};opts.cssAfter.display='none';$(curr).css('zIndex',opts.slideCount+(rev===true?1:0));$(next).css('zIndex',opts.slideCount+(rev===true?0:1));};$.fn.cycle.custom=function(curr,next,opts,cb,fwd,speedOverride){var $l=$(curr),$n=$(next);var speedIn=opts.speedIn,speedOut=opts.speedOut,easeIn=opts.easeIn,easeOut=opts.easeOut;$n.css(opts.cssBefore);if(speedOverride){if(typeof speedOverride=='number')
speedIn=speedOut=speedOverride;else
speedIn=speedOut=1;easeIn=easeOut=null;}
var fn=function(){$n.animate(opts.animIn,speedIn,easeIn,cb)};$l.animate(opts.animOut,speedOut,easeOut,function(){if(opts.cssAfter)$l.css(opts.cssAfter);if(!opts.sync)fn();});if(opts.sync)fn();};$.fn.cycle.transitions={fade:function($cont,$slides,opts){$slides.not(':eq('+opts.currSlide+')').css('opacity',0);opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts);opts.cssBefore.opacity=0;});opts.animIn={opacity:1};opts.animOut={opacity:0};opts.cssBefore={top:0,left:0};}};$.fn.cycle.ver=function(){return ver;};$.fn.cycle.defaults={fx:'fade',timeout:4000,timeoutFn:null,continuous:0,speed:1000,speedIn:null,speedOut:null,next:null,prev:null,onPrevNextEvent:null,prevNextEvent:'click.cycle',pager:null,onPagerEvent:null,pagerEvent:'click.cycle',allowPagerClickBubble:false,pagerAnchorBuilder:null,before:null,after:null,end:null,easing:null,easeIn:null,easeOut:null,shuffle:null,animIn:null,animOut:null,cssBefore:null,cssAfter:null,fxFn:null,height:'auto',startingSlide:0,sync:1,random:0,fit:0,containerResize:1,pause:0,pauseOnPagerHover:0,autostop:0,autostopCount:0,delay:0,slideExpr:null,cleartype:!$.support.opacity,cleartypeNoBg:false,nowrap:0,fastOnEvent:0,randomizeEffects:1,rev:0,manualTrump:true,requeueOnImageNotLoaded:true,requeueTimeout:250,activePagerClass:'activeSlide',updateActivePagerLink:null,backwards:false};})(jQuery);(function($){$.fn.cycle.transitions.none=function($cont,$slides,opts){opts.fxFn=function(curr,next,opts,after){$(next).show();$(curr).hide();after();};}
$.fn.cycle.transitions.scrollUp=function($cont,$slides,opts){$cont.css('overflow','hidden');opts.before.push($.fn.cycle.commonReset);var h=$cont.height();opts.cssBefore={top:h,left:0};opts.cssFirst={top:0};opts.animIn={top:0};opts.animOut={top:-h};};$.fn.cycle.transitions.scrollDown=function($cont,$slides,opts){$cont.css('overflow','hidden');opts.before.push($.fn.cycle.commonReset);var h=$cont.height();opts.cssFirst={top:0};opts.cssBefore={top:-h,left:0};opts.animIn={top:0};opts.animOut={top:h};};$.fn.cycle.transitions.scrollLeft=function($cont,$slides,opts){$cont.css('overflow','hidden');opts.before.push($.fn.cycle.commonReset);var w=$cont.width();opts.cssFirst={left:0};opts.cssBefore={left:w,top:0};opts.animIn={left:0};opts.animOut={left:0-w};};$.fn.cycle.transitions.scrollRight=function($cont,$slides,opts){$cont.css('overflow','hidden');opts.before.push($.fn.cycle.commonReset);var w=$cont.width();opts.cssFirst={left:0};opts.cssBefore={left:-w,top:0};opts.animIn={left:0};opts.animOut={left:w};};$.fn.cycle.transitions.scrollHorz=function($cont,$slides,opts){$cont.css('overflow','hidden').width();opts.before.push(function(curr,next,opts,fwd){$.fn.cycle.commonReset(curr,next,opts);opts.cssBefore.left=fwd?(next.cycleW-1):(1-next.cycleW);opts.animOut.left=fwd?-curr.cycleW:curr.cycleW;});opts.cssFirst={left:0};opts.cssBefore={top:0};opts.animIn={left:0};opts.animOut={top:0};};$.fn.cycle.transitions.scrollVert=function($cont,$slides,opts){$cont.css('overflow','hidden');opts.before.push(function(curr,next,opts,fwd){$.fn.cycle.commonReset(curr,next,opts);opts.cssBefore.top=fwd?(1-next.cycleH):(next.cycleH-1);opts.animOut.top=fwd?curr.cycleH:-curr.cycleH;});opts.cssFirst={top:0};opts.cssBefore={left:0};opts.animIn={top:0};opts.animOut={left:0};};$.fn.cycle.transitions.slideX=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$(opts.elements).not(curr).hide();$.fn.cycle.commonReset(curr,next,opts,false,true);opts.animIn.width=next.cycleW;});opts.cssBefore={left:0,top:0,width:0};opts.animIn={width:'show'};opts.animOut={width:0};};$.fn.cycle.transitions.slideY=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$(opts.elements).not(curr).hide();$.fn.cycle.commonReset(curr,next,opts,true,false);opts.animIn.height=next.cycleH;});opts.cssBefore={left:0,top:0,height:0};opts.animIn={height:'show'};opts.animOut={height:0};};$.fn.cycle.transitions.shuffle=function($cont,$slides,opts){var i,w=$cont.css('overflow','visible').width();$slides.css({left:0,top:0});opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,true,true,true);});if(!opts.speedAdjusted){opts.speed=opts.speed/2;opts.speedAdjusted=true;}
opts.random=0;opts.shuffle=opts.shuffle||{left:-w,top:15};opts.els=[];for(i=0;i<$slides.length;i++)
opts.els.push($slides[i]);for(i=0;i<opts.currSlide;i++)
opts.els.push(opts.els.shift());opts.fxFn=function(curr,next,opts,cb,fwd){var $el=fwd?$(curr):$(next);$(next).css(opts.cssBefore);var count=opts.slideCount;$el.animate(opts.shuffle,opts.speedIn,opts.easeIn,function(){var hops=$.fn.cycle.hopsFromLast(opts,fwd);for(var k=0;k<hops;k++)
fwd?opts.els.push(opts.els.shift()):opts.els.unshift(opts.els.pop());if(fwd){for(var i=0,len=opts.els.length;i<len;i++)
$(opts.els[i]).css('z-index',len-i+count);}
else{var z=$(curr).css('z-index');$el.css('z-index',parseInt(z)+1+count);}
$el.animate({left:0,top:0},opts.speedOut,opts.easeOut,function(){$(fwd?this:curr).hide();if(cb)cb();});});};opts.cssBefore={display:'block',opacity:1,top:0,left:0};};$.fn.cycle.transitions.turnUp=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,true,false);opts.cssBefore.top=next.cycleH;opts.animIn.height=next.cycleH;});opts.cssFirst={top:0};opts.cssBefore={left:0,height:0};opts.animIn={top:0};opts.animOut={height:0};};$.fn.cycle.transitions.turnDown=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,true,false);opts.animIn.height=next.cycleH;opts.animOut.top=curr.cycleH;});opts.cssFirst={top:0};opts.cssBefore={left:0,top:0,height:0};opts.animOut={height:0};};$.fn.cycle.transitions.turnLeft=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,false,true);opts.cssBefore.left=next.cycleW;opts.animIn.width=next.cycleW;});opts.cssBefore={top:0,width:0};opts.animIn={left:0};opts.animOut={width:0};};$.fn.cycle.transitions.turnRight=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,false,true);opts.animIn.width=next.cycleW;opts.animOut.left=curr.cycleW;});opts.cssBefore={top:0,left:0,width:0};opts.animIn={left:0};opts.animOut={width:0};};$.fn.cycle.transitions.zoom=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,false,false,true);opts.cssBefore.top=next.cycleH/2;opts.cssBefore.left=next.cycleW/2;opts.animIn={top:0,left:0,width:next.cycleW,height:next.cycleH};opts.animOut={width:0,height:0,top:curr.cycleH/2,left:curr.cycleW/2};});opts.cssFirst={top:0,left:0};opts.cssBefore={width:0,height:0};};$.fn.cycle.transitions.fadeZoom=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,false,false);opts.cssBefore.left=next.cycleW/2;opts.cssBefore.top=next.cycleH/2;opts.animIn={top:0,left:0,width:next.cycleW,height:next.cycleH};});opts.cssBefore={width:0,height:0};opts.animOut={opacity:0};};$.fn.cycle.transitions.blindX=function($cont,$slides,opts){var w=$cont.css('overflow','hidden').width();opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts);opts.animIn.width=next.cycleW;opts.animOut.left=curr.cycleW;});opts.cssBefore={left:w,top:0};opts.animIn={left:0};opts.animOut={left:w};};$.fn.cycle.transitions.blindY=function($cont,$slides,opts){var h=$cont.css('overflow','hidden').height();opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts);opts.animIn.height=next.cycleH;opts.animOut.top=curr.cycleH;});opts.cssBefore={top:h,left:0};opts.animIn={top:0};opts.animOut={top:h};};$.fn.cycle.transitions.blindZ=function($cont,$slides,opts){var h=$cont.css('overflow','hidden').height();var w=$cont.width();opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts);opts.animIn.height=next.cycleH;opts.animOut.top=curr.cycleH;});opts.cssBefore={top:h,left:w};opts.animIn={top:0,left:0};opts.animOut={top:h,left:w};};$.fn.cycle.transitions.growX=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,false,true);opts.cssBefore.left=this.cycleW/2;opts.animIn={left:0,width:this.cycleW};opts.animOut={left:0};});opts.cssBefore={width:0,top:0};};$.fn.cycle.transitions.growY=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,true,false);opts.cssBefore.top=this.cycleH/2;opts.animIn={top:0,height:this.cycleH};opts.animOut={top:0};});opts.cssBefore={height:0,left:0};};$.fn.cycle.transitions.curtainX=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,false,true,true);opts.cssBefore.left=next.cycleW/2;opts.animIn={left:0,width:this.cycleW};opts.animOut={left:curr.cycleW/2,width:0};});opts.cssBefore={top:0,width:0};};$.fn.cycle.transitions.curtainY=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,true,false,true);opts.cssBefore.top=next.cycleH/2;opts.animIn={top:0,height:next.cycleH};opts.animOut={top:curr.cycleH/2,height:0};});opts.cssBefore={left:0,height:0};};$.fn.cycle.transitions.cover=function($cont,$slides,opts){var d=opts.direction||'left';var w=$cont.css('overflow','hidden').width();var h=$cont.height();opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts);if(d=='right')
opts.cssBefore.left=-w;else if(d=='up')
opts.cssBefore.top=h;else if(d=='down')
opts.cssBefore.top=-h;else
opts.cssBefore.left=w;});opts.animIn={left:0,top:0};opts.animOut={opacity:1};opts.cssBefore={top:0,left:0};};$.fn.cycle.transitions.uncover=function($cont,$slides,opts){var d=opts.direction||'left';var w=$cont.css('overflow','hidden').width();var h=$cont.height();opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,true,true,true);if(d=='right')
opts.animOut.left=w;else if(d=='up')
opts.animOut.top=-h;else if(d=='down')
opts.animOut.top=h;else
opts.animOut.left=-w;});opts.animIn={left:0,top:0};opts.animOut={opacity:1};opts.cssBefore={top:0,left:0};};$.fn.cycle.transitions.toss=function($cont,$slides,opts){var w=$cont.css('overflow','visible').width();var h=$cont.height();opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,true,true,true);if(!opts.animOut.left&&!opts.animOut.top)
opts.animOut={left:w*2,top:-h/2,opacity:0};else
opts.animOut.opacity=0;});opts.cssBefore={left:0,top:0};opts.animIn={left:0};};$.fn.cycle.transitions.wipe=function($cont,$slides,opts){var w=$cont.css('overflow','hidden').width();var h=$cont.height();opts.cssBefore=opts.cssBefore||{};var clip;if(opts.clip){if(/l2r/.test(opts.clip))
clip='rect(0px 0px '+h+'px 0px)';else if(/r2l/.test(opts.clip))
clip='rect(0px '+w+'px '+h+'px '+w+'px)';else if(/t2b/.test(opts.clip))
clip='rect(0px '+w+'px 0px 0px)';else if(/b2t/.test(opts.clip))
clip='rect('+h+'px '+w+'px '+h+'px 0px)';else if(/zoom/.test(opts.clip)){var top=parseInt(h/2);var left=parseInt(w/2);clip='rect('+top+'px '+left+'px '+top+'px '+left+'px)';}}
opts.cssBefore.clip=opts.cssBefore.clip||clip||'rect(0px 0px 0px 0px)';var d=opts.cssBefore.clip.match(/(\d+)/g);var t=parseInt(d[0]),r=parseInt(d[1]),b=parseInt(d[2]),l=parseInt(d[3]);opts.before.push(function(curr,next,opts){if(curr==next)return;var $curr=$(curr),$next=$(next);$.fn.cycle.commonReset(curr,next,opts,true,true,false);opts.cssAfter.display='block';var step=1,count=parseInt((opts.speedIn/13))-1;(function f(){var tt=t?t-parseInt(step*(t/count)):0;var ll=l?l-parseInt(step*(l/count)):0;var bb=b<h?b+parseInt(step*((h-b)/count||1)):h;var rr=r<w?r+parseInt(step*((w-r)/count||1)):w;$next.css({clip:'rect('+tt+'px '+rr+'px '+bb+'px '+ll+'px)'});(step++<=count)?setTimeout(f,13):$curr.css('display','none');})();});opts.cssBefore={display:'block',opacity:1,top:0,left:0};opts.animIn={left:0};opts.animOut={left:0};};})(jQuery);var c=0;function slide_automatically(){for(i=1;i<=1000;i++){setTimeout('dowork()',i*5000);}}
function dowork(){var x=$(".black").attr("id");var temp=new Array();temp=x.split('img_');var number=parseInt(temp[1]);var next_number=1;if(number==5){next_number=1;}else{next_number=number+1;}
var next_click="#img_"+next_number;$(next_click).click();}
var isIE=navigator.userAgent.toLowerCase().indexOf("msie")>-1;var isMoz=document.implementation&&document.implementation.createDocument;var isSafari=((navigator.userAgent.toLowerCase().indexOf('safari')!=-1)&&(navigator.userAgent.toLowerCase().indexOf('mac')!=-1))?true:false;function curvyCorners()
{if(typeof(arguments[0])!="object")throw newCurvyError("First parameter of curvyCorners() must be an object.");if(typeof(arguments[1])!="object"&&typeof(arguments[1])!="string")throw newCurvyError("Second parameter of curvyCorners() must be an object or a class name.");if(typeof(arguments[1])=="string")
{var startIndex=0;var boxCol=getElementsByClass(arguments[1]);}
else
{var startIndex=1;var boxCol=arguments;}
var curvyCornersCol=new Array();if(arguments[0].validTags)
var validElements=arguments[0].validTags;else
var validElements=["div"];for(var i=startIndex,j=boxCol.length;i<j;i++)
{var currentTag=boxCol[i].tagName.toLowerCase();if(inArray(validElements,currentTag)!==false)
{curvyCornersCol[curvyCornersCol.length]=new curvyObject(arguments[0],boxCol[i]);}}
this.objects=curvyCornersCol;this.applyCornersToAll=function()
{for(var x=0,k=this.objects.length;x<k;x++)
{this.objects[x].applyCorners();}}}
function curvyObject()
{this.box=arguments[1];this.settings=arguments[0];this.topContainer=null;this.bottomContainer=null;this.masterCorners=new Array();this.contentDIV=null;var boxHeight=get_style(this.box,"height","height");var boxWidth=get_style(this.box,"width","width");var borderWidth=get_style(this.box,"borderTopWidth","border-top-width");var borderColour=get_style(this.box,"borderTopColor","border-top-color");var boxColour=get_style(this.box,"backgroundColor","background-color");var backgroundImage=get_style(this.box,"backgroundImage","background-image");var boxPosition=get_style(this.box,"position","position");var boxPadding=get_style(this.box,"paddingTop","padding-top");this.boxHeight=parseInt(((boxHeight!=""&&boxHeight!="auto"&&boxHeight.indexOf("%")==-1)?boxHeight.substring(0,boxHeight.indexOf("px")):this.box.scrollHeight));this.boxWidth=parseInt(((boxWidth!=""&&boxWidth!="auto"&&boxWidth.indexOf("%")==-1)?boxWidth.substring(0,boxWidth.indexOf("px")):this.box.scrollWidth));this.borderWidth=parseInt(((borderWidth!=""&&borderWidth.indexOf("px")!==-1)?borderWidth.slice(0,borderWidth.indexOf("px")):0));this.boxColour=format_colour(boxColour);this.boxPadding=parseInt(((boxPadding!=""&&boxPadding.indexOf("px")!==-1)?boxPadding.slice(0,boxPadding.indexOf("px")):0));this.borderColour=format_colour(borderColour);this.borderString=this.borderWidth+"px"+" solid "+this.borderColour;this.backgroundImage=((backgroundImage!="none")?backgroundImage:"");this.boxContent=this.box.innerHTML;if(boxPosition!="absolute")this.box.style.position="relative";this.box.style.padding="0px";if(isIE&&boxWidth=="auto"&&boxHeight=="auto")this.box.style.width="100%";if(this.settings.autoPad==true&&this.boxPadding>0)
this.box.innerHTML="";this.applyCorners=function()
{for(var t=0;t<2;t++)
{switch(t)
{case 0:if(this.settings.tl||this.settings.tr)
{var newMainContainer=document.createElement("DIV");newMainContainer.style.width="100%";newMainContainer.style.fontSize="1px";newMainContainer.style.overflow="hidden";newMainContainer.style.position="absolute";newMainContainer.style.paddingLeft=this.borderWidth+"px";newMainContainer.style.paddingRight=this.borderWidth+"px";var topMaxRadius=Math.max(this.settings.tl?this.settings.tl.radius:0,this.settings.tr?this.settings.tr.radius:0);newMainContainer.style.height=topMaxRadius+"px";newMainContainer.style.top=0-topMaxRadius+"px";newMainContainer.style.left=0-this.borderWidth+"px";this.topContainer=this.box.appendChild(newMainContainer);}
break;case 1:if(this.settings.bl||this.settings.br)
{var newMainContainer=document.createElement("DIV");newMainContainer.style.width="100%";newMainContainer.style.fontSize="1px";newMainContainer.style.overflow="hidden";newMainContainer.style.position="absolute";newMainContainer.style.paddingLeft=this.borderWidth+"px";newMainContainer.style.paddingRight=this.borderWidth+"px";var botMaxRadius=Math.max(this.settings.bl?this.settings.bl.radius:0,this.settings.br?this.settings.br.radius:0);newMainContainer.style.height=botMaxRadius+"px";newMainContainer.style.bottom=0-botMaxRadius+"px";newMainContainer.style.left=0-this.borderWidth+"px";this.bottomContainer=this.box.appendChild(newMainContainer);}
break;}}
if(this.topContainer)this.box.style.borderTopWidth="0px";if(this.bottomContainer)this.box.style.borderBottomWidth="0px";var corners=["tr","tl","br","bl"];for(var i in corners)
{if(i>-1<4)
{var cc=corners[i];if(!this.settings[cc])
{if(((cc=="tr"||cc=="tl")&&this.topContainer!=null)||((cc=="br"||cc=="bl")&&this.bottomContainer!=null))
{var newCorner=document.createElement("DIV");newCorner.style.position="relative";newCorner.style.fontSize="1px";newCorner.style.overflow="hidden";if(this.backgroundImage=="")
newCorner.style.backgroundColor=this.boxColour;else
newCorner.style.backgroundImage=this.backgroundImage;switch(cc)
{case"tl":newCorner.style.height=topMaxRadius-this.borderWidth+"px";newCorner.style.marginRight=this.settings.tr.radius-(this.borderWidth*2)+"px";newCorner.style.borderLeft=this.borderString;newCorner.style.borderTop=this.borderString;newCorner.style.left=-this.borderWidth+"px";break;case"tr":newCorner.style.height=topMaxRadius-this.borderWidth+"px";newCorner.style.marginLeft=this.settings.tl.radius-(this.borderWidth*2)+"px";newCorner.style.borderRight=this.borderString;newCorner.style.borderTop=this.borderString;newCorner.style.backgroundPosition="-"+(topMaxRadius+this.borderWidth)+"px 0px";newCorner.style.left=this.borderWidth+"px";break;case"bl":newCorner.style.height=botMaxRadius-this.borderWidth+"px";newCorner.style.marginRight=this.settings.br.radius-(this.borderWidth*2)+"px";newCorner.style.borderLeft=this.borderString;newCorner.style.borderBottom=this.borderString;newCorner.style.left=-this.borderWidth+"px";newCorner.style.backgroundPosition="-"+(this.borderWidth)+"px -"+(this.boxHeight+(botMaxRadius+this.borderWidth))+"px";break;case"br":newCorner.style.height=botMaxRadius-this.borderWidth+"px";newCorner.style.marginLeft=this.settings.bl.radius-(this.borderWidth*2)+"px";newCorner.style.borderRight=this.borderString;newCorner.style.borderBottom=this.borderString;newCorner.style.left=this.borderWidth+"px"
newCorner.style.backgroundPosition="-"+(botMaxRadius+this.borderWidth)+"px -"+(this.boxHeight+(botMaxRadius+this.borderWidth))+"px";break;}}}
else
{if(this.masterCorners[this.settings[cc].radius])
{var newCorner=this.masterCorners[this.settings[cc].radius].cloneNode(true);}
else
{var newCorner=document.createElement("DIV");newCorner.style.height=this.settings[cc].radius+"px";newCorner.style.width=this.settings[cc].radius+"px";newCorner.style.position="absolute";newCorner.style.fontSize="1px";newCorner.style.overflow="hidden";var borderRadius=parseInt(this.settings[cc].radius-this.borderWidth);for(var intx=0,j=this.settings[cc].radius;intx<j;intx++)
{if((intx+1)>=borderRadius)
var y1=-1;else
var y1=(Math.floor(Math.sqrt(Math.pow(borderRadius,2)-Math.pow((intx+1),2)))-1);if(borderRadius!=j)
{if((intx)>=borderRadius)
var y2=-1;else
var y2=Math.ceil(Math.sqrt(Math.pow(borderRadius,2)-Math.pow(intx,2)));if((intx+1)>=j)
var y3=-1;else
var y3=(Math.floor(Math.sqrt(Math.pow(j,2)-Math.pow((intx+1),2)))-1);}
if((intx)>=j)
var y4=-1;else
var y4=Math.ceil(Math.sqrt(Math.pow(j,2)-Math.pow(intx,2)));if(y1>-1)this.drawPixel(intx,0,this.boxColour,100,(y1+1),newCorner,-1,this.settings[cc].radius);if(borderRadius!=j)
{for(var inty=(y1+1);inty<y2;inty++)
{if(this.settings.antiAlias)
{if(this.backgroundImage!="")
{var borderFract=(pixelFraction(intx,inty,borderRadius)*100);if(borderFract<30)
{this.drawPixel(intx,inty,this.borderColour,100,1,newCorner,0,this.settings[cc].radius);}
else
{this.drawPixel(intx,inty,this.borderColour,100,1,newCorner,-1,this.settings[cc].radius);}}
else
{var pixelcolour=BlendColour(this.boxColour,this.borderColour,pixelFraction(intx,inty,borderRadius));this.drawPixel(intx,inty,pixelcolour,100,1,newCorner,0,this.settings[cc].radius,cc);}}}
if(this.settings.antiAlias)
{if(y3>=y2)
{if(y2==-1)y2=0;this.drawPixel(intx,y2,this.borderColour,100,(y3-y2+1),newCorner,0,0);}}
else
{if(y3>=y1)
{this.drawPixel(intx,(y1+1),this.borderColour,100,(y3-y1),newCorner,0,0);}}
var outsideColour=this.borderColour;}
else
{var outsideColour=this.boxColour;var y3=y1;}
if(this.settings.antiAlias)
{for(var inty=(y3+1);inty<y4;inty++)
{this.drawPixel(intx,inty,outsideColour,(pixelFraction(intx,inty,j)*100),1,newCorner,((this.borderWidth>0)?0:-1),this.settings[cc].radius);}}}
this.masterCorners[this.settings[cc].radius]=newCorner.cloneNode(true);}
if(cc!="br")
{for(var t=0,k=newCorner.childNodes.length;t<k;t++)
{var pixelBar=newCorner.childNodes[t];var pixelBarTop=parseInt(pixelBar.style.top.substring(0,pixelBar.style.top.indexOf("px")));var pixelBarLeft=parseInt(pixelBar.style.left.substring(0,pixelBar.style.left.indexOf("px")));var pixelBarHeight=parseInt(pixelBar.style.height.substring(0,pixelBar.style.height.indexOf("px")));if(cc=="tl"||cc=="bl"){pixelBar.style.left=this.settings[cc].radius-pixelBarLeft-1+"px";}
if(cc=="tr"||cc=="tl"){pixelBar.style.top=this.settings[cc].radius-pixelBarHeight-pixelBarTop+"px";}
switch(cc)
{case"tr":pixelBar.style.backgroundPosition="-"+Math.abs((this.boxWidth-this.settings[cc].radius+this.borderWidth)+pixelBarLeft)+"px -"+Math.abs(this.settings[cc].radius-pixelBarHeight-pixelBarTop-this.borderWidth)+"px";break;case"tl":pixelBar.style.backgroundPosition="-"+Math.abs((this.settings[cc].radius-pixelBarLeft-1)-this.borderWidth)+"px -"+Math.abs(this.settings[cc].radius-pixelBarHeight-pixelBarTop-this.borderWidth)+"px";break;case"bl":pixelBar.style.backgroundPosition="-"+Math.abs((this.settings[cc].radius-pixelBarLeft-1)-this.borderWidth)+"px -"+Math.abs((this.boxHeight+this.settings[cc].radius+pixelBarTop)-this.borderWidth)+"px";break;}}}}
if(newCorner)
{switch(cc)
{case"tl":if(newCorner.style.position=="absolute")newCorner.style.top="0px";if(newCorner.style.position=="absolute")newCorner.style.left="0px";if(this.topContainer)this.topContainer.appendChild(newCorner);break;case"tr":if(newCorner.style.position=="absolute")newCorner.style.top="0px";if(newCorner.style.position=="absolute")newCorner.style.right="0px";if(this.topContainer)this.topContainer.appendChild(newCorner);break;case"bl":if(newCorner.style.position=="absolute")newCorner.style.bottom="0px";if(newCorner.style.position=="absolute")newCorner.style.left="0px";if(this.bottomContainer)this.bottomContainer.appendChild(newCorner);break;case"br":if(newCorner.style.position=="absolute")newCorner.style.bottom="0px";if(newCorner.style.position=="absolute")newCorner.style.right="0px";if(this.bottomContainer)this.bottomContainer.appendChild(newCorner);break;}}}}
var radiusDiff=new Array();radiusDiff["t"]=Math.abs(this.settings.tl.radius-this.settings.tr.radius)
radiusDiff["b"]=Math.abs(this.settings.bl.radius-this.settings.br.radius);for(z in radiusDiff)
{if(z=="t"||z=="b")
{if(radiusDiff[z])
{var smallerCornerType=((this.settings[z+"l"].radius<this.settings[z+"r"].radius)?z+"l":z+"r");var newFiller=document.createElement("DIV");newFiller.style.height=radiusDiff[z]+"px";newFiller.style.width=this.settings[smallerCornerType].radius+"px"
newFiller.style.position="absolute";newFiller.style.fontSize="1px";newFiller.style.overflow="hidden";newFiller.style.backgroundColor=this.boxColour;switch(smallerCornerType)
{case"tl":newFiller.style.bottom="0px";newFiller.style.left="0px";newFiller.style.borderLeft=this.borderString;this.topContainer.appendChild(newFiller);break;case"tr":newFiller.style.bottom="0px";newFiller.style.right="0px";newFiller.style.borderRight=this.borderString;this.topContainer.appendChild(newFiller);break;case"bl":newFiller.style.top="0px";newFiller.style.left="0px";newFiller.style.borderLeft=this.borderString;this.bottomContainer.appendChild(newFiller);break;case"br":newFiller.style.top="0px";newFiller.style.right="0px";newFiller.style.borderRight=this.borderString;this.bottomContainer.appendChild(newFiller);break;}}
var newFillerBar=document.createElement("DIV");newFillerBar.style.position="relative";newFillerBar.style.fontSize="1px";newFillerBar.style.overflow="hidden";newFillerBar.style.backgroundColor=this.boxColour;newFillerBar.style.backgroundImage=this.backgroundImage;switch(z)
{case"t":if(this.topContainer)
{if(this.settings.tl.radius&&this.settings.tr.radius)
{newFillerBar.style.height=topMaxRadius-this.borderWidth+"px";newFillerBar.style.marginLeft=this.settings.tl.radius-this.borderWidth+"px";newFillerBar.style.marginRight=this.settings.tr.radius-this.borderWidth+"px";newFillerBar.style.borderTop=this.borderString;if(this.backgroundImage!="")
newFillerBar.style.backgroundPosition="-"+(topMaxRadius+this.borderWidth)+"px 0px";this.topContainer.appendChild(newFillerBar);}
this.box.style.backgroundPosition="0px -"+(topMaxRadius-this.borderWidth)+"px";}
break;case"b":if(this.bottomContainer)
{if(this.settings.bl.radius&&this.settings.br.radius)
{newFillerBar.style.height=botMaxRadius-this.borderWidth+"px";newFillerBar.style.marginLeft=this.settings.bl.radius-this.borderWidth+"px";newFillerBar.style.marginRight=this.settings.br.radius-this.borderWidth+"px";newFillerBar.style.borderBottom=this.borderString;if(this.backgroundImage!="")
newFillerBar.style.backgroundPosition="-"+(botMaxRadius+this.borderWidth)+"px -"+(this.boxHeight+(topMaxRadius+this.borderWidth))+"px";this.bottomContainer.appendChild(newFillerBar);}}
break;}}}
if(this.settings.autoPad==true&&this.boxPadding>0)
{var contentContainer=document.createElement("DIV");contentContainer.style.position="relative";contentContainer.innerHTML=this.boxContent;contentContainer.className="autoPadDiv";var topPadding=Math.abs(topMaxRadius-this.boxPadding);var botPadding=Math.abs(botMaxRadius-this.boxPadding);if(topMaxRadius<this.boxPadding)
contentContainer.style.paddingTop=topPadding+"px";if(botMaxRadius<this.boxPadding)
contentContainer.style.paddingBottom=botMaxRadius+"px";contentContainer.style.paddingLeft=this.boxPadding+"px";contentContainer.style.paddingRight=this.boxPadding+"px";this.contentDIV=this.box.appendChild(contentContainer);}}
this.drawPixel=function(intx,inty,colour,transAmount,height,newCorner,image,cornerRadius)
{var pixel=document.createElement("DIV");pixel.style.height=height+"px";pixel.style.width="1px";pixel.style.position="absolute";pixel.style.fontSize="1px";pixel.style.overflow="hidden";var topMaxRadius=Math.max(this.settings["tr"].radius,this.settings["tl"].radius);if(image==-1&&this.backgroundImage!="")
{pixel.style.backgroundImage=this.backgroundImage;pixel.style.backgroundPosition="-"+(this.boxWidth-(cornerRadius-intx)+this.borderWidth)+"px -"+((this.boxHeight+topMaxRadius+inty)-this.borderWidth)+"px";}
else
{pixel.style.backgroundColor=colour;}
if(transAmount!=100)
setOpacity(pixel,transAmount);pixel.style.top=inty+"px";pixel.style.left=intx+"px";newCorner.appendChild(pixel);}}
function insertAfter(parent,node,referenceNode)
{parent.insertBefore(node,referenceNode.nextSibling);}
function BlendColour(Col1,Col2,Col1Fraction)
{var red1=parseInt(Col1.substr(1,2),16);var green1=parseInt(Col1.substr(3,2),16);var blue1=parseInt(Col1.substr(5,2),16);var red2=parseInt(Col2.substr(1,2),16);var green2=parseInt(Col2.substr(3,2),16);var blue2=parseInt(Col2.substr(5,2),16);if(Col1Fraction>1||Col1Fraction<0)Col1Fraction=1;var endRed=Math.round((red1*Col1Fraction)+(red2*(1-Col1Fraction)));if(endRed>255)endRed=255;if(endRed<0)endRed=0;var endGreen=Math.round((green1*Col1Fraction)+(green2*(1-Col1Fraction)));if(endGreen>255)endGreen=255;if(endGreen<0)endGreen=0;var endBlue=Math.round((blue1*Col1Fraction)+(blue2*(1-Col1Fraction)));if(endBlue>255)endBlue=255;if(endBlue<0)endBlue=0;return"#"+IntToHex(endRed)+IntToHex(endGreen)+IntToHex(endBlue);}
function IntToHex(strNum)
{base=strNum/16;rem=strNum%16;base=base-(rem/16);baseS=MakeHex(base);remS=MakeHex(rem);return baseS+''+remS;}
function MakeHex(x)
{if((x>=0)&&(x<=9))
{return x;}
else
{switch(x)
{case 10:return"A";case 11:return"B";case 12:return"C";case 13:return"D";case 14:return"E";case 15:return"F";}}}
function pixelFraction(x,y,r)
{var pixelfraction=0;var xvalues=new Array(1);var yvalues=new Array(1);var point=0;var whatsides="";var intersect=Math.sqrt((Math.pow(r,2)-Math.pow(x,2)));if((intersect>=y)&&(intersect<(y+1)))
{whatsides="Left";xvalues[point]=0;yvalues[point]=intersect-y;point=point+1;}
var intersect=Math.sqrt((Math.pow(r,2)-Math.pow(y+1,2)));if((intersect>=x)&&(intersect<(x+1)))
{whatsides=whatsides+"Top";xvalues[point]=intersect-x;yvalues[point]=1;point=point+1;}
var intersect=Math.sqrt((Math.pow(r,2)-Math.pow(x+1,2)));if((intersect>=y)&&(intersect<(y+1)))
{whatsides=whatsides+"Right";xvalues[point]=1;yvalues[point]=intersect-y;point=point+1;}
var intersect=Math.sqrt((Math.pow(r,2)-Math.pow(y,2)));if((intersect>=x)&&(intersect<(x+1)))
{whatsides=whatsides+"Bottom";xvalues[point]=intersect-x;yvalues[point]=0;}
switch(whatsides)
{case"LeftRight":pixelfraction=Math.min(yvalues[0],yvalues[1])+((Math.max(yvalues[0],yvalues[1])-Math.min(yvalues[0],yvalues[1]))/2);break;case"TopRight":pixelfraction=1-(((1-xvalues[0])*(1-yvalues[1]))/2);break;case"TopBottom":pixelfraction=Math.min(xvalues[0],xvalues[1])+((Math.max(xvalues[0],xvalues[1])-Math.min(xvalues[0],xvalues[1]))/2);break;case"LeftBottom":pixelfraction=(yvalues[0]*xvalues[1])/2;break;default:pixelfraction=1;}
return pixelfraction;}
function rgb2Hex(rgbColour)
{try{var rgbArray=rgb2Array(rgbColour);var red=parseInt(rgbArray[0]);var green=parseInt(rgbArray[1]);var blue=parseInt(rgbArray[2]);var hexColour="#"+IntToHex(red)+IntToHex(green)+IntToHex(blue);}
catch(e){alert("There was an error converting the RGB value to Hexadecimal in function rgb2Hex");}
return hexColour;}
function rgb2Array(rgbColour)
{var rgbValues=rgbColour.substring(4,rgbColour.indexOf(")"));var rgbArray=rgbValues.split(", ");return rgbArray;}
function setOpacity(obj,opacity)
{opacity=(opacity==100)?99.999:opacity;if(isSafari&&obj.tagName!="IFRAME")
{var rgbArray=rgb2Array(obj.style.backgroundColor);var red=parseInt(rgbArray[0]);var green=parseInt(rgbArray[1]);var blue=parseInt(rgbArray[2]);obj.style.backgroundColor="rgba("+red+", "+green+", "+blue+", "+opacity/100+")";}
else if(typeof(obj.style.opacity)!="undefined")
{obj.style.opacity=opacity/100;}
else if(typeof(obj.style.MozOpacity)!="undefined")
{obj.style.MozOpacity=opacity/100;}
else if(typeof(obj.style.filter)!="undefined")
{obj.style.filter="alpha(opacity:"+opacity+")";}
else if(typeof(obj.style.KHTMLOpacity)!="undefined")
{obj.style.KHTMLOpacity=opacity/100;}}
function inArray(array,value)
{for(var i=0;i<array.length;i++){if(array[i]===value)return i;}
return false;}
function inArrayKey(array,value)
{for(key in array){if(key===value)return true;}
return false;}
function addEvent(elm,evType,fn,useCapture){if(elm.addEventListener){elm.addEventListener(evType,fn,useCapture);return true;}
else if(elm.attachEvent){var r=elm.attachEvent('on'+evType,fn);return r;}
else{elm['on'+evType]=fn;}}
function removeEvent(obj,evType,fn,useCapture){if(obj.removeEventListener){obj.removeEventListener(evType,fn,useCapture);return true;}else if(obj.detachEvent){var r=obj.detachEvent("on"+evType,fn);return r;}else{alert("Handler could not be removed");}}
function format_colour(colour)
{var returnColour="#ffffff";if(colour!=""&&colour!="transparent")
{if(colour.substr(0,3)=="rgb")
{returnColour=rgb2Hex(colour);}
else if(colour.length==4)
{returnColour="#"+colour.substring(1,2)+colour.substring(1,2)+colour.substring(2,3)+colour.substring(2,3)+colour.substring(3,4)+colour.substring(3,4);}
else
{returnColour=colour;}}
return returnColour;}
function get_style(obj,property,propertyNS)
{try
{if(obj.currentStyle)
{var returnVal=eval("obj.currentStyle."+property);}
else
{if(isSafari&&obj.style.display=="none")
{obj.style.display="";var wasHidden=true;}
var returnVal=document.defaultView.getComputedStyle(obj,'').getPropertyValue(propertyNS);if(isSafari&&wasHidden)
{obj.style.display="none";}}}
catch(e)
{}
return returnVal;}
function getElementsByClass(searchClass,node,tag)
{var classElements=new Array();if(node==null)
node=document;if(tag==null)
tag='*';var els=node.getElementsByTagName(tag);var elsLen=els.length;var pattern=new RegExp("(^|\s)"+searchClass+"(\s|$)");for(i=0,j=0;i<elsLen;i++)
{if(pattern.test(els[i].className))
{classElements[j]=els[i];j++;}}
return classElements;}
function newCurvyError(errorMessage)
{return new Error("curvyCorners Error:\n"+errorMessage)}
window.onload=function()
{settings={tl:{radius:5},tr:{radius:1},bl:{radius:5},br:{radius:1},antiAlias:true,autoPad:true,validTags:["div"]}
var myBoxObject=new curvyCorners(settings,"myBox");myBoxObject.applyCornersToAll();settings={tl:{radius:1},tr:{radius:5},bl:{radius:1},br:{radius:5},antiAlias:true,autoPad:true,validTags:["div"]}
var myBoxObject=new curvyCorners(settings,"myBox1");myBoxObject.applyCornersToAll();settings={tl:{radius:3},tr:{radius:3},bl:{radius:3},br:{radius:3},antiAlias:true,autoPad:true,validTags:["div"]}
var myBoxObject=new curvyCorners(settings,"myBox2");myBoxObject.applyCornersToAll();}
