/*
 * 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 now() { 
		return +new Date; 
	}
	

(function(){var expando = "jQuery" + now();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)})}});

jQuery.extend({
	get: function( url, data, callback, type, ifModified ) {
		// shift arguments if data argument was ommited
		if ( jQuery.isFunction( data ) ) {
			callback = data;
			data = null;
		}
		
		return jQuery.ajax({
			type: "GET",
			url: url,
			data: data,
			success: callback,
			dataType: type,
			ifModified: ifModified
		});
	},
	getIfModified: function( url, data, callback, type ) {
		return jQuery.get(url, data, callback, type, 1);
	},
	getScript: function( url, callback ) {
		return jQuery.get(url, null, callback, "script");
	},
	getJSON: function( url, data, callback ) {
		return jQuery.get(url, data, callback, "json");
	},
	post: function( url, data, callback, type ) {
		if ( jQuery.isFunction( data ) ) {
			callback = data;
			data = {};
		}

		return jQuery.ajax({
			type: "POST",
			url: url,
			data: data,
			success: callback,
			dataType: type
		});
	},
	ajaxTimeout: function( timeout ) {
		jQuery.ajaxSettings.timeout = timeout;
	},
	ajaxSetup: function( settings ) {
		jQuery.extend( jQuery.ajaxSettings, settings );
	},

	ajaxSettings: {
		global: true,
		type: "GET",
		timeout: 0,
		contentType: "application/x-www-form-urlencoded",
		processData: true,
		async: true,
		data: null
	},
	
	// Last-Modified header cache for next request
	lastModified: {},
	ajax: function( s ) {
		// TODO introduce global settings, allowing the client to modify them for all requests, not only timeout
		s = jQuery.extend({}, jQuery.ajaxSettings, s);

		// if data available
		if ( s.data ) {
			// convert data if not already a string
			if (s.processData && typeof s.data != "string")
    			s.data = jQuery.param(s.data);
			// append data to url for get requests
			if( s.type.toLowerCase() == "get" ) {
				// "?" + data or "&" + data (in case there are already params)
				s.url += ((s.url.indexOf("?") > -1) ? "&" : "?") + s.data;
				// IE likes to send both get and post data, prevent this
				s.data = null;
			}
		}

		// Watch for a new set of requests
		if ( s.global && ! jQuery.active++ )
			jQuery.event.trigger( "ajaxStart" );

		var requestDone = false;

		// Create the request object; Microsoft failed to properly
		// implement the XMLHttpRequest in IE7, so we use the ActiveXObject when it is available
		var xml = window.ActiveXObject ? new ActiveXObject("Microsoft.XMLHTTP") : new XMLHttpRequest();

		// Open the socket
		xml.open(s.type, s.url, s.async);

		// Set the correct header, if data is being sent
		if ( s.data )
			xml.setRequestHeader("Content-Type", s.contentType);

		// Set the If-Modified-Since header, if ifModified mode.
		if ( s.ifModified )
			xml.setRequestHeader("If-Modified-Since",
				jQuery.lastModified[s.url] || "Thu, 01 Jan 1970 00:00:00 GMT" );

		// Set header so the called script knows that it's an XMLHttpRequest
		xml.setRequestHeader("X-Requested-With", "XMLHttpRequest");

		// Allow custom headers/mimetypes
		if( s.beforeSend )
			s.beforeSend(xml);
			
		if ( s.global )
		    jQuery.event.trigger("ajaxSend", [xml, s]);

		// Wait for a response to come back
		var onreadystatechange = function(isTimeout){
			// The transfer is complete and the data is available, or the request timed out
			if ( xml && (xml.readyState == 4 || isTimeout == "timeout") ) {
				requestDone = true;
				
				// clear poll interval
				if (ival) {
					clearInterval(ival);
					ival = null;
				}
				
				var status;
				try {
					status = jQuery.httpSuccess( xml ) && isTimeout != "timeout" ?
						s.ifModified && jQuery.httpNotModified( xml, s.url ) ? "notmodified" : "success" : "error";
					// Make sure that the request was successful or notmodified
					if ( status != "error" ) {
						// Cache Last-Modified header, if ifModified mode.
						var modRes;
						try {
							modRes = xml.getResponseHeader("Last-Modified");
						} catch(e) {} // swallow exception thrown by FF if header is not available
	
						if ( s.ifModified && modRes )
							jQuery.lastModified[s.url] = modRes;
	
						// process the data (runs the xml through httpData regardless of callback)
						var data = jQuery.httpData( xml, s.dataType );
	
						// If a local callback was specified, fire it and pass it the data
						if ( s.success )
							s.success( data, status );
	
						// Fire the global callback
						if( s.global )
							jQuery.event.trigger( "ajaxSuccess", [xml, s] );
					} else
						jQuery.handleError(s, xml, status);
				} catch(e) {
					status = "error";
					jQuery.handleError(s, xml, status, e);
				}

				// The request was completed
				if( s.global )
					jQuery.event.trigger( "ajaxComplete", [xml, s] );

				// Handle the global AJAX counter
				if ( s.global && ! --jQuery.active )
					jQuery.event.trigger( "ajaxStop" );

				// Process result
				if ( s.complete )
					s.complete(xml, status);

				// Stop memory leaks
				if(s.async)
					xml = null;
			}
		};
		
		// don't attach the handler to the request, just poll it instead
		var ival = setInterval(onreadystatechange, 13); 

		// Timeout checker
		if ( s.timeout > 0 )
			setTimeout(function(){
				// Check to see if the request is still happening
				if ( xml ) {
					// Cancel the request
					xml.abort();

					if( !requestDone )
						onreadystatechange( "timeout" );
				}
			}, s.timeout);
			
		// Send the data
		try {
			xml.send(s.data);
		} catch(e) {
			jQuery.handleError(s, xml, null, e);
		}
		
		// firefox 1.5 doesn't fire statechange for sync requests
		if ( !s.async )
			onreadystatechange();
		
		// return XMLHttpRequest to allow aborting the request etc.
		return xml;
	},

	handleError: function( s, xml, status, e ) {
		// If a local callback was specified, fire it
		if ( s.error ) s.error( xml, status, e );

		// Fire the global callback
		if ( s.global )
			jQuery.event.trigger( "ajaxError", [xml, s, e] );
	},

	// Counter for holding the number of active queries
	active: 0,

	// Determines if an XMLHttpRequest was successful or not
	httpSuccess: function( r ) {
		try {
			return !r.status && location.protocol == "file:" ||
				( r.status >= 200 && r.status < 300 ) || r.status == 304 ||
				jQuery.browser.safari && r.status == undefined;
		} catch(e){}
		return false;
	},

	// Determines if an XMLHttpRequest returns NotModified
	httpNotModified: function( xml, url ) {
		try {
			var xmlRes = xml.getResponseHeader("Last-Modified");

			// Firefox always returns 200. check Last-Modified date
			return xml.status == 304 || xmlRes == jQuery.lastModified[url] ||
				jQuery.browser.safari && xml.status == undefined;
		} catch(e){}
		return false;
	},

	/* Get the data out of an XMLHttpRequest.
	 * Return parsed XML if content-type header is "xml" and type is "xml" or omitted,
	 * otherwise return plain text.
	 * (String) data - The type of data that you're expecting back,
	 * (e.g. "xml", "html", "script")
	 */
	httpData: function( r, type ) {
		var ct = r.getResponseHeader("content-type");
		var data = !type && ct && ct.indexOf("xml") >= 0;
		data = type == "xml" || data ? r.responseXML : r.responseText;

		// If the type is "script", eval it in global context
		if ( type == "script" )
			jQuery.globalEval( data );

		// Get the JavaScript object, if JSON is used.
		if ( type == "json" )
			data = eval("(" + data + ")");

		// evaluate scripts within html
		if ( type == "html" )
			jQuery("<div>").html(data).evalScripts();

		return data;
	},

	// Serialize an array of form elements or a set of
	// key/values into a query string
	param: function( a ) {
		var s = [];

		// If an array was passed in, assume that it is an array
		// of form elements
		if ( a.constructor == Array || a.jquery )
			// Serialize the form elements
			jQuery.each( a, function(){
				s.push( encodeURIComponent(this.name) + "=" + encodeURIComponent( this.value ) );
			});

		// Otherwise, assume that it's an object of key/value pairs
		else
			// Serialize the key/values
			for ( var j in a )
				// If the value is an array then the key names need to be repeated
				if ( a[j] && a[j].constructor == Array )
					jQuery.each( a[j], function(){
						s.push( encodeURIComponent(j) + "=" + encodeURIComponent( this ) );
					});
				else
					s.push( encodeURIComponent(j) + "=" + encodeURIComponent( a[j] ) );

		// Return the resulting serialization
		return s.join("&");
	},
	
	// evalulates a script in global context
	// not reliable for safari
	globalEval: function( data ) {
		if ( window.execScript )
			window.execScript( data );
		else if ( jQuery.browser.safari )
			// safari doesn't provide a synchronous global eval
			window.setTimeout( data, 0 );
		else
			eval.call( window, data );
	}

});

