//<![CDATA[
/*
 * jQuery JavaScript Library v1.3.2
 * http://jquery.com/
 *
 * Copyright (c) 2009 John Resig
 * Dual licensed under the MIT and GPL licenses.
 * http://docs.jquery.com/License
 *
 * Date: 2009-02-19 17:34:21 -0500 (Thu, 19 Feb 2009)
 * Revision: 6246
 */
(function(){var l=this,g,y=l.jQuery,p=l.$,o=l.jQuery=l.$=function(E,F){return new o.fn.init(E,F)},D=/^[^<]*(<(.|\s)+>)[^>]*$|^#([\w-]+)$/,f=/^.[^:#\[\.,]*$/;o.fn=o.prototype={init:function(E,H){E=E||document;if(E.nodeType){this[0]=E;this.length=1;this.context=E;return this}if(typeof E==="string"){var G=D.exec(E);if(G&&(G[1]||!H)){if(G[1]){E=o.clean([G[1]],H)}else{var I=document.getElementById(G[3]);if(I&&I.id!=G[3]){return o().find(E)}var F=o(I||[]);F.context=document;F.selector=E;return F}}else{return o(H).find(E)}}else{if(o.isFunction(E)){return o(document).ready(E)}}if(E.selector&&E.context){this.selector=E.selector;this.context=E.context}return this.setArray(o.isArray(E)?E:o.makeArray(E))},selector:"",jquery:"1.3.2",size:function(){return this.length},get:function(E){return E===g?Array.prototype.slice.call(this):this[E]},pushStack:function(F,H,E){var G=o(F);G.prevObject=this;G.context=this.context;if(H==="find"){G.selector=this.selector+(this.selector?" ":"")+E}else{if(H){G.selector=this.selector+"."+H+"("+E+")"}}return G},setArray:function(E){this.length=0;Array.prototype.push.apply(this,E);return this},each:function(F,E){return o.each(this,F,E)},index:function(E){return o.inArray(E&&E.jquery?E[0]:E,this)},attr:function(F,H,G){var E=F;if(typeof F==="string"){if(H===g){return this[0]&&o[G||"attr"](this[0],F)}else{E={};E[F]=H}}return this.each(function(I){for(F in E){o.attr(G?this.style:this,F,o.prop(this,E[F],G,I,F))}})},css:function(E,F){if((E=="width"||E=="height")&&parseFloat(F)<0){F=g}return this.attr(E,F,"curCSS")},text:function(F){if(typeof F!=="object"&&F!=null){return this.empty().append((this[0]&&this[0].ownerDocument||document).createTextNode(F))}var E="";o.each(F||this,function(){o.each(this.childNodes,function(){if(this.nodeType!=8){E+=this.nodeType!=1?this.nodeValue:o.fn.text([this])}})});return E},wrapAll:function(E){if(this[0]){var F=o(E,this[0].ownerDocument).clone();if(this[0].parentNode){F.insertBefore(this[0])}F.map(function(){var G=this;while(G.firstChild){G=G.firstChild}return G}).append(this)}return this},wrapInner:function(E){return this.each(function(){o(this).contents().wrapAll(E)})},wrap:function(E){return this.each(function(){o(this).wrapAll(E)})},append:function(){return this.domManip(arguments,true,function(E){if(this.nodeType==1){this.appendChild(E)}})},prepend:function(){return this.domManip(arguments,true,function(E){if(this.nodeType==1){this.insertBefore(E,this.firstChild)}})},before:function(){return this.domManip(arguments,false,function(E){this.parentNode.insertBefore(E,this)})},after:function(){return this.domManip(arguments,false,function(E){this.parentNode.insertBefore(E,this.nextSibling)})},end:function(){return this.prevObject||o([])},push:[].push,sort:[].sort,splice:[].splice,find:function(E){if(this.length===1){var F=this.pushStack([],"find",E);F.length=0;o.find(E,this[0],F);return F}else{return this.pushStack(o.unique(o.map(this,function(G){return o.find(E,G)})),"find",E)}},clone:function(G){var E=this.map(function(){if(!o.support.noCloneEvent&&!o.isXMLDoc(this)){var I=this.outerHTML;if(!I){var J=this.ownerDocument.createElement("div");J.appendChild(this.cloneNode(true));I=J.innerHTML}return o.clean([I.replace(/ jQuery\d+="(?:\d+|null)"/g,"").replace(/^\s*/,"")])[0]}else{return this.cloneNode(true)}});if(G===true){var H=this.find("*").andSelf(),F=0;E.find("*").andSelf().each(function(){if(this.nodeName!==H[F].nodeName){return}var I=o.data(H[F],"events");for(var K in I){for(var J in I[K]){o.event.add(this,K,I[K][J],I[K][J].data)}}F++})}return E},filter:function(E){return this.pushStack(o.isFunction(E)&&o.grep(this,function(G,F){return E.call(G,F)})||o.multiFilter(E,o.grep(this,function(F){return F.nodeType===1})),"filter",E)},closest:function(E){var G=o.expr.match.POS.test(E)?o(E):null,F=0;return this.map(function(){var H=this;while(H&&H.ownerDocument){if(G?G.index(H)>-1:o(H).is(E)){o.data(H,"closest",F);return H}H=H.parentNode;F++}})},not:function(E){if(typeof E==="string"){if(f.test(E)){return this.pushStack(o.multiFilter(E,this,true),"not",E)}else{E=o.multiFilter(E,this)}}var F=E.length&&E[E.length-1]!==g&&!E.nodeType;return this.filter(function(){return F?o.inArray(this,E)<0:this!=E})},add:function(E){return this.pushStack(o.unique(o.merge(this.get(),typeof E==="string"?o(E):o.makeArray(E))))},is:function(E){return !!E&&o.multiFilter(E,this).length>0},hasClass:function(E){return !!E&&this.is("."+E)},val:function(K){if(K===g){var E=this[0];if(E){if(o.nodeName(E,"option")){return(E.attributes.value||{}).specified?E.value:E.text}if(o.nodeName(E,"select")){var I=E.selectedIndex,L=[],M=E.options,H=E.type=="select-one";if(I<0){return null}for(var F=H?I:0,J=H?I+1:M.length;F<J;F++){var G=M[F];if(G.selected){K=o(G).val();if(H){return K}L.push(K)}}return L}return(E.value||"").replace(/\r/g,"")}return g}if(typeof K==="number"){K+=""}return this.each(function(){if(this.nodeType!=1){return}if(o.isArray(K)&&/radio|checkbox/.test(this.type)){this.checked=(o.inArray(this.value,K)>=0||o.inArray(this.name,K)>=0)}else{if(o.nodeName(this,"select")){var N=o.makeArray(K);o("option",this).each(function(){this.selected=(o.inArray(this.value,N)>=0||o.inArray(this.text,N)>=0)});if(!N.length){this.selectedIndex=-1}}else{this.value=K}}})},html:function(E){return E===g?(this[0]?this[0].innerHTML.replace(/ jQuery\d+="(?:\d+|null)"/g,""):null):this.empty().append(E)},replaceWith:function(E){return this.after(E).remove()},eq:function(E){return this.slice(E,+E+1)},slice:function(){return this.pushStack(Array.prototype.slice.apply(this,arguments),"slice",Array.prototype.slice.call(arguments).join(","))},map:function(E){return this.pushStack(o.map(this,function(G,F){return E.call(G,F,G)}))},andSelf:function(){return this.add(this.prevObject)},domManip:function(J,M,L){if(this[0]){var I=(this[0].ownerDocument||this[0]).createDocumentFragment(),F=o.clean(J,(this[0].ownerDocument||this[0]),I),H=I.firstChild;if(H){for(var G=0,E=this.length;G<E;G++){L.call(K(this[G],H),this.length>1||G>0?I.cloneNode(true):I)}}if(F){o.each(F,z)}}return this;function K(N,O){return M&&o.nodeName(N,"table")&&o.nodeName(O,"tr")?(N.getElementsByTagName("tbody")[0]||N.appendChild(N.ownerDocument.createElement("tbody"))):N}}};o.fn.init.prototype=o.fn;function z(E,F){if(F.src){o.ajax({url:F.src,async:false,dataType:"script"})}else{o.globalEval(F.text||F.textContent||F.innerHTML||"")}if(F.parentNode){F.parentNode.removeChild(F)}}function e(){return +new Date}o.extend=o.fn.extend=function(){var J=arguments[0]||{},H=1,I=arguments.length,E=false,G;if(typeof J==="boolean"){E=J;J=arguments[1]||{};H=2}if(typeof J!=="object"&&!o.isFunction(J)){J={}}if(I==H){J=this;--H}for(;H<I;H++){if((G=arguments[H])!=null){for(var F in G){var K=J[F],L=G[F];if(J===L){continue}if(E&&L&&typeof L==="object"&&!L.nodeType){J[F]=o.extend(E,K||(L.length!=null?[]:{}),L)}else{if(L!==g){J[F]=L}}}}}return J};var b=/z-?index|font-?weight|opacity|zoom|line-?height/i,q=document.defaultView||{},s=Object.prototype.toString;o.extend({noConflict:function(E){l.$=p;if(E){l.jQuery=y}return o},isFunction:function(E){return s.call(E)==="[object Function]"},isArray:function(E){return s.call(E)==="[object Array]"},isXMLDoc:function(E){return E.nodeType===9&&E.documentElement.nodeName!=="HTML"||!!E.ownerDocument&&o.isXMLDoc(E.ownerDocument)},globalEval:function(G){if(G&&/\S/.test(G)){var F=document.getElementsByTagName("head")[0]||document.documentElement,E=document.createElement("script");E.type="text/javascript";if(o.support.scriptEval){E.appendChild(document.createTextNode(G))}else{E.text=G}F.insertBefore(E,F.firstChild);F.removeChild(E)}},nodeName:function(F,E){return F.nodeName&&F.nodeName.toUpperCase()==E.toUpperCase()},each:function(G,K,F){var E,H=0,I=G.length;if(F){if(I===g){for(E in G){if(K.apply(G[E],F)===false){break}}}else{for(;H<I;){if(K.apply(G[H++],F)===false){break}}}}else{if(I===g){for(E in G){if(K.call(G[E],E,G[E])===false){break}}}else{for(var J=G[0];H<I&&K.call(J,H,J)!==false;J=G[++H]){}}}return G},prop:function(H,I,G,F,E){if(o.isFunction(I)){I=I.call(H,F)}return typeof I==="number"&&G=="curCSS"&&!b.test(E)?I+"px":I},className:{add:function(E,F){o.each((F||"").split(/\s+/),function(G,H){if(E.nodeType==1&&!o.className.has(E.className,H)){E.className+=(E.className?" ":"")+H}})},remove:function(E,F){if(E.nodeType==1){E.className=F!==g?o.grep(E.className.split(/\s+/),function(G){return !o.className.has(F,G)}).join(" "):""}},has:function(F,E){return F&&o.inArray(E,(F.className||F).toString().split(/\s+/))>-1}},swap:function(H,G,I){var E={};for(var F in G){E[F]=H.style[F];H.style[F]=G[F]}I.call(H);for(var F in G){H.style[F]=E[F]}},css:function(H,F,J,E){if(F=="width"||F=="height"){var L,G={position:"absolute",visibility:"hidden",display:"block"},K=F=="width"?["Left","Right"]:["Top","Bottom"];function I(){L=F=="width"?H.offsetWidth:H.offsetHeight;if(E==="border"){return}o.each(K,function(){if(!E){L-=parseFloat(o.curCSS(H,"padding"+this,true))||0}if(E==="margin"){L+=parseFloat(o.curCSS(H,"margin"+this,true))||0}else{L-=parseFloat(o.curCSS(H,"border"+this+"Width",true))||0}})}if(H.offsetWidth!==0){I()}else{o.swap(H,G,I)}return Math.max(0,Math.round(L))}return o.curCSS(H,F,J)},curCSS:function(I,F,G){var L,E=I.style;if(F=="opacity"&&!o.support.opacity){L=o.attr(E,"opacity");return L==""?"1":L}if(F.match(/float/i)){F=w}if(!G&&E&&E[F]){L=E[F]}else{if(q.getComputedStyle){if(F.match(/float/i)){F="float"}F=F.replace(/([A-Z])/g,"-$1").toLowerCase();var M=q.getComputedStyle(I,null);if(M){L=M.getPropertyValue(F)}if(F=="opacity"&&L==""){L="1"}}else{if(I.currentStyle){var J=F.replace(/\-(\w)/g,function(N,O){return O.toUpperCase()});L=I.currentStyle[F]||I.currentStyle[J];if(!/^\d+(px)?$/i.test(L)&&/^\d/.test(L)){var H=E.left,K=I.runtimeStyle.left;I.runtimeStyle.left=I.currentStyle.left;E.left=L||0;L=E.pixelLeft+"px";E.left=H;I.runtimeStyle.left=K}}}}return L},clean:function(F,K,I){K=K||document;if(typeof K.createElement==="undefined"){K=K.ownerDocument||K[0]&&K[0].ownerDocument||document}if(!I&&F.length===1&&typeof F[0]==="string"){var H=/^<(\w+)\s*\/?>$/.exec(F[0]);if(H){return[K.createElement(H[1])]}}var G=[],E=[],L=K.createElement("div");o.each(F,function(P,S){if(typeof S==="number"){S+=""}if(!S){return}if(typeof S==="string"){S=S.replace(/(<(\w+)[^>]*?)\/>/g,function(U,V,T){return T.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i)?U:V+"></"+T+">"});var O=S.replace(/^\s+/,"").substring(0,10).toLowerCase();var Q=!O.indexOf("<opt")&&[1,"<select multiple='multiple'>","</select>"]||!O.indexOf("<leg")&&[1,"<fieldset>","</fieldset>"]||O.match(/^<(thead|tbody|tfoot|colg|cap)/)&&[1,"<table>","</table>"]||!O.indexOf("<tr")&&[2,"<table><tbody>","</tbody></table>"]||(!O.indexOf("<td")||!O.indexOf("<th"))&&[3,"<table><tbody><tr>","</tr></tbody></table>"]||!O.indexOf("<col")&&[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"]||!o.support.htmlSerialize&&[1,"div<div>","</div>"]||[0,"",""];L.innerHTML=Q[1]+S+Q[2];while(Q[0]--){L=L.lastChild}if(!o.support.tbody){var R=/<tbody/i.test(S),N=!O.indexOf("<table")&&!R?L.firstChild&&L.firstChild.childNodes:Q[1]=="<table>"&&!R?L.childNodes:[];for(var M=N.length-1;M>=0;--M){if(o.nodeName(N[M],"tbody")&&!N[M].childNodes.length){N[M].parentNode.removeChild(N[M])}}}if(!o.support.leadingWhitespace&&/^\s/.test(S)){L.insertBefore(K.createTextNode(S.match(/^\s*/)[0]),L.firstChild)}S=o.makeArray(L.childNodes)}if(S.nodeType){G.push(S)}else{G=o.merge(G,S)}});if(I){for(var J=0;G[J];J++){if(o.nodeName(G[J],"script")&&(!G[J].type||G[J].type.toLowerCase()==="text/javascript")){E.push(G[J].parentNode?G[J].parentNode.removeChild(G[J]):G[J])}else{if(G[J].nodeType===1){G.splice.apply(G,[J+1,0].concat(o.makeArray(G[J].getElementsByTagName("script"))))}I.appendChild(G[J])}}return E}return G},attr:function(J,G,K){if(!J||J.nodeType==3||J.nodeType==8){return g}var H=!o.isXMLDoc(J),L=K!==g;G=H&&o.props[G]||G;if(J.tagName){var F=/href|src|style/.test(G);if(G=="selected"&&J.parentNode){J.parentNode.selectedIndex}if(G in J&&H&&!F){if(L){if(G=="type"&&o.nodeName(J,"input")&&J.parentNode){throw"type property can't be changed"}J[G]=K}if(o.nodeName(J,"form")&&J.getAttributeNode(G)){return J.getAttributeNode(G).nodeValue}if(G=="tabIndex"){var I=J.getAttributeNode("tabIndex");return I&&I.specified?I.value:J.nodeName.match(/(button|input|object|select|textarea)/i)?0:J.nodeName.match(/^(a|area)$/i)&&J.href?0:g}return J[G]}if(!o.support.style&&H&&G=="style"){return o.attr(J.style,"cssText",K)}if(L){J.setAttribute(G,""+K)}var E=!o.support.hrefNormalized&&H&&F?J.getAttribute(G,2):J.getAttribute(G);return E===null?g:E}if(!o.support.opacity&&G=="opacity"){if(L){J.zoom=1;J.filter=(J.filter||"").replace(/alpha\([^)]*\)/,"")+(parseInt(K)+""=="NaN"?"":"alpha(opacity="+K*100+")")}return J.filter&&J.filter.indexOf("opacity=")>=0?(parseFloat(J.filter.match(/opacity=([^)]*)/)[1])/100)+"":""}G=G.replace(/-([a-z])/ig,function(M,N){return N.toUpperCase()});if(L){J[G]=K}return J[G]},trim:function(E){return(E||"").replace(/^\s+|\s+$/g,"")},makeArray:function(G){var E=[];if(G!=null){var F=G.length;if(F==null||typeof G==="string"||o.isFunction(G)||G.setInterval){E[0]=G}else{while(F){E[--F]=G[F]}}}return E},inArray:function(G,H){for(var E=0,F=H.length;E<F;E++){if(H[E]===G){return E}}return -1},merge:function(H,E){var F=0,G,I=H.length;if(!o.support.getAll){while((G=E[F++])!=null){if(G.nodeType!=8){H[I++]=G}}}else{while((G=E[F++])!=null){H[I++]=G}}return H},unique:function(K){var F=[],E={};try{for(var G=0,H=K.length;G<H;G++){var J=o.data(K[G]);if(!E[J]){E[J]=true;F.push(K[G])}}}catch(I){F=K}return F},grep:function(F,J,E){var G=[];for(var H=0,I=F.length;H<I;H++){if(!E!=!J(F[H],H)){G.push(F[H])}}return G},map:function(E,J){var F=[];for(var G=0,H=E.length;G<H;G++){var I=J(E[G],G);if(I!=null){F[F.length]=I}}return F.concat.apply([],F)}});var C=navigator.userAgent.toLowerCase();o.browser={version:(C.match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/)||[0,"0"])[1],safari:/webkit/.test(C),opera:/opera/.test(C),msie:/msie/.test(C)&&!/opera/.test(C),mozilla:/mozilla/.test(C)&&!/(compatible|webkit)/.test(C)};o.each({parent:function(E){return E.parentNode},parents:function(E){return o.dir(E,"parentNode")},next:function(E){return o.nth(E,2,"nextSibling")},prev:function(E){return o.nth(E,2,"previousSibling")},nextAll:function(E){return o.dir(E,"nextSibling")},prevAll:function(E){return o.dir(E,"previousSibling")},siblings:function(E){return o.sibling(E.parentNode.firstChild,E)},children:function(E){return o.sibling(E.firstChild)},contents:function(E){return o.nodeName(E,"iframe")?E.contentDocument||E.contentWindow.document:o.makeArray(E.childNodes)}},function(E,F){o.fn[E]=function(G){var H=o.map(this,F);if(G&&typeof G=="string"){H=o.multiFilter(G,H)}return this.pushStack(o.unique(H),E,G)}});o.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(E,F){o.fn[E]=function(G){var J=[],L=o(G);for(var K=0,H=L.length;K<H;K++){var I=(K>0?this.clone(true):this).get();o.fn[F].apply(o(L[K]),I);J=J.concat(I)}return this.pushStack(J,E,G)}});o.each({removeAttr:function(E){o.attr(this,E,"");if(this.nodeType==1){this.removeAttribute(E)}},addClass:function(E){o.className.add(this,E)},removeClass:function(E){o.className.remove(this,E)},toggleClass:function(F,E){if(typeof E!=="boolean"){E=!o.className.has(this,F)}o.className[E?"add":"remove"](this,F)},remove:function(E){if(!E||o.filter(E,[this]).length){o("*",this).add([this]).each(function(){o.event.remove(this);o.removeData(this)});if(this.parentNode){this.parentNode.removeChild(this)}}},empty:function(){o(this).children().remove();while(this.firstChild){this.removeChild(this.firstChild)}}},function(E,F){o.fn[E]=function(){return this.each(F,arguments)}});function j(E,F){return E[0]&&parseInt(o.curCSS(E[0],F,true),10)||0}var h="jQuery"+e(),v=0,A={};o.extend({cache:{},data:function(F,E,G){F=F==l?A:F;var H=F[h];if(!H){H=F[h]=++v}if(E&&!o.cache[H]){o.cache[H]={}}if(G!==g){o.cache[H][E]=G}return E?o.cache[H][E]:H},removeData:function(F,E){F=F==l?A:F;var H=F[h];if(E){if(o.cache[H]){delete o.cache[H][E];E="";for(E in o.cache[H]){break}if(!E){o.removeData(F)}}}else{try{delete F[h]}catch(G){if(F.removeAttribute){F.removeAttribute(h)}}delete o.cache[H]}},queue:function(F,E,H){if(F){E=(E||"fx")+"queue";var G=o.data(F,E);if(!G||o.isArray(H)){G=o.data(F,E,o.makeArray(H))}else{if(H){G.push(H)}}}return G},dequeue:function(H,G){var E=o.queue(H,G),F=E.shift();if(!G||G==="fx"){F=E[0]}if(F!==g){F.call(H)}}});o.fn.extend({data:function(E,G){var H=E.split(".");H[1]=H[1]?"."+H[1]:"";if(G===g){var F=this.triggerHandler("getData"+H[1]+"!",[H[0]]);if(F===g&&this.length){F=o.data(this[0],E)}return F===g&&H[1]?this.data(H[0]):F}else{return this.trigger("setData"+H[1]+"!",[H[0],G]).each(function(){o.data(this,E,G)})}},removeData:function(E){return this.each(function(){o.removeData(this,E)})},queue:function(E,F){if(typeof E!=="string"){F=E;E="fx"}if(F===g){return o.queue(this[0],E)}return this.each(function(){var G=o.queue(this,E,F);if(E=="fx"&&G.length==1){G[0].call(this)}})},dequeue:function(E){return this.each(function(){o.dequeue(this,E)})}});

/*
 * Raphael 1.3.2 - JavaScript Vector Library
 *
 * Copyright (c) 2009 Dmitry Baranovskiy (http://raphaeljs.com)
 * Licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) license.
 */
Raphael=(function(){var a=/[, ]+/,aY=/^(circle|rect|path|ellipse|text|image)$/,a9="prototype",W="hasOwnProperty",P=document,aB=window,m={was:Object[a9][W].call(aB,"Raphael"),is:aB.Raphael},au=function(){if(au.is(arguments[0],"array")){var d=arguments[0],e=z[a7](au,d.splice(0,3+au.is(d[0],aq))),S=e.set();for(var R=0,bc=d[n];R<bc;R++){var E=d[R]||{};aY.test(E.type)&&S[f](e[E.type]().attr(E));}return S;}return z[a7](au,arguments);},a4=function(){},aU="appendChild",a7="apply",a2="concat",aA="",at=" ",C="split",J="click dblclick mousedown mousemove mouseout mouseover mouseup"[C](at),aH="join",n="length",bb=String[a9].toLowerCase,af=Math,h=af.max,aR=af.min,aq="number",aJ="toString",aE=Object[a9][aJ],a0={},aV=af.pow,f="push",a5=/^(?=[\da-f]$)/,c=/^url\(['"]?([^\)]+?)['"]?\)$/i,A=/^\s*((#[a-f\d]{6})|(#[a-f\d]{3})|rgb\(\s*([\d\.]+\s*,\s*[\d\.]+\s*,\s*[\d\.]+)\s*\)|rgb\(\s*([\d\.]+%\s*,\s*[\d\.]+%\s*,\s*[\d\.]+%)\s*\)|hs[bl]\(\s*([\d\.]+\s*,\s*[\d\.]+\s*,\s*[\d\.]+)\s*\)|hs[bl]\(\s*([\d\.]+%\s*,\s*[\d\.]+%\s*,\s*[\d\.]+%)\s*\))\s*$/i,U=af.round,y="setAttribute",aa=parseFloat,K=parseInt,aX=String[a9].toUpperCase,k={blur:0,"clip-rect":"0 0 1e9 1e9",cursor:"default",cx:0,cy:0,fill:"#fff","fill-opacity":1,font:'10px "Arial"',"font-family":'"Arial"',"font-size":"10","font-style":"normal","font-weight":400,gradient:0,height:0,href:"http://raphaeljs.com/",opacity:1,path:"M0,0",r:0,rotation:0,rx:0,ry:0,scale:"1 1",src:"",stroke:"#000","stroke-dasharray":"","stroke-linecap":"butt","stroke-linejoin":"butt","stroke-miterlimit":0,"stroke-opacity":1,"stroke-width":1,target:"_blank","text-anchor":"middle",title:"Raphael",translation:"0 0",width:0,x:0,y:0},ad={along:"along",blur:aq,"clip-rect":"csv",cx:aq,cy:aq,fill:"colour","fill-opacity":aq,"font-size":aq,height:aq,opacity:aq,path:"path",r:aq,rotation:"csv",rx:aq,ry:aq,scale:"csv",stroke:"colour","stroke-opacity":aq,"stroke-width":aq,translation:"csv",width:aq,x:aq,y:aq},aZ="replace";au.version="1.3.2";au.type=(aB.SVGAngle||P.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1")?"SVG":"VML");if(au.type=="VML"){var ak=P.createElement("div");ak.innerHTML="<!--[if vml]><br><br><![endif]-->";if(ak.childNodes[n]!=2){return au.type=null;}ak=null;}au.svg=!(au.vml=au.type=="VML");a4[a9]=au[a9];au._id=0;au._oid=0;au.fn={};au.is=function(e,d){d=bb.call(d);return((d=="object"||d=="undefined")&&typeof e==d)||(e==null&&d=="null")||bb.call(aE.call(e).slice(8,-1))==d;};au.setWindow=function(d){aB=d;P=aB.document;};var aM=function(e){if(au.vml){var d=/^\s+|\s+$/g;aM=an(function(R){var S;R=(R+aA)[aZ](d,aA);try{var bc=new aB.ActiveXObject("htmlfile");bc.write("<body>");bc.close();S=bc.body;}catch(be){S=aB.createPopup().document.body;}var i=S.createTextRange();try{S.style.color=R;var bd=i.queryCommandValue("ForeColor");bd=((bd&255)<<16)|(bd&65280)|((bd&16711680)>>>16);return"#"+("000000"+bd[aJ](16)).slice(-6);}catch(be){return"none";}});}else{var E=P.createElement("i");E.title="Rapha\xebl Colour Picker";E.style.display="none";P.body[aU](E);aM=an(function(i){E.style.color=i;return P.defaultView.getComputedStyle(E,aA).getPropertyValue("color");});}return aM(e);};var ao=function(){return"hsb("+[this.h,this.s,this.b]+")";},w=function(){return this.hex;};au.hsb2rgb=an(function(bf,bd,bj){if(au.is(bf,"object")&&"h" in bf&&"s" in bf&&"b" in bf){bj=bf.b;bd=bf.s;bf=bf.h;}var R,S,bk;if(bj==0){return{r:0,g:0,b:0,hex:"#000"};}if(bf>1||bd>1||bj>1){bf/=255;bd/=255;bj/=255;}var bc=~~(bf*6),bg=(bf*6)-bc,E=bj*(1-bd),e=bj*(1-(bd*bg)),bl=bj*(1-(bd*(1-bg)));R=[bj,e,E,E,bl,bj,bj][bc];S=[bl,bj,bj,e,E,E,bl][bc];bk=[E,E,bl,bj,bj,e,E][bc];R*=255;S*=255;bk*=255;var bh={r:R,g:S,b:bk,toString:w},d=(~~R)[aJ](16),be=(~~S)[aJ](16),bi=(~~bk)[aJ](16);d=d[aZ](a5,"0");be=be[aZ](a5,"0");bi=bi[aZ](a5,"0");bh.hex="#"+d+be+bi;return bh;},au);au.rgb2hsb=an(function(d,e,bd){if(au.is(d,"object")&&"r" in d&&"g" in d&&"b" in d){bd=d.b;e=d.g;d=d.r;}if(au.is(d,"string")){var bf=au.getRGB(d);d=bf.r;e=bf.g;bd=bf.b;}if(d>1||e>1||bd>1){d/=255;e/=255;bd/=255;}var bc=h(d,e,bd),i=aR(d,e,bd),R,E,S=bc;if(i==bc){return{h:0,s:0,b:bc};}else{var be=(bc-i);E=be/bc;if(d==bc){R=(e-bd)/be;}else{if(e==bc){R=2+((bd-d)/be);}else{R=4+((d-e)/be);}}R/=6;R<0&&R++;R>1&&R--;}return{h:R,s:E,b:S,toString:ao};},au);var aN=/,?([achlmqrstvxz]),?/gi;au._path2string=function(){return this.join(",")[aZ](aN,"$1");};function an(E,e,d){function i(){var R=Array[a9].slice.call(arguments,0),bc=R[aH]("\u25ba"),S=i.cache=i.cache||{},bd=i.count=i.count||[];if(S[W](bc)){return d?d(S[bc]):S[bc];}bd[n]>=1000&&delete S[bd.shift()];bd[f](bc);S[bc]=E[a7](e,R);return d?d(S[bc]):S[bc];}return i;}au.getRGB=an(function(d){if(!d||!!((d=d+aA).indexOf("-")+1)){return{r:-1,g:-1,b:-1,hex:"none",error:1};}if(d=="none"){return{r:-1,g:-1,b:-1,hex:"none"};}!(({hs:1,rg:1})[W](d.substring(0,2))||d.charAt()=="#")&&(d=aM(d));var S,i,E,be,bf,bc=d.match(A);if(bc){if(bc[2]){be=K(bc[2].substring(5),16);E=K(bc[2].substring(3,5),16);i=K(bc[2].substring(1,3),16);}if(bc[3]){be=K((bf=bc[3].charAt(3))+bf,16);E=K((bf=bc[3].charAt(2))+bf,16);i=K((bf=bc[3].charAt(1))+bf,16);}if(bc[4]){bc=bc[4][C](/\s*,\s*/);i=aa(bc[0]);E=aa(bc[1]);be=aa(bc[2]);}if(bc[5]){bc=bc[5][C](/\s*,\s*/);i=aa(bc[0])*2.55;E=aa(bc[1])*2.55;be=aa(bc[2])*2.55;}if(bc[6]){bc=bc[6][C](/\s*,\s*/);i=aa(bc[0]);E=aa(bc[1]);be=aa(bc[2]);return au.hsb2rgb(i,E,be);}if(bc[7]){bc=bc[7][C](/\s*,\s*/);i=aa(bc[0])*2.55;E=aa(bc[1])*2.55;be=aa(bc[2])*2.55;return au.hsb2rgb(i,E,be);}bc={r:i,g:E,b:be};var e=(~~i)[aJ](16),R=(~~E)[aJ](16),bd=(~~be)[aJ](16);e=e[aZ](a5,"0");R=R[aZ](a5,"0");bd=bd[aZ](a5,"0");bc.hex="#"+e+R+bd;return bc;}return{r:-1,g:-1,b:-1,hex:"none",error:1};},au);au.getColor=function(e){var i=this.getColor.start=this.getColor.start||{h:0,s:1,b:e||0.75},d=this.hsb2rgb(i.h,i.s,i.b);i.h+=0.075;if(i.h>1){i.h=0;i.s-=0.2;i.s<=0&&(this.getColor.start={h:0,s:1,b:i.b});}return d.hex;};au.getColor.reset=function(){delete this.start;};var aC=/([achlmqstvz])[\s,]*((-?\d*\.?\d*(?:e[-+]?\d+)?\s*,?\s*)+)/ig,ar=/(-?\d*\.?\d*(?:e[-+]?\d+)?)\s*,?\s*/ig;au.parsePathString=an(function(d){if(!d){return null;}var i={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},e=[];if(au.is(d,"array")&&au.is(d[0],"array")){e=aD(d);}if(!e[n]){(d+aA)[aZ](aC,function(R,E,bd){var bc=[],S=bb.call(E);bd[aZ](ar,function(bf,be){be&&bc[f](+be);});if(S=="m"&&bc[n]>2){e[f]([E][a2](bc.splice(0,2)));S="l";E=E=="m"?"l":"L";}while(bc[n]>=i[S]){e[f]([E][a2](bc.splice(0,i[S])));if(!i[S]){break;}}});}e[aJ]=au._path2string;return e;});au.findDotsAtSegment=function(e,d,bq,bo,bc,R,be,bd,bk){var bi=1-bk,bh=aV(bi,3)*e+aV(bi,2)*3*bk*bq+bi*3*bk*bk*bc+aV(bk,3)*be,bf=aV(bi,3)*d+aV(bi,2)*3*bk*bo+bi*3*bk*bk*R+aV(bk,3)*bd,bm=e+2*bk*(bq-e)+bk*bk*(bc-2*bq+e),bl=d+2*bk*(bo-d)+bk*bk*(R-2*bo+d),bp=bq+2*bk*(bc-bq)+bk*bk*(be-2*bc+bq),bn=bo+2*bk*(R-bo)+bk*bk*(bd-2*R+bo),bj=(1-bk)*e+bk*bq,bg=(1-bk)*d+bk*bo,E=(1-bk)*bc+bk*be,i=(1-bk)*R+bk*bd,S=(90-af.atan((bm-bp)/(bl-bn))*180/af.PI);(bm>bp||bl<bn)&&(S+=180);return{x:bh,y:bf,m:{x:bm,y:bl},n:{x:bp,y:bn},start:{x:bj,y:bg},end:{x:E,y:i},alpha:S};};var Y=an(function(bh){if(!bh){return{x:0,y:0,width:0,height:0};}bh=L(bh);var be=0,bd=0,R=[],e=[],E;for(var S=0,bg=bh[n];S<bg;S++){E=bh[S];if(E[0]=="M"){be=E[1];bd=E[2];R[f](be);e[f](bd);}else{var bc=aL(be,bd,E[1],E[2],E[3],E[4],E[5],E[6]);R=R[a2](bc.min.x,bc.max.x);e=e[a2](bc.min.y,bc.max.y);be=E[5];bd=E[6];}}var d=aR[a7](0,R),bf=aR[a7](0,e);return{x:d,y:bf,width:h[a7](0,R)-d,height:h[a7](0,e)-bf};}),aD=function(bc){var E=[];if(!au.is(bc,"array")||!au.is(bc&&bc[0],"array")){bc=au.parsePathString(bc);}for(var e=0,R=bc[n];e<R;e++){E[e]=[];for(var d=0,S=bc[e][n];d<S;d++){E[e][d]=bc[e][d];}}E[aJ]=au._path2string;return E;},ah=an(function(R){if(!au.is(R,"array")||!au.is(R&&R[0],"array")){R=au.parsePathString(R);}var bg=[],bi=0,bh=0,bl=0,bk=0,E=0;if(R[0][0]=="M"){bi=R[0][1];bh=R[0][2];bl=bi;bk=bh;E++;bg[f](["M",bi,bh]);}for(var bd=E,bm=R[n];bd<bm;bd++){var d=bg[bd]=[],bj=R[bd];if(bj[0]!=bb.call(bj[0])){d[0]=bb.call(bj[0]);switch(d[0]){case"a":d[1]=bj[1];d[2]=bj[2];d[3]=bj[3];d[4]=bj[4];d[5]=bj[5];d[6]=+(bj[6]-bi).toFixed(3);d[7]=+(bj[7]-bh).toFixed(3);break;case"v":d[1]=+(bj[1]-bh).toFixed(3);break;case"m":bl=bj[1];bk=bj[2];default:for(var bc=1,be=bj[n];bc<be;bc++){d[bc]=+(bj[bc]-((bc%2)?bi:bh)).toFixed(3);}}}else{d=bg[bd]=[];if(bj[0]=="m"){bl=bj[1]+bi;bk=bj[2]+bh;}for(var S=0,e=bj[n];S<e;S++){bg[bd][S]=bj[S];}}var bf=bg[bd][n];switch(bg[bd][0]){case"z":bi=bl;bh=bk;break;case"h":bi+=+bg[bd][bf-1];break;case"v":bh+=+bg[bd][bf-1];break;default:bi+=+bg[bd][bf-2];bh+=+bg[bd][bf-1];}}bg[aJ]=au._path2string;return bg;},0,aD),t=an(function(R){if(!au.is(R,"array")||!au.is(R&&R[0],"array")){R=au.parsePathString(R);}var bf=[],bh=0,bg=0,bk=0,bj=0,E=0;if(R[0][0]=="M"){bh=+R[0][1];bg=+R[0][2];bk=bh;bj=bg;E++;bf[0]=["M",bh,bg];}for(var bd=E,bl=R[n];bd<bl;bd++){var d=bf[bd]=[],bi=R[bd];if(bi[0]!=aX.call(bi[0])){d[0]=aX.call(bi[0]);switch(d[0]){case"A":d[1]=bi[1];d[2]=bi[2];d[3]=bi[3];d[4]=bi[4];d[5]=bi[5];d[6]=+(bi[6]+bh);d[7]=+(bi[7]+bg);break;case"V":d[1]=+bi[1]+bg;break;case"H":d[1]=+bi[1]+bh;break;case"M":bk=+bi[1]+bh;bj=+bi[2]+bg;default:for(var bc=1,be=bi[n];bc<be;bc++){d[bc]=+bi[bc]+((bc%2)?bh:bg);}}}else{for(var S=0,e=bi[n];S<e;S++){bf[bd][S]=bi[S];}}switch(d[0]){case"Z":bh=bk;bg=bj;break;case"H":bh=d[1];break;case"V":bg=d[1];break;default:bh=bf[bd][bf[bd][n]-2];bg=bf[bd][bf[bd][n]-1];}}bf[aJ]=au._path2string;return bf;},null,aD),a8=function(e,E,d,i){return[e,E,d,i,d,i];},aT=function(e,E,bc,R,d,i){var S=1/3,bd=2/3;return[S*e+bd*bc,S*E+bd*R,S*d+bd*bc,S*i+bd*R,d,i];},O=function(bl,bQ,bu,bs,bm,bg,S,bk,bP,bn){var R=af.PI,br=R*120/180,d=R/180*(+bm||0),by=[],bv,bM=an(function(bR,bU,i){var bT=bR*af.cos(i)-bU*af.sin(i),bS=bR*af.sin(i)+bU*af.cos(i);return{x:bT,y:bS};});if(!bn){bv=bM(bl,bQ,-d);bl=bv.x;bQ=bv.y;bv=bM(bk,bP,-d);bk=bv.x;bP=bv.y;var e=af.cos(R/180*bm),bi=af.sin(R/180*bm),bA=(bl-bk)/2,bz=(bQ-bP)/2;var bK=(bA*bA)/(bu*bu)+(bz*bz)/(bs*bs);if(bK>1){bK=af.sqrt(bK);bu=bK*bu;bs=bK*bs;}var E=bu*bu,bD=bs*bs,bF=(bg==S?-1:1)*af.sqrt(af.abs((E*bD-E*bz*bz-bD*bA*bA)/(E*bz*bz+bD*bA*bA))),bp=bF*bu*bz/bs+(bl+bk)/2,bo=bF*-bs*bA/bu+(bQ+bP)/2,bf=af.asin(((bQ-bo)/bs).toFixed(7)),be=af.asin(((bP-bo)/bs).toFixed(7));bf=bl<bp?R-bf:bf;be=bk<bp?R-be:be;bf<0&&(bf=R*2+bf);be<0&&(be=R*2+be);if(S&&bf>be){bf=bf-R*2;}if(!S&&be>bf){be=be-R*2;}}else{bf=bn[0];be=bn[1];bp=bn[2];bo=bn[3];}var bj=be-bf;if(af.abs(bj)>br){var bq=be,bt=bk,bh=bP;be=bf+br*(S&&be>bf?1:-1);bk=bp+bu*af.cos(be);bP=bo+bs*af.sin(be);by=O(bk,bP,bu,bs,bm,0,S,bt,bh,[be,bq,bp,bo]);}bj=be-bf;var bd=af.cos(bf),bO=af.sin(bf),bc=af.cos(be),bN=af.sin(be),bB=af.tan(bj/4),bE=4/3*bu*bB,bC=4/3*bs*bB,bL=[bl,bQ],bJ=[bl+bE*bO,bQ-bC*bd],bI=[bk+bE*bN,bP-bC*bc],bG=[bk,bP];bJ[0]=2*bL[0]-bJ[0];bJ[1]=2*bL[1]-bJ[1];if(bn){return[bJ,bI,bG][a2](by);}else{by=[bJ,bI,bG][a2](by)[aH]()[C](",");var bw=[];for(var bH=0,bx=by[n];bH<bx;bH++){bw[bH]=bH%2?bM(by[bH-1],by[bH],d).y:bM(by[bH],by[bH+1],d).x;}return bw;}},T=function(e,d,E,i,be,bd,bc,S,bf){var R=1-bf;return{x:aV(R,3)*e+aV(R,2)*3*bf*E+R*3*bf*bf*be+aV(bf,3)*bc,y:aV(R,3)*d+aV(R,2)*3*bf*i+R*3*bf*bf*bd+aV(bf,3)*S};},aL=an(function(i,d,R,E,bl,bk,bh,be){var bj=(bl-2*R+i)-(bh-2*bl+R),bg=2*(R-i)-2*(bl-R),bd=i-R,bc=(-bg+af.sqrt(bg*bg-4*bj*bd))/2/bj,S=(-bg-af.sqrt(bg*bg-4*bj*bd))/2/bj,bf=[d,be],bi=[i,bh],e;af.abs(bc)>1000000000000&&(bc=0.5);af.abs(S)>1000000000000&&(S=0.5);if(bc>0&&bc<1){e=T(i,d,R,E,bl,bk,bh,be,bc);bi[f](e.x);bf[f](e.y);}if(S>0&&S<1){e=T(i,d,R,E,bl,bk,bh,be,S);bi[f](e.x);bf[f](e.y);}bj=(bk-2*E+d)-(be-2*bk+E);bg=2*(E-d)-2*(bk-E);bd=d-E;bc=(-bg+af.sqrt(bg*bg-4*bj*bd))/2/bj;S=(-bg-af.sqrt(bg*bg-4*bj*bd))/2/bj;af.abs(bc)>1000000000000&&(bc=0.5);af.abs(S)>1000000000000&&(S=0.5);if(bc>0&&bc<1){e=T(i,d,R,E,bl,bk,bh,be,bc);bi[f](e.x);bf[f](e.y);}if(S>0&&S<1){e=T(i,d,R,E,bl,bk,bh,be,S);bi[f](e.x);bf[f](e.y);}return{min:{x:aR[a7](0,bi),y:aR[a7](0,bf)},max:{x:h[a7](0,bi),y:h[a7](0,bf)}};}),L=an(function(bl,bg){var R=t(bl),bh=bg&&t(bg),bi={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},d={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},bc=function(bm,bn){var i,bo;if(!bm){return["C",bn.x,bn.y,bn.x,bn.y,bn.x,bn.y];}!(bm[0] in {T:1,Q:1})&&(bn.qx=bn.qy=null);switch(bm[0]){case"M":bn.X=bm[1];bn.Y=bm[2];break;case"A":bm=["C"][a2](O[a7](0,[bn.x,bn.y][a2](bm.slice(1))));break;case"S":i=bn.x+(bn.x-(bn.bx||bn.x));bo=bn.y+(bn.y-(bn.by||bn.y));bm=["C",i,bo][a2](bm.slice(1));break;case"T":bn.qx=bn.x+(bn.x-(bn.qx||bn.x));bn.qy=bn.y+(bn.y-(bn.qy||bn.y));bm=["C"][a2](aT(bn.x,bn.y,bn.qx,bn.qy,bm[1],bm[2]));break;case"Q":bn.qx=bm[1];bn.qy=bm[2];bm=["C"][a2](aT(bn.x,bn.y,bm[1],bm[2],bm[3],bm[4]));break;case"L":bm=["C"][a2](a8(bn.x,bn.y,bm[1],bm[2]));break;case"H":bm=["C"][a2](a8(bn.x,bn.y,bm[1],bn.y));break;case"V":bm=["C"][a2](a8(bn.x,bn.y,bn.x,bm[1]));break;case"Z":bm=["C"][a2](a8(bn.x,bn.y,bn.X,bn.Y));break;}return bm;},e=function(bm,bn){if(bm[bn][n]>7){bm[bn].shift();var bo=bm[bn];while(bo[n]){bm.splice(bn++,0,["C"][a2](bo.splice(0,6)));}bm.splice(bn,1);bj=h(R[n],bh&&bh[n]||0);}},E=function(bq,bp,bn,bm,bo){if(bq&&bp&&bq[bo][0]=="M"&&bp[bo][0]!="M"){bp.splice(bo,0,["M",bm.x,bm.y]);bn.bx=0;bn.by=0;bn.x=bq[bo][1];bn.y=bq[bo][2];bj=h(R[n],bh&&bh[n]||0);}};for(var be=0,bj=h(R[n],bh&&bh[n]||0);be<bj;be++){R[be]=bc(R[be],bi);e(R,be);bh&&(bh[be]=bc(bh[be],d));bh&&e(bh,be);E(R,bh,bi,d,be);E(bh,R,d,bi,be);var bd=R[be],bk=bh&&bh[be],S=bd[n],bf=bh&&bk[n];bi.x=bd[S-2];bi.y=bd[S-1];bi.bx=aa(bd[S-4])||bi.x;bi.by=aa(bd[S-3])||bi.y;d.bx=bh&&(aa(bk[bf-4])||d.x);d.by=bh&&(aa(bk[bf-3])||d.y);d.x=bh&&bk[bf-2];d.y=bh&&bk[bf-1];}return bh?[R,bh]:R;},null,aD),r=an(function(bg){var bf=[];for(var bc=0,bh=bg[n];bc<bh;bc++){var e={},be=bg[bc].match(/^([^:]*):?([\d\.]*)/);e.color=au.getRGB(be[1]);if(e.color.error){return null;}e.color=e.color.hex;be[2]&&(e.offset=be[2]+"%");bf[f](e);}for(bc=1,bh=bf[n]-1;bc<bh;bc++){if(!bf[bc].offset){var E=aa(bf[bc-1].offset||0),R=0;for(var S=bc+1;S<bh;S++){if(bf[S].offset){R=bf[S].offset;break;}}if(!R){R=100;S=bh;}R=aa(R);var bd=(R-E)/(S-bc+1);for(;bc<S;bc++){E+=bd;bf[bc].offset=E+"%";}}}return bf;}),av=function(d,R,i,E){var e;if(au.is(d,"string")||au.is(d,"object")){e=au.is(d,"string")?P.getElementById(d):d;if(e.tagName){if(R==null){return{container:e,width:e.style.pixelWidth||e.offsetWidth,height:e.style.pixelHeight||e.offsetHeight};}else{return{container:e,width:R,height:i};}}}else{if(au.is(d,aq)&&E!=null){return{container:1,x:d,y:R,width:i,height:E};}}},aP=function(d,i){var e=this;for(var E in i){if(i[W](E)&&!(E in d)){switch(typeof i[E]){case"function":(function(R){d[E]=d===e?R:function(){return R[a7](e,arguments);};})(i[E]);break;case"object":d[E]=d[E]||{};aP.call(this,d[E],i[E]);break;default:d[E]=i[E];break;}}}},ap=function(d,e){d==e.top&&(e.top=d.prev);d==e.bottom&&(e.bottom=d.next);d.next&&(d.next.prev=d.prev);d.prev&&(d.prev.next=d.next);},ac=function(d,e){if(e.top===d){return;}ap(d,e);d.next=null;d.prev=e.top;e.top.next=d;e.top=d;},l=function(d,e){if(e.bottom===d){return;}ap(d,e);d.next=e.bottom;d.prev=null;e.bottom.prev=d;e.bottom=d;},D=function(e,d,i){ap(e,i);d==i.top&&(i.top=e);d.next&&(d.next.prev=e);e.next=d.next;e.prev=d;d.next=e;},ax=function(e,d,i){ap(e,i);d==i.bottom&&(i.bottom=e);d.prev&&(d.prev.next=e);e.prev=d.prev;d.prev=e;e.next=d;},u=function(d){return function(){throw new Error("Rapha\xebl: you are calling to method \u201c"+d+"\u201d of removed object");};},az=/^r(?:\(([^,]+?)\s*,\s*([^\)]+?)\))?/;if(au.svg){a4[a9].svgns="http://www.w3.org/2000/svg";a4[a9].xlink="http://www.w3.org/1999/xlink";U=function(d){return +d+(~~d===d)*0.5;};var Z=function(S){for(var e=0,E=S[n];e<E;e++){if(bb.call(S[e][0])!="a"){for(var d=1,R=S[e][n];d<R;d++){S[e][d]=U(S[e][d]);}}else{S[e][6]=U(S[e][6]);S[e][7]=U(S[e][7]);}}return S;},aS=function(i,d){if(d){for(var e in d){if(d[W](e)){i[y](e,d[e]+aA);}}}else{return P.createElementNS(a4[a9].svgns,i);}};au[aJ]=function(){return"Your browser supports SVG.\nYou are running Rapha\xebl "+this.version;};var s=function(d,E){var e=aS("path");E.canvas&&E.canvas[aU](e);var i=new aF(e,E);i.type="path";ae(i,{fill:"none",stroke:"#000",path:d});return i;};var b=function(R,bk,d){var bh="linear",be=0.5,bc=0.5,bm=R.style;bk=(bk+aA)[aZ](az,function(bo,i,bp){bh="radial";if(i&&bp){be=aa(i);bc=aa(bp);var bn=((bc>0.5)*2-1);aV(be-0.5,2)+aV(bc-0.5,2)>0.25&&(bc=af.sqrt(0.25-aV(be-0.5,2))*bn+0.5)&&bc!=0.5&&(bc=bc.toFixed(5)-0.00001*bn);}return aA;});bk=bk[C](/\s*\-\s*/);if(bh=="linear"){var bd=bk.shift();bd=-aa(bd);if(isNaN(bd)){return null;}var S=[0,0,af.cos(bd*af.PI/180),af.sin(bd*af.PI/180)],bj=1/(h(af.abs(S[2]),af.abs(S[3]))||1);S[2]*=bj;S[3]*=bj;if(S[2]<0){S[0]=-S[2];S[2]=0;}if(S[3]<0){S[1]=-S[3];S[3]=0;}}var bg=r(bk);if(!bg){return null;}var e=R.getAttribute("fill");e=e.match(/^url\(#(.*)\)$/);e&&d.defs.removeChild(P.getElementById(e[1]));var E=aS(bh+"Gradient");E.id="r"+(au._id++)[aJ](36);aS(E,bh=="radial"?{fx:be,fy:bc}:{x1:S[0],y1:S[1],x2:S[2],y2:S[3]});d.defs[aU](E);for(var bf=0,bl=bg[n];bf<bl;bf++){var bi=aS("stop");aS(bi,{offset:bg[bf].offset?bg[bf].offset:!bf?"0%":"100%","stop-color":bg[bf].color||"#fff"});E[aU](bi);}aS(R,{fill:"url(#"+E.id+")",opacity:1,"fill-opacity":1});bm.fill=aA;bm.opacity=1;bm.fillOpacity=1;return 1;};var Q=function(e){var d=e.getBBox();aS(e.pattern,{patternTransform:au.format("translate({0},{1})",d.x,d.y)});};var ae=function(bi,br){var bl={"":[0],none:[0],"-":[3,1],".":[1,1],"-.":[3,1,1,1],"-..":[3,1,1,1,1,1],". ":[1,3],"- ":[4,3],"--":[8,3],"- .":[4,3,1,3],"--.":[8,3,1,3],"--..":[8,3,1,3,1,3]},bn=bi.node,bj=bi.attrs,bf=bi.rotate(),S=function(by,bx){bx=bl[bb.call(bx)];if(bx){var bv=by.attrs["stroke-width"]||"1",bt={round:bv,square:bv,butt:0}[by.attrs["stroke-linecap"]||br["stroke-linecap"]]||0,bw=[];var bu=bx[n];while(bu--){bw[bu]=bx[bu]*bv+((bu%2)?1:-1)*bt;}aS(bn,{"stroke-dasharray":bw[aH](",")});}};br[W]("rotation")&&(bf=br.rotation);var be=(bf+aA)[C](a);if(!(be.length-1)){be=null;}else{be[1]=+be[1];be[2]=+be[2];}aa(bf)&&bi.rotate(0,true);for(var bm in br){if(br[W](bm)){if(!k[W](bm)){continue;}var bk=br[bm];bj[bm]=bk;switch(bm){case"blur":bi.blur(bk);break;case"rotation":bi.rotate(bk,true);break;case"href":case"title":case"target":var bp=bn.parentNode;if(bb.call(bp.tagName)!="a"){var E=aS("a");bp.insertBefore(E,bn);E[aU](bn);bp=E;}bp.setAttributeNS(bi.paper.xlink,bm,bk);break;case"cursor":bn.style.cursor=bk;break;case"clip-rect":var e=(bk+aA)[C](a);if(e[n]==4){bi.clip&&bi.clip.parentNode.parentNode.removeChild(bi.clip.parentNode);var i=aS("clipPath"),bo=aS("rect");i.id="r"+(au._id++)[aJ](36);aS(bo,{x:e[0],y:e[1],width:e[2],height:e[3]});i[aU](bo);bi.paper.defs[aU](i);aS(bn,{"clip-path":"url(#"+i.id+")"});bi.clip=bo;}if(!bk){var bq=P.getElementById(bn.getAttribute("clip-path")[aZ](/(^url\(#|\)$)/g,aA));bq&&bq.parentNode.removeChild(bq);aS(bn,{"clip-path":aA});delete bi.clip;}break;case"path":if(bi.type=="path"){aS(bn,{d:bk?bj.path=Z(t(bk)):"M0,0"});}break;case"width":bn[y](bm,bk);if(bj.fx){bm="x";bk=bj.x;}else{break;}case"x":if(bj.fx){bk=-bj.x-(bj.width||0);}case"rx":if(bm=="rx"&&bi.type=="rect"){break;}case"cx":be&&(bm=="x"||bm=="cx")&&(be[1]+=bk-bj[bm]);bn[y](bm,U(bk));bi.pattern&&Q(bi);break;case"height":bn[y](bm,bk);if(bj.fy){bm="y";bk=bj.y;}else{break;}case"y":if(bj.fy){bk=-bj.y-(bj.height||0);}case"ry":if(bm=="ry"&&bi.type=="rect"){break;}case"cy":be&&(bm=="y"||bm=="cy")&&(be[2]+=bk-bj[bm]);bn[y](bm,U(bk));bi.pattern&&Q(bi);break;case"r":if(bi.type=="rect"){aS(bn,{rx:bk,ry:bk});}else{bn[y](bm,bk);}break;case"src":if(bi.type=="image"){bn.setAttributeNS(bi.paper.xlink,"href",bk);}break;case"stroke-width":bn.style.strokeWidth=bk;bn[y](bm,bk);if(bj["stroke-dasharray"]){S(bi,bj["stroke-dasharray"]);}break;case"stroke-dasharray":S(bi,bk);break;case"translation":var bc=(bk+aA)[C](a);bc[0]=+bc[0]||0;bc[1]=+bc[1]||0;if(be){be[1]+=bc[0];be[2]+=bc[1];}v.call(bi,bc[0],bc[1]);break;case"scale":bc=(bk+aA)[C](a);bi.scale(+bc[0]||1,+bc[1]||+bc[0]||1,isNaN(aa(bc[2]))?null:+bc[2],isNaN(aa(bc[3]))?null:+bc[3]);break;case"fill":var R=(bk+aA).match(c);if(R){i=aS("pattern");var bh=aS("image");i.id="r"+(au._id++)[aJ](36);aS(i,{x:0,y:0,patternUnits:"userSpaceOnUse",height:1,width:1});aS(bh,{x:0,y:0});bh.setAttributeNS(bi.paper.xlink,"href",R[1]);i[aU](bh);var bs=P.createElement("img");bs.style.cssText="position:absolute;left:-9999em;top-9999em";bs.onload=function(){aS(i,{width:this.offsetWidth,height:this.offsetHeight});aS(bh,{width:this.offsetWidth,height:this.offsetHeight});P.body.removeChild(this);bi.paper.safari();};P.body[aU](bs);bs.src=R[1];bi.paper.defs[aU](i);bn.style.fill="url(#"+i.id+")";aS(bn,{fill:"url(#"+i.id+")"});bi.pattern=i;bi.pattern&&Q(bi);break;}if(!au.getRGB(bk).error){delete br.gradient;delete bj.gradient;!au.is(bj.opacity,"undefined")&&au.is(br.opacity,"undefined")&&aS(bn,{opacity:bj.opacity});!au.is(bj["fill-opacity"],"undefined")&&au.is(br["fill-opacity"],"undefined")&&aS(bn,{"fill-opacity":bj["fill-opacity"]});}else{if((({circle:1,ellipse:1})[W](bi.type)||(bk+aA).charAt()!="r")&&b(bn,bk,bi.paper)){bj.gradient=bk;bj.fill="none";break;}}case"stroke":bn[y](bm,au.getRGB(bk).hex);break;case"gradient":(({circle:1,ellipse:1})[W](bi.type)||(bk+aA).charAt()!="r")&&b(bn,bk,bi.paper);break;case"opacity":case"fill-opacity":if(bj.gradient){var d=P.getElementById(bn.getAttribute("fill")[aZ](/^url\(#|\)$/g,aA));if(d){var bd=d.getElementsByTagName("stop");bd[bd[n]-1][y]("stop-opacity",bk);}break;}default:bm=="font-size"&&(bk=K(bk,10)+"px");var bg=bm[aZ](/(\-.)/g,function(bt){return aX.call(bt.substring(1));});bn.style[bg]=bk;bn[y](bm,bk);break;}}}I(bi,br);if(be){bi.rotate(be.join(at));}else{aa(bf)&&bi.rotate(bf,true);}};var j=1.2,I=function(d,R){if(d.type!="text"||!(R[W]("text")||R[W]("font")||R[W]("font-size")||R[W]("x")||R[W]("y"))){return;}var bf=d.attrs,e=d.node,bh=e.firstChild?K(P.defaultView.getComputedStyle(e.firstChild,aA).getPropertyValue("font-size"),10):10;if(R[W]("text")){bf.text=R.text;while(e.firstChild){e.removeChild(e.firstChild);}var E=(R.text+aA)[C]("\n");for(var S=0,bg=E[n];S<bg;S++){if(E[S]){var bd=aS("tspan");S&&aS(bd,{dy:bh*j,x:bf.x});bd[aU](P.createTextNode(E[S]));e[aU](bd);}}}else{E=e.getElementsByTagName("tspan");for(S=0,bg=E[n];S<bg;S++){S&&aS(E[S],{dy:bh*j,x:bf.x});}}aS(e,{y:bf.y});var bc=d.getBBox(),be=bf.y-(bc.y+bc.height/2);be&&isFinite(be)&&aS(e,{y:bf.y+be});},aF=function(e,d){var E=0,i=0;this[0]=e;this.id=au._oid++;this.node=e;e.raphael=this;this.paper=d;this.attrs=this.attrs||{};this.transformations=[];this._={tx:0,ty:0,rt:{deg:0,cx:0,cy:0},sx:1,sy:1};!d.bottom&&(d.bottom=this);this.prev=d.top;d.top&&(d.top.next=this);d.top=this;this.next=null;};aF[a9].rotate=function(e,d,E){if(this.removed){return this;}if(e==null){if(this._.rt.cx){return[this._.rt.deg,this._.rt.cx,this._.rt.cy][aH](at);}return this._.rt.deg;}var i=this.getBBox();e=(e+aA)[C](a);if(e[n]-1){d=aa(e[1]);E=aa(e[2]);}e=aa(e[0]);if(d!=null){this._.rt.deg=e;}else{this._.rt.deg+=e;}(E==null)&&(d=null);this._.rt.cx=d;this._.rt.cy=E;d=d==null?i.x+i.width/2:d;E=E==null?i.y+i.height/2:E;if(this._.rt.deg){this.transformations[0]=au.format("rotate({0} {1} {2})",this._.rt.deg,d,E);this.clip&&aS(this.clip,{transform:au.format("rotate({0} {1} {2})",-this._.rt.deg,d,E)});}else{this.transformations[0]=aA;this.clip&&aS(this.clip,{transform:aA});}aS(this.node,{transform:this.transformations[aH](at)});return this;};aF[a9].hide=function(){!this.removed&&(this.node.style.display="none");return this;};aF[a9].show=function(){!this.removed&&(this.node.style.display="");return this;};aF[a9].remove=function(){if(this.removed){return;}ap(this,this.paper);this.node.parentNode.removeChild(this.node);for(var d in this){delete this[d];}this.removed=true;};aF[a9].getBBox=function(){if(this.removed){return this;}if(this.type=="path"){return Y(this.attrs.path);}if(this.node.style.display=="none"){this.show();var E=true;}var bd={};try{bd=this.node.getBBox();}catch(S){}finally{bd=bd||{};}if(this.type=="text"){bd={x:bd.x,y:Infinity,width:0,height:0};for(var d=0,R=this.node.getNumberOfChars();d<R;d++){var bc=this.node.getExtentOfChar(d);(bc.y<bd.y)&&(bd.y=bc.y);(bc.y+bc.height-bd.y>bd.height)&&(bd.height=bc.y+bc.height-bd.y);(bc.x+bc.width-bd.x>bd.width)&&(bd.width=bc.x+bc.width-bd.x);}}E&&this.hide();return bd;};aF[a9].attr=function(E,bd){if(this.removed){return this;}if(E==null){var S={};for(var R in this.attrs){if(this.attrs[W](R)){S[R]=this.attrs[R];}}this._.rt.deg&&(S.rotation=this.rotate());(this._.sx!=1||this._.sy!=1)&&(S.scale=this.scale());S.gradient&&S.fill=="none"&&(S.fill=S.gradient)&&delete S.gradient;return S;}if(bd==null&&au.is(E,"string")){if(E=="translation"){return v.call(this);}if(E=="rotation"){return this.rotate();}if(E=="scale"){return this.scale();}if(E=="fill"&&this.attrs.fill=="none"&&this.attrs.gradient){return this.attrs.gradient;}return this.attrs[E];}if(bd==null&&au.is(E,"array")){var d={};for(var e=0,bc=E.length;e<bc;e++){d[E[e]]=this.attr(E[e]);}return d;}if(bd!=null){var be={};be[E]=bd;ae(this,be);}else{if(E!=null&&au.is(E,"object")){ae(this,E);}}return this;};aF[a9].toFront=function(){if(this.removed){return this;}this.node.parentNode[aU](this.node);var d=this.paper;d.top!=this&&ac(this,d);return this;};aF[a9].toBack=function(){if(this.removed){return this;}if(this.node.parentNode.firstChild!=this.node){this.node.parentNode.insertBefore(this.node,this.node.parentNode.firstChild);l(this,this.paper);var d=this.paper;}return this;};aF[a9].insertAfter=function(d){if(this.removed){return this;}var e=d.node;if(e.nextSibling){e.parentNode.insertBefore(this.node,e.nextSibling);}else{e.parentNode[aU](this.node);}D(this,d,this.paper);return this;};aF[a9].insertBefore=function(d){if(this.removed){return this;}var e=d.node;e.parentNode.insertBefore(this.node,e);ax(this,d,this.paper);return this;};aF[a9].blur=function(e){var d=this;if(+e!==0){var i=aS("filter"),E=aS("feGaussianBlur");d.attrs.blur=e;i.id="r"+(au._id++)[aJ](36);aS(E,{stdDeviation:+e||1.5});i.appendChild(E);d.paper.defs.appendChild(i);d._blur=i;aS(d.node,{filter:"url(#"+i.id+")"});}else{if(d._blur){d._blur.parentNode.removeChild(d._blur);delete d._blur;delete d.attrs.blur;}d.node.removeAttribute("filter");}};var V=function(e,d,S,R){d=U(d);S=U(S);var E=aS("circle");e.canvas&&e.canvas[aU](E);var i=new aF(E,e);i.attrs={cx:d,cy:S,r:R,fill:"none",stroke:"#000"};i.type="circle";aS(E,i.attrs);return i;};var aO=function(i,d,bd,e,S,bc){d=U(d);bd=U(bd);var R=aS("rect");i.canvas&&i.canvas[aU](R);var E=new aF(R,i);E.attrs={x:d,y:bd,width:e,height:S,r:bc||0,rx:bc||0,ry:bc||0,fill:"none",stroke:"#000"};E.type="rect";aS(R,E.attrs);return E;};var am=function(e,d,bc,S,R){d=U(d);bc=U(bc);var E=aS("ellipse");e.canvas&&e.canvas[aU](E);var i=new aF(E,e);i.attrs={cx:d,cy:bc,rx:S,ry:R,fill:"none",stroke:"#000"};i.type="ellipse";aS(E,i.attrs);return i;};var q=function(i,bc,d,bd,e,S){var R=aS("image");aS(R,{x:d,y:bd,width:e,height:S,preserveAspectRatio:"none"});R.setAttributeNS(i.xlink,"href",bc);i.canvas&&i.canvas[aU](R);var E=new aF(R,i);E.attrs={x:d,y:bd,width:e,height:S,src:bc};E.type="image";return E;};var ab=function(e,d,S,R){var E=aS("text");aS(E,{x:d,y:S,"text-anchor":"middle"});e.canvas&&e.canvas[aU](E);var i=new aF(E,e);i.attrs={x:d,y:S,"text-anchor":"middle",text:R,font:k.font,stroke:"none",fill:"#000"};i.type="text";ae(i,i.attrs);return i;};var a6=function(e,d){this.width=e||this.width;this.height=d||this.height;this.canvas[y]("width",this.width);this.canvas[y]("height",this.height);return this;};var z=function(){var E=av[a7](0,arguments),i=E&&E.container,e=E.x,bc=E.y,R=E.width,d=E.height;if(!i){throw new Error("SVG container not found.");}var S=aS("svg");R=R||512;d=d||342;aS(S,{xmlns:"http://www.w3.org/2000/svg",version:1.1,width:R,height:d});if(i==1){S.style.cssText="position:absolute;left:"+e+"px;top:"+bc+"px";P.body[aU](S);}else{if(i.firstChild){i.insertBefore(S,i.firstChild);}else{i[aU](S);}}i=new a4;i.width=R;i.height=d;i.canvas=S;aP.call(i,i,au.fn);i.clear();return i;};a4[a9].clear=function(){var d=this.canvas;while(d.firstChild){d.removeChild(d.firstChild);}this.bottom=this.top=null;(this.desc=aS("desc"))[aU](P.createTextNode("Created with Rapha\xebl"));d[aU](this.desc);d[aU](this.defs=aS("defs"));};a4[a9].remove=function(){this.canvas.parentNode&&this.canvas.parentNode.removeChild(this.canvas);for(var d in this){this[d]=u(d);}};}if(au.vml){var H={M:"m",L:"l",C:"c",Z:"x",m:"t",l:"r",c:"v",z:"x"},ay=/([clmz]),?([^clmz]*)/gi,ba=/-?[^,\s-]+/g,aI=1000+at+1000,p=10,aQ=function(bh){var be=/[ahqstv]/ig,E=t;(bh+aA).match(be)&&(E=L);be=/[clmz]/g;if(E==t&&!(bh+aA).match(be)){var bd=(bh+aA)[aZ](ay,function(bk,bm,bi){var bl=[],i=bb.call(bm)=="m",bj=H[bm];bi[aZ](ba,function(bn){if(i&&bl[n]==2){bj+=bl+H[bm=="m"?"l":"L"];bl=[];}bl[f](U(bn*p));});return bj+bl;});return bd;}var bf=E(bh),e,d;bd=[];for(var S=0,bg=bf[n];S<bg;S++){e=bf[S];d=bb.call(bf[S][0]);d=="z"&&(d="x");for(var R=1,bc=e[n];R<bc;R++){d+=U(e[R]*p)+(R!=bc-1?",":aA);}bd[f](d);}return bd[aH](at);};au[aJ]=function(){return"Your browser doesn\u2019t support SVG. Falling down to VML.\nYou are running Rapha\xebl "+this.version;};s=function(i,e){var S=al("group");S.style.cssText="position:absolute;left:0;top:0;width:"+e.width+"px;height:"+e.height+"px";S.coordsize=e.coordsize;S.coordorigin=e.coordorigin;var R=al("shape"),E=R.style;E.width=e.width+"px";E.height=e.height+"px";R.coordsize=aI;R.coordorigin=e.coordorigin;S[aU](R);var bc=new aF(R,S,e),d={fill:"none",stroke:"#000"};i&&(d.path=i);bc.isAbsolute=true;bc.type="path";bc.path=[];bc.Path=aA;ae(bc,d);e.canvas[aU](S);return bc;};ae=function(bf,bk){bf.attrs=bf.attrs||{};var bi=bf.node,bl=bf.attrs,bc=bi.style,E,bp=bf;for(var bd in bk){if(bk[W](bd)){bl[bd]=bk[bd];}}bk.href&&(bi.href=bk.href);bk.title&&(bi.title=bk.title);bk.target&&(bi.target=bk.target);bk.cursor&&(bc.cursor=bk.cursor);"blur" in bk&&bf.blur(bk.blur);if(bk.path&&bf.type=="path"){bl.path=bk.path;bi.path=aQ(bl.path);}if(bk.rotation!=null){bf.rotate(bk.rotation,true);}if(bk.translation){E=(bk.translation+aA)[C](a);v.call(bf,E[0],E[1]);if(bf._.rt.cx!=null){bf._.rt.cx+=+E[0];bf._.rt.cy+=+E[1];bf.setBox(bf.attrs,E[0],E[1]);}}if(bk.scale){E=(bk.scale+aA)[C](a);bf.scale(+E[0]||1,+E[1]||+E[0]||1,+E[2]||null,+E[3]||null);}if("clip-rect" in bk){var d=(bk["clip-rect"]+aA)[C](a);if(d[n]==4){d[2]=+d[2]+(+d[0]);d[3]=+d[3]+(+d[1]);var be=bi.clipRect||P.createElement("div"),bo=be.style,S=bi.parentNode;bo.clip=au.format("rect({1}px {2}px {3}px {0}px)",d);if(!bi.clipRect){bo.position="absolute";bo.top=0;bo.left=0;bo.width=bf.paper.width+"px";bo.height=bf.paper.height+"px";S.parentNode.insertBefore(be,S);be[aU](S);bi.clipRect=be;}}if(!bk["clip-rect"]){bi.clipRect&&(bi.clipRect.style.clip=aA);}}if(bf.type=="image"&&bk.src){bi.src=bk.src;}if(bf.type=="image"&&bk.opacity){bi.filterOpacity=" progid:DXImageTransform.Microsoft.Alpha(opacity="+(bk.opacity*100)+")";bc.filter=(bi.filterMatrix||aA)+(bi.filterOpacity||aA);}bk.font&&(bc.font=bk.font);bk["font-family"]&&(bc.fontFamily='"'+bk["font-family"][C](",")[0][aZ](/^['"]+|['"]+$/g,aA)+'"');bk["font-size"]&&(bc.fontSize=bk["font-size"]);bk["font-weight"]&&(bc.fontWeight=bk["font-weight"]);bk["font-style"]&&(bc.fontStyle=bk["font-style"]);if(bk.opacity!=null||bk["stroke-width"]!=null||bk.fill!=null||bk.stroke!=null||bk["stroke-width"]!=null||bk["stroke-opacity"]!=null||bk["fill-opacity"]!=null||bk["stroke-dasharray"]!=null||bk["stroke-miterlimit"]!=null||bk["stroke-linejoin"]!=null||bk["stroke-linecap"]!=null){bi=bf.shape||bi;var bj=(bi.getElementsByTagName("fill")&&bi.getElementsByTagName("fill")[0]),bm=false;!bj&&(bm=bj=al("fill"));if("fill-opacity" in bk||"opacity" in bk){var e=((+bl["fill-opacity"]+1||2)-1)*((+bl.opacity+1||2)-1);e<0&&(e=0);e>1&&(e=1);bj.opacity=e;}bk.fill&&(bj.on=true);if(bj.on==null||bk.fill=="none"){bj.on=false;}if(bj.on&&bk.fill){var i=bk.fill.match(c);if(i){bj.src=i[1];bj.type="tile";}else{bj.color=au.getRGB(bk.fill).hex;bj.src=aA;bj.type="solid";if(au.getRGB(bk.fill).error&&(bp.type in {circle:1,ellipse:1}||(bk.fill+aA).charAt()!="r")&&b(bp,bk.fill)){bl.fill="none";bl.gradient=bk.fill;}}}bm&&bi[aU](bj);var R=(bi.getElementsByTagName("stroke")&&bi.getElementsByTagName("stroke")[0]),bn=false;!R&&(bn=R=al("stroke"));if((bk.stroke&&bk.stroke!="none")||bk["stroke-width"]||bk["stroke-opacity"]!=null||bk["stroke-dasharray"]||bk["stroke-miterlimit"]||bk["stroke-linejoin"]||bk["stroke-linecap"]){R.on=true;}(bk.stroke=="none"||R.on==null||bk.stroke==0||bk["stroke-width"]==0)&&(R.on=false);R.on&&bk.stroke&&(R.color=au.getRGB(bk.stroke).hex);e=((+bl["stroke-opacity"]+1||2)-1)*((+bl.opacity+1||2)-1);var bg=(aa(bk["stroke-width"])||1)*0.75;e<0&&(e=0);e>1&&(e=1);bk["stroke-width"]==null&&(bg=bl["stroke-width"]);bk["stroke-width"]&&(R.weight=bg);bg&&bg<1&&(e*=bg)&&(R.weight=1);R.opacity=e;bk["stroke-linejoin"]&&(R.joinstyle=bk["stroke-linejoin"]||"miter");R.miterlimit=bk["stroke-miterlimit"]||8;bk["stroke-linecap"]&&(R.endcap=bk["stroke-linecap"]=="butt"?"flat":bk["stroke-linecap"]=="square"?"square":"round");if(bk["stroke-dasharray"]){var bh={"-":"shortdash",".":"shortdot","-.":"shortdashdot","-..":"shortdashdotdot",". ":"dot","- ":"dash","--":"longdash","- .":"dashdot","--.":"longdashdot","--..":"longdashdotdot"};R.dashstyle=bh[W](bk["stroke-dasharray"])?bh[bk["stroke-dasharray"]]:aA;}bn&&bi[aU](R);}if(bp.type=="text"){bc=bp.paper.span.style;bl.font&&(bc.font=bl.font);bl["font-family"]&&(bc.fontFamily=bl["font-family"]);bl["font-size"]&&(bc.fontSize=bl["font-size"]);bl["font-weight"]&&(bc.fontWeight=bl["font-weight"]);bl["font-style"]&&(bc.fontStyle=bl["font-style"]);bp.node.string&&(bp.paper.span.innerHTML=(bp.node.string+aA)[aZ](/</g,"&#60;")[aZ](/&/g,"&#38;")[aZ](/\n/g,"<br>"));bp.W=bl.w=bp.paper.span.offsetWidth;bp.H=bl.h=bp.paper.span.offsetHeight;bp.X=bl.x;bp.Y=bl.y+U(bp.H/2);switch(bl["text-anchor"]){case"start":bp.node.style["v-text-align"]="left";bp.bbx=U(bp.W/2);break;case"end":bp.node.style["v-text-align"]="right";bp.bbx=-U(bp.W/2);break;default:bp.node.style["v-text-align"]="center";break;}}};b=function(d,bd){d.attrs=d.attrs||{};var be=d.attrs,bg=d.node.getElementsByTagName("fill"),S="linear",bc=".5 .5";d.attrs.gradient=bd;bd=(bd+aA)[aZ](az,function(bi,bj,i){S="radial";if(bj&&i){bj=aa(bj);i=aa(i);aV(bj-0.5,2)+aV(i-0.5,2)>0.25&&(i=af.sqrt(0.25-aV(bj-0.5,2))*((i>0.5)*2-1)+0.5);bc=bj+at+i;}return aA;});bd=bd[C](/\s*\-\s*/);if(S=="linear"){var e=bd.shift();e=-aa(e);if(isNaN(e)){return null;}}var R=r(bd);if(!R){return null;}d=d.shape||d.node;bg=bg[0]||al("fill");if(R[n]){bg.on=true;bg.method="none";bg.type=(S=="radial")?"gradientradial":"gradient";bg.color=R[0].color;bg.color2=R[R[n]-1].color;var bh=[];for(var E=0,bf=R[n];E<bf;E++){R[E].offset&&bh[f](R[E].offset+at+R[E].color);}bg.colors&&(bg.colors.value=bh[n]?bh[aH](","):"0% "+bg.color);if(S=="radial"){bg.focus="100%";bg.focussize=bc;bg.focusposition=bc;}else{bg.angle=(270-e)%360;}}return 1;};aF=function(R,bc,d){var S=0,i=0,e=0,E=1;this[0]=R;this.id=au._oid++;this.node=R;R.raphael=this;this.X=0;this.Y=0;this.attrs={};this.Group=bc;this.paper=d;this._={tx:0,ty:0,rt:{deg:0},sx:1,sy:1};!d.bottom&&(d.bottom=this);this.prev=d.top;d.top&&(d.top.next=this);d.top=this;this.next=null;};aF[a9].rotate=function(e,d,i){if(this.removed){return this;}if(e==null){if(this._.rt.cx){return[this._.rt.deg,this._.rt.cx,this._.rt.cy][aH](at);}return this._.rt.deg;}e=(e+aA)[C](a);if(e[n]-1){d=aa(e[1]);i=aa(e[2]);}e=aa(e[0]);if(d!=null){this._.rt.deg=e;}else{this._.rt.deg+=e;}i==null&&(d=null);this._.rt.cx=d;this._.rt.cy=i;this.setBox(this.attrs,d,i);this.Group.style.rotation=this._.rt.deg;return this;};aF[a9].setBox=function(bo,e,d){if(this.removed){return this;}var bi=this.Group.style,R=(this.shape&&this.shape.style)||this.node.style;bo=bo||{};for(var bm in bo){if(bo[W](bm)){this.attrs[bm]=bo[bm];}}e=e||this._.rt.cx;d=d||this._.rt.cy;var bk=this.attrs,bd,bc,be,bn;switch(this.type){case"circle":bd=bk.cx-bk.r;bc=bk.cy-bk.r;be=bn=bk.r*2;break;case"ellipse":bd=bk.cx-bk.rx;bc=bk.cy-bk.ry;be=bk.rx*2;bn=bk.ry*2;break;case"rect":case"image":bd=+bk.x;bc=+bk.y;be=bk.width||0;bn=bk.height||0;break;case"text":this.textpath.v=["m",U(bk.x),", ",U(bk.y-2),"l",U(bk.x)+1,", ",U(bk.y-2)][aH](aA);bd=bk.x-U(this.W/2);bc=bk.y-this.H/2;be=this.W;bn=this.H;break;case"path":if(!this.attrs.path){bd=0;bc=0;be=this.paper.width;bn=this.paper.height;}else{var bl=Y(this.attrs.path);bd=bl.x;bc=bl.y;be=bl.width;bn=bl.height;}break;default:bd=0;bc=0;be=this.paper.width;bn=this.paper.height;break;}e=(e==null)?bd+be/2:e;d=(d==null)?bc+bn/2:d;var E=e-this.paper.width/2,bh=d-this.paper.height/2,bg;bi.left!=(bg=E+"px")&&(bi.left=bg);bi.top!=(bg=bh+"px")&&(bi.top=bg);this.X=this.type=="path"?-E:bd;this.Y=this.type=="path"?-bh:bc;this.W=be;this.H=bn;if(this.type=="path"){R.left!=(bg=-E*p+"px")&&(R.left=bg);R.top!=(bg=-bh*p+"px")&&(R.top=bg);}else{if(this.type=="text"){R.left!=(bg=-E+"px")&&(R.left=bg);R.top!=(bg=-bh+"px")&&(R.top=bg);}else{bi.width!=(bg=this.paper.width+"px")&&(bi.width=bg);bi.height!=(bg=this.paper.height+"px")&&(bi.height=bg);R.left!=(bg=bd-E+"px")&&(R.left=bg);R.top!=(bg=bc-bh+"px")&&(R.top=bg);R.width!=(bg=be+"px")&&(R.width=bg);R.height!=(bg=bn+"px")&&(R.height=bg);var S=(+bo.r||0)/aR(be,bn);if(this.type=="rect"&&this.arcsize.toFixed(4)!=S.toFixed(4)&&(S||this.arcsize)){var bj=al("roundrect"),bp={},bf=this.events&&this.events[n];bm=0;bj.arcsize=S;bj.raphael=this;this.Group[aU](bj);this.Group.removeChild(this.node);this[0]=this.node=bj;this.arcsize=S;for(bm in bk){bp[bm]=bk[bm];}delete bp.scale;this.attr(bp);if(this.events){for(;bm<bf;bm++){this.events[bm].unbind=ai(this.node,this.events[bm].name,this.events[bm].f,this);}}}}}};aF[a9].hide=function(){!this.removed&&(this.Group.style.display="none");return this;};aF[a9].show=function(){!this.removed&&(this.Group.style.display="block");return this;};aF[a9].getBBox=function(){if(this.removed){return this;}if(this.type=="path"){return Y(this.attrs.path);}return{x:this.X+(this.bbx||0),y:this.Y,width:this.W,height:this.H};};aF[a9].remove=function(){if(this.removed){return;}ap(this,this.paper);this.node.parentNode.removeChild(this.node);this.Group.parentNode.removeChild(this.Group);this.shape&&this.shape.parentNode.removeChild(this.shape);for(var d in this){delete this[d];}this.removed=true;};aF[a9].attr=function(e,bc){if(this.removed){return this;}if(e==null){var R={};for(var E in this.attrs){if(this.attrs[W](E)){R[E]=this.attrs[E];}}this._.rt.deg&&(R.rotation=this.rotate());(this._.sx!=1||this._.sy!=1)&&(R.scale=this.scale());R.gradient&&R.fill=="none"&&(R.fill=R.gradient)&&delete R.gradient;return R;}if(bc==null&&au.is(e,"string")){if(e=="translation"){return v.call(this);}if(e=="rotation"){return this.rotate();}if(e=="scale"){return this.scale();}if(e=="fill"&&this.attrs.fill=="none"&&this.attrs.gradient){return this.attrs.gradient;}return this.attrs[e];}if(this.attrs&&bc==null&&au.is(e,"array")){var S,d={};for(E=0,S=e[n];E<S;E++){d[e[E]]=this.attr(e[E]);}return d;}var bd;if(bc!=null){bd={};bd[e]=bc;}bc==null&&au.is(e,"object")&&(bd=e);if(bd){if(bd.text&&this.type=="text"){this.node.string=bd.text;}ae(this,bd);if(bd.gradient&&(({circle:1,ellipse:1})[W](this.type)||(bd.gradient+aA).charAt()!="r")){b(this,bd.gradient);}(this.type!="path"||this._.rt.deg)&&this.setBox(this.attrs);}return this;};aF[a9].toFront=function(){!this.removed&&this.Group.parentNode[aU](this.Group);this.paper.top!=this&&ac(this,this.paper);return this;};aF[a9].toBack=function(){if(this.removed){return this;}if(this.Group.parentNode.firstChild!=this.Group){this.Group.parentNode.insertBefore(this.Group,this.Group.parentNode.firstChild);l(this,this.paper);}return this;};aF[a9].insertAfter=function(d){if(this.removed){return this;}if(d.Group.nextSibling){d.Group.parentNode.insertBefore(this.Group,d.Group.nextSibling);}else{d.Group.parentNode[aU](this.Group);}D(this,d,this.paper);return this;};aF[a9].insertBefore=function(d){if(this.removed){return this;}d.Group.parentNode.insertBefore(this.Group,d.Group);ax(this,d,this.paper);return this;};var a3=/ progid:\S+Blur\([^\)]+\)/g;aF[a9].blur=function(d){var e=this.node.style,i=e.filter;i=i.replace(a3,"");if(+d!==0){this.attrs.blur=d;e.filter=i+" progid:DXImageTransform.Microsoft.Blur(pixelradius="+(+d||1.5)+")";e.margin=Raphael.format("-{0}px 0 0 -{0}px",Math.round(+d||1.5));}else{e.filter=i;e.margin=0;delete this.attrs.blur;}};V=function(e,d,bd,S){var R=al("group"),bc=al("oval"),i=bc.style;R.style.cssText="position:absolute;left:0;top:0;width:"+e.width+"px;height:"+e.height+"px";R.coordsize=aI;R.coordorigin=e.coordorigin;R[aU](bc);var E=new aF(bc,R,e);E.type="circle";ae(E,{stroke:"#000",fill:"none"});E.attrs.cx=d;E.attrs.cy=bd;E.attrs.r=S;E.setBox({x:d-S,y:bd-S,width:S*2,height:S*2});e.canvas[aU](R);return E;};aO=function(e,bd,bc,be,E,d){var R=al("group"),i=al("roundrect"),bf=(+d||0)/(aR(be,E));R.style.cssText="position:absolute;left:0;top:0;width:"+e.width+"px;height:"+e.height+"px";R.coordsize=aI;R.coordorigin=e.coordorigin;R[aU](i);i.arcsize=bf;var S=new aF(i,R,e);S.type="rect";ae(S,{stroke:"#000"});S.arcsize=bf;S.setBox({x:bd,y:bc,width:be,height:E,r:d});e.canvas[aU](R);return S;};am=function(d,be,bd,i,e){var R=al("group"),E=al("oval"),bc=E.style;R.style.cssText="position:absolute;left:0;top:0;width:"+d.width+"px;height:"+d.height+"px";R.coordsize=aI;R.coordorigin=d.coordorigin;R[aU](E);var S=new aF(E,R,d);S.type="ellipse";ae(S,{stroke:"#000"});S.attrs.cx=be;S.attrs.cy=bd;S.attrs.rx=i;S.attrs.ry=e;S.setBox({x:be-i,y:bd-e,width:i*2,height:e*2});d.canvas[aU](R);return S;};q=function(e,d,be,bd,bf,E){var R=al("group"),i=al("image"),bc=i.style;R.style.cssText="position:absolute;left:0;top:0;width:"+e.width+"px;height:"+e.height+"px";R.coordsize=aI;R.coordorigin=e.coordorigin;i.src=d;R[aU](i);var S=new aF(i,R,e);S.type="image";S.attrs.src=d;S.attrs.x=be;S.attrs.y=bd;S.attrs.w=bf;S.attrs.h=E;S.setBox({x:be,y:bd,width:bf,height:E});e.canvas[aU](R);return S;};ab=function(e,be,bd,bf){var R=al("group"),E=al("shape"),bc=E.style,bg=al("path"),d=bg.style,i=al("textpath");R.style.cssText="position:absolute;left:0;top:0;width:"+e.width+"px;height:"+e.height+"px";R.coordsize=aI;R.coordorigin=e.coordorigin;bg.v=au.format("m{0},{1}l{2},{1}",U(be*10),U(bd*10),U(be*10)+1);bg.textpathok=true;bc.width=e.width;bc.height=e.height;i.string=bf+aA;i.on=true;E[aU](i);E[aU](bg);R[aU](E);var S=new aF(i,R,e);S.shape=E;S.textpath=bg;S.type="text";S.attrs.text=bf;S.attrs.x=be;S.attrs.y=bd;S.attrs.w=1;S.attrs.h=1;ae(S,{font:k.font,stroke:"none",fill:"#000"});S.setBox();e.canvas[aU](R);return S;};a6=function(i,d){var e=this.canvas.style;i==+i&&(i+="px");d==+d&&(d+="px");e.width=i;e.height=d;e.clip="rect(0 "+i+" "+d+" 0)";return this;};var al;P.createStyleSheet().addRule(".rvml","behavior:url(#default#VML)");try{!P.namespaces.rvml&&P.namespaces.add("rvml","urn:schemas-microsoft-com:vml");al=function(d){return P.createElement("<rvml:"+d+' class="rvml">');};}catch(aj){al=function(d){return P.createElement("<"+d+' xmlns="urn:schemas-microsoft.com:vml" class="rvml">');};}z=function(){var i=av[a7](0,arguments),d=i.container,be=i.height,bf,e=i.width,bd=i.x,bc=i.y;if(!d){throw new Error("VML container not found.");}var R=new a4,S=R.canvas=P.createElement("div"),E=S.style;e=e||512;be=be||342;e==+e&&(e+="px");be==+be&&(be+="px");R.width=1000;R.height=1000;R.coordsize=p*1000+at+p*1000;R.coordorigin="0 0";R.span=P.createElement("span");R.span.style.cssText="position:absolute;left:-9999em;top:-9999em;padding:0;margin:0;line-height:1;display:inline;";S[aU](R.span);E.cssText=au.format("width:{0};height:{1};position:absolute;clip:rect(0 {0} {1} 0);overflow:hidden",e,be);if(d==1){P.body[aU](S);E.left=bd+"px";E.top=bc+"px";}else{d.style.width=e;d.style.height=be;if(d.firstChild){d.insertBefore(S,d.firstChild);}else{d[aU](S);}}aP.call(R,R,au.fn);return R;};a4[a9].clear=function(){this.canvas.innerHTML=aA;this.span=P.createElement("span");this.span.style.cssText="position:absolute;left:-9999em;top:-9999em;padding:0;margin:0;line-height:1;display:inline;";this.canvas[aU](this.span);this.bottom=this.top=null;};a4[a9].remove=function(){this.canvas.parentNode.removeChild(this.canvas);for(var d in this){this[d]=u(d);}return true;};}if((/^Apple|^Google/).test(aB.navigator.vendor)&&!(aB.navigator.userAgent.indexOf("Version/4.0")+1)){a4[a9].safari=function(){var d=this.rect(-99,-99,this.width+99,this.height+99);aB.setTimeout(function(){d.remove();});};}else{a4[a9].safari=function(){};}var ai=(function(){if(P.addEventListener){return function(R,i,e,d){var E=function(S){return e.call(d,S);};R.addEventListener(i,E,false);return function(){R.removeEventListener(i,E,false);return true;};};}else{if(P.attachEvent){return function(S,E,i,e){var R=function(bc){return i.call(e,bc||aB.event);};S.attachEvent("on"+E,R);var d=function(){S.detachEvent("on"+E,R);return true;};return d;};}}})();for(var ag=J[n];ag--;){(function(d){aF[a9][d]=function(e){if(au.is(e,"function")){this.events=this.events||[];this.events.push({name:d,f:e,unbind:ai(this.shape||this.node,d,e,this)});}return this;};aF[a9]["un"+d]=function(E){var i=this.events,e=i[n];while(e--){if(i[e].name==d&&i[e].f==E){i[e].unbind();i.splice(e,1);!i.length&&delete this.events;return this;}}return this;};})(J[ag]);}aF[a9].hover=function(e,d){return this.mouseover(e).mouseout(d);};aF[a9].unhover=function(e,d){return this.unmouseover(e).unmouseout(d);};a4[a9].circle=function(d,i,e){return V(this,d||0,i||0,e||0);};a4[a9].rect=function(d,R,e,i,E){return aO(this,d||0,R||0,e||0,i||0,E||0);};a4[a9].ellipse=function(d,E,i,e){return am(this,d||0,E||0,i||0,e||0);};a4[a9].path=function(d){d&&!au.is(d,"string")&&!au.is(d[0],"array")&&(d+=aA);return s(au.format[a7](au,arguments),this);};a4[a9].image=function(E,d,R,e,i){return q(this,E||"about:blank",d||0,R||0,e||0,i||0);};a4[a9].text=function(d,i,e){return ab(this,d||0,i||0,e||aA);};a4[a9].set=function(d){arguments[n]>1&&(d=Array[a9].splice.call(arguments,0,arguments[n]));return new X(d);};a4[a9].setSize=a6;a4[a9].top=a4[a9].bottom=null;a4[a9].raphael=au;function x(){return this.x+at+this.y;}aF[a9].scale=function(bi,bh,E,e){if(bi==null&&bh==null){return{x:this._.sx,y:this._.sy,toString:x};}bh=bh||bi;!+bh&&(bh=bi);var bm,bk,bl,bj,by=this.attrs;if(bi!=0){var bg=this.getBBox(),bd=bg.x+bg.width/2,R=bg.y+bg.height/2,bx=bi/this._.sx,bw=bh/this._.sy;E=(+E||E==0)?E:bd;e=(+e||e==0)?e:R;var bf=~~(bi/af.abs(bi)),bc=~~(bh/af.abs(bh)),bp=this.node.style,bA=E+(bd-E)*bx,bz=e+(R-e)*bw;switch(this.type){case"rect":case"image":var be=by.width*bf*bx,bo=by.height*bc*bw;this.attr({height:bo,r:by.r*aR(bf*bx,bc*bw),width:be,x:bA-be/2,y:bz-bo/2});break;case"circle":case"ellipse":this.attr({rx:by.rx*bf*bx,ry:by.ry*bc*bw,r:by.r*aR(bf*bx,bc*bw),cx:bA,cy:bz});break;case"path":var br=ah(by.path),bs=true;for(var bu=0,bn=br[n];bu<bn;bu++){var bq=br[bu],S=aX.call(bq[0]);if(S=="M"&&bs){continue;}else{bs=false;}if(S=="A"){bq[br[bu][n]-2]*=bx;bq[br[bu][n]-1]*=bw;bq[1]*=bf*bx;bq[2]*=bc*bw;bq[5]=+!(bf+bc?!+bq[5]:+bq[5]);}else{if(S=="H"){for(var bt=1,bv=bq[n];bt<bv;bt++){bq[bt]*=bx;}}else{if(S=="V"){for(bt=1,bv=bq[n];bt<bv;bt++){bq[bt]*=bw;}}else{for(bt=1,bv=bq[n];bt<bv;bt++){bq[bt]*=(bt%2)?bx:bw;}}}}}var d=Y(br);bm=bA-d.x-d.width/2;bk=bz-d.y-d.height/2;br[0][1]+=bm;br[0][2]+=bk;this.attr({path:br});break;}if(this.type in {text:1,image:1}&&(bf!=1||bc!=1)){if(this.transformations){this.transformations[2]="scale("[a2](bf,",",bc,")");this.node[y]("transform",this.transformations[aH](at));bm=(bf==-1)?-by.x-(be||0):by.x;bk=(bc==-1)?-by.y-(bo||0):by.y;this.attr({x:bm,y:bk});by.fx=bf-1;by.fy=bc-1;}else{this.node.filterMatrix=" progid:DXImageTransform.Microsoft.Matrix(M11="[a2](bf,", M12=0, M21=0, M22=",bc,", Dx=0, Dy=0, sizingmethod='auto expand', filtertype='bilinear')");bp.filter=(this.node.filterMatrix||aA)+(this.node.filterOpacity||aA);}}else{if(this.transformations){this.transformations[2]=aA;this.node[y]("transform",this.transformations[aH](at));by.fx=0;by.fy=0;}else{this.node.filterMatrix=aA;bp.filter=(this.node.filterMatrix||aA)+(this.node.filterOpacity||aA);}}by.scale=[bi,bh,E,e][aH](at);this._.sx=bi;this._.sy=bh;}return this;};aF[a9].clone=function(){var d=this.attr();delete d.scale;delete d.translation;return this.paper[this.type]().attr(d);};var g=an(function(E,d,bd,bc,bj,bi,bh,bg,R){var bf=0,S;for(var be=0;be<1.001;be+=0.001){var e=au.findDotsAtSegment(E,d,bd,bc,bj,bi,bh,bg,be);be&&(bf+=aV(aV(S.x-e.x,2)+aV(S.y-e.y,2),0.5));if(bf>=R){return e;}S=e;}}),aK=function(d,e){return function(bl,S,bc){bl=L(bl);var bh,bg,E,bd,R="",bk={},bi,bf=0;for(var be=0,bj=bl.length;be<bj;be++){E=bl[be];if(E[0]=="M"){bh=+E[1];bg=+E[2];}else{bd=o(bh,bg,E[1],E[2],E[3],E[4],E[5],E[6]);if(bf+bd>S){if(e&&!bk.start){bi=g(bh,bg,E[1],E[2],E[3],E[4],E[5],E[6],S-bf);R+=["C",bi.start.x,bi.start.y,bi.m.x,bi.m.y,bi.x,bi.y];if(bc){return R;}bk.start=R;R=["M",bi.x,bi.y+"C",bi.n.x,bi.n.y,bi.end.x,bi.end.y,E[5],E[6]][aH]();bf+=bd;bh=+E[5];bg=+E[6];continue;}if(!d&&!e){bi=g(bh,bg,E[1],E[2],E[3],E[4],E[5],E[6],S-bf);return{x:bi.x,y:bi.y,alpha:bi.alpha};}}bf+=bd;bh=+E[5];bg=+E[6];}R+=E;}bk.end=R;bi=d?bf:e?bk:au.findDotsAtSegment(bh,bg,E[1],E[2],E[3],E[4],E[5],E[6],1);bi.alpha&&(bi={x:bi.x,y:bi.y,alpha:bi.alpha});return bi;};},o=an(function(E,d,bc,S,bi,bh,bg,bf){var R={x:0,y:0},be=0;for(var bd=0;bd<1.01;bd+=0.01){var e=T(E,d,bc,S,bi,bh,bg,bf,bd);bd&&(be+=aV(aV(R.x-e.x,2)+aV(R.y-e.y,2),0.5));R=e;}return be;});var aw=aK(1),G=aK(),N=aK(0,1);aF[a9].getTotalLength=function(){if(this.type!="path"){return;}return aw(this.attrs.path);};aF[a9].getPointAtLength=function(d){if(this.type!="path"){return;}return G(this.attrs.path,d);};aF[a9].getSubpath=function(i,e){if(this.type!="path"){return;}if(af.abs(this.getTotalLength()-e)<0.000001){return N(this.attrs.path,i).end;}var d=N(this.attrs.path,e,1);return i?N(d,i).end:d;};au.easing_formulas={linear:function(d){return d;},"<":function(d){return aV(d,3);},">":function(d){return aV(d-1,3)+1;},"<>":function(d){d=d*2;if(d<1){return aV(d,3)/2;}d-=2;return(aV(d,3)+2)/2;},backIn:function(e){var d=1.70158;return e*e*((d+1)*e-d);},backOut:function(e){e=e-1;var d=1.70158;return e*e*((d+1)*e+d)+1;},elastic:function(i){if(i==0||i==1){return i;}var e=0.3,d=e/4;return aV(2,-10*i)*af.sin((i-d)*(2*af.PI)/e)+1;},bounce:function(E){var e=7.5625,i=2.75,d;if(E<(1/i)){d=e*E*E;}else{if(E<(2/i)){E-=(1.5/i);d=e*E*E+0.75;}else{if(E<(2.5/i)){E-=(2.25/i);d=e*E*E+0.9375;}else{E-=(2.625/i);d=e*E*E+0.984375;}}}return d;}};var M={length:0},a1=function(){var be=+new Date;for(var bq in M){if(bq!="length"&&M[W](bq)){var bv=M[bq];if(bv.stop||bv.el.removed){delete M[bq];M[n]--;continue;}var bc=be-bv.start,bn=bv.ms,bm=bv.easing,br=bv.from,bj=bv.diff,E=bv.to,bi=bv.t,bl=bv.prev||0,bd=bv.el,R=bv.callback,bk={},d;if(bc<bn){var S=au.easing_formulas[bm]?au.easing_formulas[bm](bc/bn):bc/bn;for(var bo in br){if(br[W](bo)){switch(ad[bo]){case"along":d=S*bn*bj[bo];E.back&&(d=E.len-d);var bp=G(E[bo],d);bd.translate(bj.sx-bj.x||0,bj.sy-bj.y||0);bj.x=bp.x;bj.y=bp.y;bd.translate(bp.x-bj.sx,bp.y-bj.sy);E.rot&&bd.rotate(bj.r+bp.alpha,bp.x,bp.y);break;case"number":d=+br[bo]+S*bn*bj[bo];break;case"colour":d="rgb("+[F(U(br[bo].r+S*bn*bj[bo].r)),F(U(br[bo].g+S*bn*bj[bo].g)),F(U(br[bo].b+S*bn*bj[bo].b))][aH](",")+")";break;case"path":d=[];for(var bt=0,bh=br[bo][n];bt<bh;bt++){d[bt]=[br[bo][bt][0]];for(var bs=1,bu=br[bo][bt][n];bs<bu;bs++){d[bt][bs]=+br[bo][bt][bs]+S*bn*bj[bo][bt][bs];}d[bt]=d[bt][aH](at);}d=d[aH](at);break;case"csv":switch(bo){case"translation":var bg=bj[bo][0]*(bc-bl),bf=bj[bo][1]*(bc-bl);bi.x+=bg;bi.y+=bf;d=bg+at+bf;break;case"rotation":d=+br[bo][0]+S*bn*bj[bo][0];br[bo][1]&&(d+=","+br[bo][1]+","+br[bo][2]);break;case"scale":d=[+br[bo][0]+S*bn*bj[bo][0],+br[bo][1]+S*bn*bj[bo][1],(2 in E[bo]?E[bo][2]:aA),(3 in E[bo]?E[bo][3]:aA)][aH](at);break;case"clip-rect":d=[];bt=4;while(bt--){d[bt]=+br[bo][bt]+S*bn*bj[bo][bt];}break;}break;}bk[bo]=d;}}bd.attr(bk);bd._run&&bd._run.call(bd);}else{if(E.along){bp=G(E.along,E.len*!E.back);bd.translate(bj.sx-(bj.x||0)+bp.x-bj.sx,bj.sy-(bj.y||0)+bp.y-bj.sy);E.rot&&bd.rotate(bj.r+bp.alpha,bp.x,bp.y);}(bi.x||bi.y)&&bd.translate(-bi.x,-bi.y);E.scale&&(E.scale=E.scale+aA);bd.attr(E);delete M[bq];M[n]--;bd.in_animation=null;au.is(R,"function")&&R.call(bd);}bv.prev=bc;}}au.svg&&bd&&bd.paper.safari();M[n]&&aB.setTimeout(a1);},F=function(d){return d>255?255:(d<0?0:d);},v=function(d,i){if(d==null){return{x:this._.tx,y:this._.ty,toString:x};}this._.tx+=+d;this._.ty+=+i;switch(this.type){case"circle":case"ellipse":this.attr({cx:+d+this.attrs.cx,cy:+i+this.attrs.cy});break;case"rect":case"image":case"text":this.attr({x:+d+this.attrs.x,y:+i+this.attrs.y});break;case"path":var e=ah(this.attrs.path);e[0][1]+=+d;e[0][2]+=+i;this.attr({path:e});break;}return this;};aF[a9].animateWith=function(e,i,d,R,E){M[e.id]&&(i.start=M[e.id].start);return this.animate(i,d,R,E);};aF[a9].animateAlong=aG();aF[a9].animateAlongBack=aG(1);function aG(d){return function(E,i,e,S){var R={back:d};au.is(e,"function")?(S=e):(R.rot=e);E&&E.constructor==aF&&(E=E.attrs.path);E&&(R.along=E);return this.animate(R,i,S);};}aF[a9].onAnimation=function(d){this._run=d||0;return this;};aF[a9].animate=function(bq,bh,bg,E){if(au.is(bg,"function")||!bg){E=bg||null;}var bl={},e={},be={};for(var bi in bq){if(bq[W](bi)){if(ad[W](bi)){bl[bi]=this.attr(bi);(bl[bi]==null)&&(bl[bi]=k[bi]);e[bi]=bq[bi];switch(ad[bi]){case"along":var bo=aw(bq[bi]),bj=G(bq[bi],bo*!!bq.back),R=this.getBBox();be[bi]=bo/bh;be.tx=R.x;be.ty=R.y;be.sx=bj.x;be.sy=bj.y;e.rot=bq.rot;e.back=bq.back;e.len=bo;bq.rot&&(be.r=aa(this.rotate())||0);break;case"number":be[bi]=(e[bi]-bl[bi])/bh;break;case"colour":bl[bi]=au.getRGB(bl[bi]);var bk=au.getRGB(e[bi]);be[bi]={r:(bk.r-bl[bi].r)/bh,g:(bk.g-bl[bi].g)/bh,b:(bk.b-bl[bi].b)/bh};break;case"path":var S=L(bl[bi],e[bi]);bl[bi]=S[0];var bf=S[1];be[bi]=[];for(var bn=0,bd=bl[bi][n];bn<bd;bn++){be[bi][bn]=[0];for(var bm=1,bp=bl[bi][bn][n];bm<bp;bm++){be[bi][bn][bm]=(bf[bn][bm]-bl[bi][bn][bm])/bh;}}break;case"csv":var d=(bq[bi]+aA)[C](a),bc=(bl[bi]+aA)[C](a);switch(bi){case"translation":bl[bi]=[0,0];be[bi]=[d[0]/bh,d[1]/bh];break;case"rotation":bl[bi]=(bc[1]==d[1]&&bc[2]==d[2])?bc:[0,d[1],d[2]];be[bi]=[(d[0]-bl[bi][0])/bh,0,0];break;case"scale":bq[bi]=d;bl[bi]=(bl[bi]+aA)[C](a);be[bi]=[(d[0]-bl[bi][0])/bh,(d[1]-bl[bi][1])/bh,0,0];break;case"clip-rect":bl[bi]=(bl[bi]+aA)[C](a);be[bi]=[];bn=4;while(bn--){be[bi][bn]=(d[bn]-bl[bi][bn])/bh;}break;}e[bi]=d;}}}}this.stop();this.in_animation=1;M[this.id]={start:bq.start||+new Date,ms:bh,easing:bg,from:bl,diff:be,to:e,el:this,callback:E,t:{x:0,y:0}};++M[n]==1&&a1();return this;};aF[a9].stop=function(){M[this.id]&&M[n]--;delete M[this.id];return this;};aF[a9].translate=function(d,e){return this.attr({translation:d+" "+e});};aF[a9][aJ]=function(){return"Rapha\xebl\u2019s object";};au.ae=M;var X=function(d){this.items=[];this[n]=0;if(d){for(var e=0,E=d[n];e<E;e++){if(d[e]&&(d[e].constructor==aF||d[e].constructor==X)){this[this.items[n]]=this.items[this.items[n]]=d[e];this[n]++;}}}};X[a9][f]=function(){var R,d;for(var e=0,E=arguments[n];e<E;e++){R=arguments[e];if(R&&(R.constructor==aF||R.constructor==X)){d=this.items[n];this[d]=this.items[d]=R;this[n]++;}}return this;};X[a9].pop=function(){delete this[this[n]--];return this.items.pop();};for(var B in aF[a9]){if(aF[a9][W](B)){X[a9][B]=(function(d){return function(){for(var e=0,E=this.items[n];e<E;e++){this.items[e][d][a7](this.items[e],arguments);}return this;};})(B);}}X[a9].attr=function(e,bc){if(e&&au.is(e,"array")&&au.is(e[0],"object")){for(var d=0,S=e[n];d<S;d++){this.items[d].attr(e[d]);}}else{for(var E=0,R=this.items[n];E<R;E++){this.items[E].attr(e,bc);}}return this;};X[a9].animate=function(S,e,be,bd){(au.is(be,"function")||!be)&&(bd=be||null);var d=this.items[n],E=d,bc=this,R;bd&&(R=function(){!--d&&bd.call(bc);});this.items[--E].animate(S,e,be||R,R);while(E--){this.items[E].animateWith(this.items[d-1],S,e,be||R,R);}return this;};X[a9].insertAfter=function(e){var d=this.items[n];while(d--){this.items[d].insertAfter(e);}return this;};X[a9].getBBox=function(){var d=[],bc=[],e=[],R=[];for(var E=this.items[n];E--;){var S=this.items[E].getBBox();d[f](S.x);bc[f](S.y);e[f](S.x+S.width);R[f](S.y+S.height);}d=aR[a7](0,d);bc=aR[a7](0,bc);return{x:d,y:bc,width:h[a7](0,e)-d,height:h[a7](0,R)-bc};};X[a9].clone=function(E){E=new X;for(var d=0,e=this.items[n];d<e;d++){E[f](this.items[d].clone());}return E;};au.registerFont=function(e){if(!e.face){return e;}this.fonts=this.fonts||{};var E={w:e.w,face:{},glyphs:{}},i=e.face["font-family"];for(var bc in e.face){if(e.face[W](bc)){E.face[bc]=e.face[bc];}}if(this.fonts[i]){this.fonts[i][f](E);}else{this.fonts[i]=[E];}if(!e.svg){E.face["units-per-em"]=K(e.face["units-per-em"],10);for(var R in e.glyphs){if(e.glyphs[W](R)){var S=e.glyphs[R];E.glyphs[R]={w:S.w,k:{},d:S.d&&"M"+S.d[aZ](/[mlcxtrv]/g,function(bd){return{l:"L",c:"C",x:"z",t:"m",r:"l",v:"c"}[bd]||"M";})+"z"};if(S.k){for(var d in S.k){if(S[W](d)){E.glyphs[R].k[d]=S.k[d];}}}}}}return e;};a4[a9].getFont=function(be,bf,e,R){R=R||"normal";e=e||"normal";bf=+bf||{normal:400,bold:700,lighter:300,bolder:800}[bf]||400;var S=au.fonts[be];if(!S){var E=new RegExp("(^|\\s)"+be[aZ](/[^\w\d\s+!~.:_-]/g,aA)+"(\\s|$)","i");for(var d in au.fonts){if(au.fonts[W](d)){if(E.test(d)){S=au.fonts[d];break;}}}}var bc;if(S){for(var bd=0,bg=S[n];bd<bg;bd++){bc=S[bd];if(bc.face["font-weight"]==bf&&(bc.face["font-style"]==e||!bc.face["font-style"])&&bc.face["font-stretch"]==R){break;}}}return bc;};a4[a9].print=function(R,E,d,bd,be,bn){bn=bn||"middle";var bj=this.set(),bm=(d+aA)[C](aA),bk=0,bg=aA,bo;au.is(bd,"string")&&(bd=this.getFont(bd));if(bd){bo=(be||16)/bd.face["units-per-em"];var e=bd.face.bbox.split(a),bc=+e[0],bf=+e[1]+(bn=="baseline"?e[3]-e[1]+(+bd.face.descent):(e[3]-e[1])/2);for(var bi=0,S=bm[n];bi<S;bi++){var bh=bi&&bd.glyphs[bm[bi-1]]||{},bl=bd.glyphs[bm[bi]];bk+=bi?(bh.w||bd.w)+(bh.k&&bh.k[bm[bi]]||0):0;bl&&bl.d&&bj[f](this.path(bl.d).attr({fill:"#000",stroke:"none",translation:[bk,0]}));}bj.scale(bo,bo,bc,bf).translate(R-bc,E-bf);}return bj;};var aW=/\{(\d+)\}/g;au.format=function(e,i){var d=au.is(i,"array")?[0][a2](i):arguments;e&&au.is(e,"string")&&d[n]-1&&(e=e[aZ](aW,function(R,E){return d[++E]==null?aA:d[E];}));return e||aA;};au.ninja=function(){m.was?(Raphael=m.is):delete Raphael;return au;};au.el=aF[a9];return au;})();

/**
 * MiniCounter v1.0.0
 *
 * An animated counter based on RaphaelJS and jQuery.
 *
 * Copyright (C) 2010 Michel Belleville
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software Foundation,
 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
 **/
(function($) {
/**
 * use:
 *   // To create new counters (inside .somewhere elements) :
 *   var my_counters = $('.somewhere').miniCounter();
 *   
 *   // To change the counter value directely :
 *   my_counters[0].value(123456);
 *   
 *   // To change the counter value with an animation :
 *   my_counters[0].animateTo(9876);
 *
 * options (default):
 * - size: number of digits the counter shows (6)
 * - value: initial value displayed (0)
 * - image: face image of the numbers ('images/numbers.png')
 */
jQuery.fn.miniCounter = function(options) {
  return this.map(function() {
    var target = $(this);
    options = options || {};
    var size = options['size'] || 6;
    var value = '' + (options['value'] || 0);
    var image = options['image'] || 'images/numbers.png';
    var height = 21;
    var step_height = -10 * height;
    var number_width = 15;
    var margin = 3;
    var width = number_width * size;
    if (size > 1) width += margin * parseInt((size - 1) / 3);
    var r = Raphael(target[0], width, height);
    var numbers = [];
    for (var i = size - 1; i >= 0; i--) {
      var pos = width - (number_width * (i + 1) + margin * parseInt(i / 3));
      r.rect(pos, 0, number_width - 1, height - 1, 1).
        attr({ stroke: "#c0c0c0",
               fill: "270-#ffffff-#ffffff:50-#dcdcdc:50-#f3f3f3" });
      numbers.push(r.image(image, pos, 0, number_width, 11 * height));
    };
    var running = false;
    var moveTo = function(number, new_value, easing) {
      var old_value = parseInt(value.charAt(number));
      new_value = parseInt(new_value);
      if (old_value == new_value) return [$.noop, 0];
      var old_y = -old_value * height;
      var new_y = -new_value * height;
      var step = (old_value > new_value) == (easing == 'up');
      var diff = Math.abs(old_value - new_value);
      var last_step = step ? easing == 'up' ? new_y : (10 - new_value) : diff;
      var first_step = step ? easing == 'up' ? (10 - old_value) : old_value : 0;
      return [
        function(speed, callback) {
          var mover = numbers[number];
          mover.attr({ y: old_y });
          var straight = function() {
            mover.animate({ y: new_y }, parseInt(last_step / speed), callback);
          };
          if (step)
            mover.animate({ y: easing == 'up' ? step_height : 0},
              parseInt(first_step / speed),
              function() {
                mover.attr({ y: easing == 'up' ? 0 : step_height });
                straight();
              });
          else straight();
        },
        step ? (11 - diff) : diff
      ];
    };
    var validate = function(new_value) {
      new_value = ('' + new_value).replace(/^\s*\b(.*?)\b\s*$/, '$1');
      if (new_value.match(/[^\d]/))
        throw "Value is not a number : " + new_value;
      if (new_value.length > size)
        throw "Value is too long : " + new_value;
      for (var i = new_value.length; i < size; i++)
        new_value = "0" + new_value;
      return new_value;
    };
    var myself = {
      /**
       * Raphael attached instance
       *
       * returns:
       * - current raphael instance
       */
      raphael: function() { return r; },
      /**
       * Animation status
       *
       * returns:
       * - true when an animation is currently running
       * - false when no animation is triggered
       */
      running: function() { return running; },
      /**
       * Set or return current counter value
       *
       * parameters:
       * - value: (optional) integer or string value to set
       *
       * returns:
       * - itself when value is given
       * - current value when value is omitted
       */ 
      value: function() {
        if (arguments.length > 0) {
          var new_value = validate(arguments[0]);
          $(numbers).each(function(i) {
            this.attr({ y: -parseInt(new_value.charAt(i)) * height }); });
          value = new_value;
          return myself;
        }
        else return value;
      },
      /**
       * Animates the counter to a new value
       *
       * parameters:
       * - new_value: new value to set
       *
       * options:
       * - speed: speed of number change (in number changed / second)
       * - duration: total duration of the animation in seconds (overrides speed)
       * - easing: animation style
       *   = up: numbers appear to come upwards (0 1 2 3 4 5 6 7 8 9 0)
       *   = down: numbers appear to come downwards (0 9 8 7 6 5 4 3 2 1 0)
       */
      animateTo: function(new_value, options) {
        if (running) throw "Another animation is already running";
        running = true;
        try {
          new_value = validate(new_value);
          if (new_value == value) throw "Nothing to animate";
          options = options || {};
          var speed = options['speed'] || 5;
          var duration = options['duration'] || false;
          var easing = options['easing'] || 'up';
          if (! easing.match(/up|down/))
            throw "This is not a valid easing option : " + easing;
          var vectors = [];
          var longest = null;
          var longest_diff = 0;
          var moves = $(numbers).map(function(i) {
            var move = moveTo(i, new_value.charAt(i), easing);
            if (move[1] > longest_diff) {
              longest_diff = move[1];
              longest = i;
            }
            return move[0];
          });
          if (duration) speed = longest_diff / duration;
          moves.each(function(i) {
            this(speed / 1000, i == longest ? function() {
              running = false;
              value = new_value;
            } : null);
          });
        } catch(e) {
          running = false;
          throw e;
        }
      }
    };
    myself.value(value);
    return myself;
  });
};
})(jQuery);



/**
 * MiniCarrousel v1.0.0
 *
 * Easy to setup image javascript carrousel based on the jQuery and Raphael.
 *
 * Copyright (C) 2010 Michel Belleville
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software Foundation,
 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
 **/

(function($) {
/**
 * use:
 *   // the images list has to be placed inside the page and displayed before
 *   // the carrousel is started
 *   var my_carrousel = $('#carrousel').miniCarrousel($('#carrousel > img'));
 *
 *   // once the carrousel is started, images can be hidden
 *   $('#carrousel > img').hide();
 *
 * arguments :
 * - images: images used by the carrousel
 * - options: hash of optional arguments (default values)
 *   - margin: distance between each images in px (10)
 *   - reflexion: ratio of the reflexion from the images height in % (10)
 *   - opacity: opacity of the reflexion (0.5)
 *   - speed: speed of the movement in px / s (100)
 *   - waiting: true => wait for it... ; false => start right away (false)
 *   - onIteration: function called once each iteration (see loop)
 * returns :
 * { carrousel: raphael animation frame,
 *   loop: animation trigger }
 **/
jQuery.fn.miniCarrousel = function(images, options) {
  // reading arguments
  target = this.eq(0);
  options = options || {};
  var margin = options['margin'] || 10;
  var reflexion = options['reflexion'] || 10;
  var opacity = options['opacity'] || 0.5;
  var speed = options['speed'] || 100;
  var waiting = options['waiting'];
  var onIteration = options['onIteration'];

  var width = target.width();
  var startX = width + margin;
  var height = target.height();
  var imagesHeight = parseInt(height * 100 / (100 + reflexion));

  var totalWidth = 0;
  imagesData = $(images).map(function() {
    var image = $(this);
    var imageWidth = parseInt(imagesHeight *  image.width() / image.height());
    totalWidth += imageWidth + margin;
    return {
      src: image.attr('src'),
      width: imageWidth,
      tick: parseInt(1000 * (imageWidth + margin) / speed),
      image: null,
      reflexion: null
    };
  });
  var maxWidth = null;
  imagesData.each(function() {
   if (maxWidth < this.width) maxWidth = this.width; });
  var travelWidth = width + maxWidth + 2 * margin;
  var minimumWidth = 2 * travelWidth;
  for (var i = 0; totalWidth <= minimumWidth; i++) {
    var copiedImage = $.extend({}, imagesData[i]);
    totalWidth += copiedImage['width'] + margin;
    imagesData.push(copiedImage);
  }
  var imagesCount = imagesData.length;
  var vector = "-" + travelWidth + ',0';
  var duration = parseInt(1000 * travelWidth / speed);

  var carrousel = Raphael(target[0], width, height);
  imagesData.each(function() {
    var image = carrousel.image(this.src, width + margin, 0,
                                this.width, imagesHeight)
    var reflexion = carrousel.
      image(this.src, startX, 0, this.width, imagesHeight).
      attr({ opacity: opacity }).scale(1, -1).translate(0, 2 * imagesHeight);
    this.image = image;
    this.reflexion = reflexion;
    image.onAnimation(function() { reflexion.attr({ x: image.attr('x') }); });
  });
  var mask = carrousel.rect(0, imagesHeight, width, height - imagesHeight).
      attr({ stroke: 'none', gradient: "90-#fff-#fff", opacity: opacity });

  /**
   * Animation trigger and loopback
   *
   * Triggers the animation start and each new image slide.
   * 
   * Arguments :
   * - callback : function(iteration) called on each iteration
   *              return false to break the cycle
   *              if none, the cycle loops endlessly
   * - iteration: iteration number
   **/
  var loop = function(callback, iteration) {
    if (! callback || callback(iteration)) {
      iteration = iteration || 0;
      if (iteration == 0) {
        var point = width;
        var stop = -(maxWidth + margin);
        for (var i = imagesCount - 1; point > stop; i--) {
          var image = imagesData.eq(i)[0];
          point -= image.width;
          image.image.attr({ x: point}).
            animate({ translation: vector }, duration);
          point -= margin;
        }
      }
      var imageData = imagesData[iteration % imagesCount];
      imageData.image.attr({ x: startX }).
        animate({ translation: vector }, duration);
      setTimeout(function() { loop(callback, iteration + 1) }, imageData.tick);
    }
  };

  if (! waiting) loop(onIteration);

  return { carrousel: carrousel, loop: loop };
};

})(jQuery);


/*
 * Sizzle CSS Selector Engine - v0.9.3
 *  Copyright 2009, The Dojo Foundation
 *  Released under the MIT, BSD, and GPL Licenses.
 *  More information: http://sizzlejs.com/
 */
(function(){var R=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?/g,L=0,H=Object.prototype.toString;var F=function(Y,U,ab,ac){ab=ab||[];U=U||document;if(U.nodeType!==1&&U.nodeType!==9){return[]}if(!Y||typeof Y!=="string"){return ab}var Z=[],W,af,ai,T,ad,V,X=true;R.lastIndex=0;while((W=R.exec(Y))!==null){Z.push(W[1]);if(W[2]){V=RegExp.rightContext;break}}if(Z.length>1&&M.exec(Y)){if(Z.length===2&&I.relative[Z[0]]){af=J(Z[0]+Z[1],U)}else{af=I.relative[Z[0]]?[U]:F(Z.shift(),U);while(Z.length){Y=Z.shift();if(I.relative[Y]){Y+=Z.shift()}af=J(Y,af)}}}else{var ae=ac?{expr:Z.pop(),set:E(ac)}:F.find(Z.pop(),Z.length===1&&U.parentNode?U.parentNode:U,Q(U));af=F.filter(ae.expr,ae.set);if(Z.length>0){ai=E(af)}else{X=false}while(Z.length){var ah=Z.pop(),ag=ah;if(!I.relative[ah]){ah=""}else{ag=Z.pop()}if(ag==null){ag=U}I.relative[ah](ai,ag,Q(U))}}if(!ai){ai=af}if(!ai){throw"Syntax error, unrecognized expression: "+(ah||Y)}if(H.call(ai)==="[object Array]"){if(!X){ab.push.apply(ab,ai)}else{if(U.nodeType===1){for(var aa=0;ai[aa]!=null;aa++){if(ai[aa]&&(ai[aa]===true||ai[aa].nodeType===1&&K(U,ai[aa]))){ab.push(af[aa])}}}else{for(var aa=0;ai[aa]!=null;aa++){if(ai[aa]&&ai[aa].nodeType===1){ab.push(af[aa])}}}}}else{E(ai,ab)}if(V){F(V,U,ab,ac);if(G){hasDuplicate=false;ab.sort(G);if(hasDuplicate){for(var aa=1;aa<ab.length;aa++){if(ab[aa]===ab[aa-1]){ab.splice(aa--,1)}}}}}return ab};F.matches=function(T,U){return F(T,null,null,U)};F.find=function(aa,T,ab){var Z,X;if(!aa){return[]}for(var W=0,V=I.order.length;W<V;W++){var Y=I.order[W],X;if((X=I.match[Y].exec(aa))){var U=RegExp.leftContext;if(U.substr(U.length-1)!=="\\"){X[1]=(X[1]||"").replace(/\\/g,"");Z=I.find[Y](X,T,ab);if(Z!=null){aa=aa.replace(I.match[Y],"");break}}}}if(!Z){Z=T.getElementsByTagName("*")}return{set:Z,expr:aa}};F.filter=function(ad,ac,ag,W){var V=ad,ai=[],aa=ac,Y,T,Z=ac&&ac[0]&&Q(ac[0]);while(ad&&ac.length){for(var ab in I.filter){if((Y=I.match[ab].exec(ad))!=null){var U=I.filter[ab],ah,af;T=false;if(aa==ai){ai=[]}if(I.preFilter[ab]){Y=I.preFilter[ab](Y,aa,ag,ai,W,Z);if(!Y){T=ah=true}else{if(Y===true){continue}}}if(Y){for(var X=0;(af=aa[X])!=null;X++){if(af){ah=U(af,Y,X,aa);var ae=W^!!ah;if(ag&&ah!=null){if(ae){T=true}else{aa[X]=false}}else{if(ae){ai.push(af);T=true}}}}}if(ah!==g){if(!ag){aa=ai}ad=ad.replace(I.match[ab],"");if(!T){return[]}break}}}if(ad==V){if(T==null){throw"Syntax error, unrecognized expression: "+ad}else{break}}V=ad}return aa};var I=F.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF_-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF_-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF_-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF_-]|\\.)+)\s*(?:(\S?=)\s*(['"]*)(.*?)\3|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*_-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\((even|odd|[\dn+-]*)\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF_-]|\\.)+)(?:\((['"]*)((?:\([^\)]+\)|[^\2\(\)]*)+)\2\))?/},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(T){return T.getAttribute("href")}},relative:{"+":function(aa,T,Z){var X=typeof T==="string",ab=X&&!/\W/.test(T),Y=X&&!ab;if(ab&&!Z){T=T.toUpperCase()}for(var W=0,V=aa.length,U;W<V;W++){if((U=aa[W])){while((U=U.previousSibling)&&U.nodeType!==1){}aa[W]=Y||U&&U.nodeName===T?U||false:U===T}}if(Y){F.filter(T,aa,true)}},">":function(Z,U,aa){var X=typeof U==="string";if(X&&!/\W/.test(U)){U=aa?U:U.toUpperCase();for(var V=0,T=Z.length;V<T;V++){var Y=Z[V];if(Y){var W=Y.parentNode;Z[V]=W.nodeName===U?W:false}}}else{for(var V=0,T=Z.length;V<T;V++){var Y=Z[V];if(Y){Z[V]=X?Y.parentNode:Y.parentNode===U}}if(X){F.filter(U,Z,true)}}},"":function(W,U,Y){var V=L++,T=S;if(!U.match(/\W/)){var X=U=Y?U:U.toUpperCase();T=P}T("parentNode",U,V,W,X,Y)},"~":function(W,U,Y){var V=L++,T=S;if(typeof U==="string"&&!U.match(/\W/)){var X=U=Y?U:U.toUpperCase();T=P}T("previousSibling",U,V,W,X,Y)}},find:{ID:function(U,V,W){if(typeof V.getElementById!=="undefined"&&!W){var T=V.getElementById(U[1]);return T?[T]:[]}},NAME:function(V,Y,Z){if(typeof Y.getElementsByName!=="undefined"){var U=[],X=Y.getElementsByName(V[1]);for(var W=0,T=X.length;W<T;W++){if(X[W].getAttribute("name")===V[1]){U.push(X[W])}}return U.length===0?null:U}},TAG:function(T,U){return U.getElementsByTagName(T[1])}},preFilter:{CLASS:function(W,U,V,T,Z,aa){W=" "+W[1].replace(/\\/g,"")+" ";if(aa){return W}for(var X=0,Y;(Y=U[X])!=null;X++){if(Y){if(Z^(Y.className&&(" "+Y.className+" ").indexOf(W)>=0)){if(!V){T.push(Y)}}else{if(V){U[X]=false}}}}return false},ID:function(T){return T[1].replace(/\\/g,"")},TAG:function(U,T){for(var V=0;T[V]===false;V++){}return T[V]&&Q(T[V])?U[1]:U[1].toUpperCase()},CHILD:function(T){if(T[1]=="nth"){var U=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(T[2]=="even"&&"2n"||T[2]=="odd"&&"2n+1"||!/\D/.test(T[2])&&"0n+"+T[2]||T[2]);T[2]=(U[1]+(U[2]||1))-0;T[3]=U[3]-0}T[0]=L++;return T},ATTR:function(X,U,V,T,Y,Z){var W=X[1].replace(/\\/g,"");if(!Z&&I.attrMap[W]){X[1]=I.attrMap[W]}if(X[2]==="~="){X[4]=" "+X[4]+" "}return X},PSEUDO:function(X,U,V,T,Y){if(X[1]==="not"){if(X[3].match(R).length>1||/^\w/.test(X[3])){X[3]=F(X[3],null,null,U)}else{var W=F.filter(X[3],U,V,true^Y);if(!V){T.push.apply(T,W)}return false}}else{if(I.match.POS.test(X[0])||I.match.CHILD.test(X[0])){return true}}return X},POS:function(T){T.unshift(true);return T}},filters:{enabled:function(T){return T.disabled===false&&T.type!=="hidden"},disabled:function(T){return T.disabled===true},checked:function(T){return T.checked===true},selected:function(T){T.parentNode.selectedIndex;return T.selected===true},parent:function(T){return !!T.firstChild},empty:function(T){return !T.firstChild},has:function(V,U,T){return !!F(T[3],V).length},header:function(T){return/h\d/i.test(T.nodeName)},text:function(T){return"text"===T.type},radio:function(T){return"radio"===T.type},checkbox:function(T){return"checkbox"===T.type},file:function(T){return"file"===T.type},password:function(T){return"password"===T.type},submit:function(T){return"submit"===T.type},image:function(T){return"image"===T.type},reset:function(T){return"reset"===T.type},button:function(T){return"button"===T.type||T.nodeName.toUpperCase()==="BUTTON"},input:function(T){return/input|select|textarea|button/i.test(T.nodeName)}},setFilters:{first:function(U,T){return T===0},last:function(V,U,T,W){return U===W.length-1},even:function(U,T){return T%2===0},odd:function(U,T){return T%2===1},lt:function(V,U,T){return U<T[3]-0},gt:function(V,U,T){return U>T[3]-0},nth:function(V,U,T){return T[3]-0==U},eq:function(V,U,T){return T[3]-0==U}},filter:{PSEUDO:function(Z,V,W,aa){var U=V[1],X=I.filters[U];if(X){return X(Z,W,V,aa)}else{if(U==="contains"){return(Z.textContent||Z.innerText||"").indexOf(V[3])>=0}else{if(U==="not"){var Y=V[3];for(var W=0,T=Y.length;W<T;W++){if(Y[W]===Z){return false}}return true}}}},CHILD:function(T,W){var Z=W[1],U=T;switch(Z){case"only":case"first":while(U=U.previousSibling){if(U.nodeType===1){return false}}if(Z=="first"){return true}U=T;case"last":while(U=U.nextSibling){if(U.nodeType===1){return false}}return true;case"nth":var V=W[2],ac=W[3];if(V==1&&ac==0){return true}var Y=W[0],ab=T.parentNode;if(ab&&(ab.sizcache!==Y||!T.nodeIndex)){var X=0;for(U=ab.firstChild;U;U=U.nextSibling){if(U.nodeType===1){U.nodeIndex=++X}}ab.sizcache=Y}var aa=T.nodeIndex-ac;if(V==0){return aa==0}else{return(aa%V==0&&aa/V>=0)}}},ID:function(U,T){return U.nodeType===1&&U.getAttribute("id")===T},TAG:function(U,T){return(T==="*"&&U.nodeType===1)||U.nodeName===T},CLASS:function(U,T){return(" "+(U.className||U.getAttribute("class"))+" ").indexOf(T)>-1},ATTR:function(Y,W){var V=W[1],T=I.attrHandle[V]?I.attrHandle[V](Y):Y[V]!=null?Y[V]:Y.getAttribute(V),Z=T+"",X=W[2],U=W[4];return T==null?X==="!=":X==="="?Z===U:X==="*="?Z.indexOf(U)>=0:X==="~="?(" "+Z+" ").indexOf(U)>=0:!U?Z&&T!==false:X==="!="?Z!=U:X==="^="?Z.indexOf(U)===0:X==="$="?Z.substr(Z.length-U.length)===U:X==="|="?Z===U||Z.substr(0,U.length+1)===U+"-":false},POS:function(X,U,V,Y){var T=U[2],W=I.setFilters[T];if(W){return W(X,V,U,Y)}}}};var M=I.match.POS;for(var O in I.match){I.match[O]=RegExp(I.match[O].source+/(?![^\[]*\])(?![^\(]*\))/.source)}var E=function(U,T){U=Array.prototype.slice.call(U);if(T){T.push.apply(T,U);return T}return U};try{Array.prototype.slice.call(document.documentElement.childNodes)}catch(N){E=function(X,W){var U=W||[];if(H.call(X)==="[object Array]"){Array.prototype.push.apply(U,X)}else{if(typeof X.length==="number"){for(var V=0,T=X.length;V<T;V++){U.push(X[V])}}else{for(var V=0;X[V];V++){U.push(X[V])}}}return U}}var G;if(document.documentElement.compareDocumentPosition){G=function(U,T){var V=U.compareDocumentPosition(T)&4?-1:U===T?0:1;if(V===0){hasDuplicate=true}return V}}else{if("sourceIndex" in document.documentElement){G=function(U,T){var V=U.sourceIndex-T.sourceIndex;if(V===0){hasDuplicate=true}return V}}else{if(document.createRange){G=function(W,U){var V=W.ownerDocument.createRange(),T=U.ownerDocument.createRange();V.selectNode(W);V.collapse(true);T.selectNode(U);T.collapse(true);var X=V.compareBoundaryPoints(Range.START_TO_END,T);if(X===0){hasDuplicate=true}return X}}}}(function(){var U=document.createElement("form"),V="script"+(new Date).getTime();U.innerHTML="<input name='"+V+"'/>";var T=document.documentElement;T.insertBefore(U,T.firstChild);if(!!document.getElementById(V)){I.find.ID=function(X,Y,Z){if(typeof Y.getElementById!=="undefined"&&!Z){var W=Y.getElementById(X[1]);return W?W.id===X[1]||typeof W.getAttributeNode!=="undefined"&&W.getAttributeNode("id").nodeValue===X[1]?[W]:g:[]}};I.filter.ID=function(Y,W){var X=typeof Y.getAttributeNode!=="undefined"&&Y.getAttributeNode("id");return Y.nodeType===1&&X&&X.nodeValue===W}}T.removeChild(U)})();(function(){var T=document.createElement("div");T.appendChild(document.createComment(""));if(T.getElementsByTagName("*").length>0){I.find.TAG=function(U,Y){var X=Y.getElementsByTagName(U[1]);if(U[1]==="*"){var W=[];for(var V=0;X[V];V++){if(X[V].nodeType===1){W.push(X[V])}}X=W}return X}}T.innerHTML="<a href='#'></a>";if(T.firstChild&&typeof T.firstChild.getAttribute!=="undefined"&&T.firstChild.getAttribute("href")!=="#"){I.attrHandle.href=function(U){return U.getAttribute("href",2)}}})();if(document.querySelectorAll){(function(){var T=F,U=document.createElement("div");U.innerHTML="<p class='TEST'></p>";if(U.querySelectorAll&&U.querySelectorAll(".TEST").length===0){return}F=function(Y,X,V,W){X=X||document;if(!W&&X.nodeType===9&&!Q(X)){try{return E(X.querySelectorAll(Y),V)}catch(Z){}}return T(Y,X,V,W)};F.find=T.find;F.filter=T.filter;F.selectors=T.selectors;F.matches=T.matches})()}if(document.getElementsByClassName&&document.documentElement.getElementsByClassName){(function(){var T=document.createElement("div");T.innerHTML="<div class='test e'></div><div class='test'></div>";if(T.getElementsByClassName("e").length===0){return}T.lastChild.className="e";if(T.getElementsByClassName("e").length===1){return}I.order.splice(1,0,"CLASS");I.find.CLASS=function(U,V,W){if(typeof V.getElementsByClassName!=="undefined"&&!W){return V.getElementsByClassName(U[1])}}})()}function P(U,Z,Y,ad,aa,ac){var ab=U=="previousSibling"&&!ac;for(var W=0,V=ad.length;W<V;W++){var T=ad[W];if(T){if(ab&&T.nodeType===1){T.sizcache=Y;T.sizset=W}T=T[U];var X=false;while(T){if(T.sizcache===Y){X=ad[T.sizset];break}if(T.nodeType===1&&!ac){T.sizcache=Y;T.sizset=W}if(T.nodeName===Z){X=T;break}T=T[U]}ad[W]=X}}}function S(U,Z,Y,ad,aa,ac){var ab=U=="previousSibling"&&!ac;for(var W=0,V=ad.length;W<V;W++){var T=ad[W];if(T){if(ab&&T.nodeType===1){T.sizcache=Y;T.sizset=W}T=T[U];var X=false;while(T){if(T.sizcache===Y){X=ad[T.sizset];break}if(T.nodeType===1){if(!ac){T.sizcache=Y;T.sizset=W}if(typeof Z!=="string"){if(T===Z){X=true;break}}else{if(F.filter(Z,[T]).length>0){X=T;break}}}T=T[U]}ad[W]=X}}}var K=document.compareDocumentPosition?function(U,T){return U.compareDocumentPosition(T)&16}:function(U,T){return U!==T&&(U.contains?U.contains(T):true)};var Q=function(T){return T.nodeType===9&&T.documentElement.nodeName!=="HTML"||!!T.ownerDocument&&Q(T.ownerDocument)};var J=function(T,aa){var W=[],X="",Y,V=aa.nodeType?[aa]:aa;while((Y=I.match.PSEUDO.exec(T))){X+=Y[0];T=T.replace(I.match.PSEUDO,"")}T=I.relative[T]?T+"*":T;for(var Z=0,U=V.length;Z<U;Z++){F(T,V[Z],W)}return F.filter(X,W)};o.find=F;o.filter=F.filter;o.expr=F.selectors;o.expr[":"]=o.expr.filters;F.selectors.filters.hidden=function(T){return T.offsetWidth===0||T.offsetHeight===0};F.selectors.filters.visible=function(T){return T.offsetWidth>0||T.offsetHeight>0};F.selectors.filters.animated=function(T){return o.grep(o.timers,function(U){return T===U.elem}).length};o.multiFilter=function(V,T,U){if(U){V=":not("+V+")"}return F.matches(V,T)};o.dir=function(V,U){var T=[],W=V[U];while(W&&W!=document){if(W.nodeType==1){T.push(W)}W=W[U]}return T};o.nth=function(X,T,V,W){T=T||1;var U=0;for(;X;X=X[V]){if(X.nodeType==1&&++U==T){break}}return X};o.sibling=function(V,U){var T=[];for(;V;V=V.nextSibling){if(V.nodeType==1&&V!=U){T.push(V)}}return T};return;l.Sizzle=F})();o.event={add:function(I,F,H,K){if(I.nodeType==3||I.nodeType==8){return}if(I.setInterval&&I!=l){I=l}if(!H.guid){H.guid=this.guid++}if(K!==g){var G=H;H=this.proxy(G);H.data=K}var E=o.data(I,"events")||o.data(I,"events",{}),J=o.data(I,"handle")||o.data(I,"handle",function(){return typeof o!=="undefined"&&!o.event.triggered?o.event.handle.apply(arguments.callee.elem,arguments):g});J.elem=I;o.each(F.split(/\s+/),function(M,N){var O=N.split(".");N=O.shift();H.type=O.slice().sort().join(".");var L=E[N];if(o.event.specialAll[N]){o.event.specialAll[N].setup.call(I,K,O)}if(!L){L=E[N]={};if(!o.event.special[N]||o.event.special[N].setup.call(I,K,O)===false){if(I.addEventListener){I.addEventListener(N,J,false)}else{if(I.attachEvent){I.attachEvent("on"+N,J)}}}}L[H.guid]=H;o.event.global[N]=true});I=null},guid:1,global:{},remove:function(K,H,J){if(K.nodeType==3||K.nodeType==8){return}var G=o.data(K,"events"),F,E;if(G){if(H===g||(typeof H==="string"&&H.charAt(0)==".")){for(var I in G){this.remove(K,I+(H||""))}}else{if(H.type){J=H.handler;H=H.type}o.each(H.split(/\s+/),function(M,O){var Q=O.split(".");O=Q.shift();var N=RegExp("(^|\\.)"+Q.slice().sort().join(".*\\.")+"(\\.|$)");if(G[O]){if(J){delete G[O][J.guid]}else{for(var P in G[O]){if(N.test(G[O][P].type)){delete G[O][P]}}}if(o.event.specialAll[O]){o.event.specialAll[O].teardown.call(K,Q)}for(F in G[O]){break}if(!F){if(!o.event.special[O]||o.event.special[O].teardown.call(K,Q)===false){if(K.removeEventListener){K.removeEventListener(O,o.data(K,"handle"),false)}else{if(K.detachEvent){K.detachEvent("on"+O,o.data(K,"handle"))}}}F=null;delete G[O]}}})}for(F in G){break}if(!F){var L=o.data(K,"handle");if(L){L.elem=null}o.removeData(K,"events");o.removeData(K,"handle")}}},trigger:function(I,K,H,E){var G=I.type||I;if(!E){I=typeof I==="object"?I[h]?I:o.extend(o.Event(G),I):o.Event(G);if(G.indexOf("!")>=0){I.type=G=G.slice(0,-1);I.exclusive=true}if(!H){I.stopPropagation();if(this.global[G]){o.each(o.cache,function(){if(this.events&&this.events[G]){o.event.trigger(I,K,this.handle.elem)}})}}if(!H||H.nodeType==3||H.nodeType==8){return g}I.result=g;I.target=H;K=o.makeArray(K);K.unshift(I)}I.currentTarget=H;var J=o.data(H,"handle");if(J){J.apply(H,K)}if((!H[G]||(o.nodeName(H,"a")&&G=="click"))&&H["on"+G]&&H["on"+G].apply(H,K)===false){I.result=false}if(!E&&H[G]&&!I.isDefaultPrevented()&&!(o.nodeName(H,"a")&&G=="click")){this.triggered=true;try{H[G]()}catch(L){}}this.triggered=false;if(!I.isPropagationStopped()){var F=H.parentNode||H.ownerDocument;if(F){o.event.trigger(I,K,F,true)}}},handle:function(K){var J,E;K=arguments[0]=o.event.fix(K||l.event);K.currentTarget=this;var L=K.type.split(".");K.type=L.shift();J=!L.length&&!K.exclusive;var I=RegExp("(^|\\.)"+L.slice().sort().join(".*\\.")+"(\\.|$)");E=(o.data(this,"events")||{})[K.type];for(var G in E){var H=E[G];if(J||I.test(H.type)){K.handler=H;K.data=H.data;var F=H.apply(this,arguments);if(F!==g){K.result=F;if(F===false){K.preventDefault();K.stopPropagation()}}if(K.isImmediatePropagationStopped()){break}}}},props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode metaKey newValue originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),fix:function(H){if(H[h]){return H}var F=H;H=o.Event(F);for(var G=this.props.length,J;G;){J=this.props[--G];H[J]=F[J]}if(!H.target){H.target=H.srcElement||document}if(H.target.nodeType==3){H.target=H.target.parentNode}if(!H.relatedTarget&&H.fromElement){H.relatedTarget=H.fromElement==H.target?H.toElement:H.fromElement}if(H.pageX==null&&H.clientX!=null){var I=document.documentElement,E=document.body;H.pageX=H.clientX+(I&&I.scrollLeft||E&&E.scrollLeft||0)-(I.clientLeft||0);H.pageY=H.clientY+(I&&I.scrollTop||E&&E.scrollTop||0)-(I.clientTop||0)}if(!H.which&&((H.charCode||H.charCode===0)?H.charCode:H.keyCode)){H.which=H.charCode||H.keyCode}if(!H.metaKey&&H.ctrlKey){H.metaKey=H.ctrlKey}if(!H.which&&H.button){H.which=(H.button&1?1:(H.button&2?3:(H.button&4?2:0)))}return H},proxy:function(F,E){E=E||function(){return F.apply(this,arguments)};E.guid=F.guid=F.guid||E.guid||this.guid++;return E},special:{ready:{setup:B,teardown:function(){}}},specialAll:{live:{setup:function(E,F){o.event.add(this,F[0],c)},teardown:function(G){if(G.length){var E=0,F=RegExp("(^|\\.)"+G[0]+"(\\.|$)");o.each((o.data(this,"events").live||{}),function(){if(F.test(this.type)){E++}});if(E<1){o.event.remove(this,G[0],c)}}}}}};o.Event=function(E){if(!this.preventDefault){return new o.Event(E)}if(E&&E.type){this.originalEvent=E;this.type=E.type}else{this.type=E}this.timeStamp=e();this[h]=true};function k(){return false}function u(){return true}o.Event.prototype={preventDefault:function(){this.isDefaultPrevented=u;var E=this.originalEvent;if(!E){return}if(E.preventDefault){E.preventDefault()}E.returnValue=false},stopPropagation:function(){this.isPropagationStopped=u;var E=this.originalEvent;if(!E){return}if(E.stopPropagation){E.stopPropagation()}E.cancelBubble=true},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=u;this.stopPropagation()},isDefaultPrevented:k,isPropagationStopped:k,isImmediatePropagationStopped:k};var a=function(F){var E=F.relatedTarget;while(E&&E!=this){try{E=E.parentNode}catch(G){E=this}}if(E!=this){F.type=F.data;o.event.handle.apply(this,arguments)}};o.each({mouseover:"mouseenter",mouseout:"mouseleave"},function(F,E){o.event.special[E]={setup:function(){o.event.add(this,F,a,E)},teardown:function(){o.event.remove(this,F,a)}}});o.fn.extend({bind:function(F,G,E){return F=="unload"?this.one(F,G,E):this.each(function(){o.event.add(this,F,E||G,E&&G)})},one:function(G,H,F){var E=o.event.proxy(F||H,function(I){o(this).unbind(I,E);return(F||H).apply(this,arguments)});return this.each(function(){o.event.add(this,G,E,F&&H)})},unbind:function(F,E){return this.each(function(){o.event.remove(this,F,E)})},trigger:function(E,F){return this.each(function(){o.event.trigger(E,F,this)})},triggerHandler:function(E,G){if(this[0]){var F=o.Event(E);F.preventDefault();F.stopPropagation();o.event.trigger(F,G,this[0]);return F.result}},toggle:function(G){var E=arguments,F=1;while(F<E.length){o.event.proxy(G,E[F++])}return this.click(o.event.proxy(G,function(H){this.lastToggle=(this.lastToggle||0)%F;H.preventDefault();return E[this.lastToggle++].apply(this,arguments)||false}))},hover:function(E,F){return this.mouseenter(E).mouseleave(F)},ready:function(E){B();if(o.isReady){E.call(document,o)}else{o.readyList.push(E)}return this},live:function(G,F){var E=o.event.proxy(F);E.guid+=this.selector+G;o(document).bind(i(G,this.selector),this.selector,E);return this},die:function(F,E){o(document).unbind(i(F,this.selector),E?{guid:E.guid+this.selector+F}:null);return this}});function c(H){var E=RegExp("(^|\\.)"+H.type+"(\\.|$)"),G=true,F=[];o.each(o.data(this,"events").live||[],function(I,J){if(E.test(J.type)){var K=o(H.target).closest(J.data)[0];if(K){F.push({elem:K,fn:J})}}});F.sort(function(J,I){return o.data(J.elem,"closest")-o.data(I.elem,"closest")});o.each(F,function(){if(this.fn.call(this.elem,H,this.fn.data)===false){return(G=false)}});return G}function i(F,E){return["live",F,E.replace(/\./g,"`").replace(/ /g,"|")].join(".")}o.extend({isReady:false,readyList:[],ready:function(){if(!o.isReady){o.isReady=true;if(o.readyList){o.each(o.readyList,function(){this.call(document,o)});o.readyList=null}o(document).triggerHandler("ready")}}});var x=false;function B(){if(x){return}x=true;if(document.addEventListener){document.addEventListener("DOMContentLoaded",function(){document.removeEventListener("DOMContentLoaded",arguments.callee,false);o.ready()},false)}else{if(document.attachEvent){document.attachEvent("onreadystatechange",function(){if(document.readyState==="complete"){document.detachEvent("onreadystatechange",arguments.callee);o.ready()}});if(document.documentElement.doScroll&&l==l.top){(function(){if(o.isReady){return}try{document.documentElement.doScroll("left")}catch(E){setTimeout(arguments.callee,0);return}o.ready()})()}}}o.event.add(l,"load",o.ready)}o.each(("blur,focus,load,resize,scroll,unload,click,dblclick,mousedown,mouseup,mousemove,mouseover,mouseout,mouseenter,mouseleave,change,select,submit,keydown,keypress,keyup,error").split(","),function(F,E){o.fn[E]=function(G){return G?this.bind(E,G):this.trigger(E)}});o(l).bind("unload",function(){for(var E in o.cache){if(E!=1&&o.cache[E].handle){o.event.remove(o.cache[E].handle.elem)}}});(function(){o.support={};var F=document.documentElement,G=document.createElement("script"),K=document.createElement("div"),J="script"+(new Date).getTime();K.style.display="none";K.innerHTML='   <link/><table></table><a href="/a" style="color:red;float:left;opacity:.5;">a</a><select><option>text</option></select><object><param/></object>';var H=K.getElementsByTagName("*"),E=K.getElementsByTagName("a")[0];if(!H||!H.length||!E){return}o.support={leadingWhitespace:K.firstChild.nodeType==3,tbody:!K.getElementsByTagName("tbody").length,objectAll:!!K.getElementsByTagName("object")[0].getElementsByTagName("*").length,htmlSerialize:!!K.getElementsByTagName("link").length,style:/red/.test(E.getAttribute("style")),hrefNormalized:E.getAttribute("href")==="/a",opacity:E.style.opacity==="0.5",cssFloat:!!E.style.cssFloat,scriptEval:false,noCloneEvent:true,boxModel:null};G.type="text/javascript";try{G.appendChild(document.createTextNode("window."+J+"=1;"))}catch(I){}F.insertBefore(G,F.firstChild);if(l[J]){o.support.scriptEval=true;delete l[J]}F.removeChild(G);if(K.attachEvent&&K.fireEvent){K.attachEvent("onclick",function(){o.support.noCloneEvent=false;K.detachEvent("onclick",arguments.callee)});K.cloneNode(true).fireEvent("onclick")}o(function(){var L=document.createElement("div");L.style.width=L.style.paddingLeft="1px";document.body.appendChild(L);o.boxModel=o.support.boxModel=L.offsetWidth===2;document.body.removeChild(L).style.display="none"})})();var w=o.support.cssFloat?"cssFloat":"styleFloat";o.props={"for":"htmlFor","class":"className","float":w,cssFloat:w,styleFloat:w,readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing",rowspan:"rowSpan",tabindex:"tabIndex"};o.fn.extend({_load:o.fn.load,load:function(G,J,K){if(typeof G!=="string"){return this._load(G)}var I=G.indexOf(" ");if(I>=0){var E=G.slice(I,G.length);G=G.slice(0,I)}var H="GET";if(J){if(o.isFunction(J)){K=J;J=null}else{if(typeof J==="object"){J=o.param(J);H="POST"}}}var F=this;o.ajax({url:G,type:H,dataType:"html",data:J,complete:function(M,L){if(L=="success"||L=="notmodified"){F.html(E?o("<div/>").append(M.responseText.replace(/<script(.|\s)*?\/script>/g,"")).find(E):M.responseText)}if(K){F.each(K,[M.responseText,L,M])}}});return this},serialize:function(){return o.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?o.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||/select|textarea/i.test(this.nodeName)||/text|hidden|password|search/i.test(this.type))}).map(function(E,F){var G=o(this).val();return G==null?null:o.isArray(G)?o.map(G,function(I,H){return{name:F.name,value:I}}):{name:F.name,value:G}}).get()}});o.each("ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess,ajaxSend".split(","),function(E,F){o.fn[F]=function(G){return this.bind(F,G)}});var r=e();o.extend({get:function(E,G,H,F){if(o.isFunction(G)){H=G;G=null}return o.ajax({type:"GET",url:E,data:G,success:H,dataType:F})},getScript:function(E,F){return o.get(E,null,F,"script")},getJSON:function(E,F,G){return o.get(E,F,G,"json")},post:function(E,G,H,F){if(o.isFunction(G)){H=G;G={}}return o.ajax({type:"POST",url:E,data:G,success:H,dataType:F})},ajaxSetup:function(E){o.extend(o.ajaxSettings,E)},ajaxSettings:{url:location.href,global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,xhr:function(){return l.ActiveXObject?new ActiveXObject("Microsoft.XMLHTTP"):new XMLHttpRequest()},accepts:{xml:"application/xml, text/xml",html:"text/html",script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},lastModified:{},ajax:function(M){M=o.extend(true,M,o.extend(true,{},o.ajaxSettings,M));var W,F=/=\?(&|$)/g,R,V,G=M.type.toUpperCase();if(M.data&&M.processData&&typeof M.data!=="string"){M.data=o.param(M.data)}if(M.dataType=="jsonp"){if(G=="GET"){if(!M.url.match(F)){M.url+=(M.url.match(/\?/)?"&":"?")+(M.jsonp||"callback")+"=?"}}else{if(!M.data||!M.data.match(F)){M.data=(M.data?M.data+"&":"")+(M.jsonp||"callback")+"=?"}}M.dataType="json"}if(M.dataType=="json"&&(M.data&&M.data.match(F)||M.url.match(F))){W="jsonp"+r++;if(M.data){M.data=(M.data+"").replace(F,"="+W+"$1")}M.url=M.url.replace(F,"="+W+"$1");M.dataType="script";l[W]=function(X){V=X;I();L();l[W]=g;try{delete l[W]}catch(Y){}if(H){H.removeChild(T)}}}if(M.dataType=="script"&&M.cache==null){M.cache=false}if(M.cache===false&&G=="GET"){var E=e();var U=M.url.replace(/(\?|&)_=.*?(&|$)/,"$1_="+E+"$2");M.url=U+((U==M.url)?(M.url.match(/\?/)?"&":"?")+"_="+E:"")}if(M.data&&G=="GET"){M.url+=(M.url.match(/\?/)?"&":"?")+M.data;M.data=null}if(M.global&&!o.active++){o.event.trigger("ajaxStart")}var Q=/^(\w+:)?\/\/([^\/?#]+)/.exec(M.url);if(M.dataType=="script"&&G=="GET"&&Q&&(Q[1]&&Q[1]!=location.protocol||Q[2]!=location.host)){var H=document.getElementsByTagName("head")[0];var T=document.createElement("script");T.src=M.url;if(M.scriptCharset){T.charset=M.scriptCharset}if(!W){var O=false;T.onload=T.onreadystatechange=function(){if(!O&&(!this.readyState||this.readyState=="loaded"||this.readyState=="complete")){O=true;I();L();T.onload=T.onreadystatechange=null;H.removeChild(T)}}}H.appendChild(T);return g}var K=false;var J=M.xhr();if(M.username){J.open(G,M.url,M.async,M.username,M.password)}else{J.open(G,M.url,M.async)}try{if(M.data){J.setRequestHeader("Content-Type",M.contentType)}if(M.ifModified){J.setRequestHeader("If-Modified-Since",o.lastModified[M.url]||"Thu, 01 Jan 1970 00:00:00 GMT")}J.setRequestHeader("X-Requested-With","XMLHttpRequest");J.setRequestHeader("Accept",M.dataType&&M.accepts[M.dataType]?M.accepts[M.dataType]+", */*":M.accepts._default)}catch(S){}if(M.beforeSend&&M.beforeSend(J,M)===false){if(M.global&&!--o.active){o.event.trigger("ajaxStop")}J.abort();return false}if(M.global){o.event.trigger("ajaxSend",[J,M])}var N=function(X){if(J.readyState==0){if(P){clearInterval(P);P=null;if(M.global&&!--o.active){o.event.trigger("ajaxStop")}}}else{if(!K&&J&&(J.readyState==4||X=="timeout")){K=true;if(P){clearInterval(P);P=null}R=X=="timeout"?"timeout":!o.httpSuccess(J)?"error":M.ifModified&&o.httpNotModified(J,M.url)?"notmodified":"success";if(R=="success"){try{V=o.httpData(J,M.dataType,M)}catch(Z){R="parsererror"}}if(R=="success"){var Y;try{Y=J.getResponseHeader("Last-Modified")}catch(Z){}if(M.ifModified&&Y){o.lastModified[M.url]=Y}if(!W){I()}}else{o.handleError(M,J,R)}L();if(X){J.abort()}if(M.async){J=null}}}};if(M.async){var P=setInterval(N,13);if(M.timeout>0){setTimeout(function(){if(J&&!K){N("timeout")}},M.timeout)}}try{J.send(M.data)}catch(S){o.handleError(M,J,null,S)}if(!M.async){N()}function I(){if(M.success){M.success(V,R)}if(M.global){o.event.trigger("ajaxSuccess",[J,M])}}function L(){if(M.complete){M.complete(J,R)}if(M.global){o.event.trigger("ajaxComplete",[J,M])}if(M.global&&!--o.active){o.event.trigger("ajaxStop")}}return J},handleError:function(F,H,E,G){if(F.error){F.error(H,E,G)}if(F.global){o.event.trigger("ajaxError",[H,F,G])}},active:0,httpSuccess:function(F){try{return !F.status&&location.protocol=="file:"||(F.status>=200&&F.status<300)||F.status==304||F.status==1223}catch(E){}return false},httpNotModified:function(G,E){try{var H=G.getResponseHeader("Last-Modified");return G.status==304||H==o.lastModified[E]}catch(F){}return false},httpData:function(J,H,G){var F=J.getResponseHeader("content-type"),E=H=="xml"||!H&&F&&F.indexOf("xml")>=0,I=E?J.responseXML:J.responseText;if(E&&I.documentElement.tagName=="parsererror"){throw"parsererror"}if(G&&G.dataFilter){I=G.dataFilter(I,H)}if(typeof I==="string"){if(H=="script"){o.globalEval(I)}if(H=="json"){I=l["eval"]("("+I+")")}}return I},param:function(E){var G=[];function H(I,J){G[G.length]=encodeURIComponent(I)+"="+encodeURIComponent(J)}if(o.isArray(E)||E.jquery){o.each(E,function(){H(this.name,this.value)})}else{for(var F in E){if(o.isArray(E[F])){o.each(E[F],function(){H(F,this)})}else{H(F,o.isFunction(E[F])?E[F]():E[F])}}}return G.join("&").replace(/%20/g,"+")}});var m={},n,d=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];function t(F,E){var G={};o.each(d.concat.apply([],d.slice(0,E)),function(){G[this]=F});return G}o.fn.extend({show:function(J,L){if(J){return this.animate(t("show",3),J,L)}else{for(var H=0,F=this.length;H<F;H++){var E=o.data(this[H],"olddisplay");this[H].style.display=E||"";if(o.css(this[H],"display")==="none"){var G=this[H].tagName,K;if(m[G]){K=m[G]}else{var I=o("<"+G+" />").appendTo("body");K=I.css("display");if(K==="none"){K="block"}I.remove();m[G]=K}o.data(this[H],"olddisplay",K)}}for(var H=0,F=this.length;H<F;H++){this[H].style.display=o.data(this[H],"olddisplay")||""}return this}},hide:function(H,I){if(H){return this.animate(t("hide",3),H,I)}else{for(var G=0,F=this.length;G<F;G++){var E=o.data(this[G],"olddisplay");if(!E&&E!=="none"){o.data(this[G],"olddisplay",o.css(this[G],"display"))}}for(var G=0,F=this.length;G<F;G++){this[G].style.display="none"}return this}},_toggle:o.fn.toggle,toggle:function(G,F){var E=typeof G==="boolean";return o.isFunction(G)&&o.isFunction(F)?this._toggle.apply(this,arguments):G==null||E?this.each(function(){var H=E?G:o(this).is(":hidden");o(this)[H?"show":"hide"]()}):this.animate(t("toggle",3),G,F)},fadeTo:function(E,G,F){return this.animate({opacity:G},E,F)},animate:function(I,F,H,G){var E=o.speed(F,H,G);return this[E.queue===false?"each":"queue"](function(){var K=o.extend({},E),M,L=this.nodeType==1&&o(this).is(":hidden"),J=this;for(M in I){if(I[M]=="hide"&&L||I[M]=="show"&&!L){return K.complete.call(this)}if((M=="height"||M=="width")&&this.style){K.display=o.css(this,"display");K.overflow=this.style.overflow}}if(K.overflow!=null){this.style.overflow="hidden"}K.curAnim=o.extend({},I);o.each(I,function(O,S){var R=new o.fx(J,K,O);if(/toggle|show|hide/.test(S)){R[S=="toggle"?L?"show":"hide":S](I)}else{var Q=S.toString().match(/^([+-]=)?([\d+-.]+)(.*)$/),T=R.cur(true)||0;if(Q){var N=parseFloat(Q[2]),P=Q[3]||"px";if(P!="px"){J.style[O]=(N||1)+P;T=((N||1)/R.cur(true))*T;J.style[O]=T+P}if(Q[1]){N=((Q[1]=="-="?-1:1)*N)+T}R.custom(T,N,P)}else{R.custom(T,S,"")}}});return true})},stop:function(F,E){var G=o.timers;if(F){this.queue([])}this.each(function(){for(var H=G.length-1;H>=0;H--){if(G[H].elem==this){if(E){G[H](true)}G.splice(H,1)}}});if(!E){this.dequeue()}return this}});o.each({slideDown:t("show",1),slideUp:t("hide",1),slideToggle:t("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"}},function(E,F){o.fn[E]=function(G,H){return this.animate(F,G,H)}});o.extend({speed:function(G,H,F){var E=typeof G==="object"?G:{complete:F||!F&&H||o.isFunction(G)&&G,duration:G,easing:F&&H||H&&!o.isFunction(H)&&H};E.duration=o.fx.off?0:typeof E.duration==="number"?E.duration:o.fx.speeds[E.duration]||o.fx.speeds._default;E.old=E.complete;E.complete=function(){if(E.queue!==false){o(this).dequeue()}if(o.isFunction(E.old)){E.old.call(this)}};return E},easing:{linear:function(G,H,E,F){return E+F*G},swing:function(G,H,E,F){return((-Math.cos(G*Math.PI)/2)+0.5)*F+E}},timers:[],fx:function(F,E,G){this.options=E;this.elem=F;this.prop=G;if(!E.orig){E.orig={}}}});o.fx.prototype={update:function(){if(this.options.step){this.options.step.call(this.elem,this.now,this)}(o.fx.step[this.prop]||o.fx.step._default)(this);if((this.prop=="height"||this.prop=="width")&&this.elem.style){this.elem.style.display="block"}},cur:function(F){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null)){return this.elem[this.prop]}var E=parseFloat(o.css(this.elem,this.prop,F));return E&&E>-10000?E:parseFloat(o.curCSS(this.elem,this.prop))||0},custom:function(I,H,G){this.startTime=e();this.start=I;this.end=H;this.unit=G||this.unit||"px";this.now=this.start;this.pos=this.state=0;var E=this;function F(J){return E.step(J)}F.elem=this.elem;if(F()&&o.timers.push(F)&&!n){n=setInterval(function(){var K=o.timers;for(var J=0;J<K.length;J++){if(!K[J]()){K.splice(J--,1)}}if(!K.length){clearInterval(n);n=g}},13)}},show:function(){this.options.orig[this.prop]=o.attr(this.elem.style,this.prop);this.options.show=true;this.custom(this.prop=="width"||this.prop=="height"?1:0,this.cur());o(this.elem).show()},hide:function(){this.options.orig[this.prop]=o.attr(this.elem.style,this.prop);this.options.hide=true;this.custom(this.cur(),0)},step:function(H){var G=e();if(H||G>=this.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;var E=true;for(var F in this.options.curAnim){if(this.options.curAnim[F]!==true){E=false}}if(E){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;this.elem.style.display=this.options.display;if(o.css(this.elem,"display")=="none"){this.elem.style.display="block"}}if(this.options.hide){o(this.elem).hide()}if(this.options.hide||this.options.show){for(var I in this.options.curAnim){o.attr(this.elem.style,I,this.options.orig[I])}}this.options.complete.call(this.elem)}return false}else{var J=G-this.startTime;this.state=J/this.options.duration;this.pos=o.easing[this.options.easing||(o.easing.swing?"swing":"linear")](this.state,J,0,1,this.options.duration);this.now=this.start+((this.end-this.start)*this.pos);this.update()}return true}};o.extend(o.fx,{speeds:{slow:600,fast:200,_default:400},step:{opacity:function(E){o.attr(E.elem.style,"opacity",E.now)},_default:function(E){if(E.elem.style&&E.elem.style[E.prop]!=null){E.elem.style[E.prop]=E.now+E.unit}else{E.elem[E.prop]=E.now}}}});if(document.documentElement.getBoundingClientRect){o.fn.offset=function(){if(!this[0]){return{top:0,left:0}}if(this[0]===this[0].ownerDocument.body){return o.offset.bodyOffset(this[0])}var G=this[0].getBoundingClientRect(),J=this[0].ownerDocument,F=J.body,E=J.documentElement,L=E.clientTop||F.clientTop||0,K=E.clientLeft||F.clientLeft||0,I=G.top+(self.pageYOffset||o.boxModel&&E.scrollTop||F.scrollTop)-L,H=G.left+(self.pageXOffset||o.boxModel&&E.scrollLeft||F.scrollLeft)-K;return{top:I,left:H}}}else{o.fn.offset=function(){if(!this[0]){return{top:0,left:0}}if(this[0]===this[0].ownerDocument.body){return o.offset.bodyOffset(this[0])}o.offset.initialized||o.offset.initialize();var J=this[0],G=J.offsetParent,F=J,O=J.ownerDocument,M,H=O.documentElement,K=O.body,L=O.defaultView,E=L.getComputedStyle(J,null),N=J.offsetTop,I=J.offsetLeft;while((J=J.parentNode)&&J!==K&&J!==H){M=L.getComputedStyle(J,null);N-=J.scrollTop,I-=J.scrollLeft;if(J===G){N+=J.offsetTop,I+=J.offsetLeft;if(o.offset.doesNotAddBorder&&!(o.offset.doesAddBorderForTableAndCells&&/^t(able|d|h)$/i.test(J.tagName))){N+=parseInt(M.borderTopWidth,10)||0,I+=parseInt(M.borderLeftWidth,10)||0}F=G,G=J.offsetParent}if(o.offset.subtractsBorderForOverflowNotVisible&&M.overflow!=="visible"){N+=parseInt(M.borderTopWidth,10)||0,I+=parseInt(M.borderLeftWidth,10)||0}E=M}if(E.position==="relative"||E.position==="static"){N+=K.offsetTop,I+=K.offsetLeft}if(E.position==="fixed"){N+=Math.max(H.scrollTop,K.scrollTop),I+=Math.max(H.scrollLeft,K.scrollLeft)}return{top:N,left:I}}}o.offset={initialize:function(){if(this.initialized){return}var L=document.body,F=document.createElement("div"),H,G,N,I,M,E,J=L.style.marginTop,K='<div style="position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;"><div></div></div><table style="position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;" cellpadding="0" cellspacing="0"><tr><td></td></tr></table>';M={position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"};for(E in M){F.style[E]=M[E]}F.innerHTML=K;L.insertBefore(F,L.firstChild);H=F.firstChild,G=H.firstChild,I=H.nextSibling.firstChild.firstChild;this.doesNotAddBorder=(G.offsetTop!==5);this.doesAddBorderForTableAndCells=(I.offsetTop===5);H.style.overflow="hidden",H.style.position="relative";this.subtractsBorderForOverflowNotVisible=(G.offsetTop===-5);L.style.marginTop="1px";this.doesNotIncludeMarginInBodyOffset=(L.offsetTop===0);L.style.marginTop=J;L.removeChild(F);this.initialized=true},bodyOffset:function(E){o.offset.initialized||o.offset.initialize();var G=E.offsetTop,F=E.offsetLeft;if(o.offset.doesNotIncludeMarginInBodyOffset){G+=parseInt(o.curCSS(E,"marginTop",true),10)||0,F+=parseInt(o.curCSS(E,"marginLeft",true),10)||0}return{top:G,left:F}}};o.fn.extend({position:function(){var I=0,H=0,F;if(this[0]){var G=this.offsetParent(),J=this.offset(),E=/^body|html$/i.test(G[0].tagName)?{top:0,left:0}:G.offset();J.top-=j(this,"marginTop");J.left-=j(this,"marginLeft");E.top+=j(G,"borderTopWidth");E.left+=j(G,"borderLeftWidth");F={top:J.top-E.top,left:J.left-E.left}}return F},offsetParent:function(){var E=this[0].offsetParent||document.body;while(E&&(!/^body|html$/i.test(E.tagName)&&o.css(E,"position")=="static")){E=E.offsetParent}return o(E)}});o.each(["Left","Top"],function(F,E){var G="scroll"+E;o.fn[G]=function(H){if(!this[0]){return null}return H!==g?this.each(function(){this==l||this==document?l.scrollTo(!F?H:o(l).scrollLeft(),F?H:o(l).scrollTop()):this[G]=H}):this[0]==l||this[0]==document?self[F?"pageYOffset":"pageXOffset"]||o.boxModel&&document.documentElement[G]||document.body[G]:this[0][G]}});o.each(["Height","Width"],function(I,G){var E=I?"Left":"Top",H=I?"Right":"Bottom",F=G.toLowerCase();o.fn["inner"+G]=function(){return this[0]?o.css(this[0],F,false,"padding"):null};o.fn["outer"+G]=function(K){return this[0]?o.css(this[0],F,false,K?"margin":"border"):null};var J=G.toLowerCase();o.fn[J]=function(K){return this[0]==l?document.compatMode=="CSS1Compat"&&document.documentElement["client"+G]||document.body["client"+G]:this[0]==document?Math.max(document.documentElement["client"+G],document.body["scroll"+G],document.documentElement["scroll"+G],document.body["offset"+G],document.documentElement["offset"+G]):K===g?(this.length?o.css(this[0],J):null):this.css(J,typeof K==="string"?K:K+"px")}})})();
/*
 * jQuery UI Accordion 1.6
 * 
 * Copyright (c) 2007 Jrn Zaefferer
 *
 * http://docs.jquery.com/UI/Accordion
 *
 * Dual licensed under the MIT and GPL licenses:
 *   http://www.opensource.org/licenses/mit-license.php
 *   http://www.gnu.org/licenses/gpl.html
 *
 * Revision: $Id: jquery.accordion.js 4876 2008-03-08 11:49:04Z joern.zaefferer $
 *
 */

;(function($) {

// If the UI scope is not available, add it
$.ui = $.ui || {};

$.fn.extend({
  accordion: function(options, data) {
    var args = Array.prototype.slice.call(arguments, 1);

    return this.each(function() {
      if (typeof options == "string") {
        var accordion = $.data(this, "ui-accordion");
        accordion[options].apply(accordion, args);
      // INIT with optional options
      } else if (!$(this).is(".ui-accordion"))
        $.data(this, "ui-accordion", new $.ui.accordion(this, options));
    });
  },
  // deprecated, use accordion("activate", index) instead
  activate: function(index) {
    return this.accordion("activate", index);
  }
});

$.ui.accordion = function(container, options) {

  // setup configuration
  this.options = options = $.extend({}, $.ui.accordion.defaults, options);
  this.element = container;

  $(container).addClass("ui-accordion");

  if ( options.navigation ) {
    var current = $(container).find("a").filter(options.navigationFilter);
    if ( current.length ) {
      if ( current.filter(options.header).length ) {
        options.active = current;
      } else {
        options.active = current.parent().parent().prev();
        current.addClass("current");
      }
    }
  }

  // calculate active if not specified, using the first header
  options.headers = $(container).find(options.header);
  options.active = findActive(options.headers, options.active);

  if ( options.fillSpace ) {
    var maxHeight = $(container).parent().height();
    options.headers.each(function() {
      maxHeight -= $(this).outerHeight();
    });
    var maxPadding = 0;
    options.headers.next().each(function() {
      maxPadding = Math.max(maxPadding, $(this).innerHeight() - $(this).height());
    }).height(maxHeight - maxPadding);
  } else if ( options.autoheight ) {
    var maxHeight = 0;
    options.headers.next().each(function() {
      maxHeight = Math.max(maxHeight, $(this).outerHeight());
    }).height(maxHeight);
  }

  options.headers
    .not(options.active || "")
    .next()
    .hide();
  options.active.parent().andSelf().addClass(options.selectedClass);

  if (options.event)
    $(container).bind((options.event) + ".ui-accordion", clickHandler);
};

$.ui.accordion.prototype = {
  activate: function(index) {
    // call clickHandler with custom event
    clickHandler.call(this.element, {
      target: findActive( this.options.headers, index )[0]
    });
  },

  enable: function() {
    this.options.disabled = false;
  },
  disable: function() {
    this.options.disabled = true;
  },
  destroy: function() {
    this.options.headers.next().css("display", "");
    if ( this.options.fillSpace || this.options.autoheight ) {
      this.options.headers.next().css("height", "");
    }
    $.removeData(this.element, "ui-accordion");
    $(this.element).removeClass("ui-accordion").unbind(".ui-accordion");
  }
}

function scopeCallback(callback, scope) {
  return function() {
    return callback.apply(scope, arguments);
  };
}

function completed(cancel) {
  // if removed while animated data can be empty
  if (!$.data(this, "ui-accordion"))
    return;
  var instance = $.data(this, "ui-accordion");
  var options = instance.options;
  options.running = cancel ? 0 : --options.running;
  if ( options.running )
    return;
  if ( options.clearStyle ) {
    options.toShow.add(options.toHide).css({
      height: "",
      overflow: ""
    });
  }
  $(this).triggerHandler("change.ui-accordion", [options.data], options.change);
}

function toggle(toShow, toHide, data, clickedActive, down) {
  var options = $.data(this, "ui-accordion").options;
  options.toShow = toShow;
  options.toHide = toHide;
  options.data = data;
  var complete = scopeCallback(completed, this);

  // count elements to animate
  options.running = toHide.size() == 0 ? toShow.size() : toHide.size();

  if ( options.animated ) {
    if ( !options.alwaysOpen && clickedActive ) {
      $.ui.accordion.animations[options.animated]({
        toShow: jQuery([]),
        toHide: toHide,
        complete: complete,
        down: down,
        autoheight: options.autoheight
      });
    } else {
      $.ui.accordion.animations[options.animated]({
        toShow: toShow,
        toHide: toHide,
        complete: complete,
        down: down,
        autoheight: options.autoheight
      });
    }
  } else {
    if ( !options.alwaysOpen && clickedActive ) {
      toShow.toggle();
    } else {
      toHide.hide();
      toShow.show();
    }
    complete(true);
  }
}

function clickHandler(event) {
  var options = $.data(this, "ui-accordion").options;
  if (options.disabled)
    return false;

  // called only when using activate(false) to close all parts programmatically
  if ( !event.target && !options.alwaysOpen ) {
    options.active.parent().andSelf().toggleClass(options.selectedClass);
    var toHide = options.active.next(),
      data = {
        instance: this,
        options: options,
        newHeader: jQuery([]),
        oldHeader: options.active,
        newContent: jQuery([]),
        oldContent: toHide
      },
      toShow = options.active = $([]);
    toggle.call(this, toShow, toHide, data );
    return false;
  }
  // get the click target
  var clicked = $(event.target);

  // due to the event delegation model, we have to check if one
  // of the parent elements is our actual header, and find that
  if ( clicked.parents(options.header).length )
    while ( !clicked.is(options.header) )
      clicked = clicked.parent();

  var clickedActive = clicked[0] == options.active[0];

  // if animations are still active, or the active header is the target, ignore click
  if (options.running || (options.alwaysOpen && clickedActive))
    return false;
  if (!clicked.is(options.header))
    return;

  // switch classes
  options.active.parent().andSelf().toggleClass(options.selectedClass);
  if ( !clickedActive ) {
    clicked.parent().andSelf().addClass(options.selectedClass);
  }

  // find elements to show and hide
  var toShow = clicked.next(),
    toHide = options.active.next(),
    //data = [clicked, options.active, toShow, toHide],
    data = {
      instance: this,
      options: options,
      newHeader: clicked,
      oldHeader: options.active,
      newContent: toShow,
      oldContent: toHide
    },
    down = options.headers.index( options.active[0] ) > options.headers.index( clicked[0] );

  options.active = clickedActive ? $([]) : clicked;
  toggle.call(this, toShow, toHide, data, clickedActive, down );

  return false;
};

function findActive(headers, selector) {
  return selector != undefined
    ? typeof selector == "number"
      ? headers.filter(":eq(" + selector + ")")
      : headers.not(headers.not(selector))
    : selector === false
      ? $([])
      : headers.filter(":eq(0)");
}

$.extend($.ui.accordion, {
  defaults: {
    selectedClass: "selected",
    alwaysOpen: true,
    animated: 'slide',
    event: "click",
    header: "a",
    autoheight: true,
    running: 0,
    navigationFilter: function() {
      return this.href.toLowerCase() == location.href.toLowerCase();
    }
  },
  animations: {
    slide: function(options, additions) {
      options = $.extend({
        easing: "swing",
        duration: 300
      }, options, additions);
      if ( !options.toHide.size() ) {
        options.toShow.animate({height: "show"}, options);
        return;
      }
      var hideHeight = options.toHide.height(),
        showHeight = options.toShow.height(),
        difference = showHeight / hideHeight;
      options.toShow.css({ height: 0, overflow: 'hidden' }).show();
      options.toHide.filter(":hidden").each(options.complete).end().filter(":visible").animate({height:"hide"},{
        step: function(now) {
          var current = (hideHeight - now) * difference;
          if ($.browser.msie || $.browser.opera) {
            current = Math.ceil(current);
          }
          options.toShow.height( current );
        },
        duration: options.duration,
        easing: options.easing,
        complete: function() {
          if ( !options.autoheight ) {
            options.toShow.css("height", "auto");
          }
          options.complete();
        }
      });
    },
    bounceslide: function(options) {
      this.slide(options, {
        easing: options.down ? "bounceout" : "swing",
        duration: options.down ? 1000 : 200
      });
    },
    easeslide: function(options) {
      this.slide(options, {
        easing: "easeinout",
        duration: 700
      })
    }
  }
});

})(jQuery);

(function($){$.fn.jCarouselLite=function(o){o=$.extend({btnPrev:null,btnNext:null,btnGo:null,mouseWheel:false,auto:null,speed:200,easing:null,vertical:false,circular:true,visible:3,start:0,scroll:1,beforeStart:null,afterEnd:null},o||{});return this.each(function(){var b=false,animCss=o.vertical?"top":"left",sizeCss=o.vertical?"height":"width";var c=$(this),ul=$("ul",c),tLi=$("li",ul),tl=tLi.size(),v=o.visible;if(o.circular){ul.prepend(tLi.slice(tl-v-1+1).clone()).append(tLi.slice(0,v).clone());o.start+=v}var f=$("li",ul),itemLength=f.size(),curr=o.start;c.css("visibility","visible");f.css({overflow:"hidden",float:o.vertical?"none":"left"});ul.css({margin:"0",padding:"0",position:"relative","list-style-type":"none","z-index":"1"});c.css({overflow:"hidden",position:"relative","z-index":"2",left:"0px"});var g=o.vertical?height(f):width(f);var h=g*itemLength;var j=g*v;f.css({width:f.width(),height:f.height()});ul.css(sizeCss,h+"px").css(animCss,-(curr*g));c.css(sizeCss,j+"px");if(o.btnPrev)$(o.btnPrev).click(function(){return go(curr-o.scroll)});if(o.btnNext)$(o.btnNext).click(function(){return go(curr+o.scroll)});if(o.btnGo)$.each(o.btnGo,function(i,a){$(a).click(function(){return go(o.circular?o.visible+i:i)})});if(o.mouseWheel&&c.mousewheel)c.mousewheel(function(e,d){return d>0?go(curr-o.scroll):go(curr+o.scroll)});if(o.auto)setInterval(function(){go(curr+o.scroll)},o.auto+o.speed);function vis(){return f.slice(curr).slice(0,v)};function go(a){if(!b){if(o.beforeStart)o.beforeStart.call(this,vis());if(o.circular){if(a<=o.start-v-1){ul.css(animCss,-((itemLength-(v*2))*g)+"px");curr=a==o.start-v-1?itemLength-(v*2)-1:itemLength-(v*2)-o.scroll}else if(a>=itemLength-v+1){ul.css(animCss,-((v)*g)+"px");curr=a==itemLength-v+1?v+1:v+o.scroll}else curr=a}else{if(a<0||a>itemLength-v)return;else curr=a}b=true;ul.animate(animCss=="left"?{left:-(curr*g)}:{top:-(curr*g)},o.speed,o.easing,function(){if(o.afterEnd)o.afterEnd.call(this,vis());b=false});if(!o.circular){$(o.btnPrev+","+o.btnNext).removeClass("disabled");$((curr-o.scroll<0&&o.btnPrev)||(curr+o.scroll>itemLength-v&&o.btnNext)||[]).addClass("disabled")}}return false}})};function css(a,b){return parseInt($.css(a[0],b))||0};function width(a){return a[0].offsetWidth+css(a,'marginLeft')+css(a,'marginRight')};function height(a){return a[0].offsetHeight+css(a,'marginTop')+css(a,'marginBottom')}})(jQuery);

/*
 * jQuery validation plug-in 1.5.1
 *
 * http://bassistance.de/jquery-plugins/jquery-plugin-validation/
 * http://docs.jquery.com/Plugins/Validation
 *
 * Copyright (c) 2006 - 2008 Jï¿½rn Zaefferer
 *
 * $Id: jquery.validate.js 6096 2009-01-12 14:12:04Z joern.zaefferer $
 *
 * Dual licensed under the MIT and GPL licenses:
 *   http://www.opensource.org/licenses/mit-license.php
 *   http://www.gnu.org/licenses/gpl.html
 */

(function($) {

$.extend($.fn, {
  // http://docs.jquery.com/Plugins/Validation/validate
  validate: function( options ) {

    // if nothing is selected, return nothing; can't chain anyway
    if (!this.length) {
      options && options.debug && window.console && console.warn( "nothing selected, can't validate, returning nothing" );
      return;
    }

    // check if a validator for this form was already created
    var validator = $.data(this[0], 'validator');
    if ( validator ) {
      return validator;
    }

    validator = new $.validator( options, this[0] );
    $.data(this[0], 'validator', validator); 

    if ( validator.settings.onsubmit ) {

      // allow suppresing validation by adding a cancel class to the submit button
      this.find("input, button").filter(".cancel").click(function() {
        validator.cancelSubmit = true;
      });

      // validate the form on submit
      this.submit( function( event ) {
        if ( validator.settings.debug )
          // prevent form submit to be able to see console output
          event.preventDefault();

        function handle() {
          if ( validator.settings.submitHandler ) {
            validator.settings.submitHandler.call( validator, validator.currentForm );
            return false;
          }
          return true;
        }

        // prevent submit for invalid forms or custom submit handlers
        if ( validator.cancelSubmit ) {
          validator.cancelSubmit = false;
          return handle();
        }
        if ( validator.form() ) {
          if ( validator.pendingRequest ) {
            validator.formSubmitted = true;
            return false;
          }
          return handle();
        } else {
          validator.focusInvalid();
          return false;
        }
      });
    }

    return validator;
  },
  // http://docs.jquery.com/Plugins/Validation/valid
  valid: function() {
        if ( $(this[0]).is('form')) {
            return this.validate().form();
        } else {
            var valid = false;
            var validator = $(this[0].form).validate();
            this.each(function() {
        valid |= validator.element(this);
            });
            return valid;
        }
    },
  // attributes: space seperated list of attributes to retrieve and remove
  removeAttrs: function(attributes) {
    var result = {},
      $element = this;
    $.each(attributes.split(/\s/), function(index, value) {
      result[value] = $element.attr(value);
      $element.removeAttr(value);
    });
    return result;
  },
  // http://docs.jquery.com/Plugins/Validation/rules
  rules: function(command, argument) {
    var element = this[0];

    if (command) {
      var settings = $.data(element.form, 'validator').settings;
      var staticRules = settings.rules;
      var existingRules = $.validator.staticRules(element);
      switch(command) {
      case "add":
        $.extend(existingRules, $.validator.normalizeRule(argument));
        staticRules[element.name] = existingRules;
        if (argument.messages)
          settings.messages[element.name] = $.extend( settings.messages[element.name], argument.messages );
        break;
      case "remove":
        if (!argument) {
          delete staticRules[element.name];
          return existingRules;
        }
        var filtered = {};
        $.each(argument.split(/\s/), function(index, method) {
          filtered[method] = existingRules[method];
          delete existingRules[method];
        });
        return filtered;
      }
    }

    var data = $.validator.normalizeRules(
    $.extend(
      {},
      $.validator.metadataRules(element),
      $.validator.classRules(element),
      $.validator.attributeRules(element),
      $.validator.staticRules(element)
    ), element);

    // make sure required is at front
    if (data.required) {
      var param = data.required;
      delete data.required;
      data = $.extend({required: param}, data);
    }

    return data;
  }
});

// Custom selectors
$.extend($.expr[":"], {
  // http://docs.jquery.com/Plugins/Validation/blank
  blank: function(a) {return !$.trim(a.value);},
  // http://docs.jquery.com/Plugins/Validation/filled
  filled: function(a) {return !!$.trim(a.value);},
  // http://docs.jquery.com/Plugins/Validation/unchecked
  unchecked: function(a) {return !a.checked;}
});


$.format = function(source, params) {
  if ( arguments.length == 1 ) 
    return function() {
      var args = $.makeArray(arguments);
      args.unshift(source);
      return $.format.apply( this, args );
    };
  if ( arguments.length > 2 && params.constructor != Array  ) {
    params = $.makeArray(arguments).slice(1);
  }
  if ( params.constructor != Array ) {
    params = [ params ];
  }
  $.each(params, function(i, n) {
    source = source.replace(new RegExp("\\{" + i + "\\}", "g"), n);
  });
  return source;
};

// constructor for validator
$.validator = function( options, form ) {
  this.settings = $.extend( {}, $.validator.defaults, options );
  this.currentForm = form;
  this.init();
};

$.extend($.validator, {

  defaults: {
    messages: {},
    groups: {},
    rules: {},
    errorClass: "error",
    errorElement: "label",
    focusInvalid: true,
    errorContainer: $( [] ),
    errorLabelContainer: $( [] ),
    onsubmit: true,
    ignore: [],
    ignoreTitle: false,
    onfocusin: function(element) {
      this.lastActive = element;

      // hide error label and remove error class on focus if enabled
      if ( this.settings.focusCleanup && !this.blockFocusCleanup ) {
        this.settings.unhighlight && this.settings.unhighlight.call( this, element, this.settings.errorClass );
        this.errorsFor(element).hide();
      }
    },
    onfocusout: function(element) {
      if ( !this.checkable(element) && (element.name in this.submitted || !this.optional(element)) ) {
        this.element(element);
      }
    },
    onkeyup: function(element) {
      if ( element.name in this.submitted || element == this.lastElement ) {
        this.element(element);
      }
    },
    onclick: function(element) {
      if ( element.name in this.submitted )
        this.element(element);
    },
    highlight: function( element, errorClass ) {
      $( element ).addClass( errorClass );
    },
    unhighlight: function( element, errorClass ) {
      $( element ).removeClass( errorClass );
    }
  },

  // http://docs.jquery.com/Plugins/Validation/Validator/setDefaults
  setDefaults: function(settings) {
    $.extend( $.validator.defaults, settings );
  },

  messages: {
    required: "This field is required.",
    remote: "Please fix this field.",
    email: "Please enter a valid email address.",
    url: "Please enter a valid URL.",
    date: "Please enter a valid date.",
    dateISO: "Please enter a valid date (ISO).",
    dateDE: "Bitte geben Sie ein gï¿½ltiges Datum ein.",
    number: "Please enter a valid number.",
    numberDE: "Bitte geben Sie eine Nummer ein.",
    digits: "Please enter only digits",
    creditcard: "Please enter a valid credit card number.",
    equalTo: "Please enter the same value again.",
    accept: "Please enter a value with a valid extension.",
    maxlength: $.format("Please enter no more than {0} characters."),
    minlength: $.format("Please enter at least {0} characters."),
    rangelength: $.format("Please enter a value between {0} and {1} characters long."),
    range: $.format("Please enter a value between {0} and {1}."),
    max: $.format("Please enter a value less than or equal to {0}."),
    min: $.format("Please enter a value greater than or equal to {0}.")
  },

  autoCreateRanges: false,

  prototype: {

    init: function() {
      this.labelContainer = $(this.settings.errorLabelContainer);
      this.errorContext = this.labelContainer.length && this.labelContainer || $(this.currentForm);
      this.containers = $(this.settings.errorContainer).add( this.settings.errorLabelContainer );
      this.submitted = {};
      this.valueCache = {};
      this.pendingRequest = 0;
      this.pending = {};
      this.invalid = {};
      this.reset();

      var groups = (this.groups = {});
      $.each(this.settings.groups, function(key, value) {
        $.each(value.split(/\s/), function(index, name) {
          groups[name] = key;
        });
      });
      var rules = this.settings.rules;
      $.each(rules, function(key, value) {
        rules[key] = $.validator.normalizeRule(value);
      });

      function delegate(event) {
        var validator = $.data(this[0].form, "validator");
        validator.settings["on" + event.type] && validator.settings["on" + event.type].call(validator, this[0] );
      }
      $(this.currentForm)
        .delegate("focusin focusout keyup", ":text, :password, :file, select, textarea", delegate)
        .delegate("click", ":radio, :checkbox", delegate);

      if (this.settings.invalidHandler)
        $(this.currentForm).bind("invalid-form.validate", this.settings.invalidHandler);
    },

    // http://docs.jquery.com/Plugins/Validation/Validator/form
    form: function() {
      this.checkForm();
      $.extend(this.submitted, this.errorMap);
      this.invalid = $.extend({}, this.errorMap);
      if (!this.valid())
        $(this.currentForm).triggerHandler("invalid-form", [this]);
      this.showErrors();
      return this.valid();
    },

    checkForm: function() {
      this.prepareForm();
      for ( var i = 0, elements = (this.currentElements = this.elements()); elements[i]; i++ ) {
        this.check( elements[i] );
      }
      return this.valid(); 
    },

    // http://docs.jquery.com/Plugins/Validation/Validator/element
    element: function( element ) {
      element = this.clean( element );
      this.lastElement = element;
      this.prepareElement( element );
      this.currentElements = $(element);
      var result = this.check( element );
      if ( result ) {
        delete this.invalid[element.name];
      } else {
        this.invalid[element.name] = true;
      }
      if ( !this.numberOfInvalids() ) {
        // Hide error containers on last error
        this.toHide = this.toHide.add( this.containers );
      }
      this.showErrors();
      return result;
    },

    // http://docs.jquery.com/Plugins/Validation/Validator/showErrors
    showErrors: function(errors) {
      if(errors) {
        // add items to error list and map
        $.extend( this.errorMap, errors );
        this.errorList = [];
        for ( var name in errors ) {
          this.errorList.push({
            message: errors[name],
            element: this.findByName(name)[0]
          });
        }
        // remove items from success list
        this.successList = $.grep( this.successList, function(element) {
          return !(element.name in errors);
        });
      }
      this.settings.showErrors
        ? this.settings.showErrors.call( this, this.errorMap, this.errorList )
        : this.defaultShowErrors();
    },

    // http://docs.jquery.com/Plugins/Validation/Validator/resetForm
    resetForm: function() {
      if ( $.fn.resetForm )
        $( this.currentForm ).resetForm();
      this.submitted = {};
      this.prepareForm();
      this.hideErrors();
      this.elements().removeClass( this.settings.errorClass );
    },

    numberOfInvalids: function() {
      return this.objectLength(this.invalid);
    },

    objectLength: function( obj ) {
      var count = 0;
      for ( var i in obj )
        count++;
      return count;
    },

    hideErrors: function() {
      this.addWrapper( this.toHide ).hide();
    },

    valid: function() {
      return this.size() == 0;
    },

    size: function() {
      return this.errorList.length;
    },

    focusInvalid: function() {
      if( this.settings.focusInvalid ) {
        try {
          $(this.findLastActive() || this.errorList.length && this.errorList[0].element || []).filter(":visible").focus();
        } catch(e) {
          // ignore IE throwing errors when focusing hidden elements
        }
      }
    },

    findLastActive: function() {
      var lastActive = this.lastActive;
      return lastActive && $.grep(this.errorList, function(n) {
        return n.element.name == lastActive.name;
      }).length == 1 && lastActive;
    },

    elements: function() {
      var validator = this,
        rulesCache = {};

      // select all valid inputs inside the form (no submit or reset buttons)
      // workaround $Query([]).add until http://dev.jquery.com/ticket/2114 is solved
      return $([]).add(this.currentForm.elements)
      .filter(":input")
      .not(":submit, :reset, :image, [disabled]")
      .not( this.settings.ignore )
      .filter(function() {
        !this.name && validator.settings.debug && window.console && console.error( "%o has no name assigned", this);

        // select only the first element for each name, and only those with rules specified
        if ( this.name in rulesCache || !validator.objectLength($(this).rules()) )
          return false;

        rulesCache[this.name] = true;
        return true;
      });
    },

    clean: function( selector ) {
      return $( selector )[0];
    },

    errors: function() {
      return $( this.settings.errorElement + "." + this.settings.errorClass, this.errorContext );
    },

    reset: function() {
      this.successList = [];
      this.errorList = [];
      this.errorMap = {};
      this.toShow = $([]);
      this.toHide = $([]);
      this.formSubmitted = false;
      this.currentElements = $([]);
    },

    prepareForm: function() {
      this.reset();
      this.toHide = this.errors().add( this.containers );
    },

    prepareElement: function( element ) {
      this.reset();
      this.toHide = this.errorsFor(element);
    },

    check: function( element ) {
      element = this.clean( element );

      // if radio/checkbox, validate first element in group instead
      if (this.checkable(element)) {
        element = this.findByName( element.name )[0];
      }

      var rules = $(element).rules();
      var dependencyMismatch = false;
      for( method in rules ) {
        var rule = { method: method, parameters: rules[method] };
        try {
          var result = $.validator.methods[method].call( this, element.value, element, rule.parameters );

          // if a method indicates that the field is optional and therefore valid,
          // don't mark it as valid when there are no other rules
          if ( result == "dependency-mismatch" ) {
            dependencyMismatch = true;
            continue;
          }
          dependencyMismatch = false;

          if ( result == "pending" ) {
            this.toHide = this.toHide.not( this.errorsFor(element) );
            return;
          }

          if( !result ) {
            this.formatAndAdd( element, rule );
            return false;
          }
        } catch(e) {
          this.settings.debug && window.console && console.log("exception occured when checking element " + element.id
             + ", check the '" + rule.method + "' method");
          throw e;
        }
      }
      if (dependencyMismatch)
        return;
      if ( this.objectLength(rules) )
        this.successList.push(element);
      return true;
    },

    // return the custom message for the given element and validation method
    // specified in the element's "messages" metadata
    customMetaMessage: function(element, method) {
      if (!$.metadata)
        return;

      var meta = this.settings.meta
        ? $(element).metadata()[this.settings.meta]
        : $(element).metadata();

      return meta && meta.messages && meta.messages[method];
    },

    // return the custom message for the given element name and validation method
    customMessage: function( name, method ) {
      var m = this.settings.messages[name];
      return m && (m.constructor == String
        ? m
        : m[method]);
    },

    // return the first defined argument, allowing empty strings
    findDefined: function() {
      for(var i = 0; i < arguments.length; i++) {
        if (arguments[i] !== undefined)
          return arguments[i];
      }
      return undefined;
    },

    defaultMessage: function( element, method) {
      return this.findDefined(
        this.customMessage( element.name, method ),
        this.customMetaMessage( element, method ),
        // title is never undefined, so handle empty string as undefined
        !this.settings.ignoreTitle && element.title || undefined,
        $.validator.messages[method],
        "<strong>Warning: No message defined for " + element.name + "</strong>"
      );
    },

    formatAndAdd: function( element, rule ) {
      var message = this.defaultMessage( element, rule.method );
      if ( typeof message == "function" ) 
        message = message.call(this, rule.parameters, element);
      this.errorList.push({
        message: message,
        element: element
      });
      this.errorMap[element.name] = message;
      this.submitted[element.name] = message;
    },

    addWrapper: function(toToggle) {
      if ( this.settings.wrapper )
        toToggle = toToggle.add( toToggle.parents( this.settings.wrapper ) );
      return toToggle;
    },

    defaultShowErrors: function() {
      for ( var i = 0; this.errorList[i]; i++ ) {
        var error = this.errorList[i];
        this.settings.highlight && this.settings.highlight.call( this, error.element, this.settings.errorClass );
        this.showLabel( error.element, error.message );
      }
      if( this.errorList.length ) {
        this.toShow = this.toShow.add( this.containers );
      }
      if (this.settings.success) {
        for ( var i = 0; this.successList[i]; i++ ) {
          this.showLabel( this.successList[i] );
        }
      }
      if (this.settings.unhighlight) {
        for ( var i = 0, elements = this.validElements(); elements[i]; i++ ) {
          this.settings.unhighlight.call( this, elements[i], this.settings.errorClass );
        }
      }
      this.toHide = this.toHide.not( this.toShow );
      this.hideErrors();
      this.addWrapper( this.toShow ).show();
    },

    validElements: function() {
      return this.currentElements.not(this.invalidElements());
    },

    invalidElements: function() {
      return $(this.errorList).map(function() {
        return this.element;
      });
    },

    showLabel: function(element, message) {
      var label = this.errorsFor( element );
      if ( label.length ) {
        // refresh error/success class
        label.removeClass().addClass( this.settings.errorClass );

        // check if we have a generated label, replace the message then
        label.attr("generated") && label.html(message);
      } else {
        // create label
        label = $("<" + this.settings.errorElement + "/>")
          .attr({"for":  this.idOrName(element), generated: true})
          .addClass(this.settings.errorClass)
          .html(message || "");
        if ( this.settings.wrapper ) {
          // make sure the element is visible, even in IE
          // actually showing the wrapped element is handled elsewhere
          label = label.hide().show().wrap("<" + this.settings.wrapper + "/>").parent();
        }
        if ( !this.labelContainer.append(label).length )
          this.settings.errorPlacement
            ? this.settings.errorPlacement(label, $(element) )
            : label.insertAfter(element);
      }
      if ( !message && this.settings.success ) {
        label.text("");
        typeof this.settings.success == "string"
          ? label.addClass( this.settings.success )
          : this.settings.success( label );
      }
      this.toShow = this.toShow.add(label);
    },

    errorsFor: function(element) {
      return this.errors().filter("[for='" + this.idOrName(element) + "']");
    },

    idOrName: function(element) {
      return this.groups[element.name] || (this.checkable(element) ? element.name : element.id || element.name);
    },

    checkable: function( element ) {
      return /radio|checkbox/i.test(element.type);
    },

    findByName: function( name ) {
      // select by name and filter by form for performance over form.find("[name=...]")
      var form = this.currentForm;
      return $(document.getElementsByName(name)).map(function(index, element) {
        return element.form == form && element.name == name && element  || null;
      });
    },

    getLength: function(value, element) {
      switch( element.nodeName.toLowerCase() ) {
      case 'select':
        return $("option:selected", element).length;
      case 'input':
        if( this.checkable( element) )
          return this.findByName(element.name).filter(':checked').length;
      }
      return value.length;
    },

    depend: function(param, element) {
      return this.dependTypes[typeof param]
        ? this.dependTypes[typeof param](param, element)
        : true;
    },

    dependTypes: {
      "boolean": function(param, element) {
        return param;
      },
      "string": function(param, element) {
        return !!$(param, element.form).length;
      },
      "function": function(param, element) {
        return param(element);
      }
    },

    optional: function(element) {
      return !$.validator.methods.required.call(this, $.trim(element.value), element) && "dependency-mismatch";
    },

    startRequest: function(element) {
      if (!this.pending[element.name]) {
        this.pendingRequest++;
        this.pending[element.name] = true;
      }
    },

    stopRequest: function(element, valid) {
      this.pendingRequest--;
      // sometimes synchronization fails, make sure pendingRequest is never < 0
      if (this.pendingRequest < 0)
        this.pendingRequest = 0;
      delete this.pending[element.name];
      if ( valid && this.pendingRequest == 0 && this.formSubmitted && this.form() ) {
        $(this.currentForm).submit();
      } else if (!valid && this.pendingRequest == 0 && this.formSubmitted) {
        $(this.currentForm).triggerHandler("invalid-form", [this]);
      }
    },

    previousValue: function(element) {
      return $.data(element, "previousValue") || $.data(element, "previousValue", previous = {
        old: null,
        valid: true,
        message: this.defaultMessage( element, "remote" )
      });
    }

  },

  classRuleSettings: {
    required: {required: true},
    email: {email: true},
    url: {url: true},
    date: {date: true},
    dateISO: {dateISO: true},
    dateDE: {dateDE: true},
    number: {number: true},
    numberDE: {numberDE: true},
    digits: {digits: true},
    creditcard: {creditcard: true}
  },

  addClassRules: function(className, rules) {
    className.constructor == String ?
      this.classRuleSettings[className] = rules :
      $.extend(this.classRuleSettings, className);
  },

  classRules: function(element) {
    var rules = {};
    var classes = $(element).attr('class');
    classes && $.each(classes.split(' '), function() {
      if (this in $.validator.classRuleSettings) {
        $.extend(rules, $.validator.classRuleSettings[this]);
      }
    });
    return rules;
  },

  attributeRules: function(element) {
    var rules = {};
    var $element = $(element);

    for (method in $.validator.methods) {
      var value = $element.attr(method);
      if (value) {
        rules[method] = value;
      }
    }

    // maxlength may be returned as -1, 2147483647 (IE) and 524288 (safari) for text inputs
    if (rules.maxlength && /-1|2147483647|524288/.test(rules.maxlength)) {
      delete rules.maxlength;
    }

    return rules;
  },

  metadataRules: function(element) {
    if (!$.metadata) return {};

    var meta = $.data(element.form, 'validator').settings.meta;
    return meta ?
      $(element).metadata()[meta] :
      $(element).metadata();
  },

  staticRules: function(element) {
    var rules = {};
    var validator = $.data(element.form, 'validator');
    if (validator.settings.rules) {
      rules = $.validator.normalizeRule(validator.settings.rules[element.name]) || {};
    }
    return rules;
  },

  normalizeRules: function(rules, element) {
    // handle dependency check
    $.each(rules, function(prop, val) {
      // ignore rule when param is explicitly false, eg. required:false
      if (val === false) {
        delete rules[prop];
        return;
      }
      if (val.param || val.depends) {
        var keepRule = true;
        switch (typeof val.depends) {
          case "string":
            keepRule = !!$(val.depends, element.form).length;
            break;
          case "function":
            keepRule = val.depends.call(element, element);
            break;
        }
        if (keepRule) {
          rules[prop] = val.param !== undefined ? val.param : true;
        } else {
          delete rules[prop];
        }
      }
    });

    // evaluate parameters
    $.each(rules, function(rule, parameter) {
      rules[rule] = $.isFunction(parameter) ? parameter(element) : parameter;
    });

    // clean number parameters
    $.each(['minlength', 'maxlength', 'min', 'max'], function() {
      if (rules[this]) {
        rules[this] = Number(rules[this]);
      }
    });
    $.each(['rangelength', 'range'], function() {
      if (rules[this]) {
        rules[this] = [Number(rules[this][0]), Number(rules[this][1])];
      }
    });

    if ($.validator.autoCreateRanges) {
      // auto-create ranges
      if (rules.min && rules.max) {
        rules.range = [rules.min, rules.max];
        delete rules.min;
        delete rules.max;
      }
      if (rules.minlength && rules.maxlength) {
        rules.rangelength = [rules.minlength, rules.maxlength];
        delete rules.minlength;
        delete rules.maxlength;
      }
    }

    // To support custom messages in metadata ignore rule methods titled "messages"
    if (rules.messages) {
      delete rules.messages
    }

    return rules;
  },

  // Converts a simple string to a {string: true} rule, e.g., "required" to {required:true}
  normalizeRule: function(data) {
    if( typeof data == "string" ) {
      var transformed = {};
      $.each(data.split(/\s/), function() {
        transformed[this] = true;
      });
      data = transformed;
    }
    return data;
  },

  // http://docs.jquery.com/Plugins/Validation/Validator/addMethod
  addMethod: function(name, method, message) {
    $.validator.methods[name] = method;
    $.validator.messages[name] = message;
    if (method.length < 3) {
      $.validator.addClassRules(name, $.validator.normalizeRule(name));
    }
  },

  methods: {

    // http://docs.jquery.com/Plugins/Validation/Methods/required
    required: function(value, element, param) {
      // check if dependency is met
      if ( !this.depend(param, element) )
        return "dependency-mismatch";
      switch( element.nodeName.toLowerCase() ) {
      case 'select':
        var options = $("option:selected", element);
        return options.length > 0 && ( element.type == "select-multiple" || ($.browser.msie && !(options[0].attributes['value'].specified) ? options[0].text : options[0].value).length > 0);
      case 'input':
        if ( this.checkable(element) )
          return this.getLength(value, element) > 0;
      default:
        return $.trim(value).length > 0;
      }
    },

    // http://docs.jquery.com/Plugins/Validation/Methods/remote
    remote: function(value, element, param) {
      if ( this.optional(element) )
        return "dependency-mismatch";

      var previous = this.previousValue(element);

      if (!this.settings.messages[element.name] )
        this.settings.messages[element.name] = {};
      this.settings.messages[element.name].remote = typeof previous.message == "function" ? previous.message(value) : previous.message;

      param = typeof param == "string" && {url:param} || param; 

      if ( previous.old !== value ) {
        previous.old = value;
        var validator = this;
        this.startRequest(element);
        var data = {};
        data[element.name] = value;
        $.ajax($.extend(true, {
          url: param,
          mode: "abort",
          port: "validate" + element.name,
          dataType: "json",
          data: data,
          success: function(response) {
            if ( response ) {
              var submitted = validator.formSubmitted;
              validator.prepareElement(element);
              validator.formSubmitted = submitted;
              validator.successList.push(element);
              validator.showErrors();
            } else {
              var errors = {};
              errors[element.name] =  response || validator.defaultMessage( element, "remote" );
              validator.showErrors(errors);
            }
            previous.valid = response;
            validator.stopRequest(element, response);
          }
        }, param));
        return "pending";
      } else if( this.pending[element.name] ) {
        return "pending";
      }
      return previous.valid;
    },

    // http://docs.jquery.com/Plugins/Validation/Methods/minlength
    minlength: function(value, element, param) {
      return this.optional(element) || this.getLength($.trim(value), element) >= param;
    },

    // http://docs.jquery.com/Plugins/Validation/Methods/maxlength
    maxlength: function(value, element, param) {
      return this.optional(element) || this.getLength($.trim(value), element) <= param;
    },

    // http://docs.jquery.com/Plugins/Validation/Methods/rangelength
    rangelength: function(value, element, param) {
      var length = this.getLength($.trim(value), element);
      return this.optional(element) || ( length >= param[0] && length <= param[1] );
    },

    // http://docs.jquery.com/Plugins/Validation/Methods/min
    min: function( value, element, param ) {
      return this.optional(element) || value >= param;
    },

    // http://docs.jquery.com/Plugins/Validation/Methods/max
    max: function( value, element, param ) {
      return this.optional(element) || value <= param;
    },

    // http://docs.jquery.com/Plugins/Validation/Methods/range
    range: function( value, element, param ) {
      return this.optional(element) || ( value >= param[0] && value <= param[1] );
    },

    // http://docs.jquery.com/Plugins/Validation/Methods/email
    email: function(value, element) {
      // contributed by Scott Gonzalez: http://projects.scottsplayground.com/email_address_validation/
      return this.optional(element) || /^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$/i.test(value);
    },

    // http://docs.jquery.com/Plugins/Validation/Methods/url
    url: function(value, element) {
      // contributed by Scott Gonzalez: http://projects.scottsplayground.com/iri/
      return this.optional(element) || /^(https?|ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test(value);
    },

    // http://docs.jquery.com/Plugins/Validation/Methods/date
    date: function(value, element) {
      return this.optional(element) || !/Invalid|NaN/.test(new Date(value));
    },

    // http://docs.jquery.com/Plugins/Validation/Methods/dateISO
    dateISO: function(value, element) {
      return this.optional(element) || /^\d{4}[\/-]\d{1,2}[\/-]\d{1,2}$/.test(value);
    },

    // http://docs.jquery.com/Plugins/Validation/Methods/dateDE
    dateDE: function(value, element) {
      return this.optional(element) || /^\d\d?\.\d\d?\.\d\d\d?\d?$/.test(value);
    },

    // http://docs.jquery.com/Plugins/Validation/Methods/number
    number: function(value, element) {
      return this.optional(element) || /^-?(?:\d+|\d{1,3}(?:,\d{3})+)(?:\.\d+)?$/.test(value);
    },

    // http://docs.jquery.com/Plugins/Validation/Methods/numberDE
    numberDE: function(value, element) {
      return this.optional(element) || /^-?(?:\d+|\d{1,3}(?:\.\d{3})+)(?:,\d+)?$/.test(value);
    },

    // http://docs.jquery.com/Plugins/Validation/Methods/digits
    digits: function(value, element) {
      return this.optional(element) || /^\d+$/.test(value);
    },

    // http://docs.jquery.com/Plugins/Validation/Methods/creditcard
    // based on http://en.wikipedia.org/wiki/Luhn
    creditcard: function(value, element) {
      if ( this.optional(element) )
        return "dependency-mismatch";
      // accept only digits and dashes
      if (/[^0-9-]+/.test(value))
        return false;
      var nCheck = 0,
        nDigit = 0,
        bEven = false;

      value = value.replace(/\D/g, "");

      for (n = value.length - 1; n >= 0; n--) {
        var cDigit = value.charAt(n);
        var nDigit = parseInt(cDigit, 10);
        if (bEven) {
          if ((nDigit *= 2) > 9)
            nDigit -= 9;
        }
        nCheck += nDigit;
        bEven = !bEven;
      }

      return (nCheck % 10) == 0;
    },

    // http://docs.jquery.com/Plugins/Validation/Methods/accept
    accept: function(value, element, param) {
      param = typeof param == "string" ? param : "png|jpe?g|gif";
      return this.optional(element) || value.match(new RegExp(".(" + param + ")$", "i")); 
    },

    // http://docs.jquery.com/Plugins/Validation/Methods/equalTo
    equalTo: function(value, element, param) {
      return value == $(param).val();
    }

  }

});

})(jQuery);

// ajax mode: abort
// usage: $.ajax({ mode: "abort"[, port: "uniqueport"]});
// if mode:"abort" is used, the previous request on that port (port can be undefined) is aborted via XMLHttpRequest.abort() 
;(function($) {
  var ajax = $.ajax;
  var pendingRequests = {};
  $.ajax = function(settings) {
    // create settings for compatibility with ajaxSetup
    settings = $.extend(settings, $.extend({}, $.ajaxSettings, settings));
    var port = settings.port;
    if (settings.mode == "abort") {
      if ( pendingRequests[port] ) {
        pendingRequests[port].abort();
      }
      return (pendingRequests[port] = ajax.apply(this, arguments));
    }
    return ajax.apply(this, arguments);
  };
})(jQuery);

// provides cross-browser focusin and focusout events
// IE has native support, in other browsers, use event caputuring (neither bubbles)

// provides delegate(type: String, delegate: Selector, handler: Callback) plugin for easier event delegation
// handler is only called when $(event.target).is(delegate), in the scope of the jquery-object for event.target 

// provides triggerEvent(type: String, target: Element) to trigger delegated events
;(function($) {
  $.each({
    focus: 'focusin',
    blur: 'focusout'  
  }, function( original, fix ){
    $.event.special[fix] = {
      setup:function() {
        if ( $.browser.msie ) return false;
        this.addEventListener( original, $.event.special[fix].handler, true );
      },
      teardown:function() {
        if ( $.browser.msie ) return false;
        this.removeEventListener( original,
        $.event.special[fix].handler, true );
      },
      handler: function(e) {
        arguments[0] = $.event.fix(e);
        arguments[0].type = fix;
        return $.event.handle.apply(this, arguments);
      }
    };
  });
  $.extend($.fn, {
    delegate: function(type, delegate, handler) {
      return this.bind(type, function(event) {
        var target = $(event.target);
        if (target.is(delegate)) {
          return handler.apply(target, arguments);
        }
      });
    },
    triggerEvent: function(type, target) {
      return this.triggerHandler(type, [$.event.fix({ type: type, target: target })]);
    }
  })
})(jQuery);

/**
 * Cookie plugin
 *
 * Copyright (c) 2006 Klaus Hartl (stilbuero.de)
 * Dual licensed under the MIT and GPL licenses:
 * http://www.opensource.org/licenses/mit-license.php
 * http://www.gnu.org/licenses/gpl.html
 *
 */

/**
 * Create a cookie with the given name and value and other optional parameters.
 *
 * @example $.cookie('the_cookie', 'the_value');
 * @desc Set the value of a cookie.
 * @example $.cookie('the_cookie', 'the_value', { expires: 7, path: '/', domain: 'jquery.com', secure: true });
 * @desc Create a cookie with all available options.
 * @example $.cookie('the_cookie', 'the_value');
 * @desc Create a session cookie.
 * @example $.cookie('the_cookie', null);
 * @desc Delete a cookie by passing null as value. Keep in mind that you have to use the same path and domain
 *       used when the cookie was set.
 *
 * @param String name The name of the cookie.
 * @param String value The value of the cookie.
 * @param Object options An object literal containing key/value pairs to provide optional cookie attributes.
 * @option Number|Date expires Either an integer specifying the expiration date from now on in days or a Date object.
 *                             If a negative value is specified (e.g. a date in the past), the cookie will be deleted.
 *                             If set to null or omitted, the cookie will be a session cookie and will not be retained
 *                             when the the browser exits.
 * @option String path The value of the path atribute of the cookie (default: path of page that created the cookie).
 * @option String domain The value of the domain attribute of the cookie (default: domain of page that created the cookie).
 * @option Boolean secure If true, the secure attribute of the cookie will be set and the cookie transmission will
 *                        require a secure protocol (like HTTPS).
 * @type undefined
 *
 * @name $.cookie
 * @cat Plugins/Cookie
 * @author Klaus Hartl/klaus.hartl@stilbuero.de
 */

/**
 * Get the value of a cookie with the given name.
 *
 * @example $.cookie('the_cookie');
 * @desc Get the value of a cookie.
 *
 * @param String name The name of the cookie.
 * @return The value of the cookie.
 * @type String
 *
 * @name $.cookie
 * @cat Plugins/Cookie
 * @author Klaus Hartl/klaus.hartl@stilbuero.de
 */
jQuery.cookie = function(name, value, options) {
    if (typeof value != 'undefined') { // name and value given, set cookie
        options = options || {};
        if (value === null) {
            value = '';
            options.expires = -1;
        }
        var expires = '';
        if (options.expires && (typeof options.expires == 'number' || options.expires.toUTCString)) {
            var date;
            if (typeof options.expires == 'number') {
                date = new Date();
                date.setTime(date.getTime() + (options.expires * 24 * 60 * 60 * 1000));
            } else {
                date = options.expires;
            }
            expires = '; expires=' + date.toUTCString(); // use expires attribute, max-age is not supported by IE
        }
        // CAUTION: Needed to parenthesize options.path and options.domain
        // in the following expressions, otherwise they evaluate to undefined
        // in the packed version for some reason...
        var path = options.path ? '; path=' + (options.path) : '';
        var domain = options.domain ? '; domain=' + (options.domain) : '';
        var secure = options.secure ? '; secure' : '';
        document.cookie = [name, '=', encodeURIComponent(value), expires, path, domain, secure].join('');
    } else { // only name given, get cookie
        var cookieValue = null;
        if (document.cookie && document.cookie != '') {
            var cookies = document.cookie.split(';');
            for (var i = 0; i < cookies.length; i++) {
                var cookie = jQuery.trim(cookies[i]);
                // Does this cookie string begin with the name we want?
                if (cookie.substring(0, name.length + 1) == (name + '=')) {
                    cookieValue = decodeURIComponent(cookie.substring(name.length + 1));
                    break;
                }
            }
        }
        return cookieValue;
    }
};

/*
 * jQuery Cycle Plugin for light-weight slideshows
 * Examples and documentation at: http://malsup.com/jquery/cycle/
 * Copyright (c) 2007-2008 M. Alsup
 * Version: 2.18 (05/06/2008)
 * Dual licensed under the MIT and GPL licenses:
 * http://www.opensource.org/licenses/mit-license.php
 * http://www.gnu.org/licenses/gpl.html
 * Requires: jQuery v1.1.3.1 or later
 *
 * Based on the work of:
 *  1) Matt Oakes (http://portfolio.gizone.co.uk/applications/slideshow/)
 *  2) Torsten Baldes (http://medienfreunde.com/lab/innerfade/)
 *  3) Benjamin Sterling (http://www.benjaminsterling.com/experiments/jqShuffle/)
 */
(function($) {

var ver = '2.18';
var ie6 = $.browser.msie && /MSIE 6.0/.test(navigator.userAgent);

function log() {
    if (window.console && window.console.log)
        window.console.log('[cycle] ' + Array.prototype.join.call(arguments,''));
};

$.fn.cycle = function(options) {
    return this.each(function() {
        options = options || {};
        if (options.constructor == String) {
            switch(options) {
            case 'stop':
                if (this.cycleTimeout) clearTimeout(this.cycleTimeout);
                this.cycleTimeout = 0;
                return;
            case 'pause':
                this.cyclePause = 1;
                return;
            case 'resume':
                this.cyclePause = 0;
                return;
            default:
                options = { fx: options };
            };
        }

        // stop existing slideshow for this container (if there is one)
        if (this.cycleTimeout) clearTimeout(this.cycleTimeout);
        this.cycleTimeout = 0;
        this.cyclePause = 0;

        var $cont = $(this);
        var $slides = options.slideExpr ? $(options.slideExpr, this) : $cont.children();
        var els = $slides.get();
        if (els.length < 2) {
            log('terminating; too few slides: ' + els.length);
            return; // don't bother
        }

        // support metadata plugin (v1.0 and v2.0)
        var opts = $.extend({}, $.fn.cycle.defaults, options || {}, $.metadata ? $cont.metadata() : $.meta ? $cont.data() : {});
        if (opts.autostop) 
            opts.countdown = opts.autostopCount || els.length;

        opts.before = opts.before ? [opts.before] : [];
        opts.after = opts.after ? [opts.after] : [];
        opts.after.unshift(function(){ opts.busy=0; });
        if (opts.continuous)
            opts.after.push(function() { go(els,opts,0,!opts.rev); });

        // clearType corrections
        if (ie6 && opts.cleartype && !opts.cleartypeNoBg)
            clearTypeFix($slides);

        // allow shorthand overrides of width, height and timeout
        var cls = this.className;
        opts.width = parseInt((cls.match(/w:(\d+)/)||[])[1]) || opts.width;
        opts.height = parseInt((cls.match(/h:(\d+)/)||[])[1]) || opts.height;
        opts.timeout = parseInt((cls.match(/t:(\d+)/)||[])[1]) || opts.timeout;

        if ($cont.css('position') == 'static') 
            $cont.css('position', 'relative');
        if (opts.width) 
            $cont.width(opts.width);
        if (opts.height && opts.height != 'auto') 
            $cont.height(opts.height);

        if (opts.random) {
            opts.randomMap = [];
            for (var i = 0; i < els.length; i++) 
                opts.randomMap.push(i);
            opts.randomMap.sort(function(a,b) {return Math.random() - 0.5;});
            opts.randomIndex = 0;
            opts.startingSlide = opts.randomMap[0];
        }
        else if (opts.startingSlide >= els.length)
            opts.startingSlide = 0; // catch bogus input
        var first = opts.startingSlide || 0;
        $slides.css({position: 'absolute', top:0, left:0}).hide().each(function(i) { 
            var z = first ? i >= first ? els.length - (i-first) : first-i : els.length-i;
            $(this).css('z-index', z) 
        });

        $(els[first]).css('opacity',1).show(); // opacity bit needed to handle reinit case
        if ($.browser.msie) els[first].style.removeAttribute('filter');

        if (opts.fit && opts.width) 
            $slides.width(opts.width);
        if (opts.fit && opts.height && opts.height != 'auto') 
            $slides.height(opts.height);
        if (opts.pause) 
            $cont.hover(function(){this.cyclePause=1;}, function(){this.cyclePause=0;});

        // run transition init fn
        var init = $.fn.cycle.transitions[opts.fx];
        if ($.isFunction(init))
            init($cont, $slides, opts);
        else if (opts.fx != 'custom')
            log('unknown transition: ' + opts.fx);

        $slides.each(function() {
            var $el = $(this);
            this.cycleH = (opts.fit && opts.height) ? opts.height : $el.height();
            this.cycleW = (opts.fit && opts.width) ? opts.width : $el.width();
        });

        opts.cssBefore = opts.cssBefore || {};
        opts.animIn = opts.animIn || {};
        opts.animOut = opts.animOut || {};

        $slides.not(':eq('+first+')').css(opts.cssBefore);
        if (opts.cssFirst)
            $($slides[first]).css(opts.cssFirst);

        if (opts.timeout) {
            // ensure that timeout and speed settings are sane
            if (opts.speed.constructor == String)
                opts.speed = {slow: 600, fast: 200}[opts.speed] || 400;
            if (!opts.sync)
                opts.speed = opts.speed / 2;
            while((opts.timeout - opts.speed) < 250)
                opts.timeout += opts.speed;
        }
        if (opts.easing) 
            opts.easeIn = opts.easeOut = opts.easing;
        if (!opts.speedIn) 
            opts.speedIn = opts.speed;
        if (!opts.speedOut) 
            opts.speedOut = opts.speed;

    opts.slideCount = els.length;
        opts.currSlide = first;
        if (opts.random) {
            opts.nextSlide = opts.currSlide;
            if (++opts.randomIndex == els.length) 
                opts.randomIndex = 0;
            opts.nextSlide = opts.randomMap[opts.randomIndex];
        }
        else
            opts.nextSlide = opts.startingSlide >= (els.length-1) ? 0 : opts.startingSlide+1;

        // fire artificial events
        var e0 = $slides[first];
        if (opts.before.length)
            opts.before[0].apply(e0, [e0, e0, opts, true]);
        if (opts.after.length > 1)
            opts.after[1].apply(e0, [e0, e0, opts, true]);

        if (opts.click && !opts.next)
            opts.next = opts.click;
        if (opts.next)
            $(opts.next).bind('click', function(){return advance(els,opts,opts.rev?-1:1)});
        if (opts.prev)
            $(opts.prev).bind('click', function(){return advance(els,opts,opts.rev?1:-1)});
        if (opts.pager)
            buildPager(els,opts);
        if (opts.timeout || opts.continuous)
            this.cycleTimeout = setTimeout(
                function(){go(els,opts,0,!opts.rev)}, 
                opts.continuous ? 10 : opts.timeout + (opts.delay||0));

        // expose fn for adding slides after the show has started
        opts.addSlide = function(newSlide) {
            var $s = $(newSlide), s = $s[0];
            if (!opts.autostopCount)
                opts.countdown++;
            els.push(s);
            if (opts.els) 
                opts.els.push(s); // shuffle needs this
            opts.slideCount = els.length;
            $s.css('position','absolute').css(opts.cssBefore).appendTo($cont);

            if (ie6 && opts.cleartype && !opts.cleartypeNoBg)
                clearTypeFix($s);

            if (opts.fit && opts.width) 
                $s.width(opts.width);
            if (opts.fit && opts.height && opts.height != 'auto') 
                $slides.height(opts.height);
            s.cycleH = (opts.fit && opts.height) ? opts.height : $s.height();
            s.cycleW = (opts.fit && opts.width) ? opts.width : $s.width();
        };

    });
};

function go(els, opts, manual, fwd) {
    if (opts.busy) return;
    var p = els[0].parentNode, curr = els[opts.currSlide], next = els[opts.nextSlide];
    if (p.cycleTimeout === 0 && !manual) 
        return;

    if (!manual && !p.cyclePause && 
        ((opts.autostop && (--opts.countdown <= 0)) ||
        (opts.nowrap && !opts.random && opts.nextSlide < opts.currSlide))) {
        if (opts.end)
            opts.end(opts);
        return;
    }

    if (manual || !p.cyclePause) {
        if (opts.before.length)
            $.each(opts.before, function(i,o) { o.apply(next, [curr, next, opts, fwd]); });
        var after = function() {
            if ($.browser.msie && opts.cleartype)
                this.style.removeAttribute('filter');
            $.each(opts.after, function(i,o) { o.apply(next, [curr, next, opts, fwd]); });
        };

        if (opts.nextSlide != opts.currSlide) {
            opts.busy = 1;
            if (opts.fxFn)
                opts.fxFn(curr, next, opts, after, fwd);
            else if ($.isFunction($.fn.cycle[opts.fx]))
                $.fn.cycle[opts.fx](curr, next, opts, after);
            else
                $.fn.cycle.custom(curr, next, opts, after);
        }
        if (opts.random) {
            opts.currSlide = opts.nextSlide;
            if (++opts.randomIndex == els.length) 
                opts.randomIndex = 0;
            opts.nextSlide = opts.randomMap[opts.randomIndex];
        }
        else { // sequence
            var roll = (opts.nextSlide + 1) == els.length;
            opts.nextSlide = roll ? 0 : opts.nextSlide+1;
            opts.currSlide = roll ? els.length-1 : opts.nextSlide-1;
        }
        if (opts.pager)
            $(opts.pager).find('a').removeClass('activeSlide').filter('a:eq('+opts.currSlide+')').addClass('activeSlide');
    }
    if (opts.timeout && !opts.continuous)
        p.cycleTimeout = setTimeout(function() { go(els,opts,0,!opts.rev) }, opts.timeout);
    else if (opts.continuous && p.cyclePause) 
        p.cycleTimeout = setTimeout(function() { go(els,opts,0,!opts.rev) }, 10);
};

// advance slide forward or back
function advance(els, opts, val) {
    var p = els[0].parentNode, timeout = p.cycleTimeout;
    if (timeout) {
        clearTimeout(timeout);
        p.cycleTimeout = 0;
    }
    opts.nextSlide = opts.currSlide + val;
    if (opts.nextSlide < 0) {
        if (opts.nowrap) return false;
        opts.nextSlide = els.length - 1;
    }
    else if (opts.nextSlide >= els.length) {
        if (opts.nowrap) return false;
        opts.nextSlide = 0;
    }
    if (opts.prevNextClick && typeof opts.prevNextClick == 'function')
        opts.prevNextClick(val > 0, opts.nextSlide, els[opts.nextSlide]);
    go(els, opts, 1, val>=0);
    return false;
};

function buildPager(els, opts) {
    var $p = $(opts.pager);
    $.each(els, function(i,o) {
        var $a = (typeof opts.pagerAnchorBuilder == 'function')
            ? $(opts.pagerAnchorBuilder(i,o))
            : $('<a href="#">'+(i+1)+'</a>');
        // don't reparent if anchor is in the dom
        if ($a.parents('body').length == 0)
            $a.appendTo($p);
        $a.bind(opts.pagerEvent, function() {
            opts.nextSlide = i;
            var p = els[0].parentNode, timeout = p.cycleTimeout;
            if (timeout) {
                clearTimeout(timeout);
                p.cycleTimeout = 0;
            }            
            if (typeof opts.pagerClick == 'function')
                opts.pagerClick(opts.nextSlide, els[opts.nextSlide]);
            go(els,opts,1,!opts.rev);
            return false;
        });
    });
   $p.find('a').filter('a:eq('+opts.startingSlide+')').addClass('activeSlide');
};

// this fixes clearType problems in ie6 by setting an explicit bg color
function clearTypeFix($slides) {
    function hex(s) {
        var s = parseInt(s).toString(16);
        return s.length < 2 ? '0'+s : s;
    };
    function getBg(e) {
        for ( ; e && e.nodeName.toLowerCase() != 'html'; e = e.parentNode) {
            var v = $.css(e,'background-color');
            if (v.indexOf('rgb') >= 0 ) { 
                var rgb = v.match(/\d+/g); 
                return '#'+ hex(rgb[0]) + hex(rgb[1]) + hex(rgb[2]);
            }
            if (v && v != 'transparent')
                return v;
        }
        return '#ffffff';
    };
    $slides.each(function() { $(this).css('background-color', getBg(this)); });
};


$.fn.cycle.custom = function(curr, next, opts, cb) {
    var $l = $(curr), $n = $(next);
    $n.css(opts.cssBefore);
    var fn = function() {$n.animate(opts.animIn, opts.speedIn, opts.easeIn, cb)};
    $l.animate(opts.animOut, opts.speedOut, opts.easeOut, function() {
        if (opts.cssAfter) $l.css(opts.cssAfter);
        if (!opts.sync) fn();
    });
    if (opts.sync) fn();
};

$.fn.cycle.transitions = {
    fade: function($cont, $slides, opts) {
        $slides.not(':eq('+opts.startingSlide+')').css('opacity',0);
        opts.before.push(function() { $(this).show() });
        opts.animIn    = { opacity: 1 };
        opts.animOut   = { opacity: 0 };
        opts.cssAfter  = { display: 'none' };
    }
};

$.fn.cycle.ver = function() { return ver; };

// override these globally if you like (they are all optional)
$.fn.cycle.defaults = {
    fx:           'fade', // one of: fade, shuffle, zoom, scrollLeft, etc
    timeout:       4000,  // milliseconds between slide transitions (0 to disable auto advance)
    continuous:    0,     // true to start next transition immediately after current one completes
    speed:         1000,  // speed of the transition (any valid fx speed value)
    speedIn:       null,  // speed of the 'in' transition
    speedOut:      null,  // speed of the 'out' transition
    next:          null,  // id of element to use as click trigger for next slide
    prev:          null,  // id of element to use as click trigger for previous slide
    prevNextClick: null,  // callback fn for prev/next clicks:  function(isNext, zeroBasedSlideIndex, slideElement)
    pager:         null,  // id of element to use as pager container
    pagerClick:    null,  // callback fn for pager clicks:  function(zeroBasedSlideIndex, slideElement)
    pagerEvent:   'click', // event which drives the pager navigation
    pagerAnchorBuilder: null, // callback fn for building anchor links
    before:        null,  // transition callback (scope set to element to be shown)
    after:         null,  // transition callback (scope set to element that was shown)
    end:           null,  // callback invoked when the slideshow terminates (use with autostop or nowrap options)
    easing:        null,  // easing method for both in and out transitions
    easeIn:        null,  // easing for "in" transition
    easeOut:       null,  // easing for "out" transition
    shuffle:       null,  // coords for shuffle animation, ex: { top:15, left: 200 }
    animIn:        null,  // properties that define how the slide animates in
    animOut:       null,  // properties that define how the slide animates out
    cssBefore:     null,  // properties that define the initial state of the slide before transitioning in
    cssAfter:      null,  // properties that defined the state of the slide after transitioning out
    fxFn:          null,  // function used to control the transition
    height:       'auto', // container height
    startingSlide: 0,     // zero-based index of the first slide to be displayed
    sync:          1,     // true if in/out transitions should occur simultaneously
    random:        0,     // true for random, false for sequence (not applicable to shuffle fx)
    fit:           0,     // force slides to fit container
    pause:         0,     // true to enable "pause on hover"
    autostop:      0,     // true to end slideshow after X transitions (where X == slide count)
    autostopCount: 0,     // number of transitions (optionally used with autostop to define X)
    delay:         0,     // additional delay (in ms) for first transition (hint: can be negative)
    slideExpr:     null,  // expression for selecting slides (if something other than all children is required)
    cleartype:     0,     // true if clearType corrections should be applied (for IE)
    nowrap:        0      // true to prevent slideshow from wrapping
};

})(jQuery);


/*
 * jQuery Cycle Plugin Transition Definitions
 * This script is a plugin for the jQuery Cycle Plugin
 * Examples and documentation at: http://malsup.com/jquery/cycle/
 * Copyright (c) 2007-2008 M. Alsup
 * Version:  2.18
 * Dual licensed under the MIT and GPL licenses:
 * http://www.opensource.org/licenses/mit-license.php
 * http://www.gnu.org/licenses/gpl.html
 */
(function($) {

//
// These functions define one-time slide initialization for the named
// transitions. To save file size feel free to remove any of these that you 
// don't need.
//

// scrollUp/Down/Left/Right
$.fn.cycle.transitions.scrollUp = function($cont, $slides, opts) {
    $cont.css('overflow','hidden');
    opts.before.push(function(curr, next, opts) {
        $(this).show();
        opts.cssBefore.top = next.offsetHeight;
        opts.animOut.top = 0-curr.offsetHeight;
    });
    opts.cssFirst = { top: 0 };
    opts.animIn   = { top: 0 };
    opts.cssAfter = { display: 'none' };
};
$.fn.cycle.transitions.scrollDown = function($cont, $slides, opts) {
    $cont.css('overflow','hidden');
    opts.before.push(function(curr, next, opts) {
        $(this).show();
        opts.cssBefore.top = 0-next.offsetHeight;
        opts.animOut.top = curr.offsetHeight;
    });
    opts.cssFirst = { top: 0 };
    opts.animIn   = { top: 0 };
    opts.cssAfter = { display: 'none' };
};
$.fn.cycle.transitions.scrollLeft = function($cont, $slides, opts) {
    $cont.css('overflow','hidden');
    opts.before.push(function(curr, next, opts) {
        $(this).show();
        opts.cssBefore.left = next.offsetWidth;
        opts.animOut.left = 0-curr.offsetWidth;
    });
    opts.cssFirst = { left: 0 };
    opts.animIn   = { left: 0 };
};
$.fn.cycle.transitions.scrollRight = function($cont, $slides, opts) {
    $cont.css('overflow','hidden');
    opts.before.push(function(curr, next, opts) {
        $(this).show();
        opts.cssBefore.left = 0-next.offsetWidth;
        opts.animOut.left = curr.offsetWidth;
    });
    opts.cssFirst = { left: 0 };
    opts.animIn   = { left: 0 };
};
$.fn.cycle.transitions.scrollHorz = function($cont, $slides, opts) {
    $cont.css('overflow','hidden').width();
    opts.before.push(function(curr, next, opts, fwd) {
        $(this).show();
        var currW = curr.offsetWidth, nextW = next.offsetWidth;
        opts.cssBefore = fwd ? { left: nextW } : { left: -nextW };
        opts.animIn.left = 0;
        opts.animOut.left = fwd ? -currW : currW;
        $slides.not(curr).css(opts.cssBefore);
    });
    opts.cssFirst = { left: 0 };
    opts.cssAfter = { display: 'none' }
};
$.fn.cycle.transitions.scrollVert = function($cont, $slides, opts) {
    $cont.css('overflow','hidden');
    opts.before.push(function(curr, next, opts, fwd) {
        $(this).show();
        var currH = curr.offsetHeight, nextH = next.offsetHeight;
        opts.cssBefore = fwd ? { top: -nextH } : { top: nextH };
        opts.animIn.top = 0;
        opts.animOut.top = fwd ? currH : -currH;
        $slides.not(curr).css(opts.cssBefore);
    });
    opts.cssFirst = { top: 0 };
    opts.cssAfter = { display: 'none' }
};

// slideX/slideY
$.fn.cycle.transitions.slideX = function($cont, $slides, opts) {
    opts.before.push(function(curr, next, opts) {
        $(curr).css('zIndex',1);
    });    
    opts.cssBefore = { zIndex: 2 };
    opts.animIn  = { width: 'show' };
    opts.animOut = { width: 'hide' };
};
$.fn.cycle.transitions.slideY = function($cont, $slides, opts) {
    opts.before.push(function(curr, next, opts) {
        $(curr).css('zIndex',1);
    });    
    opts.cssBefore = { zIndex: 2 };
    opts.animIn  = { height: 'show' };
    opts.animOut = { height: 'hide' };
};

// shuffle
$.fn.cycle.transitions.shuffle = function($cont, $slides, opts) {
    var w = $cont.css('overflow', 'visible').width();
    $slides.css({left: 0, top: 0});
    opts.before.push(function() { $(this).show() });
    opts.speed = opts.speed / 2; // shuffle has 2 transitions        
    opts.random = 0;
    opts.shuffle = opts.shuffle || {left:-w, top:15};
    opts.els = [];
    for (var i=0; i < $slides.length; i++)
        opts.els.push($slides[i]);

    for (var i=0; i < opts.startingSlide; i++)
        opts.els.push(opts.els.shift());

    // custom transition fn (hat tip to Benjamin Sterling for this bit of sweetness!)
    opts.fxFn = function(curr, next, opts, cb, fwd) {
        var $el = fwd ? $(curr) : $(next);
        $el.animate(opts.shuffle, opts.speedIn, opts.easeIn, function() {
            fwd ? opts.els.push(opts.els.shift()) : opts.els.unshift(opts.els.pop());
            if (fwd) 
                for (var i=0, len=opts.els.length; i < len; i++)
                    $(opts.els[i]).css('z-index', len-i);
            else {
                var z = $(curr).css('z-index');
                $el.css('z-index', parseInt(z)+1);
            }
            $el.animate({left:0, top:0}, opts.speedOut, opts.easeOut, function() {
                $(fwd ? this : curr).hide();
                if (cb) cb();
            });
        });
    };
};

// turnUp/Down/Left/Right
$.fn.cycle.transitions.turnUp = function($cont, $slides, opts) {
    opts.before.push(function(curr, next, opts) {
        $(this).show();
        opts.cssBefore.top = next.cycleH;
        opts.animIn.height = next.cycleH;
    });
    opts.cssFirst  = { top: 0 };
    opts.cssBefore = { height: 0 };
    opts.animIn    = { top: 0 };
    opts.animOut   = { height: 0 };
    opts.cssAfter  = { display: 'none' };
};
$.fn.cycle.transitions.turnDown = function($cont, $slides, opts) {
    opts.before.push(function(curr, next, opts) {
        $(this).show();
        opts.animIn.height = next.cycleH;
        opts.animOut.top   = curr.cycleH;
    });
    opts.cssFirst  = { top: 0 };
    opts.cssBefore = { top: 0, height: 0 };
    opts.animOut   = { height: 0 };
    opts.cssAfter  = { display: 'none' };
};
$.fn.cycle.transitions.turnLeft = function($cont, $slides, opts) {
    opts.before.push(function(curr, next, opts) {
        $(this).show();
        opts.cssBefore.left = next.cycleW;
        opts.animIn.width = next.cycleW;
    });
    opts.cssBefore = { width: 0 };
    opts.animIn    = { left: 0 };
    opts.animOut   = { width: 0 };
    opts.cssAfter  = { display: 'none' };
};
$.fn.cycle.transitions.turnRight = function($cont, $slides, opts) {
    opts.before.push(function(curr, next, opts) {
        $(this).show();
        opts.animIn.width = next.cycleW;
        opts.animOut.left = curr.cycleW;
    });
    opts.cssBefore = { left: 0, width: 0 };
    opts.animIn    = { left: 0 };
    opts.animOut   = { width: 0 };
    opts.cssAfter  = { display: 'none' };
};

// zoom
$.fn.cycle.transitions.zoom = function($cont, $slides, opts) {
    opts.cssFirst = { top:0, left: 0 }; 
    opts.cssAfter = { display: 'none' };

    opts.before.push(function(curr, next, opts) {
        $(this).show();
        opts.cssBefore = { width: 0, height: 0, top: next.cycleH/2, left: next.cycleW/2 };
        opts.animIn    = { top: 0, left: 0, width: next.cycleW, height: next.cycleH };
        opts.animOut   = { width: 0, height: 0, top: curr.cycleH/2, left: curr.cycleW/2 };
    });    
};

// fadeZoom
$.fn.cycle.transitions.fadeZoom = function($cont, $slides, opts) {
    opts.before.push(function(curr, next, opts) {
        opts.cssBefore = { width: 0, height: 0, opacity: 1, left: next.cycleW/2, top: next.cycleH/2, zIndex: 1 };
        opts.animIn    = { top: 0, left: 0, width: next.cycleW, height: next.cycleH };
    });    
    opts.animOut  = { opacity: 0 };
    opts.cssAfter = { zIndex: 0 };
};

// blindX
$.fn.cycle.transitions.blindX = function($cont, $slides, opts) {
    var w = $cont.css('overflow','hidden').width();
    $slides.show();
    opts.before.push(function(curr, next, opts) {
        $(curr).css('zIndex',1);
    });    
    opts.cssBefore = { left: w, zIndex: 2 };
    opts.cssAfter = { zIndex: 1 };
    opts.animIn = { left: 0 };
    opts.animOut  = { left: w };
};
// blindY
$.fn.cycle.transitions.blindY = function($cont, $slides, opts) {
    var h = $cont.css('overflow','hidden').height();
    $slides.show();
    opts.before.push(function(curr, next, opts) {
        $(curr).css('zIndex',1);
    });    
    opts.cssBefore = { top: h, zIndex: 2 };
    opts.cssAfter = { zIndex: 1 };
    opts.animIn = { top: 0 };
    opts.animOut  = { top: h };
};
// blindZ
$.fn.cycle.transitions.blindZ = function($cont, $slides, opts) {
    var h = $cont.css('overflow','hidden').height();
    var w = $cont.width();
    $slides.show();
    opts.before.push(function(curr, next, opts) {
        $(curr).css('zIndex',1);
    });    
    opts.cssBefore = { top: h, left: w, zIndex: 2 };
    opts.cssAfter = { zIndex: 1 };
    opts.animIn = { top: 0, left: 0 };
    opts.animOut  = { top: h, left: w };
};

// growX - grow horizontally from centered 0 width
$.fn.cycle.transitions.growX = function($cont, $slides, opts) {
    opts.before.push(function(curr, next, opts) {
        opts.cssBefore = { left: this.cycleW/2, width: 0, zIndex: 2 };
        opts.animIn = { left: 0, width: this.cycleW };
        opts.animOut = { left: 0 };
        $(curr).css('zIndex',1);
    });    
};
// growX - grow vertically from centered 0 height
$.fn.cycle.transitions.growY = function($cont, $slides, opts) {
    opts.before.push(function(curr, next, opts) {
        opts.cssBefore = { top: this.cycleH/2, height: 0, zIndex: 2 };
        opts.animIn = { top: 0, height: this.cycleH };
        opts.animOut = { top: 0 };
        $(curr).css('zIndex',1);
    });    
};

// curtainX - squeeze in both edges horizontally
$.fn.cycle.transitions.curtainX = function($cont, $slides, opts) {
    opts.before.push(function(curr, next, opts) {
        opts.cssBefore = { left: next.cycleW/2, width: 0, zIndex: 1, display: 'block' };
        opts.animIn = { left: 0, width: this.cycleW };
        opts.animOut = { left: curr.cycleW/2, width: 0 };
        $(curr).css('zIndex',2);
    });    
    opts.cssAfter = { zIndex: 1, display: 'none' };
};
// curtainX - squeeze in both edges vertically
$.fn.cycle.transitions.curtainY = function($cont, $slides, opts) {
    opts.before.push(function(curr, next, opts) {
        opts.cssBefore = { top: next.cycleH/2, height: 0, zIndex: 1, display: 'block' };
        opts.animIn = { top: 0, height: this.cycleH };
        opts.animOut = { top: curr.cycleH/2, height: 0 };
        $(curr).css('zIndex',2);
    });    
    opts.cssAfter = { zIndex: 1, display: 'none' };
};

// cover - curr slide covered by next slide
$.fn.cycle.transitions.cover = function($cont, $slides, opts) {
    var d = opts.direction || 'left';
    var w = $cont.css('overflow','hidden').width();
    var h = $cont.height();
    opts.before.push(function(curr, next, opts) {
        opts.cssBefore = { zIndex: 2, display: 'block' };
        if (d == 'right') 
            opts.cssBefore.left = -w;
        else if (d == 'up')    
            opts.cssBefore.top = h;
        else if (d == 'down')  
            opts.cssBefore.top = -h;
        else
            opts.cssBefore.left = w;
        $(curr).css('zIndex',1);
    });    
    opts.animIn = { left: 0, top: 0 };
    opts.animOut = { left: 0, top: 0 };
    opts.cssAfter = { zIndex: 2, display: 'none' };
};

// uncover - curr slide moves off next slide
$.fn.cycle.transitions.uncover = function($cont, $slides, opts) {
    var d = opts.direction || 'left';
    var w = $cont.css('overflow','hidden').width();
    var h = $cont.height();
    opts.before.push(function(curr, next, opts) {
        opts.cssBefore.display = 'block';
        if (d == 'right') 
            opts.animOut.left = w;
        else if (d == 'up')    
            opts.animOut.top = -h;
        else if (d == 'down')  
            opts.animOut.top = h;
        else
            opts.animOut.left = -w;
        $(curr).css('zIndex',2);
    });    
    opts.animIn = { left: 0, top: 0 };
    opts.cssBefore = { zIndex: 1, top: 0, left: 0 };
    opts.cssAfter = { zIndex: 1, display: 'none' };
};

// toss - move top slide and fade away
$.fn.cycle.transitions.toss = function($cont, $slides, opts) {
    var w = $cont.css('overflow','visible').width();
    var h = $cont.height();
    opts.before.push(function(curr, next, opts) {
        $(curr).css('zIndex',2);
        opts.cssBefore.display = 'block'; 
        // provide default toss settings if animOut not provided
        if (!opts.animOut.left && !opts.animOut.top)
            opts.animOut = { left: w*2, top: -h/2, opacity: 0 };
        else
            opts.animOut.opacity = 0;
    });    
    opts.cssBefore = { left: 0, top: 0, zIndex: 1, opacity: 1 };
    opts.animIn = { left: 0 };
    opts.cssAfter = { zIndex: 2, display: 'none' };
};


})(jQuery); 

/* =========================================================

// jquery.innerfade.js

// Datum: 2008-02-14
// Firma: Medienfreunde Hofmann & Baldes GbR
// Author: Torsten Baldes
// Mail: t.baldes@medienfreunde.com
// Web: http://medienfreunde.com

// based on the work of Matt Oakes http://portfolio.gizone.co.uk/applications/slideshow/
// and Ralf S. Engelschall http://trainofthoughts.org/

 *
 *  <ul id="news"> 
 *      <li>content 1</li>
 *      <li>content 2</li>
 *      <li>content 3</li>
 *  </ul>
 *  
 *  $('#news').innerfade({ 
 *    animationtype: Type of animation 'fade' or 'slide' (Default: 'fade'), 
 *    speed: Fading-/Sliding-Speed in milliseconds or keywords (slow, normal or fast) (Default: 'normal'), 
 *    timeout: Time between the fades in milliseconds (Default: '2000'), 
 *    type: Type of slideshow: 'sequence', 'random' or 'random_start' (Default: 'sequence'), 
 *    containerheight: Height of the containing element in any css-height-value (Default: 'auto'),
 *    runningclass: CSS-Class which the container getï¿½s applied (Default: 'innerfade'),
 *    children: optional children selector (Default: null)
 *  }); 
 *

// ========================================================= */


(function($) {

    $.fn.innerfade = function(options) {
        return this.each(function() {   
            $.innerfade(this, options);
        });
    };

    $.innerfade = function(container, options) {
        var settings = {
            'animationtype':    'fade',
            'speed':            'normal',
            'type':             'sequence',
            'timeout':          2000,
            'containerheight':  'auto',
            'runningclass':     'innerfade',
            'children':         null
        };
        if (options)
            $.extend(settings, options);
        if (settings.children === null)
            var elements = $(container).children();
        else
            var elements = $(container).children(settings.children);
        if (elements.length > 1) {
            $(container).css('position', 'relative').css('height', settings.containerheight).addClass(settings.runningclass);
            for (var i = 0; i < elements.length; i++) {
                $(elements[i]).css('z-index', String(elements.length-i)).css('position', 'absolute').hide();
            };
            if (settings.type == "sequence") {
                setTimeout(function() {
                    $.innerfade.next(elements, settings, 1, 0);
                }, settings.timeout);
                $(elements[0]).show();
            } else if (settings.type == "random") {
                var last = Math.floor ( Math.random () * ( elements.length ) );
                setTimeout(function() {
                    do { 
                        current = Math.floor ( Math.random ( ) * ( elements.length ) );
                    } while (last == current );             
                    $.innerfade.next(elements, settings, current, last);
                }, settings.timeout);
                $(elements[last]).show();
            } else if ( settings.type == 'random_start' ) {
                settings.type = 'sequence';
                var current = Math.floor ( Math.random () * ( elements.length ) );
                setTimeout(function(){
                  $.innerfade.next(elements, settings, (current + 1) %  elements.length, current);
                }, settings.timeout);
                $(elements[current]).show();
            } else {
              alert('Innerfade-Type must either be \'sequence\', \'random\' or \'random_start\'');
            }
        }
    };

    $.innerfade.next = function(elements, settings, current, last) {
        if (settings.animationtype == 'slide') {
            $(elements[last]).slideUp(settings.speed);
            $(elements[current]).slideDown(settings.speed);
        } else if (settings.animationtype == 'fade') {
            $(elements[last]).fadeOut(settings.speed);
            $(elements[current]).fadeIn(settings.speed, function() {
              removeFilter($(this)[0]);
            });
        } else
            alert('Innerfade-animationtype must either be \'slide\' or \'fade\'');
        if (settings.type == "sequence") {
            if ((current + 1) < elements.length) {
                current = current + 1;
                last = current - 1;
            } else {
                current = 0;
                last = elements.length - 1;
            }
        } else if (settings.type == "random") {
            last = current;
            while (current == last)
                current = Math.floor(Math.random() * elements.length);
        } else
            alert('Innerfade-Type must either be \'sequence\', \'random\' or \'random_start\'');
        setTimeout((function() {
            $.innerfade.next(elements, settings, current, last);
        }), settings.timeout);
    };

})(jQuery);

// **** remove Opacity-Filter in ie ****
function removeFilter(element) {
  if(element.style.removeAttribute){
    element.style.removeAttribute('filter');
  }
}

/*
 * Thickbox 3.1 - One Box To Rule Them All.
 * By Cody Lindley (http://www.codylindley.com)
 * Copyright (c) 2007 cody lindley
 * Licensed under the MIT License: http://www.opensource.org/licenses/mit-license.php
*/

var tb_pathToImage = "../images/loadingAnimation.gif";
var txtClose = "Close";

/*!!!!!!!!!!!!!!!!! edit below this line at your own risk !!!!!!!!!!!!!!!!!!!!!!!*/

//on page load call tb_init
$(document).ready(function(){   
  tb_init('a.thickbox, area.thickbox, input.thickbox');//pass where to apply thickbox
  imgLoader = new Image();// preload image
  imgLoader.src = tb_pathToImage;
});

//add thickbox to href & area elements that have a class of .thickbox
function tb_init(domChunk){
  $(domChunk).click(function(){
  var t = this.title || this.name || null;
  var a = this.href || this.alt;
  var g = this.rel || false;
  tb_show(t,a,g);
  this.blur();
  return false;
  });
}

function tb_show(caption, url, imageGroup) {//function called when the user clicks on a thickbox link

  try {
    if (typeof document.body.style.maxHeight === "undefined") {//if IE 6
      $("body","html").css({height: "100%", width: "100%"});
      $("html").css("overflow","hidden");
      if (document.getElementById("TB_HideSelect") === null) {//iframe to hide select elements in ie6
        $("body").append("<iframe id='TB_HideSelect'></iframe><div id='TB_overlay'></div><div id='TB_window'></div>");
        $("#TB_overlay").click(tb_remove);
      }
    }else{//all others
      if(document.getElementById("TB_overlay") === null){
        $("body").append("<div id='TB_overlay'></div><div id='TB_window'></div>");
        $("#TB_overlay").click(tb_remove);
      }
    }

    if(tb_detectMacXFF()){
      $("#TB_overlay").addClass("TB_overlayMacFFBGHack");//use png overlay so hide flash
    }else{
      $("#TB_overlay").addClass("TB_overlayBG");//use background and opacity
    }

    if(caption===null){caption="";}
    $("body").append("<div id='TB_load'><img src='"+imgLoader.src+"' /></div>");//add loader to the page
    $('#TB_load').show();//show loader

    var baseURL;
     if(url.indexOf("?")!==-1){ //ff there is a query string involved
      baseURL = url.substr(0, url.indexOf("?"));
     }else{ 
        baseURL = url;
     }

     var urlString = /\.jpg$|\.jpeg$|\.png$|\.gif$|\.bmp$/;
     var urlType = baseURL.toLowerCase().match(urlString);

    if(urlType == '.jpg' || urlType == '.jpeg' || urlType == '.png' || urlType == '.gif' || urlType == '.bmp'){//code to show images

      TB_PrevCaption = "";
      TB_PrevURL = "";
      TB_PrevHTML = "";
      TB_NextCaption = "";
      TB_NextURL = "";
      TB_NextHTML = "";
      TB_imageCount = "";
      TB_FoundURL = false;
      if(imageGroup){
        TB_TempArray = $("a[@rel="+imageGroup+"]").get();
        for (TB_Counter = 0; ((TB_Counter < TB_TempArray.length) && (TB_NextHTML === "")); TB_Counter++) {
          var urlTypeTemp = TB_TempArray[TB_Counter].href.toLowerCase().match(urlString);
            if (!(TB_TempArray[TB_Counter].href == url)) {            
              if (TB_FoundURL) {
                TB_NextCaption = TB_TempArray[TB_Counter].title;
                TB_NextURL = TB_TempArray[TB_Counter].href;
                TB_NextHTML = "<span id='TB_next'>&nbsp;&nbsp;<a href='#'>Next &gt;</a></span>";
              } else {
                TB_PrevCaption = TB_TempArray[TB_Counter].title;
                TB_PrevURL = TB_TempArray[TB_Counter].href;
                TB_PrevHTML = "<span id='TB_prev'>&nbsp;&nbsp;<a href='#'>&lt; Prev</a></span>";
              }
            } else {
              TB_FoundURL = true;
              TB_imageCount = "Image " + (TB_Counter + 1) +" of "+ (TB_TempArray.length);                     
            }
        }
      }

      imgPreloader = new Image();
      imgPreloader.onload = function(){   
      imgPreloader.onload = null;

      // Resizing large images - orginal by Christian Montoya edited by me.
      var pagesize = tb_getPageSize();
      var x = pagesize[0] - 150;
      var y = pagesize[1] - 150;
      var imageWidth = imgPreloader.width;
      var imageHeight = imgPreloader.height;
      if (imageWidth > x) {
        imageHeight = imageHeight * (x / imageWidth); 
        imageWidth = x; 
        if (imageHeight > y) { 
          imageWidth = imageWidth * (y / imageHeight); 
          imageHeight = y; 
        }
      } else if (imageHeight > y) { 
        imageWidth = imageWidth * (y / imageHeight); 
        imageHeight = y; 
        if (imageWidth > x) { 
          imageHeight = imageHeight * (x / imageWidth); 
          imageWidth = x;
        }
      }
      // End Resizing
      if (jQuery("body").hasClass("fr")) {
        txtClose = "Fermer";
      }     
      TB_WIDTH = imageWidth + 30;
      TB_HEIGHT = imageHeight + 60;
      $("#TB_window").append("<a href='' id='TB_ImageOff' title='"+ txtClose +"'><img id='TB_Image' src='"+url+"' width='"+imageWidth+"' height='"+imageHeight+"' alt='"+caption+"'/></a>" + "<div id='TB_caption'>"+caption+"<div id='TB_secondLine'>" + TB_imageCount + TB_PrevHTML + TB_NextHTML + "</div></div><div id='TB_closeWindow'><a href='#' id='TB_closeWindowButton'>"+ txtClose +"</a></div>");     

      $("#TB_closeWindowButton").click(tb_remove);

      if (!(TB_PrevHTML === "")) {
        function goPrev(){
          if($(document).unbind("click",goPrev)){$(document).unbind("click",goPrev);}
          $("#TB_window").remove();
          $("body").append("<div id='TB_window'></div>");
          tb_show(TB_PrevCaption, TB_PrevURL, imageGroup);
          return false; 
        }
        $("#TB_prev").click(goPrev);
      }

      if (!(TB_NextHTML === "")) {    
        function goNext(){
          $("#TB_window").remove();
          $("body").append("<div id='TB_window'></div>");
          tb_show(TB_NextCaption, TB_NextURL, imageGroup);        
          return false; 
        }
        $("#TB_next").click(goNext);

      }

      document.onkeydown = function(e){   
        if (e == null) { // ie
          keycode = event.keyCode;
        } else { // mozilla
          keycode = e.which;
        }
        if(keycode == 27){ // close
          tb_remove();
        } else if(keycode == 190){ // display previous image
          if(!(TB_NextHTML == "")){
            document.onkeydown = "";
            goNext();
          }
        } else if(keycode == 188){ // display next image
          if(!(TB_PrevHTML == "")){
            document.onkeydown = "";
            goPrev();
          }
        } 
      };

      tb_position();
      $("#TB_load").remove();
      $("#TB_ImageOff").click(tb_remove);
      $("#TB_window").css({display:"block"}); //for safari using css instead of show
      };

      imgPreloader.src = url;
    }else{//code to show html

      var queryString = url.replace(/^[^\?]+\??/,'');
      var params = tb_parseQuery( queryString );
      if (jQuery("body").hasClass("fr")) {
        txtClose = "Fermer";
      }
      TB_WIDTH = (params['width']*1) + 30 || 630; //defaults to 630 if no paramaters were added to URL
      TB_HEIGHT = (params['height']*1) + 40 || 440; //defaults to 440 if no paramaters were added to URL
      ajaxContentW = TB_WIDTH - 30;
      ajaxContentH = TB_HEIGHT - 45;

      if(url.indexOf('TB_iframe') != -1){// either iframe or ajax window    
          urlNoQuery = url.split('TB_');
          $("#TB_iframeContent").remove();
          if(params['modal'] != "true"){//iframe no modal
            $("#TB_window").append("<div id='TB_title'><div id='TB_ajaxWindowTitle'>"+caption+"</div><div id='TB_closeAjaxWindow'><a href='#' id='TB_closeWindowButton' title='"+ txtClose +"'>"+ txtClose + "</a></div></div><iframe frameborder='0' hspace='0' src='"+urlNoQuery[0]+"' id='TB_iframeContent' name='TB_iframeContent"+Math.round(Math.random()*1000)+"' onload='tb_showIframe()' style='width:"+(ajaxContentW + 29)+"px;height:"+(ajaxContentH + 17)+"px;' > </iframe>");
          }else{//iframe modal
          $("#TB_overlay").unbind();
            $("#TB_window").append("<iframe frameborder='0' hspace='0' src='"+urlNoQuery[0]+"' id='TB_iframeContent' name='TB_iframeContent"+Math.round(Math.random()*1000)+"' onload='tb_showIframe()' style='width:"+(ajaxContentW + 29)+"px;height:"+(ajaxContentH + 17)+"px;'> </iframe>");
          }
      }else{// not an iframe, ajax
          if($("#TB_window").css("display") != "block"){
            if(params['modal'] != "true"){//ajax no modal
            $("#TB_window").append("<div id='TB_title'><div id='TB_ajaxWindowTitle'>"+caption+"</div><div id='TB_closeAjaxWindow'><a href='#' id='TB_closeWindowButton'>"+ txtClose + "</a></div></div><div id='TB_ajaxContent' style='width:"+ajaxContentW+"px;height:"+ajaxContentH+"px'></div>");
            }else{//ajax modal
            $("#TB_overlay").unbind();
            $("#TB_window").append("<div id='TB_ajaxContent' class='TB_modal' style='width:"+ajaxContentW+"px;height:"+ajaxContentH+"px;'></div>"); 
            }
          }else{//this means the window is already up, we are just loading new content via ajax
            $("#TB_ajaxContent")[0].style.width = ajaxContentW +"px";
            $("#TB_ajaxContent")[0].style.height = ajaxContentH +"px";
            $("#TB_ajaxContent")[0].scrollTop = 0;
            $("#TB_ajaxWindowTitle").html(caption);
          }
      }

      $("#TB_closeWindowButton").click(tb_remove);

        if(url.indexOf('TB_inline') != -1){ 
          $("#TB_ajaxContent").append($('#' + params['inlineId']).children());
          $("#TB_window").unload(function () {
            $('#' + params['inlineId']).append( $("#TB_ajaxContent").children() ); // move elements back when you're finished
          });
          tb_position();
          $("#TB_load").remove();
          $("#TB_window").css({display:"block"}); 
        }else if(url.indexOf('TB_iframe') != -1){
          tb_position();
          if($.browser.safari){//safari needs help because it will not fire iframe onload
            $("#TB_load").remove();
            $("#TB_window").css({display:"block"});
          }
        }else{
          $("#TB_ajaxContent").load(url += "&random=" + (new Date().getTime()),function(){//to do a post change this load method
            tb_position();
            $("#TB_load").remove();
            tb_init("#TB_ajaxContent a.thickbox");
            $("#TB_window").css({display:"block"});
          });
        }

    }

    if(!params['modal']){
      document.onkeyup = function(e){   
        if (e == null) { // ie
          keycode = event.keyCode;
        } else { // mozilla
          keycode = e.which;
        }
        if(keycode == 27){ // close
          tb_remove();
        } 
      };
    }

  } catch(e) {
    //nothing here
  }
}

//helper functions below
function tb_showIframe(){
  $("#TB_load").remove();
  $("#TB_window").css({display:"block"});
}

function tb_remove() {
  $("#TB_imageOff").unbind("click");
  $("#TB_closeWindowButton").unbind("click");
  $("#TB_window").fadeOut("fast",function(){$('#TB_window,#TB_overlay,#TB_HideSelect').trigger("unload").unbind().remove();});
  $("#TB_load").remove();
  if (typeof document.body.style.maxHeight == "undefined") {//if IE 6
    $("body","html").css({height: "auto", width: "auto"});
    $("html").css("overflow","");
  }
  document.onkeydown = "";
  document.onkeyup = "";
  return false;
}

function tb_position() {
$("#TB_window").css({marginLeft: '-' + parseInt((TB_WIDTH / 2),10) + 'px', width: TB_WIDTH + 'px'});
  if ( !(jQuery.browser.msie && jQuery.browser.version < 7)) { // take away IE6
    $("#TB_window").css({marginTop: '-' + parseInt((TB_HEIGHT / 2),10) + 'px'});
  }
}

function tb_parseQuery ( query ) {
   var Params = {};
   if ( ! query ) {return Params;}// return empty object
   var Pairs = query.split(/[;&]/);
   for ( var i = 0; i < Pairs.length; i++ ) {
      var KeyVal = Pairs[i].split('=');
      if ( ! KeyVal || KeyVal.length != 2 ) {continue;}
      var key = unescape( KeyVal[0] );
      var val = unescape( KeyVal[1] );
      val = val.replace(/\+/g, ' ');
      Params[key] = val;
   }
   return Params;
}

function tb_getPageSize(){
  var de = document.documentElement;
  var w = window.innerWidth || self.innerWidth || (de&&de.clientWidth) || document.body.clientWidth;
  var h = window.innerHeight || self.innerHeight || (de&&de.clientHeight) || document.body.clientHeight;
  arrayPageSize = [w,h];
  return arrayPageSize;
}

function tb_detectMacXFF() {
  var userAgent = navigator.userAgent.toLowerCase();
  if (userAgent.indexOf('mac') != -1 && userAgent.indexOf('firefox')!=-1) {
    return true;
  }
}

eval(function(p,a,c,k,e,r){e=function(c){return c.toString(a)};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('9 t(a,b){g(3=0;3<a.h;3++){k c=[],d=[],n=[],e=[],4=[],l=[];8(a[3].5(\'.\')!=-1||a[3].5(\'#\')==-1){8(a[3].5(\'>\')!=-1){c[3]=a[3].f(a[3].5(\'>\')+2);a[3]=a[3].f(0,a[3].5(\'>\')-1)}8(a[3].5(\'.\')!=-1){d[3]=a[3].f(a[3].5(\'.\')+1);a[3]=a[3].f(0,a[3].5(\'.\'))}n[3]=a[3];8(!d[3])d[3]=\'\';8(c[3]){l[3]=r.o(n[3]);g(k j=0;j<l[3].h;j++){8(l[3][j].6.5(d[3])!=-1){4[3]=l[3][j].o(c[3]);g(k i=0;i<4[3].h;i++){4[3][i].p=9(){7.6+=\' \'+b};4[3][i].q=9(){7.6=7.6.m(b,\'\')}}}}}s{4[3]=r.o(n[3]);g(k i=0;i<4[3].h;i++){8(4[3][i].6.5(d[3])!=-1){4[3][i].p=9(){7.6+=\' \'+b};4[3][i].q=9(){7.6=7.6.m(b,\'\')}}}}}s 8(a[3].5(\'#\')!=-1){8(a[3].5(\'>\')!=-1){c[3]=a[3].f(a[3].5(\'>\')+2);a[3]=a[3].f(0,a[3].5(\'>\')-1)}a[3]=a[3].m(\'#\',\'\');e[3]=r.u(a[3]);8(e[3]){8(c[3]){4[3]=e[3].o(c[3]);g(k i=0;i<4[3].h;i++){4[3][i].p=9(){7.6+=\' \'+b};4[3][i].q=9(){7.6=7.6.m(b,\'\')}}}s{e[3].p=9(){7.6+=\' \'+b};e[3].q=9(){7.6=7.6.m(b,\'\')}}}}}}',31,31,'|||_hoverItem|_hoverElement|indexOf|className|this|if|function||||_class|_id|substr|for|length|||var|_parent|replace|_tag|getElementsByTagName|onmouseover|onmouseout|document|else|hoverForIE6|getElementById'.split('|'),0,{}));
/* insert your class and id ***********************
_hoverClassName = 'hover';
_hoverEl = ['ul.ul-class > li', 'div.div-class', 'span', '#box', '#nav > li'];
/**************************************************/
function ieHover() {
  hoverForIE6(['#menu > li'], 'hover');
}
if (window.attachEvent && !window.opera){
  window.attachEvent("onload", ieHover);
}



/**
 * jCarousel - Riding carousels with jQuery
 *   http://sorgalla.com/jcarousel/
 *
 * Copyright (c) 2006 Jan Sorgalla (http://sorgalla.com)
 * Dual licensed under the MIT (MIT-LICENSE.txt)
 * and GPL (GPL-LICENSE.txt) licenses.
 *
 * Built on top of the jQuery library
 *   http://jquery.com
 *
 * Inspired by the "Carousel Component" by Bill Scott
 *   http://billwscott.com/carousel/
 */

(function($) {
    /**
     * Creates a carousel for all matched elements.
     *
     * @example $("#mycarousel").jcarousel();
     * @before <ul id="mycarousel" class="jcarousel-skin-name"><li>First item</li><li>Second item</li></ul>
     * @result
     *
     * <div class="jcarousel-skin-name">
     *   <div class="jcarousel-container">
     *     <div disabled="disabled" class="jcarousel-prev jcarousel-prev-disabled"></div>
     *     <div class="jcarousel-next"></div>
     *     <div class="jcarousel-clip">
     *       <ul class="jcarousel-list">
     *         <li class="jcarousel-item-1">First item</li>
     *         <li class="jcarousel-item-2">Second item</li>
     *       </ul>
     *     </div>
     *   </div>
     * </div>
     *
     * @name jcarousel
     * @type jQuery
     * @param Hash o A set of key/value pairs to set as configuration properties.
     * @cat Plugins/jCarousel
     */
    $.fn.jcarousel = function(o) {
        return this.each(function() {
            new $jc(this, o);
        });
    };

    // Default configuration properties.
    var defaults = {
        vertical: false,
        start: 1,
        offset: 1,
        size: null,
        scroll: 3,
        visible: null,
        animation: 'normal',
        easing: 'swing',
        auto: 0,
        wrap: null,
        initCallback: null,
        reloadCallback: null,
        itemLoadCallback: null,
        itemFirstInCallback: null,
        itemFirstOutCallback: null,
        itemLastInCallback: null,
        itemLastOutCallback: null,
        itemVisibleInCallback: null,
        itemVisibleOutCallback: null,
        buttonNextHTML: '<div></div>',
        buttonPrevHTML: '<div></div>',
        buttonNextEvent: 'click',
        buttonPrevEvent: 'click',
        buttonNextCallback: null,
        buttonPrevCallback: null
    };

    /**
     * The jCarousel object.
     *
     * @constructor
     * @name $.jcarousel
     * @param Object e The element to create the carousel for.
     * @param Hash o A set of key/value pairs to set as configuration properties.
     * @cat Plugins/jCarousel
     */
    $.jcarousel = function(e, o) {
        this.options    = $.extend({}, defaults, o || {});

        this.locked     = false;

        this.container  = null;
        this.clip       = null;
        this.list       = null;
        this.buttonNext = null;
        this.buttonPrev = null;

        this.wh = !this.options.vertical ? 'width' : 'height';
        this.lt = !this.options.vertical ? 'left' : 'top';

        // Extract skin class
        var skin = '', split = e.className.split(' ');

        for (var i = 0; i < split.length; i++) {
            if (split[i].indexOf('jcarousel-skin') != -1) {
                $(e).removeClass(split[i]);
                var skin = split[i];
                break;
            }
        }

        if (e.nodeName == 'UL' || e.nodeName == 'OL') {
            this.list = $(e);
            this.container = this.list.parent();

            if (this.container.hasClass('jcarousel-clip')) {
                if (!this.container.parent().hasClass('jcarousel-container'))
                    this.container = this.container.wrap('<div></div>');

                this.container = this.container.parent();
            } else if (!this.container.hasClass('jcarousel-container'))
                this.container = this.list.wrap('<div></div>').parent();
        } else {
            this.container = $(e);
            this.list = $(e).find('>ul,>ol,div>ul,div>ol');
        }

        if (skin != '' && this.container.parent()[0].className.indexOf('jcarousel-skin') == -1)
          this.container.wrap('<div class=" '+ skin + '"></div>');

        this.clip = this.list.parent();

        if (!this.clip.length || !this.clip.hasClass('jcarousel-clip'))
            this.clip = this.list.wrap('<div></div>').parent();

        this.buttonPrev = $('.jcarousel-prev', this.container);

        if (this.buttonPrev.size() == 0 && this.options.buttonPrevHTML != null)
            this.buttonPrev = this.clip.before(this.options.buttonPrevHTML).prev();

        this.buttonPrev.addClass(this.className('jcarousel-prev'));

        this.buttonNext = $('.jcarousel-next', this.container);

        if (this.buttonNext.size() == 0 && this.options.buttonNextHTML != null)
            this.buttonNext = this.clip.before(this.options.buttonNextHTML).prev();

        this.buttonNext.addClass(this.className('jcarousel-next'));

        this.clip.addClass(this.className('jcarousel-clip'));
        this.list.addClass(this.className('jcarousel-list'));
        this.container.addClass(this.className('jcarousel-container'));

        var di = this.options.visible != null ? Math.ceil(this.clipping() / this.options.visible) : null;
        var li = this.list.children('li');

        var self = this;

        if (li.size() > 0) {
            var wh = 0, i = this.options.offset;
            li.each(function() {
                self.format(this, i++);
                wh += self.dimension(this, di);
            });

            this.list.css(this.wh, wh + 'px');

            // Only set if not explicitly passed as option
            if (!o || o.size === undefined)
                this.options.size = li.size();
        }

        // For whatever reason, .show() does not work in Safari...
        this.container.css('display', 'block');
        this.buttonNext.css('display', 'block');
        this.buttonPrev.css('display', 'block');

        this.funcNext   = function() { self.next(); };
        this.funcPrev   = function() { self.prev(); };
        this.funcResize = function() { self.reload(); };

        if (this.options.initCallback != null)
            this.options.initCallback(this, 'init');

        if ($.browser.safari) {
            this.buttons(false, false);
            $(window).bind('load', function() { self.setup(); });
        } else
            this.setup();
    };

    // Create shortcut for internal use
    var $jc = $.jcarousel;

    $jc.fn = $jc.prototype = {
        jcarousel: '0.2.3'
    };

    $jc.fn.extend = $jc.extend = $.extend;

    $jc.fn.extend({
        /**
         * Setups the carousel.
         *
         * @name setup
         * @type undefined
         * @cat Plugins/jCarousel
         */
        setup: function() {
            this.first     = null;
            this.last      = null;
            this.prevFirst = null;
            this.prevLast  = null;
            this.animating = false;
            this.timer     = null;
            this.tail      = null;
            this.inTail    = false;

            if (this.locked)
                return;

            this.list.css(this.lt, this.pos(this.options.offset) + 'px');
            var p = this.pos(this.options.start);
            this.prevFirst = this.prevLast = null;
            this.animate(p, false);

            $(window).unbind('resize', this.funcResize).bind('resize', this.funcResize);
        },

        /**
         * Clears the list and resets the carousel.
         *
         * @name reset
         * @type undefined
         * @cat Plugins/jCarousel
         */
        reset: function() {
            this.list.empty();

            this.list.css(this.lt, '0px');
            this.list.css(this.wh, '10px');

            if (this.options.initCallback != null)
                this.options.initCallback(this, 'reset');

            this.setup();
        },

        /**
         * Reloads the carousel and adjusts positions.
         *
         * @name reload
         * @type undefined
         * @cat Plugins/jCarousel
         */
        reload: function() {
            if (this.tail != null && this.inTail)
                this.list.css(this.lt, $jc.intval(this.list.css(this.lt)) + this.tail);

            this.tail   = null;
            this.inTail = false;

            if (this.options.reloadCallback != null)
                this.options.reloadCallback(this);

            if (this.options.visible != null) {
                var self = this;
                var di = Math.ceil(this.clipping() / this.options.visible), wh = 0, lt = 0;
                $('li', this.list).each(function(i) {
                    wh += self.dimension(this, di);
                    if (i + 1 < self.first)
                        lt = wh;
                });

                this.list.css(this.wh, wh + 'px');
                this.list.css(this.lt, -lt + 'px');
            }

            this.scroll(this.first, false);
        },

        /**
         * Locks the carousel.
         *
         * @name lock
         * @type undefined
         * @cat Plugins/jCarousel
         */
        lock: function() {
            this.locked = true;
            this.buttons();
        },

        /**
         * Unlocks the carousel.
         *
         * @name unlock
         * @type undefined
         * @cat Plugins/jCarousel
         */
        unlock: function() {
            this.locked = false;
            this.buttons();
        },

        /**
         * Sets the size of the carousel.
         *
         * @name size
         * @type undefined
         * @param Number s The size of the carousel.
         * @cat Plugins/jCarousel
         */
        size: function(s) {
            if (s != undefined) {
                this.options.size = s;
                if (!this.locked)
                    this.buttons();
            }

            return this.options.size;
        },

        /**
         * Checks whether a list element exists for the given index (or index range).
         *
         * @name get
         * @type bool
         * @param Number i The index of the (first) element.
         * @param Number i2 The index of the last element.
         * @cat Plugins/jCarousel
         */
        has: function(i, i2) {
            if (i2 == undefined || !i2)
                i2 = i;

            if (this.options.size !== null && i2 > this.options.size)
              i2 = this.options.size;

            for (var j = i; j <= i2; j++) {
                var e = this.get(j);
                if (!e.length || e.hasClass('jcarousel-item-placeholder'))
                    return false;
            }

            return true;
        },

        /**
         * Returns a jQuery object with list element for the given index.
         *
         * @name get
         * @type jQuery
         * @param Number i The index of the element.
         * @cat Plugins/jCarousel
         */
        get: function(i) {
            return $('.jcarousel-item-' + i, this.list);
        },

        /**
         * Adds an element for the given index to the list.
         * If the element already exists, it updates the inner html.
         * Returns the created element as jQuery object.
         *
         * @name add
         * @type jQuery
         * @param Number i The index of the element.
         * @param String s The innerHTML of the element.
         * @cat Plugins/jCarousel
         */
        add: function(i, s) {
            var e = this.get(i), old = 0, add = 0;

            if (e.length == 0) {
                var c, e = this.create(i), j = $jc.intval(i);
                while (c = this.get(--j)) {
                    if (j <= 0 || c.length) {
                        j <= 0 ? this.list.prepend(e) : c.after(e);
                        break;
                    }
                }
            } else
                old = this.dimension(e);

            e.removeClass(this.className('jcarousel-item-placeholder'));
            typeof s == 'string' ? e.html(s) : e.empty().append(s);

            var di = this.options.visible != null ? Math.ceil(this.clipping() / this.options.visible) : null;
            var wh = this.dimension(e, di) - old;

            if (i > 0 && i < this.first)
                this.list.css(this.lt, $jc.intval(this.list.css(this.lt)) - wh + 'px');

            this.list.css(this.wh, $jc.intval(this.list.css(this.wh)) + wh + 'px');

            return e;
        },

        /**
         * Removes an element for the given index from the list.
         *
         * @name remove
         * @type undefined
         * @param Number i The index of the element.
         * @cat Plugins/jCarousel
         */
        remove: function(i) {
            var e = this.get(i);

            // Check if item exists and is not currently visible
            if (!e.length || (i >= this.first && i <= this.last))
                return;

            var d = this.dimension(e);

            if (i < this.first)
                this.list.css(this.lt, $jc.intval(this.list.css(this.lt)) + d + 'px');

            e.remove();

            this.list.css(this.wh, $jc.intval(this.list.css(this.wh)) - d + 'px');
        },

        /**
         * Moves the carousel forwards.
         *
         * @name next
         * @type undefined
         * @cat Plugins/jCarousel
         */
        next: function() {
            this.stopAuto();

            if (this.tail != null && !this.inTail)
                this.scrollTail(false);
            else
                this.scroll(((this.options.wrap == 'both' || this.options.wrap == 'last') && this.options.size != null && this.last == this.options.size) ? 1 : this.first + this.options.scroll);
        },

        /**
         * Moves the carousel backwards.
         *
         * @name prev
         * @type undefined
         * @cat Plugins/jCarousel
         */
        prev: function() {
            this.stopAuto();

            if (this.tail != null && this.inTail)
                this.scrollTail(true);
            else
                this.scroll(((this.options.wrap == 'both' || this.options.wrap == 'first') && this.options.size != null && this.first == 1) ? this.options.size : this.first - this.options.scroll);
        },

        /**
         * Scrolls the tail of the carousel.
         *
         * @name scrollTail
         * @type undefined
         * @param Bool b Whether scroll the tail back or forward.
         * @cat Plugins/jCarousel
         */
        scrollTail: function(b) {
            if (this.locked || this.animating || !this.tail)
                return;

            var pos  = $jc.intval(this.list.css(this.lt));

            !b ? pos -= this.tail : pos += this.tail;
            this.inTail = !b;

            // Save for callbacks
            this.prevFirst = this.first;
            this.prevLast  = this.last;

            this.animate(pos);
        },

        /**
         * Scrolls the carousel to a certain position.
         *
         * @name scroll
         * @type undefined
         * @param Number i The index of the element to scoll to.
         * @param Bool a Flag indicating whether to perform animation.
         * @cat Plugins/jCarousel
         */
        scroll: function(i, a) {
            if (this.locked || this.animating)
                return;

            this.animate(this.pos(i), a);
        },

        /**
         * Prepares the carousel and return the position for a certian index.
         *
         * @name pos
         * @type Number
         * @param Number i The index of the element to scoll to.
         * @cat Plugins/jCarousel
         */
        pos: function(i) {
            if (this.locked || this.animating)
                return;

            i = $jc.intval(i);
            if (this.options.wrap != 'circular')
                i = i < 1 ? 1 : (this.options.size && i > this.options.size ? this.options.size : i);

            var back = this.first > i;
            var pos  = $jc.intval(this.list.css(this.lt));

            // Create placeholders, new list width/height
            // and new list position
            var f = this.options.wrap != 'circular' && this.first <= 1 ? 1 : this.first;
            var c = back ? this.get(f) : this.get(this.last);
            var j = back ? f : f - 1;
            var e = null, l = 0, p = false, d = 0;

            while (back ? --j >= i : ++j < i) {
                e = this.get(j);
                p = !e.length;
                if (e.length == 0) {
                    e = this.create(j).addClass(this.className('jcarousel-item-placeholder'));
                    c[back ? 'before' : 'after' ](e);
                }

                c = e;
                d = this.dimension(e);

                if (p)
                    l += d;

                if (this.first != null && (this.options.wrap == 'circular' || (j >= 1 && (this.options.size == null || j <= this.options.size))))
                    pos = back ? pos + d : pos - d;
            }

            // Calculate visible items
            var clipping = this.clipping();
            var cache = [];
            var visible = 0, j = i, v = 0;
            var c = this.get(i - 1);

            while (++visible) {
                e = this.get(j);
                p = !e.length;
                if (e.length == 0) {
                    e = this.create(j).addClass(this.className('jcarousel-item-placeholder'));
                    // This should only happen on a next scroll
                    c.length == 0 ? this.list.prepend(e) : c[back ? 'before' : 'after' ](e);
                }

                c = e;
                var d = this.dimension(e);
                if (d == 0) {
                    alert('jCarousel: No width/height set for items. This will cause an infinite loop. Aborting...');
                    return 0;
                }

                if (this.options.wrap != 'circular' && this.options.size !== null && j > this.options.size)
                    cache.push(e);
                else if (p)
                    l += d;

                v += d;

                if (v >= clipping)
                    break;

                j++;
            }

             // Remove out-of-range placeholders
            for (var x = 0; x < cache.length; x++)
                cache[x].remove();

            // Resize list
            if (l > 0) {
                this.list.css(this.wh, this.dimension(this.list) + l + 'px');

                if (back) {
                    pos -= l;
                    this.list.css(this.lt, $jc.intval(this.list.css(this.lt)) - l + 'px');
                }
            }

            // Calculate first and last item
            var last = i + visible - 1;
            if (this.options.wrap != 'circular' && this.options.size && last > this.options.size)
                last = this.options.size;

            if (j > last) {
                visible = 0, j = last, v = 0;
                while (++visible) {
                    var e = this.get(j--);
                    if (!e.length)
                        break;
                    v += this.dimension(e);
                    if (v >= clipping)
                        break;
                }
            }

            var first = last - visible + 1;
            if (this.options.wrap != 'circular' && first < 1)
                first = 1;

            if (this.inTail && back) {
                pos += this.tail;
                this.inTail = false;
            }

            this.tail = null;
            if (this.options.wrap != 'circular' && last == this.options.size && (last - visible + 1) >= 1) {
                var m = $jc.margin(this.get(last), !this.options.vertical ? 'marginRight' : 'marginBottom');
                if ((v - m) > clipping)
                    this.tail = v - clipping - m;
            }

            // Adjust position
            while (i-- > first)
                pos += this.dimension(this.get(i));

            // Save visible item range
            this.prevFirst = this.first;
            this.prevLast  = this.last;
            this.first     = first;
            this.last      = last;

            return pos;
        },

        /**
         * Animates the carousel to a certain position.
         *
         * @name animate
         * @type undefined
         * @param mixed p Position to scroll to.
         * @param Bool a Flag indicating whether to perform animation.
         * @cat Plugins/jCarousel
         */
        animate: function(p, a) {
            if (this.locked || this.animating)
                return;

            this.animating = true;

            var self = this;
            var scrolled = function() {
                self.animating = false;

                if (p == 0)
                    self.list.css(self.lt,  0);

                if (self.options.wrap == 'both' || self.options.wrap == 'last' || self.options.size == null || self.last < self.options.size)
                    self.startAuto();

                self.buttons();
                self.notify('onAfterAnimation');
            };

            this.notify('onBeforeAnimation');

            // Animate
            if (!this.options.animation || a == false) {
                this.list.css(this.lt, p + 'px');
                scrolled();
            } else {
                var o = !this.options.vertical ? {'left': p} : {'top': p};
                this.list.animate(o, this.options.animation, this.options.easing, scrolled);
            }
        },

        /**
         * Starts autoscrolling.
         *
         * @name auto
         * @type undefined
         * @param Number s Seconds to periodically autoscroll the content.
         * @cat Plugins/jCarousel
         */
        startAuto: function(s) {
            if (s != undefined)
                this.options.auto = s;

            if (this.options.auto == 0)
                return this.stopAuto();

            if (this.timer != null)
                return;

            var self = this;
            this.timer = setTimeout(function() { self.next(); }, this.options.auto * 1000);
        },

        /**
         * Stops autoscrolling.
         *
         * @name stopAuto
         * @type undefined
         * @cat Plugins/jCarousel
         */
        stopAuto: function() {
            if (this.timer == null)
                return;

            clearTimeout(this.timer);
            this.timer = null;
        },

        /**
         * Sets the states of the prev/next buttons.
         *
         * @name buttons
         * @type undefined
         * @cat Plugins/jCarousel
         */
        buttons: function(n, p) {
            if (n == undefined || n == null) {
                var n = !this.locked && this.options.size !== 0 && ((this.options.wrap && this.options.wrap != 'first') || this.options.size == null || this.last < this.options.size);
                if (!this.locked && (!this.options.wrap || this.options.wrap == 'first') && this.options.size != null && this.last >= this.options.size)
                    n = this.tail != null && !this.inTail;
            }

            if (p == undefined || p == null) {
                var p = !this.locked && this.options.size !== 0 && ((this.options.wrap && this.options.wrap != 'last') || this.first > 1);
                if (!this.locked && (!this.options.wrap || this.options.wrap == 'last') && this.options.size != null && this.first == 1)
                    p = this.tail != null && this.inTail;
            }

            var self = this;

            this.buttonNext[n ? 'bind' : 'unbind'](this.options.buttonNextEvent, this.funcNext)[n ? 'removeClass' : 'addClass'](this.className('jcarousel-next-disabled')).attr('disabled', n ? false : true);
            this.buttonPrev[p ? 'bind' : 'unbind'](this.options.buttonPrevEvent, this.funcPrev)[p ? 'removeClass' : 'addClass'](this.className('jcarousel-prev-disabled')).attr('disabled', p ? false : true);

            if (this.buttonNext.length > 0 && (this.buttonNext[0].jcarouselstate == undefined || this.buttonNext[0].jcarouselstate != n) && this.options.buttonNextCallback != null) {
                this.buttonNext.each(function() { self.options.buttonNextCallback(self, this, n); });
                this.buttonNext[0].jcarouselstate = n;
            }

            if (this.buttonPrev.length > 0 && (this.buttonPrev[0].jcarouselstate == undefined || this.buttonPrev[0].jcarouselstate != p) && this.options.buttonPrevCallback != null) {
                this.buttonPrev.each(function() { self.options.buttonPrevCallback(self, this, p); });
                this.buttonPrev[0].jcarouselstate = p;
            }
        },

        notify: function(evt) {
            var state = this.prevFirst == null ? 'init' : (this.prevFirst < this.first ? 'next' : 'prev');

            // Load items
            this.callback('itemLoadCallback', evt, state);

            if (this.prevFirst !== this.first) {
                this.callback('itemFirstInCallback', evt, state, this.first);
                this.callback('itemFirstOutCallback', evt, state, this.prevFirst);
            }

            if (this.prevLast !== this.last) {
                this.callback('itemLastInCallback', evt, state, this.last);
                this.callback('itemLastOutCallback', evt, state, this.prevLast);
            }

            this.callback('itemVisibleInCallback', evt, state, this.first, this.last, this.prevFirst, this.prevLast);
            this.callback('itemVisibleOutCallback', evt, state, this.prevFirst, this.prevLast, this.first, this.last);
        },

        callback: function(cb, evt, state, i1, i2, i3, i4) {
            if (this.options[cb] == undefined || (typeof this.options[cb] != 'object' && evt != 'onAfterAnimation'))
                return;

            var callback = typeof this.options[cb] == 'object' ? this.options[cb][evt] : this.options[cb];

            if (!$.isFunction(callback))
                return;

            var self = this;

            if (i1 === undefined)
                callback(self, state, evt);
            else if (i2 === undefined)
                this.get(i1).each(function() { callback(self, this, i1, state, evt); });
            else {
                for (var i = i1; i <= i2; i++)
                    if (i !== null && !(i >= i3 && i <= i4))
                        this.get(i).each(function() { callback(self, this, i, state, evt); });
            }
        },

        create: function(i) {
            return this.format('<li></li>', i);
        },

        format: function(e, i) {
            var $e = $(e).addClass(this.className('jcarousel-item')).addClass(this.className('jcarousel-item-' + i));
            $e.attr('jcarouselindex', i);
            return $e;
        },

        className: function(c) {
            return c + ' ' + c + (!this.options.vertical ? '-horizontal' : '-vertical');
        },

        dimension: function(e, d) {
            var el = e.jquery != undefined ? e[0] : e;

            var old = !this.options.vertical ?
                el.offsetWidth + $jc.margin(el, 'marginLeft') + $jc.margin(el, 'marginRight') :
                el.offsetHeight + $jc.margin(el, 'marginTop') + $jc.margin(el, 'marginBottom');

            if (d == undefined || old == d)
                return old;

            var w = !this.options.vertical ?
                d - $jc.margin(el, 'marginLeft') - $jc.margin(el, 'marginRight') :
                d - $jc.margin(el, 'marginTop') - $jc.margin(el, 'marginBottom');

            $(el).css(this.wh, w + 'px');

            return this.dimension(el);
        },

        clipping: function() {
            return !this.options.vertical ?
                this.clip[0].offsetWidth - $jc.intval(this.clip.css('borderLeftWidth')) - $jc.intval(this.clip.css('borderRightWidth')) :
                this.clip[0].offsetHeight - $jc.intval(this.clip.css('borderTopWidth')) - $jc.intval(this.clip.css('borderBottomWidth'));
        },

        index: function(i, s) {
            if (s == undefined)
                s = this.options.size;

            return Math.round((((i-1) / s) - Math.floor((i-1) / s)) * s) + 1;
        }
    });

    $jc.extend({
        /**
         * Gets/Sets the global default configuration properties.
         *
         * @name defaults
         * @descr Gets/Sets the global default configuration properties.
         * @type Hash
         * @param Hash d A set of key/value pairs to set as configuration properties.
         * @cat Plugins/jCarousel
         */
        defaults: function(d) {
            return $.extend(defaults, d || {});
        },

        margin: function(e, p) {
            if (!e)
                return 0;

            var el = e.jquery != undefined ? e[0] : e;

            if (p == 'marginRight' && $.browser.safari) {
                var old = {'display': 'block', 'float': 'none', 'width': 'auto'}, oWidth, oWidth2;

                $.swap(el, old, function() { oWidth = el.offsetWidth; });

                old['marginRight'] = 0;
                $.swap(el, old, function() { oWidth2 = el.offsetWidth; });

                return oWidth2 - oWidth;
            }

            return $jc.intval($.css(el, p));
        },

        intval: function(v) {
            v = parseInt(v);
            return isNaN(v) ? 0 : v;
        }
    });

})(jQuery);


/**
 * reflection.js v1.6 for jquery
 *
 * Contributors: Cow http://cow.neondragon.net
 *               Gfx http://www.jroller.com/page/gfx/
 *               Sitharus http://www.sitharus.com
 *               Andreas Linde http://www.andreaslinde.de
 *               Tralala, coder @ http://www.vbulletin.org
 *               Danny Ferguson, jquery plugin http://www.brendoman.com/dbc
 *
 * Freely distributable under MIT-style license.
 */

jQuery.fn.reflect = function(settings) {
    settings = jQuery.extend({
        height: 0.5,
        opacity: 0.5,
        inline: false
    }, settings);

    this.each( function() {
        var rheight = null;
        var ropacity = null;

        if (settings["inline"])
        {
            var classes = this.className.split(' ');
            for (j=0;j<classes.length;j++) {
                if (classes[j].indexOf("rheight") == 0) {
                    settings["height"] = classes[j].substring(7)/100;
                } else if (classes[j].indexOf("ropacity") == 0) {
                    settings["opacity"] = classes[j].substring(8)/100;
                }
            }
        }

        jQuery.Reflection.add(this, settings);

    })
    return this;
}

jQuery.Reflection = {

    add: function(image, options) {
        jQuery.Reflection.remove(image);

        try {
            var d = document.createElement('div');
            var p = image;

            var classes = p.className.split(' ');
            var newClasses = '';
            for (j=0;j<classes.length;j++) {
                if (classes[j] != "reflect") {
                    if (newClasses) {
                        newClasses += ' '
                    }

                    newClasses += classes[j];
                }
            }

            var reflectionHeight = Math.floor(p.height*options['height']);
            var divHeight = Math.floor(p.height*(1+options['height']));

            var reflectionWidth = p.width;

            if (document.all && !window.opera) {
                /* Copy original image's classes & styles to div */
                d.className = newClasses;
                p.className = 'reflected';

                d.style.cssText = p.style.cssText;
                p.style.cssText = 'vertical-align: bottom';

                var reflection = document.createElement('img');
                reflection.src = p.src;
                reflection.style.width = reflectionWidth+'px';

                reflection.style.marginBottom = "-"+(p.height-reflectionHeight)+'px';
                reflection.style.filter = 'flipv progid:DXImageTransform.Microsoft.Alpha(opacity='+(options['opacity']*100)+', style=1, finishOpacity=0, startx=0, starty=0, finishx=0, finishy='+(options['height']*100)+')';

                d.style.width = reflectionWidth+'px';
                d.style.height = divHeight+'px';
                p.parentNode.replaceChild(d, p);

                d.appendChild(p);
                d.appendChild(reflection);
            } else {
                var canvas = document.createElement('canvas');
                if (canvas.getContext) {
                    /* Copy original image's classes & styles to div */
                    d.className = newClasses;
                    p.className = 'reflected';

                    d.style.cssText = p.style.cssText;
                    p.style.cssText = 'vertical-align: bottom';

                    var context = canvas.getContext("2d");

                    canvas.style.height = reflectionHeight+'px';
                    canvas.style.width = reflectionWidth+'px';
                    canvas.height = reflectionHeight;
                    canvas.width = reflectionWidth;

                    d.style.width = reflectionWidth+'px';
                    d.style.height = divHeight+'px';
                    p.parentNode.replaceChild(d, p);

                    d.appendChild(p);
                    d.appendChild(canvas);

                    context.save();

                    context.translate(0,image.height-1);
                    context.scale(1,-1);

                    context.drawImage(image, 0, 0, reflectionWidth, image.height);

                    context.restore();

                    context.globalCompositeOperation = "destination-out";
                    var gradient = context.createLinearGradient(0, 0, 0, reflectionHeight);

                    gradient.addColorStop(1, "rgba(255, 255, 255, 1.0)");
                    gradient.addColorStop(0, "rgba(255, 255, 255, "+(1-options['opacity'])+")");

                    context.fillStyle = gradient;
                    if (navigator.appVersion.indexOf('WebKit') != -1) {
                        context.fill();
                    } else {
                        context.fillRect(0, 0, reflectionWidth, reflectionHeight*2);
                    }
                }
            }
        } catch (e) {
        }
    },

    remove : function(image) {
        if (image.className == "reflected") {
            image.className = image.parentNode.className;
            image.parentNode.parentNode.replaceChild(image, image.parentNode);
        }
    }
}


//carrousel
CarrouselHPAnimation = function() {  
	if (jQuery("#carouselHomePage").length) {  
  var images = [];
  var imgs = $('#outerContainer > #imageScroller > #viewer > a > img').
   each(function() { $(this).removeAttr('width').removeAttr('height'); }).
   each(function() { images.unshift(this); });
  $('<div></div>').
   attr('id', 'mini_carrousel').
   css({ position: 'absolute', left: '40px', bottom: '30px', width: '660px',
         height: '174px', zIndex: 1000 }).
   insertAfter($('#outerContainer'));
  $('#mini_carrousel').miniCarrousel($(images), {
  
   reflexion: 20,
   margin: 50
  });
  $('#outerContainer').hide();
}
}

//PATH THICKBOX LOADING
var tb_pathToImage = "/wp-content/themes/pageondemand_theme/images/loadingAnimation.gif";

// EXTEND JQUERY SCROLLTO
jQuery.fn.extend({
  scrollTo : function(speed, easing) {
    return this.each(function() {
      var targetOffset = jQuery(this).offset().top;
      jQuery("html,body").animate({scrollTop: targetOffset}, speed, easing);
    });
  }
});

// ACCORDION
sidebarAccordion = function() {   
  if (jQuery("#sidebar").length) {
    var cookieName = "clickedAccordion";
    var options = { path: '/'};
    jQuery("#sidebar h2").bind("click", function(){ 
      var indexAccordion = jQuery("#sidebar").find("h2").index(this);
      $.cookie(cookieName, indexAccordion, options);
    }); 
    var activeAccordion;
    if (($.cookie(cookieName)) == null) {
      activeAccordion = 0;
    } else {
      activeAccordion = parseInt($.cookie(cookieName));
    }
    jQuery("#sidebar").accordion({ 
    active: activeAccordion,
    header: 'h2',
    navigation: false,
    autoheight: true,
    alwaysOpen: true
    }); 
  }
}

// PRODUCTS ACCORDION
productsAccordion = function() { 
  if (jQuery(".accordion").length) {
    jQuery(".accordion").accordion({ 
    active: 0,
    header: 'h2',
    navigation: false,
    autoheight: false,
    alwaysOpen: true
    }); 
  }
}

// SELECT TO DROP DOWN
function tamingSelect()
{
  if(!document.getElementById && !document.createTextNode){return;}

// Classes for the link and the visible dropdown
  var ts_listclass='turnintoselect';    // class to identify ULs
  var count=0;
  var toreplace=new Array();  
/*
  Turn all ULs with the class defined above into dropdown navigations
*/  

  var uls=document.getElementsByTagName('ul');
  for(var i=0;i<uls.length;i++)
  {
    if(ts_check(uls[i],ts_listclass))
    {
      var newform=document.createElement('form');
      var newselect=document.createElement('select');
      for(j=0;j<uls[i].getElementsByTagName('a').length;j++)
      {
        var newopt=document.createElement('option');
        newopt.value=uls[i].getElementsByTagName('a')[j].href;  
        newopt.appendChild(document.createTextNode(uls[i].getElementsByTagName('a')[j].innerHTML)); 
        newselect.appendChild(newopt);
      }
      newselect.onchange=function()
      {
        window.location=this.options[this.selectedIndex].value;
      }
      newform.appendChild(newselect);
      uls[i].parentNode.insertBefore(newform,uls[i]);
      toreplace[count]=uls[i];
      count++;
    }
  }
  for(i=0;i<count;i++){
    toreplace[i].parentNode.removeChild(toreplace[i]);
  }
  function ts_check(o,c)
  {
    return new RegExp('\\b'+c+'\\b').test(o.className);
  }
}

// CARROUSEL PRODUCT LIST
carrouselProductsList = function() {
  if (jQuery("#carousel li").length > 3) {
    jQuery("#carousel").jCarouselLite({
      btnNext: ".next",
      btnPrev: ".prev",
      speed: 600,
      visible: 3
    });
    jQuery(".prev, .next").show();
  }
}

// CARROUSEL PRODUCT PAGE
carrouselProductPage = function() {
  if (jQuery(".sidecontent li").length > 3) {
    jQuery("#carouselProducts").jCarouselLite({
      btnNext: ".arrow-down",
      btnPrev: ".arrow-up",
      speed: 600,
      vertical: true,
      visible: 3
    });
    jQuery(".arrow-down, .arrow-up").show();
  }
}

// FIX 2 COLUMNS HEIGHT
fix2ColsHeight = function() {
  if (jQuery(".inner6 .subcontent").length) {
    var intLeftNavHeight = jQuery(".column").height();
    var intMainContent = jQuery(".inner6 .subcontent").height();
    if (intLeftNavHeight > intMainContent) {
      jQuery(".inner6 .subcontent").css("height",intLeftNavHeight+"px");
    }
  }
}

// ADD PRINT FUNCTION
addPrintFunction = function() {
  if (jQuery(".service .menu2").length) {
    var strPrintTxt = jQuery(".service .menu2").text();
    jQuery(".service .menu2").html("<a href=\"javascript:void(0)\;\" onclick=\"self.print()\;\">"+ strPrintTxt +"</a>");
  }
}

// CHECK FORM - ERROR MESSAGES DECLARATION
var emailDestRequiredErrorMsg,emailDestIncorrectErrorMsg,recoMsgErrorMsg,lastNameErrorMsg,emailFromRequiredErrorMsg,emailFromIncorrectErrorMsg,emailRequiredErrorMsg,emailIncorrectErrorMsg,salutationErrorMsg,firstNameErrorMsg,lastNameErrorMsg,TypeErrorMsg,companyErrorMsg,titleErrorMsg,phoneErrorMsg,countryErrorMsg,choiceErrorMessage,introErrorMessage;

// CONTACT - CHECK FORM
checkFormContact = function() {
  jQuery("#infoform").validate({
    rules: {
      email: {required:true, email:true},   
      salutation: "required",
      first_name: "required",
      last_name: "required",
      Type: "required",
      company: "required",
      title: "required",
      phone: "required",
      "00N200000030vDM": "required",
      "00N20000001DXKF": "required"
    },
    messages: {
      email: {required:emailRequiredErrorMsg, email:emailIncorrectErrorMsg},    
      salutation: salutationErrorMsg,
      first_name: firstNameErrorMsg,
      last_name: lastNameErrorMsg,
      Type: TypeErrorMsg,
      company: companyErrorMsg,
      title: titleErrorMsg,
      phone: phoneErrorMsg,
      "00N200000030vDM": countryErrorMsg,
      "00N20000001DXKF": choiceErrorMessage
    },
    showErrors: function (errors, validator) {
      if (this.errorList.length) {
          jQuery("#errorMessage").fadeIn();
          jQuery("#errorMessage").html(introErrorMessage);
          jQuery("#errorMessage").scrollTo(1000);
      } else {
        jQuery("#errorMessage").hide();
      }
      this.defaultShowErrors();
    },
    focusInvalid: false,
    onfocusin: false,
    onkeyup: false,
    onclick: false,
    onfocusout: false,
    errorLabelContainer: jQuery("#errorMessage")
  });
}

// RECOMMANDATION - CHECK FORM
checkFormRecommandation = function() {
  jQuery("#recommandationForm").validate({
    rules: {
      emailDest: {required:true, email:true},   
      recoMsg: "required",
      last_name: "required",
      emailFrom: {required:true, email:true}
    },
    messages: {
      emailDest: {required:emailDestRequiredErrorMsg, email:emailDestIncorrectErrorMsg},    
      recoMsg: recoMsgErrorMsg,
      last_name: lastNameErrorMsg,
      emailFrom: {required:emailFromRequiredErrorMsg, email:emailFromIncorrectErrorMsg}
    },
    showErrors: function (errors, validator) {
      if (this.errorList.length) {
          jQuery("#errorMessage").fadeIn();
          jQuery("#errorMessage").html(introErrorMessage);
          jQuery("#errorMessage").scrollTo(1000);
      } else {
        jQuery("#errorMessage").hide();
      }
      this.defaultShowErrors();
    },
    focusInvalid: false,
    onfocusin: false,
    onkeyup: false,
    onclick: false,
    onfocusout: false,
    errorLabelContainer: jQuery("#errorMessage")
  });
}

// NEWSLETTER - CHECK FORM
checkFormNewsletter = function() {
  jQuery("#newsletterForm").validate({
    rules: {
      email: {required:true, email:true},   
      salutation: "required",
      first_name: "required",
      last_name: "required",
      Type: "required",
      company: "required",
      "00N200000030vDM": "required"
    },
    messages: {
      email: {required:emailRequiredErrorMsg, email:emailIncorrectErrorMsg},    
      salutation: salutationErrorMsg,
      first_name: firstNameErrorMsg,
      last_name: lastNameErrorMsg,
      Type: TypeErrorMsg,
      company: companyErrorMsg,
      "00N200000030vDM": countryErrorMsg
    },
    showErrors: function (errors, validator) {
      if (this.errorList.length) {
          jQuery("#errorMessage").fadeIn();
          jQuery("#errorMessage").html(introErrorMessage);
          jQuery("#errorMessage").scrollTo(1000);
      } else {
        jQuery("#errorMessage").hide();
      }
      this.defaultShowErrors();
    },
    focusInvalid: false,
    onfocusin: false,
    onkeyup: false,
    onclick: false,
    onfocusout: false,
    errorLabelContainer: jQuery("#errorMessage")
  });
}

// CONTACT PAGE - AFFECT TYPE VALUE & CONTACTBY VALUE TO HIDDEN FIELDS
fillHiddenFieldsContactForm = function() {
  jQuery("#infoform").submit(function () { 
    jQuery("input[name='00N20000001DDMz']").attr("value", jQuery("#Type").val())
    jQuery("input[name='00N20000001rFoK']").attr("value", jQuery("#contactBy").val())
  });
}

// NEWSLETTER PAGE - AFFECT TYPE VALUE TO HIDDEN FIELDS
fillHiddenFieldsNewsletterForm = function() {
  jQuery("#newsletterForm").submit(function () { 
    jQuery("input[name='00N20000001DDMz']").attr("value", jQuery("#Type").val())
  });
}

// CARROUSEL HOME PAGE
carrouselHomePage = function() {
  if (jQuery("#carouselHomePageContent > li").length > 1) {
    jQuery("#carouselHomePageContent").cycle({ 
      fx:     'scrollHorz', 
      speed:   800, 
      timeout: 20000, 
      next:   '#carouselHomePageContent', 
      pause:   1,
      pager:  '.navCarouselHp',
      next:   '.nextCarouselHpItemLink',
      prev:   '.prevCarouselHpItemLink'
    });
    jQuery(".navCarouselHp, .prevCarouselHpItemLink, .prevCarouselHpItem, .nextCarouselHpItemLink, .nextCarouselHpItem").show();

  }
}

// INNERFADE FOOTER HOMEPAGE
innerFadeFooterElements = function() {
  if (jQuery(".visuals").length) {
    jQuery(".menu1 ul,.menu2 ul,.menu3 ul").innerfade({
      speed: 700,
      timeout: 4000,
      type: 'random'
    });
  }
}

// APPEND VISUALS TO CONTENT
appendVisualsToContent = function() {
  if (jQuery("#carouselHomePage").length) {
    jQuery(".visuals").insertAfter("#carouselHomePage");
  } else {
    jQuery(".visuals").insertAfter("#content > .box");
  }
}

//---------------------------- counters
$(function() {
  var image = '/wp-content/themes/pageondemand_theme/images/figures/numbers.png';
  var query_base_url = '/__proxy_cache/proxy.php';
  var title = $('<div/>').addClass('title').
    css({ color: 'rgb(52, 52, 52)' });
  var counter = $('<div/>').addClass('counter').
    css({ fontWeight: 'bold', 'float': 'left' });
  var queries = $([
    'users/count.xml',
    'catalogs/count.xml',
    'pages/preview_count.xml']);
  var counters = $('#countDown').html('').
    append($('<div class="countDownInner">').
      append(counterTitle).
      append(counter.clone()).
      append(title.clone().text(counterItem1)).
      append("<hr />").
      append(counter.clone()).
      append(title.clone().text(counterItem2)).
      append("<hr />").
      append(counter.clone()).
      append(title.clone().text(counterItem3)).
      append("<small>" + counterDate + "</small>")).
    find('.counter').map(function(i) {
      return $(this).miniCounter({ image: image, size: i < 2 ? 4 : 7, value: i < 2 ? '9999' : '9999999' })[0]; });
  var refresh = function(i) {
    var counter = this;
    $.get(query_base_url, { query: queries[i] }, function(data) {
      counter.animateTo($('preview-count, count', data).text());
    }, 'xml');
  };
  var refresh_all = function(callback) {
    counters.each(refresh);
    callback();
  };
  setTimeout(function() {
    refresh_all(function() { setTimeout(refresh_all, 300000); })}, 1500);
});

teamAnimation = function() {

	var marginTopVal,marginLeftVal,imgWidthHoverVal,imgHeightHoverVal,imgWidthDefaultVal,imgHeightDefaultVal;
	jQuery(document).ready(function(){
		jQuery("#team p").hover(function() {
			jQuery(this).parents("div").css({'z-index' : '10'});
			if (jQuery(this).parents("div").hasClass(".small")) {
				marginTopVal = '-25px';
				marginLeftVal = '-21px';
				imgWidthHoverVal =  '42px';
				imgHeightHoverVal =  '50px';
				imgWidthDefaultVal =  '35px';
				imgHeightDefaultVal =  '42px';
			} 
			else if (jQuery(this).parents("div").hasClass(".medium")) {
				marginTopVal = '-51px';
				marginLeftVal = '-43px';
				imgWidthHoverVal =  '86px';
				imgHeightHoverVal =  '103px';
				imgWidthDefaultVal =  '72px';
				imgHeightDefaultVal =  '86px';
			} else if (jQuery(this).parents("div").hasClass(".large")) {
				marginTopVal = '-78px';
				marginLeftVal = '-65px';
				imgWidthHoverVal =  '130px';
				imgHeightHoverVal =  '156px';
				imgWidthDefaultVal =  '109px';
				imgHeightDefaultVal =  '130px';
			}

			jQuery(this).stop().animate({
					marginTop: marginTopVal, 
					marginLeft: marginLeftVal, 
					top: '50%', 
					left: '50%', 
					width: imgWidthHoverVal, 
					height: imgHeightHoverVal
				}, 150);
			jQuery(this).find('img').css({'width' : imgWidthHoverVal, 'height' : imgHeightHoverVal});
			} , function() {
			jQuery(this).stop().animate({
					marginTop: '0', 
					marginLeft: '0',
					top: '0', 
					left: '0', 
					width: imgWidthDefaultVal, 
					height: imgHeightDefaultVal
				}, 150);
			jQuery(this).find('img').css({'width' : imgWidthDefaultVal, 'height' : imgHeightDefaultVal});
			jQuery(this).parents("div").css({'z-index' : '0'});	
		});
		jQuery("#team a").click(function() {
			var getCurrentClass = jQuery(this).attr("class");
			var buildDetailsID = getCurrentClass + 'Details';
			jQuery(".teamDetails").css("display","none");
			jQuery("#"+buildDetailsID+"").css("display","block");
			return false;
		});
		showCEO = function() {
			jQuery("#teampod57Details").css("display","block");
		}
		window.setTimeout(showCEO,1000, true);
		
	});
};


// DOCUMENT READY CALLS
jQuery(document).ready(function(){
  tamingSelect();
  sidebarAccordion();
  carrouselProductsList();
  checkFormContact();
  checkFormRecommandation();
  checkFormNewsletter();
  productsAccordion();
  carrouselProductPage();
  fix2ColsHeight();
  addPrintFunction();
  innerFadeFooterElements();
  fillHiddenFieldsContactForm();
  fillHiddenFieldsNewsletterForm();
  CarrouselHPAnimation();
  carrouselHomePage(); 
  teamAnimation();
});


jQuery(window).load(function(){
  jQuery("#sidebar, li.offScreen, #header turnintoselect, .service li").removeClass("offScreen");
  appendVisualsToContent();
    if (jQuery("#outerContainer").length) {
    jQuery("#outerContainer").css("left","30px");
  }
});


//]]>

