var JSON;if(!JSON){JSON={};}
(function(){"use strict";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){if(typeof rep[i]==='string'){k=rep[i];v=str(k,value);if(v){partial.push(quote(k)+(gap?': ':':')+v);}}}}else{for(k in value){if(Object.prototype.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.prototype.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');};}}());
;/*

jQuery Browser Plugin
	* Version 2.3
	* 2008-09-17 19:27:05
	* URL: http://jquery.thewikies.com/browser
	* Description: jQuery Browser Plugin extends browser detection capabilities and can assign browser selectors to CSS classes.
	* Author: Nate Cavanaugh, Minhchau Dang, & Jonathan Neal
	* Copyright: Copyright (c) 2008 Jonathan Neal under dual MIT/GPL license.
	* JSLint: This javascript file passes JSLint verification.
*//*jslint
		bitwise: true,
		browser: true,
		eqeqeq: true,
		forin: true,
		nomen: true,
		plusplus: true,
		undef: true,
		white: true
*//*global
		jQuery
*/

(function ($) {
	$.browserTest = function (a, z) {
		var u = 'unknown', x = 'X', m = function (r, h) {
			for (var i = 0; i < h.length; i = i + 1) {
				r = r.replace(h[i][0], h[i][1]);
			}

			return r;
		}, c = function (i, a, b, c) {
			var r = {
				name: m((a.exec(i) || [u, u])[1], b)
			};

			r[r.name] = true;

			r.version = (c.exec(i) || [x, x, x, x])[3];

			if (r.name.match(/safari/) && r.version > 400) {
				r.version = '2.0';
			}

			if (r.name === 'presto') {
				r.version = ($.browser.version > 9.27) ? 'futhark' : 'linear_b';
			}
			r.versionNumber = parseFloat(r.version, 10) || 0;
			r.versionX = (r.version !== x) ? (r.version + '').substr(0, 1) : x;
			r.className = r.name + r.versionX;

			return r;
		};

		a = (a.match(/Opera|Navigator|Minefield|KHTML|Chrome/) ? m(a, [
			[/(Firefox|MSIE|KHTML,\slike\sGecko|Konqueror)/, ''],
			['Chrome Safari', 'Chrome'],
			['KHTML', 'Konqueror'],
			['Minefield', 'Firefox'],
			['Navigator', 'Netscape']
		]) : a).toLowerCase();

		$.browser = $.extend((!z) ? $.browser : {}, c(a, /(camino|chrome|firefox|netscape|konqueror|lynx|msie|opera|safari)/, [], /(camino|chrome|firefox|netscape|netscape6|opera|version|konqueror|lynx|msie|safari)(\/|\s)([a-z0-9\.\+]*?)(\;|dev|rel|\s|$)/));

		$.layout = c(a, /(gecko|konqueror|msie|opera|webkit)/, [
			['konqueror', 'khtml'],
			['msie', 'trident'],
			['opera', 'presto']
		], /(applewebkit|rv|konqueror|msie)(\:|\/|\s)([a-z0-9\.]*?)(\;|\)|\s)/);

		$.os = {
			name: (/(win|mac|linux|sunos|solaris|iphone)/.exec(navigator.platform.toLowerCase()) || [u])[0].replace('sunos', 'solaris')
		};

		if (!z) {
			$('html').addClass([$.os.name, $.browser.name, $.browser.className, $.layout.name, $.layout.className].join(' '));
		}
	};

	$.browserTest(navigator.userAgent);
})(oop.$);
;(function($){$.setBrowserVersion=function(){var browserVersion=$.browser.name+''+$.browser.version.replace(/\./g,"").substr(0,2);$('html').addClass(browserVersion);};$.setBrowserVersion();})(oop.$);
;/* Copyright (c) 2008 Brandon Aaron (http://brandonaaron.net)
 * Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php)
 * and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.
 *
 * Version: 1.0.3
 * Requires jQuery 1.1.3+
 * Docs: http://docs.jquery.com/Plugins/livequery
 */
(function($){$.extend($.fn,{livequery:function(type,fn,fn2){var self=this,q;if($.isFunction(type))
fn2=fn,fn=type,type=undefined;$.each($.livequery.queries,function(i,query){if(self.selector==query.selector&&self.context==query.context&&type==query.type&&(!fn||fn.$lqguid==query.fn.$lqguid)&&(!fn2||fn2.$lqguid==query.fn2.$lqguid))
return(q=query)&&false;});q=q||new $.livequery(this.selector,this.context,type,fn,fn2);q.stopped=false;q.run();return this;},expire:function(type,fn,fn2){var self=this;if($.isFunction(type))
fn2=fn,fn=type,type=undefined;$.each($.livequery.queries,function(i,query){if(self.selector==query.selector&&self.context==query.context&&(!type||type==query.type)&&(!fn||fn.$lqguid==query.fn.$lqguid)&&(!fn2||fn2.$lqguid==query.fn2.$lqguid)&&!this.stopped)
$.livequery.stop(query.id);});return this;}});$.livequery=function(selector,context,type,fn,fn2){this.selector=selector;this.context=context||document;this.type=type;this.fn=fn;this.fn2=fn2;this.elements=[];this.stopped=false;this.id=$.livequery.queries.push(this)-1;fn.$lqguid=fn.$lqguid||$.livequery.guid++;if(fn2)fn2.$lqguid=fn2.$lqguid||$.livequery.guid++;return this;};$.livequery.prototype={stop:function(){var query=this;if(this.type)
this.elements.unbind(this.type,this.fn);else if(this.fn2)
this.elements.each(function(i,el){query.fn2.apply(el);});this.elements=[];this.stopped=true;},run:function(){if(this.stopped)return;var query=this;var oEls=this.elements,els=$(this.selector,this.context),nEls=els.not(oEls);this.elements=els;if(this.type){nEls.bind(this.type,this.fn);if(oEls.length>0)
$.each(oEls,function(i,el){if($.inArray(el,els)<0)
$.event.remove(el,query.type,query.fn);});}
else{nEls.each(function(){query.fn.apply(this);});if(this.fn2&&oEls.length>0)
$.each(oEls,function(i,el){if($.inArray(el,els)<0)
query.fn2.apply(el);});}}};$.extend($.livequery,{guid:0,queries:[],queue:[],running:false,timeout:null,checkQueue:function(){if($.livequery.running&&$.livequery.queue.length){var length=$.livequery.queue.length;while(length--)
$.livequery.queries[$.livequery.queue.shift()].run();}},pause:function(){$.livequery.running=false;},play:function(){$.livequery.running=true;$.livequery.run();},registerPlugin:function(){$.each(arguments,function(i,n){if(!$.fn[n])return;var old=$.fn[n];$.fn[n]=function(){var r=old.apply(this,arguments);$.livequery.run();return r;}});},run:function(id){if(id!=undefined){if($.inArray(id,$.livequery.queue)<0)
$.livequery.queue.push(id);}
else
$.each($.livequery.queries,function(id){if($.inArray(id,$.livequery.queue)<0)
$.livequery.queue.push(id);});if($.livequery.timeout)clearTimeout($.livequery.timeout);$.livequery.timeout=setTimeout($.livequery.checkQueue,20);},stop:function(id){if(id!=undefined)
$.livequery.queries[id].stop();else
$.each($.livequery.queries,function(id){$.livequery.queries[id].stop();});}});$.livequery.registerPlugin('append','prepend','after','before','wrap','attr','removeAttr','addClass','removeClass','toggleClass','empty','remove');$(function(){$.livequery.play();});var init=$.prototype.init;$.prototype.init=function(a,c){var r=init.apply(this,arguments);if(a&&a.selector)
r.context=a.context,r.selector=a.selector;if(typeof a=='string')
r.context=c||document,r.selector=a;return r;};$.prototype.init.prototype=$.prototype;})(oop.$);
;if(typeof Object.create!=="function"){Object.create=function(b){function a(){}a.prototype=b;return new a()}}var ua={toString:function(){return navigator.userAgent},test:function(a){return this.toString().toLowerCase().indexOf(a.toLowerCase())>-1}};ua.version=(ua.toString().toLowerCase().match(/[\s\S]+(?:rv|it|ra|ie)[\/: ]([\d.]+)/)||[])[1];ua.webkit=ua.test("webkit");ua.gecko=ua.test("gecko")&&!ua.webkit;ua.opera=ua.test("opera");ua.ie=ua.test("msie")&&!ua.opera;ua.ie6=ua.ie&&document.compatMode&&typeof document.documentElement.style.maxHeight==="undefined";ua.ie7=ua.ie&&document.documentElement&&typeof document.documentElement.style.maxHeight!=="undefined"&&typeof XDomainRequest==="undefined";ua.ie8=ua.ie&&typeof XDomainRequest!=="undefined";var domReady=function(){var a=[];var b=function(){if(!arguments.callee.done){arguments.callee.done=true;for(var c=0;c<a.length;c++){a[c]()}}};if(document.addEventListener){document.addEventListener("DOMContentLoaded",b,false)}if(ua.ie){(function(){try{document.documentElement.doScroll("left")}catch(c){setTimeout(arguments.callee,50);return}b()})();document.onreadystatechange=function(){if(document.readyState==="complete"){document.onreadystatechange=null;b()}}}if(ua.webkit&&document.readyState){(function(){if(document.readyState!=="loading"){b()}else{setTimeout(arguments.callee,10)}})()}window.onload=b;return function(c){if(typeof c==="function"){a[a.length]=c}return c}}();var cssHelper=function(){var g={BLOCKS:/[^\s{][^{]*\{(?:[^{}]*\{[^{}]*\}[^{}]*|[^{}]*)*\}/g,BLOCKS_INSIDE:/[^\s{][^{]*\{[^{}]*\}/g,DECLARATIONS:/[a-zA-Z\-]+[^;]*:[^;]+;/g,RELATIVE_URLS:/url\(['"]?([^\/\)'"][^:\)'"]+)['"]?\)/g,REDUNDANT_COMPONENTS:/(?:\/\*([^*\\\\]|\*(?!\/))+\*\/|@import[^;]+;)/g,REDUNDANT_WHITESPACE:/\s*(,|:|;|\{|\})\s*/g,MORE_WHITESPACE:/\s{2,}/g,FINAL_SEMICOLONS:/;\}/g,NOT_WHITESPACE:/\S+/g};var k,j=false;var b=[];var t=function(u){if(typeof u==="function"){b[b.length]=u}};var m=function(){for(var u=0;u<b.length;u++){b[u](k)}};var c={};var n=function(y,u){if(c[y]){var x=c[y].listeners;if(x){for(var w=0;w<x.length;w++){x[w](u)}}}};var h=function(v,w,z){if(ua.ie&&!window.XMLHttpRequest){window.XMLHttpRequest=function(){return new ActiveXObject("Microsoft.XMLHTTP")}}if(!XMLHttpRequest){return""}var x=new XMLHttpRequest();try{x.open("get",v,true);x.setRequestHeader("X_REQUESTED_WITH","XMLHttpRequest")}catch(y){z();return}var u=false;setTimeout(function(){u=true},5000);document.documentElement.style.cursor="progress";x.onreadystatechange=function(){if(x.readyState===4&&!u){if(!x.status&&location.protocol==="file:"||(x.status>=200&&x.status<300)||x.status===304||navigator.userAgent.indexOf("Safari")>-1&&typeof x.status==="undefined"){w(x.responseText)}else{z()}document.documentElement.style.cursor="";x=null}};x.send("")};var f=function(u){u=u.replace(g.REDUNDANT_COMPONENTS,"");u=u.replace(g.REDUNDANT_WHITESPACE,"$1");u=u.replace(g.MORE_WHITESPACE," ");u=u.replace(g.FINAL_SEMICOLONS,"}");return u};var a={mediaQueryList:function(C){var u={};var B=C.indexOf("{");var y=C.substring(0,B);C=C.substring(B+1,C.length-1);var x=[],w=[];var v=y.toLowerCase().substring(7).split(",");for(var A=0;A<v.length;A++){x[x.length]=a.mediaQuery(v[A],u)}var z=C.match(g.BLOCKS_INSIDE);if(z!==null){for(A=0;A<z.length;A++){w[w.length]=a.rule(z[A],u)}}u.getMediaQueries=function(){return x};u.getRules=function(){return w};u.getListText=function(){return y};u.getCssText=function(){return C};return u},mediaQuery:function(D,C){D=D||"";var v=false,B;var x=[];var u=true;var A=D.match(g.NOT_WHITESPACE);for(var z=0;z<A.length;z++){var w=A[z];if(!B&&(w==="not"||w==="only")){if(w==="not"){v=true}}else{if(!B){B=w}else{if(w.charAt(0)==="("){var y=w.substring(1,w.length-1).split(":");x[x.length]={mediaFeature:y[0],value:y[1]||null}}}}}return{getList:function(){return C||null},getValid:function(){return u},getNot:function(){return v},getMediaType:function(){return B},getExpressions:function(){return x}}},rule:function(B,y){var u={};var z=B.indexOf("{");
var A=B.substring(0,z);var C=A.split(",");var v=[];var w=B.substring(z+1,B.length-1).split(";");for(var x=0;x<w.length;x++){v[v.length]=a.declaration(w[x],u)}u.getMediaQueryList=function(){return y||null};u.getSelectors=function(){return C};u.getSelectorText=function(){return A};u.getDeclarations=function(){return v};u.getPropertyValue=function(E){for(var D=0;D<v.length;D++){if(v[D].getProperty()===E){return v[D].getValue()}}return null};return u},declaration:function(x,y){var u=x.indexOf(":");var z=x.substring(0,u);var w=x.substring(u+1);return{getRule:function(){return y||null},getProperty:function(){return z},getValue:function(){return w}}}};var s=function(z){if(typeof z.cssHelperText!=="string"){return}var y={mediaQueryLists:[],rules:[],selectors:{},declarations:[],properties:{}};var E=y.mediaQueryLists;var D=y.rules;var u=z.cssHelperText.match(g.BLOCKS);if(u!==null){for(var C=0;C<u.length;C++){if(u[C].substring(0,7)==="@media "){E[E.length]=a.mediaQueryList(u[C]);D=y.rules=D.concat(E[E.length-1].getRules())}else{D[D.length]=a.rule(u[C])}}}var w=y.selectors;var v=function(H){var G=H.getSelectors();for(var F=0;F<G.length;F++){var I=G[F];if(!w[I]){w[I]=[]}w[I][w[I].length]=H}};for(C=0;C<D.length;C++){v(D[C])}var B=y.declarations;for(C=0;C<D.length;C++){B=y.declarations=B.concat(D[C].getDeclarations())}var x=y.properties;for(C=0;C<B.length;C++){var A=B[C].getProperty();if(!x[A]){x[A]=[]}x[A][x[A].length]=B[C]}z.cssHelperParsed=y;k[k.length]=z;return y};var d=function(v,u){v.cssHelperText=f(u||v.innerHTML);return s(v)};var r=function(){j=true;k=[];var B=[];var w=function(){for(var C=0;C<B.length;C++){s(B[C])}var D=document.getElementsByTagName("style");for(C=0;C<D.length;C++){d(D[C])}j=false;m()};var u=document.getElementsByTagName("link");for(var v=0;v<u.length;v++){var y=u[v];if(y.getAttribute("rel").indexOf("style")>-1&&y.href&&y.href.length!==0&&!y.disabled){B[B.length]=y}}if(B.length>0){var A=0;var x=function(){A++;if(A===B.length){w()}};var z=function(D){var C=D.href;h(C,function(E){E=f(E).replace(g.RELATIVE_URLS,"url("+C.substring(0,C.lastIndexOf("/"))+"/$1)");D.cssHelperText=E;x()},x)};for(v=0;v<B.length;v++){z(B[v])}}else{w()}};var l={mediaQueryLists:"array",rules:"array",selectors:"object",declarations:"array",properties:"object"};var q={mediaQueryLists:null,rules:null,selectors:null,declarations:null,properties:null};var i=function(w,u){if(q[w]!==null){if(l[w]==="array"){return(q[w]=q[w].concat(u))}else{var y=q[w];for(var x in u){if(u.hasOwnProperty(x)){if(!y[x]){y[x]=u[x]}else{y[x]=y[x].concat(u[x])}}}return y}}};var o=function(u){q[u]=(l[u]==="array")?[]:{};for(var v=0;v<k.length;v++){i(u,k[v].cssHelperParsed[u])}return q[u]};domReady(function(){var v=document.body.getElementsByTagName("*");for(var u=0;u<v.length;u++){v[u].checkedByCssHelper=true}if(document.implementation.hasFeature("MutationEvents","2.0")||window.MutationEvent){document.body.addEventListener("DOMNodeInserted",function(x){var w=x.target;if(w.nodeType===1){n("DOMElementInserted",w);w.checkedByCssHelper=true}},false)}else{setInterval(function(){var x=document.body.getElementsByTagName("*");for(var w=0;w<x.length;w++){if(!x[w].checkedByCssHelper){n("DOMElementInserted",x[w]);x[w].checkedByCssHelper=true}}},1000)}});var p=function(u){if(typeof window.innerWidth!="undefined"){return window["inner"+u]}else{if(typeof document.documentElement!="undefined"&&typeof document.documentElement.clientWidth!="undefined"&&document.documentElement.clientWidth!=0){return document.documentElement["client"+u]}}};return{addStyle:function(v,w){var u=document.createElement("style");u.setAttribute("type","text/css");document.getElementsByTagName("head")[0].appendChild(u);if(u.styleSheet){u.styleSheet.cssText=v}else{u.appendChild(document.createTextNode(v))}u.addedWithCssHelper=true;if(typeof w==="undefined"||w===true){cssHelper.parsed(function(x){var y=d(u,v);for(var z in y){if(y.hasOwnProperty(z)){i(z,y[z])}}n("newStyleParsed",u)})}else{u.parsingDisallowed=true}return u},removeStyle:function(u){return u.parentNode.removeChild(u)
},parsed:function(u){if(j){t(u)}else{if(typeof k!=="undefined"){if(typeof u==="function"){u(k)}}else{t(u);r()}}},mediaQueryLists:function(u){cssHelper.parsed(function(v){u(q.mediaQueryLists||o("mediaQueryLists"))})},rules:function(u){cssHelper.parsed(function(v){u(q.rules||o("rules"))})},selectors:function(u){cssHelper.parsed(function(v){u(q.selectors||o("selectors"))})},declarations:function(u){cssHelper.parsed(function(v){u(q.declarations||o("declarations"))})},properties:function(u){cssHelper.parsed(function(v){u(q.properties||o("properties"))})},broadcast:n,addListener:function(v,u){if(typeof u==="function"){if(!c[v]){c[v]={listeners:[]}}c[v].listeners[c[v].listeners.length]=u}},removeListener:function(x,w){if(typeof w==="function"&&c[x]){var u=c[x].listeners;for(var v=0;v<u.length;v++){if(u[v]===w){u.splice(v,1);v-=1}}}},getViewportWidth:function(){return p("Width")},getViewportHeight:function(){return p("Height")}}}();domReady(function enableCssMediaQueries(){var f;var l={LENGTH_UNIT:/[0-9]+(em|ex|px|in|cm|mm|pt|pc)$/,RESOLUTION_UNIT:/[0-9]+(dpi|dpcm)$/,ASPECT_RATIO:/^[0-9]+\/[0-9]+$/,ABSOLUTE_VALUE:/^[0-9]*(\.[0-9]+)*$/};var o=[];var j=function(){var s="css3-mediaqueries-test";var r=document.createElement("div");r.id=s;var q=cssHelper.addStyle("@media all and (width) { #"+s+" { width: 1px !important; } }",false);document.body.appendChild(r);var p=r.offsetWidth===1;q.parentNode.removeChild(q);r.parentNode.removeChild(r);j=function(){return p};return p};var b=function(){f=document.createElement("div");f.style.cssText="position:absolute;top:-9999em;left:-9999em;margin:0;border:none;padding:0;width:1em;font-size:1em;";document.body.appendChild(f);if(f.offsetWidth!==16){f.style.fontSize=16/f.offsetWidth+"em"}f.style.width=""};var a=function(q){f.style.width=q;var p=f.offsetWidth;f.style.width="";return p};var n=function(B,y){var r=B.length;var u=(B.substring(0,4)==="min-");var x=(!u&&B.substring(0,4)==="max-");if(y!==null){var t;var v;if(l.LENGTH_UNIT.exec(y)){t="length";v=a(y)}else{if(l.RESOLUTION_UNIT.exec(y)){t="resolution";v=parseInt(y,10);var z=y.substring((v+"").length)}else{if(l.ASPECT_RATIO.exec(y)){t="aspect-ratio";v=y.split("/")}else{if(l.ABSOLUTE_VALUE){t="absolute";v=y}else{t="unknown"}}}}}var q,A;if("device-width"===B.substring(r-12,r)){q=screen.width;if(y!==null){if(t==="length"){return((u&&q>=v)||(x&&q<v)||(!u&&!x&&q===v))}else{return false}}else{return q>0}}else{if("device-height"===B.substring(r-13,r)){A=screen.height;if(y!==null){if(t==="length"){return((u&&A>=v)||(x&&A<v)||(!u&&!x&&A===v))}else{return false}}else{return A>0}}else{if("width"===B.substring(r-5,r)){q=document.documentElement.clientWidth||document.body.clientWidth;if(y!==null){if(t==="length"){return((u&&q>=v)||(x&&q<v)||(!u&&!x&&q===v))}else{return false}}else{return q>0}}else{if("height"===B.substring(r-6,r)){A=document.documentElement.clientHeight||document.body.clientHeight;if(y!==null){if(t==="length"){return((u&&A>=v)||(x&&A<v)||(!u&&!x&&A===v))}else{return false}}else{return A>0}}else{if("device-aspect-ratio"===B.substring(r-19,r)){return t==="aspect-ratio"&&screen.width*v[1]===screen.height*v[0]}else{if("color-index"===B.substring(r-11,r)){var p=Math.pow(2,screen.colorDepth);if(y!==null){if(t==="absolute"){return((u&&p>=v)||(x&&p<v)||(!u&&!x&&p===v))}else{return false}}else{return p>0}}else{if("color"===B.substring(r-5,r)){var s=screen.colorDepth;if(y!==null){if(t==="absolute"){return((u&&s>=v)||(x&&s<v)||(!u&&!x&&s===v))}else{return false}}else{return s>0}}else{if("resolution"===B.substring(r-10,r)){var w;if(z==="dpcm"){w=a("1cm")}else{w=a("1in")}if(y!==null){if(t==="resolution"){return((u&&w>=v)||(x&&w<v)||(!u&&!x&&w===v))}else{return false}}else{return w>0}}else{return false}}}}}}}}};var g=function(r){var u=r.getValid();var t=r.getExpressions();var p=t.length;if(p>0){for(var q=0;q<p&&u;q++){u=n(t[q].mediaFeature,t[q].value)}var s=r.getNot();return(u&&!s||s&&!u)}};var m=function(p){var u=p.getMediaQueries();var r={};for(var q=0;q<u.length;
q++){if(g(u[q])){r[u[q].getMediaType()]=true}}var v=[],x=0;for(var w in r){if(r.hasOwnProperty(w)){if(x>0){v[x++]=","}v[x++]=w}}if(v.length>0){o[o.length]=cssHelper.addStyle("@media "+v.join("")+"{"+p.getCssText()+"}",false)}};var d=function(p){for(var q=0;q<p.length;q++){m(p[q])}if(ua.ie){document.documentElement.style.display="block";setTimeout(function(){document.documentElement.style.display=""},0);setTimeout(function(){cssHelper.broadcast("cssMediaQueriesTested")},100)}else{cssHelper.broadcast("cssMediaQueriesTested")}};var k=function(){for(var p=0;p<o.length;p++){cssHelper.removeStyle(o[p])}o=[];cssHelper.mediaQueryLists(d)};var i=0;var h=function(){var r=cssHelper.getViewportWidth();var t=cssHelper.getViewportHeight();if(ua.ie){var q=document.createElement("div");q.style.position="absolute";q.style.top="-9999em";q.style.overflow="scroll";document.body.appendChild(q);i=q.offsetWidth-q.clientWidth;document.body.removeChild(q)}var s;var p=function(){var u=cssHelper.getViewportWidth();var v=cssHelper.getViewportHeight();if(Math.abs(u-r)>i||Math.abs(v-t)>i){r=u;t=v;clearTimeout(s);s=setTimeout(function(){if(!j()){k()}else{cssHelper.broadcast("cssMediaQueriesTested")}},500)}};window.onresize=function(){var u=window.onresize||function(){};return function(){u();p()}}()};var c=document.documentElement;c.style.marginLeft="-32767px";setTimeout(function(){c.style.marginTop=""},20000);return function(){if(!j()){cssHelper.addListener("newStyleParsed",function(p){d(p.cssHelperParsed.mediaQueryLists)});cssHelper.addListener("cssMediaQueriesTested",function(){if(ua.ie){c.style.width="1px"}setTimeout(function(){c.style.width="";c.style.marginLeft=""},0);cssHelper.removeListener("cssMediaQueriesTested",arguments.callee)});b();k()}else{c.style.marginLeft=""}h()}}());try{document.execCommand("BackgroundImageCache",false,true)}catch(e){};
;(function($){$.videoskretch=function(src,options,callback){var settings={centeredX:true,centeredY:true,speed:0},rootElement=("onorientationchange"in window)?$(document):$(window),imgRatio,bgImg,bgWidth,bgHeight,bgOffset,bgCSS;if(options&&typeof options=="object")$.extend(settings,options);$(document).ready(_init);return this;function _init(){var link=oop.util.vimeo_url(src.vimeo);if($('#videostretch').length==0){var container=$("<div />").attr("id","videoskretch").css({left:0,top:0,position:"fixed",overflow:"hidden",zIndex:20,opacity:0});var iframe=$('<iframe id="player" src="'+link+'"/>').attr({width:'100%',height:'100%',frameborder:0}).appendTo(container);$('<div id="videoskretch_left"/><div id="videoskretch_right"/>').appendTo(container);imgRatio=iframe.width()/iframe.height();$("body").prepend(container);$('#videoskretch.pre').remove();}
else{$('#videoskretch iframe').attr('src',link);}
return false;}};})(jQuery);
;(function($){$.fn.hoverIntent=function(f,g){var cfg={sensitivity:7,interval:100,timeout:0};cfg=$.extend(cfg,g?{over:f,out:g}:f);var cX,cY,pX,pY;var track=function(ev){cX=ev.pageX;cY=ev.pageY;};var compare=function(ev,ob){ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t);if((Math.abs(pX-cX)+Math.abs(pY-cY))<cfg.sensitivity){$(ob).unbind("mousemove",track);ob.hoverIntent_s=1;return cfg.over.apply(ob,[ev]);}else{pX=cX;pY=cY;ob.hoverIntent_t=setTimeout(function(){compare(ev,ob);},cfg.interval);}};var delay=function(ev,ob){ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t);ob.hoverIntent_s=0;return cfg.out.apply(ob,[ev]);};var handleHover=function(e){var p=(e.type=="mouseover"?e.fromElement:e.toElement)||e.relatedTarget;while(p&&p!=this){try{p=p.parentNode;}catch(e){p=this;}}
if(p==this){return false;}
var ev=$.extend({},e);var ob=this;if(ob.hoverIntent_t){ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t);}
if(e.type=="mouseover"){pX=ev.pageX;pY=ev.pageY;$(ob).bind("mousemove",track);if(ob.hoverIntent_s!=1){ob.hoverIntent_t=setTimeout(function(){compare(ev,ob);},cfg.interval);}}else{$(ob).unbind("mousemove",track);if(ob.hoverIntent_s==1){ob.hoverIntent_t=setTimeout(function(){delay(ev,ob);},cfg.timeout);}}};return this.mouseover(handleHover).mouseout(handleHover);};})(oop.$);
;/*
 * jScrollPane - v2.0.0beta11 - 2011-06-09
 * http://jscrollpane.kelvinluck.com/
 *
 * Copyright (c) 2010 Kelvin Luck
 * Dual licensed under the MIT and GPL licenses.
 */
(function($,window,undefined){$.fn.jScrollPane=function(settings)
{function JScrollPane(elem,s)
{var settings,jsp=this,pane,paneWidth,paneHeight,container,contentWidth,contentHeight,percentInViewH,percentInViewV,isScrollableV,isScrollableH,verticalDrag,dragMaxY,verticalDragPosition,horizontalDrag,dragMaxX,horizontalDragPosition,verticalBar,verticalTrack,scrollbarWidth,verticalTrackHeight,verticalDragHeight,arrowUp,arrowDown,horizontalBar,horizontalTrack,horizontalTrackWidth,horizontalDragWidth,arrowLeft,arrowRight,reinitialiseInterval,originalPadding,originalPaddingTotalWidth,previousContentWidth,wasAtTop=true,wasAtLeft=true,wasAtBottom=false,wasAtRight=false,originalElement=elem.clone(false,false).empty(),mwEvent=$.fn.mwheelIntent?'mwheelIntent.jsp':'mousewheel.jsp';originalPadding=elem.css('paddingTop')+' '+
elem.css('paddingRight')+' '+
elem.css('paddingBottom')+' '+
elem.css('paddingLeft');originalPaddingTotalWidth=(parseInt(elem.css('paddingLeft'),10)||0)+
(parseInt(elem.css('paddingRight'),10)||0);function initialise(s)
{var isMaintainingPositon,lastContentX,lastContentY,hasContainingSpaceChanged,originalScrollTop,originalScrollLeft,maintainAtBottom=false,maintainAtRight=false;settings=s;if(pane===undefined){originalScrollTop=elem.scrollTop();originalScrollLeft=elem.scrollLeft();elem.css({overflow:'hidden',padding:0});paneWidth=elem.innerWidth()+originalPaddingTotalWidth;paneHeight=elem.innerHeight();elem.width(paneWidth);pane=$('<div class="jspPane" />').css('padding',originalPadding).append(elem.children());container=$('<div class="jspContainer" />').css({'width':paneWidth+'px','height':paneHeight+'px'}).append(pane).appendTo(elem);}else{elem.css('width','');maintainAtBottom=settings.stickToBottom&&isCloseToBottom();maintainAtRight=settings.stickToRight&&isCloseToRight();hasContainingSpaceChanged=elem.innerWidth()+originalPaddingTotalWidth!=paneWidth||elem.outerHeight()!=paneHeight;if(hasContainingSpaceChanged){paneWidth=elem.innerWidth()+originalPaddingTotalWidth;paneHeight=elem.innerHeight();container.css({width:paneWidth+'px',height:paneHeight+'px'});}
if(!hasContainingSpaceChanged&&previousContentWidth==contentWidth&&pane.outerHeight()==contentHeight){elem.width(paneWidth);return;}
previousContentWidth=contentWidth;pane.css('width','');elem.width(paneWidth);container.find('>.jspVerticalBar,>.jspHorizontalBar').remove().end();}
pane.css('overflow','auto');if(s.contentWidth){contentWidth=s.contentWidth;}else{contentWidth=pane[0].scrollWidth;}
contentHeight=pane[0].scrollHeight;pane.css('overflow','');percentInViewH=contentWidth/paneWidth;percentInViewV=contentHeight/paneHeight;isScrollableV=percentInViewV>1;isScrollableH=percentInViewH>1;if(!(isScrollableH||isScrollableV)){elem.removeClass('jspScrollable');pane.css({top:0,width:container.width()-originalPaddingTotalWidth});removeMousewheel();removeFocusHandler();removeKeyboardNav();removeClickOnTrack();unhijackInternalLinks();}else{elem.addClass('jspScrollable');isMaintainingPositon=settings.maintainPosition&&(verticalDragPosition||horizontalDragPosition);if(isMaintainingPositon){lastContentX=contentPositionX();lastContentY=contentPositionY();}
initialiseVerticalScroll();initialiseHorizontalScroll();resizeScrollbars();if(isMaintainingPositon){scrollToX(maintainAtRight?(contentWidth-paneWidth):lastContentX,false);scrollToY(maintainAtBottom?(contentHeight-paneHeight):lastContentY,false);}
initFocusHandler();initMousewheel();initTouch();if(settings.enableKeyboardNavigation){initKeyboardNav();}
if(settings.clickOnTrack){initClickOnTrack();}
observeHash();if(settings.hijackInternalLinks){hijackInternalLinks();}}
if(settings.autoReinitialise&&!reinitialiseInterval){reinitialiseInterval=setInterval(function()
{initialise(settings);},settings.autoReinitialiseDelay);}else if(!settings.autoReinitialise&&reinitialiseInterval){clearInterval(reinitialiseInterval);}
originalScrollTop&&elem.scrollTop(0)&&scrollToY(originalScrollTop,false);originalScrollLeft&&elem.scrollLeft(0)&&scrollToX(originalScrollLeft,false);elem.trigger('jsp-initialised',[isScrollableH||isScrollableV]);}
function initialiseVerticalScroll()
{if(isScrollableV){container.append($('<div class="jspVerticalBar" />').append($('<div class="jspCap jspCapTop" />'),$('<div class="jspTrack" />').append($('<div class="jspDrag" />').append($('<div class="jspDragTop" />'),$('<div class="jspDragBottom" />'))),$('<div class="jspCap jspCapBottom" />')));verticalBar=container.find('>.jspVerticalBar');verticalTrack=verticalBar.find('>.jspTrack');verticalDrag=verticalTrack.find('>.jspDrag');if(settings.showArrows){arrowUp=$('<a class="jspArrow jspArrowUp" />').bind('mousedown.jsp',getArrowScroll(0,-1)).bind('click.jsp',nil);arrowDown=$('<a class="jspArrow jspArrowDown" />').bind('mousedown.jsp',getArrowScroll(0,1)).bind('click.jsp',nil);if(settings.arrowScrollOnHover){arrowUp.bind('mouseover.jsp',getArrowScroll(0,-1,arrowUp));arrowDown.bind('mouseover.jsp',getArrowScroll(0,1,arrowDown));}
appendArrows(verticalTrack,settings.verticalArrowPositions,arrowUp,arrowDown);}
verticalTrackHeight=paneHeight;container.find('>.jspVerticalBar>.jspCap:visible,>.jspVerticalBar>.jspArrow').each(function()
{verticalTrackHeight-=$(this).outerHeight();});verticalDrag.hover(function()
{verticalDrag.addClass('jspHover');},function()
{verticalDrag.removeClass('jspHover');}).bind('mousedown.jsp',function(e)
{$('html').bind('dragstart.jsp selectstart.jsp',nil);verticalDrag.addClass('jspActive');var startY=e.pageY-verticalDrag.position().top;$('html').bind('mousemove.jsp',function(e)
{positionDragY(e.pageY-startY,false);}).bind('mouseup.jsp mouseleave.jsp',cancelDrag);return false;});sizeVerticalScrollbar();}}
function sizeVerticalScrollbar()
{verticalTrack.height(verticalTrackHeight+'px');verticalDragPosition=0;scrollbarWidth=settings.verticalGutter+verticalTrack.outerWidth();pane.width(paneWidth-scrollbarWidth-originalPaddingTotalWidth);try{if(verticalBar.position().left===0){pane.css('margin-left',scrollbarWidth+'px');}}catch(err){}}
function initialiseHorizontalScroll()
{if(isScrollableH){container.append($('<div class="jspHorizontalBar" />').append($('<div class="jspCap jspCapLeft" />'),$('<div class="jspTrack" />').append($('<div class="jspDrag" />').append($('<div class="jspDragLeft" />'),$('<div class="jspDragRight" />'))),$('<div class="jspCap jspCapRight" />')));horizontalBar=container.find('>.jspHorizontalBar');horizontalTrack=horizontalBar.find('>.jspTrack');horizontalDrag=horizontalTrack.find('>.jspDrag');if(settings.showArrows){arrowLeft=$('<a class="jspArrow jspArrowLeft" />').bind('mousedown.jsp',getArrowScroll(-1,0)).bind('click.jsp',nil);arrowRight=$('<a class="jspArrow jspArrowRight" />').bind('mousedown.jsp',getArrowScroll(1,0)).bind('click.jsp',nil);if(settings.arrowScrollOnHover){arrowLeft.bind('mouseover.jsp',getArrowScroll(-1,0,arrowLeft));arrowRight.bind('mouseover.jsp',getArrowScroll(1,0,arrowRight));}
appendArrows(horizontalTrack,settings.horizontalArrowPositions,arrowLeft,arrowRight);}
horizontalDrag.hover(function()
{horizontalDrag.addClass('jspHover');},function()
{horizontalDrag.removeClass('jspHover');}).bind('mousedown.jsp',function(e)
{$('html').bind('dragstart.jsp selectstart.jsp',nil);horizontalDrag.addClass('jspActive');var startX=e.pageX-horizontalDrag.position().left;$('html').bind('mousemove.jsp',function(e)
{positionDragX(e.pageX-startX,false);}).bind('mouseup.jsp mouseleave.jsp',cancelDrag);return false;});horizontalTrackWidth=container.innerWidth();sizeHorizontalScrollbar();}}
function sizeHorizontalScrollbar()
{container.find('>.jspHorizontalBar>.jspCap:visible,>.jspHorizontalBar>.jspArrow').each(function()
{horizontalTrackWidth-=$(this).outerWidth();});horizontalTrack.width(horizontalTrackWidth+'px');horizontalDragPosition=0;}
function resizeScrollbars()
{if(isScrollableH&&isScrollableV){var horizontalTrackHeight=horizontalTrack.outerHeight(),verticalTrackWidth=verticalTrack.outerWidth();verticalTrackHeight-=horizontalTrackHeight;$(horizontalBar).find('>.jspCap:visible,>.jspArrow').each(function()
{horizontalTrackWidth+=$(this).outerWidth();});horizontalTrackWidth-=verticalTrackWidth;paneHeight-=verticalTrackWidth;paneWidth-=horizontalTrackHeight;horizontalTrack.parent().append($('<div class="jspCorner" />').css('width',horizontalTrackHeight+'px'));sizeVerticalScrollbar();sizeHorizontalScrollbar();}
if(isScrollableH){pane.width((container.outerWidth()-originalPaddingTotalWidth)+'px');}
contentHeight=pane.outerHeight();percentInViewV=contentHeight/paneHeight;if(isScrollableH){horizontalDragWidth=Math.ceil(1/percentInViewH*horizontalTrackWidth);if(horizontalDragWidth>settings.horizontalDragMaxWidth){horizontalDragWidth=settings.horizontalDragMaxWidth;}else if(horizontalDragWidth<settings.horizontalDragMinWidth){horizontalDragWidth=settings.horizontalDragMinWidth;}
horizontalDrag.width(horizontalDragWidth+'px');dragMaxX=horizontalTrackWidth-horizontalDragWidth;_positionDragX(horizontalDragPosition);}
if(isScrollableV){verticalDragHeight=Math.ceil(1/percentInViewV*verticalTrackHeight);if(verticalDragHeight>settings.verticalDragMaxHeight){verticalDragHeight=settings.verticalDragMaxHeight;}else if(verticalDragHeight<settings.verticalDragMinHeight){verticalDragHeight=settings.verticalDragMinHeight;}
verticalDrag.height(verticalDragHeight+'px');dragMaxY=verticalTrackHeight-verticalDragHeight;_positionDragY(verticalDragPosition);}}
function appendArrows(ele,p,a1,a2)
{var p1="before",p2="after",aTemp;if(p=="os"){p=/Mac/.test(navigator.platform)?"after":"split";}
if(p==p1){p2=p;}else if(p==p2){p1=p;aTemp=a1;a1=a2;a2=aTemp;}
ele[p1](a1)[p2](a2);}
function getArrowScroll(dirX,dirY,ele)
{return function()
{arrowScroll(dirX,dirY,this,ele);this.blur();return false;};}
function arrowScroll(dirX,dirY,arrow,ele)
{arrow=$(arrow).addClass('jspActive');var eve,scrollTimeout,isFirst=true,doScroll=function()
{if(dirX!==0){jsp.scrollByX(dirX*settings.arrowButtonSpeed);}
if(dirY!==0){jsp.scrollByY(dirY*settings.arrowButtonSpeed);}
scrollTimeout=setTimeout(doScroll,isFirst?settings.initialDelay:settings.arrowRepeatFreq);isFirst=false;};doScroll();eve=ele?'mouseout.jsp':'mouseup.jsp';ele=ele||$('html');ele.bind(eve,function()
{arrow.removeClass('jspActive');scrollTimeout&&clearTimeout(scrollTimeout);scrollTimeout=null;ele.unbind(eve);});}
function initClickOnTrack()
{removeClickOnTrack();if(isScrollableV){verticalTrack.bind('mousedown.jsp',function(e)
{if(e.originalTarget===undefined||e.originalTarget==e.currentTarget){var clickedTrack=$(this),offset=clickedTrack.offset(),direction=e.pageY-offset.top-verticalDragPosition,scrollTimeout,isFirst=true,doScroll=function()
{var offset=clickedTrack.offset(),pos=e.pageY-offset.top-verticalDragHeight/2,contentDragY=paneHeight*settings.scrollPagePercent,dragY=dragMaxY*contentDragY/(contentHeight-paneHeight);if(direction<0){if(verticalDragPosition-dragY>pos){jsp.scrollByY(-contentDragY);}else{positionDragY(pos);}}else if(direction>0){if(verticalDragPosition+dragY<pos){jsp.scrollByY(contentDragY);}else{positionDragY(pos);}}else{cancelClick();return;}
scrollTimeout=setTimeout(doScroll,isFirst?settings.initialDelay:settings.trackClickRepeatFreq);isFirst=false;},cancelClick=function()
{scrollTimeout&&clearTimeout(scrollTimeout);scrollTimeout=null;$(document).unbind('mouseup.jsp',cancelClick);};doScroll();$(document).bind('mouseup.jsp',cancelClick);return false;}});}
if(isScrollableH){horizontalTrack.bind('mousedown.jsp',function(e)
{if(e.originalTarget===undefined||e.originalTarget==e.currentTarget){var clickedTrack=$(this),offset=clickedTrack.offset(),direction=e.pageX-offset.left-horizontalDragPosition,scrollTimeout,isFirst=true,doScroll=function()
{var offset=clickedTrack.offset(),pos=e.pageX-offset.left-horizontalDragWidth/2,contentDragX=paneWidth*settings.scrollPagePercent,dragX=dragMaxX*contentDragX/(contentWidth-paneWidth);if(direction<0){if(horizontalDragPosition-dragX>pos){jsp.scrollByX(-contentDragX);}else{positionDragX(pos);}}else if(direction>0){if(horizontalDragPosition+dragX<pos){jsp.scrollByX(contentDragX);}else{positionDragX(pos);}}else{cancelClick();return;}
scrollTimeout=setTimeout(doScroll,isFirst?settings.initialDelay:settings.trackClickRepeatFreq);isFirst=false;},cancelClick=function()
{scrollTimeout&&clearTimeout(scrollTimeout);scrollTimeout=null;$(document).unbind('mouseup.jsp',cancelClick);};doScroll();$(document).bind('mouseup.jsp',cancelClick);return false;}});}}
function removeClickOnTrack()
{if(horizontalTrack){horizontalTrack.unbind('mousedown.jsp');}
if(verticalTrack){verticalTrack.unbind('mousedown.jsp');}}
function cancelDrag()
{$('html').unbind('dragstart.jsp selectstart.jsp mousemove.jsp mouseup.jsp mouseleave.jsp');if(verticalDrag){verticalDrag.removeClass('jspActive');}
if(horizontalDrag){horizontalDrag.removeClass('jspActive');}}
function positionDragY(destY,animate)
{if(!isScrollableV){return;}
if(destY<0){destY=0;}else if(destY>dragMaxY){destY=dragMaxY;}
if(animate===undefined){animate=settings.animateScroll;}
if(animate){jsp.animate(verticalDrag,'top',destY,_positionDragY);}else{verticalDrag.css('top',destY);_positionDragY(destY);}}
function _positionDragY(destY)
{if(destY===undefined){destY=verticalDrag.position().top;}
container.scrollTop(0);verticalDragPosition=destY;var isAtTop=verticalDragPosition===0,isAtBottom=verticalDragPosition==dragMaxY,percentScrolled=destY/dragMaxY,destTop=-percentScrolled*(contentHeight-paneHeight);if(wasAtTop!=isAtTop||wasAtBottom!=isAtBottom){wasAtTop=isAtTop;wasAtBottom=isAtBottom;elem.trigger('jsp-arrow-change',[wasAtTop,wasAtBottom,wasAtLeft,wasAtRight]);}
updateVerticalArrows(isAtTop,isAtBottom);pane.css('top',destTop);elem.trigger('jsp-scroll-y',[-destTop,isAtTop,isAtBottom]).trigger('scroll');}
function positionDragX(destX,animate)
{if(!isScrollableH){return;}
if(destX<0){destX=0;}else if(destX>dragMaxX){destX=dragMaxX;}
if(animate===undefined){animate=settings.animateScroll;}
if(animate){jsp.animate(horizontalDrag,'left',destX,_positionDragX);}else{horizontalDrag.css('left',destX);_positionDragX(destX);}}
function _positionDragX(destX)
{if(destX===undefined){destX=horizontalDrag.position().left;}
container.scrollTop(0);horizontalDragPosition=destX;var isAtLeft=horizontalDragPosition===0,isAtRight=horizontalDragPosition==dragMaxX,percentScrolled=destX/dragMaxX,destLeft=-percentScrolled*(contentWidth-paneWidth);if(wasAtLeft!=isAtLeft||wasAtRight!=isAtRight){wasAtLeft=isAtLeft;wasAtRight=isAtRight;elem.trigger('jsp-arrow-change',[wasAtTop,wasAtBottom,wasAtLeft,wasAtRight]);}
updateHorizontalArrows(isAtLeft,isAtRight);pane.css('left',destLeft);elem.trigger('jsp-scroll-x',[-destLeft,isAtLeft,isAtRight]).trigger('scroll');}
function updateVerticalArrows(isAtTop,isAtBottom)
{if(settings.showArrows){arrowUp[isAtTop?'addClass':'removeClass']('jspDisabled');arrowDown[isAtBottom?'addClass':'removeClass']('jspDisabled');}}
function updateHorizontalArrows(isAtLeft,isAtRight)
{if(settings.showArrows){arrowLeft[isAtLeft?'addClass':'removeClass']('jspDisabled');arrowRight[isAtRight?'addClass':'removeClass']('jspDisabled');}}
function scrollToY(destY,animate)
{var percentScrolled=destY/(contentHeight-paneHeight);positionDragY(percentScrolled*dragMaxY,animate);}
function scrollToX(destX,animate)
{var percentScrolled=destX/(contentWidth-paneWidth);positionDragX(percentScrolled*dragMaxX,animate);}
function scrollToElement(ele,stickToTop,animate)
{var e,eleHeight,eleWidth,eleTop=0,eleLeft=0,viewportTop,viewportLeft,maxVisibleEleTop,maxVisibleEleLeft,destY,destX;try{e=$(ele);}catch(err){return;}
eleHeight=e.outerHeight();eleWidth=e.outerWidth();console.log(eleHeight+' - '+eleWidth);container.scrollTop(0);container.scrollLeft(0);while(!e.is('.jspPane')){eleTop+=e.position().top;eleLeft+=e.position().left;e=e.offsetParent();if(/^body|html$/i.test(e[0].nodeName)){return;}}
viewportTop=contentPositionY();maxVisibleEleTop=viewportTop+paneHeight;if(eleTop<viewportTop||stickToTop){destY=eleTop-settings.verticalGutter;}else if(eleTop+eleHeight>maxVisibleEleTop){destY=eleTop-paneHeight+eleHeight+settings.verticalGutter;}
if(destY){scrollToY(destY,animate);}
viewportLeft=contentPositionX();maxVisibleEleLeft=viewportLeft+paneWidth;if(eleLeft<viewportLeft||stickToTop){destX=eleLeft-settings.horizontalGutter;}else if(eleLeft+eleWidth>maxVisibleEleLeft){destX=eleLeft-paneWidth+eleWidth+settings.horizontalGutter;}
if(destX){scrollToX(destX,animate);}}
function contentPositionX()
{return-pane.position().left;}
function contentPositionY()
{return-pane.position().top;}
function isCloseToBottom()
{var scrollableHeight=contentHeight-paneHeight;return(scrollableHeight>20)&&(scrollableHeight-contentPositionY()<10);}
function isCloseToRight()
{var scrollableWidth=contentWidth-paneWidth;return(scrollableWidth>20)&&(scrollableWidth-contentPositionX()<10);}
function initMousewheel()
{container.unbind(mwEvent).bind(mwEvent,function(event,delta,deltaX,deltaY){var dX=horizontalDragPosition,dY=verticalDragPosition;jsp.scrollBy(deltaX*settings.mouseWheelSpeed,-deltaY*settings.mouseWheelSpeed,false);return dX==horizontalDragPosition&&dY==verticalDragPosition;});}
function removeMousewheel()
{container.unbind(mwEvent);}
function nil()
{return false;}
function initFocusHandler()
{pane.find(':input,a').unbind('focus.jsp').bind('focus.jsp',function(e)
{scrollToElement(e.target,false);});}
function removeFocusHandler()
{pane.find(':input,a').unbind('focus.jsp');}
function initKeyboardNav()
{var keyDown,elementHasScrolled,validParents=[];isScrollableH&&validParents.push(horizontalBar[0]);isScrollableV&&validParents.push(verticalBar[0]);pane.focus(function()
{elem.focus();});elem.attr('tabindex',0).unbind('keydown.jsp keypress.jsp').bind('keydown.jsp',function(e)
{if(e.target!==this&&!(validParents.length&&$(e.target).closest(validParents).length)){return;}
var dX=horizontalDragPosition,dY=verticalDragPosition;switch(e.keyCode){case 40:case 38:case 34:case 32:case 33:case 39:case 37:keyDown=e.keyCode;keyDownHandler();break;case 35:scrollToY(contentHeight-paneHeight);keyDown=null;break;case 36:scrollToY(0);keyDown=null;break;}
elementHasScrolled=e.keyCode==keyDown&&dX!=horizontalDragPosition||dY!=verticalDragPosition;return!elementHasScrolled;}).bind('keypress.jsp',function(e)
{if(e.keyCode==keyDown){keyDownHandler();}
return!elementHasScrolled;});if(settings.hideFocus){elem.css('outline','none');if('hideFocus'in container[0]){elem.attr('hideFocus',true);}}else{elem.css('outline','');if('hideFocus'in container[0]){elem.attr('hideFocus',false);}}
function keyDownHandler()
{var dX=horizontalDragPosition,dY=verticalDragPosition;switch(keyDown){case 40:jsp.scrollByY(settings.keyboardSpeed,false);break;case 38:jsp.scrollByY(-settings.keyboardSpeed,false);break;case 34:case 32:jsp.scrollByY(paneHeight*settings.scrollPagePercent,false);break;case 33:jsp.scrollByY(-paneHeight*settings.scrollPagePercent,false);break;case 39:jsp.scrollByX(settings.keyboardSpeed,false);break;case 37:jsp.scrollByX(-settings.keyboardSpeed,false);break;}
elementHasScrolled=dX!=horizontalDragPosition||dY!=verticalDragPosition;return elementHasScrolled;}}
function removeKeyboardNav()
{elem.attr('tabindex','-1').removeAttr('tabindex').unbind('keydown.jsp keypress.jsp');}
function observeHash()
{if(location.hash&&location.hash.length>1){var e,retryInt,hash=escape(location.hash);try{e=$(hash);}catch(err){return;}
if(e.length&&pane.find(hash)){if(container.scrollTop()===0){retryInt=setInterval(function()
{if(container.scrollTop()>0){scrollToElement(hash,true);$(document).scrollTop(container.position().top);clearInterval(retryInt);}},50);}else{scrollToElement(hash,true);$(document).scrollTop(container.position().top);}}}}
function unhijackInternalLinks()
{$('a.jspHijack').unbind('click.jsp-hijack').removeClass('jspHijack');}
function hijackInternalLinks()
{unhijackInternalLinks();$('a[href^=#]').addClass('jspHijack').bind('click.jsp-hijack',function()
{var uriParts=this.href.split('#'),hash;if(uriParts.length>1){hash=uriParts[1];if(hash.length>0&&pane.find('#'+hash).length>0){scrollToElement('#'+hash,true);return false;}}});}
function initTouch()
{var startX,startY,touchStartX,touchStartY,moved,moving=false;container.unbind('touchstart.jsp touchmove.jsp touchend.jsp click.jsp-touchclick').bind('touchstart.jsp',function(e)
{var touch=e.originalEvent.touches[0];startX=contentPositionX();startY=contentPositionY();touchStartX=touch.pageX;touchStartY=touch.pageY;moved=false;moving=true;}).bind('touchmove.jsp',function(ev)
{if(!moving){return;}
var touchPos=ev.originalEvent.touches[0],dX=horizontalDragPosition,dY=verticalDragPosition;jsp.scrollTo(startX+touchStartX-touchPos.pageX,startY+touchStartY-touchPos.pageY);moved=moved||Math.abs(touchStartX-touchPos.pageX)>5||Math.abs(touchStartY-touchPos.pageY)>5;return dX==horizontalDragPosition&&dY==verticalDragPosition;}).bind('touchend.jsp',function(e)
{moving=false;}).bind('click.jsp-touchclick',function(e)
{if(moved){moved=false;return false;}});}
function destroy(){var currentY=contentPositionY(),currentX=contentPositionX();elem.removeClass('jspScrollable').unbind('.jsp');elem.replaceWith(originalElement.append(pane.children()));originalElement.scrollTop(currentY);originalElement.scrollLeft(currentX);}
$.extend(jsp,{reinitialise:function(s)
{s=$.extend({},settings,s);initialise(s);},scrollToElement:function(ele,stickToTop,animate)
{scrollToElement(ele,stickToTop,animate);},scrollTo:function(destX,destY,animate)
{scrollToX(destX,animate);scrollToY(destY,animate);},scrollToX:function(destX,animate)
{scrollToX(destX,animate);},scrollToY:function(destY,animate)
{scrollToY(destY,animate);},scrollToPercentX:function(destPercentX,animate)
{scrollToX(destPercentX*(contentWidth-paneWidth),animate);},scrollToPercentY:function(destPercentY,animate)
{scrollToY(destPercentY*(contentHeight-paneHeight),animate);},scrollBy:function(deltaX,deltaY,animate)
{jsp.scrollByX(deltaX,animate);jsp.scrollByY(deltaY,animate);},scrollByX:function(deltaX,animate)
{deltaX=(deltaX>=0)?Math.max(deltaX,1.0):Math.min(deltaX,-1.0);var destX=contentPositionX()+deltaX,percentScrolled=destX/(contentWidth-paneWidth);positionDragX(percentScrolled*dragMaxX,animate);},scrollByY:function(deltaY,animate)
{deltaY=(deltaY>=0)?Math.max(deltaY,1.0):Math.min(deltaY,-1.0);var destY=contentPositionY()+deltaY,percentScrolled=destY/(contentHeight-paneHeight);positionDragY(percentScrolled*dragMaxY,animate);},positionDragX:function(x,animate)
{positionDragX(x,animate);},positionDragY:function(y,animate)
{positionDragY(y,animate);},animate:function(ele,prop,value,stepCallback)
{var params={};params[prop]=value;ele.animate(params,{'duration':settings.animateDuration,'ease':settings.animateEase,'queue':false,'step':stepCallback});},getContentPositionX:function()
{return contentPositionX();},getContentPositionY:function()
{return contentPositionY();},getContentWidth:function()
{return contentWidth;},getContentHeight:function()
{return contentHeight;},getPercentScrolledX:function()
{return contentPositionX()/(contentWidth-paneWidth);},getPercentScrolledY:function()
{return contentPositionY()/(contentHeight-paneHeight);},getIsScrollableH:function()
{return isScrollableH;},getIsScrollableV:function()
{return isScrollableV;},getContentPane:function()
{return pane;},scrollToBottom:function(animate)
{positionDragY(dragMaxY,animate);},hijackInternalLinks:function()
{hijackInternalLinks();},destroy:function()
{destroy();}});initialise(s);}
settings=$.extend({},$.fn.jScrollPane.defaults,settings);$.each(['mouseWheelSpeed','arrowButtonSpeed','trackClickSpeed','keyboardSpeed'],function(){settings[this]=settings[this]||settings.speed;});return this.each(function()
{var elem=$(this),jspApi=elem.data('jsp');if(jspApi){jspApi.reinitialise(settings);}else{jspApi=new JScrollPane(elem,settings);elem.data('jsp',jspApi);}});};$.fn.jScrollPane.defaults={showArrows:false,maintainPosition:true,stickToBottom:false,stickToRight:false,clickOnTrack:true,autoReinitialise:false,autoReinitialiseDelay:500,verticalDragMinHeight:0,verticalDragMaxHeight:99999,horizontalDragMinWidth:0,horizontalDragMaxWidth:99999,contentWidth:undefined,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:.8};})(jQuery,this);
;(function($){var baseClasses=/ui-checkbox|ui-radio/;$.widget('ui.checkBox',{options:{hideInput:true,addVisualElement:true,addLabel:true,_delegated:false},_create:function(){var that=this,opts=this.options;if(!this.element.is(':radio,:checkbox')){if($.nodeName(this.element[0],'input')){return false;}
this._addDelegate();this.updateContainer();return false;}
this.labels=$([]);this.checkedStatus=false;this.disabledStatus=false;this.hoverStatus=false;this.radio=(this.element.is(':radio'));this.visualElement=$([]);if(opts.hideInput){this.element.addClass('ui-helper-hidden-accessible');if(opts.addVisualElement){this.visualElement=$('<span />').addClass(this.radio?'ui-radio':'ui-checkbox');this.element.after(this.visualElement[0]);}}
if(opts.addLabel){this.labels=$('label[for='+this.element.attr('id')+']').addClass(this.radio?'ui-radio':'ui-checkbox');}
if(!opts._delegated){this._addEvents();}
this.initialized=true;this.reflectUI({type:'initialReflect'});return undefined;},updateContainer:function(){if(!this.element.is(':radio,:checkbox')&&!$.nodeName(this.element[0],'input')){$('input',this.element[0]).filter(function(){return!($.data(this,'checkBox'));}).checkBox($.extend({},this.options,{_delegated:true}));}},_addDelegate:function(){var opts=this.options,toggleHover=function(e,that){if(!that){return;}
that.hover=!!(e.type=='focus'||e.type=='mouseenter'||e.type=='focusin'||e.type=='mouseover');that._changeStateClassChain.call(that);return undefined;};this.element.bind('click',function(e){if(!$.nodeName(e.target,'input')){return;}
var inst=($.data(e.target)||{}).checkBox;if(!inst){return;}
inst.reflectUI.call(inst,e.target,e);}).bind('focusin.checkBox focusout.checkBox',function(e){if(!$.nodeName(e.target,'input')){return;}
var inst=($.data(e.target)||{}).checkBox;toggleHover(e,inst);});if(opts.hideInput){this.element.bind('usermode',function(e){if(!e.enabled){return;}
$('input',this).each(function(){var inst=($.data(this)||{}).checkBox;(inst&&inst.destroy.call(inst,true));});});}
if(opts.addVisualElement){this.element.bind('mouseover.checkBox mouseout.checkBox',function(e){if(!$.nodeName(e.target,'span')){return;}
var inst=($.data($(e.target).prev()[0])||{}).checkBox;toggleHover(e,inst);}).bind('click.checkBox',function(e){if(!$.nodeName(e.target,'span')||!baseClasses.test(e.target.className||'')){return;}
$(e.target).prev()[0].click();return false;});}
if(opts.addLabel){this.element.delegate('label.ui-radio, label.ui-checkbox','mouseenter.checkBox mouseleave.checkBox',function(e){var inst=($.data(document.getElementById($(this).attr('for')))||{}).checkBox;toggleHover(e,inst);});}},_addEvents:function(){var that=this,opts=this.options,toggleHover=function(e){if(that.disabledStatus){return false;}
that.hover=(e.type=='focus'||e.type=='mouseenter');that._changeStateClassChain();return undefined;};this.element.bind('click.checkBox',$.proxy(this,'reflectUI')).bind('focus.checkBox blur.checkBox',toggleHover);if(opts.hideInput){this.element.bind('usermode',function(e){(e.enabled&&that.destroy.call(that,true));});}
if(opts.addVisualElement){this.visualElement.bind('mouseenter.checkBox mouseleave.checkBox',toggleHover).bind('click.checkBox',function(e){that.element[0].click();if($.browser.opera){$(that.element[0]).trigger('change');}
return false;});}
if(opts.addLabel){this.labels.bind('mouseenter.checkBox mouseleave.checkBox',toggleHover);}},_changeStateClassChain:function(){var allElements=this.labels.add(this.visualElement),stateClass='',baseClass='ui-'+((this.radio)?'radio':'checkbox');if(this.checkedStatus){stateClass+='-checked';allElements.addClass(baseClass+'-checked');}else{allElements.removeClass(baseClass+'-checked');}
if(this.disabledStatus){stateClass+='-disabled';allElements.addClass(baseClass+'-disabled');}else{allElements.removeClass(baseClass+'-disabled');}
if(this.hover){stateClass+='-hover';allElements.addClass(baseClass+'-hover');}else{allElements.removeClass(baseClass+'-hover');}
baseClass+='-state';if(stateClass){stateClass=baseClass+stateClass;}
function switchStateClass(){var classes=this.className.split(' '),found=false;$.each(classes,function(i,classN){if(classN.indexOf(baseClass)===0){found=true;classes[i]=stateClass;return false;}
return undefined;});if(!found){classes.push(stateClass);}
this.className=classes.join(' ');}
this.labels.each(switchStateClass);this.visualElement.each(switchStateClass);},destroy:function(onlyCss){this.element.removeClass('ui-helper-hidden-accessible');this.visualElement.addClass('ui-helper-hidden');if(!onlyCss){var o=this.options;this.element.unbind('.checkBox');this.visualElement.remove();this.labels.unbind('.checkBox').removeClass('ui-state-hover ui-state-checked ui-state-disabled');}},disable:function(){this.element[0].disabled=true;this.reflectUI({type:'manuallyDisabled'});},enable:function(){this.element[0].disabled=false;this.reflectUI({type:'manuallyenabled'});},toggle:function(e){this.changeCheckStatus((this.element.is(':checked'))?false:true,e);},changeCheckStatus:function(status,e){if(e&&e.type=='click'&&this.element[0].disabled){return false;}
this.element.attr({'checked':status});this.reflectUI(e||{type:'changeCheckStatus'});return undefined;},propagate:function(n,e,_noGroupReflect){if(!e||e.type!='initialReflect'){if(this.radio&&!_noGroupReflect){$(document.getElementsByName(this.element.attr('name'))).checkBox('reflectUI',e,true);}
return this._trigger(n,e,{options:this.options,checked:this.checkedStatus,labels:this.labels,disabled:this.disabledStatus});}
return undefined;},reflectUI:function(e){var oldChecked=this.checkedStatus,oldDisabledStatus=this.disabledStatus;this.disabledStatus=this.element.is(':disabled');this.checkedStatus=this.element.is(':checked');if(this.disabledStatus!=oldDisabledStatus||this.checkedStatus!==oldChecked){this._changeStateClassChain();(this.disabledStatus!=oldDisabledStatus&&this.propagate('disabledChange',e));(this.checkedStatus!==oldChecked&&this.propagate('change',e));}},update:function(){this.reflectUI({type:'change'});}});$.ui.checkBox.getter="update";})(oop.$);
;var Froogaloop=(function(){function Froogaloop(iframe){return new Froogaloop.fn.init(iframe);}
var eventCallbacks={},hasWindowEvent=false,slice=Array.prototype.slice;Froogaloop.fn=Froogaloop.prototype={playerDomain:'',element:null,init:function(iframe){if(typeof iframe==="string"){iframe=document.getElementById(iframe);}
this.element=iframe;return this;},api:function(method,valueOrCallback){if(!this.element||!method){return false;}
var self=this,element=self.element,target_id=element.id!=''?element.id:null,params=!isFunction(valueOrCallback)?valueOrCallback:null,callback=isFunction(valueOrCallback)?valueOrCallback:null;if(callback){storeCallback(method,callback,target_id);}
postMessage(method,params,element);return self;},addEvent:function(eventName,callback){if(!this.element){return false;}
var self=this,element=self.element,target_id=element.id!=''?element.id:null;storeCallback(eventName,callback,target_id);if(eventName!='ready'){postMessage('addEventListener',eventName,element);}
if(hasWindowEvent){return self;}
playerDomain=getDomainFromUrl(element.getAttribute('src'));if(window.addEventListener){window.addEventListener('message',onMessageReceived,false);}
else{window.attachEvent('onmessage',onMessageReceived,false);}
hasWindowEvent=true;return self;},removeEvent:function(eventName){if(!this.element){return false;}
var self=this,element=self.element,target_id=element.id!=''?element.id:null,removed=removeCallback(eventName,target_id);if(eventName!='ready'&&removed){postMessage('removeEventListener',eventName,element);}}};function postMessage(method,params,target){if(!target.contentWindow.postMessage){return false;}
var url=target.getAttribute('src').split('?')[0],data=JSON.stringify({method:method,value:params});target.contentWindow.postMessage(data,url);}
function onMessageReceived(event){if(event.origin!=playerDomain){return false;}
var data=JSON.parse(event.data);var value=data.value;var method=data.event||data.method;var eventData=data.data;var target_id=target_id==''?null:data.player_id;var callback=getCallback(method,target_id);var params=[];if(!callback){return false;}
if(value!==undefined){params.push(value);}
if(eventData){params.push(eventData);}
if(target_id){params.push(target_id);}
return params.length>0?callback.apply(null,params):callback.call();}
function storeCallback(eventName,callback,target_id){if(target_id){if(!eventCallbacks[target_id]){eventCallbacks[target_id]={};}
eventCallbacks[target_id][eventName]=callback;}
else{eventCallbacks[eventName]=callback;}}
function getCallback(eventName,target_id){if(target_id){return eventCallbacks[target_id][eventName];}
else{return eventCallbacks[eventName];}}
function removeCallback(eventName,target_id){if(target_id&&eventCallbacks[target_id]){if(!eventCallbacks[target_id][eventName]){return false;}
eventCallbacks[target_id][eventName]=null;}
else{if(!eventCallbacks[eventName]){return false;}
eventCallbacks[eventName]=null;}
return true;}
function getDomainFromUrl(url){var url_pieces=url.split('/'),domain_str='';for(var i=0,length=url_pieces.length;i<length;i++){if(i<3){domain_str+=url_pieces[i];}
else{break;}
if(i<2){domain_str+='/';}}
return domain_str;}
function isFunction(obj){return!!(obj&&obj.constructor&&obj.call&&obj.apply);}
function isArray(obj){return toString.call(obj)==='[object Array]';}
Froogaloop.fn.init.prototype=Froogaloop.fn;return(window.Froogaloop=window.$f=Froogaloop);})();
;;(function($){var $scrollTo=$.scrollTo=function(target,duration,settings){$(window).scrollTo(target,duration,settings);};$scrollTo.defaults={axis:'xy',duration:parseFloat($.fn.jquery)>=1.3?0:1};$scrollTo.window=function(scope){return $(window)._scrollable();};$.fn._scrollable=function(){return this.map(function(){var elem=this,isWin=!elem.nodeName||$.inArray(elem.nodeName.toLowerCase(),['iframe','#document','html','body'])!=-1;if(!isWin)
return elem;var doc=(elem.contentWindow||elem).document||elem.ownerDocument||elem;return $.browser.safari||doc.compatMode=='BackCompat'?doc.body:doc.documentElement;});};$.fn.scrollTo=function(target,duration,settings){if(typeof duration=='object'){settings=duration;duration=0;}
if(typeof settings=='function')
settings={onAfter:settings};if(target=='max')
target=9e9;settings=$.extend({},$scrollTo.defaults,settings);duration=duration||settings.speed||settings.duration;settings.queue=settings.queue&&settings.axis.length>1;if(settings.queue)
duration/=2;settings.offset=both(settings.offset);settings.over=both(settings.over);return this._scrollable().each(function(){var elem=this,$elem=$(elem),targ=target,toff,attr={},win=$elem.is('html,body');switch(typeof targ){case'number':case'string':if(/^([+-]=)?\d+(\.\d+)?(px|%)?$/.test(targ)){targ=both(targ);break;}
targ=$(targ,this);case'object':if(targ.is||targ.style)
toff=(targ=$(targ)).offset();}
$.each(settings.axis.split(''),function(i,axis){var Pos=axis=='x'?'Left':'Top',pos=Pos.toLowerCase(),key='scroll'+Pos,old=elem[key],max=$scrollTo.max(elem,axis);if(toff){attr[key]=toff[pos]+(win?0:old-$elem.offset()[pos]);if(settings.margin){attr[key]-=parseInt(targ.css('margin'+Pos))||0;attr[key]-=parseInt(targ.css('border'+Pos+'Width'))||0;}
attr[key]+=settings.offset[pos]||0;if(settings.over[pos])
attr[key]+=targ[axis=='x'?'width':'height']()*settings.over[pos];}else{var val=targ[pos];attr[key]=val.slice&&val.slice(-1)=='%'?parseFloat(val)/100*max:val;}
if(/^\d+$/.test(attr[key]))
attr[key]=attr[key]<=0?0:Math.min(attr[key],max);if(!i&&settings.queue){if(old!=attr[key])
animate(settings.onAfterFirst);delete attr[key];}});animate(settings.onAfter);function animate(callback){$elem.animate(attr,duration,settings.easing,callback&&function(){callback.call(this,target,settings);});};}).end();};$scrollTo.max=function(elem,axis){var Dim=axis=='x'?'Width':'Height',scroll='scroll'+Dim;if(!$(elem).is('html,body'))
return elem[scroll]-$(elem)[Dim.toLowerCase()]();var size='client'+Dim,html=elem.ownerDocument.documentElement,body=elem.ownerDocument.body;return Math.max(html[scroll],body[scroll])
-Math.min(html[size],body[size]);};function both(val){return typeof val=='object'?val:{top:val,left:val};};})(oop.$);;(function($){var URI=location.href.replace(/#.*/,'');var $localScroll=$.localScroll=function(settings){$('body').localScroll(settings);};$localScroll.defaults={duration:1000,axis:'y',event:'click',stop:true,target:window,reset:true};$localScroll.hash=function(settings){if(location.hash){settings=$.extend({},$localScroll.defaults,settings);settings.hash=false;if(settings.reset){var d=settings.duration;delete settings.duration;$(settings.target).scrollTo(0,settings);settings.duration=d;}
scroll(0,location,settings);}};$.fn.localScroll=function(settings){settings=$.extend({},$localScroll.defaults,settings);return settings.lazy?this.bind(settings.event,function(e){var a=$([e.target,e.target.parentNode]).filter(filter)[0];if(a)
scroll(e,a,settings);}):this.find('a,area').filter(filter).bind(settings.event,function(e){scroll(e,this,settings);}).end().end();function filter(){return!!this.href&&!!this.hash&&this.href.replace(this.hash,'')==URI&&(!settings.filter||$(this).is(settings.filter));};};function scroll(e,link,settings){var id=link.hash.slice(1),elem=document.getElementById(id)||document.getElementsByName(id)[0];if(!elem)
return;if(e)
e.preventDefault();var $target=$(settings.target);if(settings.lock&&$target.is(':animated')||settings.onBefore&&settings.onBefore.call(settings,e,elem,$target)===false)
return;if(settings.stop)
$target.stop(true);if(settings.hash){var attr=elem.id==id?'id':'name',$a=$('<a> </a>').attr(attr,id).css({position:'absolute',top:$(window).scrollTop(),left:$(window).scrollLeft()});elem[attr]='';$('body').prepend($a);location=link.hash;$a.remove();elem[attr]=id;}
$target.scrollTo(elem,settings).trigger('notify.serialScroll',[elem]);};})(oop.$);
;/* Copyright (c) 2010 Brandon Aaron (http://brandonaaron.net)
 * Licensed under the MIT License (LICENSE.txt).
 *
 * Thanks to: http://adomas.org/javascript-mouse-wheel/ for some pointers.
 * Thanks to: Mathias Bank(http://www.mathias-bank.de) for a scope bug fix.
 * Thanks to: Seamus Leahy for adding deltaX and deltaY
 *
 * Version: 3.0.4
 * 
 * Requires: 1.2.2+
 */
(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);}})(oop.$);
;/*
 * jQuery idleTimer plugin
 * version 0.9.100511
 * by Paul Irish.
 *   http://github.com/paulirish/yui-misc/tree/
 * MIT license

 * adapted from YUI idle timer by nzakas:
 *   http://github.com/nzakas/yui-misc/
*/
(function($){$.idleTimer=function(newTimeout,elem){var idle=false,enabled=true,timeout=30000,events='mousemove keydown DOMMouseScroll mousewheel mousedown touchstart touchmove';elem=elem||document;var toggleIdleState=function(myelem){if(typeof myelem==='number'){myelem=undefined;}
var obj=$.data(myelem||elem,'idleTimerObj');obj.idle=!obj.idle;var elapsed=(+new Date())-obj.olddate;obj.olddate=+new Date();if(obj.idle&&(elapsed<timeout)){obj.idle=false;clearTimeout($.idleTimer.tId);if(enabled)
$.idleTimer.tId=setTimeout(toggleIdleState,timeout);return;}
var event=jQuery.Event($.data(elem,'idleTimer',obj.idle?"idle":"active")+'.idleTimer');event.stopPropagation();$(elem).trigger(event);},stop=function(elem){var obj=$.data(elem,'idleTimerObj');obj.enabled=false;clearTimeout(obj.tId);$(elem).unbind('.idleTimer');},handleUserEvent=function(){var obj=$.data(this,'idleTimerObj');clearTimeout(obj.tId);if(obj.enabled){if(obj.idle){toggleIdleState(this);}
obj.tId=setTimeout(toggleIdleState,obj.timeout);}};var obj=$.data(elem,'idleTimerObj')||{};obj.olddate=obj.olddate||+new Date();if(typeof newTimeout==="number"){timeout=newTimeout;}else if(newTimeout==='destroy'){stop(elem);return this;}else if(newTimeout==='getElapsedTime'){return(+new Date())-obj.olddate;}
$(elem).bind($.trim((events+' ').split(' ').join('.idleTimer ')),handleUserEvent);obj.idle=idle;obj.enabled=enabled;obj.timeout=timeout;obj.tId=setTimeout(toggleIdleState,obj.timeout);$.data(elem,'idleTimer',"active");$.data(elem,'idleTimerObj',obj);};$.fn.idleTimer=function(newTimeout){if(this[0]){$.idleTimer(newTimeout,this[0]);}
return this;};})(oop.$);
;(function($){var height=$.fn.height,width=$.fn.width;$.fn.extend({height:function(){if(this[0]==window)
return self.innerHeight||$.boxModel&&document.documentElement.clientHeight||document.body.clientHeight;if(this[0]==document)
return Math.max(document.body.scrollHeight,document.body.offsetHeight);return height.apply(this,arguments);},width:function(){if(this[0]==window)
return self.innerWidth||$.boxModel&&document.documentElement.clientWidth||document.body.clientWidth;if(this[0]==document)
return Math.max(document.body.scrollWidth,document.body.offsetWidth);return width.apply(this,arguments);},innerHeight:function(){return this[0]==window||this[0]==document?this.height():this.is(':visible')?this[0].offsetHeight-num(this,'borderTopWidth')-num(this,'borderBottomWidth'):this.height()+num(this,'paddingTop')+num(this,'paddingBottom');},innerWidth:function(){return this[0]==window||this[0]==document?this.width():this.is(':visible')?this[0].offsetWidth-num(this,'borderLeftWidth')-num(this,'borderRightWidth'):this.width()+num(this,'paddingLeft')+num(this,'paddingRight');},outerHeight:function(){return this[0]==window||this[0]==document?this.height():this.is(':visible')?this[0].offsetHeight:this.height()+num(this,'borderTopWidth')+num(this,'borderBottomWidth')+num(this,'paddingTop')+num(this,'paddingBottom');},outerWidth:function(){return this[0]==window||this[0]==document?this.width():this.is(':visible')?this[0].offsetWidth:this.width()+num(this,'borderLeftWidth')+num(this,'borderRightWidth')+num(this,'paddingLeft')+num(this,'paddingRight');},scrollLeft:function(val){if(val!=undefined)
return this.each(function(){if(this==window||this==document)
window.scrollTo(val,$(window).scrollTop());else
this.scrollLeft=val;});if(this[0]==window||this[0]==document)
return self.pageXOffset||$.boxModel&&document.documentElement.scrollLeft||document.body.scrollLeft;return this[0].scrollLeft;},scrollTop:function(val){if(val!=undefined)
return this.each(function(){if(this==window||this==document)
window.scrollTo($(window).scrollLeft(),val);else
this.scrollTop=val;});if(this[0]==window||this[0]==document)
return self.pageYOffset||$.boxModel&&document.documentElement.scrollTop||document.body.scrollTop;return this[0].scrollTop;},position:function(options,returnObject){var elem=this[0],parent=elem.parentNode,op=elem.offsetParent,options=$.extend({margin:false,border:false,padding:false,scroll:false},options||{}),x=elem.offsetLeft,y=elem.offsetTop,sl=elem.scrollLeft,st=elem.scrollTop;if($.browser.mozilla||$.browser.msie){x+=num(elem,'borderLeftWidth');y+=num(elem,'borderTopWidth');}
if($.browser.mozilla){do{if($.browser.mozilla&&parent!=elem&&$.css(parent,'overflow')!='visible'){x+=num(parent,'borderLeftWidth');y+=num(parent,'borderTopWidth');}
if(parent==op)break;}while((parent=parent.parentNode)&&(parent.tagName.toLowerCase()!='body'||parent.tagName.toLowerCase()!='html'));}
var returnValue=handleOffsetReturn(elem,options,x,y,sl,st);if(returnObject){$.extend(returnObject,returnValue);return this;}
else{return returnValue;}},offset:function(options,returnObject){var x=0,y=0,sl=0,st=0,elem=this[0],parent=this[0],op,parPos,elemPos=$.css(elem,'position'),mo=$.browser.mozilla,ie=$.browser.msie,sf=$.browser.safari,oa=$.browser.opera,absparent=false,relparent=false,options=$.extend({margin:true,border:false,padding:false,scroll:true,lite:false},options||{});if(options.lite)return this.offsetLite(options,returnObject);if(elem.tagName.toLowerCase()=='body'){x=elem.offsetLeft;y=elem.offsetTop;if(mo){x+=num(elem,'marginLeft')+(num(elem,'borderLeftWidth')*2);y+=num(elem,'marginTop')+(num(elem,'borderTopWidth')*2);}else
if(oa){x+=num(elem,'marginLeft');y+=num(elem,'marginTop');}else
if(ie&&jQuery.boxModel){x+=num(elem,'borderLeftWidth');y+=num(elem,'borderTopWidth');}}else{do{parPos=$.css(parent,'position');x+=parent.offsetLeft;y+=parent.offsetTop;if(mo||ie){x+=num(parent,'borderLeftWidth');y+=num(parent,'borderTopWidth');if(mo&&parPos=='absolute')absparent=true;if(ie&&parPos=='relative')relparent=true;}
op=parent.offsetParent;if(options.scroll||mo){do{if(options.scroll){sl+=parent.scrollLeft;st+=parent.scrollTop;}
if(mo&&parent!=elem&&$.css(parent,'overflow')!='visible'){x+=num(parent,'borderLeftWidth');y+=num(parent,'borderTopWidth');}
parent=parent.parentNode;}while(parent!=op);}
parent=op;if(parent.tagName.toLowerCase()=='body'||parent.tagName.toLowerCase()=='html'){if((sf||(ie&&$.boxModel))&&elemPos!='absolute'&&elemPos!='fixed'){x+=num(parent,'marginLeft');y+=num(parent,'marginTop');}
if((mo&&!absparent&&elemPos!='fixed')||(ie&&elemPos=='static'&&!relparent)){x+=num(parent,'borderLeftWidth');y+=num(parent,'borderTopWidth');}
break;}}while(parent);}
var returnValue=handleOffsetReturn(elem,options,x,y,sl,st);if(returnObject){$.extend(returnObject,returnValue);return this;}
else{return returnValue;}},offsetLite:function(options,returnObject){var x=0,y=0,sl=0,st=0,parent=this[0],op,options=$.extend({margin:true,border:false,padding:false,scroll:true},options||{});do{x+=parent.offsetLeft;y+=parent.offsetTop;op=parent.offsetParent;if(options.scroll){do{sl+=parent.scrollLeft;st+=parent.scrollTop;parent=parent.parentNode;}while(parent!=op);}
parent=op;}while(parent&&parent.tagName.toLowerCase()!='body'&&parent.tagName.toLowerCase()!='html');var returnValue=handleOffsetReturn(this[0],options,x,y,sl,st);if(returnObject){$.extend(returnObject,returnValue);return this;}
else{return returnValue;}}});var num=function(el,prop){return parseInt($.css(el.jquery?el[0]:el,prop))||0;};var handleOffsetReturn=function(elem,options,x,y,sl,st){if(!options.margin){x-=num(elem,'marginLeft');y-=num(elem,'marginTop');}
if(options.border&&($.browser.safari||$.browser.opera)){x+=num(elem,'borderLeftWidth');y+=num(elem,'borderTopWidth');}else if(!options.border&&!($.browser.safari||$.browser.opera)){x-=num(elem,'borderLeftWidth');y-=num(elem,'borderTopWidth');}
if(options.padding){x+=num(elem,'paddingLeft');y+=num(elem,'paddingTop');}
if(options.scroll){sl-=elem.scrollLeft;st-=elem.scrollTop;}
return options.scroll?{top:y-st,left:x-sl,scrollTop:st,scrollLeft:sl}:{top:y,left:x};};})(oop.$);;(function($){var helper={},current,title,tID,IE=$.browser.msie&&/MSIE\s(5\.5|6\.)/.test(navigator.userAgent),track=false;$.tooltip={blocked:false,defaults:{delay:200,fade:false,showURL:true,extraClass:"",top:15,left:15,id:"tooltip"},block:function(){$.tooltip.blocked=!$.tooltip.blocked;}};$.fn.extend({tooltip:function(settings){settings=$.extend({},$.tooltip.defaults,settings);createHelper(settings);return this.each(function(){$.data(this,"tooltip",settings);this.tOpacity=helper.parent.css("opacity");this.tooltipText=this.title;$(this).removeAttr("title");this.alt="";}).mouseover(save).mouseout(hide).click(hide);},fixPNG:IE?function(){return this.each(function(){var image=$(this).css('backgroundImage');if(image.match(/^url\(["']?(.*\.png)["']?\)$/i)){image=RegExp.$1;$(this).css({'backgroundImage':'none','filter':"progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true, sizingMethod=crop, src='"+image+"')"}).each(function(){var position=$(this).css('position');if(position!='absolute'&&position!='relative')
$(this).css('position','relative');});}});}:function(){return this;},unfixPNG:IE?function(){return this.each(function(){$(this).css({'filter':'',backgroundImage:''});});}:function(){return this;},hideWhenEmpty:function(){return this.each(function(){$(this)[$(this).html()?"show":"hide"]();});},url:function(){return this.attr('href')||this.attr('src');}});function createHelper(settings){if(helper.parent)
return;helper.parent=$('<div id="'+settings.id+'"><h3></h3><div class="body"></div><div class="url"></div></div>').appendTo(document.body).hide();if($.fn.bgiframe)
helper.parent.bgiframe();helper.title=$('h3',helper.parent);helper.body=$('div.body',helper.parent);helper.url=$('div.url',helper.parent);}
function settings(element){return $.data(element,"tooltip");}
function handle(event){if(settings(this).delay)
tID=setTimeout(show,settings(this).delay);else
show();track=!!settings(this).track;$(document.body).bind('mousemove',update);update(event);}
function save(){if($.tooltip.blocked||this==current||(!this.tooltipText&&!settings(this).bodyHandler))
return;current=this;title=this.tooltipText;if(settings(this).bodyHandler){helper.title.hide();var bodyContent=settings(this).bodyHandler.call(this);if(bodyContent.nodeType||bodyContent.jquery){helper.body.empty().append(bodyContent)}else{helper.body.html(bodyContent);}
helper.body.show();}else if(settings(this).showBody){var parts=title.split(settings(this).showBody);helper.title.html(parts.shift()).show();helper.body.empty();for(var i=0,part;(part=parts[i]);i++){if(i>0)
helper.body.append("<br/>");helper.body.append(part);}
helper.body.hideWhenEmpty();}else{helper.title.html(title).show();helper.body.hide();}
if(settings(this).showURL&&$(this).url())
helper.url.html($(this).url().replace('http://','')).show();else
helper.url.hide();helper.parent.addClass(settings(this).extraClass);if(settings(this).fixPNG)
helper.parent.fixPNG();handle.apply(this,arguments);}
function show(){tID=null;if((!IE||!$.fn.bgiframe)&&settings(current).fade){if(helper.parent.is(":animated"))
helper.parent.stop().show().fadeTo(settings(current).fade,current.tOpacity);else
helper.parent.is(':visible')?helper.parent.fadeTo(settings(current).fade,current.tOpacity):helper.parent.fadeIn(settings(current).fade);}else{helper.parent.show();}
update();}
function update(event){if($.tooltip.blocked)
return;if(event&&event.target.tagName=="OPTION"){return;}
if(!track&&helper.parent.is(":visible")){$(document.body).unbind('mousemove',update)}
if(current==null){$(document.body).unbind('mousemove',update);return;}
helper.parent.removeClass("viewport-right").removeClass("viewport-bottom");var left=helper.parent[0].offsetLeft;var top=helper.parent[0].offsetTop;if(event){left=event.pageX+settings(current).left;top=event.pageY+settings(current).top;var right='auto';if(settings(current).positionLeft){right=$(window).width()-left;left='auto';}
helper.parent.css({left:left,right:right,top:top});}
var v=viewport(),h=helper.parent[0];if(v.x+v.cx<h.offsetLeft+h.offsetWidth){left-=h.offsetWidth+20+settings(current).left;helper.parent.css({left:left+'px'}).addClass("viewport-right");}
if(v.y+v.cy<h.offsetTop+h.offsetHeight){top-=h.offsetHeight+20+settings(current).top;helper.parent.css({top:top+'px'}).addClass("viewport-bottom");}}
function viewport(){return{x:$(window).scrollLeft(),y:$(window).scrollTop(),cx:$(window).width(),cy:$(window).height()};}
function hide(event){if($.tooltip.blocked)
return;if(tID)
clearTimeout(tID);current=null;var tsettings=settings(this);function complete(){helper.parent.removeClass(tsettings.extraClass).hide().css("opacity","");}
if((!IE||!$.fn.bgiframe)&&tsettings.fade){if(helper.parent.is(':animated'))
helper.parent.stop().fadeTo(tsettings.fade,0,complete);else
helper.parent.stop().fadeOut(tsettings.fade,complete);}else
complete();if(settings(this).fixPNG)
helper.parent.unfixPNG();}})(oop.$);
;oop.$.easing['jswing']=oop.$.easing['swing'];oop.$.extend(oop.$.easing,{def:'easeOutQuad',swing:function(x,t,b,c,d){return oop.$.easing[oop.$.easing.def](x,t,b,c,d);},easeInQuad:function(x,t,b,c,d){return c*(t/=d)*t+b;},easeOutQuad:function(x,t,b,c,d){return-c*(t/=d)*(t-2)+b;},easeInOutQuad:function(x,t,b,c,d){if((t/=d/2)<1)return c/2*t*t+b;return-c/2*((--t)*(t-2)-1)+b;},easeInCubic:function(x,t,b,c,d){return c*(t/=d)*t*t+b;},easeOutCubic:function(x,t,b,c,d){return c*((t=t/d-1)*t*t+1)+b;},easeInOutCubic:function(x,t,b,c,d){if((t/=d/2)<1)return c/2*t*t*t+b;return c/2*((t-=2)*t*t+2)+b;},easeInQuart:function(x,t,b,c,d){return c*(t/=d)*t*t*t+b;},easeOutQuart:function(x,t,b,c,d){return-c*((t=t/d-1)*t*t*t-1)+b;},easeInOutQuart:function(x,t,b,c,d){if((t/=d/2)<1)return c/2*t*t*t*t+b;return-c/2*((t-=2)*t*t*t-2)+b;},easeInQuint:function(x,t,b,c,d){return c*(t/=d)*t*t*t*t+b;},easeOutQuint:function(x,t,b,c,d){return c*((t=t/d-1)*t*t*t*t+1)+b;},easeInOutQuint:function(x,t,b,c,d){if((t/=d/2)<1)return c/2*t*t*t*t*t+b;return c/2*((t-=2)*t*t*t*t+2)+b;},easeInSine:function(x,t,b,c,d){return-c*Math.cos(t/d*(Math.PI/2))+c+b;},easeOutSine:function(x,t,b,c,d){return c*Math.sin(t/d*(Math.PI/2))+b;},easeInOutSine:function(x,t,b,c,d){return-c/2*(Math.cos(Math.PI*t/d)-1)+b;},easeInExpo:function(x,t,b,c,d){return(t==0)?b:c*Math.pow(2,10*(t/d-1))+b;},easeOutExpo:function(x,t,b,c,d){return(t==d)?b+c:c*(-Math.pow(2,-10*t/d)+1)+b;},easeInOutExpo:function(x,t,b,c,d){if(t==0)return b;if(t==d)return b+c;if((t/=d/2)<1)return c/2*Math.pow(2,10*(t-1))+b;return c/2*(-Math.pow(2,-10*--t)+2)+b;},easeInCirc:function(x,t,b,c,d){return-c*(Math.sqrt(1-(t/=d)*t)-1)+b;},easeOutCirc:function(x,t,b,c,d){return c*Math.sqrt(1-(t=t/d-1)*t)+b;},easeInOutCirc:function(x,t,b,c,d){if((t/=d/2)<1)return-c/2*(Math.sqrt(1-t*t)-1)+b;return c/2*(Math.sqrt(1-(t-=2)*t)+1)+b;},easeInElastic:function(x,t,b,c,d){var s=1.70158;var p=0;var a=c;if(t==0)return b;if((t/=d)==1)return b+c;if(!p)p=d*.3;if(a<Math.abs(c)){a=c;var s=p/4;}
else var s=p/(2*Math.PI)*Math.asin(c/a);return-(a*Math.pow(2,10*(t-=1))*Math.sin((t*d-s)*(2*Math.PI)/p))+b;},easeOutElastic:function(x,t,b,c,d){var s=1.70158;var p=0;var a=c;if(t==0)return b;if((t/=d)==1)return b+c;if(!p)p=d*.3;if(a<Math.abs(c)){a=c;var s=p/4;}
else var s=p/(2*Math.PI)*Math.asin(c/a);return a*Math.pow(2,-10*t)*Math.sin((t*d-s)*(2*Math.PI)/p)+c+b;},easeInOutElastic:function(x,t,b,c,d){var s=1.70158;var p=0;var a=c;if(t==0)return b;if((t/=d/2)==2)return b+c;if(!p)p=d*(.3*1.5);if(a<Math.abs(c)){a=c;var s=p/4;}
else var s=p/(2*Math.PI)*Math.asin(c/a);if(t<1)return-.5*(a*Math.pow(2,10*(t-=1))*Math.sin((t*d-s)*(2*Math.PI)/p))+b;return a*Math.pow(2,-10*(t-=1))*Math.sin((t*d-s)*(2*Math.PI)/p)*.5+c+b;},easeInBack:function(x,t,b,c,d,s){if(s==undefined)s=1.70158;return c*(t/=d)*t*((s+1)*t-s)+b;},easeOutBack:function(x,t,b,c,d,s){if(s==undefined)s=1.70158;return c*((t=t/d-1)*t*((s+1)*t+s)+1)+b;},easeInOutBack:function(x,t,b,c,d,s){if(s==undefined)s=1.70158;if((t/=d/2)<1)return c/2*(t*t*(((s*=(1.525))+1)*t-s))+b;return c/2*((t-=2)*t*(((s*=(1.525))+1)*t+s)+2)+b;},easeInBounce:function(x,t,b,c,d){return c-oop.$.easing.easeOutBounce(x,d-t,0,c,d)+b;},easeOutBounce:function(x,t,b,c,d){if((t/=d)<(1/2.75)){return c*(7.5625*t*t)+b;}else if(t<(2/2.75)){return c*(7.5625*(t-=(1.5/2.75))*t+.75)+b;}else if(t<(2.5/2.75)){return c*(7.5625*(t-=(2.25/2.75))*t+.9375)+b;}else{return c*(7.5625*(t-=(2.625/2.75))*t+.984375)+b;}},easeInOutBounce:function(x,t,b,c,d){if(t<d/2)return oop.$.easing.easeInBounce(x,t*2,0,c,d)*.5+b;return oop.$.easing.easeOutBounce(x,t*2-d,0,c,d)*.5+c*.5+b;}});
;(function($){$.fn.bgIframe=$.fn.bgiframe=function(s){if($.browser.msie&&/msie 6\.0/i.test(navigator.userAgent)){s=$.extend({top:'auto',left:'auto',width:'auto',height:'auto',opacity:true,src:'javascript:false;'},s||{});var prop=function(n){return n&&n.constructor==Number?n+'px':n;},html='<iframe class="bgiframe"frameborder="0"tabindex="-1"src="'+s.src+'"'+'style="display:block;position:absolute;z-index:-1;'+(s.opacity!==false?'filter:Alpha(Opacity=\'0\');':'')+'top:'+(s.top=='auto'?'expression(((parseInt(this.parentNode.currentStyle.borderTopWidth)||0)*-1)+\'px\')':prop(s.top))+';'+'left:'+(s.left=='auto'?'expression(((parseInt(this.parentNode.currentStyle.borderLeftWidth)||0)*-1)+\'px\')':prop(s.left))+';'+'width:'+(s.width=='auto'?'expression(this.parentNode.offsetWidth+\'px\')':prop(s.width))+';'+'height:'+(s.height=='auto'?'expression(this.parentNode.offsetHeight+\'px\')':prop(s.height))+';'+'"/>';return this.each(function(){if($('> iframe.bgiframe',this).length==0)this.insertBefore(document.createElement(html),this.firstChild);});}return this;};})(oop.$);
;(function($){oop.init={all:function(c,ie6_ready){if($(c).html()){oop.util.log('[init.all] Context: '+c);if(oop.util.ie6())
{if(ie6_ready)
{oop.util.initAll(oop,c);}}
else
{oop.util.initAll(oop,c);}}}};$(document).ready(function(){oop.util.copyright();oop.util.log('[System] '+oop.util.getLang('language')+oop.util.getLang('sys_language'));oop.dom_ready=true;oop.init.all('body');});})(oop.$);
;(function($){oop.ui=oop.ui||{};$.extend(oop.ui,{init:function(c){oop.util.log("[oop.ui] context: "+c);oop.util.initAll(oop.ui,c);}});})(oop.$);
;(function($){oop.cmp=oop.cmp||{};$.extend(oop.cmp,{init:function(c){oop.util.log("[oop.cmp] context: "+c);oop.util.initAll(oop.cmp,c);}});})(oop.$);
;(function($){oop.css_ie=oop.css_ie||{};$.extend(oop.css_ie,{init:function(c){oop.util.log("[oop.css_ie] context: "+c);if(oop.util.ie())
{oop.util.initAll(oop.css_ie,c);}}});})(oop.$);
;(function($){oop.helper=oop.helper||{};$.extend(oop.helper,{init:function(c){oop.util.log("[oop.helper] context: "+c);oop.util.initAll(oop.helper,c);}});})(oop.$);
;(function($){oop.iefix=oop.iefix||{};$.extend(oop.iefix,{bgiframe:{init:function(c){if(c==='body'){oop.util.log("[iefix.bgiframe] context: "+c);$('#mds-cmp-1stlevelnavigation ul li ul').bgiframe();$('#mds-cmp-1stlevelnavigation li.baseballcard',c).livequery(function(){$(this).bgiframe();});}}}});})(oop.$);
;(function($){oop.iefix=oop.iefix||{};$.extend(oop.iefix,{linked_images_wrapped_by_span:{init:function(c){if(c==='body'&&oop.util.ie7()){oop.util.log("[iefix.linked_images_wrapped_by_span] context: "+c);$('a span img').live('click',function(){$(this).closest('span').trigger('click');});}}}});})(oop.$);
;(function($){oop.iefix=oop.iefix||{};$.extend(oop.iefix,{flicker:{init:function(c){if(c==='body'){oop.util.log("[iefix.flicker] context: "+c);var fix=true;try{document.execCommand("BackgroundImageCache",false,fix);}catch(err){}}}}});})(oop.$);
;(function($){oop.iefix=oop.iefix||{};$.extend(oop.iefix,{init:function(c){oop.util.log("[iefix] context: "+c);if($.browser.msie&&(parseFloat($.browser.version)<8)){oop.util.initAll(oop.iefix,c);}}});})(oop.$);
;(function($){oop.helper=oop.helper||{};$.extend(oop.helper,{little_viewport:{init:function(c){oop.util.log('[oop.cmp.little_viewport] Context: '+c);if(oop.util.ie()){var viewport_width=$(window).width();if(viewport_width<'1018'){oop.util.log('viewport width'+viewport_width);$('#container').addClass('little_viewport');}}}}});})(oop.$);
;(function($){oop.css_ie=oop.css_ie||{};$.extend(oop.css_ie,{lastChild:{init:function(c){oop.util.log('[oop.css_ie.lastChild] Context: '+c);}}});})(oop.$);
;(function($){oop.css_ie=oop.css_ie||{};$.extend(oop.css_ie,{empty:{init:function(c){oop.util.log('[oop.css_ie.empty] Context: '+c);$('div[class*="mds-cmp"]:empty').addClass('CSSempty');}}});})(oop.$);
;(function($){oop.css_ie=oop.css_ie||{};$.extend(oop.css_ie,{firstChild:{tpl:['16'],init:function(c){if(oop.util.ie6()){oop.util.log('[oop.css_ie.firstChild] Context: '+c);}}}});})(oop.$);
;(function($){oop.ui=oop.ui||{};$.extend(oop.ui,{tpl_effects:{tpl:['01','02','03'],init:function(c){oop.util.log("[oop.ui.tpl_effects] context: "+c);oop.event_bus.subscribe('ui.tpl_effects.fade_in',oop.ui.tpl_effects._fade_in,this);},_fade_in:function(event,node){if(node.css('visibility')=='hidden')
node.css({visibility:'visible',opacity:0}).animate({opacity:1},800);}}});})(oop.$);
;(function($){oop.ui.radio_checkbox_beautify=oop.ui.radio_checkbox_beautify||{};$.extend(oop.ui.radio_checkbox_beautify,{init:function(c)
{var self=this;if(oop.util.curTemplate()!="16")
{$('input:not(".ui-helper-hidden-accessible")').livequery(function(){$(this).checkBox();});}
else
{$('input[checked]:not([disabled])').livequery(function()
{self._checkReplaceState(this);});$('input[checked][disabled]').livequery(function()
{self._checkReplaceState(this);});$('input[disabled]:not([checked])').livequery(function()
{self._checkReplaceState(this);});$('input:not([checked], [disabled])').livequery(function()
{self._checkReplaceState(this);});}
if($.browser.msie){$('input.ui-helper-hidden-accessible:enabled').live('click',function(){$(this).change();});}
if($.browser.msie){$("label img").live("click",function(){$("#"+$(this).parents("label").attr("for")).change();});}
$('input:radio').bind('click.checkBox',function(e)
{$(e.target).closest("li.ui-state-error").removeClass("ui-state-error");});},_checkReplaceState:function(el)
{var element=$(el);if(!element.is(':radio, :checkbox')||element.hasClass('mds-vc-prototype')||element.hasClass('ui-no-input-replace'))
{return;}
var replSelector="span.ui-checkbox, span.ui-radio";var replacement=element.next(replSelector);if(replacement.length===0)
{element.checkBox();replacement=element.next(replSelector);}
else
{try{element.checkBox('update');}
catch(error){if(replacement.length>0){replacement.remove();}
element.checkBox();replacement=element.next(replSelector);}}
if(replacement.length>0)
{var title=element.attr("title");var tabindex=element.attr("tabindex");if(typeof(title)!="undefined"&&title!=""){replacement.attr('title',title);}
if(typeof(tabindex)!="undefined"&&tabindex!=""){replacement.attr('tabindex',tabindex);element.removeAttr('tabindex');}
this._updateTooltip(replacement,title);}},_updateTooltip:function(element,text)
{if(element!=undefined&&element!=null)
{if(text!=""&&text!=undefined&&text!=null)
{text=text.split("##");var cnt="";$.each(text,function(i){cnt+="<li>"+this+"</li>";});if(cnt!="")
element.tooltip({showURL:false,fixPNG:true,extraClass:"",bodyHandler:function(){return $("<ul>"+cnt+"</ul>");}});}
else
{element.tooltip({extraClass:"ui-helper-hidden"});}}}});})(oop.$);
;(function($){oop.ui.scrollbars={remove:function(c){if(typeof(c)=="undefined")var c='.scroll-pane';oop.util.log('[oop.ui.scrollbars.remove] Context: '+c);$(c).jScrollPaneRemove();},reinitialiseScrollPane:function(c){if(typeof(c)=="undefined")var c='.scroll-pane';oop.util.log('[oop.ui.scrollbars.reinitialiseScrollPane] Context: '+c);$(c).jScrollPane({scrollbarWidth:17,showArrows:true,select:false,scrollbarMargin:0,isSelect:false});},reinit:function(c){if(typeof(c)=="undefined")var c='.scroll-pane';oop.util.log('[oop.ui.scrollbars.reinit] Context: '+c);$(c).jScrollPane({scrollbarWidth:17,showArrows:true,select:false,scrollbarMargin:0,isSelect:false});},init:function(c){oop.util.log('[oop.ui.scrollbars] Context: '+c);$('#mds-area-info > div > div.mds-cmp-project, #mds-area-content > div > div').livequery(function(){$(this).not('.scroll-pane').jScrollPane({hijackInternalLinks:true,scrollbarWidth:5,animateScroll:true,animateDuration:800,animateEase:'linear',showArrows:false,select:false,scrollbarMargin:0,isSelect:false,autoReinitialise:true,verticalDragMaxHeight:35,horizontalDragMaxWidth:35});$(this).addClass('scroll-pane');window.setTimeout(function(){oop.event_bus.dispatch('navigator.set_content_height',this);},100);window.setTimeout(function(){oop.event_bus.dispatch('navigator.set_info_height',this);},100);});return false;}};})(oop.$);
;(function($){oop.cmp=oop.cmp||{};$.extend(oop.cmp,{preloader:{init:function(c){oop.util.log('[preloader] Context: '+c);$('html').removeClass('enhanced').addClass('enhanced-loaded');window.setTimeout(function(){oop.cmp.preloader.prepare_dashboard()},500);},prepare_dashboard:function(){$('body').removeClass('preloading');$('#videoskretch').animate({opacity:1},1200);$('#container footer').animate({bottom:0},800);$('#container #logo').animate({opacity:1},800);}}});})(oop.$);
;(function($){oop.cmp=oop.cmp||{};$.extend(oop.cmp,{navigator:{menu:$('nav.mds-cmp-mainnavigation'),current_content:'',close_first:false,init:function(c){oop.util.log('[navigator] Context: '+c);oop.event_bus.subscribe('navigator.click_projekte',oop.cmp.navigator._click_projekte,this);oop.event_bus.subscribe('navigator.load_projekte',oop.cmp.navigator._load_projekte,this);oop.event_bus.subscribe('navigator.click_content',oop.cmp.navigator._click_content,this);oop.event_bus.subscribe('navigator.click_btn_content',oop.cmp.navigator._click_btn_content,this);oop.event_bus.subscribe('navigator.load_film_info',oop.cmp.navigator._load_film_info,this);oop.event_bus.subscribe('navigator.click_btn_info',oop.cmp.navigator._click_btn_info,this);oop.event_bus.subscribe('navigator.click_btn_info_hover',oop.cmp.navigator._click_btn_info_hover,this);oop.event_bus.subscribe('navigator.clear_dashboard',oop.cmp.navigator._clear_dashboard,this);oop.event_bus.subscribe('navigator.set_status_menu',oop.cmp.navigator._set_status_menu,this);oop.event_bus.subscribe('navigator.set_info_height',oop.cmp.navigator._set_info_height,this);oop.event_bus.subscribe('navigator.set_content_height',oop.cmp.navigator._set_content_height,this);if(oop.util.curTemplate()=='01')
oop.event_bus.dispatch('navigator.load_projekte',this,$('a[href ^= "/de/projekte/"]',oop.cmp.navigator.menu));$(window).resize(function(){oop.event_bus.dispatch('navigator.set_content_height',this);});$('a:not([target = "_blank"])',this.menu).click(function(e){e.preventDefault();oop.event_bus.dispatch('navigator.set_status_menu',this,$(this));oop.event_bus.dispatch('navigator.click_content',this,$(this));});$('a[href ^= "/de/projekte/"]',this.menu).unbind('click').click(function(e){e.preventDefault();oop.event_bus.dispatch('navigator.set_status_menu',this,$(this));oop.event_bus.dispatch('navigator.click_projekte',this,$(this));});$('a#btn_content').live('click',function(e){e.preventDefault();oop.event_bus.dispatch('navigator.click_btn_content',this,$(this));});$('a#btn_info').live('click',function(e){e.preventDefault();oop.event_bus.dispatch('navigator.click_btn_info',this,$(this));});$('a#btn_info_hover').live('click',function(e){e.preventDefault();oop.event_bus.dispatch('navigator.click_btn_info_hover',this,$(this));});},_set_content_height:function(){var height=$('#mds-area-content').height()-60;$.each($('#mds-area-content div.scroll-pane'),function(){var pane=$(this).height(height);var api=pane.data('jsp');api.reinitialise();});},_set_info_height:function(){var height=$('#mds-area-info').data('height');$.each($('#mds-area-info div.scroll-pane'),function(){var pane=$(this);pane.height(height);var api=pane.data('jsp');api.reinitialise();});},_set_status_menu:function(event,link){link.parent('li').siblings().find('a').removeClass('ui-state-active');link.toggleClass('ui-state-active');},_set_status_btn_content:function(){var btn=$('#btn_content');var status=(btn.data('open')===true)?false:true;btn.data('open',status);oop.util.log('btn_content STATUS: '+status);},_get_status_btn_content:function(){return $('#btn_content').data('open');},_click_btn_info_hover:function(event,link){var animation={left:-40};$('#videoskretch_left').unbind();$('#mds-area-info-hover').stop().animate(animation,700,function(){oop.event_bus.dispatch('navigator.click_btn_info',this,$('a#btn_info'));oop.event_bus.dispatch('videoskretch.hover_left',this);});},_click_btn_content:function(event,link){var that=oop.cmp.navigator;var animation=that._get_status_btn_content()?($('#videoskretch').data('fullsize'))?-500:-450:0;that._set_status_btn_content();oop.util.log('animation: '+animation+'  -  further_open: '+that._get_status_btn_content()+' link: '+link.attr('href'));$('#mds-area-content').stop(true,true).animate({right:animation},700,'easeInQuad',function(){if(that.close_first===true){that._insert_content(oop.cmp.navigator.current_content);}
link.toggleClass('ui-state-active');});},_click_content:function(event,link){oop.cmp.navigator.current_content=link;var layer_open=$('#btn_content').data('open');if(layer_open){oop.util.log('1 CLOSE_FIRST: '+$('#btn_content').data('open')+'  -  '+link.attr('href'));oop.cmp.navigator.close_first=true;oop.event_bus.dispatch('navigator.click_btn_content',this,$('#btn_content'));}
else{oop.util.log('2 CLOSE_FIRST: '+$('#btn_content').data('open')+'  -  '+link.attr('href'));oop.cmp.navigator._insert_content(link);}},_insert_content:function(link){var that=this;that.close_first=false;var container=$('section[id ^= "mds-tpl-"]');var unique_id=oop.util.clean_url(link.attr("title"));var insert_content=$('#mds-area-content div.mds-area-'+unique_id);if($('#mds-area-content').length==0){$(innerShiv('<section id="mds-area-content"><div><a href="#" id="btn_content"></a></div></section>',false)).insertAfter(container);$('#btn_content').data('open',false);}
if(insert_content.data('is_loaded')===undefined){var jqxhr=$.ajax({url:link.attr('href')+"?mode=ajax",dataType:'html'}).success(function(){$('#mds-area-content div[class^="mds-area"]:not(.ui-helper-hidden)').addClass('ui-helper-hidden');}).error(function(){alert("error loading: "+link.attr('href'));}).complete(function(data){var content_element='#mds-area-content > div';var content=$(content_element).append(innerShiv('<div class="mds-area-'+unique_id+'">'+data.responseText+'</div>',false));$('div.mds-area-'+unique_id).data('is_loaded',1);that._set_status_btn_content();$('#mds-area-content').stop(true,true).animate({right:0},700,'easeOutQuad',function(){$('#btn_content:not(.ui-state-active)').toggleClass('ui-state-active');});});}
else if(link.hasClass('ui-state-active')||$('#btn_content').data('open')){insert_content.siblings('div:not(.ui-helper-hidden)').addClass('ui-helper-hidden');insert_content.removeClass('ui-helper-hidden');that._set_status_btn_content();$('#btn_content').toggleClass('ui-state-active');$('#mds-area-content').animate({right:0},700,'easeOutQuad');}},_click_projekte:function(event,link){$('#container').addClass('ui-state-highlighted');$('#mds-area-info, #mds-area-content').addClass('ui-helper-hidden');$('section.mds-area-projects').removeClass('ui-helper-hidden').addClass('ui-state-active').animate({opacity:1},700);},_load_projekte:function(event,link){var container=$('section[id ^= "mds-tpl-"]');var jqxhr=$.ajax({url:link.attr('href')+"?mode=ajax",dataType:'html'}).error(function(){alert("error loading: "+link.attr('href'));}).complete(function(data){var content=$(innerShiv('<section class="mds-area-projects ui-helper-hidden" />',false)).append((data.responseText)).css({opacity:0});container.append(content);});},_load_film_info:function(event,link){var that=oop.cmp.navigator;var container=$('section[id ^= "mds-tpl-"]');var jqxhr=$.ajax({url:link+"?mode=ajax",dataType:'html'}).error(function(){alert("error");}).complete(function(data){if($('#mds-area-info').length==0){$(innerShiv('<section id="mds-area-info-hover"><div><a href="#" id="btn_info_hover"></a></div></section>',false)).insertAfter(container);var content=$(innerShiv('<section id="mds-area-info" />',false)).append('<div><a href="#" id="btn_info"/>'+data.responseText+'</div>');content.insertAfter(container);var scroll_height=827-231-280;$('#mds-area-info div.mds-cmp-project').height(scroll_height);}
else{$('#mds-area-info').data('height',$('#mds-area-info > div > div.mds-cmp-project').height());$('#mds-area-info > div > div.mds-cmp-project').replaceWith(data.responseText);oop.ui.scrollbars.reinit($('#mds-area-info > div.scroll-pane'));}});},_set_status_btn_info:function(){var btn=$('#btn_info');var status=(btn.data('open')===true)?false:true;btn.data('open',status);},_get_status_btn_info:function(){return $('#btn_info').data('open');},_click_btn_info:function(event,link){var that=oop.cmp.navigator;var animation=that._get_status_btn_info()?{left:-552,height:275}:{left:0,height:827};oop.util.log('_click_btn_info: '+that._get_status_btn_info());that._set_status_btn_info();$('#mds-area-info').stop().animate(animation,700,function(){link.toggleClass('ui-state-active');});},_clear_dashboard:function(btn){var that=oop.cmp.navigator;if(that._get_status_btn_content()){oop.event_bus.dispatch('navigator.click_btn_content',this,$('#btn_content'));that.menu.find('a').removeClass('ui-state-active');}
$('#mds-area-info-hover').stop().animate({left:-40},700,function(){});if(that._get_status_btn_info())
oop.event_bus.dispatch('navigator.click_btn_info',this,$('#btn_info'));}}});})(oop.$);
;(function($){oop.cmp=oop.cmp||{};$.extend(oop.cmp,{control_panel:{btn:{next:null,prev:null,pause:null,info:null,fullsize:null,timeline:null,volumes:null},data:{},panel:$('div.mds-cmp-panel'),player:null,volumens:null,timeline:null,is_paused:false,loaded:false,init:function(c){oop.util.log('[control_panel] Context: '+c);oop.event_bus.subscribe('control_panel.click_pause',oop.cmp.control_panel._pause,this);oop.event_bus.subscribe('control_panel.click_next',oop.cmp.control_panel._navigate_project,this);oop.event_bus.subscribe('control_panel.click_prev',oop.cmp.control_panel._navigate_project,this);oop.event_bus.subscribe('control_panel.mouseenter_volumes_slider',oop.cmp.control_panel._mouseenter_volumes_slider,this);oop.event_bus.subscribe('control_panel.click_fullsize',oop.cmp.control_panel._fullsize,this);oop.event_bus.subscribe('control_panel.detect_player_hover',oop.cmp.control_panel._detect_player_hover,this);oop.event_bus.subscribe('control_panel.refresh_player',oop.cmp.control_panel._refresh_player,this);oop.event_bus.subscribe('control_panel.load_film_info',oop.cmp.control_panel._load_film_info,this);oop.event_bus.subscribe('control_panel.reset_current_time',oop.cmp.control_panel._reset_current_time,this);oop.event_bus.subscribe('control_panel.prepare_player',oop.cmp.control_panel._prepare_player,this);},_prepare_player:function(c){window.setTimeout(function(){oop.event_bus.dispatch('control_panel.load_film_info',this);oop.event_bus.dispatch('control_panel.reset_current_time',this);oop.cmp.control_panel._init_player();oop.cmp.control_panel._init_timeline();oop.cmp.control_panel._init_volumes();oop.cmp.videoskretch._adjust();},500);},x_init:function(c){oop.event_bus.dispatch('control_panel.reset_current_time',this);this.player=$f('player');this.timeline.slider("option","value",0);this.player.addEvent('ready',oop.cmp.control_panel._show_player);oop.event_bus.dispatch('control_panel.load_film_info',this);},_show_player:function(){$('#videoskretch').animate({opacity:1},1000);},_init_player:function(){this.player=$f('player');this.player.addEvent('ready',oop.cmp.control_panel._setup_buttons);},_play_progress:function(data){var that=oop.cmp.control_panel;var value=(data.percent*100);that.timeline.slider("option","value",value);that._set_current_time(data.seconds);if(data.seconds>=(data.duration-1)){oop.util.log('LOAD NEXT ON PLAYLIST');oop.event_bus.dispatch('control_panel.click_next',this,$(this));}},_setup_buttons:function(player_id){var that=oop.cmp.control_panel;that.player.api('getDuration',oop.cmp.control_panel._set_duration);if(that.loaded===false){that.loaded=true;that.player.api('setVolume',0.5);that.player.api('getDuration',oop.cmp.control_panel._set_duration);that.btn={next:$('li.next > a',that.panel),prev:$('li.prev > a',that.panel),pause:$('li.pause > a',that.panel),info:$('li.info > a',that.panel),fullsize:$('li.fullsize > a',that.panel),timeline:$('li.timline > a',that.panel),volumes:$('li.volumes > a',that.panel)};that.btn.fullsize.data('clicked',1).data('video_hover',1);that.btn.fullsize.click(function(e){e.preventDefault();oop.event_bus.dispatch('control_panel.click_fullsize',this,$(this));});that.btn.next.click(function(e){e.preventDefault();oop.event_bus.dispatch('control_panel.click_next',this,$(this));});that.btn.prev.click(function(e){e.preventDefault();oop.event_bus.dispatch('control_panel.click_prev',this,$(this));});that.btn.info.click(function(e){e.preventDefault();oop.event_bus.dispatch('navigator.click_btn_info',this,$('a#btn_info'));});that.btn.volumes.mouseenter(function(e){e.preventDefault();$('div.ui-bg',$(this).parent()).addClass('ui-state-active');});that.btn.volumes.next('div').mouseenter(function(e){e.preventDefault();$(this).addClass('ui-state-hover');});that.btn.volumes.next('div').mouseleave(function(e){e.preventDefault();$(this).removeClass('ui-state-hover');});that.btn.volumes.mouseleave(function(e){e.preventDefault();window.setTimeout(function(){$('div.ui-bg',that.btn.volumes.parent()).removeClass('ui-state-active');},100);});that.btn.pause.click(function(){oop.event_bus.dispatch('control_panel.click_pause',this,$(this));});}
that.player.addEvent('playProgress',oop.cmp.control_panel._play_progress);},_load_film_info:function(event){var path=oop.data.playlist[$(window).data('playlist')][$(window).data('index')].path;oop.event_bus.dispatch('navigator.load_film_info',this,path);},_set_duration:function(duration){oop.cmp.control_panel.data.duration=duration;$('#end_time').text(oop.cmp.control_panel._format_time(duration));},_reset_current_time:function(duration){$('#current_time').text('00:00');},_detect_player_hover:function(event,btn){btn.data('video_hover',1);oop.event_bus.dispatch('control_panel.click_fullsize',this,btn);btn.data('video_hover',0);},_prev:function(event,btn){var video=this._get_video_object(false);$('#videoskretch').animate({opacity:0},800,function(){$('iframe',this).attr('src',oop.util.vimeo_url(video.vimeo));oop.event_bus.dispatch('control_panel.refresh_player',this);});},_navigate_project:function(event,btn){var direction=btn.parent('li').hasClass('next')?true:false;oop.util.log('direction: '+direction);var video=this._get_video_object(direction);$('#videoskretch').animate({opacity:0},800,function(){$('div.mds-cmp-tsll > ul > li').removeClass('ui-state-active');$('div.mds-cmp-tsll > ul > li[data-index="'+$(window).data('index')+'"]').addClass('ui-state-active');$('iframe',this).attr('src',oop.util.vimeo_url(video.vimeo));oop.event_bus.dispatch('control_panel.refresh_player',this);});},_get_video_object:function(next){oop.util.log('PLAYLIST: '+$(window).data('playlist')+'  | INDEX: '+$(window).data('index'));var playlist=$(window).data('playlist')?$(window).data('playlist'):'home';var index=$(window).data('index')?parseInt($(window).data('index')):0;var value=(next===true)?index+1:index-1;var length=oop.data.playlist[playlist].length;index=(value<0)?length:(value>=length)?0:value;oop.util.log('INDEX: '+index+' | value: '+value+'| length: '+length);this.set_player(playlist,index);return oop.data.playlist[playlist][index];},_fullsize:function(event,btn){oop.event_bus.dispatch('navigator.clear_dashboard',this,btn);},_pause:function(){var that=oop.cmp.control_panel;that.player.api('paused',oop.cmp.control_panel._stop_play);},_stop_play:function(value){var that=oop.cmp.control_panel;oop.util.log('_is_paused: '+value);var player_action='pause';if(value){player_action='play';}
oop.cmp.control_panel.is_paused=(player_action=='pause')?true:false;oop.util.log('PAUSE: '+value+' | API: '+player_action);that.player.api(player_action);},_init_timeline:function(){var that=this;if(that.timeline===null){that.timeline=$('li.timeline > div',this.panel).slider({range:"min",value:0,min:0,max:100,animate:true,slide:function(event,ui){var seek=Math.round(that.data.duration*parseFloat(ui.value/100));that._set_current_time(seek);that.player.api('seekTo',seek);},create:function(event,ui){$(this).parent().append('<span id="start_time">00:00</span>').append('<span id="current_time">00:00</span>').append('<span id="end_time">00:00</span>');}});}
else{that.timeline.slider("option","value",0);}},_set_current_time:function(time){$('#current_time').text(this._format_time(time));},_show_volumes:function(time){alert(1);},_init_volumes:function(){var that=this;if(that.volumens===null){that.volumens=$('li.volumes > div',this.panel).slider({orientation:"vertical",range:"min",value:50,min:0,animate:true,max:100,slide:function(event,ui){that.player.api('setVolume',parseFloat(ui.value/100));},create:function(event,ui){$(this).wrap('<div class="ui-bg"/>');$(this).parent('.ui-bg').height($(this).height()+10);}});}
else{that.volumens.slider("option","value",0);that._set_current_time(0);}},_format_time:function(value){var minute,hour,second,str_format;second=parseInt(value);minute=parseInt(second/60);second=(second%60);minute=minute%60;minute=(minute>9)?minute:'0'+minute;second=(second>9)?second:'0'+second;return minute+':'+second;},_refresh_player:function(){oop.util.log('REFRESH PLAYER__');window.setTimeout(function(){oop.cmp.control_panel.x_init();oop.cmp.videoskretch._adjust();oop.event_bus.dispatch('navigator.clear_dashboard',this);},500);},set_player:function(type,id){var playlist=(type!='')?type:'home';var index=(id!='')?id:'0';oop.util.log('SET PLAYER: '+playlist+' INDEX: '+index)
$(window).data({'playlist':playlist,'index':index});}}});})(oop.$);
;(function($){oop.cmp=oop.cmp||{};$.extend(oop.cmp,{videoskretch:{tpl:['01'],container:'',init:function(c){oop.util.log('[videoskretch] Context: '+c);oop.event_bus.subscribe('videoskretch.hover_left',oop.cmp.videoskretch._hover_left,this);oop.event_bus.subscribe('videoskretch.hover_right',oop.cmp.videoskretch._hover_right,this);var self=this;var playlist=$(window).data('playlist')?$(window).data('playlist'):'home';var index=$(window).data('index')?$(window).data('index'):0;$.videoskretch(oop.data.playlist[playlist][index]);$(window).resize(function(){oop.cmp.videoskretch._adjust();});$("#videoskretch").livequery(function(){var that=oop.cmp.videoskretch;that.container=$(this);that.container.data('fullsize',false);var stimeout=15000;$(window).bind("idle.idleTimer",function(){oop.util.log('USER IDLE - clear dashboard');$('#videoskretch').data('fullsize',true);oop.event_bus.dispatch('navigator.clear_dashboard',this,$('#btn_content'));});$(window).bind("active.idleTimer",function(){oop.util.log('USER IS ACTIVE - show dashboard');$('#videoskretch').data('fullsize',false);});$(window).idleTimer(stimeout);});oop.event_bus.dispatch('control_panel.prepare_player',this);oop.cmp.control_panel.set_player(playlist,index);$('#videoskretch_left').livequery(function(){oop.event_bus.dispatch('videoskretch.hover_left',this);});$('#videoskretch_right').livequery(function(){oop.event_bus.dispatch('videoskretch.hover_right',this);});},_hover_right:function(event){$('#videoskretch_right').hoverIntent({over:function(){var that=oop.cmp.videoskretch;var animation={right:-450};$('#mds-area-content').stop().animate(animation,700);},timeout:2500,out:function(){var that=oop.cmp.videoskretch;if(parseInt($('#mds-area-content').css('right'))==-450){var animation={right:-500};$('#mds-area-content').stop().animate(animation,700);}}});},_hover_left:function(event){$('#videoskretch_left').hoverIntent({over:function(){var that=oop.cmp.videoskretch;var animation={left:0};$('#mds-area-info-hover').stop().animate(animation,700);},timeout:2500,out:function(){var that=oop.cmp.videoskretch;if(parseInt($('#mds-area-info-hover').css('left'))==0){var animation={left:-40};$('#mds-area-info-hover').stop().animate(animation,700);}}});},_fullsize:function(){var that=oop.cmp.videoskretch;oop.cmp.control_panel.btn.fullsize.trigger('click');},_adjust:function(){var height=($(window).height()-$('footer').height());$("#videoskretch").width($(window).width()).height(height);}}});})(oop.$);
;(function($){oop.cmp=oop.cmp||{};$.extend(oop.cmp,{projects:{init:function(c){oop.util.log('[projects] Context: '+c);oop.event_bus.subscribe('projects.click_projects',oop.cmp.projects._click_projects,this);$('div.mds-cmp-tsll > ul > li > a').live('click',function(e){e.preventDefault();oop.event_bus.dispatch('projects.click_projects',this,$(this).parent('li'));});if($('section.mds-area-projects').length==0&&oop.util.curTemplate()!='01'){$('section[id |="mds-tpl"]').wrapInner(innerShiv('<section class="mds-area-projects ui-state-active" />',false));}},_click_projects:function(event,el){el.siblings().removeClass('ui-state-active');el.addClass('ui-state-active');var index=el.data('index');var playlist=el.data('playlist');oop.cmp.control_panel.set_player(playlist,index);$('#videoskretch').animate({opacity:0},500,function(){$(this).addClass('ui-helper-hidden')
if(oop.cmp.control_panel.player===null){oop.cmp.videoskretch.init();}
else{var video=oop.data.playlist[playlist][index];$('#videoskretch iframe').attr('src',oop.util.vimeo_url(video.vimeo));oop.event_bus.dispatch('control_panel.refresh_player',this);}
window.setTimeout(function(){$('section.mds-area-projects').animate({opacity:0},700,function(){$(this).removeClass('ui-state-active').addClass('ui-helper-hidden');});$('#container').removeClass('ui-state-highlighted');$('#videoskretch').removeClass('ui-helper-hidden').animate({opacity:1},1000,function(){$('#mds-area-info, #mds-area-content').removeClass('ui-helper-hidden');});},500);});}}});})(oop.$);
;(function($){oop.cmp=oop.cmp||{};$.extend(oop.cmp,{jumper:{container:null,init:function(c){oop.util.log('[jumper] Context: '+c);var container=$('#mds-area-content > div > div');container.livequery(function(){$(this).height($(window).height()-130);});$('div.mds-cmp-jump ul li a, div.mds-cmp-back a').live('click',function(e){e.preventDefault();var pane=($(this).parents('div.scroll-pane').length>0)?$(this).parents('div.scroll-pane'):$(window);var api=pane.data('jsp');var targetElementSelectorString=$(this).attr('href').slice(1);api.scrollToElement($('a[name="'+targetElementSelectorString+'"]'),true,true);});}}});})(oop.$);
;(function($){oop.cmp=oop.cmp||{};$.extend(oop.cmp,{filter:{filter_param:[],init:function(c){oop.util.log('[filter] Context: '+c);oop.event_bus.subscribe('filter.change',oop.cmp.filter._update_list,this);oop.event_bus.subscribe('filter.set_param',oop.cmp.filter._set_param,this);$('div.mds-cmp-filter form').livequery(function(e){oop.event_bus.dispatch('filter.set_param',this,$(this));});$('div.mds-cmp-filter ul li input').live('change',function(e){oop.event_bus.dispatch('filter.change',this,$(this));});},_set_param:function(event,filter){oop.cmp.filter.filter_param=$('div.mds-cmp-filter form').serializeArray();},_update_list:function(event,filter){var width=0;var css_values={width:0};var filter_value=filter.val();var size=parseInt($('div.mds-cmp-tsll > ul').attr('class').replace('size-',''));if(size==4)
width=240;else if(size==8)
width=182;else if(size==16)
width=118;else
width=87;if(filter.is(':checked')==true){css_values={width:width}
$('div.mds-cmp-tsll li[data-cat="'+filter_value+'"]').toggleClass('ui-helper-hidden').animate(css_values,700,'easeOutQuad');return false;}
$('div.mds-cmp-tsll li[data-cat="'+filter_value+'"]').not('.ui-helper-hidden').animate(css_values,700,'easeInQuad',function(){$(this).toggleClass('ui-helper-hidden');});}}});})(oop.$);
;(function($){oop.cmp=oop.cmp||{};$.extend(oop.cmp,{tooltip:{image:null,init:function(c){oop.util.log('[tooltip] Context: '+c);$('div.mds-cmp-tsll > ul > li a').livequery(function(){$(this).tooltip({track:true,delay:150,showURL:false,showBody:"|",fade:250});});}}});})(oop.$);
;(function($){oop.cmp=oop.cmp||{};$.extend(oop.cmp,{map:{map:'',init:function(c){oop.util.log('[map] Context: '+c);$('div.mds-cmp-map').livequery(function(){oop.cmp.map.prepare_map($(this));});},prepare_map:function(map_cmp){this.map=map_cmp;var info=oop.data.maps;var geocoder=new google.maps.Geocoder();var geo=geocoder.geocode({'address':info.address,'partialmatch':true},oop.cmp.map.set_geo);},build_map:function(){var info=oop.data.maps;var self=oop.cmp.map;var canvas=self.map.find(".canvas").get(0);if(canvas){var location=new google.maps.LatLng(info.latitude,info.longitude);if(info.maptype=='google.maps.MapTypeId.HYBRID')
map_type_id=google.maps.MapTypeId.HYBRID;else if(info.maptype=='google.maps.MapTypeId.SATELLITE')
map_type_id=google.maps.MapTypeId.SATELLITE;else
map_type_id=google.maps.MapTypeId.ROADMAP;var mapOptions={zoom:info.zoom,center:location,mapTypeId:google.maps.MapTypeId.ROADMAP};var map=new google.maps.Map(canvas,mapOptions);self.map.data("google-maps",map);var marker=new google.maps.Marker({position:location,map:map});var infoWindow=new google.maps.InfoWindow({content:info.description});google.maps.event.addListener(marker,"click",function(){infoWindow.open(map,marker);});}},set_geo:function(results,status){if(status=='OK'&&results.length>0){oop.data.maps.latitude=results[0].geometry.location.lat();oop.data.maps.longitude=results[0].geometry.location.lng();}
else{}
oop.cmp.map.build_map();}}});})(oop.$);
;(function($){oop.cmp=oop.cmp||{};$.extend(oop.cmp,{contact:{init:function(c){oop.util.log('[contact] Context: '+c);var self=this;oop.data.contact[1]={0:{type:'input',name:'email'},1:{type:'textarea',name:'nachricht'}};$('div.contact_form form').live('submit',function(e){e.preventDefault();var error_msg=self._validation(1);if(error_msg==''){self._submit_form($(this));}
else{alert(error_msg);}});},_submit_form:function(form){var data=form.serialize();$.ajax({url:form.attr('action'),data:data,type:'POST',timeout:2000,dataType:'html',beforeSend:function(){jQuery('.contact_form form').animate({opacity:"0.1"},100);},error:function(){return false;},success:function(data){if(data==1){jQuery('.contact_form form').hide();jQuery('.contact_form').append('<h1 class="emailInfo">Die Email wurde erfolgreich versendet!</h1>');}
else if(data==0){jQuery('.contact_form form').animate({opacity:"1"},300);}}});},_validation:function(step){var error_msg=value='';$.each(oop.data.contact[step],function(i,e){if(e.type=='radio'){if($('input[name="'+e.name+'"]:checked').val()===undefined){value=$('label[for ="'+e.name+'"]').html().replace(' *','');console.log(value);error_msg+=value+' ist nicht ausgewählt!'+''+"\n";}}
else if(e.type=='input'||e.type=='textarea'){console.log('DISABLED: '+$('#'+e.name).attr('disabled')+'  - '+e.name+' - indexof:'+$('label[for ="'+e.name+'"]').html().indexOf(' *'));if($.trim($('#'+e.name).val()).length==0&&!$('#'+e.name).attr('disabled')&&$('label[for ="'+e.name+'"]').html().indexOf(' *')>0){value=$('label[for ="'+e.name+'"]').html().replace(' *','');console.log(value);error_msg+=value+' ist nicht ausgefüllt!'+''+"\n";}}
else if(e.type=='select'){console.log('DISABLED: '+$('#'+e.name).attr('disabled'));if($('#'+e.name).val()==''&&!$('#'+e.name).attr('disabled')){value=$('label[for ="'+e.name+'"]').html().replace(' *','');console.log(value);error_msg+=value+' ist nicht ausgewählt!'+''+"\n";}}});return error_msg;}}});})(oop.$);
;(function($){oop.cmp=oop.cmp||{};$.extend(oop.cmp,{back_top:{init:function(c){oop.util.log('[back_top] Context: '+c);return false;$('div.mds-cmp-back > a').live('click',function(){var scroll_area=($(this).parents('div[class="jspContainer"]').length>0)?$(this).parents('div[class="jspContainer"]'):$(window);scroll_area.scrollTo('0px',5000);});}}});})(oop.$);