/*
 * 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 chunker = /((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?/g,
            done = 0,
            toString = Object.prototype.toString;
        var Sizzle = function (selector, context, results, seed) {
            results = results || [];
            context = context || document;
            if (context.nodeType !== 1 && context.nodeType !== 9) {
                return []
            }
            if (!selector || typeof selector !== "string") {
                return results
            }
            var parts = [],
                m, set, checkSet, check, mode, extra, prune = true;
            chunker.lastIndex = 0;
            while ((m = chunker.exec(selector)) !== null) {
                parts.push(m[1]);
                if (m[2]) {
                    extra = RegExp.rightContext;
                    break
                }
            }
            if (parts.length > 1 && origPOS.exec(selector)) {
                if (parts.length === 2 && Expr.relative[parts[0]]) {
                    set = posProcess(parts[0] + parts[1], context)
                } else {
                    set = Expr.relative[parts[0]] ? [context] : Sizzle(parts.shift(), context);
                    while (parts.length) {
                        selector = parts.shift();
                        if (Expr.relative[selector]) {
                            selector += parts.shift()
                        }
                        set = posProcess(selector, set)
                    }
                }
            } else {
                var ret = seed ? {
                    expr: parts.pop(),
                    set: makeArray(seed)
                } : Sizzle.find(parts.pop(), parts.length === 1 && context.parentNode ? context.parentNode : context, isXML(context));
                set = Sizzle.filter(ret.expr, ret.set);
                if (parts.length > 0) {
                    checkSet = makeArray(set)
                } else {
                    prune = false
                }
                while (parts.length) {
                    var cur = parts.pop(),
                        pop = cur;
                    if (!Expr.relative[cur]) {
                        cur = ""
                    } else {
                        pop = parts.pop()
                    }
                    if (pop == null) {
                        pop = context
                    }
                    Expr.relative[cur](checkSet, pop, isXML(context))
                }
            }
            if (!checkSet) {
                checkSet = set
            }
            if (!checkSet) {
                throw "Syntax error, unrecognized expression: " + (cur || selector)
            }
            if (toString.call(checkSet) === "[object Array]") {
                if (!prune) {
                    results.push.apply(results, checkSet)
                } else {
                    if (context.nodeType === 1) {
                        for (var i = 0; checkSet[i] != null; i++) {
                            if (checkSet[i] && (checkSet[i] === true || checkSet[i].nodeType === 1 && contains(context, checkSet[i]))) {
                                results.push(set[i])
                            }
                        }
                    } else {
                        for (var i = 0; checkSet[i] != null; i++) {
                            if (checkSet[i] && checkSet[i].nodeType === 1) {
                                results.push(set[i])
                            }
                        }
                    }
                }
            } else {
                makeArray(checkSet, results)
            }
            if (extra) {
                Sizzle(extra, context, results, seed);
                if (sortOrder) {
                    hasDuplicate = false;
                    results.sort(sortOrder);
                    if (hasDuplicate) {
                        for (var i = 1; i < results.length; i++) {
                            if (results[i] === results[i - 1]) {
                                results.splice(i--, 1)
                            }
                        }
                    }
                }
            }
            return results
        };
        Sizzle.matches = function (expr, set) {
            return Sizzle(expr, null, null, set)
        };
        Sizzle.find = function (expr, context, isXML) {
            var set, match;
            if (!expr) {
                return []
            }
            for (var i = 0, l = Expr.order.length; i < l; i++) {
                var type = Expr.order[i],
                    match;
                if ((match = Expr.match[type].exec(expr))) {
                    var left = RegExp.leftContext;
                    if (left.substr(left.length - 1) !== "\\") {
                        match[1] = (match[1] || "").replace(/\\/g, "");
                        set = Expr.find[type](match, context, isXML);
                        if (set != null) {
                            expr = expr.replace(Expr.match[type], "");
                            break
                        }
                    }
                }
            }
            if (!set) {
                set = context.getElementsByTagName("*")
            }
            return {
                set: set,
                expr: expr
            }
        };
        Sizzle.filter = function (expr, set, inplace, not) {
            var old = expr,
                result = [],
                curLoop = set,
                match, anyFound, isXMLFilter = set && set[0] && isXML(set[0]);
            while (expr && set.length) {
                for (var type in Expr.filter) {
                    if ((match = Expr.match[type].exec(expr)) != null) {
                        var filter = Expr.filter[type],
                            found, item;
                        anyFound = false;
                        if (curLoop == result) {
                            result = []
                        }
                        if (Expr.preFilter[type]) {
                            match = Expr.preFilter[type](match, curLoop, inplace, result, not, isXMLFilter);
                            if (!match) {
                                anyFound = found = true
                            } else {
                                if (match === true) {
                                    continue
                                }
                            }
                        }
                        if (match) {
                            for (var i = 0;
                            (item = curLoop[i]) != null; i++) {
                                if (item) {
                                    found = filter(item, match, i, curLoop);
                                    var pass = not ^ !! found;
                                    if (inplace && found != null) {
                                        if (pass) {
                                            anyFound = true
                                        } else {
                                            curLoop[i] = false
                                        }
                                    } else {
                                        if (pass) {
                                            result.push(item);
                                            anyFound = true
                                        }
                                    }
                                }
                            }
                        }
                        if (found !== undefined) {
                            if (!inplace) {
                                curLoop = result
                            }
                            expr = expr.replace(Expr.match[type], "");
                            if (!anyFound) {
                                return []
                            }
                            break
                        }
                    }
                }
                if (expr == old) {
                    if (anyFound == null) {
                        throw "Syntax error, unrecognized expression: " + expr
                    } else {
                        break
                    }
                }
                old = expr
            }
            return curLoop
        };
        var Expr = Sizzle.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 (elem) {
                    return elem.getAttribute("href")
                }
            },
            relative: {
                "+": function (checkSet, part, isXML) {
                    var isPartStr = typeof part === "string",
                        isTag = isPartStr && !/\W/.test(part),
                        isPartStrNotTag = isPartStr && !isTag;
                    if (isTag && !isXML) {
                        part = part.toUpperCase()
                    }
                    for (var i = 0, l = checkSet.length, elem; i < l; i++) {
                        if ((elem = checkSet[i])) {
                            while ((elem = elem.previousSibling) && elem.nodeType !== 1) {}
                            checkSet[i] = isPartStrNotTag || elem && elem.nodeName === part ? elem || false : elem === part
                        }
                    }
                    if (isPartStrNotTag) {
                        Sizzle.filter(part, checkSet, true)
                    }
                },
                ">": function (checkSet, part, isXML) {
                    var isPartStr = typeof part === "string";
                    if (isPartStr && !/\W/.test(part)) {
                        part = isXML ? part : part.toUpperCase();
                        for (var i = 0, l = checkSet.length; i < l; i++) {
                            var elem = checkSet[i];
                            if (elem) {
                                var parent = elem.parentNode;
                                checkSet[i] = parent.nodeName === part ? parent : false
                            }
                        }
                    } else {
                        for (var i = 0, l = checkSet.length; i < l; i++) {
                            var elem = checkSet[i];
                            if (elem) {
                                checkSet[i] = isPartStr ? elem.parentNode : elem.parentNode === part
                            }
                        }
                        if (isPartStr) {
                            Sizzle.filter(part, checkSet, true)
                        }
                    }
                },
                "": function (checkSet, part, isXML) {
                    var doneName = done++,
                        checkFn = dirCheck;
                    if (!part.match(/\W/)) {
                        var nodeCheck = part = isXML ? part : part.toUpperCase();
                        checkFn = dirNodeCheck
                    }
                    checkFn("parentNode", part, doneName, checkSet, nodeCheck, isXML)
                },
                "~": function (checkSet, part, isXML) {
                    var doneName = done++,
                        checkFn = dirCheck;
                    if (typeof part === "string" && !part.match(/\W/)) {
                        var nodeCheck = part = isXML ? part : part.toUpperCase();
                        checkFn = dirNodeCheck
                    }
                    checkFn("previousSibling", part, doneName, checkSet, nodeCheck, isXML)
                }
            },
            find: {
                ID: function (match, context, isXML) {
                    if (typeof context.getElementById !== "undefined" && !isXML) {
                        var m = context.getElementById(match[1]);
                        return m ? [m] : []
                    }
                },
                NAME: function (match, context, isXML) {
                    if (typeof context.getElementsByName !== "undefined") {
                        var ret = [],
                            results = context.getElementsByName(match[1]);
                        for (var i = 0, l = results.length; i < l; i++) {
                            if (results[i].getAttribute("name") === match[1]) {
                                ret.push(results[i])
                            }
                        }
                        return ret.length === 0 ? null : ret
                    }
                },
                TAG: function (match, context) {
                    return context.getElementsByTagName(match[1])
                }
            },
            preFilter: {
                CLASS: function (match, curLoop, inplace, result, not, isXML) {
                    match = " " + match[1].replace(/\\/g, "") + " ";
                    if (isXML) {
                        return match
                    }
                    for (var i = 0, elem;
                    (elem = curLoop[i]) != null; i++) {
                        if (elem) {
                            if (not ^ (elem.className && (" " + elem.className + " ").indexOf(match) >= 0)) {
                                if (!inplace) {
                                    result.push(elem)
                                }
                            } else {
                                if (inplace) {
                                    curLoop[i] = false
                                }
                            }
                        }
                    }
                    return false
                },
                ID: function (match) {
                    return match[1].replace(/\\/g, "")
                },
                TAG: function (match, curLoop) {
                    for (var i = 0; curLoop[i] === false; i++) {}
                    return curLoop[i] && isXML(curLoop[i]) ? match[1] : match[1].toUpperCase()
                },
                CHILD: function (match) {
                    if (match[1] == "nth") {
                        var test = /(-?)(\d*)n((?:\+|-)?\d*)/.exec(match[2] == "even" && "2n" || match[2] == "odd" && "2n+1" || !/\D/.test(match[2]) && "0n+" + match[2] || match[2]);
                        match[2] = (test[1] + (test[2] || 1)) - 0;
                        match[3] = test[3] - 0
                    }
                    match[0] = done++;
                    return match
                },
                ATTR: function (match, curLoop, inplace, result, not, isXML) {
                    var name = match[1].replace(/\\/g, "");
                    if (!isXML && Expr.attrMap[name]) {
                        match[1] = Expr.attrMap[name]
                    }
                    if (match[2] === "~=") {
                        match[4] = " " + match[4] + " "
                    }
                    return match
                },
                PSEUDO: function (match, curLoop, inplace, result, not) {
                    if (match[1] === "not") {
                        if (match[3].match(chunker).length > 1 || /^\w/.test(match[3])) {
                            match[3] = Sizzle(match[3], null, null, curLoop)
                        } else {
                            var ret = Sizzle.filter(match[3], curLoop, inplace, true ^ not);
                            if (!inplace) {
                                result.push.apply(result, ret)
                            }
                            return false
                        }
                    } else {
                        if (Expr.match.POS.test(match[0]) || Expr.match.CHILD.test(match[0])) {
                            return true
                        }
                    }
                    return match
                },
                POS: function (match) {
                    match.unshift(true);
                    return match
                }
            },
            filters: {
                enabled: function (elem) {
                    return elem.disabled === false && elem.type !== "hidden"
                },
                disabled: function (elem) {
                    return elem.disabled === true
                },
                checked: function (elem) {
                    return elem.checked === true
                },
                selected: function (elem) {
                    elem.parentNode.selectedIndex;
                    return elem.selected === true
                },
                parent: function (elem) {
                    return !!elem.firstChild
                },
                empty: function (elem) {
                    return !elem.firstChild
                },
                has: function (elem, i, match) {
                    return !!Sizzle(match[3], elem).length
                },
                header: function (elem) {
                    return /h\d/i.test(elem.nodeName)
                },
                text: function (elem) {
                    return "text" === elem.type
                },
                radio: function (elem) {
                    return "radio" === elem.type
                },
                checkbox: function (elem) {
                    return "checkbox" === elem.type
                },
                file: function (elem) {
                    return "file" === elem.type
                },
                password: function (elem) {
                    return "password" === elem.type
                },
                submit: function (elem) {
                    return "submit" === elem.type
                },
                image: function (elem) {
                    return "image" === elem.type
                },
                reset: function (elem) {
                    return "reset" === elem.type
                },
                button: function (elem) {
                    return "button" === elem.type || elem.nodeName.toUpperCase() === "BUTTON"
                },
                input: function (elem) {
                    return /input|select|textarea|button/i.test(elem.nodeName)
                }
            },
            setFilters: {
                first: function (elem, i) {
                    return i === 0
                },
                last: function (elem, i, match, array) {
                    return i === array.length - 1
                },
                even: function (elem, i) {
                    return i % 2 === 0
                },
                odd: function (elem, i) {
                    return i % 2 === 1
                },
                lt: function (elem, i, match) {
                    return i < match[3] - 0
                },
                gt: function (elem, i, match) {
                    return i > match[3] - 0
                },
                nth: function (elem, i, match) {
                    return match[3] - 0 == i
                },
                eq: function (elem, i, match) {
                    return match[3] - 0 == i
                }
            },
            filter: {
                PSEUDO: function (elem, match, i, array) {
                    var name = match[1],
                        filter = Expr.filters[name];
                    if (filter) {
                        return filter(elem, i, match, array)
                    } else {
                        if (name === "contains") {
                            return (elem.textContent || elem.innerText || "").indexOf(match[3]) >= 0
                        } else {
                            if (name === "not") {
                                var not = match[3];
                                for (var i = 0, l = not.length; i < l; i++) {
                                    if (not[i] === elem) {
                                        return false
                                    }
                                }
                                return true
                            }
                        }
                    }
                },
                CHILD: function (elem, match) {
                    var type = match[1],
                        node = elem;
                    switch (type) {
                    case "only":
                    case "first":
                        while (node = node.previousSibling) {
                            if (node.nodeType === 1) {
                                return false
                            }
                        }
                        if (type == "first") {
                            return true
                        }
                        node = elem;
                    case "last":
                        while (node = node.nextSibling) {
                            if (node.nodeType === 1) {
                                return false
                            }
                        }
                        return true;
                    case "nth":
                        var first = match[2],
                            last = match[3];
                        if (first == 1 && last == 0) {
                            return true
                        }
                        var doneName = match[0],
                            parent = elem.parentNode;
                        if (parent && (parent.sizcache !== doneName || !elem.nodeIndex)) {
                            var count = 0;
                            for (node = parent.firstChild; node; node = node.nextSibling) {
                                if (node.nodeType === 1) {
                                    node.nodeIndex = ++count
                                }
                            }
                            parent.sizcache = doneName
                        }
                        var diff = elem.nodeIndex - last;
                        if (first == 0) {
                            return diff == 0
                        } else {
                            return (diff % first == 0 && diff / first >= 0)
                        }
                    }
                },
                ID: function (elem, match) {
                    return elem.nodeType === 1 && elem.getAttribute("id") === match
                },
                TAG: function (elem, match) {
                    return (match === "*" && elem.nodeType === 1) || elem.nodeName === match
                },
                CLASS: function (elem, match) {
                    return (" " + (elem.className || elem.getAttribute("class")) + " ").indexOf(match) > -1
                },
                ATTR: function (elem, match) {
                    var name = match[1],
                        result = Expr.attrHandle[name] ? Expr.attrHandle[name](elem) : elem[name] != null ? elem[name] : elem.getAttribute(name),
                        value = result + "",
                        type = match[2],
                        check = match[4];
                    return result == null ? type === "!=" : type === "=" ? value === check : type === "*=" ? value.indexOf(check) >= 0 : type === "~=" ? (" " + value + " ").indexOf(check) >= 0 : !check ? value && result !== false : type === "!=" ? value != check : type === "^=" ? value.indexOf(check) === 0 : type === "$=" ? value.substr(value.length - check.length) === check : type === "|=" ? value === check || value.substr(0, check.length + 1) === check + "-" : false
                },
                POS: function (elem, match, i, array) {
                    var name = match[2],
                        filter = Expr.setFilters[name];
                    if (filter) {
                        return filter(elem, i, match, array)
                    }
                }
            }
        };
        var origPOS = Expr.match.POS;
        for (var type in Expr.match) {
            Expr.match[type] = RegExp(Expr.match[type].source + /(?![^\[]*\])(?![^\(]*\))/.source)
        }
        var makeArray = function (array, results) {
            array = Array.prototype.slice.call(array);
            if (results) {
                results.push.apply(results, array);
                return results
            }
            return array
        };
        try {
            Array.prototype.slice.call(document.documentElement.childNodes)
        } catch (e) {
            makeArray = function (array, results) {
                var ret = results || [];
                if (toString.call(array) === "[object Array]") {
                    Array.prototype.push.apply(ret, array)
                } else {
                    if (typeof array.length === "number") {
                        for (var i = 0, l = array.length; i < l; i++) {
                            ret.push(array[i])
                        }
                    } else {
                        for (var i = 0; array[i]; i++) {
                            ret.push(array[i])
                        }
                    }
                }
                return ret
            }
        }
        var sortOrder;
        if (document.documentElement.compareDocumentPosition) {
            sortOrder = function (a, b) {
                var ret = a.compareDocumentPosition(b) & 4 ? -1 : a === b ? 0 : 1;
                if (ret === 0) {
                    hasDuplicate = true
                }
                return ret
            }
        } else {
            if ("sourceIndex" in document.documentElement) {
                sortOrder = function (a, b) {
                    var ret = a.sourceIndex - b.sourceIndex;
                    if (ret === 0) {
                        hasDuplicate = true
                    }
                    return ret
                }
            } else {
                if (document.createRange) {
                    sortOrder = function (a, b) {
                        var aRange = a.ownerDocument.createRange(),
                            bRange = b.ownerDocument.createRange();
                        aRange.selectNode(a);
                        aRange.collapse(true);
                        bRange.selectNode(b);
                        bRange.collapse(true);
                        var ret = aRange.compareBoundaryPoints(Range.START_TO_END, bRange);
                        if (ret === 0) {
                            hasDuplicate = true
                        }
                        return ret
                    }
                }
            }
        }(function () {
            var form = document.createElement("form"),
                id = "script" + (new Date).getTime();
            form.innerHTML = "<input name='" + id + "'/>";
            var root = document.documentElement;
            root.insertBefore(form, root.firstChild);
            if ( !! document.getElementById(id)) {
                Expr.find.ID = function (match, context, isXML) {
                    if (typeof context.getElementById !== "undefined" && !isXML) {
                        var m = context.getElementById(match[1]);
                        return m ? m.id === match[1] || typeof m.getAttributeNode !== "undefined" && m.getAttributeNode("id").nodeValue === match[1] ? [m] : undefined : []
                    }
                };
                Expr.filter.ID = function (elem, match) {
                    var node = typeof elem.getAttributeNode !== "undefined" && elem.getAttributeNode("id");
                    return elem.nodeType === 1 && node && node.nodeValue === match
                }
            }
            root.removeChild(form)
        })();
        (function () {
            var div = document.createElement("div");
            div.appendChild(document.createComment(""));
            if (div.getElementsByTagName("*").length > 0) {
                Expr.find.TAG = function (match, context) {
                    var results = context.getElementsByTagName(match[1]);
                    if (match[1] === "*") {
                        var tmp = [];
                        for (var i = 0; results[i]; i++) {
                            if (results[i].nodeType === 1) {
                                tmp.push(results[i])
                            }
                        }
                        results = tmp
                    }
                    return results
                }
            }
            div.innerHTML = "<a href='#'></a>";
            if (div.firstChild && typeof div.firstChild.getAttribute !== "undefined" && div.firstChild.getAttribute("href") !== "#") {
                Expr.attrHandle.href = function (elem) {
                    return elem.getAttribute("href", 2)
                }
            }
        })();
        if (document.querySelectorAll) {
            (function () {
                var oldSizzle = Sizzle,
                    div = document.createElement("div");
                div.innerHTML = "<p class='TEST'></p>";
                if (div.querySelectorAll && div.querySelectorAll(".TEST").length === 0) {
                    return
                }
                Sizzle = function (query, context, extra, seed) {
                    context = context || document;
                    if (!seed && context.nodeType === 9 && !isXML(context)) {
                        try {
                            return makeArray(context.querySelectorAll(query), extra)
                        } catch (e) {}
                    }
                    return oldSizzle(query, context, extra, seed)
                };
                Sizzle.find = oldSizzle.find;
                Sizzle.filter = oldSizzle.filter;
                Sizzle.selectors = oldSizzle.selectors;
                Sizzle.matches = oldSizzle.matches
            })()
        }
        if (document.getElementsByClassName && document.documentElement.getElementsByClassName) {
            (function () {
                var div = document.createElement("div");
                div.innerHTML = "<div class='test e'></div><div class='test'></div>";
                if (div.getElementsByClassName("e").length === 0) {
                    return
                }
                div.lastChild.className = "e";
                if (div.getElementsByClassName("e").length === 1) {
                    return
                }
                Expr.order.splice(1, 0, "CLASS");
                Expr.find.CLASS = function (match, context, isXML) {
                    if (typeof context.getElementsByClassName !== "undefined" && !isXML) {
                        return context.getElementsByClassName(match[1])
                    }
                }
            })()
        }
        function dirNodeCheck(dir, cur, doneName, checkSet, nodeCheck, isXML) {
            var sibDir = dir == "previousSibling" && !isXML;
            for (var i = 0, l = checkSet.length; i < l; i++) {
                var elem = checkSet[i];
                if (elem) {
                    if (sibDir && elem.nodeType === 1) {
                        elem.sizcache = doneName;
                        elem.sizset = i
                    }
                    elem = elem[dir];
                    var match = false;
                    while (elem) {
                        if (elem.sizcache === doneName) {
                            match = checkSet[elem.sizset];
                            break
                        }
                        if (elem.nodeType === 1 && !isXML) {
                            elem.sizcache = doneName;
                            elem.sizset = i
                        }
                        if (elem.nodeName === cur) {
                            match = elem;
                            break
                        }
                        elem = elem[dir]
                    }
                    checkSet[i] = match
                }
            }
        }
        function dirCheck(dir, cur, doneName, checkSet, nodeCheck, isXML) {
            var sibDir = dir == "previousSibling" && !isXML;
            for (var i = 0, l = checkSet.length; i < l; i++) {
                var elem = checkSet[i];
                if (elem) {
                    if (sibDir && elem.nodeType === 1) {
                        elem.sizcache = doneName;
                        elem.sizset = i
                    }
                    elem = elem[dir];
                    var match = false;
                    while (elem) {
                        if (elem.sizcache === doneName) {
                            match = checkSet[elem.sizset];
                            break
                        }
                        if (elem.nodeType === 1) {
                            if (!isXML) {
                                elem.sizcache = doneName;
                                elem.sizset = i
                            }
                            if (typeof cur !== "string") {
                                if (elem === cur) {
                                    match = true;
                                    break
                                }
                            } else {
                                if (Sizzle.filter(cur, [elem]).length > 0) {
                                    match = elem;
                                    break
                                }
                            }
                        }
                        elem = elem[dir]
                    }
                    checkSet[i] = match
                }
            }
        }
        var contains = document.compareDocumentPosition ?
        function (a, b) {
            return a.compareDocumentPosition(b) & 16
        } : function (a, b) {
            return a !== b && (a.contains ? a.contains(b) : true)
        };
        var isXML = function (elem) {
            return elem.nodeType === 9 && elem.documentElement.nodeName !== "HTML" || !! elem.ownerDocument && isXML(elem.ownerDocument)
        };
        var posProcess = function (selector, context) {
            var tmpSet = [],
                later = "",
                match, root = context.nodeType ? [context] : context;
            while ((match = Expr.match.PSEUDO.exec(selector))) {
                later += match[0];
                selector = selector.replace(Expr.match.PSEUDO, "")
            }
            selector = Expr.relative[selector] ? selector + "*" : selector;
            for (var i = 0, l = root.length; i < l; i++) {
                Sizzle(selector, root[i], tmpSet)
            }
            return Sizzle.filter(later, tmpSet)
        };
        jQuery.find = Sizzle;
        jQuery.filter = Sizzle.filter;
        jQuery.expr = Sizzle.selectors;
        jQuery.expr[":"] = jQuery.expr.filters;
        Sizzle.selectors.filters.hidden = function (elem) {
            return elem.offsetWidth === 0 || elem.offsetHeight === 0
        };
        Sizzle.selectors.filters.visible = function (elem) {
            return elem.offsetWidth > 0 || elem.offsetHeight > 0
        };
        Sizzle.selectors.filters.animated = function (elem) {
            return jQuery.grep(jQuery.timers, function (fn) {
                return elem === fn.elem
            }).length
        };
        jQuery.multiFilter = function (expr, elems, not) {
            if (not) {
                expr = ":not(" + expr + ")"
            }
            return Sizzle.matches(expr, elems)
        };
        jQuery.dir = function (elem, dir) {
            var matched = [],
                cur = elem[dir];
            while (cur && cur != document) {
                if (cur.nodeType == 1) {
                    matched.push(cur)
                }
                cur = cur[dir]
            }
            return matched
        };
        jQuery.nth = function (cur, result, dir, elem) {
            result = result || 1;
            var num = 0;
            for (; cur; cur = cur[dir]) {
                if (cur.nodeType == 1 && ++num == result) {
                    break
                }
            }
            return cur
        };
        jQuery.sibling = function (n, elem) {
            var r = [];
            for (; n; n = n.nextSibling) {
                if (n.nodeType == 1 && n != elem) {
                    r.push(n)
                }
            }
            return r
        };
        return;
        window.Sizzle = Sizzle
    })();
    jQuery.event = {
        add: function (elem, types, handler, data) {
            if (elem.nodeType == 3 || elem.nodeType == 8) {
                return
            }
            if (elem.setInterval && elem != window) {
                elem = window
            }
            if (!handler.guid) {
                handler.guid = this.guid++
            }
            if (data !== undefined) {
                var fn = handler;
                handler = this.proxy(fn);
                handler.data = data
            }
            var events = jQuery.data(elem, "events") || jQuery.data(elem, "events", {}),
                handle = jQuery.data(elem, "handle") || jQuery.data(elem, "handle", function () {
                    return typeof jQuery !== "undefined" && !jQuery.event.triggered ? jQuery.event.handle.apply(arguments.callee.elem, arguments) : undefined
                });
            handle.elem = elem;
            jQuery.each(types.split(/\s+/), function (index, type) {
                var namespaces = type.split(".");
                type = namespaces.shift();
                handler.type = namespaces.slice().sort().join(".");
                var handlers = events[type];
                if (jQuery.event.specialAll[type]) {
                    jQuery.event.specialAll[type].setup.call(elem, data, namespaces)
                }
                if (!handlers) {
                    handlers = events[type] = {};
                    if (!jQuery.event.special[type] || jQuery.event.special[type].setup.call(elem, data, namespaces) === false) {
                        if (elem.addEventListener) {
                            elem.addEventListener(type, handle, false)
                        } else {
                            if (elem.attachEvent) {
                                elem.attachEvent("on" + type, handle)
                            }
                        }
                    }
                }
                handlers[handler.guid] = handler;
                jQuery.event.global[type] = true
            });
            elem = null
        },
        guid: 1,
        global: {},
        remove: function (elem, types, handler) {
            if (elem.nodeType == 3 || elem.nodeType == 8) {
                return
            }
            var events = jQuery.data(elem, "events"),
                ret, index;
            if (events) {
                if (types === undefined || (typeof types === "string" && types.charAt(0) == ".")) {
                    for (var type in events) {
                        this.remove(elem, type + (types || ""))
                    }
                } else {
                    if (types.type) {
                        handler = types.handler;
                        types = types.type
                    }
                    jQuery.each(types.split(/\s+/), function (index, type) {
                        var namespaces = type.split(".");
                        type = namespaces.shift();
                        var namespace = RegExp("(^|\\.)" + namespaces.slice().sort().join(".*\\.") + "(\\.|$)");
                        if (events[type]) {
                            if (handler) {
                                delete events[type][handler.guid]
                            } else {
                                for (var handle in events[type]) {
                                    if (namespace.test(events[type][handle].type)) {
                                        delete events[type][handle]
                                    }
                                }
                            }
                            if (jQuery.event.specialAll[type]) {
                                jQuery.event.specialAll[type].teardown.call(elem, namespaces)
                            }
                            for (ret in events[type]) {
                                break
                            }
                            if (!ret) {
                                if (!jQuery.event.special[type] || jQuery.event.special[type].teardown.call(elem, namespaces) === false) {
                                    if (elem.removeEventListener) {
                                        elem.removeEventListener(type, jQuery.data(elem, "handle"), false)
                                    } else {
                                        if (elem.detachEvent) {
                                            elem.detachEvent("on" + type, jQuery.data(elem, "handle"))
                                        }
                                    }
                                }
                                ret = null;
                                delete events[type]
                            }
                        }
                    })
                }
                for (ret in events) {
                    break
                }
                if (!ret) {
                    var handle = jQuery.data(elem, "handle");
                    if (handle) {
                        handle.elem = null
                    }
                    jQuery.removeData(elem, "events");
                    jQuery.removeData(elem, "handle")
                }
            }
        },
        trigger: function (event, data, elem, bubbling) {
            var type = event.type || event;
            if (!bubbling) {
                event = typeof event === "object" ? event[expando] ? event : jQuery.extend(jQuery.Event(type), event) : jQuery.Event(type);
                if (type.indexOf("!") >= 0) {
                    event.type = type = type.slice(0, -1);
                    event.exclusive = true
                }
                if (!elem) {
                    event.stopPropagation();
                    if (this.global[type]) {
                        jQuery.each(jQuery.cache, function () {
                            if (this.events && this.events[type]) {
                                jQuery.event.trigger(event, data, this.handle.elem)
                            }
                        })
                    }
                }
                if (!elem || elem.nodeType == 3 || elem.nodeType == 8) {
                    return undefined
                }
                event.result = undefined;
                event.target = elem;
                data = jQuery.makeArray(data);
                data.unshift(event)
            }
            event.currentTarget = elem;
            var handle = jQuery.data(elem, "handle");
            if (handle) {
                handle.apply(elem, data)
            }
            if ((!elem[type] || (jQuery.nodeName(elem, "a") && type == "click")) && elem["on" + type] && elem["on" + type].apply(elem, data) === false) {
                event.result = false
            }
            if (!bubbling && elem[type] && !event.isDefaultPrevented() && !(jQuery.nodeName(elem, "a") && type == "click")) {
                this.triggered = true;
                try {
                    elem[type]()
                } catch (e) {}
            }
            this.triggered = false;
            if (!event.isPropagationStopped()) {
                var parent = elem.parentNode || elem.ownerDocument;
                if (parent) {
                    jQuery.event.trigger(event, data, parent, true)
                }
            }
        },
        handle: function (event) {
            var all, handlers;
            event = arguments[0] = jQuery.event.fix(event || window.event);
            event.currentTarget = this;
            var namespaces = event.type.split(".");
            event.type = namespaces.shift();
            all = !namespaces.length && !event.exclusive;
            var namespace = RegExp("(^|\\.)" + namespaces.slice().sort().join(".*\\.") + "(\\.|$)");
            handlers = (jQuery.data(this, "events") || {})[event.type];
            for (var j in handlers) {
                var handler = handlers[j];
                if (all || namespace.test(handler.type)) {
                    event.handler = handler;
                    event.data = handler.data;
                    var ret = handler.apply(this, arguments);
                    if (ret !== undefined) {
                        event.result = ret;
                        if (ret === false) {
                            event.preventDefault();
                            event.stopPropagation()
                        }
                    }
                    if (event.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 (event) {
            if (event[expando]) {
                return event
            }
            var originalEvent = event;
            event = jQuery.Event(originalEvent);
            for (var i = this.props.length, prop; i;) {
                prop = this.props[--i];
                event[prop] = originalEvent[prop]
            }
            if (!event.target) {
                event.target = event.srcElement || document
            }
            if (event.target.nodeType == 3) {
                event.target = event.target.parentNode
            }
            if (!event.relatedTarget && event.fromElement) {
                event.relatedTarget = event.fromElement == event.target ? event.toElement : event.fromElement
            }
            if (event.pageX == null && event.clientX != null) {
                var doc = document.documentElement,
                    body = document.body;
                event.pageX = event.clientX + (doc && doc.scrollLeft || body && body.scrollLeft || 0) - (doc.clientLeft || 0);
                event.pageY = event.clientY + (doc && doc.scrollTop || body && body.scrollTop || 0) - (doc.clientTop || 0)
            }
            if (!event.which && ((event.charCode || event.charCode === 0) ? event.charCode : event.keyCode)) {
                event.which = event.charCode || event.keyCode
            }
            if (!event.metaKey && event.ctrlKey) {
                event.metaKey = event.ctrlKey
            }
            if (!event.which && event.button) {
                event.which = (event.button & 1 ? 1 : (event.button & 2 ? 3 : (event.button & 4 ? 2 : 0)))
            }
            return event
        },
        proxy: function (fn, proxy) {
            proxy = proxy ||
            function () {
                return fn.apply(this, arguments)
            };
            proxy.guid = fn.guid = fn.guid || proxy.guid || this.guid++;
            return proxy
        },
        special: {
            ready: {
                setup: bindReady,
                teardown: function () {}
            }
        },
        specialAll: {
            live: {
                setup: function (selector, namespaces) {
                    jQuery.event.add(this, namespaces[0], liveHandler)
                },
                teardown: function (namespaces) {
                    if (namespaces.length) {
                        var remove = 0,
                            name = RegExp("(^|\\.)" + namespaces[0] + "(\\.|$)");
                        jQuery.each((jQuery.data(this, "events").live || {}), function () {
                            if (name.test(this.type)) {
                                remove++
                            }
                        });
                        if (remove < 1) {
                            jQuery.event.remove(this, namespaces[0], liveHandler)
                        }
                    }
                }
            }
        }
    };
    jQuery.Event = function (src) {
        if (!this.preventDefault) {
            return new jQuery.Event(src)
        }
        if (src && src.type) {
            this.originalEvent = src;
            this.type = src.type
        } else {
            this.type = src
        }
        this.timeStamp = now();
        this[expando] = true
    };

    function returnFalse() {
        return false
    }
    function returnTrue() {
        return true
    }
    jQuery.Event.prototype = {
        preventDefault: function () {
            this.isDefaultPrevented = returnTrue;
            var e = this.originalEvent;
            if (!e) {
                return
            }
            if (e.preventDefault) {
                e.preventDefault()
            }
            e.returnValue = false
        },
        stopPropagation: function () {
            this.isPropagationStopped = returnTrue;
            var e = this.originalEvent;
            if (!e) {
                return
            }
            if (e.stopPropagation) {
                e.stopPropagation()
            }
            e.cancelBubble = true
        },
        stopImmediatePropagation: function () {
            this.isImmediatePropagationStopped = returnTrue;
            this.stopPropagation()
        },
        isDefaultPrevented: returnFalse,
        isPropagationStopped: returnFalse,
        isImmediatePropagationStopped: returnFalse
    };
    var withinElement = function (event) {
        var parent = event.relatedTarget;
        while (parent && parent != this) {
            try {
                parent = parent.parentNode
            } catch (e) {
                parent = this
            }
        }
        if (parent != this) {
            event.type = event.data;
            jQuery.event.handle.apply(this, arguments)
        }
    };
    jQuery.each({
        mouseover: "mouseenter",
        mouseout: "mouseleave"
    }, function (orig, fix) {
        jQuery.event.special[fix] = {
            setup: function () {
                jQuery.event.add(this, orig, withinElement, fix)
            },
            teardown: function () {
                jQuery.event.remove(this, orig, withinElement)
            }
        }
    });
    jQuery.fn.extend({
        bind: function (type, data, fn) {
            return type == "unload" ? this.one(type, data, fn) : this.each(function () {
                jQuery.event.add(this, type, fn || data, fn && data)
            })
        },
        one: function (type, data, fn) {
            var one = jQuery.event.proxy(fn || data, function (event) {
                jQuery(this).unbind(event, one);
                return (fn || data).apply(this, arguments)
            });
            return this.each(function () {
                jQuery.event.add(this, type, one, fn && data)
            })
        },
        unbind: function (type, fn) {
            return this.each(function () {
                jQuery.event.remove(this, type, fn)
            })
        },
        trigger: function (type, data) {
            return this.each(function () {
                jQuery.event.trigger(type, data, this)
            })
        },
        triggerHandler: function (type, data) {
            if (this[0]) {
                var event = jQuery.Event(type);
                event.preventDefault();
                event.stopPropagation();
                jQuery.event.trigger(event, data, this[0]);
                return event.result
            }
        },
        toggle: function (fn) {
            var args = arguments,
                i = 1;
            while (i < args.length) {
                jQuery.event.proxy(fn, args[i++])
            }
            return this.click(jQuery.event.proxy(fn, function (event) {
                this.lastToggle = (this.lastToggle || 0) % i;
                event.preventDefault();
                return args[this.lastToggle++].apply(this, arguments) || false
            }))
        },
        hover: function (fnOver, fnOut) {
            return this.mouseenter(fnOver).mouseleave(fnOut)
        },
        ready: function (fn) {
            bindReady();
            if (jQuery.isReady) {
                fn.call(document, jQuery)
            } else {
                jQuery.readyList.push(fn)
            }
            return this
        },
        live: function (type, fn) {
            var proxy = jQuery.event.proxy(fn);
            proxy.guid += this.selector + type;
            jQuery(document).bind(liveConvert(type, this.selector), this.selector, proxy);
            return this
        },
        die: function (type, fn) {
            jQuery(document).unbind(liveConvert(type, this.selector), fn ? {
                guid: fn.guid + this.selector + type
            } : null);
            return this
        }
    });

    function liveHandler(event) {
        var check = RegExp("(^|\\.)" + event.type + "(\\.|$)"),
            stop = true,
            elems = [];
        jQuery.each(jQuery.data(this, "events").live || [], function (i, fn) {
            if (check.test(fn.type)) {
                var elem = jQuery(event.target).closest(fn.data)[0];
                if (elem) {
                    elems.push({
                        elem: elem,
                        fn: fn
                    })
                }
            }
        });
        elems.sort(function (a, b) {
            return jQuery.data(a.elem, "closest") - jQuery.data(b.elem, "closest")
        });
        jQuery.each(elems, function () {
            if (this.fn.call(this.elem, event, this.fn.data) === false) {
                return (stop = false)
            }
        });
        return stop
    }
    function liveConvert(type, selector) {
        return ["live", type, selector.replace(/\./g, "`").replace(/ /g, "|")].join(".")
    }
    jQuery.extend({
        isReady: false,
        readyList: [],
        ready: function () {
            if (!jQuery.isReady) {
                jQuery.isReady = true;
                if (jQuery.readyList) {
                    jQuery.each(jQuery.readyList, function () {
                        this.call(document, jQuery)
                    });
                    jQuery.readyList = null
                }
                jQuery(document).triggerHandler("ready")
            }
        }
    });
    var readyBound = false;

    function bindReady() {
        if (readyBound) {
            return
        }
        readyBound = true;
        if (document.addEventListener) {
            document.addEventListener("DOMContentLoaded", function () {
                document.removeEventListener("DOMContentLoaded", arguments.callee, false);
                jQuery.ready()
            }, false)
        } else {
            if (document.attachEvent) {
                document.attachEvent("onreadystatechange", function () {
                    if (document.readyState === "complete") {
                        document.detachEvent("onreadystatechange", arguments.callee);
                        jQuery.ready()
                    }
                });
                if (document.documentElement.doScroll && window == window.top) {
                    (function () {
                        if (jQuery.isReady) {
                            return
                        }
                        try {
                            document.documentElement.doScroll("left")
                        } catch (error) {
                            setTimeout(arguments.callee, 0);
                            return
                        }
                        jQuery.ready()
                    })()
                }
            }
        }
        jQuery.event.add(window, "load", jQuery.ready)
    }
    jQuery.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 (i, name) {
        jQuery.fn[name] = function (fn) {
            return fn ? this.bind(name, fn) : this.trigger(name)
        }
    });
    jQuery(window).bind("unload", function () {
        for (var id in jQuery.cache) {
            if (id != 1 && jQuery.cache[id].handle) {
                jQuery.event.remove(jQuery.cache[id].handle.elem)
            }
        }
    });
    (function () {
        jQuery.support = {};
        var root = document.documentElement,
            script = document.createElement("script"),
            div = document.createElement("div"),
            id = "script" + (new Date).getTime();
        div.style.display = "none";
        div.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 all = div.getElementsByTagName("*"),
            a = div.getElementsByTagName("a")[0];
        if (!all || !all.length || !a) {
            return
        }
        jQuery.support = {
            leadingWhitespace: div.firstChild.nodeType == 3,
            tbody: !div.getElementsByTagName("tbody").length,
            objectAll: !! div.getElementsByTagName("object")[0].getElementsByTagName("*").length,
            htmlSerialize: !! div.getElementsByTagName("link").length,
            style: /red/.test(a.getAttribute("style")),
            hrefNormalized: a.getAttribute("href") === "/a",
            opacity: a.style.opacity === "0.5",
            cssFloat: !! a.style.cssFloat,
            scriptEval: false,
            noCloneEvent: true,
            boxModel: null
        };
        script.type = "text/javascript";
        try {
            script.appendChild(document.createTextNode("window." + id + "=1;"))
        } catch (e) {}
        root.insertBefore(script, root.firstChild);
        if (window[id]) {
            jQuery.support.scriptEval = true;
            delete window[id]
        }
        root.removeChild(script);
        if (div.attachEvent && div.fireEvent) {
            div.attachEvent("onclick", function () {
                jQuery.support.noCloneEvent = false;
                div.detachEvent("onclick", arguments.callee)
            });
            div.cloneNode(true).fireEvent("onclick")
        }
        jQuery(function () {
            var div = document.createElement("div");
            div.style.width = div.style.paddingLeft = "1px";
            document.body.appendChild(div);
            jQuery.boxModel = jQuery.support.boxModel = div.offsetWidth === 2;
            document.body.removeChild(div).style.display = "none"
        })
    })();
    var styleFloat = jQuery.support.cssFloat ? "cssFloat" : "styleFloat";
    jQuery.props = {
        "for": "htmlFor",
        "class": "className",
        "float": styleFloat,
        cssFloat: styleFloat,
        styleFloat: styleFloat,
        readonly: "readOnly",
        maxlength: "maxLength",
        cellspacing: "cellSpacing",
        rowspan: "rowSpan",
        tabindex: "tabIndex"
    };
    jQuery.fn.extend({
        _load: jQuery.fn.load,
        load: function (url, params, callback) {
            if (typeof url !== "string") {
                return this._load(url)
            }
            var off = url.indexOf(" ");
            if (off >= 0) {
                var selector = url.slice(off, url.length);
                url = url.slice(0, off)
            }
            var type = "GET";
            if (params) {
                if (jQuery.isFunction(params)) {
                    callback = params;
                    params = null
                } else {
                    if (typeof params === "object") {
                        params = jQuery.param(params);
                        type = "POST"
                    }
                }
            }
            var self = this;
            jQuery.ajax({
                url: url,
                type: type,
                dataType: "html",
                data: params,
                complete: function (res, status) {
                    if (status == "success" || status == "notmodified") {
                        self.html(selector ? jQuery("<div/>").append(res.responseText.replace(/<script(.|\s)*?\/script>/g, "")).find(selector) : res.responseText)
                    }
                    if (callback) {
                        self.each(callback, [res.responseText, status, res])
                    }
                }
            });
            return this
        },
        serialize: function () {
            return jQuery.param(this.serializeArray())
        },
        serializeArray: function () {
            return this.map(function () {
                return this.elements ? jQuery.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 (i, elem) {
                var val = jQuery(this).val();
                return val == null ? null : jQuery.isArray(val) ? jQuery.map(val, function (val, i) {
                    return {
                        name: elem.name,
                        value: val
                    }
                }) : {
                    name: elem.name,
                    value: val
                }
            }).get()
        }
    });
    jQuery.each("ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess,ajaxSend".split(","), function (i, o) {
        jQuery.fn[o] = function (f) {
            return this.bind(o, f)
        }
    });
    var jsc = now();
    jQuery.extend({
        get: function (url, data, callback, type) {
            if (jQuery.isFunction(data)) {
                callback = data;
                data = null
            }
            return jQuery.ajax({
                type: "GET",
                url: url,
                data: data,
                success: callback,
                dataType: type
            })
        },
        getScript: function (url, callback) {
            return jQuery.get(url, null, callback, "script")
        },
        getJSON: function (url, data, callback) {
            return jQuery.get(url, data, callback, "json")
        },
        post: function (url, data, callback, type) {
            if (jQuery.isFunction(data)) {
                callback = data;
                data = {}
            }
            return jQuery.ajax({
                type: "POST",
                url: url,
                data: data,
                success: callback,
                dataType: type
            })
        },
        ajaxSetup: function (settings) {
            jQuery.extend(jQuery.ajaxSettings, settings)
        },
        ajaxSettings: {
            url: location.href,
            global: true,
            type: "GET",
            contentType: "application/x-www-form-urlencoded",
            processData: true,
            async: true,
            xhr: function () {
                return window.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 (s) {
            s = jQuery.extend(true, s, jQuery.extend(true, {}, jQuery.ajaxSettings, s));
            var jsonp, jsre = /=\?(&|$)/g,
                status, data, type = s.type.toUpperCase();
            if (s.data && s.processData && typeof s.data !== "string") {
                s.data = jQuery.param(s.data)
            }
            if (s.dataType == "jsonp") {
                if (type == "GET") {
                    if (!s.url.match(jsre)) {
                        s.url += (s.url.match(/\?/) ? "&" : "?") + (s.jsonp || "callback") + "=?"
                    }
                } else {
                    if (!s.data || !s.data.match(jsre)) {
                        s.data = (s.data ? s.data + "&" : "") + (s.jsonp || "callback") + "=?"
                    }
                }
                s.dataType = "json"
            }
            if (s.dataType == "json" && (s.data && s.data.match(jsre) || s.url.match(jsre))) {
                jsonp = "jsonp" + jsc++;
                if (s.data) {
                    s.data = (s.data + "").replace(jsre, "=" + jsonp + "$1")
                }
                s.url = s.url.replace(jsre, "=" + jsonp + "$1");
                s.dataType = "script";
                window[jsonp] = function (tmp) {
                    data = tmp;
                    success();
                    complete();
                    window[jsonp] = undefined;
                    try {
                        delete window[jsonp]
                    } catch (e) {}
                    if (head) {
                        head.removeChild(script)
                    }
                }
            }
            if (s.dataType == "script" && s.cache == null) {
                s.cache = false
            }
            if (s.cache === false && type == "GET") {
                var ts = now();
                var ret = s.url.replace(/(\?|&)_=.*?(&|$)/, "$1_=" + ts + "$2");
                s.url = ret + ((ret == s.url) ? (s.url.match(/\?/) ? "&" : "?") + "_=" + ts : "")
            }
            if (s.data && type == "GET") {
                s.url += (s.url.match(/\?/) ? "&" : "?") + s.data;
                s.data = null
            }
            if (s.global && !jQuery.active++) {
                jQuery.event.trigger("ajaxStart")
            }
            var parts = /^(\w+:)?\/\/([^\/?#]+)/.exec(s.url);
            if (s.dataType == "script" && type == "GET" && parts && (parts[1] && parts[1] != location.protocol || parts[2] != location.host)) {
                var head = document.getElementsByTagName("head")[0];
                var script = document.createElement("script");
                script.src = s.url;
                if (s.scriptCharset) {
                    script.charset = s.scriptCharset
                }
                if (!jsonp) {
                    var done = false;
                    script.onload = script.onreadystatechange = function () {
                        if (!done && (!this.readyState || this.readyState == "loaded" || this.readyState == "complete")) {
                            done = true;
                            success();
                            complete();
                            script.onload = script.onreadystatechange = null;
                            head.removeChild(script)
                        }
                    }
                }
                head.appendChild(script);
                return undefined
            }
            var requestDone = false;
            var xhr = s.xhr();
            if (s.username) {
                xhr.open(type, s.url, s.async, s.username, s.password)
            } else {
                xhr.open(type, s.url, s.async)
            }
            try {
                if (s.data) {
                    xhr.setRequestHeader("Content-Type", s.contentType)
                }
                if (s.ifModified) {
                    xhr.setRequestHeader("If-Modified-Since", jQuery.lastModified[s.url] || "Thu, 01 Jan 1970 00:00:00 GMT")
                }
                xhr.setRequestHeader("X-Requested-With", "XMLHttpRequest");
                xhr.setRequestHeader("Accept", s.dataType && s.accepts[s.dataType] ? s.accepts[s.dataType] + ", */*" : s.accepts._default)
            } catch (e) {}
            if (s.beforeSend && s.beforeSend(xhr, s) === false) {
                if (s.global && !--jQuery.active) {
                    jQuery.event.trigger("ajaxStop")
                }
                xhr.abort();
                return false
            }
            if (s.global) {
                jQuery.event.trigger("ajaxSend", [xhr, s])
            }
            var onreadystatechange = function (isTimeout) {
                if (xhr.readyState == 0) {
                    if (ival) {
                        clearInterval(ival);
                        ival = null;
                        if (s.global && !--jQuery.active) {
                            jQuery.event.trigger("ajaxStop")
                        }
                    }
                } else {
                    if (!requestDone && xhr && (xhr.readyState == 4 || isTimeout == "timeout")) {
                        requestDone = true;
                        if (ival) {
                            clearInterval(ival);
                            ival = null
                        }
                        status = isTimeout == "timeout" ? "timeout" : !jQuery.httpSuccess(xhr) ? "error" : s.ifModified && jQuery.httpNotModified(xhr, s.url) ? "notmodified" : "success";
                        if (status == "success") {
                            try {
                                data = jQuery.httpData(xhr, s.dataType, s)
                            } catch (e) {
                                status = "parsererror"
                            }
                        }
                        if (status == "success") {
                            var modRes;
                            try {
                                modRes = xhr.getResponseHeader("Last-Modified")
                            } catch (e) {}
                            if (s.ifModified && modRes) {
                                jQuery.lastModified[s.url] = modRes
                            }
                            if (!jsonp) {
                                success()
                            }
                        } else {
                            jQuery.handleError(s, xhr, status)
                        }
                        complete();
                        if (isTimeout) {
                            xhr.abort()
                        }
                        if (s.async) {
                            xhr = null
                        }
                    }
                }
            };
            if (s.async) {
                var ival = setInterval(onreadystatechange, 13);
                if (s.timeout > 0) {
                    setTimeout(function () {
                        if (xhr && !requestDone) {
                            onreadystatechange("timeout")
                        }
                    }, s.timeout)
                }
            }
            try {
                xhr.send(s.data)
            } catch (e) {
                jQuery.handleError(s, xhr, null, e)
            }
            if (!s.async) {
                onreadystatechange()
            }
            function success() {
                if (s.success) {
                    s.success(data, status)
                }
                if (s.global) {
                    jQuery.event.trigger("ajaxSuccess", [xhr, s])
                }
            }
            function complete() {
                if (s.complete) {
                    s.complete(xhr, status)
                }
                if (s.global) {
                    jQuery.event.trigger("ajaxComplete", [xhr, s])
                }
                if (s.global && !--jQuery.active) {
                    jQuery.event.trigger("ajaxStop")
                }
            }
            return xhr
        },
        handleError: function (s, xhr, status, e) {
            if (s.error) {
                s.error(xhr, status, e)
            }
            if (s.global) {
                jQuery.event.trigger("ajaxError", [xhr, s, e])
            }
        },
        active: 0,
        httpSuccess: function (xhr) {
            try {
                return !xhr.status && location.protocol == "file:" || (xhr.status >= 200 && xhr.status < 300) || xhr.status == 304 || xhr.status == 1223
            } catch (e) {}
            return false
        },
        httpNotModified: function (xhr, url) {
            try {
                var xhrRes = xhr.getResponseHeader("Last-Modified");
                return xhr.status == 304 || xhrRes == jQuery.lastModified[url]
            } catch (e) {}
            return false
        },
        httpData: function (xhr, type, s) {
            var ct = xhr.getResponseHeader("content-type"),
                xml = type == "xml" || !type && ct && ct.indexOf("xml") >= 0,
                data = xml ? xhr.responseXML : xhr.responseText;
            if (xml && data.documentElement.tagName == "parsererror") {
                throw "parsererror"
            }
            if (s && s.dataFilter) {
                data = s.dataFilter(data, type)
            }
            if (typeof data === "string") {
                if (type == "script") {
                    jQuery.globalEval(data)
                }
                if (type == "json") {
                    data = window["eval"]("(" + data + ")")
                }
            }
            return data
        },
        param: function (a) {
            var s = [];

            function add(key, value) {
                s[s.length] = encodeURIComponent(key) + "=" + encodeURIComponent(value)
            }
            if (jQuery.isArray(a) || a.jquery) {
                jQuery.each(a, function () {
                    add(this.name, this.value)
                })
            } else {
                for (var j in a) {
                    if (jQuery.isArray(a[j])) {
                        jQuery.each(a[j], function () {
                            add(j, this)
                        })
                    } else {
                        add(j, jQuery.isFunction(a[j]) ? a[j]() : a[j])
                    }
                }
            }
            return s.join("&").replace(/%20/g, "+")
        }
    });
    var elemdisplay = {},
        timerId, fxAttrs = [
            ["height", "marginTop", "marginBottom", "paddingTop", "paddingBottom"],
            ["width", "marginLeft", "marginRight", "paddingLeft", "paddingRight"],
            ["opacity"]
        ];

    function genFx(type, num) {
        var obj = {};
        jQuery.each(fxAttrs.concat.apply([], fxAttrs.slice(0, num)), function () {
            obj[this] = type
        });
        return obj
    }
    jQuery.fn.extend({
        show: function (speed, callback) {
            if (speed) {
                return this.animate(genFx("show", 3), speed, callback)
            } else {
                for (var i = 0, l = this.length; i < l; i++) {
                    var old = jQuery.data(this[i], "olddisplay");
                    this[i].style.display = old || "";
                    if (jQuery.css(this[i], "display") === "none") {
                        var tagName = this[i].tagName,
                            display;
                        if (elemdisplay[tagName]) {
                            display = elemdisplay[tagName]
                        } else {
                            var elem = jQuery("<" + tagName + " />").appendTo("body");
                            display = elem.css("display");
                            if (display === "none") {
                                display = "block"
                            }
                            elem.remove();
                            elemdisplay[tagName] = display
                        }
                        jQuery.data(this[i], "olddisplay", display)
                    }
                }
                for (var i = 0, l = this.length; i < l; i++) {
                    this[i].style.display = jQuery.data(this[i], "olddisplay") || ""
                }
                return this
            }
        },
        hide: function (speed, callback) {
            if (speed) {
                return this.animate(genFx("hide", 3), speed, callback)
            } else {
                for (var i = 0, l = this.length; i < l; i++) {
                    var old = jQuery.data(this[i], "olddisplay");
                    if (!old && old !== "none") {
                        jQuery.data(this[i], "olddisplay", jQuery.css(this[i], "display"))
                    }
                }
                for (var i = 0, l = this.length; i < l; i++) {
                    this[i].style.display = "none"
                }
                return this
            }
        },
        _toggle: jQuery.fn.toggle,
        toggle: function (fn, fn2) {
            var bool = typeof fn === "boolean";
            return jQuery.isFunction(fn) && jQuery.isFunction(fn2) ? this._toggle.apply(this, arguments) : fn == null || bool ? this.each(function () {
                var state = bool ? fn : jQuery(this).is(":hidden");
                jQuery(this)[state ? "show" : "hide"]()
            }) : this.animate(genFx("toggle", 3), fn, fn2)
        },
        fadeTo: function (speed, to, callback) {
            return this.animate({
                opacity: to
            }, speed, callback)
        },
        animate: function (prop, speed, easing, callback) {
            var optall = jQuery.speed(speed, easing, callback);
            return this[optall.queue === false ? "each" : "queue"](function () {
                var opt = jQuery.extend({}, optall),
                    p, hidden = this.nodeType == 1 && jQuery(this).is(":hidden"),
                    self = this;
                for (p in prop) {
                    if (prop[p] == "hide" && hidden || prop[p] == "show" && !hidden) {
                        return opt.complete.call(this)
                    }
                    if ((p == "height" || p == "width") && this.style) {
                        opt.display = jQuery.css(this, "display");
                        opt.overflow = this.style.overflow
                    }
                }
                if (opt.overflow != null) {
                    this.style.overflow = "hidden"
                }
                opt.curAnim = jQuery.extend({}, prop);
                jQuery.each(prop, function (name, val) {
                    var e = new jQuery.fx(self, opt, name);
                    if (/toggle|show|hide/.test(val)) {
                        e[val == "toggle" ? hidden ? "show" : "hide" : val](prop)
                    } else {
                        var parts = val.toString().match(/^([+-]=)?([\d+-.]+)(.*)$/),
                            start = e.cur(true) || 0;
                        if (parts) {
                            var end = parseFloat(parts[2]),
                                unit = parts[3] || "px";
                            if (unit != "px") {
                                self.style[name] = (end || 1) + unit;
                                start = ((end || 1) / e.cur(true)) * start;
                                self.style[name] = start + unit
                            }
                            if (parts[1]) {
                                end = ((parts[1] == "-=" ? -1 : 1) * end) + start
                            }
                            e.custom(start, end, unit)
                        } else {
                            e.custom(start, val, "")
                        }
                    }
                });
                return true
            })
        },
        stop: function (clearQueue, gotoEnd) {
            var timers = jQuery.timers;
            if (clearQueue) {
                this.queue([])
            }
            this.each(function () {
                for (var i = timers.length - 1; i >= 0; i--) {
                    if (timers[i].elem == this) {
                        if (gotoEnd) {
                            timers[i](true)
                        }
                        timers.splice(i, 1)
                    }
                }
            });
            if (!gotoEnd) {
                this.dequeue()
            }
            return this
        }
    });
    jQuery.each({
        slideDown: genFx("show", 1),
        slideUp: genFx("hide", 1),
        slideToggle: genFx("toggle", 1),
        fadeIn: {
            opacity: "show"
        },
        fadeOut: {
            opacity: "hide"
        }
    }, function (name, props) {
        jQuery.fn[name] = function (speed, callback) {
            return this.animate(props, speed, callback)
        }
    });
    jQuery.extend({
        speed: function (speed, easing, fn) {
            var opt = typeof speed === "object" ? speed : {
                complete: fn || !fn && easing || jQuery.isFunction(speed) && speed,
                duration: speed,
                easing: fn && easing || easing && !jQuery.isFunction(easing) && easing
            };
            opt.duration = jQuery.fx.off ? 0 : typeof opt.duration === "number" ? opt.duration : jQuery.fx.speeds[opt.duration] || jQuery.fx.speeds._default;
            opt.old = opt.complete;
            opt.complete = function () {
                if (opt.queue !== false) {
                    jQuery(this).dequeue()
                }
                if (jQuery.isFunction(opt.old)) {
                    opt.old.call(this)
                }
            };
            return opt
        },
        easing: {
            linear: function (p, n, firstNum, diff) {
                return firstNum + diff * p
            },
            swing: function (p, n, firstNum, diff) {
                return ((-Math.cos(p * Math.PI) / 2) + 0.5) * diff + firstNum
            }
        },
        timers: [],
        fx: function (elem, options, prop) {
            this.options = options;
            this.elem = elem;
            this.prop = prop;
            if (!options.orig) {
                options.orig = {}
            }
        }
    });
    jQuery.fx.prototype = {
        update: function () {
            if (this.options.step) {
                this.options.step.call(this.elem, this.now, this)
            }(jQuery.fx.step[this.prop] || jQuery.fx.step._default)(this);
            if ((this.prop == "height" || this.prop == "width") && this.elem.style) {
                this.elem.style.display = "block"
            }
        },
        cur: function (force) {
            if (this.elem[this.prop] != null && (!this.elem.style || this.elem.style[this.prop] == null)) {
                return this.elem[this.prop]
            }
            var r = parseFloat(jQuery.css(this.elem, this.prop, force));
            return r && r > -10000 ? r : parseFloat(jQuery.curCSS(this.elem, this.prop)) || 0
        },
        custom: function (from, to, unit) {
            this.startTime = now();
            this.start = from;
            this.end = to;
            this.unit = unit || this.unit || "px";
            this.now = this.start;
            this.pos = this.state = 0;
            var self = this;

            function t(gotoEnd) {
                return self.step(gotoEnd)
            }
            t.elem = this.elem;
            if (t() && jQuery.timers.push(t) && !timerId) {
                timerId = setInterval(function () {
                    var timers = jQuery.timers;
                    for (var i = 0; i < timers.length; i++) {
                        if (!timers[i]()) {
                            timers.splice(i--, 1)
                        }
                    }
                    if (!timers.length) {
                        clearInterval(timerId);
                        timerId = undefined
                    }
                }, 13)
            }
        },
        show: function () {
            this.options.orig[this.prop] = jQuery.attr(this.elem.style, this.prop);
            this.options.show = true;
            this.custom(this.prop == "width" || this.prop == "height" ? 1 : 0, this.cur());
            jQuery(this.elem).show()
        },
        hide: function () {
            this.options.orig[this.prop] = jQuery.attr(this.elem.style, this.prop);
            this.options.hide = true;
            this.custom(this.cur(), 0)
        },
        step: function (gotoEnd) {
            var t = now();
            if (gotoEnd || t >= this.options.duration + this.startTime) {
                this.now = this.end;
                this.pos = this.state = 1;
                this.update();
                this.options.curAnim[this.prop] = true;
                var done = true;
                for (var i in this.options.curAnim) {
                    if (this.options.curAnim[i] !== true) {
                        done = false
                    }
                }
                if (done) {
                    if (this.options.display != null) {
                        this.elem.style.overflow = this.options.overflow;
                        this.elem.style.display = this.options.display;
                        if (jQuery.css(this.elem, "display") == "none") {
                            this.elem.style.display = "block"
                        }
                    }
                    if (this.options.hide) {
                        jQuery(this.elem).hide()
                    }
                    if (this.options.hide || this.options.show) {
                        for (var p in this.options.curAnim) {
                            jQuery.attr(this.elem.style, p, this.options.orig[p])
                        }
                    }
                    this.options.complete.call(this.elem)
                }
                return false
            } else {
                var n = t - this.startTime;
                this.state = n / this.options.duration;
                this.pos = jQuery.easing[this.options.easing || (jQuery.easing.swing ? "swing" : "linear")](this.state, n, 0, 1, this.options.duration);
                this.now = this.start + ((this.end - this.start) * this.pos);
                this.update()
            }
            return true
        }
    };
    jQuery.extend(jQuery.fx, {
        speeds: {
            slow: 600,
            fast: 200,
            _default: 400
        },
        step: {
            opacity: function (fx) {
                jQuery.attr(fx.elem.style, "opacity", fx.now)
            },
            _default: function (fx) {
                if (fx.elem.style && fx.elem.style[fx.prop] != null) {
                    fx.elem.style[fx.prop] = fx.now + fx.unit
                } else {
                    fx.elem[fx.prop] = fx.now
                }
            }
        }
    });
    if (document.documentElement.getBoundingClientRect) {
        jQuery.fn.offset = function () {
            if (!this[0]) {
                return {
                    top: 0,
                    left: 0
                }
            }
            if (this[0] === this[0].ownerDocument.body) {
                return jQuery.offset.bodyOffset(this[0])
            }
            var box = this[0].getBoundingClientRect(),
                doc = this[0].ownerDocument,
                body = doc.body,
                docElem = doc.documentElement,
                clientTop = docElem.clientTop || body.clientTop || 0,
                clientLeft = docElem.clientLeft || body.clientLeft || 0,
                top = box.top + (self.pageYOffset || jQuery.boxModel && docElem.scrollTop || body.scrollTop) - clientTop,
                left = box.left + (self.pageXOffset || jQuery.boxModel && docElem.scrollLeft || body.scrollLeft) - clientLeft;
            return {
                top: top,
                left: left
            }
        }
    } else {
        jQuery.fn.offset = function () {
            if (!this[0]) {
                return {
                    top: 0,
                    left: 0
                }
            }
            if (this[0] === this[0].ownerDocument.body) {
                return jQuery.offset.bodyOffset(this[0])
            }
            jQuery.offset.initialized || jQuery.offset.initialize();
            var elem = this[0],
                offsetParent = elem.offsetParent,
                prevOffsetParent = elem,
                doc = elem.ownerDocument,
                computedStyle, docElem = doc.documentElement,
                body = doc.body,
                defaultView = doc.defaultView,
                prevComputedStyle = defaultView.getComputedStyle(elem, null),
                top = elem.offsetTop,
                left = elem.offsetLeft;
            while ((elem = elem.parentNode) && elem !== body && elem !== docElem) {
                computedStyle = defaultView.getComputedStyle(elem, null);
                top -= elem.scrollTop, left -= elem.scrollLeft;
                if (elem === offsetParent) {
                    top += elem.offsetTop, left += elem.offsetLeft;
                    if (jQuery.offset.doesNotAddBorder && !(jQuery.offset.doesAddBorderForTableAndCells && /^t(able|d|h)$/i.test(elem.tagName))) {
                        top += parseInt(computedStyle.borderTopWidth, 10) || 0, left += parseInt(computedStyle.borderLeftWidth, 10) || 0
                    }
                    prevOffsetParent = offsetParent, offsetParent = elem.offsetParent
                }
                if (jQuery.offset.subtractsBorderForOverflowNotVisible && computedStyle.overflow !== "visible") {
                    top += parseInt(computedStyle.borderTopWidth, 10) || 0, left += parseInt(computedStyle.borderLeftWidth, 10) || 0
                }
                prevComputedStyle = computedStyle
            }
            if (prevComputedStyle.position === "relative" || prevComputedStyle.position === "static") {
                top += body.offsetTop, left += body.offsetLeft
            }
            if (prevComputedStyle.position === "fixed") {
                top += Math.max(docElem.scrollTop, body.scrollTop), left += Math.max(docElem.scrollLeft, body.scrollLeft)
            }
            return {
                top: top,
                left: left
            }
        }
    }
    jQuery.offset = {
        initialize: function () {
            if (this.initialized) {
                return
            }
            var body = document.body,
                container = document.createElement("div"),
                innerDiv, checkDiv, table, td, rules, prop, bodyMarginTop = body.style.marginTop,
                html = '<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>';
            rules = {
                position: "absolute",
                top: 0,
                left: 0,
                margin: 0,
                border: 0,
                width: "1px",
                height: "1px",
                visibility: "hidden"
            };
            for (prop in rules) {
                container.style[prop] = rules[prop]
            }
            container.innerHTML = html;
            body.insertBefore(container, body.firstChild);
            innerDiv = container.firstChild, checkDiv = innerDiv.firstChild, td = innerDiv.nextSibling.firstChild.firstChild;
            this.doesNotAddBorder = (checkDiv.offsetTop !== 5);
            this.doesAddBorderForTableAndCells = (td.offsetTop === 5);
            innerDiv.style.overflow = "hidden", innerDiv.style.position = "relative";
            this.subtractsBorderForOverflowNotVisible = (checkDiv.offsetTop === -5);
            body.style.marginTop = "1px";
            this.doesNotIncludeMarginInBodyOffset = (body.offsetTop === 0);
            body.style.marginTop = bodyMarginTop;
            body.removeChild(container);
            this.initialized = true
        },
        bodyOffset: function (body) {
            jQuery.offset.initialized || jQuery.offset.initialize();
            var top = body.offsetTop,
                left = body.offsetLeft;
            if (jQuery.offset.doesNotIncludeMarginInBodyOffset) {
                top += parseInt(jQuery.curCSS(body, "marginTop", true), 10) || 0, left += parseInt(jQuery.curCSS(body, "marginLeft", true), 10) || 0
            }
            return {
                top: top,
                left: left
            }
        }
    };
    jQuery.fn.extend({
        position: function () {
            var left = 0,
                top = 0,
                results;
            if (this[0]) {
                var offsetParent = this.offsetParent(),
                    offset = this.offset(),
                    parentOffset = /^body|html$/i.test(offsetParent[0].tagName) ? {
                        top: 0,
                        left: 0
                    } : offsetParent.offset();
                offset.top -= num(this, "marginTop");
                offset.left -= num(this, "marginLeft");
                parentOffset.top += num(offsetParent, "borderTopWidth");
                parentOffset.left += num(offsetParent, "borderLeftWidth");
                results = {
                    top: offset.top - parentOffset.top,
                    left: offset.left - parentOffset.left
                }
            }
            return results
        },
        offsetParent: function () {
            var offsetParent = this[0].offsetParent || document.body;
            while (offsetParent && (!/^body|html$/i.test(offsetParent.tagName) && jQuery.css(offsetParent, "position") == "static")) {
                offsetParent = offsetParent.offsetParent
            }
            return jQuery(offsetParent)
        }
    });
    jQuery.each(["Left", "Top"], function (i, name) {
        var method = "scroll" + name;
        jQuery.fn[method] = function (val) {
            if (!this[0]) {
                return null
            }
            return val !== undefined ? this.each(function () {
                this == window || this == document ? window.scrollTo(!i ? val : jQuery(window).scrollLeft(), i ? val : jQuery(window).scrollTop()) : this[method] = val
            }) : this[0] == window || this[0] == document ? self[i ? "pageYOffset" : "pageXOffset"] || jQuery.boxModel && document.documentElement[method] || document.body[method] : this[0][method]
        }
    });
    jQuery.each(["Height", "Width"], function (i, name) {
        var tl = i ? "Left" : "Top",
            br = i ? "Right" : "Bottom",
            lower = name.toLowerCase();
        jQuery.fn["inner" + name] = function () {
            return this[0] ? jQuery.css(this[0], lower, false, "padding") : null
        };
        jQuery.fn["outer" + name] = function (margin) {
            return this[0] ? jQuery.css(this[0], lower, false, margin ? "margin" : "border") : null
        };
        var type = name.toLowerCase();
        jQuery.fn[type] = function (size) {
            return this[0] == window ? document.compatMode == "CSS1Compat" && document.documentElement["client" + name] || document.body["client" + name] : this[0] == document ? Math.max(document.documentElement["client" + name], document.body["scroll" + name], document.documentElement["scroll" + name], document.body["offset" + name], document.documentElement["offset" + name]) : size === undefined ? (this.length ? jQuery.css(this[0], type) : null) : this.css(type, typeof size === "string" ? size : size + "px")
        }
    })
})();

