﻿
if(typeof asual=="undefined"){var asual={}}if(typeof asual.util=="undefined"){asual.util={}}asual.util.Browser=new function(){var b=navigator.userAgent.toLowerCase(),a=/webkit/.test(b),e=/opera/.test(b),c=/msie/.test(b)&&!/opera/.test(b),d=/mozilla/.test(b)&&!/(compatible|webkit)/.test(b),f=parseFloat(c?b.substr(b.indexOf("msie")+4):(b.match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/)||[0,"0"])[1]);this.toString=function(){return"[class Browser]"};this.getVersion=function(){return f};this.isMSIE=function(){return c};this.isSafari=function(){return a};this.isOpera=function(){return e};this.isMozilla=function(){return d}};asual.util.Events=new function(){var c="DOMContentLoaded",j="onstop",k=window,h=document,b=[],a=asual.util,e=a.Browser,d=e.isMSIE(),g=e.isSafari();this.toString=function(){return"[class Events]"};this.addListener=function(n,l,m){b.push({o:n,t:l,l:m});if(!(l==c&&(d||g))){if(n.addEventListener){n.addEventListener(l,m,false)}else{if(n.attachEvent){n.attachEvent("on"+l,m)}}}};this.removeListener=function(p,m,n){for(var l=0,o;o=b[l];l++){if(o.o==p&&o.t==m&&o.l==n){b.splice(l,1);break}}if(!(m==c&&(d||g))){if(p.removeEventListener){p.removeEventListener(m,n,false)}else{if(p.detachEvent){p.detachEvent("on"+m,n)}}}};var i=function(){for(var m=0,l;l=b[m];m++){if(l.t!=c){a.Events.removeListener(l.o,l.t,l.l)}}};var f=function(){if(h.readyState=="interactive"){function l(){h.detachEvent(j,l);i()}h.attachEvent(j,l);k.setTimeout(function(){h.detachEvent(j,l)},0)}};if(d||g){(function(){try{if((d&&h.body)||!/loaded|complete/.test(h.readyState)){h.documentElement.doScroll("left")}}catch(m){return setTimeout(arguments.callee,0)}for(var l=0,m;m=b[l];l++){if(m.t==c){m.l.call(null)}}})()}if(d){k.attachEvent("onbeforeunload",f)}this.addListener(k,"unload",i)};asual.util.Functions=new function(){this.toString=function(){return"[class Functions]"};this.bind=function(f,b,e){for(var c=2,d,a=[];d=arguments[c];c++){a.push(d)}return function(){return f.apply(b,a)}}};var SWFAddressEvent=function(d){this.toString=function(){return"[object SWFAddressEvent]"};this.type=d;this.target=[SWFAddress][0];this.value=SWFAddress.getValue();this.path=SWFAddress.getPath();this.pathNames=SWFAddress.getPathNames();this.parameters={};var c=SWFAddress.getParameterNames();for(var b=0,a=c.length;b<a;b++){this.parameters[c[b]]=SWFAddress.getParameter(c[b])}this.parameterNames=c};SWFAddressEvent.INIT="init";SWFAddressEvent.CHANGE="change";SWFAddressEvent.INTERNAL_CHANGE="internalChange";SWFAddressEvent.EXTERNAL_CHANGE="externalChange";var SWFAddress=new function(){var _getHash=function(){var index=_l.href.indexOf("#");return index!=-1?_ec(_dc(_l.href.substr(index+1))):""};var _getWindow=function(){try{top.document;return top}catch(e){return window}};var _strictCheck=function(value,force){if(_opts.strict){value=force?(value.substr(0,1)!="/"?"/"+value:value):(value==""?"/":value)}return value};var _ieLocal=function(value,direction){return(_msie&&_l.protocol=="file:")?(direction?_value.replace(/\?/,"%3F"):_value.replace(/%253F/,"?")):value};var _searchScript=function(el){if(el.childNodes){for(var i=0,l=el.childNodes.length,s;i<l;i++){if(el.childNodes[i].src){_url=String(el.childNodes[i].src)}if(s=_searchScript(el.childNodes[i])){return s}}}};var _titleCheck=function(){if(_d.title!=_title&&_d.title.indexOf("#")!=-1){_d.title=_title}};var _listen=function(){if(!_silent){var hash=_getHash();var diff=!(_value==hash);if(_safari&&_version<523){if(_length!=_h.length){_length=_h.length;if(typeof _stack[_length-1]!=UNDEFINED){_value=_stack[_length-1]}_update.call(this,false)}}else{if(_msie&&diff){if(_version<7){_l.reload()}else{this.setValue(hash)}}else{if(diff){_value=hash;_update.call(this,false)}}}if(_msie){_titleCheck.call(this)}}};var _bodyClick=function(e){if(_popup.length>0){var popup=window.open(_popup[0],_popup[1],eval(_popup[2]));if(typeof _popup[3]!=UNDEFINED){eval(_popup[3])}}_popup=[]};var _swfChange=function(){for(var i=0,id,obj,value=SWFAddress.getValue(),setter="setSWFAddressValue";id=_ids[i];i++){obj=document.getElementById(id);if(obj){if(obj.parentNode&&typeof obj.parentNode.so!=UNDEFINED){obj.parentNode.so.call(setter,value)}else{if(!(obj&&typeof obj[setter]!=UNDEFINED)){var objects=obj.getElementsByTagName("object");var embeds=obj.getElementsByTagName("embed");obj=((objects[0]&&typeof objects[0][setter]!=UNDEFINED)?objects[0]:((embeds[0]&&typeof embeds[0][setter]!=UNDEFINED)?embeds[0]:null))}if(obj){obj[setter](value)}}}else{if(obj=document[id]){if(typeof obj[setter]!=UNDEFINED){obj[setter](value)}}}}};var _jsDispatch=function(type){this.dispatchEvent(new SWFAddressEvent(type));type=type.substr(0,1).toUpperCase()+type.substr(1);if(typeof this["on"+type]==FUNCTION){this["on"+type]()}};var _jsInit=function(){if(_util.Browser.isSafari()){_d.body.addEventListener("click",_bodyClick)}_jsDispatch.call(this,"init")};var _jsChange=function(){_swfChange();_jsDispatch.call(this,"change")};var _update=function(internal){_jsChange.call(this);if(internal){_jsDispatch.call(this,"internalChange")}else{_jsDispatch.call(this,"externalChange")}_st(_functions.bind(_track,this),10)};var _track=function(){var value=(_l.pathname+(/\/$/.test(_l.pathname)?"":"/")+this.getValue()).replace(/\/\//,"/").replace(/^\/$/,"");var fn=_t[_opts.tracker];if(typeof fn==FUNCTION){fn(value)}else{if(typeof _t.pageTracker!=UNDEFINED&&typeof _t.pageTracker._trackPageview==FUNCTION){_t.pageTracker._trackPageview(value)}else{if(typeof _t.urchinTracker==FUNCTION){_t.urchinTracker(value)}}}};var _htmlWrite=function(){var doc=_frame.contentWindow.document;doc.open();doc.write("<html><head><title>"+_d.title+"</title><script>var "+ID+' = "'+_getHash()+'";<\/script></head></html>');doc.close()};var _htmlLoad=function(){var win=_frame.contentWindow;var src=win.location.href;_value=(typeof win[ID]!=UNDEFINED?win[ID]:"");if(_value!=_getHash()){_update.call(SWFAddress,false);_l.hash=_ieLocal(_value,TRUE)}};var _load=function(){if(!_loaded){_loaded=TRUE;if(_msie&&_version<8){var frameset=_d.getElementsByTagName("frameset")[0];_frame=_d.createElement((frameset?"":"i")+"frame");if(frameset){frameset.insertAdjacentElement("beforeEnd",_frame);frameset[frameset.cols?"cols":"rows"]+=",0";_frame.src="javascript:false";_frame.noResize=true;_frame.frameBorder=_frame.frameSpacing=0}else{_frame.src="javascript:false";_frame.style.display="none";_d.body.insertAdjacentElement("afterBegin",_frame)}_st(function(){_events.addListener(_frame,"load",_htmlLoad);if(typeof _frame.contentWindow[ID]==UNDEFINED){_htmlWrite()}},50)}else{if(_safari){if(_version<418){_d.body.innerHTML+='<form id="'+ID+'" style="position:absolute;top:-9999px;" method="get"></form>';_form=_d.getElementById(ID)}if(typeof _l[ID]==UNDEFINED){_l[ID]={}}if(typeof _l[ID][_l.pathname]!=UNDEFINED){_stack=_l[ID][_l.pathname].split(",")}}}_st(_functions.bind(function(){_jsInit.call(this);_jsChange.call(this);_track.call(this)},this),1);if(_msie&&_version>=8){_d.body.onhashchange=_functions.bind(_listen,this);_si(_functions.bind(_titleCheck,this),50)}else{_si(_functions.bind(_listen,this),50)}}};var ID="swfaddress",FUNCTION="function",UNDEFINED="undefined",TRUE=true,FALSE=false,_util=asual.util,_browser=_util.Browser,_events=_util.Events,_functions=_util.Functions,_version=_browser.getVersion(),_msie=_browser.isMSIE(),_mozilla=_browser.isMozilla(),_opera=_browser.isOpera(),_safari=_browser.isSafari(),_supported=FALSE,_t=_getWindow(),_d=_t.document,_h=_t.history,_l=_t.location,_si=setInterval,_st=setTimeout,_dc=decodeURI,_ec=encodeURI,_frame,_form,_url,_title=_d.title,_length=_h.length,_silent=FALSE,_loaded=FALSE,_justset=TRUE,_juststart=TRUE,_ref=this,_stack=[],_ids=[],_popup=[],_listeners={},_value=_getHash(),_opts={history:TRUE,strict:TRUE};if(_msie&&_d.documentMode&&_d.documentMode!=_version){_version=_d.documentMode!=8?7:8}_supported=(_mozilla&&_version>=1)||(_msie&&_version>=6)||(_opera&&_version>=9.5)||(_safari&&_version>=312);if(_supported){if(_opera){history.navigationMode="compatible"}for(var i=1;i<_length;i++){_stack.push("")}_stack.push(_getHash());if(_msie&&_l.hash!=_getHash()){_l.hash="#"+_ieLocal(_getHash(),TRUE)}_searchScript(document);var _qi=_url?_url.indexOf("?"):-1;if(_qi!=-1){var param,params=_url.substr(_qi+1).split("&");for(var i=0,p;p=params[i];i++){param=p.split("=");if(/^(history|strict)$/.test(param[0])){_opts[param[0]]=(isNaN(param[1])?/^(true|yes)$/i.test(param[1]):(parseInt(param[1])!=0))}if(/^tracker$/.test(param[0])){_opts[param[0]]=param[1]}}}if(_msie){_titleCheck.call(this)}if(window==_t){_events.addListener(document,"DOMContentLoaded",_functions.bind(_load,this))}_events.addListener(_t,"load",_functions.bind(_load,this))}else{if((!_supported&&_l.href.indexOf("#")!=-1)||(_safari&&_version<418&&_l.href.indexOf("#")!=-1&&_l.search!="")){_d.open();_d.write('<html><head><meta http-equiv="refresh" content="0;url='+_l.href.substr(0,_l.href.indexOf("#"))+'" /></head></html>');_d.close()}else{_track()}}this.toString=function(){return"[class SWFAddress]"};this.back=function(){_h.back()};this.forward=function(){_h.forward()};this.up=function(){var path=this.getPath();this.setValue(path.substr(0,path.lastIndexOf("/",path.length-2)+(path.substr(path.length-1)=="/"?1:0)))};this.go=function(delta){_h.go(delta)};this.href=function(url,target){target=typeof target!=UNDEFINED?target:"_self";if(target=="_self"){self.location.href=url}else{if(target=="_top"){_l.href=url}else{if(target=="_blank"){window.open(url)}else{_t.frames[target].location.href=url}}}};this.popup=function(url,name,options,handler){try{var popup=window.open(url,name,eval(options));if(typeof handler!=UNDEFINED){eval(handler)}}catch(ex){}_popup=arguments};this.getIds=function(){return _ids};this.getId=function(index){return _ids[0]};this.setId=function(id){_ids[0]=id};this.addId=function(id){this.removeId(id);_ids.push(id)};this.removeId=function(id){for(var i=0;i<_ids.length;i++){if(id==_ids[i]){_ids.splice(i,1);break}}};this.addEventListener=function(type,listener){if(typeof _listeners[type]==UNDEFINED){_listeners[type]=[]}_listeners[type].push(listener)};this.removeEventListener=function(type,listener){if(typeof _listeners[type]!=UNDEFINED){for(var i=0,l;l=_listeners[type][i];i++){if(l==listener){break}}_listeners[type].splice(i,1)}};this.dispatchEvent=function(event){if(this.hasEventListener(event.type)){event.target=this;for(var i=0,l;l=_listeners[event.type][i];i++){l(event)}return TRUE}return FALSE};this.hasEventListener=function(type){return(typeof _listeners[type]!=UNDEFINED&&_listeners[type].length>0)};this.getBaseURL=function(){var url=_l.href;if(url.indexOf("#")!=-1){url=url.substr(0,url.indexOf("#"))}if(url.substr(url.length-1)=="/"){url=url.substr(0,url.length-1)}return url};this.getStrict=function(){return _opts.strict};this.setStrict=function(strict){_opts.strict=strict};this.getHistory=function(){return _opts.history};this.setHistory=function(history){_opts.history=history};this.getTracker=function(){return _opts.tracker};this.setTracker=function(tracker){_opts.tracker=tracker};this.getTitle=function(){return _d.title};this.setTitle=function(title){if(!_supported){return null}if(typeof title==UNDEFINED){return}if(title=="null"){title=""}title=_dc(title);_st(function(){_title=_d.title=title;if(_juststart&&_frame&&_frame.contentWindow&&_frame.contentWindow.document){_frame.contentWindow.document.title=title;_juststart=FALSE}if(!_justset&&_mozilla){_l.replace(_l.href.indexOf("#")!=-1?_l.href:_l.href+"#")}_justset=FALSE},10)};this.getStatus=function(){return _t.status};this.setStatus=function(status){if(!_supported){return null}if(typeof status==UNDEFINED){return}if(status=="null"){status=""}status=_dc(status);if(!_safari){status=_strictCheck((status!="null")?status:"",TRUE);if(status=="/"){status=""}if(!(/http(s)?:\/\//.test(status))){var index=_l.href.indexOf("#");status=(index==-1?_l.href:_l.href.substr(0,index))+"#"+status}_t.status=status}};this.resetStatus=function(){_t.status=""};this.getValue=function(){if(!_supported){return null}return _dc(_strictCheck(_ieLocal(_value,FALSE),FALSE))};this.setValue=function(value){if(!_supported){return null}if(typeof value==UNDEFINED){return}if(value=="null"){value=""}value=_ec(_dc(_strictCheck(value,TRUE)));if(value=="/"){value=""}if(_value==value){return}_justset=TRUE;_value=value;_silent=TRUE;_update.call(SWFAddress,true);_stack[_h.length]=_value;if(_safari){if(_opts.history){_l[ID][_l.pathname]=_stack.toString();_length=_h.length+1;if(_version<418){if(_l.search==""){_form.action="#"+_value;_form.submit()}}else{if(_version<523||_value==""){var evt=_d.createEvent("MouseEvents");evt.initEvent("click",TRUE,TRUE);var anchor=_d.createElement("a");anchor.href="#"+_value;anchor.dispatchEvent(evt)}else{_l.hash="#"+_value}}}else{_l.replace("#"+_value)}}else{if(_value!=_getHash()){if(_opts.history){_l.hash="#"+_dc(_ieLocal(_value,TRUE))}else{_l.replace("#"+_dc(_value))}}}if((_msie&&_version<8)&&_opts.history){_st(_htmlWrite,50)}if(_safari){_st(function(){_silent=FALSE},1)}else{_silent=FALSE}};this.getPath=function(){var value=this.getValue();if(value.indexOf("?")!=-1){return value.split("?")[0]}else{if(value.indexOf("#")!=-1){return value.split("#")[0]}else{return value}}};this.getPathNames=function(){var path=this.getPath(),names=path.split("/");if(path.substr(0,1)=="/"||path.length==0){names.splice(0,1)}if(path.substr(path.length-1,1)=="/"){names.splice(names.length-1,1)}return names};this.getQueryString=function(){var value=this.getValue(),index=value.indexOf("?");if(index!=-1&&index<value.length){return value.substr(index+1)}};this.getParameter=function(param){var value=this.getValue();var index=value.indexOf("?");if(index!=-1){value=value.substr(index+1);var p,params=value.split("&"),i=params.length,r=[];while(i--){p=params[i].split("=");if(p[0]==param){r.push(p[1])}}if(r.length!=0){return r.length!=1?r:r[0]}}};this.getParameterNames=function(){var value=this.getValue();var index=value.indexOf("?");var names=[];if(index!=-1){value=value.substr(index+1);if(value!=""&&value.indexOf("=")!=-1){var params=value.split("&"),i=0;while(i<params.length){names.push(params[i].split("=")[0]);i++}}}return names};this.onInit=null;this.onChange=null;this.onInternalChange=null;this.onExternalChange=null;(function(){var _args;if(typeof FlashObject!=UNDEFINED){SWFObject=FlashObject}if(typeof SWFObject!=UNDEFINED&&SWFObject.prototype&&SWFObject.prototype.write){var _s1=SWFObject.prototype.write;SWFObject.prototype.write=function(){_args=arguments;if(this.getAttribute("version").major<8){this.addVariable("$swfaddress",SWFAddress.getValue());((typeof _args[0]=="string")?document.getElementById(_args[0]):_args[0]).so=this}var success;if(success=_s1.apply(this,_args)){_ref.addId(this.getAttribute("id"))}return success}}if(typeof swfobject!=UNDEFINED){var _s2r=swfobject.registerObject;swfobject.registerObject=function(){_args=arguments;_s2r.apply(this,_args);_ref.addId(_args[0])};var _s2c=swfobject.createSWF;swfobject.createSWF=function(){_args=arguments;var swf=_s2c.apply(this,_args);if(swf){_ref.addId(_args[0].id)}return swf};var _s2e=swfobject.embedSWF;swfobject.embedSWF=function(){_args=arguments;if(typeof _args[8]==UNDEFINED){_args[8]={}}if(typeof _args[8].id==UNDEFINED){_args[8].id=_args[1]}_s2e.apply(this,_args);_ref.addId(_args[8].id)}}if(typeof UFO!=UNDEFINED){var _u=UFO.create;UFO.create=function(){_args=arguments;_u.apply(this,_args);_ref.addId(_args[0].id)}}if(typeof AC_FL_RunContent!=UNDEFINED){var _a=AC_FL_RunContent;AC_FL_RunContent=function(){_args=arguments;_a.apply(this,_args);for(var i=0,l=_args.length;i<l;i++){if(_args[i]=="id"){_ref.addId(_args[i+1])}}}}})()};
;;;
var Prototype={Version:'1.7_rc2',Browser:(function(){var ua=navigator.userAgent;var isOpera=Object.prototype.toString.call(window.opera)=='[object Opera]';return{IE:!!window.attachEvent&&!isOpera,Opera:isOpera,WebKit:ua.indexOf('AppleWebKit/')>-1,Gecko:ua.indexOf('Gecko')>-1&&ua.indexOf('KHTML')===-1,MobileSafari:/Apple.*Mobile/.test(ua)}})(),BrowserFeatures:{XPath:!!document.evaluate,SelectorsAPI:!!document.querySelector,ElementExtensions:(function(){var constructor=window.Element||window.HTMLElement;return!!(constructor&&constructor.prototype);})(),SpecificElementExtensions:(function(){if(typeof window.HTMLDivElement!=='undefined')
return true;var div=document.createElement('div'),form=document.createElement('form'),isSupported=false;if(div['__proto__']&&(div['__proto__']!==form['__proto__'])){isSupported=true;}
div=form=null;return isSupported;})()},ScriptFragment:'<script[^>]*>([\\S\\s]*?)<\/script>',JSONFilter:/^\/\*-secure-([\s\S]*)\*\/\s*$/,emptyFunction:function(){},K:function(x){return x}};if(Prototype.Browser.MobileSafari)
Prototype.BrowserFeatures.SpecificElementExtensions=false;var Abstract={};var Try={these:function(){var returnValue;for(var i=0,length=arguments.length;i<length;i++){var lambda=arguments[i];try{returnValue=lambda();break;}catch(e){}}
return returnValue;}};var Class=(function(){var IS_DONTENUM_BUGGY=(function(){for(var p in{toString:1}){if(p==='toString')return false;}
return true;})();function subclass(){};function create(){var parent=null,properties=$A(arguments);if(Object.isFunction(properties[0]))
parent=properties.shift();function klass(){this.initialize.apply(this,arguments);}
Object.extend(klass,Class.Methods);klass.superclass=parent;klass.subclasses=[];if(parent){subclass.prototype=parent.prototype;klass.prototype=new subclass;parent.subclasses.push(klass);}
for(var i=0,length=properties.length;i<length;i++)
klass.addMethods(properties[i]);if(!klass.prototype.initialize)
klass.prototype.initialize=Prototype.emptyFunction;klass.prototype.constructor=klass;return klass;}
function addMethods(source){var ancestor=this.superclass&&this.superclass.prototype,properties=Object.keys(source);if(IS_DONTENUM_BUGGY){if(source.toString!=Object.prototype.toString)
properties.push("toString");if(source.valueOf!=Object.prototype.valueOf)
properties.push("valueOf");}
for(var i=0,length=properties.length;i<length;i++){var property=properties[i],value=source[property];if(ancestor&&Object.isFunction(value)&&value.argumentNames()[0]=="$super"){var method=value;value=(function(m){return function(){return ancestor[m].apply(this,arguments);};})(property).wrap(method);value.valueOf=method.valueOf.bind(method);value.toString=method.toString.bind(method);}
this.prototype[property]=value;}
return this;}
return{create:create,Methods:{addMethods:addMethods}};})();(function(){var _toString=Object.prototype.toString,NULL_TYPE='Null',UNDEFINED_TYPE='Undefined',BOOLEAN_TYPE='Boolean',NUMBER_TYPE='Number',STRING_TYPE='String',OBJECT_TYPE='Object',BOOLEAN_CLASS='[object Boolean]',NUMBER_CLASS='[object Number]',STRING_CLASS='[object String]',ARRAY_CLASS='[object Array]',NATIVE_JSON_STRINGIFY_SUPPORT=window.JSON&&typeof JSON.stringify==='function'&&JSON.stringify(0)==='0'&&typeof JSON.stringify(Prototype.K)==='undefined';function Type(o){switch(o){case null:return NULL_TYPE;case(void 0):return UNDEFINED_TYPE;}
var type=typeof o;switch(type){case'boolean':return BOOLEAN_TYPE;case'number':return NUMBER_TYPE;case'string':return STRING_TYPE;}
return OBJECT_TYPE;}
function extend(destination,source){for(var property in source)
destination[property]=source[property];return destination;}
function inspect(object){try{if(isUndefined(object))return'undefined';if(object===null)return'null';return object.inspect?object.inspect():String(object);}catch(e){if(e instanceof RangeError)return'...';throw e;}}
function toJSON(value){return Str('',{'':value},[]);}
function Str(key,holder,stack){var value=holder[key],type=typeof value;if(Type(value)===OBJECT_TYPE&&typeof value.toJSON==='function'){value=value.toJSON(key);}
var _class=_toString.call(value);switch(_class){case NUMBER_CLASS:case BOOLEAN_CLASS:case STRING_CLASS:value=value.valueOf();}
switch(value){case null:return'null';case true:return'true';case false:return'false';}
type=typeof value;switch(type){case'string':return value.inspect(true);case'number':return isFinite(value)?String(value):'null';case'object':for(var i=0,length=stack.length;i<length;i++){if(stack[i]===value){throw new TypeError();}}
stack.push(value);var partial=[];if(_class===ARRAY_CLASS){for(var i=0,length=value.length;i<length;i++){var str=Str(i,value,stack);partial.push(typeof str==='undefined'?'null':str);}
partial='['+partial.join(',')+']';}else{var keys=Object.keys(value);for(var i=0,length=keys.length;i<length;i++){var key=keys[i],str=Str(key,value,stack);if(typeof str!=="undefined"){partial.push(key.inspect(true)+':'+str);}}
partial='{'+partial.join(',')+'}';}
stack.pop();return partial;}}
function stringify(object){return JSON.stringify(object);}
function toQueryString(object){return $H(object).toQueryString();}
function toHTML(object){return object&&object.toHTML?object.toHTML():String.interpret(object);}
function keys(object){if(Type(object)!==OBJECT_TYPE){throw new TypeError();}
var results=[];for(var property in object){if(object.hasOwnProperty(property)){results.push(property);}}
return results;}
function values(object){var results=[];for(var property in object)
results.push(object[property]);return results;}
function clone(object){return extend({},object);}
function isElement(object){return!!(object&&object.nodeType==1);}
function isArray(object){return _toString.call(object)===ARRAY_CLASS;}
var hasNativeIsArray=(typeof Array.isArray=='function')&&Array.isArray([])&&!Array.isArray({});if(hasNativeIsArray){isArray=Array.isArray;}
function isHash(object){return object instanceof Hash;}
function isFunction(object){return typeof object==="function";}
function isString(object){return _toString.call(object)===STRING_CLASS;}
function isNumber(object){return _toString.call(object)===NUMBER_CLASS;}
function isUndefined(object){return typeof object==="undefined";}
extend(Object,{extend:extend,inspect:inspect,toJSON:NATIVE_JSON_STRINGIFY_SUPPORT?stringify:toJSON,toQueryString:toQueryString,toHTML:toHTML,keys:Object.keys||keys,values:values,clone:clone,isElement:isElement,isArray:isArray,isHash:isHash,isFunction:isFunction,isString:isString,isNumber:isNumber,isUndefined:isUndefined});})();Object.extend(Function.prototype,(function(){var slice=Array.prototype.slice;function update(array,args){var arrayLength=array.length,length=args.length;while(length--)array[arrayLength+length]=args[length];return array;}
function merge(array,args){array=slice.call(array,0);return update(array,args);}
function argumentNames(){var names=this.toString().match(/^[\s\(]*function[^(]*\(([^)]*)\)/)[1].replace(/\/\/.*?[\r\n]|\/\*(?:.|[\r\n])*?\*\//g,'').replace(/\s+/g,'').split(',');return names.length==1&&!names[0]?[]:names;}
function bind(context){if(arguments.length<2&&Object.isUndefined(arguments[0]))return this;var __method=this,args=slice.call(arguments,1);return function(){var a=merge(args,arguments);return __method.apply(context,a);}}
function bindAsEventListener(context){var __method=this,args=slice.call(arguments,1);return function(event){var a=update([event||window.event],args);return __method.apply(context,a);}}
function curry(){if(!arguments.length)return this;var __method=this,args=slice.call(arguments,0);return function(){var a=merge(args,arguments);return __method.apply(this,a);}}
function delay(timeout){var __method=this,args=slice.call(arguments,1);timeout=timeout*1000;return window.setTimeout(function(){return __method.apply(__method,args);},timeout);}
function defer(){var args=update([0.01],arguments);return this.delay.apply(this,args);}
function wrap(wrapper){var __method=this;return function(){var a=update([__method.bind(this)],arguments);return wrapper.apply(this,a);}}
function methodize(){if(this._methodized)return this._methodized;var __method=this;return this._methodized=function(){var a=update([this],arguments);return __method.apply(null,a);};}
return{argumentNames:argumentNames,bind:bind,bindAsEventListener:bindAsEventListener,curry:curry,delay:delay,defer:defer,wrap:wrap,methodize:methodize}})());var $break={};var Enumerable=(function(){function each(iterator,context){var index=0;try{this._each(function(value){iterator.call(context,value,index++);});}catch(e){if(e!=$break)throw e;}
return this;}
function eachSlice(number,iterator,context){var index=-number,slices=[],array=this.toArray();if(number<1)return array;while((index+=number)<array.length)
slices.push(array.slice(index,index+number));return slices.collect(iterator,context);}
function all(iterator,context){iterator=iterator||Prototype.K;var result=true;this.each(function(value,index){result=result&&!!iterator.call(context,value,index);if(!result)throw $break;});return result;}
function any(iterator,context){iterator=iterator||Prototype.K;var result=false;this.each(function(value,index){if(result=!!iterator.call(context,value,index))
throw $break;});return result;}
function collect(iterator,context){iterator=iterator||Prototype.K;var results=[];this.each(function(value,index){results.push(iterator.call(context,value,index));});return results;}
function detect(iterator,context){var result;this.each(function(value,index){if(iterator.call(context,value,index)){result=value;throw $break;}});return result;}
function findAll(iterator,context){var results=[];this.each(function(value,index){if(iterator.call(context,value,index))
results.push(value);});return results;}
function grep(filter,iterator,context){iterator=iterator||Prototype.K;var results=[];if(Object.isString(filter))
filter=new RegExp(RegExp.escape(filter));this.each(function(value,index){if(filter.match(value))
results.push(iterator.call(context,value,index));});return results;}
function include(object){if(Object.isFunction(this.indexOf))
if(this.indexOf(object)!=-1)return true;var found=false;this.each(function(value){if(value==object){found=true;throw $break;}});return found;}
function inGroupsOf(number,fillWith){fillWith=Object.isUndefined(fillWith)?null:fillWith;return this.eachSlice(number,function(slice){while(slice.length<number)slice.push(fillWith);return slice;});}
function inject(memo,iterator,context){this.each(function(value,index){memo=iterator.call(context,memo,value,index);});return memo;}
function invoke(method){var args=$A(arguments).slice(1);return this.map(function(value){return value[method].apply(value,args);});}
function max(iterator,context){iterator=iterator||Prototype.K;var result;this.each(function(value,index){value=iterator.call(context,value,index);if(result==null||value>=result)
result=value;});return result;}
function min(iterator,context){iterator=iterator||Prototype.K;var result;this.each(function(value,index){value=iterator.call(context,value,index);if(result==null||value<result)
result=value;});return result;}
function partition(iterator,context){iterator=iterator||Prototype.K;var trues=[],falses=[];this.each(function(value,index){(iterator.call(context,value,index)?trues:falses).push(value);});return[trues,falses];}
function pluck(property){var results=[];this.each(function(value){results.push(value[property]);});return results;}
function reject(iterator,context){var results=[];this.each(function(value,index){if(!iterator.call(context,value,index))
results.push(value);});return results;}
function sortBy(iterator,context){return this.map(function(value,index){return{value:value,criteria:iterator.call(context,value,index)};}).sort(function(left,right){var a=left.criteria,b=right.criteria;return a<b?-1:a>b?1:0;}).pluck('value');}
function toArray(){return this.map();}
function zip(){var iterator=Prototype.K,args=$A(arguments);if(Object.isFunction(args.last()))
iterator=args.pop();var collections=[this].concat(args).map($A);return this.map(function(value,index){return iterator(collections.pluck(index));});}
function size(){return this.toArray().length;}
function inspect(){return'#<Enumerable:'+this.toArray().inspect()+'>';}
return{each:each,eachSlice:eachSlice,all:all,every:all,any:any,some:any,collect:collect,map:collect,detect:detect,findAll:findAll,select:findAll,filter:findAll,grep:grep,include:include,member:include,inGroupsOf:inGroupsOf,inject:inject,invoke:invoke,max:max,min:min,partition:partition,pluck:pluck,reject:reject,sortBy:sortBy,toArray:toArray,entries:toArray,zip:zip,size:size,inspect:inspect,find:detect};})();function $A(iterable){if(!iterable)return[];if('toArray'in Object(iterable))return iterable.toArray();var length=iterable.length||0,results=new Array(length);while(length--)results[length]=iterable[length];return results;}
function $w(string){if(!Object.isString(string))return[];string=string.strip();return string?string.split(/\s+/):[];}
Array.from=$A;(function(){var arrayProto=Array.prototype,slice=arrayProto.slice,_each=arrayProto.forEach;function each(iterator){for(var i=0,length=this.length;i<length;i++)
iterator(this[i]);}
if(!_each)_each=each;function clear(){this.length=0;return this;}
function first(){return this[0];}
function last(){return this[this.length-1];}
function compact(){return this.select(function(value){return value!=null;});}
function flatten(){return this.inject([],function(array,value){if(Object.isArray(value))
return array.concat(value.flatten());array.push(value);return array;});}
function without(){var values=slice.call(arguments,0);return this.select(function(value){return!values.include(value);});}
function reverse(inline){return(inline===false?this.toArray():this)._reverse();}
function uniq(sorted){return this.inject([],function(array,value,index){if(0==index||(sorted?array.last()!=value:!array.include(value)))
array.push(value);return array;});}
function intersect(array){return this.uniq().findAll(function(item){return array.detect(function(value){return item===value});});}
function clone(){return slice.call(this,0);}
function size(){return this.length;}
function inspect(){return'['+this.map(Object.inspect).join(', ')+']';}
function indexOf(item,i){i||(i=0);var length=this.length;if(i<0)i=length+i;for(;i<length;i++)
if(this[i]===item)return i;return-1;}
function lastIndexOf(item,i){i=isNaN(i)?this.length:(i<0?this.length+i:i)+1;var n=this.slice(0,i).reverse().indexOf(item);return(n<0)?n:i-n-1;}
function concat(){var array=slice.call(this,0),item;for(var i=0,length=arguments.length;i<length;i++){item=arguments[i];if(Object.isArray(item)&&!('callee'in item)){for(var j=0,arrayLength=item.length;j<arrayLength;j++)
array.push(item[j]);}else{array.push(item);}}
return array;}
Object.extend(arrayProto,Enumerable);if(!arrayProto._reverse)
arrayProto._reverse=arrayProto.reverse;Object.extend(arrayProto,{_each:_each,clear:clear,first:first,last:last,compact:compact,flatten:flatten,without:without,reverse:reverse,uniq:uniq,intersect:intersect,clone:clone,toArray:clone,size:size,inspect:inspect});var CONCAT_ARGUMENTS_BUGGY=(function(){return[].concat(arguments)[0][0]!==1;})(1,2)
if(CONCAT_ARGUMENTS_BUGGY)arrayProto.concat=concat;if(!arrayProto.indexOf)arrayProto.indexOf=indexOf;if(!arrayProto.lastIndexOf)arrayProto.lastIndexOf=lastIndexOf;})();
;;;
(function(c,j){function k(a){return!c(a).parents().andSelf().filter(function(){return c.curCSS(this,"visibility")==="hidden"||c.expr.filters.hidden(this)}).length}c.ui=c.ui||{};if(!c.ui.version){c.extend(c.ui,{version:"1.8.4",plugin:{add:function(a,b,d){a=c.ui[a].prototype;for(var e in d){a.plugins[e]=a.plugins[e]||[];a.plugins[e].push([b,d[e]])}},call:function(a,b,d){if((b=a.plugins[b])&&a.element[0].parentNode)for(var e=0;e<b.length;e++)a.options[b[e][0]]&&b[e][1].apply(a.element,d)}},contains:function(a,b){return document.compareDocumentPosition?a.compareDocumentPosition(b)&16:a!==b&&a.contains(b)},hasScroll:function(a,b){if(c(a).css("overflow")==="hidden")return false;b=b&&b==="left"?"scrollLeft":"scrollTop";var d=false;if(a[b]>0)return true;a[b]=1;d=a[b]>0;a[b]=0;return d},isOverAxis:function(a,b,d){return a>b&&a<b+d},isOver:function(a,b,d,e,h,i){return c.ui.isOverAxis(a,d,h)&&c.ui.isOverAxis(b,e,i)},keyCode:{ALT:18,BACKSPACE:8,CAPS_LOCK:20,COMMA:188,COMMAND:91,COMMAND_LEFT:91,COMMAND_RIGHT:93,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,MENU:93,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38,WINDOWS:91}});c.fn.extend({_focus:c.fn.focus,focus:function(a,b){return typeof a==="number"?this.each(function(){var d=this;setTimeout(function(){c(d).focus();b&&b.call(d)},a)}):this._focus.apply(this,arguments)},enableSelection:function(){return this.attr("unselectable","off").css("MozUserSelect","")},disableSelection:function(){return this.attr("unselectable","on").css("MozUserSelect","none")},scrollParent:function(){var a;a=c.browser.msie&&/(static|relative)/.test(this.css("position"))||/absolute/.test(this.css("position"))?this.parents().filter(function(){return/(relative|absolute|fixed)/.test(c.curCSS(this,"position",1))&&/(auto|scroll)/.test(c.curCSS(this,"overflow",1)+c.curCSS(this,"overflow-y",1)+c.curCSS(this,"overflow-x",1))}).eq(0):this.parents().filter(function(){return/(auto|scroll)/.test(c.curCSS(this,"overflow",1)+c.curCSS(this,"overflow-y",1)+c.curCSS(this,"overflow-x",1))}).eq(0);return/fixed/.test(this.css("position"))||!a.length?c(document):a},zIndex:function(a){if(a!==j)return this.css("zIndex",a);if(this.length){a=c(this[0]);for(var b;a.length&&a[0]!==document;){b=a.css("position");if(b==="absolute"||b==="relative"||b==="fixed"){b=parseInt(a.css("zIndex"));if(!isNaN(b)&&b!=0)return b}a=a.parent()}}return 0}});c.each(["Width","Height"],function(a,b){function d(f,g,l,m){c.each(e,function(){g-=parseFloat(c.curCSS(f,"padding"+this,true))||0;if(l)g-=parseFloat(c.curCSS(f,"border"+this+"Width",true))||0;if(m)g-=parseFloat(c.curCSS(f,"margin"+this,true))||0});return g}var e=b==="Width"?["Left","Right"]:["Top","Bottom"],h=b.toLowerCase(),i={innerWidth:c.fn.innerWidth,innerHeight:c.fn.innerHeight,outerWidth:c.fn.outerWidth,outerHeight:c.fn.outerHeight};c.fn["inner"+b]=function(f){if(f===j)return i["inner"+b].call(this);return this.each(function(){c.style(this,h,d(this,f)+"px")})};c.fn["outer"+
b]=function(f,g){if(typeof f!=="number")return i["outer"+b].call(this,f);return this.each(function(){c.style(this,h,d(this,f,true,g)+"px")})}});c.extend(c.expr[":"],{data:function(a,b,d){return!!c.data(a,d[3])},focusable:function(a){var b=a.nodeName.toLowerCase(),d=c.attr(a,"tabindex");if("area"===b){b=a.parentNode;d=b.name;if(!a.href||!d||b.nodeName.toLowerCase()!=="map")return false;a=c("img[usemap=#"+d+"]")[0];return!!a&&k(a)}return(/input|select|textarea|button|object/.test(b)?!a.disabled:"a"==b?a.href||!isNaN(d):!isNaN(d))&&k(a)},tabbable:function(a){var b=c.attr(a,"tabindex");return(isNaN(b)||b>=0)&&c(a).is(":focusable")}})}})(jQuery);;(function(b,j){var k=b.fn.remove;b.fn.remove=function(a,c){return this.each(function(){if(!c)if(!a||b.filter(a,[this]).length)b("*",this).add([this]).each(function(){b(this).triggerHandler("remove")});return k.call(b(this),a,c)})};b.widget=function(a,c,d){var e=a.split(".")[0],f;a=a.split(".")[1];f=e+"-"+a;if(!d){d=c;c=b.Widget}b.expr[":"][f]=function(h){return!!b.data(h,a)};b[e]=b[e]||{};b[e][a]=function(h,g){arguments.length&&this._createWidget(h,g)};c=new c;c.options=b.extend(true,{},c.options);b[e][a].prototype=b.extend(true,c,{namespace:e,widgetName:a,widgetEventPrefix:b[e][a].prototype.widgetEventPrefix||a,widgetBaseClass:f},d);b.widget.bridge(a,b[e][a])};b.widget.bridge=function(a,c){b.fn[a]=function(d){var e=typeof d==="string",f=Array.prototype.slice.call(arguments,1),h=this;d=!e&&f.length?b.extend.apply(null,[true,d].concat(f)):d;if(e&&d.substring(0,1)==="_")return h;e?this.each(function(){var g=b.data(this,a),i=g&&b.isFunction(g[d])?g[d].apply(g,f):g;if(i!==g&&i!==j){h=i;return false}}):this.each(function(){var g=b.data(this,a);if(g){d&&g.option(d);g._init()}else b.data(this,a,new c(d,this))});return h}};b.Widget=function(a,c){arguments.length&&this._createWidget(a,c)};b.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",options:{disabled:false},_createWidget:function(a,c){b.data(c,this.widgetName,this);this.element=b(c);this.options=b.extend(true,{},this.options,b.metadata&&b.metadata.get(c)[this.widgetName],a);var d=this;this.element.bind("remove."+this.widgetName,function(){d.destroy()});this._create();this._init()},_create:function(){},_init:function(){},destroy:function(){this.element.unbind("."+this.widgetName).removeData(this.widgetName);this.widget().unbind("."+this.widgetName).removeAttr("aria-disabled").removeClass(this.widgetBaseClass+"-disabled ui-state-disabled")},widget:function(){return this.element},option:function(a,c){var d=a,e=this;if(arguments.length===0)return b.extend({},e.options);if(typeof a==="string"){if(c===j)return this.options[a];d={};d[a]=c}b.each(d,function(f,h){e._setOption(f,h)});return e},_setOption:function(a,c){this.options[a]=c;if(a==="disabled")this.widget()[c?"addClass":"removeClass"](this.widgetBaseClass+"-disabled ui-state-disabled").attr("aria-disabled",c);return this},enable:function(){return this._setOption("disabled",false)},disable:function(){return this._setOption("disabled",true)},_trigger:function(a,c,d){var e=this.options[a];c=b.Event(c);c.type=(a===this.widgetEventPrefix?a:this.widgetEventPrefix+a).toLowerCase();d=d||{};if(c.originalEvent){a=b.event.props.length;for(var f;a;){f=b.event.props[--a];c[f]=c.originalEvent[f]}}this.element.trigger(c,d);return!(b.isFunction(e)&&e.call(this.element[0],c,d)===false||c.isDefaultPrevented())}}})(jQuery);;(function(c){c.widget("ui.mouse",{options:{cancel:":input,option",distance:1,delay:0},_mouseInit:function(){var a=this;this.element.bind("mousedown."+this.widgetName,function(b){return a._mouseDown(b)}).bind("click."+this.widgetName,function(b){if(a._preventClickEvent){a._preventClickEvent=false;b.stopImmediatePropagation();return false}});this.started=false},_mouseDestroy:function(){this.element.unbind("."+this.widgetName)},_mouseDown:function(a){a.originalEvent=a.originalEvent||{};if(!a.originalEvent.mouseHandled){this._mouseStarted&&this._mouseUp(a);this._mouseDownEvent=a;var b=this,e=a.which==1,f=typeof this.options.cancel=="string"?c(a.target).parents().add(a.target).filter(this.options.cancel).length:false;if(!e||f||!this._mouseCapture(a))return true;this.mouseDelayMet=!this.options.delay;if(!this.mouseDelayMet)this._mouseDelayTimer=setTimeout(function(){b.mouseDelayMet=true},this.options.delay);if(this._mouseDistanceMet(a)&&this._mouseDelayMet(a)){this._mouseStarted=this._mouseStart(a)!==false;if(!this._mouseStarted){a.preventDefault();return true}}this._mouseMoveDelegate=function(d){return b._mouseMove(d)};this._mouseUpDelegate=function(d){return b._mouseUp(d)};c(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate);c.browser.safari||a.preventDefault();return a.originalEvent.mouseHandled=true}},_mouseMove:function(a){if(c.browser.msie&&!a.button)return this._mouseUp(a);if(this._mouseStarted){this._mouseDrag(a);return a.preventDefault()}if(this._mouseDistanceMet(a)&&this._mouseDelayMet(a))(this._mouseStarted=this._mouseStart(this._mouseDownEvent,a)!==false)?this._mouseDrag(a):this._mouseUp(a);return!this._mouseStarted},_mouseUp:function(a){c(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate);if(this._mouseStarted){this._mouseStarted=false;this._preventClickEvent=a.target==this._mouseDownEvent.target;this._mouseStop(a)}return false},_mouseDistanceMet:function(a){return Math.max(Math.abs(this._mouseDownEvent.pageX-
a.pageX),Math.abs(this._mouseDownEvent.pageY-a.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return true}})})(jQuery);;(function(c){c.ui=c.ui||{};var m=/left|center|right/,n=/top|center|bottom/,p=c.fn.position,q=c.fn.offset;c.fn.position=function(a){if(!a||!a.of)return p.apply(this,arguments);a=c.extend({},a);var b=c(a.of),d=(a.collision||"flip").split(" "),e=a.offset?a.offset.split(" "):[0,0],g,h,i;if(a.of.nodeType===9){g=b.width();h=b.height();i={top:0,left:0}}else if(a.of.scrollTo&&a.of.document){g=b.width();h=b.height();i={top:b.scrollTop(),left:b.scrollLeft()}}else if(a.of.preventDefault){a.at="left top";g=h=0;i={top:a.of.pageY,left:a.of.pageX}}else{g=b.outerWidth();h=b.outerHeight();i=b.offset()}c.each(["my","at"],function(){var f=(a[this]||"").split(" ");if(f.length===1)f=m.test(f[0])?f.concat(["center"]):n.test(f[0])?["center"].concat(f):["center","center"];f[0]=m.test(f[0])?f[0]:"center";f[1]=n.test(f[1])?f[1]:"center";a[this]=f});if(d.length===1)d[1]=d[0];e[0]=parseInt(e[0],10)||0;if(e.length===1)e[1]=e[0];e[1]=parseInt(e[1],10)||0;if(a.at[0]==="right")i.left+=g;else if(a.at[0]==="center")i.left+=g/2;if(a.at[1]==="bottom")i.top+=h;else if(a.at[1]==="center")i.top+=h/2;i.left+=e[0];i.top+=e[1];return this.each(function(){var f=c(this),k=f.outerWidth(),l=f.outerHeight(),j=c.extend({},i);if(a.my[0]==="right")j.left-=k;else if(a.my[0]==="center")j.left-=k/2;if(a.my[1]==="bottom")j.top-=l;else if(a.my[1]==="center")j.top-=l/2;j.left=parseInt(j.left);j.top=parseInt(j.top);c.each(["left","top"],function(o,r){c.ui.position[d[o]]&&c.ui.position[d[o]][r](j,{targetWidth:g,targetHeight:h,elemWidth:k,elemHeight:l,offset:e,my:a.my,at:a.at})});c.fn.bgiframe&&f.bgiframe();f.offset(c.extend(j,{using:a.using}))})};c.ui.position={fit:{left:function(a,b){var d=c(window);b=a.left+b.elemWidth-d.width()-d.scrollLeft();a.left=b>0?a.left-b:Math.max(0,a.left)},top:function(a,b){var d=c(window);b=a.top+b.elemHeight-d.height()-d.scrollTop();a.top=b>0?a.top-b:Math.max(0,a.top)}},flip:{left:function(a,b){if(b.at[0]!=="center"){var d=c(window);d=a.left+b.elemWidth-d.width()-d.scrollLeft();var e=b.my[0]==="left"?-b.elemWidth:b.my[0]==="right"?b.elemWidth:0,g=-2*b.offset[0];a.left+=a.left<0?e+b.targetWidth+g:d>0?e-b.targetWidth+g:0}},top:function(a,b){if(b.at[1]!=="center"){var d=c(window);d=a.top+b.elemHeight-d.height()-d.scrollTop();var e=b.my[1]==="top"?-b.elemHeight:b.my[1]==="bottom"?b.elemHeight:0,g=b.at[1]==="top"?b.targetHeight:-b.targetHeight,h=-2*b.offset[1];a.top+=a.top<0?e+b.targetHeight+h:d>0?e+g+h:0}}}};if(!c.offset.setOffset){c.offset.setOffset=function(a,b){if(/static/.test(c.curCSS(a,"position")))a.style.position="relative";var d=c(a),e=d.offset(),g=parseInt(c.curCSS(a,"top",true),10)||0,h=parseInt(c.curCSS(a,"left",true),10)||0;e={top:b.top-e.top+g,left:b.left-e.left+h};"using"in b?b.using.call(a,e):d.css(e)};c.fn.offset=function(a){var b=this[0];if(!b||!b.ownerDocument)return null;if(a)return this.each(function(){c.offset.setOffset(this,a)});return q.call(this)}}})(jQuery);;(function(e){e.widget("ui.resizable",e.ui.mouse,{widgetEventPrefix:"resize",options:{alsoResize:false,animate:false,animateDuration:"slow",animateEasing:"swing",aspectRatio:false,autoHide:false,containment:false,ghost:false,grid:false,handles:"e,s,se",helper:false,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:1E3},_create:function(){var b=this,a=this.options;this.element.addClass("ui-resizable");e.extend(this,{_aspectRatio:!!a.aspectRatio,aspectRatio:a.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:a.helper||a.ghost||a.animate?a.helper||"ui-resizable-helper":null});if(this.element[0].nodeName.match(/canvas|textarea|input|select|button|img/i)){/relative/.test(this.element.css("position"))&&e.browser.opera&&this.element.css({position:"relative",top:"auto",left:"auto"});this.element.wrap(e('<div class="ui-wrapper" style="overflow: hidden;"></div>').css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")}));this.element=this.element.parent().data("resizable",this.element.data("resizable"));this.elementIsWrapper=true;this.element.css({marginLeft:this.originalElement.css("marginLeft"),marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom")});this.originalElement.css({marginLeft:0,marginTop:0,marginRight:0,marginBottom:0});this.originalResizeStyle=this.originalElement.css("resize");this.originalElement.css("resize","none");this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"}));this.originalElement.css({margin:this.originalElement.css("margin")});this._proportionallyResize()}this.handles=a.handles||(!e(".ui-resizable-handle",this.element).length?"e,s,se":{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"});if(this.handles.constructor==String){if(this.handles=="all")this.handles="n,e,s,w,se,sw,ne,nw";var c=this.handles.split(",");this.handles={};for(var d=0;d<c.length;d++){var f=e.trim(c[d]),g=e('<div class="ui-resizable-handle '+("ui-resizable-"+f)+'"></div>');/sw|se|ne|nw/.test(f)&&g.css({zIndex:++a.zIndex});"se"==f&&g.addClass("ui-icon ui-icon-gripsmall-diagonal-se");this.handles[f]=".ui-resizable-"+f;this.element.append(g)}}this._renderAxis=function(h){h=h||this.element;for(var i in this.handles){if(this.handles[i].constructor==String)this.handles[i]=e(this.handles[i],this.element).show();if(this.elementIsWrapper&&this.originalElement[0].nodeName.match(/textarea|input|select|button/i)){var j=e(this.handles[i],this.element),k=0;k=/sw|ne|nw|se|n|s/.test(i)?j.outerHeight():j.outerWidth();j=["padding",/ne|nw|n/.test(i)?"Top":/se|sw|s/.test(i)?"Bottom":/^e$/.test(i)?"Right":"Left"].join("");h.css(j,k);this._proportionallyResize()}e(this.handles[i])}};this._renderAxis(this.element);this._handles=e(".ui-resizable-handle",this.element).disableSelection();this._handles.mouseover(function(){if(!b.resizing){if(this.className)var h=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i);b.axis=h&&h[1]?h[1]:"se"}});if(a.autoHide){this._handles.hide();e(this.element).addClass("ui-resizable-autohide").hover(function(){e(this).removeClass("ui-resizable-autohide");b._handles.show()},function(){if(!b.resizing){e(this).addClass("ui-resizable-autohide");b._handles.hide()}})}this._mouseInit()},destroy:function(){this._mouseDestroy();var b=function(c){e(c).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").unbind(".resizable").find(".ui-resizable-handle").remove()};if(this.elementIsWrapper){b(this.element);var a=this.element;a.after(this.originalElement.css({position:a.css("position"),width:a.outerWidth(),height:a.outerHeight(),top:a.css("top"),left:a.css("left")})).remove()}this.originalElement.css("resize",this.originalResizeStyle);b(this.originalElement);return this},_mouseCapture:function(b){var a=false;for(var c in this.handles)if(e(this.handles[c])[0]==b.target)a=true;return!this.options.disabled&&a},_mouseStart:function(b){var a=this.options,c=this.element.position(),d=this.element;this.resizing=true;this.documentScroll={top:e(document).scrollTop(),left:e(document).scrollLeft()};if(d.is(".ui-draggable")||/absolute/.test(d.css("position")))d.css({position:"absolute",top:c.top,left:c.left});e.browser.opera&&/relative/.test(d.css("position"))&&d.css({position:"relative",top:"auto",left:"auto"});this._renderProxy();c=m(this.helper.css("left"));var f=m(this.helper.css("top"));if(a.containment){c+=e(a.containment).scrollLeft()||0;f+=e(a.containment).scrollTop()||0}this.offset=this.helper.offset();this.position={left:c,top:f};this.size=this._helper?{width:d.outerWidth(),height:d.outerHeight()}:{width:d.width(),height:d.height()};this.originalSize=this._helper?{width:d.outerWidth(),height:d.outerHeight()}:{width:d.width(),height:d.height()};this.originalPosition={left:c,top:f};this.sizeDiff={width:d.outerWidth()-d.width(),height:d.outerHeight()-d.height()};this.originalMousePosition={left:b.pageX,top:b.pageY};this.aspectRatio=typeof a.aspectRatio=="number"?a.aspectRatio:this.originalSize.width/this.originalSize.height||1;a=e(".ui-resizable-"+this.axis).css("cursor");e("body").css("cursor",a=="auto"?this.axis+"-resize":a);d.addClass("ui-resizable-resizing");this._propagate("start",b);return true},_mouseDrag:function(b){var a=this.helper,c=this.originalMousePosition,d=this._change[this.axis];if(!d)return false;c=d.apply(this,[b,b.pageX-c.left||0,b.pageY-c.top||0]);if(this._aspectRatio||b.shiftKey)c=this._updateRatio(c,b);c=this._respectSize(c,b);this._propagate("resize",b);a.css({top:this.position.top+"px",left:this.position.left+"px",width:this.size.width+"px",height:this.size.height+"px"});!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize();this._updateCache(c);this._trigger("resize",b,this.ui());return false},_mouseStop:function(b){this.resizing=false;var a=this.options,c=this;if(this._helper){var d=this._proportionallyResizeElements,f=d.length&&/textarea/i.test(d[0].nodeName);d=f&&e.ui.hasScroll(d[0],"left")?0:c.sizeDiff.height;f={width:c.size.width-(f?0:c.sizeDiff.width),height:c.size.height-d};d=parseInt(c.element.css("left"),10)+(c.position.left-c.originalPosition.left)||null;var g=parseInt(c.element.css("top"),10)+(c.position.top-c.originalPosition.top)||null;a.animate||this.element.css(e.extend(f,{top:g,left:d}));c.helper.height(c.size.height);c.helper.width(c.size.width);this._helper&&!a.animate&&this._proportionallyResize()}e("body").css("cursor","auto");this.element.removeClass("ui-resizable-resizing");this._propagate("stop",b);this._helper&&this.helper.remove();return false},_updateCache:function(b){this.offset=this.helper.offset();if(l(b.left))this.position.left=b.left;if(l(b.top))this.position.top=b.top;if(l(b.height))this.size.height=b.height;if(l(b.width))this.size.width=b.width},_updateRatio:function(b){var a=this.position,c=this.size,d=this.axis;if(b.height)b.width=c.height*this.aspectRatio;else if(b.width)b.height=c.width/this.aspectRatio;if(d=="sw"){b.left=a.left+(c.width-b.width);b.top=null}if(d=="nw"){b.top=a.top+(c.height-b.height);b.left=a.left+(c.width-b.width)}return b},_respectSize:function(b){var a=this.options,c=this.axis,d=l(b.width)&&a.maxWidth&&a.maxWidth<b.width,f=l(b.height)&&a.maxHeight&&a.maxHeight<b.height,g=l(b.width)&&a.minWidth&&a.minWidth>b.width,h=l(b.height)&&a.minHeight&&a.minHeight>b.height;if(g)b.width=a.minWidth;if(h)b.height=a.minHeight;if(d)b.width=a.maxWidth;if(f)b.height=a.maxHeight;var i=this.originalPosition.left+this.originalSize.width,j=this.position.top+this.size.height,k=/sw|nw|w/.test(c);c=/nw|ne|n/.test(c);if(g&&k)b.left=i-a.minWidth;if(d&&k)b.left=i-a.maxWidth;if(h&&c)b.top=j-a.minHeight;if(f&&c)b.top=j-a.maxHeight;if((a=!b.width&&!b.height)&&!b.left&&b.top)b.top=null;else if(a&&!b.top&&b.left)b.left=null;return b},_proportionallyResize:function(){if(this._proportionallyResizeElements.length)for(var b=this.helper||this.element,a=0;a<this._proportionallyResizeElements.length;a++){var c=this._proportionallyResizeElements[a];if(!this.borderDif){var d=[c.css("borderTopWidth"),c.css("borderRightWidth"),c.css("borderBottomWidth"),c.css("borderLeftWidth")],f=[c.css("paddingTop"),c.css("paddingRight"),c.css("paddingBottom"),c.css("paddingLeft")];this.borderDif=e.map(d,function(g,h){g=parseInt(g,10)||0;h=parseInt(f[h],10)||0;return g+h})}e.browser.msie&&(e(b).is(":hidden")||e(b).parents(":hidden").length)||c.css({height:b.height()-this.borderDif[0]-this.borderDif[2]||0,width:b.width()-this.borderDif[1]-this.borderDif[3]||0})}},_renderProxy:function(){var b=this.options;this.elementOffset=this.element.offset();if(this._helper){this.helper=this.helper||e('<div style="overflow:hidden;"></div>');var a=e.browser.msie&&e.browser.version<7,c=a?1:0;a=a?2:-1;this.helper.addClass(this._helper).css({width:this.element.outerWidth()+a,height:this.element.outerHeight()+a,position:"absolute",left:this.elementOffset.left-c+"px",top:this.elementOffset.top-c+"px",zIndex:++b.zIndex});this.helper.appendTo("body").disableSelection()}else this.helper=this.element},_change:{e:function(b,a){return{width:this.originalSize.width+
a}},w:function(b,a){return{left:this.originalPosition.left+a,width:this.originalSize.width-a}},n:function(b,a,c){return{top:this.originalPosition.top+c,height:this.originalSize.height-c}},s:function(b,a,c){return{height:this.originalSize.height+c}},se:function(b,a,c){return e.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[b,a,c]))},sw:function(b,a,c){return e.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[b,a,c]))},ne:function(b,a,c){return e.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[b,a,c]))},nw:function(b,a,c){return e.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[b,a,c]))}},_propagate:function(b,a){e.ui.plugin.call(this,b,[a,this.ui()]);b!="resize"&&this._trigger(b,a,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}});e.extend(e.ui.resizable,{version:"1.8.4"});e.ui.plugin.add("resizable","alsoResize",{start:function(){var b=e(this).data("resizable").options,a=function(c){e(c).each(function(){var d=e(this);d.data("resizable-alsoresize",{width:parseInt(d.width(),10),height:parseInt(d.height(),10),left:parseInt(d.css("left"),10),top:parseInt(d.css("top"),10),position:d.css("position")})})};if(typeof b.alsoResize=="object"&&!b.alsoResize.parentNode)if(b.alsoResize.length){b.alsoResize=b.alsoResize[0];a(b.alsoResize)}else e.each(b.alsoResize,function(c){a(c)});else a(b.alsoResize)},resize:function(b,a){var c=e(this).data("resizable");b=c.options;var d=c.originalSize,f=c.originalPosition,g={height:c.size.height-d.height||0,width:c.size.width-d.width||0,top:c.position.top-f.top||0,left:c.position.left-f.left||0},h=function(i,j){e(i).each(function(){var k=e(this),q=e(this).data("resizable-alsoresize"),p={},r=j&&j.length?j:k.parents(a.originalElement[0]).length?["width","height"]:["width","height","top","left"];e.each(r,function(n,o){if((n=(q[o]||0)+(g[o]||0))&&n>=0)p[o]=n||null});if(e.browser.opera&&/relative/.test(k.css("position"))){c._revertToRelativePosition=true;k.css({position:"absolute",top:"auto",left:"auto"})}k.css(p)})};typeof b.alsoResize=="object"&&!b.alsoResize.nodeType?e.each(b.alsoResize,function(i,j){h(i,j)}):h(b.alsoResize)},stop:function(){var b=e(this).data("resizable"),a=b.options,c=function(d){e(d).each(function(){var f=e(this);f.css({position:f.data("resizable-alsoresize").position})})};if(b._revertToRelativePosition){b._revertToRelativePosition=false;typeof a.alsoResize=="object"&&!a.alsoResize.nodeType?e.each(a.alsoResize,function(d){c(d)}):c(a.alsoResize)}e(this).removeData("resizable-alsoresize")}});e.ui.plugin.add("resizable","animate",{stop:function(b){var a=e(this).data("resizable"),c=a.options,d=a._proportionallyResizeElements,f=d.length&&/textarea/i.test(d[0].nodeName),g=f&&e.ui.hasScroll(d[0],"left")?0:a.sizeDiff.height;f={width:a.size.width-(f?0:a.sizeDiff.width),height:a.size.height-g};g=parseInt(a.element.css("left"),10)+(a.position.left-
a.originalPosition.left)||null;var h=parseInt(a.element.css("top"),10)+(a.position.top-a.originalPosition.top)||null;a.element.animate(e.extend(f,h&&g?{top:h,left:g}:{}),{duration:c.animateDuration,easing:c.animateEasing,step:function(){var i={width:parseInt(a.element.css("width"),10),height:parseInt(a.element.css("height"),10),top:parseInt(a.element.css("top"),10),left:parseInt(a.element.css("left"),10)};d&&d.length&&e(d[0]).css({width:i.width,height:i.height});a._updateCache(i);a._propagate("resize",b)}})}});e.ui.plugin.add("resizable","containment",{start:function(){var b=e(this).data("resizable"),a=b.element,c=b.options.containment;if(a=c instanceof e?c.get(0):/parent/.test(c)?a.parent().get(0):c){b.containerElement=e(a);if(/document/.test(c)||c==document){b.containerOffset={left:0,top:0};b.containerPosition={left:0,top:0};b.parentData={element:e(document),left:0,top:0,width:e(document).width(),height:e(document).height()||document.body.parentNode.scrollHeight}}else{var d=e(a),f=[];e(["Top","Right","Left","Bottom"]).each(function(i,j){f[i]=m(d.css("padding"+j))});b.containerOffset=d.offset();b.containerPosition=d.position();b.containerSize={height:d.innerHeight()-f[3],width:d.innerWidth()-f[1]};c=b.containerOffset;var g=b.containerSize.height,h=b.containerSize.width;h=e.ui.hasScroll(a,"left")?a.scrollWidth:h;g=e.ui.hasScroll(a)?a.scrollHeight:g;b.parentData={element:a,left:c.left,top:c.top,width:h,height:g}}}},resize:function(b){var a=e(this).data("resizable"),c=a.options,d=a.containerOffset,f=a.position;b=a._aspectRatio||b.shiftKey;var g={top:0,left:0},h=a.containerElement;if(h[0]!=document&&/static/.test(h.css("position")))g=d;if(f.left<(a._helper?d.left:0)){a.size.width+=a._helper?a.position.left-d.left:a.position.left-g.left;if(b)a.size.height=a.size.width/c.aspectRatio;a.position.left=c.helper?d.left:0}if(f.top<(a._helper?d.top:0)){a.size.height+=a._helper?a.position.top-d.top:a.position.top;if(b)a.size.width=a.size.height*c.aspectRatio;a.position.top=a._helper?d.top:0}a.offset.left=a.parentData.left+a.position.left;a.offset.top=a.parentData.top+a.position.top;c=Math.abs((a._helper?a.offset.left-g.left:a.offset.left-g.left)+a.sizeDiff.width);d=Math.abs((a._helper?a.offset.top-g.top:a.offset.top-d.top)+a.sizeDiff.height);f=a.containerElement.get(0)==a.element.parent().get(0);g=/relative|absolute/.test(a.containerElement.css("position"));if(f&&g)c-=a.parentData.left;if(c+a.size.width>=a.parentData.width){a.size.width=a.parentData.width-c;if(b)a.size.height=a.size.width/a.aspectRatio}if(d+
a.size.height>=a.parentData.height){a.size.height=a.parentData.height-d;if(b)a.size.width=a.size.height*a.aspectRatio}},stop:function(){var b=e(this).data("resizable"),a=b.options,c=b.containerOffset,d=b.containerPosition,f=b.containerElement,g=e(b.helper),h=g.offset(),i=g.outerWidth()-b.sizeDiff.width;g=g.outerHeight()-b.sizeDiff.height;b._helper&&!a.animate&&/relative/.test(f.css("position"))&&e(this).css({left:h.left-d.left-c.left,width:i,height:g});b._helper&&!a.animate&&/static/.test(f.css("position"))&&e(this).css({left:h.left-d.left-c.left,width:i,height:g})}});e.ui.plugin.add("resizable","ghost",{start:function(){var b=e(this).data("resizable"),a=b.options,c=b.size;b.ghost=b.originalElement.clone();b.ghost.css({opacity:0.25,display:"block",position:"relative",height:c.height,width:c.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass(typeof a.ghost=="string"?a.ghost:"");b.ghost.appendTo(b.helper)},resize:function(){var b=e(this).data("resizable");b.ghost&&b.ghost.css({position:"relative",height:b.size.height,width:b.size.width})},stop:function(){var b=e(this).data("resizable");b.ghost&&b.helper&&b.helper.get(0).removeChild(b.ghost.get(0))}});e.ui.plugin.add("resizable","grid",{resize:function(){var b=e(this).data("resizable"),a=b.options,c=b.size,d=b.originalSize,f=b.originalPosition,g=b.axis;a.grid=typeof a.grid=="number"?[a.grid,a.grid]:a.grid;var h=Math.round((c.width-d.width)/(a.grid[0]||1))*(a.grid[0]||1);a=Math.round((c.height-d.height)/(a.grid[1]||1))*(a.grid[1]||1);if(/^(se|s|e)$/.test(g)){b.size.width=d.width+h;b.size.height=d.height+a}else if(/^(ne)$/.test(g)){b.size.width=d.width+h;b.size.height=d.height+a;b.position.top=f.top-a}else{if(/^(sw)$/.test(g)){b.size.width=d.width+h;b.size.height=d.height+a}else{b.size.width=d.width+h;b.size.height=d.height+a;b.position.top=f.top-a}b.position.left=f.left-h}}});var m=function(b){return parseInt(b,10)||0},l=function(b){return!isNaN(parseInt(b,10))}})(jQuery);;jQuery.effects||function(f,j){function l(c){var a;if(c&&c.constructor==Array&&c.length==3)return c;if(a=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(c))return[parseInt(a[1],10),parseInt(a[2],10),parseInt(a[3],10)];if(a=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(c))return[parseFloat(a[1])*2.55,parseFloat(a[2])*2.55,parseFloat(a[3])*2.55];if(a=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(c))return[parseInt(a[1],16),parseInt(a[2],16),parseInt(a[3],16)];if(a=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(c))return[parseInt(a[1]+a[1],16),parseInt(a[2]+a[2],16),parseInt(a[3]+a[3],16)];if(/rgba\(0, 0, 0, 0\)/.exec(c))return m.transparent;return m[f.trim(c).toLowerCase()]}function r(c,a){var b;do{b=f.curCSS(c,a);if(b!=""&&b!="transparent"||f.nodeName(c,"body"))break;a="backgroundColor"}while(c=c.parentNode);return l(b)}function n(){var c=document.defaultView?document.defaultView.getComputedStyle(this,null):this.currentStyle,a={},b,d;if(c&&c.length&&c[0]&&c[c[0]])for(var e=c.length;e--;){b=c[e];if(typeof c[b]=="string"){d=b.replace(/\-(\w)/g,function(g,h){return h.toUpperCase()});a[d]=c[b]}}else for(b in c)if(typeof c[b]==="string")a[b]=c[b];return a}function o(c){var a,b;for(a in c){b=c[a];if(b==null||f.isFunction(b)||a in s||/scrollbar/.test(a)||!/color/i.test(a)&&isNaN(parseFloat(b)))delete c[a]}return c}function t(c,a){var b={_:0},d;for(d in a)if(c[d]!=a[d])b[d]=a[d];return b}function k(c,a,b,d){if(typeof c=="object"){d=a;b=null;a=c;c=a.effect}if(f.isFunction(a)){d=a;b=null;a={}}if(typeof a=="number"||f.fx.speeds[a]){d=b;b=a;a={}}if(f.isFunction(b)){d=b;b=null}a=a||{};b=b||a.duration;b=f.fx.off?0:typeof b=="number"?b:f.fx.speeds[b]||f.fx.speeds._default;d=d||a.complete;return[c,a,b,d]}f.effects={};f.each(["backgroundColor","borderBottomColor","borderLeftColor","borderRightColor","borderTopColor","color","outlineColor"],function(c,a){f.fx.step[a]=function(b){if(!b.colorInit){b.start=r(b.elem,a);b.end=l(b.end);b.colorInit=true}b.elem.style[a]="rgb("+Math.max(Math.min(parseInt(b.pos*(b.end[0]-b.start[0])+b.start[0],10),255),0)+","+Math.max(Math.min(parseInt(b.pos*(b.end[1]-b.start[1])+b.start[1],10),255),0)+","+Math.max(Math.min(parseInt(b.pos*(b.end[2]-b.start[2])+b.start[2],10),255),0)+")"}});var m={aqua:[0,255,255],azure:[240,255,255],beige:[245,245,220],black:[0,0,0],blue:[0,0,255],brown:[165,42,42],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgrey:[169,169,169],darkgreen:[0,100,0],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkviolet:[148,0,211],fuchsia:[255,0,255],gold:[255,215,0],green:[0,128,0],indigo:[75,0,130],khaki:[240,230,140],lightblue:[173,216,230],lightcyan:[224,255,255],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightyellow:[255,255,224],lime:[0,255,0],magenta:[255,0,255],maroon:[128,0,0],navy:[0,0,128],olive:[128,128,0],orange:[255,165,0],pink:[255,192,203],purple:[128,0,128],violet:[128,0,128],red:[255,0,0],silver:[192,192,192],white:[255,255,255],yellow:[255,255,0],transparent:[255,255,255]},p=["add","remove","toggle"],s={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};f.effects.animateClass=function(c,a,b,d){if(f.isFunction(b)){d=b;b=null}return this.each(function(){var e=f(this),g=e.attr("style")||" ",h=o(n.call(this)),q,u=e.attr("className");f.each(p,function(v,i){c[i]&&e[i+"Class"](c[i])});q=o(n.call(this));e.attr("className",u);e.animate(t(h,q),a,b,function(){f.each(p,function(v,i){c[i]&&e[i+"Class"](c[i])});if(typeof e.attr("style")=="object"){e.attr("style").cssText="";e.attr("style").cssText=g}else e.attr("style",g);d&&d.apply(this,arguments)})})};f.fn.extend({_addClass:f.fn.addClass,addClass:function(c,a,b,d){return a?f.effects.animateClass.apply(this,[{add:c},a,b,d]):this._addClass(c)},_removeClass:f.fn.removeClass,removeClass:function(c,a,b,d){return a?f.effects.animateClass.apply(this,[{remove:c},a,b,d]):this._removeClass(c)},_toggleClass:f.fn.toggleClass,toggleClass:function(c,a,b,d,e){return typeof a=="boolean"||a===j?b?f.effects.animateClass.apply(this,[a?{add:c}:{remove:c},b,d,e]):this._toggleClass(c,a):f.effects.animateClass.apply(this,[{toggle:c},a,b,d])},switchClass:function(c,a,b,d,e){return f.effects.animateClass.apply(this,[{add:a,remove:c},b,d,e])}});f.extend(f.effects,{version:"1.8.4",save:function(c,a){for(var b=0;b<a.length;b++)a[b]!==null&&c.data("ec.storage."+a[b],c[0].style[a[b]])},restore:function(c,a){for(var b=0;b<a.length;b++)a[b]!==null&&c.css(a[b],c.data("ec.storage."+a[b]))},setMode:function(c,a){if(a=="toggle")a=c.is(":hidden")?"show":"hide";return a},getBaseline:function(c,a){var b;switch(c[0]){case"top":b=0;break;case"middle":b=0.5;break;case"bottom":b=1;break;default:b=c[0]/a.height}switch(c[1]){case"left":c=0;break;case"center":c=0.5;break;case"right":c=1;break;default:c=c[1]/a.width}return{x:c,y:b}},createWrapper:function(c){if(c.parent().is(".ui-effects-wrapper"))return c.parent();var a={width:c.outerWidth(true),height:c.outerHeight(true),"float":c.css("float")},b=f("<div></div>").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0});c.wrap(b);b=c.parent();if(c.css("position")=="static"){b.css({position:"relative"});c.css({position:"relative"})}else{f.extend(a,{position:c.css("position"),zIndex:c.css("z-index")});f.each(["top","left","bottom","right"],function(d,e){a[e]=c.css(e);if(isNaN(parseInt(a[e],10)))a[e]="auto"});c.css({position:"relative",top:0,left:0})}return b.css(a).show()},removeWrapper:function(c){if(c.parent().is(".ui-effects-wrapper"))return c.parent().replaceWith(c);return c},setTransition:function(c,a,b,d){d=d||{};f.each(a,function(e,g){unit=c.cssUnit(g);if(unit[0]>0)d[g]=unit[0]*b+unit[1]});return d}});f.fn.extend({effect:function(c){var a=k.apply(this,arguments);a={options:a[1],duration:a[2],callback:a[3]};var b=f.effects[c];return b&&!f.fx.off?b.call(this,a):this},_show:f.fn.show,show:function(c){if(!c||typeof c=="number"||f.fx.speeds[c])return this._show.apply(this,arguments);else{var a=k.apply(this,arguments);a[1].mode="show";return this.effect.apply(this,a)}},_hide:f.fn.hide,hide:function(c){if(!c||typeof c=="number"||f.fx.speeds[c])return this._hide.apply(this,arguments);else{var a=k.apply(this,arguments);a[1].mode="hide";return this.effect.apply(this,a)}},__toggle:f.fn.toggle,toggle:function(c){if(!c||typeof c=="number"||f.fx.speeds[c]||typeof c=="boolean"||f.isFunction(c))return this.__toggle.apply(this,arguments);else{var a=k.apply(this,arguments);a[1].mode="toggle";return this.effect.apply(this,a)}},cssUnit:function(c){var a=this.css(c),b=[];f.each(["em","px","%","pt"],function(d,e){if(a.indexOf(e)>0)b=[parseFloat(a),e]});return b}});f.easing.jswing=f.easing.swing;f.extend(f.easing,{def:"easeOutQuad",swing:function(c,a,b,d,e){return f.easing[f.easing.def](c,a,b,d,e)},easeInQuad:function(c,a,b,d,e){return d*(a/=e)*a+b},easeOutQuad:function(c,a,b,d,e){return-d*(a/=e)*(a-2)+b},easeInOutQuad:function(c,a,b,d,e){if((a/=e/2)<1)return d/2*a*a+b;return-d/2*(--a*(a-2)-1)+b},easeInCubic:function(c,a,b,d,e){return d*(a/=e)*a*a+b},easeOutCubic:function(c,a,b,d,e){return d*((a=a/e-1)*a*a+1)+b},easeInOutCubic:function(c,a,b,d,e){if((a/=e/2)<1)return d/2*a*a*a+b;return d/2*((a-=2)*a*a+2)+b},easeInQuart:function(c,a,b,d,e){return d*(a/=e)*a*a*a+b},easeOutQuart:function(c,a,b,d,e){return-d*((a=a/e-1)*a*a*a-1)+b},easeInOutQuart:function(c,a,b,d,e){if((a/=e/2)<1)return d/2*a*a*a*a+b;return-d/2*((a-=2)*a*a*a-2)+
b},easeInQuint:function(c,a,b,d,e){return d*(a/=e)*a*a*a*a+b},easeOutQuint:function(c,a,b,d,e){return d*((a=a/e-1)*a*a*a*a+1)+b},easeInOutQuint:function(c,a,b,d,e){if((a/=e/2)<1)return d/2*a*a*a*a*a+b;return d/2*((a-=2)*a*a*a*a+2)+b},easeInSine:function(c,a,b,d,e){return-d*Math.cos(a/e*(Math.PI/2))+d+b},easeOutSine:function(c,a,b,d,e){return d*Math.sin(a/e*(Math.PI/2))+b},easeInOutSine:function(c,a,b,d,e){return-d/2*(Math.cos(Math.PI*a/e)-1)+b},easeInExpo:function(c,a,b,d,e){return a==0?b:d*Math.pow(2,10*(a/e-1))+b},easeOutExpo:function(c,a,b,d,e){return a==e?b+d:d*(-Math.pow(2,-10*a/e)+1)+b},easeInOutExpo:function(c,a,b,d,e){if(a==0)return b;if(a==e)return b+d;if((a/=e/2)<1)return d/2*Math.pow(2,10*(a-1))+b;return d/2*(-Math.pow(2,-10*--a)+2)+b},easeInCirc:function(c,a,b,d,e){return-d*(Math.sqrt(1-(a/=e)*a)-1)+b},easeOutCirc:function(c,a,b,d,e){return d*Math.sqrt(1-(a=a/e-1)*a)+b},easeInOutCirc:function(c,a,b,d,e){if((a/=e/2)<1)return-d/2*(Math.sqrt(1-a*a)-1)+b;return d/2*(Math.sqrt(1-(a-=2)*a)+1)+b},easeInElastic:function(c,a,b,d,e){c=1.70158;var g=0,h=d;if(a==0)return b;if((a/=e)==1)return b+d;g||(g=e*0.3);if(h<Math.abs(d)){h=d;c=g/4}else c=g/(2*Math.PI)*Math.asin(d/h);return-(h*Math.pow(2,10*(a-=1))*Math.sin((a*e-c)*2*Math.PI/g))+b},easeOutElastic:function(c,a,b,d,e){c=1.70158;var g=0,h=d;if(a==0)return b;if((a/=e)==1)return b+d;g||(g=e*0.3);if(h<Math.abs(d)){h=d;c=g/4}else c=g/(2*Math.PI)*Math.asin(d/h);return h*Math.pow(2,-10*a)*Math.sin((a*e-c)*2*Math.PI/g)+d+b},easeInOutElastic:function(c,a,b,d,e){c=1.70158;var g=0,h=d;if(a==0)return b;if((a/=e/2)==2)return b+d;g||(g=e*0.3*1.5);if(h<Math.abs(d)){h=d;c=g/4}else c=g/(2*Math.PI)*Math.asin(d/h);if(a<1)return-0.5*h*Math.pow(2,10*(a-=1))*Math.sin((a*e-c)*2*Math.PI/g)+b;return h*Math.pow(2,-10*(a-=1))*Math.sin((a*e-c)*2*Math.PI/g)*0.5+d+b},easeInBack:function(c,a,b,d,e,g){if(g==j)g=1.70158;return d*(a/=e)*a*((g+1)*a-g)+b},easeOutBack:function(c,a,b,d,e,g){if(g==j)g=1.70158;return d*((a=a/e-1)*a*((g+1)*a+g)+1)+b},easeInOutBack:function(c,a,b,d,e,g){if(g==j)g=1.70158;if((a/=e/2)<1)return d/2*a*a*(((g*=1.525)+1)*a-g)+b;return d/2*((a-=2)*a*(((g*=1.525)+1)*a+g)+2)+b},easeInBounce:function(c,a,b,d,e){return d-f.easing.easeOutBounce(c,e-a,0,d,e)+b},easeOutBounce:function(c,a,b,d,e){return(a/=e)<1/2.75?d*7.5625*a*a+b:a<2/2.75?d*(7.5625*(a-=1.5/2.75)*a+0.75)+b:a<2.5/2.75?d*(7.5625*(a-=2.25/2.75)*a+0.9375)+b:d*(7.5625*(a-=2.625/2.75)*a+0.984375)+b},easeInOutBounce:function(c,a,b,d,e){if(a<e/2)return f.easing.easeInBounce(c,a*2,0,d,e)*0.5+
b;return f.easing.easeOutBounce(c,a*2-e,0,d,e)*0.5+d*0.5+b}})}(jQuery);;(function(b){b.effects.blind=function(c){return this.queue(function(){var a=b(this),g=["position","top","left"],f=b.effects.setMode(a,c.options.mode||"hide"),d=c.options.direction||"vertical";b.effects.save(a,g);a.show();var e=b.effects.createWrapper(a).css({overflow:"hidden"}),h=d=="vertical"?"height":"width";d=d=="vertical"?e.height():e.width();f=="show"&&e.css(h,0);var i={};i[h]=f=="show"?d:0;e.animate(i,c.duration,c.options.easing,function(){f=="hide"&&a.hide();b.effects.restore(a,g);b.effects.removeWrapper(a);c.callback&&c.callback.apply(a[0],arguments);a.dequeue()})})}})(jQuery);;(function(e){e.effects.bounce=function(b){return this.queue(function(){var a=e(this),l=["position","top","left"],h=e.effects.setMode(a,b.options.mode||"effect"),d=b.options.direction||"up",c=b.options.distance||20,m=b.options.times||5,i=b.duration||250;/show|hide/.test(h)&&l.push("opacity");e.effects.save(a,l);a.show();e.effects.createWrapper(a);var f=d=="up"||d=="down"?"top":"left";d=d=="up"||d=="left"?"pos":"neg";c=b.options.distance||(f=="top"?a.outerHeight({margin:true})/3:a.outerWidth({margin:true})/3);if(h=="show")a.css("opacity",0).css(f,d=="pos"?-c:c);if(h=="hide")c/=m*2;h!="hide"&&m--;if(h=="show"){var g={opacity:1};g[f]=(d=="pos"?"+=":"-=")+c;a.animate(g,i/2,b.options.easing);c/=2;m--}for(g=0;g<m;g++){var j={},k={};j[f]=(d=="pos"?"-=":"+=")+c;k[f]=(d=="pos"?"+=":"-=")+c;a.animate(j,i/2,b.options.easing).animate(k,i/2,b.options.easing);c=h=="hide"?c*2:c/2}if(h=="hide"){g={opacity:0};g[f]=(d=="pos"?"-=":"+=")+c;a.animate(g,i/2,b.options.easing,function(){a.hide();e.effects.restore(a,l);e.effects.removeWrapper(a);b.callback&&b.callback.apply(this,arguments)})}else{j={};k={};j[f]=(d=="pos"?"-=":"+=")+c;k[f]=(d=="pos"?"+=":"-=")+c;a.animate(j,i/2,b.options.easing).animate(k,i/2,b.options.easing,function(){e.effects.restore(a,l);e.effects.removeWrapper(a);b.callback&&b.callback.apply(this,arguments)})}a.queue("fx",function(){a.dequeue()});a.dequeue()})}})(jQuery);;(function(b){b.effects.clip=function(e){return this.queue(function(){var a=b(this),i=["position","top","left","height","width"],f=b.effects.setMode(a,e.options.mode||"hide"),c=e.options.direction||"vertical";b.effects.save(a,i);a.show();var d=b.effects.createWrapper(a).css({overflow:"hidden"});d=a[0].tagName=="IMG"?d:a;var g={size:c=="vertical"?"height":"width",position:c=="vertical"?"top":"left"};c=c=="vertical"?d.height():d.width();if(f=="show"){d.css(g.size,0);d.css(g.position,c/2)}var h={};h[g.size]=f=="show"?c:0;h[g.position]=f=="show"?0:c/2;d.animate(h,{queue:false,duration:e.duration,easing:e.options.easing,complete:function(){f=="hide"&&a.hide();b.effects.restore(a,i);b.effects.removeWrapper(a);e.callback&&e.callback.apply(a[0],arguments);a.dequeue()}})})}})(jQuery);;(function(c){c.effects.drop=function(d){return this.queue(function(){var a=c(this),h=["position","top","left","opacity"],e=c.effects.setMode(a,d.options.mode||"hide"),b=d.options.direction||"left";c.effects.save(a,h);a.show();c.effects.createWrapper(a);var f=b=="up"||b=="down"?"top":"left";b=b=="up"||b=="left"?"pos":"neg";var g=d.options.distance||(f=="top"?a.outerHeight({margin:true})/2:a.outerWidth({margin:true})/2);if(e=="show")a.css("opacity",0).css(f,b=="pos"?-g:g);var i={opacity:e=="show"?1:0};i[f]=(e=="show"?b=="pos"?"+=":"-=":b=="pos"?"-=":"+=")+g;a.animate(i,{queue:false,duration:d.duration,easing:d.options.easing,complete:function(){e=="hide"&&a.hide();c.effects.restore(a,h);c.effects.removeWrapper(a);d.callback&&d.callback.apply(this,arguments);a.dequeue()}})})}})(jQuery);;(function(j){j.effects.explode=function(a){return this.queue(function(){var c=a.options.pieces?Math.round(Math.sqrt(a.options.pieces)):3,d=a.options.pieces?Math.round(Math.sqrt(a.options.pieces)):3;a.options.mode=a.options.mode=="toggle"?j(this).is(":visible")?"hide":"show":a.options.mode;var b=j(this).show().css("visibility","hidden"),g=b.offset();g.top-=parseInt(b.css("marginTop"),10)||0;g.left-=parseInt(b.css("marginLeft"),10)||0;for(var h=b.outerWidth(true),i=b.outerHeight(true),e=0;e<c;e++)for(var f=0;f<d;f++)b.clone().appendTo("body").wrap("<div></div>").css({position:"absolute",visibility:"visible",left:-f*(h/d),top:-e*(i/c)}).parent().addClass("ui-effects-explode").css({position:"absolute",overflow:"hidden",width:h/d,height:i/c,left:g.left+f*(h/d)+(a.options.mode=="show"?(f-Math.floor(d/2))*(h/d):0),top:g.top+e*(i/c)+(a.options.mode=="show"?(e-Math.floor(c/2))*(i/c):0),opacity:a.options.mode=="show"?0:1}).animate({left:g.left+f*(h/d)+(a.options.mode=="show"?0:(f-Math.floor(d/2))*(h/d)),top:g.top+
e*(i/c)+(a.options.mode=="show"?0:(e-Math.floor(c/2))*(i/c)),opacity:a.options.mode=="show"?1:0},a.duration||500);setTimeout(function(){a.options.mode=="show"?b.css({visibility:"visible"}):b.css({visibility:"visible"}).hide();a.callback&&a.callback.apply(b[0]);b.dequeue();j("div.ui-effects-explode").remove()},a.duration||500)})}})(jQuery);;(function(c){c.effects.fold=function(a){return this.queue(function(){var b=c(this),j=["position","top","left"],d=c.effects.setMode(b,a.options.mode||"hide"),g=a.options.size||15,h=!!a.options.horizFirst,k=a.duration?a.duration/2:c.fx.speeds._default/2;c.effects.save(b,j);b.show();var e=c.effects.createWrapper(b).css({overflow:"hidden"}),f=d=="show"!=h,l=f?["width","height"]:["height","width"];f=f?[e.width(),e.height()]:[e.height(),e.width()];var i=/([0-9]+)%/.exec(g);if(i)g=parseInt(i[1],10)/100*f[d=="hide"?0:1];if(d=="show")e.css(h?{height:0,width:g}:{height:g,width:0});h={};i={};h[l[0]]=d=="show"?f[0]:g;i[l[1]]=d=="show"?f[1]:0;e.animate(h,k,a.options.easing).animate(i,k,a.options.easing,function(){d=="hide"&&b.hide();c.effects.restore(b,j);c.effects.removeWrapper(b);a.callback&&a.callback.apply(b[0],arguments);b.dequeue()})})}})(jQuery);;(function(c){c.effects.puff=function(b){return this.queue(function(){var a=c(this),e=c.effects.setMode(a,b.options.mode||"hide"),g=parseInt(b.options.percent,10)||150,h=g/100,i={height:a.height(),width:a.width()};c.extend(b.options,{fade:true,mode:e,percent:e=="hide"?g:100,from:e=="hide"?i:{height:i.height*h,width:i.width*h}});a.effect("scale",b.options,b.duration,b.callback);a.dequeue()})};c.effects.scale=function(b){return this.queue(function(){var a=c(this),e=c.extend(true,{},b.options),g=c.effects.setMode(a,b.options.mode||"effect"),h=parseInt(b.options.percent,10)||(parseInt(b.options.percent,10)==0?0:g=="hide"?0:100),i=b.options.direction||"both",f=b.options.origin;if(g!="effect"){e.origin=f||["middle","center"];e.restore=true}f={height:a.height(),width:a.width()};a.from=b.options.from||(g=="show"?{height:0,width:0}:f);h={y:i!="horizontal"?h/100:1,x:i!="vertical"?h/100:1};a.to={height:f.height*h.y,width:f.width*h.x};if(b.options.fade){if(g=="show"){a.from.opacity=0;a.to.opacity=1}if(g=="hide"){a.from.opacity=1;a.to.opacity=0}}e.from=a.from;e.to=a.to;e.mode=g;a.effect("size",e,b.duration,b.callback);a.dequeue()})};c.effects.size=function(b){return this.queue(function(){var a=c(this),e=["position","top","left","width","height","overflow","opacity"],g=["position","top","left","overflow","opacity"],h=["width","height","overflow"],i=["fontSize"],f=["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"],k=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"],p=c.effects.setMode(a,b.options.mode||"effect"),n=b.options.restore||false,m=b.options.scale||"both",l=b.options.origin,j={height:a.height(),width:a.width()};a.from=b.options.from||j;a.to=b.options.to||j;if(l){l=c.effects.getBaseline(l,j);a.from.top=(j.height-a.from.height)*l.y;a.from.left=(j.width-a.from.width)*l.x;a.to.top=(j.height-a.to.height)*l.y;a.to.left=(j.width-a.to.width)*l.x}var d={from:{y:a.from.height/j.height,x:a.from.width/j.width},to:{y:a.to.height/j.height,x:a.to.width/j.width}};if(m=="box"||m=="both"){if(d.from.y!=d.to.y){e=e.concat(f);a.from=c.effects.setTransition(a,f,d.from.y,a.from);a.to=c.effects.setTransition(a,f,d.to.y,a.to)}if(d.from.x!=d.to.x){e=e.concat(k);a.from=c.effects.setTransition(a,k,d.from.x,a.from);a.to=c.effects.setTransition(a,k,d.to.x,a.to)}}if(m=="content"||m=="both")if(d.from.y!=d.to.y){e=e.concat(i);a.from=c.effects.setTransition(a,i,d.from.y,a.from);a.to=c.effects.setTransition(a,i,d.to.y,a.to)}c.effects.save(a,n?e:g);a.show();c.effects.createWrapper(a);a.css("overflow","hidden").css(a.from);if(m=="content"||m=="both"){f=f.concat(["marginTop","marginBottom"]).concat(i);k=k.concat(["marginLeft","marginRight"]);h=e.concat(f).concat(k);a.find("*[width]").each(function(){child=c(this);n&&c.effects.save(child,h);var o={height:child.height(),width:child.width()};child.from={height:o.height*d.from.y,width:o.width*d.from.x};child.to={height:o.height*d.to.y,width:o.width*d.to.x};if(d.from.y!=d.to.y){child.from=c.effects.setTransition(child,f,d.from.y,child.from);child.to=c.effects.setTransition(child,f,d.to.y,child.to)}if(d.from.x!=d.to.x){child.from=c.effects.setTransition(child,k,d.from.x,child.from);child.to=c.effects.setTransition(child,k,d.to.x,child.to)}child.css(child.from);child.animate(child.to,b.duration,b.options.easing,function(){n&&c.effects.restore(child,h)})})}a.animate(a.to,{queue:false,duration:b.duration,easing:b.options.easing,complete:function(){a.to.opacity===0&&a.css("opacity",a.from.opacity);p=="hide"&&a.hide();c.effects.restore(a,n?e:g);c.effects.removeWrapper(a);b.callback&&b.callback.apply(this,arguments);a.dequeue()}})})}})(jQuery);;(function(c){c.effects.slide=function(d){return this.queue(function(){var a=c(this),h=["position","top","left"],e=c.effects.setMode(a,d.options.mode||"show"),b=d.options.direction||"left";c.effects.save(a,h);a.show();c.effects.createWrapper(a).css({overflow:"hidden"});var f=b=="up"||b=="down"?"top":"left";b=b=="up"||b=="left"?"pos":"neg";var g=d.options.distance||(f=="top"?a.outerHeight({margin:true}):a.outerWidth({margin:true}));if(e=="show")a.css(f,b=="pos"?-g:g);var i={};i[f]=(e=="show"?b=="pos"?"+=":"-=":b=="pos"?"-=":"+=")+g;a.animate(i,{queue:false,duration:d.duration,easing:d.options.easing,complete:function(){e=="hide"&&a.hide();c.effects.restore(a,h);c.effects.removeWrapper(a);d.callback&&d.callback.apply(this,arguments);a.dequeue()}})})}})(jQuery);;(function(e){e.effects.transfer=function(a){return this.queue(function(){var b=e(this),c=e(a.options.to),d=c.offset();c={top:d.top,left:d.left,height:c.innerHeight(),width:c.innerWidth()};d=b.offset();var f=e('<div class="ui-effects-transfer"></div>').appendTo(document.body).addClass(a.options.className).css({top:d.top,left:d.left,height:b.innerHeight(),width:b.innerWidth(),position:"absolute"}).animate(c,a.duration,a.options.easing,function(){f.remove();a.callback&&a.callback.apply(b[0],arguments);b.dequeue()})})}})(jQuery);;
;;;;(function($){$.path={}
var V={rotate:function(p,degrees){var radians=degrees*3.141592654/180
var c=Math.cos(radians),s=Math.sin(radians)
return[c*p[0]-s*p[1],s*p[0]+c*p[1]]},scale:function(p,n){return[n*p[0],n*p[1]]},add:function(a,b){return[a[0]+b[0],a[1]+b[1]]},minus:function(a,b){return[a[0]-b[0],a[1]-b[1]]}}
$.path.bezier=function(params){params.start=$.extend({angle:0,length:0.3333},params.start)
params.end=$.extend({angle:0,length:0.3333},params.end)
this.p1=[params.start.x,params.start.y];this.p4=[params.end.x,params.end.y];var v14=V.minus(this.p4,this.p1)
var v12=V.scale(v14,params.start.length)
v12=V.rotate(v12,params.start.angle)
this.p2=V.add(this.p1,v12)
var v41=V.scale(v14,-1)
var v43=V.scale(v41,params.end.length)
v43=V.rotate(v43,params.end.angle)
this.p3=V.add(this.p4,v43)
this.f1=function(t){return(t*t*t);}
this.f2=function(t){return(3*t*t*(1-t));}
this.f3=function(t){return(3*t*(1-t)*(1-t));}
this.f4=function(t){return((1-t)*(1-t)*(1-t));}
this.css=function(p){var f1=this.f1(p),f2=this.f2(p),f3=this.f3(p),f4=this.f4(p)
var x=this.p1[0]*f1+this.p2[0]*f2+this.p3[0]*f3+this.p4[0]*f4;var y=this.p1[1]*f1+this.p2[1]*f2+this.p3[1]*f3+this.p4[1]*f4;return{top:y+"px",left:x+"px"}}}
$.path.arc=function(params){for(var i in params)
this[i]=params[i]
this.dir=this.dir||1
while(this.start>this.end&&this.dir>0)
this.start-=360
while(this.start<this.end&&this.dir<0)
this.start+=360
this.css=function(p){var a=this.start*(p)+this.end*(1-(p))
a=a*3.1415927/180
var x=Math.sin(a)*this.radius+this.center[0]
var y=Math.cos(a)*this.radius+this.center[1]
return{top:y+"px",left:x+"px"}}};$.fx.step.path=function(fx){var css=fx.end.css(1-fx.pos)
for(var i in css)
fx.elem.style[i]=css[i];}})(jQuery);
;;;
(function($){$.fn.wait=function(option,options){milli=1000;if(option&&(typeof option=='function'||isNaN(option))){options=option;}else if(option){milli=option;}
var defaults={msec:milli,onEnd:options},settings=$.extend({},defaults,options);if(typeof settings.onEnd=='function'){this.each(function(){setTimeout(settings.onEnd,settings.msec);});return this;}else{return this.queue('fx',function(){var self=this;setTimeout(function(){$.dequeue(self);},settings.msec);});}}})(jQuery);
;;;
(function($,h,c){var a=$([]),e=$.resize=$.extend($.resize,{}),i,k="setTimeout",j="resize",d=j+"-special-event",b="delay",f="throttleWindow";e[b]=250;e[f]=true;$.event.special[j]={setup:function(){if(!e[f]&&this[k]){return false}var l=$(this);a=a.add(l);$.data(this,d,{w:l.width(),h:l.height()});if(a.length===1){g()}},teardown:function(){if(!e[f]&&this[k]){return false}var l=$(this);a=a.not(l);l.removeData(d);if(!a.length){clearTimeout(i)}},add:function(l){if(!e[f]&&this[k]){return false}var n;function m(s,o,p){var q=$(this),r=$.data(this,d);r.w=o!==c?o:q.width();r.h=p!==c?p:q.height();n.apply(this,arguments)}if($.isFunction(l)){n=l;return m}else{n=l.handler;l.handler=m}}};function g(){i=h[k](function(){a.each(function(){var n=$(this),m=n.width(),l=n.height(),o=$.data(this,d);if(m!==o.w||l!==o.h){n.trigger(j,[o.w=m,o.h=l])}});g()},e[b])}})(jQuery,this);
;;;
(function($){var methods={init:function(newOptions){var self=this;var options=$.extend({},$.fn.contentscroller.defaults,newOptions);var styleExists=false;for(var i=0;i<document.styleSheets.length;i++){if(document.styleSheets[i].title==="contentscroller"){styleExists=true;break;}}
if(!styleExists){$("<style title='contentscroller' type='text/css'> .contentscroller { overflow:hidden; } </style>").appendTo("head");}
this.each(function(){var element=this;var $element=$(element);var data=$element.data("contentscroller");if(!data){$element.addClass("contentscroller");$element.data("contentscroller",{options:options,windowWidth:0,scrollX:0,scrollMagnitude:0,scrollMin:0,scrollMax:0,scrollInterval:null,resizeHandlerFn:null});data=$element.data('contentscroller');data.resizeHandlerFn=resizeHandler.bind(self,$element);$(window).bind("resize.contentscroller",data.resizeHandlerFn);$element.bind("mousemove.contentscroller",mousemoveHandler.bind(self,$element));data.resizeHandlerFn();data.scrollX=-((options.contentWidth-data.windowWidth)*0.5);}});return this.contentscroller("resume");},destroy:function(){this.contentscroller("pause");return this.each(function(){var element=this;var $element=$(element);var data=$element.data('contentscroller');var options=data.options;$(window).unbind("resize.contentscroller");$element.unbind("mousemove.contentscroller");$element.removeClass("contentscroller");$element.removeData("contentscroller");});},pause:function(){return this.each(function(){var element=this;var $element=$(element);var data=$element.data('contentscroller');var options=data.options;window.clearInterval(data.scrollInterval)});},resume:function(){return this.each(function(){var element=this;var $element=$(element);var data=$element.data('contentscroller');var options=data.options;window.clearInterval(data.scrollInterval)
data.scrollInterval=window.setInterval(scrollInterval.bind(self,$element),options.frameRate);});}};$.fn.contentscroller=function(method){if(methods[method]){return methods[method].apply(this,Array.prototype.slice.call(arguments,1));}else if(typeof method==='object'||!method){return methods.init.apply(this,arguments);}else{$.error('Method '+method+' does not exist on jQuery.contentscroller');}};$.fn.contentscroller.defaults={contentWidth:1000,frameRate:16,scrollSpeed:0.4,scrollDeadZonePercent:0.35};function resizeHandler(element,e){var $element=$(element);var data=$element.data("contentscroller");var options=data.options;var windowWidth=$(window).width()-4;if(windowWidth<0){windowWidth=0;}
data.scrollMin=0;data.scrollMax=0;if(windowWidth>options.contentWidth){data.scrollMax=-((options.contentWidth-windowWidth)*0.5);data.scrollMin=data.scrollMax;}
else{data.scrollMax=0;data.scrollMin=-(options.contentWidth-windowWidth);}
$element.css("width",windowWidth);data.windowWidth=windowWidth;}
function mousemoveHandler(element,e){var $element=$(element);var data=$element.data("contentscroller");var options=data.options;var mouseLocationX=e.clientX;var centerX=data.windowWidth*0.5;var deadZone=data.windowWidth*options.scrollDeadZonePercent;if(mouseLocationX<centerX-deadZone){data.scrollMagnitude=-(options.scrollSpeed*(mouseLocationX-centerX+deadZone));}
else if(mouseLocationX>centerX+deadZone){data.scrollMagnitude=-(options.scrollSpeed*(mouseLocationX-centerX-deadZone));}
else{data.scrollMagnitude=0;}}
function scrollInterval(element){var $element=$(element);var data=$element.data("contentscroller");var options=data.options;data.scrollX+=data.scrollMagnitude;if(data.scrollX<data.scrollMin){data.scrollX=data.scrollMin;}
if(data.scrollX>data.scrollMax){data.scrollX=data.scrollMax;}
options.content.css("left",data.scrollX);}})(jQuery);
;;;
if(!window.Silverlight)window.Silverlight={};Silverlight._silverlightCount=0;Silverlight.__onSilverlightInstalledCalled=false;Silverlight.fwlinkRoot="http://go2.microsoft.com/fwlink/?LinkID=";Silverlight.__installationEventFired=false;Silverlight.onGetSilverlight=null;Silverlight.onSilverlightInstalled=function(){window.location.reload(false)};Silverlight.isInstalled=function(b){if(b==undefined)b=null;var a=false,m=null;try{var i=null,j=false;if(window.ActiveXObject)try{i=new ActiveXObject("AgControl.AgControl");if(b===null)a=true;else if(i.IsVersionSupported(b))a=true;i=null}catch(l){j=true}else j=true;if(j){var k=navigator.plugins["Silverlight Plug-In"];if(k)if(b===null)a=true;else{var h=k.description;if(h==="1.0.30226.2")h="2.0.30226.2";var c=h.split(".");while(c.length>3)c.pop();while(c.length<4)c.push(0);var e=b.split(".");while(e.length>4)e.pop();var d,g,f=0;do{d=parseInt(e[f]);g=parseInt(c[f]);f++}while(f<e.length&&d===g);if(d<=g&&!isNaN(d))a=true}}}catch(l){a=false}return a};Silverlight.WaitForInstallCompletion=function(){if(!Silverlight.isBrowserRestartRequired&&Silverlight.onSilverlightInstalled){try{navigator.plugins.refresh()}catch(a){}if(Silverlight.isInstalled(null)&&!Silverlight.__onSilverlightInstalledCalled){Silverlight.onSilverlightInstalled();Silverlight.__onSilverlightInstalledCalled=true}else setTimeout(Silverlight.WaitForInstallCompletion,3e3)}};Silverlight.__startup=function(){navigator.plugins.refresh();Silverlight.isBrowserRestartRequired=Silverlight.isInstalled(null);if(!Silverlight.isBrowserRestartRequired){Silverlight.WaitForInstallCompletion();if(!Silverlight.__installationEventFired){Silverlight.onInstallRequired();Silverlight.__installationEventFired=true}}else if(window.navigator.mimeTypes){var b=navigator.mimeTypes["application/x-silverlight-2"],c=navigator.mimeTypes["application/x-silverlight-2-b2"],d=navigator.mimeTypes["application/x-silverlight-2-b1"],a=d;if(c)a=c;if(!b&&(d||c)){if(!Silverlight.__installationEventFired){Silverlight.onUpgradeRequired();Silverlight.__installationEventFired=true}}else if(b&&a)if(b.enabledPlugin&&a.enabledPlugin)if(b.enabledPlugin.description!=a.enabledPlugin.description)if(!Silverlight.__installationEventFired){Silverlight.onRestartRequired();Silverlight.__installationEventFired=true}}if(!Silverlight.disableAutoStartup)if(window.removeEventListener)window.removeEventListener("load",Silverlight.__startup,false);else window.detachEvent("onload",Silverlight.__startup)};if(!Silverlight.disableAutoStartup)if(window.addEventListener)window.addEventListener("load",Silverlight.__startup,false);else window.attachEvent("onload",Silverlight.__startup);Silverlight.createObject=function(m,f,e,k,l,h,j){var d={},a=k,c=l;d.version=a.version;a.source=m;d.alt=a.alt;if(h)a.initParams=h;if(a.isWindowless&&!a.windowless)a.windowless=a.isWindowless;if(a.framerate&&!a.maxFramerate)a.maxFramerate=a.framerate;if(e&&!a.id)a.id=e;delete a.ignoreBrowserVer;delete a.inplaceInstallPrompt;delete a.version;delete a.isWindowless;delete a.framerate;delete a.data;delete a.src;delete a.alt;if(Silverlight.isInstalled(d.version)){for(var b in c)if(c[b]){if(b=="onLoad"&&typeof c[b]=="function"&&c[b].length!=1){var i=c[b];c[b]=function(a){return i(document.getElementById(e),j,a)}}var g=Silverlight.__getHandlerName(c[b]);if(g!=null){a[b]=g;c[b]=null}else throw"typeof events."+b+" must be 'function' or 'string'";}slPluginHTML=Silverlight.buildHTML(a)}else slPluginHTML=Silverlight.buildPromptHTML(d);if(f)f.innerHTML=slPluginHTML;else return slPluginHTML};Silverlight.buildHTML=function(a){var b=[];b.push('<object type="application/x-silverlight" data="data:application/x-silverlight,"');if(a.id!=null)b.push(' id="'+Silverlight.HtmlAttributeEncode(a.id)+'"');if(a.width!=null)b.push(' width="'+a.width+'"');if(a.height!=null)b.push(' height="'+a.height+'"');b.push(" >");delete a.id;delete a.width;delete a.height;for(var c in a)if(a[c])b.push('<param name="'+Silverlight.HtmlAttributeEncode(c)+'" value="'+Silverlight.HtmlAttributeEncode(a[c])+'" />');b.push("</object>");return b.join("")};Silverlight.createObjectEx=function(b){var a=b,c=Silverlight.createObject(a.source,a.parentElement,a.id,a.properties,a.events,a.initParams,a.context);if(a.parentElement==null)return c};Silverlight.buildPromptHTML=function(b){var a="",d=Silverlight.fwlinkRoot,c=b.version;if(b.alt)a=b.alt;else{if(!c)c="";a="<a href='javascript:Silverlight.getSilverlight(\"{1}\");' style='text-decoration: none;'><img src='{2}' alt='Get Microsoft Silverlight' style='border-style: none'/></a>";a=a.replace("{1}",c);a=a.replace("{2}",d+"108181")}return a};Silverlight.getSilverlight=function(e){if(Silverlight.onGetSilverlight)Silverlight.onGetSilverlight();var b="",a=String(e).split(".");if(a.length>1){var c=parseInt(a[0]);if(isNaN(c)||c<2)b="1.0";else b=a[0]+"."+a[1]}var d="";if(b.match(/^\d+\056\d+$/))d="&v="+b;Silverlight.followFWLink("149156"+d)};Silverlight.followFWLink=function(a){top.location=Silverlight.fwlinkRoot+String(a)};Silverlight.HtmlAttributeEncode=function(c){var a,b="";if(c==null)return null;for(var d=0;d<c.length;d++){a=c.charCodeAt(d);if(a>96&&a<123||a>64&&a<91||a>43&&a<58&&a!=47||a==95)b=b+String.fromCharCode(a);else b=b+"&#"+a+";"}return b};Silverlight.default_error_handler=function(e,b){var d,c=b.ErrorType;d=b.ErrorCode;var a="\nSilverlight error message     \n";a+="ErrorCode: "+d+"\n";a+="ErrorType: "+c+"       \n";a+="Message: "+b.ErrorMessage+"     \n";if(c=="ParserError"){a+="XamlFile: "+b.xamlFile+"     \n";a+="Line: "+b.lineNumber+"     \n";a+="Position: "+b.charPosition+"     \n"}else if(c=="RuntimeError"){if(b.lineNumber!=0){a+="Line: "+b.lineNumber+"     \n";a+="Position: "+b.charPosition+"     \n"}a+="MethodName: "+b.methodName+"     \n"}alert(a)};Silverlight.__cleanup=function(){for(var a=Silverlight._silverlightCount-1;a>=0;a--)window["__slEvent"+a]=null;Silverlight._silverlightCount=0;if(window.removeEventListener)window.removeEventListener("unload",Silverlight.__cleanup,false);else window.detachEvent("onunload",Silverlight.__cleanup)};Silverlight.__getHandlerName=function(b){var a="";if(typeof b=="string")a=b;else if(typeof b=="function"){if(Silverlight._silverlightCount==0)if(window.addEventListener)window.addEventListener("onunload",Silverlight.__cleanup,false);else window.attachEvent("onunload",Silverlight.__cleanup);var c=Silverlight._silverlightCount++;a="__slEvent"+c;window[a]=b}else a=null;return a};Silverlight.onRequiredVersionAvailable=function(){};Silverlight.onRestartRequired=function(){};Silverlight.onUpgradeRequired=function(){};Silverlight.onInstallRequired=function(){};Silverlight.IsVersionAvailableOnError=function(d,a){var b=false;try{if(a.ErrorCode==8001&&!Silverlight.__installationEventFired){Silverlight.onUpgradeRequired();Silverlight.__installationEventFired=true}else if(a.ErrorCode==8002&&!Silverlight.__installationEventFired){Silverlight.onRestartRequired();Silverlight.__installationEventFired=true}else if(a.ErrorCode==5014||a.ErrorCode==2106){if(Silverlight.__verifySilverlight2UpgradeSuccess(a.getHost()))b=true}else b=true}catch(c){}return b};Silverlight.IsVersionAvailableOnLoad=function(b){var a=false;try{if(Silverlight.__verifySilverlight2UpgradeSuccess(b.getHost()))a=true}catch(c){}return a};Silverlight.__verifySilverlight2UpgradeSuccess=function(d){var c=false,b="2.0.31005",a=null;try{if(d.IsVersionSupported(b+".99")){a=Silverlight.onRequiredVersionAvailable;c=true}else if(d.IsVersionSupported(b+".0"))a=Silverlight.onRestartRequired;else a=Silverlight.onUpgradeRequired;if(a&&!Silverlight.__installationEventFired){a();Silverlight.__installationEventFired=true}}catch(e){}return c}
;;;
window.Modernizr=(function(window,doc,undefined){var version='1.5',ret={},enableHTML5=true,docElement=doc.documentElement,mod='modernizr',m=doc.createElement(mod),m_style=m.style,f=doc.createElement('input'),canvas='canvas',canvastext='canvastext',rgba='rgba',hsla='hsla',multiplebgs='multiplebgs',backgroundsize='backgroundsize',borderimage='borderimage',borderradius='borderradius',boxshadow='boxshadow',opacity='opacity',cssanimations='cssanimations',csscolumns='csscolumns',cssgradients='cssgradients',cssreflections='cssreflections',csstransforms='csstransforms',csstransforms3d='csstransforms3d',csstransitions='csstransitions',fontface='fontface',geolocation='geolocation',video='video',audio='audio',input='input',inputtypes=input+'types',svg='svg',smil='smil',svgclippaths=svg+'clippaths',background='background',backgroundColor=background+'Color',canPlayType='canPlayType',localstorage='localStorage',sessionstorage='sessionStorage',applicationcache='applicationCache',webWorkers='webworkers',hashchange='hashchange',crosswindowmessaging='crosswindowmessaging',historymanagement='historymanagement',draganddrop='draganddrop',websqldatabase='websqldatabase',indexedDB='indexedDB',websockets='websockets',smile=':)',tostring=Object.prototype.toString,prefixes=' -o- -moz- -ms- -webkit- -khtml- '.split(' '),tests={},inputs={},attrs={},classes=[],isEventSupported=(function(){var TAGNAMES={'select':'input','change':'input','submit':'form','reset':'form','error':'img','load':'img','abort':'img'}
function isEventSupported(eventName,element){element=element||document.createElement(TAGNAMES[eventName]||'div');eventName='on'+eventName;var isSupported=(eventName in element);if(!isSupported){if(!element.setAttribute){element=document.createElement('div');}
if(element.setAttribute&&element.removeAttribute){element.setAttribute(eventName,'');isSupported=typeof element[eventName]=='function';if(typeof element[eventName]!='undefined'){element[eventName]=void 0;}
element.removeAttribute(eventName);}}
element=null;return isSupported;}
return isEventSupported;})();var _hasOwnProperty=({}).hasOwnProperty,hasOwnProperty;if(typeof _hasOwnProperty!=='undefined'&&typeof _hasOwnProperty.call!=='undefined'){hasOwnProperty=function(object,property){return _hasOwnProperty.call(object,property);};}
else{hasOwnProperty=function(object,property){return((property in object)&&typeof object.constructor.prototype[property]==='undefined');};}
function set_css(str){m_style.cssText=str;}
function set_css_all(str1,str2){return set_css(prefixes.join(str1+';')+(str2||''));}
function contains(str,substr){return(''+str).indexOf(substr)!==-1;}
function test_props(props,callback){for(var i in props){try{m_style[props[i]]!==undefined}catch(e){continue;}
if(m_style[props[i]]!==undefined&&(!callback||callback(props[i],m))){return true;}}}
function test_props_all(prop,callback){var uc_prop=prop.charAt(0).toUpperCase()+prop.substr(1),props=[prop,'Webkit'+uc_prop,'Moz'+uc_prop,'O'+uc_prop,'ms'+uc_prop,'Khtml'+uc_prop];return!!test_props(props,callback);}
tests[canvas]=function(){var elem=doc.createElement(canvas);return!!(elem.getContext&&elem.getContext('2d'));};tests[canvastext]=function(){return!!(ret[canvas]&&typeof doc.createElement(canvas).getContext('2d').fillText=='function');};tests[geolocation]=function(){return!!navigator.geolocation;};tests[crosswindowmessaging]=function(){return!!window.postMessage;};tests[websqldatabase]=function(){var result=!!window.openDatabase;if(result){try{result=!!openDatabase(mod+"testdb","1.0",mod+"testdb",2e4);}catch(e){result=false;}}
return result;};tests[indexedDB]=function(){return!!window[indexedDB];};tests[hashchange]=function(){return isEventSupported(hashchange,window)&&(document.documentMode===undefined||document.documentMode>7);};tests[historymanagement]=function(){return!!(window.history&&history.pushState);};tests[draganddrop]=function(){return isEventSupported('drag')&&isEventSupported('dragstart')&&isEventSupported('dragenter')&&isEventSupported('dragover')&&isEventSupported('dragleave')&&isEventSupported('dragend')&&isEventSupported('drop');};tests[websockets]=function(){return('WebSocket'in window);};tests[rgba]=function(){set_css(background+'-color:rgba(150,255,150,.5)');return contains(m_style[backgroundColor],rgba);};tests[hsla]=function(){set_css(background+'-color:hsla(120,40%,100%,.5)');return contains(m_style[backgroundColor],rgba)||contains(m_style[backgroundColor],hsla);};tests[multiplebgs]=function(){set_css(background+':url(//:),url(//:),red url(//:)');return new RegExp("(url\\s*\\(.*?){3}").test(m_style[background]);};tests[backgroundsize]=function(){return test_props_all(background+'Size');};tests[borderimage]=function(){return test_props_all('borderImage');};tests[borderradius]=function(){return test_props_all('borderRadius','',function(prop){return contains(prop,'orderRadius');});};tests[boxshadow]=function(){return test_props_all('boxShadow');};tests[opacity]=function(){set_css_all('opacity:.5');return contains(m_style[opacity],'0.5');};tests[cssanimations]=function(){return test_props_all('animationName');};tests[csscolumns]=function(){return test_props_all('columnCount');};tests[cssgradients]=function(){var str1=background+'-image:',str2='gradient(linear,left top,right bottom,from(#9f9),to(white));',str3='linear-gradient(left top,#9f9, white);';set_css((str1+prefixes.join(str2+str1)+prefixes.join(str3+str1)).slice(0,-str1.length));return contains(m_style.backgroundImage,'gradient');};tests[cssreflections]=function(){return test_props_all('boxReflect');};tests[csstransforms]=function(){return!!test_props(['transformProperty','WebkitTransform','MozTransform','OTransform','msTransform']);};tests[csstransforms3d]=function(){var ret=!!test_props(['perspectiveProperty','WebkitPerspective','MozPerspective','OPerspective','msPerspective']);if(ret){var st=document.createElement('style'),div=doc.createElement('div');st.textContent='@media ('+prefixes.join('transform-3d),(')+'modernizr){#modernizr{height:3px}}';doc.getElementsByTagName('head')[0].appendChild(st);div.id='modernizr';docElement.appendChild(div);ret=div.offsetHeight===3;st.parentNode.removeChild(st);div.parentNode.removeChild(div);}
return ret;};tests[csstransitions]=function(){return test_props_all('transitionProperty');};tests[fontface]=function(){var
sheet,style,result,head=doc.head||doc.getElementsByTagName('head')[0]||docElement,impl=doc.implementation||{hasFeature:function(){return false;}},style=doc.createElement("style");style.type='text/css';head.insertBefore(style,head.firstChild);sheet=style.sheet||style.styleSheet;var supportAtRule=impl.hasFeature('CSS2','')?function(rule){if(!(sheet&&rule))return false;var result=false;try{sheet.insertRule(rule,0);result=!(/unknown/i).test(sheet.cssRules[0].cssText);sheet.deleteRule(sheet.cssRules.length-1);}catch(e){}
return result;}:function(rule){if(!(sheet&&rule))return false;sheet.cssText=rule;return sheet.cssText.length!==0&&!(/unknown/i).test(sheet.cssText)&&sheet.cssText.replace(/\r+|\n+/g,'').indexOf(rule.split(' ')[0])===0;};ret._fontfaceready=function(fn){fn(ret[fontface]);};return supportAtRule('@font-face { font-family: "font"; src: "font.ttf"; }');};tests[video]=function(){var elem=doc.createElement(video),bool=!!elem[canPlayType];if(bool){bool=new Boolean(bool);bool.ogg=elem[canPlayType]('video/ogg; codecs="theora"');bool.h264=elem[canPlayType]('video/mp4; codecs="avc1.42E01E"');bool.webm=elem[canPlayType]('video/webm; codecs="vp8, vorbis"');}
return bool;};tests[audio]=function(){var elem=doc.createElement(audio),bool=!!elem[canPlayType];if(bool){bool=new Boolean(bool);bool.ogg=elem[canPlayType]('audio/ogg; codecs="vorbis"');bool.mp3=elem[canPlayType]('audio/mpeg;');bool.wav=elem[canPlayType]('audio/wav; codecs="1"');bool.m4a=elem[canPlayType]('audio/x-m4a;')||elem[canPlayType]('audio/aac;');}
return bool;};tests[localstorage]=function(){try{return('localStorage'in window)&&window[localstorage]!==null;}catch(e){return false;}};tests[sessionstorage]=function(){try{return('sessionStorage'in window)&&window[sessionstorage]!==null;}catch(e){return false;}};tests[webWorkers]=function(){return!!window.Worker;};tests[applicationcache]=function(){var cache=window[applicationcache];return!!(cache&&(typeof cache.status!='undefined')&&(typeof cache.update=='function')&&(typeof cache.swapCache=='function'));};tests[svg]=function(){return!!doc.createElementNS&&!!doc.createElementNS("http://www.w3.org/2000/svg","svg").createSVGRect;};tests[smil]=function(){return!!doc.createElementNS&&/SVG/.test(tostring.call(doc.createElementNS('http://www.w3.org/2000/svg','animate')));};tests[svgclippaths]=function(){return!!doc.createElementNS&&/SVG/.test(tostring.call(doc.createElementNS('http://www.w3.org/2000/svg','clipPath')));};function webforms(){ret[input]=(function(props){for(var i=0,len=props.length;i<len;i++){attrs[props[i]]=!!(props[i]in f);}
return attrs;})('autocomplete autofocus list placeholder max min multiple pattern required step'.split(' '));ret[inputtypes]=(function(props){for(var i=0,bool,len=props.length;i<len;i++){f.setAttribute('type',props[i]);bool=f.type!=='text';if(bool){f.value=smile;if(/^range$/.test(f.type)&&f.style.WebkitAppearance!==undefined){docElement.appendChild(f);bool=doc.defaultView.getComputedStyle&&doc.defaultView.getComputedStyle(f,null).WebkitAppearance!=='textfield'&&(f.offsetHeight!==0);docElement.removeChild(f);}else if(/^(search|tel)$/.test(f.type)){}else if(/^(url|email)$/.test(f.type)){bool=f.checkValidity&&f.checkValidity()===false;}else{bool=f.value!=smile;}}
inputs[props[i]]=!!bool;}
return inputs;})('search tel url email datetime date month week time datetime-local number range color'.split(' '));}
for(var feature in tests){if(hasOwnProperty(tests,feature)){classes.push(((ret[feature.toLowerCase()]=tests[feature]())?'':'no-')+feature.toLowerCase());}}
if(!ret[input])webforms();ret.addTest=function(feature,test){feature=feature.toLowerCase();if(ret[feature]){return;}
test=!!(test());docElement.className+=' '+(test?'':'no-')+feature;ret[feature]=test;return ret;};set_css('');m=f=null;if(enableHTML5&&(function(){var elem=doc.createElement("div");elem.innerHTML="<elem></elem>";return elem.childNodes.length!==1;})()){(function(p,e){function q(a,b){if(g[a])g[a].styleSheet.cssText+=b;else{var c=r[l],d=e[j]("style");d.media=a;c.insertBefore(d,c[l]);g[a]=d;q(a,b)}}function s(a,b){for(var c=new RegExp("\\b("+m+")\\b(?!.*[;}])","gi"),d=function(k){return".iepp_"+k},h=-1;++h<a.length;){b=a[h].media||b;s(a[h].imports,b);q(b,a[h].cssText.replace(c,d))}}function t(){for(var a,b=e.getElementsByTagName("*"),c,d,h=new RegExp("^"+m+"$","i"),k=-1;++k<b.length;)if((a=b[k])&&(d=a.nodeName.match(h))){c=new RegExp("^\\s*<"+d+"(.*)\\/"+d+">\\s*$","i");i.innerHTML=a.outerHTML.replace(/\r|\n/g," ").replace(c,a.currentStyle.display=="block"?"<div$1/div>":"<span$1/span>");c=i.childNodes[0];c.className+=" iepp_"+d;c=f[f.length]=[a,c];a.parentNode.replaceChild(c[1],c[0])}s(e.styleSheets,"all")}function u(){for(var a=-1,b;++a<f.length;)f[a][1].parentNode.replaceChild(f[a][0],f[a][1]);for(b in g)r[l].removeChild(g[b]);g={};f=[]}for(var r=e.documentElement,i=e.createDocumentFragment(),g={},m="abbr|article|aside|audio|canvas|command|datalist|details|figure|figcaption|footer|header|hgroup|keygen|mark|meter|nav|output|progress|section|source|summary|time|video",n=m.split("|"),f=[],o=-1,l="firstChild",j="createElement";++o<n.length;){e[j](n[o]);i[j](n[o])}i=i.appendChild(e[j]("div"));p.attachEvent("onbeforeprint",t);p.attachEvent("onafterprint",u)})(this,doc);}
ret._enableHTML5=enableHTML5;ret._version=version;docElement.className=docElement.className.replace(/\bno-js\b/,'')+' js';docElement.className+=' '+classes.join(' ');return ret;})(this,this.document);
;;;
(function($){var types=['DOMMouseScroll','mousewheel'];$.event.special.mousewheel={setup:function(){if(this.addEventListener){for(var i=types.length;i;){this.addEventListener(types[--i],handler,false);}}else{this.onmousewheel=handler;}},teardown:function(){if(this.removeEventListener){for(var i=types.length;i;){this.removeEventListener(types[--i],handler,false);}}else{this.onmousewheel=null;}}};$.fn.extend({mousewheel:function(fn){return fn?this.bind("mousewheel",fn):this.trigger("mousewheel");},unmousewheel:function(fn){return this.unbind("mousewheel",fn);}});function handler(event){var orgEvent=event||window.event,args=[].slice.call(arguments,1),delta=0,returnValue=true,deltaX=0,deltaY=0;event=$.event.fix(orgEvent);event.type="mousewheel";if(event.wheelDelta){delta=event.wheelDelta/120;}
if(event.detail){delta=-event.detail/3;}
deltaY=delta;if(orgEvent.axis!==undefined&&orgEvent.axis===orgEvent.HORIZONTAL_AXIS){deltaY=0;deltaX=-1*delta;}
if(orgEvent.wheelDeltaY!==undefined){deltaY=orgEvent.wheelDeltaY/120;}
if(orgEvent.wheelDeltaX!==undefined){deltaX=-1*orgEvent.wheelDeltaX/120;}
args.unshift(event,delta,deltaX,deltaY);return $.event.handle.apply(this,args);}})(jQuery);
;;;
(function(b,a,c){b.fn.jScrollPane=function(f){function d(D,N){var ay,P=this,X,aj,w,al,S,Y,z,r,az,aE,au,j,I,i,k,Z,T,ap,W,u,B,aq,ae,am,G,m,at,ax,y,av,aH,g,K,ai=true,O=true,aG=false,l=false,ao=D.clone(false,false).empty(),ab=b.fn.mwheelIntent?"mwheelIntent.jsp":"mousewheel.jsp";aH=D.css("paddingTop")+" "+D.css("paddingRight")+" "+D.css("paddingBottom")+" "+D.css("paddingLeft");g=(parseInt(D.css("paddingLeft"),10)||0)+(parseInt(D.css("paddingRight"),10)||0);function ar(aQ){var aO,aP,aK,aM,aL,aJ,aI,aN;ay=aQ;if(X===c){aI=D.scrollTop();aN=D.scrollLeft();D.css({overflow:"hidden",padding:0});aj=D.innerWidth()+g;w=D.innerHeight();D.width(aj);X=b('<div class="jspPane" />').css("padding",aH).append(D.children());al=b('<div class="jspContainer" />').css({width:aj+"px",height:w+"px"}).append(X).appendTo(D)}else{D.css("width","");aJ=D.innerWidth()+g!=aj||D.outerHeight()!=w;if(aJ){aj=D.innerWidth()+g;w=D.innerHeight();al.css({width:aj+"px",height:w+"px"})}if(!aJ&&K==S&&X.outerHeight()==Y){D.width(aj);return}K=S;X.css("width","");D.width(aj);al.find(">.jspVerticalBar,>.jspHorizontalBar").remove().end()}aO=X.clone(false,false).css("position","absolute");aP=b('<div style="width:1px; position: relative;" />').append(aO);b("body").append(aP);S=Math.max(X.outerWidth(),aO.outerWidth());aP.remove();Y=X.outerHeight();z=S/aj;r=Y/w;az=r>1;aE=z>1;if(!(aE||az)){D.removeClass("jspScrollable");X.css({top:0,width:al.width()-g});o();E();Q();x();ah()}else{D.addClass("jspScrollable");aK=ay.maintainPosition&&(I||Z);if(aK){aM=aC();aL=aA()}aF();A();F();if(aK){M(aM,false);L(aL,false)}J();af();an();if(ay.enableKeyboardNavigation){R()}if(ay.clickOnTrack){q()}C();if(ay.hijackInternalLinks){n()}}if(ay.autoReinitialise&&!av){av=setInterval(function(){ar(ay)},ay.autoReinitialiseDelay)}else{if(!ay.autoReinitialise&&av){clearInterval(av)}}aI&&D.scrollTop(0)&&L(aI,false);aN&&D.scrollLeft(0)&&M(aN,false);D.trigger("jsp-initialised",[aE||az])}function aF(){if(az){al.append(b('<div class="jspVerticalBar" />').append(b('<div class="jspCap jspCapTop" />'),b('<div class="jspTrack" />').append(b('<div class="jspDrag" />').append(b('<div class="jspDragTop" />'),b('<div class="jspDragBottom" />'))),b('<div class="jspCap jspCapBottom" />')));T=al.find(">.jspVerticalBar");ap=T.find(">.jspTrack");au=ap.find(">.jspDrag");if(ay.showArrows){aq=b('<a class="jspArrow jspArrowUp" />').bind("mousedown.jsp",aD(0,-1)).bind("click.jsp",aB);ae=b('<a class="jspArrow jspArrowDown" />').bind("mousedown.jsp",aD(0,1)).bind("click.jsp",aB);if(ay.arrowScrollOnHover){aq.bind("mouseover.jsp",aD(0,-1,aq));ae.bind("mouseover.jsp",aD(0,1,ae))}ak(ap,ay.verticalArrowPositions,aq,ae)}u=w;al.find(">.jspVerticalBar>.jspCap:visible,>.jspVerticalBar>.jspArrow").each(function(){u-=b(this).outerHeight()});au.hover(function(){au.addClass("jspHover")},function(){au.removeClass("jspHover")}).bind("mousedown.jsp",function(aI){b("html").bind("dragstart.jsp selectstart.jsp",aB);au.addClass("jspActive");var s=aI.pageY-au.position().top;b("html").bind("mousemove.jsp",function(aJ){U(aJ.pageY-s,false)}).bind("mouseup.jsp mouseleave.jsp",aw);return false});p()}}function p(){ap.height(u+"px");I=0;W=ay.verticalGutter+ap.outerWidth();X.width(aj-W-g);if(T.position().left===0){X.css("margin-left",W+"px")}}function A(){if(aE){al.append(b('<div class="jspHorizontalBar" />').append(b('<div class="jspCap jspCapLeft" />'),b('<div class="jspTrack" />').append(b('<div class="jspDrag" />').append(b('<div class="jspDragLeft" />'),b('<div class="jspDragRight" />'))),b('<div class="jspCap jspCapRight" />')));am=al.find(">.jspHorizontalBar");G=am.find(">.jspTrack");i=G.find(">.jspDrag");if(ay.showArrows){ax=b('<a class="jspArrow jspArrowLeft" />').bind("mousedown.jsp",aD(-1,0)).bind("click.jsp",aB);y=b('<a class="jspArrow jspArrowRight" />').bind("mousedown.jsp",aD(1,0)).bind("click.jsp",aB);if(ay.arrowScrollOnHover){ax.bind("mouseover.jsp",aD(-1,0,ax));y.bind("mouseover.jsp",aD(1,0,y))}ak(G,ay.horizontalArrowPositions,ax,y)}i.hover(function(){i.addClass("jspHover")},function(){i.removeClass("jspHover")}).bind("mousedown.jsp",function(aI){b("html").bind("dragstart.jsp selectstart.jsp",aB);i.addClass("jspActive");var s=aI.pageX-i.position().left;b("html").bind("mousemove.jsp",function(aJ){V(aJ.pageX-s,false)}).bind("mouseup.jsp mouseleave.jsp",aw);return false});m=al.innerWidth();ag()}}function ag(){al.find(">.jspHorizontalBar>.jspCap:visible,>.jspHorizontalBar>.jspArrow").each(function(){m-=b(this).outerWidth()});G.width(m+"px");Z=0}function F(){if(aE&&az){var aI=G.outerHeight(),s=ap.outerWidth();u-=aI;b(am).find(">.jspCap:visible,>.jspArrow").each(function(){m+=b(this).outerWidth()});m-=s;w-=s;aj-=aI;G.parent().append(b('<div class="jspCorner" />').css("width",aI+"px"));p();ag()}if(aE){X.width((al.outerWidth()-g)+"px")}Y=X.outerHeight();r=Y/w;if(aE){at=Math.ceil(1/z*m);if(at>ay.horizontalDragMaxWidth){at=ay.horizontalDragMaxWidth}else{if(at<ay.horizontalDragMinWidth){at=ay.horizontalDragMinWidth}}i.width(at+"px");k=m-at;ad(Z)}if(az){B=Math.ceil(1/r*u);if(B>ay.verticalDragMaxHeight){B=ay.verticalDragMaxHeight}else{if(B<ay.verticalDragMinHeight){B=ay.verticalDragMinHeight}}au.height(B+"px");j=u-B;ac(I)}}function ak(aJ,aL,aI,s){var aN="before",aK="after",aM;if(aL=="os"){aL=/Mac/.test(navigator.platform)?"after":"split"}if(aL==aN){aK=aL}else{if(aL==aK){aN=aL;aM=aI;aI=s;s=aM}}aJ[aN](aI)[aK](s)}function aD(aI,s,aJ){return function(){H(aI,s,this,aJ);this.blur();return false}}function H(aL,aK,aO,aN){aO=b(aO).addClass("jspActive");var aM,aJ,aI=true,s=function(){if(aL!==0){P.scrollByX(aL*ay.arrowButtonSpeed)}if(aK!==0){P.scrollByY(aK*ay.arrowButtonSpeed)}aJ=setTimeout(s,aI?ay.initialDelay:ay.arrowRepeatFreq);aI=false};s();aM=aN?"mouseout.jsp":"mouseup.jsp";aN=aN||b("html");aN.bind(aM,function(){aO.removeClass("jspActive");aJ&&clearTimeout(aJ);aJ=null;aN.unbind(aM)})}function q(){x();if(az){ap.bind("mousedown.jsp",function(aN){if(aN.originalTarget===c||aN.originalTarget==aN.currentTarget){var aL=b(this),aO=aL.offset(),aM=aN.pageY-aO.top-I,aJ,aI=true,s=function(){var aR=aL.offset(),aS=aN.pageY-aR.top-B/2,aP=w*ay.scrollPagePercent,aQ=j*aP/(Y-w);if(aM<0){if(I-aQ>aS){P.scrollByY(-aP)}else{U(aS)}}else{if(aM>0){if(I+aQ<aS){P.scrollByY(aP)}else{U(aS)}}else{aK();return}}aJ=setTimeout(s,aI?ay.initialDelay:ay.trackClickRepeatFreq);aI=false},aK=function(){aJ&&clearTimeout(aJ);aJ=null;b(document).unbind("mouseup.jsp",aK)};s();b(document).bind("mouseup.jsp",aK);return false}})}if(aE){G.bind("mousedown.jsp",function(aN){if(aN.originalTarget===c||aN.originalTarget==aN.currentTarget){var aL=b(this),aO=aL.offset(),aM=aN.pageX-aO.left-Z,aJ,aI=true,s=function(){var aR=aL.offset(),aS=aN.pageX-aR.left-at/2,aP=aj*ay.scrollPagePercent,aQ=k*aP/(S-aj);if(aM<0){if(Z-aQ>aS){P.scrollByX(-aP)}else{V(aS)}}else{if(aM>0){if(Z+aQ<aS){P.scrollByX(aP)}else{V(aS)}}else{aK();return}}aJ=setTimeout(s,aI?ay.initialDelay:ay.trackClickRepeatFreq);aI=false},aK=function(){aJ&&clearTimeout(aJ);aJ=null;b(document).unbind("mouseup.jsp",aK)};s();b(document).bind("mouseup.jsp",aK);return false}})}}function x(){if(G){G.unbind("mousedown.jsp")}if(ap){ap.unbind("mousedown.jsp")}}function aw(){b("html").unbind("dragstart.jsp selectstart.jsp mousemove.jsp mouseup.jsp mouseleave.jsp");if(au){au.removeClass("jspActive")}if(i){i.removeClass("jspActive")}}function U(s,aI){if(!az){return}if(s<0){s=0}else{if(s>j){s=j}}if(aI===c){aI=ay.animateScroll}if(aI){P.animate(au,"top",s,ac)}else{au.css("top",s);ac(s)}}function ac(aI){if(aI===c){aI=au.position().top}al.scrollTop(0);I=aI;var aL=I===0,aJ=I==j,aK=aI/j,s=-aK*(Y-w);if(ai!=aL||aG!=aJ){ai=aL;aG=aJ;D.trigger("jsp-arrow-change",[ai,aG,O,l])}v(aL,aJ);X.css("top",s);D.trigger("jsp-scroll-y",[-s,aL,aJ]).trigger("scroll")}function V(aI,s){if(!aE){return}if(aI<0){aI=0}else{if(aI>k){aI=k}}if(s===c){s=ay.animateScroll}if(s){P.animate(i,"left",aI,ad)}else{i.css("left",aI);ad(aI)}}function ad(aI){if(aI===c){aI=i.position().left}al.scrollTop(0);Z=aI;var aL=Z===0,aK=Z==k,aJ=aI/k,s=-aJ*(S-aj);if(O!=aL||l!=aK){O=aL;l=aK;D.trigger("jsp-arrow-change",[ai,aG,O,l])}t(aL,aK);X.css("left",s);D.trigger("jsp-scroll-x",[-s,aL,aK]).trigger("scroll")}function v(aI,s){if(ay.showArrows){aq[aI?"addClass":"removeClass"]("jspDisabled");ae[s?"addClass":"removeClass"]("jspDisabled")}}function t(aI,s){if(ay.showArrows){ax[aI?"addClass":"removeClass"]("jspDisabled");y[s?"addClass":"removeClass"]("jspDisabled")}}function L(s,aI){var aJ=s/(Y-w);U(aJ*j,aI)}function M(aI,s){var aJ=aI/(S-aj);V(aJ*k,s)}function aa(aU,aP,aJ){var aN,aK,aL,s=0,aT=0,aI,aO,aR,aQ,aS;try{aN=b(aU)}catch(aM){return}aK=aN.outerHeight();aL=aN.outerWidth();al.scrollTop(0);al.scrollLeft(0);while(!aN.is(".jspPane")){s+=aN.position().top;aT+=aN.position().left;aN=aN.offsetParent();if(/^body|html$/i.test(aN[0].nodeName)){return}}aI=aA();aO=aI+w;if(s<aI||aP){aQ=s-ay.verticalGutter}else{if(s+aK>aO){aQ=s-w+aK+ay.verticalGutter}}if(aQ){L(aQ,aJ)}viewportLeft=aC();aR=viewportLeft+aj;if(aT<viewportLeft||aP){aS=aT-ay.horizontalGutter}else{if(aT+aL>aR){aS=aT-aj+aL+ay.horizontalGutter}}if(aS){M(aS,aJ)}}function aC(){return-X.position().left}function aA(){return-X.position().top}function af(){al.unbind(ab).bind(ab,function(aL,aM,aK,aI){var aJ=Z,s=I;P.scrollBy(aK*ay.mouseWheelSpeed,-aI*ay.mouseWheelSpeed,false);return aJ==Z&&s==I})}function o(){al.unbind(ab)}function aB(){return false}function J(){X.find(":input,a").unbind("focus.jsp").bind("focus.jsp",function(s){aa(s.target,false)})}function E(){X.find(":input,a").unbind("focus.jsp")}function R(){var s,aI;X.focus(function(){D.focus()});D.attr("tabindex",0).unbind("keydown.jsp keypress.jsp").bind("keydown.jsp",function(aM){if(aM.target!==this){return}var aL=Z,aK=I;switch(aM.keyCode){case 40:case 38:case 34:case 32:case 33:case 39:case 37:s=aM.keyCode;aJ();break;case 35:L(Y-w);s=null;break;case 36:L(0);s=null;break}aI=aM.keyCode==s&&aL!=Z||aK!=I;return!aI}).bind("keypress.jsp",function(aK){if(aK.keyCode==s){aJ()}return!aI});if(ay.hideFocus){D.css("outline","none");if("hideFocus"in al[0]){D.attr("hideFocus",true)}}else{D.css("outline","");if("hideFocus"in al[0]){D.attr("hideFocus",false)}}function aJ(){var aL=Z,aK=I;switch(s){case 40:P.scrollByY(ay.keyboardSpeed,false);break;case 38:P.scrollByY(-ay.keyboardSpeed,false);break;case 34:case 32:P.scrollByY(w*ay.scrollPagePercent,false);break;case 33:P.scrollByY(-w*ay.scrollPagePercent,false);break;case 39:P.scrollByX(ay.keyboardSpeed,false);break;case 37:P.scrollByX(-ay.keyboardSpeed,false);break}aI=aL!=Z||aK!=I;return aI}}function Q(){D.attr("tabindex","-1").removeAttr("tabindex").unbind("keydown.jsp keypress.jsp")}function C(){if(location.hash&&location.hash.length>1){var aJ,aI;try{aJ=b(location.hash)}catch(s){return}if(aJ.length&&X.find(location.hash)){if(al.scrollTop()===0){aI=setInterval(function(){if(al.scrollTop()>0){aa(location.hash,true);b(document).scrollTop(al.position().top);clearInterval(aI)}},50)}else{aa(location.hash,true);b(document).scrollTop(al.position().top)}}}}function ah(){b("a.jspHijack").unbind("click.jsp-hijack").removeClass("jspHijack")}function n(){ah();b("a[href^=#]").addClass("jspHijack").bind("click.jsp-hijack",function(){var s=this.href.split("#"),aI;if(s.length>1){aI=s[1];if(aI.length>0&&X.find("#"+aI).length>0){aa("#"+aI,true);return false}}})}function an(){var aJ,aI,aL,aK,aM,s=false;al.unbind("touchstart.jsp touchmove.jsp touchend.jsp click.jsp-touchclick").bind("touchstart.jsp",function(aN){var aO=aN.originalEvent.touches[0];aJ=aC();aI=aA();aL=aO.pageX;aK=aO.pageY;aM=false;s=true}).bind("touchmove.jsp",function(aQ){if(!s){return}var aP=aQ.originalEvent.touches[0],aO=Z,aN=I;P.scrollTo(aJ+aL-aP.pageX,aI+aK-aP.pageY);aM=aM||Math.abs(aL-aP.pageX)>5||Math.abs(aK-aP.pageY)>5;return aO==Z&&aN==I}).bind("touchend.jsp",function(aN){s=false}).bind("click.jsp-touchclick",function(aN){if(aM){aM=false;return false}})}function h(){var s=aA(),aI=aC();D.removeClass("jspScrollable").unbind(".jsp");D.replaceWith(ao.append(X.children()));ao.scrollTop(s);ao.scrollLeft(aI)}b.extend(P,{reinitialise:function(aI){aI=b.extend({},ay,aI);ar(aI)},scrollToElement:function(aJ,aI,s){aa(aJ,aI,s)},scrollTo:function(aJ,s,aI){M(aJ,aI);L(s,aI)},scrollToX:function(aI,s){M(aI,s)},scrollToY:function(s,aI){L(s,aI)},scrollToPercentX:function(aI,s){M(aI*(S-aj),s)},scrollToPercentY:function(aI,s){L(aI*(Y-w),s)},scrollBy:function(aI,s,aJ){P.scrollByX(aI,aJ);P.scrollByY(s,aJ)},scrollByX:function(s,aJ){var aI=aC()+s,aK=aI/(S-aj);V(aK*k,aJ)},scrollByY:function(s,aJ){var aI=aA()+s,aK=aI/(Y-w);U(aK*j,aJ)},positionDragX:function(s,aI){V(s,aI)},positionDragY:function(aI,s){V(aI,s)},animate:function(aI,aL,s,aK){var aJ={};aJ[aL]=s;aI.animate(aJ,{duration:ay.animateDuration,ease:ay.animateEase,queue:false,step:aK})},getContentPositionX:function(){return aC()},getContentPositionY:function(){return aA()},getContentWidth:function(){return S()},getContentHeight:function(){return Y()},getPercentScrolledX:function(){return aC()/(S-aj)},getPercentScrolledY:function(){return aA()/(Y-w)},getIsScrollableH:function(){return aE},getIsScrollableV:function(){return az},getContentPane:function(){return X},scrollToBottom:function(s){U(j,s)},hijackInternalLinks:function(){n()},destroy:function(){h()}});ar(N)}f=b.extend({},b.fn.jScrollPane.defaults,f);b.each(["mouseWheelSpeed","arrowButtonSpeed","trackClickSpeed","keyboardSpeed"],function(){f[this]=f[this]||f.speed});var e;this.each(function(){var g=b(this),h=g.data("jsp");if(h){h.reinitialise(f)}else{h=new d(g,f);g.data("jsp",h)}e=e?e.add(g):g});return e};b.fn.jScrollPane.defaults={showArrows:false,maintainPosition:true,clickOnTrack:true,autoReinitialise:false,autoReinitialiseDelay:500,verticalDragMinHeight:0,verticalDragMaxHeight:99999,horizontalDragMinWidth:0,horizontalDragMaxWidth:99999,animateScroll:false,animateDuration:300,animateEase:"linear",hijackInternalLinks:false,verticalGutter:4,horizontalGutter:4,mouseWheelSpeed:0,arrowButtonSpeed:0,arrowRepeatFreq:50,arrowScrollOnHover:false,trackClickSpeed:0,trackClickRepeatFreq:70,verticalArrowPositions:"split",horizontalArrowPositions:"split",enableKeyboardNavigation:true,hideFocus:false,keyboardSpeed:0,initialDelay:300,speed:30,scrollPagePercent:0.8}})(jQuery,this);
;;;
jQuery.cookie=function(name,value,options){if(typeof value!='undefined'){options=options||{};if(value===null){value='';options.expires=-1;}
var expires='';if(options.expires&&(typeof options.expires=='number'||options.expires.toUTCString)){var date;if(typeof options.expires=='number'){date=new Date();date.setTime(date.getTime()+(options.expires*24*60*60*1000));}else{date=options.expires;}
expires='; expires='+date.toUTCString();}
var path=options.path?'; path='+(options.path):'';var domain=options.domain?'; domain='+(options.domain):'';var secure=options.secure?'; secure':'';document.cookie=[name,'=',encodeURIComponent(value),expires,path,domain,secure].join('');}else{var cookieValue=null;if(document.cookie&&document.cookie!=''){var cookies=document.cookie.split(';');for(var i=0;i<cookies.length;i++){var cookie=jQuery.trim(cookies[i]);if(cookie.substring(0,name.length+1)==(name+'=')){cookieValue=decodeURIComponent(cookie.substring(name.length+1));break;}}}
return cookieValue;}};
;;;
(function($){var ver="2.94";if($.support==undefined){$.support={opacity:!($.browser.msie)};}function debug(s){if($.fn.cycle.debug){log(s);}}function log(){if(window.console&&window.console.log){window.console.log("[cycle] "+Array.prototype.join.call(arguments," "));}}$.fn.cycle=function(options,arg2){var o={s:this.selector,c:this.context};if(this.length===0&&options!="stop"){if(!$.isReady&&o.s){log("DOM not ready, queuing slideshow");$(function(){$(o.s,o.c).cycle(options,arg2);});return this;}log("terminating; zero elements found by selector"+($.isReady?"":" (DOM not ready)"));return this;}return this.each(function(){var opts=handleArguments(this,options,arg2);if(opts===false){return;}opts.updateActivePagerLink=opts.updateActivePagerLink||$.fn.cycle.updateActivePagerLink;if(this.cycleTimeout){clearTimeout(this.cycleTimeout);}this.cycleTimeout=this.cyclePause=0;var $cont=$(this);var $slides=opts.slideExpr?$(opts.slideExpr,this):$cont.children();var els=$slides.get();if(els.length<2){log("terminating; too few slides: "+els.length);return;}var opts2=buildOptions($cont,$slides,els,opts,o);if(opts2===false){return;}var startTime=opts2.continuous?10:getTimeout(els[opts2.currSlide],els[opts2.nextSlide],opts2,!opts2.backwards);if(startTime){startTime+=(opts2.delay||0);if(startTime<10){startTime=10;}debug("first timeout: "+startTime);this.cycleTimeout=setTimeout(function(){go(els,opts2,0,!opts.backwards);},startTime);}});};function handleArguments(cont,options,arg2){if(cont.cycleStop==undefined){cont.cycleStop=0;}if(options===undefined||options===null){options={};}if(options.constructor==String){switch(options){case"destroy":case"stop":var opts=$(cont).data("cycle.opts");if(!opts){return false;}cont.cycleStop++;if(cont.cycleTimeout){clearTimeout(cont.cycleTimeout);}cont.cycleTimeout=0;$(cont).removeData("cycle.opts");if(options=="destroy"){destroy(opts);}return false;case"toggle":cont.cyclePause=(cont.cyclePause===1)?0:1;checkInstantResume(cont.cyclePause,arg2,cont);return false;case"pause":cont.cyclePause=1;return false;case"resume":cont.cyclePause=0;checkInstantResume(false,arg2,cont);return false;case"prev":case"next":var opts=$(cont).data("cycle.opts");if(!opts){log('options not found, "prev/next" ignored');return false;}$.fn.cycle[options](opts);return false;default:options={fx:options};}return options;}else{if(options.constructor==Number){var num=options;options=$(cont).data("cycle.opts");if(!options){log("options not found, can not advance slide");return false;}if(num<0||num>=options.elements.length){log("invalid slide index: "+num);return false;}options.nextSlide=num;if(cont.cycleTimeout){clearTimeout(cont.cycleTimeout);cont.cycleTimeout=0;}if(typeof arg2=="string"){options.oneTimeFx=arg2;}go(options.elements,options,1,num>=options.currSlide);return false;}}return options;function checkInstantResume(isPaused,arg2,cont){if(!isPaused&&arg2===true){var options=$(cont).data("cycle.opts");if(!options){log("options not found, can not resume");return false;}if(cont.cycleTimeout){clearTimeout(cont.cycleTimeout);cont.cycleTimeout=0;}go(options.elements,options,1,!options.backwards);}}}function removeFilter(el,opts){if(!$.support.opacity&&opts.cleartype&&el.style.filter){try{el.style.removeAttribute("filter");}catch(smother){}}}function destroy(opts){if(opts.next){$(opts.next).unbind(opts.prevNextEvent);}if(opts.prev){$(opts.prev).unbind(opts.prevNextEvent);}if(opts.pager||opts.pagerAnchorBuilder){$.each(opts.pagerAnchors||[],function(){this.unbind().remove();});}opts.pagerAnchors=null;if(opts.destroy){opts.destroy(opts);}}function buildOptions($cont,$slides,els,options,o){var opts=$.extend({},$.fn.cycle.defaults,options||{},$.metadata?$cont.metadata():$.meta?$cont.data():{});if(opts.autostop){opts.countdown=opts.autostopCount||els.length;}var cont=$cont[0];$cont.data("cycle.opts",opts);opts.$cont=$cont;opts.stopCount=cont.cycleStop;opts.elements=els;opts.before=opts.before?[opts.before]:[];opts.after=opts.after?[opts.after]:[];opts.after.unshift(function(){opts.busy=0;});if(!$.support.opacity&&opts.cleartype){opts.after.push(function(){removeFilter(this,opts);});}if(opts.continuous){opts.after.push(function(){go(els,opts,0,!opts.backwards);});}saveOriginalOpts(opts);if(!$.support.opacity&&opts.cleartype&&!opts.cleartypeNoBg){clearTypeFix($slides);}if($cont.css("position")=="static"){$cont.css("position","relative");}if(opts.width){$cont.width(opts.width);}if(opts.height&&opts.height!="auto"){$cont.height(opts.height);}if(opts.startingSlide){opts.startingSlide=parseInt(opts.startingSlide);}else{if(opts.backwards){opts.startingSlide=els.length-1;}}if(opts.random){opts.randomMap=[];for(var i=0;i<els.length;i++){opts.randomMap.push(i);}opts.randomMap.sort(function(a,b){return Math.random()-0.5;});opts.randomIndex=1;opts.startingSlide=opts.randomMap[1];}else{if(opts.startingSlide>=els.length){opts.startingSlide=0;}}opts.currSlide=opts.startingSlide||0;var first=opts.startingSlide;$slides.css({position:"absolute",top:0,left:0}).hide().each(function(i){var z;if(opts.backwards){z=first?i<=first?els.length+(i-first):first-i:els.length-i;}else{z=first?i>=first?els.length-(i-first):first-i:els.length-i;}$(this).css("z-index",z);});$(els[first]).css("opacity",1).show();removeFilter(els[first],opts);if(opts.fit&&opts.width){$slides.width(opts.width);}if(opts.fit&&opts.height&&opts.height!="auto"){$slides.height(opts.height);}var reshape=opts.containerResize&&!$cont.innerHeight();if(reshape){var maxw=0,maxh=0;for(var j=0;j<els.length;j++){var $e=$(els[j]),e=$e[0],w=$e.outerWidth(),h=$e.outerHeight();if(!w){w=e.offsetWidth||e.width||$e.attr("width");}if(!h){h=e.offsetHeight||e.height||$e.attr("height");}maxw=w>maxw?w:maxw;maxh=h>maxh?h:maxh;}if(maxw>0&&maxh>0){$cont.css({width:maxw+"px",height:maxh+"px"});}}if(opts.pause){$cont.hover(function(){this.cyclePause++;},function(){this.cyclePause--;});}if(supportMultiTransitions(opts)===false){return false;}var requeue=false;options.requeueAttempts=options.requeueAttempts||0;$slides.each(function(){var $el=$(this);this.cycleH=(opts.fit&&opts.height)?opts.height:($el.height()||this.offsetHeight||this.height||$el.attr("height")||0);this.cycleW=(opts.fit&&opts.width)?opts.width:($el.width()||this.offsetWidth||this.width||$el.attr("width")||0);if($el.is("img")){var loadingIE=($.browser.msie&&this.cycleW==28&&this.cycleH==30&&!this.complete);var loadingFF=($.browser.mozilla&&this.cycleW==34&&this.cycleH==19&&!this.complete);var loadingOp=($.browser.opera&&((this.cycleW==42&&this.cycleH==19)||(this.cycleW==37&&this.cycleH==17))&&!this.complete);var loadingOther=(this.cycleH==0&&this.cycleW==0&&!this.complete);if(loadingIE||loadingFF||loadingOp||loadingOther){if(o.s&&opts.requeueOnImageNotLoaded&&++options.requeueAttempts<100){log(options.requeueAttempts," - img slide not loaded, requeuing slideshow: ",this.src,this.cycleW,this.cycleH);setTimeout(function(){$(o.s,o.c).cycle(options);},opts.requeueTimeout);requeue=true;return false;}else{log("could not determine size of image: "+this.src,this.cycleW,this.cycleH);}}}return true;});if(requeue){return false;}opts.cssBefore=opts.cssBefore||{};opts.animIn=opts.animIn||{};opts.animOut=opts.animOut||{};$slides.not(":eq("+first+")").css(opts.cssBefore);if(opts.cssFirst){$($slides[first]).css(opts.cssFirst);}if(opts.timeout){opts.timeout=parseInt(opts.timeout);if(opts.speed.constructor==String){opts.speed=$.fx.speeds[opts.speed]||parseInt(opts.speed);}if(!opts.sync){opts.speed=opts.speed/2;}var buffer=opts.fx=="shuffle"?500:250;while((opts.timeout-opts.speed)<buffer){opts.timeout+=opts.speed;}}if(opts.easing){opts.easeIn=opts.easeOut=opts.easing;}if(!opts.speedIn){opts.speedIn=opts.speed;}if(!opts.speedOut){opts.speedOut=opts.speed;}opts.slideCount=els.length;opts.currSlide=opts.lastSlide=first;if(opts.random){if(++opts.randomIndex==els.length){opts.randomIndex=0;}opts.nextSlide=opts.randomMap[opts.randomIndex];}else{if(opts.backwards){opts.nextSlide=opts.startingSlide==0?(els.length-1):opts.startingSlide-1;}else{opts.nextSlide=opts.startingSlide>=(els.length-1)?0:opts.startingSlide+1;}}if(!opts.multiFx){var init=$.fn.cycle.transitions[opts.fx];if($.isFunction(init)){init($cont,$slides,opts);}else{if(opts.fx!="custom"&&!opts.multiFx){log("unknown transition: "+opts.fx,"; slideshow terminating");return false;}}}var e0=$slides[first];if(opts.before.length){opts.before[0].apply(e0,[e0,e0,opts,true]);}if(opts.after.length>1){opts.after[1].apply(e0,[e0,e0,opts,true]);}if(opts.next){$(opts.next).bind(opts.prevNextEvent,function(){return advance(opts,1);});}if(opts.prev){$(opts.prev).bind(opts.prevNextEvent,function(){return advance(opts,0);});}if(opts.pager||opts.pagerAnchorBuilder){buildPager(els,opts);}exposeAddSlide(opts,els);return opts;}function saveOriginalOpts(opts){opts.original={before:[],after:[]};opts.original.cssBefore=$.extend({},opts.cssBefore);opts.original.cssAfter=$.extend({},opts.cssAfter);opts.original.animIn=$.extend({},opts.animIn);opts.original.animOut=$.extend({},opts.animOut);$.each(opts.before,function(){opts.original.before.push(this);});$.each(opts.after,function(){opts.original.after.push(this);});}function supportMultiTransitions(opts){var i,tx,txs=$.fn.cycle.transitions;if(opts.fx.indexOf(",")>0){opts.multiFx=true;opts.fxs=opts.fx.replace(/\s*/g,"").split(",");for(i=0;i<opts.fxs.length;i++){var fx=opts.fxs[i];tx=txs[fx];if(!tx||!txs.hasOwnProperty(fx)||!$.isFunction(tx)){log("discarding unknown transition: ",fx);opts.fxs.splice(i,1);i--;}}if(!opts.fxs.length){log("No valid transitions named; slideshow terminating.");return false;}}else{if(opts.fx=="all"){opts.multiFx=true;opts.fxs=[];for(p in txs){tx=txs[p];if(txs.hasOwnProperty(p)&&$.isFunction(tx)){opts.fxs.push(p);}}}}if(opts.multiFx&&opts.randomizeEffects){var r1=Math.floor(Math.random()*20)+30;for(i=0;i<r1;i++){var r2=Math.floor(Math.random()*opts.fxs.length);opts.fxs.push(opts.fxs.splice(r2,1)[0]);}debug("randomized fx sequence: ",opts.fxs);}return true;}function exposeAddSlide(opts,els){opts.addSlide=function(newSlide,prepend){var $s=$(newSlide),s=$s[0];if(!opts.autostopCount){opts.countdown++;}els[prepend?"unshift":"push"](s);if(opts.els){opts.els[prepend?"unshift":"push"](s);}opts.slideCount=els.length;$s.css("position","absolute");$s[prepend?"prependTo":"appendTo"](opts.$cont);if(prepend){opts.currSlide++;opts.nextSlide++;}if(!$.support.opacity&&opts.cleartype&&!opts.cleartypeNoBg){clearTypeFix($s);}if(opts.fit&&opts.width){$s.width(opts.width);}if(opts.fit&&opts.height&&opts.height!="auto"){$s.height(opts.height);}s.cycleH=(opts.fit&&opts.height)?opts.height:$s.height();s.cycleW=(opts.fit&&opts.width)?opts.width:$s.width();$s.css(opts.cssBefore);if(opts.pager||opts.pagerAnchorBuilder){$.fn.cycle.createPagerAnchor(els.length-1,s,$(opts.pager),els,opts);}if($.isFunction(opts.onAddSlide)){opts.onAddSlide($s);}else{$s.hide();}};}$.fn.cycle.resetState=function(opts,fx){fx=fx||opts.fx;opts.before=[];opts.after=[];opts.cssBefore=$.extend({},opts.original.cssBefore);opts.cssAfter=$.extend({},opts.original.cssAfter);opts.animIn=$.extend({},opts.original.animIn);opts.animOut=$.extend({},opts.original.animOut);opts.fxFn=null;$.each(opts.original.before,function(){opts.before.push(this);});$.each(opts.original.after,function(){opts.after.push(this);});var init=$.fn.cycle.transitions[fx];if($.isFunction(init)){init(opts.$cont,$(opts.elements),opts);}};function go(els,opts,manual,fwd){if(manual&&opts.busy&&opts.manualTrump){debug("manualTrump in go(), stopping active transition");$(els).stop(true,true);opts.busy=false;}if(opts.busy){debug("transition active, ignoring new tx request");return;}var p=opts.$cont[0],curr=els[opts.currSlide],next=els[opts.nextSlide];if(p.cycleStop!=opts.stopCount||p.cycleTimeout===0&&!manual){return;}if(!manual&&!p.cyclePause&&!opts.bounce&&((opts.autostop&&(--opts.countdown<=0))||(opts.nowrap&&!opts.random&&opts.nextSlide<opts.currSlide))){if(opts.end){opts.end(opts);}return;}var changed=false;if((manual||!p.cyclePause)&&(opts.nextSlide!=opts.currSlide)){changed=true;var fx=opts.fx;curr.cycleH=curr.cycleH||$(curr).height();curr.cycleW=curr.cycleW||$(curr).width();next.cycleH=next.cycleH||$(next).height();next.cycleW=next.cycleW||$(next).width();if(opts.multiFx){if(opts.lastFx==undefined||++opts.lastFx>=opts.fxs.length){opts.lastFx=0;}fx=opts.fxs[opts.lastFx];opts.currFx=fx;}if(opts.oneTimeFx){fx=opts.oneTimeFx;opts.oneTimeFx=null;}$.fn.cycle.resetState(opts,fx);if(opts.before.length){$.each(opts.before,function(i,o){if(p.cycleStop!=opts.stopCount){return;}o.apply(next,[curr,next,opts,fwd]);});}var after=function(){$.each(opts.after,function(i,o){if(p.cycleStop!=opts.stopCount){return;}o.apply(next,[curr,next,opts,fwd]);});};debug("tx firing; currSlide: "+opts.currSlide+"; nextSlide: "+opts.nextSlide);opts.busy=1;if(opts.fxFn){opts.fxFn(curr,next,opts,after,fwd,manual&&opts.fastOnEvent);}else{if($.isFunction($.fn.cycle[opts.fx])){$.fn.cycle[opts.fx](curr,next,opts,after,fwd,manual&&opts.fastOnEvent);}else{$.fn.cycle.custom(curr,next,opts,after,fwd,manual&&opts.fastOnEvent);}}}if(changed||opts.nextSlide==opts.currSlide){opts.lastSlide=opts.currSlide;if(opts.random){opts.currSlide=opts.nextSlide;if(++opts.randomIndex==els.length){opts.randomIndex=0;}opts.nextSlide=opts.randomMap[opts.randomIndex];if(opts.nextSlide==opts.currSlide){opts.nextSlide=(opts.currSlide==opts.slideCount-1)?0:opts.currSlide+1;}}else{if(opts.backwards){var roll=(opts.nextSlide-1)<0;if(roll&&opts.bounce){opts.backwards=!opts.backwards;opts.nextSlide=1;opts.currSlide=0;}else{opts.nextSlide=roll?(els.length-1):opts.nextSlide-1;opts.currSlide=roll?0:opts.nextSlide+1;}}else{var roll=(opts.nextSlide+1)==els.length;if(roll&&opts.bounce){opts.backwards=!opts.backwards;opts.nextSlide=els.length-2;opts.currSlide=els.length-1;}else{opts.nextSlide=roll?0:opts.nextSlide+1;opts.currSlide=roll?els.length-1:opts.nextSlide-1;}}}}if(changed&&opts.pager){opts.updateActivePagerLink(opts.pager,opts.currSlide,opts.activePagerClass);}var ms=0;if(opts.timeout&&!opts.continuous){ms=getTimeout(els[opts.currSlide],els[opts.nextSlide],opts,fwd);}else{if(opts.continuous&&p.cyclePause){ms=10;}}if(ms>0){p.cycleTimeout=setTimeout(function(){go(els,opts,0,!opts.backwards);},ms);}}$.fn.cycle.updateActivePagerLink=function(pager,currSlide,clsName){$(pager).each(function(){$(this).children().removeClass(clsName).eq(currSlide).addClass(clsName);});};function getTimeout(curr,next,opts,fwd){if(opts.timeoutFn){var t=opts.timeoutFn.call(curr,curr,next,opts,fwd);while((t-opts.speed)<250){t+=opts.speed;}debug("calculated timeout: "+t+"; speed: "+opts.speed);if(t!==false){return t;}}return opts.timeout;}$.fn.cycle.next=function(opts){advance(opts,1);};$.fn.cycle.prev=function(opts){advance(opts,0);};function advance(opts,moveForward){var val=moveForward?1:-1;var els=opts.elements;var p=opts.$cont[0],timeout=p.cycleTimeout;if(timeout){clearTimeout(timeout);p.cycleTimeout=0;}if(opts.random&&val<0){opts.randomIndex--;if(--opts.randomIndex==-2){opts.randomIndex=els.length-2;}else{if(opts.randomIndex==-1){opts.randomIndex=els.length-1;}}opts.nextSlide=opts.randomMap[opts.randomIndex];}else{if(opts.random){opts.nextSlide=opts.randomMap[opts.randomIndex];}else{opts.nextSlide=opts.currSlide+val;if(opts.nextSlide<0){if(opts.nowrap){return false;}opts.nextSlide=els.length-1;}else{if(opts.nextSlide>=els.length){if(opts.nowrap){return false;}opts.nextSlide=0;}}}}var cb=opts.onPrevNextEvent||opts.prevNextClick;if($.isFunction(cb)){cb(val>0,opts.nextSlide,els[opts.nextSlide]);}go(els,opts,1,moveForward);return false;}function buildPager(els,opts){var $p=$(opts.pager);$.each(els,function(i,o){$.fn.cycle.createPagerAnchor(i,o,$p,els,opts);});opts.updateActivePagerLink(opts.pager,opts.startingSlide,opts.activePagerClass);}$.fn.cycle.createPagerAnchor=function(i,el,$p,els,opts){var a;if($.isFunction(opts.pagerAnchorBuilder)){a=opts.pagerAnchorBuilder(i,el);debug("pagerAnchorBuilder("+i+", el) returned: "+a);}else{a='<a href="#">'+(i+1)+"</a>";}if(!a){return;}var $a=$(a);if($a.parents("body").length===0){var arr=[];if($p.length>1){$p.each(function(){var $clone=$a.clone(true);$(this).append($clone);arr.push($clone[0]);});$a=$(arr);}else{$a.appendTo($p);}}opts.pagerAnchors=opts.pagerAnchors||[];opts.pagerAnchors.push($a);$a.bind(opts.pagerEvent,function(e){e.preventDefault();opts.nextSlide=i;var p=opts.$cont[0],timeout=p.cycleTimeout;if(timeout){clearTimeout(timeout);p.cycleTimeout=0;}var cb=opts.onPagerEvent||opts.pagerClick;if($.isFunction(cb)){cb(opts.nextSlide,els[opts.nextSlide]);}go(els,opts,1,opts.currSlide<i);});if(!/^click/.test(opts.pagerEvent)&&!opts.allowPagerClickBubble){$a.bind("click.cycle",function(){return false;});}if(opts.pauseOnPagerHover){$a.hover(function(){opts.$cont[0].cyclePause++;},function(){opts.$cont[0].cyclePause--;});}};$.fn.cycle.hopsFromLast=function(opts,fwd){var hops,l=opts.lastSlide,c=opts.currSlide;if(fwd){hops=c>l?c-l:opts.slideCount-l;}else{hops=c<l?l-c:l+opts.slideCount-c;}return hops;};function clearTypeFix($slides){debug("applying clearType background-color hack");function hex(s){s=parseInt(s).toString(16);return s.length<2?"0"+s:s;}function getBg(e){for(;e&&e.nodeName.toLowerCase()!="html";e=e.parentNode){var v=$.css(e,"background-color");if(v.indexOf("rgb")>=0){var rgb=v.match(/\d+/g);return"#"+hex(rgb[0])+hex(rgb[1])+hex(rgb[2]);}if(v&&v!="transparent"){return v;}}return"#ffffff";}$slides.each(function(){$(this).css("background-color",getBg(this));});}$.fn.cycle.commonReset=function(curr,next,opts,w,h,rev){$(opts.elements).not(curr).hide();opts.cssBefore.opacity=1;opts.cssBefore.display="block";if(opts.slideResize&&w!==false&&next.cycleW>0){opts.cssBefore.width=next.cycleW;}if(opts.slideResize&&h!==false&&next.cycleH>0){opts.cssBefore.height=next.cycleH;}opts.cssAfter=opts.cssAfter||{};opts.cssAfter.display="none";$(curr).css("zIndex",opts.slideCount+(rev===true?1:0));$(next).css("zIndex",opts.slideCount+(rev===true?0:1));};$.fn.cycle.custom=function(curr,next,opts,cb,fwd,speedOverride){var $l=$(curr),$n=$(next);var speedIn=opts.speedIn,speedOut=opts.speedOut,easeIn=opts.easeIn,easeOut=opts.easeOut;$n.css(opts.cssBefore);if(speedOverride){if(typeof speedOverride=="number"){speedIn=speedOut=speedOverride;}else{speedIn=speedOut=1;}easeIn=easeOut=null;}var fn=function(){$n.animate(opts.animIn,speedIn,easeIn,cb);};$l.animate(opts.animOut,speedOut,easeOut,function(){if(opts.cssAfter){$l.css(opts.cssAfter);}if(!opts.sync){fn();}});if(opts.sync){fn();}};$.fn.cycle.transitions={fade:function($cont,$slides,opts){$slides.not(":eq("+opts.currSlide+")").css("opacity",0);opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts);opts.cssBefore.opacity=0;});opts.animIn={opacity:1};opts.animOut={opacity:0};opts.cssBefore={top:0,left:0};}};$.fn.cycle.ver=function(){return ver;};$.fn.cycle.defaults={fx:"fade",timeout:4000,timeoutFn:null,continuous:0,speed:1000,speedIn:null,speedOut:null,next:null,prev:null,onPrevNextEvent:null,prevNextEvent:"click.cycle",pager:null,onPagerEvent:null,pagerEvent:"click.cycle",allowPagerClickBubble:false,pagerAnchorBuilder:null,before:null,after:null,end:null,easing:null,easeIn:null,easeOut:null,shuffle:null,animIn:null,animOut:null,cssBefore:null,cssAfter:null,fxFn:null,height:"auto",startingSlide:0,sync:1,random:0,fit:0,containerResize:1,slideResize:1,pause:0,pauseOnPagerHover:0,autostop:0,autostopCount:0,delay:0,slideExpr:null,cleartype:!$.support.opacity,cleartypeNoBg:false,nowrap:0,fastOnEvent:0,randomizeEffects:1,rev:0,manualTrump:true,requeueOnImageNotLoaded:true,requeueTimeout:250,activePagerClass:"activeSlide",updateActivePagerLink:null,backwards:false};})(jQuery);(function($){$.fn.cycle.transitions.none=function($cont,$slides,opts){opts.fxFn=function(curr,next,opts,after){$(next).show();$(curr).hide();after();};};$.fn.cycle.transitions.fadeout=function($cont,$slides,opts){$slides.not(":eq("+opts.currSlide+")").css({display:"block",opacity:1});opts.before.push(function(curr,next,opts,w,h,rev){$(curr).css("zIndex",opts.slideCount+(!rev===true?1:0));$(next).css("zIndex",opts.slideCount+(!rev===true?0:1));});opts.animIn={opacity:1};opts.animOut={opacity:0};opts.cssBefore={opacity:1,display:"block"};opts.cssAfter={zIndex:0};};$.fn.cycle.transitions.scrollUp=function($cont,$slides,opts){$cont.css("overflow","hidden");opts.before.push($.fn.cycle.commonReset);var h=$cont.height();opts.cssBefore={top:h,left:0};opts.cssFirst={top:0};opts.animIn={top:0};opts.animOut={top:-h};};$.fn.cycle.transitions.scrollDown=function($cont,$slides,opts){$cont.css("overflow","hidden");opts.before.push($.fn.cycle.commonReset);var h=$cont.height();opts.cssFirst={top:0};opts.cssBefore={top:-h,left:0};opts.animIn={top:0};opts.animOut={top:h};};$.fn.cycle.transitions.scrollLeft=function($cont,$slides,opts){$cont.css("overflow","hidden");opts.before.push($.fn.cycle.commonReset);var w=$cont.width();opts.cssFirst={left:0};opts.cssBefore={left:w,top:0};opts.animIn={left:0};opts.animOut={left:0-w};};$.fn.cycle.transitions.scrollRight=function($cont,$slides,opts){$cont.css("overflow","hidden");opts.before.push($.fn.cycle.commonReset);var w=$cont.width();opts.cssFirst={left:0};opts.cssBefore={left:-w,top:0};opts.animIn={left:0};opts.animOut={left:w};};$.fn.cycle.transitions.scrollHorz=function($cont,$slides,opts){$cont.css("overflow","hidden").width();opts.before.push(function(curr,next,opts,fwd){if(opts.rev){fwd=!fwd;}$.fn.cycle.commonReset(curr,next,opts);opts.cssBefore.left=fwd?(next.cycleW-1):(1-next.cycleW);opts.animOut.left=fwd?-curr.cycleW:curr.cycleW;});opts.cssFirst={left:0};opts.cssBefore={top:0};opts.animIn={left:0};opts.animOut={top:0};};$.fn.cycle.transitions.scrollVert=function($cont,$slides,opts){$cont.css("overflow","hidden");opts.before.push(function(curr,next,opts,fwd){if(opts.rev){fwd=!fwd;}$.fn.cycle.commonReset(curr,next,opts);opts.cssBefore.top=fwd?(1-next.cycleH):(next.cycleH-1);opts.animOut.top=fwd?curr.cycleH:-curr.cycleH;});opts.cssFirst={top:0};opts.cssBefore={left:0};opts.animIn={top:0};opts.animOut={left:0};};$.fn.cycle.transitions.slideX=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$(opts.elements).not(curr).hide();$.fn.cycle.commonReset(curr,next,opts,false,true);opts.animIn.width=next.cycleW;});opts.cssBefore={left:0,top:0,width:0};opts.animIn={width:"show"};opts.animOut={width:0};};$.fn.cycle.transitions.slideY=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$(opts.elements).not(curr).hide();$.fn.cycle.commonReset(curr,next,opts,true,false);opts.animIn.height=next.cycleH;});opts.cssBefore={left:0,top:0,height:0};opts.animIn={height:"show"};opts.animOut={height:0};};$.fn.cycle.transitions.shuffle=function($cont,$slides,opts){var i,w=$cont.css("overflow","visible").width();$slides.css({left:0,top:0});opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,true,true,true);});if(!opts.speedAdjusted){opts.speed=opts.speed/2;opts.speedAdjusted=true;}opts.random=0;opts.shuffle=opts.shuffle||{left:-w,top:15};opts.els=[];for(i=0;i<$slides.length;i++){opts.els.push($slides[i]);}for(i=0;i<opts.currSlide;i++){opts.els.push(opts.els.shift());}opts.fxFn=function(curr,next,opts,cb,fwd){if(opts.rev){fwd=!fwd;}var $el=fwd?$(curr):$(next);$(next).css(opts.cssBefore);var count=opts.slideCount;$el.animate(opts.shuffle,opts.speedIn,opts.easeIn,function(){var hops=$.fn.cycle.hopsFromLast(opts,fwd);for(var k=0;k<hops;k++){fwd?opts.els.push(opts.els.shift()):opts.els.unshift(opts.els.pop());}if(fwd){for(var i=0,len=opts.els.length;i<len;i++){$(opts.els[i]).css("z-index",len-i+count);}}else{var z=$(curr).css("z-index");$el.css("z-index",parseInt(z)+1+count);}$el.animate({left:0,top:0},opts.speedOut,opts.easeOut,function(){$(fwd?this:curr).hide();if(cb){cb();}});});};opts.cssBefore={display:"block",opacity:1,top:0,left:0};};$.fn.cycle.transitions.turnUp=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,true,false);opts.cssBefore.top=next.cycleH;opts.animIn.height=next.cycleH;opts.animOut.width=next.cycleW;});opts.cssFirst={top:0};opts.cssBefore={left:0,height:0};opts.animIn={top:0};opts.animOut={height:0};};$.fn.cycle.transitions.turnDown=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,true,false);opts.animIn.height=next.cycleH;opts.animOut.top=curr.cycleH;});opts.cssFirst={top:0};opts.cssBefore={left:0,top:0,height:0};opts.animOut={height:0};};$.fn.cycle.transitions.turnLeft=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,false,true);opts.cssBefore.left=next.cycleW;opts.animIn.width=next.cycleW;});opts.cssBefore={top:0,width:0};opts.animIn={left:0};opts.animOut={width:0};};$.fn.cycle.transitions.turnRight=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,false,true);opts.animIn.width=next.cycleW;opts.animOut.left=curr.cycleW;});opts.cssBefore={top:0,left:0,width:0};opts.animIn={left:0};opts.animOut={width:0};};$.fn.cycle.transitions.zoom=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,false,false,true);opts.cssBefore.top=next.cycleH/2;opts.cssBefore.left=next.cycleW/2;opts.animIn={top:0,left:0,width:next.cycleW,height:next.cycleH};opts.animOut={width:0,height:0,top:curr.cycleH/2,left:curr.cycleW/2};});opts.cssFirst={top:0,left:0};opts.cssBefore={width:0,height:0};};$.fn.cycle.transitions.fadeZoom=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,false,false);opts.cssBefore.left=next.cycleW/2;opts.cssBefore.top=next.cycleH/2;opts.animIn={top:0,left:0,width:next.cycleW,height:next.cycleH};});opts.cssBefore={width:0,height:0};opts.animOut={opacity:0};};$.fn.cycle.transitions.blindX=function($cont,$slides,opts){var w=$cont.css("overflow","hidden").width();opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts);opts.animIn.width=next.cycleW;opts.animOut.left=curr.cycleW;});opts.cssBefore={left:w,top:0};opts.animIn={left:0};opts.animOut={left:w};};$.fn.cycle.transitions.blindY=function($cont,$slides,opts){var h=$cont.css("overflow","hidden").height();opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts);opts.animIn.height=next.cycleH;opts.animOut.top=curr.cycleH;});opts.cssBefore={top:h,left:0};opts.animIn={top:0};opts.animOut={top:h};};$.fn.cycle.transitions.blindZ=function($cont,$slides,opts){var h=$cont.css("overflow","hidden").height();var w=$cont.width();opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts);opts.animIn.height=next.cycleH;opts.animOut.top=curr.cycleH;});opts.cssBefore={top:h,left:w};opts.animIn={top:0,left:0};opts.animOut={top:h,left:w};};$.fn.cycle.transitions.growX=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,false,true);opts.cssBefore.left=this.cycleW/2;opts.animIn={left:0,width:this.cycleW};opts.animOut={left:0};});opts.cssBefore={width:0,top:0};};$.fn.cycle.transitions.growY=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,true,false);opts.cssBefore.top=this.cycleH/2;opts.animIn={top:0,height:this.cycleH};opts.animOut={top:0};});opts.cssBefore={height:0,left:0};};$.fn.cycle.transitions.curtainX=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,false,true,true);opts.cssBefore.left=next.cycleW/2;opts.animIn={left:0,width:this.cycleW};opts.animOut={left:curr.cycleW/2,width:0};});opts.cssBefore={top:0,width:0};};$.fn.cycle.transitions.curtainY=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,true,false,true);opts.cssBefore.top=next.cycleH/2;opts.animIn={top:0,height:next.cycleH};opts.animOut={top:curr.cycleH/2,height:0};});opts.cssBefore={left:0,height:0};};$.fn.cycle.transitions.cover=function($cont,$slides,opts){var d=opts.direction||"left";var w=$cont.css("overflow","hidden").width();var h=$cont.height();opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts);if(d=="right"){opts.cssBefore.left=-w;}else{if(d=="up"){opts.cssBefore.top=h;}else{if(d=="down"){opts.cssBefore.top=-h;}else{opts.cssBefore.left=w;}}}});opts.animIn={left:0,top:0};opts.animOut={opacity:1};opts.cssBefore={top:0,left:0};};$.fn.cycle.transitions.uncover=function($cont,$slides,opts){var d=opts.direction||"left";var w=$cont.css("overflow","hidden").width();var h=$cont.height();opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,true,true,true);if(d=="right"){opts.animOut.left=w;}else{if(d=="up"){opts.animOut.top=-h;}else{if(d=="down"){opts.animOut.top=h;}else{opts.animOut.left=-w;}}}});opts.animIn={left:0,top:0};opts.animOut={opacity:1};opts.cssBefore={top:0,left:0};};$.fn.cycle.transitions.toss=function($cont,$slides,opts){var w=$cont.css("overflow","visible").width();var h=$cont.height();opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,true,true,true);if(!opts.animOut.left&&!opts.animOut.top){opts.animOut={left:w*2,top:-h/2,opacity:0};}else{opts.animOut.opacity=0;}});opts.cssBefore={left:0,top:0};opts.animIn={left:0};};$.fn.cycle.transitions.wipe=function($cont,$slides,opts){var w=$cont.css("overflow","hidden").width();var h=$cont.height();opts.cssBefore=opts.cssBefore||{};var clip;if(opts.clip){if(/l2r/.test(opts.clip)){clip="rect(0px 0px "+h+"px 0px)";}else{if(/r2l/.test(opts.clip)){clip="rect(0px "+w+"px "+h+"px "+w+"px)";}else{if(/t2b/.test(opts.clip)){clip="rect(0px "+w+"px 0px 0px)";}else{if(/b2t/.test(opts.clip)){clip="rect("+h+"px "+w+"px "+h+"px 0px)";}else{if(/zoom/.test(opts.clip)){var top=parseInt(h/2);var left=parseInt(w/2);clip="rect("+top+"px "+left+"px "+top+"px "+left+"px)";}}}}}}opts.cssBefore.clip=opts.cssBefore.clip||clip||"rect(0px 0px 0px 0px)";var d=opts.cssBefore.clip.match(/(\d+)/g);var t=parseInt(d[0]),r=parseInt(d[1]),b=parseInt(d[2]),l=parseInt(d[3]);opts.before.push(function(curr,next,opts){if(curr==next){return;}var $curr=$(curr),$next=$(next);$.fn.cycle.commonReset(curr,next,opts,true,true,false);opts.cssAfter.display="block";var step=1,count=parseInt((opts.speedIn/13))-1;(function f(){var tt=t?t-parseInt(step*(t/count)):0;var ll=l?l-parseInt(step*(l/count)):0;var bb=b<h?b+parseInt(step*((h-b)/count||1)):h;var rr=r<w?r+parseInt(step*((w-r)/count||1)):w;$next.css({clip:"rect("+tt+"px "+rr+"px "+bb+"px "+ll+"px)"});(step++<=count)?setTimeout(f,13):$curr.css("display","none");})();});opts.cssBefore={display:"block",opacity:1,top:0,left:0};opts.animIn={left:0};opts.animOut={left:0};};})(jQuery);
;;;
var swfobject=function(){var UNDEF="undefined",OBJECT="object",SHOCKWAVE_FLASH="Shockwave Flash",SHOCKWAVE_FLASH_AX="ShockwaveFlash.ShockwaveFlash",FLASH_MIME_TYPE="application/x-shockwave-flash",EXPRESS_INSTALL_ID="SWFObjectExprInst",ON_READY_STATE_CHANGE="onreadystatechange",win=window,doc=document,nav=navigator,plugin=false,domLoadFnArr=[main],regObjArr=[],objIdArr=[],listenersArr=[],storedAltContent,storedAltContentId,storedCallbackFn,storedCallbackObj,isDomLoaded=false,isExpressInstallActive=false,dynamicStylesheet,dynamicStylesheetMedia,autoHideShow=true,ua=function(){var w3cdom=typeof doc.getElementById!=UNDEF&&typeof doc.getElementsByTagName!=UNDEF&&typeof doc.createElement!=UNDEF,u=nav.userAgent.toLowerCase(),p=nav.platform.toLowerCase(),windows=p?/win/.test(p):/win/.test(u),mac=p?/mac/.test(p):/mac/.test(u),webkit=/webkit/.test(u)?parseFloat(u.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):false,ie=!+"\v1",playerVersion=[0,0,0],d=null;if(typeof nav.plugins!=UNDEF&&typeof nav.plugins[SHOCKWAVE_FLASH]==OBJECT){d=nav.plugins[SHOCKWAVE_FLASH].description;if(d&&!(typeof nav.mimeTypes!=UNDEF&&nav.mimeTypes[FLASH_MIME_TYPE]&&!nav.mimeTypes[FLASH_MIME_TYPE].enabledPlugin)){plugin=true;ie=false;d=d.replace(/^.*\s+(\S+\s+\S+$)/,"$1");playerVersion[0]=parseInt(d.replace(/^(.*)\..*$/,"$1"),10);playerVersion[1]=parseInt(d.replace(/^.*\.(.*)\s.*$/,"$1"),10);playerVersion[2]=/[a-zA-Z]/.test(d)?parseInt(d.replace(/^.*[a-zA-Z]+(.*)$/,"$1"),10):0;}}
else if(typeof win.ActiveXObject!=UNDEF){try{var a=new ActiveXObject(SHOCKWAVE_FLASH_AX);if(a){d=a.GetVariable("$version");if(d){ie=true;d=d.split(" ")[1].split(",");playerVersion=[parseInt(d[0],10),parseInt(d[1],10),parseInt(d[2],10)];}}}
catch(e){}}
return{w3:w3cdom,pv:playerVersion,wk:webkit,ie:ie,win:windows,mac:mac};}(),onDomLoad=function(){if(!ua.w3){return;}
if((typeof doc.readyState!=UNDEF&&doc.readyState=="complete")||(typeof doc.readyState==UNDEF&&(doc.getElementsByTagName("body")[0]||doc.body))){callDomLoadFunctions();}
if(!isDomLoaded){if(typeof doc.addEventListener!=UNDEF){doc.addEventListener("DOMContentLoaded",callDomLoadFunctions,false);}
if(ua.ie&&ua.win){doc.attachEvent(ON_READY_STATE_CHANGE,function(){if(doc.readyState=="complete"){doc.detachEvent(ON_READY_STATE_CHANGE,arguments.callee);callDomLoadFunctions();}});if(win==top){(function(){if(isDomLoaded){return;}
try{doc.documentElement.doScroll("left");}
catch(e){setTimeout(arguments.callee,0);return;}
callDomLoadFunctions();})();}}
if(ua.wk){(function(){if(isDomLoaded){return;}
if(!/loaded|complete/.test(doc.readyState)){setTimeout(arguments.callee,0);return;}
callDomLoadFunctions();})();}
addLoadEvent(callDomLoadFunctions);}}();function callDomLoadFunctions(){if(isDomLoaded){return;}
try{var t=doc.getElementsByTagName("body")[0].appendChild(createElement("span"));t.parentNode.removeChild(t);}
catch(e){return;}
isDomLoaded=true;var dl=domLoadFnArr.length;for(var i=0;i<dl;i++){domLoadFnArr[i]();}}
function addDomLoadEvent(fn){if(isDomLoaded){fn();}
else{domLoadFnArr[domLoadFnArr.length]=fn;}}
function addLoadEvent(fn){if(typeof win.addEventListener!=UNDEF){win.addEventListener("load",fn,false);}
else if(typeof doc.addEventListener!=UNDEF){doc.addEventListener("load",fn,false);}
else if(typeof win.attachEvent!=UNDEF){addListener(win,"onload",fn);}
else if(typeof win.onload=="function"){var fnOld=win.onload;win.onload=function(){fnOld();fn();};}
else{win.onload=fn;}}
function main(){if(plugin){testPlayerVersion();}
else{matchVersions();}}
function testPlayerVersion(){var b=doc.getElementsByTagName("body")[0];var o=createElement(OBJECT);o.setAttribute("type",FLASH_MIME_TYPE);var t=b.appendChild(o);if(t){var counter=0;(function(){if(typeof t.GetVariable!=UNDEF){var d=t.GetVariable("$version");if(d){d=d.split(" ")[1].split(",");ua.pv=[parseInt(d[0],10),parseInt(d[1],10),parseInt(d[2],10)];}}
else if(counter<10){counter++;setTimeout(arguments.callee,10);return;}
b.removeChild(o);t=null;matchVersions();})();}
else{matchVersions();}}
function matchVersions(){var rl=regObjArr.length;if(rl>0){for(var i=0;i<rl;i++){var id=regObjArr[i].id;var cb=regObjArr[i].callbackFn;var cbObj={success:false,id:id};if(ua.pv[0]>0){var obj=getElementById(id);if(obj){if(hasPlayerVersion(regObjArr[i].swfVersion)&&!(ua.wk&&ua.wk<312)){setVisibility(id,true);if(cb){cbObj.success=true;cbObj.ref=getObjectById(id);cb(cbObj);}}
else if(regObjArr[i].expressInstall&&canExpressInstall()){var att={};att.data=regObjArr[i].expressInstall;att.width=obj.getAttribute("width")||"0";att.height=obj.getAttribute("height")||"0";if(obj.getAttribute("class")){att.styleclass=obj.getAttribute("class");}
if(obj.getAttribute("align")){att.align=obj.getAttribute("align");}
var par={};var p=obj.getElementsByTagName("param");var pl=p.length;for(var j=0;j<pl;j++){if(p[j].getAttribute("name").toLowerCase()!="movie"){par[p[j].getAttribute("name")]=p[j].getAttribute("value");}}
showExpressInstall(att,par,id,cb);}
else{displayAltContent(obj);if(cb){cb(cbObj);}}}}
else{setVisibility(id,true);if(cb){var o=getObjectById(id);if(o&&typeof o.SetVariable!=UNDEF){cbObj.success=true;cbObj.ref=o;}
cb(cbObj);}}}}}
function getObjectById(objectIdStr){var r=null;var o=getElementById(objectIdStr);if(o&&o.nodeName=="OBJECT"){if(typeof o.SetVariable!=UNDEF){r=o;}
else{var n=o.getElementsByTagName(OBJECT)[0];if(n){r=n;}}}
return r;}
function canExpressInstall(){return!isExpressInstallActive&&hasPlayerVersion("6.0.65")&&(ua.win||ua.mac)&&!(ua.wk&&ua.wk<312);}
function showExpressInstall(att,par,replaceElemIdStr,callbackFn){isExpressInstallActive=true;storedCallbackFn=callbackFn||null;storedCallbackObj={success:false,id:replaceElemIdStr};var obj=getElementById(replaceElemIdStr);if(obj){if(obj.nodeName=="OBJECT"){storedAltContent=abstractAltContent(obj);storedAltContentId=null;}
else{storedAltContent=obj;storedAltContentId=replaceElemIdStr;}
att.id=EXPRESS_INSTALL_ID;if(typeof att.width==UNDEF||(!/%$/.test(att.width)&&parseInt(att.width,10)<310)){att.width="310";}
if(typeof att.height==UNDEF||(!/%$/.test(att.height)&&parseInt(att.height,10)<137)){att.height="137";}
doc.title=doc.title.slice(0,47)+" - Flash Player Installation";var pt=ua.ie&&ua.win?"ActiveX":"PlugIn",fv="MMredirectURL="+encodeURI(window.location).toString().replace(/&/g,"%26")+"&MMplayerType="+pt+"&MMdoctitle="+doc.title;if(typeof par.flashvars!=UNDEF){par.flashvars+="&"+fv;}
else{par.flashvars=fv;}
if(ua.ie&&ua.win&&obj.readyState!=4){var newObj=createElement("div");replaceElemIdStr+="SWFObjectNew";newObj.setAttribute("id",replaceElemIdStr);obj.parentNode.insertBefore(newObj,obj);obj.style.display="none";(function(){if(obj.readyState==4){obj.parentNode.removeChild(obj);}
else{setTimeout(arguments.callee,10);}})();}
createSWF(att,par,replaceElemIdStr);}}
function displayAltContent(obj){if(ua.ie&&ua.win&&obj.readyState!=4){var el=createElement("div");obj.parentNode.insertBefore(el,obj);el.parentNode.replaceChild(abstractAltContent(obj),el);obj.style.display="none";(function(){if(obj.readyState==4){obj.parentNode.removeChild(obj);}
else{setTimeout(arguments.callee,10);}})();}
else{obj.parentNode.replaceChild(abstractAltContent(obj),obj);}}
function abstractAltContent(obj){var ac=createElement("div");if(ua.win&&ua.ie){ac.innerHTML=obj.innerHTML;}
else{var nestedObj=obj.getElementsByTagName(OBJECT)[0];if(nestedObj){var c=nestedObj.childNodes;if(c){var cl=c.length;for(var i=0;i<cl;i++){if(!(c[i].nodeType==1&&c[i].nodeName=="PARAM")&&!(c[i].nodeType==8)){ac.appendChild(c[i].cloneNode(true));}}}}}
return ac;}
function createSWF(attObj,parObj,id){var r,el=getElementById(id);if(ua.wk&&ua.wk<312){return r;}
if(el){if(typeof attObj.id==UNDEF){attObj.id=id;}
if(ua.ie&&ua.win){var att="";for(var i in attObj){if(attObj[i]!=Object.prototype[i]){if(i.toLowerCase()=="data"){parObj.movie=attObj[i];}
else if(i.toLowerCase()=="styleclass"){att+=' class="'+attObj[i]+'"';}
else if(i.toLowerCase()!="classid"){att+=' '+i+'="'+attObj[i]+'"';}}}
var par="";for(var j in parObj){if(parObj[j]!=Object.prototype[j]){par+='<param name="'+j+'" value="'+parObj[j]+'" />';}}
el.outerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'+att+'>'+par+'</object>';objIdArr[objIdArr.length]=attObj.id;r=getElementById(attObj.id);}
else{var o=createElement(OBJECT);o.setAttribute("type",FLASH_MIME_TYPE);for(var m in attObj){if(attObj[m]!=Object.prototype[m]){if(m.toLowerCase()=="styleclass"){o.setAttribute("class",attObj[m]);}
else if(m.toLowerCase()!="classid"){o.setAttribute(m,attObj[m]);}}}
for(var n in parObj){if(parObj[n]!=Object.prototype[n]&&n.toLowerCase()!="movie"){createObjParam(o,n,parObj[n]);}}
el.parentNode.replaceChild(o,el);r=o;}}
return r;}
function createObjParam(el,pName,pValue){var p=createElement("param");p.setAttribute("name",pName);p.setAttribute("value",pValue);el.appendChild(p);}
function removeSWF(id){var obj=getElementById(id);if(obj&&obj.nodeName=="OBJECT"){if(ua.ie&&ua.win){obj.style.display="none";(function(){if(obj.readyState==4){removeObjectInIE(id);}
else{setTimeout(arguments.callee,10);}})();}
else{obj.parentNode.removeChild(obj);}}}
function removeObjectInIE(id){var obj=getElementById(id);if(obj){for(var i in obj){if(typeof obj[i]=="function"){obj[i]=null;}}
obj.parentNode.removeChild(obj);}}
function getElementById(id){var el=null;try{el=doc.getElementById(id);}
catch(e){}
return el;}
function createElement(el){return doc.createElement(el);}
function addListener(target,eventType,fn){target.attachEvent(eventType,fn);listenersArr[listenersArr.length]=[target,eventType,fn];}
function hasPlayerVersion(rv){var pv=ua.pv,v=rv.split(".");v[0]=parseInt(v[0],10);v[1]=parseInt(v[1],10)||0;v[2]=parseInt(v[2],10)||0;return(pv[0]>v[0]||(pv[0]==v[0]&&pv[1]>v[1])||(pv[0]==v[0]&&pv[1]==v[1]&&pv[2]>=v[2]))?true:false;}
function createCSS(sel,decl,media,newStyle){if(ua.ie&&ua.mac){return;}
var h=doc.getElementsByTagName("head")[0];if(!h){return;}
var m=(media&&typeof media=="string")?media:"screen";if(newStyle){dynamicStylesheet=null;dynamicStylesheetMedia=null;}
if(!dynamicStylesheet||dynamicStylesheetMedia!=m){var s=createElement("style");s.setAttribute("type","text/css");s.setAttribute("media",m);dynamicStylesheet=h.appendChild(s);if(ua.ie&&ua.win&&typeof doc.styleSheets!=UNDEF&&doc.styleSheets.length>0){dynamicStylesheet=doc.styleSheets[doc.styleSheets.length-1];}
dynamicStylesheetMedia=m;}
if(ua.ie&&ua.win){if(dynamicStylesheet&&typeof dynamicStylesheet.addRule==OBJECT){dynamicStylesheet.addRule(sel,decl);}}
else{if(dynamicStylesheet&&typeof doc.createTextNode!=UNDEF){dynamicStylesheet.appendChild(doc.createTextNode(sel+" {"+decl+"}"));}}}
function setVisibility(id,isVisible){if(!autoHideShow){return;}
var v=isVisible?"visible":"hidden";if(isDomLoaded&&getElementById(id)){getElementById(id).style.visibility=v;}
else{createCSS("#"+id,"visibility:"+v);}}
function urlEncodeIfNecessary(s){var regex=/[\\\"<>\.;]/;var hasBadChars=regex.exec(s)!=null;return hasBadChars&&typeof encodeURIComponent!=UNDEF?encodeURIComponent(s):s;}
var cleanup=function(){if(ua.ie&&ua.win){window.attachEvent("onunload",function(){var ll=listenersArr.length;for(var i=0;i<ll;i++){listenersArr[i][0].detachEvent(listenersArr[i][1],listenersArr[i][2]);}
var il=objIdArr.length;for(var j=0;j<il;j++){removeSWF(objIdArr[j]);}
for(var k in ua){ua[k]=null;}
ua=null;for(var l in swfobject){swfobject[l]=null;}
swfobject=null;});}}();return{registerObject:function(objectIdStr,swfVersionStr,xiSwfUrlStr,callbackFn){if(ua.w3&&objectIdStr&&swfVersionStr){var regObj={};regObj.id=objectIdStr;regObj.swfVersion=swfVersionStr;regObj.expressInstall=xiSwfUrlStr;regObj.callbackFn=callbackFn;regObjArr[regObjArr.length]=regObj;setVisibility(objectIdStr,false);}
else if(callbackFn){callbackFn({success:false,id:objectIdStr});}},getObjectById:function(objectIdStr){if(ua.w3){return getObjectById(objectIdStr);}},embedSWF:function(swfUrlStr,replaceElemIdStr,widthStr,heightStr,swfVersionStr,xiSwfUrlStr,flashvarsObj,parObj,attObj,callbackFn){var callbackObj={success:false,id:replaceElemIdStr};if(ua.w3&&!(ua.wk&&ua.wk<312)&&swfUrlStr&&replaceElemIdStr&&widthStr&&heightStr&&swfVersionStr){setVisibility(replaceElemIdStr,false);addDomLoadEvent(function(){widthStr+="";heightStr+="";var att={};if(attObj&&typeof attObj===OBJECT){for(var i in attObj){att[i]=attObj[i];}}
att.data=swfUrlStr;att.width=widthStr;att.height=heightStr;var par={};if(parObj&&typeof parObj===OBJECT){for(var j in parObj){par[j]=parObj[j];}}
if(flashvarsObj&&typeof flashvarsObj===OBJECT){for(var k in flashvarsObj){if(typeof par.flashvars!=UNDEF){par.flashvars+="&"+k+"="+flashvarsObj[k];}
else{par.flashvars=k+"="+flashvarsObj[k];}}}
if(hasPlayerVersion(swfVersionStr)){var obj=createSWF(att,par,replaceElemIdStr);if(att.id==replaceElemIdStr){setVisibility(replaceElemIdStr,true);}
callbackObj.success=true;callbackObj.ref=obj;}
else if(xiSwfUrlStr&&canExpressInstall()){att.data=xiSwfUrlStr;showExpressInstall(att,par,replaceElemIdStr,callbackFn);return;}
else{setVisibility(replaceElemIdStr,true);}
if(callbackFn){callbackFn(callbackObj);}});}
else if(callbackFn){callbackFn(callbackObj);}},switchOffAutoHideShow:function(){autoHideShow=false;},ua:ua,getFlashPlayerVersion:function(){return{major:ua.pv[0],minor:ua.pv[1],release:ua.pv[2]};},hasFlashPlayerVersion:hasPlayerVersion,createSWF:function(attObj,parObj,replaceElemIdStr){if(ua.w3){return createSWF(attObj,parObj,replaceElemIdStr);}
else{return undefined;}},showExpressInstall:function(att,par,replaceElemIdStr,callbackFn){if(ua.w3&&canExpressInstall()){showExpressInstall(att,par,replaceElemIdStr,callbackFn);}},removeSWF:function(objElemIdStr){if(ua.w3){removeSWF(objElemIdStr);}},createCSS:function(selStr,declStr,mediaStr,newStyleBoolean){if(ua.w3){createCSS(selStr,declStr,mediaStr,newStyleBoolean);}},addDomLoadEvent:addDomLoadEvent,addLoadEvent:addLoadEvent,getQueryParamValue:function(param){var q=doc.location.search||doc.location.hash;if(q){if(/\?/.test(q)){q=q.split("?")[1];}
if(param==null){return urlEncodeIfNecessary(q);}
var pairs=q.split("&");for(var i=0;i<pairs.length;i++){if(pairs[i].substring(0,pairs[i].indexOf("="))==param){return urlEncodeIfNecessary(pairs[i].substring((pairs[i].indexOf("=")+1)));}}}
return"";},expressInstallCallback:function(){if(isExpressInstallActive){var obj=getElementById(EXPRESS_INSTALL_ID);if(obj&&storedAltContent){obj.parentNode.replaceChild(storedAltContent,obj);if(storedAltContentId){setVisibility(storedAltContentId,true);if(ua.ie&&ua.win){storedAltContent.style.display="block";}}
if(storedCallbackFn){storedCallbackFn(storedCallbackObj);}}
isExpressInstallActive=false;}}};}
;;;
var twttr=window.twttr||{};function AttachTweet(){var A=/twitter\.com(\:\d{2,4})?\/intent\/(\w+)/,T={tweet:true,retweet:true,favorite:true},G="scrollbars=yes,resizable=yes,toolbar=no,location=yes",C=screen.height,P=screen.width;function Z(j){j=j||window.event;var i=j.target||j.srcElement,d,f,c,h,g;while(i&&i.nodeName.toLowerCase()!=="a"){i=i.parentNode}if(i&&i.nodeName.toLowerCase()==="a"&&i.href){d=i.href.match(A);if(d){f=550;c=(d[2]in T)?420:560;h=Math.round((P/2)-(f/2));g=0;if(C>c){g=Math.round((C/2)-(c/2))}window.open(i.href,"intent",G+",width="+f+",height="+c+",left="+h+",top="+g);j.returnValue=false;j.preventDefault&&j.preventDefault()}}}if(document.addEventListener){document.addEventListener("click",Z,false)}else{if(document.attachEvent){document.attachEvent("onclick",Z)}}if(!twttr.widgets){twttr.widgets={}}if(!twttr.widgets.host){twttr.widgets.host="platform{i}.twitter.com"}if(typeof twttr.widgets.ignoreSSL==="undefined"){twttr.widgets.ignoreSSL=false}function Y(d){var f=Q(d);var e=twttr.widgets.host;var c=e.replace("{i}",I++);if(I==3){I=0}return f+"://"+c}function Q(c){return(window.location.protocol.match(/s\:$/)||c)&&!twttr.widgets.ignoreSSL?"https":"http"}function X(g){var d;for(var c in g){d=R.apply(this,c.split("."));for(var e=0,f;(f=d[e]);e++){new g[c](f).render()}}}function M(h){var e;var f;var d=function(){if(document.readyState=="complete"){e()}};var c;var g=function(){try{document.documentElement.doScroll("left");e()}catch(i){}};if(window.addEventListener){e=function(){if(!f){f=true;h()}window.removeEventListener("DOMContentLoaded",e,false);window.removeEventListener("load",e,false)};window.addEventListener("DOMContentLoaded",e,false);window.addEventListener("load",e,false)}else{if(window.attachEvent){c=window.setInterval(g,13);e=function(){if(!f){f=true;h()}window.clearInterval(c);window.detachEvent("onreadystatechange",d);window.detachEvent("onload",e)};window.attachEvent("onreadystatechange",d);window.attachEvent("onload",e)}}}function R(c,h){var g,j=[],d,f;try{if(document.querySelectorAll){j=document.querySelectorAll(c+"."+h)}else{if(document.getElementsByClassName){g=document.getElementsByClassName(h);for(d=0;(f=g[d]);d++){if(f.tagName.toLowerCase()==c){j.push(f)}}}else{g=document.getElementsByTagName(c);var l=new RegExp("\\b"+h+"\\b");for(d=0;(f=g[d]);d++){if(f.className.match(l)){j.push(f)}}}}}catch(k){}return j}function V(c){return encodeURIComponent(c).replace(/\+/g,"%2B")}function F(c){return decodeURIComponent(c)}function N(e){var d=[];for(var c in e){if(e[c]!==null&&typeof e[c]!=="undefined"){d.push(V(c)+"="+V(e[c]))}}return d.sort().join("&")}function U(f){var h={},e,g,d,c;if(f){e=f.split("&");for(c=0;(d=e[c]);c++){g=d.split("=");if(g.length==2){h[F(g[0])]=F(g[1])}}}return h}function J(d,e){for(var c in e){d[c]=e[c]}return d}function W(d){var c;if(d.match(/^https?:\/\//)){return d}else{c=location.host;if(location.port.length>0){c+=":"+location.port}return[location.protocol,"//",c,d].join("")}}function B(){var c=document.getElementsByTagName("link");for(var d=0,e;(e=c[d]);d++){if(e.getAttribute("rel")=="canonical"){return W(e.getAttribute("href"))}}return null}function L(e){var f=[];for(var d=0,c=e.length;d<c;d++){f.push(e[d])}return f}function E(){var d=document.getElementsByTagName("a"),k=document.getElementsByTagName("link"),c=/\bme\b/,f=/^https?\:\/\/(www\.)?twitter.com\/(#!\/)?([a-zA-Z0-9_]+)\/?$/,j=L(d).concat(L(k)),h,m,e;for(var g=0,l;(l=j[g]);g++){m=l.getAttribute("rel");e=l.getAttribute("href");if(m&&e&&m.match(c)&&(h=e.match(f))){return h[3]}}}var H=document.title,O=encodeURI(location.href),I=0,a={en:{vertical:[55,62],horizontal:[110,20],none:[55,20]},de:{vertical:[67,62],horizontal:[110,20],none:[67,20]},es:{vertical:[64,62],horizontal:[110,20],none:[64,20]},fr:{vertical:[65,62],horizontal:[110,20],none:[65,20]},it:{vertical:[55,62],horizontal:[110,20],none:[55,20]},ko:{vertical:[55,62],horizontal:[110,20],none:[55,20]},ja:{vertical:[80,62],horizontal:[130,20],none:[80,20]}},K={en:1,de:1,es:1,fr:1,it:1,ko:1,ja:1},D={vertical:1,horizontal:1,none:1},b={en:"Twitter For Websites: Tweet Button",de:"Twitter für Webseiten: Tweet-Schaltfläche",es:"Twi`tter para sitios web: Botón para Twittear",fr:'Twitter pour votre site web : bouton "Tweeter"',it:"Tweeter per i siti web: Bottone Tweet",ko:"Twitter 웹버전: 트윗 버튼",ja:"WEBサイト向けTwitter: ツイートボタン"};twttr.TweetButton=function(g){this.originElement=g;var d=g.href.split("?")[1],f=d?U(d):{},c=f.count||g.getAttribute("data-count"),e=f.lang||g.getAttribute("data-lang");this.text=f.text||g.getAttribute("data-text")||H;this.via=f.via||g.getAttribute("data-via")||E();this.url=f.url||g.getAttribute("data-url")||B()||O;this.statusID=f.status_id||g.getAttribute("data-status-id");this.related=f.related||g.getAttribute("data-related");this.counturl=f.counturl||g.getAttribute("data-counturl");this.searchlink=f.searchlink||g.getAttribute("data-searchlink");this.placeid=f.placeid||g.getAttribute("data-placeid");if(!D[c]){c="horizontal"}this.count=c;if(!K[e]){e="en"}this.lang=e};J(twttr.TweetButton.prototype,{parameters:function(){var c;if(this.statusID){c={status_id:this.statusID}}else{c={text:this.text,url:this.url,via:this.via,related:this.related,count:this.count,lang:this.lang,counturl:this.counturl,searchlink:this.searchlink,placeid:this.placeid}}c._=(new Date()).getTime();return N(c)},render:function(){if(!twttr.TweetButton.fragment){twttr.TweetButton.fragment=document.createElement("div");twttr.TweetButton.fragment.innerHTML='<iframe allowtransparency="true" frameborder="0" scrolling="no" tabindex="0" class="twitter-share-button twitter-count-'+this.count+'"></iframe>'}var d=twttr.TweetButton.fragment.firstChild.cloneNode(false);d.src=Y()+"/widgets/tweet_button.html?"+this.parameters();var e=a[this.lang][this.count];d.style.width=e[0]+"px";d.style.height=e[1]+"px";d.title=b[this.lang];var c=this.originElement.parentNode;if(c){c.replaceChild(d,this.originElement)}}});var S={"a.twitter-share-button":twttr.TweetButton};X(S);M(function(){X(S)})}
;;;
var _lastSectionString="";var _lastRemainPathString="";var _mainWebsiteObjects={};var _layoutManagers={};var _sectionTransitionClasses={};var _transitionManager={};var _titleManager={};var _productGuideContent={};var _unpluggedContent={};var _campsContent={};var _experienceContent={};var _physicsWindowWorld={};var _mainController={};var _jsonLoader={};var _bulkLoader={};var _browserHelper={};var _scriptManager=null;var _lastUrl="";var Const={MAIN_BODY:"body",HOME_SECTION:"home",EXPERIENCE_SECTION:"experience",HIGHLIGHTS_SECTION:"highlights",PRODUCT_GUIDE_SECTION:"productguide",PRODUCT_GUIDE_HOME_SECTION:"section_productguide_home",DEVELOPING_SECTION:"startdeveloping",DOWNLOAD_SECTION:"download",ERROR_SECTION:"error",HOTMAIL_SECTION:"hotmail",VIDEOS_SECTION:"videos",SEARCH_SECTION:"search",NEWINRC_SECTION:"new_in_rc",UNPLUGGEDTEASER_SECTION:"unpluggedteaser",UNPLUGGED_SECTION:"unplugged",CAMPS_SECTION:"camps",WINDOWTYPE_STANDARD:"window_application",WINDOWTYPE_ADVANCED:"window_advanced",WINDOWTYPE_EXPERIENCE:"window_experience",WINDOWTYPE_HOME_MAIN_PREVIEW:"window_home_main",WINDOWTYPE_HOME_CONTEST_PREVIEW:"window_home_contest",WINDOWTYPE_HOME_OFFER_PREVIEW:"window_home_offer",WINDOWTYPE_HOME_PARTNER_PREVIEW:"window_home_partner",WINDOWTYPE_QUOTEPANE:"quoteCyclerPane",WINDOWTYPE_FACEBOOKLIKE:"facebookLikePane",WINDOWTYPE_STATICCONTENT:"bgContentHelperPane",WINDOWTYPE_STATICCONTENTALT:"bgContentHelperPaneAlt",WINDOWTYPE_PRODUCT_SECTION:"window_product_guide_section",WINDOWTYPE_PRODUCT_OVERVIEW:"window_product_guide_overview",WINDOWTYPE_PRODUCT_FEATURES:"window_product_guide_top_features",WINDOWTYPE_PRODUCT_FEATURE:"window_product_guide_top_feature",WINDOWTYPE_PRODUCT_PAGES:"window_product_guide_pages",NAV_PRODUCT_SECTION:"nav_product_guide_section",WINDOWTYPE_VIDEO_LIST:"window_video_list",WINDOWTYPE_VIDEO_VIEWER:"window_video_viewer",WINDOWTYPE_VIDEO_CATEGORY:"window_video_category",WINDOWTYPE_SEARCH_LIST:"window_search_list",WINDOWTYPE_CAMPS:"window_camps",MAIN_WINDOW:"window_main",PREVIEW_WINDOW:"window_preview",PRODUCT_CURRENT_SECTION:"product_current_section",TRANSITION_OUT_COMPLETE:"transitionOutComplete",TRANSITION_IN_COMPLETE:"transitionInComplete",MARGIN:10,EXPERIENCE_MEDSIZE:{w:174,h:140,mode:"medium"},EXPERIENCE_BIGSIZE:{w:299,h:215,mode:"large"},EXPERIENCE_MARGIN:5,PRODUCT_MAIN_WINDOW:{w:830,h:476},PRODUCT_SIDEBAR:{w:159,h:152},PRODUCT_SECTION_NAV:{w:159,h:38},PRODUCT_FEATURE:{w:161,h:130},TRACKING_PRODUCT_GUIDE_PAGES:"http://view.atdmt.com/action/UMIRF_IE9_BOW_Final_ProductFeaturePages",TRACKING_EXPERIENCE_PAGES:"http://view.atdmt.com/action/UMIRF_IE9_BOW_Final_ExperiencesPages",SUPPORTS_CANVAS:Modernizr.canvas,DEFAULT_TRACKING_IMAGE:"/assets/images/layout/placer.png"};var SectionAliases={"experience":"amazing-sites"};var DeeplinkAliases={"highlights":{"trusted":"tracking-protection","seamless-with-windows-7":"sites-are-instant","all-around-fast":"sites-amaze","your-sites-shine":"sites-take-center-stage"}};function TranslateSection(section){var translatedSection=section;if(SectionAliases[section]!=null){translatedSection=SectionAliases[section];}
return translatedSection;};function TranslateDeeplink(section,deeplink){var translatedSection=TranslateSection(section);var translatedDeeplink=deeplink;var deeplinks=DeeplinkAliases[section];if(deeplinks!=null){if(deeplinks[deeplink]!=null){translatedDeeplink=deeplinks[deeplink];}}
return TranslateSection(section)+"/"+translatedDeeplink;};var GlobalContentUrls={WebsiteSectionInfo:"/home/sitemap?v="+siteVersion,ProductGuideInfo:"/home/producttour?v="+siteVersion,UnpluggedListInfo:"/home/unplugged?v="+siteVersion,HomeExperienceInfo:"/experienceservice/gethomepartners/2?cachebuster="+cacheBuster,ExperienceListInfo:"/experienceservice/getexperiencepartners?cachebuster="+cacheBuster,ExperienceCategoryData:"/experienceservice/getexperiencecategories?cachebuster="+cacheBuster,QuotesData:"/quotes/getquotesrandom?cachebuster="+cacheBuster,CampsData:"/WebcampsService/GetWebcamps?cachebuster="+cacheBuster};var StageValues={IsTransitioning:false,IsTransitioningContent:false,PostTransitionLayout:false,PlayIntroVideo:true};var Selectors={MAIN_CONTAINER:"div#content",MAIN_WINDOW:"div."+Const.MAIN_WINDOW,PREVIEW_WINDOW:"div."+Const.PREVIEW_WINDOW,CONTENT_WINDOWS:"div.pane",MAIN_CONTENT:"section.main",PREVIEW_CONTENT:"section.preview",DOWNLOAD_MESSAGE:"#message_download",FEEDBACK_MESSAGE:"#message_feedback",SITE_CONTAINER:"div#wrapper",WINDOWTYPE_STANDARD:"div."+Const.WINDOWTYPE_STANDARD,WINDOWTYPE_PRODUCT_FEATURES:"div."+Const.WINDOWTYPE_PRODUCT_FEATURES,WINDOWTYPE_PRODUCT_FEATURE:"div."+Const.WINDOWTYPE_PRODUCT_FEATURE,WINDOWTYPE_PRODUCT_OVERVIEW:"div."+Const.WINDOWTYPE_PRODUCT_OVERVIEW,WINDOWTYPE_PRODUCT_PAGES:"div."+Const.WINDOWTYPE_PRODUCT_PAGES,WINDOWTYPE_PRODUCT_SECTION:"div."+Const.WINDOWTYPE_PRODUCT_SECTION,PRODUCT_CURRENT_SECTION:"div."+Const.PRODUCT_CURRENT_SECTION};var DOMElements={CONTAINER_BLOCK:"<section/>",HEADER:"<header/>",DIV:"<div/>",IMG:"<img/>",P:"<p/>",H1:"<h1/>",H2:"<h2/>",A:"<a/>"};var GlobalCounter={incrementer:0,GetNextGlobalID:function(){return this.incrementer++;}};var EasingTypes={InBack:"easeInBack",InCubic:"easeInCubic",InOutBack:"easeInOutBack",InOutCirc:"easeInOutCirc",InOutCubic:"easeInOutCubic",InOutExpo:"easeInOutExpo",InOutQuad:"easeInOutQuad",InOutQuint:"easeInOutQuint",InOutSine:"easeInOutSine",InQuint:"easeInQuint",OutBack:"easeOutBack",OutBounce:"easeOutBounce",OutCubic:"easeOutCubic",Swing:"swing",InQuad:"easeInQuad",OutQuad:"easeOutQuad",InQuart:"easeInQuart",OutQuart:"easeOutQuart",OutQuint:"easeOutQuint",InSine:"easeInSine",OutSine:"easeOutSine",InExpo:"easeInExpo",OutExpo:"easeOutExpo",InCirc:"easeInCirc",OutCirc:"easeOutCirc",InElastic:"easeInElastic",OutElastic:"easeOutElastic",InOutElastic:"easeInOutElastic",InBounce:"easeInBounce",InOutBounce:"easeInOutBounce"};var StartDevelopingPaneLinks={HwAccel:"hardware-accelerated",DevTools:"developer-tools",Pinning:"pinning",Markup:"same-markup"};function SetConfiguration(queryString){var url=SWFAddress.getValue();var queryStringIndex=url.indexOf("?");if(queryStringIndex>=0){var queryString=url.substring(queryStringIndex+1);var paramArray=queryString.split("&");for(var i=0;i<paramArray.length;i++){var param=paramArray[i].split("=");if(param.length>1){var name=param[0];var value=param[1];switch(name){case"canvas":if(value==="1"){Const.SUPPORTS_CANVAS=true;}
else if(value==="0"){Const.SUPPORTS_CANVAS=false;}}}}}};function PreInitializeWebsite(jsonObj){_jsonLoader[GlobalContentUrls.WebsiteSectionInfo]=jsonObj.websiteSectionInfo;_jsonLoader[GlobalContentUrls.HomeExperienceInfo]=jsonObj.homeExperienceInfo;_jsonLoader[GlobalContentUrls.QuotesData]=jsonObj.quotesData;}
function InitializeWebsite(){window.setTimeout(function(){meteor.sharing.configure('448a2d8d-001c-453e-98f8-ec7ad5f9137a',{shorten:'',sites:'','url_storage_source':'query_string','query_string_tag_key':'ocid'})},0);SetConfiguration();$(Const.MAIN_BODY).addClass("section_home");$(Selectors.DOWNLOAD_MESSAGE).hide();$(Selectors.FEEDBACK_MESSAGE).hide();_mainController=new SiteController();var loadingSpinner=$(DOMElements.DIV).addClass("loading_spinner").appendTo(Selectors.MAIN_CONTAINER);var loadingAnim=setInterval(function(){UpdateSpinner(loadingSpinner,24,288);},65);_bulkLoader=new BulkLoader();_transitionManager=new SectionTransitionManager();_titleManager=new TitleManager();_browserHelper=new BrowserNotifier();_mainController.ParseWebsiteData();SWFAddress.addEventListener(SWFAddressEvent.EXTERNAL_CHANGE,function(e){_mainController.HandleNavChange(e);});SWFAddress.addEventListener(SWFAddressEvent.INIT,function(e){$(window).wait(100,function(){_mainController.HandleNavChange(e)});});SWFAddress.addEventListener(SWFAddressEvent.INTERNAL_CHANGE,function(e){_mainController.HandleNavChange(e);});if(_browserHelper.ShowDownload===true){$(window).wait(3500,function(){$(Selectors.DOWNLOAD_MESSAGE).fadeIn();});}
else{$(Selectors.FEEDBACK_MESSAGE).css("display","block");}
$(window).wait(9500,function(){_browserHelper.ToggleNotice(10000);});$(window).wait(750,function(){loadingSpinner.fadeOut(function(){$(this).remove();clearInterval(loadingAnim);});});var cornerPeelOptions={delay:5000,text:"<h2>{Dev:unplu99ed}</h2>Submission Deadline<br>is May 8th.<br><div>Enter to win<br>today!</div>",link:Const.UNPLUGGED_SECTION,enabled:true,expires:Date.UTC(2011,5-1,9),cookieValue:"devunplugged",cookieExpiration:21}
var currentDate=new Date().getTime();if(cornerPeelOptions.enabled&&currentDate<=cornerPeelOptions.expires&&$.cookie("cornerpeel_lastviewed")!==cornerPeelOptions.cookieValue){$(window).wait(cornerPeelOptions.delay,function(){$.cookie("cornerpeel_lastviewed",cornerPeelOptions.cookieValue,{expires:cornerPeelOptions.cookieExpiration});var cornerPeel=$(DOMElements.A).addClass("corner_peel").append($("<article>").html(cornerPeelOptions.text)).attr("href","javascript:void(0)").bind("click",function(){$(this).fadeOut(200,function(){CallNavChange(cornerPeelOptions.link);$(this).remove();});}).appendTo($(document.body));var cornerPeelAnim=UpdateSpinner(cornerPeel,138,null,690,4,69);});}
SetupDemosProps();}
function SetIsTransitioning(value){StageValues.IsTransitioning=value;};function SetIsTransitioningContent(value){StageValues.IsTransitioningContent=value;};function GetIsTransitioning(){if(StageValues.IsTransitioning||StageValues.IsTransitioningContent){return true;}
else{return false;}};function SetupMainNav(){$('#nav_main a').bind({click:function(){return false;}});$('#nav_main a').not("#nav_demos a").not("#nav_search a").not("#nav_locations a").one({click:function(){var hrefValue=$(this).attr('href');if(hrefValue!==undefined){hrefValue=hrefValue.substr(2);CallNavChange(hrefValue,true);}
return false;}});var quickSearch=_sectionTransitionClasses[Const.SEARCH_SECTION].CreateSearchField();quickSearch.appendTo("#quick_search");$("#nav_search a").unbind().bind("click",ToggleQuickSearch);$("#nav_locations ul a").unbind();}
function CallNavChange(url,handleTopNav){if(GetIsTransitioning()===false){if(handleTopNav===true&&_lastUrl!==url){$('#nav_main a').unbind();$('#nav_main a').bind({click:function(){return false;}});}
_lastUrl=url;SWFAddress.setValue(url);}}
function SetupDemosProps(){$("#nav_demos li").hide();$("#nav_demos").hover(ShowDemosMenu,HideDemosMenu).focusin(ShowDemosMenu).focusout(HideDemosMenu);$("#nav_locations").hover(ShowLocations,HideLocations).focusin(ShowLocations).focusout(HideLocations);$("#nav_locations li").bind("click",function(){var countryName=$(this).find("a").html();var trackingImg="http://view.atdmt.com/action/UMIRF_IE9_BOW_Final_Localization"
LogLocalization(countryName,trackingImg);});_scriptManager=new ScriptManager();_scriptManager.Packages["fishAquarium"]={title:"Fish Aquarium",object:"fishAquarium",scripts:["fpsometer.js","fish.js"],icon:"/assets/images/layout/icon_fish.png",loaded:false,trackingImg:"http://view.atdmt.com/action/UMIRF_IE9_BOW_Final_DemosFish",onLoad:OnLoadEasterEgg};_scriptManager.Packages["cursorTrail"]={title:"Cursor Trails",object:"cursorTrail",scripts:["sprite.js","cursortrail.js"],icon:"/assets/images/layout/icon_cursor.png",loaded:false,trackingImg:"http://view.atdmt.com/action/UMIRF_IE9_BOW_Final_DemosCursor",onLoad:OnLoadEasterEgg};_scriptManager.Packages["perfMon"]={title:"Performance Monitor",object:"perfMon",scripts:["performance.js"],icon:"/assets/images/layout/icon_perf.png",loaded:false,trackingImg:"http://view.atdmt.com/action/UMIRF_IE9_BOW_Final_DemosMonitor",onLoad:OnLoadEasterEgg};_scriptManager.Scripts["sprite.js"]={url:"/assets/scripts/easter_eggs/sprite.js?v="+siteVersion,fetched:false};_scriptManager.Scripts["cursortrail.js"]={url:"/assets/scripts/easter_eggs/cursortrail.js?v="+siteVersion,fetched:false};_scriptManager.Scripts["fpsometer.js"]={url:"/assets/scripts/easter_eggs/fpsometer.js?v="+siteVersion,fetched:false};_scriptManager.Scripts["fish.js"]={url:"/assets/scripts/easter_eggs/fish.js?v="+siteVersion,fetched:false};_scriptManager.Scripts["performance.js"]={url:"/assets/scripts/easter_eggs/performance.js?v="+siteVersion,fetched:false};}
function OnLoadEasterEgg(pkg){var demoName=pkg.title
var trackingImg=pkg.trackingImg
LogHTML5Demo(demoName,trackingImg);}
function ShowEasterEgg(name){_scriptManager.ShowConsole();_scriptManager.TogglePackage(name);HideDemosMenu();return false;}
function HideDemosMenu(){$("header.global").css("z-index",1);items=$("#nav_demos").find("li.icon").get().reverse();$.each(items,function(i,el){$(el).stop(true,true).wait((i+1)*75).fadeOut(300);});}
function ShowDemosMenu(){$("#nav_demos ul").show();$(this).find("li.icon").each(function(i,el){$(el).stop(true,true).wait((i+1)*75).fadeIn(300);});}
function HideLocations(){$("header.global").css("z-index",1);}
function ShowLocations(){$("header.global").css("z-index",9999);}
function ToggleQuickSearch(e){if($("#quick_search").is(":visible")){HideQuickSearch();}else{ShowQuickSearch();}
e.preventDefault;return false;}
function HideQuickSearch(){$("header.global").css("z-index",1);$("#quick_search").fadeOut(300);}
function ShowQuickSearch(){$("header.global").css("z-index",9999);$("#quick_search").fadeIn(300);$("#quick_search .search_input").focus();}
function UpdateSpinner(target,step,width,height,numFrames,delay){var lastx=$(target).attr("data-lastx");var lasty=$(target).attr("data-lasty");if(lastx==null){lastx=0;}
if(lasty==null){lasty=0;}
$(target).css("background-position",lastx+"px "+lasty+"px");if(width!=null&&width!=0){lastx=(lastx-step)%width;$(target).attr("data-lastx",lastx);}
if(height!=null&&height!=0){lasty=(lasty-step)%height;$(target).attr("data-lasty",lasty);}
if(numFrames!=null&&numFrames>0){setTimeout(UpdateSpinner.bind(this,target,step,width,height,numFrames-1,delay),delay);}}
function GetSectionURL(){sep=SWFAddress.getPath().indexOf("/",1);if(sep===-1){sectionPath=path;}else{sectionPath=path.substr(0,sep-1);}
return SWFAddress.getBaseURL()+"#/"+sectionPath;}
function GetMousePosition(e){var x=e.clientX;var y=e.clientY;return{x:x,y:y};}
function DisableSelection(element){if(element!=null&&element.get(0)!=null){element.get(0).ondragstart=PreventDefault;}
element.addClass("noselect").css("cursor","default").unbind("mousedown",PreventDefault).bind("mousedown",PreventDefault).unbind("selectstart",PreventDefault).bind("selectstart",PreventDefault);}
function PreventDefault(e){if(e&&e.preventDefault){e.preventDefault();}
if(e&&e.stopPropagation){e.stopPropagation();}
return false;}
function SharePage(service,url){service=$.trim(service);if($.trim(url).length===0){url=window.location.href;}
var title="Explore a more beautiful web. Internet Explorer 9 is now available for download. http://www.beautyoftheweb.com";var desc=title;if(service!=="Email"){desc="";}
if(service==="Twitter"){title="Internet Explorer 9 is now available for download.";title+=" ";}
window.open(meteor.sharing.href(service,{url:url,title:title,desc:desc}));}
function in_array(needle,haystack,argStrict){var key='',strict=!!argStrict;if(strict){for(key in haystack){if(haystack[key]===needle){return true;}}}else{for(key in haystack){if(haystack[key]==needle){return true;}}}
return false;}
function asInt(value){value=parseInt(value,10);return(isNaN(value))?0:value;}
function LogPartnerClick(partner){try{partner=$.trim(partner);LogAtlas("http://view.atdmt.com/action/UMIRF_IE9_BOW_Final_ExperienceReferral");_om_gbls.trackEvent("partner","partner_"+partner,"","partner");}catch(e){}}
function LogVideo(videoName,event){try{_om_gbls.trackEvent(TranslateSection(_lastSectionString),TranslateDeeplink(_lastSectionString,_lastRemainPathString),videoName,event);}catch(e){}}
function LogLocalization(countryName,atlasImg){try{LogAtlas(atlasImg);_om_gbls.trackEvent("localization",TranslateDeeplink(_lastSectionString,_lastRemainPathString),countryName,"");}catch(e){}}
function LogHTML5Demo(demoName,trackingImg){try{LogAtlas(trackingImg);_om_gbls.trackEvent("html5-demo:"+demoName,TranslateDeeplink(_lastSectionString,_lastRemainPathString),"","");}catch(e){}}
function LogDemo(demoName){try{_om_gbls.trackEvent("demo",TranslateDeeplink(_lastSectionString,_lastRemainPathString),demoName,"demo");}catch(e){}}
function LogDownload(downloadType,trackingImg){try{LogAtlas(trackingImg);_om_gbls.trackEvent(Const.DOWNLOAD_SECTION,Const.DOWNLOAD_SECTION+"/","","download");if(downloadType!==null&&downloadType!==undefined&&downloadType!==""){_om_gbls.trackEvent(Const.DOWNLOAD_SECTION,downloadType,"","");}}catch(e){}}
function LogAtlas(src){if(src!==null&&src!==undefined&&src!==""){try{$("#atlasimg").attr("src","/assets/images/layout/placer.png");$("#atlasimg").attr("src",src);}catch(e){}}}
function LogLink(value,anchorElt,evts){try{_om_gbls.trackLink(value,anchorElt,evts);}catch(e){}}
function AttachObjects(){Tooltip.Attach();VideoPlayer.Attach();ThumbnailViewer.Attach();Lightbox.Attach();AttachScrollPane();Slideshow.Attach();AttachTwitterSharing();}
function DetachObjects(){Tooltip.Detach();VideoPlayer.Detach();ThumbnailViewer.Detach();Lightbox.Detach();DetachDragEvents();Slideshow.Detach();}
function AttachScrollPane(){$(window).wait(0,function(){$.each($(".scrollable"),function(){var initObjectStr=$(this).attr("data-jsp-init");var initObject=null;if(initObjectStr!==""&&initObjectStr!==null&&initObjectStr!==undefined){initObject=$.parseJSON(initObjectStr);}
$(this).jScrollPane(initObject);});});}
function DetachScrollPane(){$.each($(".scrollable"),function(){var api=$(this).data("jsp");if(api){api.destroy();}});}
function AttachTwitterSharing(){var twitterShare=$(".twitter-share-button");if(twitterShare.length>0){AttachTweet();}}
function AttachDragEvents(moveFn,stopFn,keydownFn,keyupFn){DetachDragEvents();$(document.body).bind("mousedown.dragging",stopFn);$(document.body).bind("mouseup.dragging",stopFn);$(document.body).bind("mouseleave.dragging",stopFn);$(document.body).bind("mousemove.dragging",moveFn);}
function DetachDragEvents(){$(document.body).unbind("mousedown.dragging");$(document.body).unbind("mouseup.dragging");$(document.body).unbind("mouseleave.dragging");$(document.body).unbind("mousemove.dragging");}
function TruncateTextLength(inputText,maxlength,elipsis){var outputText="";if(maxlength>=inputText.length){outputText=inputText;}
else{var firstSpace=inputText.indexOf(" ");if(maxlength-1<=firstSpace){outputText=inputText.substring(0,firstSpace);}
else{var i;for(i=maxlength-1;i>=0;i--){var lastChar=inputText.charAt(i);if(lastChar===" ")break;}
outputText=inputText.substring(0,i);}
if(elipsis){outputText+=elipsis;}}
return outputText;}
function TruncateTextWords(inputText,wordCount,elipsis){var inputArr=inputText.split(" ");var outputArr=inputArr.slice(0,wordCount)
var outputText=outputArr.join(" ");if(elipsis&&outputText.length<inputText.length){outputText+=elipsis;}
return outputText;}
function StripHTML(inputText){var outputText=inputText;outputText=outputText.replace(/[’]/g,"\'");outputText=outputText.replace(/[“]/g,"\"");outputText=outputText.replace(/[…]/g,"...");outputText=outputText.replace(/[—]/g,"-");outputText=outputText.replace(/<[^>]*>/g,"");return outputText;}
function CreateDropdownFromArray(params){var dropdownArr=[];var defaults={sourceArr:[],textFieldName:"CategoryName",valueFieldName:"CategoryId",notLinkableFieldName:"NotLinkable"}
var settings=$.extend({},defaults,params);dropdownArr[dropdownArr.length]='<select>';for(var i=0;i<settings.sourceArr.length;i++){var text=settings.sourceArr[i][settings.textFieldName];var value=settings.sourceArr[i][settings.valueFieldName];var notLinkable=settings.sourceArr[i][settings.notLinkableFieldName];value=(notLinkable)?-value:value;dropdownArr[dropdownArr.length]='<option value="';dropdownArr[dropdownArr.length]=value;dropdownArr[dropdownArr.length]='">';dropdownArr[dropdownArr.length]=text;dropdownArr[dropdownArr.length]='</option>';}
dropdownArr[dropdownArr.length]='</select>';var dropdownString=dropdownArr.join("");return $(dropdownString);}
function SetPageBackground(bgType,animate){var body=$(Const.MAIN_BODY);if(!body.hasClass(bgType)){body.removeClass("awol hellboy").addClass(bgType);body.find("#wrapper").stop(true,true).css("background-position-x","100%");if(animate){body.find("#wrapper").css("background-position-x","500%").animate({"background-position-x":"100%"},{queue:false,easing:EasingTypes.InOutQuad,duration:800});}}}
var SurveyLoaded=false;function AddSiteSurvey(){try{if(_mainController.PathHistory.length>0&&!(_mainController.PathHistory.length==1&&_mainController.PathHistory[0]=="download")){if(SurveyLoaded===false){SurveyLoaded=true;var script=document.createElement('script');script.type='text/javascript';script.src="http://core.insightexpressai.com/adServer/adServerESI.aspx?bannerID=174108";$("body").append(script);}}}catch(e){}}
(function($){$.fn.animateToPosition=function(pos,size,callback){$(this).animate({width:size.w,height:size.h},{queue:false,duration:750,complete:callback}).animate({left:pos.x,top:pos.y},{queue:false,duration:700});return $(this);};$.fn.setPosition=function(pos,size){$(this).css({left:pos.x,top:pos.y,width:size.w,height:size.h,position:"absolute"});return $(this);};$.fn.getDistanceFrom=function(x2,y2){x1=asInt($(this).css("left"));y1=asInt($(this).css("top"));return Math.sqrt(Math.pow((x2-x1),2)+Math.pow((y2-y1),2));};$.fn.setAsMainWindow=function(){$(Selectors.MAIN_WINDOW).removeClass(Const.MAIN_WINDOW).removeAttr("role").addClass(Const.PREVIEW_WINDOW);$(this).addClass(Const.MAIN_WINDOW).removeClass(Const.PREVIEW_WINDOW).attr("role","article").attr("tabindex",-1).focus();return $(this);};$.fn.bindMeteorSharing=function(){$("#inner_live a",$(this)).click(function(){SharePage("Live");return false;});$("#inner_email a",$(this)).click(function(){SharePage("Email");return false;});$("#inner_twitter a",$(this)).click(function(){SharePage("Twitter");return false;});$("#inner_facebook a",$(this)).click(function(){SharePage("Facebook");return false;});return $(this);};$.fn.getRelativePosition=function(x,y){x=asInt(x);y=asInt(y);x=x+$(window).scrollLeft();y=y+$(window).scrollTop();var offset=$(this).offset();return{x:x-offset.left,y:y-offset.top};};$.fn.getAbsolutePosition=function(x,y){x=asInt(x);y=asInt(y);var offset=$(this).offset();return{x:x+offset.left,y:y+offset.top};};$.fn.getAbsolutePositionAlt=function(x,y,crossBrowser){x=asInt(x);y=asInt(y);var offset=$(this).offset();var position=$(this).position();if(crossBrowser){position.left=0;}
return{x:x+offset.left-position.left,y:y+offset.top-position.top};};$.fn.loadPage=function(url,callback){var el=$(this);url=url+"?v="+siteVersion;$.get(url,function(data){el.html($(innerShiv(data,false)));if(callback!==undefined){callback();}});return $(this);};$.fn.exhibitHover=function(slideImg,animHighlight){if(slideImg===undefined){slideImg=true;}
$(this).data("animHighlight",animHighlight);$(this).addClass("exhibit").data("slideRight",false).data("animDir",-1);$(this).find("a").css("background-position","0px 242px");$(this).bind("mouseover",function(evt){if(!$(this).hasClass("medium")){if(slideImg===true){var intervalId=setInterval(function(){var animDirection=asInt($(evt.currentTarget).data("animDir"));var mainImg=$(evt.currentTarget).find(".moveImg");var leftPx=asInt(mainImg.css("left"));mainImg.css({left:leftPx+animDirection});var totalMoveDist=$(evt.currentTarget).width()-mainImg.width();if(leftPx<=totalMoveDist){$(evt.currentTarget).data("animDir",1);}else if(leftPx>=0){$(evt.currentTarget).data("animDir",-1);}},40);$(this).data("animInterval",intervalId);}
if($(this).data("animHighlight")===true){$(evt.currentTarget).find("a").animate({"background-position-y":0},{queue:false,duration:250,complete:function(){$(this).css("background-position","0px 0px");}});$(evt.currentTarget).find("a > div > img").animate({opacity:1},{queue:false,duration:250,complete:function(){$(this).css("opacity","");}});}}});$(this).bind("mouseout",function(evt){clearInterval($(this).data("animInterval"));if($(this).data("animHighlight")===true){$(evt.currentTarget).find("a").animate({"background-position-y":242},{queue:false,duration:250,complete:function(){$(this).css("background-position","0px 242px");}});$(evt.currentTarget).find("a > div > img").animate({opacity:0},{queue:false,duration:250});}});};$.fn.downloadHover=function(){$(this).find('img.icon').stop().animate({opacity:0},0,function(){$(this).css('display','block');});$(this).bind("mouseover",function(){$(this).find('img.icon').stop().animate({opacity:1},500);$(this).find('span.overlay').stop().animate({"background-position-y":0},{queue:false,duration:500,complete:function(){$(this).css("background-position","0px 0px");}});});$(this).bind("mouseout",function(){$(this).find('img.icon').stop().animate({opacity:0},500);$(this).find('span.overlay').stop().animate({"background-position-y":60},{queue:false,duration:500,complete:function(){$(this).css("background-position","0px 60px");}});});};$.fn.createPagination=function(currentPage,numPages,callbackFn){var container=$(this);container.empty();var ul=$("<ul/>").appendTo(container);var li=$("<li/>").append($("<a/>").addClass("prev_arrow").html("prev").css("display",(currentPage-1>=0?"inline":"none")).bind("click",container.createPagination.bind(this,currentPage-1,numPages,callbackFn)).attr("onclick","").attr("href","javascript:void(0)")).appendTo(ul);DisableSelection(li);if(numPages>1){for(var i=0;i<numPages;i++){if(i===currentPage){li=$("<li/>").html(i+1).appendTo(ul);}
else{li=$("<li/>").append($("<a/>").html(i+1).bind("click",container.createPagination.bind(this,i,numPages,callbackFn)).attr("onclick","").attr("href","javascript:void(0)")).appendTo(ul);}
DisableSelection(li);}}
li=$("<li/>").append($("<a/>").addClass("next_arrow").html("next").css("display",(currentPage+1<numPages?"inline":"none")).bind("click",container.createPagination.bind(this,currentPage+1,numPages,callbackFn)).attr("onclick","").attr("href","javascript:void(0)")).appendTo(ul);DisableSelection(li);callbackFn(currentPage);};$.fn.addPlaceholderText=function(){$(this).focus(function(){var input=$(this);if(input.val()==input.attr('placeholder')){input.val('');input.removeClass('placeholder');}})
$(this).blur(function(){var input=$(this);if(input.val()==''||input.val()==input.attr('placeholder')){input.addClass('placeholder');input.val(input.attr('placeholder'));}})
$(this).blur();};})(jQuery);
;;;
var WindowBase=Class.create({UniqueID:-1,ElementID:"",SectionString:"",LinkName:"",TrackingImg:Const.DEFAULT_TRACKING_IMAGE,PreviewSize:{w:-1,h:-1},DestinationSize:{w:-1,h:-1},TransitionSelected:false,Type:"",WindowUI:null,initialize:function(){this.UniqueID=GlobalCounter.GetNextGlobalID();},DestroyUI:function(){if(this.WindowUI!==null){this.WindowUI.remove();delete this.WindowUI;}},UpdateAtlasTag:function(){try{LogAtlas(this.TrackingImg);$("#quantcast").attr("src","/assets/images/layout/placer.png");$("#quantcast").attr("src","http://pixel.quantserve.com/pixel/p-5eu58oSpL1cEs.gif?labels=_fp.channel.Beauty+of+the+Web,_fp.event.All+Content");}catch(e){}}});var SectionTransitionBase=Class.create({_transitionWindowCount:-1,_transitionCounter:0,SectionString:"",SectionItems:null,TrackingImg:"",TransitionOut:function(){},PreTransition:function(subItemUri){var self=this;var transitionDelay=25;var videoSupport=Modernizr.canvas&&Html5VideoPlayer.HasSupport();$(window).wait(transitionDelay,function(){self.TransitionIn(subItemUri);});},TransitionIn:function(){},TransitionToSectionLanding:function(){},TransitionToSectionDeepLink:function(subItemPath){return false},initialize:function(sectionString){this.SectionString=sectionString;}});var BrowserNotifier=Class.create({UserAgent:"",NotifyWindow:undefined,IsWin:false,IsVista:false,IsWin7:false,Is64bit:null,IsOldIE:false,IsIE8:false,IsIE9:false,IsIE9CompatMode:false,IsIE9Preview:false,IsIE9Beta:false,IsIE9RC:false,IsIE9RTW:false,IsIE10:false,IsIE10Preview:false,IsFirefox:false,IsChrome:false,ShowDownload:false,_winCheck:"windows nt",_winVistaCheck:"windows nt 6.0",_win7Check:"windows nt 6.1",_64bitCheck:"win64",_64bitOs:"wow64",_ie7Check:"msie 7",_ie8Check:"msie 8",_ie9Check:"trident/5.0",_ie10Check:"trident/6.0",_firefoxCheck:"firefox",_chromeCheck:"chrome",initialize:function(){this.NotifyWindow=$("div#noExist");this.UserAgent=navigator.userAgent.toLowerCase();this.IsWin=this.Check(this._winCheck);this.IsVista=this.Check(this._winVistaCheck);this.IsWin7=this.Check(this._win7Check);var appMinorVersion=window.navigator.appMinorVersion;var appMinorVersionF=parseFloat(window.navigator.appMinorVersion);this.IsOldIE=this.Check(this._ie7Check)||this.Check(this._ie8Check);this.IsIE8=this.Check(this._ie8Check);this.IsIE9=this.Check(this._ie9Check);this.IsIE9CompatMode=this.Check(this._ie9Check)&&this.Check(this._ie7Check);this.IsIE9Preview=(this.IsIE9&&window.external==null);this.IsIE9RC=this.IsIE9&&appMinorVersion==="RC";this.IsIE9Beta=this.IsIE9&&appMinorVersion==="beta";this.IsIE9RTW=this.IsIE9&&(!isNaN(appMinorVersionF)&&appMinorVersionF>=0);this.IsIE10=this.Check(this._ie10Check);this.IsIE10Preview=(this.IsIE10&&window.external==null);this.Is64bit=this.Check(this._64bitCheck)||this.Check(this._64bitOs);if(this.IsIE9===false||this.IsIE9Preview===true||this.IsIE9CompatMode===true||this.IsIE9RTW===false){var hotspotElement=$("<div/>").addClass("hotspot").attr("data-active","false").attr("data-image-visible","false").attr("data-tooltip-class","download_tooltip_background");this.ShowDownload=true;var message="This site functions in all modern browsers, but to see it as beautifully as possible please download Internet Explorer 9.";if(this.IsIE9CompatMode===true){message="To see this site as beautifully as possible please turn off Compatibility Mode";}else if(this.IsIE9===true&&this.IsIE9RTW===false){message="Thank you for trying a pre-release version of Internet Explorer 9.<br><br>The final release is now available for download.";}else if(this.IsIE10===true){message=null;}
if(message!=null&&message!=""){var tipElement=$("<div/>").css({top:-105,left:-200,width:156,height:101}).addClass("tooltip");tipElement.append($(DOMElements.P));hotspotElement.append(tipElement);hotspotElement.find("div > p").html(message);$("div#logo").append(hotspotElement);this.NotifyWindow=hotspotElement;}}
this.CheckAdditionalConstraints();},ToggleNotice:function(timeToShow){if(_lastSectionString!==Const.DOWNLOAD_SECTION){this.NotifyWindow.trigger("toggle",[timeToShow]);}},Check:function(value){return this.UserAgent.indexOf(value)>=0;},CheckAdditionalConstraints:function(){this.IsFirefox=this.Check(this._firefoxCheck);this.IsChrome=this.Check(this._chromeCheck);if(this.IsFirefox){if(/Firefox[\/\s](\d+\.\d+)/.test(navigator.userAgent)){var ffversion=new Number(RegExp.$1)
if(ffversion<4){$("html").addClass("no-svg-img");}}}}});
;;;
var ApplicationWindow=Class.create(WindowBase,{PreviewSize:{w:155,h:115},Title:"",DescriptionText:"",PreviewImgSrc:"",PreviewFaviconSrc:"",PreviewVideoSrc:"",ContentUrl:"",ClickDisabled:false,InitLayout:function(){var self=this;this.WindowUI=$(DOMElements.DIV).hide().attr("id",this.ElementID).addClass("pane").addClass(this.Type).addClass(Const.PREVIEW_WINDOW).css({width:this.PreviewSize.w,height:this.PreviewSize.h}).appendTo($(Selectors.MAIN_CONTAINER));var previewContents=$(DOMElements.A).attr("href","#").appendTo($(DOMElements.CONTAINER_BLOCK).addClass("preview").appendTo(this.WindowUI));var contentArea=$(DOMElements.DIV).addClass("content").appendTo(previewContents);if(this.Title!==""&&this.Title!==undefined){$("<header/>").append($("<h3/>").html(this.Title)).appendTo(contentArea);}
if(this.DescriptionText!==""&&this.DescriptionText!==null&&this.DescriptionText!==undefined){$(DOMElements.P).html(this.DescriptionText).appendTo(contentArea);}
if(this.PreviewImgSrc!==""&&this.PreviewImgSrc!==null&&this.PreviewImgSrc!==undefined){$(DOMElements.IMG).attr("src",this.PreviewImgSrc).appendTo($(DOMElements.DIV).addClass("image").appendTo(previewContents));}
$(DOMElements.CONTAINER_BLOCK).hide().addClass("main").appendTo(this.WindowUI);this.WindowUI.find(Selectors.PREVIEW_CONTENT+" a").bind({click:function(){if(_lastSectionString===Const.HOME_SECTION){_lastSectionString="";}
CallNavChange(_lastSectionString+"/"+self.LinkName);return false;}});},GetWindowUI:function(){if(this.WindowUI===null||this.WindowUI===undefined||$(this.WindowUI).parent().length===0){this.InitLayout();}
return this.WindowUI;},LoadContentComplete:function(selfRef){if(selfRef&&selfRef.WindowUI){var mainUI=selfRef.WindowUI;AttachObjects();selfRef.HideSpinner();mainUI.children(Selectors.MAIN_CONTENT).show().css("display","block");var children=mainUI.children(Selectors.MAIN_CONTENT).children().children();if(selfRef.Type!==Const.WINDOWTYPE_PRODUCT_OVERVIEW){children.hide();}
children.stop(true,true).fadeIn(1000);if(mainUI.data("next")!==null){mainUI.find(".next").click(function(){CallNavChange(mainUI.data("next"));return false;});}
SetIsTransitioningContent(false);$(Selectors.MAIN_CONTAINER).attr("aria-busy","false");mainUI.bindMeteorSharing();}},LoadContent:function(){var mainUI=this.WindowUI;var self=this;mainUI.find(Selectors.PREVIEW_CONTENT+" a div.image img").stop(true).fadeOut(750,function(){$(this).show();});mainUI.children(Selectors.PREVIEW_CONTENT).stop(true,true).fadeOut(750,function(){self.DisplaySpinner();mainUI.children(Selectors.MAIN_CONTENT).loadPage(self.ContentUrl,function(){self.LoadContentComplete(self);});});this.UpdateAtlasTag();},DisplaySpinner:function(selfRef){if(selfRef===undefined){selfRef=this;}
clearInterval(selfRef.loadingAnim);selfRef.loadingSpinner=$(DOMElements.DIV).addClass("loading_spinner").hide().appendTo(selfRef.GetWindowUI()).fadeIn();selfRef.loadingAnim=setInterval(function(){UpdateSpinner(selfRef.loadingSpinner,24,288);},65);},HideSpinner:function(selfRef){if(selfRef===undefined){selfRef=this;}
$(".loading_spinner").stop(true).fadeOut(function(){$(this).remove();clearInterval(selfRef.loadingAnim);});},RevealWindow:function(animDuration){var container=this.WindowUI;container.stop(true,true).fadeIn(animDuration===undefined?1000:animDuration).css({opacity:""});},HideWindow:function(animDur){var container=this.WindowUI;if(container===null){return;}
container.stop(true,true).fadeOut(animDur===undefined?1000:animDur,function(){$(this).removeClass(Const.MAIN_WINDOW).removeAttr("role").addClass(Const.PREVIEW_WINDOW);});}});var ExperienceWindow=Class.create(ApplicationWindow,{Mode:"",MediumPreviewSrc:"",LargePreviewSrc:"",LogoSrc:"",FaviconSrc:"",ScreenshotSrc:"",TrackingTag:"",InitLayout:function($super){$super();var previewContent=this.WindowUI.children(Selectors.PREVIEW_CONTENT);var link=this.WindowUI.find("section.preview a");link.attr("title",this.Title);$(DOMElements.DIV).addClass("image").appendTo(link);previewContent.addClass(this.Mode);$("div.content",previewContent).remove();if(!Const.SUPPORTS_CANVAS){$(DOMElements.IMG).addClass("mediumPreview").attr("rel",this.ScreenshotSrc).attr("alt",this.Title).appendTo(previewContent).hide();$(DOMElements.IMG).addClass("largePreview").attr("rel",this.ScreenshotSrc).attr("alt",this.Title).appendTo(previewContent).hide();$("<h3/>").html(this.Title).appendTo(previewContent);var iconContainer=$(DOMElements.DIV).addClass("icon_container").appendTo(previewContent);if(this.Pinned){$(DOMElements.P).addClass("icon_pin").html("Pinning Demo").attr("tabindex",0).bind("click",function(){CallNavChange(Const.HIGHLIGHTS_SECTION+"/seamless-with-windows-7");}).bind("mouseenter",this.ShowPinnedModal.bind(this)).bind("focus",this.ShowPinnedModal.bind(this)).bind("blur",this.HidePinnedModal.bind(this)).bind("keydown",this.OnKeydown.bind(this)).appendTo(iconContainer);}
if(this.Offer){$(DOMElements.P).addClass("icon_offer").html("Offer").attr("tabindex",0).bind("mouseenter",this.ShowOfferModal.bind(this)).bind("focus",this.ShowOfferModal.bind(this)).bind("blur",this.HideOfferModal.bind(this)).bind("keydown",this.OnKeydown.bind(this)).appendTo(iconContainer);}
previewContent.bind("mouseenter",this.HidePinnedModalDelayed.bind(this));var displayRolloverEffects=false;if(displayRolloverEffects){var rolloverContent=link.find("div");var truncatedDescription=TruncateTextWords(this.DescriptionText,15,"...");$("<aside/>").html(truncatedDescription).appendTo(rolloverContent);var logoImage=$(DOMElements.IMG).attr("rel",this.LogoSrc).attr("alt",this.Title)
logoImage.appendTo(rolloverContent);previewContent.bind("mouseenter",this.ShowRolloverModal.bind(this)).bind("mouseleave",this.HideRolloverModal.bind(this)).bind("mousemove",this.MoveRolloverCrosshair.bind(this)).bind("mouseenter",this.HidePinnedModal.bind(this));previewContent.data("animHighlight",true);previewContent.exhibitHover(true);}}},OnKeydown:function(e){var _self=this;switch(e.keyCode){case 13:case 32:$(e.currentTarget).trigger("click");e.preventDefault();break;}},ShowPinnedModal:function(e){var _self=this;if(GetIsTransitioning()===false){var pinnedExperience=$("#pinned_experience");window.clearInterval(window.HidePinnedModalDelayedInterval);pinnedExperience.unbind("mouseenter").bind("mouseenter",function(){window.clearInterval(window.HidePinnedModalDelayedInterval)});pinnedExperience.unbind("mouseleave").bind("mouseleave",this.HidePinnedModalDelayed.bind(this));var previewContent=$(e.currentTarget).closest("section.exhibit");if(previewContent.hasClass("medium")){var modalX=asInt(this.WindowUI.css("left"))+10;var modalY=asInt(this.WindowUI.css("top"))-105;}
else{var modalX=asInt(this.WindowUI.css("left"))+asInt(this.WindowUI.css("width"))-210;var modalY=asInt(this.WindowUI.css("top"))-90;}
pinnedExperience.css({left:modalX,top:modalY}).attr("data-elementID",this.ElementID).show();this.HideOfferModal(e);}},HidePinnedModalDelayed:function(e){window.clearInterval(window.HidePinnedModalDelayedInterval);window.HidePinnedModalDelayedInterval=window.setTimeout(this.HidePinnedModal.bind(this),500);},HidePinnedModal:function(e){$("#pinned_experience").hide();},ShowOfferModal:function(e){var _self=this;if(GetIsTransitioning()===false){var offerExperience=$("#offer_experience");window.clearInterval(window.HideOfferModalDelayedInterval);offerExperience.unbind("mouseenter").bind("mouseenter",function(){window.clearInterval(window.HideOfferModalDelayedInterval)});offerExperience.unbind("mouseleave").bind("mouseleave",this.HideOfferModalDelayed.bind(this));var previewContent=$(e.currentTarget).closest("section.exhibit");if(previewContent.hasClass("medium")){var modalX=asInt(this.WindowUI.css("left"))+10;var modalY=asInt(this.WindowUI.css("top"))-105;}
else{var modalX=asInt(this.WindowUI.css("left"))+asInt(this.WindowUI.css("width"))-210;var modalY=asInt(this.WindowUI.css("top"))-90;}
offerExperience.css({left:modalX,top:modalY}).attr("data-elementID",this.ElementID).show();this.HidePinnedModal(e);}},HideOfferModalDelayed:function(e){window.clearInterval(window.HideOfferModalDelayedInterval);window.HideOfferModalDelayedInterval=window.setTimeout(this.HideOfferModal.bind(this),500);},HideOfferModal:function(e){$("#offer_experience").hide();},ShowRolloverModal:function(e){if(GetIsTransitioning()===false){var previewContent=$(e.currentTarget);if(previewContent.is("a")){previewContent=previewContent.closest("section.exhibit");var position=previewContent.getAbsolutePosition();e.clientX=position.x;e.clientY=position.y+100;}
if(previewContent.hasClass("medium")){$("#modal_experience_title").html(this.Title);var truncatedDescription=TruncateTextLength(this.DescriptionText,400,"... (more)");$("#modal_experience_description").html(truncatedDescription);$("#modal_experience_logo").attr("src",this.LogoSrc);$("#modal_experience_favicon").attr("src",this.FaviconSrc);var expLayoutMgr=_layoutManagers[Const.EXPERIENCE_SECTION];expLayoutMgr.MoveRolloverModal(e);$("#modal_experience").show();$("<div/>").addClass("crosshair_experience").bind("click",function(){$(this).parent().children("a").trigger("click");}).css({left:-30,top:-30}).appendTo(previewContent);}}},HideRolloverModal:function(e){var previewContent=$(e.currentTarget);$("#modal_experience").hide();previewContent.find(".crosshair_experience").remove();},MoveRolloverCrosshair:function(e){var previewContent=$(e.currentTarget);var crosshair=previewContent.find(".crosshair_experience");var crosshairPosition=previewContent.getRelativePosition(e.clientX,e.clientY);crosshair.css({left:crosshairPosition.x-19,top:crosshairPosition.y-19});}});var AdvancedWindow=Class.create(ApplicationWindow,{PreviewSize:{w:292,h:220},PreviewMarkupSrc:"",InitLayout:function($super){var self=this;$super();var mainUI=this.WindowUI;if(this.PreviewMarkupSrc){mainUI.children(Selectors.PREVIEW_CONTENT).loadPage(this.PreviewMarkupSrc,function(){self.LoadContentComplete(self);});}},LoadContentComplete:function($super,selfRef){$super(selfRef);selfRef.WindowUI.children(Selectors.PREVIEW_CONTENT).addClass("focus");selfRef.UpdateAtlasTag();}});var ProductGuideSectionWindow=Class.create(ApplicationWindow,{Section:null,Subpages:[],CurrentSubpage:0,LoadContent:function(linkName){var self=this;var contentUrl=null;if(this.Subpages.length<1){contentUrl=this.ContentUrl;}else{linkName=$.trim(linkName).replace(self.LinkName+"/","");$.each(this.Subpages,function(i,item){if(item.LinkName===linkName){contentUrl=item.ContentUrl;self.CurrentSubpage=i;return false;}});if(contentUrl===null&&this.Subpages[0]!==undefined){contentUrl=this.Subpages[0].ContentUrl;this.CurrentSubpage=0;}}
DetachObjects();var content=self.WindowUI.children(Selectors.MAIN_CONTENT);var children=content.children().children();if((_browserHelper.IsIE9===true||_browserHelper.IsIE10===true)&&children.length>0){content=children;}
content.stop(true,true).fadeOut(400,function(){self.DisplaySpinner();self.WindowUI.children(Selectors.MAIN_CONTENT).empty().loadPage(contentUrl,function(){self.LoadContentComplete(self);});});this.UpdateAtlasTag();},LoadContentComplete:function($super,selfRef){var mainUI=selfRef.WindowUI;AttachObjects();var nextPage=selfRef.CurrentSubpage+1;var mainContent=mainUI.children(Selectors.MAIN_CONTENT);var children=mainContent.children().children();selfRef.HideSpinner();children.stop(true).hide();mainContent.stop(true).show();var wait=(selfRef.CurrentSubpage===0)?600:1;children.wait(wait).fadeIn(400);$(".next",mainContent).click(function(){if(selfRef.Subpages[nextPage]!==undefined){CallNavChange(Const.PRODUCT_GUIDE_SECTION+"/"+selfRef.LinkName+"/"+selfRef.Subpages[nextPage].LinkName);return false;}});mainUI.bindMeteorSharing();SetIsTransitioningContent(false);}});var ProductGuideFeatureWindow=Class.create(ApplicationWindow,{LinkTarget:"",InitLayout:function($super){var _self=this;$super();this.WindowUI.find(Selectors.PREVIEW_CONTENT+" a").unbind(("click"));this.WindowUI.find(Selectors.PREVIEW_CONTENT+" a").click(function(){if(!$(this.WindowUI).hasClass(Const.MAIN_WINDOW)){CallNavChange(_lastSectionString+"/"+_self.LinkTarget);}
return false;});}});var HomeMainPreview=Class.create(AdvancedWindow,{InitLayout:function($super){var self=this;$super();this.WindowUI.css({padding:5});this.WindowUI.find("section.preview > a").remove();this.WindowUI.removeClass("window_preview");this.WindowUI.unbind();}});var HomeContestPreview=Class.create(ApplicationWindow,{InitLayout:function($super){var self=this;var jsonData=_jsonLoader[GlobalContentUrls.HomeExperienceInfo];if(jsonData&&jsonData.ContestPartner){var item=jsonData.ContestPartner;this.DescriptionText=item.Title;this.PreviewImgSrc=item.ScreenshotImageUrl;this.PreviewFaviconSrc=item.ExperienceImageSmallUrl;this.LinkName=Const.EXPERIENCE_SECTION+"/"+item.DeepLinkUri;this.Title="Featured Contest<br>Winner";}
$super();if(this.PreviewFaviconSrc){var p=this.WindowUI.find(".content p");var favicon=$(DOMElements.DIV).addClass("favicon").append($(DOMElements.IMG).attr("src",this.PreviewFaviconSrc));favicon.prependTo(p);}}});var HomeOfferPreview=Class.create(ApplicationWindow,{InitLayout:function($super){var self=this;var jsonData=_jsonLoader[GlobalContentUrls.HomeExperienceInfo];var item=jsonData.OfferPartner;this.DescriptionText=item.Title+" in<br>Internet Explorer 9";this.PreviewImgSrc=item.ScreenshotImageUrl;this.PreviewFaviconSrc=item.ExperienceImageSmallUrl;this.LinkName=Const.EXPERIENCE_SECTION+"/"+item.DeepLinkUri;$super();var p=this.WindowUI.find(".content p");var favicon=$(DOMElements.DIV).addClass("favicon").append($(DOMElements.IMG).attr("src",this.PreviewFaviconSrc));favicon.prependTo(p);}});var HomePartnerPreview=Class.create(ApplicationWindow,{InitLayout:function($super){var self=this;var jsonData=_jsonLoader[GlobalContentUrls.HomeExperienceInfo];var item=jsonData.FeaturedPartner;this.DescriptionText=item.Title+" in<br>Internet Explorer 9";this.PreviewImgSrc=item.ScreenshotImageUrl;this.PreviewFaviconSrc=item.ExperienceImageSmallUrl;this.LinkName=Const.EXPERIENCE_SECTION+"/"+item.DeepLinkUri;$super();var p=this.WindowUI.find(".content p");var favicon=$(DOMElements.DIV).addClass("favicon").append($(DOMElements.IMG).attr("src",this.PreviewFaviconSrc));favicon.prependTo(p);}});var QuoteCyclerPane=Class.create(ApplicationWindow,{PreviewSize:{w:697,h:253},QuoteCyclerObject:null,InitLayout:function(){this.WindowUI=$("<aside/>").attr("id","quotes").css({width:this.PreviewSize.w,height:this.PreviewSize.h}).appendTo($(Selectors.MAIN_CONTAINER));QuoteCyclerObject=new QuoteCycler("quotes");this.WindowUI.hide();},HideWindow:function(animDur){QuoteCyclerObject.Stop();this.WindowUI.fadeOut(animDur===undefined?1000:animDur);},RevealWindow:function(){QuoteCyclerObject.Start();}});var FacebookLikePane=Class.create(ApplicationWindow,{FirstLoad:true,InitLayout:function(){this.WindowUI=$(DOMElements.DIV).attr('id','facebookLikePane').hide().append($('<fb:like></fb:like>').attr('href','http://www.facebook.com/internetexplorer').attr('width',this.PreviewSize.w)).css({width:this.PreviewSize.w,height:this.PreviewSize.h}).appendTo($(Selectors.MAIN_CONTAINER));if(this.FirstLoad==true){window.fbAsyncInit=this.FBLoaded;var e=document.createElement('script');e.type='text/javascript';e.src='http://connect.facebook.net/en_US/all.js';e.async=true;document.getElementById('fb-root').appendChild(e);this.FirstLoad=false;}else{this.FBLoaded();}},FBLoaded:function(){FB.init({appId:'209782939043908',status:true,cookie:true,xfbml:true,channelUrl:ConfigurationValues.FullUrl+'channel.html'});FB.Event.subscribe('edge.create',function(href,widget){LogAtlas("http://view.atdmt.com/action/UMIRF_IE9_BOW_Final_FacebookLikeTop");});}});var VideoListWindow=Class.create(ApplicationWindow,{ThumbnailPagerObject:null,InitLayout:function($super){$super();this.ThumbnailPagerObject=new ThumbnailPager($(Selectors.MAIN_CONTAINER));},HideWindow:function($super,animDur){var _self=this;_self.ThumbnailPagerObject.Detach();$super(animDur);},LoadContent:function(categoryId,thumbnailId,focusFirstThumbnail){var mainUI=this.WindowUI;var self=this;var contentUrl=self.ContentUrl+categoryId;self.DisplaySpinner();mainUI.children(Selectors.PREVIEW_CONTENT).stop(true,true).hide();mainUI.children(Selectors.MAIN_CONTENT).empty().loadPage(contentUrl,function(){self.ThumbnailPagerObject.Attach(categoryId,thumbnailId,focusFirstThumbnail);self.LoadContentComplete(self);});this.UpdateAtlasTag();}});var VideoViewerWindow=Class.create(ApplicationWindow,{LoadContent:function(onLoadFn){var mainUI=this.WindowUI;var self=this;self.DisplaySpinner();mainUI.children(Selectors.PREVIEW_CONTENT).stop(true,true).hide();mainUI.children(Selectors.MAIN_CONTENT).loadPage(self.ContentUrl,function(){self.LoadContentComplete(self);if(onLoadFn){onLoadFn();}});this.UpdateAtlasTag();}});var SearchListWindow=Class.create(ApplicationWindow,{SearchEngineObject:null,InitLayout:function($super){$super();this.SearchEngineObject=new BingSearch(this.WindowUI.children(Selectors.MAIN_CONTENT));this.WindowUI.removeClass("pane").removeClass("window_preview");this.WindowUI.children(Selectors.PREVIEW_CONTENT).stop(true,true).hide();this.WindowUI.children("#preview").html("");},LoadContent:function(searchTerm){var mainUI=this.WindowUI;var self=this;self.DisplaySpinner();this.SearchEngineObject.Search(searchTerm,function(){self.LoadContentComplete(self);});this.UpdateAtlasTag();}});var CampsWindow=Class.create(ApplicationWindow,{BingMapObject:null,HideWindow:function($super,animDur){var _self=this;if(this.BingMapObject){this.BingMapObject.Dispose();this.BingMapObject=null;}
$super(animDur);},LoadContentComplete:function($super,selfRef){$super(selfRef);var self=this;var bing_map=this.WindowUI.find("#bing_map");var address_textfield=this.WindowUI.find("#address_textfield");var search_button=this.WindowUI.find("#search_button");if(!Modernizr.input.placeholder){address_textfield.addPlaceholderText();}
search_button.bind("click",function(e){var addressString=address_textfield.val();if(addressString===address_textfield.attr("placeholder")){addressString="";}
self.BingMapObject.SearchAddressClick(addressString);});address_textfield.bind("keydown",function(e){switch(e.keyCode){case 13:search_button.trigger("click");e.preventDefault();break;}});this.BingMapObject=new BingMap({Map:bing_map},{Credentials:ConfigurationValues.BingMapsKey,LocationArray:_campsContent.SectionData["camps"],MaxLocationsDisplayed:3,MagnifyZoomDefault:5,MagnifyRadiusClosest:3,PinIconUrl:"/assets/images/content/camps-icon.png",PinIconSize:{width:89,height:72},InfoboxOffset:{x:0,y:197},InfoboxMovement:{x:50,y:50},InfoboxHtmlFn:self.InfoboxHtml.bind(self),InitializeCallbackFn:self.InitializeCallback.bind(self),DisposeCallbackFn:self.DisposeCallback.bind(self),GeolocationCallbackFn:self.GeolocationCallback.bind(self),SearchCallbackFn:self.SearchCallback.bind(self),ShowInfoBoxCallbackFn:self.ShowInfoBoxCallback.bind(self)});},InitializeCallback:function(){$(".camp_close, .camp_icon_overlay").live("click",this.InfoboxCloseCallback.bind(this));$(".camp_siteurl").live("click",this.InfoboxClickRegisterCallback.bind(this));},InfoboxCloseCallback:function(e){this.BingMapObject.HideAllInfoBox();},InfoboxClickRegisterCallback:function(e){var anchorLink=e.currentTarget;LogLink(null,anchorLink,"camp_registrations");},DisposeCallback:function(){$(".camp_close, .camp_icon_overlay").die("click");$(".camp_siteurl").die("click");},GeolocationCallback:function(match){if(match&&match.address){var addressString="";if(match.address.locality){addressString+=match.address.locality;}
if(match.address.adminDistrict){addressString+=", "+match.address.adminDistrict;}
if(match.address.countryRegion){addressString+=", "+match.address.countryRegion;}
if(match.address.postalCode){addressString+=" "+match.address.postalCode;}
if(addressString!=""){LogLink(addressString,null,"search_location");}}},SearchCallback:function(match){var address_textfield=this.WindowUI.find("#address_textfield");if(match){var addressString=address_textfield.val();if(addressString!=""){LogLink(addressString,null,"search_location");}}
else{alert("Sorry, no matching location was found for the address you provided.");try{address_textfield.focus();address_textfield.select();}
catch(e){}}},ShowInfoBoxCallback:function(location,pin,infobox){var name="";if(location.Name){name=location.Name;}
var addressString=this.AddressStringFromLocation(location,false);var nameAndAddressString=name+": "+addressString
LogLink(nameAndAddressString,null,"map_results");},ClickRegisterLinkCallback:function(){LogLink("","camp_registrations");},InfoboxHtml:function(location){var infoboxTemplate=$("#infobox_template").clone(true);var nameElement=infoboxTemplate.find(".camp_name");var addressElement=infoboxTemplate.find(".camp_address");var descriptionElement=infoboxTemplate.find(".camp_description");var datesElement=infoboxTemplate.find(".camp_dates");var facebookUrlElement=infoboxTemplate.find(".camp_facebookurl");var siteUrlElement=infoboxTemplate.find(".camp_siteurl");var activeContent=infoboxTemplate.find(".camp_active");var inactiveContent=infoboxTemplate.find(".camp_inactive");if(location.Active){activeContent.show();inactiveContent.hide();}
else{activeContent.hide();inactiveContent.show();}
var name="";if(location.Name){name=location.Name;}
nameElement.html(name);var address=this.AddressStringFromLocation(location,true);addressElement.html(address);var description="";if(location.Description){description=TruncateTextLength(location.Description,250,"...");}
descriptionElement.html(description);var dates="";if(location.Dates){dates="Camp dates "+location.Dates;}
datesElement.html(dates);if(location.FaceBookUrl){var facebookUrl=location.FaceBookUrl;facebookUrlElement.attr("href",facebookUrl);}
else{facebookUrlElement.html("&nbsp;");}
if(location.SiteUrl){var siteUrl=location.SiteUrl;siteUrlElement.attr("href",siteUrl);}
else{siteUrlElement.html("");}
return infoboxTemplate.html();},AddressStringFromLocation:function(location,includeStreetAddress){var address=[];if(includeStreetAddress){if(location.StreetAddress1){address.push(location.StreetAddress1);}
if(location.StreetAddress2){address.push(location.StreetAddress2);}
if(address.length>0){address.push("<br>")}}
if(location.City&&location.StateName){address.push(location.City+", "+location.StateName);}
else{if(location.City){address.push(location.City);}
if(location.StateName){address.push(location.StateName);}}
if(location.PostalCode){address.push(" "+location.PostalCode);}
if(location.CountryName){address.push(", "+location.CountryName);}
return address.join("");}});var BgContentHelperPane=Class.create(ApplicationWindow,{InitLayout:function(){if(_bulkLoader[this.PreviewMarkupSrc]!==null&&_bulkLoader[this.PreviewMarkupSrc]!==undefined){$(Selectors.MAIN_CONTAINER).append(_bulkLoader[this.PreviewMarkupSrc]);this.WindowUI=$(this.DescriptionText);this.WindowUI.hide();}else{var self=this;this.WindowUI=$("div#nothing");$.ajax({url:self.PreviewMarkupSrc,global:false,async:false,success:function(data){if(Modernizr.canvas){$(Selectors.MAIN_CONTAINER).append(data);}
else{$(Selectors.MAIN_CONTAINER).append(innerShiv(data));}
self.WindowUI=$(self.DescriptionText);self.WindowUI.hide();}});}},RevealWindow:function(animDur){this.WindowUI.stop(true).fadeIn(animDur===undefined?1500:animDur);},HideWindow:function(animDur){this.WindowUI.stop(true).fadeOut(animDur===undefined?1000:animDur);}});var BgContentHelperPaneAlt=Class.create(ApplicationWindow,{InitLayout:function(){if(_bulkLoader[this.PreviewMarkupSrc]!==null&&_bulkLoader[this.PreviewMarkupSrc]!==undefined){$(Selectors.MAIN_CONTAINER).append(_bulkLoader[this.PreviewMarkupSrc]);this.WindowUI=$(this.DescriptionText);this.WindowUI.css("visibility","hidden");}else{var self=this;this.WindowUI=$("div#nothing");$.ajax({url:self.PreviewMarkupSrc,global:false,async:false,success:function(data){if(Modernizr.canvas){$(Selectors.MAIN_CONTAINER).append(data);}
else{$(Selectors.MAIN_CONTAINER).append(innerShiv(data));}
self.WindowUI=$(self.DescriptionText);self.WindowUI.css("visibility","hidden");}});}},RevealWindow:function(animDur){this.WindowUI.stop(true).fadeIn(animDur===undefined?1500:animDur);},HideWindow:function(animDur){this.WindowUI.stop(true).fadeOut(animDur===undefined?1000:animDur);}});
;;;
var SectionTransitionManager=Class.create({CurrentSectionTransition:null,NewSectionTransition:null,SubItemUri:"",initialize:function(){},TransitionSections:function(subItemPath){if(this.NewSectionTransition===null||this.NewSectionTransition===undefined){return;}
SetIsTransitioning(true);SetIsTransitioningContent(false);if($.trim(subItemPath)!==""){this.SubItemUri=subItemPath;}
DetachObjects();$.each(this.NewSectionTransition.SectionItems,function(i,item){item.InitLayout();});if(this.CurrentSectionTransition!==null&&this.CurrentSectionTransition!==undefined){this.TransitionCurSectionOut();}else{this.TransitionNewSectionIn();}},TransitionCurSectionOut:function(){var self=this;$(window).one(Const.TRANSITION_OUT_COMPLETE,function(e){self.TransitionOutCallback(self);});this.CurrentSectionTransition.TransitionOut();},TransitionOutCallback:function(thisReference){$.each(this.CurrentSectionTransition.SectionItems,function(index,item){item.DestroyUI();});thisReference.TransitionNewSectionIn();},TransitionNewSectionIn:function(){var self=this;if(this.NewSectionTransition!==null&&this.NewSectionTransition!==undefined){var sectionAdderString="section_";$(Const.MAIN_BODY).addClass(sectionAdderString+this.NewSectionTransition.SectionString);if(this.CurrentSectionTransition!==undefined&&this.CurrentSectionTransition!==null){$(Const.MAIN_BODY).removeClass(sectionAdderString+this.CurrentSectionTransition.SectionString);}
if(this.NewSectionTransition.SectionString!=="home"){$(Const.MAIN_BODY).removeClass(sectionAdderString+"home");}
$(window).one(Const.TRANSITION_IN_COMPLETE,function(e){self.TransitionInCallback(self);});this.NewSectionTransition.PreTransition(this.SubItemUri);self.CurrentSectionTransition=self.NewSectionTransition;}},TransitionInCallback:function(thisReference){thisReference.CurrentSectionTransition=thisReference.NewSectionTransition;thisReference.NewSectionTransition=null;try{var atlasimg=$.trim(_mainController.SectionTrackingImg[thisReference.CurrentSectionTransition.SectionString]);LogAtlas(atlasimg);}catch(e){}
thisReference.SubItemUri="";_titleManager.FinishTitleSwap();SetIsTransitioning(false);$(Selectors.MAIN_CONTAINER).attr("aria-busy","false");SetupMainNav();}});
;;;
var HomeSectionTransition=Class.create(SectionTransitionBase,{NAME:"HomeSectionTransition",TransitionOut:function(){var self=this;this.SectionItems[5].HideWindow(750);$("#atlas_home_tag").remove();this.SectionItems[4].HideWindow(750);this.SectionItems[6].HideWindow(750);this.SectionItems[1].WindowUI.wait(1).animate({opacity:0,left:self.SectionItems[1].GridX+300},{easing:EasingTypes.InBack,duration:400});this.SectionItems[2].WindowUI.wait(100).animate({opacity:0,left:self.SectionItems[2].GridX+300},{easing:EasingTypes.InBack,duration:400});this.SectionItems[3].WindowUI.wait(200).animate({opacity:0,left:self.SectionItems[3].GridX+300},{easing:EasingTypes.InBack,duration:400});this.SectionItems[0].WindowUI.wait(200).animate({opacity:0},{easing:EasingTypes.InQuad,duration:600});$(window).wait(1200,function(){$(window).trigger(Const.TRANSITION_OUT_COMPLETE);});},TransitionIn:function(){var self=this;_titleManager.FinishTitleSwap();$(self.SectionItems[5].WindowUI[0]).css({display:"inline",opacity:0}).wait(250).animate({opacity:1},{easing:"linear",duration:750,complete:function(){$(this).css("opacity","");}});self.SectionItems[4].WindowUI.css({top:self.SectionItems[4].GridY,left:self.SectionItems[4].GridX});self.SectionItems[4].WindowUI.css({display:"inline",opacity:0}).wait(500).animate({opacity:1},{easing:"linear",duration:750,complete:function(){$(this).css("opacity","");}});self.SectionItems[4].RevealWindow();self.SectionItems[1].WindowUI.css({opacity:0,left:self.SectionItems[1].GridX+300,top:self.SectionItems[1].GridY});self.SectionItems[1].WindowUI.show();self.SectionItems[1].WindowUI.wait(500).animate({opacity:1,left:self.SectionItems[1].GridX,top:self.SectionItems[1].GridY},{easing:EasingTypes.OutBack,duration:400});self.SectionItems[2].WindowUI.css({opacity:0,left:self.SectionItems[2].GridX+300,top:self.SectionItems[2].GridY});self.SectionItems[2].WindowUI.show();self.SectionItems[2].WindowUI.wait(600).animate({opacity:1,left:self.SectionItems[2].GridX,top:self.SectionItems[2].GridY},{easing:EasingTypes.OutBack,duration:400});self.SectionItems[3].WindowUI.css({opacity:0,left:self.SectionItems[3].GridX+300,top:self.SectionItems[3].GridY});self.SectionItems[3].WindowUI.show();self.SectionItems[3].WindowUI.wait(700).animate({opacity:1,left:self.SectionItems[3].GridX,top:self.SectionItems[3].GridY},{easing:EasingTypes.OutBack,duration:400});self.SectionItems[6].WindowUI.css({opacity:0,left:self.SectionItems[6].GridX,top:self.SectionItems[6].GridY});self.SectionItems[6].WindowUI.show();self.SectionItems[6].WindowUI.wait(1000).animate({opacity:1},{easing:'linear',duration:750});self.SectionItems[0].WindowUI.css({opacity:0,left:self.SectionItems[0].GridX-100,top:self.SectionItems[0].GridY});self.SectionItems[0].WindowUI.show();self.SectionItems[0].WindowUI.wait(1000).animate({opacity:1,top:self.SectionItems[0].GridY,left:self.SectionItems[0].GridX},{easing:EasingTypes.OutQuad,duration:600});$(window).wait(1750,function(){$(window).trigger(Const.TRANSITION_IN_COMPLETE);});var previous=_mainController.PathHistory.length;var iframe=$("#atlas_home_tag");var framesource="";if(previous>=2)
framesource="http://view.atdmt.com/iaction/UMIRF_IE9_BOW_Final_Home";else
framesource="http://view.atdmt.com/iaction/UMIRF_IE9_BOW_Final_InitialView_Home";iframe.replaceWith('<iframe id="atlas_home_tag" src="'+framesource+'" width="1" height="1"></iframe>');}});var DevelopingSectionTransition=Class.create(SectionTransitionBase,{NAME:"DevelopingSectionTransition",TransitionIn:function($super,subItemPath){$super();var layoutMgr=_layoutManagers[Const.DEVELOPING_SECTION];layoutMgr.TransitionIn();if($.trim(subItemPath)!==""){this.TransitionToSectionDeepLink(subItemPath,"");}else{this.TransitionToSectionLanding();}
$(window).wait(1100,function(){$(window).trigger(Const.TRANSITION_IN_COMPLETE);});},TransitionToSectionLanding:function(){var layoutMgr=_layoutManagers[Const.DEVELOPING_SECTION];layoutMgr.SetState("landing");layoutMgr.TransitionOutState();if(layoutMgr.CurrentLayoutState!=="category"){layoutMgr.TransitionInLanding();}
else{$(window).wait(1500,layoutMgr.TransitionInLanding.bind(layoutMgr));}
_lastRemainPathString="";_lastSectionString=Const.DEVELOPING_SECTION;},TransitionToSectionDeepLink:function(subItemPath,lastRemainPathString){var layoutMgr=_layoutManagers[Const.DEVELOPING_SECTION];if(lastRemainPathString===null||lastRemainPathString===undefined){lastRemainPathString=_lastRemainPathString;}
var lastRemainPathArr=lastRemainPathString.split("/");var subItemPathArr=subItemPath.split("/");if(lastRemainPathArr[0]===""){lastRemainPathArr.splice(0,1)};if(subItemPathArr[0]===""){subItemPathArr.splice(0,1)};var isStateChange=false;if(lastRemainPathArr.length!=subItemPathArr.length){isStateChange=true;}
if(subItemPathArr.length>=1){layoutMgr.SetState("category");}
if(isStateChange){layoutMgr.TransitionOutState();layoutMgr.TransitionToItem(subItemPath);_lastRemainPathString=subItemPath;_lastSectionString=Const.DEVELOPING_SECTION;return true;}
else{return false;}},TransitionOut:function(){var layoutMgr=_layoutManagers[Const.DEVELOPING_SECTION];layoutMgr.TransitionOut();$(window).wait(500,function(){$(window).trigger(Const.TRANSITION_OUT_COMPLETE);});}});var ExperienceSectionTransition=Class.create(SectionTransitionBase,{NAME:"ExperienceSectionTransition",TransitionIn:function($super,subItemPath){$super();var onComplete=this.TransitionInComplete.bind(this,subItemPath);if(!_experienceContent.SectionData){_bulkLoader.AddUrl(GlobalContentUrls.ExperienceListInfo);_bulkLoader.AddUrl(GlobalContentUrls.ExperienceCategoryData);_bulkLoader.LoadData(onComplete);}
else{onComplete();}},TransitionInComplete:function(subItemPath){if(!_experienceContent.SectionData){_experienceContent=new ExperienceContent();}
var layoutMgr=_layoutManagers[Const.EXPERIENCE_SECTION];layoutMgr.TransitionIn();if($.trim(subItemPath)!==""){this.TransitionToSectionDeepLink(subItemPath,"");}else{this.TransitionToSectionLanding();}
$(window).wait(1100,function(){$(window).trigger(Const.TRANSITION_IN_COMPLETE);});},TransitionToSectionLanding:function(){var layoutMgr=_layoutManagers[Const.EXPERIENCE_SECTION];layoutMgr.SetState("landing");layoutMgr.TransitionOutState();if(layoutMgr.CurrentLayoutState!=="category"){layoutMgr.TransitionInLanding();}
else{$(window).wait(900,layoutMgr.TransitionInLanding.bind(layoutMgr));}
_lastRemainPathString="";_lastSectionString=Const.EXPERIENCE_SECTION;},TransitionToSectionDeepLink:function(subItemPath,lastRemainPathString){var layoutMgr=_layoutManagers[Const.EXPERIENCE_SECTION];if(lastRemainPathString===null||lastRemainPathString===undefined){lastRemainPathString=_lastRemainPathString;}
var isStateChange=false;if(lastRemainPathString.indexOf("category")<0&&subItemPath.indexOf("category")>=0){isStateChange=true;}
else if(lastRemainPathString.indexOf("category")>=0&&subItemPath.indexOf("category")<0){isStateChange=true;}
else if(lastRemainPathString.length===0&&subItemPath.indexOf("category")<0){isStateChange=true;}
if(subItemPath.indexOf("category")>=0){layoutMgr.SetState("category");}
else{layoutMgr.SetState("partner");}
if(isStateChange){layoutMgr.TransitionOutState();layoutMgr.TransitionToItem(subItemPath);_lastRemainPathString=subItemPath;_lastSectionString=Const.EXPERIENCE_SECTION;return true;}
else{return false;}},TransitionOut:function(){var layoutMgr=_layoutManagers[Const.EXPERIENCE_SECTION];layoutMgr.TransitionOut();$(window).wait(1100,function(){$(window).trigger(Const.TRANSITION_OUT_COMPLETE);});}});var ProductGuideSectionTransition=Class.create(SectionTransitionBase,{NAME:"ProductGuideSectionTransition",TransitionOut:function(){_layoutManagers[Const.PRODUCT_GUIDE_SECTION].CurrentType=null;_layoutManagers[Const.PRODUCT_GUIDE_SECTION].CurrentSection="";$(Selectors.PRODUCT_CURRENT_SECTION).removeClass(Const.PRODUCT_CURRENT_SECTION);$(Const.MAIN_BODY).removeClass(Const.PRODUCT_GUIDE_HOME_SECTION);$("#back_productguide").stop(true).fadeOut();$(".overlay_fade").stop(true).fadeOut(400,function(){$(this).remove();});this.SectionItems=$.grep(this.SectionItems,function(item){item.HideWindow();if(item.Type===Const.WINDOWTYPE_PRODUCT_PAGES||item.Type===Const.WINDOWTYPE_PRODUCT_FEATURE){item.DestroyUI();return false;}else{return true;}});$(window).wait(750,function(){$(window).trigger(Const.TRANSITION_OUT_COMPLETE);});},TransitionIn:function($super,subItemPath){$super();var onComplete=this.TransitionInComplete.bind(this,subItemPath);if(!_productGuideContent.SectionData){_bulkLoader.AddUrl(GlobalContentUrls.ProductGuideInfo);_bulkLoader.LoadData(onComplete);}
else{onComplete();}},TransitionInComplete:function(subItemPath){if(!_productGuideContent.SectionData){_productGuideContent=new ProductGuideContent();}
if($.trim(subItemPath)!==""){$.each(this.SectionItems,function(index,item){var pos={top:-200,left:-400};if(item.Type===Const.WINDOWTYPE_STANDARD||item.Type===Const.WINDOWTYPE_STATICCONTENT){return;}else if(item.Type===Const.WINDOWTYPE_PRODUCT_SECTION||item.Type===Const.WINDOWTYPE_PRODUCT_FEATURES){pos.top=250;}
item.WindowUI.css(pos);item.RevealWindow(750);});$("#back_productguide, #product_guide_download").stop(true).wait(800).fadeIn(1200,function(){$(this).css("opacity","");});_layoutManagers[Const.PRODUCT_GUIDE_SECTION].TransitionToItem(subItemPath);}else{$.each(this.SectionItems,function(index,item){item.WindowUI.css({top:StageValues.TransitionStartY,left:StageValues.TransitionStartX});item.RevealWindow(750);if(item.Type===Const.WINDOWTYPE_STANDARD){item.LoadContent();}
item.WindowUI.animate({top:item.GridY,left:item.GridX},{queue:false,easing:EasingTypes.InOutQuad,duration:750});});$("#back_productguide").stop(true).hide().css({opacity:""});$("div."+Const.WINDOWTYPE_STANDARD).eq(0).setAsMainWindow();$(Const.MAIN_BODY).addClass(Const.PRODUCT_GUIDE_HOME_SECTION);}
$(window).wait(750,function(){$(window).trigger(Const.TRANSITION_IN_COMPLETE);});},TransitionToSectionLanding:function(){this.TransitionOut();$.each(this.SectionItems,function(index,item){var mainUI=item.GetWindowUI();item.RevealWindow(750);$("#back_productguide").stop(true).fadeOut();if(item.Type!==Const.WINDOWTYPE_STATICCONTENT){mainUI.animate({top:item.GridY,left:item.GridX,height:item.PreviewSize.h,width:item.PreviewSize.w},{queue:false,easing:EasingTypes.InOutQuad,duration:750});}
if(item.Type===Const.WINDOWTYPE_PRODUCT_SECTION){mainUI.removeClass(Const.NAV_PRODUCT_SECTION).removeClass(Const.PRODUCT_CURRENT_SECTION).find("p").fadeIn();}
if(item.Type===Const.WINDOWTYPE_PRODUCT_OVERVIEW){mainUI.children(Selectors.MAIN_CONTENT).stop(true).fadeOut(750,function(){mainUI.children(Selectors.PREVIEW_CONTENT).stop(true).fadeIn();}).empty();}
if(item.Type===Const.WINDOWTYPE_STANDARD){item.LoadContent();}
mainUI.css("opacity","");});$("div."+Const.WINDOWTYPE_STANDARD).eq(0).setAsMainWindow();$(Const.MAIN_BODY).addClass(Const.PRODUCT_GUIDE_HOME_SECTION);_lastRemainPathString="";}});var HighlightsSectionTransition=Class.create(SectionTransitionBase,{NAME:"HighlightsSectionTransition",ImagesPreloaded:false,TransitionOut:function(){$.each(this.SectionItems,function(index,item){if(item.WindowUI.hasClass(Const.MAIN_WINDOW)){item.WindowUI.animate({top:900,left:600},{queue:false,easing:EasingTypes.InOutQuad,duration:750});}else{item.WindowUI.animate({top:900,left:-600},{queue:false,easing:EasingTypes.InOutQuad,duration:750});}});$(window).wait(750,function(){$(window).trigger(Const.TRANSITION_OUT_COMPLETE);});},TransitionIn:function($super,subItemPath){if($.trim(subItemPath).length===0){subItemPath="all-around-fast";SWFAddress.setValue(Const.HIGHLIGHTS_SECTION+"/"+subItemPath);}
if(!this.ImagesPreloaded){this.ImagesPreloaded=true;var imagesToPreload=["/assets/images/content/highlights-seamless-bubble.png","/assets/images/content/highlights-seamless-desktop.jpg","/assets/images/content/highlights-seamless-taskbar.png","/assets/images/content/highlights-seamless-tiles.png","/assets/images/layout/tooltip-hotspot-small.png"];$.each(imagesToPreload,function(i,src){var image=new Image();image.src=src;});}
$super();var topFeatures=null;var matchedIndex=null;$.each(this.SectionItems,function(i,el){if(el.Type===Const.WINDOWTYPE_PRODUCT_FEATURES){topFeatures=el;}
if(el.LinkName===subItemPath){matchedIndex=i;}});if(matchedIndex===null){matchedIndex=0;}
var leftSideItems=[];var i=matchedIndex;for(var count=0;count<this.SectionItems.length;count++){var el=this.SectionItems[i];if(el.Type!==Const.WINDOWTYPE_PRODUCT_FEATURES){leftSideItems.push(el);}
i++;if(i>=this.SectionItems.length){i=0;}}
topFeatures.WindowUI.find("a").unbind().click(function(){CallNavChange(Const.PRODUCT_GUIDE_SECTION+"/top-features");return false;});topFeatures.WindowUI.css({top:-800,left:topFeatures.GridX}).show().animate({top:topFeatures.GridY},{duration:700});$.each(leftSideItems,function(index,item){item.WindowUI.setPosition({x:0,y:0-(index*200)},item.PreviewSize);item.RevealWindow(600);});_layoutManagers[Const.HIGHLIGHTS_SECTION].SectionUIObjects=leftSideItems;_layoutManagers[Const.HIGHLIGHTS_SECTION].TransitionToItem(subItemPath);$(window).wait(1000,function(){$(window).trigger(Const.TRANSITION_IN_COMPLETE);});},TransitionToSectionLanding:function(){CallNavChange(Const.HIGHLIGHTS_SECTION+"/all-around-fast");}});var DownloadSectionTransition=Class.create(SectionTransitionBase,{NAME:"DownloadSectionTransition",TransitionOut:function(){this.Transition(false);$(window).wait(1500,function(){$(window).trigger(Const.TRANSITION_OUT_COMPLETE);$(Const.MAIN_BODY).removeClass("section_thankyou");});},TransitionIn:function(){$("div#logo").fadeIn(1000);this.Transition(true);$(window).wait(1000,function(){$(window).trigger(Const.TRANSITION_IN_COMPLETE);});},Transition:function(transitioningIn){var downloadBtn=$(Selectors.DOWNLOAD_MESSAGE);var downloadBtnPos=null;if(transitioningIn===true){downloadBtnPos=downloadBtn.getAbsolutePosition(0,0);downloadBtnPos.x-=$(Selectors.MAIN_CONTAINER).offset().left;downloadBtnPos.y-=$(Selectors.MAIN_CONTAINER).offset().top;this.downloadBtnPos=downloadBtnPos;}else{downloadBtnPos=this.downloadBtnPos;}
var downloadPane=this.SectionItems[0];if(transitioningIn===false&&this.SectionItems[1].WindowUI.hasClass(Const.MAIN_WINDOW)){downloadPane=this.SectionItems[1];}
curveDownloadBtn={x:downloadBtnPos.x,y:downloadBtnPos.y,angle:-90,length:0.8};curveMainWindowPos={x:downloadPane.GridX,y:downloadPane.GridY,angle:180,length:0.8};if(transitioningIn===true){downloadPane.WindowUI.setPosition({x:downloadBtnPos.x,y:downloadBtnPos.y},{w:downloadBtn.width(),h:downloadBtn.height()});endW=downloadPane.DestinationSize.w;endH=downloadPane.DestinationSize.h;animParams={start:curveDownloadBtn,end:curveMainWindowPos};downloadPane.RevealWindow(1000);downloadBtn.fadeOut();}else{animParams={start:curveMainWindowPos,end:curveDownloadBtn};endW=downloadBtn.width();endH=downloadBtn.height();downloadPane.HideWindow(2000);if(_browserHelper.IsIE9===false||_browserHelper.IsIE9Preview===true){downloadBtn.wait(1200).css({opacity:0}).show().css({display:"block"}).animate({opacity:1},{duration:1000,complete:function(){$(this).css({opacity:""});}});}}
downloadPane.WindowUI.animate({path:new $.path.bezier(animParams),width:endW,height:endH},{queue:false,duration:1500,easing:EasingTypes.InOutQuad}).setAsMainWindow();}});var ErrorSectionTransition=Class.create(SectionTransitionBase,{TransitionOut:function(){var relevantItem=this.SectionItems[0];$(relevantItem.WindowUI[0]).animate({top:-100},{easing:EasingTypes.InBack,duration:700});$(relevantItem.WindowUI[1]).animate({left:-500},{easing:EasingTypes.InBack,duration:700});$(window).wait(700,function(){$(window).trigger(Const.TRANSITION_OUT_COMPLETE);});},TransitionIn:function(){var relevantItem=this.SectionItems[0];$(relevantItem.WindowUI[0]).css({left:0,top:-100}).show();$(relevantItem.WindowUI[1]).css({left:-150,top:150}).show();$(relevantItem.WindowUI[0]).animate({top:108},{easing:EasingTypes.OutBack,duration:700});$(relevantItem.WindowUI[1]).animate({left:-4},{easing:EasingTypes.OutBack,duration:700});$(window).wait(700,function(){$(window).trigger(Const.TRANSITION_IN_COMPLETE);});}});var HotmailSectionTransition=Class.create(SectionTransitionBase,{NAME:"HotmailSectionTransition",PreTransition:function($super,subItemUri){StageValues.PlayIntroVideo=false;$super(subItemUri);},TransitionOut:function(){$("#page_overlay").fadeOut(function(){$(this).remove();});$("div#logo").fadeIn(700);this.SectionItems[0].GetWindowUI().animate({top:250,opacity:0});try{var nextSection=_transitionManager.NewSectionTransition.SectionString;var atlasImg="";if(nextSection==Const.HIGHLIGHTS_SECTION){atlasImg="http://view.atdmt.com/action/UMIRF_IE9_BOW_Hotmail_Interstitial_LMLink";}else if(nextSection==Const.DOWNLOAD_SECTION){atlasImg="http://view.atdmt.com/action/UMIRF_IE9_BOW_Hotmail_Interstitial_DLButtonLink";}
LogAtlas(atlasImg)}catch(e){}
$(window).wait(700,function(){$(window).trigger(Const.TRANSITION_OUT_COMPLETE);});},TransitionIn:function(){var item=this.SectionItems[0];$("div#logo").fadeOut(300,function(){item.GetWindowUI().css({zIndex:900,top:item.GridY,left:item.GridX,width:item.DestinationSize.w,height:item.DestinationSize.h}).setAsMainWindow().fadeIn(600);});$(DOMElements.DIV).addClass("lightbox").css({opacity:0.0,zIndex:4,display:"inline",width:($(window).width()+500),height:($(window).height()+500)}).attr("id","page_overlay").hide().prependTo('#wrapper_inner').fadeIn();$(window).wait(700,function(){$(window).trigger(Const.TRANSITION_IN_COMPLETE);});}});var VideosSectionTransition=Class.create(SectionTransitionBase,{NAME:"VideosSectionTransition",TransitionOut:function(){var layoutManager=_layoutManagers[Const.VIDEOS_SECTION];layoutManager.CurrentCategoryId="";this.SectionItems[0].WindowUI.stop(true).animate({left:this.SectionItems[0].GridX,top:-1500},{easing:EasingTypes.InOutQuad,duration:750,complete:function(){$(this).css("opacity","");}});this.SectionItems[1].WindowUI.stop(true).animate({left:1500,top:this.SectionItems[1].GridY},{easing:EasingTypes.InOutQuad,duration:750,complete:function(){$(this).css("opacity","");}});this.SectionItems[1].HideWindow();for(var i=2;i<this.SectionItems.length;i++){this.SectionItems[i].HideWindow();}
$(window).wait(750,function(){$(window).trigger(Const.TRANSITION_OUT_COMPLETE);});},TransitionIn:function(subItemPath){var _self=this;var layoutManager=_layoutManagers[Const.VIDEOS_SECTION];layoutManager.CurrentCategoryId="";if($.trim(subItemPath).length===0){subItemPath="overview";SWFAddress.setValue(Const.VIDEOS_SECTION+"/"+subItemPath);}
this.SectionItems[0].WindowUI.removeClass(Const.PREVIEW_WINDOW);this.SectionItems[1].WindowUI.removeClass(Const.PREVIEW_WINDOW);this.SectionItems[0].WindowUI.setPosition({x:-1500,y:this.SectionItems[0].GridY},this.SectionItems[0].PreviewSize);this.SectionItems[0].WindowUI.show();this.SectionItems[0].WindowUI.stop(true).animate({left:this.SectionItems[0].GridX,top:this.SectionItems[0].GridY},{easing:EasingTypes.OutQuad,duration:750,complete:function(){}});this.SectionItems[1].WindowUI.setPosition({x:this.SectionItems[1].GridX,y:1500},this.SectionItems[1].PreviewSize);this.SectionItems[1].WindowUI.show();this.SectionItems[1].WindowUI.stop(true).animate({left:this.SectionItems[1].GridX,top:this.SectionItems[1].GridY},{easing:EasingTypes.OutQuad,duration:750,complete:function(){$(this).setAsMainWindow();if(_self.SectionItems[1].ThumbnailPagerObject){_self.SectionItems[1].ThumbnailPagerObject.ExpandThumbnailInitial();}}});for(var i=2;i<this.SectionItems.length;i++){this.SectionItems[i].WindowUI.stop(true).fadeIn(750);this.SectionItems[i].WindowUI.setPosition({x:this.SectionItems[i].GridX,y:this.SectionItems[i].GridY},this.SectionItems[i].PreviewSize);}
var onCompleteFn=layoutManager.TransitionToItem.bind(layoutManager,subItemPath);this.SectionItems[0].LoadContent(onCompleteFn);$(window).wait(750,function(){$(window).trigger(Const.TRANSITION_IN_COMPLETE);});}});var SearchSectionTransition=Class.create(SectionTransitionBase,{NAME:"SearchSectionTransition",TransitionOut:function(){var _self=this;$(".section_search .search_box").fadeOut(function(){$(this).remove();});this.SectionItems[0].WindowUI.stop(true).animate({left:-2000},{easing:EasingTypes.InOutQuad,duration:750});$(window).wait(750,function(){$(window).trigger(Const.TRANSITION_OUT_COMPLETE);});},TransitionIn:function(subItemPath){var _self=this;this.CreateSearchField().prependTo(Selectors.MAIN_CONTAINER);$(".section_search .search_box").fadeIn(1200,function(){$(this).css("opacity","");$(".section_search .search_input").focus();});this.SectionItems[0].WindowUI.setPosition({x:this.SectionItems[0].GridX,y:this.SectionItems[0].GridY},this.SectionItems[0].PreviewSize);this.SectionItems[0].RevealWindow(0);var searchLayoutMgr=_layoutManagers[Const.SEARCH_SECTION];if(subItemPath!==null&&subItemPath!==undefined&&subItemPath!==""){searchLayoutMgr.TransitionToItem(subItemPath);}
$(window).wait(1000,function(){$(window).trigger(Const.TRANSITION_IN_COMPLETE);});},CreateSearchField:function(){var _self=this;var section=$("<section/>").addClass("search_box").append($("<input/>").attr("type","text").attr("class","search_input").bind("keydown",function(e){_self.KeydownSearch(e,section);})).append($("<input/>").attr("type","submit").attr("class","search_submit").bind("click",function(e){_self.SubmitSearch(section);}));return section;},KeydownSearch:function(e,section){switch(e.keyCode){case 13:this.SubmitSearch(section);break;}},SubmitSearch:function(section){var searchTerm=$(section).find(".search_input").val();var encodedSearchTerm=encodeURIComponent(searchTerm);HideQuickSearch();CallNavChange(Const.SEARCH_SECTION+"/"+encodedSearchTerm);$(".section_search .search_input").focus();}});var NewInRCSectionTransition=Class.create(SectionTransitionBase,{NAME:"NewInRCSectionTransition",PreTransition:function($super,subItemUri){StageValues.PlayIntroVideo=false;$super(subItemUri);},TransitionOut:function(){$("#page_overlay").fadeOut(function(){$(this).remove();});this.SectionItems[0].GetWindowUI().animate({top:250,opacity:0});$(window).wait(700,function(){$(window).trigger(Const.TRANSITION_OUT_COMPLETE);});},TransitionIn:function(){var item=this.SectionItems[0];item.GetWindowUI().css({zIndex:900,top:item.GridY,left:item.GridX,width:item.DestinationSize.w,height:item.DestinationSize.h,overflow:"hidden"}).setAsMainWindow().fadeIn(600);item.LoadContent();$(window).wait(1000,function(){$(window).trigger(Const.TRANSITION_IN_COMPLETE);});}});var UnpluggedTeaserSectionTransition=Class.create(SectionTransitionBase,{NAME:"UnpluggedTeaserSectionTransition",PreTransition:function($super,subItemUri){StageValues.PlayIntroVideo=false;$super(subItemUri);},TransitionOut:function(){this.SectionItems[0].HideWindow(750);$(window).wait(1000,function(){$(window).trigger(Const.TRANSITION_OUT_COMPLETE);});},TransitionIn:function($super,subItemPath){$super();var static_content=this.SectionItems[0].WindowUI;var contest_tease_copy=$(static_content[0]);var contest_tease_copyright=$(static_content[1]);contest_tease_copy.hide();contest_tease_copy.wait(250).fadeIn(1000);DevUnpluggedManagerObj.KeepHidden=true;DevUnpluggedManagerObj.Close();$(window).wait(750,function(){$(window).trigger(Const.TRANSITION_IN_COMPLETE);});}});var UnpluggedLegacySectionTransition=Class.create(SectionTransitionBase,{NAME:"UnpluggedSectionTransition",TransitionIn:function($super,subItemPath){$super();var static_content=this.SectionItems[0].WindowUI;var landing_unplugged=$(static_content[0]);landing_unplugged.wait(250).fadeIn(1000);DevUnpluggedManagerObj.KeepHidden=true;DevUnpluggedManagerObj.Close();$(window).wait(750,function(){$(window).trigger(Const.TRANSITION_IN_COMPLETE);});},TransitionOut:function(){this.SectionItems[0].HideWindow(750);$(window).wait(1100,function(){$(window).trigger(Const.TRANSITION_OUT_COMPLETE);});}});var UnpluggedSectionTransition=Class.create(SectionTransitionBase,{NAME:"UnpluggedSectionTransition",TransitionIn:function($super,subItemPath){$super();DevUnpluggedManagerObj.KeepHidden=true;DevUnpluggedManagerObj.Close();var onComplete=this.TransitionInComplete.bind(this,subItemPath);if(!_unpluggedContent.SectionData){_bulkLoader.AddUrl(GlobalContentUrls.UnpluggedListInfo);_bulkLoader.LoadData(onComplete);}
else{onComplete();}},TransitionInComplete:function(subItemPath){if(!_unpluggedContent.SectionData){_unpluggedContent=new UnpluggedContent();}
var layoutMgr=_layoutManagers[Const.UNPLUGGED_SECTION];layoutMgr.TransitionIn();if($.trim(subItemPath)!==""){this.TransitionToSectionDeepLink(subItemPath,"");}else{this.TransitionToSectionLanding();}
$(window).wait(1100,function(){$(window).trigger(Const.TRANSITION_IN_COMPLETE);});},TransitionToSectionLanding:function(){var layoutMgr=_layoutManagers[Const.UNPLUGGED_SECTION];layoutMgr.SetState("landing");layoutMgr.TransitionOutState();if(layoutMgr.CurrentLayoutState!=="category"){layoutMgr.TransitionInLanding();}
else{$(window).wait(900,layoutMgr.TransitionInLanding.bind(layoutMgr));}
_lastRemainPathString="";_lastSectionString=Const.UNPLUGGED_SECTION;},TransitionToSectionDeepLink:function(subItemPath,lastRemainPathString){var layoutMgr=_layoutManagers[Const.UNPLUGGED_SECTION];if(lastRemainPathString===null||lastRemainPathString===undefined){lastRemainPathString=_lastRemainPathString;}
var lastRemainPathArr=lastRemainPathString.split("/");var subItemPathArr=subItemPath.split("/");if(lastRemainPathArr[0]===""){lastRemainPathArr.splice(0,1)};if(subItemPathArr[0]===""){subItemPathArr.splice(0,1)};var isStateChange=false;if(lastRemainPathArr.length!=subItemPathArr.length){isStateChange=true;}
if(subItemPathArr.length===1){layoutMgr.SetState("category");}
else{layoutMgr.SetState("partner");}
if(isStateChange){layoutMgr.TransitionOutState();layoutMgr.TransitionToItem(subItemPath);_lastRemainPathString=subItemPath;_lastSectionString=Const.UNPLUGGED_SECTION;return true;}
else{return false;}},TransitionOut:function(){var layoutMgr=_layoutManagers[Const.UNPLUGGED_SECTION];layoutMgr.TransitionOut();$(window).wait(1100,function(){$(window).trigger(Const.TRANSITION_OUT_COMPLETE);});}});var CampsSectionTransition=Class.create(SectionTransitionBase,{NAME:"CampsSectionTransition",TransitionOut:function(){this.SectionItems[0].HideWindow(750);this.SectionItems[1].HideWindow(750);$("#back_camps").remove();$(window).wait(750,function(){$(window).trigger(Const.TRANSITION_OUT_COMPLETE);});},TransitionIn:function($super,subItemPath){var self=this;$super();var onComplete=this.TransitionInComplete.bind(this,subItemPath);if(!_campsContent.SectionData){_bulkLoader.AddUrl(GlobalContentUrls.CampsData);_bulkLoader.LoadData(onComplete);}
else{onComplete();}},TransitionInComplete:function(subItemPath){var self=this;if(!_campsContent.SectionData){_campsContent=new CampsContent();}
this.SectionItems[1].LoadContent();this.SectionItems[1].WindowUI.setPosition({x:this.SectionItems[1].GridX-100,y:this.SectionItems[1].GridY},this.SectionItems[1].DestinationSize);this.SectionItems[1].WindowUI.css({opacity:0}).show();this.SectionItems[1].WindowUI.wait(100).animate({opacity:1,top:self.SectionItems[1].GridY,left:self.SectionItems[1].GridX},{easing:EasingTypes.OutQuad,duration:600,complete:function(){$(this).setAsMainWindow();}});var static_content=this.SectionItems[0].WindowUI;var footer_camps=$(static_content[2]);footer_camps.css("visibility","visible");footer_camps.wait(500).fadeIn(500);this.CreateBackButton().appendTo(Selectors.MAIN_CONTAINER);$("#back_camps").show();$(window).wait(750,function(){$(window).trigger(Const.TRANSITION_IN_COMPLETE);});},CreateBackButton:function(){var button=$("<a/>").hide().attr("id","back_camps").attr("href","javascript:void(0)").bind("click",this.BackButtonClick.bind(this)).attr("onclick","").append($("<img/>").attr("src","/assets/images/content/button_back.png").attr("alt","Back to Start Developing"));return button;},BackButtonClick:function(e){if(e.preventDefault){e.preventDefault();}
if(e.stopPropagation){e.stopPropagation();}
if(GetIsTransitioning()===false){var backButton=e.currentTarget;var rel=Const.DEVELOPING_SECTION;CallNavChange(rel);}
return false;}});
;;;
var LayoutManagerBase=Class.create({SectionUIObjects:null,MainWindowPos:{x:-1,y:-1},DeepLinkTransition:false,PreviewWindowLocation:{x:710,y:100},initialize:function(){},TransitionToItem:function(linkName){var item=this.FindItemByLinkName(linkName);if(!item){_mainController.Throw404();return false;}
if(item.WindowUI.hasClass(Const.MAIN_WINDOW)){return false;}
SetIsTransitioningContent(true);$(Selectors.MAIN_CONTAINER).attr("aria-busy","true");DetachObjects();this.PerformAnimation(item);$(Selectors.MAIN_WINDOW).removeClass(Const.MAIN_WINDOW).removeAttr("role").addClass(Const.PREVIEW_WINDOW).find(Selectors.MAIN_CONTENT,Selectors.MAIN_CONTENT+" img").stop(true).fadeOut(200,function(){$(this).empty();$(this).siblings(Selectors.PREVIEW_CONTENT).stop(true).fadeIn();});item.WindowUI.setAsMainWindow();item.LoadContent();return true;},PerformAnimation:function(item){mainUI=item.WindowUI;pos=_self.PreviewWindowLocation;mainUI.animateToPosition(this.MainWindowPos,item.DestinationSize);mainUI.siblings(Selectors.CONTENT_WINDOWS+":visible").each(function(i){y=pos.y+(i*item.PreviewSize.h)+(Const.MARGIN*i);$(this).animateToPosition({x:pos.x,y:y},item.PreviewSize);});},FindItemByLinkName:function(linkName){var item=null;_self=this;linkNameParts=linkName.split("/");if(linkNameParts.length>2){linkName=linkNameParts[0]+"/"+linkNameParts[1];}else if(linkNameParts[1]===""){linkName=linkNameParts[0];}
$.each(this.SectionUIObjects,function(i){if(_self.SectionUIObjects[i].LinkName===linkName){item=_self.SectionUIObjects[i];return false;}});if(!item){if(linkNameParts.length>=2){item=this.FindItemByLinkName(linkNameParts[0]);if(item){this.DeepLinkTransition=true;}}else{return null;}}
return item;}});
;;;
var HomeLayoutManager=Class.create(LayoutManagerBase,{});var LeftPreviewColLayoutManager=Class.create(LayoutManagerBase,{MainWindowPos:{x:180,y:170},PreviewWindowPos:{x:0,y:217},PreviewSize:{w:170,h:126},MarginSize:{w:Const.MARGIN,h:Const.MARGIN-3},PerformAnimation:function(item){var _self=this;var y=_self.PreviewWindowPos.y;var x=_self.PreviewWindowPos.x;var items=this.SectionUIObjects;var mainWindow=$(Selectors.MAIN_WINDOW+":visible");items=$.grep(items,function(el,i){return el.UniqueID!==item.UniqueID&&$(el.WindowUI).attr("id")!==mainWindow.attr("id");});items.sort(function(a,b){var compA=a.WindowUI.offset().top;var compB=b.WindowUI.offset().top;return(compA<compB)?-1:(compA>compB)?1:0;});pos={x:x,y:y};var count=0;$.each(items,function(i,pane){paneUI=pane.WindowUI;if(count>0){y+=_self.PreviewSize.h+_self.MarginSize.h;}
pos.y=y;paneUI.animateToPosition(pos,_self.PreviewSize);count++;});if(count>0){y+=_self.MarginSize.h+_self.PreviewSize.h;}
pos.y=y;var mainWindowParams={start:{x:_self.MainWindowPos.x,y:_self.MainWindowPos.y,angle:-90},end:{x:pos.x,y:pos.y,angle:90,length:0.4}};mainWindow.animate({path:new $.path.bezier(mainWindowParams),width:_self.PreviewSize.w,height:_self.PreviewSize.h},{queue:false,duration:750});var newWindowAnimParams={start:{x:asInt(item.WindowUI.css("left")),y:asInt(item.WindowUI.css("top")),angle:-110},end:{x:this.MainWindowPos.x,y:this.MainWindowPos.y,angle:90,length:1.25}};item.WindowUI.stop(true).fadeIn().animate({path:new $.path.bezier(newWindowAnimParams),width:item.DestinationSize.w,height:item.DestinationSize.h},{queue:false,easing:EasingTypes.InOutQuad,duration:750});item.WindowUI.data("next",Const.HIGHLIGHTS_SECTION+"/"+items[0].LinkName);}});var ProductGuideLayoutManager=Class.create(LayoutManagerBase,{MainWindowPos:{x:170,y:175},PreviewSize:{w:160,h:150},CurrentType:null,CurrentSection:"",TransitionToItem:function(linkName){var item=this.FindItemByLinkName(linkName);if(!item){_mainController.Throw404();return false;}
mainUI=item.GetWindowUI();if(mainUI.hasClass(Const.PRODUCT_CURRENT_SECTION)){return;}
if(!mainUI.hasClass(Const.MAIN_WINDOW)){this.PerformAnimation(item);}
if(item.Type!==Const.WINDOWTYPE_PRODUCT_FEATURES){$(Selectors.MAIN_WINDOW).children(Selectors.PREVIEW_CONTENT).fadeOut(500);}
this.CurrentType=item.Type;if(this.DeepLinkTransition===true){this.DeepLinkTransition=false;this.TransitionToItem(linkName);return;}
$(Const.MAIN_BODY).removeClass(Const.PRODUCT_GUIDE_HOME_SECTION);if(item.Type!==Const.WINDOWTYPE_PRODUCT_SECTION&&item.Type!==Const.WINDOWTYPE_PRODUCT_FEATURES&&item.Type!==Const.WINDOWTYPE_PRODUCT_OVERVIEW){item.LoadContent(linkName);}else{SetIsTransitioningContent(false);}
return true;},PerformAnimation:function(item){var _self=this;var navX=0;var navY=this.MainWindowPos.y+Const.PRODUCT_MAIN_WINDOW.h+Const.MARGIN;var mainUI=item.GetWindowUI();$("div."+Const.WINDOWTYPE_PRODUCT_FEATURE).stop(true).animate({top:1000},{duration:1500}).fadeOut(function(){$(this).remove();});$("div."+Const.WINDOWTYPE_PRODUCT_FEATURES).removeClass(Const.MAIN_WINDOW).removeAttr("role");$("#copy_productguide").fadeOut();$("#back_productguide").fadeIn(1000,function(){$(this).css("opacity","");});$("#product_guide_download").children().eq(0).animate({"left":"867px"});switch(item.Type){case Const.WINDOWTYPE_PRODUCT_FEATURES:navX=77;$(Selectors.PRODUCT_CURRENT_SECTION).removeClass(Const.PRODUCT_CURRENT_SECTION);mainUI.addClass(Const.PRODUCT_CURRENT_SECTION);this.TransitionOutPages();this.TransitionSectionsToNav(item,navX);this.TransitionOutOverviews();$(Selectors.MAIN_WINDOW).css("z-index",5).fadeOut(function(){$(this).remove();});var overlayImg=this.CreateOverlay();overlayImg.css({top:0,height:300});$("#product_guide_download").children().eq(0).animate({"left":"781px"});$.each(_productGuideContent.SectionData[item.LinkName],function(i,child){_sectionTransitionClasses[Const.PRODUCT_GUIDE_SECTION].SectionItems.push(child);child.PreviewSize=Const.PRODUCT_FEATURE;child.InitLayout();var top=navY-((Const.PRODUCT_FEATURE.h+Const.MARGIN)*3);if(i>=5){top+=Const.PRODUCT_FEATURE.h+Const.MARGIN;}
if(i>=10){top+=Const.PRODUCT_FEATURE.h+Const.MARGIN;}
var left=navX+(i%5*(child.PreviewSize.w+Const.MARGIN));child.WindowUI.wait(1200).css({left:navX,top:_self.MainWindowPos.y-child.PreviewSize.h*2.5,"z-index":2}).show().animate({top:top},{duration:600,queue:true}).animate({left:left},{duration:600,queue:true});});mainUI.css("z-index",10);mainUI.stop(true).setAsMainWindow().animate({left:navX,top:navY-((Const.PRODUCT_FEATURE.h+Const.MARGIN)*3)-Const.PRODUCT_SECTION_NAV.h-Const.MARGIN,width:Const.PRODUCT_SECTION_NAV.w,height:Const.PRODUCT_SECTION_NAV.h},{duration:1200,complete:function(){overlayImg.wait(600).fadeOut(400,function(){$(this).remove();});}});item.UpdateAtlasTag();break;case Const.WINDOWTYPE_PRODUCT_OVERVIEW:$(Selectors.PRODUCT_CURRENT_SECTION).removeClass(Const.PRODUCT_CURRENT_SECTION);$(Selectors.MAIN_WINDOW).animate({top:-500,opacity:0},{queue:false,duration:1000,complete:function(){$(this).remove();}});mainUI.hide();mainUI.children(Selectors.PREVIEW_CONTENT).hide();this.TransitionSectionsToNav(item);mainUI.siblings("div."+Const.WINDOWTYPE_PRODUCT_OVERVIEW).fadeOut(function(){$(this).remove();});mainUI.animate({left:0,top:this.MainWindowPos.y,width:1000,height:Const.PRODUCT_MAIN_WINDOW.h},{complete:function(){item.LoadContent();}}).setAsMainWindow();break;case Const.WINDOWTYPE_PRODUCT_SECTION:$(Selectors.PRODUCT_CURRENT_SECTION).removeClass(Const.PRODUCT_CURRENT_SECTION);mainUI.addClass(Const.PRODUCT_CURRENT_SECTION);this.CurrentSection=item.LinkName;this.TransitionOutPages();this.TransitionSectionsToNav(item);this.TransitionOutOverviews();this.MoveItemToUpperNav(item);var overlay=this.CreateOverlay();$.each(_productGuideContent.SectionData[item.LinkName],function(i,child){_self.SectionUIObjects.push(child);_sectionTransitionClasses[Const.PRODUCT_GUIDE_SECTION].SectionItems.push(child);child.DestinationSize=Const.PRODUCT_MAIN_WINDOW;child.InitLayout();child.RevealWindow();child.WindowUI.data("section",child.Section);var top=_self.MainWindowPos.y+((i-1)*(child.PreviewSize.h+Const.MARGIN));if(i===0){child.WindowUI.setPosition(_self.MainWindowPos,Const.PRODUCT_MAIN_WINDOW).fadeIn();$(Selectors.MAIN_WINDOW).fadeOut(function(){$(this).remove();});if(_self.DeepLinkTransition!==true){child.WindowUI.children(Selectors.PREVIEW_CONTENT).hide();child.WindowUI.hide();child.WindowUI.css({top:-700,opacity:1}).animate({top:_self.MainWindowPos.y},{queue:false,duration:750});child.WindowUI.setAsMainWindow();child.LoadContent(child.LinkName);SWFAddress.setValue(Const.PRODUCT_GUIDE_SECTION+"/"+child.LinkName);}}else{child.WindowUI.css({top:_self.MainWindowPos.y-child.PreviewSize.h,left:navX,height:child.PreviewSize.h});if(_self.DeepLinkTransition!==true){child.WindowUI.animate({top:top},{duration:1000,complete:function(){$(".overlay_fade").fadeOut(400,function(){$(this).remove();});}});}else{$(".overlay_fade").fadeOut(400,function(){$(this).remove();});}}});break;case Const.WINDOWTYPE_PRODUCT_PAGES:case Const.WINDOWTYPE_PRODUCT_FEATURE:this.TransitionToPage(item);break;}},TransitionOutOverviews:function(){$("div."+Const.WINDOWTYPE_PRODUCT_OVERVIEW).fadeOut(750,function(){$(this).remove();});},TransitionOutPages:function(){$("div."+Const.WINDOWTYPE_PRODUCT_PAGES).not(Selectors.MAIN_WINDOW).stop(true).animate({top:1000},{duration:1500}).fadeOut(function(){$(this).remove();});},MoveItemToUpperNav:function(item){item.WindowUI.addClass(Const.NAV_PRODUCT_SECTION).find("p").fadeOut();item.WindowUI.stop(true).animate({left:0,top:this.MainWindowPos.y-Const.MARGIN-Const.PRODUCT_SECTION_NAV.h,width:Const.PRODUCT_SECTION_NAV.w,height:Const.PRODUCT_SECTION_NAV.h},{duration:800});},TransitionSectionsToNav:function(item,navX,navY){if(!navX){navX=0;}
if(!navY){navY=this.MainWindowPos.y+Const.PRODUCT_MAIN_WINDOW.h+Const.MARGIN;}
var otherSections=$("div."+Const.WINDOWTYPE_PRODUCT_SECTION).not("#"+item.ElementID);otherSections.addClass(Const.NAV_PRODUCT_SECTION).find("p").fadeOut();otherSections.push($("div."+Const.WINDOWTYPE_PRODUCT_FEATURES));otherSections.each(function(i,section){var sectionPosition={start:{x:asInt($(section).css("left")),y:asInt($(section).css("top")),angle:10},end:{x:navX+(i*(Const.PRODUCT_SECTION_NAV.w+Const.MARGIN)),y:navY,angle:-90,length:0.4}};$(this).stop(true).animate({path:new $.path.bezier(sectionPosition),width:Const.PRODUCT_SECTION_NAV.w,height:Const.PRODUCT_SECTION_NAV.h},{duration:800});});},TransitionToPage:function(item){if((this.CurrentType!==Const.WINDOWTYPE_PRODUCT_SECTION&&this.CurrentType!==Const.WINDOWTYPE_PRODUCT_PAGES)||this.CurrentSection!==item.Section){this.DeepLinkTransition=true;this.TransitionToItem(item.Section);}
var _self=this;var y=this.MainWindowPos.y;var x=this.MainWindowPos.x-Const.MARGIN-item.PreviewSize.w;var items=$("div."+Const.WINDOWTYPE_PRODUCT_PAGES);var mainWindow=$(Selectors.MAIN_WINDOW);mainWindow.children(Selectors.MAIN_CONTENT).stop(true,true).fadeOut(function(){$(this).siblings(Selectors.PREVIEW_CONTENT).stop(true,true).fadeIn();$(this).empty();});items=$.grep(items,function(el,i){return $(el).attr("id")!==$(item.WindowUI).attr("id")&&$(el).attr("id")!==mainWindow.attr("id")&&$(el).data("section")===_self.CurrentSection;});items.sort(function(a,b){var compA=asInt($(a).css("top"));var compB=asInt($(b).css("top"));return(compA<compB)?-1:(compA>compB)?1:0;});pos={x:x,y:y};var count=0;$.each(items,function(i,pane){if(count>0){pos.y+=item.PreviewSize.h+Const.MARGIN;}
$(pane).animateToPosition(pos,item.PreviewSize);count++;});if(count>0){pos.y+=Const.MARGIN+item.PreviewSize.h;}
mainWindow.animateToPosition(pos,item.PreviewSize);item.WindowUI.animateToPosition({x:this.MainWindowPos.x,y:this.MainWindowPos.y},item.DestinationSize);item.WindowUI.setAsMainWindow();},CreateOverlay:function(){var sectionBg=$(DOMElements.DIV).css({position:"absolute",top:0,"z-index":3,height:210,width:Const.PRODUCT_SIDEBAR.w+20,left:-10,overflow:"hidden"}).addClass("overlay_fade").appendTo($(Selectors.MAIN_CONTAINER));$(DOMElements.IMG).attr("src","/assets/images/layout/product_guide_transition.png").css({position:"relative",top:0,width:"100%",height:"100%"}).appendTo(sectionBg).show();return sectionBg;}});var ExperienceLayoutManager=Class.create(LayoutManagerBase,{MainWindowPos:{x:50,y:154},SectionItems:[],SectionUIObjectsFiltered:{matches:[],nonmatches:[]},LastState:null,State:null,CurrentCol:0,LastItem:null,CurrentItem:null,SetState:function(state){this.LastState=this.State;this.State=state;},GetStateParams:function(){},TransitionIn:function(){var _self=this;this.SectionItems=[];this.SectionUIObjectsFiltered={matches:[],nonmatches:[]};this.LastState=null;this.State=null;this.CurrentCol=0;this.LastItem=null;this.CurrentItem=null;this.CreateNav().appendTo(Selectors.MAIN_CONTAINER);this.CreateBackButton().appendTo(Selectors.MAIN_CONTAINER);this.CreateCaption().prependTo("#nav_experience");$.each(_experienceContent.SectionData["partners"],function(i,child){_self.SectionItems.push(child);child.InitLayout();});},TransitionInLanding:function(){if($("#category_experience").val()!=-1){$("#category_experience").val(-1);}
$("#back_experience").hide();$("#caption_experience").show();this.FilterSectionUIObjects(this.SectionItems,{Featured:true});this.CurrentCol=0;this.LastItem=null;this.CurrentItem=null;},TransitionToItem:function(linkName){if(this.State==="category"){return this.TransitionToCategory(linkName);}else if(this.State==="partner"){return this.TransitionToPartner(linkName);}},TransitionToCategory:function(linkName){var linkNameArr=linkName.split("/");var categoryName=null;var categoryId=-1;var targetLetter=null;if(linkNameArr.length>1&&linkNameArr[1]!=""){categoryName=linkNameArr[1].toLowerCase();if(categoryName==="all"){if(linkNameArr.length>2&&linkNameArr[2]!=""){targetLetter=linkNameArr[2].toLowerCase();}}
else{var categoryArr=_bulkLoader[GlobalContentUrls.ExperienceCategoryData].Categories;for(var i=0;i<categoryArr.length;i++){var categoryArrName=categoryArr[i].CategoryName.toLowerCase().replace(/\W/g,"");if(categoryName===categoryArrName){categoryId=categoryArr[i].CategoryId;break;}}}}
if($("#category_experience").val()!=categoryId){$("#category_experience").val(categoryId);}
$("#back_experience").show();$("#back_experience").attr("rel","");$("#caption_experience").hide();this.FilterSectionUIObjects(this.SectionItems,{CategoryId:categoryId});this.CurrentCol=0;this.LastItem=null;this.CurrentItem=null;if(targetLetter!==null){this.CurrentCol=this.FindColumnWithLetter(targetLetter);}
else{if(categoryName==="all"){this.CurrentCol=-1;}}
return true;},FindItemByLinkName:function(linkName){var item=null;_self=this;linkNameParts=linkName.split("/");if(linkNameParts[1]===""){linkName=linkNameParts[0];}
$.each(this.SectionItems,function(i){if(_self.SectionItems[i].LinkName===linkName){item=_self.SectionItems[i];return false;}});return item;},TransitionToPartner:function(linkName){var item=this.FindItemByLinkName(linkName);if(!item){_mainController.Throw404();return false;}
if(item.WindowUI.hasClass(Const.MAIN_WINDOW)){return false;}
SetIsTransitioningContent(true);$(Selectors.MAIN_CONTAINER).attr("aria-busy","true");DetachObjects();$("#back_experience").show();if(this.LastState===null||this.LastState===undefined||this.LastState==="landing"){$("#back_experience").attr("rel","");}
else if(this.LastState==="category"){$("#back_experience").attr("rel",_lastRemainPathString);}
this.PerformAnimation(item);return true;},PerformAnimation:function(item){var self=this;if(this.CurrentItem){this.LastItem=this.CurrentItem;}
this.CurrentItem=item;var currentWindowIndex=$.inArray(this.CurrentItem,this.SectionItems);var previousWindowIndex=currentWindowIndex-1;var nextWindowIndex=currentWindowIndex+1;var previousItem=null;var nextItem=null;if(previousWindowIndex>=0){previousItem=this.SectionItems[previousWindowIndex];}
if(nextWindowIndex<this.SectionItems.length){nextItem=this.SectionItems[nextWindowIndex];}
var lastWindowIndex=currentWindowIndex;if(this.LastItem!==null&&this.LastItem!==undefined){lastWindowIndex=$.inArray(this.LastItem,this.SectionItems);}
var direction=0;if(currentWindowIndex<lastWindowIndex){direction=-1;}
else if(currentWindowIndex>lastWindowIndex){direction=1;}
var h=this.CurrentItem.DestinationSize.h;var w=this.CurrentItem.DestinationSize.w;var previousItemX=this.MainWindowPos.x-(w+Const.EXPERIENCE_MARGIN);var nextItemX=this.MainWindowPos.x+(w+Const.EXPERIENCE_MARGIN);if(this.LastItem!==null&&this.LastItem!==undefined){this.LastItem.WindowUI.removeClass(Const.MAIN_WINDOW).removeAttr("role").animate({left:(direction===-1?nextItemX:previousItemX),top:this.MainWindowPos.y,width:w,height:h},{easing:EasingTypes.Swing,duration:500});}
else{$.each(this.SectionItems,function(i,pane){pane.WindowUI.children("section.preview").hide();pane.WindowUI.children("section.preview").removeClass("medium large exhibit");pane.WindowUI.children(Selectors.PREVIEW_CONTENT).find("img.largePreview").hide();pane.WindowUI.children(Selectors.PREVIEW_CONTENT).find("img.mediumPreview").hide();if(pane.UniqueID!==self.CurrentItem.UniqueID){pane.WindowUI.hide();}});}
self.BeforePartnerLoad(previousItem,nextItem,direction,previousItemX,nextItemX,w,h);this.CurrentItem.WindowUI.animate({left:this.MainWindowPos.x,top:this.MainWindowPos.y,width:w,height:h,opacity:1},{duration:500,easing:EasingTypes.Swing,complete:function(){self.AfterPartnerLoad(previousItem,nextItem,direction,previousItemX,nextItemX,w,h);$(this).setAsMainWindow();}});},TransitionOutState:function(){if(this.CurrentLayoutState==="landing"&&this.State==="category"){this.TransitionOutLanding();}
else if(this.CurrentLayoutState==="category"&&this.State==="landing"){this.TransitionOutCategory();}
if(this.LastState==="partner"){this.TransitionOutPartner();}},TransitionOut:function(){if(this.CurrentLayoutState==="landing"){this.TransitionOutLanding();}
else if(this.CurrentLayoutState==="category"){this.TransitionOutCategory();}
if(this.State==="partner"){this.TransitionOutPartner();}
this.SectionUIObjectsFiltered={matches:[],nonmatches:[]};this.LastState=null;this.State=null;this.CurrentCol=0;this.LastItem=null;this.CurrentItem=null;$("#nav_experience").remove();$("#back_experience").remove();},TransitionOutLanding:function(){},TransitionOutCategory:function(){},TransitionOutPartner:function(){},CreateNav:function(){var nav=$("<nav/>").hide().attr("id","nav_experience").attr("role","navigation");$("<a/>").attr("rel","").html("View All").addClass("pane viewall").attr("href","javascript:void(0)").bind("click",this.LetterButtonClick.bind(this)).attr("onclick","").appendTo(nav);$("<p/>").html("Jump to").appendTo(nav);var letterArr=["A-E","F-J","K-O","P-T","U-Z"];var letterPosition=455;for(var i=0;i<letterArr.length;i++){var letterButton=$("<a/>").attr("rel",letterArr[i].substring(0,1).toLowerCase()).html(letterArr[i]).addClass("pane letter").css("left",letterPosition).attr("href","javascript:void(0)").bind("click",this.LetterButtonClick.bind(this)).attr("onclick","").appendTo(nav);letterPosition+=52;}
var initialArr=[{CategoryName:"View by Category",CategoryId:-1},{CategoryName:"---------------------",CategoryId:-2},{CategoryName:"Featured",CategoryId:"featured"}];var categoryArr=initialArr.concat(_bulkLoader[GlobalContentUrls.ExperienceCategoryData].Categories);var dropdown=CreateDropdownFromArray({sourceArr:categoryArr});dropdown.attr("id","category_experience").addClass("pane").bind("change",this.CategoryChange.bind(this)).appendTo(nav);return nav;},CreateBackButton:function(){var button=$("<a/>").hide().attr("id","back_experience").attr("href","javascript:void(0)").bind("click",this.BackButtonClick.bind(this)).attr("onclick","").append($("<img/>").attr("src","/assets/images/content/button_back.png").attr("id","back_experience_image").attr("alt","Back to Experience"));return button;},CreateCaption:function(){var title=$("<h1/>").hide().attr("id","caption_experience").html("Featured Sites")
return title;},FilterSectionUIObjects:function(sectionItems,filter){if(filter===null||filter===undefined){filter={};}
filter.Featured=filter.Featured===null||filter.Featured===undefined?null:filter.Featured;filter.CategoryId=filter.CategoryId===null||filter.CategoryId===undefined?null:parseInt(filter.CategoryId);if(filter.CategoryId<=0){filter.CategoryId=null;}
var matches=[];var nonmatches=[];if(sectionItems!=null){for(var i=0;i<sectionItems.length;i++){var item=sectionItems[i];if((filter.Featured===null||item.Featured===filter.Featured)&&(filter.CategoryId===null||(item.Categories!=null&&$.inArray(filter.CategoryId,item.Categories)>=0))){matches.push(item);}
else{nonmatches.push(item);}}}
this.SectionUIObjectsFiltered={matches:matches,nonmatches:nonmatches};},ScrollToPartner:function(partnerName){if(this.State==="partner"){if(partnerName!==null&&partnerName!==undefined&&partnerName!==""){CallNavChange(Const.EXPERIENCE_SECTION+"/"+partnerName);}}},BackButtonClick:function(e){if(e.preventDefault){e.preventDefault();}
if(e.stopPropagation){e.stopPropagation();}
if(GetIsTransitioning()===false){var backButton=e.currentTarget;var rel=Const.EXPERIENCE_SECTION+"/"+$(backButton).attr("rel");CallNavChange(rel);}},LetterButtonClick:function(e){e.preventDefault();if(GetIsTransitioning()===false){var letterButton=e.currentTarget;var targetLetter=$(letterButton).attr("rel");CallNavChange(Const.EXPERIENCE_SECTION+"/category/all/"+targetLetter);}},CategoryChange:function(e){var dropdown=e.currentTarget;if(GetIsTransitioning()===false){var selectedOption=dropdown.options[dropdown.selectedIndex];if(selectedOption.value=="all"){CallNavChange(Const.EXPERIENCE_SECTION+"/category/all");}else if(selectedOption.value=="featured"){CallNavChange(Const.EXPERIENCE_SECTION);}else if(parseInt(selectedOption.value)>0){var categoryName=selectedOption.text.toLowerCase().replace(/\W/g,"");CallNavChange(Const.EXPERIENCE_SECTION+"/category/"+categoryName);}else{dropdown.selectedIndex=0;}}else{dropdown.selectedIndex=0;}},FindColumnWithLetter:function(targetLetter){var sectionItems=this.SectionUIObjectsFiltered.matches;var matchedIndex=0;if(targetLetter!==null&&targetLetter!==undefined&&targetLetter.length>0){targetLetter=targetLetter.charAt(0).toLowerCase();for(var i=0;i<sectionItems.length;i++){var title=sectionItems[i].Title;if(title!==null&&title!==undefined&&title.length>0){var firstLetter=title.charAt(0).toLowerCase();if(firstLetter===targetLetter){matchedIndex=i;break;}}}}
var stateParams=this.GetStateParams();var matchedCol=Math.floor(matchedIndex/stateParams.numRows);return matchedCol;},BeforePartnerLoad:function(previousItem,nextItem,direction,previousItemX,nextItemX,w,h){},AfterPartnerLoad:function(previousItem,nextItem,direction,previousItemX,nextItemX,w,h){}});var DownloadLayoutManager=Class.create(LayoutManagerBase,{PerformAnimation:function(item){var self=this;this.SectionUIObjects[0].WindowUI.stop(true).fadeOut(0);this.SectionUIObjects[1].GetWindowUI().setPosition({x:this.SectionUIObjects[1].GridX,y:this.SectionUIObjects[1].GridY},this.SectionUIObjects[1].DestinationSize);$(Const.MAIN_BODY).removeClass("section_download").addClass("section_thankyou");$("h1.title_download").removeClass("title_download").addClass("title_thankyou");$(".section_thankyou .col2 a").downloadHover();this.SectionUIObjects[1].WindowUI.stop(true).wait(800).fadeIn(800,function(){this.SectionUIObjects[1].WindowUI.find('details').each(function(i){var pos=$(this).position(),diff=(i<2||i>3)?-50:50;delete pos.left;delete pos.right;var posStart=$.extend({},pos);if(posStart.top){posStart.top+=diff;}else{posStart.bottom+=diff;}
posStart.opacity=0;posStart.visibility='visible';pos.opacity=1;$(this).css(posStart).wait(i*400+1).animate(pos,function(){$(this).css('opacity','auto');});});}.bind(this));this.SectionUIObjects[2].GetWindowUI().setPosition({x:this.SectionUIObjects[2].GridX,y:this.SectionUIObjects[2].GridY},this.SectionUIObjects[2].DestinationSize);this.SectionUIObjects[2].WindowUI.stop(true).wait(800).fadeIn(800);$("#atlas_download_tag").attr("src","http://view.atdmt.com/iaction/UMIRF_IE9_BOW_Final_DownloadConfirmation");$("#download_meteor_tag").attr("src","http://cdnt.meteorsolutions.com/api/conversion_pixel?cookie_name=56569455-45fb-4067-9765-bdf9b1d4e6d7&name=dlthankyou");$("#download_quantcast_tag").attr("src","http://pixel.quantserve.com/pixel/p-5eu58oSpL1cEs.gif?labels=_fp.channel.Beauty+of+the+Web,_fp.event.Download+Page");$("#svimg").attr("src",ConfigurationValues.SocialVibeUrl+"?v="+cacheBuster);$("#svclickimg").attr("src","http://click.socialadserve.com/pstb_img?v="+cacheBuster);$("#gsimg").attr("src","http://rs.gwallet.com/r1/pixel/x734?v="+cacheBuster);this.SectionUIObjects[1].WindowUI.css("background-image",'url(/assets/images/content/thankyou-background.jpg)');}});var VideosLayoutManager=Class.create(LayoutManagerBase,{CurrentCategoryId:"",TransitionToItem:function(linkName){var categoryId=null;var thumbnailId=null;var linkNameArr=linkName.split("/");var item=this.FindItemByLinkName("video-list");if(linkNameArr.length>0){categoryId=linkNameArr[0];}
if(linkNameArr.length>1){thumbnailId=linkNameArr[1];}
if(this.CurrentCategoryId!==categoryId){var newCategoryPane=this.FindItemByLinkName(categoryId);if(!newCategoryPane){_mainController.Throw404();return false;}
SetIsTransitioningContent(true)
$(Selectors.MAIN_CONTAINER).attr("aria-busy","true");if(this.CurrentCategoryId!==""){var previousCategoryPane=this.FindItemByLinkName(this.CurrentCategoryId);previousCategoryPane.WindowUI.children(Selectors.PREVIEW_CONTENT).removeClass("current");}
newCategoryPane.WindowUI.children(Selectors.PREVIEW_CONTENT).addClass("current");var focusFirstThumbnail=(this.CurrentCategoryId===""?false:true);this.CurrentCategoryId=categoryId;item.LoadContent(categoryId,thumbnailId,focusFirstThumbnail);}
else{if(thumbnailId){item.ThumbnailPagerObject.ExpandThumbnailById(thumbnailId);}}
return true;}});var SearchLayoutManager=Class.create(LayoutManagerBase,{TransitionToItem:function(searchTerm){$(".search_input").val(searchTerm);SetIsTransitioningContent(true);$(Selectors.MAIN_CONTAINER).attr("aria-busy","true");var item=this.SectionUIObjects[0];item.WindowUI.setAsMainWindow();item.LoadContent(searchTerm);return true;}});var UnpluggedLayoutManager=Class.create(LayoutManagerBase,{SectionItems:[],SectionUIObjectsFiltered:{matches:[],nonmatches:[]},LastState:null,State:null,LastItem:null,CurrentItem:null,CategoryName:null,TwitterFeed:null,SetState:function(state){this.LastState=this.State;this.State=state;},GetStateParams:function(){},TransitionIn:function(){var _self=this;this.SectionItems=[];this.SectionUIObjectsFiltered={matches:[],nonmatches:[]};this.LastState=null;this.State=null;this.LastItem=null;this.CurrentItem=null;this.CategoryName=null;this.TwitterFeed=null;var static_content=this.SectionUIObjects[1].WindowUI;var landing_unplugged=$(static_content[0]);var footer_unplugged=$(static_content[1]);var rules_unplugged=$(static_content[2]);var copy_judges_unplugged=$(static_content[3]);landing_unplugged.hide().css("visibility","visible");rules_unplugged.hide().css("visibility","visible");copy_judges_unplugged.hide().css("visibility","visible");footer_unplugged.css("visibility","visible");footer_unplugged.wait(500).fadeIn(500);this.CreateBackButton().appendTo(Selectors.MAIN_CONTAINER);$.each(_unpluggedContent.SectionData,function(i,section){$.each(section,function(j,child){_self.SectionItems.push(child);child.InitLayout();});});$("#landing_unplugged").appendTo($(document.body));$(".button_wanna_enter").bind("click",this.EnterButtonClick.bind(this));$("#landing_unplugged").contentscroller({contentWidth:1250,content:$("#landing_unplugged_content")});},TransitionInLanding:function(){this.FilterSectionUIObjects(this.SectionItems,{Featured:true});this.LastItem=null;this.CurrentItem=null;this.CategoryName=null;$("#back_unplugged").show();$("#back_unplugged").attr("rel",Const.DEVELOPING_SECTION);var static_content=this.SectionUIObjects[1].WindowUI;var landing_unplugged=$(static_content[0]);var copy_judges_unplugged=$(static_content[3]);landing_unplugged.wait(250).fadeIn(500);copy_judges_unplugged.fadeOut(500);if(this.TwitterFeed){this.TwitterFeed.start();}
$("#landing_unplugged").contentscroller("resume");AttachObjects();},TransitionToItem:function(linkName){if(this.State==="category"){return this.TransitionToCategory(linkName);}else if(this.State==="partner"){return this.TransitionToPartner(linkName);}},TransitionToCategory:function(linkName){var linkNameArr=linkName.split("/");var categoryName=null;if(linkNameArr.length>0&&linkNameArr[0]!=""){categoryName=linkNameArr[0].toLowerCase();}
$("#back_unplugged").show();$("#back_unplugged").attr("rel",Const.UNPLUGGED_SECTION);this.FilterSectionUIObjects(this.SectionItems,{CategoryName:categoryName});this.LastItem=null;this.CurrentItem=null;this.CategoryName=categoryName;var static_content=this.SectionUIObjects[1].WindowUI;var rules_unplugged=$(static_content[2]);var copy_judges_unplugged=$(static_content[3]);if(this.CategoryName==="judges"){copy_judges_unplugged.wait(250).fadeIn(500);}
else{copy_judges_unplugged.fadeOut(500);}
if(linkName==="rules"){rules_unplugged.wait(250).fadeIn(500);}
else{rules_unplugged.fadeOut(500);}
return true;},FindItemByLinkName:function(linkName){var item=null;_self=this;linkNameParts=linkName.split("/");if(linkNameParts[1]===""){linkName=linkNameParts[0];}
$.each(this.SectionItems,function(i){if(_self.SectionItems[i].LinkName===linkName){item=_self.SectionItems[i];return false;}});return item;},TransitionToPartner:function(linkName){var item=this.FindItemByLinkName(linkName);if(!item){_mainController.Throw404();return false;}
if(item.WindowUI.hasClass(Const.MAIN_WINDOW)){return false;}
SetIsTransitioningContent(true);$(Selectors.MAIN_CONTAINER).attr("aria-busy","true");DetachObjects();$("#back_unplugged").show();if(this.LastState===null||this.LastState===undefined||this.LastState==="landing"){$("#back_unplugged").attr("rel",Const.UNPLUGGED_SECTION);}
else if(this.LastState==="category"){$("#back_unplugged").attr("rel",Const.UNPLUGGED_SECTION+"/"+_lastRemainPathString);}
this.PerformAnimation(item);return true;},PerformAnimation:function(item){var self=this;if(this.CurrentItem){this.LastItem=this.CurrentItem;}
this.CurrentItem=item;if(this.LastItem===null||this.LastItem===undefined){$.each(this.SectionItems,function(i,pane){pane.WindowUI.children("section.preview").hide();if(pane.UniqueID!==self.CurrentItem.UniqueID){pane.WindowUI.hide();}});}
self.BeforePartnerLoad();this.CurrentItem.WindowUI.animate({left:this.CurrentItem.GridX,top:this.CurrentItem.GridY,width:this.CurrentItem.DestinationSize.w,height:this.CurrentItem.DestinationSize.h,opacity:1},{duration:500,easing:EasingTypes.Swing,complete:function(){self.AfterPartnerLoad();$(this).setAsMainWindow();}});},TransitionOutState:function(){if(this.CurrentLayoutState==="landing"&&this.State==="category"){this.TransitionOutLanding();}
else if(this.CurrentLayoutState==="category"&&this.State==="landing"){this.TransitionOutCategory();}
if(this.LastState==="partner"){this.TransitionOutPartner();}
var static_content=this.SectionUIObjects[1].WindowUI;var landing_unplugged=$(static_content[0]);var rules_unplugged=$(static_content[2]);var copy_judges_unplugged=$(static_content[3]);rules_unplugged.fadeOut(500);landing_unplugged.fadeOut(500);if(this.CategoryName!=="judges"){copy_judges_unplugged.fadeOut(500);}
if(this.TwitterFeed){this.TwitterFeed.stop();}},TransitionOut:function(){if(this.CurrentLayoutState==="landing"){this.TransitionOutLanding();}
else if(this.CurrentLayoutState==="category"){this.TransitionOutCategory();}
if(this.State==="partner"){this.TransitionOutPartner();}
this.SectionUIObjectsFiltered={matches:[],nonmatches:[]};this.LastState=null;this.State=null;this.LastItem=null;this.CurrentItem=null;this.CategoryName=null;this.SectionUIObjects[1].HideWindow(750);$("#back_unplugged").remove();$("#landing_unplugged").contentscroller("destroy");$("#landing_unplugged").remove()
if(this.TwitterFeed){this.TwitterFeed.destroy();}
this.TwitterFeed=null;},TransitionOutLanding:function(){$("#landing_unplugged").contentscroller("pause");DetachObjects();},TransitionOutCategory:function(){},TransitionOutPartner:function(){},FilterSectionUIObjects:function(sectionItems,filter){if(filter===null||filter===undefined){filter={};}
filter.Featured=filter.Featured===null||filter.Featured===undefined?null:filter.Featured;filter.CategoryName=filter.CategoryName===null||filter.CategoryName===undefined?null:filter.CategoryName;var matches=[];var nonmatches=[];if(sectionItems!=null){for(var i=0;i<sectionItems.length;i++){var item=sectionItems[i];if((filter.Featured===null||item.Featured===filter.Featured)&&(filter.CategoryName===null||item.Section===filter.CategoryName)){matches.push(item);}
else{nonmatches.push(item);}}}
this.SectionUIObjectsFiltered={matches:matches,nonmatches:nonmatches};},CreateBackButton:function(){var button=$("<a/>").hide().attr("id","back_unplugged").attr("href","javascript:void(0)").bind("click",this.BackButtonClick.bind(this)).attr("onclick","").append($("<img/>").attr("src","/assets/images/content/button_back.png").attr("alt","Back to Unplugged"));return button;},EnterButtonClick:function(){LogAtlas("http://view.atdmt.com/action/UMIRF_IE9_BOW_Contest_IWannaEnter");},BackButtonClick:function(e){if(e.preventDefault){e.preventDefault();}
if(e.stopPropagation){e.stopPropagation();}
if(GetIsTransitioning()===false){var backButton=e.currentTarget;var rel=$(backButton).attr("rel");CallNavChange(rel);}
return false;},BeforePartnerLoad:function(){},AfterPartnerLoad:function(){}});var DevelopingLayoutManager=Class.create(LayoutManagerBase,{MainWindowPos:{x:180,y:170},PreviewWindowPos:{x:0,y:170},PreviewSize:{w:170,h:140},MarginSize:{w:Const.MARGIN,h:Const.MARGIN},LastState:null,State:null,ImagesPreloaded:null,CurrentLayoutState:null,SetState:function(state){this.LastState=this.State;this.State=state;},TransitionIn:function(){var _self=this;this.LastState=null;this.State=null;this.ImagesPreloaded=false;this.CurrentLayoutState=null;var static_content=this.SectionUIObjects[0].WindowUI;var landing_developing=$(static_content[0]);var footer_developing=$(static_content[1]);landing_developing.hide().css("visibility","visible");footer_developing.hide().css("visibility","visible");footer_developing.wait(250).fadeIn(500);this.CreateBackButton().appendTo(Selectors.MAIN_CONTAINER);$("#landing_developing").appendTo($(document.body));$("#landing_developing").contentscroller({contentWidth:1240,content:$("#landing_developing_content")});},TransitionInLanding:function(){if(this.CurrentLayoutState!=="landing"){this.CurrentLayoutState="landing";$("#back_developing").hide();var static_content=this.SectionUIObjects[0].WindowUI;var landing_developing=$(static_content[0]);landing_developing.wait(250).fadeIn(500);$("#landing_developing").contentscroller("resume");AttachObjects();}},TransitionToItem:function($super,linkName){if(this.State==="category"){this.TransitionToCategory(linkName);$super(linkName);}},TransitionToCategory:function(linkName){if(this.CurrentLayoutState!=="category"){this.CurrentLayoutState="category";$("#back_developing").show();if(!this.ImagesPreloaded){this.ImagesPreloaded=true;var imagesToPreload=["/assets/images/content/development-seamless-taskbartile-bubble.png","/assets/images/content/development-seamless-desktop.jpg","/assets/images/content/development-seamless-jumplists.png","/assets/images/content/development-seamless-tiles.png","/assets/images/layout/tooltip-hotspot-small.png"];$.each(imagesToPreload,function(i,src){var image=new Image();image.src=src;});}
$(Selectors.MAIN_WINDOW).removeClass(Const.MAIN_WINDOW).removeAttr("role")
$.each(this.SectionUIObjects,function(i,el){if(el.Type!=="bgContentHelperPaneAlt"&&el.Type!=="bgContentHelperPane"){el.WindowUI.removeClass(Const.MAIN_WINDOW).removeAttr("role").addClass(Const.PREVIEW_WINDOW).find(Selectors.MAIN_CONTENT).stop(true).hide().empty().siblings(Selectors.PREVIEW_CONTENT).show();}});}
return true;},PerformAnimation:function(item){var _self=this;var y=_self.PreviewWindowPos.y;var x=_self.PreviewWindowPos.x;var items=this.SectionUIObjects;var mainWindow=$(Selectors.MAIN_WINDOW+":visible");items=$.grep(items,function(el,i){return el.UniqueID!==item.UniqueID&&$(el.WindowUI).attr("id")!==mainWindow.attr("id")&&el.Type!=="bgContentHelperPaneAlt"&&el.Type!=="bgContentHelperPane"});items.sort(function(a,b){var compA=a.WindowUI.offset().top;var compB=b.WindowUI.offset().top;return(compA<compB)?-1:(compA>compB)?1:0;});pos={x:x,y:y};var count=0;$.each(items,function(i,pane){paneUI=pane.WindowUI;if(count>0){y+=_self.PreviewSize.h+_self.MarginSize.h;}
pos.y=y;paneUI.animateToPosition(pos,_self.PreviewSize);count++;});if(count>0){y+=_self.MarginSize.h+_self.PreviewSize.h;}
pos.y=y;var mainWindowParams={start:{x:_self.MainWindowPos.x,y:_self.MainWindowPos.y,angle:-90},end:{x:pos.x,y:pos.y,angle:90,length:0.4}};mainWindow.animate({path:new $.path.bezier(mainWindowParams),width:_self.PreviewSize.w,height:_self.PreviewSize.h},{queue:false,duration:750});var newWindowAnimParams={start:{x:asInt(item.WindowUI.css("left")),y:asInt(item.WindowUI.css("top")),angle:-110},end:{x:this.MainWindowPos.x,y:this.MainWindowPos.y,angle:90,length:1.25}};item.WindowUI.stop(true).fadeIn().animate({path:new $.path.bezier(newWindowAnimParams),width:item.DestinationSize.w,height:item.DestinationSize.h},{queue:false,easing:EasingTypes.InOutQuad,duration:750});},TransitionOutState:function(){if(this.CurrentLayoutState==="landing"&&this.State==="category"){this.TransitionOutLanding();}
else if(this.CurrentLayoutState==="category"&&this.State==="landing"){this.TransitionOutCategory();}},TransitionOut:function(){if(this.CurrentLayoutState==="landing"){this.TransitionOutLanding();}
else if(this.CurrentLayoutState==="category"){this.TransitionOutCategory();}
this.LastState=null;this.State=null;this.SectionUIObjects[0].HideWindow(750);$("#back_developing").remove();$("#landing_developing").contentscroller("destroy");$("#landing_developing").remove();$("#footer_developing").fadeOut(500);},TransitionOutLanding:function(){var static_content=this.SectionUIObjects[0].WindowUI;var landing_developing=$(static_content[0]);landing_developing.fadeOut(500);$("#landing_developing").contentscroller("pause");DetachObjects();},TransitionOutCategory:function(){var mainWindowItem=$.grep(this.SectionUIObjects,function(el,i){return el.WindowUI.hasClass(Const.MAIN_WINDOW);})[0];if(mainWindowItem!==null&&mainWindowItem!==undefined){mainWindowItem.WindowUI.wait(500).animate({top:-asInt(mainWindowItem.WindowUI.css("height"))-100},{easing:EasingTypes.InBack,duration:700});}
var leftSideItems=$.grep(this.SectionUIObjects,function(el,i){return!(el.WindowUI.hasClass(Const.MAIN_WINDOW))&&el.Type!=="bgContentHelperPaneAlt"&&el.Type!=="bgContentHelperPane";});var offscreen=(asInt($(Selectors.MAIN_CONTAINER).offset().left)+200)*-1;$.each(leftSideItems,function(index,item){item.WindowUI.wait((index*200)+1250).animate({left:offscreen},{easing:EasingTypes.InOutQuint,duration:600});});DetachObjects();},CreateBackButton:function(){var button=$("<a/>").hide().attr("id","back_developing").attr("href","javascript:void(0)").bind("click",this.BackButtonClick.bind(this)).attr("onclick","").append($("<img/>").attr("src","/assets/images/content/button_back.png").attr("alt","Back to Start Developing"));return button;},BackButtonClick:function(e){if(e.preventDefault){e.preventDefault();}
if(e.stopPropagation){e.stopPropagation();}
if(GetIsTransitioning()===false){var backButton=e.currentTarget;var rel=Const.DEVELOPING_SECTION;CallNavChange(rel);}
return false;}});
;;;
var ExperienceCanvasLayoutManager=Class.create(ExperienceLayoutManager,{Framerate:16,ScrollSpeed:0.4,ScrollDeadZonePercent:0.35,Easing:0.1,StageWidth:1100,StageHeight:600,PopupSize:{width:300,height:180},PartnerMargin:4,GetStateParams:function(){var stateParams={};var state=this.State;if(state==="partner"){state=this.CurrentLayoutState}
if(state==="category"){stateParams.numRows=3;stateParams.numCols=null;stateParams.paneSize={width:155,height:147};stateParams.previewImageSize={width:135,height:80};stateParams.hSpacing=0;stateParams.vSpacing=0;stateParams.previewUrlField="ScreenshotSrc";}
else if(state==="landing"){stateParams.numRows=2;stateParams.numCols=null;stateParams.paneSize={width:307,height:220};stateParams.previewImageSize={width:283,height:167};stateParams.hSpacing=0;stateParams.vSpacing=0;stateParams.previewUrlField="ScreenshotSrc";}
return stateParams;},ImageMapUrl:"assets/images/imagemap-experience.js?v="+siteVersion,DisplayRolloverEffects:false,GraphicsEngine:null,LoadMapInitiated:null,ControlsEngine:null,CanvasBackground:null,CanvasForeground:null,CurrentLayoutState:null,ContentWidth:0,SlideContainerX:0,PartnerSlideContainerX:0,PartnerSlideContainerInitialX:0,CanvasHCenter:null,ScrollDirection:0,SlideContainerMin:0,SlideContainerMax:0,AllowScroll:false,MouseDownScroll:null,LastEnteredImage:null,ImagePanDirection:null,ResizeEventHandlerFn:null,RealtimeInterval:null,AutoSlideInterval:null,UpdateLoadProgressInterval:null,AnimateCategoryWindowPositionsInterval:null,SlideContainerSprite:null,PopupSprite:null,PopupTitleSprite:null,PopupBodySprite:null,RolloverSprite:null,PinningIconSprite:null,PinningPopupSprite:null,OfferIconSprite:null,OfferPopupSprite:null,LandingPageBGSprite:null,LoadingSprite:null,MouseOverStack:null,TransitionIn:function($super){$super();this.CanvasBackground=$("<canvas/>").attr("id","experience_canvas_background").attr("width",this.StageWidth).attr("height",this.StageHeight).appendTo($(document.body))[0];this.CanvasForeground=$("<canvas/>").attr("id","experience_canvas_foreground").attr("width",this.StageWidth).attr("height",this.StageHeight).appendTo($(document.body))[0];this.CreateScrollArrows().prependTo("#nav_experience");this.GraphicsEngine=new Bravo.Engine.Graphics.Engine([[this.CanvasBackground],[this.CanvasForeground]],[true,true],this.StageWidth,this.StageHeight);this.LoadMapInitiated=false;this.ControlsEngine=new Bravo.Engine.Controls.Engine(this.CanvasForeground,false,true,this.CanvasEnterEventHandler.bind(this),this.CanvasLeaveEventHandler.bind(this));this.CurrentLayoutState=null;this.ContentWidth=0;this.SlideContainerX=0;this.PartnerSlideContainerX=0;this.PartnerSlideContainerInitialX=0;this.CanvasHCenter=null;this.ScrollDirection=0;this.AllowScroll=false;this.MouseDownScroll=null;this.LastEnteredImage=null;this.ImagePanDirection=null;this.ResizeEventHandlerFn=null;this.RealtimeInterval=null;this.AutoSlideInterval=null;this.UpdateLoadProgressInterval=null,this.SlideContainerSprite=null;this.PopupSprite=null;this.PopupTitleSprite=null;this.PopupBodySprite=null;this.RolloverSprite=null;this.PinningIconSprite=null;this.PinningPopupSprite=null;this.OfferIconSprite=null;this.OfferPopupSprite=null;this.LandingPageBGSprite=null;this.LoadingSprite=null;this.ClearMouseOverStack();this.ResizeEventHandlerFn=this.ResizeEventHandler.bind(this);$(window).bind("resize.Experience",this.ResizeEventHandlerFn);$(this.CanvasForeground).bind("click",this.CanvasClickEventHandler.bind(this));$(this.CanvasForeground).bind("mousemove",this.CanvasMoveEventHandler.bind(this));this.ResizeEventHandler();},Cleanup:function(){this.ClearMouseOverStack();window.clearInterval(this.RealtimeInterval);window.clearInterval(this.AutoSlideInterval);window.clearInterval(this.UpdateLoadProgressInterval);window.clearInterval(this.AnimateCategoryWindowPositionsInterval);$(window).unbind("resize.Experience",this.ResizeEventHandlerFn);this.ResizeEventHandlerFn=null;$(this.CanvasForeground).unbind();this.RemoveSpriteItems();$(this.CanvasBackground).remove();$(this.CanvasForeground).remove();},TransitionInLanding:function($super){var animateScroll=(this.State===this.CurrentLayoutState?false:true);$super();$("#nav_experience").show();$(".manual_scroll").hide();this.ResizeEventHandler();this.GenerateTiledLayout(animateScroll);this.CurrentLayoutState="landing";},TransitionToCategory:function($super,linkName){var lastPath=$("#back_experience").attr("rel");var newPath=linkName;var animateScroll=(lastPath===newPath?false:true);$super(linkName);$("#nav_experience").show();$(".manual_scroll").show();this.ResizeEventHandler();this.GenerateTiledLayout(animateScroll);this.CurrentLayoutState="category";},TransitionToPartner:function($super,linkName){$super(linkName);$("#nav_experience").show();this.ControlsEngine.SetSurfaceEnabled(false);this.ResizeEventHandler();},PerformAnimation:function($super,item){var _self=this;$super(item);var matchedItems=this.SectionUIObjectsFiltered.matches;var clickedItemIndex=$.inArray(item,matchedItems);if(clickedItemIndex>=0){var stateParams=this.GetStateParams();var leftEdgeDomPosition={x:item.GridX-this.PartnerMargin,y:item.GridY+item.DestinationSize.h+this.PartnerMargin}
var rightEdgeDomPosition={x:item.GridX+item.DestinationSize.w+this.PartnerMargin,y:item.GridY}
var leftEdgeCanvasPosition=this.DOMToCanvasCoordinates(leftEdgeDomPosition);var rightEdgeCanvasPosition=this.DOMToCanvasCoordinates(rightEdgeDomPosition);var leftEdgePosition={x:leftEdgeCanvasPosition.x-this.SlideContainerSprite.Position.x,y:leftEdgeCanvasPosition.y-this.SlideContainerSprite.Position.y};var rightEdgePosition={x:rightEdgeCanvasPosition.x-this.SlideContainerSprite.Position.x,y:rightEdgeCanvasPosition.y-this.SlideContainerSprite.Position.y};this.PartnerSlideContainerX=0;this.PartnerSlideContainerInitialX=leftEdgeCanvasPosition.x
var leftEdgeItems=[];for(var i=clickedItemIndex-1;i>=0;i--){leftEdgeItems.push(matchedItems[i]);}
var leftEdgeGridLayout=this.GridBuilder(leftEdgeItems.length,stateParams.paneSize.width,stateParams.paneSize.height,stateParams.numRows,stateParams.numCols,stateParams.hSpacing,stateParams.vSpacing,leftEdgePosition.x,leftEdgePosition.y,true,true);for(var i=0;i<leftEdgeItems.length;i++){var pane=leftEdgeItems[i].Pane;$(pane.Position).stop().animate({"x":leftEdgeGridLayout[i].x,"y":leftEdgeGridLayout[i].y},{queue:false,duration:700,easing:EasingTypes.InOutQuad,step:function(){_self.SetNeedsRepaintAll();}});}
var rightEdgeItems=[];for(var i=clickedItemIndex+1;i<matchedItems.length;i++){rightEdgeItems.push(matchedItems[i]);}
var rightEdgeGridLayout=this.GridBuilder(rightEdgeItems.length,stateParams.paneSize.width,stateParams.paneSize.height,stateParams.numRows,stateParams.numCols,stateParams.hSpacing,stateParams.vSpacing,rightEdgePosition.x,rightEdgePosition.y);for(var i=0;i<rightEdgeItems.length;i++){var pane=rightEdgeItems[i].Pane;$(pane.Position).stop().animate({"x":rightEdgeGridLayout[i].x,"y":rightEdgeGridLayout[i].y},{queue:false,duration:700,easing:EasingTypes.InOutQuad,step:function(){_self.SetNeedsRepaintAll();}});}}},TransitionOutState:function($super){this.ClearMouseOverStack();$super();},TransitionOut:function($super){var _self=this;this.ClearMouseOverStack();$(window).wait(1000,function(){_self.Cleanup();});$super();},TransitionOutLanding:function(){var _self=this;var matchedItems=this.SectionUIObjectsFiltered.matches;var duration=300;if(this.DisplayRolloverEffects){this.GraphicsEngine.FadeOut(this.PopupSprite,duration);this.GraphicsEngine.FadeOut(this.RolloverSprite,duration);}
this.GraphicsEngine.FadeOut(this.PinningPopupSprite,duration);this.GraphicsEngine.FadeOut(this.OfferPopupSprite,duration);$.each(matchedItems,function(index,item){var pane=item.Pane;_self.GraphicsEngine.FadeOut(pane,duration);});},TransitionOutCategory:function(){var _self=this;var matchedItems=this.SectionUIObjectsFiltered.matches;var duration=300;if(this.DisplayRolloverEffects){this.GraphicsEngine.FadeOut(this.PopupSprite,duration);this.GraphicsEngine.FadeOut(this.RolloverSprite,duration);}
this.GraphicsEngine.FadeOut(this.PinningPopupSprite,duration);this.GraphicsEngine.FadeOut(this.OfferPopupSprite,duration);var matchedItems=matchedItems.slice();var centerItem=matchedItems[0];var fallX=Math.floor(Math.random()*800);matchedItems.sort(function(a,b){var compA=Bravo.Engine.Math.Trig.GetDistanceFrom(a.Pane,fallX,0);var compB=Bravo.Engine.Math.Trig.GetDistanceFrom(b.Pane,fallX,0);return-1*(compA<compB)?-1:(compA>compB)?1:0;});$.each(matchedItems,function(index,item){var pane=item.Pane;$(pane.Position).stop().animate({"y":450+(100*index)},{easing:EasingTypes.InOutQuint,duration:1000,queue:false,step:function(){_self.SetNeedsRepaintAll();}});});},TransitionOutPartner:function(){var _self=this;$.each(this.SectionItems,function(i,pane){pane.WindowUI.unbind("mousemove").removeClass(Const.MAIN_WINDOW).removeAttr("role").addClass(Const.PREVIEW_WINDOW)});this.PartnerSlideContainerX=0;this.PartnerSlideContainerInitialX=0;if(this.CurrentItem){this.ShrinkPartnerWindow(this.CurrentItem,true);}},BeforePartnerLoad:function(previousItem,nextItem,direction,previousItemX,nextItemX,w,h){if(this.LastItem){this.ShrinkPartnerWindow(this.LastItem,false);}
this.ExpandPartnerWindow(this.CurrentItem);},ShrinkPartnerWindow:function(item,move){var itemPosition={x:item.GridX+(item.DestinationSize.w*0.25),y:item.GridY+(item.DestinationSize.h*0.25),width:item.DestinationSize.w*0.5,height:item.DestinationSize.h*0.5}
if(item.Pane){this.GraphicsEngine.FadeIn(item.Pane,800);var panePosition=item.Pane.GetAbsolutePosition();var domPosition=this.CanvasToDOMCoordinates(panePosition);itemPosition={x:domPosition.x,y:domPosition.y,width:item.Pane.Size.width,height:item.Pane.Size.height}}
item.WindowUI.stop();if(move){item.WindowUI.animate({left:itemPosition.x,top:itemPosition.y,width:itemPosition.width,height:itemPosition.height,opacity:0},{queue:false,duration:500,easing:EasingTypes.Swing});}
item.WindowUI.animate({opacity:0},{queue:false,duration:500,easing:EasingTypes.Swing,complete:function(){_self.ControlsEngine.SetSurfaceEnabled(true);$(this).hide();$(this).find(Selectors.MAIN_CONTENT).empty();}});},ExpandPartnerWindow:function(item){var itemPosition={x:item.GridX+(item.DestinationSize.w*0.25),y:item.GridY+(item.DestinationSize.h*0.25),width:item.DestinationSize.w*0.5,height:item.DestinationSize.h*0.5}
if(item.Pane){this.GraphicsEngine.FadeOut(item.Pane,500);var panePosition=item.Pane.GetAbsolutePosition();var domPosition=this.CanvasToDOMCoordinates(panePosition);itemPosition={x:domPosition.x,y:domPosition.y,width:item.Pane.Size.width,height:item.Pane.Size.height}}
item.WindowUI.css({left:itemPosition.x,top:itemPosition.y,width:itemPosition.width,height:itemPosition.height,opacity:0});item.WindowUI.show();},AfterPartnerLoad:function(){var self=this;this.CurrentItem.LoadContent();this.CurrentItem.WindowUI.show();if(this.LastItem){this.LastItem.WindowUI.addClass(Const.PREVIEW_WINDOW).hide().find(Selectors.MAIN_CONTENT).empty();}},CanvasMoveEventHandler:function(e){var _self=this;var absolutePosition=_self.ControlsEngine.GetAbsolutePosition(e);var relativePosition=_self.ControlsEngine.GetRelativePosition(absolutePosition.x,absolutePosition.y);var x=relativePosition.x;var y=relativePosition.y;if(this.DisplayRolloverEffects&&_self.PopupSprite!=null&&_self.State==="category"){_self.PopupSprite.Position.y=y-20;_self.PopupSprite.Position.x=x-20
var flip=x>_self.StageWidth-320;if(flip){if(!_self.PopupBubbleSprite.Flipped){_self.PopupBubbleSprite.Flipped=true;$(_self.PopupBubbleSprite.Position).stop().animate({"x":-300},{duration:150,easing:EasingTypes.InOutQuad,queue:false,step:function(){_self.SetNeedsRepaintForeground();}});}}
else{if(_self.PopupBubbleSprite.Flipped){_self.PopupBubbleSprite.Flipped=false;$(_self.PopupBubbleSprite.Position).stop().animate({"x":30},{duration:150,easing:EasingTypes.InOutQuad,queue:false,step:function(){_self.SetNeedsRepaintForeground();}});}}}
var mouseLocationX=x;var deadZone=_self.StageWidth*_self.ScrollDeadZonePercent;if(mouseLocationX<_self.CanvasHCenter-deadZone){_self.ScrollDirection=-(_self.ScrollSpeed*(x-_self.CanvasHCenter+deadZone));}else if(mouseLocationX>_self.CanvasHCenter+deadZone){_self.ScrollDirection=-(_self.ScrollSpeed*(x-_self.CanvasHCenter-deadZone));}else{_self.ScrollDirection=0;}
_self.SetNeedsRepaintForeground();},CanvasClickEventHandler:function(e){var backClicked=false;if(this.State==="partner"){$("#back_experience").trigger("click");backClicked=true;}
var x=e.clientX;var y=e.clientY;var overlay=$(e.currentTarget);overlay.css("visibility","hidden");overlay.css("display","none");var element=document.elementFromPoint(x,y);overlay.css("visibility","visible");overlay.css("display","block");var id=$(element).attr("id");if(!((id==="back_experience"||id==="back_experience_image")&&backClicked)){$(element).trigger("click");$(element).trigger("mousedown");if(element!=null&&element.tagName&&element.tagName.toLowerCase()!=="a"){element=$(element).closest("a")[0];}
if(element!=null&&element.tagName&&element.tagName.toLowerCase()==="a"){if(element.href){window.location.href=element.href;}}}},CanvasEnterEventHandler:function(){this.AllowScroll=true;},CanvasLeaveEventHandler:function(){this.SetNeedsRepaintAll();this.AllowScroll=false;this.LastEnteredPane=null;},ResizeEventHandler:function(){var windowWidth=$(window).width()-4;if(windowWidth<0){windowWidth=0;}
this.StageWidth=windowWidth;this.CanvasHCenter=this.StageWidth*0.5;this.SlideContainerMax=0;this.SlideContainerMin=0;if(this.StageWidth>this.ContentWidth){this.SlideContainerMax=-((this.ContentWidth-this.StageWidth)*0.5);this.SlideContainerMin=this.SlideContainerMax;}
else{this.SlideContainerMax=0;this.SlideContainerMin=-(this.ContentWidth-this.StageWidth);}
if(this.State==="partner"&&this.CurrentItem){var leftEdgeDomPosition={x:this.CurrentItem.GridX-this.PartnerMargin,y:0}
var leftEdgeCanvasPosition=this.DOMToCanvasCoordinates(leftEdgeDomPosition);this.PartnerSlideContainerX=leftEdgeCanvasPosition.x-this.PartnerSlideContainerInitialX;}
$(this.CanvasBackground).attr("width",this.StageWidth);$(this.CanvasForeground).attr("width",this.StageWidth);this.SetNeedsRepaintAll();this.RenderStep();},PinningIconEnterEventHandler:function(e){var sprite=e.sprite;this.PinningIconEntered=true;sprite.AddChild(this.PinningPopupSprite);sprite.AddChild(this.PinningIconSprite);this.PinningIconSprite.Visible=true;this.ControlsEngine.NeedsResort=true;var absolutePosition=this.ControlsEngine.GetAbsolutePosition(e);var relativePosition=this.ControlsEngine.GetRelativePosition(absolutePosition.x,absolutePosition.y);var x=relativePosition.x;var y=relativePosition.y;if(x<80){this.PinningPopupSprite.Position.x=9;}else{this.PinningPopupSprite.Position.x=-179;}
this.GraphicsEngine.FadeIn(this.PinningPopupSprite);this.SetCursorType(true);},PinningIconLeaveEventHandler:function(e){var sprite=e.sprite;this.PinningIconEntered=false;if(!this.PinningPopupEntered&&!this.PinningIconEntered){this.GraphicsEngine.FadeOut(this.PinningPopupSprite);this.PinningIconSprite.ParentSprite=null;this.PinningIconSprite.Visible=false;}
this.SetCursorType(false);},PinningPopupClickEventHandler:function(e){CallNavChange(Const.HIGHLIGHTS_SECTION+"/seamless-with-windows-7");},PinningPopupEnterEventHandler:function(e){var sprite=e.sprite;this.PinningPopupEntered=true;this.GraphicsEngine.FadeIn(this.PinningPopupSprite);this.SetCursorType(true);},PinningPopupLeaveEventHandler:function(e){var sprite=e.sprite;this.PinningPopupEntered=false;if(!this.PinningPopupEntered&&!this.PinningIconEntered){this.GraphicsEngine.FadeOut(this.PinningPopupSprite);this.PinningIconSprite.ParentSprite=null;this.PinningIconSprite.Visible=false;}
this.SetCursorType(false);},OfferIconEnterEventHandler:function(e){var sprite=e.sprite;this.OfferIconEntered=true;sprite.AddChild(this.OfferPopupSprite);sprite.AddChild(this.OfferIconSprite);this.OfferIconSprite.Visible=true;this.ControlsEngine.NeedsResort=true;var absolutePosition=this.ControlsEngine.GetAbsolutePosition(e);var relativePosition=this.ControlsEngine.GetRelativePosition(absolutePosition.x,absolutePosition.y);var x=relativePosition.x;var y=relativePosition.y;if(x<80){this.OfferPopupSprite.Position.x=9;}else{this.OfferPopupSprite.Position.x=-179;}
this.GraphicsEngine.FadeIn(this.OfferPopupSprite);this.SetCursorType(true);},OfferIconLeaveEventHandler:function(e){var sprite=e.sprite;this.OfferIconEntered=false;if(!this.OfferPopupEntered&&!this.OfferIconEntered){this.GraphicsEngine.FadeOut(this.OfferPopupSprite);this.OfferIconSprite.ParentSprite=null;this.OfferIconSprite.Visible=false;}
this.SetCursorType(false);},OfferPopupEnterEventHandler:function(e){var sprite=e.sprite;this.OfferPopupEntered=true;this.GraphicsEngine.FadeIn(this.OfferPopupSprite);this.SetCursorType(true);},OfferPopupLeaveEventHandler:function(e){var sprite=e.sprite;this.OfferPopupEntered=false;if(!this.OfferPopupEntered&&!this.OfferIconEntered){this.GraphicsEngine.FadeOut(this.OfferPopupSprite);this.OfferIconSprite.ParentSprite=null;this.OfferIconSprite.Visible=false;}
this.SetCursorType(false);},PaneClickEventHandler:function(e){var pane=e.sprite;var item=this.SectionItems[pane.ID];var linkName=item.LinkName;CallNavChange(Const.EXPERIENCE_SECTION+"/"+linkName);},CanvasToDOMCoordinates:function(canvasPos){var contentPosition=$(Selectors.MAIN_CONTAINER).getAbsolutePositionAlt(0,0,true);var domPos={x:canvasPos.x-contentPosition.x,y:canvasPos.y-contentPosition.y};return domPos;},DOMToCanvasCoordinates:function(domPos){var contentPosition=$(Selectors.MAIN_CONTAINER).getAbsolutePositionAlt(0,0,true);var canvasPos={x:domPos.x+contentPosition.x,y:domPos.y+contentPosition.y};return canvasPos;},ClearMouseOverStack:function(){this.MouseOverStack=[];this.SetCursor();},SetCursorType:function(over){if(over){this.MouseOverStack.push(true);}
else{this.MouseOverStack.pop();}
this.SetCursor();},SetCursor:function(){if(this.MouseOverStack.length>0){$(document.body).css("cursor","pointer");}
else{$(document.body).css("cursor","default");}},PaneEnterEventHandler:function(e){var pane=e.sprite;var item=this.SectionItems[pane.ID];this.LastEnteredImage=item.PreviewImage;this.ImagePanDirection=1;this.GraphicsEngine.FadeIn(item.PaneHighlight,0);if(this.DisplayRolloverEffects){if(this.State==="landing"){this.RolloverBodySprite.SetText(item.TruncatedDescription);var textSize=this.GraphicsEngine.GetTextSize(this.RolloverBodySprite);this.RolloverBodySprite.Position.y=200-textSize.height;this.RolloverLogoSprite.Image=null;this.GraphicsEngine.LoadFile(item.LogoSrc,this.RolloverLogoLoaded.bind(this));pane.AddChild(this.RolloverSprite);this.RolloverSprite.Alpha=0;this.GraphicsEngine.FadeIn(this.RolloverSprite);}
else if(this.State==="category"){this.PopupTitleSprite.SetText(item.Title);this.PopupBodySprite.SetText(item.TruncatedDescription);this.PopupFaviconSprite.Image=null;this.PopupLogoSprite.Image=null;this.GraphicsEngine.LoadFile(item.FaviconSrc,this.PopupFaviconLoaded.bind(this));this.GraphicsEngine.LoadFile(item.LogoSrc,this.PopupLogoLoaded.bind(this));this.GraphicsEngine.FadeIn(this.PopupSprite);}}
this.SetNeedsRepaintForeground();this.SetCursorType(true);},PaneLeaveEventHandler:function(e){var pane=e.sprite;var item=this.SectionItems[pane.ID];this.GraphicsEngine.FadeOut(item.PaneHighlight,200);if(this.LastEnteredImage===item.PreviewImage){if(this.DisplayRolloverEffects){if(this.State==="landing"){this.GraphicsEngine.FadeOut(this.RolloverSprite);}
else if(this.State==="category"){this.GraphicsEngine.FadeOut(this.PopupSprite);}}
this.LastEnteredImage=null;}
this.SetCursorType(false);},PopupFaviconLoaded:function(image){this.PopupFaviconSprite.SetImage(image,true,false);},PopupLogoLoaded:function(image){this.PopupLogoSprite.SetImage(image,true,true);this.PopupLogoSprite.Position.x=this.PopupSize.width-this.PopupLogoSprite.Size.width-32;this.PopupLogoSprite.Position.y=this.PopupSize.height-this.PopupLogoSprite.Size.height;},RolloverLogoLoaded:function(image){this.RolloverLogoSprite.SetImage(image,true,true);var textSize=this.GraphicsEngine.GetTextSize(this.RolloverBodySprite);var y=this.RolloverSprite.Size.height-(textSize.height*0.5)-(this.RolloverLogoSprite.Size.height*0.5)-10;if(y>this.RolloverSprite.Size.height-this.RolloverLogoSprite.Size.height-10){y=this.RolloverSprite.Size.height-this.RolloverLogoSprite.Size.height-10;}
this.RolloverLogoSprite.Position.y=y;},GenerateTiledLayout:function(animateScroll){if(this.GraphicsEngine.MapProcessed===true){if(this.State===this.CurrentLayoutState){this.GenerateWindowPositions(animateScroll);}
else{this.ProcessMapComplete();}}
else{if(this.LoadMapInitiated===false){this.LoadMapInitiated=true;this.GraphicsEngine.LoadMap(this.ImageMapUrl,this.LoapMapComplete.bind(this));}}},LoapMapComplete:function(imageMapJSON){var allItems=this.SectionItems;var stateParams=this.GetStateParams();if(imageMapJSON==null){imageMapJSON={"files":{},"objects":{}}}
for(var i=0;i<allItems.length;i++){var item=allItems[i];var previewUrl=allItems[i][stateParams.previewUrlField];var imageClass="previewImage-"+i;if(previewUrl!=null&&previewUrl!=""){imageMapJSON.files[imageClass]={"src":previewUrl};imageMapJSON.objects[imageClass]={"fileId":imageClass};}}
this.GraphicsEngine.ProcessMap(imageMapJSON,this.ProcessMapComplete.bind(this));this.InitLoop();this.CreateLoadProgress();},CreateLoadProgress:function(){var x=this.StageWidth*0.5;var y=this.StageHeight*0.5;this.RemoveLoadProgress();this.LoadingSprite=this.GraphicsEngine.AddSprite({Position:{x:x,y:y,z:1},ID:"loading-text",Text:"",ContainerIndex:1});this.UpdateLoadProgressInterval=window.setInterval(this.UpdateLoadProgress.bind(this),100);},UpdateLoadProgress:function(){var text='Loading experience '+this.GraphicsEngine.MapFilesLoaded+"/"+this.GraphicsEngine.MapFilesTotal;this.LoadingSprite.SetText(text);this.SetNeedsRepaintForeground();if(this.GraphicsEngine.MapFilesLoaded===this.GraphicsEngine.MapFilesTotal){this.RemoveLoadProgress();}},RemoveLoadProgress:function(){if(this.LoadingSprite){this.LoadingSprite.Active=false;}
this.RenderStep();window.clearTimeout(this.UpdateLoadProgressInterval);},ProcessMapComplete:function(){this.RemoveSpriteItems();this.CreateSpriteItems();},RemoveSpriteItems:function(){this.GraphicsEngine.RemoveAllSprites();this.ControlsEngine.RemoveAllEventListeners();},CreateSpriteItems:function(){var allItems=this.SectionItems;var stateParams=this.GetStateParams();this.SlideContainerSprite=this.GraphicsEngine.AddSprite({Position:{x:0,y:155},ID:"sliderContainer",ImageMapID:"",ContainerIndex:0});this.PinningPopupSprite=this.GraphicsEngine.AddSprite({Position:{x:0,y:-125,z:1},ID:"experience_pinning_bubble",ImageMapID:"experience_pinning_bubble",ContainerIndex:1,Visible:false});this.PinningIconSprite=this.GraphicsEngine.AddSprite({Position:{x:0,y:0,z:2},ID:"icn-pin",ImageMapID:"icn-pin",ContainerIndex:1,Visible:false});this.ControlsEngine.AddEventListener(this.PinningPopupSprite,"onclick",this.PinningPopupClickEventHandler.bind(this));this.ControlsEngine.AddEventListener(this.PinningPopupSprite,"onmouseenter",this.PinningPopupEnterEventHandler.bind(this));this.ControlsEngine.AddEventListener(this.PinningPopupSprite,"onmouseleave",this.PinningPopupLeaveEventHandler.bind(this));this.OfferPopupSprite=this.GraphicsEngine.AddSprite({Position:{x:0,y:-125,z:1},ID:"experience_offer_bubble",ImageMapID:"experience_offer_bubble",ContainerIndex:1,Visible:false});this.OfferIconSprite=this.GraphicsEngine.AddSprite({Position:{x:0,y:0,z:2},ID:"icn-offer",ImageMapID:"icn-offer",ContainerIndex:1,Visible:false});this.ControlsEngine.AddEventListener(this.OfferPopupSprite,"onmouseenter",this.OfferPopupEnterEventHandler.bind(this));this.ControlsEngine.AddEventListener(this.OfferPopupSprite,"onmouseleave",this.OfferPopupLeaveEventHandler.bind(this));if(this.DisplayRolloverEffects){if(this.State==="landing"){this.CreateRollover();}
else if(this.State==="category"){this.CreatePopup();}}
for(var i=0;i<allItems.length;i++){var item=allItems[i];item.Pane=null;item.PaneHighlight=null;item.PreviewImage=null;item.Index=i;if(this.State==="category"||item.Featured===true){var strippedDescription=StripHTML(item.DescriptionText);var categoryDescription=strippedDescription;if(this.State==="category"){item.TruncatedDescription=strippedDescription;}
else if(this.State==="landing"){item.TruncatedDescription=TruncateTextWords(strippedDescription,15,"...");}
var pane=this.GraphicsEngine.AddSprite({ParentSprite:this.SlideContainerSprite,Position:{x:0,y:0,z:i*10},ID:i,ImageMapID:(this.State==="category")?"experience_partner_pane_category":"experience_partner_pane_landing",Visible:false,Alpha:0,ContainerIndex:0});var paneHighlight=this.GraphicsEngine.AddSprite({ParentSprite:pane,Position:{x:0,y:0,z:0},ID:"experience_partner_pane-highlight-"+i,ImageMapID:(this.State==="category")?"experience_partner_pane_category_highlight":"experience_partner_pane_landing_highlight",Visible:true,Alpha:0,ContainerIndex:0});var previewImage=this.GraphicsEngine.AddSprite({ParentSprite:pane,Position:(this.State==="category")?{x:10,y:11,z:1}:{x:12,y:10,z:1},ID:"previewImage-"+i,ImageMapID:"previewImage-"+i,Size:{width:stateParams.previewImageSize.width,height:stateParams.previewImageSize.height},ContainerIndex:0});var title=this.GraphicsEngine.AddSprite({ParentSprite:pane,Position:(this.State==="category")?{x:143,y:97,z:1}:{x:293,y:182,z:1},ID:"title-"+i,Text:item.Title,Wrap:true,Color:"#35393c",Font:"normal 14px 'Segoe Regular', Segoe, 'Segoe UI', Arial, sans-serif",Size:(this.State==="category")?{width:160,height:103}:{width:298,height:103},Leading:0,Align:"right",ContainerIndex:0});item.Pane=pane;item.PaneHighlight=paneHighlight;item.PreviewImage=previewImage;this.ControlsEngine.AddEventListener(pane,"onclick",this.PaneClickEventHandler.bind(this));this.ControlsEngine.AddEventListener(pane,"onmouseenter",this.PaneEnterEventHandler.bind(this));this.ControlsEngine.AddEventListener(pane,"onmouseleave",this.PaneLeaveEventHandler.bind(this));var iconPosition=(this.State==="category")?{x:11,y:96,z:98}:{x:13,y:185,z:98};var iconIncrement=(this.State==="category")?{x:0,y:24,z:0}:{x:27,y:0,z:0};if(item.Pinned===true){var pinningIcon=this.GraphicsEngine.AddSprite({ParentSprite:pane,Position:{x:iconPosition.x,y:iconPosition.y,z:iconPosition.z},ID:"icn-pin-"+i,ImageMapID:"icn-pin",ContainerIndex:1});this.ControlsEngine.AddEventListener(pinningIcon,"onmouseenter",this.PinningIconEnterEventHandler.bind(this));this.ControlsEngine.AddEventListener(pinningIcon,"onmouseleave",this.PinningIconLeaveEventHandler.bind(this));iconPosition.x+=iconIncrement.x;iconPosition.y+=iconIncrement.y;iconPosition.z+=iconIncrement.z;}
if(item.Offer===true){var offerIcon=this.GraphicsEngine.AddSprite({ParentSprite:pane,Position:{x:iconPosition.x,y:iconPosition.y,z:iconPosition.z},ID:"icn-offer-"+i,ImageMapID:"icn-offer",ContainerIndex:1});this.ControlsEngine.AddEventListener(offerIcon,"onmouseenter",this.OfferIconEnterEventHandler.bind(this));this.ControlsEngine.AddEventListener(offerIcon,"onmouseleave",this.OfferIconLeaveEventHandler.bind(this));iconPosition.x+=iconIncrement.x;iconPosition.y+=iconIncrement.y;iconPosition.z+=iconIncrement.z;}}}
this.ControlsEngine.NeedsResort=true;this.GenerateWindowPositions(true);},CreateRollover:function(){this.RolloverSprite=this.GraphicsEngine.AddSprite({Position:{x:0,y:0,z:100},ID:"rollover",ImageMapID:"experience_hover",ContainerIndex:1,Visible:false});this.RolloverBodySprite=this.GraphicsEngine.AddSprite({Position:{x:120,y:0,z:102},ID:"rollover_description",Text:"Body Text",Wrap:true,Color:"#59595C",Font:"normal 12px 'Segoe Regular', Segoe, 'Segoe UI', Arial, sans-serif",Size:{width:230,height:200},Leading:1.5,Align:"left",ContainerIndex:1});this.RolloverLogoSprite=this.GraphicsEngine.AddSprite({Position:{x:5,y:0,z:101},ID:"rollover_logo",ContainerIndex:1});this.RolloverSprite.AddChild(this.RolloverBodySprite);this.RolloverSprite.AddChild(this.RolloverLogoSprite);},CreatePopup:function(){this.PopupSprite=this.GraphicsEngine.AddSprite({Position:{x:0,y:0,z:100},ID:"icn-plus",ImageMapID:"icn-plus",ContainerIndex:1,AlphaMax:0.9,Visible:false});this.PopupBubbleSprite=this.GraphicsEngine.AddSprite({Position:{x:30,y:-195,z:100},ID:"experience_modal_pane",ImageMapID:"experience_modal_pane",ContainerIndex:1});this.PopupTitleSprite=this.GraphicsEngine.AddSprite({Position:{x:23,y:18,z:101},ID:"popup_title",Text:"Title Text",Wrap:false,Color:"#07ABD7",Font:"bold 18px Arial",Size:{width:300,height:103},Leading:0,Align:"left",ContainerIndex:1});this.PopupBodySprite=this.GraphicsEngine.AddSprite({Position:{x:25,y:42,z:102},ID:"popup_description",Text:"Body Text",Wrap:true,Elipsis:"... (more)",Color:"#000",Font:"normal 12px Arial",Size:{width:390,height:90},Leading:-1.5,Align:"left",ContainerIndex:1});this.PopupFaviconSprite=this.GraphicsEngine.AddSprite({ID:"popup_favicon",Position:{x:25,y:this.PopupSize.height-30,z:103},Size:{width:30,height:30},ContainerIndex:1});this.PopupLogoSprite=this.GraphicsEngine.AddSprite({ID:"popup_logo",Position:{x:0,y:0,z:103},ContainerIndex:1});this.PopupSprite.AddChild(this.PopupBubbleSprite);this.PopupBubbleSprite.AddChild(this.PopupTitleSprite);this.PopupBubbleSprite.AddChild(this.PopupBodySprite);this.PopupBubbleSprite.AddChild(this.PopupFaviconSprite);this.PopupBubbleSprite.AddChild(this.PopupLogoSprite);},CreateScrollArrows:function(){var arrows=$("<div/>").hide().addClass("manual_scroll").append($("<a/>").addClass("left").html("left").bind("mousedown",this.ScrollLeftArrow.bind(this)).bind("mouseup",this.ScrollArrowUp.bind(this)).bind("mouseout",this.ScrollArrowUp.bind(this))).append($("<span/>").html("Scroll")).append($("<a/>").addClass("right").html("right").bind("mousedown",this.ScrollRightArrow.bind(this)).bind("mouseup",this.ScrollArrowUp.bind(this)).bind("mouseout",this.ScrollArrowUp.bind(this)));return arrows;},GenerateWindowPositions:function(animateScroll){if(this.State==="landing"){this.GenerateLandingWindowPositions(animateScroll);}
else if(this.State==="category"){this.GenerateCategoryWindowPositions(animateScroll);}},GenerateLandingWindowPositions:function(animateScroll){var _self=this;var stateParams=this.GetStateParams();var matchedItems=this.SectionUIObjectsFiltered.matches;var nonmatchedItems=this.SectionUIObjectsFiltered.nonmatches;var gridLayout=this.GridBuilder(matchedItems.length,stateParams.paneSize.width,stateParams.paneSize.height,stateParams.numRows,stateParams.numCols,stateParams.hSpacing,stateParams.vSpacing,0,0);var colCount=Math.ceil(this.SectionUIObjectsFiltered.matches.length/stateParams.numRows);this.ContentWidth=((stateParams.paneSize.width+stateParams.hSpacing)*colCount)-stateParams.hSpacing;this.ResizeEventHandler();var easingType=EasingTypes.OutQuad;for(var i=0;i<matchedItems.length;i++){var pane=matchedItems[i].Pane;if(pane!=null){if(this.LastState!=="partner"){pane.Position.x=gridLayout[i].x;pane.Position.y=gridLayout[i].y;}
else{$(pane.Position).stop().animate({"x":gridLayout[i].x,"y":gridLayout[i].y},{queue:false,duration:500,easing:easingType,step:function(){_self.SetNeedsRepaintAll();}});}
if(pane.Visible!==true){pane.Visible=true;pane.Alpha=0;$(pane).delay(100*i).animate({"Alpha":1},{duration:1000,easing:easingType,step:function(){_self.SetNeedsRepaintAll();}});}}}},GenerateCategoryWindowPositions:function(animateScroll){var _self=this;var stateParams=_self.GetStateParams();var matchedItems=_self.SectionUIObjectsFiltered.matches;var nonmatchedItems=_self.SectionUIObjectsFiltered.nonmatches;var performFallOffAnimation=false;for(var i=0;i<nonmatchedItems.length;i++){var pane=nonmatchedItems[i].Pane;if(pane!=null&&pane.Visible===true){performFallOffAnimation=true;this.GraphicsEngine.FadeOut(pane,400);$(pane.Position).stop().animate({"y":700},{queue:false,duration:400,easing:EasingTypes.InQuad,step:function(){_self.SetNeedsRepaintAll();},complete:function(){this.x=0;this.y=0;}});}}
window.clearTimeout(_self.AnimateCategoryWindowPositionsInterval);if(performFallOffAnimation){_self.AnimateCategoryWindowPositionsInterval=window.setTimeout(_self.AnimateCategoryWindowPositions.bind(_self,animateScroll),150);}
else{_self.AnimateCategoryWindowPositions(animateScroll);}},AnimateCategoryWindowPositions:function(animateScroll){var _self=this;var stateParams=this.GetStateParams();var matchedItems=this.SectionUIObjectsFiltered.matches;var nonmatchedItems=this.SectionUIObjectsFiltered.nonmatches;var gridLayout=this.GridBuilder(matchedItems.length,stateParams.paneSize.width,stateParams.paneSize.height,stateParams.numRows,stateParams.numCols,stateParams.hSpacing,stateParams.vSpacing,0,0);var colCount=Math.ceil(matchedItems.length/stateParams.numRows);this.ContentWidth=((stateParams.paneSize.width+stateParams.hSpacing)*colCount)-stateParams.hSpacing;this.ResizeEventHandler();this.ScrollDirection=0;var easingType=EasingTypes.OutQuad;if(animateScroll){this.MoveToColumn(_self.CurrentCol);easingType=EasingTypes.InOutBack;}
else if(this.StageWidth>this.ContentWidth){this.MoveToColumn(_self.CurrentCol);}
for(var i=0;i<matchedItems.length;i++){var pane=matchedItems[i].Pane;this.GraphicsEngine.FadeIn(pane);$(pane.Position).stop().animate({"y":gridLayout[i].y,"x":gridLayout[i].x},{queue:false,duration:800,easing:easingType,step:function(){_self.SetNeedsRepaintAll();}});}},ScrollRightArrow:function(e){this.MouseDownScroll="RIGHT";},ScrollLeftArrow:function(e){this.MouseDownScroll="LEFT";},ScrollArrowUp:function(e){this.MouseDownScroll=null;},GridBuilder:function(numOfItems,itemWidth,itemHeight,rows,cols,hSpacing,vSpacing,offsetX,offsetY,mirrorX,mirrorY){rows=(rows==null)?2:rows;hSpacing=(hSpacing==null)?0:hSpacing;vSpacing=(vSpacing==null)?0:vSpacing;offsetX=(offsetX==null)?0:offsetX;offsetY=(offsetY==null)?0:offsetY;var xCounter=0;var yCounter=0;var array=[];for(var i=0;i<numOfItems;i++){var x=xCounter;if(mirrorX){x=-(x+1);}
var y=yCounter;if(mirrorY){y=-(y+1);}
var obj=new Object();obj.x=(itemWidth+hSpacing)*x+offsetX;obj.y=(itemHeight+vSpacing)*y+offsetY;array.push(obj);if(yCounter<rows-1){yCounter++;}else{yCounter=0;xCounter++;}}
return array;},MoveToColumn:function(column,onCompleteFn){var targetX=0;if(column<0){targetX=-(this.SlideContainerMax-this.SlideContainerMin)*0.5;}
else{var stateParams=this.GetStateParams();var columnX=(stateParams.paneSize.width+stateParams.hSpacing)*column;targetX=this.SlideContainerMax-columnX;}
var distance=targetX-this.SlideContainerX;window.clearInterval(this.AutoSlideInterval);this.AutoSlideInterval=window.setInterval(this.AutoSlideToColumn.bind(this,targetX,distance,onCompleteFn),this.Framerate);},AutoSlideToColumn:function(targetX,distance,onCompleteFn){var dx=targetX-this.SlideContainerX;var endHit=false;if(Math.abs(dx)<2){this.SlideContainerX=targetX;endHit=true;}
else{var vx=(dx*this.Easing);this.SlideContainerX+=vx;}
if(dx<0&&this.SlideContainerX<this.SlideContainerMin){this.SlideContainerX=this.SlideContainerMin;endHit=true;}
if(dx>0&&this.SlideContainerX>this.SlideContainerMax){this.SlideContainerX=this.SlideContainerMax;endHit=true;}
this.SlideContainerSprite.Position.x=this.SlideContainerX;if(endHit){window.clearInterval(this.AutoSlideInterval);this.AutoSlideInterval=null;if(onCompleteFn){onCompleteFn();}}
this.SetNeedsRepaintAll();},SetNeedsRepaintAll:function(){this.GraphicsEngine.SpriteManager.SetNeedsRepaint(0);this.GraphicsEngine.SpriteManager.SetNeedsRepaint(1);},SetNeedsRepaintForeground:function(){this.GraphicsEngine.SpriteManager.SetNeedsRepaint(1);},SetNeedsRepaintBackground:function(){this.GraphicsEngine.SpriteManager.SetNeedsRepaint(0);},InitLoop:function(){window.clearInterval(this.RealtimeInterval);this.RealtimeInterval=window.setInterval(this.Step.bind(this),this.Framerate);},KillLoop:function(){window.clearInterval(this.RealtimeInterval);},Step:function(){var timestep=0;this.PhysicsStep(timestep);this.RenderStep(timestep);},PhysicsStep:function(timestep){if(this.DisplayRolloverEffects&&this.State==="landing"&&this.LastEnteredImage!=null){var frame=this.LastEnteredImage.Frames[0];if(frame){var x=frame.x+(this.ImagePanDirection*0.5);if(x+frame.width>=this.LastEnteredImage.Image.width){x=this.LastEnteredImage.Image.width-frame.width-1;this.ImagePanDirection=-this.ImagePanDirection;}
if(x<0){x=0;this.ImagePanDirection=-this.ImagePanDirection;}
this.LastEnteredImage.Frames[0].x=x;this.SetNeedsRepaintBackground();}}
if(this.AutoSlideInterval==null){if(this.ControlsEngine.SurfaceEnabled){if(this.MouseDownScroll==="RIGHT"){this.SlideContainerX+=-20;}
else if(this.MouseDownScroll==="LEFT"){this.SlideContainerX+=20;}
else if(this.AllowScroll){this.SlideContainerX+=this.ScrollDirection;}
if(this.SlideContainerX<this.SlideContainerMin){this.SlideContainerX=this.SlideContainerMin;}
if(this.SlideContainerX>this.SlideContainerMax){this.SlideContainerX=this.SlideContainerMax;}}
if(this.SlideContainerSprite&&this.SlideContainerSprite.Position.x!==this.SlideContainerX+this.PartnerSlideContainerX){this.SlideContainerSprite.Position.x=this.SlideContainerX+this.PartnerSlideContainerX;this.ControlsEngine.TriggerEvent("onmouseenter");this.ControlsEngine.TriggerEvent("onmouseleave");this.SetNeedsRepaintAll();}}},RenderStep:function(timestep){this.GraphicsEngine.Step(timestep);}});var UnpluggedCanvasLayoutManager=Class.create(UnpluggedLayoutManager,{Framerate:16,ScrollSpeed:0.4,ScrollDeadZonePercent:0.35,Easing:0.1,StageWidth:1100,StageHeight:600,GetStateParams:function(){var stateParams={};var state=this.State;if(state==="partner"){state=this.CurrentLayoutState}
stateParams.numCols=null;stateParams.previewUrlField="PreviewImgSrc";if(this.CategoryName==="categories"){stateParams.numRows=1;stateParams.paneSize={width:246,height:347};stateParams.hSpacing=5;stateParams.vSpacing=0;}
else if(this.CategoryName==="prizes"){stateParams.numRows=2;stateParams.paneSize={width:115,height:168};stateParams.hSpacing=4;stateParams.vSpacing=5;}
else if(this.CategoryName==="judges"){stateParams.numRows=2;stateParams.paneSize={width:115,height:168};stateParams.hSpacing=4;stateParams.vSpacing=5;}
else{stateParams.numRows=1;stateParams.paneSize={width:307,height:220};stateParams.hSpacing=4;stateParams.vSpacing=5;}
return stateParams;},ImageMapUrl:"assets/images/imagemap-unplugged.js?v="+siteVersion,GraphicsEngine:null,LoadMapInitiated:null,ControlsEngine:null,CanvasBackground:null,CanvasForeground:null,CurrentLayoutState:null,ContentWidth:0,SlideContainerX:0,PartnerSlideContainerX:0,PartnerSlideContainerInitialX:0,CanvasHCenter:null,ScrollDirection:0,SlideContainerMin:0,SlideContainerMax:0,DOMContentWidth:0,DOMSlideContainerX:0,DOMScrollDirection:0,DOMSlideContainerMin:0,DOMSlideContainerMax:0,AllowScroll:false,LastEnteredImage:null,ResizeEventHandlerFn:null,RealtimeInterval:null,AutoSlideInterval:null,UpdateLoadProgressInterval:null,AnimateCategoryWindowPositionsInterval:null,BackgroundSprite:null,SlideContainerSprite:null,LoadingSprite:null,MouseOverStack:null,TransitionIn:function($super){$super();this.CanvasBackground=$("<canvas/>").attr("id","unplugged_canvas_background").attr("width",this.StageWidth).attr("height",this.StageHeight).appendTo($(document.body))[0];this.CanvasForeground=$("<canvas/>").attr("id","unplugged_canvas_foreground").attr("width",this.StageWidth).attr("height",470).appendTo($(document.body))[0];this.GraphicsEngine=new Bravo.Engine.Graphics.Engine([[this.CanvasBackground],[this.CanvasForeground]],[true,true],this.StageWidth,this.StageHeight);this.LoadMapInitiated=false;this.ControlsEngine=new Bravo.Engine.Controls.Engine(this.CanvasForeground,false,true,this.CanvasEnterEventHandler.bind(this),this.CanvasLeaveEventHandler.bind(this));this.CurrentLayoutState=null;this.ContentWidth=0;this.SlideContainerX=0;this.PartnerSlideContainerX=0;this.PartnerSlideContainerInitialX=0;this.CanvasHCenter=null;this.ScrollDirection=0;this.DOMContentWidth=0
this.DOMSlideContainerX=0;this.DOMScrollDirection=0;this.AllowScroll=false;this.LastEnteredImage=null;this.ResizeEventHandlerFn=null;this.RealtimeInterval=null;this.AutoSlideInterval=null;this.UpdateLoadProgressInterval=null;this.BackgroundSprite=null;this.SlideContainerSprite=null;this.LoadingSprite=null;this.ClearMouseOverStack();this.ResizeEventHandlerFn=this.ResizeEventHandler.bind(this);$(window).bind("resize.Unplugged",this.ResizeEventHandlerFn);$(this.CanvasForeground).bind("click",this.CanvasClickEventHandler.bind(this));$(this.CanvasForeground).bind("mousemove",this.CanvasMoveEventHandler.bind(this));$("#landing_unplugged").bind("mousemove",this.WindowMoveEventHandler.bind(this));this.ResizeEventHandler();this.DOMSlideContainerX=-((this.DOMContentWidth-this.StageWidth)*0.5);},TransitionInLanding:function($super){var animateScroll=(this.State===this.CurrentLayoutState?false:true);$super();this.ResizeEventHandler();this.GenerateTiledLayout(animateScroll);this.CurrentLayoutState="landing";},TransitionToCategory:function($super,linkName){var lastPath=$("#back_unplugged").attr("rel");var newPath=linkName;var animateScroll=(lastPath===newPath?false:true);$super(linkName);this.ResizeEventHandler();this.GenerateTiledLayout(animateScroll);this.CurrentLayoutState="category";},TransitionToPartner:function($super,linkName){$super(linkName);this.ResizeEventHandler();},PerformAnimation:function($super,item){var _self=this;$super(item);var matchedItems=this.SectionUIObjectsFiltered.matches;var clickedItemIndex=$.inArray(item,matchedItems);if(clickedItemIndex>=0){var stateParams=this.GetStateParams();this.SlideContainerSprite.Position.x=this.SlideContainerX;var leftEdgeDomPosition={x:item.GridX-stateParams.hSpacing,y:item.GridY+item.DestinationSize.h+stateParams.vSpacing}
var rightEdgeDomPosition={x:item.GridX+item.DestinationSize.w+stateParams.hSpacing+2,y:item.GridY}
var leftEdgeCanvasPosition=this.DOMToCanvasCoordinates(leftEdgeDomPosition);var rightEdgeCanvasPosition=this.DOMToCanvasCoordinates(rightEdgeDomPosition);var leftEdgePosition={x:leftEdgeCanvasPosition.x-this.SlideContainerSprite.Position.x,y:leftEdgeCanvasPosition.y-this.SlideContainerSprite.Position.y};var rightEdgePosition={x:rightEdgeCanvasPosition.x-this.SlideContainerSprite.Position.x,y:rightEdgeCanvasPosition.y-this.SlideContainerSprite.Position.y};this.PartnerSlideContainerX=0;this.PartnerSlideContainerInitialX=leftEdgeCanvasPosition.x
var leftEdgeItems=[];for(var i=clickedItemIndex-1;i>=0;i--){var item=matchedItems[i];leftEdgeItems.push(item);}
var leftEdgeGridLayout=this.GridBuilder(leftEdgeItems.length,stateParams.paneSize.width,stateParams.paneSize.height,stateParams.numRows,stateParams.numCols,stateParams.hSpacing,stateParams.vSpacing,leftEdgePosition.x,leftEdgePosition.y,true,true);if(this.CategoryName==="prizes"){if(leftEdgeGridLayout.length===1){var item=matchedItems[0];leftEdgeGridLayout[0].x-=stateParams.paneSize.width;}}
for(var i=0;i<leftEdgeItems.length;i++){var pane=leftEdgeItems[i].Pane;$(pane.Position).stop().animate({"x":leftEdgeGridLayout[i].x,"y":leftEdgeGridLayout[i].y},{queue:false,duration:450,easing:EasingTypes.InOutQuad,step:function(){_self.SetNeedsRepaintAll();}});}
var rightEdgeItems=[];for(var i=clickedItemIndex+1;i<matchedItems.length;i++){var item=matchedItems[i];if(item.Visible){rightEdgeItems.push(item);}}
var rightEdgeGridLayout=this.GridBuilder(rightEdgeItems.length,stateParams.paneSize.width,stateParams.paneSize.height,stateParams.numRows,stateParams.numCols,stateParams.hSpacing,stateParams.vSpacing,rightEdgePosition.x,rightEdgePosition.y);for(var i=0;i<rightEdgeItems.length;i++){var pane=rightEdgeItems[i].Pane;$(pane.Position).stop().animate({"x":rightEdgeGridLayout[i].x,"y":rightEdgeGridLayout[i].y},{queue:false,duration:450,easing:EasingTypes.InOutQuad,step:function(){_self.SetNeedsRepaintAll();}});}}},TransitionOutState:function($super){this.ClearMouseOverStack();if(this.CurrentLayoutState==="landing"&&this.State==="category"){this.TransitionOutLanding();}
else if(this.CurrentLayoutState==="category"&&this.State==="landing"){this.TransitionOutCategory();}
if(this.LastState==="partner"){this.TransitionOutPartner();}
$super();},TransitionOut:function($super){var _self=this;if(this.CurrentLayoutState==="landing"){this.TransitionOutLanding();}
else if(this.CurrentLayoutState==="category"){this.TransitionOutCategory();}
if(this.State==="partner"){this.TransitionOutPartner();}
$(window).wait(1000,function(){_self.Cleanup();});$super();},Cleanup:function(){this.ClearMouseOverStack();window.clearInterval(this.RealtimeInterval);window.clearInterval(this.AutoSlideInterval);window.clearInterval(this.UpdateLoadProgressInterval);window.clearInterval(this.AnimateCategoryWindowPositionsInterval);$(window).unbind("resize.Unplugged",this.ResizeEventHandlerFn);this.ResizeEventHandlerFn=null;$(this.CanvasForeground).unbind();this.RemoveSpriteItems();$(this.CanvasBackground).remove();$(this.CanvasForeground).remove();},TransitionOutLanding:function(){var _self=this;var matchedItems=this.SectionUIObjectsFiltered.matches;var duration=300;$.each(matchedItems,function(index,item){var pane=item.Pane;_self.GraphicsEngine.FadeOut(pane,duration);});},TransitionOutCategory:function(){var _self=this;var matchedItems=this.SectionUIObjectsFiltered.matches;var duration=300;var matchedItems=matchedItems.slice();var centerItem=matchedItems[0];var fallX=Math.floor(Math.random()*800);matchedItems.sort(function(a,b){var compA=Bravo.Engine.Math.Trig.GetDistanceFrom(a.Pane,fallX,0);var compB=Bravo.Engine.Math.Trig.GetDistanceFrom(b.Pane,fallX,0);return-1*(compA<compB)?-1:(compA>compB)?1:0;});$.each(matchedItems,function(index,item){var pane=item.Pane;_self.GraphicsEngine.FadeOut(pane,1000);$(pane.Position).stop().animate({"y":500+(300*index)},{easing:EasingTypes.InOutQuint,duration:800,queue:false,step:function(){_self.SetNeedsRepaintAll();}});});},TransitionOutPartner:function(){var _self=this;$.each(this.SectionItems,function(i,pane){pane.WindowUI.removeClass(Const.MAIN_WINDOW).removeAttr("role").addClass(Const.PREVIEW_WINDOW)});this.PartnerSlideContainerX=0;this.PartnerSlideContainerInitialX=0;if(this.CurrentItem){this.ShrinkPartnerWindow(this.CurrentItem,true);}},BeforePartnerLoad:function(){if(this.LastItem){this.ShrinkPartnerWindow(this.LastItem,false);}
this.ExpandPartnerWindow(this.CurrentItem);},ShrinkPartnerWindow:function(item,move){var itemPosition={x:item.GridX+(item.DestinationSize.w*0.25),y:item.GridY+(item.DestinationSize.h*0.25),width:item.DestinationSize.w*0.5,height:item.DestinationSize.h*0.5}
if(item.Pane){this.GraphicsEngine.FadeIn(item.Pane,800);var panePosition=item.Pane.GetAbsolutePosition();var domPosition=this.CanvasToDOMCoordinates(panePosition);itemPosition={x:domPosition.x,y:domPosition.y,width:item.Pane.Size.width,height:item.Pane.Size.height}}
item.WindowUI.stop();if(move){item.WindowUI.animate({left:itemPosition.x,top:itemPosition.y,width:itemPosition.width,height:itemPosition.height,opacity:0},{queue:false,duration:500,easing:EasingTypes.Swing});}
item.WindowUI.animate({opacity:0},{queue:false,duration:500,easing:EasingTypes.Swing,complete:function(){$(this).hide();$(this).find(Selectors.MAIN_CONTENT).empty();}});},ExpandPartnerWindow:function(item){var itemPosition={x:item.GridX+(item.DestinationSize.w*0.25),y:item.GridY+(item.DestinationSize.h*0.25),width:item.DestinationSize.w*0.5,height:item.DestinationSize.h*0.5}
if(item.Pane){this.GraphicsEngine.FadeOut(item.Pane,500);var panePosition=item.Pane.GetAbsolutePosition();var domPosition=this.CanvasToDOMCoordinates(panePosition);itemPosition={x:domPosition.x,y:domPosition.y,width:item.Pane.Size.width,height:item.Pane.Size.height}}
item.WindowUI.css({left:itemPosition.x,top:itemPosition.y,width:itemPosition.width,height:itemPosition.height,opacity:0});item.WindowUI.show();},AfterPartnerLoad:function(){var self=this;this.CurrentItem.LoadContent();this.CurrentItem.WindowUI.show();if(this.LastItem){this.LastItem.WindowUI.addClass(Const.PREVIEW_WINDOW).hide().find(Selectors.MAIN_CONTENT).empty();}},CanvasMoveEventHandler:function(e){var _self=this;var absolutePosition=_self.ControlsEngine.GetAbsolutePosition(e);var relativePosition=_self.ControlsEngine.GetRelativePosition(absolutePosition.x,absolutePosition.y);var x=relativePosition.x;var y=relativePosition.y;var mouseLocationX=x;var deadZone=_self.StageWidth*_self.ScrollDeadZonePercent;if(mouseLocationX<_self.CanvasHCenter-deadZone){_self.ScrollDirection=-(_self.ScrollSpeed*(x-_self.CanvasHCenter+deadZone));}else if(mouseLocationX>_self.CanvasHCenter+deadZone){_self.ScrollDirection=-(_self.ScrollSpeed*(x-_self.CanvasHCenter-deadZone));}else{_self.ScrollDirection=0;}
_self.SetNeedsRepaintForeground();},WindowMoveEventHandler:function(e){var _self=this;if(this.State==="landing"){var x=e.clientX;var mouseLocationX=x;var deadZone=_self.StageWidth*_self.ScrollDeadZonePercent;if(mouseLocationX<_self.CanvasHCenter-deadZone){_self.DOMScrollDirection=-(_self.ScrollSpeed*(x-_self.CanvasHCenter+deadZone));}else if(mouseLocationX>_self.CanvasHCenter+deadZone){_self.DOMScrollDirection=-(_self.ScrollSpeed*(x-_self.CanvasHCenter-deadZone));}else{_self.DOMScrollDirection=0;}}},CanvasClickEventHandler:function(e){var x=e.clientX;var y=e.clientY;var overlay=$(e.currentTarget);overlay.css("visibility","hidden");overlay.css("display","none");var element=document.elementFromPoint(x,y);overlay.css("visibility","visible");overlay.css("display","block");var id=$(element).attr("id");$(element).trigger("click");$(element).trigger("mousedown");if(element!=null&&element.tagName&&element.tagName.toLowerCase()!=="a"){element=$(element).closest("a")[0];}
if(element!=null&&element.tagName&&element.tagName.toLowerCase()==="a"){if(element.href){window.location.href=element.href;}}},CanvasEnterEventHandler:function(){this.AllowScroll=true;},CanvasLeaveEventHandler:function(){this.SetNeedsRepaintAll();this.AllowScroll=false;this.LastEnteredPane=null;},ResizeEventHandler:function(){var windowWidth=$(window).width()-4;if(windowWidth<0){windowWidth=0;}
this.StageWidth=windowWidth;this.CanvasHCenter=this.StageWidth*0.5;this.SlideContainerMax=0;this.SlideContainerMin=0;if(this.StageWidth>this.ContentWidth){this.SlideContainerMax=-((this.ContentWidth-this.StageWidth)*0.5);this.SlideContainerMin=this.SlideContainerMax;}
else{this.SlideContainerMax=0;this.SlideContainerMin=-(this.ContentWidth-this.StageWidth);}
if(this.State==="partner"&&this.CurrentItem){var stateParams=this.GetStateParams();var leftEdgeDomPosition={x:this.CurrentItem.GridX-stateParams.hSpacing,y:0}
var leftEdgeCanvasPosition=this.DOMToCanvasCoordinates(leftEdgeDomPosition);this.PartnerSlideContainerX=leftEdgeCanvasPosition.x-this.PartnerSlideContainerInitialX;}
$(this.CanvasBackground).attr("width",this.StageWidth);$(this.CanvasForeground).attr("width",this.StageWidth);this.SetNeedsRepaintAll();this.DOMContentWidth=1250;this.DOMSlideContainerMax=0;this.DOMSlideContainerMin=0;if(this.StageWidth>this.DOMContentWidth){this.DOMSlideContainerMax=-((this.DOMContentWidth-this.StageWidth)*0.5);this.DOMSlideContainerMin=this.SlideContainerMax;}
else{this.DOMSlideContainerMax=0;this.DOMSlideContainerMin=-(this.DOMContentWidth-this.StageWidth);}
$("#landing_unplugged").css("width",this.StageWidth);this.RenderStep();},BackgroundSpriteClickHandler:function(e){if(this.State==="partner"){$("#back_unplugged").trigger("click");}},PaneClickEventHandler:function(e){var pane=e.sprite;var item=this.SectionItems[pane.ID];var linkName=item.LinkName;CallNavChange(Const.UNPLUGGED_SECTION+"/"+linkName);},CanvasToDOMCoordinates:function(canvasPos){var contentPosition=$(Selectors.MAIN_CONTAINER).getAbsolutePositionAlt(0,0,true);var domPos={x:canvasPos.x-contentPosition.x,y:canvasPos.y-contentPosition.y};return domPos;},DOMToCanvasCoordinates:function(domPos){var contentPosition=$(Selectors.MAIN_CONTAINER).getAbsolutePositionAlt(0,0,true);var canvasPos={x:domPos.x+contentPosition.x,y:domPos.y+contentPosition.y};return canvasPos;},ClearMouseOverStack:function(){this.MouseOverStack=[];this.SetCursor();},SetCursorType:function(over){if(over){this.MouseOverStack.push(true);}
else{this.MouseOverStack.pop();}
this.SetCursor();},SetCursor:function(){if(this.MouseOverStack.length>0){$(document.body).css("cursor","pointer");}
else{$(document.body).css("cursor","default");}},PaneEnterEventHandler:function(e){var pane=e.sprite;var item=this.SectionItems[pane.ID];this.LastEnteredImage=item.PreviewImage;this.GraphicsEngine.FadeIn(item.PaneHighlight,0);this.SetNeedsRepaintForeground();this.SetCursorType(true);},PaneLeaveEventHandler:function(e){var pane=e.sprite;var item=this.SectionItems[pane.ID];this.GraphicsEngine.FadeOut(item.PaneHighlight,200);if(this.LastEnteredImage===item.PreviewImage){if(this.DisplayRolloverEffects){if(this.State==="landing"){this.GraphicsEngine.FadeOut(this.RolloverSprite);}
else if(this.State==="category"){this.GraphicsEngine.FadeOut(this.PopupSprite);}}
this.LastEnteredImage=null;}
this.SetCursorType(false);},PopupFaviconLoaded:function(image){this.PopupFaviconSprite.SetImage(image,true,false);},PopupLogoLoaded:function(image){this.PopupLogoSprite.SetImage(image,true,true);this.PopupLogoSprite.Position.x=this.PopupSize.width-this.PopupLogoSprite.Size.width-32;this.PopupLogoSprite.Position.y=this.PopupSize.height-this.PopupLogoSprite.Size.height;},RolloverLogoLoaded:function(image){this.RolloverLogoSprite.SetImage(image,true,true);var textSize=this.GraphicsEngine.GetTextSize(this.RolloverBodySprite);var y=this.RolloverSprite.Size.height-(textSize.height*0.5)-(this.RolloverLogoSprite.Size.height*0.5)-10;if(y>this.RolloverSprite.Size.height-this.RolloverLogoSprite.Size.height-10){y=this.RolloverSprite.Size.height-this.RolloverLogoSprite.Size.height-10;}
this.RolloverLogoSprite.Position.y=y;},GenerateTiledLayout:function(animateScroll){if(this.GraphicsEngine.MapProcessed===true){if(this.State===this.CurrentLayoutState){this.GenerateWindowPositions(animateScroll);}
else{this.ProcessMapComplete();}}
else{if(this.LoadMapInitiated===false){this.LoadMapInitiated=true;this.GraphicsEngine.LoadMap(this.ImageMapUrl,this.LoapMapComplete.bind(this));}}},LoapMapComplete:function(imageMapJSON){var allItems=this.SectionItems;var stateParams=this.GetStateParams();if(imageMapJSON==null){imageMapJSON={"files":{},"objects":{}}}
for(var i=0;i<allItems.length;i++){var item=allItems[i];var previewUrl=allItems[i][stateParams.previewUrlField];var imageClass="previewImage-"+i;if(previewUrl!=null&&previewUrl!=""){imageMapJSON.files[imageClass]={"src":previewUrl};imageMapJSON.objects[imageClass]={"fileId":imageClass};}}
this.GraphicsEngine.ProcessMap(imageMapJSON,this.ProcessMapComplete.bind(this));this.InitLoop();this.CreateLoadProgress();},CreateLoadProgress:function(){var x=this.StageWidth*0.5;var y=this.StageHeight*0.5;this.RemoveLoadProgress();this.LoadingSprite=this.GraphicsEngine.AddSprite({Position:{x:x,y:y,z:1},ID:"loading-text",Text:"",ContainerIndex:1});this.UpdateLoadProgressInterval=window.setInterval(this.UpdateLoadProgress.bind(this),100);},UpdateLoadProgress:function(){var text='Loading unplugged '+this.GraphicsEngine.MapFilesLoaded+"/"+this.GraphicsEngine.MapFilesTotal;this.LoadingSprite.SetText(text);this.SetNeedsRepaintForeground();if(this.GraphicsEngine.MapFilesLoaded===this.GraphicsEngine.MapFilesTotal){this.RemoveLoadProgress();}},RemoveLoadProgress:function(){if(this.LoadingSprite){this.LoadingSprite.Active=false;}
this.RenderStep();window.clearTimeout(this.UpdateLoadProgressInterval);},ProcessMapComplete:function(){this.RemoveSpriteItems();this.CreateSpriteItems();},RemoveSpriteItems:function(){this.GraphicsEngine.RemoveAllSprites();this.ControlsEngine.RemoveAllEventListeners();},CreateSpriteItems:function(){var allItems=this.SectionItems;this.BackgroundSprite=this.GraphicsEngine.AddSprite({Position:{x:0,y:0,z:0},ID:"backgroundContainer",Size:{width:2000,height:700},ContainerIndex:0});this.SlideContainerSprite=this.GraphicsEngine.AddSprite({Position:{x:0,y:155,z:1},ID:"sliderContainer",Size:{width:2000,height:700},ContainerIndex:0});this.ControlsEngine.AddEventListener(this.BackgroundSprite,"onclick",this.BackgroundSpriteClickHandler.bind(this));for(var i=0;i<allItems.length;i++){var item=allItems[i];var previewImagePos;var previewImageSize;var titlePos;var titleSize;var paneImageMap;var paneHighlightImageMap;var styles="normal 14px 'Segoe Regular', Segoe, 'Segoe UI', Arial, sans-serif";if(item.Section==="categories"){previewImagePos={x:11,y:11,z:1};previewImageSize={width:227,height:297};titlePos={x:236,y:312,z:1};titleSize={width:160,height:103};paneImageMap="dev_contest_categories_panel";paneHighlightImageMap="dev_contest_categories_panel_highlight";styles="normal 18px 'Segoe Regular', Segoe, 'Segoe UI', Arial, sans-serif";}
else if(item.Section==="prizes"){if(item.Title==="Grand Prize"){previewImagePos={x:6,y:5,z:1};previewImageSize={width:225,height:120};titlePos={x:219,y:128,z:1};titleSize={width:100,height:103};paneImageMap="dev_contest_prizes_panel";paneHighlightImageMap="dev_contest_prizes_panel_highlight";}
else{previewImagePos={x:7,y:20,z:1};previewImageSize={width:104,height:88};titlePos={x:103,y:128,z:1};titleSize={width:100,height:103};paneImageMap="dev_contest_partner_pane";paneHighlightImageMap="dev_contest_partner_pane_highlight";}}
else if(item.Section==="judges"){previewImagePos={x:7,y:6,z:1};previewImageSize={width:104,height:100};titlePos={x:109,y:107,z:1};titleSize={width:100,height:103};paneImageMap="dev_contest_partner_pane";paneHighlightImageMap="dev_contest_partner_pane_highlight";}
else{previewImageSize={width:283,height:167};previewImagePos={x:12,y:10,z:1};titlePos={x:293,y:182,z:1};titleSize={width:298,height:103};paneImageMap="dev_contest_partner_pane";paneHighlightImageMap="dev_contest_partner_pane_highlight";}
item.Pane=null;item.PaneHighlight=null;item.PreviewImage=null;item.Index=i;var categoryDescription=item.DescriptionText;var pane=this.GraphicsEngine.AddSprite({ParentSprite:this.SlideContainerSprite,Position:{x:0,y:0,z:i*10},ID:i,ImageMapID:paneImageMap,Visible:false,Alpha:0,ContainerIndex:0});var paneHighlight=this.GraphicsEngine.AddSprite({ParentSprite:pane,Position:{x:0,y:0,z:0},ID:"dev_contest_partner_pane-highlight-"+i,ImageMapID:paneHighlightImageMap,Visible:true,Alpha:0,ContainerIndex:0});var previewImage=this.GraphicsEngine.AddSprite({ParentSprite:pane,Position:{x:previewImagePos.x,y:previewImagePos.y,z:previewImagePos.z},ID:"previewImage-"+i,ImageMapID:"previewImage-"+i,Size:{width:previewImageSize.width,height:previewImageSize.height},ContainerIndex:0});var title=this.GraphicsEngine.AddSprite({ParentSprite:pane,Position:{x:titlePos.x,y:titlePos.y,z:titlePos.z},ID:"title-"+i,Text:item.Title,Wrap:true,Color:"#231F20",Font:styles,Size:{width:titleSize.width,height:titleSize.height},Leading:-4,Align:"right",ContainerIndex:0});item.Pane=pane;item.PaneHighlight=paneHighlight;item.PreviewImage=previewImage;this.ControlsEngine.AddEventListener(pane,"onclick",this.PaneClickEventHandler.bind(this));this.ControlsEngine.AddEventListener(pane,"onmouseenter",this.PaneEnterEventHandler.bind(this));this.ControlsEngine.AddEventListener(pane,"onmouseleave",this.PaneLeaveEventHandler.bind(this));}
this.ControlsEngine.NeedsResort=true;this.GenerateWindowPositions(true);},GenerateWindowPositions:function(animateScroll){if(this.State==="landing"){this.GenerateLandingWindowPositions(animateScroll);}
else if(this.State==="category"){this.GenerateCategoryWindowPositions(animateScroll);}},GenerateLandingWindowPositions:function(animateScroll){var _self=this;var stateParams=this.GetStateParams();var matchedItems=this.SectionUIObjectsFiltered.matches;var nonmatchedItems=this.SectionUIObjectsFiltered.nonmatches;var gridLayout=this.GridBuilder(matchedItems.length,stateParams.paneSize.width,stateParams.paneSize.height,stateParams.numRows,stateParams.numCols,stateParams.hSpacing,stateParams.vSpacing,0,0);var colCount=Math.ceil(this.SectionUIObjectsFiltered.matches.length/stateParams.numRows);this.ContentWidth=((stateParams.paneSize.width+stateParams.hSpacing)*colCount)-stateParams.hSpacing;this.ResizeEventHandler();var easingType=EasingTypes.OutQuad;for(var i=0;i<matchedItems.length;i++){var pane=matchedItems[i].Pane;if(pane!=null){$(pane.Position).stop().animate({"x":gridLayout[i].x,"y":gridLayout[i].y},{queue:false,duration:500,easing:easingType,step:function(){_self.SetNeedsRepaintAll();}});if(pane.Visible!==true){pane.Visible=true;pane.Alpha=0;$(pane).delay(100*i).animate({"Alpha":1},{duration:1000,easing:easingType,step:function(){_self.SetNeedsRepaintAll();}});}}}},GenerateCategoryWindowPositions:function(animateScroll){var _self=this;var stateParams=_self.GetStateParams();var matchedItems=_self.SectionUIObjectsFiltered.matches;var nonmatchedItems=_self.SectionUIObjectsFiltered.nonmatches;var performFallOffAnimation=false;for(var i=0;i<nonmatchedItems.length;i++){var pane=nonmatchedItems[i].Pane;if(pane!=null&&pane.Visible===true){performFallOffAnimation=true;this.GraphicsEngine.FadeOut(pane,400);$(pane.Position).stop().animate({"y":700},{queue:false,duration:400,easing:EasingTypes.InQuad,step:function(){_self.SetNeedsRepaintAll();},complete:function(){this.x=0;this.y=0;}});}}
window.clearTimeout(_self.AnimateCategoryWindowPositionsInterval);if(performFallOffAnimation){_self.AnimateCategoryWindowPositionsInterval=window.setTimeout(_self.AnimateCategoryWindowPositions.bind(_self,animateScroll),150);}
else{_self.AnimateCategoryWindowPositions(animateScroll);}},AnimateCategoryWindowPositions:function(animateScroll){var _self=this;var stateParams=this.GetStateParams();var matchedItems=this.SectionUIObjectsFiltered.matches;var nonmatchedItems=this.SectionUIObjectsFiltered.nonmatches;var gridLayout=this.GridBuilder(matchedItems.length,stateParams.paneSize.width,stateParams.paneSize.height,stateParams.numRows,stateParams.numCols,stateParams.hSpacing,stateParams.vSpacing,0,0);var colCount=Math.ceil(matchedItems.length/stateParams.numRows);this.ContentWidth=((stateParams.paneSize.width+stateParams.hSpacing)*colCount)-stateParams.hSpacing;this.ResizeEventHandler();this.ScrollDirection=0;var easingType=EasingTypes.OutQuad;var duration=500;if(animateScroll){this.MoveToColumn(-1);easingType=EasingTypes.InOutBack;duration=700;}
else if(this.StageWidth>this.ContentWidth){this.MoveToColumn(-1);}
for(var i=0;i<matchedItems.length;i++){var item=matchedItems[i];var pane=item.Pane;if(item.Visible){this.GraphicsEngine.FadeIn(pane);}
$(pane.Position).stop().animate({"y":gridLayout[i].y,"x":gridLayout[i].x},{queue:false,duration:duration,easing:easingType,step:function(){_self.SetNeedsRepaintAll();}});}},GridBuilder:function(numOfItems,itemWidth,itemHeight,rows,cols,hSpacing,vSpacing,offsetX,offsetY,mirrorX,mirrorY){rows=(rows==null)?2:rows;hSpacing=(hSpacing==null)?0:hSpacing;vSpacing=(vSpacing==null)?0:vSpacing;offsetX=(offsetX==null)?0:offsetX;offsetY=(offsetY==null)?0:offsetY;var xCounter=0;var yCounter=0;var array=[];for(var i=0;i<numOfItems;i++){var x=xCounter;if(mirrorX){x=-(x+1);}
var y=yCounter;if(mirrorY){y=-(y+1);}
var obj=new Object();obj.x=(itemWidth+hSpacing)*x+offsetX;obj.y=(itemHeight+vSpacing)*y+offsetY;array.push(obj);if(yCounter<rows-1){yCounter++;}else{yCounter=0;xCounter++;}}
return array;},MoveToColumn:function(column,onCompleteFn){var targetX=0;if(column<0){targetX=-(this.SlideContainerMax-this.SlideContainerMin)*0.5;}
else{var stateParams=this.GetStateParams();var columnX=(stateParams.paneSize.width+stateParams.hSpacing)*column;targetX=this.SlideContainerMax-columnX;}
var distance=targetX-this.SlideContainerX;window.clearInterval(this.AutoSlideInterval);this.AutoSlideInterval=window.setInterval(this.AutoSlideToColumn.bind(this,targetX,distance,onCompleteFn),this.Framerate);},AutoSlideToColumn:function(targetX,distance,onCompleteFn){var dx=targetX-this.SlideContainerX;var endHit=false;if(Math.abs(dx)<2){this.SlideContainerX=targetX;endHit=true;}
else{var vx=(dx*this.Easing);this.SlideContainerX+=vx;}
if(dx<0&&this.SlideContainerX<this.SlideContainerMin){this.SlideContainerX=this.SlideContainerMin;endHit=true;}
if(dx>0&&this.SlideContainerX>this.SlideContainerMax){this.SlideContainerX=this.SlideContainerMax;endHit=true;}
this.SlideContainerSprite.Position.x=this.SlideContainerX;if(endHit){window.clearInterval(this.AutoSlideInterval);this.AutoSlideInterval=null;if(onCompleteFn){onCompleteFn();}}
this.SetNeedsRepaintAll();},SetNeedsRepaintAll:function(){this.GraphicsEngine.SpriteManager.SetNeedsRepaint(0);this.GraphicsEngine.SpriteManager.SetNeedsRepaint(1);},SetNeedsRepaintForeground:function(){this.GraphicsEngine.SpriteManager.SetNeedsRepaint(1);},SetNeedsRepaintBackground:function(){this.GraphicsEngine.SpriteManager.SetNeedsRepaint(0);},InitLoop:function(){window.clearInterval(this.RealtimeInterval);this.RealtimeInterval=window.setInterval(this.Step.bind(this),this.Framerate);},KillLoop:function(){window.clearInterval(this.RealtimeInterval);},Step:function(){var timestep=0;this.PhysicsStep(timestep);this.RenderStep(timestep);},PhysicsStep:function(timestep){if(this.AutoSlideInterval==null){if(this.State!=="partner"){if(this.AllowScroll){this.SlideContainerX+=this.ScrollDirection;}
if(this.SlideContainerX<this.SlideContainerMin){this.SlideContainerX=this.SlideContainerMin;}
if(this.SlideContainerX>this.SlideContainerMax){this.SlideContainerX=this.SlideContainerMax;}}
if(this.SlideContainerSprite&&this.SlideContainerSprite.Position.x!==this.SlideContainerX+this.PartnerSlideContainerX){this.SlideContainerSprite.Position.x=this.SlideContainerX+this.PartnerSlideContainerX;this.ControlsEngine.TriggerEvent("onmouseenter");this.ControlsEngine.TriggerEvent("onmouseleave");this.SetNeedsRepaintAll();}}
if(this.State==="landing"){this.DOMSlideContainerX+=this.DOMScrollDirection;if(this.DOMSlideContainerX<this.DOMSlideContainerMin){this.DOMSlideContainerX=this.DOMSlideContainerMin;}
if(this.DOMSlideContainerX>this.DOMSlideContainerMax){this.DOMSlideContainerX=this.DOMSlideContainerMax;}
$("#landing_unplugged_content").css("left",this.DOMSlideContainerX);}},RenderStep:function(timestep){this.GraphicsEngine.Step(timestep);}});
;;;
var ExperienceLegacyLayoutManager=Class.create(ExperienceLayoutManager,{MoveRolloverModalFn:null,GetStateParams:function(){var stateParams={};if(this.State==="category"){stateParams.numRows=3;stateParams.numCols=5;stateParams.windowDimensions={w:Const.EXPERIENCE_MEDSIZE.w,h:Const.EXPERIENCE_MEDSIZE.h};stateParams.imageClass="img.mediumPreview";stateParams.divClass="medium";}
else if(this.State==="landing"){stateParams.numRows=2;stateParams.numCols=3;stateParams.windowDimensions={w:Const.EXPERIENCE_BIGSIZE.w,h:Const.EXPERIENCE_BIGSIZE.h};stateParams.imageClass="img.largePreview";stateParams.divClass="large";}
return stateParams;},TransitionIn:function($super){$super();this.CreatePinnedModal().appendTo(Selectors.MAIN_CONTAINER);this.CreateOfferModal().appendTo(Selectors.MAIN_CONTAINER);this.CreateRolloverModal().appendTo($(document.body));this.CreatePreviousButton().appendTo(Selectors.MAIN_CONTAINER);this.CreateNextButton().appendTo(Selectors.MAIN_CONTAINER);this.MoveRolloverModalFn=this.MoveRolloverModal.bind(this);$(document.body).bind("mousemove",this.MoveRolloverModalFn);},TransitionInLanding:function($super){$super();$("#nav_experience").show();$("#border_experience").show();$("#pinned_experience").hide();$("#offer_experience").hide();$("#modal_experience").hide();$(Selectors.MAIN_CONTAINER).addClass("landing").removeClass("category partner");this.GenerateTiledLayout();},TransitionToCategory:function($super,linkName){$super(linkName);$("#nav_experience").show();$("#border_experience").hide();$("#pinned_experience").hide();$("#offer_experience").hide();$("#modal_experience").hide();$(Selectors.MAIN_CONTAINER).addClass("category").removeClass("landing partner");this.GenerateTiledLayout();},TransitionToPartner:function($super,linkName){$super(linkName);$("#nav_experience").hide();$("#border_experience").hide();$("#pinned_experience").hide();$("#offer_experience").hide();$("#modal_experience").hide();$(Selectors.MAIN_CONTAINER).addClass("partner").removeClass("category landing");},TransitionOutState:function($super){if(this.LastState==="partner"){$(Selectors.MAIN_WINDOW).removeClass(Const.MAIN_WINDOW).removeAttr("role").addClass(Const.PREVIEW_WINDOW).find(Selectors.MAIN_CONTENT).stop(true).fadeOut(800,function(){$(this).siblings(Selectors.PREVIEW_CONTENT).show();$(this).empty();});}
$super();},TransitionOut:function($super){this.TransitionOutAnimation();$(document.body).unbind("mousemove",this.MoveRolloverModalFn);this.MoveRolloverModalFn=null;$("#border_experience").remove();$("#pinned_experience").remove();$("#offer_experience").remove();$("#modal_experience").remove();$("#previous_experience").remove();$("#next_experience").remove();$(Selectors.MAIN_CONTAINER).removeClass("partner category landing");$super();},TransitionOutAnimation:function(){var items=this.SectionItems.slice();var centerItem=items[0];var fallX=Math.floor(Math.random()*800);items.sort(function(a,b){var compA=$(a.WindowUI).getDistanceFrom(fallX,0);var compB=$(b.WindowUI).getDistanceFrom(fallX,0);return-1*(compA<compB)?-1:(compA>compB)?1:0;});$.each(items,function(index,item){$(item.WindowUI).animate({top:$(Selectors.SITE_CONTAINER).height()+(100*index)},{queue:false,easing:EasingTypes.InOutQuint,duration:1000});});},CreateBorder:function(){var pane=$("<div/>").hide().attr("id","border_experience").addClass("pane")
return pane;},CreatePinnedModal:function(){var modal=$("<div/>").hide().addClass("pane").attr("id","pinned_experience");$("<h2/>").html("What is Pinning?").appendTo(modal);$("<p/>").html("Pinning is the ability to drag tabs to your Windows 7 taskbar. Then your favorite sites are always one click away.").appendTo(modal);$("<a/>").html("Click to see a demo.").attr("href","#/"+Const.HIGHLIGHTS_SECTION+"/seamless-with-windows-7").appendTo(modal);return modal;},CreateOfferModal:function(){var modal=$("<div/>").hide().addClass("pane").attr("id","offer_experience");$("<h2/>").html("Exclusive offer for<br>Internet Explorer 9 users").appendTo(modal);$("<p/>").html("Receive exclusive deals from this site when you pin it to your Windows 7 Taskbar in Internet Explorer 9").appendTo(modal);return modal;},CreateRolloverModal:function(){var modal=$("<div/>").hide().addClass("pane").attr("id","modal_experience");$("<h2/>").attr("id","modal_experience_title").appendTo(modal);$("<aside/>").attr("id","modal_experience_description").appendTo(modal);$("<img/>").attr("id","modal_experience_favicon").appendTo(modal);$("<img/>").attr("id","modal_experience_logo").appendTo(modal);return modal;},CreatePreviousButton:function(){var button=$("<div/>").hide().attr("id","previous_experience").append($("<a/>").addClass("arrow_left").attr("href","javascript:void(0)").bind("click",this.NextPrevButtonClick.bind(this,"previous_experience")).attr("onclick","").attr("rel","").html("Previous page"));return button;},CreateNextButton:function(){var button=$("<div/>").hide().attr("id","next_experience").append($("<a/>").addClass("arrow_right").attr("href","javascript:void(0)").bind("click",this.NextPrevButtonClick.bind(this,"next_experience")).attr("onclick","").attr("rel","").html("Next page"));return button;},BeforePartnerLoad:function(previousItem,nextItem,direction,previousItemX,nextItemX,w,h){if(direction===0){var left=parseInt(this.CurrentItem.WindowUI.css("left"));if(isNaN(left)){this.CurrentItem.WindowUI.css({left:this.MainWindowPos.x+(w*0.25),top:this.MainWindowPos.y+(h*0.25),width:w*0.5,height:h*0.5});}}
else if(direction===-1){this.CurrentItem.WindowUI.css({left:previousItemX,top:this.MainWindowPos.y,width:w,height:h});}
else if(direction===1){this.CurrentItem.WindowUI.css({left:nextItemX,top:this.MainWindowPos.y,width:w,height:h});}},AfterPartnerLoad:function(previousItem,nextItem,direction,previousItemX,nextItemX,w,h){$("#previous_experience").hide();$("#next_experience").hide();if(previousItem){$("#previous_experience a").attr("rel",previousItem.LinkName);$("#previous_experience").show();}
if(nextItem){$("#next_experience a").attr("rel",nextItem.LinkName);$("#next_experience").show();}
this.CurrentItem.LoadContent();if(this.LastItem){this.LastItem.WindowUI.addClass(Const.PREVIEW_WINDOW).hide().find(Selectors.MAIN_CONTENT).empty();}},NextPrevButtonClick:function(navButtonId,e){e.preventDefault();if(GetIsTransitioning()===false){if(this.State==="partner"){var partnerName=e.currentTarget.rel;this.ScrollToPartner(partnerName);}
else{var stateParams=this.GetStateParams();var colIncrement=stateParams.numCols;if(navButtonId==="previous_experience"){this.CurrentCol-=colIncrement;}else if(navButtonId==="next_experience"){this.CurrentCol+=colIncrement;}
this.GenerateTiledLayout();}}},MoveRolloverModal:function(e){var position=$(document.body).getRelativePosition(e.clientX,e.clientY);var modalX=position.x+30;var modalY=position.y-250;var screenWidth=asInt(document.body.clientWidth);if(modalX>screenWidth-400){modalX=modalX-400+30;}
$("#modal_experience").css({left:modalX,top:modalY});},GenerateTiledLayout:function(){var animationDuration=1000;SetIsTransitioningContent(true);$(Selectors.MAIN_CONTAINER).attr("aria-busy","true");window.setTimeout(function(){SetIsTransitioningContent(false);$(Selectors.MAIN_CONTAINER).attr("aria-busy","false");},animationDuration);var matchedItems=this.SectionUIObjectsFiltered.matches;var nonmatchedItems=this.SectionUIObjectsFiltered.nonmatches;var stateParams=this.GetStateParams();var colCount=Math.ceil(this.SectionUIObjectsFiltered.matches.length/stateParams.numRows);if(this.CurrentCol>=colCount-stateParams.numCols){$("#next_experience").hide();}
else{$("#next_experience").show();}
if(this.CurrentCol<=0){$("#previous_experience").hide();}
else{$("#previous_experience").show();}
if(this.CurrentCol>=colCount-1){this.CurrentCol=colCount-1;}
if(this.CurrentCol<=0){this.CurrentCol=0;}
var startIndex=this.CurrentCol*stateParams.numRows;var endIndex=startIndex+(stateParams.numRows*stateParams.numCols)-1;if(endIndex>matchedItems.length-1){endIndex=matchedItems.length-1;}
var positionsArray=this.GenerateWindowPositions(stateParams.numRows,{w:stateParams.windowDimensions.w,h:stateParams.windowDimensions.h},startIndex);for(var i=0;i<nonmatchedItems.length;i++){var item=nonmatchedItems[i];item.HideWindow();}
for(var i=0;i<matchedItems.length;i++){var item=matchedItems[i];var x=positionsArray[i].x;var y=positionsArray[i].y;if(i>=startIndex&&i<=endIndex){var previewContent=item.WindowUI.find(Selectors.PREVIEW_CONTENT);previewContent.show();previewContent.find("img.mediumPreview").hide();previewContent.find("img.largePreview").hide();previewContent.find(stateParams.imageClass).show();previewContent.removeClass("medium large exhibit");previewContent.addClass(stateParams.divClass+" exhibit");previewContent.data("animHighlight",true);previewContent.find("a").css("background-position","0px 242px");previewContent.find("a > div > img").css({opacity:0,display:"inline"});item.WindowUI.css({width:stateParams.windowDimensions.w,height:stateParams.windowDimensions.h,position:"absolute"});item.RevealWindow(animationDuration+200);item.WindowUI.animate({left:x,top:y},{queue:false,duration:animationDuration,easing:EasingTypes.OutQuad});this.LoadImage(previewContent.find(stateParams.imageClass));if(this.State==="landing"){this.LoadImage(previewContent.find("a > div > img"));}}
else{item.HideWindow(animationDuration+200);item.WindowUI.css({width:stateParams.windowDimensions.w,height:stateParams.windowDimensions.h,position:"absolute"});item.WindowUI.animate({left:x,top:y},{queue:false,duration:animationDuration,easing:EasingTypes.OutQuad});}}},GenerateWindowPositions:function(numRows,windowDimensions,startIndex){var matchedItems=this.SectionUIObjectsFiltered.matches;var scrollOffset={x:this.MainWindowPos.x+Const.EXPERIENCE_MARGIN,y:this.MainWindowPos.y+Const.EXPERIENCE_MARGIN};if(startIndex!=null){var startCol=Math.floor(startIndex/numRows);scrollOffset.x+=-startCol*(windowDimensions.w+Const.EXPERIENCE_MARGIN);}
var positionsArray=[];var colCount=0;var rowCount=0;for(var i=0;i<matchedItems.length;i++){var item=matchedItems[i];if(rowCount>=numRows){colCount++;rowCount=0;}
y=scrollOffset.y+(rowCount*(windowDimensions.h+Const.EXPERIENCE_MARGIN));x=scrollOffset.x+(colCount*(windowDimensions.w+Const.EXPERIENCE_MARGIN));positionsArray[i]={x:x,y:y};rowCount++;}
return positionsArray;},LoadImage:function(image){var imageSrc=image.attr("src");if(imageSrc===null||imageSrc===undefined||imageSrc===""){var src=image.attr("rel");image.attr("src",src);}}});
;;;
var UnpluggedCanvasLayoutManager=Class.create(UnpluggedLayoutManager,{Framerate:16,ScrollSpeed:0.4,ScrollDeadZonePercent:0.35,Easing:0.1,StageWidth:1100,StageHeight:600,GetStateParams:function(){var stateParams={};var state=this.State;if(state==="partner"){state=this.CurrentLayoutState}
stateParams.numCols=null;stateParams.previewUrlField="PreviewImgSrc";if(this.CategoryName==="categories"){stateParams.numRows=1;stateParams.paneSize={width:246,height:347};stateParams.hSpacing=5;stateParams.vSpacing=0;}
else if(this.CategoryName==="prizes"){stateParams.numRows=2;stateParams.paneSize={width:115,height:168};stateParams.hSpacing=4;stateParams.vSpacing=5;}
else if(this.CategoryName==="judges"){stateParams.numRows=2;stateParams.paneSize={width:115,height:168};stateParams.hSpacing=4;stateParams.vSpacing=5;}
else{stateParams.numRows=1;stateParams.paneSize={width:307,height:220};stateParams.hSpacing=4;stateParams.vSpacing=5;}
return stateParams;},ImageMapUrl:"assets/images/imagemap-unplugged.js?v="+siteVersion,GraphicsEngine:null,LoadMapInitiated:null,ControlsEngine:null,CanvasBackground:null,CanvasForeground:null,CurrentLayoutState:null,ContentWidth:0,SlideContainerX:0,PartnerSlideContainerX:0,PartnerSlideContainerInitialX:0,CanvasHCenter:null,ScrollDirection:0,SlideContainerMin:0,SlideContainerMax:0,AllowScroll:false,LastEnteredImage:null,ResizeEventHandlerFn:null,RealtimeInterval:null,AutoSlideInterval:null,UpdateLoadProgressInterval:null,AnimateCategoryWindowPositionsInterval:null,BackgroundSprite:null,SlideContainerSprite:null,LoadingSprite:null,MouseOverStack:null,TransitionIn:function($super){$super();this.CanvasBackground=$("<canvas/>").attr("id","unplugged_canvas_background").attr("width",this.StageWidth).attr("height",this.StageHeight).appendTo($(document.body))[0];this.CanvasForeground=$("<canvas/>").attr("id","unplugged_canvas_foreground").attr("width",this.StageWidth).attr("height",470).appendTo($(document.body))[0];this.GraphicsEngine=new Bravo.Engine.Graphics.Engine([[this.CanvasBackground],[this.CanvasForeground]],[true,true],this.StageWidth,this.StageHeight);this.LoadMapInitiated=false;this.ControlsEngine=new Bravo.Engine.Controls.Engine(this.CanvasForeground,false,true,this.CanvasEnterEventHandler.bind(this),this.CanvasLeaveEventHandler.bind(this));this.CurrentLayoutState=null;this.ContentWidth=0;this.SlideContainerX=0;this.PartnerSlideContainerX=0;this.PartnerSlideContainerInitialX=0;this.CanvasHCenter=null;this.ScrollDirection=0;this.AllowScroll=false;this.LastEnteredImage=null;this.ResizeEventHandlerFn=null;this.RealtimeInterval=null;this.AutoSlideInterval=null;this.UpdateLoadProgressInterval=null;this.BackgroundSprite=null;this.SlideContainerSprite=null;this.LoadingSprite=null;this.ClearMouseOverStack();this.ResizeEventHandlerFn=this.ResizeEventHandler.bind(this);$(window).bind("resize.Unplugged",this.ResizeEventHandlerFn);$(this.CanvasForeground).bind("click",this.CanvasClickEventHandler.bind(this));$(this.CanvasForeground).bind("mousemove",this.CanvasMoveEventHandler.bind(this));this.ResizeEventHandler();},TransitionInLanding:function($super){var animateScroll=(this.State===this.CurrentLayoutState?false:true);$super();this.ResizeEventHandler();this.GenerateTiledLayout(animateScroll);this.CurrentLayoutState="landing";},TransitionToCategory:function($super,linkName){var lastPath=$("#back_unplugged").attr("rel");var newPath=linkName;var animateScroll=(lastPath===newPath?false:true);$super(linkName);this.ResizeEventHandler();this.GenerateTiledLayout(animateScroll);this.CurrentLayoutState="category";},TransitionToPartner:function($super,linkName){$super(linkName);this.ResizeEventHandler();},PerformAnimation:function($super,item){var _self=this;$super(item);var matchedItems=this.SectionUIObjectsFiltered.matches;var clickedItemIndex=$.inArray(item,matchedItems);if(clickedItemIndex>=0){var stateParams=this.GetStateParams();this.SlideContainerSprite.Position.x=this.SlideContainerX;var leftEdgeDomPosition={x:item.GridX-stateParams.hSpacing,y:item.GridY+item.DestinationSize.h+stateParams.vSpacing}
var rightEdgeDomPosition={x:item.GridX+item.DestinationSize.w+stateParams.hSpacing+2,y:item.GridY}
var leftEdgeCanvasPosition=this.DOMToCanvasCoordinates(leftEdgeDomPosition);var rightEdgeCanvasPosition=this.DOMToCanvasCoordinates(rightEdgeDomPosition);var leftEdgePosition={x:leftEdgeCanvasPosition.x-this.SlideContainerSprite.Position.x,y:leftEdgeCanvasPosition.y-this.SlideContainerSprite.Position.y};var rightEdgePosition={x:rightEdgeCanvasPosition.x-this.SlideContainerSprite.Position.x,y:rightEdgeCanvasPosition.y-this.SlideContainerSprite.Position.y};this.PartnerSlideContainerX=0;this.PartnerSlideContainerInitialX=leftEdgeCanvasPosition.x
var leftEdgeItems=[];for(var i=clickedItemIndex-1;i>=0;i--){var item=matchedItems[i];leftEdgeItems.push(item);}
var leftEdgeGridLayout=this.GridBuilder(leftEdgeItems.length,stateParams.paneSize.width,stateParams.paneSize.height,stateParams.numRows,stateParams.numCols,stateParams.hSpacing,stateParams.vSpacing,leftEdgePosition.x,leftEdgePosition.y,true,true);if(this.CategoryName==="prizes"){if(leftEdgeGridLayout.length===1){var item=matchedItems[0];leftEdgeGridLayout[0].x-=stateParams.paneSize.width;}}
for(var i=0;i<leftEdgeItems.length;i++){var pane=leftEdgeItems[i].Pane;$(pane.Position).stop().animate({"x":leftEdgeGridLayout[i].x,"y":leftEdgeGridLayout[i].y},{queue:false,duration:450,easing:EasingTypes.InOutQuad,step:function(){_self.SetNeedsRepaintAll();}});}
var rightEdgeItems=[];for(var i=clickedItemIndex+1;i<matchedItems.length;i++){var item=matchedItems[i];if(item.Visible){rightEdgeItems.push(item);}}
var rightEdgeGridLayout=this.GridBuilder(rightEdgeItems.length,stateParams.paneSize.width,stateParams.paneSize.height,stateParams.numRows,stateParams.numCols,stateParams.hSpacing,stateParams.vSpacing,rightEdgePosition.x,rightEdgePosition.y);for(var i=0;i<rightEdgeItems.length;i++){var pane=rightEdgeItems[i].Pane;$(pane.Position).stop().animate({"x":rightEdgeGridLayout[i].x,"y":rightEdgeGridLayout[i].y},{queue:false,duration:450,easing:EasingTypes.InOutQuad,step:function(){_self.SetNeedsRepaintAll();}});}}},TransitionOutState:function($super){this.ClearMouseOverStack();$super();},TransitionOut:function($super){var _self=this;$(window).wait(1000,function(){_self.Cleanup();});$super();},Cleanup:function(){this.ClearMouseOverStack();window.clearInterval(this.RealtimeInterval);window.clearInterval(this.AutoSlideInterval);window.clearInterval(this.UpdateLoadProgressInterval);window.clearInterval(this.AnimateCategoryWindowPositionsInterval);$(window).unbind("resize.Unplugged",this.ResizeEventHandlerFn);this.ResizeEventHandlerFn=null;$(this.CanvasForeground).unbind();this.RemoveSpriteItems();$(this.CanvasBackground).remove();$(this.CanvasForeground).remove();},TransitionOutLanding:function($super){var _self=this;var matchedItems=this.SectionUIObjectsFiltered.matches;var duration=300;$.each(matchedItems,function(index,item){var pane=item.Pane;_self.GraphicsEngine.FadeOut(pane,duration);});$super();},TransitionOutCategory:function(){var _self=this;var matchedItems=this.SectionUIObjectsFiltered.matches;var duration=300;var matchedItems=matchedItems.slice();var centerItem=matchedItems[0];var fallX=Math.floor(Math.random()*800);matchedItems.sort(function(a,b){var compA=Bravo.Engine.Math.Trig.GetDistanceFrom(a.Pane,fallX,0);var compB=Bravo.Engine.Math.Trig.GetDistanceFrom(b.Pane,fallX,0);return-1*(compA<compB)?-1:(compA>compB)?1:0;});$.each(matchedItems,function(index,item){var pane=item.Pane;_self.GraphicsEngine.FadeOut(pane,1000);$(pane.Position).stop().animate({"y":500+(300*index)},{easing:EasingTypes.InOutQuint,duration:800,queue:false,step:function(){_self.SetNeedsRepaintAll();}});});},TransitionOutPartner:function(){var _self=this;$.each(this.SectionItems,function(i,pane){pane.WindowUI.removeClass(Const.MAIN_WINDOW).removeAttr("role").addClass(Const.PREVIEW_WINDOW)});this.PartnerSlideContainerX=0;this.PartnerSlideContainerInitialX=0;if(this.CurrentItem){this.ShrinkPartnerWindow(this.CurrentItem,true);}},BeforePartnerLoad:function(){if(this.LastItem){this.ShrinkPartnerWindow(this.LastItem,false);}
this.ExpandPartnerWindow(this.CurrentItem);},ShrinkPartnerWindow:function(item,move){var itemPosition={x:item.GridX+(item.DestinationSize.w*0.25),y:item.GridY+(item.DestinationSize.h*0.25),width:item.DestinationSize.w*0.5,height:item.DestinationSize.h*0.5}
if(item.Pane){this.GraphicsEngine.FadeIn(item.Pane,800);var panePosition=item.Pane.GetAbsolutePosition();var domPosition=this.CanvasToDOMCoordinates(panePosition);itemPosition={x:domPosition.x,y:domPosition.y,width:item.Pane.Size.width,height:item.Pane.Size.height}}
item.WindowUI.stop();if(move){item.WindowUI.animate({left:itemPosition.x,top:itemPosition.y,width:itemPosition.width,height:itemPosition.height,opacity:0},{queue:false,duration:500,easing:EasingTypes.Swing});}
item.WindowUI.animate({opacity:0},{queue:false,duration:500,easing:EasingTypes.Swing,complete:function(){$(this).hide();$(this).find(Selectors.MAIN_CONTENT).empty();}});},ExpandPartnerWindow:function(item){var itemPosition={x:item.GridX+(item.DestinationSize.w*0.25),y:item.GridY+(item.DestinationSize.h*0.25),width:item.DestinationSize.w*0.5,height:item.DestinationSize.h*0.5}
if(item.Pane){this.GraphicsEngine.FadeOut(item.Pane,500);var panePosition=item.Pane.GetAbsolutePosition();var domPosition=this.CanvasToDOMCoordinates(panePosition);itemPosition={x:domPosition.x,y:domPosition.y,width:item.Pane.Size.width,height:item.Pane.Size.height}}
item.WindowUI.css({left:itemPosition.x,top:itemPosition.y,width:itemPosition.width,height:itemPosition.height,opacity:0});item.WindowUI.show();},AfterPartnerLoad:function(){var self=this;this.CurrentItem.LoadContent();this.CurrentItem.WindowUI.show();if(this.LastItem){this.LastItem.WindowUI.addClass(Const.PREVIEW_WINDOW).hide().find(Selectors.MAIN_CONTENT).empty();}},CanvasMoveEventHandler:function(e){var _self=this;var absolutePosition=_self.ControlsEngine.GetAbsolutePosition(e);var relativePosition=_self.ControlsEngine.GetRelativePosition(absolutePosition.x,absolutePosition.y);var x=relativePosition.x;var y=relativePosition.y;var mouseLocationX=x;var deadZone=_self.StageWidth*_self.ScrollDeadZonePercent;if(mouseLocationX<_self.CanvasHCenter-deadZone){_self.ScrollDirection=-(_self.ScrollSpeed*(x-_self.CanvasHCenter+deadZone));}else if(mouseLocationX>_self.CanvasHCenter+deadZone){_self.ScrollDirection=-(_self.ScrollSpeed*(x-_self.CanvasHCenter-deadZone));}else{_self.ScrollDirection=0;}
_self.SetNeedsRepaintForeground();},CanvasClickEventHandler:function(e){var x=e.clientX;var y=e.clientY;var overlay=$(e.currentTarget);overlay.css("visibility","hidden");overlay.css("display","none");var element=document.elementFromPoint(x,y);overlay.css("visibility","visible");overlay.css("display","block");var id=$(element).attr("id");$(element).trigger("click");$(element).trigger("mousedown");if(element!=null&&element.tagName&&element.tagName.toLowerCase()!=="a"){element=$(element).closest("a")[0];}
if(element!=null&&element.tagName&&element.tagName.toLowerCase()==="a"){if(element.href){window.location.href=element.href;}}},CanvasEnterEventHandler:function(){this.AllowScroll=true;},CanvasLeaveEventHandler:function(){this.SetNeedsRepaintAll();this.AllowScroll=false;this.LastEnteredPane=null;},ResizeEventHandler:function(){var windowWidth=$(window).width()-4;if(windowWidth<0){windowWidth=0;}
this.StageWidth=windowWidth;this.CanvasHCenter=this.StageWidth*0.5;this.SlideContainerMax=0;this.SlideContainerMin=0;if(this.StageWidth>this.ContentWidth){this.SlideContainerMax=-((this.ContentWidth-this.StageWidth)*0.5);this.SlideContainerMin=this.SlideContainerMax;}
else{this.SlideContainerMax=0;this.SlideContainerMin=-(this.ContentWidth-this.StageWidth);}
if(this.State==="partner"&&this.CurrentItem){var stateParams=this.GetStateParams();var leftEdgeDomPosition={x:this.CurrentItem.GridX-stateParams.hSpacing,y:0}
var leftEdgeCanvasPosition=this.DOMToCanvasCoordinates(leftEdgeDomPosition);this.PartnerSlideContainerX=leftEdgeCanvasPosition.x-this.PartnerSlideContainerInitialX;}
$(this.CanvasBackground).attr("width",this.StageWidth);$(this.CanvasForeground).attr("width",this.StageWidth);this.SetNeedsRepaintAll();this.RenderStep();},BackgroundSpriteClickHandler:function(e){if(this.State==="partner"){$("#back_unplugged").trigger("click");}},PaneClickEventHandler:function(e){var pane=e.sprite;var item=this.SectionItems[pane.ID];var linkName=item.LinkName;CallNavChange(Const.UNPLUGGED_SECTION+"/"+linkName);},CanvasToDOMCoordinates:function(canvasPos){var contentPosition=$(Selectors.MAIN_CONTAINER).getAbsolutePositionAlt(0,0,true);var domPos={x:canvasPos.x-contentPosition.x,y:canvasPos.y-contentPosition.y};return domPos;},DOMToCanvasCoordinates:function(domPos){var contentPosition=$(Selectors.MAIN_CONTAINER).getAbsolutePositionAlt(0,0,true);var canvasPos={x:domPos.x+contentPosition.x,y:domPos.y+contentPosition.y};return canvasPos;},ClearMouseOverStack:function(){this.MouseOverStack=[];this.SetCursor();},SetCursorType:function(over){if(over){this.MouseOverStack.push(true);}
else{this.MouseOverStack.pop();}
this.SetCursor();},SetCursor:function(){if(this.MouseOverStack.length>0){$(document.body).css("cursor","pointer");}
else{$(document.body).css("cursor","default");}},PaneEnterEventHandler:function(e){var pane=e.sprite;var item=this.SectionItems[pane.ID];this.LastEnteredImage=item.PreviewImage;this.GraphicsEngine.FadeIn(item.PaneHighlight,0);this.SetNeedsRepaintForeground();this.SetCursorType(true);},PaneLeaveEventHandler:function(e){var pane=e.sprite;var item=this.SectionItems[pane.ID];this.GraphicsEngine.FadeOut(item.PaneHighlight,200);if(this.LastEnteredImage===item.PreviewImage){if(this.DisplayRolloverEffects){if(this.State==="landing"){this.GraphicsEngine.FadeOut(this.RolloverSprite);}
else if(this.State==="category"){this.GraphicsEngine.FadeOut(this.PopupSprite);}}
this.LastEnteredImage=null;}
this.SetCursorType(false);},PopupFaviconLoaded:function(image){this.PopupFaviconSprite.SetImage(image,true,false);},PopupLogoLoaded:function(image){this.PopupLogoSprite.SetImage(image,true,true);this.PopupLogoSprite.Position.x=this.PopupSize.width-this.PopupLogoSprite.Size.width-32;this.PopupLogoSprite.Position.y=this.PopupSize.height-this.PopupLogoSprite.Size.height;},RolloverLogoLoaded:function(image){this.RolloverLogoSprite.SetImage(image,true,true);var textSize=this.GraphicsEngine.GetTextSize(this.RolloverBodySprite);var y=this.RolloverSprite.Size.height-(textSize.height*0.5)-(this.RolloverLogoSprite.Size.height*0.5)-10;if(y>this.RolloverSprite.Size.height-this.RolloverLogoSprite.Size.height-10){y=this.RolloverSprite.Size.height-this.RolloverLogoSprite.Size.height-10;}
this.RolloverLogoSprite.Position.y=y;},GenerateTiledLayout:function(animateScroll){if(this.GraphicsEngine.MapProcessed===true){if(this.State===this.CurrentLayoutState){this.GenerateWindowPositions(animateScroll);}
else{this.ProcessMapComplete();}}
else{if(this.LoadMapInitiated===false){this.LoadMapInitiated=true;this.GraphicsEngine.LoadMap(this.ImageMapUrl,this.LoapMapComplete.bind(this));}}},LoapMapComplete:function(imageMapJSON){var allItems=this.SectionItems;var stateParams=this.GetStateParams();if(imageMapJSON==null){imageMapJSON={"files":{},"objects":{}}}
for(var i=0;i<allItems.length;i++){var item=allItems[i];var previewUrl=allItems[i][stateParams.previewUrlField];var imageClass="previewImage-"+i;if(previewUrl!=null&&previewUrl!=""){imageMapJSON.files[imageClass]={"src":previewUrl};imageMapJSON.objects[imageClass]={"fileId":imageClass};}}
this.GraphicsEngine.ProcessMap(imageMapJSON,this.ProcessMapComplete.bind(this));this.InitLoop();this.CreateLoadProgress();},CreateLoadProgress:function(){var x=this.StageWidth*0.5;var y=this.StageHeight*0.5;this.RemoveLoadProgress();this.LoadingSprite=this.GraphicsEngine.AddSprite({Position:{x:x,y:y,z:1},ID:"loading-text",Text:"",ContainerIndex:1});this.UpdateLoadProgressInterval=window.setInterval(this.UpdateLoadProgress.bind(this),100);},UpdateLoadProgress:function(){var text='Loading unplugged '+this.GraphicsEngine.MapFilesLoaded+"/"+this.GraphicsEngine.MapFilesTotal;this.LoadingSprite.SetText(text);this.SetNeedsRepaintForeground();if(this.GraphicsEngine.MapFilesLoaded===this.GraphicsEngine.MapFilesTotal){this.RemoveLoadProgress();}},RemoveLoadProgress:function(){if(this.LoadingSprite){this.LoadingSprite.Active=false;}
this.RenderStep();window.clearTimeout(this.UpdateLoadProgressInterval);},ProcessMapComplete:function(){this.RemoveSpriteItems();this.CreateSpriteItems();},RemoveSpriteItems:function(){this.GraphicsEngine.RemoveAllSprites();this.ControlsEngine.RemoveAllEventListeners();},CreateSpriteItems:function(){var allItems=this.SectionItems;this.BackgroundSprite=this.GraphicsEngine.AddSprite({Position:{x:0,y:0,z:0},ID:"backgroundContainer",Size:{width:2000,height:700},ContainerIndex:0});this.SlideContainerSprite=this.GraphicsEngine.AddSprite({Position:{x:0,y:155,z:1},ID:"sliderContainer",Size:{width:2000,height:700},ContainerIndex:0});this.ControlsEngine.AddEventListener(this.BackgroundSprite,"onclick",this.BackgroundSpriteClickHandler.bind(this));for(var i=0;i<allItems.length;i++){var item=allItems[i];var previewImagePos;var previewImageSize;var titlePos;var titleSize;var paneImageMap;var paneHighlightImageMap;var styles="normal 14px 'Segoe Regular', Segoe, 'Segoe UI', Arial, sans-serif";if(item.Section==="categories"){previewImagePos={x:11,y:11,z:1};previewImageSize={width:227,height:297};titlePos={x:236,y:312,z:1};titleSize={width:160,height:103};paneImageMap="dev_contest_categories_panel";paneHighlightImageMap="dev_contest_categories_panel_highlight";styles="normal 18px 'Segoe Regular', Segoe, 'Segoe UI', Arial, sans-serif";}
else if(item.Section==="prizes"){if(item.Title==="Grand Prize"){previewImagePos={x:6,y:5,z:1};previewImageSize={width:225,height:120};titlePos={x:219,y:128,z:1};titleSize={width:100,height:103};paneImageMap="dev_contest_prizes_panel";paneHighlightImageMap="dev_contest_prizes_panel_highlight";}
else{previewImagePos={x:7,y:20,z:1};previewImageSize={width:104,height:88};titlePos={x:103,y:128,z:1};titleSize={width:100,height:103};paneImageMap="dev_contest_partner_pane";paneHighlightImageMap="dev_contest_partner_pane_highlight";}}
else if(item.Section==="judges"){previewImagePos={x:7,y:6,z:1};previewImageSize={width:104,height:100};titlePos={x:109,y:107,z:1};titleSize={width:100,height:103};paneImageMap="dev_contest_partner_pane";paneHighlightImageMap="dev_contest_partner_pane_highlight";}
else{previewImageSize={width:283,height:167};previewImagePos={x:12,y:10,z:1};titlePos={x:293,y:182,z:1};titleSize={width:298,height:103};paneImageMap="dev_contest_partner_pane";paneHighlightImageMap="dev_contest_partner_pane_highlight";}
item.Pane=null;item.PaneHighlight=null;item.PreviewImage=null;item.Index=i;var categoryDescription=item.DescriptionText;var pane=this.GraphicsEngine.AddSprite({ParentSprite:this.SlideContainerSprite,Position:{x:0,y:0,z:i*10},ID:i,ImageMapID:paneImageMap,Visible:false,Alpha:0,ContainerIndex:0});var paneHighlight=this.GraphicsEngine.AddSprite({ParentSprite:pane,Position:{x:0,y:0,z:0},ID:"dev_contest_partner_pane-highlight-"+i,ImageMapID:paneHighlightImageMap,Visible:true,Alpha:0,ContainerIndex:0});var previewImage=this.GraphicsEngine.AddSprite({ParentSprite:pane,Position:{x:previewImagePos.x,y:previewImagePos.y,z:previewImagePos.z},ID:"previewImage-"+i,ImageMapID:"previewImage-"+i,Size:{width:previewImageSize.width,height:previewImageSize.height},ContainerIndex:0});var title=this.GraphicsEngine.AddSprite({ParentSprite:pane,Position:{x:titlePos.x,y:titlePos.y,z:titlePos.z},ID:"title-"+i,Text:item.Title,Wrap:true,Color:"#231F20",Font:styles,Size:{width:titleSize.width,height:titleSize.height},Leading:-4,Align:"right",ContainerIndex:0});item.Pane=pane;item.PaneHighlight=paneHighlight;item.PreviewImage=previewImage;this.ControlsEngine.AddEventListener(pane,"onclick",this.PaneClickEventHandler.bind(this));this.ControlsEngine.AddEventListener(pane,"onmouseenter",this.PaneEnterEventHandler.bind(this));this.ControlsEngine.AddEventListener(pane,"onmouseleave",this.PaneLeaveEventHandler.bind(this));}
this.ControlsEngine.NeedsResort=true;this.GenerateWindowPositions(true);},GenerateWindowPositions:function(animateScroll){if(this.State==="landing"){this.GenerateLandingWindowPositions(animateScroll);}
else if(this.State==="category"){this.GenerateCategoryWindowPositions(animateScroll);}},GenerateLandingWindowPositions:function(animateScroll){var _self=this;var stateParams=this.GetStateParams();var matchedItems=this.SectionUIObjectsFiltered.matches;var nonmatchedItems=this.SectionUIObjectsFiltered.nonmatches;var gridLayout=this.GridBuilder(matchedItems.length,stateParams.paneSize.width,stateParams.paneSize.height,stateParams.numRows,stateParams.numCols,stateParams.hSpacing,stateParams.vSpacing,0,0);var colCount=Math.ceil(this.SectionUIObjectsFiltered.matches.length/stateParams.numRows);this.ContentWidth=((stateParams.paneSize.width+stateParams.hSpacing)*colCount)-stateParams.hSpacing;this.ResizeEventHandler();var easingType=EasingTypes.OutQuad;for(var i=0;i<matchedItems.length;i++){var pane=matchedItems[i].Pane;if(pane!=null){$(pane.Position).stop().animate({"x":gridLayout[i].x,"y":gridLayout[i].y},{queue:false,duration:500,easing:easingType,step:function(){_self.SetNeedsRepaintAll();}});if(pane.Visible!==true){pane.Visible=true;pane.Alpha=0;$(pane).delay(100*i).animate({"Alpha":1},{duration:1000,easing:easingType,step:function(){_self.SetNeedsRepaintAll();}});}}}},GenerateCategoryWindowPositions:function(animateScroll){var _self=this;var stateParams=_self.GetStateParams();var matchedItems=_self.SectionUIObjectsFiltered.matches;var nonmatchedItems=_self.SectionUIObjectsFiltered.nonmatches;var performFallOffAnimation=false;for(var i=0;i<nonmatchedItems.length;i++){var pane=nonmatchedItems[i].Pane;if(pane!=null&&pane.Visible===true){performFallOffAnimation=true;this.GraphicsEngine.FadeOut(pane,400);$(pane.Position).stop().animate({"y":700},{queue:false,duration:400,easing:EasingTypes.InQuad,step:function(){_self.SetNeedsRepaintAll();},complete:function(){this.x=0;this.y=0;}});}}
window.clearTimeout(_self.AnimateCategoryWindowPositionsInterval);if(performFallOffAnimation){_self.AnimateCategoryWindowPositionsInterval=window.setTimeout(_self.AnimateCategoryWindowPositions.bind(_self,animateScroll),150);}
else{_self.AnimateCategoryWindowPositions(animateScroll);}},AnimateCategoryWindowPositions:function(animateScroll){var _self=this;var stateParams=this.GetStateParams();var matchedItems=this.SectionUIObjectsFiltered.matches;var nonmatchedItems=this.SectionUIObjectsFiltered.nonmatches;var gridLayout=this.GridBuilder(matchedItems.length,stateParams.paneSize.width,stateParams.paneSize.height,stateParams.numRows,stateParams.numCols,stateParams.hSpacing,stateParams.vSpacing,0,0);var colCount=Math.ceil(matchedItems.length/stateParams.numRows);this.ContentWidth=((stateParams.paneSize.width+stateParams.hSpacing)*colCount)-stateParams.hSpacing;this.ResizeEventHandler();this.ScrollDirection=0;var easingType=EasingTypes.OutQuad;var duration=500;if(animateScroll){this.MoveToColumn(-1);easingType=EasingTypes.InOutBack;duration=700;}
else if(this.StageWidth>this.ContentWidth){this.MoveToColumn(-1);}
for(var i=0;i<matchedItems.length;i++){var item=matchedItems[i];var pane=item.Pane;if(item.Visible){this.GraphicsEngine.FadeIn(pane);}
$(pane.Position).stop().animate({"y":gridLayout[i].y,"x":gridLayout[i].x},{queue:false,duration:duration,easing:easingType,step:function(){_self.SetNeedsRepaintAll();}});}},GridBuilder:function(numOfItems,itemWidth,itemHeight,rows,cols,hSpacing,vSpacing,offsetX,offsetY,mirrorX,mirrorY){rows=(rows==null)?2:rows;hSpacing=(hSpacing==null)?0:hSpacing;vSpacing=(vSpacing==null)?0:vSpacing;offsetX=(offsetX==null)?0:offsetX;offsetY=(offsetY==null)?0:offsetY;var xCounter=0;var yCounter=0;var array=[];for(var i=0;i<numOfItems;i++){var x=xCounter;if(mirrorX){x=-(x+1);}
var y=yCounter;if(mirrorY){y=-(y+1);}
var obj=new Object();obj.x=(itemWidth+hSpacing)*x+offsetX;obj.y=(itemHeight+vSpacing)*y+offsetY;array.push(obj);if(yCounter<rows-1){yCounter++;}else{yCounter=0;xCounter++;}}
return array;},MoveToColumn:function(column,onCompleteFn){var targetX=0;if(column<0){targetX=-(this.SlideContainerMax-this.SlideContainerMin)*0.5;}
else{var stateParams=this.GetStateParams();var columnX=(stateParams.paneSize.width+stateParams.hSpacing)*column;targetX=this.SlideContainerMax-columnX;}
var distance=targetX-this.SlideContainerX;window.clearInterval(this.AutoSlideInterval);this.AutoSlideInterval=window.setInterval(this.AutoSlideToColumn.bind(this,targetX,distance,onCompleteFn),this.Framerate);},AutoSlideToColumn:function(targetX,distance,onCompleteFn){var dx=targetX-this.SlideContainerX;var endHit=false;if(Math.abs(dx)<2){this.SlideContainerX=targetX;endHit=true;}
else{var vx=(dx*this.Easing);this.SlideContainerX+=vx;}
if(dx<0&&this.SlideContainerX<this.SlideContainerMin){this.SlideContainerX=this.SlideContainerMin;endHit=true;}
if(dx>0&&this.SlideContainerX>this.SlideContainerMax){this.SlideContainerX=this.SlideContainerMax;endHit=true;}
this.SlideContainerSprite.Position.x=this.SlideContainerX;if(endHit){window.clearInterval(this.AutoSlideInterval);this.AutoSlideInterval=null;if(onCompleteFn){onCompleteFn();}}
this.SetNeedsRepaintAll();},SetNeedsRepaintAll:function(){this.GraphicsEngine.SpriteManager.SetNeedsRepaint(0);this.GraphicsEngine.SpriteManager.SetNeedsRepaint(1);},SetNeedsRepaintForeground:function(){this.GraphicsEngine.SpriteManager.SetNeedsRepaint(1);},SetNeedsRepaintBackground:function(){this.GraphicsEngine.SpriteManager.SetNeedsRepaint(0);},InitLoop:function(){window.clearInterval(this.RealtimeInterval);this.RealtimeInterval=window.setInterval(this.Step.bind(this),this.Framerate);},KillLoop:function(){window.clearInterval(this.RealtimeInterval);},Step:function(){var timestep=0;this.PhysicsStep(timestep);this.RenderStep(timestep);},PhysicsStep:function(timestep){if(this.AutoSlideInterval==null){if(this.State!=="partner"){if(this.AllowScroll){this.SlideContainerX+=this.ScrollDirection;}
if(this.SlideContainerX<this.SlideContainerMin){this.SlideContainerX=this.SlideContainerMin;}
if(this.SlideContainerX>this.SlideContainerMax){this.SlideContainerX=this.SlideContainerMax;}}
if(this.SlideContainerSprite&&this.SlideContainerSprite.Position.x!==this.SlideContainerX+this.PartnerSlideContainerX){this.SlideContainerSprite.Position.x=this.SlideContainerX+this.PartnerSlideContainerX;this.ControlsEngine.TriggerEvent("onmouseenter");this.ControlsEngine.TriggerEvent("onmouseleave");this.SetNeedsRepaintAll();}}},RenderStep:function(timestep){this.GraphicsEngine.Step(timestep);}});
;;;
var TitleManager=Class.create({MainSectionsHeadline:{},TitlePropsCollection:{},NewSectionString:"",TopPosition:66,initialize:function(){this.MainSectionsHeadline=$(DOMElements.H1).addClass("title_home");this.MainSectionsHeadline.css({top:this.TopPosition,left:0}).appendTo($("<header/>").addClass("page").appendTo($(Selectors.MAIN_CONTAINER)));this.MainSectionsHeadline.html("Unleash A More <strong>Beautiful</strong> Web");this.MainSectionsHeadline.hide();},AddTitleProps:function(sectionString,propsVO){this.TitlePropsCollection[sectionString]=propsVO;},BeginTitleSwap:function(newSection){this.NewSectionString=newSection;if(newSection!==""&&newSection!==undefined){this.MainSectionsHeadline.fadeOut();}},FinishTitleSwap:function(){if(this.NewSectionString!==""&&this.NewSectionString!==undefined){var propVO=this.TitlePropsCollection[this.NewSectionString];if(propVO!==undefined&&propVO!==null){this.MainSectionsHeadline.removeClass();this.MainSectionsHeadline.addClass("title_"+this.NewSectionString);this.MainSectionsHeadline.html(propVO.TitleText);var section=this.NewSectionString;this.MainSectionsHeadline.unbind("click").bind("click",function(){CallNavChange(section);});this.MainSectionsHeadline.fadeIn();}}}});var TitlePropsVO=Class.create({TitleText:"",TitleAlign:"left",initialize:function(text,align){this.TitleText=text;this.TitleAlign=align;}});
;;;
var SiteController=Class.create({SectionTrackingImg:[],initialize:function(){},ParseWebsiteData:function(){var siteJSON=_jsonLoader[GlobalContentUrls.WebsiteSectionInfo];for(var i=0;i<siteJSON.sections.websitesection.length;i++){var topLvlNavItem=siteJSON.sections.websitesection[i];var currentSectionItems=[];if(topLvlNavItem.navigationitems!=null){for(var j=0;j<topLvlNavItem.navigationitems.navitem.length;j++){try{var sectionNavData=topLvlNavItem.navigationitems.navitem[j];var currentWindow=this.GenerateUIWindows(sectionNavData);currentWindow.SectionString=topLvlNavItem.linkname;currentSectionItems.push(currentWindow);}catch(e){}}}
_mainWebsiteObjects[topLvlNavItem.linkname]=currentSectionItems;this.SectionTrackingImg[topLvlNavItem.linkname]=topLvlNavItem.trackingimg;_titleManager.AddTitleProps(topLvlNavItem.linkname,new TitlePropsVO(topLvlNavItem.name.toLowerCase(),topLvlNavItem.titleposition));}
_transitionManager.SiteUIObjects=_mainWebsiteObjects;this.InitSectionManagers();},InitSectionManagers:function(){var homeSectionTransition=new HomeSectionTransition(Const.HOME_SECTION);homeSectionTransition.SectionItems=_mainWebsiteObjects[Const.HOME_SECTION];_sectionTransitionClasses[Const.HOME_SECTION]=homeSectionTransition;var developTransition=new DevelopingSectionTransition(Const.DEVELOPING_SECTION);developTransition.SectionItems=_mainWebsiteObjects[Const.DEVELOPING_SECTION];_sectionTransitionClasses[Const.DEVELOPING_SECTION]=developTransition;var expTransition=new ExperienceSectionTransition(Const.EXPERIENCE_SECTION);expTransition.SectionItems=_mainWebsiteObjects[Const.EXPERIENCE_SECTION];_sectionTransitionClasses[Const.EXPERIENCE_SECTION]=expTransition;var productGuideTransition=new ProductGuideSectionTransition(Const.PRODUCT_GUIDE_SECTION);productGuideTransition.SectionItems=_mainWebsiteObjects[Const.PRODUCT_GUIDE_SECTION];_sectionTransitionClasses[Const.PRODUCT_GUIDE_SECTION]=productGuideTransition;var highlightsTransition=new HighlightsSectionTransition(Const.HIGHLIGHTS_SECTION);highlightsTransition.SectionItems=_mainWebsiteObjects[Const.HIGHLIGHTS_SECTION];_sectionTransitionClasses[Const.HIGHLIGHTS_SECTION]=highlightsTransition;var downloadTransition=new DownloadSectionTransition(Const.DOWNLOAD_SECTION);downloadTransition.SectionItems=_mainWebsiteObjects[Const.DOWNLOAD_SECTION];_sectionTransitionClasses[Const.DOWNLOAD_SECTION]=downloadTransition;var errorTransition=new ErrorSectionTransition(Const.ERROR_SECTION);errorTransition.SectionItems=_mainWebsiteObjects[Const.ERROR_SECTION];_sectionTransitionClasses[Const.ERROR_SECTION]=errorTransition;var hotmailTransition=new HotmailSectionTransition(Const.HOTMAIL_SECTION);hotmailTransition.SectionItems=_mainWebsiteObjects[Const.HOTMAIL_SECTION];_sectionTransitionClasses[Const.HOTMAIL_SECTION]=hotmailTransition;var videosTransition=new VideosSectionTransition(Const.VIDEOS_SECTION);videosTransition.SectionItems=_mainWebsiteObjects[Const.VIDEOS_SECTION];_sectionTransitionClasses[Const.VIDEOS_SECTION]=videosTransition;var searchTransition=new SearchSectionTransition(Const.SEARCH_SECTION);searchTransition.SectionItems=_mainWebsiteObjects[Const.SEARCH_SECTION];_sectionTransitionClasses[Const.SEARCH_SECTION]=searchTransition;var newInRCTransition=new NewInRCSectionTransition(Const.NEWINRC_SECTION);newInRCTransition.SectionItems=_mainWebsiteObjects[Const.NEWINRC_SECTION];_sectionTransitionClasses[Const.NEWINRC_SECTION]=newInRCTransition;var unpluggedTeaserTransition=new UnpluggedTeaserSectionTransition(Const.UNPLUGGEDTEASER_SECTION);unpluggedTeaserTransition.SectionItems=_mainWebsiteObjects[Const.UNPLUGGEDTEASER_SECTION];_sectionTransitionClasses[Const.UNPLUGGEDTEASER_SECTION]=unpluggedTeaserTransition;var unpluggedTransition;if(Const.SUPPORTS_CANVAS){unpluggedTransition=new UnpluggedSectionTransition(Const.UNPLUGGED_SECTION);}
else{unpluggedTransition=new UnpluggedLegacySectionTransition(Const.UNPLUGGED_SECTION);}
unpluggedTransition.SectionItems=_mainWebsiteObjects[Const.UNPLUGGED_SECTION];_sectionTransitionClasses[Const.UNPLUGGED_SECTION]=unpluggedTransition;var campsTransition=new CampsSectionTransition(Const.CAMPS_SECTION);campsTransition.SectionItems=_mainWebsiteObjects[Const.CAMPS_SECTION];_sectionTransitionClasses[Const.CAMPS_SECTION]=campsTransition;var expLM;if(Const.SUPPORTS_CANVAS){expLM=new ExperienceCanvasLayoutManager();}
else{expLM=new ExperienceLegacyLayoutManager();}
expLM.SectionUIObjects=_mainWebsiteObjects[Const.EXPERIENCE_SECTION];_layoutManagers[Const.EXPERIENCE_SECTION]=expLM;var hlLM=new LeftPreviewColLayoutManager();hlLM.SectionUIObjects=_mainWebsiteObjects[Const.HIGHLIGHTS_SECTION];_layoutManagers[Const.HIGHLIGHTS_SECTION]=hlLM;var pgLM=new ProductGuideLayoutManager();pgLM.SectionUIObjects=_mainWebsiteObjects[Const.PRODUCT_GUIDE_SECTION];_layoutManagers[Const.PRODUCT_GUIDE_SECTION]=pgLM;var dlLM=new DownloadLayoutManager();dlLM.SectionUIObjects=_mainWebsiteObjects[Const.DOWNLOAD_SECTION];_layoutManagers[Const.DOWNLOAD_SECTION]=dlLM;var devLM=new DevelopingLayoutManager();devLM.SectionUIObjects=_mainWebsiteObjects[Const.DEVELOPING_SECTION];_layoutManagers[Const.DEVELOPING_SECTION]=devLM;var homLM=new HomeLayoutManager();homLM.SectionUIObjects=_mainWebsiteObjects[Const.HOME_SECTION];_layoutManagers[Const.HOME_SECTION]=homLM;var videosLM=new VideosLayoutManager();videosLM.SectionUIObjects=_mainWebsiteObjects[Const.VIDEOS_SECTION];_layoutManagers[Const.VIDEOS_SECTION]=videosLM;var searchLM=new SearchLayoutManager();searchLM.SectionUIObjects=_mainWebsiteObjects[Const.SEARCH_SECTION];_layoutManagers[Const.SEARCH_SECTION]=searchLM;var unpluggedLM=new UnpluggedCanvasLayoutManager();unpluggedLM.SectionUIObjects=_mainWebsiteObjects[Const.UNPLUGGED_SECTION];_layoutManagers[Const.UNPLUGGED_SECTION]=unpluggedLM;},GenerateUIWindows:function(sourceJSON){var returnWindowObj=null;switch(sourceJSON.type){case Const.WINDOWTYPE_STANDARD:case Const.WINDOWTYPE_PRODUCT_SECTION:case Const.WINDOWTYPE_PRODUCT_FEATURES:case Const.WINDOWTYPE_VIDEO_CATEGORY:case Const.WINDOWTYPE_PRODUCT_OVERVIEW:returnWindowObj=new ApplicationWindow();break;case Const.WINDOWTYPE_ADVANCED:case"window_download":returnWindowObj=new AdvancedWindow();break;case Const.WINDOWTYPE_EXPERIENCE:returnWindowObj=new ExperienceWindow();break;case Const.WINDOWTYPE_HOME_MAIN_PREVIEW:returnWindowObj=new HomeMainPreview();break;case Const.WINDOWTYPE_HOME_CONTEST_PREVIEW:returnWindowObj=new HomeContestPreview();break;case Const.WINDOWTYPE_HOME_OFFER_PREVIEW:returnWindowObj=new HomeOfferPreview();break;case Const.WINDOWTYPE_HOME_PARTNER_PREVIEW:returnWindowObj=new HomePartnerPreview();break;case Const.WINDOWTYPE_FACEBOOKLIKE:returnWindowObj=new FacebookLikePane();break;case Const.WINDOWTYPE_QUOTEPANE:returnWindowObj=new QuoteCyclerPane();break;case Const.WINDOWTYPE_PRODUCT_PAGES:returnWindowObj=new ProductGuideSectionWindow();break;case Const.WINDOWTYPE_PRODUCT_FEATURE:returnWindowObj=new ProductGuideFeatureWindow();returnWindowObj.LinkTarget=sourceJSON.linktarget;break;case Const.WINDOWTYPE_VIDEO_LIST:returnWindowObj=new VideoListWindow();break;case Const.WINDOWTYPE_VIDEO_VIEWER:returnWindowObj=new VideoViewerWindow();break;case Const.WINDOWTYPE_SEARCH_LIST:returnWindowObj=new SearchListWindow();break;case Const.WINDOWTYPE_CAMPS:returnWindowObj=new CampsWindow();break;case Const.WINDOWTYPE_STATICCONTENT:returnWindowObj=new BgContentHelperPane();break;case Const.WINDOWTYPE_STATICCONTENTALT:returnWindowObj=new BgContentHelperPaneAlt();break;default:throw"Unknown Window Type";}
if(returnWindowObj!==null&&returnWindowObj!==undefined){returnWindowObj.Type=sourceJSON.type;this.ConfigureUIWindow(returnWindowObj,sourceJSON);}
return returnWindowObj;},ConfigureUIWindow:function(currentWindow,windowJSON){currentWindow.Type=windowJSON.type;currentWindow.Title=windowJSON.title;currentWindow.DescriptionText=windowJSON.description;currentWindow.PreviewImgSrc=(windowJSON.previewimage!==undefined&&windowJSON.previewimage!=="")?windowJSON.previewimage:"";currentWindow.PreviewFaviconSrc=(windowJSON.previewfavicon!==undefined&&windowJSON.previewfavicon!=="")?windowJSON.previewfavicon:"";currentWindow.ContentUrl=windowJSON.contenturl;currentWindow.LinkName=windowJSON.linkname;currentWindow.ElementID=windowJSON.linkname.replace(new RegExp("/","g"),"_")+"_"+currentWindow.UniqueID;currentWindow.PreviewMarkupSrc=windowJSON.previewmarkup;if(windowJSON.previewwidth!==undefined&&windowJSON.previewwidth!==null){currentWindow.PreviewSize={w:windowJSON.previewwidth,h:windowJSON.previewheight};}
currentWindow.DestinationSize={w:windowJSON.destwidth,h:windowJSON.destheight};if(windowJSON.largepreviewimage!==undefined){currentWindow.LargePreviewSrc=windowJSON.largepreviewimage;}
currentWindow.GridX=asInt(windowJSON.baseposx);currentWindow.GridY=asInt(windowJSON.baseposy);currentWindow.TrackingImg=$.trim(windowJSON.trackingimg);},PathHistory:new Array(),NavigateSite:function(sectionString,remainingPath){var runSectionTransition=false;if(GetIsTransitioning()===true){return;}
sectionString=$.trim(sectionString);remainingPath=$.trim(remainingPath);if(sectionString.length<1){sectionString=Const.HOME_SECTION;}
this.PathHistory.push(sectionString);AddSiteSurvey();try{VideoPlayer.Collapse();}catch(e){}
try{window.setTimeout(function(){_om_gbls.trackEvent(TranslateSection(sectionString),TranslateDeeplink(sectionString,remainingPath),"","");},0);}catch(e){}
if(remainingPath.length===0&&remainingPath!==_lastRemainPathString&&sectionString===_lastSectionString){_sectionTransitionClasses[_lastSectionString].TransitionToSectionLanding();SetupMainNav();return;}else if(remainingPath.length>0&&remainingPath!==_lastRemainPathString&&sectionString===_lastSectionString){var success=_sectionTransitionClasses[_lastSectionString].TransitionToSectionDeepLink(remainingPath);if(success){SetupMainNav();return;}}
if(sectionString!==_lastSectionString){switch(sectionString){case Const.DEVELOPING_SECTION:case Const.EXPERIENCE_SECTION:case Const.HIGHLIGHTS_SECTION:case Const.PRODUCT_GUIDE_SECTION:case Const.DOWNLOAD_SECTION:case Const.HOME_SECTION:case Const.HOTMAIL_SECTION:case Const.VIDEOS_SECTION:case Const.SEARCH_SECTION:case Const.NEWINRC_SECTION:case Const.UNPLUGGEDTEASER_SECTION:case Const.UNPLUGGED_SECTION:case Const.CAMPS_SECTION:_transitionManager.NewSectionTransition=_sectionTransitionClasses[sectionString];runSectionTransition=true;break;default:_transitionManager.NewSectionTransition=_sectionTransitionClasses[Const.ERROR_SECTION];sectionString=Const.ERROR_SECTION;if(sectionString!==_lastSectionString){runSectionTransition=true;}
break;}
if(runSectionTransition){SetIsTransitioning(true);$(Selectors.MAIN_CONTAINER).attr("aria-busy","true");_titleManager.BeginTitleSwap(sectionString);if(remainingPath.length<1){remainingPath="";}
_transitionManager.TransitionSections(remainingPath);}
_lastRemainPathString=remainingPath;_lastSectionString=sectionString;}else if(remainingPath!==_lastRemainPathString){this.NavigateLayoutMgr(remainingPath);}
_lastRemainPathString=remainingPath;},NavigateLayoutMgr:function(remainingPath){var currentLayoutMgr=_layoutManagers[_lastSectionString];if(currentLayoutMgr!==undefined){currentLayoutMgr.TransitionToItem(remainingPath);_lastRemainPathString=remainingPath;}},HandleNavChange:function(e){path=e.path.substr(1);if(path.indexOf("?")>-1){path=path.split("?")[0];}
sep=path.indexOf("/");if(sep===-1){sectionPath=path;remainingPath="";}else{sectionPath=path.substr(0,sep);remainingPath=path.substr(sep+1);}
this.NavigateSite(sectionPath,remainingPath);meteor.sharing.settings.url=SWFAddress.getBaseURL()+"#"+SWFAddress.getPath();},Throw404:function(){if(GetIsTransitioning()===true){$(window).trigger(Const.TRANSITION_IN_COMPLETE);}
this.NavigateSite(Const.ERROR_SECTION);}});
;;;
var CampsContent=Class.create({SectionData:{},initialize:function(){var getSectionData=this.GetSectionDataActual;var sectionJSON=getSectionData();this.LoadSectionData(sectionJSON);},GetSectionDataActual:function(){return _bulkLoader[GlobalContentUrls.CampsData];},GetSectionDataFake:function(){var sectionJSON=[{Lat:44.7,Lon:-93.3,Name:"Test name 1",Description:"Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum",StreetAddress1:"555 Test Lane",StreetAddress2:"Apt 82",City:"Bloomington",StateName:"MN",CountryName:"United States",PostalCode:"55425",Dates:"1/1/2011,1/2/2011,1/3/2011",StartDate:"1/1/2011",EndDate:"1/31/2011",SiteUrl:"http://www.bing.com",FaceBookUrl:"http://www.facebook.com"}];for(var i=0;i<60;i++){var lat=(Math.random()*180)-90;var long=(Math.random()*360)-180;var randomLocation={Lat:lat,Lon:long,Name:"Random Location "+i,Description:"A random location",SiteUrl:"http://www.placekitten.com/320/450"};sectionJSON.push(randomLocation);}
return sectionJSON;},LoadSectionData:function(sectionJSON){this.SectionData["camps"]=[];for(var i=0;i<sectionJSON.length;i++){var campSourceItem=sectionJSON[i];var translatedJSON={};translatedJSON.Name=campSourceItem.Name,translatedJSON.Description=campSourceItem.Description,translatedJSON.StreetAddress1=campSourceItem.StreetAddress1,translatedJSON.StreetAddress2=campSourceItem.StreetAddress2,translatedJSON.City=campSourceItem.City,translatedJSON.StateName=campSourceItem.StateName,translatedJSON.CountryName=campSourceItem.CountryName,translatedJSON.PostalCode=campSourceItem.PostalCode,translatedJSON.Dates=campSourceItem.Dates,translatedJSON.StartDate=campSourceItem.StartDate,translatedJSON.EndDate=campSourceItem.EndDate,translatedJSON.Active=campSourceItem.Active,translatedJSON.FaceBookUrl=campSourceItem.FaceBookUrl,translatedJSON.SiteUrl=campSourceItem.SiteUrl,translatedJSON.Lat=campSourceItem.Lat,translatedJSON.Long=campSourceItem.Lon
bingMapsLocation=this.GenerateBingMapsLocation(translatedJSON);this.SectionData["camps"].push(bingMapsLocation);}},GenerateBingMapsLocation:function(sourceJSON){var returnLocationObj={};returnLocationObj.Name=sourceJSON.Name==null||sourceJSON.Name===""?null:sourceJSON.Name;returnLocationObj.Description=sourceJSON.Description==null||sourceJSON.Description===""?null:sourceJSON.Description;returnLocationObj.StreetAddress1=sourceJSON.StreetAddress1==null||sourceJSON.StreetAddress1===""?null:sourceJSON.StreetAddress1;returnLocationObj.StreetAddress2=sourceJSON.StreetAddress2==null||sourceJSON.StreetAddress2===""?null:sourceJSON.StreetAddress2;returnLocationObj.City=sourceJSON.City==null||sourceJSON.City===""?null:sourceJSON.City;returnLocationObj.StateName=sourceJSON.StateName==null||sourceJSON.StateName===""?null:sourceJSON.StateName;returnLocationObj.CountryName=sourceJSON.CountryName==null||sourceJSON.CountryName===""?null:sourceJSON.CountryName;returnLocationObj.PostalCode=sourceJSON.PostalCode==null||sourceJSON.PostalCode===""?null:sourceJSON.PostalCode;returnLocationObj.Dates=sourceJSON.Dates==null||sourceJSON.Dates===""?null:sourceJSON.Dates;returnLocationObj.StartDate=sourceJSON.StartDate==null||sourceJSON.StartDate===""?null:sourceJSON.StartDate;returnLocationObj.EndDate=sourceJSON.EndDate==null||sourceJSON.EndDate===""?null:sourceJSON.EndDate;returnLocationObj.Active=sourceJSON.Active==null||sourceJSON.Active===""?true:sourceJSON.Active;returnLocationObj.FaceBookUrl=sourceJSON.FaceBookUrl==null||sourceJSON.FaceBookUrl===""?null:sourceJSON.FaceBookUrl;returnLocationObj.SiteUrl=sourceJSON.SiteUrl==null||sourceJSON.SiteUrl===""?null:sourceJSON.SiteUrl;returnLocationObj.Lat=sourceJSON.Lat==null||sourceJSON.Lat===""?null:sourceJSON.Lat;returnLocationObj.Long=sourceJSON.Long==null||sourceJSON.Long===""?null:sourceJSON.Long;returnLocationObj.DistanceInKilometers=null;returnLocationObj.DistanceInMiles=null;return returnLocationObj;}});var ExperienceContent=Class.create({SectionData:{},initialize:function(){this.LoadSectionData();},LoadSectionData:function(){var sectionJSON=_bulkLoader[GlobalContentUrls.ExperienceListInfo].Partners;var categories=_bulkLoader[GlobalContentUrls.ExperienceCategoryData].Categories;var pinnedCategoryId=false;var offersCategoryId=false;$.each(categories,function(i,el){if(!pinnedCategoryId&&el.DisplayPinnedIcon==true){pinnedCategoryId=parseInt(el.CategoryId);}});offersCategoryId=parseInt(ConfigurationValues.OffersCategoryId);this.SectionData["partners"]=[];for(var i=0;i<sectionJSON.length;i++){var experienceSourceItem=sectionJSON[i];var translatedJSON={};translatedJSON.type=Const.WINDOWTYPE_EXPERIENCE;translatedJSON.title=experienceSourceItem.Title;translatedJSON.description=experienceSourceItem.Description,translatedJSON.contenturl=experienceSourceItem.RenderUri;translatedJSON.linkname=experienceSourceItem.DeepLinkUri;translatedJSON.previewmarkup="";translatedJSON.previewwidth=Const.EXPERIENCE_BIGSIZE.w;translatedJSON.previewheight=Const.EXPERIENCE_BIGSIZE.h;translatedJSON.previewimage=null;translatedJSON.largepreviewimage=null;translatedJSON.destwidth=899;translatedJSON.destheight=436;translatedJSON.baseposx=50;translatedJSON.baseposy=154;var newWindowObj=_mainController.GenerateUIWindows(translatedJSON);newWindowObj.SectionString=Const.EXPERIENCE_SECTION;newWindowObj.LargePreviewSrc=experienceSourceItem.ExperienceImageUrl;newWindowObj.MediumPreviewSrc=experienceSourceItem.ThumbnailUrl;newWindowObj.LogoSrc=experienceSourceItem.LogoImageUrl;newWindowObj.FaviconSrc=experienceSourceItem.ExperienceImageSmallUrl;newWindowObj.ScreenshotSrc=experienceSourceItem.ScreenshotImageUrl;newWindowObj.TrackingImg=Const.TRACKING_EXPERIENCE_PAGES;newWindowObj.TrackingTag=$.trim(experienceSourceItem.TrackingTag);newWindowObj.Categories=experienceSourceItem.CategoryIds;newWindowObj.Featured=experienceSourceItem.Featured;var pinned=false;var offer=false;if($.inArray(pinnedCategoryId,experienceSourceItem.CategoryIds)>=0){pinned=true;}
if($.inArray(offersCategoryId,experienceSourceItem.CategoryIds)>=0){offer=true;}
newWindowObj.Pinned=pinned;newWindowObj.Offer=offer;this.SectionData["partners"].push(newWindowObj);}}});var UnpluggedContent=Class.create({SectionData:{},initialize:function(){this.LoadSectionData();},LoadSectionData:function(){var sectionJSON=_bulkLoader[GlobalContentUrls.UnpluggedListInfo];for(var i=0;i<sectionJSON.sections.section.length;i++){var section=sectionJSON.sections.section[i];var currentSectionItems=[];for(var j=0;j<section.categories.category.length;j++){var item=section.categories.category[j];try{item.baseposx=(item.baseposx!==undefined)?item.baseposx:(section.baseposx!==undefined)?section.baseposx:null;item.baseposy=(item.baseposy!==undefined)?item.baseposy:(section.baseposy!==undefined)?section.baseposy:null;item.previewwidth=(item.previewwidth!==undefined)?item.previewwidth:(section.previewwidth!==undefined)?section.previewwidth:null;item.previewheight=(item.previewheight!==undefined)?item.previewheight:(section.previewheight!==undefined)?section.previewheight:null;item.destwidth=(item.destwidth!==undefined)?item.destwidth:(section.destwidth!==undefined)?section.destwidth:null;item.destheight=(item.destheight!==undefined)?item.destheight:(section.destheight!==undefined)?section.destheight:null;var currentWindow=_mainController.GenerateUIWindows(item);currentWindow.Section=(item.section!==undefined)?item.section:section.linkname;currentWindow.Visible=(item.visible==="false")?false:true;currentSectionItems.push(currentWindow);}catch(e){}}
this.SectionData[section.linkname]=currentSectionItems;}}});var ProductGuideContent=Class.create({SectionData:{},initialize:function(){this.LoadSectionData();},LoadSectionData:function(){var sectionJSON=_bulkLoader[GlobalContentUrls.ProductGuideInfo];for(var i=0;i<sectionJSON.sections.section.length;i++){var section=sectionJSON.sections.section[i];var currentSectionItems=[];for(var j=0;j<section.categories.category.length;j++){var item=section.categories.category[j];try{item.previewwidth=(item.previewwidth!==undefined)?item.previewwidth:(section.previewwidth!==undefined)?section.previewwidth:Const.PRODUCT_SIDEBAR.w;item.previewheight=(item.previewheight!==undefined)?item.previewheight:(section.previewheight!==undefined)?section.previewheight:Const.PRODUCT_SIDEBAR.h;var currentWindow=_mainController.GenerateUIWindows(item);currentWindow.Section=(item.section!==undefined)?item.section:section.linkname;currentWindow.Subpages=[];currentWindow.TrackingImg=(item.trackingimg!==undefined)?item.trackingimg:(section.trackingimg!==undefined)?section.trackingimg:Const.TRACKING_PRODUCT_GUIDE_PAGES;if(item.subpages!==undefined){currentWindow.FirstPage=item.subpages.subpage[0];for(var k=0;k<item.subpages.subpage.length;k++){var page=item.subpages.subpage[k];currentWindow.Subpages[k]={LinkName:page.linkname,ContentUrl:page.contenturl};}}
currentSectionItems.push(currentWindow);}catch(e){}}
this.SectionData[section.linkname]=currentSectionItems;}},GetContent:function(linkName){parts=linkName.split("/");var section=parts[0];var page=parts[1];var contentItem=null;var data=this.SectionData[section];if(data===undefined){return;}
if(page===undefined){contentItem=data[0];}else{$.each(data,function(i,pageItem){if(pageItem.LinkName===linkName){contentItem=pageItem;return false;}});}
return contentItem;}});
;;;
var QuoteCycler=Class.create({QuoteDisplayTime:6000,QuoteFadeTime:1000,QuoteWaitTime:500,QuoteInterval:null,QuoteIdx:-1,QuoteJSON:null,QuoteCount:0,Container:null,initialize:function(containerID){var _self=this;_self.Container=$("#"+containerID);_self.FetchQuotes();_self.CreateElements();},FetchQuotes:function(){var _self=this;_self.QuoteJSON=_jsonLoader[GlobalContentUrls.QuotesData];_self.QuoteCount=_self.QuoteJSON.Quotes.length;},CreateElements:function(){var _self=this;_self.Container.attr("aria-live","polite").attr("aria-atomic","true").attr("aria-busy","true");_self.QuoteJSON.Quotes.sort(function(){return 0.5-Math.random()})
for(var i=0;i<_self.QuoteCount;i++){var quote=_self.QuoteJSON.Quotes[i];var text=quote.Text;var author=quote.Author;var source=quote.Source;var sourceUrl=quote.SourceUrl;var logoUri=quote.LogoUri;var attribution="- ";if(author!==null&&author!==undefined){attribution+=author;}
if(source!==null&&source!==undefined){if(author!==null&&author!==undefined){attribution+=", ";}
attribution+=source;}
var asideElement=$("<aside>");$("<section>").css("position","absolute").css("top","0px").css("left","0px").css("display","none").append($("<blockquote />").html("&#8220"+text+"&#8221;")).append($("<cite />").html(attribution)).appendTo(_self.Container);}},Start:function(){var _self=this;_self.ShowNextQuote();_self.QuoteInterval=window.setInterval(_self.ShowNextQuote.bind(_self),_self.QuoteDisplayTime);},Stop:function(){var _self=this;window.clearTimeout(_self.QuoteInterval);},ShowNextQuote:function(){var _self=this;if(_self.QuoteIdx!=null){_self.Container.attr("aria-busy","true");if(_self.QuoteIdx>=0){var quoteElement=_self.GetQuoteElement(_self.QuoteIdx);if(quoteElement!=null){quoteElement.css("opacity",1).animate({opacity:0},{queue:true,duration:_self.QuoteFadeTime,complete:function(){$(this).css("display","none");}});}}
_self.QuoteIdx++;if(_self.QuoteIdx>=_self.QuoteCount){_self.QuoteIdx=0;}
var quoteElement=_self.GetQuoteElement(_self.QuoteIdx);if(quoteElement!=null){quoteElement.css("display","inline").css("opacity",0).delay(_self.QuoteFadeTime+_self.QuoteWaitTime).animate({opacity:1},{queue:true,duration:_self.QuoteFadeTime,complete:function(){$(this).css("opacity","");_self.Container.attr("aria-busy","false");}});}}},GetQuoteElement:function(i){return this.Container.children().eq(i);}});
;;;
var ThumbnailViewer=Class.create();var ThumbnailViewerArray=[];ThumbnailViewer.Attach=function(){$.each($(".thumbnail_viewer"),function(i,element){if($(element).attr("data-initialized")==null){var thumbnailViewer=new ThumbnailViewer($(element));ThumbnailViewerArray.push(thumbnailViewer);}});};ThumbnailViewer.Detach=function(){for(var i=0;i<ThumbnailViewerArray.length;i++){var thumbnailViewer=ThumbnailViewerArray[i];thumbnailViewer.Dispose();delete thumbnailViewer;}
ThumbnailViewerArray.length=0;};Object.extend(ThumbnailViewer.prototype,{Container:null,ContainerContent:null,ContainerHeader:null,ContainerThumbnails:null,ContainerThumbnailClone:null,initialize:function(container){var _self=this;_self.Container=container;_self.Container.attr("data-initialized","true");_self.ContainerContent=_self.Container.find(".media_main");_self.ContainerHeader=_self.Container.find(".media_header h1");_self.ContainerThumbnails=_self.Container.find(".media_thumbnails");_self.ContainerThumbnailClone=$("<div>").appendTo($(document.body));_self.BindEvents();var thumbnail=_self.GetThumbnailElement(0);if(thumbnail.get(0)!=null){_self.ExpandThumbnail(thumbnail,false);}},Dispose:function(){var _self=this;_self.Container.attr("data-initialized","false");_self.UnbindEvents();_self.ContainerContent.unbind();_self.ContainerThumbnails.children().unbind();_self.RemoveContent();_self.ContainerThumbnailClone.remove();_self.Container=null;_self.ContainerContent=null;_self.ContainerHeader=null;_self.ContainerThumbnails=null;},BindEvents:function(){var _self=this;_self.UnbindEvents();_self.ContainerThumbnails.children().bind("click",_self.OnThumbnailClick.bind(_self)).bind("keydown",_self.OnThumbnailKeydown.bind(_self)).attr("onclick","");},UnbindEvents:function(){var _self=this;_self.ContainerThumbnails.children().unbind("click").unbind("keydown").removeAttr("onclick");},OnThumbnailClick:function(e){var _self=this;var thumbnail=$(e.currentTarget);_self.ExpandThumbnail(thumbnail);},OnThumbnailKeydown:function(e){var _self=this;switch(e.keyCode){case 13:case 32:$(e.currentTarget).trigger("click");e.preventDefault();break;}},ExpandThumbnail:function(thumbnail,animate){var _self=this;_self.IsExpanding=true;var type=thumbnail.attr("data-type");var title=thumbnail.attr("data-title");if(title==null||title==""){title=thumbnail.find("img").attr("alt");if(title==null){title="";}}
var imageUrl=thumbnail.attr("data-imageurl");if(imageUrl==null){imageUrl="";}
var videoUrl=thumbnail.attr("data-videourl");if(videoUrl==null){videoUrl="";}
var autoPlay=thumbnail.attr("data-autoplay");if(autoPlay==null){autoPlay="";}
_self.RemoveContent();if(_self.ContainerHeader.get(0)!=null){_self.ContainerHeader.html(title);}
if(type=="image"){_self.LoadContentImage(title,imageUrl);}
else if(type=="video"){_self.LoadContentVideo(title,imageUrl,videoUrl,autoPlay);}
_self.ContainerContent.css("visibility","hidden");if(thumbnail.find("img").get(0)==null){animate=false;}
if(animate==false){_self.ScrollThumbnails(thumbnail);_self.PresentContent(thumbnail);}
else{var thumbnailClone=_self.CreateThumbnailClone(thumbnail);var containerPosition=_self.ContainerContent.getAbsolutePosition(0,0);var containerWidth=_self.ContainerContent.css("width");var containerHeight=_self.ContainerContent.css("height");_self.ScrollThumbnails(thumbnail);thumbnailClone.animate({left:containerPosition.x,top:containerPosition.y,width:containerWidth,height:containerHeight},{duration:500,easing:EasingTypes.OutCubic,complete:function(){$(this).remove();if(thumbnail!=null){_self.PresentContent(thumbnail);}}});}},LoadContentImage:function(title,imageUrl){var _self=this;var imageContainer=$("<img>").appendTo(_self.ContainerContent);if(title!=""){imageContainer.attr("alt",title);}
if(imageUrl!=""){imageContainer.attr("src",imageUrl);}},LoadContentVideo:function(title,imageUrl,videoUrl,autoPlay){var _self=this;var videoContainer=$("<div>").attr("class","video_player").appendTo(_self.ContainerContent);if(title!=""){videoContainer.attr("data-title",title);}
if(imageUrl!=""){videoContainer.attr("data-previewurl",imageUrl);}
if(videoUrl!=""){videoContainer.attr("data-videourl",videoUrl);}
if(autoPlay!=""){videoContainer.attr("data-autoplay",autoPlay);}
VideoPlayer.Attach();},CreateThumbnailClone:function(thumbnail){var _self=this;var position=thumbnail.getAbsolutePosition(0,0);var x=position.x;var y=position.y;thumbnailClone=thumbnail.find("img").clone();thumbnailClone.css("position","absolute").css("top",y).css("left",x).css("z-index",10001).appendTo(_self.ContainerThumbnailClone);return thumbnailClone;},ScrollThumbnails:function(thumbnail){var _self=this;_self.ContainerThumbnails.children().filter(".image_hidden").appendTo(_self.ContainerThumbnails);_self.ContainerThumbnails.children().removeClass("image_hidden");thumbnail.addClass("image_hidden");},PresentContent:function(){var _self=this;_self.ContainerContent.css("visibility","visible");},RemoveContent:function(){var _self=this;VideoPlayer.Detach();_self.ContainerContent.empty();_self.ContainerHeader.empty();},GetThumbnailElement:function(i){var _self=this;return _self.ContainerThumbnails.children().eq(i);}});
;;;
var ThumbnailPager=Class.create({Container:null,ContainerContent:null,ContainerHeader:null,ContainerCaption:null,ContainerThumbnails:null,ContainerPagination:null,AriaBusyTimeout:null,ItemsPerPage:null,CategoryId:null,ThumbnailId:null,ExpandQueued:null,CurrentPage:null,initialize:function(container,itemsPerPage){var _self=this;_self.Container=container;_self.ItemsPerPage=6;_self.ExpandQueued=false;if(itemsPerPage!=null){_self.ItemsPerPage=itemsPerPage;}},Attach:function(categoryId,thumbnailId,focusFirstThumbnail){var _self=this;if(_self.Container){_self.CategoryId=categoryId;_self.ThumbnailId=thumbnailId;_self.CurrentPage=null;_self.ContainerContent=_self.Container.find(".media_main");_self.ContainerHeader=_self.Container.find(".media_header h1");_self.ContainerCaption=_self.Container.find(".media_caption");_self.ContainerThumbnails=_self.Container.find(".media_thumbnails");_self.ContainerPagination=_self.Container.find(".media_pagination");_self.ContainerThumbnails.attr("aria-atomic","true");_self.BindEvents();_self.CreatePagination(0,focusFirstThumbnail);if(_self.ExpandQueued){_self.ExpandQueued=false;_self.ExpandThumbnailInitial();}}},Detach:function(){var _self=this;_self.UnbindEvents();_self.RemovePagination();_self.RemoveContent();_self.Container=null;_self.ContainerContent=null;_self.ContainerHeader=null;_self.ContainerCaption=null;_self.ContainerThumbnails=null;_self.ContainerPagination=null;_self.ItemsPerPage=6;_self.CategoryId=null;_self.ThumbnailId=null;_self.ExpandQueued=null;_self.CurrentPage=null;},CreatePagination:function(currentPage,focusFirstThumbnail){var _self=this;if(_self.Container){if(currentPage!=_self.CurrentPage){_self.CurrentPage=currentPage;_self.ContainerThumbnails.attr("aria-busy","true");var itemsPerPage=_self.ItemsPerPage;var numItems=_self.ContainerThumbnails.children().length;var numPages=Math.ceil(numItems/itemsPerPage);var itemIndexFirst=currentPage*itemsPerPage;var itemIndexLast=(currentPage+1)*itemsPerPage;_self.RemovePagination();if(_self.ContainerPagination.get(0)!=null){var ul=$("<ul/>").appendTo(_self.ContainerPagination);var li=$("<li/>").append($("<a/>").addClass("prev_arrow").html("prev").css("visibility",(currentPage-1>=0?"visible":"hidden")).bind("click",_self.CreatePagination.bind(_self,currentPage-1,true)).attr("onclick","").attr("href","javascript:void(0)")).appendTo(ul);DisableSelection(li);if(numPages>1){for(var i=0;i<numPages;i++){if(i===currentPage){li=$("<li/>").html(i+1).appendTo(ul);}
else{li=$("<li/>").append($("<a/>").html(i+1).bind("click",_self.CreatePagination.bind(_self,i,true)).attr("onclick","").attr("href","javascript:void(0)")).appendTo(ul);}
DisableSelection(li);}}
li=$("<li/>").append($("<a/>").addClass("next_arrow").html("next").css("visibility",(currentPage+1<numPages?"visible":"hidden")).bind("click",_self.CreatePagination.bind(_self,currentPage+1,true)).attr("onclick","").attr("href","javascript:void(0)")).appendTo(ul);DisableSelection(li);}
_self.ContainerThumbnails.children().filter(":eq("+itemIndexFirst+"), :lt("+itemIndexLast+"):gt("+itemIndexFirst+")").fadeIn(500);if(focusFirstThumbnail){_self.FocusThumbnailByIndex(itemIndexFirst);}
_self.AriaBusyTimeout=window.setTimeout(function(){_self.ContainerThumbnails.attr("aria-busy","false");},500);}}},RemovePagination:function(){var _self=this;window.clearTimeout(_self.AriaBusyTimeout);if(_self.ContainerThumbnails){_self.ContainerThumbnails.children().hide();}
if(_self.ContainerPagination){_self.ContainerPagination.empty();}},BindEvents:function(){var _self=this;_self.UnbindEvents();if(_self.ContainerThumbnails){_self.ContainerThumbnails.children().bind("click",_self.OnThumbnailClick.bind(_self)).bind("keydown",_self.OnThumbnailKeydown.bind(_self)).attr("onclick","");}},UnbindEvents:function(){var _self=this;if(_self.ContainerThumbnails){_self.ContainerThumbnails.children().unbind("click").unbind("keydown").removeAttr("onclick");}},ExpandThumbnailInitial:function(){var _self=this;if(_self.CategoryId==null){_self.ExpandQueued=true;}
else{if(_self.ThumbnailId){_self.ExpandThumbnailById(_self.ThumbnailId);}
else{var thumbnail=_self.ExpandThumbnailByIndex(0);if(thumbnail&&thumbnail.length>0){var thumbnailId=thumbnail.attr("data-id");SWFAddress.setValue(Const.VIDEOS_SECTION+"/"+_self.CategoryId+"/"+thumbnailId);}}}},OnThumbnailClick:function(e){var _self=this;var thumbnail=$(e.currentTarget);var thumbnailId=thumbnail.attr("data-id");CallNavChange(Const.VIDEOS_SECTION+"/"+_self.CategoryId+"/"+thumbnailId);},OnThumbnailKeydown:function(e){var _self=this;switch(e.keyCode){case 13:case 32:$(e.currentTarget).trigger("click");e.preventDefault();break;}},FocusThumbnailByIndex:function(i){var _self=this;var thumbnail=_self.GetThumbnailElementByIndex(i);if(thumbnail&&thumbnail.length>0){thumbnail.eq(0).focus();}
return thumbnail;},FocusThumbnailById:function(id){var _self=this;var thumbnail=_self.GetThumbnailElementById(id);var i=thumbnail.index();return _self.FocusThumbnailByIndex(i);},ExpandThumbnailByIndex:function(i){var _self=this;var thumbnail=_self.GetThumbnailElementByIndex(i);if(thumbnail&&thumbnail.length>0){var newPage=Math.floor(i/_self.ItemsPerPage);_self.CreatePagination(newPage,false);thumbnail.eq(0).focus();_self.ExpandThumbnail(thumbnail);}
return thumbnail;},ExpandThumbnailById:function(id){var _self=this;var thumbnail=_self.GetThumbnailElementById(id);var i=thumbnail.index();return _self.ExpandThumbnailByIndex(i);},ExpandThumbnail:function(thumbnail){var _self=this;if(thumbnail&&_self.Container){var type=thumbnail.attr("data-type");var title=thumbnail.attr("data-title");if(title==null||title==""){title=thumbnail.find("img").attr("alt");if(title==null){title="";}}
var caption=thumbnail.attr("data-caption");var imageUrl=thumbnail.attr("data-imageurl");if(imageUrl==null){imageUrl="";}
var labelid=thumbnail.attr("data-labelid");if(labelid==null){labelid="";}
var videoUrl=thumbnail.attr("data-videourl");if(videoUrl==null){videoUrl="";}
_self.ContainerThumbnails.find("p.now_playing").remove();$("<p/>").addClass("now_playing").html("Now Playing").prependTo(thumbnail);_self.RemoveContent();if(_self.ContainerHeader.get(0)!=null){_self.ContainerHeader.html(title);}
if(_self.ContainerCaption.get(0)!=null){_self.ContainerCaption.html(caption);}
if(type==="image"){_self.LoadContentImage(title,imageUrl);}
else if(type==="video"){_self.LoadContentVideo(title,imageUrl,videoUrl,labelid);}}},LoadContentImage:function(title,imageUrl){var _self=this;var imageContainer=$("<img>").appendTo(_self.ContainerContent);if(title!=""){imageContainer.attr("alt",title);}
if(imageUrl!=""){imageContainer.attr("src",imageUrl);}},LoadContentVideo:function(title,imageUrl,videoUrl,labelid){var _self=this;var videoContainer=$("<div>").attr("class","video_player").appendTo(_self.ContainerContent);if(title!=""){videoContainer.attr("data-title",title);}
if(imageUrl!=""){videoContainer.attr("data-previewurl",imageUrl);}
if(videoUrl!=""){videoContainer.attr("data-videourl",videoUrl);}
if(labelid!=""){videoContainer.attr("data-labelid",labelid);}
VideoPlayer.Attach();},RemoveContent:function(){var _self=this;VideoPlayer.Detach();if(_self.ContainerContent){_self.ContainerContent.empty();}
if(_self.ContainerHeader){_self.ContainerHeader.empty();}
if(_self.ContainerCaption){_self.ContainerCaption.empty();}},GetThumbnailElementByIndex:function(i){var _self=this;if(_self.ContainerThumbnails){return _self.ContainerThumbnails.children().eq(i);}
return[];},GetThumbnailElementById:function(id){var _self=this;if(_self.ContainerThumbnails){return _self.ContainerThumbnails.children().filter('[data-id="'+id+'"]')}
return[];}});
;;;
var BingSearch=Class.create({AppId:"AppId=65854E5121A45ABAA50C1A350615970A3F4594DA",Query:"Query=",Sources:"Sources=Web",Version:"Version=2.2",Market:"Market=en-us",Options:"Options=EnableHighlighting",WebCount:8,WebOffset:0,Container:null,Completed:null,SearchTerm:null,initialize:function(container){var _self=this;_self.Container=container;},Search:function(searchTerm,callback){var _self=this;_self.Completed=callback;_self.SearchTerm=searchTerm;var searchTerms=searchTerm.replace(" ","+");searchTerms="site:www.beautyoftheweb.com+"+searchTerms;var arr=[_self.AppId,_self.Query+searchTerms,_self.Sources,_self.Version,_self.Market,_self.Options,"Web.Count="+_self.WebCount,"Web.Offset="+_self.WebOffset,"JsonType=callback","JsonCallback=?"];var requestStr="http://api.search.live.net/json.aspx?"+arr.join("&");$.ajax({type:"GET",url:requestStr,dataType:"jsonp",success:function(msg){_self.SearchCompleted(msg);},error:function(msg){alert("Something hasn't worked\n"+msg.d);}});},SearchCompleted:function(response){var _self=this;var errors=response.SearchResponse.Errors;if(errors!=null){}
else{_self.DisplayResults(response);if(_self.Completed!==undefined){_self.Completed();}}},DisplayResults:function(response){var _self=this;_self.Container.html("");var results=response.SearchResponse.Web.Results;if(!results)return;var top=20;var left=0;var link=[];var regexBegin=new RegExp("\uE000","g");var regexEnd=new RegExp("\uE001","g");for(var i=0;i<results.length;++i){if(i>0)
top+=100;if(i==4){left=501;top=20;}
var result=results[i];result.Title=result.Title.replace(regexBegin,"<strong>").replace(regexEnd,"</strong>");result.Description=result.Description.replace(regexBegin,"<strong>").replace(regexEnd,"</strong>");var resultPane=$("<div/>").addClass("pane window_application window_preview").attr("style",'top:'+top+'px; left:'+left+'px;');var resultSection=$("<section/>").addClass("preview").appendTo(resultPane);resultSection.html('     <a href="'+result.Url+'">'
+'         <div class="content">'
+'       <header>'
+'        <h3>'+result.Title+'</h3>'
+'    </header>'
+'       <p>'+result.Description+'</p>'
+'         </div>'
+'     </a>');_self.Container.append(resultPane);}
_self.CreateNavigation(response.SearchResponse.Web.Total,results.length);},DisplayErrors:function StartOffset(results){return;var _self=this;if(_self.WebOffset==0){return 1;}
else{return(_self.WebOffset*results.length)+1;}},EndOffset:function(results){var _self=this;if(_self.WebOffset==0){return _self.results.length;}
else{return(_self.WebOffset+1)*results.length;}},CreateNavigation:function(totalHits,pageSize){var _self=this;$(".pagination").remove();_self.Container.append($("<ul/>").addClass("pagination"));var totalPages=(totalHits/pageSize>10)?10:parseInt(totalHits/pageSize);var nav=[];if(totalPages==1)return;for(var i=0;i<totalPages;i++){var current=i==_self.WebOffset?"current":"";nav[i]='<li class="'+current+'"><a>'+(i+1)+'</a></li>';}
$(".pagination").append(nav.join(''));$(".pagination a").click(function(){_self.WebOffset=parseInt($(this).html())-1;_self.Search(_self.SearchTerm);$(".pagination li").removeClass("current");$(this).addClass("current");return false;});$(".pagination").show();},DisplayErrors:function(errors){var errorHtml=[];for(var i=0;i<errors.length;++i){errorHtml[i]="<li>"+errors[i]+"</li>";}
$('#error-list').append(errorHtml.join(''));}});
;;;
var Lightbox=Class.create();LightboxArray=[];Lightbox.Container=null;Lightbox.Loading;Lightbox.BusyIcon;Lightbox.Width;Lightbox.Height;Lightbox.Img;Lightbox.ImgMargin;Lightbox.Attach=function(){Lightbox.EnsureContainer();$.each($(".icon_expand"),function(i,element){if($(element).attr("data-initialized")==null){var lightbox=new Lightbox($(element));LightboxArray.push(lightbox);}});};Lightbox.AddImageMargin=function(height){var ImgHeight;if(height){ImgHeight=height;}else{ImgHeight=Lightbox.Container.children("img").height();}
Lightbox.ImgMargin=(Lightbox.Height-ImgHeight)/2;if(Lightbox.ImgMargin>0){Lightbox.Container.children("img").css('margin-top',Lightbox.ImgMargin);}else{Lightbox.Container.children("img").css('margin-top','0');}};Lightbox.Resize=function(){Lightbox.Width=$(window).width();Lightbox.Height=$(window).height();Lightbox.ImgMargin=(Lightbox.Height-Lightbox.Container.children("img").height())/2;Lightbox.Container.css("width",Lightbox.Width).css("height",Lightbox.Height);Lightbox.Container.children("img").css("max-height",Lightbox.Height-4).css("max-width",Lightbox.Width-4);Lightbox.AddImageMargin();};Lightbox.EnsureContainer=function(){if(!Lightbox.Container){Lightbox.Container=$("<div>").addClass("lightbox").css("display","none").prependTo($(document.body));Lightbox.Container.bind("click",{_self:Lightbox},Lightbox.OnLightBoxClick);Lightbox.Container.bind("keydown",{_self:Lightbox},Lightbox.OnLightBoxKeyDown);$(window).bind("resize.Lightbox",Lightbox.Resize);Lightbox.Resize();Lightbox.BusyIcon=$(DOMElements.DIV).addClass("loading_spinner");Lightbox.BusyIcon.appendTo(Lightbox.Container);Lightbox.BusyIcon.hide();}};Lightbox.OnLightBoxClick=function(e){Lightbox.Container.css("background-image","");Lightbox.Close();};Lightbox.Close=function(){Lightbox.Container.css("display","none");};Lightbox.ShowBusy=function(){Lightbox.Loading=setInterval(function(){UpdateSpinner(Lightbox.BusyIcon,24,288);},65);Lightbox.BusyIcon.show();};Lightbox.HideBusy=function(){clearInterval(Lightbox.Loading);Lightbox.BusyIcon.hide();};Lightbox.OnLightBoxKeyDown=function(e){var _self=(e==null?this:e.data._self);switch(e.keyCode){case 27:$(this).trigger("click");e.preventDefault();break;}};Lightbox.Detach=function(){for(var i=0;i<LightboxArray.length;i++){try{var lightbox=LightboxArray[i];lightbox.Dispose();delete lightbox;}catch(e){}}
LightboxArray.length=0;};Object.extend(Lightbox.prototype,{ImageButton:null,initialize:function(imageButton){var _self=this;_self.ImageButton=imageButton;_self.ImageButton.attr("data-initialized","true");_self.BindEvents();},Dispose:function(){var _self=this;if(_self.Container){_self.Container.attr("data-initialized","false");}
_self.UnbindEvents();},BindEvents:function(){var _self=this;_self.UnbindEvents();if(_self.ImageButton){_self.ImageButton.bind("click",{_self:_self},_self.OnThumbnailClick);_self.ImageButton.bind("keydown",{_self:_self},_self.OnThumbnailKeydown);}},UnbindEvents:function(){var _self=this;if(_self.ImageButton){_self.ImageButton.unbind("click");_self.ImageButton.unbind("keydown");}},OnThumbnailClick:function(e){var _self=(e==null?this:e.data._self);var thumbnail=$(this);_self.ExpandThumbnail(thumbnail);},OnThumbnailKeydown:function(e){var _self=(e==null?this:e.data._self);switch(e.keyCode){case 13:$(this).trigger("click");e.preventDefault();break;}},ExpandThumbnail:function(thumbnail){var _self=this;_self.LoadContentImage("",_self.ImageButton.attr("data-image"));Lightbox.Container.css("display","block");},LoadContentImage:function(title,imageUrl){var _self=this;Lightbox.Container.children("img").remove();Lightbox.ShowBusy();Lightbox.Img=new Image();Lightbox.Img.onload=function(){Lightbox.HideBusy();Lightbox.Container.append('<img src="'+imageUrl+'" />');Lightbox.Resize();Lightbox.AddImageMargin(Lightbox.Img.height);};Lightbox.Img.onerror=function(){Lightbox.HideBusy();Lightbox.Close();};Lightbox.Img.src=imageUrl;}});
;;;
var BulkLoader=Class.create({_urlSet:[],_loadedCounter:0,initialize:function(){},AddUrl:function(url){this._urlSet.push(url);},LoadData:function(onComplete){var self=this;var currentUrl=self._urlSet[self._loadedCounter];if(self[currentUrl]!==undefined&&self[currentUrl]!==null){self._loadedCounter++;if(self._loadedCounter<self._urlSet.length){self.LoadData(onComplete);}else{}}else{$.ajax({url:currentUrl,global:false,success:function(data){self[currentUrl]=data;self._loadedCounter++;if(self._loadedCounter<self._urlSet.length){self.LoadData(onComplete);}else{if(onComplete){onComplete();}}}});}}});
;;;
var VideoPlayer=Class.create();VideoPlayer.VideoPlayerTypes=["Html5VideoPlayer","SilverlightVideoPlayer","FlashVideoPlayer"];VideoPlayer.VideoPlayerTypeDetected=null;VideoPlayer.LastVolume=1;VideoPlayer.VideoPlayerArray=[];VideoPlayer.DetectSupport=function(){for(var i=0;i<VideoPlayer.VideoPlayerTypes.length;i++){var type=VideoPlayer.VideoPlayerTypes[i];if(window[type].HasSupport()===true){return type;break;}}
return null;};VideoPlayer.Attach=function(videoPlayerType){var videoPlayers=$(".video_player");if(videoPlayers.length>0){if(videoPlayerType==null){if(VideoPlayer.VideoPlayerTypeDetected==null){VideoPlayer.VideoPlayerTypeDetected=VideoPlayer.DetectSupport();}
videoPlayerType=VideoPlayer.VideoPlayerTypeDetected;}
$.each(videoPlayers,function(i,element){if($(element).attr("data-initialized")==null||$(element).attr("data-initialized")==""){if(videoPlayerType!=null&&window[videoPlayerType]!=null){var videoPlayer=new window[videoPlayerType]($(element));VideoPlayer.VideoPlayerArray.push(videoPlayer);}
else{$("<div>").html("We're sorry, but your browser does not support this video").addClass("video_error").appendTo($(element));}}});}};VideoPlayer.Detach=function(){for(var i=0;i<VideoPlayer.VideoPlayerArray.length;i++){var videoPlayer=VideoPlayer.VideoPlayerArray[i];videoPlayer.Dispose();delete videoPlayer;}
VideoPlayer.VideoPlayerArray.length=0;};VideoPlayer.Collapse=function(){for(var i=0;i<VideoPlayer.VideoPlayerArray.length;i++){var videoPlayer=VideoPlayer.VideoPlayerArray[i];videoPlayer.Collapse();}};VideoPlayer.PauseAll=function(){for(var i=0;i<VideoPlayer.VideoPlayerArray.length;i++){var videoPlayer=VideoPlayer.VideoPlayerArray[i];videoPlayer.Pause();}};VideoPlayer.StopAll=function(){for(var i=0;i<VideoPlayer.VideoPlayerArray.length;i++){var videoPlayer=VideoPlayer.VideoPlayerArray[i];videoPlayer.Stop();}};Object.extend(VideoPlayer.prototype,{Container:null,VideoContainer:null,ParentContainer:null,Title:null,VideoUrl:null,PreviewUrl:null,AutoPlay:null,IsExpanded:null,VideoSize:null,HeaderHeight:null,FooterHeight:null,FirstTimePlayed:null,FirstTimeEnded:null,VideoSizeSmall:{w:386,h:217,x:null,y:null},VideoSizeLarge:{w:1280,h:720,x:0,y:0},InitializeBase:function(container){var _self=this;_self.Container=container;_self.ParentContainer=_self.GetParentElement(_self.Container);_self.FirstTimePlayed=false;_self.FirstTimeEnded=false;_self.VideoContainer=$("<div>").addClass("video_player_inner").appendTo(_self.Container);var id=_self.Container.attr("id");if(id==null||id==""){id="video_player_"+Math.floor(Math.random()*10000000);_self.Container.attr("id",id);}
_self.HeaderHeight=asInt($("header.global").css("height"));_self.FooterHeight=asInt($("footer.global").css("height"));_self.AutoPlay=false;if(_self.Container.attr("data-title")!=null&&_self.Container.attr("data-title")!=""){_self.Title=_self.Container.attr("data-title");}
if(_self.Container.attr("data-videourl")!=null&&_self.Container.attr("data-videourl")!=""){_self.VideoUrl=_self.Container.attr("data-videourl");}
if(_self.Container.attr("data-previewurl")!=null&&_self.Container.attr("data-previewurl")!=""){_self.PreviewUrl=_self.Container.attr("data-previewurl");}
if(_self.Container.attr("data-autoplay")!=null&&_self.Container.attr("data-autoplay").toLowerCase()==="true"){_self.AutoPlay=true}
var containerWidth=asInt(_self.Container.css("width"));var containerHeight=asInt(_self.Container.css("height"));if(containerWidth>0){_self.VideoSizeSmall.w=containerWidth;}
if(containerHeight>0){_self.VideoSizeSmall.h=containerHeight;}
_self.LabelId=_self.Container.attr("data-labelid");_self.Container.attr("data-initialized","true");_self.IsExpanded=true;_self.UnbindContainerEvents();_self.BindContainerEvents();},Collapse:function(){var _self=this;if(_self.IsExpanded===true){_self.Expand();}},DisposeBase:function(allowReattach){var _self=this;_self.Collapse();_self.Container.attr("data-initialized","false");_self.UnbindContainerEvents();_self.UnbindExpandedEvents();_self.VideoContainer.remove();_self.Container.empty();_self.VideoContainer=null;_self.Container=null;_self.ParentContainer=null;},ExpandBase:function(){var _self=this;if(_self.IsExpanded==true){_self.IsExpanded=false;_self.VideoSize=_self.VideoSizeSmall;$(Selectors.MAIN_CONTAINER).removeClass("video_player_content_expanded");_self.ParentContainer.removeClass("video_player_parent_expanded");_self.Container.removeClass("video_player_expanded");_self.UnbindExpandedEvents();if(_self.ExpandInitialized){AttachScrollPane();$(".slideshow").css("overflow","hidden");}
_self.ExpandInitialized=true;}
else{_self.IsExpanded=true;_self.VideoSize=_self.VideoSizeLarge;$(Selectors.MAIN_CONTAINER).addClass("video_player_content_expanded");var position=_self.Container.getAbsolutePositionAlt();_self.VideoSize.x=-position.x;_self.VideoSize.y=-position.y+_self.HeaderHeight;_self.ParentContainer.addClass("video_player_parent_expanded");_self.Container.addClass("video_player_expanded");_self.BindExpandedEvents();DetachScrollPane();$(".slideshow").css("overflow","visible");}
_self.OnWindowResize();},OnPlayBase:function(){var _self=this;if(_self.FirstTimePlayed==false){_self.FirstTimePlayed=true;LogVideo(_self.VideoUrl,"videostart");}},OnEndedBase:function(){var _self=this;if(_self.FirstTimeEnded==false){_self.FirstTimeEnded=true;LogVideo(_self.VideoUrl,"videocomplete");}},Dispose:function(allowReattach){throw new Error("Dispose() not implemented");},Play:function(){throw new Error("Play() not implemented");},Pause:function(){throw new Error("Pause() not implemented");},Stop:function(){throw new Error("Stop() not implemented");},Mute:function(){throw new Error("Mute() not implemented");},Unmute:function(){throw new Error("Unmute() not implemented");},Expand:function(){throw new Error("Expand() not implemented");},Resize:function(){throw new Error("Resize() not implemented");},OnWindowResize:function(e){var _self=this;if(_self.Container){if(_self.IsExpanded==true){var ratio=_self.VideoSizeSmall.h/_self.VideoSizeSmall.w;_self.VideoSize.h=document.body.offsetHeight-_self.HeaderHeight-_self.FooterHeight;if(_self.VideoSize.h<_self.VideoSizeSmall.h){_self.VideoSize.h=_self.VideoSizeSmall.h;}
if(_self.VideoSize.h>720){_self.VideoSize.h=720;}
_self.VideoSize.w=_self.VideoSize.h/ratio;if(_self.VideoSize.w<1){_self.VideoSize.w=1;}
if(_self.VideoSize.w>document.body.offsetWidth&&_self.VideoSize.w>_self.VideoSizeSmall.w){_self.VideoSize.w=document.body.offsetWidth;if(_self.VideoSize.w<_self.VideoSizeSmall.w){_self.VideoSize.w=_self.VideoSizeSmall.w;}
if(_self.VideoSize.w>1280){_self.VideoSize.w=1280;}
_self.VideoSize.h=_self.VideoSize.w*ratio;}
_self.VideoSize.w=asInt(_self.VideoSize.w);_self.VideoSize.h=asInt(_self.VideoSize.h);_self.Container.css("left",_self.VideoSize.x).css("top",_self.VideoSize.y).css("width",document.body.offsetWidth).css("height",_self.VideoSize.h);_self.VideoContainer.css("width",_self.VideoSize.w);_self.Resize();}
else{_self.Container.css("left",_self.VideoSize.x).css("top",_self.VideoSize.y).css("width",_self.VideoSize.w).css("height",_self.VideoSize.h);_self.VideoContainer.css("width","100%");}}},OnEscPress:function(e){var _self=this;switch(e.keyCode){case 27:if(_self.IsExpanded==true){_self.Expand();}
break;}},BindExpandedEvents:function(){var _self=this;_self.UnbindExpandedEvents();$(window).bind('resize.video',_self.OnWindowResize.bind(_self));$(document).bind('keydown.video',_self.OnEscPress.bind(_self));},UnbindExpandedEvents:function(){var _self=this;$(window).unbind('resize.video');$(document).unbind('keydown.video');},BindContainerEvents:function(){var _self=this;_self.Container.bind("Play",_self.Play.bind(_self));_self.Container.bind("Pause",_self.Pause.bind(_self));_self.Container.bind("Stop",_self.Stop.bind(_self));_self.Container.bind("Mute",_self.Mute.bind(_self));_self.Container.bind("Unmute",_self.Unmute.bind(_self));_self.Container.bind("Expand",_self.Expand.bind(_self));_self.Container.bind("OnPlay",_self.OnPlay.bind(_self));_self.Container.bind("OnEnded",_self.OnEnded.bind(_self));},UnbindContainerEvents:function(){var _self=this;_self.Container.unbind("Play");_self.Container.unbind("Pause");_self.Container.unbind("Stop");_self.Container.unbind("Mute");_self.Container.unbind("Unmute");_self.Container.unbind("Expand");_self.Container.unbind("OnPlay");_self.Container.unbind("OnEnded");},GetParentElement:function(element){var parent=element.parent();while(parent.get(0)!=null){if(parent.hasClass("pane")){break;}
parent=parent.parent();}
return parent;}});
;;;
var Html5VideoPlayer=Class.create();Html5VideoPlayer.HasSupport=function(){var supports={html5:false,mp4:false,ogg:false};try{var video=$("<video>").get(0)||false;supports.html5=video&&typeof video.canPlayType!=="undefined";supports.mp4=supports.html5&&(video.canPlayType("video/mp4")==="maybe"||video.canPlayType("video/mp4")==="probably");supports.ogg=supports.html5&&(video.canPlayType("video/ogg")==="maybe"||video.canPlayType("video/ogg")==="probably");$(video).remove();}catch(e){}
return(supports.html5&&supports.mp4);};Object.extend(Html5VideoPlayer.prototype,VideoPlayer.prototype);Object.extend(Html5VideoPlayer.prototype,{PlayerContainer:null,Player:null,PlaySplashContainer:null,ExitFullscreenContainer:null,ControlContainer:null,ControlSize:null,Controls:null,ElementDragging:null,VideoEntered:null,ControlsShown:null,Loaded:null,IsEnded:null,initialize:function(container){var _self=this;_self.InitializeBase(container);_self.Loaded=false;_self.ControlsShown="hidden";_self.VideoEntered=false;_self.IsEnded=false;_self.CreateElements();_self.BindEventListeners();_self.Expand();_self.SetPlayerVolume(VideoPlayer.LastVolume);DisableSelection(_self.VideoContainer);_self.Controls["unmute"].element.css("display","inline");_self.Controls["mute"].element.css("display","none");_self.Controls["play"].element.css("display","inline");_self.Controls["pause"].element.css("display","none");_self.SetSrc(_self.AutoPlay);},CreateElements:function(){var _self=this;_self.PlayerContainer=$("<video>").attr("preload","metadata").css("width","100%").css("height","100%").appendTo(_self.VideoContainer);_self.PlayerContainer.attr("aria-label","Media player with video titled: "+_self.Title)
if(typeof(_self.LabelId)!="undefined"&&_self.LabelId!=null){_self.PlayerContainer.attr("aria-describedby",_self.LabelId);}
_self.Player=_self.PlayerContainer.get(0);_self.ExitFullscreenContainer=$("<div>").html("Press Esc to exit full screen mode").addClass("video_play_esc").css("display","none").appendTo(_self.VideoContainer);_self.PlaySplashContainer=$("<div>").addClass("video_splash").appendTo(_self.VideoContainer);$("<div>").appendTo(_self.PlaySplashContainer);_self.ShowPlaySplashContainer(true,false);_self.ControlContainer=$("<div>").addClass("video_control_container").appendTo(_self.VideoContainer);_self.ErrorContainer=$("<div>").addClass("video_error").appendTo(_self.VideoContainer);_self.Controls={};_self.Controls["play"]={className:"video_image",title:"Play",interactive:true,w:19,h:21,imagex:-50,imagey:0};_self.Controls["pause"]={className:"video_image",title:"Pause",interactive:true,w:17,h:21,imagex:-70,imagey:0};_self.Controls["time-text"]={className:"video_text"};_self.Controls["time-total"]={className:"video_total"};_self.Controls["time-buffered"]={className:"video_buffered"};_self.Controls["time-elapsed"]={className:"video_elapsed_color"};_self.Controls["time-handle"]={className:"video_image video_handle",title:"Time",interactive:true,w:8,h:21,imagex:0,imagey:0};_self.Controls["duration-text"]={className:"video_text"};_self.Controls["mute"]={title:"Mute",className:"video_image",interactive:true,w:13,h:21,imagex:-36,imagey:0};_self.Controls["unmute"]={title:"Unmute",className:"video_image",interactive:true,w:13,h:21,imagex:-23,imagey:0};_self.Controls["volume-total"]={className:"video_total"};_self.Controls["volume-elapsed"]={className:"video_elapsed"};_self.Controls["volume-handle"]={className:"video_image video_handle",title:"Volume",interactive:true,w:8,h:21,imagex:0,imagey:0};_self.Controls["expand"]={title:"Expand",className:"video_image",interactive:true,w:13,h:21,imagex:-10,imagey:0};$.each(_self.Controls,function(name,control){control.element=$("<span>").addClass(control.className).appendTo(_self.ControlContainer);if(control.className.indexOf("video_image")>=0){control.element.attr("data-background-x",control.imagex).attr("data-background-y",control.imagey).attr("data-background-y-alt",control.imagey-control.h).css("width",control.w).css("height",control.h);_self.SetImage(null,control.element);}
if(control.title!=null){control.element.attr("title",control.title);}
if(control.interactive==true){control.element.attr("tabindex",0).attr("aria-controls",_self.Container.attr("id")).attr("onclick","");}});},Dispose:function(allowReattach){var _self=this;_self.UnbindControlEvents();_self.UnbindEventListeners();$.each(_self.Controls,function(name,control){if(control.element){control.element.remove();}
control.element=null;});if(_self.ControlContainer){_self.ControlContainer.remove();}
if(_self.PlaySplashContainer){_self.PlaySplashContainer.remove();}
if(_self.ExitFullscreenContainer){_self.ExitFullscreenContainer.remove();}
if(_self.PlayerContainer){_self.PlayerContainer.remove();}
_self.ControlContainer=null;_self.PlaySplashContainer=null;_self.ExitFullscreenContainer=null;_self.PlayerContainer=null;_self.Player=null;_self.ElementDragging=null;_self.DisposeBase(allowReattach);},Play:function(e){var _self=this;if(_self.Player){_self.Player.play();_self.OnPlay();}},Pause:function(e){var _self=this;if(_self.Player){_self.Player.pause();}},Stop:function(e){var _self=this;if(_self.Player){_self.Player.pause();_self.SetPlayerTime(0);}},Mute:function(e){var _self=this;if(_self.Player){_self.Player.muted=true;_self.OnVolumeChange();}},Unmute:function(e){var _self=this;if(_self.Player){_self.Player.muted=false;_self.OnVolumeChange();}},Expand:function(e){var _self=this;_self.ExpandBase(e);_self.ShowControls();if(_self.ExitFullscreenContainer){if(_self.IsExpanded==true){_self.ExitFullscreenContainer.css("display","inline");_self.ExitFullscreenContainer.fadeIn().delay(1500).fadeOut();}
else{_self.ExitFullscreenContainer.css("display","none");}}
_self.Resize();},Resize:function(e){var _self=this;if(_self.PlaySplashContainer){_self.PlaySplashContainer.css("width",_self.VideoSize.w).css("height",_self.VideoSize.h);}
if(_self.ControlContainer){_self.ControlSize={w:_self.VideoSize.w,h:28};_self.ControlContainer.css("width",_self.ControlSize.w).css("height",_self.ControlSize.h);$(".video_text").css("line-height",(_self.ControlSize.h-5)+"px");var timex=75;var volumex=_self.ControlSize.w-89;$.extend(_self.Controls["play"],{x:11,y:0});$.extend(_self.Controls["pause"],{x:11,y:0});$.extend(_self.Controls["time-text"],{x:30,y:0,w:50,h:21});$.extend(_self.Controls["time-total"],{x:timex,y:0,w:_self.ControlSize.w-timex-165,h:8});$.extend(_self.Controls["time-buffered"],{x:timex+1,y:1,w:0,h:8});$.extend(_self.Controls["time-elapsed"],{x:timex+1,y:1,w:0,h:8});$.extend(_self.Controls["time-handle"],{x:timex+1,y:0});$.extend(_self.Controls["duration-text"],{x:_self.ControlSize.w-166,y:0,w:50,h:21});$.extend(_self.Controls["mute"],{x:_self.ControlSize.w-112,y:0});$.extend(_self.Controls["unmute"],{x:_self.ControlSize.w-112,y:0});$.extend(_self.Controls["volume-total"],{x:volumex,y:0,w:49,h:8});$.extend(_self.Controls["volume-elapsed"],{x:volumex+1,y:1,w:20,h:8});$.extend(_self.Controls["volume-handle"],{x:volumex+1,y:0});$.extend(_self.Controls["expand"],{x:_self.ControlSize.w-27,y:0});$.each(_self.Controls,function(i,control){var y=(_self.ControlSize.h-control.h)*0.5+control.y;control.element.css("top",y).css("left",control.x).css("width",control.w).css("height",control.h);});_self.UpdateTimeRail();_self.UpdateVolumeRail();}},BindEventListeners:function(){var _self=this;_self.UnbindEventListeners();_self.PlayerContainer.bind("error",_self.OnError.bind(_self)).bind("canplay",_self.OnLoad.bind(_self)).bind("progress",_self.UpdateTimeRail.bind(_self)).bind("loadeddata",_self.UpdateTimeRail.bind(_self)).bind("timeupdate",_self.OnTimeUpdate.bind(_self)).bind("play",_self.OnPlay.bind(_self)).bind("pause",_self.OnPause.bind(_self)).bind("ended",_self.OnEnded.bind(_self)).bind("volumechange",_self.OnVolumeChange.bind(_self));},UnbindEventListeners:function(){var _self=this;if(_self.PlayerContainer){_self.PlayerContainer.unbind();}},OnLoad:function(e){var _self=this;if(_self.Loaded==false){_self.BindControlEvents();_self.ShowControls();_self.Loaded=true;}},BindControlEvents:function(){var _self=this;_self.UnbindControlEvents();_self.VideoContainer.bind("mouseenter",_self.OnVideoEnter.bind(_self));_self.VideoContainer.bind("mouseleave",_self.OnVideoLeave.bind(_self));_self.PlaySplashContainer.bind("click",_self.ClickPlaySplashContainer.bind(_self));_self.Controls["pause"].element.bind("click",_self.Pause.bind(_self));_self.Controls["play"].element.bind("click",_self.Play.bind(_self));_self.Controls["mute"].element.bind("click",_self.Unmute.bind(_self));_self.Controls["unmute"].element.bind("click",_self.Mute.bind(_self));_self.Controls["expand"].element.bind("click",_self.Expand.bind(_self));_self.Controls["time-total"].element.bind("mousedown",{type:"time-handle"},_self.StartDrag.bind(_self));_self.Controls["time-buffered"].element.bind("mousedown",{type:"time-handle"},_self.StartDrag.bind(_self));_self.Controls["time-elapsed"].element.bind("mousedown",{type:"time-handle"},_self.StartDrag.bind(_self));_self.Controls["time-handle"].element.bind("mousedown",{type:"time-handle"},_self.StartDrag.bind(_self));_self.Controls["time-handle"].element.bind("keydown",{type:"time-handle"},_self.OnKeydown.bind(_self));_self.Controls["volume-total"].element.bind("mousedown",{type:"volume-handle"},_self.StartDrag.bind(_self));_self.Controls["volume-elapsed"].element.bind("mousedown",{type:"volume-handle"},_self.StartDrag.bind(_self));_self.Controls["volume-handle"].element.bind("mousedown",{type:"volume-handle"},_self.StartDrag.bind(_self));_self.Controls["volume-handle"].element.bind("keydown",{type:"volume-handle"},_self.OnKeydown.bind(_self));$.each(_self.Controls,function(name,control){if(control.className.indexOf("video_image")>=0){control.element.bind("mouseenter",_self.SetAltImage.bind(_self));control.element.bind("mouseleave",_self.SetImage.bind(_self));}
if(control.interactive==true){control.element.bind("focus",_self.OnVideoEnter.bind(_self)).bind("keydown",_self.OnKeydown.bind(_self));}});},UnbindControlEvents:function(){var _self=this;if(_self.VideoContainer){_self.VideoContainer.unbind("mouseenter",_self.OnVideoEnter.bind(_self));_self.VideoContainer.unbind("mouseleave",_self.OnVideoLeave.bind(_self));}
if(_self.PlaySplashContainer){_self.PlaySplashContainer.unbind();}
$.each(_self.Controls,function(name,control){if(control.element){control.element.unbind();}});},OnTimeUpdate:function(e){var _self=this;if(_self.Player&&!_self.Player.paused){_self.UpdateTimeRail();}},OnKeydown:function(e){var _self=this;switch(e.keyCode){case 13:case 32:$(e.currentTarget).trigger("click");e.preventDefault();break;case 37:if(e.data&&e.data.type=="time-handle"){var newTime=_self.GetPlayerTime()-1;_self.SetPlayerTime(newTime);}
else if(e.data&&e.data.type=="volume-handle"){var newVolume=_self.GetPlayerVolume()-0.1;_self.SetPlayerVolume(newVolume);}
e.preventDefault();break;case 39:if(e.data&&e.data.type=="time-handle"){var newTime=_self.GetPlayerTime()+1;_self.SetPlayerTime(newTime);}
else if(e.data&&e.data.type=="volume-handle"){var newVolume=_self.GetPlayerVolume()+0.1;_self.SetPlayerVolume(newVolume);}
e.preventDefault();break;}},SetImage:function(e,element){var _self=this;if(element==null){element=$(e.currentTarget);}
var imagex=element.attr("data-background-x");var imagey=element.attr("data-background-y");element.css("background-position",imagex+"px "+imagey+"px");},SetAltImage:function(e,element){var _self=this;if(element==null){element=$(e.currentTarget);}
var imagex=element.attr("data-background-x");var imagey=element.attr("data-background-y-alt");element.css("background-position",imagex+"px "+imagey+"px");},SetSrc:function(playImmediately){var _self=this;_self.PlayerContainer.attr("src",_self.VideoUrl);if(playImmediately){_self.Play();}},OnPlay:function(e){var _self=this;var forceReload=false;if(_self.IsEnded===true){_self.IsEnded=false;if(_browserHelper.IsChrome){forceReload=true;}}
if(forceReload===true){_self.SetSrc(true);}
else{_self.OnPlayBase();_self.Controls["play"].element.css("display","none");_self.Controls["pause"].element.css("display","inline");_self.HidePlaySplashContainer();}},OnPause:function(e){var _self=this;_self.Controls["pause"].element.css("display","none");_self.Controls["play"].element.css("display","inline");_self.ShowPlaySplashContainer(false,false);},OnEnded:function(e){var _self=this;_self.IsEnded=true;_self.OnEndedBase();_self.Pause();_self.UpdateTimeRail();},OnVolumeChange:function(e){var _self=this;if(_self.Player.muted==true){_self.Controls["unmute"].element.css("display","none");_self.Controls["mute"].element.css("display","inline");if(_self.Player.lastVolume==null){_self.Player.lastVolume=_self.GetPlayerVolume();_self.SetPlayerVolume(0);}}
else{_self.Controls["mute"].element.css("display","none");_self.Controls["unmute"].element.css("display","inline");if(_self.Player.lastVolume!=null){_self.SetPlayerVolume(_self.Player.lastVolume);_self.Player.lastVolume=null;}}
_self.UpdateVolumeRail();},OnError:function(e){var _self=this;var errorMessage="An unknown error occurred.";if(e.target!=null&&e.target.error!=null){switch(e.target.error.code){case e.target.error.MEDIA_ERR_ABORTED:errorMessage="You aborted the video playback.";break;case e.target.error.MEDIA_ERR_NETWORK:errorMessage="A network error caused the video download to fail part-way.";break;case e.target.error.MEDIA_ERR_DECODE:errorMessage="The video playback was aborted due to a corruption problem or because the video used features your browser did not support.";break;case e.target.error.MEDIA_ERR_SRC_NOT_SUPPORTED:errorMessage="The video could not be loaded, either because the server or network failed or because the format is not supported.";break;}}
_self.ErrorContainer.html(_self.ErrorContainer.html()+errorMessage+"<br>");_self.HideControls();},OnVideoEnter:function(e){var _self=this;_self.VideoEntered=true;if(_self.ControlsShown=="hidden"||_self.ControlsShown=="hiding"){_self.ShowControls();}},OnVideoLeave:function(e){var _self=this;_self.VideoEntered=false;if((_self.ControlsShown=="showing"||_self.ControlsShown=="shown")&&_self.VideoEntered==false){window.setTimeout(function(){if((_self.ControlsShown=="showing"||_self.ControlsShown=="shown")&&_self.VideoEntered==false){_self.HideControls();}},1000);}},ShowPlaySplashContainer:function(atStart){var _self=this;_self.PlaySplashContainer.css("display","inline");var splashImage=_self.PlaySplashContainer.children().eq(0);splashImage.removeClass("video_start video_replay");var atEnd=_self.IsEnded;if(atStart){splashImage.addClass("video_start");}
else if(atEnd){splashImage.addClass("video_replay");}
else{splashImage.addClass("video_start");}
if(atStart&&_self.PreviewUrl!=null){_self.PlaySplashContainer.css("background-image","url("+_self.PreviewUrl+")");}
else{_self.PlaySplashContainer.css("background-image","");}},HidePlaySplashContainer:function(){var _self=this;var splashImage=_self.PlaySplashContainer.children().eq(0);splashImage.removeClass("video_watch video_start video_replay");_self.PlaySplashContainer.css("background-image","");},ClickPlaySplashContainer:function(){var _self=this;if(_self.Player&&_self.Player.paused){_self.Play();}
else{_self.Pause();}},ShowControls:function(){var _self=this;if(_self.ControlContainer){_self.ControlsShown="showing";_self.ControlContainer.animate({bottom:"0px",opacity:1},{duration:700,queue:false,easing:EasingTypes.OutCubic,complete:function(){_self.ControlsShown="shown";}});}},HideControls:function(){var _self=this;if(_self.ControlContainer){_self.ControlsShown="hiding";_self.ControlContainer.animate({bottom:"-10px",opacity:0},{duration:700,queue:false,easing:EasingTypes.OutCubic,complete:function(){_self.ControlsShown="hidden";}});}},StartDrag:function(e){var _self=this;var type=e.data.type;AttachDragEvents(_self.MoveDrag.bind(_self),_self.StopDrag.bind(_self));_self.ElementDragging=type;_self.MoveDrag(e);if(type=="time-handle"&&_self.PreviewUrl!=null){_self.PlaySplashContainer.css("background-image","");}},StopDrag:function(e){var _self=this;DetachDragEvents();_self.ElementDragging=null;},MoveDrag:function(e){var _self=this;if(_self.ElementDragging!=null){var mousePosition=GetMousePosition(e);if(_self.ElementDragging=="time-handle"){_self.TimeClick(mousePosition);}
else if(_self.ElementDragging=="volume-handle"){_self.VolumeClick(mousePosition);}}},TimeClick:function(mousePosition){var _self=this;var controlTimeTotal=_self.Controls["time-total"];var position=controlTimeTotal.element.getRelativePosition(mousePosition.x,mousePosition.y);var ratio=position.x/controlTimeTotal.w;_self.SetPlayerTime(_self.GetPlayerDuration()*ratio);},VolumeClick:function(mousePosition){var _self=this;var controlVolumeTotal=_self.Controls["volume-total"];var position=controlVolumeTotal.element.getRelativePosition(mousePosition.x,mousePosition.y);var ratio=position.x/controlVolumeTotal.w;if(_self.Player&&_self.Player.muted===true){_self.Unmute();}
_self.SetPlayerVolume(ratio);},GetPlayerTime:function(){var _self=this;var time=0;if(_self.Player&&_self.Player.currentTime){time=_self.Player.currentTime;}
return time;},GetPlayerDuration:function(){var _self=this;var duration=0;if(_self.Player&&_self.Player.duration){duration=_self.Player.duration;}
return duration;},GetPlayerVolume:function(){var _self=this;var volume=0;if(_self.Player&&_self.Player.volume){volume=_self.Player.volume;}
return volume;},GetPlayerBuffered:function(){var _self=this;var buffered=0;if(_self.Player&&_self.Player.buffered&&_self.Player.buffered.length>0){buffered=_self.Player.buffered.end(_self.Player.buffered.length-1);}
return buffered;},SetPlayerTime:function(time){var _self=this;if(_self.Player){var duration=_self.GetPlayerDuration();if(duration>0){if(time>duration){time=duration;}
else if(time<0){time=0;}
_self.Player.currentTime=time;_self.UpdateTimeRail();}}},SetPlayerVolume:function(volume){var _self=this;if(_self.Player){if(volume>1){volume=1;}
else if(volume<0){volume=0;}
VideoPlayer.LastVolume=volume;_self.Player.volume=volume;}},FormatTime:function(timeInSeconds){if(isNaN(timeInSeconds)){timeInSeconds=0;}
var minutes=Math.floor(timeInSeconds/60);var seconds=Math.floor(timeInSeconds%60);if(seconds<10)seconds="0"+seconds;return minutes+":"+seconds;},UpdateTimeRail:function(e){var _self=this;var controlTimeText=_self.Controls["time-text"];var controlDurationText=_self.Controls["duration-text"];var controlTimeTotal=_self.Controls["time-total"];var controlTimeHandle=_self.Controls["time-handle"];var controlTimeElapsed=_self.Controls["time-elapsed"];var controlTimeBuffered=_self.Controls["time-buffered"];var elapsedRatio=0;if(_self.GetPlayerDuration()>0){elapsedRatio=_self.GetPlayerTime()/_self.GetPlayerDuration();}
if(elapsedRatio<0){elapsedRatio=0;}
else if(elapsedRatio>1){elapsedRatio=1;}
var elapsedWidth=(controlTimeTotal.w-controlTimeHandle.w)*elapsedRatio;var bufferedRatio=0;if(_self.GetPlayerDuration()>0){bufferedRatio=_self.GetPlayerBuffered()/_self.GetPlayerDuration();}
if(bufferedRatio<0){bufferedRatio=0;}
else if(bufferedRatio>1){bufferedRatio=1;}
var bufferedWidth=controlTimeTotal.w*bufferedRatio;var durationText=_self.FormatTime(_self.GetPlayerDuration());var timeText=_self.FormatTime(_self.GetPlayerTime());controlDurationText.element.html(durationText);controlTimeText.element.html(timeText);controlTimeHandle.element.css("left",controlTimeHandle.x+elapsedWidth);controlTimeElapsed.element.css("width",elapsedWidth);controlTimeBuffered.element.css("width",bufferedWidth);},UpdateVolumeRail:function(){var _self=this;var controlVolumeTotal=_self.Controls["volume-total"];var controlVolumeHandle=_self.Controls["volume-handle"];var controlVolumeElapsed=_self.Controls["volume-elapsed"];var ratio=_self.GetPlayerVolume()/1;var totalWidth=controlVolumeTotal.w-controlVolumeHandle.w;var elapsedWidth=totalWidth*ratio;controlVolumeHandle.element.css("left",controlVolumeHandle.x+elapsedWidth);controlVolumeElapsed.element.css("width",elapsedWidth);}});
;;;
var SilverlightVideoPlayer=Class.create();SilverlightVideoPlayer.HasSupport=function(){var isInstalled=false;if(Silverlight&&Silverlight.isInstalled){navigator.plugins.refresh();isInstalled=Silverlight.isInstalled("4.0.50401.0");}
if(!isInstalled){return false;}
else{return true;}};Silverlight.CreateDelegate=function(instance,method){return function(){return method.apply(instance,arguments);};};Object.extend(SilverlightVideoPlayer.prototype,VideoPlayer.prototype);Object.extend(SilverlightVideoPlayer.prototype,{Player:null,Loaded:null,TokenPlayStateChanged:null,TokenExpandChanged:null,initialize:function(container){var _self=this;if(Silverlight.isBrowserRestartRequired==null){Silverlight.__startup();}
_self.Player=null;_self.InitializeBase(container);_self.Expand();_self.Loaded=false;_self.CreateElements();},CreateElements:function(){var _self=this;var params="movie="+_self.VideoUrl;params+=", ismute=false";params+=", autoPlay="+(_self.AutoPlay?"true":"false");params+=", continuousPlay=false";if(_self.PreviewUrl!=null){params+=", previewUrl="+_self.PreviewUrl;}
var html=Silverlight.createObject("BeautyOfTheWeb.FullPlayer.xap?v="+siteVersion,null,null,{width:"100%",height:"100%",background:"transparent",alt:_self.GetSilverlightHTMLAlt(),version:"4.0.50401.0",autoUpgrade:"true",isWindowless:"true"},{onError:_self.OnError,onLoad:_self.OnLoad},params,_self);_self.VideoContainer.html(html);var videoPlayer=_self.VideoContainer.find("object");videoPlayer.attr("aria-label","Media player with video titled: "+_self.Title);if(typeof(_self.LabelId)!="undefined"&&_self.LabelId!=null){videoPlayer.attr("aria-describedby",_self.LabelId);}},GetSilverlightHTMLAlt:function(){var _self=this;var getSilverlightMethodCall="javascript:Silverlight.getSilverlight(\"4.0.50401.0\");";var installImageUrl="http://go.microsoft.com/fwlink/?LinkId=161376";var imageAltText="Get Microsoft Silverlight";var altHtml="<a href='{1}' style='text-decoration: none;'>"+"<img src='{2}' alt='{3}' "+"style='border-style: none'/></a>";altHtml=altHtml.replace('{1}',getSilverlightMethodCall);altHtml=altHtml.replace('{2}',installImageUrl);altHtml=altHtml.replace('{3}',imageAltText);return altHtml;},Dispose:function(allowReattach){var _self=this;_self.UnbindEventListeners();_self.Player=null;_self.DisposeBase(allowReattach);},Play:function(e){var _self=this;try{if(_self.Player){_self.Player.Play();}}catch(ex){}},Pause:function(e){var _self=this;try{if(_self.Player){_self.Player.Pause();}}catch(ex){}},Stop:function(e){var _self=this;try{if(_self.Player){_self.Player.Stop();}}catch(ex){}},Mute:function(e){var _self=this;try{if(_self.Player){_self.Player.Mute();}}catch(ex){}},Unmute:function(e){var _self=this;try{if(_self.Player){_self.Player.UnMute();}}catch(ex){}},Expand:function(e){var _self=this;_self.ExpandBase(e);_self.Resize();},Resize:function(e){var _self=this;},OnLoad:function(plugIn,_self,sender){if(sender){var host=sender.getHost();if(host&&host.Content){_self.Player=sender.getHost().Content.Player;_self.BindEventListeners();_self.Loaded=true;}}},BindEventListeners:function(){var _self=this;_self.UnbindEventListeners();if(_self.Player){_self.TokenPlayStateChanged=_self.Player.addEventListener("PlayStateChanged",Silverlight.CreateDelegate(_self,_self.PlayStateChanged));_self.TokenExpandChanged=_self.Player.addEventListener("ExpandChanged",Silverlight.CreateDelegate(_self,_self.OnExpand));}},UnbindEventListeners:function(){var _self=this;if(_self.Player){if(_self.TokenPlayStateChanged!=null){_self.Player.removeEventListener("PlayStateChanged",_self.TokenPlayStateChanged);}
if(_self.TokenExpandChanged!=null){_self.Player.removeEventListener("ExpandChanged",_self.TokenExpandChanged);}}},PlayStateChanged:function(sender,args){var _self=this;if(_self.Player){var playState=args.Result;var position=_self.Player.Position;var duration=_self.Player.Duration;if(playState=="Playing"){_self.OnPlay();}
else if(playState=="Paused"&&parseFloat(position)==parseFloat(duration)){_self.OnEnded();}}},OnPlay:function(){var _self=this;_self.OnPlayBase();},OnEnded:function(){var _self=this;_self.OnEndedBase();},OnExpand:function(sender,args){var _self=this;_self.Expand();},OnError:function(sender,args){var _self=this;var appSource="";if(sender!=null&&sender!=0){appSource=sender.getHost().Source;}
var errorType=args.ErrorType;var iErrorCode=args.ErrorCode;if(errorType=="ImageError"||errorType=="MediaError"){return;}
var errMsg="Unhandled Error in Silverlight Application "+appSource+"\n";errMsg+="Code: "+iErrorCode+"    \n";errMsg+="Category: "+errorType+"       \n";errMsg+="Message: "+args.ErrorMessage+"     \n";if(errorType=="ParserError"){errMsg+="File: "+args.xamlFile+"     \n";errMsg+="Line: "+args.lineNumber+"     \n";errMsg+="Position: "+args.charPosition+"     \n";}
else if(errorType=="RuntimeError"){if(args.lineNumber!=0){errMsg+="Line: "+args.lineNumber+"     \n";errMsg+="Position: "+args.charPosition+"     \n";}
errMsg+="MethodName: "+args.methodName+"     \n";}}});
;;;
var FlashVideoPlayer=Class.create();FlashVideoPlayer.HasSupport=function(){var playerVersion=null;if(typeof swfobject=="function"){swfobject=swfobject();}
if(swfobject&&swfobject.getFlashPlayerVersion){playerVersion=swfobject.getFlashPlayerVersion();}
if(playerVersion==null||playerVersion.major==0){return false;}
else{return true;}};function HandleFlashEvent(eventType,id){var index=parseInt(id);var videoPlayerElement=$("#"+id);if(videoPlayerElement!=null){switch(eventType){case"OnPlay":videoPlayerElement.trigger("OnPlay");break;case"OnEnded":videoPlayerElement.trigger("OnEnded");break;}}}
Object.extend(FlashVideoPlayer.prototype,VideoPlayer.prototype);Object.extend(FlashVideoPlayer.prototype,{Player:null,Loaded:null,initialize:function(container){var _self=this;if(typeof swfobject=="function"){swfobject=swfobject();}
_self.InitializeBase(container);_self.Expand();_self.Loaded=false;_self.CreateElements();},CreateElements:function(){var _self=this;var containerReplaceId=_self.Container.attr("id")+"_replace";var containerReplace=$("<div>").attr("id",containerReplaceId).appendTo(_self.VideoContainer);containerReplace.html("Media player with video titled: "+_self.Title);var swfVersionStr="10.1.0";var xiSwfUrlStr="/assets/swf/playerProductInstall.swf?v="+siteVersion;var flashvars={};flashvars.autoBuffer="true";flashvars.videoURL=_self.VideoUrl;flashvars.autoPlay=_self.AutoPlay?"true":"false";if(_self.PreviewUrl!=null){flashvars.previewURL=_self.PreviewUrl;}
flashvars.id=_self.Container.attr("id");var params={};params.quality="high";params.bgcolor="#ffffff";params.allowscriptaccess="sameDomain";params.allowfullscreen="true";params.wmode="transparent";var attributes={};attributes.align="middle";swfobject.embedSWF("/assets/swf/BeautyOfTheWeb.swf?v="+siteVersion,containerReplaceId,"100%","100%",swfVersionStr,xiSwfUrlStr,flashvars,params,attributes,_self.OnLoad.bind(_self));var videoPlayer=$("#"+containerReplaceId);videoPlayer.attr("aria-label","Media player with video titled: "+_self.Title);if(typeof(_self.LabelId)!="undefined"&&_self.LabelId!=null){videoPlayer.attr("aria-describedby",_self.LabelId);}},Dispose:function(allowReattach){var _self=this;var containerReplaceId=_self.Container.attr("id")+"_replace";swfobject.removeSWF(containerReplaceId);_self.Player=null;_self.DisposeBase(allowReattach);},Play:function(e){var _self=this;try{if(_self.Player){_self.Player.VideoPlay();}}catch(ex){}},Pause:function(e){var _self=this;try{if(_self.Player){_self.Player.VideoPause();}}catch(ex){}},Stop:function(e){var _self=this;try{if(_self.Player){_self.Player.VideoStop();}}catch(ex){}},Mute:function(e){var _self=this;try{if(_self.Player){_self.Player.VideoMute();}}catch(ex){}},Unmute:function(e){var _self=this;try{if(_self.Player){_self.Player.VideoUnmute();}}catch(ex){}},Expand:function(e){var _self=this;_self.ExpandBase(e);_self.Resize();},Resize:function(e){var _self=this;},OnLoad:function(e){var _self=this;if(e.success){_self.Player=e.ref;_self.Loaded=true;}},OnPlay:function(e){var _self=this;_self.OnPlayBase();},OnEnded:function(e){var _self=this;_self.OnEndedBase();}});
;;;
var Tooltip=Class.create();var TooltipArray=[];Tooltip.Attach=function(){$.each($(".hotspot"),function(i,element){if($(element).attr("data-initialized")==null){var tooltip=new Tooltip($(element));TooltipArray.push(tooltip);}});};Tooltip.Detach=function(){for(var i=0;i<TooltipArray.length;i++){var tooltip=TooltipArray[i];tooltip.Dispose();delete tooltip;}
TooltipArray.length=0;};Object.extend(Tooltip.prototype,{ContainerHotspot:null,ContainerTooltip:null,ContainerTooltipClone:null,TooltipSize:null,TooltipEntered:null,HotspotEntered:null,State:null,HideDelayTimeout:null,ShowTimeout:null,Active:null,Animate:null,ImageVisible:null,TooltipClass:null,RemainShown:null,DelayBeforeShow:null,initialize:function(containerHotspot){var _self=this;_self.ContainerHotspot=containerHotspot;_self.ContainerHotspot.attr("data-initialized","true");_self.ContainerTooltip=_self.ContainerHotspot.find(".tooltip").first();_self.ContainerTooltipClone=$("<div>").css("position","absolute").css("z-index",100).attr("aria-live","polite").attr("aria-atomic","true").attr("aria-busy","true").appendTo($(document.body));DisableSelection(_self.ContainerTooltipClone);_self.TooltipSize={x:0,y:0,relativex:asInt(_self.ContainerTooltip.css("left")),relativey:asInt(_self.ContainerTooltip.css("top"))};_self.State="hidden";_self.TooltipEntered=false;_self.HotspotEntered=false;_self.Active=true;_self.Animate=true;_self.ImageVisible=true;_self.TooltipClass=null;_self.RemainShown=false;_self.DelayBeforeShow=0;if(_self.ContainerHotspot.attr("data-active")!=null&&_self.ContainerHotspot.attr("data-active").toLowerCase()=="false"){_self.Active=false;}
if(_self.ContainerHotspot.attr("data-animate")!=null&&_self.ContainerHotspot.attr("data-animate").toLowerCase()=="false"){_self.Animate=false;}
if(_self.ContainerHotspot.attr("data-image-visible")!=null&&_self.ContainerHotspot.attr("data-image-visible").toLowerCase()=="false"){_self.ImageVisible=false;}
if(_self.ContainerHotspot.attr("data-tooltip-class")!=null&&_self.ContainerHotspot.attr("data-tooltip-class")!=""){_self.TooltipClass=_self.ContainerHotspot.attr("data-tooltip-class");}
if(_self.ContainerHotspot.attr("data-remain-shown")!=null&&_self.ContainerHotspot.attr("data-remain-shown").toLowerCase()=="true"){_self.RemainShown=true;}
if(_self.ContainerHotspot.attr("data-delay-before-show")!=null&&_self.ContainerHotspot.attr("data-delay-before-show")!=""){_self.DelayBeforeShow=parseFloat(_self.ContainerHotspot.attr("data-delay-before-show"));}
if(_self.ImageVisible==true){_self.ContainerHotspot.addClass("hotspot_image");}
if(_self.TooltipClass==null){_self.ContainerTooltip.addClass("tooltip_background");}
else{_self.ContainerTooltip.addClass(_self.TooltipClass);}
_self.BindEvents();},Dispose:function(){var _self=this;_self.ContainerHotspot.attr("data-initialized","false");_self.ContainerHotspot.removeClass("hotspot_image");_self.ContainerTooltip.removeClass("tooltip_background");_self.ContainerTooltip.removeClass(_self.TooltipClass);_self.UnbindEvents();_self.ContainerHotspot.unbind();_self.ContainerTooltip.unbind();_self.ContainerTooltipClone.remove();_self.ContainerHotspot=null;_self.ContainerTooltip=null;},BindEvents:function(){var _self=this;_self.UnbindEvents();_self.ContainerHotspot.bind("toggle",_self.ToggleRequest.bind(_self)).bind("show",_self.ShowRequest.bind(_self)).bind("hide",_self.HideRequest.bind(_self));DisableSelection(_self.ContainerHotspot);_self.BindMouseEvents();},UnbindEvents:function(){var _self=this;_self.ContainerHotspot.unbind("toggle",_self.ToggleRequest.bind(_self)).unbind("show",_self.ShowRequest.bind(_self)).unbind("hide",_self.HideRequest.bind(_self));_self.UnbindMouseEvents();},OnClick:function(e){e.preventDefault();},BindMouseEvents:function(){var _self=this;_self.UnbindMouseEvents();if(_self.Active){_self.ContainerHotspot.bind("click",_self.OnHotspotEnter.bind(_self)).bind("mouseover",_self.OnHotspotEnter.bind(_self)).bind("keydown",_self.OnKeydown.bind(_self)).attr("tabindex","0").attr("onclick","");if(!_self.RemainShown){_self.ContainerHotspot.bind("blur",_self.OnHotspotLeave.bind(_self)).bind("mouseleave",_self.OnHotspotLeave.bind(_self));}}},UnbindMouseEvents:function(){var _self=this;_self.ContainerHotspot.unbind("click",_self.OnHotspotEnter.bind(_self)).unbind("mouseover",_self.OnHotspotEnter.bind(_self)).unbind("blur",_self.OnHotspotLeave.bind(_self)).unbind("mouseleave",_self.OnHotspotLeave.bind(_self)).unbind("keydown",_self.OnKeydown.bind(_self));},OnKeydown:function(e){var _self=this;switch(e.keyCode){case 13:case 32:$(e.currentTarget).trigger("click");e.preventDefault();break;}},Show:function(autoHide,delayBeforeShow){var _self=this;if(_self.ContainerHotspot==null){return;}
if(autoHide===null||autoHide===undefined){autoHide=false;}
if(delayBeforeShow===null||delayBeforeShow===undefined){delayBeforeShow=0;}
_self.State="showing";_self.ContainerHotspot.triggerHandler("onshow",[_self.ContainerHotspot]);_self.CreateTooltipClone();var x=_self.TooltipSize.x;var y=_self.TooltipSize.y;if(_self.ContainerTooltipClone!=null){_self.ContainerTooltipClone.attr("aria-busy","true");}
if(_self.Animate){if(_self.ContainerTooltipClone!=null){_self.ContainerTooltipClone.css("visibility","visible").css("top",y+50).css("left",x);_self.ContainerTooltipClone.css("opacity",0);if(delayBeforeShow>0){_self.ContainerTooltipClone.wait(delayBeforeShow);}
_self.ContainerTooltipClone.animate({opacity:(Modernizr.canvas?1:"auto"),top:y},{queue:true,duration:500,easing:EasingTypes.OutBack,complete:function(){_self.State="shown";_self.ContainerTooltipClone.attr("aria-busy","false");if(autoHide===true){_self.HideAfterDelay();}}});}}
else{if(_self.ContainerTooltipClone!=null){_self.ContainerTooltipClone.css("visibility","visible").css("top",y).css("left",x);if(Modernizr.canvas){_self.ContainerTooltipClone.css("opacity",1);}
_self.ContainerTooltipClone.attr("aria-busy","false");}
_self.State="shown";}},HideAfterDelay:function(){var _self=this;if(_self.ContainerHotspot==null){return;}
if(_self.State=="shown"&&_self.HotspotEntered==false&&_self.TooltipEntered==false){window.clearTimeout(_self.HideDelayTimeout);_self.HideDelayTimeout=window.setTimeout(function(){if(_self.State=="shown"&&_self.HotspotEntered==false&&_self.TooltipEntered==false){_self.Hide();}},50);}},Hide:function(){var _self=this;if(_self.ContainerHotspot==null){return;}
_self.State="hiding";if(_self.ContainerTooltipClone!=null){_self.ContainerTooltipClone.attr("aria-busy","true");}
_self.ContainerHotspot.triggerHandler("onhide",[_self.ContainerHotspot]);var x=_self.TooltipSize.x;var y=_self.TooltipSize.y;if(_self.Animate){if(_self.ContainerTooltipClone!=null){_self.ContainerTooltipClone.css("top",y).css("left",x);if(Modernizr.canvas){_self.ContainerTooltipClone.css("opacity",1);}
_self.ContainerTooltipClone.animate({opacity:(Modernizr.canvas?0:"auto"),top:y-50},{queue:true,duration:500,easing:EasingTypes.InBack,complete:function(){_self.RemoveTooltipClone();_self.State="hidden";_self.ContainerTooltipClone.attr("aria-busy","true");}});}}
else{if(_self.ContainerTooltipClone!=null){_self.RemoveTooltipClone();_self.ContainerTooltipClone.attr("aria-busy","true");}
_self.State="hidden";}},ToggleRequest:function(e,shownDuration){var _self=this;if(_self.State=="hidden"){_self.ShowRequest(e,shownDuration);}
else if(_self.State=="shown"){_self.HideRequest(e);}},ShowRequest:function(e,shownDuration,delayBeforeShow){var _self=this;if(delayBeforeShow===null||delayBeforeShow===undefined){delayBeforeShow=_self.DelayBeforeShow;}
_self.Show(false,delayBeforeShow);if(shownDuration!=null){window.clearTimeout(_self.ShowTimeout);_self.ShowTimeout=window.setTimeout(_self.Hide.bind(_self),shownDuration);}},HideRequest:function(e){var _self=this;window.clearTimeout(_self.ShowTimeout);_self.Hide();},OnHotspotEnter:function(e){var _self=this;if(_self.ContainerHotspot==null){return;}
_self.HotspotEntered=true;if(_self.State=="hidden"){_self.Show(true,_self.DelayBeforeShow);}},OnHotspotLeave:function(e){var _self=this;if(_self.ContainerHotspot==null){return;}
_self.HotspotEntered=false;_self.HideAfterDelay();},OnTooltipEnter:function(e){var _self=this;if(_self.ContainerHotspot==null){return;}
_self.TooltipEntered=true;},OnTooltipLeave:function(e){var _self=this;if(_self.ContainerHotspot==null){return;}
_self.TooltipEntered=false;_self.HideAfterDelay();},CreateTooltipClone:function(){var _self=this;if(_self.ContainerHotspot==null){return;}
_self.RemoveTooltipClone();_self.ContainerTooltip.clone().css("visibility","visible").css("margin-left",0).css("left",0).css("top",0).appendTo(_self.ContainerTooltipClone);var position=_self.ContainerHotspot.getAbsolutePosition(_self.TooltipSize.relativex,_self.TooltipSize.relativey);_self.TooltipSize.x=position.x;_self.TooltipSize.y=position.y;_self.ContainerTooltipClone.find(".tooltip_close").bind("click",_self.HideRequest.bind(_self)).bind("keydown",_self.OnKeydown.bind(_self)).attr("tabindex","0").attr("onclick","");if(_self.Active){_self.ContainerTooltipClone.bind("mouseover",_self.OnTooltipEnter.bind(_self)).bind("mouseleave",_self.OnTooltipLeave.bind(_self));}},RemoveTooltipClone:function(){var _self=this;if(_self.ContainerTooltipClone!=null){_self.ContainerTooltipClone.empty();}},ToString:function(functionName){var _self=this;if(_self.ContainerHotspot==null){return;}
var str="Function: "+functionName+"<br>"+"State: "+_self.State+"<br>"+"TooltipEntered:"+_self.TooltipEntered+"<br>"+"HotspotEntered:"+_self.HotspotEntered;}});
;;;
var Slider=Class.create();Object.extend(Slider.prototype,{Container:null,ControlContainer:null,Controls:null,Interval:null,MinValue:null,MaxValue:null,Width:null,Height:null,HandleImage:null,HandleWidth:null,HandleHeight:null,ShowRail:null,OnChange:null,Value:null,ElementDragging:null,initialize:function(params){var _self=this;_self.Value=params.initialValue;_self.Interval=params.interval;_self.MinValue=params.min;_self.MaxValue=params.max;_self.Width=params.width;_self.Height=params.height;_self.HandleImage=params.handleImage;_self.HandleWidth=params.handleWidth;_self.HandleHeight=params.handleHeight;_self.ShowRail=params.showRail;_self.Container=params.container;_self.OnChange=params.onchange;_self.CreateElements();_self.BindEvents();_self.SetValue(_self.Value);_self.UpdateSliderRail();},CreateElements:function(){var _self=this;_self.Container.attr("role","slider");DisableSelection(_self.Container);_self.ControlContainer=$("<div>").css("position","absolute").appendTo(_self.Container);_self.Controls={};_self.Controls["slider_total"]={className:"video_total",x:0,y:0,w:_self.Width,h:_self.Height};_self.Controls["slider_elapsed"]={className:"video_elapsed",x:1,y:1,w:0,h:_self.Height};_self.Controls["slider_handle"]={className:"slider_handle",x:1,y:0,w:_self.HandleWidth,h:_self.HandleHeight};$.each(_self.Controls,function(name,control){control.element=$("<span>").addClass(control.className).css("top",control.y).css("left",control.x).css("width",control.w).css("height",control.h).appendTo(_self.ControlContainer);if(control.className.indexOf("slider_handle")>=0){var y=(_self.Height-control.h)*0.5+control.y;control.element.css("top",y);if(_self.HandleImage!=null){control.element.css("background","url("+_self.HandleImage+")");}
control.element.attr("tabindex",0).attr("onclick","");}
else if(_self.ShowRail==false){control.element.css("background","transparent").css("border","1px solid transparent");}});},BindEvents:function(){var _self=this;_self.UnbindEvents();_self.Controls["slider_total"].element.bind("mousedown",{type:"slider_handle"},_self.StartDrag.bind(_self));_self.Controls["slider_elapsed"].element.bind("mousedown",{type:"slider_handle"},_self.StartDrag.bind(_self));_self.Controls["slider_handle"].element.bind("mousedown",{type:"slider_handle"},_self.StartDrag.bind(_self));_self.Controls["slider_handle"].element.bind("keydown",_self.OnKeydown.bind(_self));},UnbindEvents:function(){var _self=this;_self.Controls["slider_total"].element.unbind("mousedown");_self.Controls["slider_elapsed"].element.unbind("mousedown");_self.Controls["slider_handle"].element.unbind("mousedown");_self.Controls["slider_handle"].element.unbind("keydown");},OnKeydown:function(e){var _self=this;switch(e.keyCode){case 13:$(e.currentTarget).trigger("click");e.preventDefault();break;case 37:var newValue=_self.Value-_self.Interval;_self.SetValue(newValue);e.preventDefault();break;case 39:var newValue=_self.Value+_self.Interval;_self.SetValue(newValue);e.preventDefault();break;}},StartDrag:function(e){var _self=this;var type=e.data.type;AttachDragEvents(_self.MoveDrag.bind(_self),_self.StopDrag.bind(_self));_self.ElementDragging=type;_self.MoveDrag(e);},StopDrag:function(e){var _self=this;DetachDragEvents();_self.ElementDragging=null;},MoveDrag:function(e){var _self=this;if(_self.ElementDragging!=null){var mousePosition=GetMousePosition(e);if(_self.ElementDragging=="slider_handle"){_self.SliderClick(mousePosition);}}},SliderClick:function(mousePosition){var _self=this;var controlSliderTotal=_self.Controls["slider_total"];var position=controlSliderTotal.element.getRelativePosition(mousePosition.x,mousePosition.y);var ratio=position.x/controlSliderTotal.w;var value=ratio*(_self.MaxValue-_self.MinValue)+_self.MinValue;_self.SetValue(value);},SetValue:function(value){var _self=this;if(value>_self.MaxValue){value=_self.MaxValue;}
else if(value<_self.MinValue){value=_self.MinValue;}
_self.Value=asInt(value/_self.Interval)*_self.Interval;_self.UpdateSliderRail();if(_self.OnChange!=null){_self.OnChange(_self.Value);}},UpdateSliderRail:function(){var _self=this;var controlSliderTotal=_self.Controls["slider_total"];var controlSliderHandle=_self.Controls["slider_handle"];var controlSliderElapsed=_self.Controls["slider_elapsed"];var ratio=(_self.Value-_self.MinValue)/(_self.MaxValue-_self.MinValue);var totalWidth=controlSliderTotal.w-controlSliderHandle.w;var elapsedWidth=totalWidth*ratio;controlSliderHandle.element.css("left",controlSliderHandle.x+elapsedWidth);controlSliderElapsed.element.css("width",elapsedWidth);}});
;;;;;;
