/*
 * jCarousel - Riding carousels with jQuery
 *   http://sorgalla.com/jcarousel/
 *
 * Copyright (c) 2006 Jan Sorgalla (http://sorgalla.com)
 * Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php)
 * and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.
 *
 * Built on top of the jQuery library
 *   http://jquery.com
 *
 * Inspired by the "Carousel Component" by Bill Scott
 *   http://billwscott.com/carousel/
 */
(function(A){var D={vertical:false,rtl:false,start:1,offset:1,size:null,scroll:3,visible:null,animation:"normal",easing:"swing",auto:0,wrap:null,initCallback:null,reloadCallback:null,itemLoadCallback:null,itemFirstInCallback:null,itemFirstOutCallback:null,itemLastInCallback:null,itemLastOutCallback:null,itemVisibleInCallback:null,itemVisibleOutCallback:null,buttonNextHTML:"<div></div>",buttonPrevHTML:"<div></div>",buttonNextEvent:"click",buttonPrevEvent:"click",buttonNextCallback:null,buttonPrevCallback:null,itemFallbackDimension:null},C=false;
A(window).bind("load.jcarousel",function(){C=true
});
A.jcarousel=function(M,K){this.options=A.extend({},D,K||{});
this.autoStopped=this.locked=false;
this.buttonPrevState=this.buttonNextState=this.buttonPrev=this.buttonNext=this.list=this.clip=this.container=null;
if(!K||K.rtl===undefined){this.options.rtl=(A(M).attr("dir")||A("html").attr("dir")||"").toLowerCase()=="rtl"
}this.wh=!this.options.vertical?"width":"height";
this.lt=!this.options.vertical?this.options.rtl?"right":"left":"top";
for(var L="",J=M.className.split(" "),H=0;
H<J.length;
H++){if(J[H].indexOf("jcarousel-skin")!=-1){A(M).removeClass(J[H]);
L=J[H];
break
}}if(M.nodeName.toUpperCase()=="UL"||M.nodeName.toUpperCase()=="OL"){this.list=A(M);
this.container=this.list.parent();
if(this.container.hasClass("jcarousel-clip")){if(!this.container.parent().hasClass("jcarousel-container")){this.container=this.container.wrap("<div></div>")
}this.container=this.container.parent()
}else{if(!this.container.hasClass("jcarousel-container")){this.container=this.list.wrap("<div></div>").parent()
}}}else{this.container=A(M);
this.list=this.container.find("ul,ol").eq(0)
}L!==""&&this.container.parent()[0].className.indexOf("jcarousel-skin")==-1&&this.container.wrap('<div class=" '+L+'"></div>');
this.clip=this.list.parent();
if(!this.clip.length||!this.clip.hasClass("jcarousel-clip")){this.clip=this.list.wrap("<div></div>").parent()
}this.buttonNext=A(".jcarousel-next",this.container);
if(this.buttonNext.size()===0&&this.options.buttonNextHTML!==null){this.buttonNext=this.clip.after(this.options.buttonNextHTML).next()
}this.buttonNext.addClass(this.className("jcarousel-next"));
this.buttonPrev=A(".jcarousel-prev",this.container);
if(this.buttonPrev.size()===0&&this.options.buttonPrevHTML!==null){this.buttonPrev=this.clip.after(this.options.buttonPrevHTML).next()
}this.buttonPrev.addClass(this.className("jcarousel-prev"));
this.clip.addClass(this.className("jcarousel-clip")).css({overflow:"hidden",position:"relative"});
this.list.addClass(this.className("jcarousel-list")).css({overflow:"hidden",position:"relative",top:0,margin:0,padding:0}).css(this.options.rtl?"right":"left",0);
this.container.addClass(this.className("jcarousel-container")).css({position:"relative"});
!this.options.vertical&&this.options.rtl&&this.container.addClass("jcarousel-direction-rtl").attr("dir","rtl");
var F=this.options.visible!==null?Math.ceil(this.clipping()/this.options.visible):null;
L=this.list.children("li");
var I=this;
if(L.size()>0){var G=0,E=this.options.offset;
L.each(function(){I.format(this,E++);
G+=I.dimension(this,F)
});
this.list.css(this.wh,G+100+"px");
if(!K||K.size===undefined){this.options.size=L.size()
}}this.container.css("display","block");
this.buttonNext.css("display","block");
this.buttonPrev.css("display","block");
this.funcNext=function(){I.next()
};
this.funcPrev=function(){I.prev()
};
this.funcResize=function(){I.reload()
};
this.options.initCallback!==null&&this.options.initCallback(this,"init");
if(!C&&A.browser.safari){this.buttons(false,false);
A(window).bind("load.jcarousel",function(){I.setup()
})
}else{this.setup()
}};
var B=A.jcarousel;
B.fn=B.prototype={jcarousel:"0.2.7"};
B.fn.extend=B.extend=A.extend;
B.fn.extend({setup:function(){this.prevLast=this.prevFirst=this.last=this.first=null;
this.animating=false;
this.tail=this.timer=null;
this.inTail=false;
if(!this.locked){this.list.css(this.lt,this.pos(this.options.offset)+"px");
var E=this.pos(this.options.start,true);
this.prevFirst=this.prevLast=null;
this.animate(E,false);
A(window).unbind("resize.jcarousel",this.funcResize).bind("resize.jcarousel",this.funcResize)
}},reset:function(){this.list.empty();
this.list.css(this.lt,"0px");
this.list.css(this.wh,"10px");
this.options.initCallback!==null&&this.options.initCallback(this,"reset");
this.setup()
},reload:function(){this.tail!==null&&this.inTail&&this.list.css(this.lt,B.intval(this.list.css(this.lt))+this.tail);
this.tail=null;
this.inTail=false;
this.options.reloadCallback!==null&&this.options.reloadCallback(this);
if(this.options.visible!==null){var F=this,H=Math.ceil(this.clipping()/this.options.visible),E=0,G=0;
this.list.children("li").each(function(I){E+=F.dimension(this,H);
if(I+1<F.first){G=E
}});
this.list.css(this.wh,E+"px");
this.list.css(this.lt,-G+"px")
}this.scroll(this.first,false)
},lock:function(){this.locked=true;
this.buttons()
},unlock:function(){this.locked=false;
this.buttons()
},size:function(E){if(E!==undefined){this.options.size=E;
this.locked||this.buttons()
}return this.options.size
},has:function(F,H){if(H===undefined||!H){H=F
}if(this.options.size!==null&&H>this.options.size){H=this.options.size
}for(var E=F;
E<=H;
E++){var G=this.get(E);
if(!G.length||G.hasClass("jcarousel-item-placeholder")){return false
}}return true
},get:function(E){return A(".jcarousel-item-"+E,this.list)
},add:function(F,K){var E=this.get(F),J=0,H=A(K);
if(E.length===0){var G,I=B.intval(F);
for(E=this.create(F);
;
){G=this.get(--I);
if(I<=0||G.length){I<=0?this.list.prepend(E):G.after(E);
break
}}}else{J=this.dimension(E)
}if(H.get(0).nodeName.toUpperCase()=="LI"){E.replaceWith(H);
E=H
}else{E.empty().append(K)
}this.format(E.removeClass(this.className("jcarousel-item-placeholder")),F);
H=this.options.visible!==null?Math.ceil(this.clipping()/this.options.visible):null;
J=this.dimension(E,H)-J;
F>0&&F<this.first&&this.list.css(this.lt,B.intval(this.list.css(this.lt))-J+"px");
this.list.css(this.wh,B.intval(this.list.css(this.wh))+J+"px");
return E
},remove:function(F){var G=this.get(F);
if(!(!G.length||F>=this.first&&F<=this.last)){var E=this.dimension(G);
F<this.first&&this.list.css(this.lt,B.intval(this.list.css(this.lt))+E+"px");
G.remove();
this.list.css(this.wh,B.intval(this.list.css(this.wh))-E+"px")
}},next:function(){this.tail!==null&&!this.inTail?this.scrollTail(false):this.scroll((this.options.wrap=="both"||this.options.wrap=="last")&&this.options.size!==null&&this.last==this.options.size?1:this.first+this.options.scroll)
},prev:function(){this.tail!==null&&this.inTail?this.scrollTail(true):this.scroll((this.options.wrap=="both"||this.options.wrap=="first")&&this.options.size!==null&&this.first==1?this.options.size:this.first-this.options.scroll)
},scrollTail:function(E){if(!(this.locked||this.animating||!this.tail)){this.pauseAuto();
var F=B.intval(this.list.css(this.lt));
F=!E?F-this.tail:F+this.tail;
this.inTail=!E;
this.prevFirst=this.first;
this.prevLast=this.last;
this.animate(F)
}},scroll:function(E,F){if(!(this.locked||this.animating)){this.pauseAuto();
this.animate(this.pos(E),F)
}},pos:function(R,P){var Q=B.intval(this.list.css(this.lt));
if(this.locked||this.animating){return Q
}if(this.options.wrap!="circular"){R=R<1?1:this.options.size&&R>this.options.size?this.options.size:R
}for(var O=this.first>R,M=this.options.wrap!="circular"&&this.first<=1?1:this.first,K=O?this.get(M):this.get(this.last),N=O?M:M-1,L=null,J=0,I=false,H=0;
O?--N>=R:++N<R;
){L=this.get(N);
I=!L.length;
if(L.length===0){L=this.create(N).addClass(this.className("jcarousel-item-placeholder"));
K[O?"before":"after"](L);
if(this.first!==null&&this.options.wrap=="circular"&&this.options.size!==null&&(N<=0||N>this.options.size)){K=this.get(this.index(N));
if(K.length){L=this.add(N,K.clone(true))
}}}K=L;
H=this.dimension(L);
if(I){J+=H
}if(this.first!==null&&(this.options.wrap=="circular"||N>=1&&(this.options.size===null||N<=this.options.size))){Q=O?Q+H:Q-H
}}M=this.clipping();
var E=[],F=0,G=0;
K=this.get(R-1);
for(N=R;
++F;
){L=this.get(N);
I=!L.length;
if(L.length===0){L=this.create(N).addClass(this.className("jcarousel-item-placeholder"));
K.length===0?this.list.prepend(L):K[O?"before":"after"](L);
if(this.first!==null&&this.options.wrap=="circular"&&this.options.size!==null&&(N<=0||N>this.options.size)){K=this.get(this.index(N));
if(K.length){L=this.add(N,K.clone(true))
}}}K=L;
H=this.dimension(L);
if(H===0){throw Error("jCarousel: No width/height set for items. This will cause an infinite loop. Aborting...")
}if(this.options.wrap!="circular"&&this.options.size!==null&&N>this.options.size){E.push(L)
}else{if(I){J+=H
}}G+=H;
if(G>=M){break
}N++
}for(L=0;
L<E.length;
L++){E[L].remove()
}if(J>0){this.list.css(this.wh,this.dimension(this.list)+J+"px");
if(O){Q-=J;
this.list.css(this.lt,B.intval(this.list.css(this.lt))-J+"px")
}}J=R+F-1;
if(this.options.wrap!="circular"&&this.options.size&&J>this.options.size){J=this.options.size
}if(N>J){F=0;
N=J;
for(G=0;
++F;
){L=this.get(N--);
if(!L.length){break
}G+=this.dimension(L);
if(G>=M){break
}}}N=J-F+1;
if(this.options.wrap!="circular"&&N<1){N=1
}if(this.inTail&&O){Q+=this.tail;
this.inTail=false
}this.tail=null;
if(this.options.wrap!="circular"&&J==this.options.size&&J-F+1>=1){O=B.margin(this.get(J),!this.options.vertical?"marginRight":"marginBottom");
if(G-O>M){this.tail=G-M-O
}}if(P&&R===this.options.size&&this.tail){Q-=this.tail;
this.inTail=true
}for(;
R-->N;
){Q+=this.dimension(this.get(R))
}this.prevFirst=this.first;
this.prevLast=this.last;
this.first=N;
this.last=J;
return Q
},animate:function(F,H){if(!(this.locked||this.animating)){this.animating=true;
var E=this,G=function(){E.animating=false;
F===0&&E.list.css(E.lt,0);
if(!E.autoStopped&&(E.options.wrap=="circular"||E.options.wrap=="both"||E.options.wrap=="last"||E.options.size===null||E.last<E.options.size||E.last==E.options.size&&E.tail!==null&&!E.inTail)){E.startAuto()
}E.buttons();
E.notify("onAfterAnimation");
if(E.options.wrap=="circular"&&E.options.size!==null){for(var I=E.prevFirst;
I<=E.prevLast;
I++){if(I!==null&&!(I>=E.first&&I<=E.last)&&(I<1||I>E.options.size)){E.remove(I)
}}}};
this.notify("onBeforeAnimation");
if(!this.options.animation||H===false){this.list.css(this.lt,F+"px");
G()
}else{this.list.animate(!this.options.vertical?this.options.rtl?{right:F}:{left:F}:{top:F},this.options.animation,this.options.easing,G)
}}},startAuto:function(E){if(E!==undefined){this.options.auto=E
}if(this.options.auto===0){return this.stopAuto()
}if(this.timer===null){this.autoStopped=false;
var F=this;
this.timer=window.setTimeout(function(){F.next()
},this.options.auto*1000)
}},stopAuto:function(){this.pauseAuto();
this.autoStopped=true
},pauseAuto:function(){if(this.timer!==null){window.clearTimeout(this.timer);
this.timer=null
}},buttons:function(F,G){if(F==null){F=!this.locked&&this.options.size!==0&&(this.options.wrap&&this.options.wrap!="first"||this.options.size===null||this.last<this.options.size);
if(!this.locked&&(!this.options.wrap||this.options.wrap=="first")&&this.options.size!==null&&this.last>=this.options.size){F=this.tail!==null&&!this.inTail
}}if(G==null){G=!this.locked&&this.options.size!==0&&(this.options.wrap&&this.options.wrap!="last"||this.first>1);
if(!this.locked&&(!this.options.wrap||this.options.wrap=="last")&&this.options.size!==null&&this.first==1){G=this.tail!==null&&this.inTail
}}var E=this;
if(this.buttonNext.size()>0){this.buttonNext.unbind(this.options.buttonNextEvent+".jcarousel",this.funcNext);
F&&this.buttonNext.bind(this.options.buttonNextEvent+".jcarousel",this.funcNext);
this.buttonNext[F?"removeClass":"addClass"](this.className("jcarousel-next-disabled")).attr("disabled",F?false:true);
this.options.buttonNextCallback!==null&&this.buttonNext.data("jcarouselstate")!=F&&this.buttonNext.each(function(){E.options.buttonNextCallback(E,this,F)
}).data("jcarouselstate",F)
}else{this.options.buttonNextCallback!==null&&this.buttonNextState!=F&&this.options.buttonNextCallback(E,null,F)
}if(this.buttonPrev.size()>0){this.buttonPrev.unbind(this.options.buttonPrevEvent+".jcarousel",this.funcPrev);
G&&this.buttonPrev.bind(this.options.buttonPrevEvent+".jcarousel",this.funcPrev);
this.buttonPrev[G?"removeClass":"addClass"](this.className("jcarousel-prev-disabled")).attr("disabled",G?false:true);
this.options.buttonPrevCallback!==null&&this.buttonPrev.data("jcarouselstate")!=G&&this.buttonPrev.each(function(){E.options.buttonPrevCallback(E,this,G)
}).data("jcarouselstate",G)
}else{this.options.buttonPrevCallback!==null&&this.buttonPrevState!=G&&this.options.buttonPrevCallback(E,null,G)
}this.buttonNextState=F;
this.buttonPrevState=G
},notify:function(E){var F=this.prevFirst===null?"init":this.prevFirst<this.first?"next":"prev";
this.callback("itemLoadCallback",E,F);
if(this.prevFirst!==this.first){this.callback("itemFirstInCallback",E,F,this.first);
this.callback("itemFirstOutCallback",E,F,this.prevFirst)
}if(this.prevLast!==this.last){this.callback("itemLastInCallback",E,F,this.last);
this.callback("itemLastOutCallback",E,F,this.prevLast)
}this.callback("itemVisibleInCallback",E,F,this.first,this.last,this.prevFirst,this.prevLast);
this.callback("itemVisibleOutCallback",E,F,this.prevFirst,this.prevLast,this.first,this.last)
},callback:function(N,L,M,K,I,G,J){if(!(this.options[N]==null||typeof this.options[N]!="object"&&L!="onAfterAnimation")){var H=typeof this.options[N]=="object"?this.options[N][L]:this.options[N];
if(A.isFunction(H)){var F=this;
if(K===undefined){H(F,M,L)
}else{if(I===undefined){this.get(K).each(function(){H(F,this,K,M,L)
})
}else{N=function(O){F.get(O).each(function(){H(F,this,O,M,L)
})
};
for(var E=K;
E<=I;
E++){E!==null&&!(E>=G&&E<=J)&&N(E)
}}}}}},create:function(E){return this.format("<li></li>",E)
},format:function(F,H){F=A(F);
for(var E=F.get(0).className.split(" "),G=0;
G<E.length;
G++){E[G].indexOf("jcarousel-")!=-1&&F.removeClass(E[G])
}F.addClass(this.className("jcarousel-item")).addClass(this.className("jcarousel-item-"+H)).css({"float":this.options.rtl?"right":"left","list-style":"none"}).attr("jcarouselindex",H);
return F
},className:function(E){return E+" "+E+(!this.options.vertical?"-horizontal":"-vertical")
},dimension:function(F,H){var E=F.jquery!==undefined?F[0]:F,G=!this.options.vertical?(E.offsetWidth||B.intval(this.options.itemFallbackDimension))+B.margin(E,"marginLeft")+B.margin(E,"marginRight"):(E.offsetHeight||B.intval(this.options.itemFallbackDimension))+B.margin(E,"marginTop")+B.margin(E,"marginBottom");
if(H==null||G==H){return G
}G=!this.options.vertical?H-B.margin(E,"marginLeft")-B.margin(E,"marginRight"):H-B.margin(E,"marginTop")-B.margin(E,"marginBottom");
A(E).css(this.wh,G+"px");
return this.dimension(E)
},clipping:function(){return !this.options.vertical?this.clip[0].offsetWidth-B.intval(this.clip.css("borderLeftWidth"))-B.intval(this.clip.css("borderRightWidth")):this.clip[0].offsetHeight-B.intval(this.clip.css("borderTopWidth"))-B.intval(this.clip.css("borderBottomWidth"))
},index:function(E,F){if(F==null){F=this.options.size
}return Math.round(((E-1)/F-Math.floor((E-1)/F))*F)+1
}});
B.extend({defaults:function(E){return A.extend(D,E||{})
},margin:function(F,J){if(!F){return 0
}var E=F.jquery!==undefined?F[0]:F;
if(J=="marginRight"&&A.browser.safari){var I={display:"block","float":"none",width:"auto"},H,G;
A.swap(E,I,function(){H=E.offsetWidth
});
I.marginRight=0;
A.swap(E,I,function(){G=E.offsetWidth
});
return G-H
}return B.intval(A.css(E,J))
},intval:function(E){E=parseInt(E,10);
return isNaN(E)?0:E
}});
A.fn.jcarousel=function(F){if(typeof F=="string"){var G=A(this).data("jcarousel"),E=Array.prototype.slice.call(arguments,1);
return G[F].apply(G,E)
}else{return this.each(function(){A(this).data("jcarousel",new B(this,F))
})
}}
})(jQuery);
(function(B){function A(D,C){function E(G){G=B[D][G]||[];
return typeof G=="string"?G.split(/,?\s+/):G
}var F=E("getter");
return B.inArray(C,F)!=-1
}B.fn.jPlayer=function(D){var C=typeof D=="string",E=Array.prototype.slice.call(arguments,1);
if(C&&D.substring(0,1)=="_"){return this
}if(C&&A("jPlayer",D,E)){var F=B.data(this[0],"jPlayer");
return F?F[D].apply(F,E):undefined
}return this.each(function(){var G=B.data(this,"jPlayer");
!G&&!C&&B.data(this,"jPlayer",new B.jPlayer(this,D))._init();
G&&C&&B.isFunction(G[D])&&G[D].apply(G,E)
})
};
B.jPlayer=function(D,C){this.options=B.extend({},C);
this.element=B(D)
};
B.jPlayer.getter="jPlayerOnProgressChange jPlayerOnSoundComplete jPlayerVolume jPlayerReady getData jPlayerController";
B.jPlayer.defaults={cssPrefix:"jqjp",swfPath:"js",volume:80,oggSupport:false,nativeSupport:true,customCssIds:false,graphicsFix:true,errorAlerts:false,warningAlerts:false,position:"absolute",width:"0",height:"0",top:"0",left:"0",quality:"high",bgcolor:"#ffffff"};
B.jPlayer._config={version:"1.1.1",swfVersionRequired:"1.1.0",swfVersion:"unknown",jPlayerControllerId:undefined,delayedCommandId:undefined,isWaitingForPlay:false,isFileSet:false};
B.jPlayer._diag={isPlaying:false,src:"",loadPercent:0,playedPercentRelative:0,playedPercentAbsolute:0,playedTime:0,totalTime:0};
B.jPlayer._cssId={play:"jplayer_play",pause:"jplayer_pause",stop:"jplayer_stop",loadBar:"jplayer_load_bar",playBar:"jplayer_play_bar",volumeMin:"jplayer_volume_min",volumeMax:"jplayer_volume_max",volumeBar:"jplayer_volume_bar",volumeBarValue:"jplayer_volume_bar_value"};
B.jPlayer.count=0;
B.jPlayer.timeFormat={showHour:false,showMin:true,showSec:true,padHour:false,padMin:true,padSec:true,sepHour:":",sepMin:":",sepSec:""};
B.jPlayer.convertTime=function(D){var C=new Date(D),E=C.getUTCHours();
D=C.getUTCMinutes();
C=C.getUTCSeconds();
E=B.jPlayer.timeFormat.padHour&&E<10?"0"+E:E;
D=B.jPlayer.timeFormat.padMin&&D<10?"0"+D:D;
C=B.jPlayer.timeFormat.padSec&&C<10?"0"+C:C;
return(B.jPlayer.timeFormat.showHour?E+B.jPlayer.timeFormat.sepHour:"")+(B.jPlayer.timeFormat.showMin?D+B.jPlayer.timeFormat.sepMin:"")+(B.jPlayer.timeFormat.showSec?C+B.jPlayer.timeFormat.sepSec:"")
};
B.jPlayer.prototype={_init:function(){var D=this,C=this.element;
this.config=B.extend({},B.jPlayer.defaults,this.options,B.jPlayer._config);
this.config.diag=B.extend({},B.jPlayer._diag);
this.config.cssId={};
this.config.cssSelector={};
this.config.cssDisplay={};
this.config.clickHandler={};
this.element.data("jPlayer.config",this.config);
B.extend(this.config,{id:this.element.attr("id"),swf:this.config.swfPath+(this.config.swfPath!=""&&this.config.swfPath.slice(-1)!="/"?"/":"")+"Jplayer.swf",fid:this.config.cssPrefix+"_flash_"+B.jPlayer.count,aid:this.config.cssPrefix+"_audio_"+B.jPlayer.count,hid:this.config.cssPrefix+"_force_"+B.jPlayer.count,i:B.jPlayer.count,volume:this._limitValue(this.config.volume,0,100)});
B.jPlayer.count++;
if(this.config.ready!=undefined){if(B.isFunction(this.config.ready)){this.jPlayerReadyCustom=this.config.ready
}else{this._warning("Constructor's ready option is not a function.")
}}try{this.config.audio=new Audio;
this.config.audio.id=this.config.aid;
this.element.append(this.config.audio)
}catch(H){this.config.audio={}
}B.extend(this.config,{canPlayMP3:!!(this.config.audio.canPlayType?""!=this.config.audio.canPlayType("audio/mpeg")&&"no"!=this.config.audio.canPlayType("audio/mpeg"):false),canPlayOGG:!!(this.config.audio.canPlayType?""!=this.config.audio.canPlayType("audio/ogg")&&"no"!=this.config.audio.canPlayType("audio/ogg"):false),aSel:B("#"+this.config.aid)});
B.extend(this.config,{html5:!!(this.config.oggSupport?this.config.canPlayOGG?true:this.config.canPlayMP3:this.config.canPlayMP3)});
B.extend(this.config,{usingFlash:!(this.config.html5&&this.config.nativeSupport),usingMP3:!(this.config.oggSupport&&this.config.canPlayOGG&&this.config.nativeSupport)});
var I={setButtons:function(J,K){D.config.diag.isPlaying=K;
if(D.config.cssId.play!=undefined&&D.config.cssId.pause!=undefined){if(K){D.config.cssSelector.play.css("display","none");
D.config.cssSelector.pause.css("display",D.config.cssDisplay.pause)
}else{D.config.cssSelector.play.css("display",D.config.cssDisplay.play);
D.config.cssSelector.pause.css("display","none")
}}if(K){D.config.isWaitingForPlay=false
}}},G={setFile:function(K,L){try{D._getMovie().fl_setFile_mp3(L);
D.config.diag.src=L;
D.config.isFileSet=true;
C.trigger("jPlayer.setButtons",false)
}catch(J){D._flashError(J)
}},clearFile:function(){try{C.trigger("jPlayer.setButtons",false);
D._getMovie().fl_clearFile_mp3();
D.config.diag.src="";
D.config.isFileSet=false
}catch(J){D._flashError(J)
}},play:function(){try{D._getMovie().fl_play_mp3()&&C.trigger("jPlayer.setButtons",true)
}catch(J){D._flashError(J)
}},pause:function(){try{D._getMovie().fl_pause_mp3()&&C.trigger("jPlayer.setButtons",false)
}catch(J){D._flashError(J)
}},stop:function(){try{D._getMovie().fl_stop_mp3()&&C.trigger("jPlayer.setButtons",false)
}catch(J){D._flashError(J)
}},playHead:function(K,L){try{D._getMovie().fl_play_head_mp3(L)&&C.trigger("jPlayer.setButtons",true)
}catch(J){D._flashError(J)
}},playHeadTime:function(K,L){try{D._getMovie().fl_play_head_time_mp3(L)&&C.trigger("jPlayer.setButtons",true)
}catch(J){D._flashError(J)
}},volume:function(K,L){D.config.volume=L;
try{D._getMovie().fl_volume_mp3(L)
}catch(J){D._flashError(J)
}}},E={setFile:function(K,L,J){D.config.audio=new Audio;
D.config.audio.id=D.config.aid;
D.config.aSel.replaceWith(D.config.audio);
D.config.aSel=B("#"+D.config.aid);
D.config.diag.src=D.config.usingMP3?L:J;
D.config.isWaitingForPlay=true;
D.config.isFileSet=true;
C.trigger("jPlayer.setButtons",false);
D.jPlayerOnProgressChange(0,0,0,0,0);
clearInterval(D.config.jPlayerControllerId);
D.config.audio.addEventListener("canplay",function(){D.config.audio.volume=D.config.volume/100
},false)
},clearFile:function(){D.setFile("","");
D.config.isWaitingForPlay=false;
D.config.isFileSet=false
},play:function(){if(D.config.isFileSet){if(D.config.isWaitingForPlay){D.config.audio.src=D.config.diag.src
}D.config.audio.play();
C.trigger("jPlayer.setButtons",true);
clearInterval(D.config.jPlayerControllerId);
D.config.jPlayerControllerId=window.setInterval(function(){D.jPlayerController(false)
},100);
clearInterval(D.config.delayedCommandId)
}},pause:function(){if(D.config.isFileSet){D.config.audio.pause();
C.trigger("jPlayer.setButtons",false)
}},stop:function(){if(D.config.isFileSet){try{D.config.audio.currentTime=0;
C.trigger("jPlayer.pause");
clearInterval(D.config.jPlayerControllerId);
D.config.jPlayerControllerId=window.setInterval(function(){D.jPlayerController(true)
},100)
}catch(J){clearInterval(D.config.delayedCommandId);
D.config.delayedCommandId=window.setTimeout(function(){D.stop()
},100)
}}},playHead:function(K,L){if(D.config.isFileSet){try{D.config.audio.currentTime=typeof D.config.audio.buffered=="object"&&D.config.audio.buffered.length>0?L*D.config.audio.buffered.end(D.config.audio.buffered.length-1)/100:L*D.config.audio.duration/100;
C.trigger("jPlayer.play")
}catch(J){clearInterval(D.config.delayedCommandId);
D.config.delayedCommandId=window.setTimeout(function(){D.playHead(L)
},100)
}}},playHeadTime:function(K,L){if(D.config.isFileSet){try{D.config.audio.currentTime=L/1000;
C.trigger("jPlayer.play")
}catch(J){clearInterval(D.config.delayedCommandId);
D.config.delayedCommandId=window.setTimeout(function(){D.playHeadTime(L)
},100)
}}},volume:function(J,K){D.config.volume=K;
D.config.audio.volume=K/100;
D.jPlayerVolume(K)
}};
this.config.usingFlash?B.extend(I,G):B.extend(I,E);
for(var F in I){G="jPlayer."+F;
this.element.unbind(G);
this.element.bind(G,I[F])
}if(this.config.usingFlash){if(this._checkForFlash(8)){if(B.browser.msie){F='<object id="'+this.config.fid+'"';
F+=' classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"';
F+=' codebase="'+document.URL.substring(0,document.URL.indexOf(":"))+'://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab"';
F+=' type="application/x-shockwave-flash"';
F+=' width="'+this.config.width+'" height="'+this.config.height+'">';
F+="</object>";
I=[];
I[0]='<param name="movie" value="'+this.config.swf+'" />';
I[1]='<param name="quality" value="high" />';
I[2]='<param name="FlashVars" value="id='+escape(this.config.id)+"&fid="+escape(this.config.fid)+"&vol="+this.config.volume+'" />';
I[3]='<param name="allowScriptAccess" value="always" />';
I[4]='<param name="bgcolor" value="'+this.config.bgcolor+'" />';
F=document.createElement(F);
for(G=0;
G<I.length;
G++){F.appendChild(document.createElement(I[G]))
}this.element.html(F)
}else{I='<embed name="'+this.config.fid+'" id="'+this.config.fid+'" src="'+this.config.swf+'"';
I+=' width="'+this.config.width+'" height="'+this.config.height+'" bgcolor="'+this.config.bgcolor+'"';
I+=' quality="high" FlashVars="id='+escape(this.config.id)+"&fid="+escape(this.config.fid)+"&vol="+this.config.volume+'"';
I+=' allowScriptAccess="always"';
I+=' type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />';
this.element.html(I)
}}else{this.element.html("<p>Flash 8 or above is not installed. <a href='http://get.adobe.com/flashplayer'>Get Flash!</a></p>")
}}this.element.css({position:this.config.position,top:this.config.top,left:this.config.left});
if(this.config.graphicsFix){this.element.append('<div id="'+this.config.hid+'"></div>');
B.extend(this.config,{hSel:B("#"+this.config.hid)});
this.config.hSel.css({"text-indent":"-9999px"})
}this.config.customCssIds||B.each(B.jPlayer._cssId,function(J,K){D.cssId(J,K)
});
if(!this.config.usingFlash){this.element.css({left:"-9999px"});
window.setTimeout(function(){D.volume(D.config.volume);
D.jPlayerReady()
},100)
}},jPlayerReady:function(C){if(this.config.usingFlash){this.config.swfVersion=C;
this.config.swfVersionRequired!=this.config.swfVersion&&this._error("jPlayer's JavaScript / SWF version mismatch!\n\nJavaScript requires SWF : "+this.config.swfVersionRequired+"\nThe Jplayer.swf used is : "+this.config.swfVersion)
}else{this.config.swfVersion="n/a"
}this.jPlayerReadyCustom()
},jPlayerReadyCustom:function(){},setFile:function(D,C){this.element.trigger("jPlayer.setFile",[D,C])
},clearFile:function(){this.element.trigger("jPlayer.clearFile")
},play:function(){this.element.trigger("jPlayer.play")
},pause:function(){this.element.trigger("jPlayer.pause")
},stop:function(){this.element.trigger("jPlayer.stop")
},playHead:function(C){this.element.trigger("jPlayer.playHead",[C])
},playHeadTime:function(C){this.element.trigger("jPlayer.playHeadTime",[C])
},volume:function(C){C=this._limitValue(C,0,100);
this.element.trigger("jPlayer.volume",[C])
},cssId:function(D,C){var E=this;
if(typeof C=="string"){if(B.jPlayer._cssId[D]){this.config.cssId[D]!=undefined&&this.config.cssSelector[D].unbind("click",this.config.clickHandler[D]);
this.config.cssId[D]=C;
this.config.cssSelector[D]=B("#"+C);
this.config.clickHandler[D]=function(F){E[D](F);
B(this).blur();
return false
};
this.config.cssSelector[D].click(this.config.clickHandler[D]);
this.config.cssDisplay[D]=this.config.cssSelector[D].css("display");
D=="pause"&&this.config.cssSelector[D].css("display","none")
}else{this._warning("Unknown/Illegal function in cssId\n\njPlayer('cssId', '"+D+"', '"+C+"')")
}}else{this._warning("cssId CSS Id must be a string\n\njPlayer('cssId', '"+D+"', "+C+")")
}},loadBar:function(D){if(this.config.cssId.loadBar!=undefined){var C=this.config.cssSelector.loadBar.offset();
D=D.pageX-C.left;
C=this.config.cssSelector.loadBar.width();
this.playHead(100*D/C)
}},playBar:function(C){this.loadBar(C)
},onProgressChange:function(C){if(B.isFunction(C)){this.onProgressChangeCustom=C
}else{this._warning("onProgressChange parameter is not a function.")
}},onProgressChangeCustom:function(){},jPlayerOnProgressChange:function(D,C,F,G,E){this.config.diag.loadPercent=D;
this.config.diag.playedPercentRelative=C;
this.config.diag.playedPercentAbsolute=F;
this.config.diag.playedTime=G;
this.config.diag.totalTime=E;
this.config.cssId.loadBar!=undefined&&this.config.cssSelector.loadBar.width(D+"%");
this.config.cssId.playBar!=undefined&&this.config.cssSelector.playBar.width(C+"%");
this.onProgressChangeCustom(D,C,F,G,E);
this._forceUpdate()
},jPlayerController:function(D){var C=0,G=0,H=0,F=0,E=0;
if(this.config.audio.readyState>=1){C=this.config.audio.currentTime*1000;
G=this.config.audio.duration*1000;
G=isNaN(G)?0:G;
H=G>0?100*C/G:0;
if(typeof this.config.audio.buffered=="object"&&this.config.audio.buffered.length>0){F=100*this.config.audio.buffered.end(this.config.audio.buffered.length-1)/this.config.audio.duration;
E=100*this.config.audio.currentTime/this.config.audio.buffered.end(this.config.audio.buffered.length-1)
}else{F=100;
E=H
}}if(this.config.audio.ended){clearInterval(this.config.jPlayerControllerId);
this.jPlayerOnSoundComplete()
}else{!this.config.diag.isPlaying&&F>=100&&clearInterval(this.config.jPlayerControllerId)
}D?this.jPlayerOnProgressChange(F,0,0,0,G):this.jPlayerOnProgressChange(F,E,H,C,G)
},volumeMin:function(){this.volume(0)
},volumeMax:function(){this.volume(100)
},volumeBar:function(D){if(this.config.cssId.volumeBar!=undefined){var C=this.config.cssSelector.volumeBar.offset();
D=D.pageX-C.left;
C=this.config.cssSelector.volumeBar.width();
this.volume(100*D/C)
}},volumeBarValue:function(C){this.volumeBar(C)
},jPlayerVolume:function(C){if(this.config.cssId.volumeBarValue!=null){this.config.cssSelector.volumeBarValue.width(C+"%");
this._forceUpdate()
}},onSoundComplete:function(C){if(B.isFunction(C)){this.onSoundCompleteCustom=C
}else{this._warning("onSoundComplete parameter is not a function.")
}},onSoundCompleteCustom:function(){},jPlayerOnSoundComplete:function(){this.element.trigger("jPlayer.setButtons",false);
this.onSoundCompleteCustom()
},getData:function(D){for(var C=D.split("."),E=this.config,F=0;
F<C.length;
F++){if(E[C[F]]!=undefined){E=E[C[F]]
}else{this._warning("Undefined data requested.\n\njPlayer('getData', '"+D+"')");
return 
}}return E
},_getMovie:function(){return document[this.config.fid]
},_checkForFlash:function(D){var C=false,E;
if(window.ActiveXObject){try{new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+D);
C=true
}catch(F){}}else{if(navigator.plugins&&navigator.mimeTypes.length>0){if(E=navigator.plugins["Shockwave Flash"]){if(navigator.plugins["Shockwave Flash"].description.replace(/.*\s(\d+\.\d+).*/,"$1")>=D){C=true
}}}}return C
},_forceUpdate:function(){this.config.graphicsFix&&this.config.hSel.text(""+Math.random())
},_limitValue:function(D,C,E){return D<C?C:D>E?E:D
},_flashError:function(C){this._error("Problem with Flash component.\n\nCheck the swfPath points at the Jplayer.swf path.\n\nswfPath = "+this.config.swfPath+"\nurl: "+this.config.swf+"\n\nError: "+C.message)
},_error:function(C){this.config.errorAlerts&&this._alert("Error!\n\n"+C)
},_warning:function(C){this.config.warningAlerts&&this._alert("Warning!\n\n"+C)
},_alert:function(C){alert("jPlayer "+this.config.version+" : id='"+this.config.id+"' : "+C)
}}
})(jQuery);
(function(A){A.address=function(){var Ai=function(B){A(A.address).trigger(A.extend(A.Event(B),function(){for(var C={},F=A.address.parameterNames(),D=0,E=F.length;
D<E;
D++){C[F[D]]=A.address.parameter(F[D])
}return{value:A.address.value(),path:A.address.path(),pathNames:A.address.pathNames(),parameterNames:F,parameters:C,queryString:A.address.queryString()}
}.call(A.address)))
},Ag=function(C,B,D){A(A.address).bind(C,B,D);
return A.address
},AS=function(){return Ae.pushState&&typeof A1.state!==An
},AL=function(){return"/"+A0.pathname.replace(new RegExp(A1.state),"")+A0.search+(AM()?"#"+AM():"")
},AM=function(){var B=A0.href.indexOf("#");
return B!=-1?AR(A0.href.substr(B+1),Aw):""
},Al=function(){return AS()?AL():AM()
},Am=function(){return"javascript"
},Ab=function(C,B){if(A1.strict){C=B?C.substr(0,1)!="/"?"/"+C:C:C==""?"/":C
}return C
},AR=function(C,B){if(A1.crawlable&&B){return(C!=""?"!":"")+C
}return C.replace(/^\!/,"")
},AQ=function(C,B){return parseInt(C.css(B),10)
},AT=function(C){for(var B,F,D=0,E=C.childNodes.length;
D<E;
D++){if(C.childNodes[D].src){B=String(C.childNodes[D].src)
}if(F=AT(C.childNodes[D])){B=F
}}return B
},AH=function(){if(!AD){var C=Al(),B=Az!=C;
if(AP&&At<523){if(AK!=Ae.length){AK=Ae.length;
if(typeof AN[AK-1]!=An){Az=AN[AK-1]
}AJ(Aw)
}}else{if(B){if(AO&&At<7){A0.reload()
}else{AO&&At<8&&A1.history&&Aj(w,50);
Az=C;
AJ(Aw)
}}}}},AJ=function(B){Ai(A2);
Ai(B?Ac:AU);
Aj(L,10)
},L=function(){if(A1.tracker!=="null"&&A1.tracker!==null){var C=A.isFunction(A1.tracker)?A1.tracker:Ay[A1.tracker],B=(A0.pathname+A0.search+(A.address&&!AS()?A.address.value():"")).replace(/\/\//,"/").replace(/^\/$/,"");
if(A.isFunction(C)){C(B)
}else{if(A.isFunction(Ay.urchinTracker)){Ay.urchinTracker(B)
}else{if(typeof Ay.pageTracker!=An&&A.isFunction(Ay.pageTracker._trackPageview)){Ay.pageTracker._trackPageview(B)
}else{typeof Ay._gaq!=An&&A.isFunction(Ay._gaq.push)&&Ay._gaq.push(["_trackPageview",B])
}}}}},w=function(){var B=Am()+":"+Aw+";document.open();document.writeln('<html><head><title>"+Av.title+"</title><script>var "+As+' = "'+Al()+(Av.domain!=A0.host?'";document.domain="'+Av.domain:"")+"\";<\/script></head></html>');document.close();";
if(At<7){Au.src=B
}else{Au.contentWindow.location.replace(B)
}},AV=function(){if(AG&&Ad!=-1){var C,B=AG.substr(Ad+1).split("&");
for(Ap=0;
Ap<B.length;
Ap++){C=B[Ap].split("=");
if(/^(autoUpdate|crawlable|history|strict|wrap)$/.test(C[0])){A1[C[0]]=isNaN(C[1])?/^(true|yes)$/i.test(C[1]):parseInt(C[1],10)!==0
}if(/^(state|tracker)$/.test(C[0])){A1[C[0]]=C[1]
}}AG=null
}Az=Al()
},Af=function(){if(!P){P=Ax;
AV();
var B=A("body").ajaxComplete(function(){AZ.call(this);
AB.call(this)
}).trigger("ajaxComplete");
if(A1.wrap){A("body > *").wrapAll('<div style="padding:'+(AQ(B,"marginTop")+AQ(B,"paddingTop"))+"px "+(AQ(B,"marginRight")+AQ(B,"paddingRight"))+"px "+(AQ(B,"marginBottom")+AQ(B,"paddingBottom"))+"px "+(AQ(B,"marginLeft")+AQ(B,"paddingLeft"))+'px;" />').parent().wrap('<div id="'+As+'" style="height:100%; overflow:auto;'+(AP?window.statusbar.visible&&!/chrome/i.test(i)?"":" resize:both;":"")+'" />');
A("html, body").css({height:"100%",margin:0,padding:0,overflow:"hidden"});
AP&&A('<style type="text/css" />').appendTo("head").text("#"+As+"::-webkit-resizer { background-color: #fff; }")
}if(AO&&At<8){B=Av.getElementsByTagName("frameset")[0];
Au=Av.createElement((B?"":"i")+"frame");
if(B){B.insertAdjacentElement("beforeEnd",Au);
B[B.cols?"cols":"rows"]+=",0";
Au.noResize=Ax;
Au.frameBorder=Au.frameSpacing=0
}else{Au.style.display="none";
Au.style.width=Au.style.height=0;
Au.tabIndex=-1;
Av.body.insertAdjacentElement("afterBegin",Au)
}Aj(function(){A(Au).bind("load",function(){var C=Au.contentWindow;
Az=typeof C[As]!=An?C[As]:"";
if(Az!=Al()){AJ(Aw);
A0.hash=AR(Az,Ax)
}});
typeof Au.contentWindow[As]==An&&w()
},50)
}else{if(AP){if(At<418){A(Av.body).append('<form id="'+As+'" style="position:absolute;top:-9999px;" method="get"></form>');
f=Av.getElementById(As)
}if(typeof A0[As]==An){A0[As]={}
}if(typeof A0[As][A0.pathname]!=An){AN=A0[As][A0.pathname].split(",")
}}}Aj(function(){Ai("init");
AJ(Aw)
},1);
if(!AS()){if(AO&&At>7||!AO&&"on"+AF in Ay){if(Ay.addEventListener){Ay.addEventListener(AF,AH,false)
}else{Ay.attachEvent&&Ay.attachEvent("on"+AF,AH)
}}else{Aq(AH,50)
}}}},AZ=function(){var C,B=A("a"),E=B.size(),D=-1;
Aj(function(){if(++D!=E){C=A(B.get(D));
C.is("[rel*=address:]")&&C.address();
Aj(arguments.callee,1)
}},1)
},Aa=function(){if(Az!=Al()){Az=Al();
AJ(Aw)
}},AE=function(){if(Ay.removeEventListener){Ay.removeEventListener(AF,AH,false)
}else{Ay.detachEvent&&Ay.detachEvent("on"+AF,AH)
}},AB=function(){var B=A0.pathname.replace(/\/$/,"");
A("body").html().indexOf("_escaped_fragment_")!=-1&&A("a[href]:not([href^=http]), , a[href*="+document.domain+"]",this).each(function(){var C=A(this).attr("href").replace(/^http:/,"").replace(new RegExp(B+"/?$"),"");
if(C==""||C.indexOf("_escaped_fragment_")!=-1){A(this).attr("href","#"+this.decode(C.replace(/\/(.*)\?_escaped_fragment_=(.*)$/,"!$2")))
}})
},AI=function(B){return encodeURIComponent(B).replace(/%20/g,"+")
},AW=function(B){return B.split("#")[0].split("?")[0]
},b=function(C){C=AW(C);
var B=C.replace(/\/{2,9}/g,"/").split("/");
if(C.substr(0,1)=="/"||C.length===0){B.splice(0,1)
}C.substr(C.length-1,1)=="/"&&B.splice(B.length-1,1);
return B
},AC=function(B){B=B.split("?");
return B.slice(1,B.length).join("?").split("#")[0]
},Ah=function(C,B){if(B=AC(B)){params=B.split("&");
B=[];
for(Ap=0;
Ap<params.length;
Ap++){var D=params[Ap].split("=");
D[0]==C&&B.push(D.slice(1).join("="))
}if(B.length!==0){return B.length!=1?B:B[0]
}}},AX=function(C){var B=AC(C);
C=[];
if(B&&B.indexOf("=")!=-1){B=B.split("&");
for(var E=0;
E<B.length;
E++){var D=B[E].split("=")[0];
A.inArray(D,C)==-1&&C.push(D)
}}return C
},h=function(B){B=B.split("#");
return B.slice(1,B.length).join("#")
},As="jQueryAddress",An="undefined",AF="hashchange",A2="change",Ac="internalChange",AU="externalChange",Ax=true,Aw=false,A1={autoUpdate:Ax,crawlable:Aw,history:Ax,strict:Ax,wrap:Aw},Ao=A.browser,At=parseFloat(A.browser.version),Ak=Ao.mozilla,AO=Ao.msie,AY=Ao.opera,AP=Ao.webkit,c=Aw,Ay=function(){try{return top.document!==undefined?top:window
}catch(B){return window
}}(),Av=Ay.document,Ae=Ay.history,A0=Ay.location,Aq=setInterval,Aj=setTimeout,i=navigator.userAgent,Au,f,AG=AT(document),Ad=AG?AG.indexOf("?"):-1,a=Av.title,AK=Ae.length,AD=Aw,P=Aw,Q=Ax,q=Ax,AA=Aw,AN=[],Az=Al();
if(AO){At=parseFloat(i.substr(i.indexOf("MSIE")+4));
if(Av.documentMode&&Av.documentMode!=At){At=Av.documentMode!=8?7:8
}A(document).bind("propertychange",function(){if(Av.title!=a&&Av.title.indexOf("#"+Al())!=-1){Av.title=a
}})
}if(c=Ak&&At>=1||AO&&At>=6||AY&&At>=9.5||AP&&At>=312){for(var Ap=1;
Ap<AK;
Ap++){AN.push("")
}AN.push(Az);
if(AY){history.navigationMode="compatible"
}if(document.readyState=="complete"){var Ar=setInterval(function(){if(A.address){Af();
clearInterval(Ar)
}},50)
}else{AV();
A(Af)
}Ao=AL();
if(typeof A1.state!==An){if(Ae.pushState){Ao.substr(0,3)=="/#/"&&A0.replace(A1.state.replace(/^\/$/,"")+Ao.substr(2))
}else{Ao!="/"&&Ao.replace(/^\/#/,"")!=AM()&&A0.replace(A1.state.replace(/^\/$/,"")+"/#"+Ao)
}}A(window).bind("popstate",Aa).bind("unload",AE)
}else{!c&&AM()!=""||AP&&At<418&&AM()!=""&&A0.search!=""?A0.replace(A0.href.substr(0,A0.href.indexOf("#"))):L()
}return{bind:function(C,B,D){return Ag(C,B,D)
},init:function(B){return Ag("init",B)
},change:function(B){return Ag(A2,B)
},internalChange:function(B){return Ag(Ac,B)
},externalChange:function(B){return Ag(AU,B)
},baseURL:function(){var B=A0.href;
if(B.indexOf("#")!=-1){B=B.substr(0,B.indexOf("#"))
}if(/\/$/.test(B)){B=B.substr(0,B.length-1)
}return B
},autoUpdate:function(B){if(B!==undefined){A1.autoUpdate=B;
return this
}return A1.autoUpdate
},crawlable:function(B){if(B!==undefined){A1.crawlable=B;
return this
}return A1.crawlable
},history:function(B){if(B!==undefined){A1.history=B;
return this
}return A1.history
},state:function(B){if(B!==undefined){A1.state=B;
return this
}return A1.state
},strict:function(B){if(B!==undefined){A1.strict=B;
return this
}return A1.strict
},tracker:function(B){if(B!==undefined){A1.tracker=B;
return this
}return A1.tracker
},wrap:function(B){if(B!==undefined){A1.wrap=B;
return this
}return A1.wrap
},update:function(){AA=Ax;
this.value(Az);
AA=Aw;
return this
},encode:function(D){var C=b(D),I=AX(D),F=AC(D),H=h(D),G=D.substr(0,1),B=D.substr(D.length-1),E="";
A.each(C,function(J,K){E+="/"+AI(K)
});
if(F!==""){E+="?";
if(I.length===0){E+=F
}else{A.each(I,function(J,K){J=Ah(K,D);
if(typeof J!=="string"){A.each(J,function(N,M){E+=AI(K)+"="+AI(M)+"&"
})
}else{E+=AI(K)+"="+AI(J)+"&"
}});
E=E.substr(0,E.length-1)
}}if(H!==""){E+="#"+AI(H)
}if(G!="/"&&E.substr(0,1)=="/"){E=E.substr(1)
}if(/#|&|\?/.test(B)){E+=B
}return E
},decode:function(B){return decodeURIComponent(B.replace(/\+/g,"%20"))
},title:function(B){if(B!==undefined){Aj(function(){a=Av.title=B;
if(q&&Au&&Au.contentWindow&&Au.contentWindow.document){Au.contentWindow.document.title=B;
q=Aw
}if(!Q&&Ak){A0.replace(A0.href.indexOf("#")!=-1?A0.href:A0.href+"#")
}Q=Aw
},50);
return this
}return Av.title
},value:function(C){if(C!==undefined){C=Ab(this.encode(C),Ax);
if(C=="/"){C=""
}if(Az==C&&!AA){return 
}Q=Ax;
Az=C;
if(A1.autoUpdate||AA){AJ(Ax);
if(AS()){Ae[A1.history?"pushState":"replaceState"]({},"",A1.state.replace(/\/$/,"")+(Az==""?"/":Az))
}else{AD=Ax;
AN[Ae.length]=Az;
if(AP){if(A1.history){A0[As][A0.pathname]=AN.toString();
AK=Ae.length+1;
if(At<418){if(A0.search==""){f.action="#"+AR(Az,Ax);
f.submit()
}}else{if(At<523||Az==""){C=Av.createEvent("MouseEvents");
C.initEvent("click",Ax,Ax);
var B=Av.createElement("a");
B.href="#"+AR(Az,Ax);
B.dispatchEvent(C)
}else{A0.hash="#"+AR(Az,Ax)
}}}else{A0.replace("#"+AR(Az,Ax))
}}else{if(Az!=Al()){if(A1.history){A0.hash="#"+AR(Az,Ax)
}else{A0.replace("#"+AR(Az,Ax))
}}}AO&&At<8&&A1.history&&Aj(w,50);
if(AP){Aj(function(){AD=Aw
},1)
}else{AD=Aw
}}}return this
}if(!c){return null
}return Ab(this.decode(Az),Aw)
},path:function(C){if(C!==undefined){var B=this.queryString(),D=this.hash();
this.value(C+(B?"?"+B:"")+(D?"#"+D:""));
return this
}return AW(this.value())
},pathNames:function(){return b(this.value())
},queryString:function(C){if(C!==undefined){var B=this.hash();
this.value(this.path()+(C?"?"+C:"")+(B?"#"+B:""));
return this
}return AC(this.value())
},parameter:function(I,H,F){var D,B;
if(H!==undefined){var E=this.parameterNames();
B=[];
for(D=0;
D<E.length;
D++){var G=E[D],C=this.parameter(G);
if(typeof C=="string"){C=[C]
}if(G==I){C=H===null||H===""?[]:F?C.concat([H]):[H]
}for(var J=0;
J<C.length;
J++){B.push(G+"="+C[J])
}}A.inArray(I,E)==-1&&H!==null&&H!==""&&B.push(I+"="+H);
this.queryString(B.join("&"));
return this
}return Ah(I,this.value())
},parameterNames:function(){return AX(this.value())
},hash:function(B){if(B!==undefined){this.value(this.value().split("#")[0]+(B?"#"+B:""));
return this
}return h(this.value())
}}
}();
A.fn.address=function(B){if(!A(this).attr("address")){var C=function(D){if(A(this).is("a")){var E=B?B.call(this):/address:/.test(A(this).attr("rel"))?A(this).attr("rel").split("address:")[1].split(" ")[0]:typeof A.address.state()!=="undefined"&&A.address.state()!="/"?A(this).attr("href").replace(new RegExp("^(.*"+A.address.state()+"|\\.)"),""):A(this).attr("href").replace(/^(#\!?|\.)/,"");
A.address.value(E);
D.preventDefault()
}};
A(this).click(C).live("click",C).submit(function(D){if(A(this).is("form")){var E=B?B.call(this):A(this).attr("action")+"?"+A.address.decode(A(this).serialize());
A.address.value(E);
D.preventDefault()
}}).attr("address",true)
}return this
}
})(jQuery);
jQuery.address.tracker(function(){});
jQuery.easing.jswing=jQuery.easing.swing;
jQuery.extend(jQuery.easing,{def:"easeOutQuad",swing:function(B,C,A,E,D){return jQuery.easing[jQuery.easing.def](B,C,A,E,D)
},easeInQuad:function(B,C,A,E,D){return E*(C/=D)*C+A
},easeOutQuad:function(B,C,A,E,D){return -E*(C/=D)*(C-2)+A
},easeInOutQuad:function(B,C,A,E,D){if((C/=D/2)<1){return E/2*C*C+A
}return -E/2*((--C)*(C-2)-1)+A
},easeInCubic:function(B,C,A,E,D){return E*(C/=D)*C*C+A
},easeOutCubic:function(B,C,A,E,D){return E*((C=C/D-1)*C*C+1)+A
},easeInOutCubic:function(B,C,A,E,D){if((C/=D/2)<1){return E/2*C*C*C+A
}return E/2*((C-=2)*C*C+2)+A
},easeInQuart:function(B,C,A,E,D){return E*(C/=D)*C*C*C+A
},easeOutQuart:function(B,C,A,E,D){return -E*((C=C/D-1)*C*C*C-1)+A
},easeInOutQuart:function(B,C,A,E,D){if((C/=D/2)<1){return E/2*C*C*C*C+A
}return -E/2*((C-=2)*C*C*C-2)+A
},easeInQuint:function(B,C,A,E,D){return E*(C/=D)*C*C*C*C+A
},easeOutQuint:function(B,C,A,E,D){return E*((C=C/D-1)*C*C*C*C+1)+A
},easeInOutQuint:function(B,C,A,E,D){if((C/=D/2)<1){return E/2*C*C*C*C*C+A
}return E/2*((C-=2)*C*C*C*C+2)+A
},easeInSine:function(B,C,A,E,D){return -E*Math.cos(C/D*(Math.PI/2))+E+A
},easeOutSine:function(B,C,A,E,D){return E*Math.sin(C/D*(Math.PI/2))+A
},easeInOutSine:function(B,C,A,E,D){return -E/2*(Math.cos(Math.PI*C/D)-1)+A
},easeInExpo:function(B,C,A,E,D){return(C==0)?A:E*Math.pow(2,10*(C/D-1))+A
},easeOutExpo:function(B,C,A,E,D){return(C==D)?A+E:E*(-Math.pow(2,-10*C/D)+1)+A
},easeInOutExpo:function(B,C,A,E,D){if(C==0){return A
}if(C==D){return A+E
}if((C/=D/2)<1){return E/2*Math.pow(2,10*(C-1))+A
}return E/2*(-Math.pow(2,-10*--C)+2)+A
},easeInCirc:function(B,C,A,E,D){return -E*(Math.sqrt(1-(C/=D)*C)-1)+A
},easeOutCirc:function(B,C,A,E,D){return E*Math.sqrt(1-(C=C/D-1)*C)+A
},easeInOutCirc:function(B,C,A,E,D){if((C/=D/2)<1){return -E/2*(Math.sqrt(1-C*C)-1)+A
}return E/2*(Math.sqrt(1-(C-=2)*C)+1)+A
},easeInElastic:function(B,D,A,H,G){var E=1.70158;
var F=0;
var C=H;
if(D==0){return A
}if((D/=G)==1){return A+H
}if(!F){F=G*0.3
}if(C<Math.abs(H)){C=H;
var E=F/4
}else{var E=F/(2*Math.PI)*Math.asin(H/C)
}return -(C*Math.pow(2,10*(D-=1))*Math.sin((D*G-E)*(2*Math.PI)/F))+A
},easeOutElastic:function(B,D,A,H,G){var E=1.70158;
var F=0;
var C=H;
if(D==0){return A
}if((D/=G)==1){return A+H
}if(!F){F=G*0.3
}if(C<Math.abs(H)){C=H;
var E=F/4
}else{var E=F/(2*Math.PI)*Math.asin(H/C)
}return C*Math.pow(2,-10*D)*Math.sin((D*G-E)*(2*Math.PI)/F)+H+A
},easeInOutElastic:function(B,D,A,H,G){var E=1.70158;
var F=0;
var C=H;
if(D==0){return A
}if((D/=G/2)==2){return A+H
}if(!F){F=G*(0.3*1.5)
}if(C<Math.abs(H)){C=H;
var E=F/4
}else{var E=F/(2*Math.PI)*Math.asin(H/C)
}if(D<1){return -0.5*(C*Math.pow(2,10*(D-=1))*Math.sin((D*G-E)*(2*Math.PI)/F))+A
}return C*Math.pow(2,-10*(D-=1))*Math.sin((D*G-E)*(2*Math.PI)/F)*0.5+H+A
},easeInBack:function(B,C,A,F,E,D){if(D==undefined){D=1.70158
}return F*(C/=E)*C*((D+1)*C-D)+A
},easeOutBack:function(B,C,A,F,E,D){if(D==undefined){D=1.70158
}return F*((C=C/E-1)*C*((D+1)*C+D)+1)+A
},easeInOutBack:function(B,C,A,F,E,D){if(D==undefined){D=1.70158
}if((C/=E/2)<1){return F/2*(C*C*(((D*=(1.525))+1)*C-D))+A
}return F/2*((C-=2)*C*(((D*=(1.525))+1)*C+D)+2)+A
},easeInBounce:function(B,C,A,E,D){return E-jQuery.easing.easeOutBounce(B,D-C,0,E,D)+A
},easeOutBounce:function(B,C,A,E,D){if((C/=D)<(1/2.75)){return E*(7.5625*C*C)+A
}else{if(C<(2/2.75)){return E*(7.5625*(C-=(1.5/2.75))*C+0.75)+A
}else{if(C<(2.5/2.75)){return E*(7.5625*(C-=(2.25/2.75))*C+0.9375)+A
}else{return E*(7.5625*(C-=(2.625/2.75))*C+0.984375)+A
}}}},easeInOutBounce:function(B,C,A,E,D){if(C<D/2){return jQuery.easing.easeInBounce(B,C*2,0,E,D)*0.5+A
}return jQuery.easing.easeOutBounce(B,C*2-D,0,E,D)*0.5+E*0.5+A
}});
(function(A){A.fn.shuffle=function(){return this.each(function(){var B=A(this).children().clone(true);
return(B.length)?A(this).html(A.shuffle(B)):this
})
};
A.shuffle=function(C){for(var D,B,E=C.length;
E;
D=parseInt(Math.random()*E),B=C[--E],C[E]=C[D],C[D]=B){}return C
}
})(jQuery);
(function(e,K,r){var f={transition:"elastic",speed:300,width:false,initialWidth:"600",innerWidth:false,maxWidth:false,height:false,initialHeight:"450",innerHeight:false,maxHeight:false,scalePhotos:true,scrolling:true,inline:false,html:false,iframe:false,fastIframe:true,photo:false,href:false,title:false,rel:false,opacity:0.9,preloading:true,current:"image {current} of {total}",previous:"previous",next:"next",close:"close",open:false,returnFocus:true,loop:true,slideshow:false,slideshowAuto:true,slideshowSpeed:2500,slideshowStart:"start slideshow",slideshowStop:"stop slideshow",onOpen:false,onLoad:false,onComplete:false,onCleanup:false,onClosed:false,overlayClose:true,escKey:true,arrowKey:true},V="colorbox",o="cbox",q=o+"_open",E=o+"_load",p=o+"_complete",S=o+"_cleanup",w=o+"_closed",I=o+"_purge",T=e.browser.msie&&!e.support.opacity,z=T&&e.browser.version<7,v=o+"_IE6",m,AA,AB,D,c,O,B,l,C,u,i,J,H,N,R,s,Q,n,X,Y,x={},AC,L,G,A,U,d,M,a,t,h=false,g,P=o+"Element";
function k(AF,AD){var AE=K.createElement("div");
if(AF){AE.id=o+AF
}AE.style.cssText=AD||false;
return e(AE)
}function j(AD,AE){AE=AE==="x"?u.width():u.height();
return(typeof AD==="string")?Math.round((/%/.test(AD)?(AE/100)*parseInt(AD,10):parseInt(AD,10))):AD
}function Z(AD){return x.photo||/\.(gif|png|jpg|jpeg|bmp)(?:\?([^#]*))?(?:#(\.*))?$/i.test(AD)
}function y(AE){for(var AD in AE){if(e.isFunction(AE[AD])&&AD.substring(0,2)!=="on"){AE[AD]=AE[AD].call(U)
}}AE.rel=AE.rel||U.rel||"nofollow";
AE.href=e.trim(AE.href||e(U).attr("href"));
AE.title=AE.title||U.title
}function b(AD,AE){if(AE){AE.call(U,C.index(U))
}e.event.trigger(AD)
}function W(){var AE,AG=o+"Slideshow_",AH="click."+o,AI,AF,AD;
if(x.slideshow&&C[1]){AI=function(){s.text(x.slideshowStop).unbind(AH).bind(p,function(){if(d<C.length-1||x.loop){AE=setTimeout(g.next,x.slideshowSpeed)
}}).bind(E,function(){clearTimeout(AE)
}).one(AH+" "+S,AF);
AA.removeClass(AG+"off").addClass(AG+"on");
AE=setTimeout(g.next,x.slideshowSpeed)
};
AF=function(){clearTimeout(AE);
s.text(x.slideshowStart).unbind([p,E,S,AH].join(" ")).one(AH,AI);
AA.removeClass(AG+"on").addClass(AG+"off")
};
if(x.slideshowAuto){AI()
}else{AF()
}}}function F(AD){if(!h){U=AD;
y(e.extend(x,e.data(U,V)));
C=e(U);
d=0;
if(x.rel!=="nofollow"){C=e("."+P).filter(function(){var AF=e.data(this,V).rel||this.rel;
return(AF===x.rel)
});
d=C.index(U);
if(d===-1){C=C.add(U);
d=C.length-1
}}if(!a){a=t=true;
AA.show();
if(x.returnFocus){try{U.blur();
e(U).one(w,function(){try{this.focus()
}catch(AF){}})
}catch(AE){}}m.css({opacity:+x.opacity,cursor:x.overlayClose?"pointer":"auto"}).show();
x.w=j(x.initialWidth,"x");
x.h=j(x.initialHeight,"y");
g.position(0);
if(z){u.bind("resize."+v+" scroll."+v,function(){m.css({width:u.width(),height:u.height(),top:u.scrollTop(),left:u.scrollLeft()})
}).trigger("resize."+v)
}b(q,x.onOpen);
Y.add(N).hide();
X.html(x.close).show()
}g.load(true)
}}g=e.fn[V]=e[V]=function(AD,AG){var AE=this,AF;
if(!AE[0]&&AE.selector){return AE
}AD=AD||{};
if(AG){AD.onComplete=AG
}if(!AE[0]||AE.selector===undefined){AE=e("<a/>");
AD.open=true
}AE.each(function(){e.data(this,V,e.extend({},e.data(this,V)||f,AD));
e(this).addClass(P)
});
AF=AD.open;
if(e.isFunction(AF)){AF=AF.call(AE)
}if(AF){F(AE[0])
}return AE
};
g.init=function(){u=e(r);
AA=k().attr({id:V,"class":T?o+(z?"IE6":"IE"):""});
m=k("Overlay",z?"position:absolute":"").hide();
AB=k("Wrapper");
D=k("Content").append(i=k("LoadedContent","width:0; height:0; overflow:hidden"),H=k("LoadingOverlay").add(k("LoadingGraphic")),N=k("Title"),R=k("Current"),Q=k("Next"),n=k("Previous"),s=k("Slideshow").bind(q,W),X=k("Close"));
AB.append(k().append(k("TopLeft"),c=k("TopCenter"),k("TopRight")),k(false,"clear:left").append(O=k("MiddleLeft"),D,B=k("MiddleRight")),k(false,"clear:left").append(k("BottomLeft"),l=k("BottomCenter"),k("BottomRight"))).children().children().css({"float":"left"});
J=k(false,"position:absolute; width:9999px; visibility:hidden; display:none");
e("body").prepend(m,AA.append(AB,J));
D.children().hover(function(){e(this).addClass("hover")
},function(){e(this).removeClass("hover")
}).addClass("hover");
AC=c.height()+l.height()+D.outerHeight(true)-D.height();
L=O.width()+B.width()+D.outerWidth(true)-D.width();
G=i.outerHeight(true);
A=i.outerWidth(true);
AA.css({"padding-bottom":AC,"padding-right":L}).hide();
Q.click(function(){g.next()
});
n.click(function(){g.prev()
});
X.click(function(){g.close()
});
Y=Q.add(n).add(R).add(s);
D.children().removeClass("hover");
e("."+P).live("click",function(AD){if(!((AD.button!==0&&typeof AD.button!=="undefined")||AD.ctrlKey||AD.shiftKey||AD.altKey)){AD.preventDefault();
F(this)
}});
m.click(function(){if(x.overlayClose){g.close()
}});
e(K).bind("keydown."+o,function(AE){var AD=AE.keyCode;
if(a&&x.escKey&&AD===27){AE.preventDefault();
g.close()
}if(a&&x.arrowKey&&C[1]){if(AD===37){AE.preventDefault();
n.click()
}else{if(AD===39){AE.preventDefault();
Q.click()
}}}})
};
g.remove=function(){AA.add(m).remove();
e("."+P).die("click").removeData(V).removeClass(P)
};
g.position=function(AH,AE){var AG,AF=Math.max(K.documentElement.clientHeight-x.h-G-AC,0)/2+u.scrollTop(),AD=Math.max(u.width()-x.w-A-L,0)/2+u.scrollLeft();
AG=(AA.width()===x.w+A&&AA.height()===x.h+G)?0:AH;
AB[0].style.width=AB[0].style.height="9999px";
function AI(AJ){c[0].style.width=l[0].style.width=D[0].style.width=AJ.style.width;
H[0].style.height=H[1].style.height=D[0].style.height=O[0].style.height=B[0].style.height=AJ.style.height
}AA.dequeue().animate({width:x.w+A,height:x.h+G,top:AF,left:AD},{duration:AG,complete:function(){AI(this);
t=false;
AB[0].style.width=(x.w+A+L)+"px";
AB[0].style.height=(x.h+G+AC)+"px";
if(AE){AE()
}},step:function(){AI(this)
}})
};
g.resize=function(AD){if(a){AD=AD||{};
if(AD.width){x.w=j(AD.width,"x")-A-L
}if(AD.innerWidth){x.w=j(AD.innerWidth,"x")
}i.css({width:x.w});
if(AD.height){x.h=j(AD.height,"y")-G-AC
}if(AD.innerHeight){x.h=j(AD.innerHeight,"y")
}if(!AD.innerHeight&&!AD.height){var AE=i.wrapInner("<div style='overflow:auto'></div>").children();
x.h=AE.height();
AE.replaceWith(AE.children())
}i.css({height:x.h});
g.position(x.transition==="none"?0:x.speed)
}};
g.prep=function(AF){if(!a){return 
}var AG=x.transition==="none"?0:x.speed;
u.unbind("resize."+o);
i.remove();
i=k("LoadedContent").html(AF);
function AD(){x.w=x.w||i.width();
x.w=x.mw&&x.mw<x.w?x.mw:x.w;
return x.w
}function AH(){x.h=x.h||i.height();
x.h=x.mh&&x.mh<x.h?x.mh:x.h;
return x.h
}i.hide().appendTo(J.show()).css({width:AD(),overflow:x.scrolling?"auto":"hidden"}).css({height:AH()}).prependTo(D);
J.hide();
e(M).css({"float":"none"});
if(z){e("select").not(AA.find("select")).filter(function(){return this.style.visibility!=="hidden"
}).css({visibility:"hidden"}).one(S,function(){this.style.visibility="inherit"
})
}function AE(AI){g.position(AI,function(){var AO,AP,AM,AL,AN=C.length,AK,AJ;
if(!a){return 
}AJ=function(){H.hide();
b(p,x.onComplete)
};
if(T){if(M){i.fadeIn(100)
}}N.html(x.title).add(i).show();
if(AN>1){if(typeof x.current==="string"){R.html(x.current.replace(/\{current\}/,d+1).replace(/\{total\}/,AN)).show()
}Q[(x.loop||d<AN-1)?"show":"hide"]().html(x.next);
n[(x.loop||d)?"show":"hide"]().html(x.previous);
AO=d?C[d-1]:C[AN-1];
AM=d<AN-1?C[d+1]:C[0];
if(x.slideshow){s.show()
}if(x.preloading){AL=e.data(AM,V).href||AM.href;
AP=e.data(AO,V).href||AO.href;
AL=e.isFunction(AL)?AL.call(AM):AL;
AP=e.isFunction(AP)?AP.call(AO):AP;
if(Z(AL)){e("<img/>")[0].src=AL
}if(Z(AP)){e("<img/>")[0].src=AP
}}}else{Y.hide()
}if(x.iframe){AK=e("<iframe/>").addClass(o+"Iframe")[0];
if(x.fastIframe){AJ()
}else{e(AK).load(AJ)
}AK.name=o+(+new Date());
AK.src=x.href;
if(!x.scrolling){AK.scrolling="no"
}if(T){AK.frameBorder=0;
AK.allowTransparency="true"
}e(AK).appendTo(i).one(I,function(){AK.src="//about:blank"
})
}else{AJ()
}if(x.transition==="fade"){AA.fadeTo(AG,1,function(){AA[0].style.filter=""
})
}else{AA[0].style.filter=""
}u.bind("resize."+o,function(){g.position(0)
})
})
}if(x.transition==="fade"){AA.fadeTo(AG,0,function(){AE(0)
})
}else{AE(AG)
}};
g.load=function(AF){var AE,AG,AD=g.prep;
t=true;
M=false;
U=C[d];
if(!AF){y(e.extend(x,e.data(U,V)))
}b(I);
b(E,x.onLoad);
x.h=x.height?j(x.height,"y")-G-AC:x.innerHeight&&j(x.innerHeight,"y");
x.w=x.width?j(x.width,"x")-A-L:x.innerWidth&&j(x.innerWidth,"x");
x.mw=x.w;
x.mh=x.h;
if(x.maxWidth){x.mw=j(x.maxWidth,"x")-A-L;
x.mw=x.w&&x.w<x.mw?x.w:x.mw
}if(x.maxHeight){x.mh=j(x.maxHeight,"y")-G-AC;
x.mh=x.h&&x.h<x.mh?x.h:x.mh
}AE=x.href;
H.show();
if(x.inline){k().hide().insertBefore(e(AE)[0]).one(I,function(){e(this).replaceWith(i.children())
});
AD(e(AE))
}else{if(x.iframe){AD(" ")
}else{if(x.html){AD(x.html)
}else{if(Z(AE)){e(M=new Image()).addClass(o+"Photo").error(function(){x.title=false;
AD(k("Error").text("This image could not be loaded"))
}).load(function(){var AH;
M.onload=null;
if(x.scalePhotos){AG=function(){M.height-=M.height*AH;
M.width-=M.width*AH
};
if(x.mw&&M.width>x.mw){AH=(M.width-x.mw)/M.width;
AG()
}if(x.mh&&M.height>x.mh){AH=(M.height-x.mh)/M.height;
AG()
}}if(x.h){M.style.marginTop=Math.max(x.h-M.height,0)/2+"px"
}if(C[1]&&(d<C.length-1||x.loop)){M.style.cursor="pointer";
M.onclick=function(){g.next()
}
}if(T){M.style.msInterpolationMode="bicubic"
}setTimeout(function(){AD(M)
},1)
});
setTimeout(function(){M.src=AE
},1)
}else{if(AE){J.load(AE,function(AI,AH,AJ){AD(AH==="error"?k("Error").text("Request unsuccessful: "+AJ.statusText):e(this).contents())
})
}}}}}};
g.next=function(){if(!t&&C[1]&&(d<C.length-1||x.loop)){d=d<C.length-1?d+1:0;
g.load()
}};
g.prev=function(){if(!t&&C[1]&&(d||x.loop)){d=d?d-1:C.length-1;
g.load()
}};
g.close=function(){if(a&&!h){h=true;
a=false;
b(S,x.onCleanup);
u.unbind("."+o+" ."+v);
m.fadeTo(200,0);
AA.stop().fadeTo(300,0,function(){AA.add(m).css({opacity:1,cursor:"auto"}).hide();
b(I);
i.remove();
setTimeout(function(){h=false;
b(w,x.onClosed)
},1)
})
}};
g.element=function(){return e(U)
};
g.settings=f;
e(g.init)
}(jQuery,document,this));
(function(A){A.fn.wciYouTubeGallery=function(B){return this.each(function(){new A.wciYouTubeGallery(this,B)
})
};
A.wciYouTubeGallery=function(C,E){var D=this;
var B={o:{template:'<div class="teaser teaser-block"><div class="teaser-inner"><div class="teaser-images"><div class="teaser-image"><a href="<*= href *>"><span class="teaser-image-placeholder" style="background-image:url(<*= img *>)"></span></a></div></div><div class="teaser-content"><div class="teaser-title"><a href="<*= href *>"><*= title *><span class="teaser-interface-icon"></span></a></div></div></div><div class="teaser-clear"></div></div>',initHandler:null},scope:null,tmplCache:{},tmpl:function(I,H){var F=!/\W/.test(I)?B.tmplCache[I]=B.tmplCache[I]||B.tmpl(document.getElementById(I).innerHTML):new Function("obj","var p=[],print=function(){p.push.apply(p,arguments);};with(obj){p.push('"+I.replace(/[\r\t\n]/g," ").replace(/'(?=[^\*]*\*>)/g,"\t").split("'").join("\\'").split("\t").join("'").replace(/<\*=(.+?)\*>/g,"',$1,'").split("<*").join("');").split("*>").join("p.push('")+"');}return p.join('');");
try{return H?F(H):F
}catch(G){throw"error evaluating template: "+G
}},init:function(G,H){if(H){A.extend(B.o,H)
}var F=B.scope=A(G);
A.getJSON("http://gdata.youtube.com/feeds/api/playlists/"+B.o.playlist+"?v=2&alt=json-in-script&callback=?",function(M){F.empty();
var I=M.feed.entry;
for(var K=0;
K<I.length;
K++){var J=I[K]["media$group"]["media$title"]["$t"];
var L=I[K]["media$group"]["yt$duration"]["seconds"];
A(B.tmpl(B.o.template,{title:J+" ("+Math.floor(L/60)+":"+(L%60<10?"0"+L%60:L%60)+")",img:I[K]["media$group"]["media$thumbnail"][0].url,href:I[K]["link"][0]["href"]})).appendTo(F).colorbox({iframe:"yes",href:"http://www.youtube.com/embed/"+I[K]["media$group"]["yt$videoid"]["$t"]+"?rel=0&autoplay=1",innerWidth:640,innerHeight:385,title:J})
}})
}};
B.init(C,E)
}
})(jQuery);
(function(A){A.fn.wciSlideshow=function(B){return this.each(function(){new A.wciSlideshow(this,B)
})
};
A.wciSlideshow=function(C,E){var D=this;
D.scope=function(){return B.scope
};
D.play=function(){return B.play()
};
D.pause=function(){return B.pause()
};
D.prev=function(){return B.prev()
};
D.next=function(){return B.next()
};
D.go=function(F){return B.go(F)
};
var B={o:{autoStart:true,advanceTime:5000,initHandler:null},scope:null,current:1,interval:null,zmax:0,slidesCount:0,mouseover:function(){var F=A(this).find(".teaser-thumb").attr("ref");
var G=parseInt(A(this).parent().attr("jcarouselindex"));
G=G-B.jcarousel.first;
G=G*52;
G=G+15;
B.scope.find(".slide-hover-balloon").stop(true,true).fadeIn();
B.scope.find(".hover-balloon-arrow").css("left",G+"px");
B.scope.find(".hover-balloon-bottom").html(B.scope.find(".teaser-content[ref="+F+"] > .teaser-title").html())
},mouseout:function(){B.scope.find(".slide-hover-balloon").stop(true,true).hide()
},prev:function(){B.pause();
if(B.slidesCount>4&&B.current<=B.jcarousel.first){B.jcarousel.prev()
}if(B.current<=1){B.current=B.slidesCount
}else{B.current=B.current-1
}B.go(B.current)
},next:function(F){F=F||false;
if(F==false){B.pause()
}if(B.slidesCount>4&&B.current>=B.jcarousel.last){B.jcarousel.next()
}if(B.current>=B.slidesCount){B.current=1
}else{B.current=B.current+1
}B.go(B.current)
},pause:function(){if(B.interval){window.clearInterval(B.interval)
}B.interval=null;
B.scope.find(".play").show();
B.scope.find(".pause").hide()
},play:function(){if(B.interval){window.clearInterval(B.interval)
}B.interval=window.setInterval(function(){B.next(true)
},B.o.advanceTime);
B.scope.find(".pause").show();
B.scope.find(".play").hide()
},go:function(I,G){var H=B.scope.find("li.jcarousel-item[jcarouselindex="+I+"]").find(".teaser-thumb").attr("ref");
B.scope.find(".teaser-content").hide();
B.scope.find(".teaser-content[ref="+H+"]").show();
var F=B.scope.find(".slide-thumbnail-container");
F.unbind("mouseover");
F.unbind("mouseout");
F.unbind("click");
F.bind("mouseover",B.mouseover);
F.bind("mouseout",B.mouseout);
F.bind("click",function(){B.current=parseInt(A(this).parent().attr("jcarouselindex"));
B.pause();
B.go(B.current);
return false
});
F.removeClass("selected");
F.removeClass("selected");
B.scope.find(".teaser-thumb[ref="+H+"]").parent().addClass("selected");
if(G){B.scope.find(".teaser-image").css({"z-index":1}).show();
B.scope.find(".teaser-image[ref="+H+"]").css({"z-index":2}).show();
B.zmax=2
}else{B.scope.find(".teaser-image[ref="+H+"]").hide().css({"z-index":++B.zmax}).fadeIn(500)
}},init:function(G,H){if(H){A.extend(B.o,H)
}var F=B.scope=A(G);
window.ss=B;
B.slides=F.find(".slide");
B.slidesCount=B.slides.size();
B.slides.each(function(I){A(this).find(".teaser-image").attr("ref",I);
A(this).find(".teaser-content").attr("ref",I);
A(this).find(".teaser-thumb").attr("ref",I)
});
F.empty().append('<div class="slide-images"></div>').append('<div class="mask"><div class="slide-contents"></div></div>').append('<div class="play-pause"><a class="play" href="#" style="display:block">Play</a><a class="pause" href="#" style="display:block">Pause</a></div>').append('<div class="slide-thumbnails"><div class="prev-slide"></div><ul class="jcarousel-skin-tango"></ul><div class="next-slide"></div></div>').append('<div class="slide-hover-balloon"><div class="hover-balloon-top"><div class="hover-balloon-bottom"></div></div><div class="hover-balloon-arrow"></div></div>');
F.find(".play").hide();
B.slides.find(".teaser-image").hide();
F.find(".slide-images").append(B.slides.find(".teaser-image"));
B.slides.find(".teaser-content").hide();
F.find(".slide-contents").append(B.slides.find(".teaser-content"));
F.find(".jcarousel-skin-tango").append(B.slides.find(".teaser-thumb"));
F.find(".teaser-thumb").wrap('<a class="slide-thumbnail-container" href="#"></a>');
F.find(".slide-thumbnail-container").wrap("<li></li>");
F.find(".slide-thumbnail-container").prepend('<span class="slide-thumbnail-border"></span>');
F.find(".teaser-thumb").show();
B.jcarousel=F.find(".jcarousel-skin-tango").jcarousel({wrap:"both",scroll:1,buttonNextHTML:null,buttonPrevHTML:null}).data("jcarousel");
F.find(".next-slide").click(function(){B.next();
return false
});
F.find(".prev-slide").click(function(){B.prev();
return false
});
F.find(".play").click(function(){B.next();
B.play();
return false
});
F.find(".pause").click(function(){B.pause();
return false
});
B.go(1,true);
B.pause();
if(B.o.autoStart&&B.slidesCount>1){B.play()
}if(B.o.initHandler){B.o.initHandler.call(D)
}if(B.slidesCount<2){F.find(".play").hide();
F.find(".pause").hide();
F.find(".next-slide").hide();
F.find(".prev-slide").hide();
F.find(".jcarousel-skin-tango").hide()
}}};
B.init(C,E)
}
})(jQuery);
var UB={};
UB.WCI={};
UB.WCI.Map=function(){var E;
var D;
var F;
function A(H,I,J){E=new google.maps.Geocoder();
F=new google.maps.LatLng(43.00121,-78.789729);
var G={zoom:J,center:F,navigationControl:true,scrollwheel:false,navigationControlOptions:{style:I},mapTypeControl:true,mapTypeId:google.maps.MapTypeId.ROADMAP};
D=new google.maps.Map(document.getElementById(H),G)
}function B(G,J){G.style.marginTop="5px";
var I=document.createElement("div");
I.style.backgroundColor="white";
I.style.borderStyle="solid";
I.style.borderWidth="2px";
I.style.width="66px";
I.style.cursor="pointer";
I.style.textAlign="center";
I.title="Click to set the map to Home";
G.appendChild(I);
var H=document.createElement("div");
H.style.fontFamily="Arial,sans-serif";
H.style.fontSize="12px";
H.style.paddingLeft="4px";
H.style.paddingRight="4px";
H.innerHTML="<b>Home</b>";
I.appendChild(H);
google.maps.event.addDomListener(I,"click",function(){J.setCenter(F)
})
}function C(G){E.geocode({address:G},function(J,I){if(I==google.maps.GeocoderStatus.OK){F=J[0].geometry.location;
D.setCenter(F);
var H=new google.maps.Marker({map:D,position:J[0].geometry.location});
var K=new google.maps.InfoWindow();
K.setContent(G);
google.maps.event.addListener(H,"click",function(){K.open(D,H);
D.setCenter(F)
})
}})
}return{drawMap:function(H,G,I,J){A(H,I,J);
C(G)
}}
};
Map=UB.WCI.Map;
function BR_AgentContains_(A){if(A in BR_AgentContains_cache_){return BR_AgentContains_cache_[A]
}return BR_AgentContains_cache_[A]=(navigator.userAgent.toLowerCase().indexOf(A)!=-1)
}var BR_AgentContains_cache_={};
function BR_IsIE(){return BR_AgentContains_("msie")&&!window.opera
}function BR_IsKonqueror(){return BR_AgentContains_("konqueror")
}function BR_IsSafari(){return BR_AgentContains_("safari")||BR_IsKonqueror()
}function BR_IsNav(){return !BR_IsIE()&&!BR_IsSafari()&&BR_AgentContains_("mozilla")
}function BR_IsWin(){return BR_AgentContains_("win")
}function BR_IsMac(){return BR_AgentContains_("macintosh")||BR_AgentContains_("mac_powerpc")
}function BR_IsLinux(){return BR_AgentContains_("linux")
}var BACKSPACE_KEYCODE=8;
var COMMA_KEYCODE=188;
var DEBUG_KEYCODE=68;
var DELETE_KEYCODE=46;
var DOWN_KEYCODE=40;
var ENTER_KEYCODE=13;
var ESC_KEYCODE=27;
var LEFT_KEYCODE=37;
var RIGHT_KEYCODE=39;
var SPACE_KEYCODE=32;
var TAB_KEYCODE=9;
var UP_KEYCODE=38;
var SHIFT_KEYCODE=16;
var PAGE_DOWN_KEYCODE=34;
var PAGE_UP_KEYCODE=33;
function GetSemicolonKeyCode(){return BR_IsIE()?186:59
}var MAX_EMAIL_ADDRESS_LENGTH=320;
var MAX_SIGNATURE_LENGTH=1000;
function raise(A){if(typeof Error!="undefined"){throw new Error(A||"Assertion Failed")
}else{throw (A)
}}function Fail(A){A=A||"Assertion failed";
if(IsDefined(DumpError)){DumpError(A+"\n")
}raise(A)
}function AssertTrue(B,A){if(!B){A=A||"Assertion failed";
Fail(A)
}}function AssertEquals(B,A,C){if(B!=A){C=C||"AssertEquals failed: <"+B+"> != <"+A+">";
Fail(C)
}}function AssertType(D,B,F){if(typeof D==B){return 
}if(D||D==""){try{if(B==AssertTypeMap[typeof D]||D instanceof B){return 
}}catch(E){}}var C=F===undefined;
if(C){if(typeof B=="function"){var A=B.toString().match(/^\s*function\s+([^\s\{]+)/);
if(A){B=A[1]
}}F="AssertType failed: <"+D+"> not typeof "+B
}Fail(F)
}var AssertTypeMap={string:String,number:Number,"boolean":Boolean};
function AssertNumArgs(B,C){var A=AssertNumArgs.caller;
if(A&&A.arguments.length!=B){C=C||A.name+" expected "+B+" arguments  but received "+A.arguments.length;
Fail(C)
}}var ILLEGAL_COOKIE_CHARS_RE=/[\s;]/;
function SetCookie(D,I,G,B,E){I=""+I;
AssertTrue((typeof D=="string"&&typeof I=="string"&&!D.match(ILLEGAL_COOKIE_CHARS_RE)&&!I.match(ILLEGAL_COOKIE_CHARS_RE)),"trying to set an invalid cookie");
if(!IsDefined(G)){G=-1
}if(!IsDefined(B)){B="/"
}if(!IsDefined(E)){E=null
}var H=(E==null)?"":";domain="+E;
var J=(B==null)?"":";path="+B;
var C;
if(G<0){C=""
}else{if(G==0){var F=new Date(1970,1,1);
C=";expires="+F.toUTCString()
}else{var A=new Date(Now()+G*1000);
C=";expires="+A.toUTCString()
}}document.cookie=D+"="+I+H+J+C
}var EXPIRED_COOKIE_VALUE="EXPIRED";
function ExpireCookie(B,A,C){SetCookie(B,EXPIRED_COOKIE_VALUE,0,A,C)
}function GetCookie(B){var F=B+"=";
var D=String(document.cookie);
for(var G=-1;
(G=D.indexOf(F,G+1))>=0;
){var C=G;
while(--C>=0){var E=D.charAt(C);
if(E==";"){C=-1;
break
}else{if(" \t".indexOf(E)<0){break
}}}if(-1===C){var A=D.indexOf(";",G);
if(A<0){A=D.length
}return D.substring(G+F.length,A)
}}return""
}function Now(){return(new Date()).getTime()
}function MaybeGetElement(A,B){return A.document.getElementById(B)
}function GetElement(B,C){var A=B.document.getElementById(C);
if(!A){DumpError("Element "+C+" not found.")
}return A
}function GetElements(A,B){return A.document.getElementsByName(B)
}function GetParentNode(B){try{return B.parentNode
}catch(A){return B
}}function IsDescendant(A,B){do{if(A===B){return true
}B=GetParentNode(B)
}while(B&&B!==document.body);
return false
}function GetAttribute(C,B){if(!C.getAttribute){return null
}var A=C.getAttribute(B);
if(BR_IsIE()&&B=="style"){return A.value
}else{return A
}}function SetInnerHTML(C,D,B){try{GetElement(C,D).innerHTML=B
}catch(A){DumpException(A)
}}function GetInnerHTML(B,C){try{return GetElement(B,C).innerHTML
}catch(A){DumpException(A);
return""
}}function ClearInnerHTML(B,C){try{GetElement(B,C).innerHTML=""
}catch(A){DumpException(A)
}}function SetCssStyle(E,F,A,D){try{var C=GetElement(E,F);
C.style[A]=D
}catch(B){DumpException(B)
}}function GetStyleProperty(D,B){var C=D.indexOf(B);
if(C!=-1){var A=D.indexOf(";",C);
if(A==-1){A=D.length
}return CollapseWhitespace(D.substring(C+B.length+1,A))
}return null
}function GetCellIndex(A){if(A.cellIndex){return A.cellIndex
}else{if(A.parentNode){return FindInArray(A.parentNode.cells,A)
}else{return null
}}}function ShowElement(B,A){B.style.display=A?"":"none"
}function ShowBlockElement(B,A){B.style.display=A?"block":"none"
}function ShowInlineElement(B,A){B.style.display=A?"inline":"none"
}function SetButtonText(A,B){A.childNodes[0].nodeValue=B
}function AppendNewElement(D,B,A){var C=D.document.createElement(A);
B.appendChild(C);
return C
}function FindChildWithID(B,C){var A;
for(A=B.firstChild;
A&&A.id!=C;
A=A.nextSibling){}return A
}function AddMenuDisabledOption(B,C,A){var D=AppendNewElement(B,C,"OPTION");
D.disabled=true;
D.innerHTML=A;
return D
}function AddMenuOption(C,D,B,A){var E=AppendNewElement(C,D,"OPTION");
E.value=B;
E.innerHTML=A;
return E
}function CreateDIV(A,C){var B=MaybeGetElement(A,C);
if(!B){B=AppendNewElement(A,A.document.body,"div");
B.id=C
}return B
}function CreateIFRAME(C,E,A){var B=MaybeGetElement(C,E);
if(!B){var D=AppendNewElement(C,C.document.body,"div");
D.innerHTML="<iframe id="+E+" name="+E+" src="+A+"></iframe>";
B=GetElement(C,E)
}return B
}function Tr(D,B){var C=D.document.createElement("TR");
for(var A=0;
A<B.length;
A++){C.appendChild(B[A])
}return C
}function Td(B,A){var C=B.document.createElement("TD");
if(A){C.colSpan=A
}return C
}function HasClass(D,A){if(D==null||D.className==null){return false
}if(D.className==A){return true
}var C=D.className.split(" ");
for(var B=0;
B<C.length;
B++){if(C[B]==A){return true
}}return false
}function AddClass(B,A){if(HasClass(B,A)){return 
}B.className+=" "+A
}function RemoveClass(E,B){if(E.className==null){return 
}if(E.className==B){E.className="";
return 
}var D=E.className.split(" ");
var A=[];
var F=false;
for(var C=0;
C<D.length;
C++){if(D[C]!=B){if(D[C]){A.push(D[C])
}}else{F=true
}}if(F){E.className=A.join(" ")
}}function GetElementsBySelector(B,A){var C=[];
for(var D=B.firstChild;
D;
D=D.nextSibling){AddElementBySelector_(D,A,C)
}return C
}function AddElementBySelector_(B,A,C){if(A.select(B)){C.push(B)
}for(var D=B.firstChild;
D;
D=D.nextSibling){AddElementBySelector_(D,A,C)
}}function GetPageOffsetLeft(B){var A=B.offsetLeft;
if(B.offsetParent!=null){A+=GetPageOffsetLeft(B.offsetParent)
}return A
}function GetPageOffsetTop(A){var B=A.offsetTop;
if(A.offsetParent!=null){B+=GetPageOffsetTop(A.offsetParent)
}return B
}function GetPageOffset(B){var A=B.offsetLeft;
var D=B.offsetTop;
if(B.offsetParent!=null){var C=GetPageOffset(B.offsetParent);
A+=C.x;
D+=C.y
}return{x:A,y:D}
}function GetPageOffsetRight(A){return GetPageOffsetLeft(A)+A.offsetWidth
}function GetPageOffsetBottom(A){return GetPageOffsetTop(A)+A.offsetHeight
}function GetScrollTop(A){return GetWindowPropertyByBrowser_(A,getScrollTopGetters_)
}var getScrollTopGetters_={ieQuirks_:function(A){return A.document.body.scrollTop
},ieStandards_:function(A){return A.document.documentElement.scrollTop
},dom_:function(A){return A.pageYOffset
}};
function GetScrollLeft(A){return GetWindowPropertyByBrowser_(A,getScrollLeftGetters_)
}var getScrollLeftGetters_={ieQuirks_:function(A){return A.document.body.scrollLeft
},ieStandards_:function(A){return A.document.documentElement.scrollLeft
},dom_:function(A){return A.pageXOffset
}};
function IsScrollAtEnd(D,C){var B=(C)?document.body.offsetWidth:document.body.offsetHeight;
var A=(C)?GetWindowWidth(D):GetWindowHeight(D);
var E=(C)?GetScrollLeft(D):GetScrollTop(D);
return(A+E>=B||B<A)
}function ScrollTo(C,B,A){var D=GetPageOffsetTop(B);
D-=GetWindowHeight(C)*A;
C.scrollTo(0,D)
}var ALIGN_BOTTOM="b";
var ALIGN_MIDDLE="m";
var ALIGN_TOP="t";
function ScrollIntoView(E,C,G){var F=GetPageOffsetTop(C);
var H=F+C.offsetHeight;
var B=GetScrollTop(E);
var I=GetWindowHeight(E);
var A=B+I;
if(F<B||H>A){var D;
if(G==ALIGN_BOTTOM){D=H-I+5
}else{if(G==ALIGN_MIDDLE){D=(F+H)/2-I/2
}else{D=F-5
}}E.scrollTo(0,D)
}}function IsElementVisible(F,G){var C=MaybeGetElement(F,G);
if(C==null){return false
}var E=GetPageOffsetTop(C);
var D=E+C.offsetHeight;
var A=GetScrollTop(F);
var B=A+GetWindowHeight(F);
if(E>=A&&D<=B){return true
}return false
}function GetWindowWidth(A){return GetWindowPropertyByBrowser_(A,getWindowWidthGetters_)
}var getWindowWidthGetters_={ieQuirks_:function(A){return A.document.body.clientWidth
},ieStandards_:function(A){return A.document.documentElement.clientWidth
},dom_:function(A){return A.innerWidth
}};
function GetWindowHeight(A){return GetWindowPropertyByBrowser_(A,getWindowHeightGetters_)
}var getWindowHeightGetters_={ieQuirks_:function(A){return A.document.body.clientHeight
},ieStandards_:function(A){return A.document.documentElement.clientHeight
},dom_:function(A){return A.innerHeight
}};
function GetWindowPropertyByBrowser_(C,A){try{if(BR_IsSafari()){return A.dom_(C)
}else{if(!window.opera&&"compatMode" in C.document&&C.document.compatMode=="CSS1Compat"){return A.ieStandards_(C)
}else{if(BR_IsIE()){return A.ieQuirks_(C)
}}}}catch(B){}return A.dom_(C)
}function GetAvailScreenWidth(A){return A.screen.availWidth
}function GetAvailScreenHeight(A){return A.screen.availHeight
}function GetNiceWindowHeight(A){return Math.floor(0.8*GetAvailScreenHeight(A))
}function GetCenteringLeft(B,A){return(B.screen.availWidth-A)>>1
}function GetCenteringTop(B,A){return(B.screen.availHeight-A)>>1
}function Popup(B,C,A,G,H,I,E,F){if(!G){G=Math.floor(GetWindowHeight(window.top)*0.8)
}if(!A){A=Math.min(GetAvailScreenWidth(window),G)
}var D="resizable="+(E?"no":"yes")+",scrollbars="+(I?"no":"yes")+",width="+A+",height="+G;
if(H){D+=",left="+GetCenteringLeft(window,A)+",top="+GetCenteringTop(window,G)
}return OpenWindow(window,B,C,D,F)
}function OpenWindow(E,A,C,D,F){var B=OpenWindowHelper(top,A,C,D);
if(!B||B.closed||!B.focus){B=OpenWindowHelper(E,A,C,D)
}if(!B||B.closed||!B.focus){if(F){alert(F)
}}else{B.focus()
}return B
}function OpenWindowHelper(E,B,A,C){var D;
if(C){D=E.open(B,A,C)
}else{if(A){D=E.open(B,A)
}else{D=E.open(B)
}}return D
}function MaybeEscape(B,A){return A?HtmlEscape(B):B
}var windata=[];
function GetWindowData(B){var A=windata[B.name];
if(!A){windata[B.name]=A=[]
}return A
}function ClearWindowData(A){if(windata[A]){windata[A]=null
}}var amp_re_=/&/g;
var lt_re_=/</g;
var gt_re_=/>/g;
function HtmlEscape(A){if(!A){return""
}return A.replace(amp_re_,"&amp;").replace(lt_re_,"&lt;").replace(gt_re_,"&gt;").replace(quote_re_,"&quot;")
}function HtmlUnescape(A){if(!A){return""
}return A.replace(/&#(\d+);/g,function(B,C){return String.fromCharCode(parseInt(C,10))
}).replace(/&#x([a-f0-9]+);/gi,function(B,C){return String.fromCharCode(parseInt(C,16))
}).replace(/&(\w+);/g,function(C,B){B=B.toLowerCase();
return B in HtmlUnescape_unesc_?HtmlUnescape_unesc_[B]:"?"
})
}var HtmlUnescape_unesc_={lt:"<",gt:">",quot:'"',nbsp:" ",amp:"&",apos:"'"};
var dbsp_re_=/  /g;
var ret_re_=/\r/g;
var nl_re_=/\n/g;
function HtmlWhitespaceEscape(A){A=HtmlEscape(A);
A=A.replace(dbsp_re_,"&nbsp;&nbsp;");
A=A.replace(ret_re_,"");
A=A.replace(nl_re_,"<br>");
return A
}var quote_re_=/\"/g;
function QuoteEscape(A){return HtmlEscape(A).replace(quote_re_,"&quot;")
}var JS_SPECIAL_RE_=/[\'\\\r\n\b\"<>&\u0085\u2028\u2029]/g;
function JSEscOne_(A){return JSEscOne_.js_escs_[A]
}function ToJSString(B){if(!JSEscOne_.js_escs_){var A={};
A["\\"]="\\\\";
A["'"]="\\047";
A["\b"]="\\b";
A['"']="\\042";
A["<"]="\\074";
A[">"]="\\076";
A["&"]="\\046";
A["\n"]="\\n";
A["\r"]="\\r";
A["\u0085"]="\\205";
A["\u2028"]="\\u2028";
A["\u2029"]="\\u2029";
JSEscOne_.js_escs_=A
}return"'"+B.toString().replace(JS_SPECIAL_RE_,JSEscOne_)+"'"
}var spc_re_=/\s+/g;
var beg_spc_re_=/^ /;
var end_spc_re_=/ $/;
function CollapseWhitespace(A){if(!A){return""
}return A.replace(spc_re_," ").replace(beg_spc_re_,"").replace(end_spc_re_,"")
}var newline_re_=/\r?\n/g;
var spctab_re_=/[ \t]+/g;
var nbsp_re_=/\xa0/g;
function StripNewlines(A){if(!A){return""
}return A.replace(newline_re_," ")
}function CanonicalizeNewlines(A){if(!A){return""
}return A.replace(newline_re_,"\n")
}function HtmlifyNewlines(A){if(!A){return""
}return A.replace(newline_re_,"<br>")
}function NormalizeSpaces(A){if(!A){return""
}return A.replace(spctab_re_," ").replace(nbsp_re_," ")
}function UrlEncode(A){return encodeURIComponent(A)
}var plus_re_=/\+/g;
function UrlDecode(A){return decodeURIComponent(A.replace(plus_re_," "))
}function Trim(A){if(!A){return""
}return A.replace(/^\s+/,"").replace(/\s+$/,"")
}function EndsWith(B,A){if(!B){return !A
}return(B.lastIndexOf(A)==(B.length-A.length))
}function IsEmpty(A){return CollapseWhitespace(A)==""
}function IsLetterOrDigit(A){return((A>="a"&&A<="z")||(A>="A"&&A<="Z")||(A>="0"&&A<="9"))
}function IsSpace(A){return(" \t\r\n".indexOf(A)>=0)
}var eol_re_=/\r\n?/g;
var trailingspc_re_=/[\n\t ]+$/;
function NormalizeText(A){return A.replace(eol_re_,"\n").replace(trailingspc_re_,"")
}function HtmlEscapeInsertWbrs(F,B,J,E){AssertNumArgs(4);
var C="";
var A=0;
var G=0;
for(var D=1;
D<F.length;
++D){var H=F.charAt(D-1);
var I=F.charAt(D);
if(IsSpace(I)){G=D
}else{if(D-G==B||J.indexOf(H)!=-1||E.indexOf(I)!=-1){C+=HtmlEscape(F.substring(A,D))+"<wbr>";
A=D;
G=D
}}}C+=HtmlEscape(F.substr(A));
return C
}var illegal_chars_re_=/[ \/(){}&|\\\"\000]/g;
function CanonicalizeLabel(C,B){var A=C.replace(illegal_chars_re_,"-");
return B?A.toLowerCase():A
}function CompareStringsIgnoreCase(B,A){B=B.toLowerCase();
A=A.toLowerCase();
if(B<A){return -1
}else{if(B==A){return 0
}else{return 1
}}}function GetCursorPos(D,A){try{if(IsDefined(A.selectionEnd)){return A.selectionEnd
}else{if(D.document.selection&&D.document.selection.createRange){var B=D.document.selection.createRange();
if(B.parentElement()!=A){return -1
}var F=B.duplicate();
F.moveToElementText(A);
F.setEndPoint("EndToStart",B);
var E=F.text.length;
if(E>A.value.length){return -1
}return E
}else{Debug("Unable to get cursor position for: "+navigator.userAgent);
return A.value.length
}}}catch(C){DumpException(C,"Cannot get cursor pos")
}return -1
}function SetCursorPos(C,A,D){if(IsDefined(A.selectionEnd)&&IsDefined(A.selectionStart)){A.selectionStart=D;
A.selectionEnd=D
}else{if(C.document.selection&&A.createTextRange){var B=A.createTextRange();
B.collapse(true);
B.move("character",D);
B.select()
}}}function FindInArray(C,A){for(var B=0;
B<C.length;
B++){if(C[B]==A){return B
}}return -1
}function InsertArray(B,A){if(FindInArray(B,A)==-1){B[B.length]=A
}}function DeleteArrayElement(C,A){var B=0;
while(B<C.length&&C[B]!=A){B++
}C.splice(B,1)
}function CopyArray(C){var B=[];
for(var A=0;
A<C.length;
A++){B[A]=C[A]
}return B
}function CloneObject(A){if((typeof A)=="object"){var C=[];
for(var B in A){C[B]=CloneObject(A[B])
}return C
}return A
}function CloneEvent(A){var B={};
B.clientX=A.clientX;
B.clientY=A.clientY;
B.pageX=A.pageX;
B.pageY=A.pageY;
B.type=A.type;
B.srcElement=A.srcElement;
B.target=A.target;
B.cancelBubble=A.cancelBubble;
B.explicitOriginalTarget=A.explicitOriginalTarget;
B.button=A.button;
B.shiftKey=A.shiftKey;
B.ctrlKey=A.ctrlKey;
return B
}function GetEventTarget(A){return A.srcElement||A.target
}function CancelEvent(A){if(BR_IsIE()){A.cancelBubble=true
}else{if(A.stopPropagation){A.stopPropagation()
}}}function CancelDefaultAction(A){if(BR_IsIE()){A.returnValue=false
}else{A.preventDefault()
}}function PrintArray(D,C){AssertEquals(D.length,C.length*2+1);
for(var B=0,A=1;
B<C.length;
B++,A+=2){D[A]=C[B]
}return D.join("")
}function ImageHtml(B,A){return"<img "+A+" src="+B+">"
}function MakeId3(B,A,C){return B+A+"_"+C
}function ParseAddress(F){var C="";
var B="";
for(var E=0;
E<F.length;
){var D=GetEmailToken(F,E);
if(D.charAt(0)=="<"){var A=D.indexOf(">");
B=D.substring(1,(A!=-1)?A:D.length)
}else{if(B==""){C+=D
}}E+=D.length
}if(B==""&&C.indexOf("@")!=-1){B=C;
C=""
}C=CollapseWhitespace(C);
C=StripQuotes(C,"'");
C=StripQuotes(C,'"');
B=CollapseWhitespace(B);
return[C,B]
}function GetAddress(A){return ParseAddress(A)[1]
}function GetAddressUsername(B){B=GetAddress(B);
var A=B.indexOf("@");
return(A==-1)?B:B.substr(0,A)
}function GetPersonal(A){return ParseAddress(A)[0]
}function GetPersonalElseUsername(A){var B=GetPersonal(A);
if(B!=""){return B
}else{return GetAddressUsername(A)
}}function StripQuotes(C,B){var A=C.length;
if(C.charAt(0)==B&&C.charAt(A-1)==B){return C.substring(1,A-1)
}return C
}function EmailsToArray(E){var A=[];
var B="";
var D;
for(var C=0;
C<E.length;
){D=GetEmailToken(E,C);
if(D==","){AddEmailAddress(A,B);
B="";
C++;
continue
}B+=D;
C+=D.length
}if(B!=""||D==","){AddEmailAddress(A,B)
}return A
}var openers_='"<([';
var closers_='">)]';
function GetEmailToken(E,F){var B=E.charAt(F);
var D=openers_.indexOf(B);
if(D==-1){return B
}var C=E.indexOf(closers_.charAt(D),F+1);
var A=(C>=0)?E.substring(F,C+1):E.substr(F);
return A
}function AddEmailAddress(A,B){B=CleanEmailAddress(B);
A[A.length]=B
}var specialchars_re_=/[()<>@,;:\\\".\[\]]/;
function CleanEmailAddress(E){var D=ParseAddress(E);
var C=D[0];
var A=D[1];
if(C.indexOf('"')==-1){var B=specialchars_re_.test(C);
if(B){C='"'+C+'"'
}}if(C==""){return A
}else{if(A==""){return C
}else{return C+" <"+A+">"
}}}function SafeTimeout(D,C,B){if(!D){D=window
}if(!D._tm){D._tm=[]
}var A=SafeTimeoutFunction_(D,C);
var E=D.setTimeout(A,B);
A.id=E;
D._tm[E]=1;
return E
}function SafeTimeoutFunction_(C,B){var A=function(){try{B(C);
var D=C._tm;
if(D){delete D[A.id]
}}catch(E){DumpException(E)
}};
return A
}function CancelTimeout(A,B){if(!A){A=window
}A.clearTimeout(B);
if(A._tm){delete A._tm[B]
}}function CancelAllTimeouts(C){if(C&&C._tm){try{for(var A in C._tm){C.clearTimeout(A)
}C._tm=[]
}catch(B){DumpException(B)
}}}function CompareID(B,A){if(B.length!=A.length){return(B.length-A.length)
}else{return(B<A)?-1:(B>A)?1:0
}}function IsDefined(A){return(typeof A)!="undefined"
}function GetKeyCode(B){var A;
if(B.keyCode){A=B.keyCode
}else{if(B.which){A=B.which
}}return A
}function forid_1(A){return document.getElementById(A)
}function forid_2(A){return document.all[A]
}var forid=document.getElementById?forid_1:forid_2;
function GetFnName(C){AssertTrue(C,"func passed to GetFnName() is undefined");
var B;
if(!("name" in C)){var A=/\W*function\s+([\w\$]+)\(/.exec(C);
if(!A){throw new Error("Cannot extract name from function: "+C)
}B=A[1];
C.name=B
}else{B=C.name
}if(!B||B=="anonymous"){throw new Error("Anonymous function has no name: "+C)
}return C.name
}function log(D){try{if(window.parent!=window&&window.parent.log){window.parent.log(window.name+"::"+D);
return 
}}catch(C){}var B=forid("log");
if(B){var A="<p class=logentry><span class=logdate>"+new Date()+"</span><span class=logmsg>"+D+"</span></p>";
B.innerHTML=A+B.innerHTML
}else{window.status=D
}}function uri_parse(B){var A=B.match(URI_RE_);
if(!A){return null
}return new URI(uri_nullIfAbsent_(A[1]),uri_nullIfAbsent_(A[2]),uri_nullIfAbsent_(A[3]),uri_nullIfAbsent_(A[4]),uri_nullIfAbsent_(A[5]),uri_nullIfAbsent_(A[6]),uri_nullIfAbsent_(A[7]))
}function uri_create(C,E,G,B,H,A,D){var F=new URI(uri_encodeIfExists2_(C,URI_DISALLOWED_IN_SCHEME_OR_CREDENTIALS_),uri_encodeIfExists2_(E,URI_DISALLOWED_IN_SCHEME_OR_CREDENTIALS_),uri_encodeIfExists_(G),B>0?B.toString():null,uri_encodeIfExists2_(H,URI_DISALLOWED_IN_PATH_),null,uri_encodeIfExists_(D));
if(A){F.SetAllCgiParameters(A)
}return F
}function uri_encodeIfExists_(A){if("string"==typeof A){return encodeURIComponent(A)
}return null
}function uri_encodeIfExists2_(B,A){if("string"==typeof B){return encodeURI(B).replace(A,uri_encodeOne_)
}return null
}function uri_encodeOne_(A){var B=A.charCodeAt(0);
return"%"+"0123456789ABCDEF".charAt((B>>4)&15)+"0123456789ABCDEF".charAt(B&15)
}function uri_resolve(D,B){var E=D.Clone();
var C=B.HasScheme();
if(C){E.SetRawScheme(B.GetRawScheme())
}else{C=B.HasCredentials()
}if(C){E.SetRawCredentials(B.GetRawCredentials())
}else{C=B.HasDomain()
}if(C){E.SetRawDomain(B.GetRawDomain())
}else{C=B.HasPort()
}var A=B.GetRawPath();
if(C){E.SetPort(B.GetPort())
}else{C=B.HasPath();
if(C){if(!new RegExp("^/").test(A)){A=E.GetRawPath().replace(new RegExp("/?[^/]*$"),"/"+A)
}}}if(C){E.SetRawPath(A)
}else{C=B.HasQuery()
}if(C){E.SetRawQuery(B.GetRawQuery())
}else{C=B.HasFragment()
}if(C){E.SetRawFragment(B.GetRawFragment())
}return E
}function URI(C,F,E,B,A,G,D){this.scheme_=C;
this.credentials_=F;
this.domain_=E;
this.port_=B;
this.path_=A;
this.query_=G;
this.fragment_=D;
this.paramCache_=null
}URI.prototype.toString=function(){var A=[];
if(null!==this.scheme_){A.push(this.scheme_,":")
}if(null!==this.domain_){A.push("//");
if(null!==this.credentials_){A.push(this.credentials_,"@")
}A.push(this.domain_);
if(null!==this.port_){A.push(":",this.port_.toString())
}}if(null!==this.path_){A.push(this.path_)
}if(null!==this.query_){A.push("?",this.query_)
}if(null!==this.fragment_){A.push("#",this.fragment_)
}return A.join("")
};
URI.prototype.Clone=function(){return new URI(this.scheme_,this.credentials_,this.domain_,this.port_,this.path_,this.query_,this.fragment_)
};
URI.prototype.GetScheme=function(){return this.scheme_&&uri_decodeThatWorks_(this.scheme_)
};
URI.prototype.GetRawScheme=function(){return this.scheme_
};
URI.prototype.SetScheme=function(A){this.scheme_=uri_encodeIfExists2_(A,URI_DISALLOWED_IN_SCHEME_OR_CREDENTIALS_);
return this
};
URI.prototype.SetRawScheme=function(A){this.scheme_=A?A:null;
return this
};
URI.prototype.HasScheme=function(){return null!==this.scheme_
};
URI.prototype.GetCredentials=function(){return this.credentials_&&uri_decodeThatWorks_(this.credentials_)
};
URI.prototype.GetRawCredentials=function(){return this.credentials_
};
URI.prototype.SetCredentials=function(A){this.credentials_=uri_encodeIfExists2_(A,URI_DISALLOWED_IN_SCHEME_OR_CREDENTIALS_);
return this
};
URI.prototype.SetRawCredentials=function(A){this.credentials_=A?A:null;
return this
};
URI.prototype.HasCredentials=function(){return null!==this.credentials_
};
URI.prototype.GetDomain=function(){return this.domain_&&uri_decodeThatWorks_(this.domain_)
};
URI.prototype.GetRawDomain=function(){return this.domain_
};
URI.prototype.SetDomain=function(A){this.domain_=A?encodeURIComponent(A):null;
return this
};
URI.prototype.SetRawDomain=function(A){this.domain_=A?A:null;
return this
};
URI.prototype.HasDomain=function(){return null!==this.domain_
};
URI.prototype.GetPort=function(){return this.port_&&uri_decodeThatWorks_(this.port_)
};
URI.prototype.SetPort=function(A){if(A){if("number"!==typeof A){A=parseInt(A,10);
if(A<0||isNaN(A)){throw new Error("Bad port number "+A)
}}this.port_=A.toString()
}else{this.port_=null
}return this
};
URI.prototype.HasPort=function(){return null!==this.port_
};
URI.prototype.GetPath=function(){return this.path_&&uri_decodeThatWorks_(this.path_)
};
URI.prototype.GetRawPath=function(){return this.path_
};
URI.prototype.SetPath=function(A){this.path_=uri_encodeIfExists2_(A,URI_DISALLOWED_IN_PATH_);
return this
};
URI.prototype.SetRawPath=function(A){this.path_=A?A:null;
return this
};
URI.prototype.HasPath=function(){return null!==this.path_
};
URI.prototype.GetQuery=function(){return this.query_&&uri_decodeThatWorks_(this.query_)
};
URI.prototype.GetRawQuery=function(){return this.query_
};
URI.prototype.SetQuery=function(A){this.paramCache_=null;
this.query_=uri_encodeIfExists_(A);
return this
};
URI.prototype.SetRawQuery=function(A){this.paramCache_=null;
this.query_=A?A:null;
return this
};
URI.prototype.HasQuery=function(){return null!==this.query_
};
URI.prototype.SetAllCgiParameters=function(E){this.paramCache_=null;
var C=[];
var F="";
for(var D=0;
D<E.length;
){var B=E[D++];
var A=E[D++];
C.push(F,encodeURIComponent(B.toString()));
F="&";
if(A){C.push("=",encodeURIComponent(A.toString()))
}}this.query_=C.join("");
return this
};
URI.prototype.CheckParameterCache_=function(){if(!this.paramCache_){if(!this.query_){this.paramCache_=[]
}else{var D=this.query_.split(/[&\?]/);
var B=[];
for(var C=0;
C<D.length;
++C){var A=D[C].match(/^([^=]*)(?:=(.*))?$/);
B.push(uri_decodeThatWorks_(A[1]),uri_decodeThatWorks_(A[2]||""))
}this.paramCache_=B
}}};
URI.prototype.SetCgiParameterValues=function(E,B){if(typeof B==="string"){B=[B]
}this.CheckParameterCache_();
var F=0;
var C=this.paramCache_;
var G=[];
for(var D=0,A=0;
D<C.length;
D+=2){if(E===C[D]){if(F<B.length){G.push(E,B[F++])
}}else{G.push(C[D],C[D+1])
}}while(F<B.length){G.push(E,B[F++])
}this.SetAllCgiParameters(G);
return this
};
URI.prototype.GetAllCgiParameters=function(){this.CheckParameterCache_();
return this.paramCache_.slice(0,this.paramCache_.length)
};
URI.prototype.GetCgiParameterValues=function(A){this.CheckParameterCache_();
var B=[];
for(var C=0;
C<this.paramCache_.length;
C+=2){if(A===this.paramCache_[C]){B.push(this.paramCache_[C+1])
}}return B
};
URI.prototype.GetCgiParameterMap=function(A){this.CheckParameterCache_();
var D={};
for(var C=0;
C<this.paramCache_.length;
C+=2){var B=this.paramCache_[C++],E=this.paramCache_[C++];
if(!(B in D)){D[B]=[E]
}else{D[B].push(E)
}}return D
};
URI.prototype.GetCgiParameterValue=function(A){this.CheckParameterCache_();
for(var B=0;
B<this.paramCache_.length;
B+=2){if(A===this.paramCache_[B]){return this.paramCache_[B+1]
}}return null
};
URI.prototype.GetFragment=function(){return this.fragment_&&uri_decodeThatWorks_(this.fragment_)
};
URI.prototype.GetRawFragment=function(){return this.fragment_
};
URI.prototype.SetFragment=function(A){this.fragment_=A?encodeURIComponent(A):null;
return this
};
URI.prototype.SetRawFragment=function(A){this.fragment_=A?A:null;
return this
};
URI.prototype.HasFragment=function(){return null!==this.fragment_
};
function uri_decodeThatWorks_(A){return decodeURIComponent(A).replace(/\+/g," ")
}function uri_nullIfAbsent_(A){return("string"==typeof A)&&(A.length>0)?A:null
}var URI_RE_=new RegExp("^(?:([^:/?#]+):)?(?://(?:([^/?#]*)@)?([^/?#:@]*)(?::([0-9]+))?)?([^?#]+)?(?:\\?([^#]*))?(?:#(.*))?$");
var URI_DISALLOWED_IN_SCHEME_OR_CREDENTIALS_=/[#\/\?@]/g;
var URI_DISALLOWED_IN_PATH_=/[\#\?]/g;
var XH_ieProgId_;
var XML_READY_STATE_UNINITIALIZED=0;
var XML_READY_STATE_LOADING=1;
var XML_READY_STATE_LOADED=2;
var XML_READY_STATE_INTERACTIVE=3;
var XML_READY_STATE_COMPLETED=4;
function XH_XmlHttpInit_(){var D=["MSXML2.XMLHTTP.6.0","MSXML2.XMLHTTP.3.0","MSXML2.XMLHTTP","Microsoft.XMLHTTP"];
if(typeof XMLHttpRequest=="undefined"&&typeof ActiveXObject!="undefined"){for(var A=0;
A<D.length;
A++){var B=D[A];
try{new ActiveXObject(B);
XH_ieProgId_=B;
break
}catch(C){}}if(!XH_ieProgId_){throw Error("Could not create ActiveXObject. ActiveX might be disabled, or MSXML might not be installed.")
}}}XH_XmlHttpInit_();
function XH_XmlHttpCreate(){if(XH_ieProgId_){return new ActiveXObject(XH_ieProgId_)
}else{return new XMLHttpRequest()
}}function XH_XmlHttpGET(A,B,C){A.open("GET",B,true);
A.onreadystatechange=C;
XH_XmlHttpSend(A,null)
}function XH_XmlHttpPOST(A,B,D,C){A.open("POST",B,true);
A.onreadystatechange=C;
A.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
A.setRequestHeader("Content-Length",(D.length));
XH_XmlHttpSend(A,D)
}function XH_XmlHttpOpen(A,D,B,C){A.open(D,B,true);
A.onreadystatechange=C
}function XH_XmlHttpSetRequestHeader(A,B,C){A.setRequestHeader(B,C)
}function XH_XmlHttpSend(A,B){try{A.send(B)
}catch(C){log("XMLHttpSend failed "+C.toString()+"<br>"+C.stack);
throw C
}}function XH_XmlHttpAbort(A){SafeTimeout(window,function(){A.onreadystatechange=function(){}
},0);
if(A.readyState<XML_READY_STATE_COMPLETED){A.abort()
}}var ss_form_element="suggestion_form";
var ss_popup_element="search_suggest";
var ss_seq=["g"];
var ss_g_one_name_to_display="Suggestion";
var ss_g_more_names_to_display="Suggestions";
var ss_g_max_to_display=10;
var ss_max_to_display=12;
var ss_wait_millisec=300;
var ss_delay_millisec=30;
var ss_gsa_host=null;
var SS_OUTPUT_FORMAT_LEGACY="legacy";
var SS_OUTPUT_FORMAT_OPEN_SEARCH="os";
var SS_OUTPUT_FORMAT_RICH="rich";
var ss_protocol=SS_OUTPUT_FORMAT_RICH;
var ss_allow_non_query=true;
var ss_non_query_empty_title="No Title";
var ss_allow_debug=false;
(function($){$.fn.sSugessions=function(o){return this.each(function(){new $.sSugessions(this,o)
})
};
$.sSugessions=function(e,o){var options={baseURL:"",site:"UB",client:"ubcms",searchHost:"http://search.buffalo.edu"};
if(o){$.extend(options,o)
}var fo=null;
var tbl=null;
var scope=$(e);
fo=e;
scope.find(".type-text").keyup(function(event){scope.find("#search_suggest").each(function(){tbl=this;
ss_handleKey(event,e,this)
})
});
$(document).keyup(function(event){scope.find("#search_suggest").each(function(){ss_handleAllKey(event,e,this)
})
});
var ss_cached=[];
var ss_qbackup=null;
var ss_qshown=null;
var ss_loc=-1;
var ss_waiting=0;
var ss_painting=false;
var ss_key_handling_queue=null;
var ss_painting_queue=null;
var ss_dismissed=false;
var ss_panic=false;
var SS_ROW_CLASS="ss-gac-a";
var SS_ROW_SELECTED_CLASS="ss-gac-b";
if(!Array.indexOf){Array.prototype.indexOf=function(obj){for(var i=0;
i<this.length;
i++){if(this[i]==obj){return i
}}return -1
}
}var ss_debug=new ss_Debugger();
function ss_composeSuggestUri(qVal,suggestForm){var siteVal=options.site;
var clientVal=options.client;
if(!qVal||!siteVal||!clientVal){return null
}var accessVal=(suggestForm.access&&suggestForm.access.value)?suggestForm.access.value:"p";
var uri="/suggest";
if(SS_OUTPUT_FORMAT_LEGACY==ss_protocol){uri=uri+"?token="+encodeURIComponent(qVal)+"&max_matches="+ss_g_max_to_display
}else{uri=uri+"?q="+encodeURIComponent(qVal)+"&max="+ss_g_max_to_display
}uri=uri+"&site="+encodeURIComponent(siteVal)+"&client="+encodeURIComponent(clientVal)+"&access="+encodeURIComponent(accessVal)+"&format="+encodeURIComponent(ss_protocol);
return uri
}function ss_suggest(qVal,suggestForm,tbl){var startTimeMs=new Date().getTime();
if(!ss_cached[qVal]){ss_cached[qVal]={}
}var uri=ss_composeSuggestUri(qVal,suggestForm);
if(!uri){return 
}var url=options.baseURL+".spool?CFC__target="+options.searchHost+uri;
if(ss_panic){alert("ss_suggest() AJAX: "+url)
}var xmlhttp=XH_XmlHttpCreate();
var handler=function(){if(xmlhttp.readyState==XML_READY_STATE_COMPLETED){if(ss_panic){alert("ss_suggest() AJAX: "+xmlhttp.responseText)
}var suggested;
try{suggested=eval("("+xmlhttp.responseText+")")
}catch(e){ss_cached[qVal].g=null;
ss_show(qVal,suggestForm,tbl);
return 
}if(ss_use.g){try{switch(ss_protocol){case SS_OUTPUT_FORMAT_LEGACY:default:var suggestions=suggested;
if(suggestions&&suggestions.length>0){var found=false;
ss_cached[qVal].g=[];
var max=(ss_g_max_to_display<=0)?suggestions.length:Math.min(ss_g_max_to_display,suggestions.length);
for(var si=0;
si<max;
si++){ss_cached[qVal].g[si]={q:suggestions[si]};
found=true
}if(!found){ss_cached[qVal].g=null
}}else{ss_cached[qVal].g=null
}break;
case SS_OUTPUT_FORMAT_OPEN_SEARCH:if(suggested.length>1){var suggestions=suggested[1];
if(suggestions&&suggestions.length>0){var found=false;
ss_cached[qVal].g=[];
var max=(ss_g_max_to_display<=0)?suggestions.length:Math.min(ss_g_max_to_display,suggestions.length);
for(var si=0;
si<max;
si++){if(suggestions[si]&&suggestions[si]!=suggested[0]){ss_cached[qVal].g[si]={q:suggestions[si]};
found=true
}else{if((suggested.length>3)&&ss_allow_non_query){var title=(suggested[2].length>si)?null:suggested[2][si];
var url=(suggested[3].length>si)?null:suggested[3][si];
if(url){title=!title?ss_non_query_empty_title:title;
ss_cached[qVal].g[si]={t:title,u:url};
found=true
}}}}if(!found){ss_cached[qVal].g=null
}}else{ss_cached[qVal].g=null
}}else{ss_cached[qVal].g=null
}break;
case SS_OUTPUT_FORMAT_RICH:var suggestions=suggested.results;
if(suggestions&&suggestions.length>0){var found=false;
ss_cached[qVal].g=[];
var max=(ss_g_max_to_display<=0)?suggestions.length:Math.min(ss_g_max_to_display,suggestions.length);
for(var si=0;
si<max;
si++){if(suggestions[si].name&&suggestions[si].name!=suggested.query){ss_cached[qVal].g[si]={q:suggestions[si].name};
found=true
}else{if(ss_allow_non_query){var title=suggestions[si].content;
var url=suggestions[si].moreDetailsUrl;
if(url){title=!title?ss_non_query_empty_title:title;
ss_cached[qVal].g[si]={t:title,u:url};
found=true
}}}}if(!found){ss_cached[qVal].g=null
}}else{ss_cached[qVal].g=null
}break
}}catch(e){ss_cached[qVal].g=null
}}if(ss_allow_debug&&ss_debug&&ss_debug.getDebugMode()){var stopTimeMs=new Date().getTime();
ss_debug.addRequestDebugLine(qVal,"suggest",stopTimeMs-startTimeMs,ss_cached[qVal])
}ss_show(qVal,suggestForm,tbl)
}};
XH_XmlHttpGET(xmlhttp,url,handler)
}function ss_processed(qVal){if(!ss_cached[qVal]&&ss_use.g){return false
}return true
}function ss_handleAllKey(e,fo,tbl){var kid=(window.event)?window.event.keyCode:e.keyCode;
switch(kid){case 40:case 38:break;
case 9:case 16:ss_qbackup=null;
ss_dismissed=true;
ss_clear(true,fo,tbl);
var qry=fo.q.value;
if(!ss_processed(qry)){if(ss_panic){alert("run ajax when key off")
}ss_suggest(qry,fo,tbl)
}break;
case 113:if(!ss_allow_debug){break
}if(ss_debug&&ss_debug.getDebugMode()){ss_debug.deactivateConsole()
}else{ss_debug.activateConsole()
}break;
default:break
}}function ss_handleKey(e,fo,tbl){var kid=(window.event)?window.event.keyCode:e.keyCode;
var qnow=(!ss_qbackup)?fo.q.value:ss_qbackup;
var sum=0;
switch(kid){case 40:ss_dismissed=false;
if(ss_processed(qnow)){sum=ss_countSuggestions(qnow);
if(sum>0){if(tbl.style.visibility=="hidden"){ss_show(qnow,fo,tbl);
break
}if(ss_qbackup){ss_loc++
}else{ss_qbackup=qnow;
ss_loc=0
}while(ss_loc>=sum){ss_loc-=sum
}var rows=tbl.getElementsByTagName("tr");
for(var ri=0;
ri<rows.length-1;
ri++){if(ri==ss_loc){rows[ri].className=SS_ROW_SELECTED_CLASS
}else{rows[ri].className=SS_ROW_CLASS
}}var suggestion=ss_locateSuggestion(qnow,ss_loc);
if(suggestion.q){fo.q.value=suggestion.q
}else{fo.q.value=ss_qbackup
}}}else{if(ss_panic){alert("run ajax when key down")
}ss_suggest(qnow,fo,tbl)
}break;
case 38:ss_dismissed=false;
if(ss_processed(qnow)){sum=ss_countSuggestions(qnow);
if(sum>0){if(tbl.style.visibility=="hidden"){ss_show(qnow,fo,tbl);
break
}if(ss_qbackup){ss_loc--
}else{ss_qbackup=qnow;
ss_loc=-1
}while(ss_loc<0){ss_loc+=sum
}var rows=tbl.getElementsByTagName("tr");
for(var ri=0;
ri<rows.length-1;
ri++){if(ri==ss_loc){rows[ri].className=SS_ROW_SELECTED_CLASS
}else{rows[ri].className=SS_ROW_CLASS
}}var suggestion=ss_locateSuggestion(qnow,ss_loc);
if(suggestion.q){fo.q.value=suggestion.q
}else{fo.q.value=ss_qbackup
}}}else{if(ss_panic){alert("run ajax when key up")
}ss_suggest(qnow)
}break;
case 13:var url=null;
if(ss_processed(qnow)&&ss_qbackup&&ss_loc>-1){var suggestion=ss_locateSuggestion(ss_qbackup,ss_loc);
if(suggestion.u){url=suggestion.u
}}ss_qbackup=null;
ss_dismissed=true;
ss_clear(false,fo,tbl);
if(url){window.location.href=url
}break;
case 27:if(ss_qbackup){fo.q.value=ss_qbackup;
ss_qbackup=null
}ss_dismissed=true;
ss_clear(false,fo,tbl);
break;
case 37:case 39:case 9:case 16:break;
default:ss_dismissed=false;
if(fo.q.value==ss_qshown){}else{if(ss_key_handling_queue){clearTimeout(ss_key_handling_queue)
}ss_qbackup=null;
ss_loc=-1;
ss_waiting++;
if(ss_allow_debug&&ss_debug&&ss_debug.getDebugMode()){ss_debug.addWaitDebugLine(fo.q.value,"queue",ss_wait_millisec)
}ss_key_handling_queue=setTimeout(function(){ss_handleQuery(ss_escape(fo.q.value),ss_waiting,fo,tbl)
},ss_wait_millisec)
}break
}}function ss_handleQuery(query,waiting1,fo,tbl){if(waiting1!=ss_waiting){return 
}ss_waiting=0;
if(query==""){ss_clear(false,fo,tbl)
}else{if(!ss_processed(query)){if(ss_panic){alert("run ajax when key change")
}ss_suggest(query,fo,tbl)
}else{ss_show(query,fo,tbl)
}}}function ss_sf(fo){fo.q.focus();
ss_dismissed=false
}function ss_clear(nofocus,fo,tbl){ss_qshown=null;
var qnow=(!ss_qbackup)?fo.q.value:ss_qbackup;
ss_hide(qnow,tbl);
if(!nofocus){ss_sf(fo)
}}function ss_hide(qry,tbl){if(tbl.style.visibility=="visible"){if(ss_panic){alert("close suggestion box")
}if(ss_allow_debug&&ss_debug&&ss_debug.getDebugMode()){ss_debug.addHideDebugLine(qry,"hide")
}tbl.style.visibility="hidden"
}}function ss_show(qry,fo,tbl){var currentQry=fo.q.value;
if(currentQry!=qry){if(ss_allow_debug&&ss_debug&&ss_debug.getDebugMode()){ss_debug.addHideDebugLine(qry,"skip")
}return 
}var startTimeMs=new Date().getTime();
if(ss_dismissed){ss_qshown=null;
ss_hide(qry,tbl);
return 
}if(!ss_processed(qry)){return 
}if(qry==""){ss_hide(qry,tbl);
return 
}var g=ss_cached[qry]?ss_cached[qry].g:null;
var disp=false;
if(ss_use.g&&g){disp=true
}if(!disp){ss_qshown=null;
ss_hide(qry,tbl);
return 
}if(ss_painting){if(ss_painting_queue){clearTimeout(ss_painting_queue)
}if(ss_allow_debug&&ss_debug&&ss_debug.getDebugMode()){ss_debug.addWaitDebugLine(qry,"delay",ss_delay_millisec)
}ss_painting_queue=setTimeout(function(){ss_show(ss_escape(qry),fo,tbl)
},ss_delay_millisec);
return 
}else{ss_painting=true
}for(var ri=tbl.rows.length-1;
ri>-1;
ri--){tbl.deleteRow(ri)
}var cnt=0;
for(var z=0;
z<ss_seq.length;
z++){switch(ss_seq[z]){case"g":cnt+=ss_showSuggestion(g,cnt,fo,tbl);
break
}if(ss_max_to_display>0&&cnt>=ss_max_to_display){break
}}if(cnt>0){var row=tbl.insertRow(-1);
row.className="ss-gac-e";
var cls=document.createElement("td");
cls.colSpan=2;
var clsTxt=document.createElement("span");
clsTxt.onclick=function(){ss_qbackup=null;
ss_clear(false,fo,tbl);
var query=fo.q.value;
if(!ss_processed(query)){ss_dismissed=true;
if(ss_panic){alert("run ajax when mouse close")
}ss_suggest(query,fo,tbl)
}};
clsTxt.appendChild(document.createTextNode("close"));
cls.appendChild(clsTxt);
row.appendChild(cls);
tbl.style.visibility="visible";
ss_qshown=qry;
if(ss_panic){alert("open suggestion box for "+qry)
}if(ss_allow_debug&&ss_debug&&ss_debug.getDebugMode()){var stopTimeMs=new Date().getTime();
ss_debug.addShowDebugLine(qry,stopTimeMs-startTimeMs,ss_cached[qry],cnt)
}}else{ss_hide(qry,tbl)
}ss_painting=false
}function ss_showSuggestion(g,cnt,fo,tbl){if(ss_max_to_display>0&&cnt>=ss_max_to_display){return 0
}if(g&&g.length>0){for(var i=0;
i<g.length;
i++){var row=tbl.insertRow(-1);
row.onclick=ss_handleMouseC;
row.onmousemove=ss_handleMouseM;
row.className=SS_ROW_CLASS;
var alt=document.createElement("td");
if(g[i].q){alt.appendChild(document.createTextNode(g[i].q))
}else{alt.innerHTML="<i>"+g[i].t+"</i>"
}alt.className="ss-gac-c";
row.appendChild(alt);
var clue="";
if(i==0&&g.length==1){clue=ss_g_one_name_to_display
}else{if(i==0){clue=ss_g_more_names_to_display
}}var typ=document.createElement("td");
typ.appendChild(document.createTextNode(clue));
typ.className="ss-gac-d";
row.appendChild(typ);
if(ss_max_to_display>0&&cnt+i+1>=ss_max_to_display){return i+1
}}return g.length
}return 0
}function ss_handleMouseM(){var rows=tbl.getElementsByTagName("tr");
for(var ri=0;
ri<rows.length-1;
ri++){if(rows[ri]==this&&rows[ri].className!=SS_ROW_SELECTED_CLASS){rows[ri].className=SS_ROW_SELECTED_CLASS;
if(!ss_qbackup){ss_qbackup=fo.q.value
}ss_loc=ri;
var suggestion=ss_locateSuggestion(ss_qbackup,ss_loc);
if(suggestion.q){fo.q.value=suggestion.q
}else{fo.q.value=ss_qbackup
}}else{if(rows[ri]!=this){rows[ri].className=SS_ROW_CLASS
}}}ss_sf(fo);
return true
}function ss_handleMouseC(){var rows=tbl.getElementsByTagName("tr");
for(var ri=0;
ri<rows.length-1;
ri++){if(rows[ri]==this){if(!ss_qbackup){ss_qbackup=fo.q.value
}ss_loc=ri;
var suggestion=ss_locateSuggestion(ss_qbackup,ss_loc);
if(suggestion.q){fo.q.value=suggestion.q;
fo.submit()
}else{fo.q.value=ss_qbackup;
if(suggestion.u){window.location.href=suggestion.u
}}break
}}}function ss_countSuggestions(query){var cnt=0;
for(var i=0;
i<ss_seq.length;
i++){switch(ss_seq[i]){case"g":cnt+=ss_cached[query].g?ss_cached[query].g.length:0;
break
}if(ss_max_to_display>0&&cnt>=ss_max_to_display){return ss_max_to_display
}}return cnt
}function ss_locateSuggestion(query,loc){var cnt1=0;
var cnt2=0;
var type=null;
for(var z=0;
z<ss_seq.length;
z++){switch(ss_seq[z]){case"g":cnt2+=ss_cached[query].g?ss_cached[query].g.length:0;
break
}if(loc>=cnt1&&loc<cnt2){switch(ss_seq[z]){case"g":var qV=ss_cached[query].g[loc-cnt1].q;
if(qV){return{q:qV}
}else{return{u:ss_cached[query].g[loc-cnt1].u}
}}break
}cnt1=cnt2
}return null
}function ss_escape(query){return query.replace(/\\/g,"\\\\").replace(/\"/g,'\\"')
}function ss_escapeDbg(query){var escapedQuery="";
var ch=query.split("");
for(var i=0;
i<ch.length;
i++){switch(ch[i]){case"&":escapedQuery+="&amp;";
break;
case"<":escapedQuery+="&lt;";
break;
case">":escapedQuery+="&gt;";
break;
default:escapedQuery+=ch[i];
break
}}return escapedQuery
}function ss_Debugger(){this.debugMode=false
}ss_Debugger.DEBUG_CONSOLE_ID="ss_debug_console";
ss_Debugger.DEBUG_CONTENT_ID="ss_debug_content";
ss_Debugger.DEBUG_TOGGLE_ID="ss_debug_toggle";
ss_Debugger.prototype.getDebugMode=function(){return this.debugMode
};
ss_Debugger.prototype.activateConsole=function(){var console=document.getElementById(ss_Debugger.DEBUG_CONSOLE_ID);
if(console){console.style.display="block"
}else{var dc=document.createElement("div");
dc.id=ss_Debugger.DEBUG_CONSOLE_ID;
dc.zIndex=100;
dc.className="expanded";
var title=document.createElement("h1");
title.appendChild(document.createTextNode("GSA Suggest Debug Console"));
title.style.display="inline";
dc.appendChild(title);
var actn=document.createElement("div");
actn.style["float"]="right";
var btn=document.createElement("button");
btn.onclick=function(event){var debugContent=document.getElementById(ss_Debugger.DEBUG_CONTENT_ID);
if(debugContent){for(var ri=debugContent.rows.length-1;
ri>0;
ri--){debugContent.deleteRow(ri)
}}};
btn.appendChild(document.createTextNode("Clear console"));
actn.appendChild(btn);
btn=document.createElement("button");
btn.onclick=function(event){ss_cached=[]
};
btn.appendChild(document.createTextNode("Clear cache"));
actn.appendChild(btn);
btn=document.createElement("button");
btn.id=ss_Debugger.DEBUG_TOGGLE_ID;
btn.onclick=function(event){var debugConsole=document.getElementById(ss_Debugger.DEBUG_CONSOLE_ID);
if(debugConsole){var b=document.getElementById(ss_Debugger.DEBUG_TOGGLE_ID);
if(debugConsole.className.indexOf("expanded")!=-1){debugConsole.className=debugConsole.className.replace(/expanded/,"contracted");
b.innerHTML="Maximize"
}else{debugConsole.className=debugConsole.className.replace(/contracted/,"expanded");
b.innerHTML="Minimize"
}}};
btn.appendChild(document.createTextNode("Minimize"));
actn.appendChild(btn);
actn.style.display="inline";
dc.appendChild(actn);
dc.appendChild(document.createElement("br"));
var pane=document.createElement("table");
pane.id=ss_Debugger.DEBUG_CONTENT_ID;
var dhr=pane.insertRow(-1);
var dhc=document.createElement("th");
dhc.innerHTML="Query";
dhr.appendChild(dhc);
dhc=document.createElement("th");
dhc.innerHTML="Type";
dhr.appendChild(dhc);
dhc=document.createElement("th");
dhc.innerHTML="Time";
dhr.appendChild(dhc);
dhc=document.createElement("th");
dhc.innerHTML="g";
dhr.appendChild(dhc);
dhc=document.createElement("th");
dhc.innerHTML="Total";
dhr.appendChild(dhc);
dc.appendChild(pane);
document.body.appendChild(dc)
}this.debugMode=true
};
ss_Debugger.prototype.deactivateConsole=function(){var console=document.getElementById(ss_Debugger.DEBUG_CONSOLE_ID);
if(console){console.style.display="none"
}this.debugMode=false
};
ss_Debugger.prototype.addRequestDebugLine=function(query,type,time,obj){var debugContent=document.getElementById(ss_Debugger.DEBUG_CONTENT_ID);
if(debugContent){var currentRow=debugContent.insertRow(1);
var currentCell=document.createElement("td");
currentCell.innerHTML="&lt;"+ss_escapeDbg(query)+"&gt;";
currentRow.appendChild(currentCell);
currentCell=document.createElement("td");
currentCell.innerHTML=type;
currentRow.appendChild(currentCell);
currentCell=document.createElement("td");
currentCell.className="no";
currentCell.innerHTML=time+" ms";
currentRow.appendChild(currentCell);
switch(type){case"suggest":currentCell=document.createElement("td");
currentCell.className="no";
currentCell.innerHTML=(obj.g?obj.g.length:0);
currentRow.appendChild(currentCell);
currentCell=document.createElement("td");
currentRow.appendChild(currentCell);
break;
default:currentCell=document.createElement("td");
currentRow.appendChild(currentCell);
currentCell=document.createElement("td");
currentRow.appendChild(currentCell);
break
}}};
ss_Debugger.prototype.addShowDebugLine=function(query,time,o,total){var debugContent=document.getElementById(ss_Debugger.DEBUG_CONTENT_ID);
if(debugContent){var currentRow=debugContent.insertRow(1);
var currentCell=document.createElement("td");
currentCell.innerHTML="&lt;"+ss_escapeDbg(query)+"&gt;";
currentRow.appendChild(currentCell);
currentCell=document.createElement("td");
currentCell.innerHTML="<i>show</i>";
currentRow.appendChild(currentCell);
currentCell=document.createElement("td");
currentCell.className="no";
currentCell.innerHTML=time+" ms";
currentRow.appendChild(currentCell);
currentCell=document.createElement("td");
currentCell.className="no";
currentCell.innerHTML=(o?(o.g?o.g.length:0):0);
currentRow.appendChild(currentCell);
currentCell=document.createElement("td");
currentCell.className="no";
currentCell.innerHTML=total;
currentRow.appendChild(currentCell)
}};
ss_Debugger.prototype.addHideDebugLine=function(query,type){var debugContent=document.getElementById(ss_Debugger.DEBUG_CONTENT_ID);
if(debugContent){var currentRow=debugContent.insertRow(1);
var currentCell=document.createElement("td");
currentCell.innerHTML="&lt;"+ss_escapeDbg(query)+"&gt;";
currentRow.appendChild(currentCell);
currentCell=document.createElement("td");
currentCell.innerHTML="<i>"+type+"</i>";
currentRow.appendChild(currentCell);
currentCell=document.createElement("td");
currentCell.className="no";
currentCell.innerHTML="0 ms";
currentRow.appendChild(currentCell);
currentCell=document.createElement("td");
currentRow.appendChild(currentCell);
currentCell=document.createElement("td");
currentRow.appendChild(currentCell)
}};
ss_Debugger.prototype.addWaitDebugLine=function(query,type,time){var debugContent=document.getElementById(ss_Debugger.DEBUG_CONTENT_ID);
if(debugContent){var currentRow=debugContent.insertRow(1);
var currentCell=document.createElement("td");
currentCell.innerHTML="&lt;"+ss_escapeDbg(query)+"&gt;";
currentRow.appendChild(currentCell);
currentCell=document.createElement("td");
currentCell.innerHTML="<i>"+type+"</i>";
currentRow.appendChild(currentCell);
currentCell=document.createElement("td");
currentCell.className="no";
currentCell.innerHTML=time+" ms";
currentRow.appendChild(currentCell);
currentCell=document.createElement("td");
currentRow.appendChild(currentCell);
currentCell=document.createElement("td");
currentRow.appendChild(currentCell)
}};
var ss_use={};
ss_use.g=ss_seq.indexOf("g")>=0?true:false
}
})(jQuery);