if (typeof GVAR == "undefined" || !GVAR) {
    var GVAR = {}
}
GVAR.namespace = function () {
    var A = arguments,
        E = null,
        C, B, D;
    for (C = 0; C < A.length; C = C + 1) {
        D = A[C].split(".");
        E = GVAR;
        for (B = (D[0] == "GVAR") ? 1 : 0; B < D.length; B = B + 1) {
            E[D[B]] = E[D[B]] || {};
            E = E[D[B]]
        }
    }
    return E
};
GVAR.log = function (D, A, C) {
    var B = GVAR.widget.Logger;
    if (B && B.log) {
        return B.log(D, A, C)
    } else {
        return false
    }
};
GVAR.register = function (A, E, D) {
    var I = GVAR.env.modules;
    if (!I[A]) {
        I[A] = {
            versions: [],
            builds: []
        }
    }
    var B = I[A],
        H = D.version,
        G = D.build,
        F = GVAR.env.listeners;
    B.name = A;
    B.version = H;
    B.build = G;
    B.versions.push(H);
    B.builds.push(G);
    B.mainClass = E;
    for (var C = 0; C < F.length; C = C + 1) {
        F[C](B)
    }
    if (E) {
        E.VERSION = H;
        E.BUILD = G
    } else {
        GVAR.log("mainClass is undefined for module " + A, "warn")
    }
};
GVAR.env = GVAR.env || {
    modules: [],
    listeners: []
};
GVAR.env.getVersion = function (A) {
    return GVAR.env.modules[A] || null
};
GVAR.env.ua = function () {
    var C = {
        ie: 0,
        opera: 0,
        gecko: 0,
        webkit: 0,
        mobile: null,
        air: 0
    };
    var B = navigator.userAgent,
        A;
    if ((/KHTML/).test(B)) {
        C.webkit = 1
    }
    A = B.match(/AppleWebKit\/([^\s]*)/);
    if (A && A[1]) {
        C.webkit = parseFloat(A[1]);
        if (/ Mobile\//.test(B)) {
            C.mobile = "Apple"
        } else {
            A = B.match(/NokiaN[^\/]*/);
            if (A) {
                C.mobile = A[0]
            }
        }
        A = B.match(/AdobeAIR\/([^\s]*)/);
        if (A) {
            C.air = A[0]
        }
    }
    if (!C.webkit) {
        A = B.match(/Opera[\s\/]([^\s]*)/);
        if (A && A[1]) {
            C.opera = parseFloat(A[1]);
            A = B.match(/Opera Mini[^;]*/);
            if (A) {
                C.mobile = A[0]
            }
        } else {
            A = B.match(/MSIE\s([^;]*)/);
            if (A && A[1]) {
                C.ie = parseFloat(A[1])
            } else {
                A = B.match(/Gecko\/([^\s]*)/);
                if (A) {
                    C.gecko = 1;
                    A = B.match(/rv:([^\s\)]*)/);
                    if (A && A[1]) {
                        C.gecko = parseFloat(A[1])
                    }
                }
            }
        }
    }
    return C
}();
(function () {
    GVAR.namespace("util", "widget", "example");
    if ("undefined" !== typeof GVAR_config) {
        var B = GVAR_config.listener,
            A = GVAR.env.listeners,
            D = true,
            C;
        if (B) {
            for (C = 0; C < A.length; C = C + 1) {
                if (A[C] == B) {
                    D = false;
                    break
                }
            }
            if (D) {
                A.push(B)
            }
        }
    }
})();
GVAR.lang = GVAR.lang || {};
(function () {
    var A = GVAR.lang,
        C = ["toString", "valueOf"],
        B = {
            isArray: function (D) {
                if (D) {
                    return A.isNumber(D.length) && A.isFunction(D.splice)
                }
                return false
            },
            isBoolean: function (D) {
                return typeof D === "boolean"
            },
            isFunction: function (D) {
                return typeof D === "function"
            },
            isNull: function (D) {
                return D === null
            },
            isNumber: function (D) {
                return typeof D === "number" && isFinite(D)
            },
            isObject: function (D) {
                return (D && (typeof D === "object" || A.isFunction(D))) || false
            },
            isString: function (D) {
                return typeof D === "string"
            },
            isUndefined: function (D) {
                return typeof D === "undefined"
            },
            _IEEnumFix: (GVAR.env.ua.ie) ?
            function (F, E) {
                for (var D = 0; D < C.length; D = D + 1) {
                    var H = C[D],
                        G = E[H];
                    if (A.isFunction(G) && G != Object.prototype[H]) {
                        F[H] = G
                    }
                }
            } : function () {},
            extend: function (H, I, G) {
                if (!I || !H) {
                    throw new Error("extend failed, please check that all dependencies are included.")
                }
                var E = function () {};
                E.prototype = I.prototype;
                H.prototype = new E();
                H.prototype.constructor = H;
                H.superclass = I.prototype;
                if (I.prototype.constructor == Object.prototype.constructor) {
                    I.prototype.constructor = I
                }
                if (G) {
                    for (var D in G) {
                        if (A.hasOwnProperty(G, D)) {
                            H.prototype[D] = G[D]
                        }
                    }
                    A._IEEnumFix(H.prototype, G)
                }
            },
            augmentObject: function (H, G) {
                if (!G || !H) {
                    throw new Error("Absorb failed, verify dependencies.")
                }
                var D = arguments,
                    F, I, E = D[2];
                if (E && E !== true) {
                    for (F = 2; F < D.length; F = F + 1) {
                        H[D[F]] = G[D[F]]
                    }
                } else {
                    for (I in G) {
                        if (E || !(I in H)) {
                            H[I] = G[I]
                        }
                    }
                    A._IEEnumFix(H, G)
                }
            },
            augmentProto: function (G, F) {
                if (!F || !G) {
                    throw new Error("Augment failed, verify dependencies.")
                }
                var D = [G.prototype, F.prototype];
                for (var E = 2; E < arguments.length; E = E + 1) {
                    D.push(arguments[E])
                }
                A.augmentObject.apply(this, D)
            },
            dump: function (D, I) {
                var F, H, K = [],
                    L = "{...}",
                    E = "f(){...}",
                    J = ", ",
                    G = " => ";
                if (!A.isObject(D)) {
                    return D + ""
                } else {
                    if (D instanceof Date || ("nodeType" in D && "tagName" in D)) {
                        return D
                    } else {
                        if (A.isFunction(D)) {
                            return E
                        }
                    }
                }
                I = (A.isNumber(I)) ? I : 3;
                if (A.isArray(D)) {
                    K.push("[");
                    for (F = 0, H = D.length; F < H; F = F + 1) {
                        if (A.isObject(D[F])) {
                            K.push((I > 0) ? A.dump(D[F], I - 1) : L)
                        } else {
                            K.push(D[F])
                        }
                        K.push(J)
                    }
                    if (K.length > 1) {
                        K.pop()
                    }
                    K.push("]")
                } else {
                    K.push("{");
                    for (F in D) {
                        if (A.hasOwnProperty(D, F)) {
                            K.push(F + G);
                            if (A.isObject(D[F])) {
                                K.push((I > 0) ? A.dump(D[F], I - 1) : L)
                            } else {
                                K.push(D[F])
                            }
                            K.push(J)
                        }
                    }
                    if (K.length > 1) {
                        K.pop()
                    }
                    K.push("}")
                }
                return K.join("")
            },
            substitute: function (S, E, L) {
                var I, H, G, O, P, R, N = [],
                    F, J = "dump",
                    M = " ",
                    D = "{",
                    Q = "}";
                for (;;) {
                    I = S.lastIndexOf(D);
                    if (I < 0) {
                        break
                    }
                    H = S.indexOf(Q, I);
                    if (I + 1 >= H) {
                        break
                    }
                    F = S.substring(I + 1, H);
                    O = F;
                    R = null;
                    G = O.indexOf(M);
                    if (G > -1) {
                        R = O.substring(G + 1);
                        O = O.substring(0, G)
                    }
                    P = E[O];
                    if (L) {
                        P = L(O, P, R)
                    }
                    if (A.isObject(P)) {
                        if (A.isArray(P)) {
                            P = A.dump(P, parseInt(R, 10))
                        } else {
                            R = R || "";
                            var K = R.indexOf(J);
                            if (K > -1) {
                                R = R.substring(4)
                            }
                            if (P.toString === Object.prototype.toString || K > -1) {
                                P = A.dump(P, parseInt(R, 10))
                            } else {
                                P = P.toString()
                            }
                        }
                    } else {
                        if (!A.isString(P) && !A.isNumber(P)) {
                            P = "~-" + N.length + "-~";
                            N[N.length] = F
                        }
                    }
                    S = S.substring(0, I) + P + S.substring(H + 1)
                }
                for (I = N.length - 1; I >= 0; I = I - 1) {
                    S = S.replace(new RegExp("~-" + I + "-~"), "{" + N[I] + "}", "g")
                }
                return S
            },
            trim: function (D) {
                try {
                    return D.replace(/^\s+|\s+$/g, "")
                } catch (E) {
                    return D
                }
            },
            merge: function () {
                var G = {},
                    E = arguments;
                for (var F = 0, D = E.length; F < D; F = F + 1) {
                    A.augmentObject(G, E[F], true)
                }
                return G
            },
            later: function (K, E, L, G, H) {
                K = K || 0;
                E = E || {};
                var F = L,
                    J = G,
                    I, D;
                if (A.isString(L)) {
                    F = E[L]
                }
                if (!F) {
                    throw new TypeError("method undefined")
                }
                if (!A.isArray(J)) {
                    J = [G]
                }
                I = function () {
                    F.apply(E, J)
                };
                D = (H) ? setInterval(I, K) : setTimeout(I, K);
                return {
                    interval: H,
                    cancel: function () {
                        if (this.interval) {
                            clearInterval(D)
                        } else {
                            clearTimeout(D)
                        }
                    }
                }
            },
            isValue: function (D) {
                return (A.isObject(D) || A.isString(D) || A.isNumber(D) || A.isBoolean(D))
            }
        };
    A.hasOwnProperty = (Object.prototype.hasOwnProperty) ?
    function (D, E) {
        return D && D.hasOwnProperty(E)
    } : function (D, E) {
        return !A.isUndefined(D[E]) && D.constructor.prototype[E] !== D[E]
    };
    B.augmentObject(A, B, true);
    GVAR.util.Lang = A;
    A.augment = A.augmentProto;
    GVAR.augment = A.augmentProto;
    GVAR.extend = A.extend
})();
GVAR.register("GVAR", GVAR, {
    version: "2.5.2",
    build: "1076"
});
(function () {
    var B = GVAR.util,
        K, I, J = {},
        F = {},
        M = window.document;
    GVAR.env._id_counter = GVAR.env._id_counter || 0;
    var C = GVAR.env.ua.opera,
        L = GVAR.env.ua.webkit,
        A = GVAR.env.ua.gecko,
        G = GVAR.env.ua.ie;
    var E = {
        HYPHEN: /(-[a-z])/i,
        ROOT_TAG: /^body|html$/i,
        OP_SCROLL: /^(?:inline|table-row)$/i
    };
    var N = function (P) {
        if (!E.HYPHEN.test(P)) {
            return P
        }
        if (J[P]) {
            return J[P]
        }
        var Q = P;
        while (E.HYPHEN.exec(Q)) {
            Q = Q.replace(RegExp.$1, RegExp.$1.substr(1).toUpperCase())
        }
        J[P] = Q;
        return Q
    };
    var O = function (Q) {
        var P = F[Q];
        if (!P) {
            P = new RegExp("(?:^|\\s+)" + Q + "(?:\\s+|$)");
            F[Q] = P
        }
        return P
    };
    if (M.defaultView && M.defaultView.getComputedStyle) {
        K = function (P, S) {
            var R = null;
            if (S == "float") {
                S = "cssFloat"
            }
            var Q = P.ownerDocument.defaultView.getComputedStyle(P, "");
            if (Q) {
                R = Q[N(S)]
            }
            return P.style[S] || R
        }
    } else {
        if (M.documentElement.currentStyle && G) {
            K = function (P, R) {
                switch (N(R)) {
                case "opacity":
                    var T = 100;
                    try {
                        T = P.filters["DXImageTransform.Microsoft.Alpha"].opacity
                    } catch (S) {
                        try {
                            T = P.filters("alpha").opacity
                        } catch (S) {}
                    }
                    return T / 100;
                case "float":
                    R = "styleFloat";
                default:
                    var Q = P.currentStyle ? P.currentStyle[R] : null;
                    return (P.style[R] || Q)
                }
            }
        } else {
            K = function (P, Q) {
                return P.style[Q]
            }
        }
    }
    if (G) {
        I = function (P, Q, R) {
            switch (Q) {
            case "opacity":
                if (GVAR.lang.isString(P.style.filter)) {
                    P.style.filter = "alpha(opacity=" + R * 100 + ")";
                    if (!P.currentStyle || !P.currentStyle.hasLayout) {
                        P.style.zoom = 1
                    }
                }
                break;
            case "float":
                Q = "styleFloat";
            default:
                P.style[Q] = R
            }
        }
    } else {
        I = function (P, Q, R) {
            if (Q == "float") {
                Q = "cssFloat"
            }
            P.style[Q] = R
        }
    }
    var D = function (P, Q) {
        return P && P.nodeType == 1 && (!Q || Q(P))
    };
    GVAR.util.Dom = {
        get: function (R) {
            if (R && (R.nodeType || R.item)) {
                return R
            }
            if (GVAR.lang.isString(R) || !R) {
                return M.getElementById(R)
            }
            if (R.length !== undefined) {
                var S = [];
                for (var Q = 0, P = R.length; Q < P; ++Q) {
                    S[S.length] = B.Dom.get(R[Q])
                }
                return S
            }
            return R
        },
        getStyle: function (P, R) {
            R = N(R);
            var Q = function (S) {
                return K(S, R)
            };
            return B.Dom.batch(P, Q, B.Dom, true)
        },
        setStyle: function (P, R, S) {
            R = N(R);
            var Q = function (T) {
                I(T, R, S)
            };
            B.Dom.batch(P, Q, B.Dom, true)
        },
        getXY: function (P) {
            var Q = function (R) {
                if ((R.parentNode === null || R.offsetParent === null || this.getStyle(R, "display") == "none") && R != R.ownerDocument.body) {
                    return false
                }
                return H(R)
            };
            return B.Dom.batch(P, Q, B.Dom, true)
        },
        getX: function (P) {
            var Q = function (R) {
                return B.Dom.getXY(R)[0]
            };
            return B.Dom.batch(P, Q, B.Dom, true)
        },
        getY: function (P) {
            var Q = function (R) {
                return B.Dom.getXY(R)[1]
            };
            return B.Dom.batch(P, Q, B.Dom, true)
        },
        setXY: function (P, S, R) {
            var Q = function (V) {
                var U = this.getStyle(V, "position");
                if (U == "static") {
                    this.setStyle(V, "position", "relative");
                    U = "relative"
                }
                var X = this.getXY(V);
                if (X === false) {
                    return false
                }
                var W = [parseInt(this.getStyle(V, "left"), 10), parseInt(this.getStyle(V, "top"), 10)];
                if (isNaN(W[0])) {
                    W[0] = (U == "relative") ? 0 : V.offsetLeft
                }
                if (isNaN(W[1])) {
                    W[1] = (U == "relative") ? 0 : V.offsetTop
                }
                if (S[0] !== null) {
                    V.style.left = S[0] - X[0] + W[0] + "px"
                }
                if (S[1] !== null) {
                    V.style.top = S[1] - X[1] + W[1] + "px"
                }
                if (!R) {
                    var T = this.getXY(V);
                    if ((S[0] !== null && T[0] != S[0]) || (S[1] !== null && T[1] != S[1])) {
                        this.setXY(V, S, true)
                    }
                }
            };
            B.Dom.batch(P, Q, B.Dom, true)
        },
        setX: function (Q, P) {
            B.Dom.setXY(Q, [P, null])
        },
        setY: function (P, Q) {
            B.Dom.setXY(P, [null, Q])
        },
        getRegion: function (P) {
            var Q = function (R) {
                if ((R.parentNode === null || R.offsetParent === null || this.getStyle(R, "display") == "none") && R != R.ownerDocument.body) {
                    return false
                }
                var S = B.Region.getRegion(R);
                return S
            };
            return B.Dom.batch(P, Q, B.Dom, true)
        },
        getClientWidth: function () {
            return B.Dom.getViewportWidth()
        },
        getClientHeight: function () {
            return B.Dom.getViewportHeight()
        },
        getElementsByClassName: function (T, X, U, V) {
            X = X || "*";
            U = (U) ? B.Dom.get(U) : null || M;
            if (!U) {
                return []
            }
            var Q = [],
                P = U.getElementsByTagName(X),
                W = O(T);
            for (var R = 0, S = P.length; R < S; ++R) {
                if (W.test(P[R].className)) {
                    Q[Q.length] = P[R];
                    if (V) {
                        V.call(P[R], P[R])
                    }
                }
            }
            return Q
        },
        hasClass: function (R, Q) {
            var P = O(Q);
            var S = function (T) {
                return P.test(T.className)
            };
            return B.Dom.batch(R, S, B.Dom, true)
        },
        addClass: function (Q, P) {
            var R = function (S) {
                if (this.hasClass(S, P)) {
                    return false
                }
                S.className = GVAR.lang.trim([S.className, P].join(" "));
                return true
            };
            return B.Dom.batch(Q, R, B.Dom, true)
        },
        removeClass: function (R, Q) {
            var P = O(Q);
            var S = function (T) {
                if (!Q || !this.hasClass(T, Q)) {
                    return false
                }
                var U = T.className;
                T.className = U.replace(P, " ");
                if (this.hasClass(T, Q)) {
                    this.removeClass(T, Q)
                }
                T.className = GVAR.lang.trim(T.className);
                return true
            };
            return B.Dom.batch(R, S, B.Dom, true)
        },
        replaceClass: function (S, Q, P) {
            if (!P || Q === P) {
                return false
            }
            var R = O(Q);
            var T = function (U) {
                if (!this.hasClass(U, Q)) {
                    this.addClass(U, P);
                    return true
                }
                U.className = U.className.replace(R, " " + P + " ");
                if (this.hasClass(U, Q)) {
                    this.replaceClass(U, Q, P)
                }
                U.className = GVAR.lang.trim(U.className);
                return true
            };
            return B.Dom.batch(S, T, B.Dom, true)
        },
        generateId: function (P, R) {
            R = R || "yui-gen";
            var Q = function (S) {
                if (S && S.id) {
                    return S.id
                }
                var T = R + GVAR.env._id_counter++;
                if (S) {
                    S.id = T
                }
                return T
            };
            return B.Dom.batch(P, Q, B.Dom, true) || Q.apply(B.Dom, arguments)
        },
        isAncestor: function (P, Q) {
            P = B.Dom.get(P);
            Q = B.Dom.get(Q);
            if (!P || !Q) {
                return false
            }
            if (P.contains && Q.nodeType && !L) {
                return P.contains(Q)
            } else {
                if (P.compareDocumentPosition && Q.nodeType) {
                    return !!(P.compareDocumentPosition(Q) & 16)
                } else {
                    if (Q.nodeType) {
                        return !!this.getAncestorBy(Q, function (R) {
                            return R == P
                        })
                    }
                }
            }
            return false
        },
        inDocument: function (P) {
            return this.isAncestor(M.documentElement, P)
        },
        getElementsBy: function (W, Q, R, T) {
            Q = Q || "*";
            R = (R) ? B.Dom.get(R) : null || M;
            if (!R) {
                return []
            }
            var S = [],
                V = R.getElementsByTagName(Q);
            for (var U = 0, P = V.length; U < P; ++U) {
                if (W(V[U])) {
                    S[S.length] = V[U];
                    if (T) {
                        T(V[U])
                    }
                }
            }
            return S
        },
        batch: function (T, W, V, R) {
            T = (T && (T.tagName || T.item)) ? T : B.Dom.get(T);
            if (!T || !W) {
                return false
            }
            var S = (R) ? V : window;
            if (T.tagName || T.length === undefined) {
                return W.call(S, T, V)
            }
            var U = [];
            for (var Q = 0, P = T.length; Q < P; ++Q) {
                U[U.length] = W.call(S, T[Q], V)
            }
            return U
        },
        getDocumentHeight: function () {
            var Q = (M.compatMode != "CSS1Compat") ? M.body.scrollHeight : M.documentElement.scrollHeight;
            var P = Math.max(Q, B.Dom.getViewportHeight());
            return P
        },
        getDocumentWidth: function () {
            var Q = (M.compatMode != "CSS1Compat") ? M.body.scrollWidth : M.documentElement.scrollWidth;
            var P = Math.max(Q, B.Dom.getViewportWidth());
            return P
        },
        getViewportHeight: function () {
            var P = self.innerHeight;
            var Q = M.compatMode;
            if ((Q || G) && !C) {
                P = (Q == "CSS1Compat") ? M.documentElement.clientHeight : M.body.clientHeight
            }
            return P
        },
        getViewportWidth: function () {
            var P = self.innerWidth;
            var Q = M.compatMode;
            if (Q || G) {
                P = (Q == "CSS1Compat") ? M.documentElement.clientWidth : M.body.clientWidth
            }
            return P
        },
        getAncestorBy: function (P, Q) {
            while (P = P.parentNode) {
                if (D(P, Q)) {
                    return P
                }
            }
            return null
        },
        getAncestorByClassName: function (Q, P) {
            Q = B.Dom.get(Q);
            if (!Q) {
                return null
            }
            var R = function (S) {
                return B.Dom.hasClass(S, P)
            };
            return B.Dom.getAncestorBy(Q, R)
        },
        getAncestorByTagName: function (Q, P) {
            Q = B.Dom.get(Q);
            if (!Q) {
                return null
            }
            var R = function (S) {
                return S.tagName && S.tagName.toUpperCase() == P.toUpperCase()
            };
            return B.Dom.getAncestorBy(Q, R)
        },
        getPreviousSiblingBy: function (P, Q) {
            while (P) {
                P = P.previousSibling;
                if (D(P, Q)) {
                    return P
                }
            }
            return null
        },
        getPreviousSibling: function (P) {
            P = B.Dom.get(P);
            if (!P) {
                return null
            }
            return B.Dom.getPreviousSiblingBy(P)
        },
        getNextSiblingBy: function (P, Q) {
            while (P) {
                P = P.nextSibling;
                if (D(P, Q)) {
                    return P
                }
            }
            return null
        },
        getNextSibling: function (P) {
            P = B.Dom.get(P);
            if (!P) {
                return null
            }
            return B.Dom.getNextSiblingBy(P)
        },
        getFirstChildBy: function (P, R) {
            var Q = (D(P.firstChild, R)) ? P.firstChild : null;
            return Q || B.Dom.getNextSiblingBy(P.firstChild, R)
        },
        getFirstChild: function (P, Q) {
            P = B.Dom.get(P);
            if (!P) {
                return null
            }
            return B.Dom.getFirstChildBy(P)
        },
        getLastChildBy: function (P, R) {
            if (!P) {
                return null
            }
            var Q = (D(P.lastChild, R)) ? P.lastChild : null;
            return Q || B.Dom.getPreviousSiblingBy(P.lastChild, R)
        },
        getLastChild: function (P) {
            P = B.Dom.get(P);
            return B.Dom.getLastChildBy(P)
        },
        getChildrenBy: function (Q, S) {
            var R = B.Dom.getFirstChildBy(Q, S);
            var P = R ? [R] : [];
            B.Dom.getNextSiblingBy(R, function (T) {
                if (!S || S(T)) {
                    P[P.length] = T
                }
                return false
            });
            return P
        },
        getChildren: function (P) {
            P = B.Dom.get(P);
            if (!P) {}
            return B.Dom.getChildrenBy(P)
        },
        getDocumentScrollLeft: function (P) {
            P = P || M;
            return Math.max(P.documentElement.scrollLeft, P.body.scrollLeft)
        },
        getDocumentScrollTop: function (P) {
            P = P || M;
            return Math.max(P.documentElement.scrollTop, P.body.scrollTop)
        },
        insertBefore: function (Q, P) {
            Q = B.Dom.get(Q);
            P = B.Dom.get(P);
            if (!Q || !P || !P.parentNode) {
                return null
            }
            return P.parentNode.insertBefore(Q, P)
        },
        insertAfter: function (Q, P) {
            Q = B.Dom.get(Q);
            P = B.Dom.get(P);
            if (!Q || !P || !P.parentNode) {
                return null
            }
            if (P.nextSibling) {
                return P.parentNode.insertBefore(Q, P.nextSibling)
            } else {
                return P.parentNode.appendChild(Q)
            }
        },
        getClientRegion: function () {
            var R = B.Dom.getDocumentScrollTop(),
                Q = B.Dom.getDocumentScrollLeft(),
                S = B.Dom.getViewportWidth() + Q,
                P = B.Dom.getViewportHeight() + R;
            return new B.Region(R, S, P, Q)
        }
    };
    var H = function () {
        if (M.documentElement.getBoundingClientRect) {
            return function (Q) {
                var R = Q.getBoundingClientRect();
                var P = Q.ownerDocument;
                return [R.left + B.Dom.getDocumentScrollLeft(P), R.top + B.Dom.getDocumentScrollTop(P)]
            }
        } else {
            return function (R) {
                var S = [R.offsetLeft, R.offsetTop];
                var Q = R.offsetParent;
                var P = (L && B.Dom.getStyle(R, "position") == "absolute" && R.offsetParent == R.ownerDocument.body);
                if (Q != R) {
                    while (Q) {
                        S[0] += Q.offsetLeft;
                        S[1] += Q.offsetTop;
                        if (!P && L && B.Dom.getStyle(Q, "position") == "absolute") {
                            P = true
                        }
                        Q = Q.offsetParent
                    }
                }
                if (P) {
                    S[0] -= R.ownerDocument.body.offsetLeft;
                    S[1] -= R.ownerDocument.body.offsetTop
                }
                Q = R.parentNode;
                while (Q.tagName && !E.ROOT_TAG.test(Q.tagName)) {
                    if (Q.scrollTop || Q.scrollLeft) {
                        if (!E.OP_SCROLL.test(B.Dom.getStyle(Q, "display"))) {
                            if (!C || B.Dom.getStyle(Q, "overflow") !== "visible") {
                                S[0] -= Q.scrollLeft;
                                S[1] -= Q.scrollTop
                            }
                        }
                    }
                    Q = Q.parentNode
                }
                return S
            }
        }
    }()
})();
GVAR.util.Region = function (C, D, A, B) {
    this.top = C;
    this[1] = C;
    this.right = D;
    this.bottom = A;
    this.left = B;
    this[0] = B
};
GVAR.util.Region.prototype.contains = function (A) {
    return (A.left >= this.left && A.right <= this.right && A.top >= this.top && A.bottom <= this.bottom)
};
GVAR.util.Region.prototype.getArea = function () {
    return ((this.bottom - this.top) * (this.right - this.left))
};
GVAR.util.Region.prototype.intersect = function (E) {
    var C = Math.max(this.top, E.top);
    var D = Math.min(this.right, E.right);
    var A = Math.min(this.bottom, E.bottom);
    var B = Math.max(this.left, E.left);
    if (A >= C && D >= B) {
        return new GVAR.util.Region(C, D, A, B)
    } else {
        return null
    }
};
GVAR.util.Region.prototype.union = function (E) {
    var C = Math.min(this.top, E.top);
    var D = Math.max(this.right, E.right);
    var A = Math.max(this.bottom, E.bottom);
    var B = Math.min(this.left, E.left);
    return new GVAR.util.Region(C, D, A, B)
};
GVAR.util.Region.prototype.toString = function () {
    return ("Region {top: " + this.top + ", right: " + this.right + ", bottom: " + this.bottom + ", left: " + this.left + "}")
};
GVAR.util.Region.getRegion = function (D) {
    var F = GVAR.util.Dom.getXY(D);
    var C = F[1];
    var E = F[0] + D.offsetWidth;
    var A = F[1] + D.offsetHeight;
    var B = F[0];
    return new GVAR.util.Region(C, E, A, B)
};
GVAR.util.Point = function (A, B) {
    if (GVAR.lang.isArray(A)) {
        B = A[1];
        A = A[0]
    }
    this.x = this.right = this.left = this[0] = A;
    this.y = this.top = this.bottom = this[1] = B
};
GVAR.util.Point.prototype = new GVAR.util.Region();
GVAR.register("dom", GVAR.util.Dom, {
    version: "2.5.2",
    build: "1076"
});
GVAR.util.CustomEvent = function (D, B, C, A) {
    this.type = D;
    this.scope = B || window;
    this.silent = C;
    this.signature = A || GVAR.util.CustomEvent.LIST;
    this.subscribers = [];
    if (!this.silent) {}
    var E = "_YUICEOnSubscribe";
    if (D !== E) {
        this.subscribeEvent = new GVAR.util.CustomEvent(E, this, true)
    }
    this.lastError = null
};
GVAR.util.CustomEvent.LIST = 0;
GVAR.util.CustomEvent.FLAT = 1;
GVAR.util.CustomEvent.prototype = {
    subscribe: function (B, C, A) {
        if (!B) {
            throw new Error("Invalid callback for subscriber to '" + this.type + "'")
        }
        if (this.subscribeEvent) {
            this.subscribeEvent.fire(B, C, A)
        }
        this.subscribers.push(new GVAR.util.Subscriber(B, C, A))
    },
    unsubscribe: function (D, F) {
        if (!D) {
            return this.unsubscribeAll()
        }
        var E = false;
        for (var B = 0, A = this.subscribers.length; B < A; ++B) {
            var C = this.subscribers[B];
            if (C && C.contains(D, F)) {
                this._delete(B);
                E = true
            }
        }
        return E
    },
    fire: function () {
        this.lastError = null;
        var K = [],
            E = this.subscribers.length;
        if (!E && this.silent) {
            return true
        }
        var I = [].slice.call(arguments, 0),
            G = true,
            D, J = false;
        if (!this.silent) {}
        var C = this.subscribers.slice(),
            A = GVAR.util.Event.throwErrors;
        for (D = 0; D < E; ++D) {
            var M = C[D];
            if (!M) {
                J = true
            } else {
                if (!this.silent) {}
                var L = M.getScope(this.scope);
                if (this.signature == GVAR.util.CustomEvent.FLAT) {
                    var B = null;
                    if (I.length > 0) {
                        B = I[0]
                    }
                    try {
                        G = M.fn.call(L, B, M.obj)
                    } catch (F) {
                        this.lastError = F;
                        if (A) {
                            throw F
                        }
                    }
                } else {
                    try {
                        G = M.fn.call(L, this.type, I, M.obj)
                    } catch (H) {
                        this.lastError = H;
                        if (A) {
                            throw H
                        }
                    }
                }
                if (false === G) {
                    if (!this.silent) {}
                    break
                }
            }
        }
        return (G !== false)
    },
    unsubscribeAll: function () {
        for (var A = this.subscribers.length - 1; A > -1; A--) {
            this._delete(A)
        }
        this.subscribers = [];
        return A
    },
    _delete: function (A) {
        var B = this.subscribers[A];
        if (B) {
            delete B.fn;
            delete B.obj
        }
        this.subscribers.splice(A, 1)
    },
    toString: function () {
        return "CustomEvent: '" + this.type + "', scope: " + this.scope
    }
};
GVAR.util.Subscriber = function (B, C, A) {
    this.fn = B;
    this.obj = GVAR.lang.isUndefined(C) ? null : C;
    this.override = A
};
GVAR.util.Subscriber.prototype.getScope = function (A) {
    if (this.override) {
        if (this.override === true) {
            return this.obj
        } else {
            return this.override
        }
    }
    return A
};
GVAR.util.Subscriber.prototype.contains = function (A, B) {
    if (B) {
        return (this.fn == A && this.obj == B)
    } else {
        return (this.fn == A)
    }
};
GVAR.util.Subscriber.prototype.toString = function () {
    return "Subscriber { obj: " + this.obj + ", override: " + (this.override || "no") + " }"
};
if (!GVAR.util.Event) {
    GVAR.util.Event = function () {
        var H = false;
        var I = [];
        var J = [];
        var G = [];
        var E = [];
        var C = 0;
        var F = [];
        var B = [];
        var A = 0;
        var D = {
            63232: 38,
            63233: 40,
            63234: 37,
            63235: 39,
            63276: 33,
            63277: 34,
            25: 9
        };
        return {
            POLL_RETRYS: 2000,
            POLL_INTERVAL: 20,
            EL: 0,
            TYPE: 1,
            FN: 2,
            WFN: 3,
            UNLOAD_OBJ: 3,
            ADJ_SCOPE: 4,
            OBJ: 5,
            OVERRIDE: 6,
            lastError: null,
            isSafari: GVAR.env.ua.webkit,
            webkit: GVAR.env.ua.webkit,
            isIE: GVAR.env.ua.ie,
            _interval: null,
            _dri: null,
            DOMReady: false,
            throwErrors: false,
            startInterval: function () {
                if (!this._interval) {
                    var K = this;
                    var L = function () {
                        K._tryPreloadAttach()
                    };
                    this._interval = setInterval(L, this.POLL_INTERVAL)
                }
            },
            onAvailable: function (P, M, Q, O, N) {
                var K = (GVAR.lang.isString(P)) ? [P] : P;
                for (var L = 0; L < K.length; L = L + 1) {
                    F.push({
                        id: K[L],
                        fn: M,
                        obj: Q,
                        override: O,
                        checkReady: N
                    })
                }
                C = this.POLL_RETRYS;
                this.startInterval()
            },
            onContentReady: function (M, K, N, L) {
                this.onAvailable(M, K, N, L, true)
            },
            onDOMReady: function (K, M, L) {
                if (this.DOMReady) {
                    setTimeout(function () {
                        var N = window;
                        if (L) {
                            if (L === true) {
                                N = M
                            } else {
                                N = L
                            }
                        }
                        K.call(N, "DOMReady", [], M)
                    }, 0)
                } else {
                    this.DOMReadyEvent.subscribe(K, M, L)
                }
            },
            addListener: function (M, K, V, Q, L) {
                if (!V || !V.call) {
                    return false
                }
                if (this._isValidCollection(M)) {
                    var W = true;
                    for (var R = 0, T = M.length; R < T; ++R) {
                        W = this.on(M[R], K, V, Q, L) && W
                    }
                    return W
                } else {
                    if (GVAR.lang.isString(M)) {
                        var P = this.getEl(M);
                        if (P) {
                            M = P
                        } else {
                            this.onAvailable(M, function () {
                                GVAR.util.Event.on(M, K, V, Q, L)
                            });
                            return true
                        }
                    }
                }
                if (!M) {
                    return false
                }
                if ("unload" == K && Q !== this) {
                    J[J.length] = [M, K, V, Q, L];
                    return true
                }
                var Y = M;
                if (L) {
                    if (L === true) {
                        Y = Q
                    } else {
                        Y = L
                    }
                }
                var N = function (Z) {
                    return V.call(Y, GVAR.util.Event.getEvent(Z, M), Q)
                };
                var X = [M, K, V, N, Y, Q, L];
                var S = I.length;
                I[S] = X;
                if (this.useLegacyEvent(M, K)) {
                    var O = this.getLegacyIndex(M, K);
                    if (O == -1 || M != G[O][0]) {
                        O = G.length;
                        B[M.id + K] = O;
                        G[O] = [M, K, M["on" + K]];
                        E[O] = [];
                        M["on" + K] = function (Z) {
                            GVAR.util.Event.fireLegacyEvent(GVAR.util.Event.getEvent(Z), O)
                        }
                    }
                    E[O].push(X)
                } else {
                    try {
                        this._simpleAdd(M, K, N, false)
                    } catch (U) {
                        this.lastError = U;
                        this.removeListener(M, K, V);
                        return false
                    }
                }
                return true
            },
            fireLegacyEvent: function (O, M) {
                var Q = true,
                    K, S, R, T, P;
                S = E[M].slice();
                for (var L = 0, N = S.length; L < N; ++L) {
                    R = S[L];
                    if (R && R[this.WFN]) {
                        T = R[this.ADJ_SCOPE];
                        P = R[this.WFN].call(T, O);
                        Q = (Q && P)
                    }
                }
                K = G[M];
                if (K && K[2]) {
                    K[2](O)
                }
                return Q
            },
            getLegacyIndex: function (L, M) {
                var K = this.generateId(L) + M;
                if (typeof B[K] == "undefined") {
                    return -1
                } else {
                    return B[K]
                }
            },
            useLegacyEvent: function (L, M) {
                if (this.webkit && ("click" == M || "dblclick" == M)) {
                    var K = parseInt(this.webkit, 10);
                    if (!isNaN(K) && K < 418) {
                        return true
                    }
                }
                return false
            },
            removeListener: function (L, K, T) {
                var O, R, V;
                if (typeof L == "string") {
                    L = this.getEl(L)
                } else {
                    if (this._isValidCollection(L)) {
                        var U = true;
                        for (O = L.length - 1; O > -1; O--) {
                            U = (this.removeListener(L[O], K, T) && U)
                        }
                        return U
                    }
                }
                if (!T || !T.call) {
                    return this.purgeElement(L, false, K)
                }
                if ("unload" == K) {
                    for (O = J.length - 1; O > -1; O--) {
                        V = J[O];
                        if (V && V[0] == L && V[1] == K && V[2] == T) {
                            J.splice(O, 1);
                            return true
                        }
                    }
                    return false
                }
                var P = null;
                var Q = arguments[3];
                if ("undefined" === typeof Q) {
                    Q = this._getCacheIndex(L, K, T)
                }
                if (Q >= 0) {
                    P = I[Q]
                }
                if (!L || !P) {
                    return false
                }
                if (this.useLegacyEvent(L, K)) {
                    var N = this.getLegacyIndex(L, K);
                    var M = E[N];
                    if (M) {
                        for (O = 0, R = M.length; O < R; ++O) {
                            V = M[O];
                            if (V && V[this.EL] == L && V[this.TYPE] == K && V[this.FN] == T) {
                                M.splice(O, 1);
                                break
                            }
                        }
                    }
                } else {
                    try {
                        this._simpleRemove(L, K, P[this.WFN], false)
                    } catch (S) {
                        this.lastError = S;
                        return false
                    }
                }
                delete I[Q][this.WFN];
                delete I[Q][this.FN];
                I.splice(Q, 1);
                return true
            },
            getTarget: function (M, L) {
                var K = M.target || M.srcElement;
                return this.resolveTextNode(K)
            },
            resolveTextNode: function (L) {
                try {
                    if (L && 3 == L.nodeType) {
                        return L.parentNode
                    }
                } catch (K) {}
                return L
            },
            getPageX: function (L) {
                var K = L.pageX;
                if (!K && 0 !== K) {
                    K = L.clientX || 0;
                    if (this.isIE) {
                        K += this._getScrollLeft()
                    }
                }
                return K
            },
            getPageY: function (K) {
                var L = K.pageY;
                if (!L && 0 !== L) {
                    L = K.clientY || 0;
                    if (this.isIE) {
                        L += this._getScrollTop()
                    }
                }
                return L
            },
            getXY: function (K) {
                return [this.getPageX(K), this.getPageY(K)]
            },
            getRelatedTarget: function (L) {
                var K = L.relatedTarget;
                if (!K) {
                    if (L.type == "mouseout") {
                        K = L.toElement
                    } else {
                        if (L.type == "mouseover") {
                            K = L.fromElement
                        }
                    }
                }
                return this.resolveTextNode(K)
            },
            getTime: function (M) {
                if (!M.time) {
                    var L = new Date().getTime();
                    try {
                        M.time = L
                    } catch (K) {
                        this.lastError = K;
                        return L
                    }
                }
                return M.time
            },
            stopEvent: function (K) {
                this.stopPropagation(K);
                this.preventDefault(K)
            },
            stopPropagation: function (K) {
                if (K.stopPropagation) {
                    K.stopPropagation()
                } else {
                    K.cancelBubble = true
                }
            },
            preventDefault: function (K) {
                if (K.preventDefault) {
                    K.preventDefault()
                } else {
                    K.returnValue = false
                }
            },
            getEvent: function (M, K) {
                var L = M || window.event;
                if (!L) {
                    var N = this.getEvent.caller;
                    while (N) {
                        L = N.arguments[0];
                        if (L && Event == L.constructor) {
                            break
                        }
                        N = N.caller
                    }
                }
                return L
            },
            getCharCode: function (L) {
                var K = L.keyCode || L.charCode || 0;
                if (GVAR.env.ua.webkit && (K in D)) {
                    K = D[K]
                }
                return K
            },
            _getCacheIndex: function (O, P, N) {
                for (var M = 0, L = I.length; M < L; M = M + 1) {
                    var K = I[M];
                    if (K && K[this.FN] == N && K[this.EL] == O && K[this.TYPE] == P) {
                        return M
                    }
                }
                return -1
            },
            generateId: function (K) {
                var L = K.id;
                if (!L) {
                    L = "yuievtautoid-" + A;
                    ++A;
                    K.id = L
                }
                return L
            },
            _isValidCollection: function (L) {
                try {
                    return (L && typeof L !== "string" && L.length && !L.tagName && !L.alert && typeof L[0] !== "undefined")
                } catch (K) {
                    return false
                }
            },
            elCache: {},
            getEl: function (K) {
                return (typeof K === "string") ? document.getElementById(K) : K
            },
            clearCache: function () {},
            DOMReadyEvent: new GVAR.util.CustomEvent("DOMReady", this),
            _load: function (L) {
                if (!H) {
                    H = true;
                    var K = GVAR.util.Event;
                    K._ready();
                    K._tryPreloadAttach()
                }
            },
            _ready: function (L) {
                var K = GVAR.util.Event;
                if (!K.DOMReady) {
                    K.DOMReady = true;
                    K.DOMReadyEvent.fire();
                    K._simpleRemove(document, "DOMContentLoaded", K._ready)
                }
            },
            _tryPreloadAttach: function () {
                if (F.length === 0) {
                    C = 0;
                    clearInterval(this._interval);
                    this._interval = null;
                    return
                }
                if (this.locked) {
                    return
                }
                if (this.isIE) {
                    if (!this.DOMReady) {
                        this.startInterval();
                        return
                    }
                }
                this.locked = true;
                var Q = !H;
                if (!Q) {
                    Q = (C > 0 && F.length > 0)
                }
                var P = [];
                var R = function (T, U) {
                    var S = T;
                    if (U.override) {
                        if (U.override === true) {
                            S = U.obj
                        } else {
                            S = U.override
                        }
                    }
                    U.fn.call(S, U.obj)
                };
                var L, K, O, N, M = [];
                for (L = 0, K = F.length; L < K; L = L + 1) {
                    O = F[L];
                    if (O) {
                        N = this.getEl(O.id);
                        if (N) {
                            if (O.checkReady) {
                                if (H || N.nextSibling || !Q) {
                                    M.push(O);
                                    F[L] = null
                                }
                            } else {
                                R(N, O);
                                F[L] = null
                            }
                        } else {
                            P.push(O)
                        }
                    }
                }
                for (L = 0, K = M.length; L < K; L = L + 1) {
                    O = M[L];
                    R(this.getEl(O.id), O)
                }
                C--;
                if (Q) {
                    for (L = F.length - 1; L > -1; L--) {
                        O = F[L];
                        if (!O || !O.id) {
                            F.splice(L, 1)
                        }
                    }
                    this.startInterval()
                } else {
                    clearInterval(this._interval);
                    this._interval = null
                }
                this.locked = false
            },
            purgeElement: function (O, P, R) {
                var M = (GVAR.lang.isString(O)) ? this.getEl(O) : O;
                var Q = this.getListeners(M, R),
                    N, K;
                if (Q) {
                    for (N = Q.length - 1; N > -1; N--) {
                        var L = Q[N];
                        this.removeListener(M, L.type, L.fn)
                    }
                }
                if (P && M && M.childNodes) {
                    for (N = 0, K = M.childNodes.length; N < K; ++N) {
                        this.purgeElement(M.childNodes[N], P, R)
                    }
                }
            },
            getListeners: function (M, K) {
                var P = [],
                    L;
                if (!K) {
                    L = [I, J]
                } else {
                    if (K === "unload") {
                        L = [J]
                    } else {
                        L = [I]
                    }
                }
                var R = (GVAR.lang.isString(M)) ? this.getEl(M) : M;
                for (var O = 0; O < L.length; O = O + 1) {
                    var T = L[O];
                    if (T) {
                        for (var Q = 0, S = T.length; Q < S; ++Q) {
                            var N = T[Q];
                            if (N && N[this.EL] === R && (!K || K === N[this.TYPE])) {
                                P.push({
                                    type: N[this.TYPE],
                                    fn: N[this.FN],
                                    obj: N[this.OBJ],
                                    adjust: N[this.OVERRIDE],
                                    scope: N[this.ADJ_SCOPE],
                                    index: Q
                                })
                            }
                        }
                    }
                }
                return (P.length) ? P : null
            },
            _unload: function (Q) {
                var K = GVAR.util.Event,
                    N, M, L, P, O, R = J.slice();
                for (N = 0, P = J.length; N < P; ++N) {
                    L = R[N];
                    if (L) {
                        var S = window;
                        if (L[K.ADJ_SCOPE]) {
                            if (L[K.ADJ_SCOPE] === true) {
                                S = L[K.UNLOAD_OBJ]
                            } else {
                                S = L[K.ADJ_SCOPE]
                            }
                        }
                        L[K.FN].call(S, K.getEvent(Q, L[K.EL]), L[K.UNLOAD_OBJ]);
                        R[N] = null;
                        L = null;
                        S = null
                    }
                }
                J = null;
                if (I) {
                    for (M = I.length - 1; M > -1; M--) {
                        L = I[M];
                        if (L) {
                            K.removeListener(L[K.EL], L[K.TYPE], L[K.FN], M)
                        }
                    }
                    L = null
                }
                G = null;
                K._simpleRemove(window, "unload", K._unload)
            },
            _getScrollLeft: function () {
                return this._getScroll()[1]
            },
            _getScrollTop: function () {
                return this._getScroll()[0]
            },
            _getScroll: function () {
                var K = document.documentElement,
                    L = document.body;
                if (K && (K.scrollTop || K.scrollLeft)) {
                    return [K.scrollTop, K.scrollLeft]
                } else {
                    if (L) {
                        return [L.scrollTop, L.scrollLeft]
                    } else {
                        return [0, 0]
                    }
                }
            },
            regCE: function () {},
            _simpleAdd: function () {
                if (window.addEventListener) {
                    return function (M, N, L, K) {
                        M.addEventListener(N, L, (K))
                    }
                } else {
                    if (window.attachEvent) {
                        return function (M, N, L, K) {
                            M.attachEvent("on" + N, L)
                        }
                    } else {
                        return function () {}
                    }
                }
            }(),
            _simpleRemove: function () {
                if (window.removeEventListener) {
                    return function (M, N, L, K) {
                        M.removeEventListener(N, L, (K))
                    }
                } else {
                    if (window.detachEvent) {
                        return function (L, M, K) {
                            L.detachEvent("on" + M, K)
                        }
                    } else {
                        return function () {}
                    }
                }
            }()
        }
    }();
    (function () {
        var EU = GVAR.util.Event;
        EU.on = EU.addListener;
        if (EU.isIE) {
            GVAR.util.Event.onDOMReady(GVAR.util.Event._tryPreloadAttach, GVAR.util.Event, true);
            var n = document.createElement("p");
            EU._dri = setInterval(function () {
                try {
                    n.doScroll("left");
                    clearInterval(EU._dri);
                    EU._dri = null;
                    EU._ready();
                    n = null
                } catch (ex) {}
            }, EU.POLL_INTERVAL)
        } else {
            if (EU.webkit && EU.webkit < 525) {
                EU._dri = setInterval(function () {
                    var rs = document.readyState;
                    if ("loaded" == rs || "complete" == rs) {
                        clearInterval(EU._dri);
                        EU._dri = null;
                        EU._ready()
                    }
                }, EU.POLL_INTERVAL)
            } else {
                EU._simpleAdd(document, "DOMContentLoaded", EU._ready)
            }
        }
        EU._simpleAdd(window, "load", EU._load);
        EU._simpleAdd(window, "unload", EU._unload);
        EU._tryPreloadAttach()
    })()
}
GVAR.util.EventProvider = function () {};
GVAR.util.EventProvider.prototype = {
    __yui_events: null,
    __yui_subscribers: null,
    subscribe: function (A, C, F, E) {
        this.__yui_events = this.__yui_events || {};
        var D = this.__yui_events[A];
        if (D) {
            D.subscribe(C, F, E)
        } else {
            this.__yui_subscribers = this.__yui_subscribers || {};
            var B = this.__yui_subscribers;
            if (!B[A]) {
                B[A] = []
            }
            B[A].push({
                fn: C,
                obj: F,
                override: E
            })
        }
    },
    unsubscribe: function (C, E, G) {
        this.__yui_events = this.__yui_events || {};
        var A = this.__yui_events;
        if (C) {
            var F = A[C];
            if (F) {
                return F.unsubscribe(E, G)
            }
        } else {
            var B = true;
            for (var D in A) {
                if (GVAR.lang.hasOwnProperty(A, D)) {
                    B = B && A[D].unsubscribe(E, G)
                }
            }
            return B
        }
        return false
    },
    unsubscribeAll: function (A) {
        return this.unsubscribe(A)
    },
    createEvent: function (G, D) {
        this.__yui_events = this.__yui_events || {};
        var A = D || {};
        var I = this.__yui_events;
        if (I[G]) {} else {
            var H = A.scope || this;
            var E = (A.silent);
            var B = new GVAR.util.CustomEvent(G, H, E, GVAR.util.CustomEvent.FLAT);
            I[G] = B;
            if (A.onSubscribeCallback) {
                B.subscribeEvent.subscribe(A.onSubscribeCallback)
            }
            this.__yui_subscribers = this.__yui_subscribers || {};
            var F = this.__yui_subscribers[G];
            if (F) {
                for (var C = 0; C < F.length; ++C) {
                    B.subscribe(F[C].fn, F[C].obj, F[C].override)
                }
            }
        }
        return I[G]
    },
    fireEvent: function (E, D, A, C) {
        this.__yui_events = this.__yui_events || {};
        var G = this.__yui_events[E];
        if (!G) {
            return null
        }
        var B = [];
        for (var F = 1; F < arguments.length; ++F) {
            B.push(arguments[F])
        }
        return G.fire.apply(G, B)
    },
    hasEvent: function (A) {
        if (this.__yui_events) {
            if (this.__yui_events[A]) {
                return true
            }
        }
        return false
    }
};
GVAR.util.KeyListener = function (A, F, B, C) {
    if (!A) {} else {
        if (!F) {} else {
            if (!B) {}
        }
    }
    if (!C) {
        C = GVAR.util.KeyListener.KEYDOWN
    }
    var D = new GVAR.util.CustomEvent("keyPressed");
    this.enabledEvent = new GVAR.util.CustomEvent("enabled");
    this.disabledEvent = new GVAR.util.CustomEvent("disabled");
    if (typeof A == "string") {
        A = document.getElementById(A)
    }
    if (typeof B == "function") {
        D.subscribe(B)
    } else {
        D.subscribe(B.fn, B.scope, B.correctScope)
    }
    function E(J, I) {
        if (!F.shift) {
            F.shift = false
        }
        if (!F.alt) {
            F.alt = false
        }
        if (!F.ctrl) {
            F.ctrl = false
        }
        if (J.shiftKey == F.shift && J.altKey == F.alt && J.ctrlKey == F.ctrl) {
            var G;
            if (F.keys instanceof Array) {
                for (var H = 0; H < F.keys.length; H++) {
                    G = F.keys[H];
                    if (G == J.charCode) {
                        D.fire(J.charCode, J);
                        break
                    } else {
                        if (G == J.keyCode) {
                            D.fire(J.keyCode, J);
                            break
                        }
                    }
                }
            } else {
                G = F.keys;
                if (G == J.charCode) {
                    D.fire(J.charCode, J)
                } else {
                    if (G == J.keyCode) {
                        D.fire(J.keyCode, J)
                    }
                }
            }
        }
    }
    this.enable = function () {
        if (!this.enabled) {
            GVAR.util.Event.addListener(A, C, E);
            this.enabledEvent.fire(F)
        }
        this.enabled = true
    };
    this.disable = function () {
        if (this.enabled) {
            GVAR.util.Event.removeListener(A, C, E);
            this.disabledEvent.fire(F)
        }
        this.enabled = false
    };
    this.toString = function () {
        return "KeyListener [" + F.keys + "] " + A.tagName + (A.id ? "[" + A.id + "]" : "")
    }
};
GVAR.util.KeyListener.KEYDOWN = "keydown";
GVAR.util.KeyListener.KEYUP = "keyup";
GVAR.util.KeyListener.KEY = {
    ALT: 18,
    BACK_SPACE: 8,
    CAPS_LOCK: 20,
    CONTROL: 17,
    DELETE: 46,
    DOWN: 40,
    END: 35,
    ENTER: 13,
    ESCAPE: 27,
    HOME: 36,
    LEFT: 37,
    META: 224,
    NUM_LOCK: 144,
    PAGE_DOWN: 34,
    PAGE_UP: 33,
    PAUSE: 19,
    PRINTSCREEN: 44,
    RIGHT: 39,
    SCROLL_LOCK: 145,
    SHIFT: 16,
    SPACE: 32,
    TAB: 9,
    UP: 38
};
GVAR.register("event", GVAR.util.Event, {
    version: "2.5.2",
    build: "1076"
});
GVAR.register("GVAR-dom-event", GVAR, {
    version: "2.5.2",
    build: "1076"
});

