/*  
	 ___                         
	/\_ \    __                  
	\//\ \  /\_\  __  __    __   
	  \ \ \ \/\ \/\ \/\ \ /'__`\ 
	   \_\ \_\ \ \ \ \_/ |\  __/ 
	   /\____\\ \_\ \___/\ \____\
	   \/____/ \/_/\/__/  \/____/ v1.6.1
                             
	A lightweight Javascript interface with various extensions
	By Max Felker | max@bigroomstudios.com
	By Brian Leighton | brian@bigroomstudios.com
	
	+1 Google for the Closure Compiler | http://closure-compiler.appspot.com/home
	
	ASCII Art Generated @ http://patorjk.com/software/taag/
	
*/

// LIVE Global Object
var live=Class.create({initialize:function(d){this.config=d;d.page?this.page=d.page:this.page="";d.browser?this.browser=d.browser:this.browser={type:"unknown",v:"0"};this.head=$$("head")[0];this.rollovers=$H();this.popups=$H();this.dropdowns=$H();document.observe("dom:loaded",function(){this.body=$(document.body);if(live.browser.touch_screen){body_elements=this.body.descendants();body_elements.each(function(h){h.hasAttribute("onmouseover")&&h.writeAttribute("onmouseover");h.hasAttribute("onmouseout")&&
h.writeAttribute("onmouseout")})}this.viewport=document.viewport.getDimensions();Event.observe(window,"resize",this.get_viewport_dimensions.bind(this))}.bind(this))},get_viewport_dimensions:function(){this.viewport=document.viewport.getDimensions()},create_js:function(d){if(d&&d.endsWith(".js"))this.head.appendChild(new Element("script",{type:"text/javascript",src:d}));else return false},create_css:function(d){if(d&&d.endsWith(".css"))this.head.appendChild(new Element("link",{rel:"stylesheet",type:"text/css",
href:d}));else return false}});
// Canopy
var Canopy=Class.create({initialize:function(){},create:function(){if($("canopy"))return false;else{this.container=Builder.node("div",{id:"canopy",style:"display:none;"});this.overlay=Builder.node("div",{id:"canopy-overlay"});this.btn_close=Builder.node("p",{id:"canopy-btn-close"});this.container.appendChild(this.overlay);this.container.appendChild(this.btn_close);this.body_first_child=live.body.firstDescendant();live.body.insertBefore(this.container,this.body_first_child)}},on:function(){$("canopy")||
this.create();new Effect.Appear(this.container,{duration:0.25});this.overlay.setOpacity(0.7);this.btn_close.observe("click",this.off.bind(this))},off:function(){new Effect.Fade(this.container,{duration:0.25});live.browser.v==6&&live.browser.type=="msie"&&live.body.removeClassName("canopy-ie6");this.btn_close.stopObserving("click",this.off.bind(this))},remove:function(){if($("canopy")){this.off();live.body.removeChild(this.container)}else{alert("Canopy doesn't exsist!");return false}}});
document.observe("dom:loaded",function(){live.canopy=new Canopy});
// Dropdown
var Dropdown=Class.create({initialize:function(d){this.container=$(d.container);this.sub_container=$$("#"+d.container+" .dropdown-sub-container")[0];this.parent_item=$$("#"+d.container+" .dropdown-parent-item")[0];this.parent_menu=d.parent_menu;this.menu_open=false;this.container.observe("mouseenter",this.show_menu.bind(this));this.container.observe("mouseleave",this.hide_menu.bind(this));live.dropdowns.set(this.container.id,this)},show_menu:function(){clearTimeout(this.menu_timeout);if(!this.menu_open)this.menu_timeout=
setTimeout(function(){this.menu_open=true;Effect.SlideDown(this.sub_container,{duration:0.2})}.bind(this),200)},hide_menu:function(){clearTimeout(this.menu_timeout);if(this.menu_open)this.menu_timeout=setTimeout(function(){this.menu_open=false;Effect.SlideUp(this.sub_container,{duration:0.2})}.bind(this),200)}});
// Rollover
var Rollover=Class.create({initialize:function(d){this.container=$(d.container);this.img_off=Builder.node("img",{id:d.container+"-off",src:d.img_off,border:0,style:"display:none"});this.img_on=Builder.node("img",{id:d.container+"-on",src:d.img_on,border:0,style:"display:none"});this.container.appendChild(this.img_off);this.container.appendChild(this.img_on);this.img_off=$(d.container+"-off");this.img_on=$(d.container+"-on");this.img_off.show();this.container.observe("mouseenter",this.img_hover.bind(this));
this.container.observe("mouseleave",this.img_idle.bind(this));live.rollovers.set(this.container.id,this)},img_hover:function(){this.img_off.hide();this.img_on.show()},img_idle:function(){this.img_on.hide();this.img_off.show()},stop_rollover:function(){Event.stopObserving(this.container)}});
// Popup
var Popup=Class.create({initialize:function(d){this.popup_id="popup-"+d.container;this.src=d.src;d.title?this.title=d.title:this.title=this.src;if(d.fullscreen){this.fullscreen=d.fullscreen;this.width=live.viewport.width-2;this.height=live.viewport.height-4}else{d.width?this.width=d.width:this.width=live.viewport.width/2;d.height?this.height=d.height:this.height=live.viewport.height/2;d.title_height?this.title_height=d.title_height:this.title_height=25}this.static_dimensions=false;if(d.width&&d.height)this.static_dimensions=
true;d.confirm_close?this.confirm_close=d.confirm_close:this.confirm_close=false;d.drag?this.drag=true:this.drag=false;d.minimize?this.minimize_window=d.minimize:this.minimize_window=false;if($(this.popup_id))return false;this.container=Builder.node("div",{id:this.popup_id,className:"popup-container"},[Builder.node("div",{id:this.popup_id+"-controls",className:"popup-controls wrapper"},[Builder.node("p",{id:this.popup_id+"-title",className:"popup-title"}),Builder.node("a",{id:this.popup_id+"-close",
className:"popup-close"},"x")])]);this.container.setStyle({position:"absolute",width:this.width+"px",height:this.height+"px",top:(live.viewport.height-this.height)/2+"px",left:(live.viewport.width-this.width)/2+"px"});this.fullscreen&&this.container.setStyle("top:0px;left:0px;right:0px;bottom:0px;");this.iframe=Builder.node("iframe",{id:this.popup_id+"-iframe",name:this.popup_id+"-iframe",frameborder:0,scrolling:"yes",src:this.src,width:this.width-2+"px",height:this.height-this.title_height+"px"});
this.container.appendChild(this.iframe);document.body.appendChild(this.container);this.container=$(this.popup_id);live.popups.set(this.popup_id,this);this.controls_container=$(this.popup_id+"-controls");this.iframe=$(this.popup_id+"-iframe");this.title_container=$(this.popup_id+"-title");this.title_container.update(this.title);this.btn={close:$(this.popup_id+"-close")};this.btn.close.observe("click",this.close_popup.bind(this));if(this.minimize_window){this.btn.minimize=Builder.node("a",{id:this.popup_id+
"-minimize",className:"popup-minize"},"_");this.controls_container.appendChild(this.btn.minimize);this.btn.minimize=$(this.popup_id+"-minimize");this.btn.minimize.observe("click",this.minimize.bind(this))}if(this.drag){$(this.popup_id+"-controls").setStyle("cursor:move;");new Draggable(this.container,{handle:this.container.id+"-controls",starteffect:"",endeffect:""})}Event.observe(window,"resize",this.reposition.bind(this))},resize:function(){if(this.fullscreen){this.width=live.viewport.width-2;this.height=
live.viewport.height-4;this.container.setStyle({width:this.width+"px",height:this.height-4+"px"})}else{this.width=live.viewport.width/2;this.height=live.viewport.height/2;this.container.setStyle({width:this.width+"px",height:this.height+"px"})}this.iframe.setStyle({width:this.width+"px",height:this.height-this.title_height+"px"})},reposition:function(){this.static_dimensions||this.resize();this.fullscreen||this.container.setStyle({top:(live.viewport.height-this.height)/2+"px",left:(live.viewport.width-
this.width)/2+"px"})},show_popup:function(){new Effect.Appear(this.container,{duration:0.3})},minimize:function(){this.iframe.hide();this.container.setStyle({height:"auto"});this.btn.minimize.update("+");this.btn.minimize.stopObserving();this.btn.minimize.observe("click",this.restore.bind(this))},restore:function(){this.iframe.show();this.container.setStyle({width:this.width+"px",height:this.height+"px"});this.btn.minimize.update("_");this.btn.minimize.stopObserving();this.btn.minimize.observe("click",
this.minimize.bind(this))},close_popup:function(){if(this.confirm_close)if(confirm("Are you sure you would like to close this window?"))this.remove_popup();else return false;else this.remove_popup()},remove_popup:function(){Effect.Fade(this.container,{duration:0.25});setTimeout(function(){this.container.remove()}.bind(this),350)}});
// Modal
var Modal=Class.create({initialize:function(){},open:function(d){d.container="modal";live.canopy.on();live.canopy.btn_close.hide();this.popup=new Popup(d);this.popup.btn.close.observe("click",function(){live.canopy.off()})}});live.modal=new Modal;
// Tabs
var Tabs=Class.create({initialize:function(d){this.container=$(d.container);this.tab_elements=$$("#"+d.container+" .tab");this.tabs_count=this.tab_elements.length;this.tabs_current_index=0;this.tabs=$A();this.counter=0;this.tab_elements.each(function(h){var k=h.id.gsub("-tab","");h.panel=$(k+"-panel");h.panel.hide();h.index=this.counter;this.tabs[h.index]=h;this.counter++}.bind(this));this.tabs_current_index=this.counter=0;this.current_tab=this.tabs[this.tabs_current_index];this.show_tab();this.tabs.each(function(h){h.observe("click",
function(){this.tabs_current_index=h.index;this.show_tab()}.bind(this))}.bind(this))},show_tab:function(){this.current_tab.panel.hide();this.current_tab.removeClassName("current");this.current_tab=this.tabs[this.tabs_current_index];this.current_tab.panel.show();this.current_tab.addClassName("current")},next_tab:function(){this.tabs_current_index=(this.tabs_current_index+1+this.tabs_count)%this.tabs_count;this.show_tab()},previous_tab:function(){this.tabs_current_index=(this.tabs_current_index-1+this.tabs_count)%
this.tabs_count;this.show_tab()}});
// Slideshow
var Slideshow=Class.create({initialize:function(d){if(d){d.duration?this.slide_duration=d.duration:this.slide_duration=5;d.autostart?this.autostart=d.autostart:this.autostart=false;d.loop?this.loop=d.loop:this.loop=false;d.reverse?this.reverse=d.reverse:this.reverse=false}this.container=$(d.container);this.slides=$$("#"+this.container.id+" .slide");this.slides_count=this.slides.length;this.reverse?this.slideshow_counter=this.slides_count-1:this.slideshow_counter=0;this.completed=this.playing=false;
this.slides.invoke("hide");this.current_slide=this.slides[this.slideshow_counter];this.current_slide.show();if(this.autostart){this.start();this.show_slide()}},show_slide:function(){if(!this.loop&&this.slideshow_counter>=this.slides_count){this.slideshow_counter=this.slides_count-1;this.stop();return false}else if(this.slideshow_counter>=this.slides_count)this.slideshow_counter=0;if(!this.loop&&this.slideshow_counter<0){this.slideshow_counter=0;this.stop();return false}else if(this.slideshow_counter<
0)this.slideshow_counter=this.slides_count-1;this.current_slide=this.slides[this.slideshow_counter];this.other_slides=this.current_slide.siblings();this.other_slides.each(function(d){d.hasClassName("slide")&&Effect.Fade(d,{duration:0.5})});this.current_slide=this.slides[this.slideshow_counter];Effect.Appear(this.current_slide,{duration:0.5})},start:function(){if(this.playing)return false;else{if(this.reverse){this.playing=true;this.executer=new PeriodicalExecuter(function(){this.previous_slide()}.bind(this),
this.slide_duration)}else{this.playing=true;this.executer=new PeriodicalExecuter(function(){this.next_slide()}.bind(this),this.slide_duration)}this.completed=false;this.slides.invoke("hide")}},stop:function(){this.executer&&this.executer.stop();this.completed=true;this.playing=false},restart:function(){if(this.playing)return false;else{this.reset();this.start()}},reset:function(){this.stop();this.slideshow_counter=this.reverse?this.slides_count-1:0;this.show_slide()},next_slide:function(){this.slideshow_counter++;
this.show_slide()},previous_slide:function(){this.slideshow_counter--;this.show_slide()}});
// TabbedSlideshow
var TabbedSlideshow=Class.create(Tabs,{initialize:function($super,h){$super(h);h.duration?this.tab_slide_duration=h.duration:this.tab_slide_duration=5;this.tabs.each(function(k){k.slideshow=new Slideshow({container:k.panel,duration:this.tab_slide_duration,autostart:false,loop:false});k.observe("click",function(){this.stop_status_check();this.tabs.each(function(u){u.slideshow.reset()}.bind(this));this.current_tab.slideshow.start();this.current_tab.slideshow.show_slide();this.start_status_check()}.bind(this))}.bind(this));
this.current_tab.slideshow.start();this.current_tab.slideshow.show_slide();this.start_status_check()},slides_reset:function(){this.tabs.each(function(d){d.slideshow.completed=false;d.slideshow.restart();d.slideshow.stop()}.bind(this));this.current_tab.slideshow.completed=false;this.current_tab.slideshow.start();this.start_status_check()},next_tab:function($super){this.current_tab.slideshow.reset();$super();this.current_tab.slideshow.completed=false;this.current_tab.slideshow.start();this.current_tab.slideshow.show_slide();
this.start_status_check()},previous_tab:function($super){this.current_tab.slideshow.reset();$super();this.current_tab.slideshow.completed=false;this.current_tab.slideshow.start();this.current_tab.slideshow.show_slide();this.start_status_check()},start_status_check:function(){this.executer=new PeriodicalExecuter(function(){if(this.current_tab.slideshow.completed){this.has_looped=false;if(this.tab_current==this.tabs_count-1)this.has_looped=true;this.current_tab.slideshow.completed=false;this.next_tab();
this.stop_status_check()}}.bind(this),this.tab_slide_duration)},stop_status_check:function(){if(this.executer){this.executer.stop();this.executer=""}else return false}});
// TabbedViewer
var TabbedViewer=Class.create(Tabs,{initialize:function($super,h){$super(h);h.direction?this.direction=h.direction:this.direction="x";this.distance=h.distance;h.tabs_visible?this.tabs_visible=h.tabs_visible:this.tabs_visible=3;if(h.controls){this.controls={next:$(h.controls.next),previous:$(h.controls.previous)};this.controls.next.observe("click",this.next_tab.bind(this));this.controls.previous.observe("click",this.previous_tab.bind(this))}this.tabs_wrapper=$(h.tabs_wrapper);this.tabs_container=$(h.tabs_container);
container_dimensions=this.direction=="y"?"height:"+this.tabs_visible*this.distance+"px;":"width:"+this.tabs_visible*this.distance+"px;";this.tabs_container.setStyle(container_dimensions);this.tabs.each(function(k,u){new_position=this.distance*u;k.setStyle({position:"absolute"});this.direction=="y"?k.setStyle({top:new_position+"px"}):k.setStyle({left:new_position+"px"});k.setOpacity(0.7);k.observe("click",function(){this.tabs_current_index=k.index;this.show_tab()}.bind(this));k.observe("mouseenter",
function(){this.tabs_current_index!=k.index&&k.setOpacity(1)}.bind(this));k.observe("mouseleave",function(){this.tabs_current_index!=k.index&&k.setOpacity(0.7)}.bind(this))}.bind(this));this.current_tab.setOpacity(1);new Effect.Move(this.tabs_wrapper,{y:0,x:0,mode:"absolute",duration:0.1})},show_tab:function(){this.current_tab.setOpacity(0.7);this.current_tab.panel.hide();this.current_tab.removeClassName("current");this.current_tab=this.tabs[this.tabs_current_index];Effect.Appear(this.current_tab.panel,
{duration:0.5});this.current_tab.addClassName("current");this.current_tab.setOpacity(1)},next_tab:function($super){if(this.tabs_current_index<this.tabs_count-this.tabs_visible){$super();new_position=this.tabs_current_index*-this.distance;if(this.direction=="y")new Effect.Move(this.tabs_wrapper,{y:new_position,x:0,mode:"absolute",duration:0.5});else new Effect.Move(this.tabs_wrapper,{y:0,x:new_position,mode:"absolute",duration:0.5})}else{$super();this.tabs_current_index==0&&new Effect.Move(this.tabs_wrapper,
{y:0,x:0,mode:"absolute",duration:0.5})}},previous_tab:function($super){if(this.tabs_current_index>=this.tabs_count-(this.tabs_count-1)){$super();if(this.tabs_current_index<this.tabs_count-(this.tabs_visible-1)){new_position=this.tabs_current_index*-this.distance;if(this.direction=="y")new Effect.Move(this.tabs_wrapper,{y:new_position,x:0,mode:"absolute",duration:0.5});else new Effect.Move(this.tabs_wrapper,{y:0,x:new_position,mode:"absolute",duration:0.5})}}else{$super();if(this.tabs_current_index==
this.tabs_count-1){new_position=(this.tabs_count-this.tabs_visible)*-this.distance;if(this.direction=="y")new Effect.Move(this.tabs_wrapper,{y:new_position,x:0,mode:"absolute",duration:0.5});else new Effect.Move(this.tabs_wrapper,{y:0,x:new_position,mode:"absolute",duration:0.5})}}}});
// Number Format
Object.extend(Math,{format_number:function(d,h){number_return="";number_array=$A();number_array=String(d).split(".");h=Object.extend({decimals:2,currency:"",format_whole:true,delim_whole:",",delim_decimal:"."},h);prefix=h.currency?h.currency:"";whole_number=typeof number_array[0]!="undefined"?number_array[0]:"0";if(h.format_whole)for(var k=/(\d+)(\d{3})/;k.test(whole_number);)whole_number=whole_number.replace(k,"$1"+h.delim_whole+"$2");number_return+=prefix+whole_number;if(h.decimals){if(typeof number_array[1]!=
"undefined")remainder=number_array[1];else{remainder="";for(k=0;k<h.decimals;k++)remainder+="0"}number_return+=h.delim_decimal;var u=$A();for(k=0;k<h.decimals;k++)u[k]=remainder.charAt(k)!=""?remainder.charAt(k):"0";number_return+=u.join("")}return number_return}});
// SWF Object
var swfobject=function(){function d(){if(!y){try{var a=i.getElementsByTagName("body")[0].appendChild(i.createElement("span"));a.parentNode.removeChild(a)}catch(b){return}y=true;a=D.length;for(var c=0;c<a;c++)D[c]()}}function h(a){if(y)a();else D[D.length]=a}function k(a){if(typeof p.addEventListener!=m)p.addEventListener("load",a,false);else if(typeof i.addEventListener!=m)i.addEventListener("load",a,false);else if(typeof p.attachEvent!=m)ba(p,"onload",a);else if(typeof p.onload=="function"){var b=
p.onload;p.onload=function(){b();a()}}else p.onload=a}function u(){var a=i.getElementsByTagName("body")[0],b=i.createElement(r);b.setAttribute("type",E);var c=a.appendChild(b);if(c){var e=0;(function(){if(typeof c.GetVariable!=m){var f=c.GetVariable("$version");if(f){f=f.split(" ")[1].split(",");g.pv=[parseInt(f[0],10),parseInt(f[1],10),parseInt(f[2],10)]}}else if(e<10){e++;setTimeout(arguments.callee,10);return}a.removeChild(b);c=null;M()})()}else M()}function M(){var a=v.length;if(a>0)for(var b=
0;b<a;b++){var c=v[b].id,e=v[b].callbackFn,f={success:false,id:c};if(g.pv[0]>0){var l=q(c);if(l)if(F(v[b].swfVersion)&&!(g.wk&&g.wk<312)){z(c,true);if(e){f.success=true;f.ref=N(c);e(f)}}else if(v[b].expressInstall&&O()){f={};f.data=v[b].expressInstall;f.width=l.getAttribute("width")||"0";f.height=l.getAttribute("height")||"0";if(l.getAttribute("class"))f.styleclass=l.getAttribute("class");if(l.getAttribute("align"))f.align=l.getAttribute("align");var j={};l=l.getElementsByTagName("param");for(var n=
l.length,o=0;o<n;o++)if(l[o].getAttribute("name").toLowerCase()!="movie")j[l[o].getAttribute("name")]=l[o].getAttribute("value");P(f,j,c,e)}else{ca(l);e&&e(f)}}else{z(c,true);if(e){if((c=N(c))&&typeof c.SetVariable!=m){f.success=true;f.ref=c}e(f)}}}}function N(a){var b=null;if((a=q(a))&&a.nodeName=="OBJECT")if(typeof a.SetVariable!=m)b=a;else if(a=a.getElementsByTagName(r)[0])b=a;return b}function O(){return!G&&F("6.0.65")&&(g.win||g.mac)&&!(g.wk&&g.wk<312)}function P(a,b,c,e){G=true;Q=e||null;U=
{success:false,id:c};var f=q(c);if(f){if(f.nodeName=="OBJECT"){B=R(f);H=null}else{B=f;H=c}a.id=V;if(typeof a.width==m||!/%$/.test(a.width)&&parseInt(a.width,10)<310)a.width="310";if(typeof a.height==m||!/%$/.test(a.height)&&parseInt(a.height,10)<137)a.height="137";i.title=i.title.slice(0,47)+" - Flash Player Installation";e=g.ie&&g.win?"ActiveX":"PlugIn";e="MMredirectURL="+p.location.toString().replace(/&/g,"%26")+"&MMplayerType="+e+"&MMdoctitle="+i.title;if(typeof b.flashvars!=m)b.flashvars+="&"+
e;else b.flashvars=e;if(g.ie&&g.win&&f.readyState!=4){e=i.createElement("div");c+="SWFObjectNew";e.setAttribute("id",c);f.parentNode.insertBefore(e,f);f.style.display="none";(function(){f.readyState==4?f.parentNode.removeChild(f):setTimeout(arguments.callee,10)})()}S(a,b,c)}}function ca(a){if(g.ie&&g.win&&a.readyState!=4){var b=i.createElement("div");a.parentNode.insertBefore(b,a);b.parentNode.replaceChild(R(a),b);a.style.display="none";(function(){a.readyState==4?a.parentNode.removeChild(a):setTimeout(arguments.callee,
10)})()}else a.parentNode.replaceChild(R(a),a)}function R(a){var b=i.createElement("div");if(g.win&&g.ie)b.innerHTML=a.innerHTML;else if(a=a.getElementsByTagName(r)[0])if(a=a.childNodes)for(var c=a.length,e=0;e<c;e++)!(a[e].nodeType==1&&a[e].nodeName=="PARAM")&&a[e].nodeType!=8&&b.appendChild(a[e].cloneNode(true));return b}function S(a,b,c){var e,f=q(c);if(g.wk&&g.wk<312)return e;if(f){if(typeof a.id==m)a.id=c;if(g.ie&&g.win){var l="",j;for(j in a)if(a[j]!=Object.prototype[j])if(j.toLowerCase()==
"data")b.movie=a[j];else if(j.toLowerCase()=="styleclass")l+=' class="'+a[j]+'"';else if(j.toLowerCase()!="classid")l+=" "+j+'="'+a[j]+'"';j="";for(var n in b)if(b[n]!=Object.prototype[n])j+='<param name="'+n+'" value="'+b[n]+'" />';f.outerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'+l+">"+j+"</object>";I[I.length]=a.id;e=q(a.id)}else{n=i.createElement(r);n.setAttribute("type",E);for(var o in a)if(a[o]!=Object.prototype[o])if(o.toLowerCase()=="styleclass")n.setAttribute("class",
a[o]);else o.toLowerCase()!="classid"&&n.setAttribute(o,a[o]);for(l in b)if(b[l]!=Object.prototype[l]&&l.toLowerCase()!="movie"){a=n;j=l;o=b[l];c=i.createElement("param");c.setAttribute("name",j);c.setAttribute("value",o);a.appendChild(c)}f.parentNode.replaceChild(n,f);e=n}}return e}function W(a){var b=q(a);if(b&&b.nodeName=="OBJECT")if(g.ie&&g.win){b.style.display="none";(function(){if(b.readyState==4){var c=q(a);if(c){for(var e in c)if(typeof c[e]=="function")c[e]=null;c.parentNode.removeChild(c)}}else setTimeout(arguments.callee,
10)})()}else b.parentNode.removeChild(b)}function q(a){var b=null;try{b=i.getElementById(a)}catch(c){}return b}function ba(a,b,c){a.attachEvent(b,c);A[A.length]=[a,b,c]}function F(a){var b=g.pv;a=a.split(".");a[0]=parseInt(a[0],10);a[1]=parseInt(a[1],10)||0;a[2]=parseInt(a[2],10)||0;return b[0]>a[0]||b[0]==a[0]&&b[1]>a[1]||b[0]==a[0]&&b[1]==a[1]&&b[2]>=a[2]?true:false}function X(a,b,c,e){if(!(g.ie&&g.mac)){var f=i.getElementsByTagName("head")[0];if(f){c=c&&typeof c=="string"?c:"screen";if(e)T=s=null;
if(!s||T!=c){e=i.createElement("style");e.setAttribute("type","text/css");e.setAttribute("media",c);s=f.appendChild(e);if(g.ie&&g.win&&typeof i.styleSheets!=m&&i.styleSheets.length>0)s=i.styleSheets[i.styleSheets.length-1];T=c}if(g.ie&&g.win)s&&typeof s.addRule==r&&s.addRule(a,b);else s&&typeof i.createTextNode!=m&&s.appendChild(i.createTextNode(a+" {"+b+"}"))}}}function z(a,b){if(Y){var c=b?"visible":"hidden";if(y&&q(a))q(a).style.visibility=c;else X("#"+a,"visibility:"+c)}}function Z(a){return/[\\\"<>\.;]/.exec(a)!=
null&&typeof encodeURIComponent!=m?encodeURIComponent(a):a}var m="undefined",r="object",E="application/x-shockwave-flash",V="SWFObjectExprInst",p=window,i=document,w=navigator,aa=false,D=[function(){aa?u():M()}],v=[],I=[],A=[],B,H,Q,U,y=false,G=false,s,T,Y=true,g=function(){var a=typeof i.getElementById!=m&&typeof i.getElementsByTagName!=m&&typeof i.createElement!=m,b=w.userAgent.toLowerCase(),c=w.platform.toLowerCase(),e=c?/win/.test(c):/win/.test(b);c=c?/mac/.test(c):/mac/.test(b);b=/webkit/.test(b)?
parseFloat(b.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):false;var f=!+"\u000b1",l=[0,0,0],j=null;if(typeof w.plugins!=m&&typeof w.plugins["Shockwave Flash"]==r){if((j=w.plugins["Shockwave Flash"].description)&&!(typeof w.mimeTypes!=m&&w.mimeTypes[E]&&!w.mimeTypes[E].enabledPlugin)){aa=true;f=false;j=j.replace(/^.*\s+(\S+\s+\S+$)/,"$1");l[0]=parseInt(j.replace(/^(.*)\..*$/,"$1"),10);l[1]=parseInt(j.replace(/^.*\.(.*)\s.*$/,"$1"),10);l[2]=/[a-zA-Z]/.test(j)?parseInt(j.replace(/^.*[a-zA-Z]+(.*)$/,
"$1"),10):0}}else if(typeof p.ActiveXObject!=m)try{var n=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");if(n)if(j=n.GetVariable("$version")){f=true;j=j.split(" ")[1].split(",");l=[parseInt(j[0],10),parseInt(j[1],10),parseInt(j[2],10)]}}catch(o){}return{w3:a,pv:l,wk:b,ie:f,win:e,mac:c}}();(function(){if(g.w3){if(typeof i.readyState!=m&&i.readyState=="complete"||typeof i.readyState==m&&(i.getElementsByTagName("body")[0]||i.body))d();if(!y){typeof i.addEventListener!=m&&i.addEventListener("DOMContentLoaded",
d,false);if(g.ie&&g.win){i.attachEvent("onreadystatechange",function(){if(i.readyState=="complete"){i.detachEvent("onreadystatechange",arguments.callee);d()}});p==top&&function(){if(!y){try{i.documentElement.doScroll("left")}catch(a){setTimeout(arguments.callee,0);return}d()}}()}g.wk&&function(){y||(/loaded|complete/.test(i.readyState)?d():setTimeout(arguments.callee,0))}();k(d)}}})();(function(){g.ie&&g.win&&window.attachEvent("onunload",function(){for(var a=A.length,b=0;b<a;b++)A[b][0].detachEvent(A[b][1],
A[b][2]);a=I.length;for(b=0;b<a;b++)W(I[b]);for(var c in g)g[c]=null;g=null;for(var e in swfobject)swfobject[e]=null;swfobject=null})})();return{registerObject:function(a,b,c,e){if(g.w3&&a&&b){var f={};f.id=a;f.swfVersion=b;f.expressInstall=c;f.callbackFn=e;v[v.length]=f;z(a,false)}else e&&e({success:false,id:a})},getObjectById:function(a){if(g.w3)return N(a)},embedSWF:function(a,b,c,e,f,l,j,n,o,C){var J={success:false,id:b};if(g.w3&&!(g.wk&&g.wk<312)&&a&&b&&c&&e&&f){z(b,false);h(function(){c+="";
e+="";var x={};if(o&&typeof o===r)for(var t in o)x[t]=o[t];x.data=a;x.width=c;x.height=e;t={};if(n&&typeof n===r)for(var K in n)t[K]=n[K];if(j&&typeof j===r)for(var L in j)if(typeof t.flashvars!=m)t.flashvars+="&"+L+"="+j[L];else t.flashvars=L+"="+j[L];if(F(f)){K=S(x,t,b);x.id==b&&z(b,true);J.success=true;J.ref=K}else if(l&&O()){x.data=l;P(x,t,b,C);return}else z(b,true);C&&C(J)})}else C&&C(J)},switchOffAutoHideShow:function(){Y=false},ua:g,getFlashPlayerVersion:function(){return{major:g.pv[0],minor:g.pv[1],
release:g.pv[2]}},hasFlashPlayerVersion:F,createSWF:function(a,b,c){if(g.w3)return S(a,b,c)},showExpressInstall:function(a,b,c,e){g.w3&&O()&&P(a,b,c,e)},removeSWF:function(a){g.w3&&W(a)},createCSS:function(a,b,c,e){g.w3&&X(a,b,c,e)},addDomLoadEvent:h,addLoadEvent:k,getQueryParamValue:function(a){var b=i.location.search||i.location.hash;if(b){if(/\?/.test(b))b=b.split("?")[1];if(a==null)return Z(b);b=b.split("&");for(var c=0;c<b.length;c++)if(b[c].substring(0,b[c].indexOf("="))==a)return Z(b[c].substring(b[c].indexOf("=")+
1))}return""},expressInstallCallback:function(){if(G){var a=q(V);if(a&&B){a.parentNode.replaceChild(B,a);if(H){z(H,true);if(g.ie&&g.win)B.style.display="block"}Q&&Q(U)}G=false}}}}();
// Modernizr
 window.Modernizr=function(i,e,I){function C(a,b){for(var c in a)if(m[a[c]]!==I&&(!b||b(a[c],D)))return true}function r(a,b){var c=a.charAt(0).toUpperCase()+a.substr(1);return!!C([a,"Webkit"+c,"Moz"+c,"O"+c,"ms"+c,"Khtml"+c],b)}function P(){j[E]=function(a){for(var b=0,c=a.length;b<c;b++)J[a[b]]=!!(a[b]in n);return J}("autocomplete autofocus list placeholder max min multiple pattern required step".split(" "));j[Q]=function(a){for(var b=0,c,h=a.length;b<h;b++){n.setAttribute("type",a[b]);if(c=n.type!==
 "text"){n.value=K;/tel|search/.test(n.type)||(c=/url|email/.test(n.type)?n.checkValidity&&n.checkValidity()===false:n.value!=K)}L[a[b]]=!!c}return L}("search tel url email datetime date month week time datetime-local number range color".split(" "))}var j={},s=e.documentElement,D=e.createElement("modernizr"),m=D.style,n=e.createElement("input"),E="input",Q=E+"types",K=":)",M=Object.prototype.toString,y=" -o- -moz- -ms- -webkit- -khtml- ".split(" "),d={},L={},J={},N=[],u=function(){var a={select:"input",
 change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"},b={};return function(c,h){var t=arguments.length==1;if(t&&b[c])return b[c];h=h||document.createElement(a[c]||"div");c="on"+c;var g=c in h;if(!g&&h.setAttribute){h.setAttribute(c,"return;");g=typeof h[c]=="function"}h=null;return t?(b[c]=g):g}}(),F={}.hasOwnProperty,O;O=typeof F!=="undefined"&&typeof F.call!=="undefined"?function(a,b){return F.call(a,b)}:function(a,b){return b in a&&typeof a.constructor.prototype[b]==="undefined"};
 d.canvas=function(){return!!e.createElement("canvas").getContext};d.canvastext=function(){return!!(d.canvas()&&typeof e.createElement("canvas").getContext("2d").fillText=="function")};d.geolocation=function(){return!!navigator.geolocation};d.crosswindowmessaging=function(){return!!i.postMessage};d.websqldatabase=function(){var a=!!i.openDatabase;if(a)try{a=!!openDatabase("testdb","1.0","html5 test db",2E5)}catch(b){a=false}return a};d.indexedDB=function(){return!!i.indexedDB};d.hashchange=function(){return u("hashchange",
 i)&&(document.documentMode===I||document.documentMode>7)};d.historymanagement=function(){return!!(i.history&&history.pushState)};d.draganddrop=function(){return u("drag")&&u("dragstart")&&u("dragenter")&&u("dragover")&&u("dragleave")&&u("dragend")&&u("drop")};d.websockets=function(){return"WebSocket"in i};d.rgba=function(){m.cssText="background-color:rgba(150,255,150,.5)";return(""+m.backgroundColor).indexOf("rgba")!==-1};d.hsla=function(){m.cssText="background-color:hsla(120,40%,100%,.5)";return(""+
 m.backgroundColor).indexOf("rgba")!==-1};d.multiplebgs=function(){m.cssText="background:url(//:),url(//:),red url(//:)";return/(url\s*\(.*?){3}/.test(m.background)};d.backgroundsize=function(){return r("backgroundSize")};d.borderimage=function(){return r("borderImage")};d.borderradius=function(){return r("borderRadius","",function(a){return(""+a).indexOf("orderRadius")!==-1})};d.boxshadow=function(){return r("boxShadow")};d.opacity=function(){var a=y.join("opacity:.5;")+"";m.cssText=a;return(""+m.opacity).indexOf("0.5")!==
 -1};d.cssanimations=function(){return r("animationName")};d.csscolumns=function(){return r("columnCount")};d.cssgradients=function(){var a=("background-image:"+y.join("gradient(linear,left top,right bottom,from(#9f9),to(white));background-image:")+y.join("linear-gradient(left top,#9f9, white);background-image:")).slice(0,-17);m.cssText=a;return(""+m.backgroundImage).indexOf("gradient")!==-1};d.cssreflections=function(){return r("boxReflect")};d.csstransforms=function(){return!!C(["transformProperty",
 "WebkitTransform","MozTransform","OTransform","msTransform"])};d.csstransforms3d=function(){var a=!!C(["perspectiveProperty","WebkitPerspective","MozPerspective","OPerspective","msPerspective"]);if(a){var b=document.createElement("style"),c=e.createElement("div");b.textContent="@media ("+y.join("transform-3d),(")+"modernizr){#modernizr{height:3px}}";e.getElementsByTagName("head")[0].appendChild(b);c.id="modernizr";s.appendChild(c);a=c.offsetHeight===3;b.parentNode.removeChild(b);c.parentNode.removeChild(c)}return a};
 d.csstransitions=function(){return r("transitionProperty")};d.fontface=function(){var a;if(/*@cc_on@if(@_jscript_version>=5)!@end@*/0)a=true;else{var b=e.createElement("style"),c=e.createElement("span"),h,t=false,g=e.body,o,w;b.textContent="@font-face{font-family:testfont;src:url('data:font/ttf;base64,AAEAAAAMAIAAAwBAT1MvMliohmwAAADMAAAAVmNtYXCp5qrBAAABJAAAANhjdnQgACICiAAAAfwAAAAEZ2FzcP//AAMAAAIAAAAACGdseWYv5OZoAAACCAAAANxoZWFk69bnvwAAAuQAAAA2aGhlYQUJAt8AAAMcAAAAJGhtdHgGDgC4AAADQAAAABRsb2NhAIQAwgAAA1QAAAAMbWF4cABVANgAAANgAAAAIG5hbWUgXduAAAADgAAABPVwb3N03NkzmgAACHgAAAA4AAECBAEsAAUAAAKZAswAAACPApkCzAAAAesA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AG8AZgAgAEYAbwBuAHQARgBvAHIAZwBlACAAMgAuADAAIAA6ACAASgB1AHIAYQAgAEwAaQBnAGgAdAAgADoAIAAyADMALQAxAC0AMgAwADAAOQBiAGEAZQBjADIAYQA5ADIAYgBmAGYAZQA1ADAAMwAyACAALQAgAHMAdQBiAHMAZQB0ACAAbwBmACAASgB1AHIAYQAgAEwAaQBnAGgAdABWAGUAcgBzAGkAbwBuACAAMgAgAGIAYQBlAGMAMgBhADkAMgBiAGYAZgBlADUAMAAzADIAIAAtACAAcwB1AGIAcwBlAHQAIABvAGYAIABKAHUAcgBhAEwAaQBnAGgAdABoAHQAdABwADoALwAvAHMAYwByAGkAcAB0AHMALgBzAGkAbAAuAG8AcgBnAC8ATwBGAEwAAAAAAgAAAAAAAP+BADMAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAQACAQIAEQt6ZXJva2F5YWhsaQ==')}";
 e.getElementsByTagName("head")[0].appendChild(b);c.setAttribute("style","font:99px _,arial,helvetica;position:absolute;visibility:hidden");if(!g){g=s.appendChild(e.createElement("fontface"));t=true}c.innerHTML="........";c.id="fonttest";g.appendChild(c);h=c.offsetWidth*c.offsetHeight;c.style.font="99px testfont,_,arial,helvetica";a=h!==c.offsetWidth*c.offsetHeight;var v=function(){if(g.parentNode){a=j.fontface=h!==c.offsetWidth*c.offsetHeight;s.className=s.className.replace(/(no-)?fontface\b/,"")+
 (a?" ":" no-")+"fontface"}};setTimeout(v,75);setTimeout(v,150);addEventListener("load",function(){v();(w=true)&&o&&o(a);setTimeout(function(){t||(g=c);g.parentNode.removeChild(g);b.parentNode.removeChild(b)},50)},false)}j._fontfaceready=function(p){w||a?p(a):(o=p)};return a||h!==c.offsetWidth};d.video=function(){var a=e.createElement("video"),b=!!a.canPlayType;if(b){b=new Boolean(b);b.ogg=a.canPlayType('video/ogg; codecs="theora"');b.h264=a.canPlayType('video/mp4; codecs="avc1.42E01E"');b.webm=a.canPlayType('video/webm; codecs="vp8, vorbis"')}return b};
 d.audio=function(){var a=e.createElement("audio"),b=!!a.canPlayType;if(b){b=new Boolean(b);b.ogg=a.canPlayType('audio/ogg; codecs="vorbis"');b.mp3=a.canPlayType("audio/mpeg;");b.wav=a.canPlayType('audio/wav; codecs="1"');b.m4a=a.canPlayType("audio/x-m4a;")||a.canPlayType("audio/aac;")}return b};d.localStorage=function(){return"localStorage"in i&&i.localStorage!==null};d.sessionStorage=function(){try{return"sessionStorage"in i&&i.sessionStorage!==null}catch(a){return false}};d.webworkers=function(){return!!i.Worker};
 d.applicationCache=function(){var a=i.applicationCache;return!!(a&&typeof a.status!="undefined"&&typeof a.update=="function"&&typeof a.swapCache=="function")};d.svg=function(){return!!e.createElementNS&&!!e.createElementNS("http://www.w3.org/2000/svg","svg").createSVGRect};d.smil=function(){return!!e.createElementNS&&/SVG/.test(M.call(e.createElementNS("http://www.w3.org/2000/svg","animate")))};d.svgclippaths=function(){return!!e.createElementNS&&/SVG/.test(M.call(e.createElementNS("http://www.w3.org/2000/svg",
 "clipPath")))};for(var z in d)if(O(d,z))N.push(((j[z.toLowerCase()]=d[z]())?"":"no-")+z.toLowerCase());j[E]||P();j.addTest=function(a,b){a=a.toLowerCase();if(!j[a]){b=!!b();s.className+=" "+(b?"":"no-")+a;j[a]=b;return j}};m.cssText="";D=n=null;(function(){var a=e.createElement("div");a.innerHTML="<elem></elem>";return a.childNodes.length!==1})()&&function(a,b){function c(f,k){if(o[f])o[f].styleSheet.cssText+=k;else{var l=t[G],q=b[A]("style");q.media=f;l.insertBefore(q,l[G]);o[f]=q;c(f,k)}}function h(f,
 k){for(var l=new RegExp("\\b("+w+")\\b(?!.*[;}])","gi"),q=function(B){return".iepp_"+B},x=-1;++x<f.length;){k=f[x].media||k;h(f[x].imports,k);c(k,f[x].cssText.replace(l,q))}}for(var t=b.documentElement,g=b.createDocumentFragment(),o={},w="abbr|article|aside|audio|canvas|command|datalist|details|figure|figcaption|footer|header|hgroup|keygen|mark|meter|nav|output|progress|section|source|summary|time|video",v=w.split("|"),p=[],H=-1,G="firstChild",A="createElement";++H<v.length;){b[A](v[H]);g[A](v[H])}g=
 g.appendChild(b[A]("div"));a.attachEvent("onbeforeprint",function(){for(var f,k=b.getElementsByTagName("*"),l,q,x=new RegExp("^"+w+"$","i"),B=-1;++B<k.length;)if((f=k[B])&&(q=f.nodeName.match(x))){l=new RegExp("^\\s*<"+q+"(.*)\\/"+q+">\\s*$","i");g.innerHTML=f.outerHTML.replace(/\r|\n/g," ").replace(l,f.currentStyle.display=="block"?"<div$1/div>":"<span$1/span>");l=g.childNodes[0];l.className+=" iepp_"+q;l=p[p.length]=[f,l];f.parentNode.replaceChild(l[1],l[0])}h(b.styleSheets,"all")});a.attachEvent("onafterprint",
 function(){for(var f=-1,k;++f<p.length;)p[f][1].parentNode.replaceChild(p[f][0],p[f][1]);for(k in o)t[G].removeChild(o[k]);o={};p=[]})}(this,e);j._enableHTML5=true;j._version="1.5";s.className=s.className.replace(/\bno-js\b/,"")+" js";s.className+=" "+N.join(" ");return j}(this,this.document);

