

// Name: External/jquery-1.3.2.min.js  Output: Min

/*
 * 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)})}});
/*
 * 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")}})})();

// Name: External/jQueryUI-1.7/ui.core.js  Output: Min
;jQuery.ui||(function($){var _remove=$.fn.remove,isFF2=$.browser.mozilla&&(parseFloat($.browser.version)<1.9);$.ui={version:"1.7",plugin:{add:function(module,option,set){var proto=$.ui[module].prototype;for(var i in set){proto.plugins[i]=proto.plugins[i]||[];proto.plugins[i].push([option,set[i]]);}},call:function(instance,name,args){var set=instance.plugins[name];if(!set||!instance.element[0].parentNode){return;}
for(var i=0;i<set.length;i++){if(instance.options[set[i][0]]){set[i][1].apply(instance.element,args);}}}},contains:function(a,b){return document.compareDocumentPosition?a.compareDocumentPosition(b)&16:a!==b&&a.contains(b);},hasScroll:function(el,a){if($(el).css('overflow')=='hidden'){return false;}
var scroll=(a&&a=='left')?'scrollLeft':'scrollTop',has=false;if(el[scroll]>0){return true;}
el[scroll]=1;has=(el[scroll]>0);el[scroll]=0;return has;},isOverAxis:function(x,reference,size){return(x>reference)&&(x<(reference+size));},isOver:function(y,x,top,left,height,width){return $.ui.isOverAxis(y,top,height)&&$.ui.isOverAxis(x,left,width);},keyCode:{BACKSPACE:8,CAPS_LOCK:20,COMMA:188,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38}};if(isFF2){var attr=$.attr,removeAttr=$.fn.removeAttr,ariaNS="http://www.w3.org/2005/07/aaa",ariaState=/^aria-/,ariaRole=/^wairole:/;$.attr=function(elem,name,value){var set=value!==undefined;return(name=='role'?(set?attr.call(this,elem,name,"wairole:"+value):(attr.apply(this,arguments)||"").replace(ariaRole,"")):(ariaState.test(name)?(set?elem.setAttributeNS(ariaNS,name.replace(ariaState,"aaa:"),value):attr.call(this,elem,name.replace(ariaState,"aaa:"))):attr.apply(this,arguments)));};$.fn.removeAttr=function(name){return(ariaState.test(name)?this.each(function(){this.removeAttributeNS(ariaNS,name.replace(ariaState,""));}):removeAttr.call(this,name));};}
$.fn.extend({remove:function(){$("*",this).add(this).each(function(){$(this).triggerHandler("remove");});return _remove.apply(this,arguments);},enableSelection:function(){return this.attr('unselectable','off').css('MozUserSelect','').unbind('selectstart.ui');},disableSelection:function(){return this.attr('unselectable','on').css('MozUserSelect','none').bind('selectstart.ui',function(){return false;});},scrollParent:function(){var scrollParent;if(($.browser.msie&&(/(static|relative)/).test(this.css('position')))||(/absolute/).test(this.css('position'))){scrollParent=this.parents().filter(function(){return(/(relative|absolute|fixed)/).test($.curCSS(this,'position',1))&&(/(auto|scroll)/).test($.curCSS(this,'overflow',1)+$.curCSS(this,'overflow-y',1)+$.curCSS(this,'overflow-x',1));}).eq(0);}else{scrollParent=this.parents().filter(function(){return(/(auto|scroll)/).test($.curCSS(this,'overflow',1)+$.curCSS(this,'overflow-y',1)+$.curCSS(this,'overflow-x',1));}).eq(0);}
return(/fixed/).test(this.css('position'))||!scrollParent.length?$(document):scrollParent;}});$.extend($.expr[':'],{data:function(elem,i,match){return!!$.data(elem,match[3]);},focusable:function(element){var nodeName=element.nodeName.toLowerCase(),tabIndex=$.attr(element,'tabindex');return(/input|select|textarea|button|object/.test(nodeName)?!element.disabled:'a'==nodeName||'area'==nodeName?element.href||!isNaN(tabIndex):!isNaN(tabIndex))&&!$(element)['area'==nodeName?'parents':'closest'](':hidden').length;},tabbable:function(element){var tabIndex=$.attr(element,'tabindex');return(isNaN(tabIndex)||tabIndex>=0)&&$(element).is(':focusable');}});function getter(namespace,plugin,method,args){function getMethods(type){var methods=$[namespace][plugin][type]||[];return(typeof methods=='string'?methods.split(/,?\s+/):methods);}
var methods=getMethods('getter');if(args.length==1&&typeof args[0]=='string'){methods=methods.concat(getMethods('getterSetter'));}
return($.inArray(method,methods)!=-1);}
$.widget=function(name,prototype){var namespace=name.split(".")[0];name=name.split(".")[1];$.fn[name]=function(options){var isMethodCall=(typeof options=='string'),args=Array.prototype.slice.call(arguments,1);if(isMethodCall&&options.substring(0,1)=='_'){return this;}
if(isMethodCall&&getter(namespace,name,options,args)){var instance=$.data(this[0],name);return(instance?instance[options].apply(instance,args):undefined);}
return this.each(function(){var instance=$.data(this,name);(!instance&&!isMethodCall&&$.data(this,name,new $[namespace][name](this,options))._init());(instance&&isMethodCall&&$.isFunction(instance[options])&&instance[options].apply(instance,args));});};$[namespace]=$[namespace]||{};$[namespace][name]=function(element,options){var self=this;this.namespace=namespace;this.widgetName=name;this.widgetEventPrefix=$[namespace][name].eventPrefix||name;this.widgetBaseClass=namespace+'-'+name;this.options=$.extend({},$.widget.defaults,$[namespace][name].defaults,$.metadata&&$.metadata.get(element)[name],options);this.element=$(element).bind('setData.'+name,function(event,key,value){if(event.target==element){return self._setData(key,value);}}).bind('getData.'+name,function(event,key){if(event.target==element){return self._getData(key);}}).bind('remove',function(){return self.destroy();});};$[namespace][name].prototype=$.extend({},$.widget.prototype,prototype);$[namespace][name].getterSetter='option';};$.widget.prototype={_init:function(){},destroy:function(){this.element.removeData(this.widgetName).removeClass(this.widgetBaseClass+'-disabled'+' '+this.namespace+'-state-disabled').removeAttr('aria-disabled');},option:function(key,value){var options=key,self=this;if(typeof key=="string"){if(value===undefined){return this._getData(key);}
options={};options[key]=value;}
$.each(options,function(key,value){self._setData(key,value);});},_getData:function(key){return this.options[key];},_setData:function(key,value){this.options[key]=value;if(key=='disabled'){this.element
[value?'addClass':'removeClass'](this.widgetBaseClass+'-disabled'+' '+
this.namespace+'-state-disabled').attr("aria-disabled",value);}},enable:function(){this._setData('disabled',false);},disable:function(){this._setData('disabled',true);},_trigger:function(type,event,data){var callback=this.options[type],eventName=(type==this.widgetEventPrefix?type:this.widgetEventPrefix+type);event=$.Event(event);event.type=eventName;if(event.originalEvent){for(var i=$.event.props.length,prop;i;){prop=$.event.props[--i];event[prop]=event.originalEvent[prop];}}
this.element.trigger(event,data);return!($.isFunction(callback)&&callback.call(this.element[0],event,data)===false||event.isDefaultPrevented());}};$.widget.defaults={disabled:false};$.ui.mouse={_mouseInit:function(){var self=this;this.element.bind('mousedown.'+this.widgetName,function(event){return self._mouseDown(event);}).bind('click.'+this.widgetName,function(event){if(self._preventClickEvent){self._preventClickEvent=false;event.stopImmediatePropagation();return false;}});if($.browser.msie){this._mouseUnselectable=this.element.attr('unselectable');this.element.attr('unselectable','on');}
this.started=false;},_mouseDestroy:function(){this.element.unbind('.'+this.widgetName);($.browser.msie&&this.element.attr('unselectable',this._mouseUnselectable));},_mouseDown:function(event){event.originalEvent=event.originalEvent||{};if(event.originalEvent.mouseHandled){return;}
(this._mouseStarted&&this._mouseUp(event));this._mouseDownEvent=event;var self=this,btnIsLeft=(event.which==1),elIsCancel=(typeof this.options.cancel=="string"?$(event.target).parents().add(event.target).filter(this.options.cancel).length:false);if(!btnIsLeft||elIsCancel||!this._mouseCapture(event)){return true;}
this.mouseDelayMet=!this.options.delay;if(!this.mouseDelayMet){this._mouseDelayTimer=setTimeout(function(){self.mouseDelayMet=true;},this.options.delay);}
if(this._mouseDistanceMet(event)&&this._mouseDelayMet(event)){this._mouseStarted=(this._mouseStart(event)!==false);if(!this._mouseStarted){event.preventDefault();return true;}}
this._mouseMoveDelegate=function(event){return self._mouseMove(event);};this._mouseUpDelegate=function(event){return self._mouseUp(event);};$(document).bind('mousemove.'+this.widgetName,this._mouseMoveDelegate).bind('mouseup.'+this.widgetName,this._mouseUpDelegate);($.browser.safari||event.preventDefault());event.originalEvent.mouseHandled=true;return true;},_mouseMove:function(event){if($.browser.msie&&!event.button){return this._mouseUp(event);}
if(this._mouseStarted){this._mouseDrag(event);return event.preventDefault();}
if(this._mouseDistanceMet(event)&&this._mouseDelayMet(event)){this._mouseStarted=(this._mouseStart(this._mouseDownEvent,event)!==false);(this._mouseStarted?this._mouseDrag(event):this._mouseUp(event));}
return!this._mouseStarted;},_mouseUp:function(event){$(document).unbind('mousemove.'+this.widgetName,this._mouseMoveDelegate).unbind('mouseup.'+this.widgetName,this._mouseUpDelegate);if(this._mouseStarted){this._mouseStarted=false;this._preventClickEvent=(event.target==this._mouseDownEvent.target);this._mouseStop(event);}
return false;},_mouseDistanceMet:function(event){return(Math.max(Math.abs(this._mouseDownEvent.pageX-event.pageX),Math.abs(this._mouseDownEvent.pageY-event.pageY))>=this.options.distance);},_mouseDelayMet:function(event){return this.mouseDelayMet;},_mouseStart:function(event){},_mouseDrag:function(event){},_mouseStop:function(event){},_mouseCapture:function(event){return true;}};$.ui.mouse.defaults={cancel:null,distance:1,delay:0};})(jQuery);

// Name: External/jQueryUI-1.7/ui.draggable.js  Output: Min

(function($){$.widget("ui.draggable",$.extend({},$.ui.mouse,{_init:function(){if(this.options.helper=='original'&&!(/^(?:r|a|f)/).test(this.element.css("position")))
this.element[0].style.position='relative';(this.options.addClasses&&this.element.addClass("ui-draggable"));(this.options.disabled&&this.element.addClass("ui-draggable-disabled"));this._mouseInit();},destroy:function(){if(!this.element.data('draggable'))return;this.element.removeData("draggable").unbind(".draggable").removeClass("ui-draggable"
+" ui-draggable-dragging"
+" ui-draggable-disabled");this._mouseDestroy();},_mouseCapture:function(event){var o=this.options;if(this.helper||o.disabled||$(event.target).is('.ui-resizable-handle'))
return false;this.handle=this._getHandle(event);if(!this.handle)
return false;return true;},_mouseStart:function(event){var o=this.options;this.helper=this._createHelper(event);this._cacheHelperProportions();if($.ui.ddmanager)
$.ui.ddmanager.current=this;this._cacheMargins();this.cssPosition=this.helper.css("position");this.scrollParent=this.helper.scrollParent();this.offset=this.element.offset();this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left};$.extend(this.offset,{click:{left:event.pageX-this.offset.left,top:event.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()});this.originalPosition=this._generatePosition(event);this.originalPageX=event.pageX;this.originalPageY=event.pageY;if(o.cursorAt)
this._adjustOffsetFromHelper(o.cursorAt);if(o.containment)
this._setContainment();this._trigger("start",event);this._cacheHelperProportions();if($.ui.ddmanager&&!o.dropBehaviour)
$.ui.ddmanager.prepareOffsets(this,event);this.helper.addClass("ui-draggable-dragging");this._mouseDrag(event,true);return true;},_mouseDrag:function(event,noPropagation){this.position=this._generatePosition(event);this.positionAbs=this._convertPositionTo("absolute");if(!noPropagation){var ui=this._uiHash();this._trigger('drag',event,ui);this.position=ui.position;}
if(!this.options.axis||this.options.axis!="y")this.helper[0].style.left=this.position.left+'px';if(!this.options.axis||this.options.axis!="x")this.helper[0].style.top=this.position.top+'px';if($.ui.ddmanager)$.ui.ddmanager.drag(this,event);return false;},_mouseStop:function(event){var dropped=false;if($.ui.ddmanager&&!this.options.dropBehaviour)
dropped=$.ui.ddmanager.drop(this,event);if(this.dropped){dropped=this.dropped;this.dropped=false;}
if((this.options.revert=="invalid"&&!dropped)||(this.options.revert=="valid"&&dropped)||this.options.revert===true||($.isFunction(this.options.revert)&&this.options.revert.call(this.element,dropped))){var self=this;$(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){self._trigger("stop",event);self._clear();});}else{this._trigger("stop",event);this._clear();}
return false;},_getHandle:function(event){var handle=!this.options.handle||!$(this.options.handle,this.element).length?true:false;$(this.options.handle,this.element).find("*").andSelf().each(function(){if(this==event.target)handle=true;});return handle;},_createHelper:function(event){var o=this.options;var helper=$.isFunction(o.helper)?$(o.helper.apply(this.element[0],[event])):(o.helper=='clone'?this.element.clone():this.element);if(!helper.parents('body').length)
helper.appendTo((o.appendTo=='parent'?this.element[0].parentNode:o.appendTo));if(helper[0]!=this.element[0]&&!(/(fixed|absolute)/).test(helper.css("position")))
helper.css("position","absolute");return helper;},_adjustOffsetFromHelper:function(obj){if(obj.left!=undefined)this.offset.click.left=obj.left+this.margins.left;if(obj.right!=undefined)this.offset.click.left=this.helperProportions.width-obj.right+this.margins.left;if(obj.top!=undefined)this.offset.click.top=obj.top+this.margins.top;if(obj.bottom!=undefined)this.offset.click.top=this.helperProportions.height-obj.bottom+this.margins.top;},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var po=this.offsetParent.offset();if(this.cssPosition=='absolute'&&this.scrollParent[0]!=document&&$.ui.contains(this.scrollParent[0],this.offsetParent[0])){po.left+=this.scrollParent.scrollLeft();po.top+=this.scrollParent.scrollTop();}
if((this.offsetParent[0]==document.body)||(this.offsetParent[0].tagName&&this.offsetParent[0].tagName.toLowerCase()=='html'&&$.browser.msie))
po={top:0,left:0};return{top:po.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:po.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)};},_getRelativeOffset:function(){if(this.cssPosition=="relative"){var p=this.element.position();return{top:p.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:p.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()};}else{return{top:0,left:0};}},_cacheMargins:function(){this.margins={left:(parseInt(this.element.css("marginLeft"),10)||0),top:(parseInt(this.element.css("marginTop"),10)||0)};},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()};},_setContainment:function(){var o=this.options;if(o.containment=='parent')o.containment=this.helper[0].parentNode;if(o.containment=='document'||o.containment=='window')this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,$(o.containment=='document'?document:window).width()-this.helperProportions.width-this.margins.left,($(o.containment=='document'?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top];if(!(/^(document|window|parent)$/).test(o.containment)&&o.containment.constructor!=Array){var ce=$(o.containment)[0];if(!ce)return;var co=$(o.containment).offset();var over=($(ce).css("overflow")!='hidden');this.containment=[co.left+(parseInt($(ce).css("borderLeftWidth"),10)||0)+(parseInt($(ce).css("paddingLeft"),10)||0)-this.margins.left,co.top+(parseInt($(ce).css("borderTopWidth"),10)||0)+(parseInt($(ce).css("paddingTop"),10)||0)-this.margins.top,co.left+(over?Math.max(ce.scrollWidth,ce.offsetWidth):ce.offsetWidth)-(parseInt($(ce).css("borderLeftWidth"),10)||0)-(parseInt($(ce).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,co.top+(over?Math.max(ce.scrollHeight,ce.offsetHeight):ce.offsetHeight)-(parseInt($(ce).css("borderTopWidth"),10)||0)-(parseInt($(ce).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top];}else if(o.containment.constructor==Array){this.containment=o.containment;}},_convertPositionTo:function(d,pos){if(!pos)pos=this.position;var mod=d=="absolute"?1:-1;var o=this.options,scroll=this.cssPosition=='absolute'&&!(this.scrollParent[0]!=document&&$.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,scrollIsRootNode=(/(html|body)/i).test(scroll[0].tagName);return{top:(pos.top
+this.offset.relative.top*mod
+this.offset.parent.top*mod
-($.browser.safari&&this.cssPosition=='fixed'?0:(this.cssPosition=='fixed'?-this.scrollParent.scrollTop():(scrollIsRootNode?0:scroll.scrollTop()))*mod)),left:(pos.left
+this.offset.relative.left*mod
+this.offset.parent.left*mod
-($.browser.safari&&this.cssPosition=='fixed'?0:(this.cssPosition=='fixed'?-this.scrollParent.scrollLeft():scrollIsRootNode?0:scroll.scrollLeft())*mod))};},_generatePosition:function(event){var o=this.options,scroll=this.cssPosition=='absolute'&&!(this.scrollParent[0]!=document&&$.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,scrollIsRootNode=(/(html|body)/i).test(scroll[0].tagName);if(this.cssPosition=='relative'&&!(this.scrollParent[0]!=document&&this.scrollParent[0]!=this.offsetParent[0])){this.offset.relative=this._getRelativeOffset();}
var pageX=event.pageX;var pageY=event.pageY;if(this.originalPosition){if(this.containment){if(event.pageX-this.offset.click.left<this.containment[0])pageX=this.containment[0]+this.offset.click.left;if(event.pageY-this.offset.click.top<this.containment[1])pageY=this.containment[1]+this.offset.click.top;if(event.pageX-this.offset.click.left>this.containment[2])pageX=this.containment[2]+this.offset.click.left;if(event.pageY-this.offset.click.top>this.containment[3])pageY=this.containment[3]+this.offset.click.top;}
if(o.grid){var top=this.originalPageY+Math.round((pageY-this.originalPageY)/o.grid[1])*o.grid[1];pageY=this.containment?(!(top-this.offset.click.top<this.containment[1]||top-this.offset.click.top>this.containment[3])?top:(!(top-this.offset.click.top<this.containment[1])?top-o.grid[1]:top+o.grid[1])):top;var left=this.originalPageX+Math.round((pageX-this.originalPageX)/o.grid[0])*o.grid[0];pageX=this.containment?(!(left-this.offset.click.left<this.containment[0]||left-this.offset.click.left>this.containment[2])?left:(!(left-this.offset.click.left<this.containment[0])?left-o.grid[0]:left+o.grid[0])):left;}}
return{top:(pageY
-this.offset.click.top
-this.offset.relative.top
-this.offset.parent.top
+($.browser.safari&&this.cssPosition=='fixed'?0:(this.cssPosition=='fixed'?-this.scrollParent.scrollTop():(scrollIsRootNode?0:scroll.scrollTop())))),left:(pageX
-this.offset.click.left
-this.offset.relative.left
-this.offset.parent.left
+($.browser.safari&&this.cssPosition=='fixed'?0:(this.cssPosition=='fixed'?-this.scrollParent.scrollLeft():scrollIsRootNode?0:scroll.scrollLeft())))};},_clear:function(){this.helper.removeClass("ui-draggable-dragging");if(this.helper[0]!=this.element[0]&&!this.cancelHelperRemoval)this.helper.remove();this.helper=null;this.cancelHelperRemoval=false;},_trigger:function(type,event,ui){ui=ui||this._uiHash();$.ui.plugin.call(this,type,[event,ui]);if(type=="drag")this.positionAbs=this._convertPositionTo("absolute");return $.widget.prototype._trigger.call(this,type,event,ui);},plugins:{},_uiHash:function(event){return{helper:this.helper,position:this.position,absolutePosition:this.positionAbs,offset:this.positionAbs};}}));$.extend($.ui.draggable,{version:"1.7",eventPrefix:"drag",defaults:{addClasses:true,appendTo:"parent",axis:false,cancel:":input,option",connectToSortable:false,containment:false,cursor:"auto",cursorAt:false,delay:0,distance:1,grid:false,handle:false,helper:"original",iframeFix:false,opacity:false,refreshPositions:false,revert:false,revertDuration:500,scope:"default",scroll:true,scrollSensitivity:20,scrollSpeed:20,snap:false,snapMode:"both",snapTolerance:20,stack:false,zIndex:false}});$.ui.plugin.add("draggable","connectToSortable",{start:function(event,ui){var inst=$(this).data("draggable"),o=inst.options,uiSortable=$.extend({},ui,{item:inst.element});inst.sortables=[];$(o.connectToSortable).each(function(){var sortable=$.data(this,'sortable');if(sortable&&!sortable.options.disabled){inst.sortables.push({instance:sortable,shouldRevert:sortable.options.revert});sortable._refreshItems();sortable._trigger("activate",event,uiSortable);}});},stop:function(event,ui){var inst=$(this).data("draggable"),uiSortable=$.extend({},ui,{item:inst.element});$.each(inst.sortables,function(){if(this.instance.isOver){this.instance.isOver=0;inst.cancelHelperRemoval=true;this.instance.cancelHelperRemoval=false;if(this.shouldRevert)this.instance.options.revert=true;this.instance._mouseStop(event);this.instance.options.helper=this.instance.options._helper;if(inst.options.helper=='original')
this.instance.currentItem.css({top:'auto',left:'auto'});}else{this.instance.cancelHelperRemoval=false;this.instance._trigger("deactivate",event,uiSortable);}});},drag:function(event,ui){var inst=$(this).data("draggable"),self=this;var checkPos=function(o){var dyClick=this.offset.click.top,dxClick=this.offset.click.left;var helperTop=this.positionAbs.top,helperLeft=this.positionAbs.left;var itemHeight=o.height,itemWidth=o.width;var itemTop=o.top,itemLeft=o.left;return $.ui.isOver(helperTop+dyClick,helperLeft+dxClick,itemTop,itemLeft,itemHeight,itemWidth);};$.each(inst.sortables,function(i){this.instance.positionAbs=inst.positionAbs;this.instance.helperProportions=inst.helperProportions;this.instance.offset.click=inst.offset.click;if(this.instance._intersectsWith(this.instance.containerCache)){if(!this.instance.isOver){this.instance.isOver=1;this.instance.currentItem=$(self).clone().appendTo(this.instance.element).data("sortable-item",true);this.instance.options._helper=this.instance.options.helper;this.instance.options.helper=function(){return ui.helper[0];};event.target=this.instance.currentItem[0];this.instance._mouseCapture(event,true);this.instance._mouseStart(event,true,true);this.instance.offset.click.top=inst.offset.click.top;this.instance.offset.click.left=inst.offset.click.left;this.instance.offset.parent.left-=inst.offset.parent.left-this.instance.offset.parent.left;this.instance.offset.parent.top-=inst.offset.parent.top-this.instance.offset.parent.top;inst._trigger("toSortable",event);inst.dropped=this.instance.element;inst.currentItem=inst.element;this.instance.fromOutside=inst;}
if(this.instance.currentItem)this.instance._mouseDrag(event);}else{if(this.instance.isOver){this.instance.isOver=0;this.instance.cancelHelperRemoval=true;this.instance.options.revert=false;this.instance._trigger('out',event,this.instance._uiHash(this.instance));this.instance._mouseStop(event,true);this.instance.options.helper=this.instance.options._helper;this.instance.currentItem.remove();if(this.instance.placeholder)this.instance.placeholder.remove();inst._trigger("fromSortable",event);inst.dropped=false;}};});}});$.ui.plugin.add("draggable","cursor",{start:function(event,ui){var t=$('body'),o=$(this).data('draggable').options;if(t.css("cursor"))o._cursor=t.css("cursor");t.css("cursor",o.cursor);},stop:function(event,ui){var o=$(this).data('draggable').options;if(o._cursor)$('body').css("cursor",o._cursor);}});$.ui.plugin.add("draggable","iframeFix",{start:function(event,ui){var o=$(this).data('draggable').options;$(o.iframeFix===true?"iframe":o.iframeFix).each(function(){$('<div class="ui-draggable-iframeFix" style="background: #fff;"></div>').css({width:this.offsetWidth+"px",height:this.offsetHeight+"px",position:"absolute",opacity:"0.001",zIndex:1000}).css($(this).offset()).appendTo("body");});},stop:function(event,ui){$("div.ui-draggable-iframeFix").each(function(){this.parentNode.removeChild(this);});}});$.ui.plugin.add("draggable","opacity",{start:function(event,ui){var t=$(ui.helper),o=$(this).data('draggable').options;if(t.css("opacity"))o._opacity=t.css("opacity");t.css('opacity',o.opacity);},stop:function(event,ui){var o=$(this).data('draggable').options;if(o._opacity)$(ui.helper).css('opacity',o._opacity);}});$.ui.plugin.add("draggable","scroll",{start:function(event,ui){var i=$(this).data("draggable");if(i.scrollParent[0]!=document&&i.scrollParent[0].tagName!='HTML')i.overflowOffset=i.scrollParent.offset();},drag:function(event,ui){var i=$(this).data("draggable"),o=i.options,scrolled=false;if(i.scrollParent[0]!=document&&i.scrollParent[0].tagName!='HTML'){if(!o.axis||o.axis!='x'){if((i.overflowOffset.top+i.scrollParent[0].offsetHeight)-event.pageY<o.scrollSensitivity)
i.scrollParent[0].scrollTop=scrolled=i.scrollParent[0].scrollTop+o.scrollSpeed;else if(event.pageY-i.overflowOffset.top<o.scrollSensitivity)
i.scrollParent[0].scrollTop=scrolled=i.scrollParent[0].scrollTop-o.scrollSpeed;}
if(!o.axis||o.axis!='y'){if((i.overflowOffset.left+i.scrollParent[0].offsetWidth)-event.pageX<o.scrollSensitivity)
i.scrollParent[0].scrollLeft=scrolled=i.scrollParent[0].scrollLeft+o.scrollSpeed;else if(event.pageX-i.overflowOffset.left<o.scrollSensitivity)
i.scrollParent[0].scrollLeft=scrolled=i.scrollParent[0].scrollLeft-o.scrollSpeed;}}else{if(!o.axis||o.axis!='x'){if(event.pageY-$(document).scrollTop()<o.scrollSensitivity)
scrolled=$(document).scrollTop($(document).scrollTop()-o.scrollSpeed);else if($(window).height()-(event.pageY-$(document).scrollTop())<o.scrollSensitivity)
scrolled=$(document).scrollTop($(document).scrollTop()+o.scrollSpeed);}
if(!o.axis||o.axis!='y'){if(event.pageX-$(document).scrollLeft()<o.scrollSensitivity)
scrolled=$(document).scrollLeft($(document).scrollLeft()-o.scrollSpeed);else if($(window).width()-(event.pageX-$(document).scrollLeft())<o.scrollSensitivity)
scrolled=$(document).scrollLeft($(document).scrollLeft()+o.scrollSpeed);}}
if(scrolled!==false&&$.ui.ddmanager&&!o.dropBehaviour)
$.ui.ddmanager.prepareOffsets(i,event);}});$.ui.plugin.add("draggable","snap",{start:function(event,ui){var i=$(this).data("draggable"),o=i.options;i.snapElements=[];$(o.snap.constructor!=String?(o.snap.items||':data(draggable)'):o.snap).each(function(){var $t=$(this);var $o=$t.offset();if(this!=i.element[0])i.snapElements.push({item:this,width:$t.outerWidth(),height:$t.outerHeight(),top:$o.top,left:$o.left});});},drag:function(event,ui){var inst=$(this).data("draggable"),o=inst.options;var d=o.snapTolerance;var x1=ui.offset.left,x2=x1+inst.helperProportions.width,y1=ui.offset.top,y2=y1+inst.helperProportions.height;for(var i=inst.snapElements.length-1;i>=0;i--){var l=inst.snapElements[i].left,r=l+inst.snapElements[i].width,t=inst.snapElements[i].top,b=t+inst.snapElements[i].height;if(!((l-d<x1&&x1<r+d&&t-d<y1&&y1<b+d)||(l-d<x1&&x1<r+d&&t-d<y2&&y2<b+d)||(l-d<x2&&x2<r+d&&t-d<y1&&y1<b+d)||(l-d<x2&&x2<r+d&&t-d<y2&&y2<b+d))){if(inst.snapElements[i].snapping)(inst.options.snap.release&&inst.options.snap.release.call(inst.element,event,$.extend(inst._uiHash(),{snapItem:inst.snapElements[i].item})));inst.snapElements[i].snapping=false;continue;}
if(o.snapMode!='inner'){var ts=Math.abs(t-y2)<=d;var bs=Math.abs(b-y1)<=d;var ls=Math.abs(l-x2)<=d;var rs=Math.abs(r-x1)<=d;if(ts)ui.position.top=inst._convertPositionTo("relative",{top:t-inst.helperProportions.height,left:0}).top-inst.margins.top;if(bs)ui.position.top=inst._convertPositionTo("relative",{top:b,left:0}).top-inst.margins.top;if(ls)ui.position.left=inst._convertPositionTo("relative",{top:0,left:l-inst.helperProportions.width}).left-inst.margins.left;if(rs)ui.position.left=inst._convertPositionTo("relative",{top:0,left:r}).left-inst.margins.left;}
var first=(ts||bs||ls||rs);if(o.snapMode!='outer'){var ts=Math.abs(t-y1)<=d;var bs=Math.abs(b-y2)<=d;var ls=Math.abs(l-x1)<=d;var rs=Math.abs(r-x2)<=d;if(ts)ui.position.top=inst._convertPositionTo("relative",{top:t,left:0}).top-inst.margins.top;if(bs)ui.position.top=inst._convertPositionTo("relative",{top:b-inst.helperProportions.height,left:0}).top-inst.margins.top;if(ls)ui.position.left=inst._convertPositionTo("relative",{top:0,left:l}).left-inst.margins.left;if(rs)ui.position.left=inst._convertPositionTo("relative",{top:0,left:r-inst.helperProportions.width}).left-inst.margins.left;}
if(!inst.snapElements[i].snapping&&(ts||bs||ls||rs||first))
(inst.options.snap.snap&&inst.options.snap.snap.call(inst.element,event,$.extend(inst._uiHash(),{snapItem:inst.snapElements[i].item})));inst.snapElements[i].snapping=(ts||bs||ls||rs||first);};}});$.ui.plugin.add("draggable","stack",{start:function(event,ui){var o=$(this).data("draggable").options;var group=$.makeArray($(o.stack.group)).sort(function(a,b){return(parseInt($(a).css("zIndex"),10)||o.stack.min)-(parseInt($(b).css("zIndex"),10)||o.stack.min);});$(group).each(function(i){this.style.zIndex=o.stack.min+i;});this[0].style.zIndex=o.stack.min+group.length;}});$.ui.plugin.add("draggable","zIndex",{start:function(event,ui){var t=$(ui.helper),o=$(this).data("draggable").options;if(t.css("zIndex"))o._zIndex=t.css("zIndex");t.css('zIndex',o.zIndex);},stop:function(event,ui){var o=$(this).data("draggable").options;if(o._zIndex)$(ui.helper).css('zIndex',o._zIndex);}});})(jQuery);

// Name: External/jquery.suggest.js  Output: Min

(function($){$.suggest=function(input,options){var $input=$(input).attr("autocomplete","off");var $results=$(document.createElement("div"));var $currentTypedSearch="";var timeout=false;var prevLength=-1;var cache=[];var cacheSize=0;$results.addClass(options.resultsClass).appendTo('body');resetPosition();$(window).load(resetPosition).resize(resetPosition);$input.blur(function(){setTimeout(function(){$results.hide()},200);});if($results.bgiframe)$results.bgiframe();if($.browser.mozilla)
$input.keypress(processKey);else
$input.keydown(processKey);function resetPosition(){var offset=$input.offset();$results.css({top:(offset.top+input.offsetHeight)+'px',left:offset.left+'px'});}
function processKey(e){if((/27$|38$|40$/.test(e.keyCode)&&$results.is(':visible'))||(/^13$|^9$/.test(e.keyCode)&&getCurrentResult())){if(e.preventDefault)
e.preventDefault();if(e.stopPropagation)
e.stopPropagation();e.cancelBubble=true;e.returnValue=false;switch(e.keyCode){case 38:prevResult();break;case 40:nextResult();break;case 9:case 13:selectCurrentResult();QuickSearch.searchUrl+="&suggest=1";QuickSearch.submit(e);break;case 27:$input.val($currentTypedSearch);$results.hide();break;}}else if($input.val().length!=prevLength){if(timeout)
clearTimeout(timeout);timeout=setTimeout(suggest,options.delay);prevLength=$input.val().length;}}
function suggest(){$currentTypedSearch=$input.val();var q=$input.val();var lastChar=q.substring(q.length-1);q=$.trim(q);if(lastChar==" "){q=q+lastChar;}
var c=$input.parents("div").children("select:eq(0)").val();var l="en";if(Languages.isFrench())l="fr";if(q.length>=options.minchars){cached=checkCache(q,c,l);if(cached){displayItems(cached['items']);}else{$.ajax({type:"GET",url:options.source,data:{q:q,c:c,l:l},global:false,success:function(txt){$results.hide();var items=parseTxt(txt,q);displayItems(items);addToCache(q,items,txt.length,c,l);}});}}else{$results.hide();}}
function checkCache(q,c,l){for(var i=0;i<cache.length;i++)
if(cache[i]['q']==q&&cache[i]['c']==c&&cache[i]['l']==l){cache.unshift(cache.splice(i,1)[0]);return cache[0];}
return false;}
function addToCache(q,items,size,c,l){while(cache.length&&(cacheSize+size>options.maxCacheSize)){var cached=cache.pop();cacheSize-=cached['size'];}
cache.push({q:q,c:c,l:l,size:size,items:items});cacheSize+=size;}
function displayItems(items){if(!items)
return;if(!items.length){$results.hide();return;}
var itemsTextLimit=50;var html='<ul>';var dispTextVal="";var dispLineLimit=items.length;if(dispLineLimit>10)dispLineLimit=10;for(var i=0;i<dispLineLimit;i++){dispTextVal=items[i];if(items[i].length>itemsTextLimit)
dispTextVal=items[i].substr(0,itemsTextLimit)+"...";html+='<li origText="'+items[i]+'">'+dispTextVal+'</li>';}
html+='</ul><div class="THdropShadowOuter"><div class="THdropShadowBottomLeft"></div></div>';$results.html(html).show();$results.children('ul').children('li').mouseover(function(){$results.children('ul').children('li').removeClass(options.selectClass);$(this).addClass(options.selectClass);}).click(function(e){e.preventDefault();e.stopPropagation();selectCurrentResult();QuickSearch.searchUrl+="&suggest=1";QuickSearch.submit(e);});}
function parseTxt(txt,q){var items=[];var tokens=txt.split(options.delimiter);for(var i=0;i<tokens.length;i++){var token=$.trim(tokens[i]);if(token){token=token.replace(new RegExp(q,'ig'),function(q){return q});items[items.length]=token;}}
return items;}
function getCurrentResult(){if(!$results.is(':visible'))
return false;var $currentResult=$results.children('ul').children('li.'+options.selectClass);if(!$currentResult.length)
$currentResult=false;return $currentResult;}
function selectCurrentResult(){$currentResult=getCurrentResult();if($currentResult){$input.val($currentResult.attr("origText"));$results.hide();if(options.onSelect)
options.onSelect.apply($input[0]);}}
function nextResult(){$currentResult=getCurrentResult();if($currentResult){$currentResult.removeClass(options.selectClass).next().addClass(options.selectClass);var inputTextReplace=$results.children('ul').children('li.'+options.selectClass).attr('origText');if(inputTextReplace==""){$input.val($currentTypedSearch);}else{$input.val(inputTextReplace);}}else{$input.val($results.children('ul').children('li:first-child').text());$results.children('ul').children('li:first-child').addClass(options.selectClass);}}
function prevResult(){$currentResult=getCurrentResult();if($currentResult){$currentResult.removeClass(options.selectClass).prev().addClass(options.selectClass);var inputTextReplace=$results.children('ul').children('li.'+options.selectClass).attr('origText');if(inputTextReplace==""){$input.val($currentTypedSearch);}else{$input.val(inputTextReplace);}}else{$input.val($results.children('ul').children('li:last-child').text());$results.children('ul').children('li:last-child').addClass(options.selectClass);}}}
$.fn.suggest=function(source,options){if(!source)
return;options=options||{};options.source=source;options.delay=options.delay||250;options.resultsClass=options.resultsClass||'ac_results';options.selectClass=options.selectClass||'ac_over';options.matchClass=options.matchClass||'ac_match';options.minchars=options.minchars||3;options.delimiter=options.delimiter||'\n';options.onSelect=options.onSelect||false;options.maxCacheSize=options.maxCacheSize||65536;this.each(function(){new $.suggest(this,options);});return this;};})(jQuery);

// Name: External/jquery.cookies.2.1.0.min.js  Output: Min

/**
 * Copyright (c) 2005 - 2009, James Auldridge
 * All rights reserved.
 *
 * Licensed under the BSD, MIT, and GPL (your choice!) Licenses:
 *  http://code.google.com/p/cookies/wiki/License
 *
 */
var jaaulde=window.jaaulde||{};jaaulde.utils=jaaulde.utils||{};jaaulde.utils.cookies=(function()
{var cookies=[];var defaultOptions={hoursToLive:null,path:'/',domain:null,secure:false};var resolveOptions=function(options)
{var returnValue;if(typeof options!=='object'||options===null)
{returnValue=defaultOptions;}
else
{returnValue={hoursToLive:(typeof options.hoursToLive==='number'&&options.hoursToLive!==0?options.hoursToLive:defaultOptions.hoursToLive),path:(typeof options.path==='string'&&options.path!==''?options.path:defaultOptions.path),domain:(typeof options.domain==='string'&&options.domain!==''?options.domain:defaultOptions.domain),secure:(typeof options.secure==='boolean'&&options.secure?options.secure:defaultOptions.secure)};}
return returnValue;};var expiresGMTString=function(hoursToLive)
{var dateObject=new Date();dateObject.setTime(dateObject.getTime()+(hoursToLive*60*60*1000));return dateObject.toGMTString();};var assembleOptionsString=function(options)
{options=resolveOptions(options);return((typeof options.hoursToLive==='number'?'; expires='+expiresGMTString(options.hoursToLive):'')+'; path='+options.path+
(typeof options.domain==='string'?'; domain='+options.domain:'')+
(options.secure===true?'; secure':''));};var splitCookies=function()
{cookies={};var pair,name,value,separated=document.cookie.split(';');for(var i=0;i<separated.length;i=i+1)
{pair=separated[i].split('=');name=pair[0].replace(/^\s*/,'').replace(/\s*$/,'');value=decodeURIComponent(pair[1]);cookies[name]=value;}
return cookies;};var constructor=function(){};constructor.prototype.get=function(cookieName)
{var returnValue;splitCookies();if(typeof cookieName==='string')
{returnValue=(typeof cookies[cookieName]!=='undefined')?cookies[cookieName]:null;}
else if(typeof cookieName==='object'&&cookieName!==null)
{returnValue={};for(var item in cookieName)
{if(typeof cookies[cookieName[item]]!=='undefined')
{returnValue[cookieName[item]]=cookies[cookieName[item]];}
else
{returnValue[cookieName[item]]=null;}}}
else
{returnValue=cookies;}
return returnValue;};constructor.prototype.filter=function(cookieNameRegExp)
{var returnValue={};splitCookies();if(typeof cookieNameRegExp==='string')
{cookieNameRegExp=new RegExp(cookieNameRegExp);}
for(var cookieName in cookies)
{if(cookieName.match(cookieNameRegExp))
{returnValue[cookieName]=cookies[cookieName];}}
return returnValue;};constructor.prototype.set=function(cookieName,value,options)
{if(typeof value==='undefined'||value===null)
{if(typeof options!=='object'||options===null)
{options={};}
value='';options.hoursToLive=-8760;}
var optionsString=assembleOptionsString(options);document.cookie=cookieName+'='+encodeURIComponent(value)+optionsString;};constructor.prototype.del=function(cookieName,options)
{var allCookies={};if(typeof options!=='object'||options===null)
{options={};}
if(typeof cookieName==='boolean'&&cookieName===true)
{allCookies=this.get();}
else if(typeof cookieName==='string')
{allCookies[cookieName]=true;}
for(var name in allCookies)
{if(typeof name==='string'&&name!=='')
{this.set(name,null,options);}}};constructor.prototype.test=function()
{var returnValue=false,testName='cT',testValue='data';this.set(testName,testValue);if(this.get(testName)===testValue)
{this.del(testName);returnValue=true;}
return returnValue;};constructor.prototype.setOptions=function(options)
{if(typeof options!=='object')
{options=null;}
defaultOptions=resolveOptions(options);};return new constructor();})();(function()
{if(window.jQuery)
{(function($)
{$.cookies=jaaulde.utils.cookies;var extensions={cookify:function(options)
{return this.each(function()
{var i,resolvedName=false,resolvedValue=false,name='',value='',nameAttrs=['name','id'],nodeName,inputType;for(i in nameAttrs)
{if(!isNaN(i))
{name=$(this).attr(nameAttrs[i]);if(typeof name==='string'&&name!=='')
{resolvedName=true;break;}}}
if(resolvedName)
{nodeName=this.nodeName.toLowerCase();if(nodeName!=='input'&&nodeName!=='textarea'&&nodeName!=='select'&&nodeName!=='img')
{value=$(this).html();resolvedValue=true;}
else
{inputType=$(this).attr('type');if(typeof inputType==='string'&&inputType!=='')
{inputType=inputType.toLowerCase();}
if(inputType!=='radio'&&inputType!=='checkbox')
{value=$(this).val();resolvedValue=true;}}
if(resolvedValue)
{if(typeof value!=='string'||value==='')
{value=null;}
$.cookies.set(name,value,options);}}});},cookieFill:function()
{return this.each(function()
{var i,resolvedName=false,name='',value,nameAttrs=['name','id'],iteration=0,nodeName;for(i in nameAttrs)
{if(!isNaN(i))
{name=$(this).attr(nameAttrs[i]);if(typeof name==='string'&&name!=='')
{resolvedName=true;break;}}}
if(resolvedName)
{value=$.cookies.get(name);if(value!==null)
{nodeName=this.nodeName.toLowerCase();if(nodeName==='input'||nodeName==='textarea'||nodeName==='select')
{$(this).val(value);}
else
{$(this).html(value);}}}
iteration=0;});},cookieBind:function(options)
{return this.each(function()
{$(this).cookieFill().change(function()
{$(this).cookify(options);});});}};$.each(extensions,function(i)
{$.fn[i]=this;});})(window.jQuery);}})();

// Name: Common.js  Output: Min

Function.prototype.bindAsEventListener=function(object){var method=this;return function(event){return method.call(object,event||window.event);}};function standardizeEvent(e){if(!e)
var e=window.event;if(!e.preventDefault)
e.preventDefault=standardizeEvent.preventDefault;if(!e.stopPropagation)
e.stopPropagation=standardizeEvent.stopPropagation;if(!e.target&&e.srcElement)
e.target=e.srcElement;return e;};standardizeEvent.prototype.preventDefault=function(){this.returnValue=false;};standardizeEvent.prototype.stopPropagation=function(){this.cancelBubble=true;};String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,"");};String.prototype.removeNastyChars=function(){var filteredChars=this;while((filteredChars.indexOf("&#")>-1)||(filteredChars.indexOf("<")>-1)||(filteredChars.indexOf(">")>-1))
{filteredChars=filteredChars.replace(/(&#)|(<)|(>)/g,"");}
return filteredChars;};jQuery.fn.customFadeIn=function(speed,callback){return this.animate({opacity:"show"},speed,function(){if(jQuery.browser.msie)
this.style.removeAttribute("filter");if(jQuery.isFunction(callback)){this.callback=callback;this.callback();}});};jQuery.fn.customFadeOut=function(speed,callback){return this.animate({opacity:"hide"},speed,function(){if(jQuery.browser.msie)
this.style.removeAttribute("filter");if(jQuery.isFunction(callback)){this.callback=callback;this.callback();}});};jQuery.fn.customFadeTo=function(speed,to,callback){return this.animate({opacity:to},speed,function(){if((to==1)&&jQuery.browser.msie)
this.style.removeAttribute("filter");if(jQuery.isFunction(callback)){this.callback=callback;this.callback();}});};function addEvent(element,type,handler){if(!handler.$$guid)handler.$$guid=addEvent.guid++;if(!element.events)element.events={};var handlers=element.events[type];if(!handlers){handlers=element.events[type]={};if(element["on"+type]){handlers[0]=element["on"+type];}}
handlers[handler.$$guid]=handler;element["on"+type]=handleEvent;return handler.$$guid;};addEvent.guid=1;function removeEvent(element,type,handler){if(element.events&&element.events[type]){delete element.events[type][handler.$$guid];}};function removeEventByGuid(element,type,guid){if(element.events&&element.events[type]){delete element.events[type][guid];}};function handleEvent(event){var returnValue=true;event=event||fixEvent(window.event);if(event){var handlers=this.events[event.type];for(var i in handlers){this.$$handleEvent=handlers[i];if(this.$$handleEvent(event)===false){returnValue=false;}}}
return returnValue;};function fixEvent(event){if(event){if(!event.target&&event.srcElement)
event.target=event.srcElement;event.preventDefault=fixEvent.preventDefault;event.stopPropagation=fixEvent.stopPropagation;}
return event;};fixEvent.preventDefault=function(){this.returnValue=false;};fixEvent.stopPropagation=function(){this.cancelBubble=true;};function ElementPos(element){this.left=0;this.top=0;return this.update(element);};ElementPos.prototype.update=function(element){if(element.offsetParent){this.left=element.offsetLeft;this.top=element.offsetTop;while(element=element.offsetParent){this.left+=element.offsetLeft;this.top+=element.offsetTop;}}
return this;};function MouseEventPos(e){this.x=0;this.y=0;return this.update(e);};MouseEventPos.prototype.update=function(e){if(!e)var e=window.event;if(e.pageX||e.pageY){this.x=e.pageX;this.y=e.pageY;}else if(e.clientX||e.clientY){this.x=e.clientX+document.body.scrollLeft+document.documentElement.scrollLeft;this.y=e.clientY+document.body.scrollTop+document.documentElement.scrollTop;}
return this;};function PagePos(){this.left=0;this.top=0;return this.update();};PagePos.prototype.update=function(){if(self.pageXOffset){this.left=self.pageXOffset;}else if(document.documentElement&&document.documentElement.scrollLeft){this.left=document.documentElement.scrollLeft;}else if(document.body){this.left=document.body.scrollLeft;}
if(self.pageYOffset){this.top=self.pageYOffset;}else if(document.documentElement&&document.documentElement.scrollTop){this.top=document.documentElement.scrollTop;}else if(document.body){this.top=document.body.scrollTop;}
return this;};function WindowSize(){this.width=0;this.height=0;return this.update();};WindowSize.prototype.update=function(){if(self.innerHeight){this.width=self.innerWidth;this.height=self.innerHeight;}else if(document.documentElement&&document.documentElement.clientHeight){this.width=document.documentElement.clientWidth;this.height=document.documentElement.clientHeight;}else if(document.body){this.width=document.body.clientWidth;this.height=document.body.clientHeight;}
return this;};function PageSize(){this.window=new WindowSize();this.width=0;this.height=0;return this.update();};PageSize.prototype.update=function(){this.window.update();if(window.innerHeight&&window.scrollMaxY){this.width=window.innerWidth+window.scrollMaxX;this.height=window.innerHeight+window.scrollMaxY;}else if(document.body.scrollHeight>document.body.offsetHeight){this.width=document.body.scrollWidth;this.height=document.body.scrollHeight;}else{this.width=document.body.offsetWidth;this.height=document.body.offsetHeight;}
if(this.width<this.window.width){this.width=this.window.width;}
if(this.height<this.window.height){this.height=this.window.height;}
return this;};function DropShadow(){this.fadeOutComplete=function(){};};DropShadow.guid=1;DropShadow.prototype.init=function(element,shadowId){var shadow=document.createElement("div");if(shadowId!=undefined)
this.id=shadowId;else
this.id="__dropShadow"+DropShadow.guid++;shadow.id=this.id;shadow.className="dropShadow";var shadowOuter=document.createElement("div");shadowOuter.className="dropShadowOuter";var shadowInner=document.createElement("div");shadowInner.className="dropShadowInner";var shadowContainer=document.createElement("div");shadowContainer.className="dropShadowContainer";shadowContainer.appendChild(element);shadowInner.appendChild(shadowContainer);shadowOuter.appendChild(shadowInner);shadow.appendChild(shadowOuter);return shadow;};DropShadow.prototype.fadeOut=function(){var shadow=document.getElementById(this.id);var ctrl=shadow;for(var i=0;(i<4)&&(ctrl!=null);++i){ctrl.className+=" dropShadowFade";ctrl=ctrl.firstChild;}
var now=new Date();this.startTime=now.getTime();this.opacity=100;this.doFadeOut();this.intervalId=window.setInterval(this.doFadeOut.bindAsEventListener(this),40);};DropShadow.prototype.doFadeOut=function(){var now=new Date();var elapsed=now.getTime()-this.startTime;this.opacity=Math.floor(100-elapsed/5);var shadow=document.getElementById(this.id);if(this.opacity<=0){this.setOpacity(shadow,0);window.clearInterval(this.intervalId);this.fadeOutComplete();}else{this.setOpacity(shadow,this.opacity);}};DropShadow.prototype.setOpacity=function(element,opacity){if(element.style.filter==null)
element.style.opacity=opacity/100;else
element.style.filter="alpha(opacity="+opacity+")";};DropShadow.prototype.reset=function(){var shadow=document.getElementById(this.id);if(shadow.style.filter==null)
shadow.style.opacity="";else
shadow.style.filter="";var ctrl=shadow;for(var i=0;(i<4)&&(ctrl!=null);++i){ctrl.className=ctrl.className.replace(" dropShadowFade","");ctrl=ctrl.firstChild;}};var Languages={initialized:false,french:false,isFrench:function(){if(!Languages.initialized){if(document.documentElement){var lang=document.documentElement.getAttribute("lang");if(lang==null)
lang="";if((lang.length==0)&&(location.search!=null)&&(location.search.length>3)){var urlParams=location.search.substr(1).split('&');for(var i=0;i<urlParams.length;++i){var urlParamParts=urlParams[i].split('=');if((urlParamParts!=null)&&(urlParamParts.length==2)){var urlKey=urlParamParts[0].toLowerCase();if((urlKey=="lang")||(urlKey=="__lang")){lang=urlParamParts[1];break;}}}}
Languages.french=(lang!=null)&&(lang.length>=2)&&(lang.substr(0,2)=="fr");}
Languages.initialized=true;}
return Languages.french;},getWaitMessage:function(){if(Languages.isFrench())
return"Chargement &#133; Merci de patienter";else
return"Loading &#133; Please Wait";}};function isFrench(){return Languages.isFrench();};function getLoadingMessage(){return Languages.getWaitMessage();};function AjaxRequest(url,id,showWait){if(url!=undefined)
this.url=url;else
this.url="";if(id!=undefined)
this.id=id;else
this.id="";if(showWait!=undefined)
this.showWait=showWait;else
this.showWait=true;this.guid=AjaxRequest.guid++;this.waitDropShadow=null;this.onComplete=function(ajaxRequest){};this.onError=function(ajaxRequest,exceptionInfo){};this.reset();this.xmlHttp=null;};AjaxRequest.guid=1;AjaxRequest.prototype.reset=function(){this.responseText="";this.responseXML="";this.responseStatus="";this.responseStatusText="";};AjaxRequest.prototype.create=function(){if(this.xmlHttp==null){if(window.XMLHttpRequest){this.xmlHttp=new XMLHttpRequest();}else{try{this.xmlHttp=new ActiveXObject("Msxml2.XMLHTTP.3.0");}catch(e){this.xmlHttp=null;}}}};AjaxRequest.prototype.run=function(){this.create();if(this.xmlHttp!=null){this.xmlHttp.onreadystatechange=function(){};this.xmlHttp.abort();this.reset();this.displayWait(true);var url=this.url;if(url.indexOf("?")>0)
url+="&clientcallback=1";else
url+="?clientcallback=1";if(isFrench())
url+="&__lang=fr-CA";else
url+="&__lang=en-CA";this.xmlHttp.onreadystatechange=this.handleResponse.bindAsEventListener(this);this.xmlHttp.open("GET",url,true);this.xmlHttp.send(null);}};AjaxRequest.prototype.handleResponse=function(){try{if(this.xmlHttp.readyState==4){this.responseStatus=this.xmlHttp.status;this.responseStatusText=this.xmlHttp.statusText;if(this.xmlHttp.status=="200"){this.responseText=this.xmlHttp.responseText;this.responseXML=this.xmlHttp.responseXML;if(this.id.length>0){var dest=document.getElementById(this.id);var destType=dest.nodeName.toLowerCase();if(destType=="select")
this.createSelectOptions(dest);else if((destType=="input")||(destType=="textarea")||(destType=="option"))
dest.value=this.xmlHttp.responseText;else
dest.innerHTML=this.xmlHttp.responseText;}
this.onComplete(this);}else{this.onError(this,null);}
this.displayWait(false);}}catch(e){this.onError(this,e);}};AjaxRequest.prototype.createSelectOptions=function(dest){if(navigator.appVersion.indexOf("MSIE")<0){dest.innerHTML=this.responseText;}else{dest.options.length=0;var root=document.createElement("div");root.innerHTML="<select>"+this.responseText+"</select>";var optionList=root.getElementsByTagName("option");if((optionList!=null)&&(optionList.length>0)){for(var i=0;i<optionList.length;++i)
dest.options[i]=new Option(optionList[i].innerHTML,optionList[i].value);}
root=null;}};AjaxRequest.prototype.displayWait=function(show){if(!this.showWait)
return;var french=isFrench();var wait;if(this.waitDropShadow!=null){wait=document.getElementById(this.waitDropShadow.id);}else{var waitMessage=document.createElement("div");waitMessage.className="wait";waitMessage.innerHTML=getLoadingMessage();this.waitDropShadow=new DropShadow();var wait=this.waitDropShadow.init(waitMessage,"__ajaxRequest_"+this.guid);wait.style.display="none";wait.style.position="absolute";wait.style.zIndex="9999";document.body.appendChild(wait);}
if(show){var pageSize=new PageSize();var pagePos=new PagePos();if(french)
var left=((pageSize.width-250)/2);else
var left=((pageSize.width-190)/2);var top=pagePos.top+(pageSize.window.height/3);if(left<0)
left=0;if(top<0)
top=0;wait.style.left=left+"px";wait.style.top=top+"px";wait.style.display="block";}else{wait.style.display="none";}};var GoogleAdSenseForSearch={adsPerSection:3,google_afs_query:'',google_afs_adpage:'',google_afs_ad:'',google_afs_client:'',google_afs_channel:'',google_afs_hl:'',google_afs_ie:'',google_afs_oe:'',google_afs_gl:'',helpPopUpUrlAFS:'',helpArticleUrlAFS:'',init:function(p_AFSattributes,p_searchiFrameUrl,p_popUpUrlAFS,p_articleUrlAFS){try{if(this.GetParam('keywords')!=null){this.google_afs_query=this.GetParam('keywords').trim().removeNastyChars().replace("%20"," ");}else if(this.GetParam('sc')!=null){this.google_afs_query=this.GetParam('sc').trim().removeNastyChars().replace("%7c"," ").replace("|"," ")}else{return;}
if(this.GetParam('page')!=null){this.google_afs_adpage=(parseInt(this.GetParam('page'))+1);}else{this.google_afs_adpage='1';}
var parameterArrayAFS=p_AFSattributes.split("|");this.google_afs_ad=parameterArrayAFS[0];this.google_afs_client=parameterArrayAFS[1];this.google_afs_channel=parameterArrayAFS[2];this.google_afs_ie=parameterArrayAFS[3];this.google_afs_oe=parameterArrayAFS[4];this.google_afs_gl=parameterArrayAFS[5];if(Languages.isFrench())
this.google_afs_hl="fr";else
this.google_afs_hl="en";this.helpPopUpUrlAFS=p_popUpUrlAFS;this.helpArticleUrlAFS=p_articleUrlAFS;$('body').prepend('<iframe id="googleAFSContainerIframe" height="0" width="0" class="googleAFSContainerIframe" style="display:none;"></iframe>');var cacheString=new Date();$('#googleAFSContainerIframe').attr('src',p_searchiFrameUrl+'?z='+cacheString.getTime());}catch(e){}},GetParam:function(name){name=name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");var regexS="[\\?&]"+name+"=([^&#]*)";var regex=new RegExp(regexS);var results=regex.exec(window.location.href);if(results==null)
return null;else
return results[1];},insertAds:function(google_ads){try{var google_num_ads=google_ads.length;if(google_num_ads<=0){return;}
var adsReturned=new Array("","");var adsBoxCounter=0;for(i=0;i<google_num_ads;i++)
{if(i==this.adsPerSection)adsBoxCounter++;adsReturned[adsBoxCounter]+='<li><h6><a onmouseover="javascript:window.status=\''+google_ads[i].url+'\';return true;" '+'onmouseout="javascript:window.status=\'\';return true;" href="'+google_ads[i].url+'">'+google_ads[i].line1+'</a></h6>'+'<p>'+google_ads[i].line2+'</p>'+'<a onmouseover="javascript:window.status=\''+google_ads[i].url+'\';return true;" '+'onmouseout="javascript:window.status=\'\';return true;" href="'+google_ads[i].url+'" style="text-decoration:none;"><p class="OTSGoogleURL">'+google_ads[i].visible_url+'</p></a>'+'</li>';}
var googleAFSTitle='';if(Languages.isFrench())
googleAFSTitle='Annonces Google';else
googleAFSTitle='Ads by Google';for(y=0;y<=adsBoxCounter;y++){if(adsReturned[y]!=""){adsReturned[y]='<div class="OTSGoogleAdWordsHeader"><p>+ <a popupurl="'+this.helpPopUpUrlAFS+'" href="'+this.helpArticleUrlAFS+'" id="whatsThis'+y+'">What is this</a></p><h5 style="color:#000;"><a style="text-decoration:none;color:#666;" href="http://services.google.com/feedback/online_hws_feedback">'
+googleAFSTitle+'</a></h5></div><ul>'+adsReturned[y]+'</ul>';}}
var divAds=document.getElementsByName("googleAdWordsPanel");this.help=new Array(divAds.length);for(var t=0;t<divAds.length;t++){if(adsReturned[t]!=""){divAds[t].innerHTML=adsReturned[t];divAds[t].style.display="block";if($.browser.msie){if(parseInt($.browser.version)<7){$(".searchResultsList").css("zoom","1");}else{divAds[t].style.zoom="1";}}
var linkList=divAds[t].getElementsByTagName("a");if((linkList!=null)&&(linkList.length>0)){for(var j=0;j<linkList.length;j++){var popUpUrl=linkList[j].getAttribute("popupurl");if((popUpUrl!=null)&&(popUpUrl.length>0)){this.help[t]=new PopUp();this.help[t].position="right";this.help[t].initCtrl(linkList[j].id,linkList[j],popUpUrl,"400");break;}}}}}
divAds=null;}catch(e){}}};function GoogleAdWords(){};GoogleAdWords.prototype.init=function(url){this.ajax=new AjaxRequest(url);this.ajax.showWait=false;this.ajax.onComplete=this.insertAds.bindAsEventListener(this);this.ajax.run();};GoogleAdWords.prototype.insertAds=function(ajax){try{if(this.ajax.responseText.length>0){var oRoot=this.parseAndReturnRoot();if(oRoot){var adSet=oRoot.getElementsByTagName("ul")[0];var ads=new Array();while(adSet.childNodes.length>0){var node=adSet.removeChild(adSet.firstChild);if(node.nodeName=="li")
ads.push(node);}
var divAds=document.getElementsByName("googleAdWordsPanel");this.help=new Array(divAds.length);for(var t=0;t<divAds.length;t++){var adsPerSection=3;while(adSet.childNodes.length>0)
adSet.removeChild(adSet.firstChild);for(var k=(t*adsPerSection);(k<ads.length)&&(k<((t+1)*adsPerSection));k++)
adSet.appendChild(ads[k]);if(adSet.childNodes.length>0){divAds[t].style.display="block";if(typeof(XMLSerializer)!="undefined")
divAds[t].innerHTML=(new XMLSerializer()).serializeToString(oRoot);else if(oRoot.xml)
divAds[t].innerHTML=oRoot.xml;var linkList=divAds[t].getElementsByTagName("a");if((linkList!=null)&&(linkList.length>0)){for(var j=0;j<linkList.length;++j){var popUpUrl=linkList[j].getAttribute("popupurl");if((popUpUrl!=null)&&(popUpUrl.length>0)){this.help[t]=new PopUp();this.help[t].position="right";this.help[t].initCtrl(linkList[j].id,linkList[j],popUpUrl,"400");break;}}}}}
divAds=null;}}}
catch(e){}};GoogleAdWords.prototype.parseAndReturnRoot=function(){var sXml="<root>"+this.ajax.responseText+"</root>";var oXml=null;if(typeof(DOMParser)!="undefined"){var oParser=new DOMParser();oXml=oParser.parseFromString(sXml,"text/xml");}else{try{oXml=new ActiveXObject("Msxml2.DOMDocument.6.0");}catch(oError){try{oXml=new ActiveXObject("Msxml2.DOMDocument.3.0");}catch(oError){oXml=null;}}
if(oXml!=null)
oXml.loadXML(sXml);}
if((oXml!=null)&&(oXml.documentElement))
return oXml.documentElement;else
return null;};GoogleAdWords.prototype.attachPopUps=function(){var linkList=document.getElementsByTagName("a");if((linkList!=null)&&(linkList.length>0)){this.help=new Array(2);var helpIndex=0;for(var i=0;i<linkList.length;++i){var popUpUrl=linkList[i].getAttribute("popupurl");if((popUpUrl!=null)&&(popUpUrl.length>0)){this.help[helpIndex]=new PopUp();this.help[helpIndex].position="right";this.help[helpIndex].initCtrl(linkList[i].id,linkList[i],popUpUrl,"400");++helpIndex;if(helpIndex>=2){break;}}}}};function FormUtils(){this.fieldIdList=null;this.formId=null;this.textAreaId=null;this.removeNastyChars=true;this.textAreaMaxLength=-1;this.focusFieldId=null;};FormUtils.prototype.init=function(submitButtonId){this.submitButtonId=submitButtonId;var altSrc=$("#"+submitButtonId).attr("altsrc");if((altSrc!=null)&&(altSrc.length>0)){this.altSubmitImage=new Image();this.altSubmitImage.src=altSrc;}
if((this.formId!=null)&&(this.formId.length>0)){var form=document.getElementById(this.formId);if(form!=null)
addEvent(form,"keypress",this.checkForEnter.bindAsEventListener(this));}else if((this.fieldIdList!=null)&&(this.fieldIdList.length>0)){for(var i=0;i<this.fieldIdList.length;++i){var field=document.getElementById(this.fieldIdList[i]);if(field!=null)
addEvent(field,"keypress",this.checkForEnter.bindAsEventListener(this));}}
if(this.removeNastyChars){var button=document.getElementById(submitButtonId);if(button!=null)
addEvent(button,"click",this.submit.bindAsEventListener(this));}
if((this.textAreaId!=null)&&(this.textAreaMaxLength>0)){var textArea=document.getElementById(this.textAreaId);if(textArea!=null)
addEvent(textArea,"keypress",this.limitText.bindAsEventListener(this));}
if(this.focusFieldId!=null)
$("#"+this.focusFieldId).focus();};FormUtils.prototype.checkForEnter=function(e){if(e.keyCode==13){var button=document.getElementById(this.submitButtonId);if(button!=null)
button.click();return false;}};FormUtils.prototype.submit=function(e){if((this.formId!=null)&&(this.formId.length>0)){var form=document.getElementById(this.formId);if(form!=null){var fieldList=form.getElementsByTagName("input");if((fieldList!=null)&&(fieldList.length>0)){for(var i=0;i<fieldList.length;++i){var fieldType=fieldList[i].getAttribute("type");if((fieldType!=null)&&(fieldType.toLowerCase()=="text"))
fieldList[i].value=fieldList[i].value.removeNastyChars();}}}}else if((this.fieldIdList!=null)&&(this.fieldIdList.length>0)){for(var i=0;i<this.fieldIdList.length;++i){var field=document.getElementById(this.fieldIdList[i]);if(field!=null)
field.value=field.value.removeNastyChars();}}
if(this.textAreaId!=null){var textArea=document.getElementById(this.textAreaId);if(textArea!=null)
textArea.value=textArea.value.removeNastyChars();}
var btn=$("#"+this.submitButtonId);if(btn.length==1){var altSrc=btn.attr("altsrc");if((altSrc!=null)&&(altSrc.length>0))
btn.attr("src",altSrc);}};FormUtils.prototype.limitText=function(e){var textArea=document.getElementById(this.textAreaId);if((textArea!=null)&&(textArea.value.length>this.textAreaMaxLength))
textArea.value=textArea.value.substr(0,this.textAreaMaxLength);return true;};var ReadMore={init:function(readMoreText,readLessText){ReadMore.readMoreText=readMoreText;ReadMore.readLessText=readLessText;var list=$("p[readmore],div[readmore],blockquote[readmore]");list.each(ReadMore.setUp);list=null;},setUp:function(){var limit=parseInt($(this).attr("readmore"));var allText=$(this).text().trim();var actual=allText.length;if(actual>=(limit*1.25)){allText=allText.replace("\"","&quot;");var partialText=allText.substr(0,limit+1);var regex=/\W+\w+$/;var matches=regex.exec(partialText);if(matches!=null)
partialText=partialText.substr(0,matches.index);var allHtml=$(this).html().trim();$(this).addClass("readLess");if(isFrench())
$(this).html("<span class=\"readLessText\">"+partialText+" \u2026</span>"+"<span class=\"readMoreLink\"><a>"+ReadMore.readMoreText+"</a>+\u00A0</span>"+"<span class=\"readMoreText\">"+allHtml+"</span>"+"<span class=\"readLessLink\"><a>"+ReadMore.readLessText+"</a>-\u00A0</span>");else
$(this).html("<span class=\"readLessText\">"+partialText+" \u2026</span>"+"<span class=\"readMoreLink\">+\u00A0<a>"+ReadMore.readMoreText+"</a></span>"+"<span class=\"readMoreText\">"+allHtml+"</span>"+"<span class=\"readLessLink\">-\u00A0<a>"+ReadMore.readLessText+"</a></span>");$(this).find("span.readMoreLink a").click(ReadMore.readMore);$(this).find("span.readLessLink a").click(ReadMore.readLess);}},readMore:function(e){var para=$(this).parent().parent();para.removeClass("readLess").addClass("readMore");para=null;},readLess:function(e){var para=$(this).parent().parent();para.removeClass("readMore").addClass("readLess");para=null;}};function ViewAllList(){this.id2=null;};ViewAllList.prototype.init=function(id,maxNumItems,threshold,linkText){var ctrl=document.getElementById(id);var list=this.findList(ctrl);if(list!=null){if((list.id==null)||(list.id.length==0))
list.id=id+"_list";this.id=list.id;var list2=list.nextSibling;while(list2!=null){var ctrlType=list2.nodeName.toLowerCase();if((ctrlType=="ul")||(ctrlType=="ol"))
break;list2=list2.nextSibling;}
if(list2!=null){if((list2.id==null)||(list2.id.length==0))
list2.id=id+"_list2";this.id2=list2.id;}
var canReduce=false;var numItems=this.calcNumListItems(list);if(list2!=null)
numItems+=this.calcNumListItems(list2);if(numItems>=threshold)
canReduce=true;if(canReduce){if(list2!=null){this.hideListItems(list,(maxNumItems+1)/2,true,linkText);this.hideListItems(list2,maxNumItems/2,false,linkText);}else{this.hideListItems(list,maxNumItems,true,linkText);}}}};ViewAllList.prototype.findList=function(ctrl){var ctrlType=ctrl.nodeName.toLowerCase();if((ctrlType=="ul")||(ctrlType=="ol")){return ctrl;}
else if(ctrlType=="div"){for(var i=0;i<ctrl.childNodes.length;++i){var list=this.findList(ctrl.childNodes[i]);if(list!=null)
return list;}}
return null;};ViewAllList.prototype.calcNumListItems=function(list){var numItems=0;for(var i=0;i<list.childNodes.length;++i){if(list.childNodes[i].nodeName.toLowerCase()=="li"){++numItems;}}
return numItems;};ViewAllList.prototype.hideListItems=function(list,maxNumItems,createViewAll,linkText){var createdViewAll=!createViewAll;numItems=0;for(i=0;i<list.childNodes.length;++i){if(list.childNodes[i].nodeName.toLowerCase()=="li"){++numItems;if(numItems>maxNumItems){list.childNodes[i].className="hide";if(!createdViewAll){createdViewAll=true;var viewAllListItem=document.createElement("li");viewAllListItem.className="OTSMenuListSeeAll";var viewAllTextNode=document.createTextNode("+\u00A0");viewAllListItem.appendChild(viewAllTextNode);var viewAllLink=document.createElement("a");viewAllLink.innerHTML=linkText;viewAllLink.href="#";viewAllListItem.appendChild(viewAllLink);list.insertBefore(viewAllListItem,list.childNodes[i]);this.viewAllListIndex=i;++i;addEvent(viewAllLink,"click",this.viewAll.bindAsEventListener(this));}}}}};ViewAllList.prototype.viewAll=function(e){var list=document.getElementById(this.id);var list2=null;if(this.id2!=null){list2=document.getElementById(this.id2);this.startHeight=Math.max(list.offsetHeight,list2.offsetHeight);list2.style.height=this.startHeight+"px";list2.style.overflow="hidden";}else{this.startHeight=list.offsetHeight;}
list.style.height=this.startHeight+"px";list.style.overflow="hidden";list.removeChild(list.childNodes[this.viewAllListIndex]);for(var i=0;i<list.childNodes.length;++i){if(list.childNodes[i].nodeName.toLowerCase()=="li")
list.childNodes[i].className=list.childNodes[i].className.replace("hide","show");}
if(list2!=null){for(i=0;i<list2.childNodes.length;++i){if(list2.childNodes[i].nodeName.toLowerCase()=="li")
list2.childNodes[i].className=list2.childNodes[i].className.replace("hide","show");}}
if(this.id2!=null)
this.endHeight=Math.max(list.scrollHeight,list2.scrollHeight);else
this.endHeight=list.scrollHeight;var now=new Date();this.startTime=now.getTime();this.doSlideDown();this.intervalId=window.setInterval(this.doSlideDown.bindAsEventListener(this),40);e.preventDefault();e.stopPropagation();return false;};ViewAllList.prototype.doSlideDown=function(){var now=new Date();var elapsed=now.getTime()-this.startTime;var list=document.getElementById(this.id);var list2=null;if(this.id2!=null)
list2=document.getElementById(this.id2);var height=this.startHeight+Math.floor((this.endHeight-this.startHeight)*elapsed/300);if(height>=this.endHeight){list.style.height="";if(list2!=null)
list2.style.height="";window.clearInterval(this.intervalId);}else{list.style.height=height+"px";if(list2!=null)
list2.style.height=height+"px";}};ViewAllSections.prototype=new ViewAllList();ViewAllSections.prototype.constructor=ViewAllSections;function ViewAllSections(){ViewAllList.call(this);};ViewAllSections.prototype.init=function(id,sectionId,linkId){var ctrl=document.getElementById(id);var list=this.findList(ctrl);if(list!=null){if((list.id==null)||(list.id.length==0))
list.id=id+"_list";this.id=list.id;var viewAllLink=document.getElementById(linkId);addEvent(viewAllLink,"click",this.viewAll.bindAsEventListener(this));var hide=false;for(var i=0;i<list.childNodes.length;++i){if(list.childNodes[i].nodeName.toLowerCase()=="li"){if(!hide){if(list.childNodes[i].id==sectionId){hide=true;this.viewAllListIndex=i;list.childNodes[i].className=list.childNodes[i].className.replace(" hide"," show");}}else{list.childNodes[i].className="hide";}}}}};function showModule(id){var element=document.getElementById(id);if(element!=null)
element.style.display="block";};function GoogleSearch(){};GoogleSearch.prototype.init=function(keywordsId,submitId,otherSubmitId,searchUrl){this.keywordsId=keywordsId;this.submitId=submitId;this.otherSubmitId=otherSubmitId;this.searchUrl=searchUrl;var submitBtn=document.getElementById(submitId);if(submitBtn!=null)
addEvent(submitBtn,"click",this.submit.bindAsEventListener(this));var otherSubmitBtn=document.getElementById(otherSubmitId);if(otherSubmitBtn!=null)
addEvent(otherSubmitBtn,"click",this.submit.bindAsEventListener(this));var keywordsCtrl=document.getElementById(keywordsId);if(keywordsCtrl!=null)
addEvent(keywordsCtrl,"keypress",this.onKeyPress.bindAsEventListener(this));};GoogleSearch.prototype.onKeyPress=function(e){if(e.keyCode==13)
return this.submit(e);};GoogleSearch.prototype.submit=function(e){var keywordsCtrl=document.getElementById(this.keywordsId);var keywords=keywordsCtrl.value.trim().removeNastyChars();if(keywords.length>0){keywords=encodeURIComponent(keywords);var url=this.searchUrl.replace("*keywords*",keywords);window.location.href=url;}
e.preventDefault();e.stopPropagation();return false;};var GoogleAdSense={oldDocWrite:null,adsId:'',adsIndex:0,pubId:'',adSlots:'',waitForAddSlot:false,doAddSlots:false,init:function(){var ads=$("div.googleAdSense");var newAds=$("div.googleAdSense[adsense]");if((ads.length>0)&&(newAds.length==0)){ads.each(function(i){if($("div.googleAdSenseIE",this).length==0){var width=$(this).attr("adsensewidth");var height=$(this).attr("adsenseheight");var url=$(this).attr("adsenseurl");if((width.length>0)&&(height.length>0)&&(url.length>0))
$(this).html("<object data=\""+url+"\" type=\"text\/html\" width=\""+width+"\" height=\""+height+"\"><\/object>");}});}else{GoogleAdSense.oldDocWrite=document.write;document.write=GoogleAdSense.insertAds;GoogleAdSense.setUpAdSlots();GoogleAdSense.insertAds("");}},setUpAdSlots:function(){$("div.googleAdSlot[adslot]").each(function(i){if(GoogleAdSense.pubId.length==0)
GoogleAdSense.pubId=$(this).attr("pubid");if(GoogleAdSense.adSlots.length>0)
GoogleAdSense.adSlots+=",";GoogleAdSense.adSlots+=$(this).attr("adslot");});if(GoogleAdSense.adSlots.length>0){GoogleAdSense.waitForAddSlot=true;GS_googleAddAdSenseService(GoogleAdSense.pubId);GS_googleEnableAllServices();window.setTimeout("GoogleAdSense.AddSlots();",100);}},AddSlots:function(){if(window.GA_googleAddSlot){var adSlots=GoogleAdSense.adSlots.split(",");for(var i=0;i<adSlots.length;++i)
GA_googleAddSlot(GoogleAdSense.pubId,adSlots[i]);GA_googleFetchAds();GoogleAdSense.waitForAddSlot=false;GoogleAdSense.doAddSlots=true;GoogleAdSense.insertAds("");}else{window.setTimeout("GoogleAdSense.AddSlots();",100);}},insertAds:function(str){if(GoogleAdSense.waitForAddSlot){if((str!=null)&&(str.length>0))
GoogleAdSense.insertHtml(str,$(document.body));}else{if((str!=null)&&(str.length>0)&&(GoogleAdSense.adsId.length>0)){GoogleAdSense.insertHtml(str,$("#"+GoogleAdSense.adsId));}
var ads=$("div.googleAdSlot[adslot]:first");if(ads.length==0)
ads=$("div.googleAdSense[adsense]:first");if(ads.length>0){GoogleAdSense.adsId=ads.attr("id");if((GoogleAdSense.adsId==null)||(GoogleAdSense.adsId.length==0)){GoogleAdSense.adsId="IndigoAdSense"+GoogleAdSense.adsIndex++;ads.attr("id",GoogleAdSense.adsId);}
var adSlot=ads.attr("adslot");if((adSlot!=null)&&(adSlot.length>0)){if((str!=null)&&(str.length>0)){var str2=str.toLowerCase();if((str2.indexOf("createdomiframe")>=0)||(str2.indexOf("<iframe")>=0)){ads.removeAttr("adslot");if($("div.googleAdSlot[adslot]").length==0)
GoogleAdSense.doAddSlots=false;GoogleAdSense.insertAds("");}}else{GA_googleFillSlot(adSlot);}}else{var script=ads.attr("adsense");ads.removeAttr("adsense");$("#"+GoogleAdSense.adsId).html("<script type=\"text/javascript\"> "+script+" <\/script>");var scriptTag=document.createElement("script");scriptTag.type="text/javascript";scriptTag.src="http://pagead2.googlesyndication.com/pagead/show_ads.js";document.getElementsByTagName("head")[0].appendChild(scriptTag);}}else{window.setTimeout("document.write = GoogleAdSense.oldDocWrite;",1000);}}},insertHtml:function(str,ctrl){var str2=str.trim().toLowerCase();if(str2.substr(0,7)=="<script"){var src="";var startPos=str2.indexOf("src");if(startPos>=0){var isSingleQuote=true;var startPosSrc=str2.substr(startPos).indexOf("'");if(startPosSrc<0){isSingleQuote=false;startPosSrc=str2.substr(startPos).indexOf("\"");}
if(startPosSrc>=0){var endPosSrc=str2.substr(startPos+startPosSrc+1).indexOf(isSingleQuote?"'":"\"");if(endPosSrc>=0)
src=str.substr(startPos+startPosSrc+1,endPosSrc);}}
if(src.length>0){var scriptTag=document.createElement("script");scriptTag.type="text/javascript";scriptTag.src=src;document.getElementsByTagName("head")[0].appendChild(scriptTag);}else{var script="";var startPos=str2.indexOf(">");if(startPos>=0){var endPos=str2.lastIndexOf("<");if(endPos>=0)
script=str.substr(startPos+1,endPos-startPos-1);}
if(script.length>0)
eval(script);}}else{ctrl.append(str);}}};var GoogleAnalytics={init:function(id,domain){if(typeof _gat=="object"){var pageTracker=_gat._getTracker(id);if((domain!=null)&&(domain.length>0))
pageTracker._setDomainName(domain);pageTracker._initData();pageTracker._trackPageview();if((typeof(GoogleAnalytics.eCommerce)=="object")&&(GoogleAnalytics.eCommerce.length>0))
{for(var i=0;i<GoogleAnalytics.eCommerce.length;++i){var ec=GoogleAnalytics.eCommerce[i];if((ec[0]=="Trans")&&(ec.length==9))
pageTracker._addTrans(ec[1],ec[2],ec[3],ec[4],ec[5],ec[6],ec[7],ec[8])
else if((ec[0]=="Item")&&(ec.length==7))
pageTracker._addItem(ec[1],ec[2],ec[3],ec[4],ec[5],ec[6])}
pageTracker._trackTrans();}}},experiment:function(id,experiment,domain){if(typeof _gat=="object"){var pageTracker=_gat._getTracker(id);if((domain!=null)&&(domain.length>0))
pageTracker._setDomainName(domain);pageTracker._initData();pageTracker._trackPageview(experiment);}}};var QuickSearch={DEAL_ZONE_HIDE_DELAY:300,init:function(){var ok=false;var ctrl=$("#QuickSearch select");if(ctrl.length==1){QuickSearch.sectionId=ctrl.attr("id");QuickSearch.searchUrl=ctrl.attr("searchurl");QuickSearch.defaultText=ctrl.attr("defaulttext");$("#QuickSearch input, #QuickSearch button, .kioskHomeSearch input.OTSHomeSearchButton").each(function(i){var id=$(this).attr("id");if(id.lastIndexOf("_keywords")>0)
QuickSearch.keywordsId=id;if((id.lastIndexOf("_inputGo")>0)||(id.lastIndexOf("_inputGoBtn")>0))
QuickSearch.submitId=id;if((id.lastIndexOf("_otherInputGo")>0)||(id.lastIndexOf("_otherInputGoBtn")>0))
QuickSearch.otherSubmitId=id;if((id.lastIndexOf("_inputFindBtn")>0)||(id.lastIndexOf("_inputFindBtn")>0))
QuickSearch.submitId=id;});ok=QuickSearch.keywordsId&&QuickSearch.submitId;}
if(ok){$("#"+QuickSearch.submitId).click(QuickSearch.submit);var altSrc=$("#"+QuickSearch.submitId).attr("altsrc");if((altSrc!=null)&&(altSrc.length>0)){QuickSearch.altSubmitImage=new Image();QuickSearch.altSubmitImage.src=altSrc;}
if(QuickSearch.otherSubmitId){$("#"+QuickSearch.otherSubmitId).click(QuickSearch.submit);var altSrc=$("#"+QuickSearch.otherSubmitId).attr("altsrc");if((altSrc!=null)&&(altSrc.length>0)){QuickSearch.altOtherSubmitImage=new Image();QuickSearch.altOtherSubmitImage.src=altSrc;}}
var keywordsCtrl=$("#"+QuickSearch.keywordsId);keywordsCtrl.keypress(QuickSearch.onKeyPress).focus(QuickSearch.onFocus).blur(QuickSearch.onBlur);if(document.activeElement){if(document.activeElement.id==QuickSearch.keywordsId){keywordsCtrl.focus();}}
if(keywordsCtrl.val().trim()==QuickSearch.defaultText)
keywordsCtrl.addClass("OTSSearchBarFormPrompt");if(keywordsCtrl.attr("suggest")=="true")
if(keywordsCtrl.suggest)
keywordsCtrl.suggest("/typeahead/SearchSuggestion.ses",{resultsClass:'SearchTypeAheadResults',selectClass:'SearchTypeAheadOver',minchars:1});if(ctrl.attr("usecss")=="true")
{var ops=[],slctCtrl=ctrl[0],opLength=slctCtrl.options.length;slctCtrl.style.display="none";for(var i=0;i<opLength;i++)
{if(i==slctCtrl.selectedIndex)
{ops.push("<li class=\"searchSelectOption searchSelectSelected\" index=\""+i+"\"><a href=\"#\">"+slctCtrl.options[i].text+"</a></li>");}
else
{ops.push("<li class=\"searchSelectOption\" index=\""+i+"\"><a href=\"#\">"+slctCtrl.options[i].text+"</a></li>");}}
var searchSelect,searchOptions,selectBox;if(($.browser.msie)&&(parseInt($.browser.version,10)<8))
{ctrl.after('<div class="searchSelectBox"><a href="#"><span class="searchSelectSelection">'+
slctCtrl.options[slctCtrl.selectedIndex].text+'</span></a></div>');$(document.body).append('<div class="searchSelect"><ul class="searchSelect">'+ops.join("")+'</ul><div class="searchSelectInner"><div class="searchSelectBL"></div></div></div>');if((parseInt($.browser.version,10)<7)&&(!($("#searchSelectBoxIEFix").length)))
{$(document.body).append('<iframe id="searchSelectBoxIEFix" src="javascript:false;"></iframe>');QuickSearch.ieSearchSelectFix=$("#searchSelectBoxIEFix");var elmnt=$("div.searchSelect");QuickSearch.posSearchDropDown=function()
{var offset=$(".searchSelectBox").offset();elmnt.css({left:offset.left-1,top:offset.top+25});QuickSearch.ieSearchSelectFix.css({height:$(".searchSelect").height(),left:offset.left-1,top:offset.top+25});selectBox.css("display","block");};}
else
{var elmnt=$("div.searchSelect");QuickSearch.posSearchDropDown=function()
{var offset=$(".searchSelectBox").offset();elmnt.css({left:offset.left-1,top:offset.top+25});selectBox.css("display","block");};}
QuickSearch.hideSearchDropDown=function()
{selectBox.css("display","none");if(QuickSearch.ieSearchSelectFix)
{QuickSearch.ieSearchSelectFix.css("visibility","hidden");}
$(window).unbind("resize",QuickSearch.posSearchDropDown);}}
else
{ctrl.after("<div class=\"searchSelectBox\"><a href=\"#\"><span class=\"searchSelectSelection\">"+
slctCtrl.options[slctCtrl.selectedIndex].text+"</span></a>"+"<div class=\"searchSelect\">"+"<ul class=\"searchSelect\">"+
ops.join("")+"</ul><div class=\"searchSelectInner\"><div class=\"searchSelectBL\"></div></div></div>");}
searchOptions=$("li.searchSelectOption");searchSelect=$(".searchSelectBox");selectBox=$("div.searchSelect");searchOptions.click(function(e){slctCtrl.selectedIndex=$(this).attr("index");searchSelect.find("span.searchSelectSelection").text($(this).text());selectBox.css("display","none");searchSelect.removeClass("searchSelectBoxDown");selectBox.find("li.searchSelectOption").removeClass("searchSelectSelected");$(this).addClass("searchSelectSelected");if(QuickSearch.hideSearchDropDown)
{QuickSearch.hideSearchDropDown();}
e.stopPropagation();e.preventDefault();});searchOptions.hover(function(){$(this).addClass("searchSelectOptionHover");},function(){$(this).removeClass("searchSelectOptionHover");});searchSelect.click(function(e){if((selectBox).css("display")=="block")
{searchSelect.find("div.searchSelect").css("display","none");searchSelect.removeClass("searchSelectBoxDown");if(QuickSearch.hideSearchDropDown)
{QuickSearch.hideSearchDropDown();}}
else
{searchSelect.addClass("searchSelectBoxDown");if(QuickSearch.posSearchDropDown)
{QuickSearch.posSearchDropDown();$(window).resize(QuickSearch.posSearchDropDown);}
selectBox.css("display","block");if(QuickSearch.ieSearchSelectFix)
{QuickSearch.ieSearchSelectFix.css("visibility","visible");}}
e.preventDefault();});$(document).click(function(e){if(($(e.target).closest(".searchSelectBox").length<=0)&&($(e.target).closest(".searchSelect").length<=0))
{searchSelect.find("div.searchSelect").css("display","none");searchSelect.removeClass("searchSelectBoxDown");if(QuickSearch.hideSearchDropDown)
{QuickSearch.hideSearchDropDown();}}});$(document).keyup(function(e){if(e.which==27)
{selectBox.css("display","none");searchSelect.removeClass("searchSelectBoxDown");if(QuickSearch.hideSearchDropDown)
{QuickSearch.hideSearchDropDown();}}});}
var dealZone=$("a.subNavMenuParent");if(dealZone.length)
{if(($.browser.msie)&&(parseInt($.browser.version,10)<8))
{var baseRegion=$(document.body);var ulMenu=$(dealZone).next("div.subNavSubMenuContainer");var newUlMenu=ulMenu.appendTo(baseRegion);if(parseInt($.browser.version,10)<7)
{baseRegion.append('<iframe id="subNavIeFix" src="javascript:false;"></iframe>');QuickSearch.ieSubNavFix=$("#subNavIeFix");QuickSearch.positionDealZone=function()
{var offset=$("a.subNavMenuParent").offset();newUlMenu.css({left:offset.left,top:offset.top+25});QuickSearch.ieSubNavFix.css({left:offset.left,top:offset.top+25});};}
else
{QuickSearch.positionDealZone=function()
{var offset=$("a.subNavMenuParent").offset();newUlMenu.css({left:offset.left-30,top:offset.top+70});};}
$(dealZone).click(function(e){e.preventDefault();});$(dealZone).mouseover(QuickSearch.onMouseOverDealZone);ulMenu.mouseover(QuickSearch.onMouseOverDealZone);}
else
{dealZone.click(function(e){e.preventDefault();});dealZone.mouseover(QuickSearch.onMouseOverDealZone);}
$(document.body).mousemove(QuickSearch.onMouseOverDocument);$(".subNavSubMenuOption").hover(function(){$(this).addClass("subMenuOptionHover");},function(){$(this).removeClass("subMenuOptionHover");});}}},onMouseOverDealZone:function(e)
{if(QuickSearch.dealZoneShown)
{if(QuickSearch.hideDealZoneTimeout!=null)
{window.clearTimeout(QuickSearch.hideDealZoneTimeout);QuickSearch.hideDealZoneTimeout=null;}}
else
{QuickSearch.showDealZone();}},onMouseOverDocument:function(e)
{if(!QuickSearch.hideDealZoneTimeout&&QuickSearch.dealZoneShown&&(!$(e.target).closest(".subNavMenuParent").length)&&(!$(e.target).closest(".subNavSubMenuContainer").length))
{QuickSearch.hideDealZoneTimeout=window.setTimeout(QuickSearch.hideDealZone,QuickSearch.DEAL_ZONE_HIDE_DELAY);}},showDealZone:function(e)
{if(QuickSearch.positionDealZone)
{QuickSearch.positionDealZone();}
$("div.subNavSubMenuContainer").css("display","block");QuickSearch.dealZoneShown=true;if(QuickSearch.ieSubNavFix)
{QuickSearch.ieSubNavFix.css({height:$("div.subNavSubMenuContainer").height(),width:$("div.subNavSubMenuContainer").width(),visibility:"visible"});}},hideDealZone:function()
{$("div.subNavSubMenuContainer").css("display","none");QuickSearch.dealZoneShown=false;QuickSearch.hideDealZoneTimeout=null;if(QuickSearch.ieSubNavFix)
{QuickSearch.ieSubNavFix.css("visibility","hidden");}},onKeyPress:function(e){if(e.keyCode==13)
return QuickSearch.submit(e);},onFocus:function(e){var keywordsCtrl=$("#"+QuickSearch.keywordsId);if(keywordsCtrl.val().trim()==QuickSearch.defaultText){keywordsCtrl.val("");keywordsCtrl.removeClass("OTSSearchBarFormPrompt");}
return false;},onBlur:function(e){var keywordsCtrl=$("#"+QuickSearch.keywordsId);if(keywordsCtrl.val().trim().length==0){keywordsCtrl.val(QuickSearch.defaultText);keywordsCtrl.addClass("OTSSearchBarFormPrompt");}
return false;},submit:function(e){var keywordsCtrl=$("#"+QuickSearch.keywordsId);var keywords=keywordsCtrl.val().trim().removeNastyChars();if((keywords.length>0)&&(keywords!=QuickSearch.defaultText)){QuickSearch.updateButton(QuickSearch.submitId);QuickSearch.updateButton(QuickSearch.otherSubmitId);var section=$("#"+QuickSearch.sectionId).val();var pageSize="10";if((section=="toys")||(section=="gifts")||(section=="ipod"))
pageSize="12";keywords=encodeURIComponent(keywords);var url=QuickSearch.searchUrl.replace("*section*",section);url=url.replace("*keywords*",keywords);url=url.replace("*pageSize*",pageSize);var fn=function(){window.location.href=url};window.setTimeout(fn,0);}
$(this).blur();return false;},updateButton:function(id){var btn=$("#"+id);if(btn.length==1){var altSrc=btn.attr("altsrc");if((altSrc!=null)&&(altSrc.length>0))
btn.attr("src",altSrc);var altClass=btn.attr("altclass");if((altClass!=null)&&(altClass.length>0))
btn.attr("class",altClass);}}};var AccountSigningOut={init:function(url){if(url)
window.top.location.href=url;}}
var FlashBanner={embedSWF:function(swfUrl,id,width,height,version,expressInstallSwfurl,flashvars){if(typeof(swfobject)!="undefined"){var ok=true;if($.browser.msie)
if(parseInt($.browser.version)<7)
ok=false;if(ok)
swfobject.embedSWF(swfUrl,id,width,height,version,expressInstallSwfurl,flashvars);}}}
var MenuListPanel={seeAllText:"",seeFewerText:"",init:function(params){MenuListPanel.seeAllText=params.seeAllText;MenuListPanel.seeFewerText=params.seeFewerText;var seeAllBefore="+&nbsp;";var seeFewerBefore="-&nbsp;";var seeAllAfter="";var seeFewerAfter="";if(Languages.isFrench()){seeAllBefore="";seeFewerBefore="";seeAllAfter="&nbsp;+";seeFewerAfter="&nbsp;-";}
$("div.menuListPanel").each(function(i){$("div[seeall = '1']",this).each(function(i){$("h4",this).addClass("OTSMenuListOpen");var maxItems=parseInt($(this).attr("maxitems"));if($("ul li",this).length>(maxItems)){$("li:gt("+(maxItems-1)+")",this).hide();$("li:eq("+(maxItems-1)+")",this).after("<li class='OTSMenuListSeeAll'>"+seeAllBefore+"<a href='#'>"+MenuListPanel.seeAllText+"</a>"+seeAllAfter+"</li>");$("li:last",this).after("<li class='OTSMenuListSeeFewer'>"+seeFewerBefore+"<a href='#'>"+MenuListPanel.seeFewerText+"</a>"+seeFewerAfter+"</li>");}});$("div ul li.OTSMenuListSeeAll a",this).click(function(i){var list=$(this).parents("ul");$("li.OTSMenuListSeeAll",list).hide();var minHeight=list.height();list.css({height:minHeight,overflow:"hidden"});$("li:hidden:not(.OTSMenuListSeeAll)",list).css("display","block");var listItem=$("li:last",list);var maxHeight=listItem.offset().top+listItem.height()-list.offset().top;list.animate({height:maxHeight},"fast","swing",function(){list.css({height:"auto",overflow:"visible"});});return false;});$("div ul li.OTSMenuListSeeFewer a",this).click(function(i){var maxItems=parseInt($(this).parents("div").attr("maxitems"));var list=$(this).parents("ul");var listItem=$("li:eq("+(maxItems-1)+")",list);var minHeight=listItem.offset().top+listItem.height()-list.offset().top;list.animate({height:minHeight},"fast","swing",function(){$("li:gt("+maxItems+")",list).css("display","none")
$("li.OTSMenuListSeeAll",list).show();list.css("height","auto");});return false;});var menusOpen=$(this).attr("menusOpen");if((menusOpen!=null)&&(menusOpen.length>0)){if(menusOpen<0){$("div",this).each(function(){$("h4",this).addClass("OTSMenuListOpen");$("ul",this).show();});}else{$("div:lt("+menusOpen+") h4",this).addClass("OTSMenuListOpen");$("div:gt("+(menusOpen-1)+")",this).each(function(){$("h4",this).addClass("OTSMenuListClosed");$("ul",this).hide();});}}else{$("div:first h4",this).addClass("OTSMenuListOpen");$("div:gt(0):not(.[seeall='1'])",this).each(function(){$("h4",this).addClass("OTSMenuListClosed");$("ul",this).hide();});}
$("h4",this).click(function(){var closed=$(this).hasClass("OTSMenuListClosed");$(this).removeClass(closed?"OTSMenuListClosed":"OTSMenuListOpen");$(this).addClass(closed?"OTSMenuListOpen":"OTSMenuListClosed");$(this).parents("div").children("ul").slideToggle("fast");return false;});})}};var MiniSearchForm={init:function(){$("div.miniSearchForm").each(function(i){$("input:image",this).click(MiniSearchForm.submit);$("input:text",this).keypress(MiniSearchForm.criteriaChanged).keyup(MiniSearchForm.criteriaChanged);$("select",this).change(MiniSearchForm.criteriaChanged);var altSrc=$("input:image",this).attr("altsrc");if((altSrc!=null)&&(altSrc.length>0)){MiniSearchForm.altSubmitImage=new Image();MiniSearchForm.altSubmitImage.src=altSrc;}});},submit:function(e){var searchForm=$(this).parents("div.miniSearchForm");$("input:text",searchForm).each(function(i){$(this).val($(this).val().removeNastyChars());});if(!MiniSearchForm.hasCriteria($(this))){searchForm.find("p.OTSAdvSearchError").slideDown("fast");$("input:text:first",searchForm).focus();return false;}
var altSrc=$(this).attr("altsrc");if((altSrc!=null)&&(altSrc.length>0))
$(this).attr("src",altSrc);return true;},hasCriteria:function(ctrl){var ok=false;var searchForm=ctrl.parents("div.miniSearchForm");$("input:text",searchForm).each(function(i){if(this.value.trim().length>0)
ok=true;});$("select",searchForm).each(function(i){if(this.value.trim().length>0)
ok=true;});return ok;},criteriaChanged:function(e){if(MiniSearchForm.hasCriteria($(this)))
$(this).parents("div.miniSearchForm").find("p.OTSAdvSearchError").slideUp("fast");if(e.keyCode==13){$(this).parents("div.miniSearchForm").find("input:image").click();return false;}}};var BrowseSiteMenu={HIDE_DELAY:250,init:function(){if($("body").hasClass("kiosk"))
return;if(($.browser.msie)&&(parseInt($.browser.version,10)<8))
{var oldBar;$(".browseDeptContainer:not(.browseDeptInline) > ul.browseDeptList").appendTo(document.body);if($(".browseDeptOther").length)
{var bdc;$(".browseDeptOther > span").mouseover(BrowseSiteMenu.mouseOverItem);$(".browseDeptList").mouseover(BrowseSiteMenu.mouseOverItem);$(document.body).mousemove(BrowseSiteMenu.mouseOverDocument);}
BrowseSiteMenu.posSiteMenu=function()
{$("ul.browseDeptList").css({left:$(".searchBar").offset().left,top:$(".browseBar").offset().top+35});};$(".browseDeptList > li").hover(function(){$(this).find("span").addClass($(this).attr("class")+"Hover");},function(){$(this).find("span").removeClass($(this).attr("class")+"Hover");});}
else if($(".browseDeptOther").length)
{var bdc;(bdc=$(".browseDeptContainer")).find(".browseDeptOther > span").mouseover(BrowseSiteMenu.mouseOverItem);bdc.mouseover(BrowseSiteMenu.mouseOverItem);$(document.body).mousemove(BrowseSiteMenu.mouseOverDocument);}
if(($.browser.msie)&&(parseInt($.browser.version,10)<8))
{$(".browseSiteMapPopout").appendTo(document.body);if(($.browser.msie)&&(parseInt($.browser.version,10)<7))
{$(document.body).append('<iframe id="siteMapPopoutIe" src="javascript:false;"></iframe>');BrowseSiteMenu.ieSiteMapPopFix=$("#siteMapPopoutIe");BrowseSiteMenu.positionPopout=function()
{var offset=$(".browseBar").offset();$(".browseSiteMapPopout").css({left:offset.left+$(".browseBar").outerWidth()-1,top:offset.top-4});BrowseSiteMenu.ieSiteMapPopFix.css({left:$(".browseSiteMapPopout").css("left"),top:$(".browseSiteMapPopout").css("top"),visibility:"visible",width:$(".browseSiteMapPopout").width(),height:$(".browseSiteMapPopout").height()});};}
else
{BrowseSiteMenu.positionPopout=function()
{var offset=$(".browseBar").offset();$(".browseSiteMapPopout").css({left:offset.left+$(".browseBar").outerWidth()-1,top:offset.top-4});};}}
$(".browseDeptContainer > a.browseDept").css("cursor","pointer").click(function(e){if($(".browseSiteMapPopout").hasClass("browseSiteMapPopoutVisible"))
{BrowseSiteMenu.closeSiteMap(e);}
else
{if(BrowseSiteMenu.positionPopout)
{BrowseSiteMenu.positionPopout();}
$(".browseSiteMapPopout").addClass("browseSiteMapPopoutVisible");$(document.body).bind("click",BrowseSiteMenu.checkCloseSiteMap);if(!BrowseSiteMenu.siteMapInserted)
{var url=(Dialog.createProxyUrl)?Dialog.createProxyUrl($(this).attr("hiddenhref")):$(this).attr("hiddenhref");BrowseSiteMenu.siteMapFetcher=new AjaxRequest(url,undefined,false);BrowseSiteMenu.siteMapFetcher.onComplete=BrowseSiteMenu.insertSiteMapArticle;BrowseSiteMenu.siteMapFetcher.onError=BrowseSiteMenu.failedInsertSiteMap;BrowseSiteMenu.siteMapFetcher.run();}}
e.preventDefault();e.stopPropagation();});$(".browseSiteMapPopout > .browseSiteMapClose > a").click(function(e){BrowseSiteMenu.closeSiteMap(e);});},insertSiteMapArticle:function(ajaxRequest)
{$(".browseSiteMapPopout .browseSiteMapPopoutContainer").html($(ajaxRequest.xmlHttp.responseText).filter("#DialogPanel").find(".dialogBody > .article").html());BrowseSiteMenu.siteMapInserted=true;},failedInsertSiteMap:function(ajaxRequest,error)
{BrowseSiteMenu._loadingMarkup=$(".browseSiteMapPopout .browseSiteMapPopoutContainer").html();if(Languages.isFrench())
{$(".browseSiteMapPopout .browseSiteMapPopoutContainer").html("Une erreur s�est produite pendant le chargement du plan de site.");}
else
{$(".browseSiteMapPopout .browseSiteMapPopoutContainer").html("An error occurred while loading the site map.");}},checkCloseSiteMap:function(e)
{if(!$(e.target).closest(".browseSiteMapPopout").length)
{BrowseSiteMenu.closeSiteMap(e);}},closeSiteMap:function(e)
{$(document.body).unbind("click",BrowseSiteMenu.checkCloseSiteMap);$(".browseSiteMapPopout").removeClass("browseSiteMapPopoutVisible");if(!BrowseSiteMenu.siteMapInserted&&BrowseSiteMenu._loadingMarkup)
{$(".browseSiteMapPopout .browseSiteMapPopoutContainer").html(BrowseSiteMenu._loadingMarkup);}
if(BrowseSiteMenu.ieSiteMapPopFix)
{BrowseSiteMenu.ieSiteMapPopFix.css("visibility","hidden");}
e.preventDefault();},mouseOverItem:function(e)
{if(BrowseSiteMenu.menuShown)
{if(BrowseSiteMenu.hideTimeout!=null)
{window.clearTimeout(BrowseSiteMenu.hideTimeout);BrowseSiteMenu.hideTimeout=null;}}
else
{BrowseSiteMenu.showSiteList();}},mouseOverDocument:function(e)
{if(!BrowseSiteMenu.hideTimeout&&BrowseSiteMenu.menuShown&&(!$(e.target).closest(".browseDeptContainer").length)&&(!$(e.target).closest(".browseDeptList").length))
{BrowseSiteMenu.hideTimeout=window.setTimeout(BrowseSiteMenu.hideSiteList,BrowseSiteMenu.HIDE_DELAY);}},showSiteList:function()
{if(BrowseSiteMenu.posSiteMenu)
{BrowseSiteMenu.posSiteMenu();}
$("ul.browseDeptList").css("display","block");BrowseSiteMenu.menuShown=true;},hideSiteList:function()
{$("ul.browseDeptList").css("display","none");BrowseSiteMenu.hideTimeout=null;BrowseSiteMenu.menuShown=false;}};var ActiveBasket={USED_PRODUCT_URL_REGEXES:{AddUsedProductToShoppingBag:/\/used-(.*)\/add\/grp(.*)-addrare\.html/,AddUsedProductCopyToShoppingBag:/\/used-(.*)\/add\/grp(.*)-(.*)-addrare\.html/,AddUsedFromNewProductToShoppingBag:/\/used-(.*)\/add\/(.*)-addrare\.html/},popUpLoadingState:false,init:function(params){Personalization.init(params.section,params.proxyUrl);var mscsProfileValue=$.cookies.get("MSCSProfile");if(!mscsProfileValue||(mscsProfileValue=="null")||(mscsProfileValue=="undefined")){if($.cookies.test()){var extraCookie=false;var subDomain=location.hostname;if($.browser.safari){var userAgent=navigator.userAgent.toLowerCase();var pos=userAgent.indexOf("mac os x 10_");if(pos>=0){var osxVersion=parseInt(userAgent.substr(pos+12));if(osxVersion<=4){extraCookie=true;$.cookies.del("MSCSProfile",{path:"/",domain:"indigo.ca",secure:false});if(params.profileHandlerUrl.indexOf("?")<0)
params.profileHandlerUrl+="?";else
params.profileHandlerUrl+="&";params.profileHandlerUrl+="extracookie=1";pos=subDomain.indexOf(".indigo.ca");if(pos>0){pos=subDomain.substr(0,pos).lastIndexOf(".");if(pos>0)
subDomain=subDomain.substr(pos+1);}}}}
if(!$.cookies.get("Commerce2002_TestPersistentCookie")){$.cookies.set("Commerce2002_TestPersistentCookie","TestCookie",{hoursToLive:24,path:"/",domain:"indigo.ca",secure:false});if(extraCookie)
$.cookies.set("Commerce2002_TestPersistentCookie","TestCookie",{hoursToLive:24,path:"/",domain:subDomain,secure:false});}
if(!$.cookies.get("Commerce2002_TestSessionCookie")){$.cookies.set("Commerce2002_TestSessionCookie","TestCookie",{path:"/",domain:"indigo.ca",secure:false});if(extraCookie)
$.cookies.set("Commerce2002_TestSessionCookie","TestCookie",{path:"/",domain:subDomain,secure:false});}
$(document.body).append("<iframe src=\""+params.profileHandlerUrl+"\" style=\"display: none;\"></iframe>");window.setTimeout("ActiveBasket.waitForProfileCookie();",300);}else{Personalization.getPersonalization();}}else{ActiveBasket.initActiveLink();ActiveBasket.initPopUpHandlers();}},waitForProfileCookie:function(){if($.cookies.get("MSCSProfile")){ActiveBasket.initActiveLink();ActiveBasket.initPopUpHandlers();}else{window.setTimeout("ActiveBasket.waitForProfileCookie();",300);}},getProductInfo:function(href,keyValue){var productId="",productCatalogue="";var pos=href.indexOf("?");var getProductInfoValue="";if(pos>=0){var hrefParts=href.substr(pos+1).split("&");for(var i=hrefParts.length-1;i>=0;--i){var keyValuePair=hrefParts[i].split("=");if(keyValuePair.length==2){var key=keyValuePair[0].toLowerCase();if(key==keyValue)
getProductInfoValue=keyValuePair[1];}}}
return getProductInfoValue;},getUsedProductInfo:function(href)
{var params={};var matches;if(matches=href.match(ActiveBasket.USED_PRODUCT_URL_REGEXES.AddUsedProductCopyToShoppingBag))
{params.UsedSection=matches[1];params.GroupID=matches[2];params.bin=matches[3];}
else if(matches=href.match(ActiveBasket.USED_PRODUCT_URL_REGEXES.AddUsedProductToShoppingBag))
{params.UsedSection=matches[1];params.GroupID=matches[2];}
else if(matches=href.match(ActiveBasket.USED_PRODUCT_URL_REGEXES.AddUsedFromNewProductToShoppingBag))
{params.UsedSection=matches[1];params.pid=matches[2];}
return params;},initActiveLink:function(){activeLinkRefreshNeeded=false;if($("div.shoppingBagContents[updateBasketCount='update']").length>0){activeLinkRefreshNeeded=true;}
if(($.cookies.get("BasketCount"))&&!activeLinkRefreshNeeded){ActiveBasket.setActiveLinkQty($.cookies.get("BasketCount"));Personalization.getPersonalization();}else{ActiveBasket.showActiveLink(true);}},initPopUpHandlers:function(){var createClickHandler=function(getParamsFn){return function(e){if(ActiveBasket.popUpLoadingState)
return false;ActiveBasket.popUpLoadingState=true;var params=getParamsFn(this)||{};var productId=params.productid;var productCatalogue=params.catalog;params.quantity=1;params.command="Add";if(window.location.hostname.indexOf("community")<0){Dialog.showWaitMessage("activeLink",$(this));}
Personalization.getBasket(params,function(data){if(window.location.hostname.indexOf("community")<0){Dialog.hideWaitMessage("activeLink");}
var id=Dialog.displayEx(data.popUpHTML,null,true,null,{hasNoShadow:true,isCentre:true,leftOffset:14,bottomOffset:50,minLeft:15,minTop:15});$("#"+id).addClass("shoppingBagPopUp");$(".linkShoppingBagPopUpRemove","#"+id).click(function(e){var href=$(this).attr("href");var productId=ActiveBasket.getProductInfo(href,"productid");var productCatalogue=ActiveBasket.getProductInfo(href,"catalog");var productVID=ActiveBasket.getProductInfo(href,"vid");var url="/Checkout/ShoppingBagRemove.ashx?";if(Languages.isFrench())
url+="lang=fr-CA";else
url+="lang=en-CA";if(window.location.hostname.indexOf("community")<0){Dialog.showWaitMessage("shoppingBagRemove",$(this));}
var removeLinkElement=$(this);$.ajax({url:url,data:{productid:productId,catalog:productCatalogue,vid:productVID,command:"Delete"},success:function(data){if(window.location.hostname.indexOf("community")<0){Dialog.hideWaitMessage("shoppingBagRemove");}
if(data.deleteProduct=="isDeleted"){ActiveBasket.updateActiveLink(data);ShoppingBagPage.Omniture.removeItem();}else{ShoppingBagPage.popUpLoadingState=false;}
Dialog.closeFromCtrl(removeLinkElement);ActiveBasket.popUpLoadingState=false;},error:function(XMLHttpRequest,textStatus,errorThrown){if(window.location.hostname.indexOf("community")<0){Dialog.hideWaitMessage("shoppingBagRemove");}
ShoppingBagPage.popUpLoadingState=false;Dialog.closeFromCtrl(removeLinkElement);ActiveBasket.popUpLoadingState=false;},type:"GET",cache:false,dataType:"json"});return false;});$(".btnContinueShopping, .dialogHeaderShoppingBag a","#"+id).click(function(e){Dialog.closeFromCtrl($(this));ActiveBasket.popUpLoadingState=false;return false;});ActiveBasket.updateActiveLink(data);if(productId&&productCatalogue)
{Personalization.getShoppingBagPopUpPageCWBAB({productid:productId,catalog:productCatalogue},function(data)
{$(".shoppingBagPopUpRecommends","#"+id).html(data);ProductListCarousel.init();});}},function(){ActiveBasket.popUpLoadingState=false;},{doAnalytics:true});return false;};};$("a[href*='_AddToShoppingBag.aspx'][href*='ADDTOBAG=TRUE']").click(createClickHandler(function(elmnt){var href=$(elmnt).attr("href");return{productid:ActiveBasket.getProductInfo(href,"productid"),catalog:ActiveBasket.getProductInfo(href,"catalog"),ctrlId:$(elmnt).attr("id")};}));$("a[usedproduct]").click(createClickHandler(function(elmnt){var href=$(elmnt).attr("href")||"";var params=ActiveBasket.getUsedProductInfo(href);return{productid:params.bin,productisbn:params.pid,catalog:"usedbooks",useddata:(params.UsedSection||"")+","+(params.GroupID||"")+","+(params.bin||"")+","+(params.pid||"")};}));if(($.browser.msie)&&(parseInt($.browser.version,10)<8))
{$(".headerShoppingBasket").mouseover(function(e){if(!ActiveBasket.linkShown)
{ActiveBasket.linkShown=true;if(!ActiveBasket.basketLoaded)
{ActiveBasket.showActiveLink(false);}
else if(parseInt($(".activeLinkQtyValue").html())>0)
{ActiveBasket.showActivePopup();}
var killPopup;$(document).mouseover(killPopup=function(evt){if(($(evt.target).closest(".activeLinkContainer").length<=0)&&($(evt.target).closest(".headerShoppingBasket").length<=0))
{$(document).unbind("mouseover",killPopup);ActiveBasket.linkShown=false;if(parseInt($(".activeLinkQtyValue").html())>0)
{ActiveBasket.hideActivePopup();}}});}});}
else
{$(".headerShoppingBasket").hover(function(e){ActiveBasket.linkShown=true;if(!ActiveBasket.basketLoaded)
{ActiveBasket.showActiveLink(false);}
else if(parseInt($(".activeLinkQtyValue").html())>0){ActiveBasket.showActivePopup();}},function(e){ActiveBasket.linkShown=false;ActiveBasket.hideActivePopup();});}},showActiveLink:function(isInit){if($(".activeLinkContainer").length>0){if(isInit){Personalization.getPersonalization();}
return;}
if(isInit){Personalization.getPersonalizationWithBasket(null,ActiveBasket.handleActiveLinkResponse);}else{Personalization.getBasket(null,ActiveBasket.handleActiveLinkResponse);}
return false;},handleActiveLinkResponse:function(data){var firstTimeAction=false;if((container=$(".headerShoppingBasket > h3.activeLinkQty")).length){firstTimeAction=true;}
ActiveBasket.updateActiveLink(data);if((firstTimeAction)&&(parseInt($(".activeLinkQtyValue").html())>0)&&(ActiveBasket.linkShown)){ActiveBasket.showActivePopup();}},updateActiveLink:function(data){ActiveBasket.populateActiveLink(data.miniPopUpHTML);ActiveBasket.setActiveLinkQty(data.itemCount);$.cookies.set("BasketCount",data.itemCount,{path:"/",domain:"indigo.ca",secure:false});if(!$.cookies.get("MSCSProfile")&&data.MCSCProfile)
$.cookies.set("MSCSProfile",data.MCSCProfile,{path:"/",domain:"indigo.ca",secure:false});},showActivePopup:function()
{$(".headerShoppingBasket").addClass("headerShoppingBasketHover");if(ActiveBasket.positionActivePopup)
{ActiveBasket.positionActivePopup();}
$(".activeLinkContainer").css("display","block");var subtotal;(subtotal=$("h4.activeLinkSubtotal")).css({height:"","font-size":""});while(subtotal.height()>28)
{subtotal.css("font-size",parseInt(subtotal.css("font-size"),10)-1);}
subtotal.css("height","28px");if(ActiveBasket.ieRenderFix)
{ActiveBasket.ieRenderFix.css("visibility","visible");}},hideActivePopup:function()
{$(".headerShoppingBasket").removeClass("headerShoppingBasketHover");$(".activeLinkContainer").css("display","none");if(ActiveBasket.ieRenderFix)
{ActiveBasket.ieRenderFix.css("visibility","hidden");}},populateActiveLink:function(data){var shoppingBasketContainer,popupContainer;$(".activeLinkContainer").remove();$(".headerShoppingBasket").append(data);ActiveBasket.basketLoaded=true;if(($.browser.msie)&&(parseInt($.browser.version,10)<8))
{var elmnt=$(".headerShoppingBasket > .activeLinkContainer").appendTo(document.body);if((parseInt($.browser.version,10)<7)&&(!($("#ieActiveBasketFix").length)))
{$(document.body).append('<iframe id="ieActiveBasketFix" src="javascript:false;"></iframe>');ActiveBasket.ieRenderFix=$("#ieActiveBasketFix");ActiveBasket.positionActivePopup=function()
{var offset=$(".headerOpenBasket").offset();elmnt.css({left:offset.left,top:offset.top+59});ActiveBasket.ieRenderFix.css({height:$(".activeLinkContainer").height(),top:offset.top+59,left:offset.left});};}
else if(parseInt($.browser.version,10)<8)
{ActiveBasket.positionActivePopup=function()
{var offset=$(".headerOpenBasket").offset();elmnt.css({left:offset.left,top:offset.top+59});};}}},setActiveLinkQty:function(qty)
{var container,strQty;if(Languages.isFrench()){switch(qty)
{case 0:case"0":case 1:case"1":strQty='<span class="activeLinkQtyValue">'+qty+'</span> article';break;default:strQty='<span class="activeLinkQtyValue">'+qty+'</span> articles';}}else{switch(qty){case 1:case"1":strQty='<span class="activeLinkQtyValue">'+qty+'</span> item';break;case 0:default:strQty='<span class="activeLinkQtyValue">'+qty+'</span> items';}}
if((container=$(".headerShoppingBasket > h3.activeLinkQty")).length){container.html(strQty);}
else{if((container=$(".headerShoppingBasket")).length){container.append('<h3 class="activeLinkQty">'+strQty+'</h3>');}}}};var EbookExitPopUp={init:function(){if(EbookExitPopUp.doneInit)
return;$("a[ebookProductLink]").click(function(){if(!$.cookies.get("shortCoversPopUpShow")){dialogHTML=$(".EbookPopUpWrapper").html();var id=Dialog.displayEx(dialogHTML,$("#BaseRegion"),true,null,{isCentre:true});$("a","#"+id).click(Dialog.close);$(".popupUnderlay").click(function(){$(".btnShortCoversCancel").click()});$(".btnShortCoversCancel","#"+id).click(Dialog.close);}else{window.open($(this).attr("href"));EbookExitPopUp.Omniture.toShortcovers($(this).attr("cat"),$(this).attr("isbn"),$(this).attr("safetitle"));}
$(".btnShortCoversContinue").attr("eBookUrl",$(this).attr("href"));$(".btnShortCoversContinue").attr("isbn",$(this).attr("isbn"));$(".btnShortCoversContinue").attr("safetitle",$(this).attr("safetitle"));$(".btnShortCoversContinue").attr("cat",$(this).attr("cat"));$(".btnShortCoversContinue").click(function(){if($("input:checkbox").is(":checked")){if($.cookies.test()){$.cookies.set("shortCoversPopUpShow","false",{hoursToLive:24,path:"/",domain:"indigo.ca",secure:false});}}
$(".btnShortCoversCancel").click();window.open($(this).attr("ebookurl"));EbookExitPopUp.Omniture.toShortcovers($(this).attr("cat"),$(this).attr("isbn"),$(this).attr("safetitle"));});return false;});$("a:has(img.OTSEbookExcerptImage)").click(function(){EbookExitPopUp.Omniture.readExcerpt($(this).attr("cat"),$(this).attr("isbn"),$(this).attr("safetitle"));});EbookExitPopUp.doneInit=true;},Omniture:{toShortcovers:function(catalogue,isbn,safeTitle)
{if(!s)return;EbookExitPopUp.Omniture.clearVariables();s.eVar8=catalogue+";"+isbn+"-"+safeTitle;s.t();},readExcerpt:function(catalogue,isbn,safeTitle)
{if(!s)return;EbookExitPopUp.Omniture.clearVariables();s.prop8=catalogue+";"+isbn+"-"+safeTitle;s.t();},clearVariables:function()
{s.prop1="";s.prop2="";s.prop3="";s.prop4="";s.prop5="";s.prop6="";s.prop7="";s.prop8="";s.prop9="";s.prop10="";s.prop11="";s.prop12="";s.prop13="";s.prop14="";s.prop15="";s.prop16="";s.campaign="";s.state="";s.zip="";s.events="";s.products="";s.purchaseID="";s.eVar1="";s.eVar2="";s.eVar3="";s.eVar4="";s.eVar5="";s.eVar6="";s.eVar7="";s.eVar8=""
s.eVar9="";s.eVar10="";s.eVar11="";s.eVar12="";s.eVar21="";s.eVar22="";}}};var ShoppingBagPage={popUpLoadingState:false,dragDropErrorMsg:"",init:function(){$(".shoppingBagContents .shoppingBagContentsSecondCol :text").keypress(ShoppingBagPage.checkFormSubmit).keyup(ShoppingBagPage.checkFormSubmit);if($.cookies.test()){$(".ShoppingBagDrop .shoppingBagContents .shoppingBagRemove").click(function(e){if(ShoppingBagPage.popUpLoadingState)
return false;ShoppingBagPage.popUpLoadingState=true;var href=$(this).attr("href");var productId=ActiveBasket.getProductInfo(href,"productid");var productCatalogue=ActiveBasket.getProductInfo(href,"catalog");var productVID=ActiveBasket.getProductInfo(href,"vid");var deleteButtonObject=$(this);var url="/Checkout/ShoppingBagRemove.ashx?";if(Languages.isFrench())
url+="lang=fr-CA";else
url+="lang=en-CA";if(window.location.hostname.indexOf("community")<0){Dialog.showWaitMessage("shoppingBagRemove",$(this));}
$.ajax({url:url,data:{productid:productId,catalog:productCatalogue,vid:productVID,command:"Delete"},success:function(data){if(window.location.hostname.indexOf("community")<0){Dialog.hideWaitMessage("shoppingBagRemove");}
if(data.deleteProduct=="isDeleted"){var productDiv=deleteButtonObject.parent("div").parent("div");var wrapperDiv=productDiv.parent("div");productDiv.fadeOut("slow",function(){productDiv.next(".clearfix").remove();productDiv.remove();ShoppingBagPage.popUpLoadingState=false;if($(wrapperDiv).children("div").length<=0){$(wrapperDiv).remove();}});if(data.emptyBag==""){$(".shoppingBagTotalSection span.shoppingBagSubtotal").html(data.subTotal);$(".shoppingBagTotalSection span.shoppingBagMemberSubtotal").html(data.memberSubTotal);$(".shoppingBagTotalSection p").html(data.memberSavingsText);}else{$("#shoppingBagMainArea").html(data.emptyBag);$(".shoppingBagButtonsTopRight").html("");$(".shoppingBagButtonsBottomRight").html("");$(".shoppingBagUpdateQty, .shoppingBagHelp, .shoppingBagGiftWrap").css("display","none");}
if(data.giftWrap)
{$("p.shoppingBagGiftWrapOption > label.shoppingBagGiftWrapAvailable").html(data.giftWrap.allowedMessage);$("p.shoppingBagGiftWrapOption > span.shoppingBagGiftNoWrap").html(data.giftWrap.notAllowedMessage);if(data.giftWrap.allowed)
{$("div.shoppingBagGiftWrap").addClass("shoppingBagGiftWrapAllowed");$("div.shoppingBagGiftWrap").removeClass("shoppingBagGiftWrapNotAllowed");}
else
{$("div.shoppingBagGiftWrap").removeClass("shoppingBagGiftWrapAllowed");$("div.shoppingBagGiftWrap").addClass("shoppingBagGiftWrapNotAllowed");$("div.shoppingBagGiftWrap input[type=checkbox]").attr("checked",false);}}
ActiveBasket.updateActiveLink(data);ShoppingBagPage.Omniture.removeItem();}else{$(".shoppingBagContentsError").html(data.errorMessage).show();ShoppingBagPage.popUpLoadingState=false;}},error:function(XMLHttpRequest,textStatus,errorThrown){if(window.location.hostname.indexOf("community")<0){Dialog.hideWaitMessage("shoppingBagRemove");}
ShoppingBagPage.popUpLoadingState=false;},type:"GET",cache:false,dataType:"json"});return false;});}},enableDragDrop:function(){$(".ShoppingBagDrag ol li div a[id*='_ItemImage'] img").draggable({helper:'clone',opacity:0.70,zIndex:3,appendTo:'body',start:function(event,ui){$(document.body).append("<div id=\"dragDropPopupUnderlay\" class=\"popupUnderlay\"></div>");$("#dragDropPopupUnderlay").css("z-index",1);if(($.browser.msie)&&($.browser.version<7))
$("#dragDropPopupUnderlay").height($(document).height());$("#dragDropPopupUnderlay").show();$("#dragDropPopupUnderlay").droppable({accept:".ShoppingBagDrag ol li div a img",drop:function(ev,ui){$("#dragDropPopupUnderlay").remove();$(".ShoppingBagDrop .shoppingBagContents").css("z-index",0);if(($.browser.msie)&&($.browser.version<8))
$(".shoppingBagContentsClone").remove();}});shoppingBagContentsObj=$(".ShoppingBagDrop .shoppingBagContents");var isIE6or7=false;if(($.browser.msie)&&($.browser.version<8))
isIE6or7=true;if(!isIE6or7)
shoppingBagContentsObj.css("position","relative");shoppingBagContentsObj.css("z-index",2);if(isIE6or7){shoppingBagContentsObj.clone().appendTo($("body")).addClass("shoppingBagContentsClone");$(".shoppingBagContentsClone").css({'position':'absolute','left':shoppingBagContentsObj.offset().left+'px','top':shoppingBagContentsObj.offset().top+'px','line-height':'1.3'});}}});$(".ShoppingBagDrop .shoppingBagContents").droppable({accept:".ShoppingBagDrag ol li div a[id*='_ItemImage'] img",drop:function(ev,ui){$("#dragDropPopupUnderlay").remove();$(".ShoppingBagDrop .shoppingBagContents").css("z-index",0);if(($.browser.msie)&&($.browser.version<8))
$(".shoppingBagContentsClone").remove();Dialog.showWaitMessage("dragDropAdd",$(".ShoppingBagDrop .shoppingBagContents"));var href=$("#"+$(ui.draggable).parents("div").attr("popupid")).find("a[href*='_AddToShoppingBag.aspx']").attr("href");if(!href){Dialog.hideWaitMessage("dragDropAdd");$(".shoppingBagContentsError").html(ShoppingBagPage.dragDropErrorMsg).show();sbcErrorTop=$(".shoppingBagContentsError").offset().top;windowTop=$(window).scrollTop();windowHeight=$(window).height();inViewPort=false;if((sbcErrorTop>windowTop)&&(sbcErrorTop<(windowTop+windowHeight))){inViewPort=true;}
if(!inViewPort){$("html, body").animate({scrollTop:$(".shoppingBagContentsError").offset().top},500);}
return false;}
if($(ui.draggable).closest(".dealsOutlet").length>0)
{href+="&source=dealsOutlet";}
else
{href+="&source=cwbab";}
window.location.href=href;}});$(".ShoppingBagRecommends ol li, .dealsOutlet ol li").each(function(){var imgParent=$(this);var img=imgParent.find("img");var setPosition=function(){imgParent.css("background-position","74px "+(img.height()/2-20)+"px");};if(img.complete||$(img).attr("complete"))
{setPosition();}
else
{setPosition();img.load(setPosition);}});},Omniture:{removeItem:function()
{if(!s)return;s.prop1="";s.prop2="";s.prop3="";s.prop4="";s.prop5="";s.prop6="";s.prop7="";s.prop8="";s.prop9="";s.prop10="";s.prop11="";s.prop12="";s.prop13="";s.prop14="";s.prop15="";s.prop16="";s.campaign="";s.state="";s.zip="";s.events="scRemove";s.products="";s.purchaseID="";s.eVar1="";s.eVar2="";s.eVar3="";s.eVar4="";s.eVar5="";s.eVar6="";s.eVar7="";s.eVar8="";s.eVar9="";s.eVar10="";s.eVar11="";s.eVar12="";s.eVar21="";s.eVar22="";var s_code=s.t();}},checkFormSubmit:function(e){if(e.keyCode==13){$(".shoppingBagContents .shoppingBagContentsUpdate input.shoppingBagUpdateQty").click();return false;}}};var HeaderMenus={isMenuVisible:false,cssClass:"",init:function(){var links=$("div.header ul.OTSHeaderListOne li.headerMenuLink a");if(links.length>0){links.mouseover(HeaderMenus.show);$(document.body).mousemove(HeaderMenus.mouseOverDocument);}},show:function(e){HeaderMenus.cssClass=$(this).parents("li").attr("class");var pos=HeaderMenus.cssClass.indexOf(" ");if(pos>0){HeaderMenus.cssClass=HeaderMenus.cssClass.substr(0,pos);$("div.header div."+HeaderMenus.cssClass+"Menu").show();HeaderMenus.isMenuVisible=true;}},mouseOverDocument:function(e){if(HeaderMenus.isMenuVisible)
if(!$(e.target).closest("."+HeaderMenus.cssClass).length&&!$(e.target).closest("."+HeaderMenus.cssClass+"Menu").length){HeaderMenus.isMenuVisible=false;$("div.header div."+HeaderMenus.cssClass+"Menu").hide();}}};$(document).ready(function(){if(!window.otsIgnoreDocumentDomain)
document.domain="indigo.ca";});window.commonPagePreLoaded=false;function commonPagePreLoad(){if(!window.otsIgnoreDocumentDomain)
document.domain="indigo.ca";if(!window.commonPagePreLoaded){window.commonPagePreLoaded=true;QuickSearch.init();BrowseSiteMenu.init();HeaderMenus.init();}};$(document).ready(commonPagePreLoad);function otsPlatformPageInit(){if(window.otsPlatformPagePreLoad){window.otsPlatformPagePreLoaded=false;window.otsPlatformPagePreLoad2=window.otsPlatformPagePreLoad;window.otsPlatformPagePreLoad=function(){if(!window.otsPlatformPagePreLoaded){window.otsPlatformPagePreLoaded=true;commonPagePreLoad();window.otsPlatformPagePreLoad2();}};$(document).ready(window.otsPlatformPagePreLoad);}
if(window.otsPlatformPageLoad)
$(window).load(otsPlatformPageLoad);};

// Name: PopUp.js  Output: Min

function PopUp(){this.ajax=null;this.position="centre";this.dragDrop=false;this.dropShadow=null;this.popUpId=null;this.closeParent=false;};PopUp.zIndex=1000;PopUp.topGap=15;PopUp.rightGap=24;PopUp.baseUrl="/";PopUp.popUpHandler="";PopUp.idIndex=0;PopUp.prototype.init=function(id,url,width){var ctrl=document.getElementById(id);this.initCtrl(id,ctrl,url,width);};PopUp.prototype.initCtrl=function(id,ctrl,url,width){this.width=parseInt(width,10)+8;this.url=url;this.id=id;if(ctrl!=null)
addEvent(ctrl,"click",this.show.bindAsEventListener(this));};PopUp.prototype.onLoad=function(){};PopUp.prototype.onClose=function(){};PopUp.prototype.show=function(e){if(this.closeParent){var parentPopUp=document.getElementById(this.id);while(parentPopUp!=null){if((parentPopUp.id!=null)&&(parentPopUp.id.length>7)&&(parentPopUp.id.substr(parentPopUp.id.length-7,7)=="__popUp")){$("#"+parentPopUp.id+" a.OTSPopUpClose").click();break;}
parentPopUp=parentPopUp.parentNode;}}
var popUpDiv;if(this.popUpId!=null){popUpDiv=document.getElementById(this.popUpId);this.reset();this.dropShadow.reset();}else{this.popUpId=this.id+"__popUp";this.popUpInnerId=this.id+"__popUpInner";var popUpInner=document.createElement("div");popUpInner.id=this.popUpInnerId;this.dropShadow=new DropShadow();this.dropShadow.fadeOutComplete=this.reset.bindAsEventListener(this);popUpDiv=this.dropShadow.init(popUpInner,this.popUpId);popUpDiv.style.position="absolute";document.body.appendChild(popUpDiv);}
popUpDiv.style.left="-1000px";popUpDiv.style.top="0";popUpDiv.style.width=this.width+"px";if(this.ajax==null){this.ajax=new AjaxRequest(this.url);this.ajax.id=this.popUpInnerId;this.ajax.onComplete=this.onComplete.bindAsEventListener(this);}
this.ajax.run();e.preventDefault();e.stopPropagation();return false;};PopUp.prototype.onComplete=function(ajax){this.numImagesToLoad=0;var popUpDiv=document.getElementById(this.popUpId);var imageList=popUpDiv.getElementsByTagName("img");if((imageList!=null)&&(imageList.length>0)){this.numImagesToLoad=imageList.length;for(var i=0;i<imageList.length;++i)
addEvent(imageList[i],"load",this.imageLoaded.bindAsEventListener(this));}
if(this.numImagesToLoad<=0)
this.imageLoaded(null);};PopUp.prototype.imageLoaded=function(e){--this.numImagesToLoad;if(this.numImagesToLoad<=0){this.resize();PopUp.initInnerPopUpLinks(this.popUpInnerId,this.position);this.onLoad();}};PopUp.prototype.resize=function(){var pageSize=new PageSize();var pagePos=new PagePos();var popUpDiv=document.getElementById(this.popUpId);var width=popUpDiv.offsetWidth;var height=popUpDiv.offsetHeight;var helpBox=document.getElementById("__mdl_PopUpHelpBox");if((helpBox!=null)&&(height>400)){helpBox.className+=" popUpArticleLong";}
var iframeList=popUpDiv.getElementsByTagName("iframe");if((iframeList!=null)&&(iframeList.length>0)){for(var i=0;i<iframeList.length;++i){if(iframeList[0].className=="popUpIframe"){iframeList[0].style.width=width+"px";iframeList[0].style.height=height+"px";break;}}}
var left;if(this.position=="left")
left=8;else if(this.position=="right")
left=pageSize.width-width-PopUp.rightGap;else
left=((pageSize.width-width)/2);var top=pagePos.top+((pageSize.window.height-height)/2);if(left<0)
left=0;if(top<0)
top=0;popUpDiv.style.left=left+"px";popUpDiv.style.top=top+"px";popUpDiv.style.zIndex=PopUp.zIndex++;this.closeId=null;this.printId=null;var popUpInner=document.getElementById(this.popUpInnerId);var linkList=popUpInner.getElementsByTagName("a");if((linkList!=null)&&(linkList.length>0)){for(var i=0;i<linkList.length;++i){if(linkList[i].className=="OTSPopUpClose"){this.closeId=linkList[i].id;this.closeClickGuid=addEvent(linkList[i],"click",this.hide.bindAsEventListener(this));}else if(linkList[i].className=="OTSPopUpPrint"){this.printId=linkList[i].id;this.printClickGuid=addEvent(linkList[i],"click",this.print.bindAsEventListener(this));}}}
this.mouseDownGuid=addEvent(popUpInner,"mousedown",this.onMouseDown.bindAsEventListener(this));};PopUp.prototype.hide=function(e){this.onClose();this.dropShadow.fadeOut();if(e!=null){e.preventDefault();e.stopPropagation();return false;}};PopUp.prototype.print=function(e){var popUpInner=document.getElementById(this.popUpInnerId);var styleSheetHTML="";for(var i=0;i<document.styleSheets.length;++i){var media="";if(document.styleSheets[i].media.length>0){for(var j=0;j<document.styleSheets[i].media.length;++j)
if(media.length==0)
media=" media=\""+document.styleSheets[i].media[j];else
media+=","+document.styleSheets[i].media[j];media+="\"";}
styleSheetHTML+="<link rel=\"stylesheet\" type=\"text/css\" href=\""+document.styleSheets[i].href+"\""+media+" />";}
var html="<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\"><html><head><meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" /><title>chapters.indigo.ca</title>"+styleSheetHTML+"</head><body><div class=\"base\">"+
popUpInner.innerHTML+"</div></body></html>";var printFrame=document.getElementById("_ots_popup_print");if(printFrame==null){printFrame=document.createElement("iframe");printFrame.id="_ots_popup_print";printFrame.name="_ots_popup_print";printFrame.style.position="absolute";printFrame.style.top="0";printFrame.style.left="-3000px";document.body.appendChild(printFrame);}
var doc=printFrame.contentWindow.document;doc.open();doc.write(html);doc.close();window.setTimeout(this.printTimer.bindAsEventListener(this),10);if(e!=null){e.preventDefault();e.stopPropagation();return false;}};PopUp.prototype.printTimer=function(){var printFrame=document.getElementById("_ots_popup_print");if(printFrame!=null){var doc=printFrame.contentWindow.document;if(doc!=null){if(doc.styleSheets.length>=document.styleSheets.length){window.frames["_ots_popup_print"].focus();window.frames["_ots_popup_print"].print();}else{window.setTimeout(this.printTimer.bindAsEventListener(this),100);}}}};PopUp.prototype.reset=function(){var popUpDiv=document.getElementById(this.popUpId);popUpDiv.style.left="-1000px";popUpDiv.style.width="0";var popUpInner=document.getElementById(this.popUpInnerId);removeEventByGuid(popUpInner,"mousedown",this.mouseDownGuid);if(this.closeId!=null){var closeCtrl=document.getElementById(this.closeId);if(closeCtrl!=null){removeEventByGuid(closeCtrl,"click",this.closeClickGuid);this.closeId=null;}}
if(this.printId!=null){var printCtrl=document.getElementById(this.printId);if(printCtrl!=null){removeEventByGuid(printCtrl,"click",this.printClickGuid);this.printId=null;}}
popUpInner.innerHTML="";};PopUp.prototype.onMouseDown=function(e){var popUpDiv=document.getElementById(this.popUpId);if(popUpDiv.style.zIndex<(PopUp.zIndex-1)){popUpDiv.style.zIndex=PopUp.zIndex++;}
var ctrl=e.target;var inHeader=false;while(ctrl!=null){if(ctrl.nodeName.toLowerCase()=="a"){break;}
if(ctrl.nodeName.toLowerCase()=="h4"){inHeader=true;break;}
ctrl=ctrl.parentNode;}
if(inHeader){this.dragDrop=true;this.mouseButtonState=e.button;var mousePos=new MouseEventPos(e);var popUpDivPos=new ElementPos(popUpDiv);this.dragOffsetX=mousePos.x-popUpDivPos.left;this.dragOffsetY=mousePos.y-popUpDivPos.top;this.mouseMoveGuid=addEvent(window.top.document,"mousemove",this.onMouseMove.bindAsEventListener(this));this.mouseUpGuid=addEvent(window.top.document,"mouseup",this.onMouseUp.bindAsEventListener(this));this.fixIEDragDrop(true);e.preventDefault();e.stopPropagation();return false;}};PopUp.prototype.onMouseMove=function(e){var pageSize=new PageSize();var windowSize=new WindowSize();var maxWidth=Math.max(pageSize.width,windowSize.width);var maxHeight=Math.max(pageSize.height,windowSize.height);var popUpDiv=document.getElementById(this.popUpId);var width=popUpDiv.offsetWidth;var height=popUpDiv.offsetHeight;var mousePos=new MouseEventPos(e);var x=Math.min(Math.max(0,mousePos.x-this.dragOffsetX),maxWidth-width-PopUp.rightGap)
var y=Math.min(Math.max(PopUp.topGap,mousePos.y-this.dragOffsetY),maxHeight-height);popUpDiv.style.left=x+"px";popUpDiv.style.top=y+"px";if(e.button!=this.mouseButtonState){return this.onMouseUp(e);}else{e.preventDefault();e.stopPropagation();return false;}};PopUp.prototype.onMouseUp=function(e){this.dragDrop=false;removeEventByGuid(window.top.document,"mousemove",this.mouseMoveGuid);removeEventByGuid(window.top.document,"mouseup",this.mouseUpGuid);this.fixIEDragDrop(false);e.preventDefault();e.stopPropagation();return false;};PopUp.prototype.fixIEDragDrop=function(fix){if(fix){window.top.document.body.ondrag=function(){return false;};window.top.document.body.onselectstart=function(){return false;};}else{window.top.document.body.ondrag=null;window.top.document.body.onselectstart=null;}};PopUp.initPopUpLinks=function(position){PopUp.initInnerPopUpLinksEx(null,position,false);};PopUp.initPopUpLinksEx=function(position,useOLD){PopUp.initInnerPopUpLinksEx(null,position,useOLD);};PopUp.initInnerPopUpLinks=function(id,position){PopUp.initInnerPopUpLinksEx(id,position,false);}
PopUp.initInnerPopUpLinksEx=function(id,position,useOLD){var urlProxyFormat="";if(PopUp.popUpHandler.length>0){var urlProxyFormat=PopUp.baseUrl;if((urlProxyFormat.length==0)||(urlProxyFormat.charAt(urlProxyFormat.length-1)!='/'))
urlProxyFormat+="/";urlProxyFormat+=PopUp.popUpHandler;}
var popUpLinks;if(id!=null)
if(useOLD)
popUpLinks=$("#"+id+" a[otspopup_old]");else
popUpLinks=$("#"+id+" a[otspopup]");else
if(useOLD)
popUpLinks=$("a[otspopup_old]");else
popUpLinks=$("a[otspopup]");popUpLinks.each(function(){var url=$(this).attr("href");if((url!=null)&&(url.length>0)){if(url.indexOf("/dialog/")>0)
{$(this).click(Dialog.getContent);return;}
if(urlProxyFormat.length>0)
url=urlProxyFormat.replace("{0}",escape(url));var linkId=$(this).attr("id");if((linkId==null)||(linkId.length==0)){linkId="_otspopup_link_"+(++PopUp.idIndex);$(this).attr("id",linkId);}
var width=$(this).attr("otspopupwidth");if((width==null)||(width.length==0))
width="400";var closeParent=$(this).attr("otscloseparent");if((closeParent==null)||(closeParent.toLowerCase()!="false"))
closeParent=true;else
closeParent=false;var popUp=new PopUp();popUp.position=position;if(id!=null)
popUp.closeParent=closeParent;popUp.init(linkId,url,width);if(typeof(PopUp.popUps)=="undefined")
PopUp.popUps=new Array();PopUp.popUps.push(popUp);}});};PopUpIframe.prototype=new PopUp();PopUpIframe.prototype.constructor=PopUpIframe;function PopUpIframe(){PopUp.call(this);};PopUpIframe.prototype.show=function(e){var popUpDiv=null;if(this.popUpId!=null){popUpDiv=document.getElementById(this.popUpId);}
if(popUpDiv==null){return PopUp.prototype.show.call(this,e);}else{e.preventDefault();e.stopPropagation();return false;}};PopUpIframe.prototype.onLoad=function(){this.writeIframeWaitMessage();var url=this.url.replace("popup","");frames[this.iframeId].location.replace(url);};PopUpIframe.prototype.writeIframeWaitMessage=function(){if(!$.browser.msie){frames[this.iframeId].document.open();var message="<html><head></head><body style='padding: 15px 0 0 30px; background: #fff; color: #666; font-family: Arial, Helvetica, Sans-Serif; font-size: 0.69em; font-weight: bold;'>"+getLoadingMessage()+"</body></html>";frames[this.iframeId].document.write(message);frames[this.iframeId].document.close();}};PopUpIframe.prototype.onClose=function(){closePopUpIframe(this.iframeId,false);};PopUpIframe.prototype.onMouseDown=function(e){PopUp.prototype.onMouseDown.call(this,e);if(this.dragDrop){var iframe=window.top.document.getElementById(this.iframeId);this.iframeMouseMoveGuid=addEvent(iframe.contentWindow.document,"mousemove",this.onIframeMouseMove.bindAsEventListener(this));this.iframeMouseUpGuid=addEvent(iframe.contentWindow.document,"mouseup",this.onIframeMouseUp.bindAsEventListener(this));}};PopUpIframe.prototype.onIframeMouseMove=function(e){if(e.button!=this.mouseButtonState){return this.onIframeMouseUp(e);}else{e.preventDefault();e.stopPropagation();return false;}};PopUpIframe.prototype.onIframeMouseUp=function(e){var iframe=window.top.document.getElementById(this.iframeId);removeEventByGuid(iframe.contentWindow.document,"mousemove",this.iframeMouseMoveGuid);removeEventByGuid(iframe.contentWindow.document,"mouseup",this.iframeMouseUpGuid);return this.onMouseUp(e);};function closePopUpIframe(iframeId,aspnetSubmit){var ctrl=window.top.document.getElementById(iframeId);while(ctrl!=null){if(ctrl.className=="dropShadow"){ctrl.style.left="-1000px";ctrl.style.width="0";break;}
ctrl=ctrl.parentNode;}
var ajax=new AjaxRequest("","",true);ajax.displayWait(true);if(aspnetSubmit){window.top.document.__aspnetForm.submit();}else{var url=window.top.location.protocol+"//"+window.top.location.host+window.top.location.pathname;window.top.location.replace(url);}};function IframeInPopUp(){};IframeInPopUp.prototype.init=function(){var ctrl=window.top.document.getElementById(this.iframeId);while(ctrl!=null){if(ctrl.className=="dropShadow"){this.popUpId=ctrl.id;break;}
ctrl=ctrl.parentNode;}
this.mouseDownGuid=addEvent(document.documentElement,"mousedown",this.onMouseDown.bindAsEventListener(this));};IframeInPopUp.prototype.onMouseDown=function(e){var popUpDiv=window.top.document.getElementById(this.popUpId);if(popUpDiv.style.zIndex<(window.top.PopUp.zIndex-1)){popUpDiv.style.zIndex=window.top.PopUp.zIndex++;}};function BrowserWindow(){};BrowserWindow.prototype.init=function(id,url,params,customScript,cancelEvents){this.id=id;this.url=url;this.params=params;this.customScript=customScript;this.cancelEvents=cancelEvents;var ctrl=document.getElementById(id);if(ctrl!=null)
addEvent(ctrl,"click",this.show.bindAsEventListener(this));};BrowserWindow.prototype.show=function(e){this.customScript();window.open(this.url,this.id,this.params);e.preventDefault();if(this.cancelEvents){e.stopPropagation();return false;}};

// Name: Personalization.js  Output: Min

var Personalization={PERSONALIZED_BASKET_MODULE:"PersonalizedBasket",PERSONALIZED_ANALYTICS_MODULE:"PersonalizedAnalytics",PERSONALIZED_BROWSE_HISTORY_MODULE:"PersonalizedBrowseHistory",PERSONALIZED_CWBAB_MODULE:"PersonalizedShopCWBAB",PERSONALIZED_COMMUNITY_BOOKS_OUTLET_MODULE:"PersonalizedCommunityBooksOutlet",PERSONALIZED_SHOPPING_BAG_POP_UP_PAGE_CWBAB:"PersonalizedShoppingBagPopUpPageCWBAB",urls:{},isProxy:false,placeHolders:{},modules:[],params:{},shopMayWeRecommendParams:{},section:null,firstRequest:true,initShopOnResponse:false,init:function(section,proxyUrl)
{var urlsContainer=$("div[personalization]");var urlLinks=$("a[type]",urlsContainer);Personalization.isProxy=!!proxyUrl;urlLinks.each(function()
{var url=jQuery.trim($(this).attr("href"));if(proxyUrl)
{url=proxyUrl+encodeURIComponent(url);}
Personalization.urls[$(this).attr("type")]=url;});urlsContainer.remove();Personalization.section=section;},registerPlaceHolder:function(elementId,module,noAutoLoad)
{Personalization.placeHolders[module]=$("#"+elementId);if(!noAutoLoad)
Personalization.modules.push(module);},registerParams:function(params)
{if(params)
jQuery.extend(Personalization.params,params);},registerShopMayWeRecommendParams:function(params)
{if(params)
jQuery.extend(Personalization.shopMayWeRecommendParams,params);},requestPersonalizationData:function(url,params,modules,basketCallback,errorCallback)
{params=jQuery.extend({},params||{});modules=jQuery.merge([],modules||[]);if(basketCallback)
modules.push(Personalization.PERSONALIZED_BASKET_MODULE);if(modules.length>0)
params.modules=modules;params.Section=Personalization.section;params.__lang=(Languages.isFrench()?"fr-CA":"en-CA");params.lang=params.__lang;Personalization.appendMSCSProfileIfNeeded(url,params);$.ajax({url:url,type:"GET",data:params,dataType:"jsonp",cache:false,error:function(request,status)
{Personalization.handleError(status,errorCallback);},success:function(data)
{if(data)
{if(data.error)
Personalization.handleError(data.error,errorCallback);var initializeShop=false;jQuery.each(modules,function()
{if(this==Personalization.PERSONALIZED_BASKET_MODULE)
{basketCallback(data[this]);}
else if(this==Personalization.PERSONALIZED_ANALYTICS_MODULE)
{eval(data[this]);}
else
{Personalization.populatePlaceHolder(Personalization.placeHolders[this],data[this]);if(this==Personalization.PERSONALIZED_BROWSE_HISTORY_MODULE)
Personalization.browseHistory.initLinks();if(this==Personalization.PERSONALIZED_CWBAB_MODULE){initializeShop=true;}
if(this==Personalization.PERSONALIZED_COMMUNITY_BOOKS_OUTLET_MODULE){initializeShop=true;}}});if(Personalization.initShopOnResponse)
{Personalization.initShopOnResponse=false;initializeShop=true;}
if(Personalization.firstRequest)
{Personalization.firstRequest=false;if(Personalization.placeHolders[Personalization.PERSONALIZED_CWBAB_MODULE])
{initializeShop=false;Personalization.initShopOnResponse=true;Personalization.requestPersonalizationData(Personalization.urls.personalizationShopCWBABUrl,Personalization.shopMayWeRecommendParams,[Personalization.PERSONALIZED_CWBAB_MODULE],null);}}
if(initializeShop)
{if($.cookies.test()){ShoppingBagPage.enableDragDrop();}
ProductListPopUp.init();}}
else
{Personalization.handleError("No data",errorCallback);}}});},getPersonalization:function()
{Personalization.requestPersonalizationData(Personalization.urls.personalizationUrl,Personalization.params,Personalization.modules,null);},getPersonalizationWithBasket:function(params,basketCallback,errorCallback)
{jQuery.extend(params,Personalization.params);var modules=Personalization.modules||[];Personalization.requestPersonalizationData(Personalization.urls.personalizationActiveBasketUrl,params,modules,basketCallback,errorCallback);},getBasket:function(params,basketCallback,errorCallback,options)
{options=options||{};var modules=[];if(options.doAnalytics)
{modules.push(Personalization.PERSONALIZED_ANALYTICS_MODULE);}
Personalization.requestPersonalizationData(Personalization.urls.activeBasketUrl,params,modules,basketCallback,errorCallback);},getShoppingBagPopUpPageCWBAB:function(params,callback)
{params.modules=[Personalization.PERSONALIZED_SHOPPING_BAG_POP_UP_PAGE_CWBAB];var url=Personalization.urls.personalizationShoppingBagPopUpPageCWBAB;Personalization.appendMSCSProfileIfNeeded(url,params);$.ajax({url:url,type:"GET",data:params,dataType:"jsonp",cache:false,error:function(request,status)
{Personalization.handleError(status);},success:function(data)
{if(data)
{if(data.error)
Personalization.handleError(data.error);if(data[Personalization.PERSONALIZED_SHOPPING_BAG_POP_UP_PAGE_CWBAB])
callback(data[Personalization.PERSONALIZED_SHOPPING_BAG_POP_UP_PAGE_CWBAB]);}}});},handleError:function(error,errorCallback)
{if(errorCallback)
errorCallback(error);},populatePlaceHolder:function(placeHolder,data)
{if(placeHolder&&data)
placeHolder.html(data);},appendMSCSProfileIfNeeded:function(url,params)
{if(Personalization.isProxy)
{var mscsProfile=$.cookies.get("MSCSProfile");if(mscsProfile&&url.indexOf("MSCSProfile")==-1)
{params.MSCSProfile=mscsProfile;}}},browseHistory:{initLinks:function()
{$("div.browseHistory a[method]").each(function()
{$(this).click(Personalization.browseHistory[$(this).attr("method")]);});},clear:function()
{Personalization.requestPersonalizationData(Personalization.urls.personalizationBrowseHistoryClearUrl,null,[Personalization.PERSONALIZED_BROWSE_HISTORY_MODULE],null);},turnOff:function()
{Personalization.requestPersonalizationData(Personalization.urls.personalizationBrowseHistoryTurnOffUrl,null,[Personalization.PERSONALIZED_BROWSE_HISTORY_MODULE],null);},viewRecent:function()
{Personalization.requestPersonalizationData(Personalization.urls.personalizationBrowseHistoryViewRecentUrl,null,[Personalization.PERSONALIZED_BROWSE_HISTORY_MODULE],null);}}};

// Name: CommunityCommon.js  Output: Min

var Common={showConfirmUnload:false,showLoadingPopup:true,profanityHandler:'/ProfanityHandler.ashx',ratingHandler:'/PostRatingHandler.ashx',init:function(localizationStrings){Common.sr=localizationStrings;Common.makeDropShadow('#loadingPopup');window.onbeforeunload=function(){if(Common.showConfirmUnload)
{return Common.sr.changesWillNotBeSaved;}};$.ajaxSetup({beforeSend:function(request){/*@cc_on@*//*@if(@_win32)
request.setRequestHeader('Cookie',document.cookie);/*@end@*/request.setRequestHeader('Cookie',document.cookie);}});$('#loadingPopup').ajaxStart(function(){if(Common.showLoadingPopup){$(this).show();if(Common.checkVersion(6)){$(this).prepend("<iframe></iframe>").find("iframe").eq(0).css("position","absolute").height($(this).height()).width($(this).width());};}}).ajaxStop(function(){if(Common.checkVersion(6)){$("iframe",this).remove();};$(this).hide();});$('ul.wasThisHelpful input').click(Common.rateHelpfulness);$(document).ready(function(){$('.wasThisHelpfulForm label:empty').hide();});$('div.confirmPopUp a').click(function(){var id='#'+$(this).parents('div.confirmPopUp').attr('id');Common.hideConfirmationPopUp(id);return false;});$('a.OTSCommentsSectionAddLink').click(Common.showCommentFormOnPress);$('a.cancelAddComment').click(function(){if($(this).attr("UseHref"))
return true;$('#addComment').hide();return false;});Common.hideHelpfulBorders();Common.omnitureLinks();},makeDropShadow:function(id){var wrapper='<div class="dropShadowOuter"><div class="dropShadowInner">'+'<div class="dropShadowContainer"></div></div></div>';$(id).addClass('dropShadow').children().wrap(wrapper);},removeDropShadow:function(id){var div=$(id);div.removeClass('dropShadow').append(div.find('div.dropShadowContainer').children());div.find('div.dropShadowOuter').remove();},formatProductDetails:function(template,product){var details='';if(template=='standard'){if(product.catalog=='books'||product.catalog=='music'||product.catalog=='dvd'){details=product.contributor;if(product.catalog=='books'){if(product.contributor&&product.format)
details+=', ';details+=product.format+'<br />'+product.distributor;}
else{if(product.contributor&&product.distributor)
details+=', ';details+=product.distributor;}}}
else if(template=='inline'){details=product.title;if(product.catalog=='books'||product.catalog=='music'||product.catalog=='dvd'){if(product.title&&product.contributor)
details+=" | ";details+=product.contributor;}}
return details;},showUnderlay:function(){$('#popupUnderlay').height($(document).height()).show();},hideUnderlay:function(){$('#popupUnderlay').hide();},buildPager:function(currentPage,pageSize,totalResults,container,changePageCallback){container=$(container).addClass("communityPager").empty();var base=container.append("<div class='clearfix'></div>").find("div");if(totalResults>pageSize){var numPages=Math.floor(totalResults/pageSize);if(totalResults%pageSize>0){numPages++;}
if(currentPage>1){base.append('<a href="#" class="OTSPagerStart"></a>').find('a.OTSPagerStart').click(function(){changePageCallback(1);return false;});base.append('<a href="#" class="OTSPagerPrevious"></a>').find('a.OTSPagerPrevious').click(function(){changePageCallback(currentPage-1);return false;});}
else{base.append('<a class="OTSPagerStart OTSPagerStartDisabled"></a>');base.append('<a class="OTSPagerPrevious OTSPagerPreviousDisabled"></a>');}
var maxPages=5;var startPage=currentPage-2;var endPage=currentPage+2;while(startPage<1){startPage++;}
while(endPage>numPages){endPage--;}
while((endPage-startPage)+1<numPages&&(endPage-startPage)+1<maxPages){if(startPage==1){endPage++;}
else{startPage--;}}
for(var i=startPage;i<=endPage;i++)
{var current=(i==currentPage)?' class="OTSPagerCurrent"':'';var pageLink=$('<a href="#"'+current+'>'+i+'</a>');pageLink.click(function(){changePageCallback(parseInt($(this).html()));return false;});base.append(pageLink);}
if(currentPage<numPages){base.append('<a href="#" class="OTSPagerNext"></a>').find('a.OTSPagerNext').click(function(){changePageCallback(currentPage+1);return false;});base.append('<a href="#" class="OTSPagerEnd"></a>').find('a.OTSPagerEnd').click(function(){changePageCallback(numPages);return false;});}
else{base.append('<a class="OTSPagerNext OTSPagerNextDisabled"></a>');base.append('<a class="OTSPagerEnd OTSPagerEndDisabled"></a>');}
container.show();}
else{container.hide();}},showConfirmationPopUp:function(id,message,timeout,centred){var e=$(id);if(timeout==null)
timeout=5;if(e.attr('class').indexOf('dropShadow')==-1)
Common.makeDropShadow(id);if(message)
$(e).find("p").html(message);if(e.css('display')=='none'){var top=($(document).scrollTop()+($(window).height()/2)-75)+'px';e.css('top',top);e.show();Common.hideSelectForPopups();}
if(centred)
e.css('top',$(window).scrollTop()+($(window).height()/2)+'px');if(timeout!=0){window.setTimeout('Common.hideConfirmationPopUp("'+id+'")',timeout*1000);}},hideConfirmationPopUp:function(id){var e=$(id);if(e.css('display')=='block'){e.hide();Common.showSelectForPopups();}},checkInputText:function(source,e){e.IsValid=!/<[a-zA-Z!\/]|&#/.test(e.Value);},validateTextBox:function(source,e){var result=Common.checkForProfanity({text:e.Value});if(result){e.IsValid=result[0].isValid;if(!e.IsValid){$(source).find('span').html(Common.sr.profaneWords+result[0].badWords.join(', '));}}},validateTextAreaLength:function(source,e){if(e==null){return;}
e.IsValid=Common.checkTextAreaLength(e.Value,false);},checkForProfanity:function(values){var postData=[];var returnValue=false;for(var key in values){postData[postData.length]=encodeURIComponent(key)+'='+encodeURIComponent(values[key]);}
if(postData.length){$.ajax({async:false,url:Common.profanityHandler,type:'POST',data:postData.join('&'),dataType:'json',success:function(result){returnValue=result;}});}
return returnValue;},checkTextAreaLength:function(textareaToValidate,truncate){if(textareaToValidate==null){return true;}
var maxLengthString=textareaToValidate.attr("maxlen");if(maxLengthString==null){return true;}
var maxLength=parseInt(maxLengthString);var text=textareaToValidate.val();var textLength=text.length;if(textLength>maxLength){return false;}
return true;},setSelectionStartEnd:function(cursorParentElement){if(cursorParentElement==null){return;}
if(document.selection){var range=document.selection.createRange();var stored_range=range.duplicate();stored_range.moveToElementText(cursorParentElement);stored_range.setEndPoint('EndToEnd',range);cursorParentElement.selectionStart=stored_range.text.length-range.text.length;cursorParentElement.selectionEnd=cursorParentElement.selectionStart+range.text.length;}},setCursorPos:function(cursorParentElement,position){if(document.selection){var range=cursorParentElement.createTextRange();if(range==null){return;}
range.move("character",position);range.select();}
else
{cursorParentElement.focus();cursorParentElement.setSelectionRange(position,position);}},encodeHtml:function(input){return input.replace(/</g,"&lt;").replace(/\n/g,"<br />");},showCommentFormOnLoad:function(){var url=location.href;var texbox=$('#addComment textarea');var submitButton=$('#addComment .commentsSectionButtons input');if(url.indexOf("#addComment")>-1){if($('#addComment').css('display')=='none'){$('#addComment').css('display','block');submitButton.focus();texbox.focus();}else{submitButton.focus();texbox.focus();}}else if($('#addComment').attr("displayForm")){if($('#addComment').css('display')=='none'){$('#addComment').css('display','block');submitButton.focus();texbox.focus();}}},showCommentFormOnPress:function(){var texbox=$('#addComment textarea');var submitButton=$('#addComment .commentsSectionButtons input');if($('#addComment').css('display')=='none'){$('#addComment').css('display','block');submitButton.focus();texbox.focus();}else{submitButton.focus();texbox.focus();}},showFriendFavouritePopUp:function(){var url=window.location.href;if(url.indexOf("addfriend=1")>-1){Common.showConfirmationPopUp("div#confirmPopUp",Common.sr.requestFriends);}else if(url.indexOf("addfav=1")>-1){Common.showConfirmationPopUp("div#confirmPopUp",Common.sr.addFavourite);}else if(url.indexOf("addfavs=1")>-1){Common.showConfirmationPopUp("div#confirmPopUp",Common.sr.addFavourites);}else if(url.indexOf("reportthis=1")>-1){Common.showConfirmationPopUp("div#confirmPopUp",Common.sr.reportThis);}else if(url.indexOf("addedtoshelf=1")>-1){Common.showConfirmationPopUp("div#confirmPopUp",Common.sr.addedToShelf);}else if(url.indexOf("joingroup=1")>-1){Common.showConfirmationPopUp("div#confirmPopUp",Common.sr.joinGroup);}else if(url.indexOf("joingrouprequest=1")>-1){Common.showConfirmationPopUp("div#confirmPopUp",Common.sr.joinGroupRequest);}else if(url.indexOf("addcommentapproval=1")>-1){Common.showConfirmationPopUp("div#confirmPopUp",Common.sr.commentSentForApproval);}else if(url.indexOf("createdgroup=1")>-1){Common.showConfirmationPopUp("div#confirmPopUp",Common.sr.createdGroup);}else if(url.indexOf("addrequest=1")>-1){Common.showConfirmationPopUp("div#confirmPopUp",Common.sr.addRequests);}else if(url.indexOf("invitemember=1")>-1){Common.showConfirmationPopUp("div#confirmPopUp",Common.sr.inviteMembers);}else if(url.indexOf("updateprofile=1")>-1){Common.showConfirmationPopUp("div#confirmPopUp",Common.sr.updateProfile,0);}},rateHelpfulness:function(){var li=$(this).parents("li:first");li.find('label').hide();if($(this).val()=='yes'){li.find('span.iconHelpful').css({display:'inline'}).fadeIn(500);}
else{li.find('span.iconUnhelpful').css({display:'inline'}).fadeIn(500);}
var current=Common.showLoadingPopup;Common.showLoadingPopup=false;var username=li.parent().attr('username');if(username==null)
username='';var args={type:'post',postId:li.parent().attr('postId'),rating:(($(this).val()=='yes')?1:0),username:username};$.post(Common.ratingHandler,args,function(data){if(data.sumtext){var parent=$(li).parent();while(($(parent).length>0)&&($(parent).html()!=null)){var statusList=$(parent).find("ul.commentStatus");if(statusList.length>0){var listItem=$(statusList).children("li.iconHelpful");if(listItem.length>0){$(listItem).text(data.sumtext);if(data.sumtext.indexOf("0 ")<0)
$(listItem).removeAttr("style");}else{var css="iconHelpful";if($(statusList).children("li").length==0)
css+=" OTSItemReviewsNoComments";$(statusList).append("<li class=\""+css+"\">"+data.sumtext+"</li>");}
Common.hideHelpfulBorders();break;}
parent=$(parent).parent();}}},"json");Common.showLoadingPopup=current;},getProductRating:function(pid,cat,userid,handler,data){if(handler==null){return;}
var args={type:'postproduct',pid:pid,catalogue:cat,userid:userid};$.ajax({url:Common.ratingHandler,type:'GET',data:args,dataType:'json',success:function(result){handler(result.rating,data);}});},lengthValidation:function(text,length){if(!text.length)
return true;else if(text.length>length)
return false;else
return true;},emptyStrValidation:function(text){if(text.trim()=="")
return false;else
return true;},htmlValidation:function(text){if(text.search("<[a-zA-Z!/]|&#")==-1)
return true;else
return false;},omnitureLinks:function(){if(!Common.omnitureLinksDone){Common.omnitureLinksDone=true;$("a[scv]").click(Common.doOmnitureMicroLink);}},omnitureLinksFor:function(parent){$("a[scv]",parent).click(Common.doOmnitureMicroLink);},doOmnitureMicroLinkNoEvent:function(propID,omnitureString,originID){try{var account,trackingServer,trackingServerSecure;account=s_accountCommunity;trackingServer=s_trackingServerCommunity;trackingServerSecure="";s=s_gi(account);s.trackingServer=trackingServer;s.trackingServerSecure=trackingServerSecure;sStatement="s."+propID+"='"+omnitureString+"';";eval(sStatement);s.linkTrackVars=propID;s.tl(document.location,"o",originID);}catch(ex){}},doOmnitureMicroEvent:function(eventIDs,eventIncrementString,originID){try{var account,trackingServer,trackingServerSecure;account=s_accountCommunity;trackingServer=s_trackingServerCommunity;trackingServerSecure="";s=s_gi(account);s.trackingServer=trackingServer;s.trackingServerSecure=trackingServerSecure;s.events=eventIDs;s.linkTrackVars="events,products";s.linkTrackEvents=eventIDs;s.products=';;;;'+eventIncrementString;s.tl(document.location,"o",originID);}catch(ex){}},doOmnitureMicroLink:function(e){try{var hasEvar=false;var props=$(this).attr("scv").split(",");for(var i=0;i<props.length;++i){var propVals=props[i].split("=");if(propVals[0].substr(0,4)=="eVar"||propVals[0].substr(0,8)=="products"){hasEvar=true;break;}}
var account,trackingServer,trackingServerSecure;if(hasEvar){account=s_accountOnline;trackingServer=s_trackingServerOnline;trackingServerSecure=s_trackingServerSecureOnline;}else{account=s_accountCommunity;trackingServer=s_trackingServerCommunity;trackingServerSecure="";}
if(account!=s_account){var pageName=s.pageName;var campaign=s.campaign;var channel=s.channel;var eVar10=s.eVar10;s_account=account;s=s_gi(s_account);s.pageName=pageName;s.campaign=campaign;s.channel=channel;s.eVar10=eVar10;s.trackingServer=trackingServer;s.trackingServerSecure=trackingServerSecure;}
s.linkTrackVars="";for(i=0;i<props.length;++i){var index=props[i].indexOf("=");var propAtt=props[i].substring(0,index);var propVal=props[i].substring(index+1);if(s.linkTrackVars.length>0)
s.linkTrackVars+=",";s.linkTrackVars+=propAtt;eval("s."+propAtt+"='"+propVal+"'");}
if(s.eVar10.length>0){if(s.linkTrackVars.length>0)
s.linkTrackVars+=",";s.linkTrackVars+="eVar10";}
s.tl(this,"o",this.id);}catch(ex){}},hideSelectForPopups:function(){if(Common.checkVersion(6)){$("select").not($("div#confirmPopUp select")).not($("div#tellFriendPopUp select")).not($("div#addProductPopup select")).not($("div#addFriendPopup select")).each(function(){var defaultVisibility=$(this).css("visibility");if($(this).css("visibility")!="hidden"){$(this).attr("defaultVisibility",defaultVisibility);$(this).css("visibility","hidden");}});}},showSelectForPopups:function(){$("select[defaultVisibility]").each(function(){var defaultVisibility=$(this).attr("defaultVisibility");$(this).removeAttr("defaultVisibility").css("visibility",defaultVisibility);});},getInternetExplorerVersion:function(){var rv=-1;if(navigator.appName=='Microsoft Internet Explorer'){var ua=navigator.userAgent;var re=new RegExp("MSIE ([0-9]{1,}[\.0-9]{0,})");if(re.exec(ua)!=null)
rv=parseFloat(RegExp.$1);}
return rv;},checkVersion:function(version){var ver=Common.getInternetExplorerVersion();if(ver>-1){if(ver<=version){return true;}else{return false;}}},removeHash:function(url){var urlHashIndex=url.indexOf('#');if(urlHashIndex!=-1)
url=url.substring(0,urlHashIndex);return url;},disableEnter:function(callback,requirements){setTimeout(function(){$(document).keypress(function(e){if(eval(requirements)){if(typeof(callback)=='string'){eval(callback)}else if(typeof(callback)=='function'){callback();}
return false;}});},1);},enableEnter:function(){$(document).unbind('keypress');},hideHelpfulBorders:function(){$(".commentStatus").each(function(){var curUL=$(this);var firstLI=$("li:eq(0)",curUL);if(curUL.length==1&&firstLI.css("border-left")!="none"){firstLI.css("border-left","none");}});},accordionInit:function(){var accordionParent=$(".communityAccordion");var accordionPanels=$(".communityAccordionContent",accordionParent);var accordionHandles=$(".communityAccordionHandle",accordionParent);var numAccordionHandles=accordionHandles.length;var firstOpen=accordionHandles.eq(numAccordionHandles-1);accordionHandles.attr("accordionActive","false").css("cursor","pointer");firstOpen.attr("accordionActive","true").css("cursor","default");Common.accordionCollapse(firstOpen);accordionHandles.each(function(){var currentHandle=$(this);currentHandle.click(function(){if(currentHandle.attr("accordionActive")=="false"){accordionHandles.attr("accordionActive","false").css("cursor","pointer");currentHandle.attr("accordionActive","true").css("cursor","default");Common.accordionCollapse($(this));}});});},accordionCollapse:function(e){var accordionParent=$(".communityAccordion");var accordionPanels=$(".communityAccordionContent",accordionParent);var accordionHandles=$(".communityAccordionHandle",accordionParent);var currentHandle=e;var currentParent=currentHandle.parent();var currentPanel=$(".communityAccordionContent",currentParent);var previousPanel=[];accordionPanels.not(currentPanel).each(function(){if($(this).css("display")=="block"||$(this).css("display")=="inline-block"){previousPanel.push(this);}});$(previousPanel).fadeOut(function(){currentParent.appendTo(accordionParent);currentPanel.fadeIn();});}};var CharacterLimit={sr:null,classname:"commentsLimitText",classnameOver:"commentsOverLimitText",init:function(limitStrings){CharacterLimit.sr=limitStrings;$("TextArea[charLimit], Input[charLimit]").each(function(){if($(this).parents(".noDisplay").length!=0&&$(this).parents("#additionalFieldsContent").length==0){return;}
$(this).charCounter($(this).attr("charLimit"),null,null,{displaycount:true,defaultcontainer:true,classname:CharacterLimit.classname,classnameOverLimit:CharacterLimit.classnameOver,format:CharacterLimit.sr});});},addLimitsToNode:function(node){if(CharacterLimit.sr==null)
return;$(node).find("TextArea[charLimit], Input[charLimit]").each(function(){if($(this).parents(".noDisplay").length!=0)
return;$(this).charCounter($(this).attr("charLimit"),null,null,{displaycount:true,defaultcontainer:true,classname:CharacterLimit.classname,classnameOverLimit:CharacterLimit.classnameOver,format:CharacterLimit.sr});});}};var DeleteItem={interval:'',currentItem:'',collapseDeletes:function(exempt){var otherDeletes=$("div.deleteItem2");if(exempt!=null){otherDeletes=$("div.deleteItem2").not(exempt);}
if(!Common.checkVersion(6)){otherDeletes.each(function(){var thisDelete=$(this);if($("p:last",thisDelete).css("display")=="none"){$("li:visible",thisDelete).fadeOut(function(){$("p:last",thisDelete).fadeIn();})}});}else{otherDeletes.each(function(){var thisDelete=$(this);if($("p:last",thisDelete).css("display")=="none"){$("li:visible",thisDelete).css("display","none");$("p:last",thisDelete).removeAttr("style");thisDelete.css("width","1%");}});}},confirmItemDelete:function(e){var baseP=$(e).parents("p:first");var baseObject=baseP.parents("div:first");DeleteItem.collapseDeletes(baseObject);baseP.fadeOut(function(){$("li:first",baseObject).fadeIn();$("li:first",baseObject).css("display","inline");});},confirmItemDeleteIE:function(e){var baseP=$(e).parents("p:first");var baseObject=baseP.parents("div:first");var baseLI=$("li:first",baseObject);DeleteItem.collapseDeletes(baseObject);baseObject.removeAttr("style");baseP.css("display","none");baseLI.css("display","inline").css("zoom","1");},confirmItemDeleteSelect:function(e){var baseDIV=$(e).parents("div:first");var baseLI=$(e).parents("li:first");if($(e).val()=="yes"){var deleteLI=baseDIV.parents("li[DeleteHandler]:first");var deleteREDIRECT=deleteLI.attr("DeleteRedirect");if(deleteREDIRECT){$(".deleteItem a").each(function(){$(this).unbind("click").removeAttr("href").css({textDecoration:"none",cursor:"default"});});$(".deleteItem p.deleteItemLink").each(function(){var pContents=$(this).children("a").html();$(this).append(pContents);$(this).children("a").remove();});}
baseLI.fadeOut(function(){if(Common.checkVersion(7)){$("ul",baseDIV).css("float","right");}
$("ul",baseDIV).css("list-style","none");$("li.deleteItemYes",baseDIV).fadeIn(function(){$("li.deleteItemYes",baseDIV).fadeOut(function(){DeleteItem.deleteAjaxCall(e);});});});}else if($(e).val()=="no"){baseLI.fadeOut(function(){if(Common.checkVersion(7)){$("ul",baseDIV).css("float","right");}
$("ul",baseDIV).css("list-style","none");$("li.deleteItemNo",baseDIV).fadeIn(function(){$("li.deleteItemNo",baseDIV).fadeOut(function(){$("input",baseDIV).each(function(){this.checked=false;});$("p",baseDIV).fadeIn(function(){$("p",baseDIV).removeAttr("style");});});});});};},confirmItemDeleteSelectIE:function(e){var baseDIV=$(e).parents("div:first");var baseLI=$(e).parents("li:first");baseDIV.removeAttr("style");DeleteItem.currentItem=e;if($(e).val()=="yes"){baseLI.css("display","none");$("li.deleteItemYes",baseDIV).css("display","inline").css('zoom','1');DeleteItem.interval=self.setTimeout(DeleteItem.confirmItemDeleteSelectIEYes,1000);}else if($(e).val()=="no"){baseLI.css("display","none");$("li.deleteItemNo",baseDIV).css("display","inline").css('zoom','1');DeleteItem.interval=self.setTimeout(DeleteItem.confirmItemDeleteSelectIENo,1000);};},confirmItemDeleteSelectIEYes:function(){var baseDIV=$(DeleteItem.currentItem).parents("div:first");$("li.deleteItemYes",baseDIV).css("display","none");$("input",baseDIV).each(function(){this.checked=false;});var deleteLI=baseDIV.parents("li[DeleteHandler]:first");var deleteREDIRECT=deleteLI.attr("DeleteRedirect");if(deleteREDIRECT){$(".deleteItem a").each(function(){$(this).unbind("click").removeAttr("href").css({textDecoration:"none",cursor:"default"});});$(".deleteItem p.deleteItemLink").each(function(){var pContents=$(this).children("a").html();$(this).append(pContents);$(this).children("a").remove();});}
baseDIV.removeClass("deleteItemYes");$("p.deleteItemLink",baseDIV).css("display","inline");$(baseDIV).css("width","1%");DeleteItem.interval=window.clearInterval(DeleteItem.interval);DeleteItem.deleteAjaxCall(DeleteItem.currentItem);},confirmItemDeleteSelectIENo:function(){var baseDIV=$(DeleteItem.currentItem).parents("div:first");$("li.deleteItemNo",baseDIV).removeAttr("style");$("input",baseDIV).each(function(){this.checked=false;});$("li.deleteItemNo",baseDIV).css("display","none");baseDIV.removeClass("deleteItemNo");$("p.deleteItemLink",baseDIV).css("display","inline");$(baseDIV).css("width","1%");DeleteItem.interval=window.clearInterval(DeleteItem.interval);},deleteAjaxCall:function(e){var deleteLI=$(e).parents("li[DeleteHandler]:first");var baseHANDLER=deleteLI.attr("DeleteHandler");var deleteREDIRECT=deleteLI.attr("DeleteRedirect");$.ajax({url:baseHANDLER,type:'POST',data:{},success:function(){if(deleteREDIRECT!=null){location.href=deleteREDIRECT;}else{deleteLI.fadeOut();};},error:function(){}});},init:function(){var baseObject=$("div.deleteItem");var deleteBaseObject=$("a:last",baseObject);var deleteBaseObjectSelect=$("input",baseObject);if(Common.checkVersion(6)){$("li.deleteItemNo",baseObject).css("background","none");$("li.deleteItemYes",baseObject).css("background","none");$("p.deleteItemLink",baseObject).css("display","inline");deleteBaseObject.each(function(){$(this).click(function(){DeleteItem.confirmItemDeleteIE(this);});});deleteBaseObjectSelect.each(function(){$(this).click(function(){DeleteItem.confirmItemDeleteSelectIE(this);});});}else{deleteBaseObject.each(function(){$(this).click(function(){DeleteItem.confirmItemDelete(this);});});deleteBaseObjectSelect.each(function(){$(this).click(function(){DeleteItem.confirmItemDeleteSelect(this);});});}}};

// Name: CommunityExternal.js  Output: Min

var ExternalLinks={init:function(){$(".iconDelicious").each(function(){var url="http://del.icio.us/post?v=4;url="+encodeURIComponent(location.href)+";title="+encodeURIComponent(document.title);var ctrl=$(this);if(!$(this).is("a"))
ctrl=$(this).find("a");if(ctrl.length>0){ctrl.attr("href",url);ctrl.attr("target","_blank");}});}};

// Name: CommunityRating.js  Output: Min

var Rating={sr:{},offsets:['-18','-36','-54','-72','-90'],handler:null,mouseOver:function(){var level=$(this).attr("level");var offset=Rating.offsets[level-1];var text=Rating.sr['level'+level];$(this).parent().css("background-position","0 "+offset+"px").parent().find("div.text").html(text);},mouseOut:function(div){var c=parseInt(div.attr("currentLevel"));if(c){var offset=Rating.offsets[c-1];var text=Rating.sr['level'+c];div.find('ul').css("background-position","0 "+offset+"px").end().find("div.text").html(text);}
else{div.find('ul').css("background-position","0 0").end().find("div.text").html(Rating.sr.defaultText);}},click:function(){var level=$(this).attr("level");var module=$(this).parents("div:first");$(module).attr("currentLevel",level);if(Rating.handler){var current=Common.showLoadingPopup;Common.showLoadingPopup=false;var args={type:"product",rating:level,catalogue:$(module).attr("cat"),pid:$(module).attr("pid")};$.post(Rating.handler,args,function(data){if(data.average){var aveRating=$("div.itemRating div.OTSItemRatingAverage");if(aveRating.length>0){$(aveRating).removeClass("hide");var aveRatingImg=$(aveRating).find("img");var src=$(aveRatingImg).attr("src");var filePos=src.lastIndexOf("/");src=src.substr(0,filePos+1)+data.average+src.substr(filePos+2);$(aveRatingImg).attr("src",src);$(aveRatingImg).attr("alt",data.average);var aveRatingText=$(aveRating).find("span");aveRatingText.text(aveRatingText.attr("nextRating"));}}},"json");Common.showLoadingPopup=current;}
if(module.attr('rateonce')=='true'){var ul=module.find('ul');ul.children("li").unbind();ul.find("li a").css('cursor','default');}},getCurrentRating:function(div){var r=parseInt(div.attr("currentLevel"));if(!r)
r=0;return r;},register:function(div){var ul=div.find('ul');if(div.attr('interactive')!='false'){ul.children("li").each(function(i){$(this).attr('level',i+1).click(Rating.click).mouseover(Rating.mouseOver).mouseout(function(){Rating.mouseOut($(this).parents("div:first"));});});}
else{ul.find("li a").each(function(){$(this).css('cursor','default');});}
if(div.attr('displayText')=='false'){div.find('div.text').hide();}
Rating.mouseOut(div);},init:function(localizationStrings){Rating.sr=localizationStrings;$("div.rating").each(function(){var tests=$(this).parents("div");var pass=true;tests.each(function(i){var divClass=$(this).attr("class");if(divClass!=null){divClass=divClass.toLowerCase();if(divClass.indexOf("template")>=0){pass=false;return false;};};});if(pass){Rating.register($(this));};});}};

// Name: CommunityTabs.js  Output: Min

var Tabs={init:function(){$("ul.tabs a").click(Tabs.change);},change:function(e){var newId=$(this).attr("href").split("#")[1];var list=$(this).parents("ul.tabs");list.find("li a").each(function(i){var id=$(this).attr("href").split("#")[1];var tabContents;if(list.attr("useTabId"))
tabContents=$("div[tabId='"+id+"']");else
tabContents=$("#"+id);if((tabContents!=null)&&(tabContents.length==1)){$(this).removeClass("OTSTabsCurrent");tabContents.hide();}});list.find("li a").each(function(i){var id=$(this).attr("href").split("#")[1];var tabContents;if(list.attr("useTabId"))
tabContents=$("div[tabId='"+id+"']");else
tabContents=$("#"+id);if((tabContents!=null)&&(tabContents.length==1)){if(id==newId){$(this).addClass("OTSTabsCurrent");tabContents.show();var tabSrc=tabContents.attr("tabSrc");if((tabSrc!=null)&&(tabSrc.length>0)){tabContents.load(tabSrc,{},function(responseText,textStatus,XMLHttpRequest){if(textStatus=="success"){tabContents.hide();var tabLoaded=tabContents.attr("tabLoaded");if((tabLoaded!=null)&&(tabLoaded.length>0))
eval(tabLoaded);tabContents.removeAttr("tabSrc").removeAttr("tabLoaded");if($.browser.msie)
tabContents.show();else
tabContents.fadeIn();}});}}else{$(this).removeClass("OTSTabsCurrent");tabContents.hide();}}});this.blur();return false;}};

// Name: CommunityPopUp.js  Output: Min

var CommunityPopUp={frameId:"communitypopupframe",afterCloseMessage:"",afterCloseCallback:null,initComplete:false,afterLoadComplete:false,init:function(){if(!CommunityPopUp.initComplete){$("a[communitypopup]").each(function(){$(this).removeClass("hide");$(this).parent().removeClass("hide");$(this).click(CommunityPopUp.click);});if(location.href.indexOf("showinvitefriend=1")>-1){$('a.OTSTriggerInviteFriendPopup:first').click();}
CommunityPopUp.initComplete=true;}},afterLoad:function(){if(!CommunityPopUp.afterLoadComplete){if(window.location.hash.substr(0,16)=="#communitypopup-"){var communityId=window.location.hash.substr(16);if(communityId.length>0)
CommunityPopUp.display(null,communityId);}
CommunityPopUp.afterLoadComplete=true;}},click:function(e){return CommunityPopUp.display($(this).attr("id"),null);},display:function(popUpId,communityId,launchUrl){DeleteItem.collapseDeletes();if(launchUrl!=null){var url=launchUrl;}else{var popUpLink;if(popUpId!=null)
popUpLink=$("#"+popUpId);else
popUpLink=$("a[communitypopup='"+communityId+"']");if(popUpLink.length<=0)
return;var url=$(popUpLink).attr("href");var communityId=$(popUpLink).attr("communitypopup");if(window.location.search.toLowerCase().indexOf("activated=true")>-1){if(url.indexOf("?")<0)
url+="?activated=true";else
url+="&activated=true";}
var urlExtra="returnurl="+escape(window.location.href+"#communitypopup-"+communityId);if(url.indexOf("?")<0)
url+="?";else
url+="&";url+=urlExtra;}
window.top.communityPopUpAjax=new window.top.AjaxRequest("","",true);window.top.communityPopUpAjax.displayWait(true);Common.hideSelectForPopups();if($("#popupUnderlay").length<=0)
$(document.body).append("<div id='popupUnderlay' class='popupUnderlay'></div>");var iframeHTML="<iframe id='"+CommunityPopUp.frameId+"' name='"+CommunityPopUp.frameId+"' frameborder='0' marginwidth='0' marginheight='0' scrolling='no' allowtransparency='true' src='"+url+"' style='position: absolute; left: 0; top: 0; width: 100%; height: "+$(document).height()+"px; z-index: 9999; visibility: hidden;'></iframe>";$(document.body).append(iframeHTML);return false;},initPopUp:function(){window.setTimeout("CommunityPopUp.initPopUp2();",300);},initPopUp2:function(){window.top.Common.showUnderlay();var ifr=window.top.document.getElementById(CommunityPopUp.frameId);if(ifr!=null)
ifr.style.visibility="visible";ifr=null;$("#communityPopUpClose").click(CommunityPopUp.cancelPopUp);var pagePos=new window.top.PagePos();var top=pagePos.top+120;var left=($(window).width()-$("#communityPopUpShadow").width())/2;$("#communityPopUp").hide();$("#communityPopUpShadow").css("top",top+"px");$("#communityPopUpShadow").css("left",left+"px");$("#communityPopUp").fadeIn();window.top.communityPopUpAjax.displayWait(false);window.top.communityPopUpAjax=null;},enableDraggable:function(){if(!$.browser.msie||(parseInt($.browser.version)>6)){var popUp=$("#communityPopUpShadow");var width=$(document).width()-698;var height=$(document).height()-popUp.height();popUp.draggable({containment:[0,60,width,height],handle:$("#communityPopUp h1 span")});}
$("#communityPopUp h1 span").css("cursor","move");$("#communityPopUp").css("cursor","move");},parentWindowLinks:function(o){o.each(function(){var curA=$(this);var curHref=curA.attr("href");curA.click(function(){CommunityPopUp.closePopUp(true,curHref);return false;});});},cancelPopUp:function(e){CommunityPopUp.closePopUp(false);},closePopUp:function(refresh,url){var mainWindow=window.top;mainWindow.Common.hideUnderlay();mainWindow.Common.showSelectForPopups();if(CommunityPopUp.afterCloseMessage.length>0){mainWindow.Common.showConfirmationPopUp("#confirmPopUp",CommunityPopUp.afterCloseMessage);CommunityPopUp.afterCloseMessage="";}
var ifr=mainWindow.document.getElementById(CommunityPopUp.frameId);if(ifr!=null)
ifr.parentNode.removeChild(ifr);ifr=null;if(refresh===true){if(url==null){mainWindow.setTimeout("window.location.reload(true)",300);}else{var urlString="window.location.assign('"+url+"')";mainWindow.setTimeout(urlString,300);}}}};var Dialog={dialogBaseId:"_dialog",dialogId:0,zIndex:1000,contentProxy:"",linkIdIndex:0,display:function(contentHtml,centreOverCtrl){return Dialog.displayEx(contentHtml,centreOverCtrl,false);},displayModal:function(contentHtml,centreOverCtrl){return Dialog.displayEx(contentHtml,centreOverCtrl,true);},displayEx:function(contentHtml,centreOverCtrl,isModal,id,options){options=options||{};Dialog.maxWidth=$(document).width();Dialog.maxHeight=$(document).height();var isNew=false;if((id==undefined)||(id==null)||(id.length==0)){isNew=true;id=Dialog.getNextId();var html="<div id=\""+id+"\" class=\"dialog\" style=\"left: -3000px; top: 0;\"><div class=\"dialogOuter\"><div class=\"dialogInner\"><div class=\"dialogContainer\"><div class=\"dialogContents\">"+contentHtml+"</div></div></div></div></div>";$(document.body).append(html);}else{$("#"+id+" .dialogContents").html(contentHtml);}
var dialog=$("#"+id);$(".dialogHeader a",dialog).click(Dialog.close);$(".popUpArticle a.OTSPopUpClose",dialog).click(Dialog.close);if(($(".dialogHeader",dialog).length>0)&&($("iframe.dialogIE6Fix",dialog).length==0)){var width=Dialog.maxWidth-dialog.width()-58;var height=Dialog.maxHeight-dialog.height();dialog.draggable({containment:[0,60,width,height],start:Dialog.startDragging,handle:$("#"+id+" .dialogHeader")});}
dialog.mousedown(Dialog.activate);Dialog.initInnerPopUpLinks(id);var ctrlId="";if(centreOverCtrl){if(!centreOverCtrl.attr("id"))
centreOverCtrl.attr("id","_ctrl"+id);ctrlId=centreOverCtrl.attr("id");}
if(isModal){if($("#popupUnderlay").length==0)
$(document.body).append("<div id=\"popupUnderlay\" class=\"popupUnderlay\"></div>");$("#popupUnderlay").show();if($.browser.msie)
if(parseInt($.browser.version)<7){$("#popupUnderlay").css({"width":$(document).width()+"px","height":$(document).height()+"px"});Common.hideSelectForPopups();}}
var hasShadow=true;if(options.hasNoShadow)
hasShadow=false;var bottomOffset=0;if(options.bottomOffset)
bottomOffset=options.bottomOffset;var leftOffset=0;if(options.leftOffset)
leftOffset=options.leftOffset;var minLeft=0;if(options.minLeft)
minLeft=options.minLeft;var minTop=0;if(options.minTop)
minTop=options.minTop;if(isNew)
{if(options.isCentre)
{window.setTimeout("Dialog.centre(\""+id+"\", "+leftOffset+", "+-bottomOffset+", "+minLeft+", "+minTop+", "+isModal+");",300);}
else
{window.setTimeout("Dialog.position(\""+id+"\", \""+ctrlId+"\", true, false, "+hasShadow+", "+bottomOffset+", "+isModal+");",300);}}
else
{if(options.isCentre)
{Dialog.centre(id,leftOffset,-bottomOffset,minLeft,minTop,isModal);}
else
{Dialog.position(id,ctrlId,false,false,hasShadow,bottomOffset,isModal);}}
$("#"+id+" .dialogReadFromEbook").parent("div").addClass("eBookReadAnExcerpt");return id;},centre:function(id,correctLeft,correctTop,minLeft,minTop,isModal){var dialog=$("#"+id);if(($.browser.msie)&&(parseInt($.browser.version,10)<7))
{dialog.css({left:Math.max((($(window).width())/2)+$(window).scrollLeft()-(dialog.outerWidth()/2)+(correctLeft||0),minLeft||0),top:Math.max((($(window).height())/2)+$(window).scrollTop()-(dialog.outerHeight()/2)+(correctTop||0),minTop||0)});}
else
{dialog.css({left:Math.max((($(window).width())/2)+$(window).scrollLeft()-(dialog.outerWidth()/2)+(correctLeft||-31),minLeft||66),top:Math.max((($(window).height())/2)+$(window).scrollTop()-(dialog.outerHeight()/2)+(correctTop||0),minTop||66)});}
Dialog.setZindex(dialog,isModal);},position:function(id,ctrlId,canPosition,isAbove,hasShadow,bottomOffset,isModal){Dialog.maxWidth=$(document).width();Dialog.maxHeight=$(document).height();var dialog=$("#"+id);var top,left;var width=dialog.width();var height=dialog.height();var pageTop=$(window).scrollTop();var pageBottom=pageTop+$(window).height()-bottomOffset;var pageLeft=$(window).scrollLeft();var pageRight=pageLeft+$(window).width();var shadowWidth=29;if(!hasShadow){shadowWidth=0;pageTop+=15;pageLeft+=15;pageBottom-=20;pageRight-=20;}
if($.browser.msie)
if(parseInt($.browser.version)<7){pageTop+=15;pageLeft+=15;}
if(canPosition){if(ctrlId.length>0){var ctrl=$("#"+ctrlId);var ctrlOffset=ctrl.offset();if(isAbove){top=ctrlOffset.top-height+shadowWidth;left=ctrlOffset.left+ctrl.width()/2-width/2-shadowWidth;}else{top=ctrlOffset.top+(ctrl.height()/2)-(height*2/3);left=ctrlOffset.left+(ctrl.width()/2)-(width/2);if(hasShadow){top+=50;left+=5;}}}else{top=pageTop+($(window.top.document.body).height()-height)/3;left=(Dialog.maxWidth-width)/2;}}else{var dialogOffset=dialog.offset();top=dialogOffset.top;left=dialogOffset.left;}
var minTop=pageTop-parseInt($(".dialogInner",dialog).css("top"));if(top<minTop)
top=minTop;if((top+height)>=pageBottom)
top=pageBottom-height;if(top<0)
top=0;if((left+width+(shadowWidth*2))>=pageRight)
left=pageRight-width-(shadowWidth*2);if(left<pageLeft)
left=pageLeft;Dialog.setZindex(dialog,isModal);dialog.css({"top":top+"px","left":left+"px"});},setZindex:function(dialog,isModal){dialog.css("z-index",(isModal?3000:++Dialog.zIndex));var iframe=$("iframe.dialogIE6Fix",dialog);if(iframe.length==1){iframe.css("width",dialog.width()+"px");iframe.css("height",dialog.height()+"px");}},startDragging:function(e,ui){Dialog.activateDialog($(this));},close:function(e){Dialog.remove($(this).parents(".dialog"));return false;},closeFromCtrl:function(ctrl){Dialog.remove(ctrl.parents(".dialog"));},remove:function(dialog){dialog.remove();$("#popupUnderlay").hide();Common.showSelectForPopups();},activate:function(e){var target=$(e.target);if(target.hasClass("dialog")||target.hasClass("dialogOuter")||target.hasClass("dialogInner")||target.hasClass("dialogContainer")){for(var i=1;i<=Dialog.dialogId;++i){var id=Dialog.dialogBaseId+i;var dialog=$("#"+id+" .dialogContents");if(dialog.length==1){var offset=dialog.offset();if((e.pageX>=offset.left)&&(e.pageX<(offset.left+dialog.width()))&&(e.pageY>=offset.top)&&(e.pageY<(offset.top+dialog.height()))){Dialog.activateDialog($("#"+id));break;}}}}else{Dialog.activateDialog($(this));}
return true;},activateDialog:function(dialog){var zIndex=dialog.css("z-index");if(zIndex<Dialog.zIndex)
dialog.css("z-index",++Dialog.zIndex);},initPopUpLinks:function(){Dialog.initInnerPopUpLinks(null);},initInnerPopUpLinks:function(id){var popUpLinks;if(id!=null){popUpLinks=$("#"+id+" a[otspopup][href]");}else{popUpLinks=$("a[otspopup][href]");if(popUpLinks.length>0)
$(window).load(Dialog.preLoadBackground);}
popUpLinks.click(Dialog.getContent);},preLoadBackground:function(){$(document.body).append("<div class=\"dialog\" style=\"position: absolute; top: 0; left: -3000px; width: 300px; height: 300px;\"><div class=\"dialogHeader\">XXX</div><div class=\"dialogWaitMessage\">XXX</div></div>");},getContent:function(e){var url=$(this).attr("href");if((url!=null)&&(url.length>0)){if(Dialog.contentProxy.length>0)
url=Dialog.contentProxy.replace("{0}",escape(url));var unchangedURL=url;if(url.indexOf("?")>0)
url+="&clientcallback=1";else
url+="?clientcallback=1";if(Languages.isFrench())
url+="&__lang=fr-CA";else
url+="&__lang=en-CA";if(url.indexOf("eBookExcerpt")>0){var excerptID=unchangedURL.split("/");url+="&excerptid="+excerptID[excerptID.length-1];}
var id;var dialog=$(this).parents("div.dialog");if(dialog.length>0){id=dialog.attr("id");$(".dialogContents",dialog).html("<div class=\"dialogWaitMessage dialogWaitMessageFullWidth\">"+Languages.getWaitMessage()+"</div>");}else{id=Dialog.getNextId();Dialog.showWaitMessage(id,$(this));}
options={isModal:($(this).attr("otsmodalpopup")=="true"),isCentre:($(this).attr("otscentrepopup")=="true")};$.ajax({"type":"GET","url":url,"data":{"clientcallback":"1"},"success":function(data){Dialog.displayContent(id,data,options);},"error":function(XMLHttpRequest,textStatus,errorThrown){Dialog.displayContent(id,"");}});}
return false;},displayContent:function(id,data,options){options=options||{};Dialog.cancelAutoHide(id);if((data!=null)&&(data.length>0))
Dialog.displayEx(data,null,options.isModal||false,id,options);else
Dialog.remove($("#"+id));},getNextId:function(){return Dialog.dialogBaseId+(++Dialog.dialogId);},showWaitMessage:function(id,ctrl){var wait=$("#"+id);if(wait.length==0){var html="<div id=\""+id+"\" class=\"dialog\" style=\"left: -3000px; top: 0;\"><div class=\"dialogOuter\"><div class=\"dialogInner\"><div class=\"dialogContainer\"><div class=\"dialogContents\"><div class=\"dialogWaitMessage\">"+Languages.getWaitMessage()+"</div></div></div></div></div></div>";$(document.body).append(html);wait=$("#"+id);}
if((ctrl!=undefined)&&(ctrl!=null))
Dialog.position(id,ctrl.attr("id"),true,true,true,0,false);else
Dialog.position(id,"",true,true,true,0,false);wait.attr("timerid",window.setTimeout("Dialog.hideWaitMessage(\""+id+"\");",10000));},hideWaitMessage:function(id){$("#"+id).css("display","none");Dialog.cancelAutoHide(id);},cancelAutoHide:function(id){var wait=$("#"+id);var timerId=wait.attr("timerid");if((timerId!=null)&&(timerId.length>0)){window.clearTimeout(timerId);wait.removeAttr("timerid");}},createProxyUrl:function(url)
{if(Dialog.contentProxy.length>0)
url=Dialog.contentProxy.replace("{0}",escape(url));return url;}};

// Name: Item.js  Output: Min

function ItemSearchInsidePopUp(){};ItemSearchInsidePopUp.prototype.init=function(linkId,popUpId,defaultText){this.linkId=linkId;this.popUpId=popUpId;this.defaultText=defaultText;var searchLink=document.getElementById(linkId);if(searchLink!=null)
addEvent(searchLink,"click",this.show.bindAsEventListener(this));var popUp=document.getElementById(popUpId);var elements=popUp.getElementsByTagName("input");if((elements!=null)&&(elements.length>0)){this.textbox=elements[0];addEvent(elements[0],"keypress",this.onKeyPress.bindAsEventListener(this));addEvent(elements[0],"focus",this.onFocus.bindAsEventListener(this));addEvent(elements[0],"blur",this.onBlur.bindAsEventListener(this));}
if((elements!=null)&&(elements.length>1))
addEvent(elements[1],"click",this.onClick.bindAsEventListener(this));elements=popUp.getElementsByTagName("a");if((elements!=null)&&(elements.length>0))
addEvent(elements[0],"click",this.hide.bindAsEventListener(this));};ItemSearchInsidePopUp.prototype.show=function(e){var popUp=document.getElementById(this.popUpId);popUp.style.display="block";var searchLink=document.getElementById(this.linkId);searchLink.blur();var elements=popUp.getElementsByTagName("input");if((elements!=null)&&(elements.length>0)){elements[0].focus();}
return false;};ItemSearchInsidePopUp.prototype.hide=function(e){var popUp=document.getElementById(this.popUpId);popUp.style.display="none";return false;};ItemSearchInsidePopUp.prototype.onFocus=function(e){if(e.target.value.trim()==this.defaultText){this.selectRange(e.target,0,this.defaultText.length);}};ItemSearchInsidePopUp.prototype.onBlur=function(e){if(e.target.value.trim().length==0){e.target.value=this.defaultText;}};ItemSearchInsidePopUp.prototype.selectRange=function(textbox,iStart,iEnd){if(textbox.createTextRange){var oRange=textbox.createTextRange();oRange.moveStart("character",iStart);oRange.moveEnd("character",iEnd-textbox.value.length);oRange.select();}else if(textbox.setSelectionRange){textbox.setSelectionRange(iStart,iEnd);}};ItemSearchInsidePopUp.prototype.onKeyPress=function(e){if(e.target.value.trim()==this.defaultText)
e.target.value="";if(e.keyCode==13)
this.onClick(e);};ItemSearchInsidePopUp.prototype.onClick=function(e){var popUp=document.getElementById(this.popUpId);var field=popUp.getElementsByTagName("input")[0];if(field!=null){var keywords=field.value.trim().removeNastyChars();if((keywords.length>0)&&(keywords!=this.defaultText)){keywords=encodeURIComponent(keywords);var searchLink=document.getElementById(this.linkId);var url=searchLink.href;url=url.replace("*keywords*",keywords);window.location.href=url;}}
return false;};function ItemShowCDTrackDetails(){};ItemShowCDTrackDetails.prototype.init=function(linkId,linkText,cdTracksId){this.cdTracksId=cdTracksId;this.linkId=linkId;this.linkText=linkText;var tracksLink=document.getElementById(linkId);if(tracksLink!=null){addEvent(tracksLink,"click",this.showDetails.bindAsEventListener(this));tracksLink.style.display="inline";}};ItemShowCDTrackDetails.prototype.showDetails=function(e){var cdTracks=document.getElementById(this.cdTracksId);if(cdTracks!=null){var css=cdTracks.className;if(css.indexOf("itemTracksDetails")>0)
cdTracks.className=css.replace("itemTracksDetails","itemTracksNoDetails");else
cdTracks.className=css.replace("itemTracksNoDetails","itemTracksDetails");var tracksLink=document.getElementById(this.linkId);if(tracksLink!=null){var linkText=tracksLink.innerHTML;tracksLink.innerHTML=this.linkText;this.linkText=linkText;tracksLink.blur();}}
return false;};function ItemShowAllFormats(){};ItemShowAllFormats.prototype.init=function(linkId,formatsId){this.formatsId=formatsId;var formatsLink=document.getElementById(linkId);if(formatsLink!=null){addEvent(formatsLink,"click",this.showAll.bindAsEventListener(this));formatsLink.style.display="block";}};ItemShowAllFormats.prototype.showAll=function(e){var formats=document.getElementById(this.formatsId);if(formats!=null){var css=formats.className;formats.className=css.replace("itemFormatsSeeSome","itemFormatsSeeAll");}
return false;};function showInStoreAvailability(id){var ctrl=document.getElementById(id);while(ctrl!=null){if(ctrl.id.indexOf("FindInStoresBox")>=0){ctrl.style.display="block";break;}
ctrl=ctrl.parentNode;}};function ItemTagProductPopUp(){};ItemTagProductPopUp.prototype.init=function(popUpId){this.popUpId=popUpId;var popUp=document.getElementById(popUpId);if(popUp!=null){var elements=popUp.getElementsByTagName("a");if((elements!=null)&&(elements.length>0))
addEvent(elements[0],"click",this.hide.bindAsEventListener(this));}};ItemTagProductPopUp.prototype.show=function(e){var popUp=document.getElementById(this.popUpId);if(popUp!=null){if(this.popUpBaseId==null){var parent=popUp.parentNode;popUp=parent.removeChild(popUp);var shadow=new DropShadow();popUpBase=shadow.init(popUp);this.popUpBaseId=this.popUpId+"__popUp";popUpBase.id=this.popUpBaseId;popUpBase.style.display="block";popUp.style.display="block";parent.appendChild(popUpBase);}else{var basePopUp=document.getElementById(this.popUpBaseId);if(basePopUp!=null)
basePopUp.style.display="block";}
window.setTimeout(this.hide.bindAsEventListener(this),10000);}
if(e!=null){e.preventDefault();e.stopPropagation();}
return false;};ItemTagProductPopUp.prototype.hide=function(e){var popUp=document.getElementById(this.popUpBaseId);if(popUp!=null)
popUp.style.display="none";if((e!=null)&&(e.preventDefault)){e.preventDefault();e.stopPropagation();}
return false;};ItemTagProductPopUp.prototype.getMessageId=function(){return document.getElementById(this.popUpId).getElementsByTagName("p")[0].id;};ItemTagProduct.prototype=new FormUtils();ItemTagProduct.prototype.constructor=ItemTagProduct;function ItemTagProduct(){};ItemTagProduct.prototype.init=function(submitButtonId,textboxId,errorId,url,popUpName){this.textboxId=textboxId;this.errorId=errorId;this.url=url;this.popUpName=popUpName;this.fieldIdList=new Array(textboxId);FormUtils.prototype.init.call(this,submitButtonId);};ItemTagProduct.prototype.submit=function(e){FormUtils.prototype.submit.call(this,e);var textbox=document.getElementById(this.textboxId);if((textbox!=null)&&(textbox.value.trim().length==0)){var errortext=document.getElementById(this.errorId);if(errortext!=null){errortext.className="show";}}else{var tag=document.getElementById(this.textboxId).value;var tagurl=this.url+encodeURIComponent(tag);var msgId=document[this.popUpName].getMessageId();var submit=document.getElementById(this.submitButtonId);submit.src=submit.src.replace("Submit.gif","Submitting.gif");submit.blur();this.ajax=new AjaxRequest(tagurl,msgId,false);this.ajax.onComplete=this.onTagComplete.bindAsEventListener(this);this.ajax.run();}
e.preventDefault();e.stopPropagation();return false;};ItemTagProduct.prototype.onTagComplete=function(req){document[this.popUpName].show();var submit=document.getElementById(this.submitButtonId);submit.src=submit.src.replace("Submitting.gif","Submit.gif");var textbox=document.getElementById(this.textboxId);textbox.value="";};ItemChooseCityPopUp.prototype=new PopUp();ItemChooseCityPopUp.prototype.constructor=ItemChooseCityPopUp;function ItemChooseCityPopUp(){PopUp.call(this);this.ajaxCityList=null;this.ajaxSubmit=null;this.qtyPanelId=null;};ItemChooseCityPopUp.prototype.init=function(id,url,width){PopUp.prototype.init.call(this,id,url,width);var ctrl=document.getElementById(id);if(ctrl!=null)
ctrl.style.display="inline";this.attachPopUps();};ItemChooseCityPopUp.prototype.onLoad=function(){var popUpDiv=document.getElementById(this.popUpId);var lists=popUpDiv.getElementsByTagName("select");if((lists!=null)&&(lists.length>1)){this.provinceListId=lists[0].id;this.provinceListGuid=addEvent(lists[0],"change",this.getCities.bindAsEventListener(this));this.cityListId=lists[1].id;}else{this.provinceListId=null;this.cityListId=null;}
var linkList=popUpDiv.getElementsByTagName("a");if((linkList!=null)&&(linkList.length>1)){this.submitButtonId=linkList[linkList.length-1].id;this.submitButtonGuid=addEvent(linkList[linkList.length-1],"click",this.submit.bindAsEventListener(this));}else{this.submitButtonId=null;}};ItemChooseCityPopUp.prototype.getCities=function(e){if(this.provinceListId!=null){var list=document.getElementById(this.provinceListId);if(list.selectedIndex>=0){var province=list.options[list.selectedIndex].value;if(province.length>0){var cityList=document.getElementById(this.cityListId);cityList.options.length=0;var url=this.cityListUrl.replace("*{province}",encodeURIComponent(province),"i");if(this.ajaxCityList==null){this.ajaxCityList=new AjaxRequest();this.ajaxCityList.id=this.cityListId;}
this.ajaxCityList.url=url;this.ajaxCityList.run();}}}
e.preventDefault();e.stopPropagation();return false;};ItemChooseCityPopUp.prototype.submit=function(e){if(this.provinceListId!=null){var list=document.getElementById(this.provinceListId);if(list.selectedIndex>=0){var province=list.options[list.selectedIndex].value;if(province.length>0){cityList=document.getElementById(this.cityListId);if(cityList.selectedIndex>=0){var city=cityList.options[cityList.selectedIndex].value;if(city.length>0){var zeroQty="false";var popUpDiv=document.getElementById(this.popUpId);var inputList=popUpDiv.getElementsByTagName("input");if((inputList!=null)&&(inputList.length>0)&&(inputList[0].checked))
zeroQty="true";var url=this.storesQtyForCityUrl+"?province="+encodeURIComponent(province)+"&city="+encodeURIComponent(city)+"&zeroqty="+zeroQty;if(this.ajaxSubmit==null){this.ajaxSubmit=new AjaxRequest();this.ajaxSubmit.id=this.qtyPanelId;this.ajaxSubmit.onComplete=this.onSubmitComplete.bindAsEventListener(this);}
this.ajaxSubmit.url=url;this.ajaxSubmit.run();this.hide(null);}}}}}
e.preventDefault();e.stopPropagation();return false;};ItemChooseCityPopUp.prototype.onSubmitComplete=function(ajaxRequest){window.location.href="#StoreAvail";this.attachPopUps();};ItemChooseCityPopUp.prototype.attachPopUps=function(){Dialog.initInnerPopUpLinks(this.qtyPanelId);};function ItemRating(){this.ratingTextList=null;};ItemRating.prototype.init=function(baseId,ratingId,helpId,baseImageUrl,url){var rating=0;if((window.location.hash.length==12)&&(window.location.hash.substr(0,11)=="#itemrating")){rating=Math.min(parseInt(window.location.hash.substr(11)),5);}
this.baseId=baseId;this.ratingId=ratingId;this.helpId=helpId;this.baseImageUrl=baseImageUrl;this.url=url;this.onImage=new Image();this.onImage.src=baseImageUrl+"Off.gif";var baseCtrl=document.getElementById(baseId);if(baseCtrl!=null){if(rating>0){baseCtrl.innerHTML="";for(var i=1;i<=5;++i){var image=document.createElement("img");image.src=(i<=rating)?baseImageUrl+"On.gif":baseImageUrl+"Off.gif";baseCtrl.appendChild(image);}
var ratingText=document.getElementById(ratingId);if((ratingText!=null)&&(this.ratingTextList!=null)&&(this.ratingTextList.length==5))
ratingText.innerHTML=this.ratingTextList[rating-1];var help=document.getElementById(helpId);if(help!=null)
help.className="hide";}else{var inputList=baseCtrl.getElementsByTagName("input");if((inputList!=null)&&(inputList.length==5)){this.inputIdList=new Array(5);this.mouseOverGuidList=new Array(5);this.clickGuidList=new Array(5);for(var i=0;i<5;++i){this.inputIdList[i]=inputList[i].id;this.mouseOverGuidList[i]=addEvent(inputList[i],"mouseover",this.changeRating.bindAsEventListener(this));this.clickGuidList[i]=addEvent(inputList[i],"click",this.submitRating.bindAsEventListener(this));}
this.mouseOutGuid=addEvent(baseCtrl,"mouseout",this.clearRating.bindAsEventListener(this));}}
baseCtrl.parentNode.className=baseCtrl.parentNode.className.replace(" hide"," show");}};ItemRating.prototype.changeRating=function(e){var id=e.target.id;var on=true;for(var i=0;i<5;++i){var button=document.getElementById(this.inputIdList[i]);button.src=on?this.baseImageUrl+"On.gif":this.baseImageUrl+"Off.gif";if(on&&(id==this.inputIdList[i])){on=false;var ratingText=document.getElementById(this.ratingId);if((ratingText!=null)&&(this.ratingTextList!=null)&&(this.ratingTextList.length==5))
ratingText.innerHTML=this.ratingTextList[i];}}
e.preventDefault();e.stopPropagation();return false;};ItemRating.prototype.clearRating=function(e){for(var i=4;i>=0;--i){var button=document.getElementById(this.inputIdList[i]);button.src=this.baseImageUrl+"Off.gif";}
var ratingText=document.getElementById(this.ratingId);if(ratingText!=null)
ratingText.innerHTML="&nbsp;";e.preventDefault();e.stopPropagation();return false;};ItemRating.prototype.submitRating=function(e){var baseCtrl=document.getElementById(this.baseId);removeEventByGuid(baseCtrl,"mouseout",this.mouseOutGuid);for(var i=0;i<5;++i){var button=document.getElementById(this.inputIdList[i]);removeEventByGuid(button,"mouseover",this.mouseOverGuidList[i]);removeEventByGuid(button,"click",this.clickGuidList[i]);}
var id=e.target.id;baseCtrl.innerHTML="";var on=true;var rating;for(i=0;i<5;++i){var image=document.createElement("img");image.src=on?this.baseImageUrl+"On.gif":this.baseImageUrl+"Off.gif";baseCtrl.appendChild(image);if(on&&(id==this.inputIdList[i])){rating=i+1;on=false;var ratingText=document.getElementById(this.ratingId);if((ratingText!=null)&&(this.ratingTextList!=null)&&(this.ratingTextList.length==5))
ratingText.innerHTML=this.ratingTextList[i];}}
var help=document.getElementById(this.helpId);if(help!=null)
help.className="hide";var url=this.url.replace("*{rating}",rating);this.ajax=new AjaxRequest(url);this.ajax.showWait=false;var divList=document.getElementsByTagName("div");if((divList!=null)&&(divList.length>0)){for(i=0;i<divList.length;++i){id=divList[i].id;if((id.length>21)&&(id.substr(id.length-21)=="___mdl_ReviewsSummary")){this.summaryId=id;this.ajax.id=id;this.ajax.onComplete=this.displaySummary.bindAsEventListener(this);break;}}}
url=window.location.href;var anchorPos=url.indexOf("#");if(anchorPos>0)
url=url.substr(0,anchorPos);window.location.replace(url+"#itemrating"+rating);this.ajax.run();e.preventDefault();e.stopPropagation();return false;};ItemRating.prototype.displaySummary=function(ajax){var summary=document.getElementById(this.summaryId);if(summary!=null)
summary.className=summary.className.replace(" hide"," show");};FavoriteStoresPopUp.prototype=new PopUpIframe();FavoriteStoresPopUp.prototype.constructor=FavoriteStoresPopUp;function FavoriteStoresPopUp(){PopUpIframe.call(this);this.position="right";this.iframeId="__favoriteStoresIframe";};FavoriteStoresPopUpIframe.prototype=new IframeInPopUp();FavoriteStoresPopUpIframe.prototype.constructor=FavoriteStoresPopUpIframe;function FavoriteStoresPopUpIframe(){IframeInPopUp.call(this);this.iframeId="__favoriteStoresIframe";};FavoriteStoresPopUpIframe.prototype.init=function(){IframeInPopUp.prototype.init.call(this);var inputList=document.documentElement.getElementsByTagName("input");if((inputList!=null)&&(inputList.length>0)){for(var i=0;i<inputList.length;++i){if((inputList[i].id.length>=7)&&(inputList[i].id.substr(inputList[i].id.length-7)=="imgSave")){addEvent(inputList[i],"click",this.saveFavoriteStores.bindAsEventListener(this));break;}}}};FavoriteStoresPopUpIframe.prototype.saveFavoriteStores=function(){var ajax=new AjaxRequest("","",true);ajax.displayWait(true);};RecommendedProductsPopUp.prototype=new PopUpIframe();RecommendedProductsPopUp.prototype.constructor=RecommendedProductsPopUp;function RecommendedProductsPopUp(){PopUpIframe.call(this);this.iframeId="__recommendedProductsIframe";};RecommendedProductsPopUp.prototype.init=function(SubmitId,url,width,keywordsId,defaultText){PopUpIframe.prototype.init.call(this,SubmitId,url,width);this.baseUrl=url;this.keywordsId=keywordsId;this.defaultText=defaultText;var keywordsCtrl=document.getElementById(keywordsId);if(keywordsCtrl!=null){addEvent(keywordsCtrl,"keypress",this.checkKeywordsEnter.bindAsEventListener(this));addEvent(keywordsCtrl,"focus",this.onFocus.bindAsEventListener(this));addEvent(keywordsCtrl,"blur",this.onBlur.bindAsEventListener(this));}};RecommendedProductsPopUp.prototype.onClose=function(){closePopUpIframe(this.iframeId,true);};RecommendedProductsPopUp.prototype.show=function(e){var keywordsCtrl=document.getElementById(this.keywordsId);if(keywordsCtrl!=null){var keywords=keywordsCtrl.value.trim();if((keywords.length>0)&&(keywords!=this.defaultText)){this.url=this.baseUrl.replace("*keywords*",keywords);return PopUpIframe.prototype.show.call(this,e);}}
e.preventDefault();e.stopPropagation();return false;};RecommendedProductsPopUp.prototype.checkKeywordsEnter=function(e){if(e.target.value.trim()==this.defaultText)
e.target.value="";if(e.keyCode==13)
this.show(e);};RecommendedProductsPopUp.prototype.onFocus=function(e){var keywordsCtrl=document.getElementById(this.keywordsId);if(keywordsCtrl!=null)
if(keywordsCtrl.value.trim()==this.defaultText)
keywordsCtrl.value="";e.preventDefault();e.stopPropagation();return false;};RecommendedProductsPopUp.prototype.onBlur=function(e){var keywordsCtrl=document.getElementById(this.keywordsId);if(keywordsCtrl!=null)
if(keywordsCtrl.value.trim().length==0)
keywordsCtrl.value=this.defaultText;e.preventDefault();e.stopPropagation();return false;};RecommendedProductsPopUpIframe.prototype=new IframeInPopUp();RecommendedProductsPopUpIframe.prototype.constructor=RecommendedProductsPopUpIframe;function RecommendedProductsPopUpIframe(){IframeInPopUp.call(this);this.iframeId="__recommendedProductsIframe";};RecommendedProductsPopUpIframe.prototype.init=function(submitId,url,keywordsId,defaultText){IframeInPopUp.prototype.init.call(this);this.submitId=submitId;this.url=url.replace("popup","");this.keywordsId=keywordsId;this.defaultText=defaultText;var submitCtrl=document.getElementById(submitId);if(submitCtrl!=null)
addEvent(submitCtrl,"click",this.submit.bindAsEventListener(this));var keywordsCtrl=document.getElementById(keywordsId);if(keywordsCtrl!=null){addEvent(keywordsCtrl,"keypress",this.checkKeywordsEnter.bindAsEventListener(this));addEvent(keywordsCtrl,"focus",this.onFocus.bindAsEventListener(this));addEvent(keywordsCtrl,"blur",this.onBlur.bindAsEventListener(this));}};RecommendedProductsPopUpIframe.prototype.checkKeywordsEnter=function(e){if(e.keyCode==13)
this.submit(e);};RecommendedProductsPopUpIframe.prototype.onFocus=function(e){var keywordsCtrl=document.getElementById(this.keywordsId);if(keywordsCtrl!=null)
if(keywordsCtrl.value.trim()==this.defaultText)
keywordsCtrl.value="";e.preventDefault();e.stopPropagation();return false;};RecommendedProductsPopUpIframe.prototype.onBlur=function(e){var keywordsCtrl=document.getElementById(this.keywordsId);if(keywordsCtrl!=null)
if(keywordsCtrl.value.trim().length==0)
keywordsCtrl.value=this.defaultText;e.preventDefault();e.stopPropagation();return false;};RecommendedProductsPopUpIframe.prototype.submit=function(e){var keywordsCtrl=document.getElementById(this.keywordsId);if(keywordsCtrl!=null){var keywords=keywordsCtrl.value.trim();if((keywords.length>0)&&(keywords!=this.defaultText)){var url=this.url.replace("*keywords*",keywords);location.replace(url);}}
e.preventDefault();e.stopPropagation();return false;};MappingPopUp.prototype=new PopUp();MappingPopUp.prototype.constructor=MappingPopUp;function MappingPopUp(){PopUp.call(this);};MappingPopUp.prototype.onComplete=function(ajax){PopUp.prototype.onComplete.call(this,ajax);};var ProductItem={init:function(){var productImage=$("img.OTSProductImage");if($(productImage).height()>0)
ProductItem.resizeSidebar(null);else
$(productImage).load(ProductItem.resizeSidebar);var group=1;var sectionList=$("div.itemSectionGroup"+group);while(sectionList.length>0){var firstTab=true;var tabBarHtml="";$(sectionList).each(function(){$(this).removeClass("itemSectionGroup"+group).addClass("itemSectionGroup");tabBarHtml+="<li><a href=\"#"+this.id+"\""+(firstTab?"class=\"OTSTabsCurrent\"":"")+"><span>"+$(this).find("h2 span").text()+"</span></a></li>";if(!firstTab)
$(this).hide();firstTab=false;});$(sectionList[0]).before("<ul class=\"tabs itemSectionTabs clearfix\">"+tabBarHtml+"</ul>");++group;sectionList=$("div.itemSectionGroup"+group);}
$("div.itemCommunity").find("ul").each(function(){var items=$(this).find("li:gt(3)");if(items.length>2){$(items).hide();var seeMore=$(this).find("li.OTSItemCommunitySeeMore");seeMore.show();seeMore.click(ProductItem.showMoreCommunity);$(this).find("li.OTSItemCommunitySeeLess").click(ProductItem.showLessCommunity);}else{$(this).find("li.OTSItemCommunitySeeMore").remove();$(this).find("li.OTSItemCommunitySeeLess").remove();}});if(window.location.hash.toLowerCase()=="#bookexcerpt"){$(window).load(function(){$("li.iconReadExcerpt a").click();});}
if(window.location.hash.toLowerCase()=="#storelookup"){$(window).load(function(){$("div#RightRegion a.iconStoreLocator").click();});}},showMoreCommunity:function(e){var list=$(this).parent("ul");$(list).children("li:gt(3)").show();$(list).children("li.OTSItemCommunitySeeMore").hide();return false;},showLessCommunity:function(e){var list=$(this).parent("ul");$(list).children("li:gt(3)").hide();$(list).children("li.OTSItemCommunitySeeMore").show();return false;},initReview:function(){if((window.location.hash.length==11)&&(window.location.hash.substr(0,11)=="#addcomment")){ProductItem.showAddComment(null);}
$("a.iconAddComment").click(ProductItem.showAddComment);$("li.iconAddComment a").click(ProductItem.showAddComment);$("#cancelAddComment").click(ProductItem.cancelAddComment);$("#submitAddComment").click(ProductItem.submitAddComment);},showAddComment:function(e){$("#addcomment").show();$("p.OTSItemReviewsBottomBar a.iconAddComment").hide();window.location.hash="addcomment";return false;},cancelAddComment:function(e){$("#addcomment").hide();$("p.OTSItemReviewsBottomBar a.iconAddComment").show();return false;},submitAddComment:function(e){ProductItem.cancelAddComment(null);return false;},resizeSidebar:function(e){var mainHeight=$("div.itemProduct").height();var sidebar=$("div.itemProductSidebar");var sidebarHeight=sidebar.height();if(sidebarHeight>mainHeight){var listItems=sidebar.children("ul").children("li");if(listItems.length>7){var seeAll=sidebar.find("li.OTSProductSeeAll");seeAll.show();seeAll.click(ProductItem.showAllActions);sidebar.find("li.OTSProductSeeLess").click(ProductItem.showFewerActions);sidebarHeight=sidebar.height();for(var i=listItems.length-3;i>=5;--i){$(listItems[i]).hide();sidebarHeight=sidebar.height();if(sidebarHeight<=mainHeight){--i;break;}}
ProductItem.numActions=i;}}},showAllActions:function(e){$("div.itemProductSidebar").children("ul").find("li:gt("+ProductItem.numActions+")").show();$("div.itemProductSidebar").children("ul").find("li.OTSProductSeeAll").hide();return false;},showFewerActions:function(e){$("div.itemProductSidebar").children("ul").find("li:gt("+ProductItem.numActions+")").hide();$("div.itemProductSidebar").children("ul").find("li.OTSProductSeeAll").show();return false;}};

// Name: ProductList.js  Output: Min

var ProductListCarousel={imageTimeout:300,autoRotating:false,canAutoRotate:true,autoRotateTimeout:5000,init:function(){var templates=$("div.OTSTemplateCarousel");if(templates.length>0){templates.each(function(i){var numItems=4;var template=$(this).parent();if(template.hasClass("templateFiveCol"))
numItems=5;else if(template.hasClass("templateSixCol"))
numItems=6;$(this).attr("numitems",numItems);var width=126;var src=$("div.OTSTemplateImageLeft:first a img",this).attr("src");if((src!=null)&&(src.length>0)){var pos=src.indexOf("width=");if(pos>0){src=src.substr(pos+6);pos=src.indexOf("&");if(pos>0){width=src.substr(0,pos);}}}
$(this).attr("mainimagewidth",width);var list=$("div.OTSTemplateCarouselList ul",this);$("li:lt("+numItems+")",list).css("display","");$("li:gt("+(numItems-1)+")",list).css("display","none");var hasExtraItems=($("li",list).length>numItems);var hasMainArea=($("div.OTSTemplateRow",this).length>0);if(hasExtraItems||hasMainArea){$("a.OTSTemplateMoveLeft",this).click(ProductListCarousel.moveLeft);$("a.OTSTemplateMoveRight",this).click(ProductListCarousel.moveRight);}else{$("a.OTSTemplateMoveLeft",this).css("display","none");$("a.OTSTemplateMoveRight",this).css("display","none");}
$(this).append("<div class='OTSTemplateCalcHeight'></div>");if($("div.OTSTemplateRow",this).length==0)
$(this).addClass("OTSTemplateCarouselNoMainArea");});$(document.body).append("<div id=\"__productListCarouselImages\" style=\"display: none; position: absolute; top: 0; left: -3000px; width: 500px;\"></div>");var images=$("div.OTSTemplateCarousel div.OTSTemplateImageLeft a img");images.each(function(i){$(this).attr("index",i);var src=$(this).attr("src");if((src!=null)&&(src.length>0)){if(src.indexOf("width=72")<0){$("#__productListCarouselImages").append("<img id=\"__productListCarouselLargeImage_"+i+"\" src=\""+src+"\" style=\"display: block;\" />");src=src.replace(/width=\d+/,"width=72");}
$("#__productListCarouselImages").append("<img id=\"__productListCarouselImage_"+i+"\" src=\""+src+"\" style=\"display: block;\" />");}});window.setTimeout("ProductListCarousel.waitForImages();",ProductListCarousel.imageTimeout);}},waitForImages:function(){var loaded=true;var images=$("#__productListCarouselImages img");for(var i=0;i<images.length;++i)
if(images.eq(i).height()==0){loaded=false;break;}
if(loaded){$("div:visible > div.OTSTemplateCarousel").each(function(i){ProductListCarousel.setUp(this);});if(!ProductListCarousel.autoRotating&&ProductListCarousel.canAutoRotate)
if($("div.productListAutoRotate div.OTSTemplateCarousel").length>0){ProductListCarousel.autoRotating=true;window.setTimeout("ProductListCarousel.autoRotate();",ProductListCarousel.autoRotateTimeout);}}else{window.setTimeout("ProductListCarousel.waitForImages();",ProductListCarousel.imageTimeout);}},setUp:function(carousel){var hasMainArea=($("div.OTSTemplateRow",carousel).length>0);var emHeight=$(".OTSTemplateCalcHeight",carousel).height();var maxImageHeight=0;$("div.OTSTemplateCarouselList ul li div.OTSTemplateImageLeft a img",carousel).each(function(i){var imageHeight=ProductListCarousel.getImageHeight(this);maxImageHeight=Math.max(maxImageHeight,imageHeight);});var listHeight=maxImageHeight;var maxMainHeight=0;if(hasMainArea){var mainImage=$("div.OTSTemplateRow div.OTSTemplateImageLeft a img",carousel);var mainImageWidth=mainImage.width();var mainImageHeight=mainImage.height();maxMainHeight=Math.round(maxImageHeight*mainImageWidth/72);maxMainHeight=Math.max(maxMainHeight,mainImageHeight);var smallImageHeight=Math.round(mainImageHeight*72/mainImageWidth);listHeight=Math.max(listHeight,smallImageHeight);}
infoHeight=$("div.OTSTemplateCarouselList ul li div.OTSTemplateImageLeft div.OTSTemplateImageInfo",carousel).height();if(infoHeight==null)
infoHeight=0;listHeight+=infoHeight;$("div.OTSTemplateCarouselList ul li",carousel).each(function(i){var listItemHeight=ProductListCarousel.getImageHeight($("div.OTSTemplateImageLeft a img",this))+infoHeight;var marginTop=listHeight-listItemHeight;if(marginTop!=0)
$(this).css("margin-top",marginTop+"px");else
$(this).css("margin-top","0%");});var isIE6=false;if($.browser.msie)
if(parseInt($.browser.version)<7){isIE6=true;$("a.OTSTemplateMoveLeft",carousel).height(listHeight);$("a.OTSTemplateMoveRight",carousel).height(listHeight);}
if(hasMainArea){var width=$("div.OTSTemplateRow div.OTSTemplateSmallContentRight",carousel).width();$("div.OTSTemplateCarouselList div.OTSTemplateSmallContentRight",carousel).width(width);var height=0;$("div.OTSTemplateSmallContentRight",carousel).each(function(i){height=Math.max(height,$(this).height());});height=Math.max(height,maxMainHeight);$("div.OTSTemplateRow",carousel).height((height*10/emHeight)+"em");}
if(isIE6)
$("div.OTSTemplateCarouselList",carousel).css("zoom","1");},autoRotate:function(){if(ProductListCarousel.canAutoRotate){ProductListCarousel.moveItems($("div.productListAutoRotate div.OTSTemplateCarouselList"),false);window.setTimeout("ProductListCarousel.autoRotate();",ProductListCarousel.autoRotateTimeout);}},getImageHeight:function(imageCtrl){var imageHeight=$(imageCtrl).height();if(imageHeight==0){var index=$(imageCtrl).attr("index");imageHeight=$("#__productListCarouselImage_"+index).height();}
return imageHeight;},moveLeft:function(e){ProductListCarousel.canAutoRotate=false;ProductListCarousel.moveItems(this,true);return false;},moveRight:function(e){ProductListCarousel.canAutoRotate=false;ProductListCarousel.moveItems(this,false);return false;},moveItems:function(ctrl,moveLeft){window.focus();var template=$(ctrl).parents("div.OTSTemplateCarousel");var list=$("div.OTSTemplateCarouselList ul",template);var mainItem=$("div.OTSTemplateRow",template);var hasMainArea=(mainItem.length>0);list.css("width",list.width());if(hasMainArea){var nextImage=$("li:"+(moveLeft?"last":"first")+" div.OTSTemplateImageLeft a img",list);var index=nextImage.attr("index");if($("#__productListCarouselLargeImage_"+index).length==0){var width=template.attr("mainimagewidth");var src=nextImage.attr("src");src=src.replace(/width=\d+/,"width="+width);$("#__productListCarouselImages").append("<img id=\"__productListCarouselLargeImage_"+index+"\" src=\""+src+"\" />");}}
var canAnimate=true;if($.browser.msie&&(parseInt($.browser.version)<7))
canAnimate=false;if(canAnimate){var numItems=template.attr("numitems");var offsetPct=(100/numItems)+"%";var params=moveLeft?{left:offsetPct}:{left:"-"+offsetPct};list.animate(params,"fast","swing",function(){ProductListCarousel.doMoveItems(template,moveLeft);});}else{ProductListCarousel.doMoveItems(template,moveLeft);}},doMoveItems:function(template,moveLeft){var mainItem=$("div.OTSTemplateRow",template);var hasMainArea=(mainItem.length>0);var list=$("div.OTSTemplateCarouselList ul",template);var numItems=template.attr("numitems");var lastIndex=numItems-1;var hasExtraItems=($("li",list).length>numItems);var canAnimate=true;if($.browser.msie)
if(parseInt($.browser.version)<7)
canAnimate=false;if(hasMainArea){if(canAnimate)
mainItem.css("opacity","0");var maxImageHeight=0;$("li div.OTSTemplateImageLeft a img",list).each(function(i){maxImageHeight=Math.max(maxImageHeight,$(this).height());});var itemImage=$("div.OTSTemplateImageLeft a img",mainItem);var height=Math.round(itemImage.height()*72/itemImage.width());maxImageHeight=Math.max(height,maxImageHeight);var marginTop=maxImageHeight-height;var listItem="<li style=\"margin-top: "+marginTop+"px;\"></li>";var imageUrl=itemImage.attr("src");itemImage.attr("src",imageUrl.replace(/width=\d+/,"width=72"));$("div.OTSTemplateSmallContentRight",mainItem).hide();listItem=$(listItem).append(mainItem.children());if(moveLeft){mainItem.append($("li:last",list).children());$("li:last",list).remove();if(hasExtraItems)
$("li:eq("+lastIndex+")",list).hide();$("li:first",list).before(listItem);}else{mainItem.append($("li:first",list).children());$("li:first",list).remove();$("li:last",list).after(listItem);if(hasExtraItems){$("li:last",list).hide();$("li:eq("+lastIndex+")",list).show();}}}else{if(moveLeft){if(hasExtraItems)
$("li:eq("+lastIndex+")",list).hide();$("li:first",list).before($("li:last",list));if(hasExtraItems)
$("li:first",list).show();}else{if(hasExtraItems)
$("li:first",list).hide();$("li:last",list).after($("li:first",list));if(hasExtraItems)
$("li:eq("+lastIndex+")",list).show();}}
list.css("left","0");if(hasMainArea){var width=template.attr("mainimagewidth");var itemImage=$("div.OTSTemplateImageLeft a img",mainItem);var imageUrl=itemImage.attr("src");itemImage.attr("src",imageUrl.replace(/width=\d+/,"width="+width));$("div.OTSTemplateSmallContentRight",mainItem).show();if(canAnimate)
mainItem.animate({opacity:"1"},"fast","swing",function(){if($.browser.msie)
$(this).get(0).style.removeAttribute("filter");});}
if(!canAnimate)
$("div.OTSTemplateCarouselList",template).css("zoom","1");}};var ProductListPopUp={id:"",x:0,y:0,itemRect:null,popUpRect:null,hideTimeout:null,showDelay:1000,hideDelay:750,moveDelay:500,conveyerBeltInit:0,init:function(){var conveyerBelts=$("div.productListConveyerBelt");if(conveyerBelts.length>0){if(ProductListPopUp.conveyerBeltInit!=1){return;}
ProductListPopUp.conveyerBeltInit=2;}
var popUps=$("div.OTSTemplatePopUp");if(popUps.length>0){$(document.body).prepend("<div class='dialog' style='position: absolute; top: 0; left: 0; width: 1px; height: 1px;'></div>");$().mousemove(ProductListPopUp.mouseMove);popUps.each(function(i){var itemId="__productListItem_"+i;var popUpId="__productListPopUp_"+i;var item=$(this).prev("div");item.attr("id",itemId);item.attr("popupid",popUpId);item.mouseover(ProductListPopUp.mouseOverItem);var plcbHoverFixCode="";if(item.parents("li").parents("div").hasClass("productListConveyerBelt"))
plcbHoverFixCode=' style=\"z-index:10;\"';$(this).wrap("<div id=\""+popUpId+"\" itemid=\""+itemId+"\" class=\"dialog template templatePopUp\""+plcbHoverFixCode+"><div class=\"dialogOuter\"><div class=\"dialogInner\"><div class=\"dialogContainer\"><div class=\"dialogContents\"></div></div></div></div></div>");$(document.body).append($("#"+popUpId));});}},mouseOverItem:function(e){ProductListPopUp.x=e.pageX;ProductListPopUp.y=e.pageY;var id=$(this).attr("popupid");if(id==ProductListPopUp.id){if(ProductListPopUp.hideTimeout){window.clearTimeout(ProductListPopUp.hideTimeout);ProductListPopUp.hideTimeout=null;}}else{window.setTimeout("ProductListPopUp.showPopUp('"+id+"');",ProductListPopUp.id?ProductListPopUp.moveDelay:ProductListPopUp.showDelay);}},mouseMove:function(e){ProductListPopUp.x=e.pageX;ProductListPopUp.y=e.pageY;if(ProductListPopUp.id&&!ProductListPopUp.hideTimeout&&!ProductListPopUp.isActive())
ProductListPopUp.hideTimeout=window.setTimeout("ProductListPopUp.hidePopUp('"+ProductListPopUp.id+"');",ProductListPopUp.hideDelay);},showPopUp:function(id){if(id!=ProductListPopUp.id){var popUp=$("#"+id);var itemId=popUp.attr("itemid");var item=$("#"+itemId);var offset=item.offset();var width=item.width();var height=item.height();if((ProductListPopUp.x>=offset.left)&&(ProductListPopUp.y>=offset.top)&&(ProductListPopUp.x<(offset.left+width))&&(ProductListPopUp.y<(offset.top+height))){var isIE6=false;if($.browser.msie)
if(parseInt($.browser.version)<7)
isIE6=true;if(ProductListPopUp.hideTimeout){window.clearTimeout(ProductListPopUp.hideTimeout);ProductListPopUp.hideTimeout=null;}
var canAnimate=true;var oldId=ProductListPopUp.id;ProductListPopUp.id=id;if(oldId){canAnimate=false;ProductListPopUp.hidePopUp(oldId);}
if(!item.parents("li").parents("div").hasClass("productListConveyerBelt")){item.parents("li").css("position","relative");}
ProductListPopUp.itemRect={left:offset.left,top:offset.top,right:(offset.left+width-1),bottom:(offset.top+height-1)};ProductListPopUp.popUpRect=null;var list=item.parents("ol, ul");var listOffset=list.offset();var template=list.parent();var popUpWidth=popUp.width();var popUpHeight=popUp.height();var top,left;var cssParams={display:"block"};var animateParams={};if(isIE6){var iframe=$("iframe.dialogIE6Fix",popUp);if(iframe.length==0){$("div.dialogContents",popUp).after("<iframe class=\"dialogIE6Fix\" src=\"javascript:false;\"></iframe>");var iframe=$("iframe.dialogIE6Fix",popUp);}
if(iframe.length==1)
iframe.css({left:"-17px",top:"0",width:popUpWidth+"px",height:popUpHeight+"px"});}
var rhs=false;var above=false;if(template.hasClass("productListPopUpCentre"))
above=true;else if(template.hasClass("productListPopUpRight"))
rhs=true;popUp.attr("rhs",rhs?"1":"0");popUp.attr("above",above?"1":"0");if(above){animateParams.top="-=30px";top=listOffset.top-popUpHeight+30;left=offset.left-popUpWidth/2;if(isIE6)
left+=30;if(canAnimate)
top+=30;if(template.hasClass("productListConveyerBelt")){top=offset.top+height-popUpHeight+30;left=offset.left;if(left>(listOffset.left+(list.width()/2))){left=offset.left-popUpWidth+60;}}}else{top=offset.top+30;if(rhs){animateParams.left="+=30px";left=listOffset.left+list.width()-30;if(isIE6)
left+=15;if(!canAnimate)
left+=30;}else{animateParams.left="-=30px";left=listOffset.left-popUpWidth-30;if(isIE6)
left+=45;if(!canAnimate)
left-=30;}}
top=Math.max((canAnimate?85:55),top);if(isIE6)
top-=45;left=Math.max(0,Math.min(left,$(document.body).width()-popUpWidth-60));var pageTop=$(window).scrollTop();var pageBottom=pageTop+$(window).height();var minTop=pageTop-parseInt($(".dialogInner",popUp).css("top"));if(top<minTop)
top=minTop;if(above&&((top-30)<minTop))
top=minTop+30;if((top+popUpHeight)>=pageBottom)
top=pageBottom-popUpHeight;if(top<0)
top=0;cssParams.top=top+"px";cssParams.left=left+"px";if(canAnimate){if(!$.browser.msie){cssParams.opacity="0";animateParams.opacity="1";}
popUp.css(cssParams);popUp.animate(animateParams,"fast","swing",function(){ProductListPopUp.showPopUpFinish(popUp);});ProductListPopUp.iePopUpRefresh(popUp,template);}else{if(!$.browser.msie){cssParams.opacity="1";}
popUp.css(cssParams);ProductListPopUp.showPopUpFinish(popUp);ProductListPopUp.iePopUpRefresh(popUp,template);}}}},iePopUpRefresh:function(popUp,template){if(template.hasClass("productListConveyerBelt")){if($.browser.msie){if((parseInt($.browser.version)>=7)&&(parseInt($.browser.version)<8)){$("p",popUp).css("zoom","1");}}}},showPopUpFinish:function(popUp){var popUpContents=$("div.dialogContents",popUp);var offset=popUpContents.offset();var width=popUpContents.width();var height=popUpContents.height();ProductListPopUp.popUpRect={left:(offset.left-17),top:(offset.top-17),right:(offset.left+width+33),bottom:(offset.top+height+33)};},hidePopUp:function(id){ProductListPopUp.hideTimeout=null;if((id!=ProductListPopUp.id)||!ProductListPopUp.isActive()){var canAnimate=false;if(id==ProductListPopUp.id){ProductListPopUp.id="";canAnimate=true;}
var popUp=$("#"+id);if(canAnimate){var params={};var list=popUp.parents("ol");var template=list.parent();if(popUp.attr("above")=="1")
params.top="+=30px";else if(popUp.attr("rhs")=="1")
params.left="-=30px";else
params.left="+=30px";if(!$.browser.msie)
params.opacity="0";popUp.animate(params,"fast","swing",function(){ProductListPopUp.hidePopUpFinish(popUp);});}else{ProductListPopUp.hidePopUpFinish(popUp);}
var itemId=$("#"+id).attr("itemid");var item=$("#"+itemId);if(item.parents("li").parents("div").hasClass("productListConveyerBelt")){ProductListConveyerBelt.startAnimate(item.parents("ul"));}}},hidePopUpFinish:function(popUp){popUp.css("display","none");popUp.parents("li").css("position","static");},isActive:function(){var active=false;if((ProductListPopUp.x>=ProductListPopUp.itemRect.left)&&(ProductListPopUp.y>=ProductListPopUp.itemRect.top)&&(ProductListPopUp.x<=ProductListPopUp.itemRect.right)&&(ProductListPopUp.y<=ProductListPopUp.itemRect.bottom)){active=true;}
if(active){var itemId=$("#"+ProductListPopUp.id).attr("itemid");var item=$("#"+itemId);var parentUL=$(item).parents("ul");if(parentUL.parents("div").hasClass("productListConveyerBelt")){if(ProductListPopUp.x<parentUL.offset().left||ProductListPopUp.x>(parentUL.offset().left+parentUL.width())){active=false;}}}
if(!active&&ProductListPopUp.popUpRect){if((ProductListPopUp.x>=ProductListPopUp.popUpRect.left)&&(ProductListPopUp.y>=ProductListPopUp.popUpRect.top)&&(ProductListPopUp.x<=ProductListPopUp.popUpRect.right)&&(ProductListPopUp.y<=ProductListPopUp.popUpRect.bottom)){active=true;}}
return active;}};var ProductListTab={init:function(){$("h1[productlisttab]").each(function(i){var tabHeader=$(this).parent();var tabSections=new Array();var section=tabHeader.next();while((section.length==1)&&section.attr("productlisttab")){tabSections.push(section.attr("id"));section=section.next();}
if(tabSections.length>1){$(this).append("<ul class='clearfix'></ul>");var tabs=$("ul",this);var tabIndex=0;var random=$(this).attr("random");if(random){var numMins=parseInt(random);var now=new Date();tabIndex=Math.floor(((now.getHours()*60)+now.getMinutes())/numMins)%tabSections.length;}
for(var i=0;i<tabSections.length;++i){section=$("#"+tabSections[i]);section.hide();$("h2",section).hide();var css="";if(i==tabIndex)
css=" class='OTSTemplateCurrentTab'";tabs.append("<li tabid='"+tabSections[i]+"'"+css+">"+$("h2 span",section).text()+"</li>");$("li",tabs).click(ProductListTab.show);}
section=$("#"+tabSections[tabIndex]);tabs.attr("tabid",tabSections[tabIndex]);tabHeader.append(section.children("*:not(h2)"));}else{tabHeader.hide();}});},show:function(e){var id=$(this).attr("tabid");var tabs=$(this).parent("ul");var currentId=tabs.attr("tabid");if(id!=currentId){$("li[tabid='"+currentId+"']").removeClass("OTSTemplateCurrentTab");$(this).addClass("OTSTemplateCurrentTab");tabs.attr("tabid",id);var tabHeader=tabs.parent().parent();$("#"+currentId).append(tabHeader.children("*:not(h1)"));tabHeader.append($("#"+id).children("*:not(h2)"));var carousel=$("div.OTSTemplateCarousel",tabHeader);if(carousel.length==1)
ProductListCarousel.setUp(carousel);}}};var ProductListConveyerBelt={speed:30,enableScroll:1,init:function(){$(".productListConveyerBelt").each(function(i){if($.browser.msie){if(parseInt($.browser.version)<7){ProductListConveyerBelt.speed=5;}}
if(!ProductListConveyerBelt.shouldScroll()){ProductListConveyerBelt.enableScroll=0;ProductListPopUp.conveyerBeltInit=1;ProductListPopUp.init();return false;}
$(this).attr('id','__conveyerBeltID'+i);$(this).attr('conveyerBeltID',i);$("#__conveyerBeltID"+i+" ul").attr({totalWidth:0,animationspeed:1,animationDirection:1,currentMouseOver:0,displayArrows:1,myInterval:-1});plcbTempTotalWidth=0;$("#__conveyerBeltID"+i+" ul li").each(function(i){plcbTempTotalWidth+=parseInt($(this).css("width"))+parseInt($(this).css("padding-right"));});$("#__conveyerBeltID"+i+" ul div.plcbAnimationWrapper").width(plcbTempTotalWidth);if(plcbTempTotalWidth<$("#__conveyerBeltID"+i+" ul").width()){$("#__conveyerBeltID"+i+" .productListConveyerBeltButtonLeft").hide();$("#__conveyerBeltID"+i+" .productListConveyerBeltButtonRight").hide();$("#__conveyerBeltID"+i+" .productListConveyerBeltPausePlay").hide();$("#__conveyerBeltID"+i+" .productListConveyerBeltFadeLeft").hide();$("#__conveyerBeltID"+i+" .productListConveyerBeltFadeRight").hide();$("#__conveyerBeltID"+i+" ul").attr('displayArrows',0);ProductListPopUp.conveyerBeltInit=1;ProductListPopUp.init();return;}
$("#__conveyerBeltID"+i+" ul").attr('totalWidth',plcbTempTotalWidth);$("#__conveyerBeltID"+i+" ul div.plcbAnimationWrapper").clone(true).appendTo("#__conveyerBeltID"+i+" ul");var initLeftPadding=parseInt($("#__conveyerBeltID"+i+" ul div.plcbAnimationWrapper").css("left"));$("#__conveyerBeltID"+i+" ul div.plcbAnimationWrapper:eq(1)").css("left",plcbTempTotalWidth+initLeftPadding)
ProductListConveyerBelt.initEventHandlers(i);ProductListPopUp.conveyerBeltInit=1;ProductListPopUp.init();});},isAutoScroll:function(href,keyValue){var productId="",productCatalogue="";var pos=href.indexOf("?");var isAutoScrollValue="";if(pos>=0){var hrefParts=href.substr(pos+1).split("&");for(var i=hrefParts.length-1;i>=0;--i){var keyValuePair=hrefParts[i].split("=");if(keyValuePair.length==2){var key=keyValuePair[0].toLowerCase();if(key==keyValue)
isAutoScrollValue=keyValuePair[1];}}}
return isAutoScrollValue;},initEventHandlers:function(p_conveyerBeltID){var plcbButtonRight=$("#__conveyerBeltID"+p_conveyerBeltID+" .productListConveyerBeltButtonRight");var plcbButtonLeft=$("#__conveyerBeltID"+p_conveyerBeltID+" .productListConveyerBeltButtonLeft");var plcbUL=$("#__conveyerBeltID"+p_conveyerBeltID+" ul");var plcbPausePlay=$("#__conveyerBeltID"+p_conveyerBeltID+" .productListConveyerBeltPausePlay");var plcbImg=$("#__conveyerBeltID"+p_conveyerBeltID+" ul li img");plcbButtonRight.mousedown(function(){plcbButtonRight.mouseover();plcbUL.attr('animationspeed',30);});plcbButtonRight.bind("mouseup mouseout",function(){plcbUL.attr('animationspeed',1);});plcbButtonRight.mouseover(function(){if(parseInt(plcbUL.attr('myInterval'))!=-1){if(parseInt(plcbUL.attr('animationDirection'))==1){window.clearInterval(plcbUL.attr('myInterval'));plcbUL.attr('myInterval',-1)
plcbPausePlay.attr('id','');plcbUL.attr('animationDirection',0);plcbUL.attr('myInterval',setInterval('ProductListConveyerBelt.flexiScrollRight('+p_conveyerBeltID+');',ProductListConveyerBelt.speed));}}else if(parseInt(plcbUL.attr('myInterval'))==-1){plcbPausePlay.attr('id','');plcbUL.attr('animationDirection',0);plcbUL.attr('myInterval',setInterval('ProductListConveyerBelt.flexiScrollRight('+p_conveyerBeltID+');',ProductListConveyerBelt.speed));}});plcbButtonLeft.mousedown(function(){plcbButtonLeft.mouseover();plcbUL.attr('animationspeed',30);});plcbButtonLeft.bind("mouseup mouseout",function(){plcbUL.attr('animationspeed',1);});plcbButtonLeft.mouseover(function(){if(parseInt(plcbUL.attr('myInterval'))!=-1){if(parseInt(plcbUL.attr('animationDirection'))==0){window.clearInterval(plcbUL.attr('myInterval'));plcbUL.attr('myInterval',-1)
plcbPausePlay.attr('id','');plcbUL.attr('animationDirection',1);plcbUL.attr('myInterval',setInterval('ProductListConveyerBelt.flexiScrollLeft('+p_conveyerBeltID+');',ProductListConveyerBelt.speed));}}else if(parseInt(plcbUL.attr('myInterval'))==-1){plcbPausePlay.attr('id','');plcbUL.attr('animationDirection',1);plcbUL.attr('myInterval',setInterval('ProductListConveyerBelt.flexiScrollLeft('+p_conveyerBeltID+');',ProductListConveyerBelt.speed));}});plcbImg.mouseover(function(e){if(parseInt(plcbUL.attr('myInterval'))!=-1){window.clearInterval(plcbUL.attr('myInterval'));plcbUL.attr('myInterval',-1)}
plcbUL.attr('currentMouseOver',1);});plcbImg.mouseout(function(e){plcbUL.attr('currentMouseOver',0);if((ProductListPopUp.id!=null)&&(ProductListPopUp.id!="")){if($("#"+ProductListPopUp.id).css("display")=="block"){return;}}
ProductListConveyerBelt.startAnimate(plcbUL);});plcbPausePlay.click(function(){if(parseInt(plcbUL.attr('myInterval'))!=-1){window.clearInterval(plcbUL.attr('myInterval'));plcbUL.attr('myInterval',-1)
plcbPausePlay.attr('id','play');}else{plcbUL.attr('animationspeed',1);if(parseInt(plcbUL.attr('animationDirection'))==0){plcbUL.attr('myInterval',setInterval('ProductListConveyerBelt.flexiScrollRight('+p_conveyerBeltID+');',ProductListConveyerBelt.speed));}else{plcbUL.attr('myInterval',setInterval('ProductListConveyerBelt.flexiScrollLeft('+p_conveyerBeltID+');',ProductListConveyerBelt.speed));}
plcbPausePlay.attr('id','');}});var initMovementDelay=1000;if($.browser.msie)
if(parseInt($.browser.version)<7){initMovementDelay=2000;}
window.setTimeout("ProductListConveyerBelt.initMovement("+p_conveyerBeltID+")",initMovementDelay);},initMovement:function(p_conveyerBeltID){plcbULIM=$("#__conveyerBeltID"+p_conveyerBeltID+" ul");if(plcbULIM.attr('myInterval')==-1){if(parseInt(plcbULIM.attr('animationDirection'))==1){plcbULIM.attr('myInterval',setInterval("ProductListConveyerBelt.flexiScrollLeft("+p_conveyerBeltID+");",ProductListConveyerBelt.speed));}else{plcbULIM.attr('myInterval',setInterval("ProductListConveyerBelt.flexiScrollRight("+p_conveyerBeltID+");",ProductListConveyerBelt.speed));}}},shouldScroll:function(){var isScrollableParam=ProductListConveyerBelt.isAutoScroll(window.location.href,"scrolling");if(isScrollableParam=="0"){$.cookies.set("ProductConveyerScrolling","0",{hoursToLive:24,path:"/",domain:"indigo.ca",secure:false});return false;}else{if($.cookies.get("ProductConveyerScrolling")=="0"){return false;}}
return true;},startAnimate:function(plcbUL){if(plcbUL.attr('displayArrows')==0){return;}
if(ProductListConveyerBelt.enableScroll==0)
return false;p_conveyerBeltID=plcbUL.parents("div").attr("conveyerBeltID");if((parseInt(plcbUL.attr('myInterval'))==-1)&&(plcbUL.attr('currentMouseOver')==0)){plcbUL.attr('animationspeed',1);if(parseInt(plcbUL.attr('animationDirection'))==0){plcbUL.attr('myInterval',setInterval('ProductListConveyerBelt.flexiScrollRight('+p_conveyerBeltID+');',ProductListConveyerBelt.speed));}else{plcbUL.attr('myInterval',setInterval('ProductListConveyerBelt.flexiScrollLeft('+p_conveyerBeltID+');',ProductListConveyerBelt.speed));}
$("#__conveyerBeltID"+p_conveyerBeltID+" .productListConveyerBeltPausePlay").attr('id','');}},flexiScrollLeft:function(p_conveyerBeltID){var fslUL=$("#__conveyerBeltID"+p_conveyerBeltID+" ul");var fslAnimationSpeed=parseInt(fslUL.attr('animationspeed'));var fslTotalWidth=parseInt(fslUL.attr('totalWidth'));$("#__conveyerBeltID"+p_conveyerBeltID+" ul div.plcbAnimationWrapper").each(function(i){$(this).css("left",parseInt($(this).css("left"))-fslAnimationSpeed);if(parseInt($(this).css("left"))<-(fslTotalWidth)){$(this).css("left",parseInt($(this).css("left"))+(fslTotalWidth*2));}});},flexiScrollRight:function(p_conveyerBeltID){var fslUL=$("#__conveyerBeltID"+p_conveyerBeltID+" ul");var fslAnimationSpeed=parseInt(fslUL.attr('animationspeed'));var fslTotalWidth=parseInt(fslUL.attr('totalWidth'));$("#__conveyerBeltID"+p_conveyerBeltID+" ul div.plcbAnimationWrapper").each(function(i){$(this).css("left",parseInt($(this).css("left"))+fslAnimationSpeed);if(parseInt($(this).css("left"))>fslTotalWidth){$(this).css("left",parseInt($(this).css("left"))-(fslTotalWidth*2));}});}};

// Name: External/swfobject.js  Output: Normal

/* SWFObject v2.1 <http://code.google.com/p/swfobject/>
	Copyright (c) 2007-2008 Geoff Stearns, Michael Williams, and Bobby van der Sluis
	This software is released under the MIT License <http://www.opensource.org/licenses/mit-license.php>
*/
var swfobject=function(){var b="undefined",Q="object",n="Shockwave Flash",p="ShockwaveFlash.ShockwaveFlash",P="application/x-shockwave-flash",m="SWFObjectExprInst",j=window,K=document,T=navigator,o=[],N=[],i=[],d=[],J,Z=null,M=null,l=null,e=false,A=false;var h=function(){var v=typeof K.getElementById!=b&&typeof K.getElementsByTagName!=b&&typeof K.createElement!=b,AC=[0,0,0],x=null;if(typeof T.plugins!=b&&typeof T.plugins[n]==Q){x=T.plugins[n].description;if(x&&!(typeof T.mimeTypes!=b&&T.mimeTypes[P]&&!T.mimeTypes[P].enabledPlugin)){x=x.replace(/^.*\s+(\S+\s+\S+$)/,"$1");AC[0]=parseInt(x.replace(/^(.*)\..*$/,"$1"),10);AC[1]=parseInt(x.replace(/^.*\.(.*)\s.*$/,"$1"),10);AC[2]=/r/.test(x)?parseInt(x.replace(/^.*r(.*)$/,"$1"),10):0}}else{if(typeof j.ActiveXObject!=b){var y=null,AB=false;try{y=new ActiveXObject(p+".7")}catch(t){try{y=new ActiveXObject(p+".6");AC=[6,0,21];y.AllowScriptAccess="always"}catch(t){if(AC[0]==6){AB=true}}if(!AB){try{y=new ActiveXObject(p)}catch(t){}}}if(!AB&&y){try{x=y.GetVariable("$version");if(x){x=x.split(" ")[1].split(",");AC=[parseInt(x[0],10),parseInt(x[1],10),parseInt(x[2],10)]}}catch(t){}}}}var AD=T.userAgent.toLowerCase(),r=T.platform.toLowerCase(),AA=/webkit/.test(AD)?parseFloat(AD.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):false,q=false,z=r?/win/.test(r):/win/.test(AD),w=r?/mac/.test(r):/mac/.test(AD);/*@cc_on q=true;@if(@_win32)z=true;@elif(@_mac)w=true;@end@*/return{w3cdom:v,pv:AC,webkit:AA,ie:q,win:z,mac:w}}();var L=function(){if(!h.w3cdom){return }f(H);if(h.ie&&h.win){try{K.write("<script id=__ie_ondomload defer=true src=//:><\/script>");J=C("__ie_ondomload");if(J){I(J,"onreadystatechange",S)}}catch(q){}}if(h.webkit&&typeof K.readyState!=b){Z=setInterval(function(){if(/loaded|complete/.test(K.readyState)){E()}},10)}if(typeof K.addEventListener!=b){K.addEventListener("DOMContentLoaded",E,null)}R(E)}();function S(){if(J.readyState=="complete"){J.parentNode.removeChild(J);E()}}function E(){if(e){return }if(h.ie&&h.win){var v=a("span");try{var u=K.getElementsByTagName("body")[0].appendChild(v);u.parentNode.removeChild(u)}catch(w){return }}e=true;if(Z){clearInterval(Z);Z=null}var q=o.length;for(var r=0;r<q;r++){o[r]()}}function f(q){if(e){q()}else{o[o.length]=q}}function R(r){if(typeof j.addEventListener!=b){j.addEventListener("load",r,false)}else{if(typeof K.addEventListener!=b){K.addEventListener("load",r,false)}else{if(typeof j.attachEvent!=b){I(j,"onload",r)}else{if(typeof j.onload=="function"){var q=j.onload;j.onload=function(){q();r()}}else{j.onload=r}}}}}function H(){var t=N.length;for(var q=0;q<t;q++){var u=N[q].id;if(h.pv[0]>0){var r=C(u);if(r){N[q].width=r.getAttribute("width")?r.getAttribute("width"):"0";N[q].height=r.getAttribute("height")?r.getAttribute("height"):"0";if(c(N[q].swfVersion)){if(h.webkit&&h.webkit<312){Y(r)}W(u,true)}else{if(N[q].expressInstall&&!A&&c("6.0.65")&&(h.win||h.mac)){k(N[q])}else{O(r)}}}}else{W(u,true)}}}function Y(t){var q=t.getElementsByTagName(Q)[0];if(q){var w=a("embed"),y=q.attributes;if(y){var v=y.length;for(var u=0;u<v;u++){if(y[u].nodeName=="DATA"){w.setAttribute("src",y[u].nodeValue)}else{w.setAttribute(y[u].nodeName,y[u].nodeValue)}}}var x=q.childNodes;if(x){var z=x.length;for(var r=0;r<z;r++){if(x[r].nodeType==1&&x[r].nodeName=="PARAM"){w.setAttribute(x[r].getAttribute("name"),x[r].getAttribute("value"))}}}t.parentNode.replaceChild(w,t)}}function k(w){A=true;var u=C(w.id);if(u){if(w.altContentId){var y=C(w.altContentId);if(y){M=y;l=w.altContentId}}else{M=G(u)}if(!(/%$/.test(w.width))&&parseInt(w.width,10)<310){w.width="310"}if(!(/%$/.test(w.height))&&parseInt(w.height,10)<137){w.height="137"}K.title=K.title.slice(0,47)+" - Flash Player Installation";var z=h.ie&&h.win?"ActiveX":"PlugIn",q=K.title,r="MMredirectURL="+j.location+"&MMplayerType="+z+"&MMdoctitle="+q,x=w.id;if(h.ie&&h.win&&u.readyState!=4){var t=a("div");x+="SWFObjectNew";t.setAttribute("id",x);u.parentNode.insertBefore(t,u);u.style.display="none";var v=function(){u.parentNode.removeChild(u)};I(j,"onload",v)}U({data:w.expressInstall,id:m,width:w.width,height:w.height},{flashvars:r},x)}}function O(t){if(h.ie&&h.win&&t.readyState!=4){var r=a("div");t.parentNode.insertBefore(r,t);r.parentNode.replaceChild(G(t),r);t.style.display="none";var q=function(){t.parentNode.removeChild(t)};I(j,"onload",q)}else{t.parentNode.replaceChild(G(t),t)}}function G(v){var u=a("div");if(h.win&&h.ie){u.innerHTML=v.innerHTML}else{var r=v.getElementsByTagName(Q)[0];if(r){var w=r.childNodes;if(w){var q=w.length;for(var t=0;t<q;t++){if(!(w[t].nodeType==1&&w[t].nodeName=="PARAM")&&!(w[t].nodeType==8)){u.appendChild(w[t].cloneNode(true))}}}}}return u}function U(AG,AE,t){var q,v=C(t);if(v){if(typeof AG.id==b){AG.id=t}if(h.ie&&h.win){var AF="";for(var AB in AG){if(AG[AB]!=Object.prototype[AB]){if(AB.toLowerCase()=="data"){AE.movie=AG[AB]}else{if(AB.toLowerCase()=="styleclass"){AF+=' class="'+AG[AB]+'"'}else{if(AB.toLowerCase()!="classid"){AF+=" "+AB+'="'+AG[AB]+'"'}}}}}var AD="";for(var AA in AE){if(AE[AA]!=Object.prototype[AA]){AD+='<param name="'+AA+'" value="'+AE[AA]+'" />'}}v.outerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'+AF+">"+AD+"</object>";i[i.length]=AG.id;q=C(AG.id)}else{if(h.webkit&&h.webkit<312){var AC=a("embed");AC.setAttribute("type",P);for(var z in AG){if(AG[z]!=Object.prototype[z]){if(z.toLowerCase()=="data"){AC.setAttribute("src",AG[z])}else{if(z.toLowerCase()=="styleclass"){AC.setAttribute("class",AG[z])}else{if(z.toLowerCase()!="classid"){AC.setAttribute(z,AG[z])}}}}}for(var y in AE){if(AE[y]!=Object.prototype[y]){if(y.toLowerCase()!="movie"){AC.setAttribute(y,AE[y])}}}v.parentNode.replaceChild(AC,v);q=AC}else{var u=a(Q);u.setAttribute("type",P);for(var x in AG){if(AG[x]!=Object.prototype[x]){if(x.toLowerCase()=="styleclass"){u.setAttribute("class",AG[x])}else{if(x.toLowerCase()!="classid"){u.setAttribute(x,AG[x])}}}}for(var w in AE){if(AE[w]!=Object.prototype[w]&&w.toLowerCase()!="movie"){F(u,w,AE[w])}}v.parentNode.replaceChild(u,v);q=u}}}return q}function F(t,q,r){var u=a("param");u.setAttribute("name",q);u.setAttribute("value",r);t.appendChild(u)}function X(r){var q=C(r);if(q&&(q.nodeName=="OBJECT"||q.nodeName=="EMBED")){if(h.ie&&h.win){if(q.readyState==4){B(r)}else{j.attachEvent("onload",function(){B(r)})}}else{q.parentNode.removeChild(q)}}}function B(t){var r=C(t);if(r){for(var q in r){if(typeof r[q]=="function"){r[q]=null}}r.parentNode.removeChild(r)}}function C(t){var q=null;try{q=K.getElementById(t)}catch(r){}return q}function a(q){return K.createElement(q)}function I(t,q,r){t.attachEvent(q,r);d[d.length]=[t,q,r]}function c(t){var r=h.pv,q=t.split(".");q[0]=parseInt(q[0],10);q[1]=parseInt(q[1],10)||0;q[2]=parseInt(q[2],10)||0;return(r[0]>q[0]||(r[0]==q[0]&&r[1]>q[1])||(r[0]==q[0]&&r[1]==q[1]&&r[2]>=q[2]))?true:false}function V(v,r){if(h.ie&&h.mac){return }var u=K.getElementsByTagName("head")[0],t=a("style");t.setAttribute("type","text/css");t.setAttribute("media","screen");if(!(h.ie&&h.win)&&typeof K.createTextNode!=b){t.appendChild(K.createTextNode(v+" {"+r+"}"))}u.appendChild(t);if(h.ie&&h.win&&typeof K.styleSheets!=b&&K.styleSheets.length>0){var q=K.styleSheets[K.styleSheets.length-1];if(typeof q.addRule==Q){q.addRule(v,r)}}}function W(t,q){var r=q?"visible":"hidden";if(e&&C(t)){C(t).style.visibility=r}else{V("#"+t,"visibility:"+r)}}function g(s){var r=/[\\\"<>\.;]/;var q=r.exec(s)!=null;return q?encodeURIComponent(s):s}var D=function(){if(h.ie&&h.win){window.attachEvent("onunload",function(){var w=d.length;for(var v=0;v<w;v++){d[v][0].detachEvent(d[v][1],d[v][2])}var t=i.length;for(var u=0;u<t;u++){X(i[u])}for(var r in h){h[r]=null}h=null;for(var q in swfobject){swfobject[q]=null}swfobject=null})}}();return{registerObject:function(u,q,t){if(!h.w3cdom||!u||!q){return }var r={};r.id=u;r.swfVersion=q;r.expressInstall=t?t:false;N[N.length]=r;W(u,false)},getObjectById:function(v){var q=null;if(h.w3cdom){var t=C(v);if(t){var u=t.getElementsByTagName(Q)[0];if(!u||(u&&typeof t.SetVariable!=b)){q=t}else{if(typeof u.SetVariable!=b){q=u}}}}return q},embedSWF:function(x,AE,AB,AD,q,w,r,z,AC){if(!h.w3cdom||!x||!AE||!AB||!AD||!q){return }AB+="";AD+="";if(c(q)){W(AE,false);var AA={};if(AC&&typeof AC===Q){for(var v in AC){if(AC[v]!=Object.prototype[v]){AA[v]=AC[v]}}}AA.data=x;AA.width=AB;AA.height=AD;var y={};if(z&&typeof z===Q){for(var u in z){if(z[u]!=Object.prototype[u]){y[u]=z[u]}}}if(r&&typeof r===Q){for(var t in r){if(r[t]!=Object.prototype[t]){if(typeof y.flashvars!=b){y.flashvars+="&"+t+"="+r[t]}else{y.flashvars=t+"="+r[t]}}}}f(function(){U(AA,y,AE);if(AA.id==AE){W(AE,true)}})}else{if(w&&!A&&c("6.0.65")&&(h.win||h.mac)){A=true;W(AE,false);f(function(){var AF={};AF.id=AF.altContentId=AE;AF.width=AB;AF.height=AD;AF.expressInstall=w;k(AF)})}}},getFlashPlayerVersion:function(){return{major:h.pv[0],minor:h.pv[1],release:h.pv[2]}},hasFlashPlayerVersion:c,createSWF:function(t,r,q){if(h.w3cdom){return U(t,r,q)}else{return undefined}},removeSWF:function(q){if(h.w3cdom){X(q)}},createCSS:function(r,q){if(h.w3cdom){V(r,q)}},addDomLoadEvent:f,addLoadEvent:R,getQueryParamValue:function(v){var u=K.location.search||K.location.hash;if(v==null){return g(u)}if(u){var t=u.substring(1).split("&");for(var r=0;r<t.length;r++){if(t[r].substring(0,t[r].indexOf("="))==v){return g(t[r].substring((t[r].indexOf("=")+1)))}}}return""},expressInstallCallback:function(){if(A&&M){var q=C(m);if(q){q.parentNode.replaceChild(M,q);if(l){W(l,true);if(h.ie&&h.win){M.style.display="block"}}M=null;l=null;A=false}}}}}();

// Name: External/omniture.online.js  Output: Normal

/* SiteCatalyst code version: H.14.
Copyright 1997-2007 Omniture, Inc. More info available at
http://www.omniture.com */
/* Specify the Report Suite ID(s) to track here */
var s_account="onlineindigocacomon,onlineindigoca";

// Indigo changes : start
//ppark diam : changed tracking server URLs  
var s_accountCommunity="onlineindigocacomon,onlineindigocacommunity";
var s_trackingServerCommunity="metric.chapters.indigo.ca";
var s_accountOnline=s_account;
var s_trackingServerOnline="metric.chapters.indigo.ca";
var s_trackingServerSecureOnline="metrics.chapters.indigo.ca";
// Indigo changes : end

var s=s_gi(s_account)
/************************** CONFIG SECTION **************************/
/* You may add or alter any code config here. */
s.charSet="UTF-8"
s.cookieDomainPeriods=3
/* Conversion Config */
s.currencyCode="CAD"
/* Link Tracking Config */
s.trackDownloadLinks=true
s.trackExternalLinks=true
s.trackInlineStats=true
s.linkDownloadFileTypes="exe,zip,wav,mp3,mov,mpg,avi,wmv,doc,pdf,xls"
s.linkInternalFilters="javascript:,www.chapters.ca,www.chapters.indigo.ca,chapters.indigo.ca,kiosk.indigo.ca,shop.chapters.indigo.ca,shop.kiosk.indigo.ca,library.indigo.ca,community.indigo.ca,downloads.indigo.ca"
s.linkLeaveQueryString=false
s.linkTrackVars="None"
s.linkTrackEvents="None"

/* Plugin Config */
/* DynamicObjectIDs config */
function s_getObjectID(o) {
	/* TODO: Add code to identify whether an objectID should be created,
	 *       parse the URLs and return objectID. If no objectID should
	 *       be created, return ''.
	 */
	var ID=o.href;
	return ID;
}
s.getObjectID=s_getObjectID

s.usePlugins=true
function s_doPlugins(s) {
	/* Add calls to plugins here */
	if(s_account.indexOf('community')>-1 && s.events.indexOf('event4')>-1)
		s.events = s.repl(s.events,'event4','event6');
	if(s.getQueryParam('s_kwcid'))
		s.pageURL=s.manageQueryParam('s_kwcid',1,1); // swap and encode for SearchCenter

	/* Add calls to plugins here */
	s.setupDynamicObjectIDs();
}
s.doPlugins=s_doPlugins

/************************** PLUGINS SECTION *************************/
/* You may insert any plugins you wish to use here.                 */

/*
 * DynamicObjectIDs v1.4: Setup Dynamic Object IDs based on URL 
	Modified to call setOIDs immediately rather than window onload, as this code already runs on window onload
 */
s.setupDynamicObjectIDs=new Function(""
+"var s=this;if(!s.doi){s.doi=1;if(s.apv>3&&(!s.isie||!s.ismac||s.apv>=5)){s.setOIDs();}s.wd.s_semaphore=1}");

/* original s.setupDynamicObjectIDs function
s.setupDynamicObjectIDsOrig=new Function(""
+"var s=this;if(!s.doi){s.doi=1;if(s.apv>3&&(!s.isie||!s.ismac||s.apv"
+">=5)){if(s.wd.attachEvent)s.wd.attachEvent('onload',s.setOIDs);else"
+" if(s.wd.addEventListener)s.wd.addEventListener('load',s.setOIDs,fa"
+"lse);else{s.doiol=s.wd.onload;s.wd.onload=s.setOIDs}}s.wd.s_semapho"
+"re=1}");
 */

s.setOIDs=new Function("e",""
+"var s=s_c_il["+s._in+"],b=s.eh(s.wd,'onload'),o='onclick',x,l,u,c,i"
+",a=new Array;if(s.doiol){if(b)s[b]=s.wd[b];s.doiol(e)}if(s.d.links)"
+"{for(i=0;i<s.d.links.length;i++){l=s.d.links[i];c=l[o]?''+l[o]:'';b"
+"=s.eh(l,o);z=l[b]?''+l[b]:'';u=s.getObjectID(l);if(u&&c.indexOf('s_"
+"objectID')<0&&z.indexOf('s_objectID')<0){u=s.repl(u,'\"','');u=s.re"
+"pl(u,'\\n','').substring(0,97);l.s_oc=l[o];a[u]=a[u]?a[u]+1:1;x='';"
+"if(c.indexOf('.t(')>=0||c.indexOf('.tl(')>=0||c.indexOf('s_gs(')>=0"
+")x='var x=\".tl(\";';x+='s_objectID=\"'+u+'_'+a[u]+'\";return this."
+"s_oc?this.s_oc(e):true';if(s.isns&&s.apv>=5)l.setAttribute(o,x);l[o"
+"]=new Function('e',x)}}}s.wd.s_semaphore=0;return true");

/************************** PLUGINS SECTION *************************/
/* Plugin Utility: Replace v1.0 */
s.repl=new Function("x","o","n",""
+"var i=x.indexOf(o),l=n.length;while(x&&i>=0){x=x.substring(0,i)+n+x."
+"substring(i+o.length);i=x.indexOf(o,i+l)}return x");
/* Plugin: getQueryParam 2.1 - return query string parameter(s) */
s.getQueryParam=new Function("p","d","u",""
+"var s=this,v='',i,t;d=d?d:'';u=u?u:(s.pageURL?s.pageURL:s.wd.locati"
+"on);if(u=='f')u=s.gtfs().location;while(p){i=p.indexOf(',');i=i<0?p"
+".length:i;t=s.p_gpv(p.substring(0,i),u+'');if(t)v+=v?d+t:t;p=p.subs"
+"tring(i==p.length?i:i+1)}return v");
s.p_gpv=new Function("k","u",""
+"var s=this,v='',i=u.indexOf('?'),q;if(k&&i>-1){q=u.substring(i+1);v"
+"=s.pt(q,'&','p_gvf',k)}return v");
s.p_gvf=new Function("t","k",""
+"if(t){var s=this,i=t.indexOf('='),p=i<0?t:t.substring(0,i),v=i<0?'T"
+"rue':t.substring(i+1);if(p.toLowerCase()==k.toLowerCase())return s."
+"epa(v)}return ''");
/* Plugin (H code): manageQueryParam 1.1 - swap parameters in query string */
s.manageQueryParam=new Function("p","w","e","u",""
+"var s=this,x,y,i,qs,qp,qv,f,b;u=u?u:(s.pageURL?s.pageURL:''+s.wd.lo"
+"cation);u=u=='f'?''+s.gtfs().location:u+'';x=u.indexOf('?');qs=x>-1"
+"?u.substring(x,u.length):'';u=x>-1?u.substring(0,x):u;x=qs.indexOf("
+"'?'+p+'=');if(x>-1){y=qs.indexOf('&');f='';if(y>-1){qp=qs.substring"
+"(x+1,y);b=qs.substring(y+1,qs.length);}else{qp=qs.substring(1,qs.le"
+"ngth);b='';}}else{x=qs.indexOf('&'+p+'=');if(x>-1){f=qs.substring(1"
+",x);b=qs.substring(x+1,qs.length);y=b.indexOf('&');if(y>-1){qp=b.su"
+"bstring(0,y);b=b.substring(y,b.length);}else{qp=b;b='';}}}if(e&&qp)"
+"{y=qp.indexOf('=');qv=y>-1?qp.substring(y+1,qp.length):'';qv=s.epa("
+"qv);qv=unescape(qv);qv=unescape(qv);i=qv.indexOf('|');if(i>-1){x=qv"
+".substring(0,i);qv=escape(x)+qv.substring(i);}else{qv=escape(qv)}qp"
+"=qp.substring(0,y+1)+qv;}if(w&&qp){if(f)qs='?'+qp+'&'+f+b;else if(b"
+")qs='?'+qp+'&'+b;else	qs='?'+qp}else if(f)qs='?'+f+'&'+qp+b;else if"
+"(b)qs='?'+qp+'&'+b;else qs='?'+qp;return u+qs");

/* WARNING: Changing any of the below variables will cause drastic
changes to how your visitor data is collected.  Changes should only be
made when instructed to do so by your account manager.*/
s.dc=112

// Indigo changes : start
s.trackingServer="metric.chapters.indigo.ca"
s.trackingServerSecure="metrics.chapters.indigo.ca"
// Indigo changes : end

/************* DO NOT ALTER ANYTHING BELOW THIS LINE ! **************/
var s_code='',s_objectID;function s_gi(un,pg,ss){var d="function s_dr"
+"(x,o,n){var i=x.indexOf(o);if(i>=0&&x.split)x=(x.split(o)).join(n);"
+"else while(i>=0){x=x.substring(0,i)+n+x.substring(i+o.length);i=x.i"
+"ndexOf(o)}return x}w.s_dr=s_dr;function s_d(x) {var t='`^@$#',l='01"
+"23456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz',d,n=0"
+",b,k,w,i=x.lastIndexOf('~~');if(i>0){d=x.substring(0,i);x=x.substri"
+"ng(i+2);while(d){w=d;i=d.indexOf('~');if(i>0){w=d.substring(0,i);d="
+"d.substring(i+1)}else d='';b=parseInt(n/62);k=n-b*62;k=t.substring("
+"b,b+1)+l.substring(k,k+1);x=s_dr(x,k,w);n++}for(i=0;i<5;i++){w=t.su"
+"bstring(i,i+1);x=s_dr(x,w+' ',w)}}return x}w.s_d=s_d;",c=".substrin"
+"g(~.indexOf(~return ~=fun`K(~){`Os=^u~`t $6~;$6~.toLowerCase()~`cFu"
+"n`K('e`s`Os=s_c_il['+@i+']~};s.~.length~.toUpperCase~`cObject~s.wd~"
+"t^D~.location~')q='~dynamicAccount~link~s.apv~ction~$l$X~)$6x^X!Obj"
+"ect||!Object.prototype||!Object.prototype[x])~@G^Al)@G^Al['+@i+'].m"
+"rq(\"'+un+'\")'~var ~s.pt(~ookieDomainPeriods~,`s,'~while(~);s.~.pr"
+"otocol~){$6~visitor~=''~:'')~;@F^Vs[k],255)}~s_c2f~javaEnabled~=new"
+" ~.lastIndexOf('~tm.get~@5\"$Qs.b.addBehavior('# default# ~onclick~"
+"ternalFilters~entElement~Name~javascriptVersion~=parseFloat(~cookie"
+"~parseInt(~s.^J~Type~o^joid~browser~','~else~referrer~colorDepth~St"
+"ring~.host~s.rep(~}catch(e){~r=s.m(f)?s[f](~}$6~s.un~s.eo~s.sq~t=s."
+"ot(o)~track~j='1.~)?'Y':'N'~$dURL~^jc_i~s.ismac~lugins~=='~;for(~Sa"
+"mpling~s.rc[un]~s.b.addEventListener~Download~tfs~resolution~.get@I"
+"()~s.eh~s.isie~s.vl_l~s.vl_t~Height~t,h){t=t?t~isopera~escape(~scre"
+"en.~s.fl(~harCode~&&(~variableProvider~s.gg('objectID')~&&s.~:'';h="
+"h?h~e&&l$kSESSION'~');~f',~_'+~Date~name~home$d~.s_~s.c_r(~s.rl[u~o"
+".href~Lifetime~Width~sEnabled~'){q='~b.attachEvent~&&l$kNONE'){~Ext"
+"ernalLinks~this~charSet~onerror~currencyCode~s=s_gi(~e$SElement~;s."
+"gl(s.vl_g~.parent~Array~lnk~Opera~eval(~Math.~s.fsg~s.ns6~docum~s.o"
+"un~conne~InlineStats~Track~'0123456789~s[k]=~window~onload~Time~s.e"
+"pa(~s.c_w(~o.type~(s.ssl~n=s.oid(o)~LeaveQuery~')>=~&&t~'=')~){n=~+"
+"1))~' '+~s.t()}~\",''),~=s.oh(o);~+(y<1900?~ingServer~s_gs~true~ses"
+"s~campaign~lif~;fun~,100)~s.co(~s._in~x in ~='s_~ffset~s.c_d~'&pe~s"
+".gv(~s.qav~s.pl~=(apn~sqs',q);~Year(~=s.n.app~&&!~(''+~(\")>=~)+'/~"
+"',s~s()+':'+~){p=~():''~a):f(~){v=s.n.~channel~if(~un)~.target~o.va"
+"lue~etscape~(ns?ns:~s_')t=t~omePage~++}~')<~){x~1);~e))~'+n~height~"
+"events~trk~random~code~un,~try{~'MSIE ~.src~INPUT'~floor(~s.pg~s.nu"
+"m(~s.ape(~s.c_gd~s.dc~.inner~transa~Events~page~.set~Group,~Match,~"
+".fromC~++){~?'':~!='~='+~(\")<~?'&~+';~(f){~>=5)~&&i>~[b](~=l[n];~~"
+"fun`K `ae$p`Ox`X,s=0,e,a,b,c;`S1){e=f`1'\"@z);b=f`1'\\\\',s);c=f`1"
+"\"\\n\",s)`6e<0||(b>=0&&b<$Ie=b`6e<0||(c>=0&&c<$Ie=c`6e>=0$G+=(e>s?"
+"f`0s,e)`Y+(e==c?'\\\\n':'\\\\'+f`0e,e@T;s=e+1}`t `2x+f`0s)}`2f}w.`a"
+"e=`ae@f`K `aa$p`Os=f`1'(')+1,e=f`1')'),a`X,c;`Ss>=0&&s<e){c=f`0s,s+"
+"1)`6c==`s)a+='\",\"';`5(\"\\n\\r\\t \")`1c)<0)a+=c;s$E`2a?'\"'+a+'"
+"\"':a}w.`aa=`ae@f`K `a(cc){cc`X+cc;`Ofc='`Of`cFun`K(@z=cc`1';',cc`1"
+"'{')),e=cc`d}'),o,a,d,q,c,f,h,x;fc+=`aa(cc)+',\"`Os`C;';c=cc`0s+1,e"
+");s=c`1'fun`K^d`Ss>=0){d=1;q`X;x=0;f=c`0s);a=`aa(f);e=o=c`1'{@z);e+"
+"+;`Sd>0){h=c`0e,e+1)`6q`Vh==q@vx)q`X`6h^D\\\\')x=x?0:1;`t x=0}`t{$6"
+"h^D\"'||h==\"'\")q=h`6h^D{')d++`6h^D}')d--^1d>0)e$Ec=c`00,s)+'new F"
+"un`K('+(a?a+`s`Y+'\"'+`ae(c`0o+1,$I+'\")'+c`0e+$Hs=c`1'fun`K')}fc+="
+"`ae(c)$o`2s\");';@5fc);`2f}w.`a=`a`6pg){fun`K s_co(o){`O^y\"_\",1,$"
+"H`2@ho)}w^jco=s_co@f`K @a($7{`O^y$P1,$H`2@Vw^jgs=@a@f`K s_dc($7{`O^"
+"y$P$H`2@Vw^jdc=s_dc;}fun`K s_c($Ppg,ss`4;s._c@kc';`D=@G`6!`D^An){`D"
+"^Al`c@2;`D^An=0;}s._il=`D^Al;@i=`D^An;s._il[@i]=s;`D^An++;s.m`3m){`"
+"2@wm)`1'{$F0`9fl`3x,l){`2x?@wx)`00,l):x`9co`3o`V!o)`2o;`On`C,x^E@jo"
+")$6x`1'select$F0&&x`1'filter$F0)n[x]=o[x];`2n`9num`3x$G`X+x^E`Op=0;"
+"p<x`A;p++)$6(@E')`1x`0p,p@T<0)`20;`21`9rep`3x,o,n){`Oi=x`1o);`Sx$r="
+"0$G=x`00,i)+n+x`0i+o`A);i=x`1o,i+n`A)}`2x`9ape`3x`4,h=@EABCDEF',i,c"
+"=s.^v,n,l,e,y`X;c=c?c`B$2`6x$G`X+x`6c^DAUTO'^X'').c^WAt){for(i=0;i<"
+"x`A;i$ic=x`0i,i+$Hn=x.c^WAt(i)`6n>127){l=0;e`X;`Sn||l<4){e=h`0n%16,"
+"n%16+1)+e;n=`nn/16);l$Ey+='%u'+e}`5c^D+')y+='%2B';`t y+=^Tc)}x=y}`t"
+"{x=x?`y^T''+x),'+`s%2B'):x`6x&&c^aem==1&&x`1'%u$F0&&x`1'%U$F0){i=x`"
+"1'%^d`Si>=0){i++`6h`08)`1x`0i,i+1)`B())>=0)`2x`00,i)+'u00'+x`0i);i="
+"x`1'%',i)}}}}`2x`9epa`3x`4;`2x?un^T`y''+x,'+`s ')):x`9pt`3x,d,f,a`4"
+",t=x,z=0,y,r;`St){y=t`1d);y=y<0?t`A:y;t=t`00,y);^0t,$3t,a)`6r)`2r;z"
+"+=y+d`A;t=x`0z,x`A);t=z<x`A?t:''}`2''`9isf`3t,a){`Oc=a`1':')`6c>=0)"
+"a=a`00,c)`6t`00,2)^D$C`02);`2(t!`X@Q==a)`9fsf`3t,a`4`6`Pa`Ris^et))@"
+"7+=(@7!`X?`s`Y+t;`20`9fs`3x,f`4;@7`X;`Px`Rfs^ef);`2@7`9c_d`X;$Yf`3t"
+",a`4`6!$Wt))`21;`20`9c_gd`3`4,d=`D`F`x^h,n=s.fpC`Q,p`6!n)n=s.c`Q`6d"
+"@v@m@Sn?`nn):2;n=n>2?n:2;p=d`d.')`6p>=0){`Sp>=0&&n>1$1d`d.',p-$Hn--"
+"}@m=p>0&&`Pd,'.`sc_gd^e0)?d`0p):d}}`2@m`9c_r`3k`4;k=$Xk);`Oc=@Us.d."
+"`m,i=c`1@Uk+@R,e=i<0?i:c`1';',i),v=i<0$j@Jc`0i+2+k`A,e<0?c`A:$I;`2v"
+"$k[[B]]'?v:''`9c_w`3k,v,e`4,d=$Y(),l=s.`m^n,t;v`X+v;l=l?@wl)`B$2`6^"
+"c^st=(v!`X?`nl?l:0):-60)`6t){e`c^g;e$e@I(e^L+(t*1000))}^1k^ss.d.`m="
+"k+'`Lv!`X?v:'[[B]]')$o path=/;'+(^c?' expires$le.toGMT`w()$o'`Y+(d?"
+"' domain$ld$o'`Y;`2^kk)==v}`20`9eh`3o,e,r,f`4,b='s^fe+'^f@i,n=-1,l,"
+"i,x`6!^Ml)^Ml`c@2;l=^Ml^Ei=0;i<l`A&&n<0;i++`Vl[i].o==o&&l[i].e==e)n"
+"=i^1n<0@Si;l[n]`C}x$tx.o=o;x.e=e;f=r?x.b:f`6r||f$G.b=r?0:o[e];x.o[e"
+"]=f^1x.b$G.o[b]=x.b;`2b}`20`9cet`3f,a,t,o,b`4,r`6`J>=5^X!s.^S||`J>="
+"7))@5'$Q^0$3a)`zr=s.m(t)?s[t](e):t(e)}^d`t{$6^B^au`1$R4@P0)r=s.m(b)"
+"?s$sa):b(a);`t{^M(`D,'^w',0,o);^0$3a`Teh(`D,'^w',1)}}`2r`9g^Jet`3e`"
+"4;`2`o`9g^Joe`8;^M(@G,\"^w\",1`Te^J=1;`Oc=s.t()`6c)s.d.write(c`Te^J"
+"=0;`2@b'`Tg^Jfb`3a){`2@G`9g^Jf`3w`4,p=w@1,l=w`F;`o=w`6p&&p`F!=l&&p`"
+"F`x==l`x){`o=p;`2s.g^Jf(`o)}`2`o`9g^J`3`4`6!`o){`o=`D`6!s.e^J)`o=s."
+"cet('g^J^e`o,'g^Jet@z.g^Joe,'g^Jfb')}`2`o`9mrq`3u`4,l=^l],n,r;^l]=0"
+"`6l)for(n=0;n<l`A;n$ir$ts.mr(0,0,r.t,r.u,r.r)}`9mr`3@c,q,ta,u,rs`4,"
+"dc=$Z,t1=s.^6@Z,t2=s.^6@ZSecure,ns=s.`W`jspace,un=u?u:$Bs.f$7,unc=`"
+"y$P'_`s-'),r`C,l,imn@ki^f($7,im,b,e`6!rs){rs='http'+@M?'s'`Y+'://'+"
+"(t1?@M@Q2?t2:t1):($B@M?'102':unc))+'.'+($Z?$Z:112)+'.2o7.net')@yb/s"
+"s/'+^2+'/1/H.14/'+@c+'?[AQB]&ndh=1'+(q?q`Y+'&[AQE]'`6^N@v^B`V`J>5.5"
+")rs=^Vrs,4095);`t rs=^Vrs,2047)}^1s.d.images&&`J>=3^X!s.^S||`J>=7)^"
+"X@8<0||`J>=6.1)`V!s.rc)s.rc`C`6!^G){^G=1`6!s.rl)s.rl`C;^ln]`c@2;set"
+"@Iout('$6`N,750)}`t{l=^ln]`6l){r.t=ta;r.u=un;r.r=rs;l[l`A]=r;`2''}i"
+"mn+='^f^G;^G$Eim=`D[imn]`6!im)im=`D[imn]`cImage;im^jl=0;im.@H`cFun`"
+"K('e`s^u^jl=1`6`N);im$S=rs`6rs`1@n=@P0^X!ta||ta^D_self'||ta^D_top'|"
+"|(`D.^h@Qa==`D.^h))){b=e`c^g;`S!im^jl&&e^L-b^L<500)e`c^g}`2''}`2'<i"
+"m'+'g sr'+'c=\"'+rs+'\" width=1 $K=1 border=0 alt=\"\">'`9gg`3v`4`6"
+"!`D['s^fv])`D['s^fv]`X;`2`D['s^fv]`9glf`3t,a`Vt`00,2)^D$C`02);`Os=^"
+"u,v=s.gg(t)`6v)s[t]=v`9gl`3v`4`6$V)`Pv`Rgl^e0)`9gv`3v`4;`2s['vpm^fv"
+"]?s['vpv^fv]:(s[v]?s[v]`Y`9havf`3t,a`4,b=t`00,4),x=t`04),n=`nx),k='"
+"g^ft,m='vpm^ft,q=t,v=s.`I@DVars,e=s.`I@D$c;@F@ot)`6s.@3||^3){v=v?v+"
+"`s+^O+`s+^O2:''`6v@v`Pv`Ris^et))s[k]`X`6`E$L'&&e)@Fs.fs(s[k],e)}s[m"
+"]=0`6`E`WID`Gvid';`5`E^9^qg'`Z`5`E`u^qr'`Z`5`Evmk`Gvmt';`5`E^v^qce'"
+"`6s[k]&&s[k]`B()^DAUTO')@F'ISO8859-1';`5s[k]^aem==2)@F'UTF-8'}`5`E`"
+"W`jspace`Gns';`5`Ec`Q`Gcdp';`5`E`m^n`Gcl';`5`E^Y`Gvvp';`5`E^x`Gcc';"
+"`5`E$5`Gch';`5`E$b`KID`Gxact';`5`E@d`Gv0';`5`E^K`Gs';`5`E`v`Gc';`5`"
+"E`k`Gj';`5`E`b`Gv';`5`E`m^p`Gk';`5`E`r^o`Gbw';`5`E`r^Q`Gbh';`5`E@B`"
+"K`p`Gct';`5`E^i`Ghp';`5`Ep^C`Gp';`5$Wx)`Vb^Dprop`Gc$J;`5b^DeVar`Gv$"
+"J;`5b^Dhier^qh$J`Z^1s[k]@Q$k`I`j'@Q$k`I`p')@p+='&'+q+'`Ls[k]);`2''`"
+"9hav`3`4;@p`X;`P^P`Rhav^e0);`2@p`9lnf`3^R`7^b`7:'';`Ote=t`1@R`6t@Qe"
+">0&&h`1t`0te@T>=0)`2t`00,te);`2''`9ln`3h`4,n=s.`I`js`6n)`2`Pn`Rln^e"
+"h);`2''`9ltdf`3^R`7^b`7:'';`Oqi=h`1'?^dh=qi>=0?h`00,qi):h`6t&&h`0h`"
+"A-(t`A@T^D.'+t)`21;`20`9ltef`3^R`7^b`7:''`6t&&h`1t)>=0)`21;`20`9lt`"
+"3h`4,lft=s.`I^IFile`ps,lef=s.`IEx`h,@e=s.`IIn`h;@e=@e?@e:`D`F`x^h;h"
+"=h`7`6s.^6^ILinks&&lft&&`Plft`Rltd^eh))`2'd'`6s.^6^t^Xlef||@e)^X!le"
+"f||`Plef`Rlte^eh))^X!@e||!`P@e`Rlte^eh)))`2'e';`2''`9lc`8,b=^M(^u,"
+"\"`g\"`T@3=@h^u`Tt(`T@3=0`6b)`2^u$se);`2@b'`Tbc`8,f`6s.d^ad.all^ad."
+"all.cppXYctnr)return;^3=^z?^z:e$8;@5\"$Q$6^3^X^3.tag`j||^3.par`i||^"
+"3@1Nod$I@Vcatch$p}\"`Teo=0'`Toh`3o`4,l=`D`F,h=^m?^m:'',i,j,k,p;i=h`"
+"1':^dj=h`1'?^dk=h`1'/')`6h^Xi<0||(j>=0$rj)||(k>=0$rk))$1o`U&&o`U`A>"
+"1?o`U:(l`U?l`U`Y;i=l.path^h`d/^dh=(p?p+'//'`Y+(o`x?o`x:(l`x?l`x`Y)+"
+"(h`00,1)$k/'?l.path^h`00,i<0?0:i@y'`Y+h}`2h`9ot`3o){`Ot=o.tag`j;t=t"
+"@Q`B?t`B$2`6`ESHAPE')t`X`6t`V`E$T&&@L&&@L`B)t=@L`B();`5^m)t='A';}`2"
+"t`9oid`3o`4,^5,p,c,n`X,x=0`6t@v`q$1o`U;c=o.`g`6^m^X`EA'||`EAREA')^X"
+"!c||!p||p`7`1'javascript$F0))n@X`5c@S`ys.rep(`ys.rep@wc,\"\\r@W\"\\"
+"n@W\"\\t@W' `s^dx=2}`5$9^X`E$T||`ESUBMIT')@S$9;x=3}`5o$S&&`EIMAGE')"
+"n=o$S`6n){`q=^Vn@g;`qt=x}}`2`q`9rqf`3t,un`4,e=t`1@R,u=e>=0?`s+t`00,"
+"e)+`s:'';`2u&&u`1`s+un+`s)>=0?@Jt`0e@T:''`9rq`3un`4,c=un`1`s),v=^k'"
+"s_sq'),q`X`6c<0)`2`Pv,'&`srq^e$7;`2`Pun`Rrq',0)`9sqp`3t,a`4,e=t`1@R"
+",q=e<0$j@Jt`0e+1)`Tsqq[q]`X`6e>=0)`Pt`00,e)`R@s`20`9sqs`3$Pq`4;^4u["
+"un]=q;`20`9sq`3q`4,k@ksq',v=^kk),x,c=0;^4q`C;^4u`C;^4q[q]`X;`Pv,'&`"
+"ssqp',0);`P^2`R@sv`X^E@j^4u`M)^4q[^4u[x]]+=(^4q[^4u[x]]?`s`Y+x^E@j^"
+"4q`M&&^4q[x]^Xx==q||c<2)){v+=(v$n'`Y+^4q[x]+'`Lx);c$E`2@Kk,v,0)`9wd"
+"l`8,r=@b,b=^M(`D,\"@H\"),i,o,oc`6b)r=^u$se)^Ei=0;i<s.d.`Is`A;i$io=s"
+".d.`Is[i];oc=o.`g?\"\"+o.`g:\"\"`6(oc`1\"@a$m0||oc`1\"^joc@x0)&&oc`"
+"1\".tl$m0)^M(o,\"`g\",0,s.lc);}`2r^d`Ds`3`4`6`J>3^X!^N||!^B||`J$q`V"
+"s.b^a^r)s.^r('`g@z.bc);`5s.b&&^H)^H('click@z.bc,false);`t ^M(`D,'@H"
+"',0,`Dl)}`9vs`3x`4,v=s.`W^F,g=s.`W^F$fk@kvsn^f^2+(g?'^fg`Y,n=^kk),e"
+"`c^g,y=e.get@t);e$e@ty+10@Y1900:0))`6v){v*=100`6!n`V!@Kk,x,$I`20;n="
+"x^1n%10000>v)`20}`21`9dyasmf`3t,m`Vt&&m&&m`1t)>=0)`21;`20`9dyasf`3t"
+",m`4,i=t?t`1@R:-1,n,x`6i>=0&&m){`On=t`00,i),x=t`0i+1)`6`Px`Rdyasm^e"
+"m))`2n}`20`9uns`3`4,x=s.`HSele`K,l=s.`HList,m=s.`H$gn,i;^2=^2`7`6x&"
+"&l`V!m)m=`D`F`x`6!m.toLowerCase)m`X+m;l=l`7;m=m`7;n=`Pl,';`sdyas^em"
+")`6n)^2=n}i=^2`1`s`Tfun=i<0?^2:^2`00,i)`9sa`3un`4;^2=un`6!@A)@A=un;"
+"`5(`s+@A+`s)`1$7<0)@A+=`s+un;^2s()`9t`3`4,$M=1,tm`c^g,sed=Math&&@6$"
+"N?@6$U@6$N()*10000000000000):`e@I(),@c='s'+@6$U`e@I()/10800000)%10+"
+"sed,y=`e@t),vt=`e^g(@y'+`eMonth(@y'@Yy+1900:y)+@U`eHour$0`eMinute$0"
+"`eSeconds()+@U`eDay()+@U`e@IzoneO@l(),^J=s.g^J(),ta`X,q`X,qs`X@0`Tu"
+"ns()`6!s.td){`Otl=^J`F,a,o,i,x`X,c`X,v`X,p`X,bw`X,bh`X,^70',k=@K's_"
+"cc`s@b',0^8,hp`X,ct`X,pn=0,ps`6`w&&`w.prototype){^71'`6j.match){^72"
+"'`6tm$eUTC^g){^73'`6^N&&^B&&`J$q^74'`6pn.toPrecision){^75';a`c@2`6a"
+".forEach){^76';i=0;o`C;@5'$Qi`cIterator(o)`z}')`6i&&i.next)^77'}}}}"
+"^1`J>=4)x=^Uwidth+'x'+^U$K`6s.isns||s.^S`V`J>=3$4`b(^8`6`J>=4){c=^U"
+"pixelDepth;bw=`D$a^o;bh=`D$a^Q}}@q=s.n.p^C}`5^N`V`J>=4$4`b(^8;c=^U`"
+"v`6`J$q{bw=s.d.@9`i.o@l^o;bh=s.d.@9`i.o@l^Q`6!^B^ab){`fh$D^dhp=s.b."
+"isH$D(tl^8`z}\");`fclientCaps^dct=s.b.@B`K`p`z}\")}}}`t r`X^1@q)`Sp"
+"n<@q`A&&pn<30){ps=^V@q[pn].^h@g$o'`6p`1ps)<0)p+=ps;pn$Es.^K=x;s.`v="
+"c;s.`k=j;s.`b=v;s.`m^p=k;s.`r^o=bw;s.`r^Q=bh;s.@B`K`p=ct;s.^i=hp;s."
+"p^C=p;s.td=1^1s.useP^C)s.doP^C(s);`Ol=`D`F,r=^J.@9ent.`u`6!s.^9)s.^"
+"9=l`6!s.`u)s.`u=r`6s.@3||^3){`Oo=^3?^3:s.@3`6!o)`2'';`Op=@o'$d`j'),"
+"w=1,^5,@N,x=`qt,h,l,i,oc`6^3&&o==^3){`So@vn@Q$kBODY'){o=o.par`i?o.p"
+"ar`i:o@1Node`6!o)`2'';^5;@N;x=`qt}oc=o.`g?''+o.`g:''`6(oc`1\"@a@x0&"
+"&oc`1\"^joc$m0)||oc`1\".tl@x0)`2''}ta=n?o$8:1;h@Xi=h`1'?^dh=s.`I@O`"
+"w||i<0?h:h`00,i);l=s.`I`j?s.`I`j:s.ln(h);t=s.`I`p?s.`I`p`7:s.lt(h)`"
+"6t^Xh||l))q+=@n=@3^f(`Ed'||`Ee'?$Xt):'o')+(h?@nv1`Lh)`Y+(l?@nv2`Ll)"
+"`Y;`t $M=0`6s.^6@C`V!p$1@o'^9^dw=0}^5;i=o.sourceIndex`6^Z@S^Z;x=1;i"
+"=1^1p&&n@Q)qs='&pid`L^Vp,255))+(w$npidt$lw`Y+'&oid`L^Vn@g)+(x$noidt"
+"$lx`Y+'&ot`Lt)+(i$noi$li`Y}^1!$M@vqs)`2''`6s.p_r)s.p_r();`O$O`X`6$M"
+"^avs(sed))$O=s.mr(@c,(vt$nt`Lvt)`Y+s.hav()+q+(qs?qs:s.rq(^2)),ta`Ts"
+"q($M$jqs`T@3=^3=s.`I`j=s.`I`p=`D^jobjectID=s.ppu`X`6$V)`D^j@3=`D^je"
+"o=`D^j`I`j=`D^j`I`p`X;`2$O`9tl`3o,t,n`4;s.@3=@ho`T`I`p=t;s.`I`j=n;s"
+".t()`9ssl=(`D`F`U`7`1'https@P0`Td=@9ent;s.b=s.d.body;s.n=navigator;"
+"s.u=s.n.userAgent;@8=s.u`1'N$A6/^d`Oapn@u`j,v@uVersion,ie=v`1$R'),o"
+"=s.u`1'@4 '),i`6v`1'@4@P0||o>0)apn='@4';^N@r^DMicrosoft Internet Ex"
+"plorer'`Tisns@r^DN$A'`T^S@r^D@4'`Tismac=(s.u`1'Mac@P0)`6o>0)`J`ls.u"
+"`0o+6));`5ie>0){`J=`ni=v`0ie+5))`6`J>3)`J`li)}`5@8>0)`J`ls.u`0@8+10"
+"));`t `J`lv`Tem=0`6`w$h^W){i=^T`w$h^W(256))`B(`Tem=(i^D%C4%80'?2:(i"
+"^D%U0100'?1:0))}s.sa(un`Tvl_l='`WID,vmk,ppu,^v,`W`jspace,c`Q,`m^n,$"
+"d`j,^9,`u,^x';^P=^O+',^Y,$5,server,$d`p,$b`KID,purchaseID,@d,state,"
+"zip,$L,products,`I`j,`I`p'^E`On=1;n<51;n++)^P+=',prop$J+',eVar$J+',"
+"hier$J;^O2='^K,`v,`k,`b,`m^p,`r^o,`r^Q,@B`K`p,^i,p^C';^P+=`s+^O2;s."
+"vl_g=^P+',`W^F,`W^F$f`HSele`K,`HList,`H$g^6^ILinks,^6^t,^6@C,`I@O`w"
+",`I^IFile`ps,`IEx`h,`IIn`h,`I@DVars,`I@D$c,`I`js,@3';$V=pg@0)`6!ss)"
+"`Ds()}",
w=window,l=w.s_c_il,n=navigator,u=n.userAgent,v=n.appVersion,e=
v.indexOf('MSIE '),m=u.indexOf('Netscape6/'),a,i,s;if(un){un=
un.toLowerCase();if(l)for(i=0;i<l.length;i++){s=l[i];if(s._c=='s_c'){
if(s.oun==un)return s;else if(s.fs(s.oun,un)){s.sa(un);return s}}}}
eval(d);c=s_d(c);i=c.indexOf("function s_c(");eval(c.substring(0,i))
if(!un)return 0;c=c.substring(i);if(e>0){a=parseInt(i=v.substring(e
+5));if(a>3)a=parseFloat(i)}else if(m>0)a=parseFloat(u.substring(m+10)
);else a=parseFloat(v);if(a>=5&&v.indexOf('Opera')<0&&u.indexOf(
'Opera')<0){eval(c);return new s_c(un,pg,ss)}else s=s_c2f(c);return s(
un,pg,ss)}s_gi();

// Name: http://www.google-analytics.com/ga.js  Output: External

(function(){var aa="_gat",s="_gaq",v=true,w=false,x=undefined,ba="4.5.9",z="length",A="cookie",C="location",D="&",E="=",F="__utma=",H="__utmb=",I="__utmc=",ca="__utmk=",K="__utmv=",L="__utmz=",M="__utmx=",da="GASO=";var N=function(f){return x==f||"-"==f||""==f},ea=function(f){return f[z]>0&&" \n\r\t".indexOf(f)>-1},Q=function(f,i,b){var j="-",c;if(!N(f)&&!N(i)&&!N(b)){c=f.indexOf(i);if(c>-1){b=f.indexOf(b,c);if(b<0)b=f[z];j=P(f,c+i.indexOf(E)+1,b)}}return j},fa=function(f){var i=w,b=0,j,c;if(!N(f)){i=v;for(j=0;j<f[z];j++){c=f.charAt(j);b+="."==c?1:0;i=i&&b<=1&&(0==j&&"-"==c||".0123456789".indexOf(c)>-1)}}return i},R=function(f,i){var b=encodeURIComponent;return b instanceof Function?i?encodeURI(f):b(f):escape(f)},
T=function(f,i){var b=decodeURIComponent,j;f=f.split("+").join(" ");if(b instanceof Function)try{j=i?decodeURI(f):b(f)}catch(c){j=unescape(f)}else j=unescape(f);return j},U=function(f,i){return f.indexOf(i)>-1},V=function(f,i){f[f[z]]=i},W=function(f){return f.toLowerCase()},X=function(f,i){return f.split(i)},ga=function(f,i){return f.indexOf(i)},P=function(f,i,b){b=x==b?f[z]:b;return f.substring(i,b)},ia=function(f,i){return f.join(i)},ja=function(f){var i=1,b=0,j;if(!N(f)){i=0;for(j=f[z]-1;j>=0;j--){b=
f.charCodeAt(j);i=(i<<6&268435455)+b+(b<<14);b=i&266338304;i=b!=0?i^b>>21:i}}return i},ka=function(){var f=window,i=x;if(f&&f.gaGlobal&&f.gaGlobal.hid)i=f.gaGlobal.hid;else{i=Y();f.gaGlobal=f.gaGlobal?f.gaGlobal:{};f.gaGlobal.hid=i}return i},Y=function(){return Math.round(Math.random()*2147483647)},Z={Ha:function(f,i){this.bb=f;this.nb=i},t:63072000000,ib:w,_gasoDomain:x,_gasoCPath:x};Z.Gb=function(){var f=this,i=Z.Ha;function b(c){return new i(c[0],c[1])}function j(c){var p=[];c=c.split(",");var m;for(m=0;m<c.length;++m)p.push(b(c[m].split(":")));return p}f.Ia="utm_campaign";f.Ja="utm_content";f.Ka="utm_id";f.La="utm_medium";f.Ma="utm_nooverride";f.Na="utm_source";f.Oa="utm_term";f.Pa="gclid";f.ba=0;f.z=0;f.Ya="15768000";f.sb="1800";f.ta=[];f.va=[];f.nc="cse";f.oc="q";f.ob=5;f.T=j("images.google:q,google:q,yahoo:p,msn:q,bing:q,aol:query,aol:encquery,lycos:query,ask:q,altavista:q,netscape:query,cnn:query,looksmart:qt,about:terms,mamma:query,alltheweb:q,gigablast:q,voila:rdata,virgilio:qs,live:q,baidu:wd,alice:qs,yandex:text,najdi:q,aol:q,club-internet:query,mama:query,seznam:q,search:q,wp:szukaj,onet:qt,netsprint:q,google.interia:q,szukacz:q,yam:k,pchome:q,kvasir:q,sesam:q,ozu:q,terra:query,nostrum:query,mynet:q,ekolay:q,search.ilse:search_for,rambler:words");
f.u=x;f.lb=w;f.h="/";f.U=100;f.oa="/__utm.gif";f.ga=1;f.ha=1;f.v="|";f.fa=1;f.da=1;f.Ra=1;f.b="auto";f.I=1;f.ra=1000;f.Jc=10;f.Pb=10;f.Kc=0.2;f.o=x;f.a=document;f.e=window};Z.Hb=function(f){var i=this,b=f;i.r=(new Date).getTime();var j=[F,H,I,L,K,M,da];function c(k,n,r,a){var d="",l=0;d=Q(k,"2"+n,";");if(!N(d)){k=d.indexOf("^"+r+".");if(k<0)return["",0];d=P(d,k+r[z]+2);if(d.indexOf("^")>0)d=d.split("^")[0];r=d.split(":");d=r[1];l=parseInt(r[0],10);if(!a&&l<i.r)d=""}if(N(d))d="";return[d,l]}i.k=function(){var k=b.a[A];return b.o?i.Wb(k,b.o):k};i.Wb=function(k,n){var r=[],a,d;for(a=0;a<j[z];a++){d=c(k,j[a],n)[0];N(d)||(r[r[z]]=j[a]+d+";")}return r.join("")};i.l=function(k,
n,r){var a=r>0?h(r):"";if(b.o){n=i.kc(b.a[A],k,b.o,n,r);k="2"+k;a=e(r)}q(k+n,a)};i.kc=function(k,n,r,a,d){var l="";d=p(d);a=m([a,i.r+d*1],r);l=Q(k,"2"+n,";");if(!N(l)){k=m(c(k,n,r,v),r);l=ia(l.split(k),"");return l=a+l}return a};function p(k){return k||Z.t}function m(k,n){return"^"+ia([[n,k[1]].join("."),k[0]],":")}function q(k,n){b.a[A]=k+"; path="+b.h+"; "+n+i.fb()}i.fb=function(){return N(b.b)?"":"domain="+b.b+";"};function e(k){return k>0?g():""}function g(){return h(Z.t)}function h(k){var n=
new Date;k=new Date(n.getTime()+k);return"expires="+k.toGMTString()+"; "}};Z.$=function(f){var i,b,j,c,p,m,q,e=this,g,h=f;e.j=new Z.Hb(f);function k(a){a=a instanceof Array?a.join("."):"";return N(a)?"-":a}function n(a,d){var l=[];if(!N(a)){l=a.split(".");if(d)for(a=0;a<l[z];a++)fa(l[a])||(l[a]="-")}return l}function r(a,d,l){var t=e.M,o,u;for(o=0;o<t[z];o++){u=t[o][0];u+=N(d)?d:d+t[o][4];t[o][2](Q(a,u,l))}}e.kb=function(){return x==g||g==e.P()};e.k=function(){return e.j.k()};e.ma=function(){return p?p:"-"};e.vb=function(a){p=a};e.za=function(a){g=fa(a)?a*1:"-"};e.la=function(){return k(m)};
e.Aa=function(a){m=n(a)};e.Vb=function(){e.j.l(K,"",-1)};e.lc=function(){return g?g:"-"};e.fb=function(){return N(h.b)?"":"domain="+h.b+";"};e.ja=function(){return k(i)};e.tb=function(a){i=n(a,1)};e.C=function(){return k(b)};e.ya=function(a){b=n(a,1)};e.ka=function(){return k(j)};e.ub=function(a){j=n(a,1)};e.na=function(){return k(c)};e.wb=function(a){c=n(a);for(a=0;a<c[z];a++)if(a<4&&!fa(c[a]))c[a]="-"};e.fc=function(){return q};e.Dc=function(a){q=a};e.Sb=function(){i=[];b=[];j=[];c=[];p=x;m=[];
g=x};e.P=function(){var a="",d;for(d=0;d<e.M[z];d++)a+=e.M[d][1]();return ja(a)};e.ua=function(a){var d=e.k(),l=w;if(d){r(d,a,";");e.za(e.P());l=v}return l};e.zc=function(a){r(a,"",D);e.za(Q(a,ca,D))};e.Hc=function(){var a=e.M,d=[],l;for(l=0;l<a[z];l++)V(d,a[l][0]+a[l][1]());V(d,ca+e.P());return d.join(D)};e.Nc=function(a,d){var l=e.M,t=h.h;e.ua(a);h.h=d;for(a=0;a<l[z];a++)N(l[a][1]())||l[a][3]();h.h=t};e.Cb=function(){e.j.l(F,e.ja(),Z.t)};e.Ea=function(){e.j.l(H,e.C(),h.sb*1000)};e.Db=function(){e.j.l(I,
e.ka(),0)};e.Ga=function(){e.j.l(L,e.na(),h.Ya*1000)};e.Eb=function(){e.j.l(M,e.ma(),Z.t)};e.Fa=function(){e.j.l(K,e.la(),Z.t)};e.Oc=function(){e.j.l(da,e.fc(),0)};e.M=[[F,e.ja,e.tb,e.Cb,"."],[H,e.C,e.ya,e.Ea,""],[I,e.ka,e.ub,e.Db,""],[M,e.ma,e.vb,e.Eb,""],[L,e.na,e.wb,e.Ga,"."],[K,e.la,e.Aa,e.Fa,"."]]};Z.Kb=function(f){var i=this,b=f,j=new Z.$(b),c=function(){},p=function(m){var q=(new Date).getTime(),e;e=(q-m[3])*(b.Kc/1000);if(e>=1){m[2]=Math.min(Math.floor(m[2]*1+e),b.Pb);m[3]=q}return m};i.H=function(m,q,e,g,h,k){var n,r=b.I,a=b.a[C];j.ua(e);n=X(j.C(),".");if(n[1]<500||g){if(h)n=p(n);if(g||!h||n[2]>=1){if(!g&&h)n[2]=n[2]*1-1;n[1]=n[1]*1+1;m="?utmwv="+ba+"&utmn="+Y()+(N(a.hostname)?"":"&utmhn="+R(a.hostname))+(b.U==100?"":"&utmsp="+R(b.U))+m;if(0==r||2==r){g=2==r?c:k||c;i.$a(b.oa+m,g)}if(1==
r||2==r){m=("https:"==a.protocol?"https://ssl.google-analytics.com/__utm.gif":"http://www.google-analytics.com/__utm.gif")+m+"&utmac="+q+"&utmcc="+i.ac(e);if(la)m+="&gaq=1";i.$a(m,k)}}}j.ya(n.join("."));j.Ea()};i.$a=function(m,q){var e=new Image(1,1);e.src=m;e.onload=function(){e.onload=null;(q||c)()}};i.ac=function(m){var q=[],e=[F,L,K,M],g,h=j.k(),k;for(g=0;g<e[z];g++){k=Q(h,e[g]+m,";");if(!N(k)){if(e[g]==K){k=X(k.split(m+".")[1],"|")[0];if(N(k))continue;k=m+"."+k}V(q,e[g]+k+";")}}return R(q.join("+"))}};Z.n=function(){var f=this;f.Y=[];f.hb=function(i){var b,j=f.Y,c;for(c=0;c<j.length;c++)b=i==j[c].q?j[c]:b;return b};f.Ob=function(i,b,j,c,p,m,q,e){var g=f.hb(i);if(x==g){g=new Z.n.Mb(i,b,j,c,p,m,q,e);V(f.Y,g)}else{g.Qa=b;g.Ab=j;g.zb=c;g.xb=p;g.Wa=m;g.yb=q;g.Za=e}return g}};Z.n.Lb=function(f,i,b,j,c,p){var m=this;m.Bb=f;m.Ba=i;m.D=b;m.Ua=j;m.pb=c;m.qb=p;m.Ca=function(){return"&"+["utmt=item","tid="+R(m.Bb),"ipc="+R(m.Ba),"ipn="+R(m.D),"iva="+R(m.Ua),"ipr="+R(m.pb),"iqt="+R(m.qb)].join("&utm")}};
Z.n.Mb=function(f,i,b,j,c,p,m,q){var e=this;e.q=f;e.Qa=i;e.Ab=b;e.zb=j;e.xb=c;e.Wa=p;e.yb=m;e.Za=q;e.R=[];e.Nb=function(g,h,k,n,r){var a=e.gc(g),d=e.q;if(x==a)V(e.R,new Z.n.Lb(d,g,h,k,n,r));else{a.Bb=d;a.Ba=g;a.D=h;a.Ua=k;a.pb=n;a.qb=r}};e.gc=function(g){var h,k=e.R,n;for(n=0;n<k.length;n++)h=g==k[n].Ba?k[n]:h;return h};e.Ca=function(){return"&"+["utmt=tran","id="+R(e.q),"st="+R(e.Qa),"to="+R(e.Ab),"tx="+R(e.zb),"sp="+R(e.xb),"ci="+R(e.Wa),"rg="+R(e.yb),"co="+R(e.Za)].join("&utmt")}};Z.Fb=function(f){var i=f,b=i.e,j=this,c="-";j.V=b.screen;j.Sa=!j.V&&b.java?java.awt.Toolkit.getDefaultToolkit():x;j.d=b.navigator;j.W=c;j.xa=c;j.Va=c;j.qa=c;j.pa=1;j.eb=c;function p(){var m,q,e;q="ShockwaveFlash";var g="$version",h=j.d?j.d.plugins:x;if(h&&h[z]>0)for(m=0;m<h[z]&&!e;m++){q=h[m];if(U(q.name,"Shockwave Flash"))e=q.description.split("Shockwave Flash ")[1]}else{q=q+"."+q;try{m=new ActiveXObject(q+".7");e=m.GetVariable(g)}catch(k){}if(!e)try{m=new ActiveXObject(q+".6");e="WIN 6,0,21,0";
m.AllowScriptAccess="always";e=m.GetVariable(g)}catch(n){}if(!e)try{m=new ActiveXObject(q);e=m.GetVariable(g)}catch(r){}if(e){e=X(e.split(" ")[1],",");e=e[0]+"."+e[1]+" r"+e[2]}}return e?e:c}j.bc=function(){var m;if(b.screen){j.W=j.V.width+"x"+j.V.height;j.xa=j.V.colorDepth+"-bit"}else if(j.Sa)try{m=j.Sa.getScreenSize();j.W=m.width+"x"+m.height}catch(q){}j.qa=W(j.d&&j.d.language?j.d.language:j.d&&j.d.browserLanguage?j.d.browserLanguage:c);j.pa=j.d&&j.d.javaEnabled()?1:0;j.eb=i.ha?p():c;j.Va=R(i.a.characterSet?
i.a.characterSet:i.a.charset?i.a.charset:c)};j.Ic=function(){return D+"utm"+["cs="+R(j.Va),"sr="+j.W,"sc="+j.xa,"ul="+j.qa,"je="+j.pa,"fl="+R(j.eb)].join("&utm")};j.$b=function(){var m=i.a,q=b.history[z];m=j.d.appName+j.d.version+j.qa+j.d.platform+j.d.userAgent+j.pa+j.W+j.xa+(m[A]?m[A]:"")+(m.referrer?m.referrer:"");for(var e=m[z];q>0;)m+=q--^e++;return ja(m)}};Z.m=function(f,i,b,j){var c=j,p=this;p.c=f;p.rb=i;p.r=b;function m(g){return N(g)||"0"==g||!U(g,"://")}function q(g){var h="";g=W(g.split("://")[1]);if(U(g,"/")){g=g.split("/")[1];if(U(g,"?"))h=g.split("?")[0]}return h}function e(g){var h="";h=W(g.split("://")[1]);if(U(h,"/"))h=h.split("/")[0];return h}p.ic=function(g){var h=p.gb();return new Z.m.w(Q(g,c.Ka+E,D),Q(g,c.Na+E,D),Q(g,c.Pa+E,D),p.Q(g,c.Ia,"(not set)"),p.Q(g,c.La,"(not set)"),p.Q(g,c.Oa,h&&!N(h.K)?T(h.K):x),p.Q(g,c.Ja,x))};p.jb=function(g){var h=
e(g),k=q(g);if(U(h,"google")){g=g.split("?").join(D);if(U(g,D+c.oc+E))if(k==c.nc)return v}return w};p.gb=function(){var g,h=p.rb,k,n,r=c.T;if(!(m(h)||p.jb(h))){g=e(h);for(k=0;k<r[z];k++){n=r[k];if(U(g,W(n.bb))){h=h.split("?").join(D);if(U(h,D+n.nb+E)){g=h.split(D+n.nb+E)[1];if(U(g,D))g=g.split(D)[0];return new Z.m.w(x,n.bb,x,"(organic)","organic",g,x)}}}}};p.Q=function(g,h,k){g=Q(g,h+E,D);return k=!N(g)?T(g):!N(k)?k:"-"};p.uc=function(g){var h=c.ta,k=w,n;if(g&&"organic"==g.S){g=W(T(g.K));for(n=0;n<
h[z];n++)k=k||W(h[n])==g}return k};p.hc=function(){var g="",h="";g=p.rb;if(!(m(g)||p.jb(g))){g=g.split("://")[1];if(U(g,"/")){h=P(g,g.indexOf("/"));h=h.split("?")[0];g=W(g.split("/")[0])}if(0==g.indexOf("www."))g=P(g,4);return new Z.m.w(x,g,x,"(referral)","referral",x,h)}};p.Xb=function(g){var h="";if(c.ba){h=g&&g.hash?g.href.substring(g.href.indexOf("#")):"";h=""!=h?h+D:h}h+=g.search;return h};p.dc=function(){return new Z.m.w(x,"(direct)",x,"(direct)","(none)",x,x)};p.vc=function(g){var h=w,k,n=
c.va;if(g&&"referral"==g.S){g=W(R(g.X));for(k=0;k<n[z];k++)h=h||U(g,W(n[k]))}return h};p.L=function(g){return x!=g&&g.mb()};p.cc=function(g,h){var k="",n="-",r,a=0,d,l,t=p.c;if(!g)return"";l=g.k();k=p.Xb(c.a[C]);if(c.z&&g.kb()){n=g.na();if(!N(n)&&!U(n,";")){g.Ga();return""}}n=Q(l,L+t+".",";");r=p.ic(k);if(p.L(r)){k=Q(k,c.Ma+E,D);if("1"==k&&!N(n))return""}if(!p.L(r)){r=p.gb();if(!N(n)&&p.uc(r))return""}if(!p.L(r)&&h){r=p.hc();if(!N(n)&&p.vc(r))return""}if(!p.L(r))if(N(n)&&h)r=p.dc();if(!p.L(r))return"";
if(!N(n)){a=n.split(".");d=new Z.m.w;d.Zb(a.slice(4).join("."));d=W(d.Da())==W(r.Da());a=a[3]*1}if(!d||h){h=Q(l,F+t+".",";");l=h.lastIndexOf(".");h=l>9?P(h,l+1)*1:0;a++;h=0==h?1:h;g.wb([t,p.r,h,a,r.Da()].join("."));g.Ga();return D+"utmcn=1"}else return D+"utmcr=1"}};
Z.m.w=function(f,i,b,j,c,p,m){var q=this;q.q=f;q.X=i;q.ea=b;q.D=j;q.S=c;q.K=p;q.Xa=m;q.Da=function(){var e=[],g=[["cid",q.q],["csr",q.X],["gclid",q.ea],["ccn",q.D],["cmd",q.S],["ctr",q.K],["cct",q.Xa]],h,k;if(q.mb())for(h=0;h<g[z];h++)if(!N(g[h][1])){k=g[h][1].split("+").join("%20");k=k.split(" ").join("%20");V(e,"utm"+g[h][0]+E+k)}return e.join("|")};q.mb=function(){return!(N(q.q)&&N(q.X)&&N(q.ea))};q.Zb=function(e){var g=function(h){return T(Q(e,"utm"+h+E,"|"))};q.q=g("cid");q.X=g("csr");q.ea=g("gclid");
q.D=g("ccn");q.S=g("cmd");q.K=g("ctr");q.Xa=g("cct")}};Z.Ib=function(f,i,b,j){var c=this,p=i,m=E,q=f,e=j;c.O=b;c.sa="";c.p={};c.tc=function(){var h;h=X(Q(c.O.k(),K+p+".",";"),p+".")[1];if(!N(h)){h=h.split("|");g(1,c.p,h[1]);c.sa=h[0];c.Z()}};c.Z=function(){c.Qb();var h=c.sa,k,n,r="";for(k in c.p)if((n=c.p[k])&&1===n[2])r+=k+m+n[0]+m+n[1]+m+1+",";N(r)||(h+="|"+r);if(N(h))c.O.Vb();else{c.O.Aa(p+"."+h);c.O.Fa()}};c.Ec=function(h){c.sa=h;c.Z()};c.Cc=function(h,k,n,r){if(1!=r&&2!=r&&3!=r)r=3;var a=w;if(k&&n&&h>0&&h<=q.ob){k=R(k);n=R(n);if(k[z]+n[z]<=64){c.p[h]=
[k,n,r];c.Z();a=v}}return a};c.mc=function(h){if((h=c.p[h])&&1===h[2])return h[1]};c.Ub=function(h){var k=c.p;if(k[h]){delete k[h];c.Z()}};c.Qb=function(){e._clearKey(8);e._clearKey(9);e._clearKey(11);var h=c.p,k,n;for(n in h)if(k=h[n]){e._setKey(8,n,k[0]);e._setKey(9,n,k[1]);(k=k[2])&&3!=k&&e._setKey(11,n,""+k)}};function g(h,k,n){var r;if(!N(n)){n=n.split(",");for(var a=0;a<n[z];a++){r=n[a];if(!N(r)){r=r.split(m);if(r[z]==4)k[r[0]]=[r[1],r[2],h]}}}}};Z.N=function(){var f=this,i={},b="k",j="v",c=[b,j],p="(",m=")",q="*",e="!",g="'",h={};h[g]="'0";h[m]="'1";h[q]="'2";h[e]="'3";var k=1;function n(o,u,y,B){if(x==i[o])i[o]={};if(x==i[o][u])i[o][u]=[];i[o][u][y]=B}function r(o,u,y){return x!=i[o]&&x!=i[o][u]?i[o][u][y]:x}function a(o,u){if(x!=i[o]&&x!=i[o][u]){i[o][u]=x;u=v;var y;for(y=0;y<c[z];y++)if(x!=i[o][c[y]]){u=w;break}if(u)i[o]=x}}function d(o){var u="",y=w,B,O;for(B=0;B<c[z];B++){O=o[c[B]];if(x!=O){if(y)u+=c[B];u+=l(O);y=w}else y=v}return u}
function l(o){var u=[],y,B;for(B=0;B<o[z];B++)if(x!=o[B]){y="";if(B!=k&&x==o[B-1])y+=B.toString()+e;y+=t(o[B]);V(u,y)}return p+u.join(q)+m}function t(o){var u="",y,B,O;for(y=0;y<o[z];y++){B=o.charAt(y);O=h[B];u+=x!=O?O:B}return u}f.qc=function(o){return x!=i[o]};f.G=function(){var o="",u;for(u in i)if(x!=i[u])o+=u.toString()+d(i[u]);return o};f.Ac=function(o){if(o==x)return f.G();var u=o.G(),y;for(y in i)if(x!=i[y]&&!o.qc(y))u+=y.toString()+d(i[y]);return u};f._setKey=function(o,u,y){if(typeof y!=
"string")return w;n(o,b,u,y);return v};f._setValue=function(o,u,y){if(typeof y!="number"&&(x==Number||!(y instanceof Number))||Math.round(y)!=y||y==NaN||y==Infinity)return w;n(o,j,u,y.toString());return v};f._getKey=function(o,u){return r(o,b,u)};f._getValue=function(o,u){return r(o,j,u)};f._clearKey=function(o){a(o,b)};f._clearValue=function(o){a(o,j)}};Z.Jb=function(f,i){var b=this;b.Qc=i;b.xc=f;b._trackEvent=function(j,c,p){return i._trackEvent(b.xc,j,c,p)}};Z.aa=function(f,i){var b=this,j=x,c=new Z.Gb,p=w,m=x;b.e=window;b.r=Math.round((new Date).getTime()/1000);b.s=f||"UA-XXXXX-X";b.ab=c.a.referrer;b.ia=x;b.f=x;b.B=x;b.F=w;b.A=x;b.Ta="";b.g=x;b.cb=x;b.c=x;b.i=x;c.o=i?R(i):x;function q(){if("auto"==c.b){var a=c.a.domain;if("www."==P(a,0,4))a=P(a,4);c.b=a}c.b=W(c.b)}function e(){var a=c.b,d=a.indexOf("www.google.")*a.indexOf(".google.")*a.indexOf("google.");return d||"/"!=c.h||a.indexOf("google.org")>-1}function g(a,d,l){if(N(a)||N(d)||N(l))return"-";
a=Q(a,F+b.c+".",d);if(!N(a)){a=a.split(".");a[5]=a[5]?a[5]*1+1:1;a[3]=a[4];a[4]=l;a=a.join(".")}return a}function h(){return"file:"!=c.a[C].protocol&&e()}function k(a){if(!a||""==a)return"";for(;ea(a.charAt(0));)a=P(a,1);for(;ea(a.charAt(a[z]-1));)a=P(a,0,a[z]-1);return a}function n(a,d,l,t){if(!N(a())){d(t?T(a()):a());U(a(),";")||l()}}function r(a){var d,l=""!=a&&c.a[C].host!=a;if(l)for(d=0;d<c.u[z];d++)l=l&&ga(W(a),W(c.u[d]))==-1;return l}b.wc=function(){var a=w;if(b.B)a=b.B.match(/^[0-9a-z-_.]{10,1200}$/i);
return a};b.jc=function(){return Y()^b.A.$b()&2147483647};b.ec=function(){if(!c.b||""==c.b||"none"==c.b){c.b="";return 1}q();return c.Ra?ja(c.b):1};b.Yb=function(a,d){if(N(a))a="-";else{d+=c.h&&"/"!=c.h?c.h:"";d=a.indexOf(d);a=d>=0&&d<=8?"0":"["==a.charAt(0)&&"]"==a.charAt(a[z]-1)?"-":a}return a};b.wa=function(a){var d="",l=c.a;d+=c.fa?b.A.Ic():"";d+=c.da?b.Ta:"";d+=c.ga&&!N(l.title)?"&utmdt="+R(l.title):"";d+="&utmhid="+ka()+"&utmr="+R(b.ia)+"&utmp="+R(b.Bc(a));return d};b.Bc=function(a){var d=c.a[C];
return a=x!=a&&""!=a?R(a,v):R(d.pathname+d.search,v)};b.Lc=function(a){if(b.J()){var d="";if(b.g!=x&&b.g.G()[z]>0)d+="&utme="+R(b.g.G());d+=b.wa(a);j.H(d,b.s,b.c)}};b.Tb=function(){var a=new Z.$(c);return a.ua(b.c)?a.Hc():x};b._getLinkerUrl=function(a,d){var l=a.split("#"),t=a,o=b.Tb();if(o)if(d&&1>=l[z])t+="#"+o;else if(!d||1>=l[z])if(1>=l[z])t+=(U(a,"?")?D:"?")+o;else t=l[0]+(U(a,"?")?D:"?")+o+"#"+l[1];return t};b.Fc=function(){var a;if(b.wc()){b.i.Dc(b.B);b.i.Oc();Z._gasoDomain=c.b;Z._gasoCPath=
c.h;a=c.a.createElement("script");a.type="text/javascript";a.id="_gasojs";a.src="https://www.google.com/analytics/reporting/overlay_js?gaso="+b.B+D+Y();c.a.getElementsByTagName("head")[0].appendChild(a)}};b.pc=function(){var a=b.r,d=b.i,l=d.k(),t=b.c+"",o=c.e,u=o?o.gaGlobal:x,y,B=U(l,F+t+"."),O=U(l,H+t),ma=U(l,I+t),G,J=[],S="",ha=w;l=N(l)?"":l;if(c.z){y=c.a[C]&&c.a[C].hash?c.a[C].href.substring(c.a[C].href.indexOf("#")):"";if(c.ba&&!N(y))S=y+D;S+=c.a[C].search;if(!N(S)&&U(S,F)){d.zc(S);d.kb()||d.Sb();
G=d.ja()}n(d.ma,d.vb,d.Eb,true);n(d.la,d.Aa,d.Fa)}if(N(G))if(B)if(!O||!ma){G=g(l,";",a);b.F=v}else{G=Q(l,F+t+".",";");J=X(Q(l,H+t,";"),".")}else{G=ia([t,b.jc(),a,a,a,1],".");ha=b.F=v}else if(N(d.C())||N(d.ka())){G=g(S,D,a);b.F=v}else{J=X(d.C(),".");t=J[0]}G=G.split(".");if(o&&u&&u.dh==t&&!c.o){G[4]=u.sid?u.sid:G[4];if(ha){G[3]=u.sid?u.sid:G[4];if(u.vid){a=u.vid.split(".");G[1]=a[0];G[2]=a[1]}}}d.tb(G.join("."));J[0]=t;J[1]=J[1]?J[1]:0;J[2]=x!=J[2]?J[2]:c.Jc;J[3]=J[3]?J[3]:G[4];d.ya(J.join("."));d.ub(t);
N(d.lc())||d.za(d.P());d.Cb();d.Ea();d.Db()};b.rc=function(){j=new Z.Kb(c)};b._initData=function(){var a;if(!p){if(!b.A){b.A=new Z.Fb(c);b.A.bc()}b.c=b.ec();b.i=new Z.$(c);b.g=new Z.N;m=new Z.Ib(c,b.c,b.i,b.g);b.rc()}if(h()){b.pc();m.tc()}if(!p){if(h()){b.ia=b.Yb(b.ab,c.a.domain);if(c.da){a=new Z.m(b.c,b.ia,b.r,c);b.Ta=a.cc(b.i,b.F)}}b.cb=new Z.N;p=v}Z.ib||b.sc()};b._visitCode=function(){b._initData();var a=Q(b.i.k(),F+b.c+".",";");a=a.split(".");return a[z]<4?"":a[1]};b._cookiePathCopy=function(a){b._initData();
b.i&&b.i.Nc(b.c,a)};b.sc=function(){var a=c.a[C].hash;if(a&&1==a.indexOf("gaso="))a=Q(a,"gaso=",D);else a=(a=c.e.name)&&0<=a.indexOf("gaso=")?Q(a,"gaso=",D):Q(b.i.k(),da,";");if(a[z]>=10){b.B=a;b.Fc()}Z.ib=v};b.J=function(){return b._visitCode()%10000<c.U*100};b.Gc=function(){var a,d,l=c.a.links;if(!c.lb){a=c.a.domain;if("www."==P(a,0,4))a=P(a,4);c.u.push("."+a)}for(a=0;a<l[z]&&(c.ra==-1||a<c.ra);a++){d=l[a];if(r(d.host))if(!d.gatcOnclick){d.gatcOnclick=d.onclick?d.onclick:b.yc;d.onclick=function(t){var o=
!this.target||this.target=="_self"||this.target=="_top"||this.target=="_parent";o=o&&!b.Rb(t);b.Mc(t,this,o);return o?w:this.gatcOnclick?this.gatcOnclick(t):v}}}};b.yc=function(){};b._trackPageview=function(a){if(h()){b._initData();c.u&&b.Gc();b.Lc(a);b.F=w}};b._trackTrans=function(){var a=b.c,d=[],l,t,o;b._initData();if(b.f&&b.J()){for(l=0;l<b.f.Y[z];l++){t=b.f.Y[l];V(d,t.Ca());for(o=0;o<t.R[z];o++)V(d,t.R[o].Ca())}for(l=0;l<d[z];l++)j.H(d[l],b.s,a,v)}};b._setTrans=function(){var a=c.a,d,l,t;a=a.getElementById?
a.getElementById("utmtrans"):a.utmform&&a.utmform.utmtrans?a.utmform.utmtrans:x;b._initData();if(a&&a.value){b.f=new Z.n;t=a.value.split("UTM:");c.v=!c.v||""==c.v?"|":c.v;for(a=0;a<t[z];a++){t[a]=k(t[a]);d=t[a].split(c.v);for(l=0;l<d[z];l++)d[l]=k(d[l]);if("T"==d[0])b._addTrans(d[1],d[2],d[3],d[4],d[5],d[6],d[7],d[8]);else"I"==d[0]&&b._addItem(d[1],d[2],d[3],d[4],d[5],d[6])}}};b._addTrans=function(a,d,l,t,o,u,y,B){b.f=b.f?b.f:new Z.n;return b.f.Ob(a,d,l,t,o,u,y,B)};b._addItem=function(a,d,l,t,o,u){var y;
b.f=b.f?b.f:new Z.n;(y=b.f.hb(a))||(y=b._addTrans(a,"","","","","","",""));y.Nb(d,l,t,o,u)};b._setVar=function(a){if(a&&""!=a&&e()){b._initData();m.Ec(R(a));b.J()&&j.H("&utmt=var",b.s,b.c)}};b._setCustomVar=function(a,d,l,t){b._initData();return m.Cc(a,d,l,t)};b._deleteCustomVar=function(a){b._initData();m.Ub(a)};b._getVisitorCustomVar=function(a){b._initData();return m.mc(a)};b._setMaxCustomVariables=function(a){c.ob=a};b._link=function(a,d){if(c.z&&a){b._initData();c.a[C].href=b._getLinkerUrl(a,
d)}};b._linkByPost=function(a,d){if(c.z&&a&&a.action){b._initData();a.action=b._getLinkerUrl(a.action,d)}};b._setXKey=function(a,d,l){b.g._setKey(a,d,l)};b._setXValue=function(a,d,l){b.g._setValue(a,d,l)};b._getXKey=function(a,d){return b.g._getKey(a,d)};b._getXValue=function(a,d){return b.g.getValue(a,d)};b._clearXKey=function(a){b.g._clearKey(a)};b._clearXValue=function(a){b.g._clearValue(a)};b._createXObj=function(){b._initData();return new Z.N};b._sendXEvent=function(a){var d="";b._initData();
if(b.J()){d+="&utmt=event&utme="+R(b.g.Ac(a))+b.wa();j.H(d,b.s,b.c,w,v)}};b._createEventTracker=function(a){b._initData();return new Z.Jb(a,b)};b._trackEvent=function(a,d,l,t){var o=b.cb;if(x!=a&&x!=d&&""!=a&&""!=d){o._clearKey(5);o._clearValue(5);(a=o._setKey(5,1,a)&&o._setKey(5,2,d)&&(x==l||o._setKey(5,3,l))&&(x==t||o._setValue(5,1,t)))&&b._sendXEvent(o)}else a=w;return a};b.Mc=function(a,d,l){b._initData();if(b.J()){var t=new Z.N;t._setKey(6,1,d.href);var o=l?function(){b.db(a,d)}:x;j.H("&utmt=event&utme="+
R(t.G())+b.wa(),b.s,b.c,w,v,o);if(l){var u=this;c.e.setTimeout(function(){u.db(a,d)},500)}}};b.db=function(a,d){if(!a)a=c.e.event;var l=v;if(d.gatcOnclick)l=d.gatcOnclick(a);if(l||typeof l=="undefined")if(!d.target||d.target=="_self")c.e[C]=d.href;else if(d.target=="_top")c.e.top.document[C]=d.href;else if(d.target=="_parent")c.e.parent.document[C]=d.href};b.Rb=function(a){if(!a)a=c.e.event;var d=a.shiftKey||a.ctrlKey||a.altKey;if(!d)if(a.modifiers&&c.e.Event)d=a.modifiers&c.e.Event.CONTROL_MASK||
a.modifiers&c.e.Event.SHIFT_MASK||a.modifiers&c.e.Event.ALT_MASK;return d};b.Pc=function(){return c};b._setDomainName=function(a){c.b=a};b._addOrganic=function(a,d,l){c.T.splice(l?0:c.T.length,0,new Z.Ha(a,d))};b._clearOrganic=function(){c.T=[]};b._addIgnoredOrganic=function(a){V(c.ta,a)};b._clearIgnoredOrganic=function(){c.ta=[]};b._addIgnoredRef=function(a){V(c.va,a)};b._clearIgnoredRef=function(){c.va=[]};b._setAllowHash=function(a){c.Ra=a?1:0};b._setCampaignTrack=function(a){c.da=a?1:0};b._setClientInfo=
function(a){c.fa=a?1:0};b._getClientInfo=function(){return c.fa};b._setCookiePath=function(a){c.h=a};b._setTransactionDelim=function(a){c.v=a};b._setCookieTimeout=function(a){c.Ya=a};b._setDetectFlash=function(a){c.ha=a?1:0};b._getDetectFlash=function(){return c.ha};b._setDetectTitle=function(a){c.ga=a?1:0};b._getDetectTitle=function(){return c.ga};b._setLocalGifPath=function(a){c.oa=a};b._getLocalGifPath=function(){return c.oa};b._setLocalServerMode=function(){c.I=0};b._setRemoteServerMode=function(){c.I=
1};b._setLocalRemoteServerMode=function(){c.I=2};b._getServiceMode=function(){return c.I};b._setSampleRate=function(a){c.U=a};b._setSessionTimeout=function(a){c.sb=a};b._setAllowLinker=function(a){c.z=a?1:0};b._setAllowAnchor=function(a){c.ba=a?1:0};b._setCampNameKey=function(a){c.Ia=a};b._setCampContentKey=function(a){c.Ja=a};b._setCampIdKey=function(a){c.Ka=a};b._setCampMediumKey=function(a){c.La=a};b._setCampNOKey=function(a){c.Ma=a};b._setCampSourceKey=function(a){c.Na=a};b._setCampTermKey=function(a){c.Oa=
a};b._setCampCIdKey=function(a){c.Pa=a};b._getAccount=function(){return b.s};b._setAccount=function(a){b.s=a};b._setNamespace=function(a){c.o=a?R(a):x};b._getVersion=function(){return ba};b._setAutoTrackOutbound=function(a){c.u=[];if(a)c.u=a};b._setTrackOutboundSubdomains=function(a){c.lb=a};b._setHrefExamineLimit=function(a){c.ra=a};b._setReferrerOverride=function(a){b.ab=a};b._setCookiePersistence=function(a){Z.t=a}};Z._getTracker=function(f,i){return new Z.aa(f,i)};var $={ca:{},_createAsyncTracker:function(f,i){i=i||"";f=new Z.aa(f);return $.ca[i]=f},_getAsyncTracker:function(f){f=f||"";var i=$.ca[f];if(!i){i=new Z.aa;$.ca[f]=i}return i},push:function(){for(var f=arguments,i=0,b=0;b<f[z];b++)try{if(typeof f[b]==="function")f[b]();else{var j="",c=f[b][0],p=c.lastIndexOf(".");if(p>0){j=P(c,0,p);c=P(c,p+1)}var m=$._getAsyncTracker(j);m[c].apply(m,f[b].slice(1))}}catch(q){i++}return i}};window[aa]=Z;var la=window[s];function na(){var f=window[s],i=w;if(f&&typeof f.push=="function"){i=f.constructor==Array;if(!i)return}window[s]=$;i&&$.push.apply($,f)}na();})()