function openPopup(asin, item, urlGet) {
    self.name = "mainWindow";
    var quantity = (item == "displayBuyBox") ? document.getElementById("qtty").value : 1;
    if (item == "displayBuyBox" && document.getElementById("freeGiftBBO")) {
        var freeBenefitASIN = document.getElementById("freeBenefitASIN").value;
        window.open("/gp/detail/map-popup.html/?quantity=" + quantity + "&asin=" + asin + "&freeBenefitASIN=" + freeBenefitASIN, "named", "location=no,menubar=no,resizable=no,height=425,width=675,scrollbars=no,left=220,screenX=220,top=70,screenY=70")
    } else {
        window.open("/gp/detail/map-popup.html/?quantity=" + quantity + "&asin=" + asin + "&urlGet=" + urlGet, "named", "location=no,menubar=no,resizable=no,height=425,width=675,scrollbars=no,left=220,screenX=220,top=70,screenY=70")
    }
};

function html_esc(str) {
    var entity = {
        "'": "&apos;",
        '"': "&quot;",
        "<": "&lt;",
        ">": "&gt;"
    };
    for (var e in entity) {
        str = str.replace(new RegExp(e, "g"), entity[e])
    }
    return str
}
function esc_length_ok(str, len) {
    return (html_esc(str).length <= len)
}
function checkEmail(email) {
    if (!email) {
        return true
    }
    if (email.value == "") {
        alert("Please enter your email address.");
        email.focus()
    } else {
        if (/^\w+([\.-]\w+)*@\w+([\.-]\w+)*\.\w{2,}$/.test(email.value)) {
            return true
        } else {
            alert("Please enter a valid email address.");
            email.focus()
        }
    }
    return false
}
function amz_js_PopWin(url, name, options) {
    var winHelp = window.open(url, name, options);
    if (winHelp) {
        winHelp.opener = this;
        winHelp.focus()
    }
}
function countRemainingWordsReviewBody() {
    var maxCount = 1000;
    var textArea = document.getElementById("review");
    var review = textArea.value;
    review = review.split(/\s+/);
    currWordCount = review.length;
    if (currWordCount > maxCount) {
        var truncatedText = "";
        for (i = 0; i < 999; i++) {
            truncatedText += review[i] + " "
        }
        truncatedText += review[999];
        textArea.value = truncatedText;
        textArea.scrollTop = textArea.scrollHeight - textArea.clientHeight
    }
    if (currWordCount >= 997) {
        document.getElementById("reviewCount").style.color = "#9E0B0F"
    } else {
        document.getElementById("reviewCount").style.color = "#999999"
    }
    if (currWordCount == 999) {
        document.getElementById("reviewCount").innerHTML = "1 word left"
    } else {
        if (currWordCount >= 1000) {
            document.getElementById("reviewCount").innerHTML = "0 words left"
        } else {
            document.getElementById("reviewCount").innerHTML = (maxCount - currWordCount) + " words left"
        }
    }
};

