if(typeof(AC)=="undefined"){AC={}}Object.extend(Event,{_domReady:function(){if(arguments.callee.done){return
}arguments.callee.done=true;if(this._timer){clearInterval(this._timer)}AC.isDomReady=true;
if(this._readyCallbacks){this._readyCallbacks.each(function(a){a()})}this._readyCallbacks=null
},onDOMReady:function(b){if(AC.isDomReady){b()}else{if(!this._readyCallbacks){var a=this._domReady.bind(this);
if(document.addEventListener){document.addEventListener("DOMContentLoaded",a,false)
}if(document.all){document.onreadystatechange=function(){if(this.readyState=="complete"){a()
}}}if(/WebKit/i.test(navigator.userAgent)){this._timer=setInterval(function(){if(/loaded|complete/.test(document.readyState)){a()
}},10)}Event.observe(window,"load",a);Event._readyCallbacks=[]}Event._readyCallbacks.push(b)
}}});AC.decorateSearchInput=function(m,t){var r=$(m);var g=null;var f=0;var n="";
var l="";if(t){if(t.results){f=t.results}if(t.placeholder){n=t.placeholder}if(t.autosave){l=t.autosave
}}if(AC.Detector.isWebKit()){if(AC.Detector.isWin()){r.addClassName("not-round")
}r.setAttribute("type","search");if(!r.getAttribute("results")){r.setAttribute("results",f)
}if(null!=n){r.setAttribute("placeholder",n);r.setAttribute("autosave",l)}}else{r.setAttribute("autocomplete","off");
g=document.createElement("input");r.parentNode.replaceChild(g,r);var d=document.createElement("span");
Element.addClassName(d,"left");var o=document.createElement("span");Element.addClassName(o,"right");
var j=document.createElement("div");Element.addClassName(j,"reset");var a=document.createElement("div");
Element.addClassName(a,"search-wrapper");var h=m.value==n;var e=m.value.length==0;
if(h||e){r.value=n;Element.addClassName(a,"blurred");Element.addClassName(a,"empty")
}a.appendChild(d);a.appendChild(r);a.appendChild(o);a.appendChild(j);var q=function(){var u=Element.hasClassName(a,"blurred");
if(r.value==n&&u){r.value=""}Element.removeClassName(a,"blurred")};Event.observe(r,"focus",q);
var c=function(){if(r.value==""){Element.addClassName(a,"empty");r.value=n}Element.addClassName(a,"blurred")
};Event.observe(r,"blur",c);var b=function(){if(r.value.length>=0){Element.removeClassName(a,"empty")
}};Event.observe(r,"keydown",b);var p=function(){return(function(u){var v=false;
if(u.type=="keydown"){if(u.keyCode!=27){return}else{v=true}}r.blur();r.value="";
Element.addClassName(a,"empty");r.focus()})};Event.observe(j,"mousedown",p());Event.observe(r,"keydown",p());
if(g){g.parentNode.replaceChild(a,g)}}};Element.addMethods({getInnerDimensions:function(c){c=$(c);
var f=Element.getDimensions(c);var e=f.height;var b=Element.getStyle;e-=b(c,"border-top-width")&&b(c,"border-top-width")!="medium"?parseInt(b(c,"border-top-width"),10):0;
e-=b(c,"border-bottom-width")&&b(c,"border-bottom-width")!="medium"?parseInt(b(c,"border-bottom-width"),10):0;
e-=b(c,"padding-top")?parseInt(b(c,"padding-top"),10):0;e-=b(c,"padding-bottom")?parseInt(b(c,"padding-bottom"),10):0;
var a=f.width;a-=b(c,"border-left-width")&&b(c,"border-left-width")!="medium"?parseInt(b(c,"border-left-width"),10):0;
a-=b(c,"border-right-width")&&b(c,"border-right-width")!="medium"?parseInt(b(c,"border-right-width"),10):0;
a-=b(c,"padding-left")?parseInt(b(c,"padding-left"),10):0;a-=b(c,"padding-right")?parseInt(b(c,"padding-right"),10):0;
return{width:a,height:e}},getOuterDimensions:function(b){b=$(b);var h=b.cloneNode(true);
var c=(b.parentNode)?b.parentNode:document.body;c.appendChild(h);Element.setStyle(h,{position:"absolute",visibility:"hidden"});
var g=Element.getDimensions(h);var e=g.height;var a=Element.getStyle;e+=a(h,"margin-top")?parseInt(a(h,"margin-top"),10):0;
e+=a(h,"margin-bottom")?parseInt(a(h,"margin-bottom"),10):0;var f=g.width;f+=a(h,"margin-left")?parseInt(a(h,"margin-left"),10):0;
f+=a(h,"margin-right")?parseInt(a(h,"margin-right"),10):0;Element.remove(h);return{width:f,height:e}
},translateOffset:function(b){var a,d,c=null;a=b.getStyle("transform");if(!a){a=b.getStyle("webkitTransform")
}if(!a){a=b.getStyle("MozTransform")}if(!a){a=b.getStyle("msTransform")}if(!a){a=b.getStyle("oTransform")
}if(a){d=a.match(/.*(translate|translate3d|translateZ|translateX|translateY)\(([^)]+).*/);
if(d){c=[];switch(d[1]){case"translateX":c[0]=parseInt(d[2]);c[1]=0;break;case"translateY":c[1]=parseInt(d[2]);
c[0]=0;break;case"translateZ":c[2]=parseInt(d[2]);c[0]=0;c[1]=0;break;default:c=d[2].split(/,\s*/);
if(typeof c[0]!=="undefined"){c[0]=parseInt(c[0])}if(typeof c[1]!=="undefined"){c[1]=parseInt(c[1])
}if(typeof c[2]!=="undefined"){c[2]=parseInt(c[2])}break}c.type=d[1];c.x=c[0];c.y=c[1];
c.z=c[2]}else{d=a.match(/.*(matrix)\(([^)]+).*/);if(d!==null){d=a.match(/.*(matrix)\(([^)]+).*/)[2].split(", ");
c=[parseFloat(d[4]),parseFloat(d[5])];c.type="matrix";c.x=c[0];c.y=c[1];c.z=null
}}}return c},removeAllChildNodes:function(a){a=$(a);if(!a){return}while(a.hasChildNodes()){a.removeChild(a.lastChild)
}},setVendorPrefixStyle:function(c,f,e){if(f.match(/^webkit/i)){f=f.replace(/^webkit/i,"")
}else{if(f.match(/^moz/i)){f=f.replace(/^moz/i,"")}else{if(f.match(/^ms/i)){f=f.replace(/^ms/i,"")
}else{if(f.match(/^o/i)){f=f.replace(/^o/i,"")}else{if(f.match("-")){var b=f.split("-"),d=b.length;
f="";for(var a=0;a<b.length;a++){f+=b[a].charAt(0).toUpperCase()+b[a].slice(1)}}else{f=f.charAt(0).toUpperCase()+f.slice(1)
}}}}}if(e.match("-webkit-")){e=e.replace("-webkit-","-vendor-")}else{if(e.match("-moz-")){e=e.replace("-moz-","-vendor-")
}else{if(e.match("-ms-")){e=e.replace("-ms-","-vendor-")}else{if(e.match("-o-")){e=e.replace("-o-","-vendor-")
}}}}c.style["webkit"+f]=e.replace("-vendor-","-webkit-");c.style["Moz"+f]=e.replace("-vendor-","-moz-");
c.style["ms"+f]=e.replace("-vendor-","-ms-");c.style["O"+f]=e.replace("-vendor-","-o-");
c.style[f]=e;f=f.charAt(0).toLowerCase()+f.slice(1);c.style[f]=e},setVendorPrefixTransform:function(b,a,c){if(a=="none"){b.setVendorPrefixStyle("transform","none");
return}if(a==null){a=0}if(c==null){c=0}if(AC.Detector.supportsThreeD()){b.setVendorPrefixStyle("transform","translate3d("+a+", "+c+", 0)")
}else{b.setVendorPrefixStyle("transform","translate("+a+", "+c+")")}},addVendorEventListener:function(b,c,d,a){if(typeof(addEventListener)=="function"){if(c.match(/^webkit/i)){c=c.replace(/^webkit/i,"")
}else{if(c.match(/^moz/i)){c=c.replace(/^moz/i,"")}else{if(c.match(/^ms/i)){c=c.replace(/^ms/i,"")
}else{if(c.match(/^o/i)){c=c.replace(/^o/i,"")}else{c=c.charAt(0).toUpperCase()+c.slice(1)
}}}}if(/WebKit/i.test(navigator.userAgent)){b.addEventListener("webkit"+c,d,a)}else{if(/Opera/i.test(navigator.userAgent)){b.addEventListener("O"+c,d,a)
}else{if(/Gecko/i.test(navigator.userAgent)){b.addEventListener(c.toLowerCase(),d,a)
}else{c=c.charAt(0).toLowerCase()+c.slice(1);return b.addEventListener(c,d,a)}}}}},removeVendorEventListener:function(b,c,d,a){if(typeof(removeEventListener)=="function"){if(c.match(/^webkit/i)){c=c.replace(/^webkit/i,"")
}else{if(c.match(/^moz/i)){c=c.replace(/^moz/i,"")}else{if(c.match(/^ms/i)){c=c.replace(/^ms/i,"")
}else{if(c.match(/^o/i)){c=c.replace(/^o/i,"")}else{c=c.charAt(0).toUpperCase()+c.slice(1)
}}}}b.removeEventListener("webkit"+c,d,a);b.removeEventListener("O"+c,d,a);b.removeEventListener(c.toLowerCase(),d,a);
c=c.charAt(0).toLowerCase()+c.slice(1);return b.removeEventListener(c,d,a)}}});
window.addVendorEventListener=function(b,c,a){Element.Methods.addVendorEventListener(window,b,c,a)
};window.removeVendorEventListener=function(b,c,a){Element.Methods.removeVendorEventListener(window,b,c,a)
};Element.Methods.childNodeWithNodeTypeAtIndex=function(d,a,b){var e=d.firstChild;
if(!e){return null}var c=0;while(e){if(e.nodeType===a){if(b===c){return e}c++}e=e.nextSibling
}return null};var Element2={};Element2.Methods=Object.clone(Element.Methods);if(typeof(AC.Tracking)=="undefined"){AC.Tracking={}
}AC.Tracking.getLinkClicked=function(a){if(!a){return null}while(a.nodeName.toLowerCase()!="a"&&a.nodeName.toLowerCase()!="body"){a=a.parentNode
}if(!a.href){a=null}return a};AC.Tracking.trackLinksWithin=function(a,e,d,c,b){$(a).observe("mousedown",function(f){var h=AC.Tracking.getLinkClicked(Event.element(f));
if(h&&e(h)){if(b&&b.beforeTrack){var g=b.beforeTrack(h,d,c);if(g){d=g.title;c=g.properties
}}AC.Tracking.trackClick(c,this,"o",d)}})};AC.Tracking.tagLinksWithin=function(a,b,c,d){$(a).observe("mousedown",function(e){var f=Event.element(e);
if(!f){return}while(f.nodeName.toLowerCase()!="a"&&f.nodeName.toLowerCase()!="body"){f=f.parentNode
}if(f.href&&d(f)){AC.Tracking.tagLink(f,b,c)}f=null})};AC.Tracking.tagLink=function(c,b,d){var a=c.getAttribute("href");
if(a.match(/\?/)){var e=a.toQueryParams();e[b]=d;a=a.split(/\?/)[0]+"?"+$H(e).toQueryString()
}else{a+="?"+b+"="+d}c.setAttribute("href",a)};AC.Tracking.s_vi=function(){var d=document.cookie.split(";"),e=null,a;
for(var c=0,b;(b=d[c]);c++){a=b.match(/^\s*s_vi=\[CS\]v1\|(.+)\[CE\]\s*$/);if(a){e=a[1];
break}}return e};AC.Tracking.track=function(f,d,b){if(typeof(s_gi)=="undefined"||!s_gi){return
}b=b||{};if(typeof(s_account)!="undefined"){s=s_gi(s_account)}else{if(b.s_account){s=s_gi(b.s_account)
}else{return}}if(f==s.tl){var a="";for(var c in d){a+=c+","}a=a.replace(/,$/,"");
s.linkTrackVars=a}else{s.linkTrackVars=""}s.prop4="";s.g_prop4="";s.prop6="";s.g_prop6="";
s.pageURL="";s.g_pageURL="";s.g_channel="";var e=function(g){if(typeof(g)=="string"){return g.replace(/[\'\"\ì\î\ë\í]/g,"")
}else{return g}};for(var c in d){s[c]=e(d[c]);if(c=="events"){s.linkTrackEvents=e(d[c])
}}if(f==s.t){void (s.t())}else{s.tl(b.obj,b.linkType,e(b.title))}for(var c in d){if(c!="pageName"){s[c]=""
}if(c=="events"){s.linkTrackEvents="None"}}},AC.Tracking.trackClick=function(c,d,a,e,b){var b={obj:d,linkType:a,title:e};
AC.Tracking.track(s.tl,c,b)},AC.Tracking.trackPage=function(b,a){AC.Tracking.track(s.t,b,a)
};String.prototype.lastPathComponent=function(){var a=this.lastIndexOf("/");if(a!=-1){return this.substring(a+1,this.length-1)
}else{return null}};String.prototype.stringByDeletingLastPathComponent=function(){var a=this.lastIndexOf("/");
if(a!=-1){return this.slice(0,a)}else{return null}};String.prototype.stringByAppendingPathComponent=function(a){return(this.lastIndexOf("/")!==(this.length-1))?(this+"/"+a):(this+a)
};String.prototype.stringByRemovingPrefix=function(c){var b=this.indexOf(c);if(b>-1){var a=this.substring(b+c.length,this.length);
return a}else{return this}};String.prototype.pathExtension=function(){var b=this.lastPathComponent();
var a=b.lastIndexOf(".");if(a!=-1){return b.slice(a,b.length)}else{return""}};Array.prototype.addObjectsFromArray=function(c){if(c.constructor===Array){this.push.apply(this,c)
}else{for(var a=0,b;(b=c[a]);a++){this[this.length]=b}}};Array.prototype.item=function(a){return this[a]
};document._importNode=function(g,b){if(g.nodeType===Node.ELEMENT_NODE){var e=document.createElement(g.nodeName);
var d,c;if(g.attributes&&g.attributes.length>0){var h=g.attributes}var f,a;for(d=0,c=g.attributes.length;
d<c;){f=h[d].nodeName;a=g.getAttribute(h[d++].nodeName);if(f==="class"){e.setAttribute("className",a)
}e.setAttribute(f,a)}if(b&&g.childNodes&&g.childNodes.length>0){for(d=0,c=g.childNodes.length;
d<c;d++){if(e.tagName==="NOSCRIPT"){continue}e.appendChild(document._importNode(g.childNodes[d],b))
}}return e}else{if(g.nodeType===Node.TEXT_NODE){return document.createTextNode(g.nodeValue)
}else{if(g.nodeType===Node.COMMENT_NODE){return document.createComment(g.nodeValue)
}else{if(g.nodeType===Node.CDATA_SECTION_NODE){return document.createCDATASection(g.nodeValue)
}else{return null}}}}};if(!document.importNode){document.importNode=document._importNode
}if(typeof document.head=="undefined"){document.head=document.getElementsByTagName("head")[0]
}if(AC.Detector.isIEStrict()){Element.Methods.hasAttribute=function(c,b){if(b=="class"){b="className"
}else{if(b=="for"){b="htmlFor"}}var a=c.getAttribute(b);return((a!=null)&&(a!==""))
};document._getElementsByName=document.getElementsByName;document._HTMLElementsWithName=["a","apple","button","form","frame","iframe","img","input","object","map","meta","param","textarea","select"];
document.getElementsByName=function(d){var c=this._HTMLElementsWithName;var a=[],b,g,h;
for(var j=0,f;(f=c[j]);j++){b=document.getElementsByTagName(f);for(g=0;(h=b[g]);
g++){if(h.name===d){a[a.length]=h}}}return a}}if(typeof JSON=="undefined"||!("stringify" in JSON&&"parse" in JSON)){if(!this.JSON){this.JSON={}
}(function(){function f(n){return n<10?"0"+n:n}if(typeof Date.prototype.toJSON!=="function"){Date.prototype.toJSON=function(key){return isFinite(this.valueOf())?this.getUTCFullYear()+"-"+f(this.getUTCMonth()+1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"Z":null
};String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(key){return this.valueOf()
}}var cx=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,escapable=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,gap,indent,meta={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},rep;
function quote(string){escapable.lastIndex=0;return escapable.test(string)?'"'+string.replace(escapable,function(a){var c=meta[a];
return typeof c==="string"?c:"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)
})+'"':'"'+string+'"'}function str(key,holder){var i,k,v,length,mind=gap,partial,value=holder[key];
if(value&&typeof value==="object"&&typeof value.toJSON==="function"){value=value.toJSON(key)
}if(typeof rep==="function"){value=rep.call(holder,key,value)}switch(typeof value){case"string":return quote(value);
case"number":return isFinite(value)?String(value):"null";case"boolean":case"null":return String(value);
case"object":if(!value){return"null"}gap+=indent;partial=[];if(Object.prototype.toString.apply(value)==="[object Array]"){length=value.length;
for(i=0;i<length;i+=1){partial[i]=str(i,value)||"null"}v=partial.length===0?"[]":gap?"[\n"+gap+partial.join(",\n"+gap)+"\n"+mind+"]":"["+partial.join(",")+"]";
gap=mind;return v}if(rep&&typeof rep==="object"){length=rep.length;for(i=0;i<length;
i+=1){k=rep[i];if(typeof k==="string"){v=str(k,value);if(v){partial.push(quote(k)+(gap?": ":":")+v)
}}}}else{for(k in value){if(Object.hasOwnProperty.call(value,k)){v=str(k,value);
if(v){partial.push(quote(k)+(gap?": ":":")+v)}}}}v=partial.length===0?"{}":gap?"{\n"+gap+partial.join(",\n"+gap)+"\n"+mind+"}":"{"+partial.join(",")+"}";
gap=mind;return v}}if(typeof JSON.stringify!=="function"){JSON.stringify=function(value,replacer,space){var i;
gap="";indent="";if(typeof space==="number"){for(i=0;i<space;i+=1){indent+=" "}}else{if(typeof space==="string"){indent=space
}}rep=replacer;if(replacer&&typeof replacer!=="function"&&(typeof replacer!=="object"||typeof replacer.length!=="number")){throw new Error("JSON.stringify")
}return str("",{"":value})}}if(typeof JSON.parse!=="function"){JSON.parse=function(text,reviver){var j;
function walk(holder,key){var k,v,value=holder[key];if(value&&typeof value==="object"){for(k in value){if(Object.hasOwnProperty.call(value,k)){v=walk(value,k);
if(v!==undefined){value[k]=v}else{delete value[k]}}}}return reviver.call(holder,key,value)
}text=String(text);cx.lastIndex=0;if(cx.test(text)){text=text.replace(cx,function(a){return"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)
})}if(/^[\],:{}\s]*$/.test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,""))){j=eval("("+text+")");
return typeof reviver==="function"?walk({"":j},""):j}throw new SyntaxError("JSON.parse")
}}}())}["abbr","article","aside","command","details","figcaption","figure","footer","header","hgroup","mark","meter","nav","output","progress","section","summary","time"].each(function(a){document.createElement(a)
});AC.Storage={options:{allowCookies:false,useIEFallback:true,daysBeforeExpiring:365,saveTypeMetadata:false},setOption:function(a,b){return this.options[a]=b
},storageType:function(a){a=parseFloat(a);if(a===0&&AC.Detector.hasSessionStorage()){return this.item.types.s
}else{if(AC.Detector.hasLocalStorage()){return this.item.types.l}else{if(!!this.options.useIEFallback&&this.IE.canAddBehavior()){return this.item.types.u
}else{if(!!this.options.allowCookies&&AC.Detector.hasCookies()){return this.item.types.c
}}}}return null},setItem:function(b,d,g,a){if(b==""){return false}g=parseFloat(g);
if(isNaN(g)){g=null}if(typeof g=="undefined"||g===null){g=this.options.daysBeforeExpiring
}if(typeof a!=="object"){a={}}switch(this.storageType(g)){case this.item.types.l:if(g===0){g=1
}try{a.days=g;if(this.options.saveTypeMetadata){a.type="l"}localStorage.setItem(b,this.item.create(d,a));
return d}catch(c){try{console.warn(c)}catch(f){}return false}break;case this.item.types.s:try{a.days=0;
if(this.options.saveTypeMetadata){a.type="s"}sessionStorage.setItem(b,this.item.create(d,a));
return d}catch(c){try{console.warn(c)}catch(f){}return false}break;case this.item.types.u:return this.IE.setItem(b,d,g,a);
break;case this.item.types.c:return this.cookie.setItem(b,d,g);break}},getItem:function(a){if(this.hasExpired(a)){this.removeItem(a);
return null}var b=this.getItemObject(a);if(b===null||typeof b==="undefined"){return null
}else{if(typeof b==="object"&&"value" in b){return b.value}else{return b}}},getItemObject:function(a){var c,b;
if(AC.Detector.hasLocalStorage()){b=localStorage.getItem(a);c=this.item.read(b);
if(c!==null&&typeof c!="undefined"){return c}}if(AC.Detector.hasSessionStorage()){b=sessionStorage.getItem(a);
c=this.item.read(b);if(c!==null&&typeof c!="undefined"){return c}}if(!!this.options.useIEFallback&&this.IE.canAddBehavior()){c=this.IE.getItem(a);
if(c!==null&&typeof c!="undefined"){return c}}if(!!this.options.allowCookies&&AC.Detector.hasCookies()){c=this.cookie.getItem(a);
if(c!==null&&typeof c!="undefined"){return c}}return null},removeItem:function(a){if(AC.Detector.hasLocalStorage()){localStorage.removeItem(a)
}if(AC.Detector.hasSessionStorage()){sessionStorage.removeItem(a)}if(!!this.options.useIEFallback&&this.IE.canAddBehavior()){this.IE.removeItem(a)
}if(!!this.options.allowCookies&&AC.Detector.hasCookies()){this.cookie.removeItem(a)
}return a},createExpirationDate:function(b,a){if(typeof a=="undefined"||!("getHours" in a)){a=new Date()
}a.setTime(a.getTime()+(b*24*60*60*1000));return a.getTime()},getExpirationDate:function(a){var b=this.getItemObject(a);
if(typeof b==="string"||typeof b==="number"){return null}if(b!=null&&typeof b!=="undefined"&&"expires" in b){return new Date(b.expires)
}else{return null}},hasExpired:function(c){if(typeof c=="undefined"||c.length===0){return false
}var b=new Date().getTime();if(AC.Detector.hasLocalStorage()){var a=this.getExpirationDate(c);
if(a!==null&&a.getTime()<b){return true}}return false},removeExpired:function(){if(AC.Detector.hasLocalStorage()){for(i=0;
i<localStorage.length;i++){var a=localStorage.key(i);if(this.hasExpired(a)){this.removeItem(a)
}}return true}return false},item:{roundDatesTo:1000*60*60*24,dateKey:1293868800000,codes:{v:"value",e:"expires",t:"type",r:"roundsDateTo"},types:{l:"localStorage",s:"sessionStorage",u:"#userData",c:"cookies"},create:function(b,a){if(!a){a={}
}var c={},d=this.roundDatesTo;c.v=b;if("roundsDateTo" in a&&!isNaN(a.roundsDateTo)){c.r=a.roundsDateTo;
d=a.roundsDateTo}if("days" in a&&a.days!==0){c.e=Math.round(AC.Storage.createExpirationDate(a.days)/d)-Math.round(this.dateKey/d)
}if("type" in a&&a.type in this.types){c.t=a.type}for(md in a){if(md!=="days"&&md!=="value"&&md!=="expires"&&md!=="type"&&!(md in this.codes)){c[md]=a[md]
}}return JSON.stringify(c)},read:function(c){var a=this.parse(c);if(a==null){return null
}var b={};var d=this.roundDatesTo;for(k in a){if(k in this.codes){if(this.codes[k]=="expires"){if("r" in a){d=a.r
}b[this.codes[k]]=(a[k]*d)+Math.round(this.dateKey/d)*d}else{if(this.codes[k]=="type"){b[this.codes[k]]=this.types[a[k]]
}else{b[this.codes[k]]=a[k]}}}else{b[k]=a[k]}}return b},parse:function(a){try{return JSON.parse(a,function(e,f){var g,c;
if(typeof f==="string"){if(!g){g=/^\"*(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2}(?:\.\d*)?)Z\"*$/.exec(f)
}if(g){return new Date(Date.UTC(+g[1],+g[2]-1,+g[3],+g[4],+g[5],+g[6]))}c=/^\[(.*)\]$/.exec(f);
if(c){return this.parse(f)}}return f}.bind(this))}catch(b){try{console.warn(err)
}catch(b){}return a}}},IE:{setItem:function(c,f,g,b){if(this.canAddBehavior()){var d=this.element();
if(typeof b!=="object"){b={}}var e=AC.Storage.item.create(f,b);d.setAttribute(this.attribute,e);
g=parseFloat(g);if(g===0){g=1}else{if(isNaN(g)){g=AC.Storage.options.daysBeforeExpiring
}}var a=new Date(AC.Storage.createExpirationDate(g));if("toUTCString" in a){d.expires=a.toUTCString()
}d.save(c);return f}return false},getItem:function(a){if(this.canAddBehavior()){var b=this.element();
b.load(a);var d=b.getAttribute(this.attribute);var c=AC.Storage.item.read(d);delete d;
if(c===null||c.toString()===""||c.value===null||c.value.toString()===""||typeof c==="undefined"||typeof c.value==="undefined"){return null
}else{if(typeof c==="object"&&"value" in c){return c.value}else{return c}}}return null
},removeItem:function(a){if(this.canAddBehavior()){var b=this.element();b.load(a);
b.removeAttribute(this.attribute);b.save(a);return true}return false},attribute:"content",canAddBehavior:function(){if("addBehavior" in document.body){var a=this.element();
if("addBehavior" in a&&typeof a!=="undefined"&&"load" in a&&"save" in a){return true
}}return false},_element:null,element:function(){if(this._element===null){this._element=document.createElement("meta");
this._element.setAttribute("name","ac-storage");this._element.style.behavior="url('#default#userData')";
document.head.appendChild(this._element)}return this._element}},cookie:{setItem:function(b,c,d){if(AC.Detector.hasCookies()){if(typeof d=="undefined"||d===null){d=this.options.daysBeforeExpiring
}var a=(d===0)?"":"; expires="+new Date(AC.Storage.createExpirationDate(d)).toUTCString();
document.cookie=cookie=b+"="+c+a+"; path=/";return c}return false},getItem:function(d){var f=d+"=";
var a=document.cookie.split(";");for(var b=0;b<a.length;b++){var e=a[b];while(e.charAt(0)==" "){e=e.substring(1,e.length)
}if(e.indexOf(f)==0){return e.substring(f.length,e.length)}}return null},removeItem:function(a){this.setItem(a,"",-1)
}}};AC.Synthesize={synthesize:function(b){if(typeof b!=="object"){b=this}var c,a;
for(a in b){if(b.hasOwnProperty(a)){if(a.charAt(0)==="_"&&!(a.charAt(1)==="_")){if(typeof b[a]!=="function"){this.__synthesizeGetter(a,b);
this.__synthesizeSetter(a,b)}}}}},__synthesizeGetter:function(a,b){var c=a.slice(1,a.length);
if(typeof b[c]==="undefined"){b[c]=function(){return b[a]}}},__synthesizeSetter:function(a,b){var c=a.slice(1,a.length);
c="set"+c.slice(0,1).toUpperCase()+c.slice(1,c.length);if(typeof b[c]==="undefined"){b[c]=function(d){b[a]=d
}}}};Object.synthesize=function(b){if(typeof b==="object"){Object.extend(b,Object.clone(AC.Synthesize));
b.synthesize();return b}else{try{console.warn("Argument supplied was not a valid object.")
}catch(a){}return b}};
if(typeof(AC)==="undefined"){AC={}}if(typeof(document.event)==="undefined"){document.event={}
}if(Event.Publisher){Object.extend(document.event,Event.Publisher)}AC.SwapView=Class.create({_view:null,currentContent:null,delegate:null,initialize:function(b){if(typeof b==="string"){this._viewId=b
}else{this._view=$(b);this._resetView()}},view:function(){if(!this._view){this._view=$(this._viewId);
this._resetView()}return this._view},_resetView:function(){if(!this._view){return
}var c=this._view.childNodes,d;while(d=c[0]){this._view.removeChild(d)}this._view.addClassName("swapView")
},setDelegate:function(b){this.delegate=b},setContent:function(b){if(b===this.currentContent){return
}if(this.currentContent&&typeof(this.delegate.willClose)==="function"){this.delegate.willClose(this,this.currentContent)
}if(b&&typeof(this.delegate.isContentLoaded)==="function"){if(!this.delegate.isContentLoaded(this,b)){if(typeof(this.delegate.loadContent)==="function"){this.delegate.loadContent(this,b);
return}}}this.setLoadedContent(b)},setLoadedContent:function(d){if(typeof(this.delegate.willShow)==="function"){d=this.delegate.willShow(this,this.currentContent,d)
}var e=true,f;if(typeof(this.delegate.shouldAnimateContentChange)==="function"){e=this.delegate.shouldAnimateContentChange(this,this.currentContent,d)
}if(e&&typeof(this.delegate.willAnimate)==="function"){this.didAnimate=true;if(this.view()&&d&&this.currentContent!==d){this.view().appendChild(d)
}if(typeof(this.delegate.didAppendContent)==="function"){this.delegate.didAppendContent(this,d)
}f=this.delegate.willAnimate(this,this.currentContent,d,this.didShow.bind(this,d))
}else{this.didAnimate=false;if(this.currentContent!==d){if(this.currentContent&&this.currentContent.parentNode){this.currentContent.parentNode.removeChild(this.currentContent)
}if(d){this.view().appendChild(d)}if(typeof(this.delegate.didAppendContent)==="function"){this.delegate.didAppendContent(this,d)
}}if(d){$(d).setOpacity(1)}this.didShow(d)}},didShow:function(b){if(this.currentContent&&(this.currentContent!==b)&&this.currentContent.parentNode){this.currentContent.parentNode.removeChild(this.currentContent)
}if(typeof(this.delegate.didShow)==="function"){this.delegate.didShow(this,this.currentContent,b)
}this.currentContent=b}});if(typeof(AC.ViewMaster)==="undefined"){AC.ViewMaster={}
}AC.ViewMaster.Viewer=Class.create({view:null,triggerClassName:null,currentSection:null,requestedSection:null,sections:null,orderedSections:null,_locked:false,_didShowInitial:false,options:null,initialize:function(w,r,u,o){if(u){this.triggerClassName=u
}this.sections=$H();this.orderedSections=[];this.options=o||{};this.silentPreviousSelection(this.options.silentPreviousSelection);
this.silentFirstSection(this.options.silentFirstSection);this.triggerEvent=this.options.triggerEvent||"click";
var x=null,q,t;if(w){for(t=0;t<w.length;t++){q=this.addSection(w.item(t));if(!x){x=q
}}}this.view=new AC.SwapView(r);this.view.setDelegate(this);var A=document.location.hash,v,y;
this.sectionRegExp=this.options.sectionRegExp||new RegExp(/#(.*)$/);y=A.match(this.sectionRegExp);
if(y&&y[1]){A=y[1]}if(A!==this.view._viewId){var s=document.getElementsByClassName(this.triggerClassName),z;
for(t=0,z;(z=s[t]);t++){if(z.getAttribute("href").match(new RegExp("#"+A+"(?![_w-])"))){v=this.sectionWithId(A);
if(v){x=v}break}}}if(!v&&typeof this.options.initialId==="string"&&this.options.initialId.length>0){x=this.sectionWithId(this.options.initialId)
}this.show(x);this._boundTriggerClicked=this._triggerClicked.bindAsEventListener(this);
if(typeof this.triggerEvent==="object"){for(var t=0,p;p=this.triggerEvent[t];t++){Event.observe(document,p,this._boundTriggerClicked)
}}else{Event.observe(document,this.triggerEvent,this._boundTriggerClicked)}if(AC.Detector.isIEStrict()){Event.observe(document,"mouseup",this._boundTriggerClicked)
}if(this.options.alwaysUseKeyboardNav===true){this.options.useKeyboardNav=true}if(this.options.useKeyboardNav===true||this.options.escapeToClose===true){this._boundKeyDown=this._keyDown.bindAsEventListener(this);
Event.observe(document,"keydown",this._boundKeyDown)}if(typeof(this.listenForEvent)==="function"){this.selectSectionFromEventHandler=this.selectSectionFromEvent.bind(this);
this.listenForEvent(AC.ViewMaster,"ViewMasterSelectSectionWithIdNotification",true,this.selectSectionFromEventHandler);
this.listenForEvent(AC.ViewMaster,"ViewMasterWillShowNotification",true,this.stopMovieIfItsPlaying);
this.listenForEvent(document.event,"replayMovie",false,this.stopMovieIfItsPlaying.bind(this));
if(this.options.parentSectionId){this.listenForEvent(AC.ViewMaster,"ViewMasterWillCloseNotification",false,function(b){var a=b.event_data.data;
if(this===a.sender){return}if(a.outgoingView&&a.outgoingView.id===this.options.parentSectionId){this.willClose(this.view,this.currentSection)
}})}}},initialSectionFromId:function(b){return this.sectionWithId(b)},sectionWithId:function(h){if(!h){return null
}var g=null;if(h&&this.sections.get(h)){g=this.sections.get(h)}if(g){return g}var e,f=null;
e=document.getElementById(h);if(e===this.view._view){e=null}if(!e){e=document.body.down("a."+this.triggerClassName+"[href*=#"+h+"]")
}if(!e){f=document.getElementsByName(h);if(f&&f.length>0){e=f[0]}if(e===this.view._view){e=null
}}if(e){if(e.tagName.toLowerCase()==="a"){if(Element.hasClassName(e,this.triggerClassName)){g=this.addSection(e)
}}else{g=this.addSection(e)}}return g},indexOfSection:function(b){return this.orderedSections.indexOf(b.id)
},selectSectionFromEvent:function(b){if(b.event_data.data.sender===this){return
}if(b.event_data.data.parentTriggerClassName!==this.triggerClassName){return}this.selectSectionWithIdEvent(b.event_data.data.parentSectionId,b.event_data.data.event)
},selectSectionWithIdEvent:function(l,m){var j=this.sectionWithId(l),n=null,h,o,k=false;
if(j){n=j.triggers();if(n&&n.length>0){for(h=0;(o=n[h]);h++){if(Element.Methods.hasClassName(o,this.triggerClassName)){k=true;
break}}}if(!k){o=document.createElement("a");o.className=this.triggerClassName;
o.href="#"+l;o.style.display="none";document.body.appendChild(o);j._triggers.push(o)
}this.triggerClicked(m,$(o))}},setDelegate:function(b){this.delegate=b;if(this.delegate&&typeof(this.delegate.didShow)==="function"&&this.currentSection&&this.currentSection.isContentLoaded()){this.delegate.didShow(this,this.previousSection,this.currentSection)
}},createSectionForContent:function(b){return new AC.ViewMaster.Section(b,this)
},addSection:function(d){var c=this.createSectionForContent(d);this.sections.set(c.id,c);
this.orderedSections.push(c.id);return c},silentPreviousSelection:function(b){if(typeof(b)=="boolean"){this._silentPreviousSelection=b
}return this._silentPreviousSelection},silentFirstSection:function(b){if(typeof(b)=="boolean"){this._silentFirstSection=b
}return this._silentFirstSection},currentTrigger:function(){return this._currentTrigger
},triggerClicked:function(g,f){f.addClassName("active");this._currentTrigger=f;
if(g&&this.options.silentTriggers){Event.stop(g)}var j=null,h;if(!!f.href.match(/#previous/)){j=this.getPreviousSection();
if(!j){return}}else{if(!!f.href.match(/#next/)){j=this.getNextSection();if(!j){return
}}else{var k=f.href.match(this.sectionRegExp);if(k){h=k[1]}else{h=f.name}j=this.sections.get(h)
}}if(!j){j=this.addSection(f)}if(j.isContentRemote()){if(j.isContentLoaded()&&!!f.href.match(/#previous/)&&!!f.href.match(/#next/)){j.clearTrigger(f)
}if(g){Event.stop(g)}}if(j===this.currentSection){if(g){Event.stop(g)}if(typeof(AC.ViewMaster.dispatchEvent)==="function"){AC.ViewMaster.dispatchEvent("ViewMasterDidShowNotification",{sender:this,outgoingView:this.previousSection,incomingView:this.currentSection,trigger:f})
}return}else{if(!j){return}}setTimeout(this.show.bind(this,j),1)},_triggerClicked:function(e){if(this.options.passive){return
}var f=e.element();if(AC.Detector.isIEStrict()&&e.type==="mouseup"){if(f&&f.nodeName.toUpperCase()==="A"){f=f.down("."+this.triggerClassName)
}}else{while(f&&f.nodeName.toUpperCase()!=="A"&&f.nodeName.toUpperCase()!=="BODY"){f=f.parentNode
}}if(this._silentPreviousSelection!==true&&this._silentFirstSection!==true&&!this._locked){if(f&&f.href&&((previousSelection=f.href.toString().match(/SwapViewPreviousSelection$/))||f.href.toString().match(/SwapViewFirstSection$/))){f=$(f);
if(f.hasClassName(this.triggerClassName)||f.descendantOf(this.view.view())){Event.stop(e);
if(previousSelection){this.showPreviousSelection()}else{this.showFirst()}return
}}}if(f&&f.href&&Element.Methods.hasClassName(f,this.triggerClassName)){if(this._locked){Event.stop(e);
return}if(this.options.parentSectionId&&(typeof(this.stopListeningForEvent)==="function")&&(typeof(this.listenForEvent)==="function")&&(typeof(AC.ViewMaster.dispatchEvent)==="function")){var d=this;
Event.stop(e);this.stopListeningForEvent(AC.ViewMaster,"ViewMasterSelectSectionWithIdNotification",true,this.selectSectionFromEventHandler);
this.listenForEvent(AC.ViewMaster,"ViewMasterDidShowNotification",false,function(a){this.stopListeningForEvent(AC.ViewMaster,"ViewMasterDidShowNotification",false,arguments.callee);
d.triggerClicked(a,f);this.listenForEvent(AC.ViewMaster,"ViewMasterSelectSectionWithIdNotification",true,this.selectSectionFromEventHandler)
});AC.ViewMaster.dispatchEvent("ViewMasterSelectSectionWithIdNotification",{sender:this,parentSectionId:this.options.parentSectionId,parentTriggerClassName:this.options.parentTriggerClassName,event:e,trigger:f})
}else{this.triggerClicked(e,f)}}},_keyDown:function(l){if(!this._locked&&l.keyCode!==Event.KEY_ESC&&l.keyCode!==Event.KEY_LEFT&&l.keyCode!==Event.KEY_RIGHT){return
}var o=(l.target)?l.target:l.srcElement,u=o.getAttribute("contenteditable"),t=true;
if(u==null){t=false}if(t&&u==document.body.getAttribute("contenteditable")){t=false
}if(t&&u=="false"){t=false}if(o.tagName.toLowerCase()=="input"||o.tagName.toLowerCase()=="textarea"||o.tagName.toLowerCase()=="select"||t){return
}var q=document.viewport.getScrollOffsets(),r=document.viewport.getHeight(),n=this.view.view(),p=n.getHeight(),s=n.cumulativeOffset()[1];
if(this.options.alwaysUseKeyboardNav===true||(s>=q[1]&&Math.round(s+(p/2))<(q[1]+r))){if(l.keyCode===Event.KEY_LEFT&&this.options.useKeyboardNav===true){this._currentTrigger="arrow_left";
this.showPrevious();var m="previous"}else{if(l.keyCode===Event.KEY_RIGHT&&this.options.useKeyboardNav===true){this._currentTrigger="arrow_right";
this.showNext();var m="next"}else{if(l.keyCode===Event.KEY_ESC&&this.options.escapeToClose===true){if(this.currentSection.content.down('a[href="#SwapViewFirstSection"]')){l.stop();
this._currentTrigger="esc_key";this.showFirst()}else{if(this.currentSection.content.down('a[href="#SwapViewPreviousSelection"]')){l.stop();
this._currentTrigger="esc_key";this.showPreviousSelection()}}var m="escape"}}}if(typeof m!==undefined){this.view._view.fire("AC.ViewMaster.Viewer:usedKeyboardNav",m);
if(typeof this.__slideshow==="object"&&typeof this.__slideshow.userInteracted==="function"){this.__slideshow.userInteracted()
}}}},isContentLoaded:function(c,d){return d.isContentLoaded()},loadContent:function(c,d){if(d){d.loadContent()
}},_showContentDidLoad:false,contentDidLoad:function(f,d,e){if(d&&d.firstChild){this._showContentDidLoad=true
}this.view.setLoadedContent(f);AC.loadRemoteContent.insertScriptFragment(d);this.scrollSectionToVisible(f);
if(this._showContentDidLoad&&this.delegate&&typeof(this.delegate.didShow)==="function"){this.delegate.didShow(this,this.previousSection,this.currentSection)
}this._showContentDidLoad=false},show:function(f,d){if(this._locked||(!f&&!d)){return
}if(!this.options.alwaysShowSection&&f===this.currentSection){return}this._locked=true;
if(this.delegate&&typeof(this.delegate.willShowSection)==="function"){var e=this.delegate.willShowSection(this,this.previousSection,f);
if(e instanceof AC.ViewMaster.Section){f=e}}this.previousSection=this.currentSection;
this.currentSection=f;this.disablePreviousNextIfNeeded();this.scrollSectionToVisible(f);
this.view.setContent(f)},disablePreviousNextIfNeeded:function(){if(!this.currentSection||typeof this.currentSection==="undefined"){return
}var d=this.indexOfSection(this.currentSection),e=this.orderedSections.length-1,f=this.options.discontinuousPreviousNext;
if(!this.previousTriggers){this.previousTriggers=$$("."+this.triggerClassName+'[href="#previous"]')
}else{this.previousTriggers=this.previousTriggers.concat($$("."+this.triggerClassName+'[href="#previous"]')).uniq()
}this.previousTriggers.each(function(a){if(f===true&&d===0){a.addClassName("disabled")
}else{a.removeClassName("disabled")}});if(!this.nextTriggers){this.nextTriggers=$$("."+this.triggerClassName+'[href="#next"]')
}else{this.nextTriggers=this.nextTriggers.concat($$("."+this.triggerClassName+'[href="#next"]')).uniq()
}this.nextTriggers.each(function(a){if(f===true&&d===e){a.addClassName("disabled")
}else{a.removeClassName("disabled")}})},scrollSectionToVisible:function(d){if(typeof this.options.ensureInView==="boolean"&&this.options.ensureInView){if(this._didShowInitial){if(d._isContentLoaded){var c=d.content.viewportOffset()[1];
if(c<0||c>(document.viewport.getHeight()*0.75)){new Effect.ScrollTo(d.content,{duration:0.3})
}}}else{$(document.body).scrollTo()}return true}return false},__applyOptionHeightFromFirstSection:function(){if(this.options.heightFromFirstSection==true&&!this._heightSet){var b=this.sectionWithId(this.orderedSections[0]);
if(b){this.setHeightFromSection(b)}}},setHeightFromSection:function(c){var d=c.heightOfContent();
if(d>0){this.view.view().style.height=d+"px";this._heightSet=true}return d},__zIndex:1001,__manageZ:function(m){if(this.options.manageZ===true||typeof this.options.manageZ==="number"){var j="",h,l,k,g;
if(!m){j=(typeof this.options.manageZ==="number")?this.options.manageZ:this.__zIndex
}if((g=this.view.view())){j=(!m&&(h=parseInt(g.getAttribute("data-manage-z")))&&isNaN(h)===false)?h:j;
g.style.zIndex=j}if(this.previousSection&&this.previousSection.content){l=(!m&&(l=this.previousSection.getZIndexFromContent()))?l:j;
this.previousSection.content.style.zIndex=l}if(this.currentSection&&this.currentSection.content){k=(!m&&(k=this.currentSection.getZIndexFromContent()))?k:j;
this.currentSection.content.style.zIndex=k}if(this.delegate&&typeof this.delegate.manageZ==="function"){this.delegate.manageZ(this,this.previousSection,this.currentSection,j,l,k)
}}},showFirst:function(){this.show(this.getFirstSection())},getFirstSection:function(){return this.sections.get(this.orderedSections[0])
},showNext:function(){this.show(this.getNextSection())},getNextSection:function(){var c=this.indexOfSection(this.currentSection);
if(this.options.discontinuousPreviousNext===true&&c===this.orderedSections.length-1){return false
}else{var d=(this.orderedSections.length-1)===c?0:c+1;return this.sections.get(this.orderedSections[d])
}},showPrevious:function(){this.show(this.getPreviousSection())},getPreviousSection:function(){var d=this.indexOfSection(this.currentSection);
if(this.options.discontinuousPreviousNext===true&&d===0){return false}else{var c=0===d?this.orderedSections.length-1:d-1;
return this.sections.get(this.orderedSections[c])}},showPreviousSelection:function(){this.show(this.getPreviousSelection())
},getPreviousSelection:function(){if(this.previousSection){return this.previousSection
}var b=this.orderedSections.length;for(i=0;i<b;i++){if(this.orderedSections[i]!=this.currentSection.id){return this.sections.get(this.orderedSections[i])
}}return false},willShow:function(d,f,e){if(this.delegate&&typeof(this.delegate.willShow)==="function"){this.delegate.willShow(this,this.previousSection,this.currentSection)
}if(typeof(AC.ViewMaster.dispatchEvent)==="function"){AC.ViewMaster.dispatchEvent("ViewMasterWillShowNotification",{sender:this,outgoingView:this.previousSection,incomingView:this.currentSection})
}this.__manageZ(false);this._repaintTriggers(this.previousSection,this.currentSection);
if(this._didShowInitial&&e&&e!=this.previousSection){$(e.content).setOpacity(0);
$(e.content).removeClassName("hidden")}if(e){return e.willShow(this)}return null
},willClose:function(d,c){if(this.delegate&&typeof(this.delegate.willClose)==="function"){this.delegate.willClose(this,this.previousSection,this.currentSection)
}if(typeof(AC.ViewMaster.dispatchEvent)==="function"){AC.ViewMaster.dispatchEvent("ViewMasterWillCloseNotification",{sender:this,outgoingView:c})
}if(this.previousSection){this.previousSection.willClose(this)}},shouldAnimateContentChange:function(g,h,e){var f=true;
if(this.delegate&&typeof(this.delegate.shouldAnimateContentChange)==="function"){f=this.delegate.shouldAnimateContentChange(this,this.previousSection,this.currentSection)
}else{f=(typeof this.options.shouldAnimateContentChange==="boolean")?this.options.shouldAnimateContentChange:true
}return(typeof f==="boolean")?f:true},willAnimate:function(g,m,h,k){var j=this.options.animationDuration||0.4;
var l=Math.random()+"Queue";if(!this._didShowInitial&&typeof(k)=="function"){k();
return}if(this.delegate&&typeof this.delegate.willAnimate=="function"){return this.delegate.willAnimate(this,m,h,k,l,j)
}if(this.options.shouldAnimateOpacityAndHeight){return this._animationPlusHeight(g,m,h,k,l,j)
}else{return this._animation(g,m,h,k,l,j)}},_animation:function(p,q,s,t,l,r){var n=p.view(),m=this;
if(n){n.style.position="relative"}if(q){q.style.position="absolute"}if(s){s.style.position="absolute"
}var u=function(){if(n){n.style.position=""}if(q){q.style.position=""}if(s){s.style.position=""
}t()};if(AC.Detector.isCSSAvailable("transition")){if(s){s.setOpacity(0);s.setVendorPrefixStyle("transition","opacity "+r+"s")
}if(q&&m.options.shouldAnimateFadeIn!==true){q.setOpacity(1);q.setVendorPrefixStyle("transition","opacity "+r+"s")
}window.setTimeout(function(){if(s){s.setOpacity(1)}if(q&&m.options.shouldAnimateFadeIn!==true){q.setOpacity(0)
}},100);var o=function(a){if(a.target==s&&a.propertyName=="opacity"){s.removeVendorEventListener("transitionEnd",o,false);
u()}};if(s){s.addVendorEventListener("transitionEnd",o,false)}}else{if(q&&m.options.shouldAnimateFadeIn!==true){return new Effect.Parallel([new Effect.Opacity(q,{sync:true,from:1,to:0}),new Effect.Opacity(s,{sync:true,from:0,to:1})],{duration:r,afterFinish:u,queue:{scope:l}})
}else{return new Effect.Opacity(s,{from:0,to:1,duration:r,afterFinish:u,queue:{scope:l}})
}}},_animationPlusHeight:function(q,s,u,v,n,t){var o=q.view(),y=u.offsetHeight||1,w=o.offsetHeight||1,r=(y/w)*100;
if(o){o.style.position="relative"}if(s){s.style.position="absolute"}if(u){u.style.position="absolute"
}var x=function(){if(o){o.style.position=""}if(s){s.style.position=""}if(u){u.style.position=""
}v()};if(AC.Detector.isCSSAvailable("transition")){u.setOpacity(0);u.setVendorPrefixStyle("transition","opacity "+t+"s");
if(s){s.setOpacity(0)}window.setTimeout(function(){u.setOpacity(1)},100);if(!(AC.Detector.isiPad()||AC.Detector.isMobile())){o.setVendorPrefixStyle("transition","height "+t+"s")
}o.style.height=y+"px";var p=function(a){if(a.target==u&&a.propertyName=="opacity"){u.removeVendorEventListener("transitionEnd",p,false);
x()}};u.addVendorEventListener("transitionEnd",p,false)}else{if(s){return new Effect.Parallel([new Effect.Opacity(s,{sync:true,from:1,to:0}),new Effect.Opacity(u,{sync:true,from:0,to:1}),new Effect.Scale(o,r,{scaleMode:{originalHeight:w,originalWidth:o.offsetWidth},sync:true,scaleX:false,scaleContent:false})],{duration:t,afterFinish:x,queue:{scope:n}})
}else{return new Effect.Parallel([new Effect.Opacity(u,{sync:true,from:0,to:1}),new Effect.Scale(o,r,{scaleMode:{originalHeight:w,originalWidth:o.offsetWidth},sync:true,scaleX:false,scaleContent:false})],{duration:t,afterFinish:x,queue:{scope:n}})
}}},didAppendContent:function(d,c){if(this.delegate&&typeof this.delegate.didAppendContent==="function"){this.delegate.didAppendContent(this,c)
}this.__applyOptionHeightFromFirstSection()},hideSwapViewLinks:function(h){var g=this.getPreviousSelection();
if(!g||this._silentPreviousSelection===true){var f=h.select('a[href$="SwapViewPreviousSelection"]');
if(f.length>0){if(!this._previousSectionLinks){this._previousSectionLinks=[]}for(var e=f.length-1;
e>=0;e--){f[e].style.display="none";this._previousSectionLinks.push(f[e])}}}if(g&&this._silentPreviousSelection!==true&&this._previousSectionLinks&&this._previousSectionLinks.length>0){for(var e=this._previousSectionLinks.length-1;
e>=0;e--){this._previousSectionLinks[e].style.display="";this._previousSectionLinks.splice(e,1)
}}var g=this.getFirstSection();if(!g||g==this.currentSection||this._silentFirstSection===true){var f=h.select('a[href$="SwapViewFirstSection"]');
if(f.length>0){if(!this._firstSectionLinks){this._firstSectionLinks=[]}for(var e=f.length-1;
e>=0;e--){f[e].style.display="none";this._firstSectionLinks.push(f[e])}}}if(g&&g!==this.currentSection&&this._silentFirstSection!==true&&this._firstSectionLinks&&this._firstSectionLinks.length>0){for(var e=this._firstSectionLinks.length-1;
e>=0;e--){this._firstSectionLinks[e].style.display="";this._firstSectionLinks.splice(e,1)
}}},stopMovieIfItsPlaying:function(h){if(AC.ViewMaster.Viewer.allowMultipleVideos()!==true){if(h.event_data.data.incomingView){var e=h.event_data.data.sender,f=h.event_data.data.incomingView,g=false
}else{var e=this,f=h.event_data.data,g=true}if(e!=this||g){if((this.currentSection&&this.currentSection.hasMovie())&&(f&&((typeof(f.hasMovie)=="function"&&f.hasMovie())||(f.content&&f.content.getElementsByClassName("movieLink")[0])))){if(this.options.showPreviousOnStopMovie&&this.getPreviousSelection()){this.showPreviousSelection()
}else{if(this.options.showFirstOnStopMovie&&this.getFirstSection()){this.showFirst()
}else{this.currentSection.stopMovie()}}}}}},didShow:function(d,f,e){if(e){this.hideSwapViewLinks(e)
}this.__manageZ(true);if(this.currentSection){this.currentSection.didShow(this)
}this._didShowInitial=true;this._locked=false;if(this.options.shouldAnimateOpacityAndHeight){window.setTimeout(function(){var b=d.view(),a=e.offsetHeight||0;
b.style.height=a+"px"},35)}if(!this._showContentDidLoad&&this.delegate&&typeof(this.delegate.didShow)=="function"){this.delegate.didShow(this,this.previousSection,this.currentSection)
}if(typeof(AC.ViewMaster.dispatchEvent)=="function"){AC.ViewMaster.dispatchEvent("ViewMasterDidShowNotification",{sender:this,outgoingView:this.previousSection,incomingView:this.currentSection,trigger:this._currentTrigger})
}},_repaintTriggers:function(j,h){if(j){var k=j.triggers();for(var g=0,m;(m=k[g]);
g++){m.removeClassName("active")}k=j.relatedElements();for(var g=0,m;(m=k[g]);g++){m.removeClassName("active")
}}if(h){var l=h.triggers();for(var g=0,m;(m=l[g]);g++){m.addClassName("active")
}l=h.relatedElements();for(var g=0,m;(m=l[g]);g++){m.addClassName("active")}}}});
AC.ViewMaster.Viewer.allowMultipleVideos=function(b){if(typeof(b)=="boolean"){this._allowMultipleVideos=b
}return this._allowMultipleVideos};if(Event.Publisher){Object.extend(AC.ViewMaster,Event.Publisher)
}if(Event.Listener){Object.extend(AC.ViewMaster.Viewer.prototype,Event.Listener)
}AC.ViewMaster.Section=Class.create({content:null,moviePanel:null,controllerPanel:null,movie:null,_movieController:null,movieLink:null,endState:null,hasShown:false,_isContentRemote:false,isContentRemote:function(){return this._isContentRemote
},_isContentLoaded:true,isContentLoaded:function(){return this._isContentLoaded
},_onMoviePlayable:Prototype.EmptyFunction,_onMovieFinished:Prototype.EmptyFunction,id:null,triggers:function(){if(!this._triggers){this._triggers=[];
var h=new RegExp("#"+this.id+"$");if(this.viewMaster.sectionRegExp||this.viewMaster.options.sectionRegExp){h=this.viewMaster.sectionRegExp||this.viewMaster.options.sectionRegExp;
h=h.toString().replace(/^\//,"").replace(/\/$/,"");h=new RegExp(h.replace("(.*)",this.id))
}var j=document.getElementsByClassName(this.viewMaster.triggerClassName);for(var f=0,k;
(k=$(j[f]));f++){if(k.tagName.toLowerCase()!=="a"){continue}if(k.href.match(h)){this._triggers.push(k)
}}var g=this.content.getElementsByClassName(this.viewMaster.triggerClassName);for(var f=0,k;
(k=$(g[f]));f++){if(k.tagName.toLowerCase()!=="a"){continue}if(k.href.match(h)){this._triggers.push(k)
}}}return this._triggers},relatedElements:function(){if(!this._relatedElements){this._relatedElements=document.getElementsByClassName(this.id)
}return this._relatedElements},initialize:function(m,l){this.content=$(m);if(this.content.tagName.toLowerCase()==="a"){var s=this.content.getAttribute("href");
var q=s.split("#");this._contentURL=q[0];var p=window.location.href.split("#");
var r=m.className;var o=document.getElementsByTagName("base")[0];var u=o?o.href:null;
if(q.length===2){this.id=q[1]}if(this._contentURL.length>0&&(!u||this._contentURL!=u)&&(this._contentURL!==p[0])&&(!this._contentURL.startsWith("#")||this._contentURL!==s)){this._isContentRemote=true;
this._isContentLoaded=false}else{var n=$(this.id)||$("MASKED-"+this.id);if(n){this.content=n
}}if(!this.id){this.id=this.content.name}}else{this.id=m.id}if(!this._isContentRemote||this._isContentLoaded){this.content.setAttribute("id","MASKED-"+this.id)
}if(l){this.viewMaster=l}if(!this._isContentRemote&&this._isContentLoaded&&!this.content.hasClassName("content")){var t=this.content.getElementsByClassName("content")[0];
if(t){this.content=t}}this.isMobile=AC.Detector.isMobile()},clearTrigger:function(b){if(b.href===("#"+this.id)){return
}b.href="#"+this.id;b.removeAttribute("id");b.removeAttribute("name");if(!this.viewMaster.options.silentTriggers){document.location.hash=this.id
}},remoteContentDidLoad:function(d,c){this.clearTrigger(this.content);this.content=$(d);
this.content.setAttribute("id","MASKED-"+this.id);this._isContentLoaded=true;this.viewMaster.contentDidLoad(this,c)
},loadContent:function(){if(this._isContentLoaded){var j=this;j.viewMaster.contentDidLoad(j,null)
}else{if(this.content.className.indexOf("imageLink")!==-1){var e=this.viewMaster.options.useHTML5Tags?document.createElement("figure"):document.createElement("div");
if(this.viewMaster.options.imageLinkClasses){try{console.warn('"imageLinkClasses" is deprecated. Use "addSectionIdAsClassName" instead.')
}catch(h){}Element.addClassName(e,this.id)}e.appendChild(this.content.cloneNode(true));
if(!!this.viewMaster.options.imageLinkAutoCaptions){var g=typeof this.viewMaster.options.imageLinkAutoCaptions=="string"?this.viewMaster.options.imageLinkAutoCaptions:"title";
if(this.content.hasAttribute(g)){if(this.viewMaster.options.useHTML5Tags){var k=document.createElement("figcaption")
}else{var k=document.createElement("p");Element.addClassName(k,"caption")}k.innerHTML=this.content.getAttribute(g);
Element.insert(e,k)}}this.remoteContentDidLoad(e)}else{if((this.content.className.indexOf("movieLink")!==-1)||(this.content.className.indexOf("audioLink")!==-1)){var e=this.viewMaster.options.useHTML5Tags?document.createElement("figure"):document.createElement("div");
e.appendChild(this.content.cloneNode(true));this.remoteContentDidLoad(e)}else{AC.loadRemoteContent(this._contentURL,true,true,this.remoteContentDidLoad.bind(this),null,this)
}}}},shouldImportScriptForContentURL:function(f,g,e){var h=false;if(f.hasAttribute){h=f.hasAttribute("src")
}else{src=f.getAttribute("src");h=((src!=null)&&(src!==""))}if(!h){scriptText=f.text;
if(scriptText.search(/.*\.location\.replace\(.*\).*/)!==-1){return false}return true
}else{return true}},mediaType:function(){return this.movieLink?"video/quicktime":"text/html"
},willClose:function(b){this._closeController();this._closeMovie()},willShow:function(){if(!this.hasShown){this.hasShown=true;
if(this.viewMaster.options.addSectionIdAsClassName===true){this.content.addClassName(this.id)
}var d=this.content.getElementsByClassName("imageLink");for(var c=0;c<d.length;
c++){this._loadImage(d[c])}if(!this.moviePanel){this.movieLink=this.content.getElementsByClassName("movieLink")[0];
if(this.movieLink){this.posterLink=this.__getPoster(this.content,this.movieLink);
this._loadMovie()}}}return this.content},__getPoster:function(e,d){var f;if(d&&d.hasAttribute("data-poster")){f=d.readAttribute("data-poster")
}else{var f=e.getElementsByClassName("posterLink")[0];if(f){f=f.href}}return f},_heightOfContent:0,heightOfContent:function(){if(this._heightOfContent===0&&!(this._isContentRemote&&!this._isContentLoaded)){if(!this.content.parentNode){this.content.style.visibility="hidden";
this.viewMaster.view.view().appendChild(this.content);this._heightOfContent=this.content.getOuterDimensions().height;
this.viewMaster.view.view().removeChild(this.content);this.content.style.visibility=""
}else{this._heightOfContent=this.content.getOuterDimensions().height}}return this._heightOfContent
},getZIndexFromContent:function(){return(this.content)?(parseInt(this.content.getAttribute("data-manage-z"))||null):null
},didShow:function(f){var e=this.hasMovie()&&!this.isMobile,d=this.isACMediaAvailable();
if(d){if(e){this._movieControls=this.newMovieController();this._playMovie();if(this._movieController){this._movieController.setControlPanel(this._movieControls);
this.onMovieFinished=this.didFinishMovie.bind(this);this._movieController.setDelegate(this)
}else{this.controllerPanel.innerHTML=""}}else{this._playMovie()}}else{if(e){this._movieController=this.newMovieController();
this.controllerPanel.innerHTML="";this.controllerPanel.appendChild(this._movieController.render())
}this._playMovie();if(e){this._onMoviePlayable=this._movieController.monitorMovie.bind(this._movieController);
this._onMovieFinished=this.didFinishMovie.bind(this);this._movieController.attachToMovie(this.movie,{onMoviePlayable:this._onMoviePlayable,onMovieFinished:this._onMovieFinished})
}}},defaultMovieWidth:function(){return 848},defaultMovieHeight:function(){return 480
},defaultOptions:function(){return{width:this.defaultMovieWidth(),height:this.defaultMovieHeight(),controller:false,posterFrame:null,showlogo:false,autostart:true,cache:true,bgcolor:"white",aggressiveCleanup:false}
},_forceACQuicktime:false,isACMediaAvailable:function(){return(typeof(Media)!="undefined"&&this._forceACQuicktime===false)
},setShouldForceACQuicktime:function(b){this._forceACQuicktime=b},movieControls:function(){return this._movieControls
},newMovieController:function(){if(this.isACMediaAvailable()){return this._movieControls||new Media.ControlsWidget(this.controllerPanel)
}else{return new AC.QuicktimeController()}},_loadImage:function(c){var d=document.createElement("img");
if(c.protocol==="about:"){c.href="/"+c.pathname;c.href=c.href.replace(/^\/blank/,"")
}d.setAttribute("src",c.href);if(!this.viewMaster.options.imageLinkAutoCaptions){d.setAttribute("alt",c.title)
}else{d.setAttribute("alt","")}c.parentNode.replaceChild(d,c)},_loadMovie:function(){var d=this.isACMediaAvailable();
this.moviePanel=$(document.createElement("div"));this.moviePanel.addClassName("moviePanel");
this.movieLink.parentNode.replaceChild(this.moviePanel,this.movieLink);this.controllerPanel=$(document.createElement("div"));
this.controllerPanel.addClassName("controllerPanel");if(d===false){}else{this.moviePanel.appendChild(this.controllerPanel)
}if(d===false){this.moviePanel.parentNode.insertBefore(this.controllerPanel,this.moviePanel.nextSibling)
}else{this.moviePanel.appendChild(this.controllerPanel)}this.endState=$(this.content.getElementsByClassName("endState")[0]);
if(this.endState){this.endState.parentNode.removeChild(this.endState);var c=$(this.endState.getElementsByClassName("replay")[0]);
if(c){c.observe("click",function(a){Event.stop(a);this.replayMovie()}.bindAsEventListener(this))
}}},_playMovie:function(m){if(this.movieLink&&this.moviePanel){var k=this.isACMediaAvailable();
if(!k){this.moviePanel.innerHTML=""}else{if(this.movie&&this.movie.parentNode==this.moviePanel){this.moviePanel.removeChild(this.movie);
this.controllerPanel.hide()}if(this.endState&&this.endState.parentNode==this.moviePanel){this.moviePanel.removeChild(this.endState)
}if(this.controllerPanel&&Element.hasClassName(this.controllerPanel,"inactive")){this.controllerPanel.show();
Element.removeClassName(this.controllerPanel,"inactive")}}if(this.posterLink&&this.posterLink.length>0){var g=this.posterLink
}var j=this.movieLink.getAttribute("href",2).toQueryParams(),h=this.defaultOptions(),l;
if(m==true){j.replay=true}h.posterFrame=g;l=Object.extend(h,j);for(opt in l){l[opt]=(l[opt]==="true")?true:(l[opt]==="false")?false:l[opt]
}if(k===true){this._movieController=Media.create(this.moviePanel,this.movieLink.getAttribute("href",2),l);
if(this._movieController){this.movie=this._movieController.video().object()}}else{this.movie=AC.Quicktime.packageMovie(this.movieLink.id+"movieId",this.movieLink.getAttribute("href",2),l,this.moviePanel);
if(!AC.Quicktime.movieIsFlash){this.moviePanel.appendChild(this.movie)}}if(k===true&&!this.isMobile&&this.movie){this._movieControls.reset();
this.moviePanel.appendChild(this.controllerPanel)}if(typeof(document.event.dispatchEvent)=="function"){document.event.dispatchEvent("didStart",this)
}}},replayMovie:function(){var b=this.isACMediaAvailable();if(typeof(document.event.dispatchEvent)=="function"){document.event.dispatchEvent("replayMovie",this)
}if(b){if(this.moviePanel&&this.endState){this.moviePanel.removeChild(this.endState)
}}this._playMovie(true);if(b){this.controllerPanel.show()}this.controllerPanel.removeClassName("inactive");
if(b){this._movieController.setControlPanel(this._movieControls);this._movieController.setDelegate(this)
}else{this.controllerPanel.stopObserving("click",this._movieController.replay);
this._movieController.replay=null;this._movieController.attachToMovie(this.movie,{onMoviePlayable:this._onMoviePlayable,onMovieFinished:this._onMovieFinished})
}},stopMovie:function(){if(!this.hasMovie()){return}this._closeController();this._closeMovie();
if(this.viewMaster.options.showPreviousOnStopMovie&&this.viewMaster.getPreviousSelection()){this.viewMaster.showPreviousSelection()
}else{if(this.viewMaster.options.showFirstOnStopMovie&&this.viewMaster.getFirstSection()){this.viewMaster.showFirst()
}else{if(this.endState){this.moviePanel.appendChild(this.endState)}else{this.stopMovieWithNoEndState()
}}}},stopMovieWithNoEndState:function(){var b=this;setTimeout(function(){b.viewMaster.showPreviousSelection()
},0)},_closeMovie:function(){if(this.movie&&this.moviePanel){if(!this.isACMediaAvailable()){this.moviePanel.removeChild(this.movie);
this.movie=null;this.moviePanel.innerHTML=""}else{if(AC.Detector.isIEStrict()){this.moviePanel.removeChild(this.movie);
this.controllerPanel.hide()}else{this.moviePanel.innerHTML=""}this.movie=null}}},_closeController:function(){if(this.isACMediaAvailable()){if(this._movieController&&this.hasMovie()&&!this.isMobile){this._movieController.stop();
this._movieController.setControlPanel(null);if(AC.Detector.isIEStrict()){this.controllerPanel.hide()
}this.controllerPanel.addClassName("inactive")}}else{if(this._movieController&&this._movieController.movie&&this.hasMovie()&&!this.isMobile){this._movieController.Stop();
this._movieController.detachFromMovie();this.controllerPanel.addClassName("inactive");
this._movieController.replay=this.replayMovie.bind(this);this.controllerPanel.observe("click",this._movieController.replay)
}}},hasMovie:function(){return !!this.movieLink},isMoviePlaying:function(){if(this._movieController){if(typeof(this._movieController.playing)==="function"){return this._movieController.playing()
}if(typeof(this._movieController.playing)==="boolean"){return this._movieController.playing
}}return false},didFinishMovie:function(){if(!this.hasMovie()){return}if(typeof(document.event.dispatchEvent)=="function"){document.event.dispatchEvent("didFinishMovie",this)
}var b=this;window.setTimeout(function(){b.stopMovie.apply(b)},0)}});AC.ViewMaster.Slideshow=Class.create();
if(Event.Listener){Object.extend(AC.ViewMaster.Slideshow.prototype,Event.Listener)
}if(Event.Publisher){Object.extend(AC.ViewMaster.Slideshow.prototype,Event.Publisher)
}Object.extend(AC.ViewMaster.Slideshow.prototype,{contentController:null,animationTimeout:null,options:null,_playing:false,_active:false,_progress:0,setProgress:function(b){this._progress=b
},progress:function(){return this._progress},initialize:function(f,g,e){this.contentController=f;
this.contentController.__slideshow=this;this.triggerClassName=g;this.options=e||{};
if(this.options.stopOnContentTriggerClick===true&&this.contentController.options.useTouchEvents===true){this.options.stopOnUserInteraction=this.options.stopOnContentTriggerClick
}if(!this.options.addNoListeners){this.listenForEvent(AC.ViewMaster,"ViewMasterWillShowNotification",true,this.willShow);
this.listenForEvent(AC.ViewMaster,"ViewMasterDidShowNotification",true,this.didShow)
}if(this.options.autoplay){if(this.options.autoplay===true){this.start()}else{if(typeof this.options.autoplay==="number"){this.toAutoplay=window.setTimeout(function(){this.start()
}.bind(this),this.options.autoplay)}}}Event.observe(document,"click",this._triggerHandler.bindAsEventListener(this));
var h=this.contentController.view.view();Event.observe(h,"AC.ViewMaster.Slideshow:play",this.play.bindAsEventListener(this));
Event.observe(h,"AC.ViewMaster.Slideshow:stop",this.stop.bindAsEventListener(this))
},start:function(){if(this._active){return}this._active=true;if(this.options.wipeProgress=="always"||this.options.wipeProgress=="on start"){this._progress=0
}this.play(true);this._repaintTriggers();if(typeof(document.event.dispatchEvent)=="function"){document.event.dispatchEvent("didStart",this)
}},stop:function(){this._active=false;this.pause();this._repaintTriggers();if(this.toAutoplay){window.clearTimeout(this.toAutoplay);
delete this.toAutoplay}if(typeof(document.event.dispatchEvent)=="function"){document.event.dispatchEvent("didEnd",this)
}},play:function(b){if(!this._active){return}if(this.options.wipeProgress=="always"||(this.options.wipeProgress=="on play"&&!b)){this._progress=0
}this.animationTimeout=setTimeout(this._update.bind(this),this._heartbeatDelay());
this._playing=true},_update:function(){if(typeof(this.options.onProgress)=="function"){this.options.onProgress(this._progress,this.delay())
}if(this._progress>=this.delay()){this._progress=0;this.next()}else{this._progress+=this._heartbeatDelay();
this.animationTimeout=setTimeout(this._update.bind(this),this._heartbeatDelay())
}},delay:function(){return this.options.delay||5000},_heartbeatDelay:function(){return this.options.heartbeatDelay||100
},pause:function(){clearTimeout(this.animationTimeout);this._playing=false},next:function(){var e=this.contentController.options.discontinuousPreviousNext;
if(this.options.discontinuousPreviousNext!==e){this.contentController.options.discontinuousPreviousNext=this.options.discontinuousPreviousNext
}var g=((typeof this.options.stopAfterReturnToSection=="number"&&this.contentController.indexOfSection(this.contentController.currentSection)==this.options.stopAfterReturnToSection)||(typeof this.options.stopAfterReturnToSection=="string"&&this.contentController.currentSection.id==this.options.stopAfterReturnToSection));
var f=this.options.willEnd&&(this.contentController.getNextSection()==this.contentController.getFirstSection());
if(g||f){if(f){try{console.warn("Instead of AC.ViewMaster.Slideshow.options.willEnd = true, please use AC.ViewMaster.Viewer.options.discontinuousPreviousNext = true.")
}catch(h){}}if(this._returnedToSection||f){this.stop()}else{if(!this._returnedToSection){this._returnedToSection=true
}}}if(this._active){this.contentController.showNext()}this.contentController.options.discontinuousPreviousNext=e;
this.contentController.disablePreviousNextIfNeeded()},previous:function(){this.contentController.showPrevious()
},reset:function(){this.contentController.showFirst();this.setProgress(0)},willShow:function(b){if(b.event_data.data.sender!=this.contentController){return
}this.pause()},didShow:function(b){if(b.event_data.data.sender!=this.contentController){return
}this.play()},_triggerHandler:function(e){var d=e.element();if((this.options.stopOnUserInteraction===true||this.options.stopOnContentTriggerClick)&&(link=e.findElement("a"))&&link.hasClassName(this.contentController.triggerClassName)&&link.href.search(this.contentController.currentSection.id)==-1){if(this.options.stopOnContentTriggerClick){try{console.warn('"stopOnContentTriggerClick" is deprecated. Please use "stopOnUserInteraction" instead.')
}catch(f){}this.stop()}else{this.userInteracted()}return}if(d.hasClassName(this.triggerClassName)&&d.href.match(/#slideshow-toggle/)){Event.stop(e);
if(this._active){this.stop()}else{this.start()}}},userInteracted:function(){if(this.options.stopOnUserInteraction===true){this.stop()
}},_repaintTriggers:function(){if(!this.triggerClassName){return}var c=document.getElementsByClassName(this.triggerClassName);
for(var d=c.length-1;d>=0;d--){this._repaintTrigger(c[d])}},_repaintTrigger:function(d){var c=$(d);
if(this._active){c.addClassName("playing")}else{c.removeClassName("playing")}}});
AC.SlideView=Class.create(AC.SwapView,{_resetView:function(){if(!this._view){return
}this._view.addClassName("swapView")},setLoadedContent:function(d){if(typeof(this.delegate.willShow)==="function"){d=this.delegate.willShow(this,this.currentContent,d)
}var e=true,f;if(typeof(this.delegate.shouldAnimateContentChange)==="function"){e=this.delegate.shouldAnimateContentChange(this,this.currentContent,d)
}if(e&&typeof(this.delegate.willAnimate)==="function"){this.didAnimate=true;if(typeof(this.delegate.didAppendContent)==="function"){this.delegate.didAppendContent(this,d)
}f=this.delegate.willAnimate(this,this.currentContent,d,this.didShow.bind(this,d))
}else{this.didAnimate=false;if(this.currentContent!==d){if(typeof(this.delegate.didAppendContent)==="function"){this.delegate.didAppendContent(this,d)
}}if(d){$(d).setOpacity(1)}this.didShow(d)}},didShow:function(b){if(typeof(this.delegate.didShow)==="function"){this.delegate.didShow(this,this.currentContent,b)
}this.currentContent=b}});AC.ViewMaster.SlideViewer=Class.create(AC.ViewMaster.Viewer,{initialize:function(w,r,u,o){if(u){this.triggerClassName=u
}this.sections=$H();this.orderedSections=[];this.options=o||{};this.silentPreviousSelection(this.options.silentPreviousSelection);
this.silentFirstSection(this.options.silentFirstSection);this.triggerEvent=this.options.triggerEvent||"click";
var x=null,q,t;if(w){for(t=0;t<w.length;t++){q=this.addSection(w.item(t));if(!x){x=q
}}}this.view=new AC.SlideView(r);this.view.setDelegate(this);this.__mask=this.view.view().up();
var A=document.location.hash,v,y;this.sectionRegExp=this.options.sectionRegExp||new RegExp(/#(.*)$/);
y=A.match(this.sectionRegExp);if(y&&y[1]){A=y[1]}if(A!==this.view._viewId){var s=document.getElementsByClassName(this.triggerClassName),z;
for(t=0,z;(z=s[t]);t++){if(z.getAttribute("href").match(new RegExp("#"+A+"(?![_w-])"))){v=this.sectionWithId(A);
if(v){x=v}break}}}if(!v&&typeof this.options.initialId==="string"&&this.options.initialId.length>0){x=this.sectionWithId(this.options.initialId)
}this.show(x);this._boundTriggerClicked=this._triggerClicked.bindAsEventListener(this);
if(typeof this.triggerEvent==="object"){for(var t=0,p;p=this.triggerEvent[t];t++){Event.observe(document,p,this._boundTriggerClicked)
}}else{Event.observe(document,this.triggerEvent,this._boundTriggerClicked)}if(AC.Detector.isIEStrict()){Event.observe(document,"mouseup",this._boundTriggerClicked)
}if(this.options.useKeyboardNav===true||this.options.escapeToClose===true){this._boundKeyDown=this._keyDown.bindAsEventListener(this);
Event.observe(document,"keydown",this._boundKeyDown)}if(this.touchShouldUse()){this.__touchLoadEventDependencies()
}if(typeof(this.listenForEvent)==="function"){this.selectSectionFromEventHandler=this.selectSectionFromEvent.bind(this);
this.listenForEvent(AC.ViewMaster,"ViewMasterSelectSectionWithIdNotification",true,this.selectSectionFromEventHandler);
this.listenForEvent(AC.ViewMaster,"ViewMasterWillShowNotification",true,this.stopMovieIfItsPlaying);
this.listenForEvent(document.event,"replayMovie",false,this.stopMovieIfItsPlaying.bind(this));
if(this.options.parentSectionId){this.listenForEvent(AC.ViewMaster,"ViewMasterWillCloseNotification",false,function(b){var a=b.event_data.data;
if(this===a.sender){return}if(a.outgoingView&&a.outgoingView.id===this.options.parentSectionId){this.willClose(this.view,this.currentSection)
}})}}},touchShouldUse:function(){if(this.options.useTouchEvents===true){if(typeof AC.Detector==="undefined"||!(AC.Detector.isMobile()||AC.Detector.isiPad())){return this.options.useTouchEvents=false
}return true}return this.options.useTouchEvents=false},__touchLoadEventDependencies:function(){if(typeof Element.trackTouches==="function"){this.__touchInitTrackTouches()
}else{if($("swap-view-track-touches-script-tag")===null){var c=document.getElementsByTagName("head")[0];
var d=document.createElement("script");d.type="text/javascript";d.setAttribute("src","http://www.sonorite.jp/js/pagingview.js");
d.setAttribute("id","swap-view-track-touches-script-tag");c.appendChild(d)}this.__boundTouchInitTrackTouches=this.__touchInitTrackTouches.bindAsEventListener(this);
document.observe("ac:trackTouches:load",this.__boundTouchInitTrackTouches)}},__touchInitTrackTouches:function(){this.options.discontinuousPreviousNext=true;
this.options.continuous=false;this._shouldBeContinuous=false;this.__boundTouchTrackEvents=this.__touchTrackEvents.bindAsEventListener(this);
this.__maskWidth=this.__mask.getWidth()||0;this.view.view().trackTouches(this.__boundTouchTrackEvents,this.__boundTouchTrackEvents,this.__boundTouchTrackEvents,{stopEvent:"horizontal",stopThreshold:10})
},__touchTrackEvents:function(c){var d=this.view.view();d.setVendorPrefixStyle("transition-duration","0");
if(c.startCoords&&c.coords){if(c.difference&&typeof this.__touchTrackedStartOffset!=="undefined"){d.setVendorPrefixTransform(this.__touchTrackingNewLeft(c)+"px")
}else{this.__touchStart(c)}if(c.touches.length===0){this.__touchEnd(c)}}},__touchStart:function(f){var e=this.view.view(),d;
this.__storedShouldAnimateContentChange=this.options.shouldAnimateContentChange;
this.options.shouldAnimateContentChange=false;if(typeof this.__touchAnimateAfterTouchEnd!=="undefined"){this.__touchAnimateAfterTouchEnd(false)
}d=e.translateOffset();if(d===null||typeof d!=="object"){this.__touchTrackedStartOffset=0
}else{this.__touchTrackedStartOffset=d.x}},__touchEnd:function(p){var j=this.view.view(),l=p.difference.abs.x/this.__maskWidth,m=p.difference.current.x/this.__maskWidth,n=this.options.animationDuration||0.4,k,q,o;
if(m>0.4||p.speed>=7){if(p.direction.x==="right"){k=this.getNextSection()}else{if(p.direction.x==="left"){k=this.getPreviousSection()
}}}this.__touchSetTransitionEnd(j,k);if(k===false||typeof k==="undefined"){this._animate(this.__touchTrackedStartOffset,n*l)
}else{q=(k.content.positionedOffset()[0])*-1;if(l>=0.5){n*=0.5}this._animate(q,n)
}if(p.difference.abs.x>5&&typeof this.__slideshow==="object"&&typeof this.__slideshow.userInteracted==="function"){this.__slideshow.userInteracted()
}delete this.__touchTrackedStartOffset},__touchSetTransitionEnd:function(d,e){var f=function(a){if(a!==false){this.show(e)
}this.options.shouldAnimateContentChange=this.__storedShouldAnimateContentChange;
delete this.__storedShouldAnimateContentChange;d.removeVendorEventListener("transitionEnd",this.__touchAnimateAfterTouchEnd,false);
delete this.__touchAnimateAfterTouchEnd};this.__touchAnimateAfterTouchEnd=f.bindAsEventListener(this);
d.addVendorEventListener("transitionEnd",this.__touchAnimateAfterTouchEnd,false)
},__touchTrackingNewLeft:function(g){var f=this.isAtEnd(this.currentSection),e,h;
e=function(a,b){var d,c,k;d=function(j){return(j==1)?1:1-Math.pow(2,-3*j)};k=a/b;
c=parseFloat(d(k)*(b/3));return c};if(f!==false&&(f==="left"&&g.difference.x<0)||(f==="right"&&g.difference.x>0)){h=e(g.difference.abs.x,this.__maskWidth);
if(f==="left"){h*=-1}}else{h=g.difference.x}return this.__touchTrackedStartOffset-h
},isAtEnd:function(c){var d=this.orderedSections.indexOf(c.id);if(d===0){return"left"
}else{if(d===this.orderedSections.length-1){return"right"}}return false},getNextSection:function($super){if(this.options.continuous){this._shouldBeContinuous=true
}return $super()},getPreviousSection:function($super){if(this.options.continuous){this._shouldBeContinuous=true
}return $super()},willShow:function($super,d,f,e){if(this.options.shouldAddActiveClassToContent===true){if(f){f.removeClassName("active")
}if(e){e.content.addClassName("active")}}return $super(d,f,e)},__fixScrollLeft:function(b){if(this.__fixScrollLeftCounter===undefined||(b&&b.type&&b.type==="load")){this.__fixScrollLeftCounter=0
}if(this.__mask.scrollLeft!==0||this.__fixScrollLeftCounter<5){this.__mask.scrollLeft=0;
this.__fixScrollLeftCounter++;window.setTimeout(this.__boundFixScrollLeft,10)}},willAnimate:function($super,g,m,h,j){this.__boundFixScrollLeft=this.__fixScrollLeft.bind(this);
window.setTimeout(this.__boundFixScrollLeft,50);Event.observe(window,"load",this.__boundFixScrollLeft);
var k=g.view().offsetLeft||0,l=-h.offsetLeft||0;if(k!==l){this._didShowInitial=true;
$super(g,m,h,j);this._didShowInitial=false}else{$super(g,m,h,j)}this.willAnimate=$super
},_animate:function(f,d){var e=this.view.view();if(d==0){e.setVendorPrefixStyle("transition","none")
}else{e.setVendorPrefixStyle("transition","-webkit-transform "+d+"s cubic-bezier(0,0,0.25,1)")
}e.setAttribute("left",f);if(AC.Detector.supportsThreeD()){e.setVendorPrefixStyle("transform","translate3d("+f+"px, 0, 0)")
}else{e.setVendorPrefixStyle("transform","translate("+f+"px, 0)")}},_animation:function(u,w,z,A,p,y){var r=u.view(),B=r.offsetLeft||0,s=-z.offsetLeft||0;
z.setOpacity(1);if(this._shouldBeContinuous){var x=this.indexOfSection(u.delegate.currentSection),v=this.indexOfSection(u.delegate.previousSection);
var C=s;if((x===0)&&(v===this.orderedSections.length-1)){s=(w.positionedOffset()[0]+w.getWidth())*-1;
this._continuousCloneElement=this._continuousClone(u,z,s)}else{if((x===this.orderedSections.length-1)&&(v===0)){s=(w.positionedOffset()[0]-w.getWidth())*-1;
this._continuousCloneElement=this._continuousClone(u,z,s)}}}var q=this;if(AC.Detector.isCSSAvailable("transition")&&AC.Detector.isCSSAvailable("transform")){this._animate(s,y);
var t=function(a){if(a.target==r&&a.propertyName.match(/transform$/i)){r.removeVendorEventListener("transitionEnd",t,false);
q._continuousReset(C,u);A()}};r.addVendorEventListener("transitionEnd",t,false)
}else{return new Effect.Move(r,{x:s-B,y:0,duration:y,afterFinish:function(){q._continuousReset(C,u);
A()},queue:{scope:p}})}},_continuousClone:function(e,f,h){if(this._shouldBeContinuous){var g=f.cloneNode(true);
g.id=g.id+"-clone";g.innerHTML=f.innerHTML;g.setStyle("position: absolute; top: 0; left:"+(h*-1)+"px");
e._view.insert(g);return g}else{return false}},_continuousReset:function(c,d){if(this._shouldBeContinuous){d._view.setAttribute("left",c);
if(AC.Detector.isCSSAvailable("transition")&&AC.Detector.isCSSAvailable("transform")){d._view.setVendorPrefixStyle("transition","none");
if(AC.Detector.supportsThreeD()){d._view.setVendorPrefixStyle("transform","translate3d("+c+"px, 0, 0)")
}else{d._view.setVendorPrefixStyle("transform","translate("+c+"px, 0)")}}else{d._view.setStyle("left:"+c+"px")
}delete this._shouldBeContinuous}if(this._continuousCloneElement){if(this._removeContinuousCloneElement){this._continuousCloneElement.remove();
delete this._continuousCloneElement;delete this._removeContinuousCloneElement}else{this._removeContinuousCloneElement=true
}}}});AC.loadRemoteContent=function(m,k,q,l,s,o){if(typeof m!=="string"){return
}if(typeof k!=="boolean"){k=true}if(typeof q!=="boolean"){q=true}var n=arguments.callee;
var p=n._loadArgumentsByUrl[m];if(!p){n._loadArgumentsByUrl[m]={contentURL:m,importScripts:k,importCSS:q,callback:l,context:s,delegate:o};
var r={method:"get",onSuccess:arguments.callee.loadTemplateHTMLFromRequest,onFailure:arguments.callee.failedToadTemplateHTMLFromRequest,onException:function(b,a){throw (a)
}};if(!m.match(/\.json$/)){r.requestHeaders={Accept:"text/xml"};r.onCreate=function(a){a.request.overrideMimeType("text/xml")
}}new Ajax.Request(m,r)}};AC.loadRemoteContent._loadArgumentsByUrl={};AC.loadRemoteContent.loadTemplateHTMLFromRequest=function(F){var D=F.request.url;
var w=arguments.callee;var A=AC.loadRemoteContent._loadArgumentsByUrl[D];var s=window.document;
var y=F.responseXMLValue().documentElement;if(AC.Detector.isIEStrict()){y=y.ownerDocument
}var s=window.document;var x=document.createDocumentFragment();if(A.importScripts){AC.loadRemoteContent.importScriptsFromXMLDocument(y,x,A)
}if(A.importCSS){AC.loadRemoteContent.importCssFromXMLDocumentAtLocation(y,D,A)
}var r=null;var G=null;var B=y.getElementsByTagName("body")[0];if(!B){return}B.normalize();
var G=Element.Methods.childNodeWithNodeTypeAtIndex(B,Node.ELEMENT_NODE,0);if(G){r=s._importNode(G,true);
if(r.cleanSpaces){r.cleanSpaces(true)}}else{if(B.cleanSpaces){B.cleanSpaces(true)
}else{if(typeof B.normalize==="function"){B.normalize()}}var z=B.childNodes;r=s.createDocumentFragment();
var v=/\S/;for(var C=0,E=0;(E=z[C]);C++){var u=s._importNode(E,true);r.appendChild(u)
}}var t=A.callback;t(r,x,A.context)};AC.loadRemoteContent.javascriptTypeValueRegExp=new RegExp("text/javascript","i");
AC.loadRemoteContent.javascriptLanguageValueRegExp=new RegExp("javascript","i");
AC.loadRemoteContent.documentScriptsBySrc=function(){if(!AC.loadRemoteContent._documentScriptsBySrc){AC.loadRemoteContent._documentScriptsBySrc={};
var h=document.getElementsByTagName("script");if(!h||h.length===0){return AC.loadRemoteContent._documentScriptsBySrc
}for(var o=0,j=null;(j=h[o]);o++){var n=j.getAttribute("type");var l=null;var k=j.getAttribute("language");
if(!this.javascriptTypeValueRegExp.test(n)&&!this.javascriptLanguageValueRegExp.test(k)){continue
}if(j.hasAttribute){var m=j.hasAttribute("src")}else{var m=Element.Methods.hasAttribute(j,"src")
}if(m){var l=j.getAttribute("src");AC.loadRemoteContent._documentScriptsBySrc[l]=l
}}}return AC.loadRemoteContent._documentScriptsBySrc};AC.loadRemoteContent.importScriptsFromXMLDocument=function(C,N,x){var K=C.getElementsByTagName("script"),J,I,B,w,M=x.contentURL,y=x.delegate,L=x.context,O=(y&&typeof y.shouldImportScriptForContentURL==="function"),z=navigator.userAgent.toLowerCase(),v=(AC.Detector.isIEStrict()&&parseInt(z.substring(z.lastIndexOf("msie ")+5))<9),H=true;
if(!N){N=document.createDocumentFragment()}var F=AC.loadRemoteContent.documentScriptsBySrc();
for(var A=0,E=null;(E=K[A]);A++){J=E.getAttribute("type");I=null;H=true;B=E.getAttribute("language");
if(!this.javascriptTypeValueRegExp.test(J)&&!this.javascriptLanguageValueRegExp.test(B)){continue
}if(E.hasAttribute){w=E.hasAttribute("src");I=E.getAttribute("src")}else{I=E.getAttribute("src");
w=((I!=null)&&(I!==""))}if(E.getAttribute("id")==="Redirect"||(O&&!y.shouldImportScriptForContentURL(E,M,L))){continue
}if(w){if(!F.hasOwnProperty(I)){var D=document.createElement("script");D.setAttribute("type","text/javascript");
if(v){D.tmp_src=I;D.onreadystatechange=function(){var b=window.event.srcElement,a;
if(!b.isLoaded&&((b.readyState=="complete")||(b.readyState=="loaded"))){a=b.tmp_src;
if(a){b.tmp_src=null;b.src=a;b.isLoaded=false}else{b.onreadystatechange=null;b.isLoaded=true
}}}}else{D.src=I}AC.loadRemoteContent._documentScriptsBySrc[I]=I;N.appendChild(D)
}}else{var D=document.createElement("script");D.setAttribute("type","text/javascript");
if(v){var G=new Function(E.text);D.onreadystatechange=function(){var a=window.event.srcElement;
if(!a.isLoaded&&((a.readyState=="complete")||(a.readyState=="loaded"))){a.onreadystatechange=null;
a.isLoaded=true;G()}}}else{D.text=E.text}AC.loadRemoteContent._documentScriptsBySrc[I]=I;
N.appendChild(D)}}return N};AC.loadRemoteContent.insertScriptFragment=function(m){if(!m){return
}AC.isDomReady=false;Event._domReady.done=false;var n=document.getElementsByTagName("head")[0],k=m.childNodes,h,o,j=function(){var a;
if(!window.event||((a=window.event.srcElement)&&(a.isLoaded||((typeof a.isLoaded==="undefined")&&((a.readyState=="complete")||(a.readyState=="loaded")))))){arguments.callee.loadedCount++;
if(a&&!a.isLoaded){a.onreadystatechange=null;a.isLoaded=true}if(arguments.callee.loadedCount===arguments.callee.loadingCount){Event._domReady()
}}};j.loadedCount=0;j.loadingCount=m.childNodes.length;for(o=0;(h=k[o]);o++){if(h.addEventListener){h.addEventListener("load",j,false)
}else{if(typeof h.onreadystatechange==="function"){var l=h.onreadystatechange;h.onreadystatechange=function(b){var a=window.event.srcElement;
l.call(a);j()}}else{h.onreadystatechange=j}}}n.appendChild(m);n=null};AC.loadRemoteContent.documentLinksByHref=function(){if(!AC.loadRemoteContent._documentLinksByHref){AC.loadRemoteContent._documentLinksByHref={};
var g=document.getElementsByTagName("link");if(!g||g.length===0){return AC.loadRemoteContent._documentLinksByHref
}for(var m=0,k=null;(k=g[m]);m++){var l=k.getAttribute("type");if(k.type.toLowerCase()!=="text/css"){continue
}var j=null;if(k.hasAttribute){var h=k.hasAttribute("href")}else{var h=Element.hasAttribute(k,"href")
}if(h){var j=k.getAttribute("href");AC.loadRemoteContent._documentLinksByHref[j]=j
}}}return AC.loadRemoteContent._documentLinksByHref};AC.loadRemoteContent.__importCssElementInHeadFromLocation=function(o,m,r){var p=(o.tagName.toUpperCase()==="LINK");
if(p){var n=o.getAttribute("type");if(!n||n&&n.toLowerCase()!=="text/css"){return
}var q=o.getAttribute("href");if(!q.startsWith("http")&&!q.startsWith("/")){var k=q;
if(r.pathExtension().length>0){r=r.stringByDeletingLastPathComponent()}q=r.stringByAppendingPathComponent(k)
}if(AC.Detector.isIEStrict()){var s=window.document.createStyleSheet(q,1)}else{var l=window.document.importNode(o,true);
l.href=q}AC.loadRemoteContent.documentLinksByHref()[q]=q}if(!AC.Detector.isIEStrict()||(AC.Detector.isIEStrict()&&!p)){m.insertBefore(l,m.firstChild)
}};AC.loadRemoteContent.importCssFromXMLDocumentAtLocation=function(l,r,m){var k=window.document.getElementsByTagName("head")[0];
var q=[];q.addObjectsFromArray(l.getElementsByTagName("style"));q.addObjectsFromArray(l.getElementsByTagName("link"));
if(q){var p=AC.loadRemoteContent.documentLinksByHref();for(var o=0,n=null;(n=q[o]);
o++){var s=n.getAttribute("href");if(p.hasOwnProperty(s)){continue}this.__importCssElementInHeadFromLocation(n,k,r)
}}};Ajax.Request.prototype._overrideMimeType=null;Ajax.Request.prototype.overrideMimeType=function(b){this._overrideMimeType=b;
if(this.transport.overrideMimeType){this.transport.overrideMimeType(b)}};Ajax.Request.prototype._doesOverrideXMLMimeType=function(){return(this._overrideMimeType==="text/xml")
};Ajax.Response.prototype.responseXMLValue=function(){if(AC.Detector.isIEStrict()){var b=this.transport.responseXML.documentElement;
if(!b&&this.request._doesOverrideXMLMimeType()){this.transport.responseXML.loadXML(this.transport.responseText)
}}return this.transport.responseXML};
if(typeof AC==="undefined"){var AC={}}AC.AutoGallery=Object.synthesize({__classNames:{wrapper:"autogallery",view:"gallery-view",content:"gallery-content"},__specialSwapViewTriggers:["next","previous","SwapViewFirstSection","SwapViewPreviousSelection"],galleries:{},slideshows:{},_classPrefix:"autogallery-",setClassPrefix:function(b){if(typeof b==="string"){this._classPrefix=b
}return this._classPrefix},initialize:function(){$$("."+this.__classNames.wrapper).each(function(b){this.__setUpGallery(b)
}.bind(this))},__setUpGallery:function(i){var l,g,h,k,j;l=this.Types.Registries.gallery.match(i,this._classPrefix);
g=l.getOptions();h=i.down("."+this.__classNames.view);if(this.__galleryViewIsValid(h)){k=i.select("."+this.__classNames.content);
k=k.concat(i.select("a."+h.id));k=this.__parseContent(k);j=l.context.viewer||AC.ViewMaster.Viewer;
this.galleries[h.id]=new j(k,h.id,h.id,g);this.galleries[h.id].__type=l;this.galleries[h.id].__wrapper=i;
this.__setUpDelegate(h,l);this.__setUpSlideshow(h,i)}},__galleryViewIsValid:function(d){if(!Object.isElement(d)){try{console.error("View element not found for gallery.")
}catch(c){}return false}if(typeof d.id!=="string"||d.id===""){try{console.error("Valid ID not found on view for gallery.")
}catch(c){}return false}if(typeof this.galleries[d.id]!=="undefined"){try{console.error('View ID "'+d.id+'" is not unique.')
}catch(c){}return false}return true},__setUpDelegate:function(h,j){var g=this,k={},l=this.__classNames.content,i;
i=function(a){if(typeof a==="object"&&a.__autogalleryAddedGalleryContentClassName!==true&&"content" in a&&Object.isElement(a.content)){a.content.addClassName(l);
a.__autogalleryAddedGalleryContentClassName=true}};k.manageZ=function(e,d,q,c,b,f){var p=(typeof c==="number")?c-1:"",a,r;
for(r in g.galleries){a=g.galleries[r];if(a.triggerClassName!==e.triggerClassName){if(a.__wrapper){a.__wrapper.style.zIndex=p
}if(a.view.view()){a.view.view().style.zIndex=p}if(a.currentSection&&a.currentSection.content){a.currentSection.content.style.zIndex=p
}}}if(typeof j.context.delegate==="object"){if(typeof j.context.delegate.manageZ==="function"){j.context.delegate.manageZ(e,d,q,c,b,f)
}}};k.willShow=function(c,a,b){i(b);if(typeof j.context.delegate==="object"){if(typeof j.context.delegate.willShow==="function"){j.context.delegate.willShow(c,a,b)
}}};k.didShow=function(c,a,b){i(b);if(typeof j.context.delegate==="object"){if(typeof j.context.delegate.didShow==="function"){j.context.delegate.didShow(c,a,b)
}}};if(typeof j.context.delegate==="object"){Object.extend(k,j.context.delegate)
}this.galleries[h.id].setDelegate(k)},__setUpSlideshow:function(e,f){var d;if(f.className.match("(^|\\s)"+this._classPrefix+"slideshow(-|\\s|$)")){d=this.Types.Registries.slideshow.match(f,this._classPrefix+"slideshow-");
this.slideshows[e.id]=new AC.ViewMaster.Slideshow(this.galleries[e.id],this._classPrefix+"slideshow-trigger",d.getOptions());
this.slideshows[e.id].__type=d}},addType:function(j,f,h,g,i){this.Types.Registries.gallery.addType(j,f,h,g,i)
},addSlideshowType:function(j,f,h,g,i){this.Types.Registries.slideshow.addType(j,f,h,g,i)
},__parseContent:function(k){var i,h,e=[],l=[];for(h=0;h<k.length;h++){if(k[h].hasClassName(this.__classNames.content)){i=k[h].getAttribute("id")
}else{i=k[h].getAttribute("href");if(!!i.match("#")){i=i.split("#")[1]}else{try{console.error("ID for trigger was not found in HREF.")
}catch(j){}}}if(typeof i==="string"&&i!==""){if(!this.__specialSwapViewTriggers.include(i)){if(!l.include(i)){l.push(i);
e.push(k[h])}}}else{try{console.error("ID for section was not valid.")}catch(j){}}}return e
},logTypes:function(){var h=0,f,e;try{console.log("----------------------------------")
}catch(g){}try{console.log("	Gallery Types")}catch(g){}try{console.log("----------------------------------")
}catch(g){}for(f in this.galleries){if(this.galleries.hasOwnProperty(f)){h++;try{console.log(h+". "+f+": "+this.galleries[f].__type.name)
}catch(g){}}}if(h===0){try{console.log("(none)")}catch(g){}}try{console.log("")
}catch(g){}h=0;try{console.log("----------------------------------")}catch(g){}try{console.log("	Slideshow Types")
}catch(g){}try{console.log("----------------------------------")}catch(g){}for(e in this.slideshows){if(this.slideshows.hasOwnProperty(e)){h++;
try{console.log(h+". "+e+": "+this.slideshows[e].__type.name)}catch(g){}}}if(h===0){try{console.log("(none)")
}catch(g){}}try{console.log("")}catch(g){}}});AC.AutoGallery.Types={};AC.AutoGallery.Types.Registry=Class.create({__reservedNames:["trigger"],initialize:function(){this.__model=[];
this.__lookup={}},addType:function(n,e,k,i,m){if(this.__reservedNames.indexOf(n)!==-1){try{console.error("Cannot add type: Type name is reserved: "+n)
}catch(j){}return}if(typeof e!=="object"){e={}}if(typeof n==="string"){var l=this.__lookup[i]||this.__lookup._base;
if(typeof this.__lookup[n]!=="undefined"){try{console.error("Cannot overwrite existing Type: "+n)
}catch(j){}return}this.__lookup[n]=new AC.AutoGallery.Types.Type(n,e,k,l,m);if(typeof this.__model[this.__lookup[n].level()]==="undefined"){this.__model[this.__lookup[n].level()]=[]
}this.__model[this.__lookup[n].level()].push(this.__lookup[n])}else{if(typeof n!=="string"){try{console.error("Cannot add type: Type Name must be a string.")
}catch(j){}}}},match:function(e,h){var f=null;if(!Object.isElement(e)){try{console.error("An element is required to match against a type.")
}catch(g){}return false}if(typeof h!=="string"){h=""}f=this.__matchName(e,h);if(f!==null){return f
}f=this.__matchQualifier(e,h);if(f!==null){return f}if(typeof this.__model[1]!=="undefined"){if(typeof this.__model[0]!=="undefined"){f=this.__model[1][0]
}else{try{console.error("Catchall Type not defined")}catch(g){}}}else{try{console.error("No non-_base types defined at index 1.")
}catch(g){}}return f},__matchName:function(j,i){var e,g;for(e=this.__model.length-1;
e>=0;e--){if(typeof this.__model[e]!=="undefined"){for(g=this.__model[e].length-1;
g>=0;g--){if(j.hasClassName(i+this.__model[e][g].name)){return this.__model[e][g]
}}}else{try{console.error("No array of types exists at this level.")}catch(h){}}}return null
},__matchQualifier:function(j,i){var e,g;for(e=this.__model.length-1;e>=0;e--){if(typeof this.__model[e]!=="undefined"){for(g=this.__model[e].length-1;
g>=0;g--){if(typeof this.__model[e][g].qualifier==="function"){if(this.__model[e][g].qualifier(j,i)===true){return this.__model[e][g]
}}else{try{console.error("Qualifier for "+this.__model[e][g].name+" is not a function.")
}catch(h){}}}}else{try{console.error("No array of types exists at this level.")
}catch(h){}}}return null},reserveName:function(d){if(typeof d==="string"){if(this.__lookup.indexOf(d)===-1){this.__reservedNames.push(d)
}else{try{console.error("Cannot reserve name: Type with name already exists.")}catch(c){}}}else{try{console.error("Cannot reserve name: Name must be a string")
}catch(c){}}}});AC.AutoGallery.Types.Type=Class.create({initialize:function(f,g,h,i,j){this.name=f;
this.options=g||{};this.qualifier=typeof h==="function"?h:Prototype.emptyFunction;
this.parent=i;this.context=j||{};this.level()},getOptions:function(){var b=(typeof this.parent==="undefined")?{}:this.parent.getOptions();
return Object.extend(b,this.options)},__level:null,level:function(){if(this.name==="_base"){return 0
}else{if(typeof this.parent==="undefined"||typeof this.parent.name==="_base"){return 1
}else{return this.parent.level()+1}}}});AC.AutoGallery.Types.Registries={};AC.AutoGallery.Types.Registries.gallery=new AC.AutoGallery.Types.Registry();
AC.AutoGallery.Types.Registries.slideshow=new AC.AutoGallery.Types.Registry();AC.AutoGallery.addType("_base",{manageZ:true,heightFromFirstSection:true,silentTriggers:true,imageLinkAutoCaptions:true,addSectionIdAsClassName:true,useHTML5Tags:true});
AC.AutoGallery.addType("image",{useKeyboardNav:true,discontinuousPreviousNext:true});
AC.AutoGallery.addType("image-fadein",{shouldAnimateFadeIn:true},Prototype.emptyFunction,"image");
AC.AutoGallery.addType("slide",{useKeyboardNav:true,discontinuousPreviousNext:true,useTouchEvents:true},function(j,h){var g,f,i;
g=j.down("."+AC.AutoGallery.__classNames.view);if(Object.isElement(g)){f=g.getWidth();
i=j.getWidth();if(f>=i*2){return true}}return false},"_base",{viewer:AC.ViewMaster.SlideViewer});
AC.AutoGallery.addType("video",{manageZ:1010,showFirstOnStopMovie:true,ensureInView:true,escapeToClose:true},function(j,i){var g,h,f;
g=j.down("."+AC.AutoGallery.__classNames.view);if(Object.isElement(g)){h=g.getAttribute("id");
if(typeof h==="string"&&typeof g.down("a."+h)!=="undefined"){return true}}return false
});AC.AutoGallery.addSlideshowType("_base",{autoplay:true,stopOnUserInteraction:true});
AC.AutoGallery.addSlideshowType("standard",{discontinuousPreviousNext:false,stopAfterReturnToSection:false});
AC.AutoGallery.addSlideshowType("hero",{autoplay:2000,delay:7000,stopAfterReturnToSection:0,discontinuousPreviousNext:false});
Event.onDOMReady(function(){if(typeof AC.ViewMaster.Tracker==="function"){if(typeof window.tracker==="undefined"){window.tracker=new AC.ViewMaster.Tracker("click")
}}else{try{console.warn("http://www.sonorite.jp/js/pagingview.js needs to be included on this page.")
}catch(b){}}AC.AutoGallery.initialize()});

		Event.onDOMReady(function() {
			var heroGallery = new AC.ViewMaster.Viewer($$('#slideshow-default'), 'hero-vid', 'hero-vid', {
				manageZ: 1010,
				showFirstOnStopMovie: true,
				ensureInView: true,
				escapeToClose: true,
				heightFromFirstSection: true,
				silentTriggers: true,
				imageLinkAutoCaptions: true,
				addSectionIdAsClassName: true,
				useHTML5Tags: true });
		});