(function ($) {
    jQuery.fn.quickinfo = function (newOptions) {
        if (this.length > 1) {
            for (var i = 0; i < this.length; i++) {
                $(this[i]).quickinfo(newOptions)
            }
            return this
        }
        if (this.length < 1) {
            return this
        }
        var quickinfo = this;
        var baseOptions = {
            buttonClass: "quickInfoButton",
            activeClass: "quickInfoActive",
            buttonOnly: false,
            invokeFunction: "invokeQuickInfo",
            queryString: ""
        };
        var options = $.extend(baseOptions, newOptions);
        this.initialize = function () {
            var relInfo = this.attr("id");
            var relInfoParts = relInfo.split(":");
            if (relInfoParts.length < 2) {
                return false
            } else {
                this.data("args", relInfoParts)
            }
            this.addDom();
            this.addEvents();
            this.data("active", false);
            return this
        };
        this.addDom = function () {
            var qiButton = document.createElement("span");
            qiButton.className = options.buttonClass;
            this.prepend(qiButton);
            this.data("qiButton", $(qiButton));
            this.addClass(options.activeClass)
        };
        this.addEvents = function () {
            var clickEl;
            if (options.buttonOnly == true) {
                clickEl = this.data("qiButton")
            } else {
                clickEl = this
            }
            clickEl.hover(function () {
                quickinfo.data("active", true)
            }, function () {
                quickinfo.hide().show();
                quickinfo.data("active", false)
            }).keydown(function () {
                quickinfo.data("active", true)
            }).keyup(function () {
                window.setTimeout(function () {
                    quickinfo.data("active", false)
                }, 1)
            }).click(function (event) {
                e = window.event || event;
                if (quickinfo.data("active") != true) {
                    return true
                }
                qi = $(this).data("quickinfo");
                args = quickinfo.data("args");
                args.push(this);
                var queryString = "";
                if (typeof options.queryString == "string") {
                    queryString = options.queryString
                } else {
                    if (typeof options.queryString == "function") {
                        queryString = options.queryString.call(this)
                    }
                }
                args.push(queryString);
                var functionToCall = window[options.invokeFunction];
                if (typeof functionToCall == "function") {
                    functionToCall.apply(quickinfo, args)
                }
                return false
            })
        };
        return this.initialize()
    }
})(jQuery);

var target = window.target || {};
target.ui = target.ui || {};
target.ui.gn = target.ui.gn || {};
target.ui.gn.data = target.ui.gn.data || {};

target.ui.gn.RefTag = {
    defaultRefFormat: "@_#c",
    getRefTag: function getRefTag(format, data) {
        var ref = "";
        format = format || this.defaultRefFormat;
        data = data || {};
        var c = ((typeof data.childOrder == "undefined") ? 0 : data.childOrder);
        var m = ((typeof data.menuOrder == "undefined") ? 0 : data.menuOrder);
        var f = ((typeof data.flyoutNumber == "undefined") ? 0 : data.flyoutNumber);
        var p = ((typeof data.parentRefTag == "undefined") ? "" : data.parentRefTag);
        try {
            ref = format;
            ref = ref.replace("#c", c, "g");
            ref = ref.replace("#m", m, "g");
            ref = ref.replace("#f", f, "g");
            ref = ref.replace("#p", p, "g")
        } catch (e) {
            ref = ""
        }
        return ref
    }
};

target.ui.gn.Node = function Node_Ctor(nodeData, paramsObject) {
    if (!nodeData) {
        return null
    }
    paramsObject = paramsObject || {};
    var recurse = paramsObject.recurse || 0;
    this.parentNode = paramsObject.parentNode || null;
    this.siblingNumber = paramsObject.siblingNumber || null;
    this.refValues = paramsObject.refValues || {};
    this.flyoutNumber = paramsObject.flyoutNumber || 0;
    this.addedUrlParams = paramsObject.addedUrlParams || "";
    if (!this.flyoutNumber && this.parentNode) {
        this.flyoutNumber = this.parentNode.flyoutNumber
    }
    var menuOrderCounter = paramsObject.menuOrder;
    if (menuOrderCounter) {
        this.menuOrder = menuOrderCounter.counter;
        if (nodeData.location) {
            menuOrderCounter.counter++
        }
    }
    this.secure = nodeData.secure && nodeData.secure == "true";
    this.text = nodeData.text || "";
    this.title = (typeof nodeData.title == "string" ? nodeData.title : this.text);
    this.name = nodeData.name || "";
    this.location = nodeData.location || "";
    this.children = nodeData.children || [];
    this.icnTag = nodeData.icnTag || "";
    this.childNodes = [];
    this.refFormat = nodeData.ref_format || "";
    this.forceIncat = nodeData.forceIncat || "";
    this.desc = nodeData.desc || "";
    var self = this;
    this.getDomTemplate = function getDomTemplate_Node(className) {
        var href = self.getHref();
        if (href != "") {
            self.domTemplate = {
                tagName: "a",
                href: href,
                title: self.title,
                childNodes: [{
                    tagName: "span",
                    innerHTML: self.text
                }]
            }
        } else {
            if (className) {
                className += " nolink"
            }
            self.domTemplate = {
                tagName: "span",
                className: "nolink",
                childNodes: [{
                    tagName: "span",
                    innerHTML: self.text
                }]
            }
        }
        if (className) {
            self.domTemplate.className = className
        }
        return self.domTemplate
    };
    this.getHtml = function () {};
    this.isParent = function isParent() {
        return ( !! self.children && self.children.length > 0)
    };
    this.isLink = function isLink() {
        return ( !! self.location)
    };
    this.getParent = function getParent() {
        return self.parentNode
    };
    this.isBrowseNode = function isBrowseNode() {
        return (!isNaN(self.location))
    };
    this.getRefFormat = function getRefFormat() {
        if (!self.refFormat) {
            var n = self;
            while (n = n.parentNode) {
                if (n.refFormat) {
                    self.refFormat = n.refFormat;
                    break
                }
            }
        }
        return self.refFormat
    };
    this.getForceIncat = function getForceIncat() {
        if (!self.forceIncat) {
            var n = self.parentNode;
            while (n) {
                if (n.forceIncat) {
                    self.forceIncat = n.forceIncat;
                    break
                }
                n = n.parentNode
            }
        }
        if (self.forceIncat == "none") {
            self.forceIncat = ""
        }
        return self.forceIncat
    };
    this.getRefTag = function getRefTag() {
        if (!self.refTag) {
            if (typeof nodeData.ref == "string") {
                self.refTag = nodeData.ref
            } else {
                var format = self.getRefFormat();
                var refValues = self.refValues;
                refValues.childOrder = self.siblingNumber;
                refValues.menuOrder = self.menuOrder;
                refValues.flyoutNumber = self.flyoutNumber;
                refValues.parentRefTag = self.parentNode.refTag;
                self.refTag = target.ui.gn.RefTag.getRefTag(format, refValues)
            }
        }
        return self.refTag
    };
    this.getHref = function getHref() {
        if (!self.href) {
            if (!self.location) {
                self.href = "";
                return self.href
            }
            var refString = self.getRefTag();
            var incatString = self.getForceIncat();
            if (incatString) {
                incatString = "forceIncat=" + incatString
            }
            var location = self.location;
            var description = self.desc;
            var server = self.secure ? target.ui.gn.secureserver : target.ui.gn.nonsecureserver;
            server = server || "";
            var moreParams = self.addedUrlParams;
            var urlParamDelimiter = "&";
            if (location.indexOf("?") == -1) {
                urlParamDelimiter = "?"
            }
            if (location.indexOf("/") == 0) {
                if (refString) {
                    refString = urlParamDelimiter + "ref=" + refString;
                    urlParamDelimiter = "&"
                }
                if (incatString) {
                    incatString = urlParamDelimiter + incatString;
                    urlParamDelimiter = "&"
                }
                if (moreParams) {
                    moreParams = urlParamDelimiter + moreParams
                }
                self.href = server + location + refString + incatString + moreParams
            } else {
                if (location.indexOf("#") == 0) {
                    self.href = location
                } else {
                    if (self.isBrowseNode()) {
                        if (refString) {
                            refString = "/ref=" + refString
                        }
                        if (incatString) {
                            incatString = "&" + incatString
                        }
                        if (moreParams) {
                            moreParams = "&" + moreParams
                        }
                        if (description) {
                            description = "/" + description
                        }
                        self.href = server + description + "/b" + refString + "?ie=UTF8&node=" + location + incatString + moreParams
                    } else {
                        if (refString) {
                            refString = encodeURIComponent(refString);
                            refString = refString.replace("_", "%5F", "g");
                            refString = "ref=" + refString
                        }
                        var redirect = "/gp/redirect.html";
                        if (target.ui.gn.isRainier) {
                            redirect = "/gp/preview/redirect.html"
                        }
                        var destination = location + urlParamDelimiter + refString;
                        self.href = server + redirect + "?%5Fencoding=UTF8&location=" + encodeURIComponent(destination)
                    }
                }
            }
        }
        return self.href
    };
    this.buildRecursive = function buildRecursive() {
        for (var i = 0, len = self.children.length; i < len; i++) {
            self.childNodes.push(new target.ui.gn.Node(self.children[i], {
                parentNode: self,
                siblingNumber: i + 1,
                menuOrder: menuOrderCounter,
                recurse: recurse - 1,
                addedUrlParams: self.addedUrlParams
            }))
        }
    };
    if (recurse) {
        this.buildRecursive()
    }
    return this
};

target.ui.gn.Flyout = function Flyout_Ctor(rootElement, structure, index, type) {
    var self = this;
    this.rootElement = rootElement;
    this.structure = structure;
    if (structure && structure.counts) {
        this.counts = structure.counts
    } else {
        this.counts = []
    }
    this.flyoutNumber = index + 1;
    this.type = type || "";
    var domAttachmentPoint;
    this.refValues = {
        childOrder: 0,
        menuOrder: 0,
        flyoutNumber: this.flyoutNumber,
        parentRefTag: ""
    };
    self.refValues.menuOrder++;
    this.getDomTemplate = function getDomTemplate_Flyout() {
        if (!self.domTemplate) {
            if (this.structure && this.counts.length) {
                var tabTmpl = self.rootElement.getDomTemplate();
                var cols = self.getColumns();
                self.domTemplate = self.wrapFlyoutContent(cols, tabTmpl)
            }
        }
        return self.domTemplate
    };
    this.createDomElements = function createDomElements_Flyout() {
        domAttachmentPoint = jQuery(document.createElement("DIV"));
        domAttachmentPoint.appendDom(self.getDomTemplate())
    };
    this.getDomElements = function getDomElements_Flyout() {
        if (!domAttachmentPoint) {
            self.createDomElements()
        }
        return (domAttachmentPoint.get(0))
    };
    this.getLinkGroupTemplates = function getLinkGroupTemplates() {
        var flyoutChildren = self.rootElement.childNodes;
        var linkGroups = [],
            linkGroupTemplate;
        for (var i = 0, len = flyoutChildren.length; i < len; i++) {
            var linkGroupData = flyoutChildren[i];
            var headerNode = linkGroupData;
            if (headerNode.isLink()) {
                self.refValues.menuOrder++
            }
            var childLinkTemplates = [];
            for (var j = 0, len2 = headerNode.childNodes.length; j < len2; j++) {
                var childNode = headerNode.childNodes[j];
                if (childNode.isLink()) {
                    self.refValues.menuOrder++
                }
                childLinkTemplates.push({
                    tagName: "li",
                    childNodes: [childNode.getDomTemplate()]
                })
            }
            var treeStatus = "leaf";
            if (childLinkTemplates.length > 0) {
                linkGroupTemplate = [headerNode.getDomTemplate("parent")];
                treeStatus = "branch";
                linkGroupTemplate.push({
                    tagName: "ul",
                    className: "children",
                    childNodes: childLinkTemplates
                })
            } else {
                linkGroupTemplate = [headerNode.getDomTemplate()]
            }
            linkGroups.push({
                tagName: "li",
                className: treeStatus,
                childNodes: linkGroupTemplate
            })
        }
        return linkGroups
    };
    this.getColumns = function getColumns() {
        var columns = [];
        var linkGroups = self.getLinkGroupTemplates();
        var start = 0,
            end;
        var columnCounts = this.counts;
        var columnClasses = this.structure.columnClasses || [];
        for (var i = 0, len = columnCounts.length; i < len; i++) {
            var end = start + columnCounts[i];
            var columnClass = columnClasses[i];
            var divClass = "gn_col";
            if (columnClass) {
                divClass = columnClass
            }
            if (i == len - 1) {
                divClass += " last-child"
            }
            columns.push({
                tagName: "div",
                className: divClass,
                childNodes: [{
                    tagName: "ul",
                    childNodes: linkGroups.slice(start, end)
                }]
            });
            start = end
        }
        return columns
    };
    this.wrapFlyoutContent = function wrapFlyoutContent(flybodyContent, flytabContent) {
        var flyoutType = self.type;
        var flyoutClass = this.structure.flyoverClass || "";
        if (flybodyContent.length > 1 && !flyoutClass.match("col")) {
            flyoutClass += " col" + flybodyContent.length
        }
        flytabContent = [flytabContent];
        var shadowInnerHtml = '<div class="gn_tl"></div><div class="gn_tr"></div><div class="gn_bl"></div><div class="gn_br"></div>';
        flybodyContent.unshift({
            tagName: "div",
            className: "gn_shadow",
            innerHTML: shadowInnerHtml
        });
        flytabContent.unshift({
            tagName: "div",
            className: "gn_shadow",
            innerHTML: shadowInnerHtml
        });
        var flyoutDomStructure = {
            tagName: "div",
            id: "gn_" + flyoutType + "fly_" + this.flyoutNumber,
            className: "gn_fly " + flyoutType + " " + flyoutClass,
            childNodes: [{
                tagName: "div",
                className: "gn_flytab",
                childNodes: flytabContent
            },
            {
                tagName: "div",
                className: "gn_flybody",
                childNodes: flybodyContent
            }]
        };
        return flyoutDomStructure
    };
    this.getColumnsC = function getColumnsC() {
        var columns = [];
        var columnCounts = self.counts;
        var columnClasses = self.structure.columnClasses || [];
        var linkGroups = self.getLinkGroupTemplates();
        var start = 0,
            end;
        for (var i = 0; i < columnCounts.length; i++) {
            var end = start + columnCounts[i];
            var columnClass = columnClasses[i];
            var divClass, ulClass = "menu";
            if (columnClass) {
                divClass = ulClass = columnClass
            }
            columns.push({
                tagName: "ul",
                className: ulClass,
                childNodes: linkGroups.slice(start, end)
            });
            start = end
        }
        return columns
    };
    this.wrapFlyoutContentC = function wrapFlyoutContentC(content) {
        var columnCount = self.counts.length;
        var cardinals = ["zero", "one", "two", "three", "four", "five", "six", "seven", "eight", "nine", "ten"];
        var flyoutClass = "dd_" + cardinals[columnCount] + "_column";
        var baseId = "sc_tab" + (self.flyoutNumber);
        var flyoutTopDom = {
            tagName: "div",
            className: "round_top",
            id: baseId + "_top",
            childNodes: [{
                tagName: "div",
                className: "dd_shim",
                id: baseId + "_split"
            }]
        };
        var flyoutBottomDom = {
            tagName: "div",
            className: "round_footer",
            id: baseId + "_footer"
        };
        var flyoutInnerDiv = {
            tagName: "div",
            className: "flyoutInnerDiv",
            childNodes: content
        };
        var flyoutDomStructure = {
            tagName: "div",
            className: flyoutClass,
            id: baseId,
            childNodes: [flyoutTopDom,
            {
                tagName: "div",
                className: "container",
                id: baseId + "_container",
                childNodes: [flyoutInnerDiv]
            },
            flyoutBottomDom]
        };
        return flyoutDomStructure
    };
    return this
};

jQuery.fn.appendDom = function (template) {
    return this.each(function () {
        for (element in template) {
            var el = (typeof(template[element].tagName) === "string") ? document.createElement(template[element].tagName) : document.createTextNode("");
            delete template[element].tagName;
            for (attrib in template[element]) {
                if (attrib == "className") {
                    jQuery(el).addClass(template[element][attrib]);
                    delete template[element].className
                }
                switch (typeof(template[element][attrib])) {
                case "string":
                    if (typeof(el[attrib]) === "string") {
                        el[attrib] = template[element][attrib]
                    } else {
                        el.setAttribute(attrib, template[element][attrib])
                    }
                    break;
                case "function":
                    el[attrib] = template[element][attrib];
                    break;
                case "object":
                    if (attrib === "childNodes") {
                        jQuery(el).appendDom(template[element][attrib])
                    }
                    break
                }
            }
            this.appendChild(el)
        }
    })
};

(function ($) {
    jQuery.fn.accessibleClick = function (functionToCall, options) {
        if (this.length > 1) {
            for (var i = 0; i < this.length; i++) {
                $(this[i]).accessibleClick(functionToCall, options)
            }
            return this
        }
        if (this.length < 1) {
            return this
        }
        var enableKeyDown = (options) ? options.disableKeyDown || false : false;
        var accessibleClick = this;
        this.data("active", false);
        this.initialize = function () {
            this.hover(function () {
                accessibleClick.data("active", true)
            }, function () {
                accessibleClick.data("active", false)
            }).keydown(function () {
                if (enableKeyDown) {
                    accessibleClick.data("active", true)
                }
            }).keyup(function () {
                window.setTimeout(function () {
                    if (enableKeyDown) {
                        accessibleClick.data("active", false)
                    }
                }, 1)
            }).click(function (event, data) {
                var isUserClick = data && (typeof data.isUserClick == "boolean") ? data.isUserClick : true;
                if (isUserClick && accessibleClick.data("active") != true) {
                    return true
                }
                if (typeof functionToCall == "function") {
                    functionToCall.apply(accessibleClick, arguments)
                }
                return false
            })
        };
        return this.initialize()
    }
})(jQuery);


GVAR.env.ua = function () {
    var o = {
        ie: 0,
        opera: 0,
        gecko: 0,
        webkit: 0,
        mobile: null,
        air: 0,
        caja: 0
    },
        ua = navigator.userAgent,
        m;
    if ((/KHTML/).test(ua)) {
        o.webkit = 1
    }
    m = ua.match(/AppleWebKit\/([^\s]*)/);
    if (m && m[1]) {
        o.webkit = parseFloat(m[1]);
        if (/ Mobile\//.test(ua)) {
            o.mobile = "Apple"
        } else {
            m = ua.match(/NokiaN[^\/]*/);
            if (m) {
                o.mobile = m[0]
            }
        }
        m = ua.match(/AdobeAIR\/([^\s]*)/);
        if (m) {
            o.air = m[0]
        }
    }
    if (!o.webkit) {
        m = ua.match(/Opera[\s\/]([^\s]*)/);
        if (m && m[1]) {
            o.opera = parseFloat(m[1]);
            m = ua.match(/Opera Mini[^;]*/);
            if (m) {
                o.mobile = m[0]
            }
        } else {
            m = ua.match(/MSIE\s([^;]*)/);
            if (m && m[1]) {
                o.ie = parseFloat(m[1])
            } else {
                m = ua.match(/Gecko\/([^\s]*)/);
                if (m) {
                    o.gecko = 1;
                    m = ua.match(/rv:([^\s\)]*)/);
                    if (m && m[1]) {
                        o.gecko = parseFloat(m[1])
                    }
                }
            }
        }
    }
    m = ua.match(/Caja\/([^\s]*)/);
    if (m && m[1]) {
        o.caja = parseFloat(m[1])
    }
    return o
}();

/*
 * target.textResizeDetector
 * @author Lenny Burdette lburdette@schematic.com
 * @fileoverview Rewritten text resize detector to remove jQuery dependency.
 * Doesn't work in Opera.
 * @usage 
 * 
 * 		target.textResizeDetector.init("id-of-dom-element", function(event, initialSize) {
 * 			event.subscribe(textSizeChangeHandler);	
 *		});
 * 
 * Previous license:
 * 
 * Copyright (c) 2008 Tom Deater (http://www.tomdeater.com)
 * Licensed under the MIT License:
 * http://www.opensource.org/licenses/mit-license.php
 *
 * Renamed to "onTextResize" for a more descriptive name
 * Modified to check if the browser either zooms or text-resizes
 * (Does not fire if browser uses zoom)
 *
 * uses an iframe, sized in ems, to detect text size changes then trigger a "textresize" event
 * heavily based on code by Hedger Wang: http://www.hedgerwow.com/360/dhtml/js-onfontresize.html
 *
 * "textresize" event is triggered on the document object
 * subscribe to event using: $(document).bind("textresize", function (event, data) {});
 * "data" contains the current size of 1 em unit (in pixels)
 * 
 */
window.target = window.target || {};
target.textResizeDetector = function () {
    var Y = GVAR,
        E = Y.util.Event,
        UA = Y.env.ua;
    if (UA.opera) {
        return null
    }
    var fontSizeChangeEvent = new GVAR.util.CustomEvent("fontsizechange");
    var eventPath = "target.textResizeDetector.event";
    var iframe;
    var size = {};
    var sizePath = "target.textResizeDetector.setSize";

    function init(container, callback) {
        createIframe(container);
        addBehavior();
        callback(fontSizeChangeEvent, size)
    }
    function createIframe(container) {
        iframe = document.createElement("iframe");
        iframe.src = "/iframe.ajax";
        iframe.id = "frame-onTextResize" + new Date().getTime();
        iframe.title = "empty";
        iframe.frameborder = 0;
        var style = {
            width: "100em",
            height: "10px",
            position: "absolute",
            borderWidth: 0,
            top: "-9999px",
            left: "-9999px"
        };
        for (var prop in style) {
            iframe.style[prop] = style[prop]
        }
        container.appendChild(iframe)
    }
    function addBehavior() {
        if (UA.ie) {
            E.on(iframe, "resize", onFontSizeChange)
        } else {
            var doc = iframe.contentWindow || iframe.contentDocument || iframe.document;
            doc = doc.document || doc;
            var iwindow = iframe.contentWindow;
            var s = 'style="width:100%;height:100%;padding:0;margin:0;overflow:hidden;"';
            doc.open();
            doc.write("<html " + s + "><body " + s + "></body></html>");
            doc.close();
            E.on(iwindow, "resize", onFontSizeChange)
        }
        size = iframe.offsetWidth / 100
    }
    function onFontSizeChange() {
        size = iframe.offsetWidth / 100;
        fontSizeChangeEvent.fire(size)
    }
    return {
        init: function (id, callback) {
            E.onAvailable(id, function () {
                init(document.getElementById(id), callback)
            })
        },
        event: fontSizeChangeEvent,
        getSize: function () {
            return size
        },
        setSize: function (newSize) {
            size = newSize
        }
    }
}();

target = window.target || {};
target.NAV = target.NAV || {};
target.NAV.Flyouts = target.NAV.Flyouts || {};
(function () {
    var Y = GVAR,
        D = Y.util.Dom,
        E = Y.util.Event,
        UA = Y.env.ua,
        Flyouts = target.NAV.Flyouts;
    var positionParent;
    var timeout;
    var PX = "px";
    Flyouts.create = function (parent, type, fontSize, topPaddingFix) {
        positionParent = positionParent || document.getElementById("gn");
        type = type ? type : "Main";
        var instance = new Flyouts[type](parent, fontSize, topPaddingFix);
        if (!instance.invalid) {
            return instance
        }
    };
    Flyouts.Main = function (parent, fontSize, topPaddingFix) {
        var split = parent.id.split("_");
        var index = split[2] - 1;
        target.ui.gn.flyoutsController.buildFlyout("Main", index);
        this.parent = parent;
        this.el = document.getElementById(parent.id.replace("main", "mainfly"));
        this.fontSize = fontSize;
        this.topPaddingFix = topPaddingFix;
        if (this.el) {
            if (window.sc && sc.incat && sc.incat.url) {
                jQuery("a", this.el).each(function () {
                    sc.sellerCentralLinks(this)
                })
            }
        } else {
            this.invalid = true;
            return
        }
        this.setup()
    };
    Flyouts.Main.prototype = {
        setup: function () {
            this.label = this.el.getElementsByTagName("div")[0];
            this.body = D.getElementsByClassName("gn_flybody", "div", this.el)[0];
            this.fixSize();
            this.addBehavior()
        },
        setPosition: function () {
            showShim(this);
            D.setXY(this.el, [this.xPos, this.yPos])
        },
        fixSize: function () {
            this.labelWidth = this.parent.offsetWidth + this.options.labelWidthAdjust;
            this.label.style.width = this.labelWidth + PX;
            this.labelHeight = this.parent.offsetHeight + this.options.labelHeightAdjust;
            this.label.style.height = this.labelHeight + PX;
            this.label.style.top = -this.labelHeight + this.options.labelTopAdjust + PX;
            if (this.fontSize) {
                this.label.getElementsByTagName("a")[0].style.fontSize = this.fontSize + PX
            }
            if (this.topPaddingFix) {
                this.label.getElementsByTagName("a")[0].style.paddingTop = this.topPaddingFix + PX
            }
            if (this.labelWidth >= this.body.offsetWidth) {
                this.body.style.width = this.labelWidth + 5 + PX
            }
        },
        options: {
            xOffset: 0,
            yOffset: 0,
            labelWidthAdjust: 0,
            labelHeightAdjust: 0,
            labelTopAdjust: 0,
            labelLeftAdjust: 0
        },
        addBehavior: function () {
            E.on(this.el, "mouseover", onMouseOver, this);
            E.on(this.el, "mouseout", onMouseLeave, this)
        },
        getPosition: function () {
            var p = D.getXY(this.parent);
            this.xPos = p[0] + this.options.xOffset;
            this.yPos = p[1] + this.options.yOffset + this.label.offsetHeight
        },
        fixFlyout: function () {
            flip(this);
            if (!this.fixed) {
                this.fixed = true;
                columnHeightFix(this);
                ieShadows(this)
            }
        },
        show: function () {
            clearTimeout(timeout);
            if (this.el) {
                this.getPosition();
                this.fixFlyout(this);
                this.setPosition()
            }
        },
        hide: function () {
            clearTimeout(timeout);
            if (this.el) {
                this.el.style.left = "-9999px";
                this.el.style.top = "-9999px";
                hideShim()
            }
        },
        focus: function () {
            this.label.getElementsByTagName("a")[0].focus()
        },
        reset: function () {
            this.label.setAttribute("style", "");
            D.removeClass(this.el, "right");
            D.removeClass(this.el, "middle");
            resetColumnHeights(this)
        }
    };
    Flyouts.Sub = function (parent) {
        var split = parent.id.split("_");
        var index = split[2] - 1;
        target.ui.gn.flyoutsController.buildFlyout("Sub", index);
        this.parent = parent;
        this.el = document.getElementById(parent.id.replace("sub", "subfly"));
        if (this.el) {
            if (window.sc && sc.incat && sc.incat.url) {
                jQuery("a", this.el).each(function () {
                    sc.sellerCentralLinks(this)
                })
            }
        } else {
            this.invalid = true;
            return
        }
        this.setup()
    };
    Flyouts.Sub.prototype = {};
    Y.extend(Flyouts.Sub, Flyouts.Main, {
        options: {
            xOffset: 0,
            yOffset: 0,
            labelWidthAdjust: 0,
            labelHeightAdjust: -5,
            labelTopAdjust: 4,
            labelLeftAdjust: 0
        },
        fixFlyout: function () {
            reposition(this);
            if (!this.fixed) {
                this.fixed = true;
                columnHeightFix(this);
                ieShadows(this)
            }
        }
    });
    Flyouts.Special = function (parent) {
        this.parent = parent;
        this.el = document.getElementById(parent.id.replace("l2", "l2dd"));
        this.link = this.parent.getElementsByTagName("a");
        if (this.link.length) {
            this.link = this.link[0];
            this.offsets = this.link.rel.split("x");
            this.offsets[0] = parseInt(this.offsets[0], 10);
            this.offsets[1] = parseInt(this.offsets[1], 10)
        }
        if (this.el) {
            if (window.sc && sc.incat && sc.incat.url) {
                jQuery("a", this.el).each(function () {
                    sc.sellerCentralLinks(this)
                })
            }
        } else {
            this.invalid = true;
            return
        }
        this.setup()
    };
    Flyouts.Special.prototype = {
        setup: function () {
            E.on(this.el, "mouseover", onMouseOver, this);
            E.on(this.el, "mouseout", onMouseLeave, this)
        },
        show: function () {
            if (this.el) {
                D.addClass(this.el, "show");
                D.addClass(this.parent, "gn_over");
                this.getPosition();
                this.addLabelShim();
                this.setPosition();
                showShim(this)
            }
        },
        hide: function () {
            if (this.el) {
                D.removeClass(this.el, "show");
                D.removeClass(this.parent, "gn_over");
                hideShim(this)
            }
        },
        getPosition: function () {
            var p = D.getXY(this.parent);
            this.xPos = p[0] + this.offsets[0];
            this.yPos = p[1] + this.offsets[1]
        },
        setPosition: function () {
            this.el.style.left = this.xPos + PX;
            this.el.style.top = this.yPos + PX
        },
        addLabelShim: function () {
            if (!this.labelShim) {
                var shim = document.createElement("a");
                shim.href = this.parent.getElementsByTagName("a")[0].href;
                shim.className = "gn_special_shim";
                shim.style.width = this.parent.offsetWidth + PX;
                shim.style.height = this.parent.offsetHeight + 6 + PX;
                shim.style.top = -this.parent.offsetHeight - 6 + PX;
                shim.style.left = D.getX(this.parent) - this.xPos + PX;
                this.el.appendChild(shim);
                this.labelShim = true
            }
        },
        reset: function () {}
    };

    function onMouseOver(e, flyout) {
        clearTimeout(timeout)
    }
    function onMouseLeave(e, flyout) {
        var parent = E.getRelatedTarget(e);
        while (parent && parent != this) {
            parent = parent.parentNode
        }
        if (parent != this) {
            timeout = setTimeout(function () {
                flyout.hide()
            }, 250)
        }
    }
    function maximumRight() {
        return D.getXY(positionParent)[0] + positionParent.offsetWidth
    }
    function flip(flyout) {
        var width = flyout.body.offsetWidth;
        if (flyout.xPos + width > maximumRight()) {
            setTabPosition(flyout, "right")
        }
    }
    function reposition(flyout) {
        var width = flyout.el.offsetWidth;
        var max = maximumRight();
        if (flyout.xPos + width > max) {
            setTabPosition(flyout, flyout.xPos + width - max)
        }
    }
    function setTabPosition(flyout, position) {
        var moveTabLeftBy = 0,
            rightAligned = flyout.el.offsetWidth - flyout.label.offsetWidth,
            alignment;
        if (position === "right" || position >= rightAligned - 5) {
            moveTabLeftBy = rightAligned;
            alignment = "right"
        } else {
            if (position > 0) {
                alignment = "middle";
                moveTabLeftBy = position
            } else {
                return
            }
        }
        D.addClass(flyout.el, alignment);
        flyout.label.style.left = moveTabLeftBy + "px";
        flyout.xPos -= moveTabLeftBy
    }
    function columnHeightFix(flyout) {
        findColumns(flyout);
        if (flyout.moreCol && flyout.moreCol.offsetHeight < flyout.tallest) {
            var h = flyout.tallest + "px";
            for (var i = -1, node; node = flyout.columns[++i];) {
                node.style.height = h
            }
        }
    }
    function findColumns(flyout) {
        if (flyout.columns) {
            return
        }
        var cols = [],
            tallest, moreCol, child;
        child = flyout.body.firstChild;
        tallest = 0;
        do {
            if (child.nodeType === 1 && child.className.indexOf("gn_col") > -1) {
                cols[cols.length] = child;
                if (child.className.indexOf("gn_more") > -1) {
                    moreCol = child
                } else {
                    if (child.offsetHeight >= tallest) {
                        tallest = child.offsetHeight
                    }
                }
            }
        } while (child = child.nextSibling);
        flyout.columns = cols;
        flyout.tallest = tallest;
        flyout.moreCol = moreCol
    }
    function resetColumnHeights(flyout) {
        if (flyout.columns) {
            for (var i = -1, node; node = flyout.columns[++i];) {
                node.style.height = "auto"
            }
        }
    }
    function ieShadows(flyout) {
        if (!UA.ie) {
            return
        }
        var body = flyout.body,
            label = flyout.label,
            bodyShadow = D.getElementsByClassName("gn_shadow", "div", body)[0],
            tabShadow = D.getElementsByClassName("gn_shadow", "div", label)[0];
        if (UA.ie > 6 || document.compatMode == "CSS1Compat") {
            oddNumberedSizing(bodyShadow, body.offsetWidth, body.offsetHeight);
            oddNumberedSizing(tabShadow, label.offsetWidth, label.offsetHeight);
            var bodyEven = body.offsetWidth % 2 === 0,
                labelEven = label.offsetWidth % 2 === 0;
            if (D.hasClass(flyout.el, "right")) {
                if (bodyEven && labelEven) {} else {
                    if (bodyEven) {
                        body.style.left = -1 + PX
                    } else {
                        if (labelEven) {
                            body.style.left = 1 + PX
                        }
                    }
                }
            }
        } else {
            bodyShadow.style.width = body.offsetWidth + 11 + PX;
            bodyShadow.style.height = body.offsetHeight + 10 + PX;
            tabShadow.style.width = label.offsetWidth + 11 + PX;
            tabShadow.style.height = label.offsetHeight + 10 + PX;
            if (D.hasClass(flyout.el, "right")) {
                var bodyEven = body.offsetWidth % 2 === 0,
                    labelEven = label.offsetWidth % 2 === 0;
                if (bodyEven && labelEven) {} else {
                    if (bodyEven) {
                        body.style.left = 1 + PX
                    } else {
                        if (labelEven) {
                            body.style.left = -1 + PX
                        }
                    }
                }
            }
        }
    }
    function oddNumberedSizing(el, w, h) {
        el.style.width = (w % 2 ? w - 1 : w) + PX;
        el.style.height = (h % 2 ? h - 1 : h) + PX
    }
    var iframe, K = function () {},
        ie6 = (UA.ie && UA.ie < 7);

    function ieSupport() {
        iframe = document.createElement("iframe");
        iframe.className = "gn_shim";
        iframe.src = "/iframe.ajax";
        iframe.title = "empty";
        iframe.border = 0;
        document.body.appendChild(iframe)
    }
    Flyouts.ieSupport = ie6 ? ieSupport : K;
    var showShim = ie6 ?
    function (flyout) {
        D.setXY(iframe, [flyout.xPos, flyout.yPos]);
        iframe.style.width = flyout.el.offsetWidth + PX;
        iframe.style.height = flyout.el.offsetHeight + PX
    } : K;
    var hideShim = ie6 ?
    function (flyout) {
        iframe.style.left = "-9999px";
        iframe.style.top = "-9999px"
    } : K
}());

jQuery(document).ready(function call_FlyoutsController_build() {
    var controller = target.ui.gn.flyoutsController;
    controller.build.call(controller)
});
target.ui.gn.flyoutsController = {
    flyoutsAttachmentPoint: {},
    incatsRootNode: {},
    supercatsRootNode: {},
    checkDependencies: true,
    initialized: false,
    globalUrlParams: "",
    init: function init_flyoutsController() {
        if (this.initialized !== true) {
            if (this.checkDependencies && !this.dependenciesOk()) {
                return false
            }
        }
        this.initialized = true;
        return this.initialized
    },
    build: function build_flyoutsController() {
        try {
            var initOk = this.init();
            if (initOk === false) {
                return
            }
            var cfg = {
                flyoutsAttachmentPointSelector: "#gn_fly",
                supercatsTabsSelector: "#gn_main li",
                supercatsTabsHighlightClass: "gn_active",
                incatsRowSelector: "#gn_sub",
                preserveParams: {
                    releaseID: 1,
                    customerID: 1,
                    sc_server_name: 1,
                    weblab: 1
                },
                searchCategorySelector: "gn_search_scope"
            };
            if (!target.ui.gn.data) {
                if (window.console && console.error) {
                    console.error("can't find menu data")
                }
                return
            }
            var addedParams = [];
            if (window.location.search) {
                var searchString = "";
                if (window.location.search.charAt(0) == "?") {
                    searchString = window.location.search.substring(1, window.location.search.length)
                } else {
                    searchString = window.location.search
                }
                if (searchString && searchString.length > 0) {
                    var keyValues = searchString.split("&");
                    if (keyValues.length > 0) {
                        for (var i = 0; i < keyValues.length; i++) {
                            var kvPair = keyValues[i].split("=");
                            if (kvPair.length == 2) {
                                if (cfg.preserveParams[kvPair[0]]) {
                                    addedParams.push(keyValues[i])
                                }
                            }
                        }
                    }
                }
            }
            this.globalUrlParams = addedParams.join("&");
            this.setDefaultSearch(cfg.searchCategorySelector);
            var supercats = target.ui.gn.data.supercats;
            if (supercats) {
                this.supercatsRootNode = new target.ui.gn.Node(supercats.data, {
                    recurse: 1,
                    addedUrlParams: this.globalUrlParams
                });
                this.highlightSupercatTab(this.supercatsRootNode, cfg.supercatsTabsSelector, cfg.supercatsTabsHighlightClass)
            }
            var incat = target.ui.gn.incat;
            if (incat) {
                var incatObject = target.ui.gn.data.incat;
                if (incatObject) {
                    this.incatsRootNode = new target.ui.gn.Node(incatObject.data, {
                        recurse: 1,
                        addedUrlParams: this.globalUrlParams
                    }, incat);
                    this.populateIncatsRow(this.incatsRootNode, cfg.incatsRowSelector);
                    target.NAV.initFlyouts()
                }
            }
            if (typeof(cfg.flyoutsAttachmentPointSelector) != "undefined") {
                this.flyoutsAttachmentPoint = jQuery(cfg.flyoutsAttachmentPointSelector)
            }
            if (this.flyoutsAttachmentPoint.length == 0) {
                var newElement = document.createElement("div");
                newElement.setAttribute("id", "gn_fly");
                jQuery("body").append(newElement);
                this.flyoutsAttachmentPoint = jQuery(newElement)
            }
        } catch (e) {
            if (window.console && console.error) {
                console.error("could not build global nav flyouts: ", e)
            }
        }
    },
    buildFlyout: function buildSingleFlyout(type, index) {
        var rootNode;
        var dataSource;
        if (type == "Main") {
            dataSource = target.ui.gn.data.supercats;
            rootNode = this.supercatsRootNode;
            type = "main"
        } else {
            var incat = target.ui.gn.incat;
            var incatObject = target.ui.gn.data.incat;
            if (incatObject) {
                dataSource = incatObject;
                rootNode = this.incatsRootNode;
                type = "sub"
            }
        }
        if (dataSource && rootNode) {
            var data = dataSource.data.children[index];
            var structure = dataSource.structure[index];
            var node = new target.ui.gn.Node(data, {
                parentNode: rootNode,
                siblingNumber: index + 1,
                flyoutNumber: index + 1,
                menuOrder: {
                    counter: 0
                },
                recurse: 10,
                addedUrlParams: this.globalUrlParams
            });
            var flyout = new target.ui.gn.Flyout(node, structure, index, type);
            if (flyout && flyout.getDomTemplate) {
                var domTemplate = flyout.getDomTemplate();
                if (domTemplate) {
                    this.flyoutsAttachmentPoint.appendDom([domTemplate])
                }
            }
        }
    },
    highlightSupercatTab: function highlightSupercatTab(root, tabsSelector, highlightClass) {
        incat = target.ui.gn.incat;
        if (!root || !incat) {
            return
        }
        var childNodes = root.childNodes;
        for (var i = 0, len = childNodes.length; i < len; i++) {
            if (incat == "icn_" + childNodes[i].location) {
                jQuery(tabsSelector).eq(i).addClass(highlightClass).prepend("<span></span>");
                return
            }
        }
    },
    setDefaultSearch: function setDefaultSearch(categorySelector) {
        target.NAV.initSearch();
        incat = target.ui.gn.incat;
        if (!categorySelector || !incat) {
            return
        }
        var categoryObject = document.getElementById(categorySelector);
        var selectedCategory = categoryObject.options[categoryObject.selectedIndex];
        var selectedNodeId = selectedCategory.value;
        if (selectedNodeId == "1038576|1287991011") {
            $("#" + categorySelector + "> option").each(function (index) {
                if ("icn_" + $(this).attr("value") == incat) {
                    categoryObject.setIndex(index)
                }
            })
        }
    },
    populateIncatsRow: function populateIncatsRow(root, rowSelector) {
        if (!root) {
            return
        }
        var childTemplates = [];
        var childNodes = root.childNodes;
        var itemId, itemClass;
        for (var i = 0, len = childNodes.length; i < len; i++) {
            var child = childNodes[i];
            child.flyoutNumber = i + 1;
            var linkTmpl = child.getDomTemplate();
            itemClass = "";
            if (child.isParent()) {
                itemId = "gn_sub_" + (i + 1)
            } else {
                itemClass = "noFlyout ";
                itemId = ""
            }
            if (i == 0) {
                itemClass += "first-child"
            } else {
                if (i == len - 1) {
                    itemClass += "last-child"
                }
            }
            childTemplates.push({
                tagName: "li",
                id: itemId,
                className: itemClass,
                childNodes: [linkTmpl]
            })
        }
        var template = [{
            tagName: "ul",
            childNodes: childTemplates
        }];
        jQuery(rowSelector).appendDom(template)
    },
    dependenciesOk: function dependenciesOk() {
        try {
            return (document && document.getElementById && jQuery && jQuery.fn.appendDom)
        } catch (e) {
            return false
        }
    }
};

target = window.target || {};
target.NAV = target.NAV || {};
(function () {
    var Y = GVAR,
        D = Y.util.Dom,
        E = Y.util.Event,
        UA = Y.env.ua,
        ARIA = target.NAV.ARIA;
    target.NAV.ComboBox = function () {
        var realBox, box, list, data = [],
            items = [],
            currentIndex, timeout;

        function createHTML(that) {
            that.box = document.createElement("div");
            that.box.className = "combo";
            that.box.setAttribute("role", "combobox");
            that.box.tabIndex = 0;
            that.label = document.createElement("span");
            that.label.className = "label";
            that.box.appendChild(that.label);
            that.list = document.createElement("ul");
            that.box.appendChild(that.list);
            var options = that.realBox.getElementsByTagName("option");
            for (var i = -1, node, newNode; node = options[++i];) {
                that.data[i] = node.innerHTML;
                newNode = document.createElement("li");
                newNode.innerHTML = that.data[i];
                if (node.selected) {
                    newNode.className = "checked";
                    that.currentIndex = i;
                    that.label.innerHTML = that.data[i];
                    that.box.setAttribute("aria-valuenow", that.data[i])
                }
                that.items[i] = newNode;
                that.list.appendChild(newNode)
            }
            D.addClass(that.realBox, "hidden");
            that.realBox.parentNode.insertBefore(that.box, that.realBox);
            addAssistance(that)
        }
        function addAssistance(that) {
            if (!ARIA) {
                that.assist = document.createElement("a");
                that.assist.href = "#";
                that.assist.className = "gn_access";
                that.assist.innerHTML = "Click here to select search options";
                that.realBox.parentNode.insertBefore(that.assist, that.box);
                E.on(that.assist, "click", onAssist, that)
            }
        }
        function addBehavior(that) {
            E.on(that.box, "keydown", handleKey, that);
            E.on(that.box, "keyup", cancelKey, that);
            E.on(that.box, "click", onClick, that);
            E.on(that.items, "click", onSelect, that);
            if (UA.ie) {
                that.box.onmouseup = function () {
                    hideOptions(that)
                };
                that.box.onmouseover = function () {
                    D.addClass(window.event.srcElement, "hover")
                };
                that.box.onmouseout = function () {
                    D.removeClass(window.event.srcElement, "hover")
                }
            }
        }
        function handleKey(event, that) {
            switch (event.keyCode) {
            case 38:
            case 37:
                E.preventDefault(event);
                repeatActionWithDelay(prev, that);
                break;
            case 40:
            case 39:
                E.preventDefault(event);
                repeatActionWithDelay(next, that);
                break;
            case 13:
            case 32:
                E.preventDefault(event);
                hideOptions(that);
                break;
            default:
                break
            }
        }
        function repeatActionWithDelay(action, that) {
            if (action) {
                action(that);
                clearInterval(timeout);
                timeout = setTimeout(function () {
                    clearInterval(timeout);
                    timeout = setInterval(function () {
                        action(that)
                    }, 100)
                }, 250)
            }
        }
        function cancelKey(event, that) {
            E.preventDefault(event);
            clearInterval(timeout)
        }
        function onClick(event, that) {
            E.stopPropagation(event);
            showOptions(that)
        }
        function onSelect(event, that) {
            E.stopPropagation(event);
            for (var i = -1, node; node = that.items[++i];) {
                if (node === this) {
                    setIndex(that, i);
                    hideOptions(that);
                    break
                }
            }
        }
        function onAssist(event, that) {
            E.preventDefault(event);
            D.removeClass(that.realBox, "hidden");
            D.setStyle(that.box, "display", "none");
            that.realBox.focus()
        }
        function onOptionsCancel(event, that) {
            hideOptions(that)
        }
        function stopHover(event) {
            event.stopPropagation()
        }
        function showOptions(that) {
            D.addClass(that.box, "active");
            E.on(document.body, "click", onOptionsCancel, that);
            fixZIndex(that);
            if (that.activateCallback) {
                that.activateCallback()
            }
            try {
                document.addEventListener("mouseover", stopHover, true)
            } catch (e) {
                that.box.setCapture()
            }
        }
        function hideOptions(that) {
            D.removeClass(that.box, "active");
            E.removeListener(document.body, "click", onOptionsCancel);
            resetZIndex(that);
            try {
                document.removeEventListener("mouseover", stopHover, true)
            } catch (e) {
                that.box.releaseCapture()
            }
        }
        function fixZIndex(that) {
            if (UA.ie && that.positionParent) {
                that.realZ = that.positionParent.style.zIndex;
                that.positionParent.style.zIndex = 10000
            }
        }
        function resetZIndex(that) {
            if (UA.ie && that.positionParent && !isNaN(parseInt(that.realZ))) {
                that.positionParent.style.zIndex = that.realZ
            }
        }
        function next(that) {
            if (that.currentIndex + 1 < that.data.length) {
                that.currentIndex = setIndex(that, that.currentIndex + 1)
            }
        }
        function prev(that) {
            if (that.currentIndex > 0) {
                that.currentIndex = setIndex(that, that.currentIndex - 1)
            }
        }
        function setIndex(that, index) {
            for (var i = -1, node; node = that.items[++i];) {
                if (i === index) {
                    D.addClass(node, "checked");
                    that.label.innerHTML = that.data[i];
                    that.box.setAttribute("aria-valuenow", that.data[i]);
                    that.realBox.selectedIndex = i
                } else {
                    D.removeClass(node, "checked")
                }
            }
            return index
        }
        function Box(real, activateCallback, positionParent) {
            this.realBox = real;
            this.activateCallback = activateCallback;
            this.positionParent = positionParent;
            this.items = [];
            this.data = [];
            createHTML(this);
            addBehavior(this);
            var box = this;
            real.setIndex = function (index) {
                setIndex(box, index)
            }
        }
        return {
            create: function (real, activateCallback, positionParent) {
                return new Box(real, activateCallback, positionParent)
            }
        }
    }()
}());
(function () {
    var Y = GVAR,
        D = Y.util.Dom,
        E = Y.util.Event,
        UA = Y.env.ua;
    var FOCUS = UA.ie ? "focusin" : "focus",
        BLUR = UA.ie ? "focusout" : "blur";
    var defaultLabelStore = {},
        forms = {};
    target.NAV.InlineLabel = {
        apply: function (input) {
            var label = findLabel(input);
            if (label) {
                applyBehavior(input, label)
            }
            var form = input.form;
            if (form) {
                storeForm(form)
            }
        }
    };

    function findLabel(input) {
        var labels = input.form.parentNode.getElementsByTagName("label");
        for (var i = -1, node; node = labels[++i];) {
            if (node.htmlFor === input.id) {
                return node
            }
        }
    }
    function applyBehavior(input, label) {
        defaultLabelStore[input.id] = label.innerHTML;
        if (input.value === "") {
            input.value = label.innerHTML
        }
        E.on(input, FOCUS, onFocus);
        E.on(input, BLUR, onBlur)
    }
    function onFocus(e) {
        var label = defaultLabelStore[this.id];
        if (label && this.value === label) {
            this.value = ""
        }
    }
    function onBlur(e) {
        if (this.value === "") {
            this.value = defaultLabelStore[this.id] || ""
        }
    }
    function storeForm(form) {
        if (!forms[form]) {
            forms[form] = new FixedForm(form)
        }
    }
    function FixedForm(form) {
        this.form = form;
        this.inputs = [];
        E.on(form, "submit", check, this)
    }
    function check(form) {
        form.check()
    }
    FixedForm.prototype = {
        check: function () {
            for (var i = -1, node; node = this.inputs[++i];) {
                var label = defaultLabelStore[node.id];
                if (label && node.value === label) {
                    node.value = ""
                }
            }
        }
    }
}());

target = window.target || {};
target.NAV = target.NAV || {};
(function () {
    var Y = GVAR,
        D = Y.util.Dom,
        E = Y.util.Event,
        UA = Y.env.ua,
        Flyouts = target.NAV.Flyouts,
        ComboBox = target.NAV.ComboBox;
    target.NAV.ARIA = (UA.gecko && UA.gecko >= 1.9) || (UA.ie && UA.ie >= 8);
    var FOCUS = UA.ie ? "focusin" : "focus",
        BLUR = UA.ie ? "focusout" : "blur";
    E.onAvailable("gn_search_scope", initSearch);
    E.onAvailable("gn_main_fix", updateNav);
    E.onDOMReady(initFlyouts);
    var main, mainItems, sub, subItems, lists, listsItems, combobox, searchInput;
    var newFontSize = false,
        topPaddingFix, baseFontSize = 1.2,
        fontSizeFactor = 30,
        defaultPadding = 10;
    var flyouts = {};

    function initSearch() {
        if (typeof(initSearch.called) != "undefined") {
            return
        }
        initSearch.called = true;
        combobox = document.getElementById("gn_search_scope");
        if (combobox) {
            ComboBox.create(combobox, hideFlyouts, document.getElementById("gn"));
            searchInput = document.getElementById("gn_search_input");
            if (D.hasClass(searchInput.form.parentNode, "gn_below")) {
                target.NAV.InlineLabel.apply(searchInput)
            }
        }
    }
    target.NAV.initSearch = initSearch;

    function initFlyouts() {
        if (findElements()) {
            redrawSupercats();
            resizeDetector();
            addBehavior()
        } else {
            setTimeout(initFlyouts, 1000)
        }
    }
    target.NAV.initFlyouts = initFlyouts;

    function findElements() {
        main = document.getElementById("gn_main");
        if (!main) {
            return false
        }
        mainItems = main.getElementsByTagName("a");
        sub = document.getElementById("gn_sub");
        if (sub) {
            subItems = sub.getElementsByTagName("li")
        }
        lists = document.getElementById("gn_lists");
        if (lists) {
            listsItems = lists.getElementsByTagName("li")
        }
        return true
    }
    function addBehavior() {
        Flyouts.ieSupport();
        E.on(mainItems, "mouseover", onMouseOver, "Main");
        E.on(mainItems, "mouseout", killDelay);
        if (subItems && subItems.length > 0) {
            E.on(subItems, "mouseover", onMouseOver, "Sub");
            E.on(subItems, "mouseout", killDelay)
        }
        if (listsItems && listsItems.length > 0) {
            E.on(listsItems, "mouseover", onMouseOver, "Special");
            E.on(listsItems, "mouseout", killDelay)
        }
        E.on(document.body, "click", clickBody)
    }
    var delay;

    function onMouseOver(e, type) {
        clearTimeout(delay);
        var trigger = this;
        openFunc = function () {
            if (trigger.nodeName.toLowerCase() === "a") {
                trigger = trigger.parentNode
            }
            showFlyout(trigger, type)
        };
        delay = setTimeout(openFunc, 50)
    }
    function killDelay() {
        clearTimeout(delay)
    }
    function showFlyout(item, type, focusAfterShow) {
        hideFlyouts();
        if (D.hasClass(item, "gn_active")) {
            return
        }
        if (!flyouts[item.id]) {
            flyouts[item.id] = Flyouts.create(item, type, newFontSize, topPaddingFix)
        }
        if (flyouts[item.id]) {
            flyouts[item.id].show();
            if (focusAfterShow) {
                flyouts[item.id].focus()
            }
        }
    }
    function hideFlyouts() {
        for (var id in flyouts) {
            if (flyouts.hasOwnProperty(id) && flyouts[id]) {
                flyouts[id].hide()
            }
        }
    }
    function clickBody(e) {
        var trigger = E.getTarget(e);
        while (trigger.parentNode) {
            if (trigger.id == "gn_fly" || trigger.id == "l2dd_giftfinder" || trigger.id == "l2dd_registry") {
                return
            }
            trigger = trigger.parentNode
        }
        hideFlyouts()
    }
    var baseSize = 10,
        currentSize;

    function resizeDetector(callback) {
        if (target.textResizeDetector) {
            target.textResizeDetector.init("gn", function (event, size) {
                currentSize = size;
                target.textResizeDetector.event.subscribe(onTextResize);
                reformatMainNav()
            })
        }
    }
    function onTextResize() {
        var newSize = target.textResizeDetector.getSize();
        if (currentSize !== newSize) {
            for (var id in flyouts) {
                if (flyouts.hasOwnProperty(id)) {
                    flyouts[id].reset();
                    flyouts[id] = null
                }
            }
            flyouts = {}
        }
        currentSize = newSize;
        reformatMainNav()
    }
    function reformatMainNav() {
        if (currentSize > baseSize) {
            D.addClass(main, "tooBig")
        } else {
            D.removeClass(main, "tooBig")
        }
    }
    function updateNav() {
        redrawSupercats();
        navWidths()
    }
    function redrawSupercats() {
        if (!target.ui.gn.redrawSupercats) {
            return
        }
        if (typeof(redrawSupercats.called) == "undefined") {
            redrawSupercats.called = true
        } else {
            return
        }
        if (target.ui.gn.data.supercats) {
            var supercats = target.ui.gn.data.supercats.data;
            var supercatsDiv = document.getElementById("gn_main");
            var incat = target.ui.gn.incat;
            var newList = document.createElement("ul");
            for (var i = 0; i < supercats.children.length; i++) {
                var linkNum = i + 1;
                var child = supercats.children[i];
                var newItem = document.createElement("li");
                newItem.setAttribute("id", "gn_main_" + linkNum);
                var className = "";
                if (i == 0) {
                    className += " first-child"
                }
                if (i == supercats.children.length - 1) {
                    className += " last-child"
                }
                if (incat == "icn_" + child.location) {
                    var emptySpan = document.createElement("span");
                    newItem.appendChild(emptySpan);
                    className += " gn_active"
                }
                if (className) {
                    newItem.setAttribute("class", className);
                    newItem.setAttribute("className", className)
                }
                var newLink = document.createElement("a");
                newLink.setAttribute("href", target.ui.gn.nonsecureserver + "/b/ref=nav_t_spc_" + linkNum + "_0?ie=UTF8&node=" + child.location);
                if (child.title) {
                    newLink.setAttribute("title", child.title)
                }
                newLink.innerHTML = child.text;
                newItem.appendChild(newLink);
                newList.appendChild(newItem)
            }
            var list = supercatsDiv.getElementsByTagName("ul")[0];
            supercatsDiv.insertBefore(newList, list);
            supercatsDiv.removeChild(list)
        }
    }
    function navWidths() {
        var main = document.getElementById("gn_main"),
            maxWidth = main.offsetWidth,
            lis = main.getElementsByTagName("li"),
            links = main.getElementsByTagName("a"),
            count = lis.length;
        measureAndFix();

        function measureAndFix(bypassfont) {
            var widths = [],
                totalWidth = 0;
            for (var i = -1, node, width; node = lis[++i];) {
                width = node.offsetWidth - defaultPadding;
                widths[widths.length] = width;
                totalWidth += width
            }
            var padding = (maxWidth - totalWidth) / count,
                usablePadding = Math.floor(padding),
                extra = Math.floor(((padding * count) - (usablePadding * count)) / 2);
            if (!bypassfont) {
                newFontSize = usablePadding > fontSizeFactor ? (baseFontSize + (usablePadding - fontSizeFactor) / fontSizeFactor) * 10 : false;
                if (newFontSize) {
                    if (newFontSize >= 13) {
                        if (newFontSize > 20) {
                            newFontSize = 20
                        }
                        switch (Math.floor(newFontSize)) {
                        case 13:
                            topPaddingFix = 11;
                            break;
                        case 14:
                            topPaddingFix = 10;
                            break;
                        case 15:
                            topPaddingFix = 9;
                            break;
                        case 16:
                            topPaddingFix = 9;
                            break;
                        case 17:
                            topPaddingFix = 8;
                            break;
                        default:
                            topPaddingFix = 7
                        }
                        $("#gn_main li a,#gn_main li span.nolink").css("padding-top", topPaddingFix)
                    }
                    for (var i = -1, link; link = links[++i];) {
                        link.style.fontSize = newFontSize + "px"
                    }
                    measureAndFix(true)
                } else {
                    resize(widths, extra, usablePadding)
                }
            } else {
                resize(widths, extra, usablePadding)
            }
        }
        function resize(widths, extra, usablePadding) {
            widths[0] += extra;
            widths[count - 1] += extra;
            var newTotal = 0;
            for (var i = -1, link, style; link = links[++i];) {
                D.addClass(link, "fixed");
                style = link.style;
                if (widths[i]) {
                    newTotal += widths[i] + usablePadding;
                    style.width = widths[i] + usablePadding + "px"
                }
            }
            if (newTotal < maxWidth) {
                links[links.length - 1].style.width = widths[widths.length - 1] + usablePadding + Math.floor(maxWidth - newTotal)
            }
        }
    }
}());

var ajaxRevealObj = null;
(function ($) {
    $(document).ready(function () {
        var gnCart = $("#gn li.gn_cart");
        if (gnCart.length > 0) {
            ajaxRevealObj = gnCart.ajaxReveal({
                revealOffsetX: 18,
                revealOffsetY: 0,
                loadingMessage: '<div class="top"></div><div class="center"><div id="cartRevealContent"><div class="cartRevealLoadingMsg"><div class="loadingImg"></div><div class="loadingTxt">loading...</div></div></div></div><div class="bottomWhite"></div>',
                failedMessage: '<div id="cartAjaxResult"><div class="top"></div><div class="center"><div id="cartRevealContent"><div class="cartRevealLoadingMsg"><div class="loadingTxt">Sorry, we\'re unable to preview your cart contents at this time. <div class="revealButtons"><a class="revealButton" href="/cart" title="View/Edit Cart" id="viewButton"><span class="offscreen">View/Edit Cart</span></a></div></div></div></div></div></div><div class="bottomWhite"></div>'
            });
            if (window.location.protocol == "http:") {
                set_message_protocol()
            }
        }
    })
})(jQuery);
