Commits

Anonymous committed 70c1630

replaced jquery stuff by base2.

Comments (0)

Files changed (24)

build/compress.py

     merge_css.run()
     
     # merge js and minify
-    #merge_js = MergeJS('friendpaste.yml')
-    #merge_js.run()
+    merge_js = MergeJS('friendpaste.yml')
+    merge_js.run()
     
     # generate pygments styles
     
     for style in get_all_styles():
         highlight_css =  os.path.join("../static/css", "%s.css" % style)
-        print "generate %s" % highlight_css
         css = HtmlFormatter(style=style).get_style_defs('.highlight')
         f = open(highlight_css, 'w')
         f.write(css)

build/friendpaste.yml

         - layout.css
         - colors.css
 javascript:
+    friendpaste.js:
+        - lib/base2.js
+        - lib/base2-dom.js
+        - lib/json2.js
+        - src/base.js
+        - src/ajax.js
+        - src/dimensions.js
+        - src/resizeable.js
+        - src/friendpaste.js
     
     

static/css/screen.css

 #header #nav {display:block;width:auto;height:40px;float:left;margin-left:80px;z-index:30;position:relative;top:35px;}
 #nav li {display:block;float:left;margin-left:15px;}
 #nav li a {display:block;background:url(../images/ul.gif) no-repeat scroll left top;padding:0.5em 1em 0.5em 1em;}
-#nav li {background-image:url(../images/ur.gif);background-position:no-repeat scroll right top;float:left;}
+#nav li {background:url(../images/ur.gif) no-repeat scroll right top;float:left;}
 #nav .rounded-lr {background:url(../images/lr.gif) no-repeat bottom right;}
 #nav .rounded-ll {background:url(../images/ll.gif) no-repeat bottom left;}
 .content-wrapper {background:transparent url(../images/home-back.png) no-repeat 100px 0pt;width:100%;margin:0;padding:0;}
 ul.errors {padding:0.3em;border:1px solid;margin-bottom:15px;}
 #switch span {display:block;cursor:pointer;padding:0 0.5em 0 0.5em;float:left;}
 #switch {clear:both;margin-bottom:5px;margin-top:10px;width:auto;float:right;}
-#switch span {cursor:hand;}
+#switch span {cursor:pointer;}
 div.textmate {background:url(../images/bundle.png) no-repeat;min-height:64px;padding-left:70px;}
 #bottom {display:block;clear:both;width:100%;margin-top:15px;background:repeat-y;padding:0.5em 0 1em 0;height:9%;min-width:980px;}
 div.copyright {display:block;margin:0pt auto 0pt auto;width:855px;}

static/css/src/default.css

+.highlight  { background: #f8f8f8; }
+.highlight .c { color: #408080; font-style: italic } /* Comment */
+.highlight .err { border: 1px solid #FF0000 } /* Error */
+.highlight .k { color: #008000; font-weight: bold } /* Keyword */
+.highlight .o { color: #666666 } /* Operator */
+.highlight .cm { color: #408080; font-style: italic } /* Comment.Multiline */
+.highlight .cp { color: #BC7A00 } /* Comment.Preproc */
+.highlight .c1 { color: #408080; font-style: italic } /* Comment.Single */
+.highlight .cs { color: #408080; font-style: italic } /* Comment.Special */
+.highlight .gd { color: #A00000 } /* Generic.Deleted */
+.highlight .ge { font-style: italic } /* Generic.Emph */
+.highlight .gr { color: #FF0000 } /* Generic.Error */
+.highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */
+.highlight .gi { color: #00A000 } /* Generic.Inserted */
+.highlight .go { color: #808080 } /* Generic.Output */
+.highlight .gp { color: #000080; font-weight: bold } /* Generic.Prompt */
+.highlight .gs { font-weight: bold } /* Generic.Strong */
+.highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */
+.highlight .gt { color: #0040D0 } /* Generic.Traceback */
+.highlight .kc { color: #008000; font-weight: bold } /* Keyword.Constant */
+.highlight .kd { color: #008000; font-weight: bold } /* Keyword.Declaration */
+.highlight .kp { color: #008000 } /* Keyword.Pseudo */
+.highlight .kr { color: #008000; font-weight: bold } /* Keyword.Reserved */
+.highlight .kt { color: #B00040 } /* Keyword.Type */
+.highlight .m { color: #666666 } /* Literal.Number */
+.highlight .s { color: #BA2121 } /* Literal.String */
+.highlight .na { color: #7D9029 } /* Name.Attribute */
+.highlight .nb { color: #008000 } /* Name.Builtin */
+.highlight .nc { color: #0000FF; font-weight: bold } /* Name.Class */
+.highlight .no { color: #880000 } /* Name.Constant */
+.highlight .nd { color: #AA22FF } /* Name.Decorator */
+.highlight .ni { color: #999999; font-weight: bold } /* Name.Entity */
+.highlight .ne { color: #D2413A; font-weight: bold } /* Name.Exception */
+.highlight .nf { color: #0000FF } /* Name.Function */
+.highlight .nl { color: #A0A000 } /* Name.Label */
+.highlight .nn { color: #0000FF; font-weight: bold } /* Name.Namespace */
+.highlight .nt { color: #008000; font-weight: bold } /* Name.Tag */
+.highlight .nv { color: #19177C } /* Name.Variable */
+.highlight .ow { color: #AA22FF; font-weight: bold } /* Operator.Word */
+.highlight .w { color: #bbbbbb } /* Text.Whitespace */
+.highlight .mf { color: #666666 } /* Literal.Number.Float */
+.highlight .mh { color: #666666 } /* Literal.Number.Hex */
+.highlight .mi { color: #666666 } /* Literal.Number.Integer */
+.highlight .mo { color: #666666 } /* Literal.Number.Oct */
+.highlight .sb { color: #BA2121 } /* Literal.String.Backtick */
+.highlight .sc { color: #BA2121 } /* Literal.String.Char */
+.highlight .sd { color: #BA2121; font-style: italic } /* Literal.String.Doc */
+.highlight .s2 { color: #BA2121 } /* Literal.String.Double */
+.highlight .se { color: #BB6622; font-weight: bold } /* Literal.String.Escape */
+.highlight .sh { color: #BA2121 } /* Literal.String.Heredoc */
+.highlight .si { color: #BB6688; font-weight: bold } /* Literal.String.Interpol */
+.highlight .sx { color: #008000 } /* Literal.String.Other */
+.highlight .sr { color: #BB6688 } /* Literal.String.Regex */
+.highlight .s1 { color: #BA2121 } /* Literal.String.Single */
+.highlight .ss { color: #19177C } /* Literal.String.Symbol */
+.highlight .bp { color: #008000 } /* Name.Builtin.Pseudo */
+.highlight .vc { color: #19177C } /* Name.Variable.Class */
+.highlight .vg { color: #19177C } /* Name.Variable.Global */
+.highlight .vi { color: #19177C } /* Name.Variable.Instance */
+.highlight .il { color: #666666 } /* Literal.Number.Integer.Long */

static/css/src/layout.css

-
-
 html, body {
     height: 100%;
 }
 
 h1 {margin-bottom:0.5em;}
 h2 {margin-bottom:0.75em;}
-h3 {;margin-bottom:1em;}
+h3 {margin-bottom:1em;}
 h4 {height:1.25em;}
 h5 {margin-bottom:1.5em;}
 h1 img, h2 img, h3 img, h4 img, h5 img, h6 img {margin:0;}
     padding: 0.5em 1em 0.5em 1em;
 }
 #nav li {
-    background-image: url(../../images/ur.gif);
-    background-position:  no-repeat scroll right top;
+    background: url(../../images/ur.gif) no-repeat scroll right top;
     float: left
 }
 #nav .rounded-lr {
 }
 
 #switch span {
-    cursor: hand;
+    cursor: pointer;
 }
 
 div.textmate {

static/js/date.js

-
-map = function(/*Array|String*/arr, /*Function|String*/callback, /*Function?*/thisObject){
-    // summary:
-    //		applies callback to each element of arr and returns
-    //		an Array with the results
-    // arr: the array to iterate on.  If a string, operates on individual characters.
-    // callback: a function is invoked with three arguments: item, index, and array and returns a value
-    // thisObject: may be used to scope the call to callback
-    // description:
-    //		This function corresponds to the JavaScript 1.6 Array.map() method.
-    //		In environments that support JavaScript 1.6, this function is a passthrough to the built-in method.
-    //		For more details, see:
-    //			<http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Array:map>
-    // example:
-    //	|	dojo.map([1, 2, 3, 4], function(item){ return item+1 });
-    //		returns [2, 3, 4, 5]
-    var _p = _getParts(arr, thisObject, callback); arr = _p[0];
-    var outArr = (arguments[3] ? (new arguments[3]()) : []);
-    for(var i=0;i<arr.length;++i){
-        outArr.push(_p[2].call(_p[1], arr[i], i, arr));
-    }
-    return outArr; // Array
-}
-
-
-Date.prototype.setISODate = function(/*String*/formattedString, /*Number?*/defaultTime){
-	//	summary:
-	//		Returns a Date object given a string formatted according to a subset of the ISO-8601 standard.
-	//
-	//	description:
-	//		Accepts a string formatted according to a profile of ISO8601 as defined by
-	//		[RFC3339](http://www.ietf.org/rfc/rfc3339.txt), except that partial input is allowed.
-	//		Can also process dates as specified [by the W3C](http://www.w3.org/TR/NOTE-datetime)
-	//		The following combinations are valid:
-	//
-	//			* dates only
-	//			|	* yyyy
-	//			|	* yyyy-MM
-	//			|	* yyyy-MM-dd
-	// 			* times only, with an optional time zone appended
-	//			|	* THH:mm
-	//			|	* THH:mm:ss
-	//			|	* THH:mm:ss.SSS
-	// 			* and "datetimes" which could be any combination of the above
-	//
-	//		timezones may be specified as Z (for UTC) or +/- followed by a time expression HH:mm
-	//		Assumes the local time zone if not specified.  Does not validate.  Improperly formatted
-	//		input may return null.  Arguments which are out of bounds will be handled
-	// 		by the Date constructor (e.g. January 32nd typically gets resolved to February 1st)
-	//		Only years between 100 and 9999 are supported.
-	//
-  	//	formattedString:
-	//		A string such as 2005-06-30T08:05:00-07:00 or 2005-06-30 or T08:05:00
-	//
-	//	defaultTime:
-	//		Used for defaults for fields omitted in the formattedString.
-	//		Uses 1970-01-01T00:00:00.0Z by default.
-
-	if(!Date.prototype._isoRegExp){
-		Date.prototype._isoRegExp =
-//TODO: could be more restrictive and check for 00-59, etc.
-			/^(?:(\d{4})(?:-(\d{2})(?:-(\d{2}))?)?)?(?:T(\d{2}):(\d{2})(?::(\d{2})(.\d+)?)?((?:[+-](\d{2}):(\d{2}))|Z)?)?$/;
-	}
-
-	var match = Date.prototype._isoRegExp.exec(formattedString);
-	var result = null;
-
-	if(match){
-		match.shift();
-		if(match[1]){match[1]--;} // Javascript Date months are 0-based
-		if(match[6]){match[6] *= 1000;} // Javascript Date expects fractional seconds as milliseconds
-
-		if(defaultTime){
-			// mix in defaultTime.  Relatively expensive, so use || operators for the fast path of defaultTime === 0
-			defaultTime = new Date(defaultTime);
-			map(["FullYear", "Month", "Date", "Hours", "Minutes", "Seconds", "Milliseconds"], function(prop){
-				return defaultTime["get" + prop]();
-			}).forEach(function(value, index){
-				if(match[index] === undefined){
-					match[index] = value;
-				}
-			});
-		}
-		result = new Date(match[0]||1970, match[1]||0, match[2]||1, match[3]||0, match[4]||0, match[5]||0, match[6]||0);
-
-
-		var offset = 0;
-		var zoneSign = match[7] && match[7].charAt(0);
-		if(zoneSign != 'Z'){
-			offset = ((match[8] || 0) * 60) + (Number(match[9]) || 0);
-			if(zoneSign != '-'){ offset *= -1; }
-		}
-		if(zoneSign){
-			offset -= result.getTimezoneOffset();
-		}
-
-        if(offset){
-            result.setTime(result.getTime() + offset * 60000);
-        }
-                    
-	}
-
-	this.setTime(result.getTime()); // Date or null
-}
-
-Date.prototype.toISOString = function(/*Date*/dateObject, /*dojo.date.stamp.__Options?*/options){
-	//	summary:
-	//		Format a Date object as a string according a subset of the ISO-8601 standard
-	//
-	//	description:
-	//		When options.selector is omitted, output follows [RFC3339](http://www.ietf.org/rfc/rfc3339.txt)
-	//		The local time zone is included as an offset from GMT, except when selector=='time' (time without a date)
-	//		Does not check bounds.  Only years between 100 and 9999 are supported.
-	//
-	//	dateObject:
-	//		A Date object
-
-	var _ = function(n){ return (n < 10) ? "0" + n : n; };
-	options = options || {};
-	var formattedDate = [];
-	var getter = options.zulu ? "getUTC" : "get";
-	var date = "";
-	if(options.selector != "time"){
-		var year = dateObject[getter+"FullYear"]();
-		date = ["0000".substr((year+"").length)+year, _(dateObject[getter+"Month"]()+1), _(dateObject[getter+"Date"]())].join('-');
-	}
-	formattedDate.push(date);
-	if(options.selector != "date"){
-		var time = [_(dateObject[getter+"Hours"]()), _(dateObject[getter+"Minutes"]()), _(dateObject[getter+"Seconds"]())].join(':');
-		var millis = dateObject[getter+"Milliseconds"]();
-		if(options.milliseconds){
-			time += "."+ (millis < 100 ? "0" : "") + _(millis);
-		}
-		if(options.zulu){
-			time += "Z";
-		}else if(options.selector != "time"){
-			var timezoneOffset = dateObject.getTimezoneOffset();
-			var absOffset = Math.abs(timezoneOffset);
-			time += (timezoneOffset > 0 ? "-" : "+") + 
-				_(Math.floor(absOffset/60)) + ":" + _(absOffset%60);
-		}
-		formattedDate.push(time);
-	}
-	return formattedDate.join('T'); // String
-}
-
-/* Time Since creates a string which friendly tells you the time since the original date
-* Based on the original time_since() function by Natalie Downe - http://blog.natbat.co.uk/archive/2003/Jun/14/time_since
-*
-* Copyright (c) 2004 Mark Wubben - http://neo.dzygn.com/
-*
-* Usage: date.toTimeSinceString(number nLimit, string sBetween, string sLastBetween)
-* nLimit: limit the shown time units (year, month etc). default = 2
-* sBetween: string between two time units. default = ", "
-* sLastBetween: string between the second-last and last time unit. default = " and "
-==================================================================================================*/
-Date.prototype.toTimeSinceString = function(nLimit, sBetween, sLastBetween){
-	if(!nLimit){ nLimit = 2; }
-	if(!sBetween){ sBetween = ", "; }
-	if(!sLastBetween){ sLastBetween = " and "; }
-	if(!Date.prototype.toTimeSinceString._collStructs){
-		Date.prototype.toTimeSinceString._collStructs = new Array(
-			{seconds: 60 * 60 * 24 * 365, name: "year"},
-			{seconds: 60 * 60 * 24 * 30, name: "month"},
-			{seconds: 60 * 60 * 24 * 7, name: "week"},
-			{seconds: 60 * 60 * 24, name: "day"},
-			{seconds: 60 * 60, name: "hour"},
-			{seconds: 60, name: "minute"}
-		);
-	}
-
-	var collStructs = Date.prototype.toTimeSinceString._collStructs;
-	var nSecondsRemain = ((new Date).valueOf() - this.valueOf()) / 1000;
-	var sReturn = "";
-	var nCount = 0;
-	var nFloored;
-
-
-
-    var now = new Date()
-	for(var i = 0; i < collStructs.length && nCount < nLimit; i++){
-		nFloored = Math.floor(nSecondsRemain / collStructs[i].seconds);
-		if(nFloored > 0){
-			if(sReturn.length > 0){
-				if(nCount == nLimit - 1 || i == collStructs.length - 1){
-					sReturn += sLastBetween;
-				} else if(nCount < nLimit && i < collStructs.length){
-					sReturn += sBetween;
-				}
-			}
-			sReturn += nFloored + " " + collStructs[i].name;
-			if(nFloored > 1){
-				sReturn += "s";
-			}
-			nSecondsRemain -= nFloored * collStructs[i].seconds;
-			nCount++;
-		}
-	}
-    if (sReturn ==  "") 
-        return "0 minutes";
-	return sReturn;
-}
-
-

static/js/diff.js

-/**
- * Friendpaste Javascript module
- * Author: Benoit Chesneau
- *
- */
-
-(function($){
-
-$(document).ready(function($) {
-    $(".sourcetable").hide();
-    $("#diff").each(function() {
-        var switcher = $("#switch");
-        $("<span>Tabular</span>").click(function() {
-            $(".sourcetable").hide();
-            $(".difftabular").show();
-            $(this).addClass("active").siblings("span").removeClass("active");
-            return false
-        }).addClass("active").appendTo(switcher);
-        $("<span>Unified</span>").click(function() {
-            $(".difftabular").hide();
-            $(".sourcetable").show();
-            $(this).addClass("active").siblings("span").removeClass("active");
-            return false;
-        }).appendTo(switcher);
-    })
-    
-
-});
-
-})(jQuery);

static/js/friendpaste.js

-/**
- * Friendpaste Javascript module
- * Author: Benoit Chesneau
- *
- */
-
-
-var Friendpaste = {
-    snippet: null,
-    snippet_edit: null,
-
-    init: function() {
-        /* set handlers */
-        $(".e").click(this.do_edit);
-        $(".cancel").click(this.do_cancel);
-        $("#show-linenos").click(this.toggleLineNumber);
-        $("#change-theme").change(this.setTheme);
-        $(".show-history").click(this.do_history);
-
-
-        /* init default */
-        is_hide = $.cookie("hide-linenos");
-        if (is_hide == "yes") {
-            $("table.sourcetable tbody").addClass("hidenos");
-            $("#show-linenos").attr("checked", "");
-        }
-
-        $("#snippet-edit").each(function() {
-            $("#paste_snippet").makeResizable({
-                vertical: true
-            });
-        })
-
-    },
-    
-    do_edit: function(e) {
-        $("#snippet").addClass("hidden");
-        $("#snippet-edit").removeClass("hidden");
-
-        return false;
-    },
-
-    do_cancel: function(event) {
-        $("#snippet-edit").addClass("hidden");
-        $("#revisions").addClass("hidden");
-        $("#snippet").removeClass("hidden");
-        return false;
-    },
-
-    toggleLineNumber: function(event) {
-        if ($(this).attr("checked")) {
-            $.cookie("hide-linenos", null);
-        } else {
-            $.cookie("hide-linenos", "yes");
-        }
-        $("table.sourcetable tbody").toggleClass("hidenos");
-    },
-
-
-    setTheme: function(event) {
-        setCookie("theme", this.value, 60);
-        document.location.reload();
-    },
-
-    do_history: function(event) {
-        url = "/" + snippet_id + "/revisions";
-        if (typeof(revid) != "undefined") {
-            url = url + "?rev=" + revid;
-        }
-        $.getJSON(url,
-        function(data) {
-            $(".revisionstable tbody.content").html("");
-            $.each(data,
-            function(i, item) {
-                d = new Date()
-                d.setISODate(item['updated']);
-                $("#revisions tbody.content").append("<tr>" +
-                "<td class=\"since\">" + d.toTimeSinceString(1) + "</td>" +
-                "<td class=\"rev\">rev. <a href='/" + item['parent'] + '?rev=' + item['revid'] + "'>" + item['revid'] + "</a></td>" +
-                "<td class=\"changeset\"><a href='/" + item['parent'] + '/changeset?rev=' + item['revid'] + "'>Diff</a></td>" +
-                "<td class=\"view-rev\"><a href='/" + item['parent'] + '?rev=' + item['revid'] + "'>View</a></td></tr>");
-            });
-
-            $("#snippet").addClass("hidden");
-            $("#revisions").removeClass("hidden");
-        });
-
-
-        return false;
-    }
-
-
-
-}
+var base2={name:"base2",version:"1.0",exports:"Base,Package,Abstract,Module,Enumerable,Map,Collection,RegGrp,Undefined,Null,This,True,False,assignID,detect,global",namespace:""};new function(_no_shrink_){var Undefined=K(),Null=K(null),True=K(true),False=K(false),This=function(){return this};var global=This();var base2=global.base2;var _FORMAT=/%([1-9])/g;var _LTRIM=/^\s\s*/;var _RTRIM=/\s\s*$/;var _RESCAPE=/([\/()[\]{}|*+-.,^$?\\])/g;var _BASE=/try/.test(detect)?/\bbase\b/:/.*/;var _HIDDEN=["constructor","toString","valueOf"];var _MSIE_NATIVE_FUNCTION=detect("(jscript)")?new RegExp("^"+rescape(isNaN).replace(/isNaN/,"\\w+")+"$"):{test:False};var _counter=1;var _slice=Array.prototype.slice;_Function_forEach();function assignID(object){if(!object.base2ID){object.base2ID="b2_"+_counter++}return object.base2ID}var _subclass=function(_instance,_static){base2.__prototyping=this.prototype;var _prototype=new this;if(_instance){extend(_prototype,_instance)}delete base2.__prototyping;var _constructor=_prototype.constructor;function _class(){if(!base2.__prototyping){if(this.constructor==arguments.callee||this.__constructing){this.__constructing=true;_constructor.apply(this,arguments);delete this.__constructing}else{return extend(arguments[0],_prototype)}}return this}_prototype.constructor=_class;for(var i in Base){_class[i]=this[i]}_class.ancestor=this;_class.base=Undefined;if(_static){extend(_class,_static)}_class.prototype=_prototype;if(_class.init){_class.init()}_class["#implements"]=[];_class["#implemented_by"]=[];return _class};var Base=_subclass.call(Object,{constructor:function(){if(arguments.length>0){this.extend(arguments[0])}},base:function(){},extend:delegate(extend)},Base={ancestorOf:function(klass){return _ancestorOf(this,klass)},extend:_subclass,forEach:function(object,block,context){_Function_forEach(this,object,block,context)},implement:function(source){if(typeof source=="function"){if(_ancestorOf(Base,source)){this["#implements"].push(source);source["#implemented_by"].push(this)}source=source.prototype}extend(this.prototype,source);return this}});var Package=Base.extend({constructor:function(_private,_public){this.extend(_public);if(this.init){this.init()}if(this.name&&this.name!="base2"){if(!this.parent){this.parent=base2}this.parent.addName(this.name,this);this.namespace=format("var %1=%2;",this.name,String2.slice(this,1,-1))}if(_private){var JSNamespace=base2.JavaScript?base2.JavaScript.namespace:"";_private.imports=Array2.reduce(csv(this.imports),function(namespace,name){var ns=lookup(name)||lookup("JavaScript."+name);assert(ns,format("Object not found: '%1'.",name),ReferenceError);return namespace+=ns.namespace},"var base2=(function(){return this.base2})();"+base2.namespace+JSNamespace)+lang.namespace;_private.exports=Array2.reduce(csv(this.exports),function(namespace,name){var fullName=this.name+"."+name;this.namespace+="var "+name+"="+fullName+";";return namespace+="if(!"+fullName+")"+fullName+"="+name+";"},"",this)+"this._label_"+this.name+"();";var pkg=this;var packageName=String2.slice(this,1,-1);_private["_label_"+this.name]=function(){Package.forEach(pkg,function(object,name){if(object&&object.ancestorOf==Base.ancestorOf){object.toString=K(format("[%1.%2]",packageName,name));if(object.prototype.toString==Base.prototype.toString){object.prototype.toString=K(format("[object %1.%2]",packageName,name))}}})}}function lookup(names){names=names.split(".");var value=base2,i=0;while(value&&names[i]!=null){value=value[names[i++]]}return value}},exports:"",imports:"",name:"",namespace:"",parent:null,addName:function(name,value){if(!this[name]){this[name]=value;this.exports+=","+name;this.namespace+=format("var %1=%2.%1;",name,this.name)}},addPackage:function(name){this.addName(name,new Package(null,{name:name,parent:this}))},toString:function(){return format("[%1]",this.parent?String2.slice(this.parent,1,-1)+"."+this.name:this.name)}});var Abstract=Base.extend({constructor:function(){throw new TypeError("Abstract class cannot be instantiated.")}});var _moduleCount=0;var Module=Abstract.extend(null,{namespace:"",extend:function(_interface,_static){var module=this.base();var index=_moduleCount++;module.namespace="";module.partial=this.partial;module.toString=K("[base2.Module["+index+"]]");Module[index]=module;module.implement(this);if(_interface){module.implement(_interface)}if(_static){extend(module,_static);if(module.init){module.init()}}return module},forEach:function(block,context){_Function_forEach(Module,this.prototype,function(method,name){if(typeOf(method)=="function"){block.call(context,this[name],name,this)}},this)},implement:function(_interface){var module=this;var id=module.toString().slice(1,-1);if(typeof _interface=="function"){if(!_ancestorOf(_interface,module)){this.base(_interface)}if(_ancestorOf(Module,_interface)){for(var name in _interface){if(module[name]===undefined){var property=_interface[name];if(typeof property=="function"&&property.call&&_interface.prototype[name]){property=_staticModuleMethod(_interface,name)}module[name]=property}}module.namespace+=_interface.namespace.replace(/base2\.Module\[\d+\]/g,id)}}else{extend(module,_interface);_extendModule(module,_interface)}return module},partial:function(){var module=Module.extend();var id=module.toString().slice(1,-1);module.namespace=this.namespace.replace(/(\w+)=b[^\)]+\)/g,"$1="+id+".$1");this.forEach(function(method,name){module[name]=partial(bind(method,module))});return module}});function _extendModule(module,_interface){var proto=module.prototype;var id=module.toString().slice(1,-1);for(var name in _interface){var property=_interface[name],namespace="";if(name.charAt(0)=="@"){if(detect(name.slice(1))){_extendModule(module,property)}}else{if(!proto[name]){if(name==name.toUpperCase()){namespace="var "+name+"="+id+"."+name+";"}else{if(typeof property=="function"&&property.call){namespace="var "+name+"=base2.lang.bind('"+name+"',"+id+");";proto[name]=_moduleMethod(module,name);proto[name]._module=module}}if(module.namespace.indexOf(namespace)==-1){module.namespace+=namespace}}}}}function _staticModuleMethod(module,name){return function(){return module[name].apply(module,arguments)}}function _moduleMethod(module,name){return function(){var args=_slice.call(arguments);args.unshift(this);return module[name].apply(module,args)}}var Enumerable=Module.extend({every:function(object,test,context){var result=true;try{forEach(object,function(value,key){result=test.call(context,value,key,object);if(!result){throw StopIteration}})}catch(error){if(error!=StopIteration){throw error}}return !!result},filter:function(object,test,context){var i=0;return this.reduce(object,function(result,value,key){if(test.call(context,value,key,object)){result[i++]=value}return result},[])},invoke:function(object,method){var args=_slice.call(arguments,2);return this.map(object,(typeof method=="function")?function(item){return item==null?undefined:method.apply(item,args)}:function(item){return item==null?undefined:item[method].apply(item,args)})},map:function(object,block,context){var result=[],i=0;forEach(object,function(value,key){result[i++]=block.call(context,value,key,object)});return result},pluck:function(object,key){return this.map(object,function(item){return item==null?undefined:item[key]})},reduce:function(object,block,result,context){var initialised=arguments.length>2;forEach(object,function(value,key){if(initialised){result=block.call(context,result,value,key,object)}else{result=value;initialised=true}});return result},some:function(object,test,context){return !this.every(object,not(test),context)}});var _HASH="#";var Map=Base.extend({constructor:function(values){if(values){this.merge(values)}},clear:function(){for(var key in this){if(key.indexOf(_HASH)==0){delete this[key]}}},copy:function(){base2.__prototyping=true;var copy=new this.constructor;delete base2.__prototyping;for(var i in this){if(this[i]!==copy[i]){copy[i]=this[i]}}return copy},forEach:function(block,context){for(var key in this){if(key.indexOf(_HASH)==0){block.call(context,this[key],key.slice(1),this)}}},get:function(key){return this[_HASH+key]},getKeys:function(){return this.map(II)},getValues:function(){return this.map(I)},has:function(key){
+/*@cc_on @*/
+/*@if (@_jscript_version < 5.5)
+    return $Legacy.has(this, _HASH + key);
+  @else @*/
+return _HASH+key in this;
+/*@end @*/
+},merge:function(values){var put=flip(this.put);forEach(arguments,function(values){forEach(values,put,this)},this);return this},put:function(key,value){this[_HASH+key]=value},remove:function(key){delete this[_HASH+key]},size:function(){var size=0;for(var key in this){if(key.indexOf(_HASH)==0){size++}}return size},union:function(values){return this.merge.apply(this.copy(),arguments)}});Map.implement(Enumerable);Map.prototype.filter=function(test,context){return this.reduce(function(result,value,key){if(!test.call(context,value,key,this)){result.remove(key)}return result},this.copy(),this)};var _KEYS="~";var Collection=Map.extend({constructor:function(values){this[_KEYS]=new Array2;this.base(values)},add:function(key,item){assert(!this.has(key),"Duplicate key '"+key+"'.");this.put.apply(this,arguments)},clear:function(){this.base();this[_KEYS].length=0},copy:function(){var copy=this.base();copy[_KEYS]=this[_KEYS].copy();return copy},forEach:function(block,context){var keys=this[_KEYS];var length=keys.length;for(var i=0;i<length;i++){block.call(context,this[_HASH+keys[i]],keys[i],this)}},getAt:function(index){var key=this[_KEYS].item(index);return(key===undefined)?undefined:this[_HASH+key]},getKeys:function(){return this[_KEYS].copy()},indexOf:function(key){return this[_KEYS].indexOf(String(key))},insertAt:function(index,key,item){assert(this[_KEYS].item(index)!==undefined,"Index out of bounds.");assert(!this.has(key),"Duplicate key '"+key+"'.");this[_KEYS].insertAt(index,String(key));this[_HASH+key]=null;this.put.apply(this,_slice.call(arguments,1))},item:function(keyOrIndex){return this[typeof keyOrIndex=="number"?"getAt":"get"](keyOrIndex)},put:function(key,item){if(!this.has(key)){this[_KEYS].push(String(key))}var klass=this.constructor;if(klass.Item&&!instanceOf(item,klass.Item)){item=klass.create.apply(klass,arguments)}this[_HASH+key]=item},putAt:function(index,item){arguments[0]=this[_KEYS].item(index);assert(arguments[0]!==undefined,"Index out of bounds.");this.put.apply(this,arguments)},remove:function(key){if(this.has(key)){this[_KEYS].remove(String(key));delete this[_HASH+key]}},removeAt:function(index){var key=this[_KEYS].item(index);if(key!==undefined){this[_KEYS].removeAt(index);delete this[_HASH+key]}},reverse:function(){this[_KEYS].reverse();return this},size:function(){return this[_KEYS].length},slice:function(start,end){var sliced=this.copy();if(arguments.length>0){var keys=this[_KEYS],removed=keys;sliced[_KEYS]=Array2(_slice.apply(keys,arguments));if(sliced[_KEYS].length){removed=removed.slice(0,start);if(arguments.length>1){removed=removed.concat(keys.slice(end))}}for(var i=0;i<removed.length;i++){delete sliced[_HASH+removed[i]]}}return sliced},sort:function(compare){if(compare){this[_KEYS].sort(bind(function(key1,key2){return compare(this[_HASH+key1],this[_HASH+key2],key1,key2)},this))}else{this[_KEYS].sort()}return this},toString:function(){return"("+(this[_KEYS]||"")+")"}},{Item:null,create:function(key,item){return this.Item?new this.Item(key,item):item},extend:function(_instance,_static){var klass=this.base(_instance);klass.create=this.create;if(_static){extend(klass,_static)}if(!klass.Item){klass.Item=this.Item}else{if(typeof klass.Item!="function"){klass.Item=(this.Item||Base).extend(klass.Item)}}if(klass.init){klass.init()}return klass}});var _RG_BACK_REF=/\\(\d+)/g,_RG_ESCAPE_CHARS=/\\./g,_RG_ESCAPE_BRACKETS=/\(\?[:=!]|\[[^\]]+\]/g,_RG_BRACKETS=/\(/g,_RG_LOOKUP=/\$(\d+)/,_RG_LOOKUP_SIMPLE=/^\$\d+$/;var RegGrp=Collection.extend({constructor:function(values,ignoreCase){this.base(values);this.ignoreCase=!!ignoreCase},ignoreCase:false,exec:function(string,override){string+="";var items=this,keys=this[_KEYS];if(!keys.length){return string}if(override==RegGrp.IGNORE){override=0}return string.replace(new RegExp(this,this.ignoreCase?"gi":"g"),function(match){var item,offset=1,i=0;while((item=items[_HASH+keys[i++]])){var next=offset+item.length+1;if(arguments[offset]){var replacement=override==null?item.replacement:override;switch(typeof replacement){case"function":return replacement.apply(items,_slice.call(arguments,offset,next));case"number":return arguments[offset+replacement];default:return replacement}}offset=next}return match})},insertAt:function(index,expression,replacement){if(instanceOf(expression,RegExp)){arguments[1]=expression.source}return base(this,arguments)},test:function(string){return this.exec(string)!=string},toString:function(){var offset=1;return"("+this.map(function(item){var expression=(item+"").replace(_RG_BACK_REF,function(match,index){return"\\"+(offset+Number(index))});offset+=item.length+1;return expression}).join(")|(")+")"}},{IGNORE:"$0",init:function(){forEach("add,get,has,put,remove".split(","),function(name){_override(this,name,function(expression){if(instanceOf(expression,RegExp)){arguments[0]=expression.source}return base(this,arguments)})},this.prototype)},Item:{constructor:function(expression,replacement){if(replacement==null){replacement=RegGrp.IGNORE}else{if(replacement.replacement!=null){replacement=replacement.replacement}else{if(typeof replacement!="function"){replacement=String(replacement)}}}if(typeof replacement=="string"&&_RG_LOOKUP.test(replacement)){if(_RG_LOOKUP_SIMPLE.test(replacement)){replacement=parseInt(replacement.slice(1))}else{var Q='"';replacement=replacement.replace(/\\/g,"\\\\").replace(/"/g,"\\x22").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\$(\d+)/g,Q+"+(arguments[$1]||"+Q+Q+")+"+Q).replace(/(['"])\1\+(.*)\+\1\1$/,"$1");replacement=new Function("return "+Q+replacement+Q)}}this.length=RegGrp.count(expression);this.replacement=replacement;this.toString=K(expression+"")},length:0,replacement:""},count:function(expression){expression=(expression+"").replace(_RG_ESCAPE_CHARS,"").replace(_RG_ESCAPE_BRACKETS,"");return match(expression,_RG_BRACKETS).length}});var lang={name:"lang",version:base2.version,exports:"assert,assertArity,assertType,base,bind,copy,extend,forEach,format,instanceOf,match,pcopy,rescape,trim,typeOf",namespace:""};function assert(condition,message,ErrorClass){if(!condition){throw new (ErrorClass||Error)(message||"Assertion failed.")}}function assertArity(args,arity,message){if(arity==null){arity=args.callee.length}if(args.length<arity){throw new SyntaxError(message||"Not enough arguments.")}}function assertType(object,type,message){if(type&&(typeof type=="function"?!instanceOf(object,type):typeOf(object)!=type)){throw new TypeError(message||"Invalid type.")}}function copy(object){var copy={};for(var i in object){copy[i]=object[i]}return copy}function pcopy(object){_dummy.prototype=object;return new _dummy}function _dummy(){}function base(object,args){return object.base.apply(object,args)}function extend(object,source){if(object&&source){if(arguments.length>2){var key=source;source={};source[key]=arguments[2]}var proto=global[(typeof source=="function"?"Function":"Object")].prototype;if(base2.__prototyping){var i=_HIDDEN.length,key;while((key=_HIDDEN[--i])){var value=source[key];if(value!=proto[key]){if(_BASE.test(value)){_override(object,key,value)}else{object[key]=value}}}}for(key in source){if(proto[key]===undefined){var value=source[key];if(key.charAt(0)=="@"){if(detect(key.slice(1))){extend(object,value)}}else{var ancestor=object[key];if(ancestor&&typeof value=="function"){if(value!=ancestor){if(_BASE.test(value)){_override(object,key,value)}else{value.ancestor=ancestor;object[key]=value}}}else{object[key]=value}}}}}return object}function _ancestorOf(ancestor,fn){while(fn){if(!fn.ancestor){return false}fn=fn.ancestor;if(fn==ancestor){return true}}return false}function _override(object,name,method){var ancestor=object[name];var superObject=base2.__prototyping;if(superObject&&ancestor!=superObject[name]){superObject=null}function _base(){var previous=this.base;this.base=superObject?superObject[name]:ancestor;var returnValue=method.apply(this,arguments);this.base=previous;return returnValue}_base.method=method;_base.ancestor=ancestor;object[name]=_base;_base.toString=K(method+"")}if(typeof StopIteration=="undefined"){StopIteration=new Error("StopIteration")}function forEach(object,block,context,fn){if(object==null){return }if(!fn){if(typeof object=="function"&&object.call){fn=Function}else{if(typeof object.forEach=="function"&&object.forEach!=arguments.callee){object.forEach(block,context);return }else{if(typeof object.length=="number"){_Array_forEach(object,block,context);return }}}}_Function_forEach(fn||Object,object,block,context)}forEach.csv=function(string,block,context){forEach(csv(string),block,context)};forEach.detect=function(object,block,context){forEach(object,function(value,key){if(key.charAt(0)=="@"){if(detect(key.slice(1))){forEach(value,arguments.callee)}}else{block.call(context,value,key,object)}})};function _Array_forEach(array,block,context){if(array==null){array=global}var length=array.length||0,i;if(typeof array=="string"){for(i=0;i<length;i++){block.call(context,array.charAt(i),i,array)}}else{for(i=0;i<length;i++){
+/*@cc_on @*/
+/*@if (@_jscript_version < 5.2)
+      if ($Legacy.has(array, i))
+    @else @*/
+if(i in array){
+/*@end @*/
+block.call(context,array[i],i,array)}}}}function _Function_forEach(fn,object,block,context){var Temp=function(){this.i=1};Temp.prototype={i:1};var count=0;for(var i in new Temp){count++}_Function_forEach=(count>1)?function(fn,object,block,context){var processed={};for(var key in object){if(!processed[key]&&fn.prototype[key]===undefined){processed[key]=true;block.call(context,object[key],key,object)}}}:function(fn,object,block,context){for(var key in object){if(fn.prototype[key]===undefined){block.call(context,object[key],key,object)}}};_Function_forEach(fn,object,block,context)}function instanceOf(object,klass){if(typeof klass!="function"){throw new TypeError("Invalid 'instanceOf' operand.")}if(object==null){return false;
+/*@cc_on  
+  // COM objects don't have a constructor
+  if (typeof object.constructor != "function") {
+    return typeOf(object) == typeof klass.prototype.valueOf();
+  }
+  @*/
+}if(object.constructor==klass){return true}if(klass.ancestorOf){return klass.ancestorOf(object.constructor);
+/*@if (@_jscript_version < 5.1)
+    // do nothing
+  @else @*/
+}if(object instanceof klass){return true;
+/*@end @*/
+}if(Base.ancestorOf==klass.ancestorOf){return false}if(Base.ancestorOf==object.constructor.ancestorOf){return klass==Object}switch(klass){case Array:return !!(typeof object=="object"&&object.join&&object.splice);case Function:return typeOf(object)=="function";case RegExp:return typeof object.constructor.$1=="string";case Date:return !!object.getTimezoneOffset;case String:case Number:case Boolean:return typeOf(object)==typeof klass.prototype.valueOf();case Object:return true}return false}function typeOf(object){var type=typeof object;switch(type){case"object":return object==null?"null":typeof object.constructor=="undefined"?_MSIE_NATIVE_FUNCTION.test(object)?"function":type:typeof object.constructor.prototype.valueOf();case"function":return typeof object.call=="function"?type:"object";default:return type}}var JavaScript={name:"JavaScript",version:base2.version,exports:"Array2,Date2,Function2,String2",namespace:"",bind:function(host){var top=global;global=host;forEach.csv(this.exports,function(name2){var name=name2.slice(0,-1);extend(host[name],this[name2]);this[name2](host[name].prototype)},this);global=top;return host}};function _createObject2(Native,constructor,generics,extensions){var INative=Module.extend();var id=INative.toString().slice(1,-1);forEach.csv(generics,function(name){INative[name]=unbind(Native.prototype[name]);INative.namespace+=format("var %1=%2.%1;",name,id)});forEach(_slice.call(arguments,3),INative.implement,INative);var Native2=function(){return INative(this.constructor==INative?constructor.apply(null,arguments):arguments[0])};Native2.prototype=INative.prototype;for(var name in INative){if(name!="prototype"&&Native[name]){INative[name]=Native[name];delete INative.prototype[name]}Native2[name]=INative[name]}Native2.ancestor=Object;delete Native2.extend;Native2.namespace=Native2.namespace.replace(/(var (\w+)=)[^,;]+,([^\)]+)\)/g,"$1$3.$2");return Native2}if((new Date).getYear()>1900){Date.prototype.getYear=function(){return this.getFullYear()-1900};Date.prototype.setYear=function(year){return this.setFullYear(year+1900)}}var _testDate=new Date(Date.UTC(2006,1,20));_testDate.setUTCDate(15);if(_testDate.getUTCHours()!=0){forEach.csv("FullYear,Month,Date,Hours,Minutes,Seconds,Milliseconds",function(type){extend(Date.prototype,"setUTC"+type,function(){var value=base(this,arguments);if(value>=57722401000){value-=3600000;this.setTime(value)}return value})})}Function.prototype.prototype={};if("".replace(/^/,K("$$"))=="$"){extend(String.prototype,"replace",function(expression,replacement){if(typeof replacement=="function"){var fn=replacement;replacement=function(){return String(fn.apply(null,arguments)).split("$").join("$$")}}return this.base(expression,replacement)})}var Array2=_createObject2(Array,Array,"concat,join,pop,push,reverse,shift,slice,sort,splice,unshift",Enumerable,{combine:function(keys,values){if(!values){values=keys}return Array2.reduce(keys,function(hash,key,index){hash[key]=values[index];return hash},{})},contains:function(array,item){return Array2.indexOf(array,item)!=-1},copy:function(array){var copy=_slice.call(array);if(!copy.swap){Array2(copy)}return copy},flatten:function(array){var i=0;return Array2.reduce(array,function(result,item){if(Array2.like(item)){Array2.reduce(item,arguments.callee,result)}else{result[i++]=item}return result},[])},forEach:_Array_forEach,indexOf:function(array,item,fromIndex){var length=array.length;if(fromIndex==null){fromIndex=0}else{if(fromIndex<0){fromIndex=Math.max(0,length+fromIndex)}}for(var i=fromIndex;i<length;i++){if(array[i]===item){return i}}return -1},insertAt:function(array,index,item){Array2.splice(array,index,0,item);return item},item:function(array,index){if(index<0){index+=array.length}return array[index]},lastIndexOf:function(array,item,fromIndex){var length=array.length;if(fromIndex==null){fromIndex=length-1}else{if(fromIndex<0){fromIndex=Math.max(0,length+fromIndex)}}for(var i=fromIndex;i>=0;i--){if(array[i]===item){return i}}return -1},map:function(array,block,context){var result=[];Array2.forEach(array,function(item,index){result[index]=block.call(context,item,index,array)});return result},remove:function(array,item){var index=Array2.indexOf(array,item);if(index!=-1){Array2.removeAt(array,index)}},removeAt:function(array,index){Array2.splice(array,index,1)},swap:function(array,index1,index2){if(index1<0){index1+=array.length}if(index2<0){index2+=array.length}var temp=array[index1];array[index1]=array[index2];array[index2]=temp;return array}});Array2.reduce=Enumerable.reduce;Array2.like=function(object){return typeOf(object)=="object"&&typeof object.length=="number"};Enumerable["#implemented_by"].pop();Enumerable["#implemented_by"].push(Array2);var _DATE_PATTERN=/^((-\d+|\d{4,})(-(\d{2})(-(\d{2}))?)?)?T((\d{2})(:(\d{2})(:(\d{2})(\.(\d{1,3})(\d)?\d*)?)?)?)?(([+-])(\d{2})(:(\d{2}))?|Z)?$/;var _DATE_PARTS={FullYear:2,Month:4,Date:6,Hours:8,Minutes:10,Seconds:12,Milliseconds:14};var _TIMEZONE_PARTS={Hectomicroseconds:15,UTC:16,Sign:17,Hours:18,Minutes:20};var _TRIM_ZEROES=/(((00)?:0+)?:0+)?\.0+$/;var _TRIM_TIMEZONE=/(T[0-9:.]+)$/;var Date2=_createObject2(Date,function(yy,mm,dd,h,m,s,ms){switch(arguments.length){case 0:return new Date;case 1:return typeof yy=="number"?new Date(yy):Date2.parse(yy);default:return new Date(yy,mm,arguments.length==2?1:dd,h||0,m||0,s||0,ms||0)}},"",{toISOString:function(date){var string="####-##-##T##:##:##.###";for(var part in _DATE_PARTS){string=string.replace(/#+/,function(digits){var value=date["getUTC"+part]();if(part=="Month"){value++}return("000"+value).slice(-digits.length)})}return string.replace(_TRIM_ZEROES,"").replace(_TRIM_TIMEZONE,"$1Z")}});delete Date2.forEach;Date2.now=function(){return(new Date).valueOf()};Date2.parse=function(string,defaultDate){if(arguments.length>1){assertType(defaultDate,"number","default date should be of type 'number'.")}var parts=match(string,_DATE_PATTERN);if(parts.length){if(parts[_DATE_PARTS.Month]){parts[_DATE_PARTS.Month]--}if(parts[_TIMEZONE_PARTS.Hectomicroseconds]>=5){parts[_DATE_PARTS.Milliseconds]++}var date=new Date(defaultDate||0);var prefix=parts[_TIMEZONE_PARTS.UTC]||parts[_TIMEZONE_PARTS.Hours]?"UTC":"";for(var part in _DATE_PARTS){var value=parts[_DATE_PARTS[part]];if(!value){continue}date["set"+prefix+part](value);if(date["get"+prefix+part]()!=parts[_DATE_PARTS[part]]){return NaN}}if(parts[_TIMEZONE_PARTS.Hours]){var hours=Number(parts[_TIMEZONE_PARTS.Sign]+parts[_TIMEZONE_PARTS.Hours]);var minutes=Number(parts[_TIMEZONE_PARTS.Sign]+(parts[_TIMEZONE_PARTS.Minutes]||0));date.setUTCMinutes(date.getUTCMinutes()+(hours*60)+minutes)}return date.valueOf()}else{return Date.parse(string)}};var String2=_createObject2(String,function(string){return new String(arguments.length==0?"":string)},"charAt,charCodeAt,concat,indexOf,lastIndexOf,match,replace,search,slice,split,substr,substring,toLowerCase,toUpperCase",{csv:csv,format:format,rescape:rescape,trim:trim});delete String2.forEach;function trim(string){return String(string).replace(_LTRIM,"").replace(_RTRIM,"")}function csv(string){return string?(string+"").split(/\s*,\s*/):[]}function format(string){var args=arguments;var pattern=new RegExp("%([1-"+(arguments.length-1)+"])","g");return(string+"").replace(pattern,function(match,index){return args[index]})}function match(string,expression){return(string+"").match(expression)||[]}function rescape(string){return(string+"").replace(_RESCAPE,"\\$1")}var Function2=_createObject2(Function,Function,"",{I:I,II:II,K:K,bind:bind,compose:compose,delegate:delegate,flip:flip,not:not,partial:partial,unbind:unbind});function I(i){return i}function II(i,ii){return ii}function K(k){return function(){return k}}function bind(fn,context){var lateBound=typeof fn!="function";if(arguments.length>2){var args=_slice.call(arguments,2);return function(){return(lateBound?context[fn]:fn).apply(context,args.concat.apply(args,arguments))}}else{return function(){return(lateBound?context[fn]:fn).apply(context,arguments)}}}function compose(){var fns=_slice.call(arguments);return function(){var i=fns.length,result=fns[--i].apply(this,arguments);while(i--){result=fns[i].call(this,result)}return result}}function delegate(fn,context){return function(){var args=_slice.call(arguments);args.unshift(this);return fn.apply(context,args)}}function flip(fn){return function(){return fn.apply(this,Array2.swap(arguments,0,1))}}function not(fn){return function(){return !fn.apply(this,arguments)}}function partial(fn){var args=_slice.call(arguments,1);return function(){var specialised=args.concat(),i=0,j=0;while(i<args.length&&j<arguments.length){if(specialised[i]===undefined){specialised[i]=arguments[j++]}i++}while(j<arguments.length){specialised[i++]=arguments[j++]}if(Array2.contains(specialised,undefined)){specialised.unshift(fn);return partial.apply(null,specialised)}return fn.apply(this,specialised)}}function unbind(fn){return function(context){return fn.apply(context,_slice.call(arguments,1))}}function detect(){var jscript=NaN
+/*@cc_on||@_jscript_version@*/
+;var javaEnabled=global.java?true:false;if(global.navigator){var MSIE=/MSIE[\d.]+/g;var element=document.createElement("span");var userAgent=navigator.userAgent.replace(/([a-z])[\s\/](\d)/gi,"$1$2");if(!jscript){userAgent=userAgent.replace(MSIE,"")}if(MSIE.test(userAgent)){userAgent=userAgent.match(MSIE)[0]+" "+userAgent.replace(MSIE,"")}base2.userAgent=navigator.platform+" "+userAgent.replace(/like \w+/gi,"");javaEnabled&=navigator.javaEnabled()}var _cache={};detect=function(expression){if(_cache[expression]==null){var returnValue=false,test=expression;var not=test.charAt(0)=="!";if(not){test=test.slice(1)}if(test.charAt(0)=="("){try{returnValue=new Function("element,jscript,java,global","return !!"+test)(element,jscript,javaEnabled,global)}catch(ex){}}else{returnValue=new RegExp("("+test+")","i").test(base2.userAgent)}_cache[expression]=!!(not^returnValue)}return _cache[expression]};return detect(arguments[0])}base2=global.base2=new Package(this,base2);var exports=this.exports;lang=new Package(this,lang);exports+=this.exports;JavaScript=new Package(this,JavaScript);eval(exports+this.exports);lang.base=base;lang.extend=extend};new function(_no_shrink_){var DOM=new base2.Package(this,{name:"DOM",version:"1.0.1",imports:"Function2",exports:"Interface,Binding,Node,Document,Element,AbstractView,HTMLDocument,HTMLElement,Selector,Traversal,CSSParser,XPathParser,NodeSelector,DocumentSelector,ElementSelector,StaticNodeList,Event,EventTarget,DocumentEvent,ViewCSS,CSSStyleDeclaration,ClassList",bind:function(node){if(node&&node.nodeType){var base2ID=assignID(node);if(!DOM.bind[base2ID]){switch(node.nodeType){case 1:if(typeof node.className=="string"){(HTMLElement.bindings[node.tagName]||HTMLElement).bind(node)}else{Element.bind(node)}break;case 9:if(node.writeln){HTMLDocument.bind(node)}else{Document.bind(node)}break;default:Node.bind(node)}DOM.bind[base2ID]=true}}return node},"@MSIE5.+win":{bind:function(node){if(node&&node.writeln){node.nodeType=9}return this.base(node)}}});eval(this.imports);var _MSIE=detect("MSIE");var _MSIE5=detect("MSIE5");var Interface=Module.extend(null,{forEach:function(block,context){forEach(this,function(method,name){if(typeOf(method)=="function"&&(this.prototype[name]||method._delegate)){block.call(context,method,name,this)}},this,Module)},implement:function(_interface){if(typeof _interface=="object"){_createDelegates(this,_interface)}else{if(Interface.ancestorOf(_interface)){for(var name in _interface){if(_interface[name]&&_interface[name]._delegate){this[name]=bind(name,_interface);this[name]._delegate=name}}}}return this.base(_interface)}});function _createDelegates(module,_interface){var id=module.toString().slice(1,-1);for(var name in _interface){var property=_interface[name];if(name.charAt(0)=="@"){_createDelegates(module,property)}else{if(!module[name]&&typeof property=="function"&&property.call){var args="abcdefghij".slice(0,property.length).split("");var fn=new Function(args.join(","),format("%2.base=%2.%1.ancestor;var m=%2.base?'base':'%1';return %2[m](%3)",name,args[0],args.slice(1)));fn._delegate=name;module[name]=fn;module.namespace+="var "+name+"=base2.lang.bind('"+name+"',"+id+");"}}}}var Binding=Interface.extend(null,{bind:function(object){return extend(object,this.prototype)}});var Node=Binding.extend({"@!(element.compareDocumentPosition)":{compareDocumentPosition:function(node,other){if(Traversal.contains(node,other)){return 4|16}else{if(Traversal.contains(other,node)){return 2|8}}var nodeIndex=_getSourceIndex(node);var otherIndex=_getSourceIndex(other);if(nodeIndex<otherIndex){return 4}else{if(nodeIndex>otherIndex){return 2}}return 0}}},{"@Gecko":{bind:function(node){return extend(this.base(node),"removeEventListener",function(){var args=Array2.slice(arguments);args.unshift(this);EventTarget.removeEventListener.apply(EventTarget,args)})}}});var _getSourceIndex=document.documentElement.sourceIndex?function(node){return node.sourceIndex}:function(node){var key=0;while(node){key=Traversal.getNodeIndex(node)+"."+key;node=node.parentNode}return key};var Document=Node.extend(null,{bind:function(document){extend(document,"createElement",function(tagName){return DOM.bind(this.base(tagName))});AbstractView.bind(document.defaultView);if(document!=window.document){new DOMContentLoadedEvent(document)}return this.base(document)},"@!(document.defaultView)":{bind:function(document){document.defaultView=Traversal.getDefaultView(document);return this.base(document)}}});var _ATTRIBUTES={"class":"className","for":"htmlFor"};var Element=Node.extend({"@MSIE.+win":{getAttribute:function(element,name){if(element.className===undefined){return this.base(element,name)}var attribute=_getAttributeNode(element,name);if(attribute&&(attribute.specified||name=="value")){if(name=="href"||name=="src"){element.base=element.getAttribute.ancestor;return element[element.base?"base":"getAttribute"](name,2)}else{if(name=="style"){return element.style.cssText.toLowerCase()}else{return attribute.nodeValue}}}else{if(name=="type"&&element.nodeName=="INPUT"){var outerHTML=element.outerHTML;with(outerHTML){outerHTML=slice(0,indexOf(">")+1)}return match(outerHTML,/type="?([^\s">]*)"?/i)[1]||null}}return null},removeAttribute:function(element,name){if(element.className!==undefined){name=_ATTRIBUTES[name.toLowerCase()]||name}this.base(element,name)},setAttribute:function(element,name,value){if(element.className===undefined){this.base(element,name,value)}else{if(name=="style"){element.style.cssText=value}else{value=String(value);var attribute=_getAttributeNode(element,name);if(attribute){attribute.nodeValue=value}else{this.base(element,_ATTRIBUTES[name.toLowerCase()]||name,value)}}}}},"@!(element.hasAttribute)":{hasAttribute:function(element,name){if(element.className===undefined){return this.base(element,name)}return this.getAttribute(element,name)!=null}}});if(detect("MSIE.+win")){extend(Element.prototype,"cloneNode",function(deep){var clone=this.base(deep||false);clone.base2ID=undefined;return clone})}var _HTML_ATTRIBUTES="colSpan,rowSpan,vAlign,dateTime,accessKey,tabIndex,encType,maxLength,readOnly,longDesc";extend(_ATTRIBUTES,Array2.combine(_HTML_ATTRIBUTES.toLowerCase().split(","),_HTML_ATTRIBUTES.split(",")));var _getAttributeNode=document.documentElement.getAttributeNode?function(element,name){return element.getAttributeNode(name)}:function(element,name){return element.attributes[name]||element.attributes[_ATTRIBUTES[name.toLowerCase()]]};var TEXT=detect("(element.textContent===undefined)")?"innerText":"textContent";var Traversal=Module.extend({getDefaultView:function(node){return this.getDocument(node).defaultView},getNextElementSibling:function(node){while(node&&(node=node.nextSibling)&&!this.isElement(node)){continue}return node},getNodeIndex:function(node){var index=0;while(node&&(node=node.previousSibling)){index++}return index},getOwnerDocument:function(node){return node.ownerDocument},getPreviousElementSibling:function(node){while(node&&(node=node.previousSibling)&&!this.isElement(node)){continue}return node},getTextContent:function(node,isHTML){return node[isHTML?"innerHTML":TEXT]},isEmpty:function(node){node=node.firstChild;while(node){if(node.nodeType==3||this.isElement(node)){return false}node=node.nextSibling}return true},setTextContent:function(node,text,isHTML){return node[isHTML?"innerHTML":TEXT]=text},"@!MSIE":{setTextContent:function(node,text,isHTML){with(node){while(lastChild){parentNode.removeChild(lastChild)}}return this.base(node,text,isHTML)}},"@MSIE":{getDefaultView:function(node){return(node.document||node).parentWindow},"@MSIE5":{getOwnerDocument:function(node){return node.ownerDocument||node.document}}}},{contains:function(node,target){node.nodeType;while(target&&(target=target.parentNode)&&node!=target){continue}return !!target},getDocument:function(node){return this.isDocument(node)?node:node.ownerDocument||node.document},isDocument:function(node){return !!(node&&node.documentElement)},isElement:function(node){return !!(node&&node.nodeType==1)},"@(element.contains)":{contains:function(node,target){return node!=target&&(this.isDocument(node)?node==this.getOwnerDocument(target):node.contains(target))}},"@MSIE5":{isElement:function(node){return !!(node&&node.nodeType==1&&node.nodeName!="!")}}});var AbstractView=Binding.extend();var _CAPTURE_TYPE={},_TYPE_MAP={"2":2,"4":1};var _CAPTURING_PHASE=1,_AT_TARGET=2,_BUBBLING_PHASE=3;var _MOUSE_BUTTON=/^mouse(up|down)|click$/,_MOUSE_CLICK=/click$/,_BUBBLES="abort|error|select|change|resize|scroll|",_CANCELABLE="(dbl)?click|mouse(down|up|over|move|out|wheel)|key(down|up)|submit|reset";_BUBBLES=new RegExp("^("+_BUBBLES+_CANCELABLE+")$");_CANCELABLE=new RegExp("^("+_CANCELABLE+")$");if(_MSIE){var _W3C_EVENT_TYPE={focusin:"focus",focusout:"blur"};_CAPTURE_TYPE={focus:"focusin",blur:"focusout"}}var _CAN_DELEGATE=/^(blur|submit|reset|change|select)$|^(mouse|key|focus)|click$/;var Event=Binding.extend({"@!(document.createEvent)":{initEvent:function(event,type,bubbles,cancelable){event.type=String(type);event.bubbles=!!bubbles;event.cancelable=!!cancelable},preventDefault:function(event){if(event.cancelable!==false){event.returnValue=false}},stopPropagation:function(event){event.cancelBubble=true},"@MSIE":{preventDefault:function(event){this.base(event);if(event.type=="mousedown"){var type="onbeforedeactivate";var document=Traversal.getDocument(event.target);document.attachEvent(type,function(event){event.returnValue=false;document.detachEvent(type,arguments.callee)})}}}}},{CAPTURING_PHASE:_CAPTURING_PHASE,AT_TARGET:_AT_TARGET,BUBBLING_PHASE:_BUBBLING_PHASE,"@!(document.createEvent)":{"@MSIE":{bind:function(event){var type=event.type;if(!event.timeStamp){event.bubbles=_BUBBLES.test(type);event.cancelable=_CANCELABLE.test(type);event.timeStamp=new Date().valueOf()}event.relatedTarget=event[(event.target==event.fromElement?"to":"from")+"Element"];return this.base(event)}}},cloneEvent:function(event){var clone=copy(event);clone.stopPropagation=function(){event.stopPropagation()};clone.preventDefault=function(){event.preventDefault()};return clone},"@MSIE":{cloneEvent:copy}});var EventDispatcher=Base.extend({constructor:function(state){this.state=state;this.events=state.events},dispatch:function(nodes,event,phase){event.eventPhase=phase;var map=this.events[event.type][phase];if(map){var i=nodes.length;while(i--&&!event.cancelBubble){var currentTarget=nodes[i];var listeners=map[currentTarget.base2ID];if(listeners){listeners=copy(listeners);event.currentTarget=currentTarget;event.eventPhase=currentTarget==event.target?_AT_TARGET:phase;for(var listenerID in listeners){var listener=listeners[listenerID];if(typeof listener=="function"){listener.call(currentTarget,event)}else{listener.handleEvent(event)}}}}}},handleEvent:function(event,fixed){Event.bind(event);var type=event.type;var w3cType=_W3C_EVENT_TYPE[type];if(w3cType){event=copy(event);type=event.type=w3cType}if(this.events[type]){if(_MOUSE_BUTTON.test(type)){var button=_MOUSE_CLICK.test(type)?this.state._button:event.button;button=_TYPE_MAP[button]||0;if(event.button!=button){event=copy(event);event.button=button}}var currentTarget=event.target;var nodes=[],i=0;while(currentTarget){nodes[i++]=currentTarget;currentTarget=currentTarget.parentNode}this.dispatch(nodes,event,_CAPTURING_PHASE);if(!event.cancelBubble){if(!event.bubbles){nodes.length=1}nodes.reverse();this.dispatch(nodes,event,_BUBBLING_PHASE)}}return event.returnValue!==false},"@MSIE.+win":{handleEvent:function(event){if(event.type=="scroll"){setTimeout(bind(this.base,this,copy(event),true),0);return true}else{return this.base(event)}},"@MSIE5":{dispatch:function(nodes,event,phase){if(phase==_CAPTURING_PHASE&&!Array2.item(nodes,-1).documentElement){nodes.push(nodes[0].document)}this.base(nodes,event,phase)}}}});var _wrappedListeners={};var EventTarget=Interface.extend({"@!(element.addEventListener)":{addEventListener:function(target,type,listener,useCapture){var documentState=DocumentState.getInstance(target);var targetID=assignID(target);var listenerID=assignID(listener);var phase=useCapture?_CAPTURING_PHASE:_BUBBLING_PHASE;var typeMap=documentState.registerEvent(type,target);var phaseMap=typeMap[phase];if(!phaseMap){phaseMap=typeMap[phase]={}}if(useCapture){type=_CAPTURE_TYPE[type]||type}var listeners=phaseMap[targetID];if(!listeners){listeners=phaseMap[targetID]={}}listeners[listenerID]=listener},dispatchEvent:function(target,event){event.target=target;return DocumentState.getInstance(target).handleEvent(event)},removeEventListener:function(target,type,listener,useCapture){var events=DocumentState.getInstance(target).events;var typeMap=events[type];if(typeMap){var phaseMap=typeMap[useCapture?_CAPTURING_PHASE:_BUBBLING_PHASE];if(phaseMap){var listeners=phaseMap[target.base2ID];if(listeners){delete listeners[listener.base2ID]}}}}},"@(element.addEventListener)":{"@Gecko":{addEventListener:function(target,type,listener,useCapture){if(type=="mousewheel"){type="DOMMouseScroll";var originalListener=listener;listener=_wrappedListeners[assignID(listener)]=function(event){event=Event.cloneEvent(event);event.type="mousewheel";event.wheelDelta=(-event.detail*40)||0;_handleEvent(target,originalListener,event)}}this.base(target,type,listener,useCapture)}},"@webkit[1-4]|KHTML[34]":{addEventListener:function(target,type,listener,useCapture){if(_MOUSE_BUTTON.test(type)){var originalListener=listener;listener=_wrappedListeners[assignID(listener)]=function(event){var button=_TYPE_MAP[event.button]||0;if(event.button!=button){event=Event.cloneEvent(event);event.button=button}_handleEvent(target,originalListener,event)}}else{if(typeof listener=="object"){listener=_wrappedListeners[assignID(listener)]=bind("handleEvent",listener)}}this.base(target,type,listener,useCapture)}},"@Linux|Mac|opera":{addEventListener:function(target,type,listener,useCapture){if(type=="keydown"){var originalListener=listener;listener=_wrappedListeners[assignID(listener)]=function(keydownEvent){var firedCount=0,cancelled=false;extend(keydownEvent,"preventDefault",function(){this.base();cancelled=true});function handleEvent(event){if(cancelled){event.preventDefault()}if(event==keydownEvent||firedCount>1){_handleEvent(target,originalListener,keydownEvent)}firedCount++}handleEvent(keydownEvent);target.addEventListener("keyup",function(){target.removeEventListener("keypress",handleEvent,true);target.removeEventListener("keyup",arguments.callee,true)},true);target.addEventListener("keypress",handleEvent,true)}}this.base(target,type,listener,useCapture)}},removeEventListener:function(target,type,listener,useCapture){this.base(target,type,_wrappedListeners[listener.base2ID]||listener,useCapture)}}});if(detect("Gecko")){EventTarget.removeEventListener._delegate="removeEventListener";delete EventTarget.prototype.removeEventListener}function _handleEvent(target,listener,event){if(typeof listener=="function"){listener.call(target,event)}else{listener.handleEvent(event)}}var DocumentEvent=Interface.extend({"@!(document.createEvent)":{createEvent:function(document,type){var event=document.createEventObject?document.createEventObject():{};event.bubbles=false;event.cancelable=false;event.eventPhase=0;event.target=document;event.currentTarget=null;event.relatedTarget=null;event.timeStamp=new Date().valueOf();return Event(event)}},"@(document.createEvent)":{"@!(document.createEvent('Events'))":{createEvent:function(document,type){return this.base(document,type=="Events"?"UIEvents":type)}}}});var DOMContentLoadedEvent=Base.extend({constructor:function(document){var fired=false;this.fire=function(){if(!fired){fired=true;setTimeout(function(){var event=DocumentEvent.createEvent(document,"Events");Event.initEvent(event,"DOMContentLoaded",true,false);EventTarget.dispatchEvent(document,event)},1)}};EventTarget.addEventListener(document,"DOMContentLoaded",function(){fired=true},false);this.listen(document)},listen:Undefined,"@!Gecko20([^0]|0[3-9])|Webkit[5-9]|Opera[19]|MSIE.+mac":{listen:function(document){EventTarget.addEventListener(Traversal.getDefaultView(document),"load",this.fire,false)},"@MSIE.+win":{listen:function(document){try{document.body.doScroll("left");if(!this.__constructing){this.fire()}}catch(e){setTimeout(bind(this.listen,this,document),10)}}},"@KHTML":{listen:function(document){if(/loaded|complete/.test(document.readyState)){if(!this.__constructing){this.fire()}}else{setTimeout(bind(this.listen,this,document),10)}}}}});Document.implement(DocumentEvent);Document.implement(EventTarget);Element.implement(EventTarget);var _PIXEL=/^\d+(px)?$/i,_METRICS=/(width|height|top|bottom|left|right|fontSize)$/,_COLOR=/^(color|backgroundColor)$/,_RGB_BLACK="rgb(0, 0, 0)",_BLACK={black:1,"#000":1,"#000000":1};var ViewCSS=Interface.extend({"@!(document.defaultView.getComputedStyle)":{"@MSIE":{getComputedStyle:function(view,element,pseudoElement){var currentStyle=element.currentStyle;var computedStyle={};for(var propertyName in currentStyle){if(_METRICS.test(propertyName)||_COLOR.test(propertyName)){computedStyle[propertyName]=this.getComputedPropertyValue(view,element,propertyName)}else{if(propertyName.indexOf("ruby")!=0){computedStyle[propertyName]=currentStyle[propertyName]}}}return computedStyle}}},getComputedStyle:function(view,element,pseudoElement){return _CSSStyleDeclaration_ReadOnly.bind(this.base(view,element,pseudoElement))}},{getComputedPropertyValue:function(view,element,propertyName){return CSSStyleDeclaration.getPropertyValue(this.getComputedStyle(view,element,null),propertyName)},"@MSIE":{getComputedPropertyValue:function(view,element,propertyName){propertyName=this.toCamelCase(propertyName);var value=element.currentStyle[propertyName];if(_METRICS.test(propertyName)){return _MSIE_getPixelValue(element,value)+"px"}if(!_MSIE5&&_COLOR.test(propertyName)){var rgb=_MSIE_getColorValue(element,propertyName=="color"?"ForeColor":"BackColor");return(rgb==_RGB_BLACK&&!_BLACK[value])?value:rgb}return value}},toCamelCase:function(string){return string.replace(/\-([a-z])/g,flip(String2.toUpperCase))}});function _MSIE_getPixelValue(element,value){if(_PIXEL.test(value)){return parseInt(value)}var styleLeft=element.style.left;var runtimeStyleLeft=element.runtimeStyle.left;element.runtimeStyle.left=element.currentStyle.left;element.style.left=value||0;value=element.style.pixelLeft;element.style.left=styleLeft;element.runtimeStyle.left=runtimeStyleLeft;return value}function _MSIE_getColorValue(element,type){if(element.createTextRange){var range=element.createTextRange()}else{range=element.document.body.createTextRange();range.moveToElementText(element)}var color=range.queryCommandValue(type);return format("rgb(%1, %2, %3)",color&255,(color&65280)>>8,(color&16711680)>>16)}var _CSSStyleDeclaration_ReadOnly=Binding.extend({getPropertyValue:function(style,propertyName){return this.base(style,_CSSPropertyNameMap[propertyName]||propertyName)},"@MSIE.+win":{getPropertyValue:function(style,propertyName){return propertyName=="float"?style.styleFloat:style[ViewCSS.toCamelCase(propertyName)]}}});var CSSStyleDeclaration=_CSSStyleDeclaration_ReadOnly.extend({setProperty:function(style,propertyName,value,priority){return this.base(style,_CSSPropertyNameMap[propertyName]||propertyName,value,priority)},"@MSIE.+win":{setProperty:function(style,propertyName,value,priority){if(propertyName=="opacity"){value*=100;style.opacity=value;style.zoom=1;style.filter="Alpha(opacity="+value+")"}else{if(priority=="important"){style.cssText+=format(";%1:%2!important;",propertyName,value)}else{style.setAttribute(ViewCSS.toCamelCase(propertyName),value)}}}}},{"@MSIE":{bind:function(style){style.getPropertyValue=this.prototype.getPropertyValue;style.setProperty=this.prototype.setProperty;return style}}});var _CSSPropertyNameMap=new Base({"@Gecko":{opacity:"-moz-opacity"},"@KHTML":{opacity:"-khtml-opacity"}});with(CSSStyleDeclaration.prototype){getPropertyValue.toString=setProperty.toString=K("[base2]")}AbstractView.implement(ViewCSS);var NodeSelector=Interface.extend({"@(element.querySelector)":{querySelector:function(node,selector){try{var element=this.base(node,trim(selector));if(element){return element}}catch(x){}return new Selector(selector).exec(node,1)},querySelectorAll:function(node,selector){try{var nodeList=this.base(node,trim(selector));if(nodeList){return new StaticNodeList(nodeList)}}catch(x){}return new Selector(selector).exec(node)}},"@!(element.querySelector)":{querySelector:function(node,selector){return new Selector(selector).exec(node,1)},querySelectorAll:function(node,selector){return new Selector(selector).exec(node)}}});extend(NodeSelector.prototype,{querySelector:function(selector){return DOM.bind(this.base(selector))},querySelectorAll:function(selector){return extend(this.base(selector),"item",function(index){return DOM.bind(this.base(index))})}});var DocumentSelector=NodeSelector.extend();var ElementSelector=NodeSelector.extend({"@!(element.matchesSelector)":{matchesSelector:function(element,selector){return new Selector(selector).test(element)}}});var _CSS_ESCAPE=/'(\\.|[^'\\])*'|"(\\.|[^"\\])*"/g,_CSS_IMPLIED_ASTERISK=/([\s>+~,]|[^(]\+|^)([#.:\[])/g,_CSS_IMPLIED_SPACE=/(^|,)([^\s>+~])/g,_CSS_WHITESPACE=/\s*([\s>+~,]|^|$)\s*/g,_CSS_WILD_CARD=/\s\*\s/g,_CSS_UNESCAPE=/\x01(\d+)/g,_QUOTE=/'/g;var CSSParser=RegGrp.extend({constructor:function(items){this.base(items);this.cache={};this.sorter=new RegGrp;this.sorter.add(/:not\([^)]*\)/,RegGrp.IGNORE);this.sorter.add(/([ >](\*|[\w-]+))([^: >+~]*)(:\w+-child(\([^)]+\))?)([^: >+~]*)/,"$1$3$6$4")},cache:null,ignoreCase:true,escape:function(selector,simple){var strings=this._strings=[];selector=this.optimise(this.format(String(selector).replace(_CSS_ESCAPE,function(string){return"\x01"+strings.push(string.slice(1,-1).replace(_QUOTE,"\\'"))})));if(simple){selector=selector.replace(/(^|,) \*?/g,"$1")}return selector},format:function(selector){return selector.replace(_CSS_WHITESPACE,"$1").replace(_CSS_IMPLIED_SPACE,"$1 $2").replace(_CSS_IMPLIED_ASTERISK,"$1*$2")},optimise:function(selector){return this.sorter.exec(selector.replace(_CSS_WILD_CARD,">* "))},parse:function(selector,simple){return this.cache[selector]||(this.cache[selector]=this.unescape(this.exec(this.escape(selector,simple))))},unescape:function(selector){var strings=this._strings;return selector.replace(_CSS_UNESCAPE,function(match,index){return strings[index-1]})}});function _nthChild(match,args,position,last,not,and,mod,equals){last=/last/i.test(match)?last+"+1-":"";if(!isNaN(args)){args="0n+"+args}else{if(args=="even"){args="2n"}else{if(args=="odd"){args="2n+1"}}}args=args.split("n");var a=args[0]?(args[0]=="-")?-1:parseInt(args[0]):1;var b=parseInt(args[1])||0;var negate=a<0;if(negate){a=-a;if(a==1){b++}}var query=format(a==0?"%3%7"+(last+b):"(%4%3-%2)%6%1%70%5%4%3>=%2",a,b,position,last,and,mod,equals);if(negate){query=not+"("+query+")"}return query}var XPathParser=CSSParser.extend({constructor:function(){this.base(XPathParser.build());this.sorter.putAt(1,"$1$4$3$6")},escape:function(selector,simple){return this.base(selector,simple).replace(/,/g,"\x02")},unescape:function(selector){return this.base(selector.replace(/\[self::\*\]/g,"").replace(/(^|\x02)\//g,"$1./").replace(/\x02/g," | ")).replace(/'[^'\\]*\\'(\\.|[^'\\])*'/g,function(match){return"concat("+match.split("\\'").join("',\"'\",'")+")"})},"@opera(7|8|9\\.[1-4])":{unescape:function(selector){return this.base(selector.replace(/last\(\)/g,"count(preceding-sibling::*)+count(following-sibling::*)+1"))}}},{build:function(){this.values.attributes[""]="[@$1]";forEach(this.types,function(add,type){forEach(this.values[type],add,this.rules)},this);this.build=K(this.rules);return this.rules},optimised:{pseudoClasses:{"first-child":"[1]","last-child":"[last()]","only-child":"[last()=1]"}},rules:extend({},{"@!KHTML|opera":{"(^|\\x02) (\\*|[\\w-]+)#([\\w-]+)":"$1id('$3')[self::$2]"},"@!KHTML":{"([ >])(\\*|[\\w-]+):([\\w-]+-child(\\(([^)]+)\\))?)":function(match,token,tagName,pseudoClass,$4,args){var replacement=(token==" ")?"//*":"/*";if(/^nth/i.test(pseudoClass)){replacement+=_xpath_nthChild(pseudoClass,args,"position()")}else{replacement+=XPathParser.optimised.pseudoClasses[pseudoClass]}return replacement+"[self::"+tagName+"]"}}}),types:{identifiers:function(replacement,token){this[rescape(token)+"([\\w-]+)"]=replacement},combinators:function(replacement,combinator){this[rescape(combinator)+"(\\*|[\\w-]+)"]=replacement},attributes:function(replacement,operator){this["\\[\\s*([\\w-]+)\\s*"+rescape(operator)+"\\s*([^\\]\\s]*)\\s*\\]"]=replacement},pseudoClasses:function(replacement,pseudoClass){this[":"+pseudoClass.replace(/\(\)$/,"\\(([^)]+)\\)")]=replacement}},values:{identifiers:{"#":"[@id='$1'][1]",".":"[contains(concat(' ',@class,' '),' $1 ')]"},combinators:{" ":"/descendant::$1",">":"/child::$1","+":"/following-sibling::*[1][self::$1]","~":"/following-sibling::$1"},attributes:{"*=":"[contains(@$1,'$2')]","^=":"[starts-with(@$1,'$2')]","$=":"[substring(@$1,string-length(@$1)-string-length('$2')+1)='$2']","~=":"[contains(concat(' ',@$1,' '),' $2 ')]","|=":"[contains(concat('-',@$1,'-'),'-$2-')]","!=":"[not(@$1='$2')]","=":"[@$1='$2']"},pseudoClasses:{link:"[false]",visited:"[false]",empty:"[not(child::*) and not(text())]","first-child":"[not(preceding-sibling::*)]","last-child":"[not(following-sibling::*)]","not()":_xpath_not,"nth-child()":_xpath_nthChild,"nth-last-child()":_xpath_nthChild,"only-child":"[not(preceding-sibling::*) and not(following-sibling::*)]",root:"[not(parent::*)]"}},"@opera(7|8|9\\.[1-4])":{build:function(){this.optimised.pseudoClasses["last-child"]=this.values.pseudoClasses["last-child"];this.optimised.pseudoClasses["only-child"]=this.values.pseudoClasses["only-child"];return this.base()}}});var _notParser;function _xpath_not(match,args){if(!_notParser){_notParser=new XPathParser}return"[not("+_notParser.exec(trim(args)).replace(/\[1\]/g,"").replace(/^(\*|[\w-]+)/,"[self::$1]").replace(/\]\[/g," and ").slice(1,-1)+")]"}function _xpath_nthChild(match,args,position){return"["+_nthChild(match,args,position||"count(preceding-sibling::*)+1","last()","not"," and "," mod ","=")+"]"}var Selector=Base.extend({constructor:function(selector){this.toString=K(trim(selector))},exec:function(context,count,simple){return Selector.parse(this,simple)(context,count)},isSimple:function(){if(!_parser.exec){_parser=new CSSParser(_parser)}return !_COMBINATOR.test(trim(_parser.escape(this)))},test:function(element){if(this.isSimple()){return !!Selector.parse(this,true)(element,1)}else{element.setAttribute("b2-test",true);var result=new Selector(this+"[b2-test]").exec(Traversal.getOwnerDocument(element),1);element.removeAttribute("b2-test");return result==element}},toXPath:function(simple){return Selector.toXPath(this,simple)},"@(XPathResult)":{exec:function(context,count,simple){if(_NOT_XPATH.test(this)){return this.base(context,count,simple)}var document=Traversal.getDocument(context);var type=count==1?9:7;var result=document.evaluate(this.toXPath(simple),context,null,type,null);return count==1?result.singleNodeValue:result}},"@MSIE":{exec:function(context,count,simple){if(typeof context.selectNodes!="undefined"&&!_NOT_XPATH.test(this)){var method=single?"selectSingleNode":"selectNodes";return context[method](this.toXPath(simple))}return this.base(context,count,simple)}},"@(true)":{exec:function(context,count,simple){try{var result=this.base(context||document,count,simple)}catch(error){throw new SyntaxError(format("'%1' is not a valid CSS selector.",this))}return count==1?result:new StaticNodeList(result)}}},{toXPath:function(selector,simple){if(!_xpathParser){_xpathParser=new XPathParser}return _xpathParser.parse(selector,simple)}});var _COMBINATOR=/[^,]\s|[+>~]/;var _NOT_XPATH=":(checked|disabled|enabled|contains|hover|active|focus)|^(#[\\w-]+\\s*)?\\w+$";if(detect("KHTML")){if(detect("WebKit5")){_NOT_XPATH+="|nth\\-|,"}else{_NOT_XPATH="."}}_NOT_XPATH=new RegExp(_NOT_XPATH);Selector.operators={"=":"%1=='%2'","~=":/(^| )%1( |$)/,"|=":/^%1(-|$)/,"^=":/^%1/,"$=":/%1$/,"*=":/%1/};Selector.operators[""]="%1!=null";Selector.pseudoClasses={checked:"e%1.checked",contains:"e%1[TEXT].indexOf('%2')!=-1",disabled:"e%1.disabled",empty:"Traversal.isEmpty(e%1)",enabled:"e%1.disabled===false","first-child":"!Traversal.getPreviousElementSibling(e%1)","last-child":"!Traversal.getNextElementSibling(e%1)","only-child":"!Traversal.getPreviousElementSibling(e%1)&&!Traversal.getNextElementSibling(e%1)",root:"e%1==Traversal.getDocument(e%1).documentElement",target:"e%1.id&&e%1.id==location.hash.slice(1)",hover:"DocumentState.getInstance(d).isHover(e%1)",active:"DocumentState.getInstance(d).isActive(e%1)",focus:"DocumentState.getInstance(d).hasFocus(e%1)",link:"false",visited:"false"};var _INDEXED=document.documentElement.sourceIndex!==undefined,_VAR="var p%2=0,i%2,e%3,n%2=e%1.",_ID=_INDEXED?"e%1.sourceIndex":"assignID(e%1)",_TEST="var g="+_ID+";if(!p[g]){p[g]=1;",_STORE="r[k++]=e%1;if(s==1)return e%1;if(k===s){_query.state=[%2];_query.complete=%3;return r;",_FN="var _query=function(e0,s%1){_indexed++;var r=[],p={},p0=0,reg=[%4],d=Traversal.getDocument(e0),c=d.writeln?'toUpperCase':'toString',k=0;";var _xpathParser;var _reg,_index,_wild,_list,_group,_listAll,_duplicate,_cache={},_simple={};function sum(list){var total=0;for(var i=0;i<list.length;i++){total+=list[i]}return total}var _parser={"^(\\*|[\\w-]+)":function(match,tagName){return tagName=="*"?"":format("if(e0.nodeName=='%1'[c]()){",tagName)},"^ \\*:root":function(match){_wild=false;var replacement="e%2=d.documentElement;if(Traversal.contains(e%1,e%2)){";return format(replacement,_index++,_index)}," (\\*|[\\w-]+)#([\\w-]+)":function(match,tagName,id){_wild=false;var replacement="var e%2=_byId(d,'%4');if(e%2&&";if(tagName!="*"){replacement+="e%2.nodeName=='%3'[c]()&&"}replacement+="Traversal.contains(e%1,e%2)){";if(_list[_group]){replacement+=format("i%1=n%1.length;",sum(_list))}return format(replacement,_index++,_index,tagName,id)}," (\\*|[\\w-]+)":function(match,tagName){_duplicate++;_wild=tagName=="*";var replacement=format(_VAR,_index++,"%2",_index);replacement+=(_wild&&_MSIE5)?"all":"getElementsByTagName('%3')";replacement+=";for(i%2=a%2||0;(e%1=n%2[i%2]);i%2++){";_list[_group]++;return format(replacement,_index,sum(_list),tagName)},">(\\*|[\\w-]+)":function(match,tagName){var children=_MSIE&&_index;_wild=tagName=="*";var replacement=_VAR+(children?"children":"childNodes");replacement=format(replacement,_index++,"%2",_index);if(!_wild&&_MSIE&&children){replacement+=".tags('%3')"}replacement+=";for(i%2=a%2||0;(e%1=n%2[i%2]);i%2++){";if(_wild){replacement+="if(e%1.nodeType==1){";_wild=_MSIE5}else{if(!_MSIE||!children){replacement+="if(e%1.nodeName=='%3'[c]()){"}}_list[_group]++;return format(replacement,_index,sum(_list),tagName)},"\\+(\\*|[\\w-]+)":function(match,tagName){var replacement="";if(_wild&&_MSIE){replacement+="if(e%1.nodeName!='!'){"}_wild=false;replacement+="e%1=Traversal.getNextElementSibling(e%1);if(e%1";if(tagName!="*"){replacement+="&&e%1.nodeName=='%2'[c]()"}replacement+="){";return format(replacement,_index,tagName)},"~(\\*|[\\w-]+)":function(match,tagName){var replacement="";if(_wild&&_MSIE){replacement+="if(e%1.nodeName!='!'){"}_wild=false;_duplicate=2;replacement+="while(e%1=e%1.nextSibling){if(e%1.b2_adjacent==_indexed)break;if(";if(tagName=="*"){replacement+="e%1.nodeType==1";if(_MSIE5){replacement+="&&e%1.nodeName!='!'"}}else{replacement+="e%1.nodeName=='%2'[c]()"}replacement+="){e%1.b2_adjacent=_indexed;";return format(replacement,_index,tagName)},"#([\\w-]+)":function(match,id){_wild=false;var replacement="if(e%1.id=='%2'){";if(_list[_group]){replacement+=format("i%1=n%1.length;",sum(_list))}return format(replacement,_index,id)},"\\.([\\w-]+)":function(match,className){_wild=false;_reg.push(new RegExp("(^|\\s)"+rescape(className)+"(\\s|$)"));return format("if(e%1.className&&reg[%2].test(e%1.className)){",_index,_reg.length-1)},":not\\((\\*|[\\w-]+)?([^)]*)\\)":function(match,tagName,filters){var replacement=(tagName&&tagName!="*")?format("if(e%1.nodeName=='%2'[c]()){",_index,tagName):"";replacement+=_parser.exec(filters);return"if(!"+replacement.slice(2,-1).replace(/\)\{if\(/g,"&&")+"){"},":nth(-last)?-child\\(([^)]+)\\)":function(match,last,args){_wild=false;last=format("e%1.parentNode.b2_length",_index);var replacement="if(p%1!==e%1.parentNode)p%1=_register(e%1.parentNode);";replacement+="var i=e%1[p%1.b2_lookup];if(p%1.b2_lookup!='b2_index')i++;if(";return format(replacement,_index)+_nthChild(match,args,"i",last,"!","&&","% ","==")+"){"},":([\\w-]+)(\\(([^)]+)\\))?":function(match,pseudoClass,$2,args){return"if("+format(Selector.pseudoClasses[pseudoClass]||"throw",_index,args||"")+"){"},"\\[\\s*([\\w-]+)\\s*([^=]?=)?\\s*([^\\]\\s]*)\\s*\\]":function(match,attr,operator,value){value=trim(value);if(_MSIE){var getAttribute="Element.getAttribute(e%1,'%2')"}else{getAttribute="e%1.getAttribute('%2')"}getAttribute=format(getAttribute,_index,attr);var replacement=Selector.operators[operator||""];if(instanceOf(replacement,RegExp)){_reg.push(new RegExp(format(replacement.source,rescape(_parser.unescape(value)))));replacement="reg[%2].test(%1)";value=_reg.length-1}return"if("+format(replacement,getAttribute,value)+"){"}};(function(_no_shrink_){var _byId=detect("MSIE[5-7]")?function(document,id){var result=document.all[id]||null;if(!result||result.id==id){return result}for(var i=0;i<result.length;i++){if(result[i].id==id){return result[i]}}return null}:function(document,id){return document.getElementById(id)};var _indexed=1;function _register(element){if(element.rows){element.b2_length=element.rows.length;element.b2_lookup="rowIndex"}else{if(element.cells){element.b2_length=element.cells.length;element.b2_lookup="cellIndex"}else{if(element.b2_indexed!=_indexed){var index=0;var child=element.firstChild;while(child){if(child.nodeType==1&&child.nodeName!="!"){child.b2_index=++index}child=child.nextSibling}element.b2_length=index;element.b2_lookup="b2_index"}}}element.b2_indexed=_indexed;return element}Selector.parse=function(selector,simple){var cache=simple?_simple:_cache;if(!cache[selector]){if(!_parser.exec){_parser=new CSSParser(_parser)}_reg=[];_list=[];var fn="";var selectors=_parser.escape(selector,simple).split(",");for(_group=0;_group<selectors.length;_group++){_wild=_index=_list[_group]=0;_duplicate=selectors.length>1?2:0;var block=_parser.exec(selectors[_group])||"throw;";if(_wild&&_MSIE){block+=format("if(e%1.tagName!='!'){",_index)}var store=(_duplicate>1)?_TEST:"";block+=format(store+_STORE,_index,"%2");block+=Array(match(block,/\{/g).length+1).join("}");fn+=block}fn=_parser.unescape(fn);if(selectors.length>1){fn+="r.unsorted=1;"}var args="";var state=[];var total=sum(_list);for(var i=1;i<=total;i++){args+=",a"+i;state.push("i"+i+"?(i"+i+"-1):0")}if(total){var complete=[],k=0;for(var i=0;i<_group;i++){k+=_list[i];if(_list[i]){complete.push(format("n%1&&i%1==n%1.length",k))}}}fn+="_query.state=[%2];_query.complete=%3;return s==1?null:r}";eval(format(_FN+fn,args,state.join(","),total?complete.join("&&"):true,_reg));cache[selector]=_query}return cache[selector]}})();var StaticNodeList=Base.extend({constructor:function(nodes){nodes=nodes||[];this.length=nodes.length;this.item=function(index){if(index<0){index+=this.length}return nodes[index]};if(nodes.unsorted){nodes.sort(_SORTER)}},length:0,forEach:function(block,context){for(var i=0;i<this.length;i++){block.call(context,this.item(i),i,this)}},item:Undefined,not:function(test,context){return this.filter(not(test),context)},slice:function(start,end){return new StaticNodeList(this.map(I).slice(start,end))},"@(XPathResult)":{constructor:function(nodes){if(nodes&&nodes.snapshotItem){this.length=nodes.snapshotLength;this.item=function(index){if(index<0){index+=this.length}return nodes.snapshotItem(index)}}else{this.base(nodes)}}}});StaticNodeList.implement(Enumerable);var _matchesSelector=function(test,context){if(typeof test!="function"){test=bind("test",new Selector(test))}return this.base(test,context)};StaticNodeList.implement({every:_matchesSelector,filter:_matchesSelector,not:_matchesSelector,some:_matchesSelector});StaticNodeList.implement({filter:function(test,context){return new StaticNodeList(this.base(test,context))}});var _SORTER=_INDEXED?function(node1,node2){return node1.sourceIndex-node2.sourceIndex}:function(node1,node2){return(Node.compareDocumentPosition(node1,node2)&2)-1};Document.implement(DocumentSelector);Element.implement(ElementSelector);var HTMLDocument=Document.extend(null,{bind:function(document){DocumentState.createState(document);return this.base(document)}});var HTMLElement=Element.extend(null,{bindings:{},tags:"*",bind:function(element){if(!element.classList){element.classList=new _ElementClassList(element)}if(!element.ownerDocument){element.ownerDocument=Traversal.getOwnerDocument(element)}return this.base(element)},extend:function(){var binding=base(this,arguments);forEach.csv(binding.tags,function(tagName){HTMLElement.bindings[tagName]=binding});return binding}});HTMLElement.extend(null,{tags:"APPLET,EMBED",bind:I});var ClassList=Module.extend({add:function(element,token){if(!this.has(element,token)){element.className+=(element.className?" ":"")+token}},has:function(element,token){var regexp=new RegExp("(^|\\s)"+token+"(\\s|$)");return regexp.test(element.className)},remove:function(element,token){var regexp=new RegExp("(^|\\s)"+token+"(\\s|$)","g");element.className=trim(element.className.replace(regexp,"$2"))},toggle:function(element,token){this[this.has(element,token)?"remove":"add"](element,token)}});function _ElementClassList(element){this.add=function(token){ClassList.add(element,token)};this.has=function(token){return ClassList.has(element,token)};this.remove=function(token){ClassList.remove(element,token)}}_ElementClassList.prototype.toggle=function(token){this[this.has(token)?"remove":"add"](token)};var DocumentState=Base.extend({constructor:function(document){this.document=document;this.events={};this._hoverElement=document.documentElement;this.isBound=function(){return !!DOM.bind[document.base2ID]};forEach(this,function(method,name,documentState){if(/^on((DOM)?\w+|[a-z]+)$/.test(name)){documentState.registerEvent(name.slice(2))}})},includes:function(element,target){return target&&(element==target||Traversal.contains(element,target))},hasFocus:function(element){return element==this._focusElement},isActive:function(element){return this.includes(element,this._activeElement)},isHover:function(element){return this.includes(element,this._hoverElement)},handleEvent:function(event){return this["on"+event.type](event)},onblur:function(event){delete this._focusElement},onmouseover:function(event){this._hoverElement=event.target},onmouseout:function(event){delete this._hoverElement},onmousedown:function(event){this._activeElement=event.target},onfocus:function(event){this._focusElement=event.target},onmouseup:function(event){delete this._activeElement},registerEvent:function(type){this.document.addEventListener(type,this,true);this.events[type]=true},"@(document.activeElement===undefined)":{constructor:function(document){this.base(document);if(this.isBound()){document.activeElement=document.body}},onfocus:function(event){this.base(event);if(this.isBound()){this.document.activeElement=this._focusElement}},onblur:function(event){this.base(event);if(this.isBound()){this.document.activeElement=this.document.body}}},"@!(element.addEventListener)":{constructor:function(document){this.base(document);var dispatcher=new EventDispatcher(this);this._dispatch=function(event){event.target=event.target||event.srcElement||document;dispatcher.handleEvent(event)};this.handleEvent=function(event){if(this["on"+event.type]){this["on"+event.type](event)}return dispatcher.handleEvent(event)}},registerEvent:function(type,target){var events=this.events[type];var canDelegate=_CAN_DELEGATE.test(type);if(!events||!canDelegate){if(!events){events=this.events[type]={}}if(canDelegate||!target){target=this.document}var state=this;target["on"+type]=function(event){if(!event){event=Traversal.getDefaultView(this).event}if(event){state.handleEvent(event)}}}return events},"@MSIE.+win":{constructor:function(document){this.base(document);var forms={};this._registerForm=function(form){var formID=assignID(form);if(!forms[formID]){forms[formID]=true;form.attachEvent("onsubmit",this._dispatch);form.attachEvent("onreset",this._dispatch)}}},fireEvent:function(type,event){event=copy(event);event.type=type;this.handleEvent(event)},registerEvent:function(type,target){var events=this.events[type];var canDelegate=_CAN_DELEGATE.test(type);if(!events||!canDelegate){if(!events){events=this.events[type]={}}if(canDelegate||!target){target=this.document}var state=this;target.attachEvent("on"+type,function(event){event.target=event.srcElement||state.document;state.handleEvent(event);if(state["after"+type]){state["after"+type](event)}})}return events},onDOMContentLoaded:function(event){forEach(event.target.forms,this._registerForm,this);this.setFocus(this.document.activeElement)},onmousedown:function(event){this.base(event);this._button=event.button},onmouseup:function(event){this.base(event);if(this._button==null){this.fireEvent("mousedown",event)}delete this._button},aftermouseup:function(){if(this._selectEvent){this._dispatch(this._selectEvent);delete this._selectEvent}},onfocusin:function(event){this.setFocus(event.target);this.onfocus(event)},setFocus:function(target){var change=this.events.change,select=this.events.select;if(change||select){var dispatch=this._dispatch;if(change){target.attachEvent("onchange",dispatch)}if(select){var state=this;var onselect=function(event){if(state._activeElement==target){state._selectEvent=copy(event)}else{dispatch(event)}};target.attachEvent("onselect",onselect)}target.attachEvent("onblur",function(){target.detachEvent("onblur",arguments.callee);if(change){target.detachEvent("onchange",dispatch)}if(select){target.detachEvent("onselect",onselect)}})}},onfocusout:function(event){this.onblur(event)},onclick:function(event){var target=event.target;if(target.form){this._registerForm(target.form)}},ondblclick:function(event){this.fireEvent("click",event)}}}},{init:function(){assignID(document);DocumentState=this;this.createState(document);new DOMContentLoadedEvent(document)},createState:function(document){var base2ID=document.base2ID;if(!this[base2ID]){this[base2ID]=new this(document)}return this[base2ID]},getInstance:function(target){return this[Traversal.getDocument(target).base2ID]}});eval(this.exports)};if(!this.JSON){JSON=function(){function f(n){return n<10?"0"+n:n}Date.prototype.toJSON=function(key){return this.getUTCFullYear()+"-"+f(this.getUTCMonth()+1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"Z"};var cx=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,escapeable=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,gap,indent,meta={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},rep;function quote(string){escapeable.lastIndex=0;return escapeable.test(string)?'"'+string.replace(escapeable,function(a){var c=meta[a];if(typeof c==="string"){return c}return"\\u"+("0000"+(+(a.charCodeAt(0))).toString(16)).slice(-4)})+'"':'"'+string+'"'}function str(key,holder){var i,k,v,length,mind=gap,partial,value=holder[key];if(value&&typeof value==="object"&&typeof value.toJSON==="function"){value=value.toJSON(key)}if(typeof rep==="function"){value=rep.call(holder,key,value)}switch(typeof value){case"string":return quote(value);case"number":return isFinite(value)?String(value):"null";case"boolean":case"null":return String(value);case"object":if(!value){return"null"}gap+=indent;partial=[];if(typeof value.length==="number"&&!(value.propertyIsEnumerable("length"))){length=value.length;for(i=0;i<length;i+=1){partial[i]=str(i,value)||"null"}v=partial.length===0?"[]":gap?"[\n"+gap+partial.join(",\n"+gap)+"\n"+mind+"]":"["+partial.join(",")+"]";gap=mind;return v}if(rep&&typeof rep==="object"){length=rep.length;for(i=0;i<length;i+=1){k=rep[i];if(typeof k==="string"){v=str(k,value,rep);if(v){partial.push(quote(k)+(gap?": ":":")+v)}}}}else{for(k in value){if(Object.hasOwnProperty.call(value,k)){v=str(k,value,rep);if(v){partial.push(quote(k)+(gap?": ":":")+v)}}}}v=partial.length===0?"{}":gap?"{\n"+gap+partial.join(",\n"+gap)+"\n"+mind+"}":"{"+partial.join(",")+"}";gap=mind;return v}}return{stringify:function(value,replacer,space){var i;gap="";indent="";if(space){if(typeof space==="number"){for(i=0;i<space;i+=1){indent+=" "}}else{if(typeof space==="string"){indent=space}}}rep=replacer;if(replacer&&typeof replacer!=="function"&&(typeof replacer!=="object"||typeof replacer.length!=="number")){throw new Error("JSON.stringify")}return str("",{"":value})},parse:function(text,reviver){var j;function walk(holder,key){var k,v,value=holder[key];if(value&&typeof value==="object"){for(k in value){if(Object.hasOwnProperty.call(value,k)){v=walk(value,k);if(v!==undefined){value[k]=v}else{delete value[k]}}}}return reviver.call(holder,key,value)}cx.lastIndex=0;if(cx.test(text)){text=text.replace(cx,function(a){return"\\u"+("0000"+(+(a.charCodeAt(0))).toString(16)).slice(-4)})}if(/^[\],:{}\s]*$/.test(text.replace(/\\["\\\/bfnrtu]/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,""))){j=eval("("+text+")");return typeof reviver==="function"?walk({"":j},""):j}throw new SyntaxError("JSON.parse")}}}()}if(!document.createElementNS){document.createElement("section");document.createElement("article");document.createElement("aside");document.createElement("footer");document.createElement("header");document.createElement("nav");document.createElement("time")}base2.DOM.bind(document);base2.JavaScript.bind(window);base2.JavaScript.Array2(Array.prototype);function extend_object(A,C){for(var B in C){A[B]=C[B]}return A}var $A=function(C){if(!C){return[]}if(C.toArray){return C.toArray()}else{var B=[];for(var A=0;A<C.length;A++){B.push(C[A])}return B}};Function.prototype.bindAsEventListener=function(){var A=this,C=$A(arguments),B=C.shift();return function(D){return A.apply(B,[D||window.event].concat(C))}};Function.prototype.ebind=function(){var A=this,C=$A(arguments),B=C.shift();return function(){return A.apply(B,C.concat($A(arguments)))}};var userAgent=navigator.userAgent.toLowerCase();var Ajax=base2.Base.extend({lastModified:{},browser:{version:(userAgent.match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/)||[])[1],safari:/webkit/.test(userAgent),opera:/opera/.test(userAgent),msie:/msie/.test(userAgent)&&!/opera/.test(userAgent),mozilla:/mozilla/.test(userAgent)&&!/(compatible|webkit)/.test(userAgent)},constructor:function(A){this.options={url:location.href,method:"GET",timeout:0,async:true,contentType:"application/x-www-form-urlencoded",processData:true,data:null,username:null,password:null,accepts:{xml:"application/xml, text/xml",html:"text/html",script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}};extend_object(this.options,A||{})},get:function(A,C,D,B){if(typeof C=="function"){D=C;C=null}return this.request({method:"GET",url:A,data:C,success:D,dataType:B})},post:function(A,C,D,B){if(typeof C=="function"){D=C;C=null}return this.request({method:"POST",url:A,data:C,success:D,dataType:B})},request:function(P){extend_object(Ajax.options,P||{});extend_object(P,Ajax.options);var E,F,A=P.method.toUpperCase();if(P.data&&P.processData&&typeof P.data!="string"){P.data=Ajax.param(P.data)}if(P.cache===false&&A=="GET"){var J=now();var H=P.url.replace(/(\?|&)_=.*?(&|$)/,"$1_="+J+"$2");P.url=H+((H==P.url)?(P.url.match(/\?/)?"&":"?")+"_="+J:"")}if(P.data&&A=="GET"){P.url+=(P.url.match(/\?/)?"&":"?")+P.data;P.data=null}Ajax.active++;var C=/^(?:\w+:)?\/\/([^\/?#]+)/;var D=false;var O=window.ActiveXObject?new ActiveXObject("Microsoft.XMLHTTP"):new XMLHttpRequest();if(P.username){O.open(A,P.url,P.async,P.username,P.password)}else{O.open(A,P.url,P.async)}try{if(P.data){O.setRequestHeader("Content-Type",P.contentType)}if(P.ifModified){O.setRequestHeader("If-Modified-Since",Ajax.lastModified[P.url]||"Thu, 01 Jan 1970 00:00:00 GMT")}O.setRequestHeader("X-Requested-With","XMLHttpRequest");O.setRequestHeader("Accept",P.dataType&&P.accepts[P.dataType]?P.accepts[P.dataType]+", */*":P.accepts._default)}catch(G){}if(P.beforeSend&&P.beforeSend(O,P)===false){Ajax.active--;O.abort();return false}var M=function(Q){if(!D&&O&&(O.readyState==4||Q=="timeout")){D=true;if(L){clearInterval(L);L=null}E=Q=="timeout"&&"timeout"||!Ajax.httpSuccess(O)&&"error"||P.ifModified&&Ajax.httpNotModified(O,P.url)&&"notmodified"||"success";if(E=="success"){try{F=Ajax.httpData(O,P.dataType,P.dataFilter)}catch(S){E="parsererror"}}if(E=="success"){var R;try{R=O.getResponseHeader("Last-Modified")}catch(S){}if(P.ifModified&&R){Ajax.lastModified[P.url]=R}N()}else{Ajax.handleError(P,O,E)}B();if(P.async){O=null}}};if(P.async){var L=setInterval(M,13);if(P.timeout>0){setTimeout(function(){if(O){O.abort();if(!D){M("timeout")}}},P.timeout)}}try{O.send(P.data)}catch(G){Ajax.handleError(P,O,null,G)}if(!P.async){M()}function N(){if(P.success){P.success(F,E)}}function B(){if(P.complete){P.complete(O,E)}--Ajax.active}return O},handleError:function(B,D,A,C){if(B.error){B.error(D,A,C)}},active:0,httpSuccess:function(B){try{return !B.status&&location.protocol=="file:"||(B.status>=200&&B.status<300)||B.status==304||B.status==1223||Ajax.browser.safari&&B.status==undefined}catch(A){}return false},httpNotModified:function(C,A){try{var D=C.getResponseHeader("Last-Modified");return C.status==304||D==this.lastModified[A]||Ajax.browser.safari&&C.status==undefined}catch(B){}return false},httpData:function(F,D,C){var B=F.getResponseHeader("content-type"),A=D=="xml"||!D&&B&&B.indexOf("xml")>=0,E=A?F.responseXML:F.responseText;if(A&&E.documentElement.tagName=="parsererror"){throw"parsererror"}if(C){E=C(E,D)}if(D=="json"){E=JSON.parse(E)}return E},param:function(A){var C=[];if(A.constructor==Array){A.forEach(function(E,D,F){C.push(encodeURIComponent(E.name)+"="+encodeURIComponent(E.value))})}else{for(var B in A){if(A[B]&&A[B].constructor==Array){A[B].forEach(function(E,D,F){C.push(encodeURIComponent(B)+"="+encodeURIComponent(E))})}else{C.push(encodeURIComponent(B)+"="+encodeURIComponent((typeof A[B]=="function"?A[B]():A[B])))}}}return C.join("&").replace(/%20/g,"+")}});window.Ajax=new Ajax();new function(_){var Fx=new base2.Package(this,{name:"Fx",version:"1.0",imports:"DOM",exports:"Style, Dimensions"});eval(this.imports);var Style=Base.extend({getStyle:function(styleProp){var styles=document.defaultView.getComputedStyle(this);return styles.getPropertyValue(styleProp)},getSize:function(){return{x:this.offsetWidth,y:this.offsetHeight}},});HTMLElement.implement(Style);var Dimensions=Base.extend({getSize:function(){if(_isBody(this)){DOM.bind(window);return window.getSize()}return{x:this.offsetWidth,y:this.offsetHeight}},getScroll:function(){position={x:this.scrollLeft,y:this.scrollTop};alert(styleNumber(this,"border-top-width"));return position},scrollTo:function(x,y){this.scrollLeft=x;this.scrollTop=y},getScrollSize:function(){return{x:this.scrollWidth,y:this.scrollHeight}},getScrolls:function(){var element=this,position={x:0,y:0};while(element&&!_isBody(element)){position.x+=element.scrollLeft;position.y+=element.scrollTop;element=element.parentNode}return position},getOffsetParent:function(){var element=this;if(_isBody(element)){return null}if(!detect("trident")){return element.offsetParent}while((element=element.parentNode)&&!_isBody(element)){if(_styleString(element,"position")!="static"){return element}}return null},"@gecko":{getOffsets:function(){var element=this,position={x:0,y:0};if(_isBody(this)){return position}while(element&&!_isBody(element)){position.x+=element.offsetLeft;position.y+=element.offsetTop;if(!_borderBox(element)){position.x+=_leftBorder(element);position.y+=_topBorder(element)}var parent=element.parentNode;if(parent&&_styleString(parent,"overflow")!="visible"){position.x+=_leftBorder(parent);position.y+=_topBorder(parent)}element=element.offsetParent}if(!_borderBox(this)){position.x-=_leftBorder(this);position.y-=_topBorder(this)}return position}},"@!gecko":{getOffsets:function(){var element=this,position={x:0,y:0};if(_isBody(this)){return position}while(element&&!_isBody(element)){position.x+=element.offsetLeft;position.y+=element.offsetTop;if(element!=this&&(detect("trident")||detect("webkit"))){position.x+=_leftBorder(element);position.y+=_topBorder(element)}if(detect("trident")){while(element&&!element.currentStyle.hasLayout){element=element.offsetParent}}element=element.offsetParent}return position}},getPosition:function(relative){if(_isBody(this)){return{x:0,y:0}}var offset=this.getOffsets(),scroll=this.getScrollSize();var position={x:offset.x-scroll.x,y:offset.y-scroll.y};var relativePosition=relative.getPosition();return{x:position.x-relativePosition.x,y:position.y-relativePosition.y}},getCoordinates:function(element){var position=this.getPosition(element),size=this.getSize();var obj={left:position.x,top:position.y,width:size.x,height:size.y};obj.right=obj.left+obj.width;obj.bottom=obj.top+obj.height;return obj},computePosition:function(obj){return{left:obj.x-_styleNumber(this,"margin-left"),top:obj.y-_styleNumber(this,"margin-top")}},position:function(obj){var pos=this.computePosition(obj);this.style.left=pos.left;this.style.top=pos.top;return this},innerHeight:function(){return this.offsetHeight-_styleNumber(this,"padding-top")-_styleNumber(this,"padding-bottom")},outerHeight:function(){return this.offsetHeight+_styleNumber(this,"border-top-width")+_styleNumber(this,"border-bottom-width")},innerWidth:function(){return this.offsetWidth-_styleNumber(this,"padding-left")-_styleNumber(this,"padding-right")},outerWidth:function(){return this.offsetWidth+_styleNumber(this,"border-left-width")+_styleNumber(this,"border-right-width")}});HTMLElement.implement(Dimensions);function _styleString(element,style){var styles=document.defaultView.getComputedStyle(element);return styles.getPropertyValue(style)}function _styleNumber(element,style){return parseInt(_styleString(element,style))||0}function _borderBox(element){return _styleString(element,"-moz-box-sizing")=="border-box"}function _topBorder(element){return _styleNumber(element,"border-top-width")}function _leftBorder(element){return _styleNumber(element,"border-left-width")}function _isBody(element){return(/^(?:body|html)$/i).test(element.tagName)}eval(this.exports)};var Resizeable=base2.Base.extend({constructor:function(C){var B=this;var A=document.createElement("div");A.className="grippie";A.style.cursor="row-resize";base2.DOM.bind(A);document.querySelectorAll(C).forEach(function(D){D.parentNode.appendChild(A);A.addEventListener("mousedown",function(E){E.preventDefault();E.stopPropagation();B.handleResize(E,D);return false},false)})},handleResize:function(E,B){var F=B;var G={x:E.screenX,y:E.screenY};var C={width:F.offsetWidth,height:F.offsetHeight};var D=function(J){J.preventDefault();var L=J.screenY-G.y;if(L){var H=C.height+L;F.style.height=H+"px";C.height=H;G.y=J.screenY}return false};var A=function(H){document.removeEventListener("mousemove",D,false);this.removeEventListener("mouseup",arguments.callee,false);return false};document.addEventListener("mousemove",D,false);document.addEventListener("mouseup",A,false)}});var Friendpaste=base2.Base.extend({snippet:null,snippet_edit:null,constructor:function(){var A=this;var C=document.querySelector(".e");var B=document.querySelectorAll(".cancel");var D=document.querySelector(".show-history");if(C){C.addEventListener("click",this.do_edit.bindAsEventListener(this),false)}if(B){B.forEach(function(E){E.addEventListener("click",A.do_cancel.bindAsEventListener(A),false)})}if(D){D.addEventListener("click",this.do_history.bindAsEventListener(this),false)}this.snippet=document.querySelector("#snippet");this.snippet_edit=document.querySelector("#snippet_edit");this.revisions=document.querySelector("#revisions");if(!base2.detect("webkit")){new Resizeable("#paste_snippet")}},do_edit:function(A){A.preventDefault();this.snippet.classList.add("hidden");this.snippet_edit.classList.remove("hidden");return false},do_cancel:function(A){A.preventDefault();if(!this.snippet_edit.classList.has("hidden")){this.snippet_edit.classList.add("hidden")}if(!this.revisions.classList.has("hidden")){this.revisions.classList.add("hidden")}this.snippet.classList.remove("hidden");return false},toggleLineNumber:function(A){document.querySelector("table.sourcetable tbody").classList.toggle("hidenos")},do_history:function(B){B.preventDefault();url="/"+snippet_id+"/revisions";if(typeof (revid)!="undefined"){url=url+"?rev="+revid}var A=this;Ajax.get(url,null,function(E,C){document.querySelector(".revisionstable tbody.content").innerHTML="";var D="";E.forEach(function(G,F){D+='<tr><td><time title="GMT" datetime="'+G.updated+'">'+G.updated+'</time></td><td class="rev">rev. <a href=\'/'+G.parent+"?rev="+G.revid+"'>"+G.revid+'</a></td><td class="changeset"><a href=\'/'+G.parent+"/changeset?rev="+G.revid+"'>Diff</a></td><td class=\"view-rev\"><a href='/"+G.parent+"?rev="+G.revid+"'>View</a></td></tr>"});document.querySelector(".revisionstable tbody.content").innerHTML=D;A.snippet.classList.add("hidden");A.revisions.classList.remove("hidden")},"json");return false},});var Diff=base2.Base.extend({constructor:function(){this.sourcetable=document.querySelector(".sourcetable");this.difftabular=document.querySelector(".difftabular");this.switcher=document.querySelector("#switch");this.sourcetable.classList.add("hidden");this.switcher.innerHTML='<span class="stab active">Tabular</span<span class="suni">Unified</span';this.stab=this.switcher.querySelector(".stab");this.suni=this.switcher.querySelector(".suni");var A=this;this.stab.addEventListener("click",function(B){B.preventDefault();A.setTabular(B);return false},false);this.suni.addEventListener("click",function(B){B.preventDefault();A.setUnified();return false},false)},setTabular:function(A){if(!this.sourcetable.classList.has("hidden")){this.sourcetable.classList.add("hidden")}this.difftabular.classList.remove("hidden");this.stab.classList.add("hidden");this.suni.classList.remove("active")},setUnified:function(A){if(!this.difftabular.classList.has("hidden")){this.difftabular.classList.add("hidden")}this.sourcetable.classList.remove("hidden");this.suni.classList.add("hidden");this.stab.classList.remove("active")}});

static/js/jquery-1.2.6.js

-(function(){
-/*
- * jQuery 1.2.6 - New Wave Javascript
- *
- * Copyright (c) 2008 John Resig (jquery.com)
- * Dual licensed under the MIT (MIT-LICENSE.txt)
- * and GPL (GPL-LICENSE.txt) licenses.
- *
- * $Date: 2008-05-24 14:22:17 -0400 (Sat, 24 May 2008) $
- * $Rev: 5685 $
- */
-
-// Map over jQuery in case of overwrite
-var _jQuery = window.jQuery,
-// Map over the $ in case of overwrite
-	_$ = window.$;
-
-var jQuery = window.jQuery = window.$ = function( selector, context ) {
-	// The jQuery object is actually just the init constructor 'enhanced'
-	return new jQuery.fn.init( selector, context );
-};
-
-// A simple way to check for HTML strings or ID strings
-// (both of which we optimize for)
-var quickExpr = /^[^<]*(<(.|\s)+>)[^>]*$|^#(\w+)$/,
-
-// Is it a simple selector
-	isSimple = /^.[^:#\[\.]*$/,
-
-// Will speed up references to undefined, and allows munging its name.
-	undefined;
-
-jQuery.fn = jQuery.prototype = {
-	init: function( selector, context ) {
-		// Make sure that a selection was provided
-		selector = selector || document;
-
-		// Handle $(DOMElement)
-		if ( selector.nodeType ) {
-			this[0] = selector;
-			this.length = 1;
-			return this;
-		}
-		// Handle HTML strings
-		if ( typeof selector == "string" ) {
-			// Are we dealing with HTML string or an ID?
-			var match = quickExpr.exec( selector );
-
-			// Verify a match, and that no context was specified for #id
-			if ( match && (match[1] || !context) ) {
-
-				// HANDLE: $(html) -> $(array)
-				if ( match[1] )
-					selector = jQuery.clean( [ match[1] ], context );
-
-				// HANDLE: $("#id")
-				else {
-					var elem = document.getElementById( match[3] );
-
-					// Make sure an element was located
-					if ( elem ){
-						// Handle the case where IE and Opera return items
-						// by name instead of ID
-						if ( elem.id != match[3] )
-							return jQuery().find( selector );
-
-						// Otherwise, we inject the element directly into the jQuery object
-						return jQuery( elem );
-					}
-					selector = [];
-				}
-
-			// HANDLE: $(expr, [context])
-			// (which is just equivalent to: $(content).find(expr)
-			} else
-				return jQuery( context ).find( selector );
-
-		// HANDLE: $(function)
-		// Shortcut for document ready
-		} else if ( jQuery.isFunction( selector ) )
-			return jQuery( document )[ jQuery.fn.ready ? "ready" : "load" ]( selector );
-
-		return this.setArray(jQuery.makeArray(selector));
-	},
-
-	// The current version of jQuery being used
-	jquery: "1.2.6",
-
-	// The number of elements contained in the matched element set
-	size: function() {
-		return this.length;
-	},
-
-	// The number of elements contained in the matched element set
-	length: 0,
-
-	// Get the Nth element in the matched element set OR
-	// Get the whole matched element set as a clean array
-	get: function( num ) {
-		return num == undefined ?
-
-			// Return a 'clean' array
-			jQuery.makeArray( this ) :
-
-			// Return just the object
-			this[ num ];
-	},
-
-	// Take an array of elements and push it onto the stack
-	// (returning the new matched element set)
-	pushStack: function( elems ) {
-		// Build a new jQuery matched element set
-		var ret = jQuery( elems );
-
-		// Add the old object onto the stack (as a reference)
-		ret.prevObject = this;
-
-		// Return the newly-formed element set
-		return ret;
-	},
-
-	// Force the current matched set of elements to become
-	// the specified array of elements (destroying the stack in the process)
-	// You should use pushStack() in order to do this, but maintain the stack
-	setArray: function( elems ) {
-		// Resetting the length to 0, then using the native Array push
-		// is a super-fast way to populate an object with array-like properties
-		this.length = 0;
-		Array.prototype.push.apply( this, elems );
-
-		return this;
-	},
-
-	// Execute a callback for every element in the matched set.
-	// (You can seed the arguments with an array of args, but this is
-	// only used internally.)
-	each: function( callback, args ) {
-		return jQuery.each( this, callback, args );
-	},
-
-	// Determine the position of an element within
-	// the matched set of elements
-	index: function( elem ) {
-		var ret = -1;
-
-		// Locate the position of the desired element
-		return jQuery.inArray(
-			// If it receives a jQuery object, the first element is used
-			elem && elem.jquery ? elem[0] : elem
-		, this );
-	},
-
-	attr: function( name, value, type ) {
-		var options = name;
-
-		// Look for the case where we're accessing a style value
-		if ( name.constructor == String )
-			if ( value === undefined )
-				return this[0] && jQuery[ type || "attr" ]( this[0], name );
-
-			else {
-				options = {};
-				options[ name ] = value;
-			}
-
-		// Check to see if we're setting style values
-		return this.each(function(i){
-			// Set all the styles
-			for ( name in options )
-				jQuery.attr(
-					type ?
-						this.style :
-						this,
-					name, jQuery.prop( this, options[ name ], type, i, name )
-				);
-		});
-	},
-
-	css: function( key, value ) {
-		// ignore negative width and height values
-		if ( (key == 'width' || key == 'height') && parseFloat(value) < 0 )
-			value = undefined;
-		return this.attr( key, value, "curCSS" );
-	},
-
-	text: function( text ) {
-		if ( typeof text != "object" && text != null )
-			return this.empty().append( (this[0] && this[0].ownerDocument || document).createTextNode( text ) );
-
-		var ret = "";
-
-		jQuery.each( text || this, function(){
-			jQuery.each( this.childNodes, function(){
-				if ( this.nodeType != 8 )
-					ret += this.nodeType != 1 ?
-						this.nodeValue :
-						jQuery.fn.text( [ this ] );
-			});
-		});
-
-		return ret;
-	},
-
-	wrapAll: function( html ) {
-		if ( this[0] )
-			// The elements to wrap the target around
-			jQuery( html, this[0].ownerDocument )
-				.clone()
-				.insertBefore( this[0] )
-				.map(function(){
-					var elem = this;
-
-					while ( elem.firstChild )
-						elem = elem.firstChild;
-
-					return elem;
-				})
-				.append(this);
-
-		return this;
-	},
-
-	wrapInner: function( html ) {
-		return this.each(function(){
-			jQuery( this ).contents().wrapAll( html );
-		});
-	},
-
-	wrap: function( html ) {
-		return this.each(function(){
-			jQuery( this ).wrapAll( html );
-		});
-	},
-
-	append: function() {
-		return this.domManip(arguments, true, false, function(elem){
-			if (this.nodeType == 1)
-				this.appendChild( elem );
-		});
-	},
-
-	prepend: function() {
-		return this.domManip(arguments, true, true, function(elem){
-			if (this.nodeType == 1)
-				this.insertBefore( elem, this.firstChild );
-		});
-	},
-
-	before: function() {
-		return this.domManip(arguments, false, false, function(elem){
-			this.parentNode.insertBefore( elem, this );
-		});
-	},
-
-	after: function() {
-		return this.domManip(arguments, false, true, function(elem){
-			this.parentNode.insertBefore( elem, this.nextSibling );
-		});
-	},
-
-	end: function() {
-		return this.prevObject || jQuery( [] );
-	},
-
-	find: function( selector ) {
-		var elems = jQuery.map(this, function(elem){
-			return jQuery.find( selector, elem );
-		});
-
-		return this.pushStack( /[^+>] [^+>]/.test( selector ) || selector.indexOf("..") > -1 ?
-			jQuery.unique( elems ) :
-			elems );
-	},
-
-	clone: function( events ) {
-		// Do the clone
-		var ret = this.map(function(){
-			if ( jQuery.browser.msie && !jQuery.isXMLDoc(this) ) {
-				// IE copies events bound via attachEvent when
-				// using cloneNode. Calling detachEvent on the
-				// clone will also remove the events from the orignal
-				// In order to get around this, we use innerHTML.
-				// Unfortunately, this means some modifications to
-				// attributes in IE that are actually only stored
-				// as properties will not be copied (such as the
-				// the name attribute on an input).
-				var clone = this.cloneNode(true),
-					container = document.createElement("div");
-				container.appendChild(clone);
-				return jQuery.clean([container.innerHTML])[0];
-			} else
-				return this.cloneNode(true);
-		});
-
-		// Need to set the expando to null on the cloned set if it exists
-		// removeData doesn't work here, IE removes it from the original as well
-		// this is primarily for IE but the data expando shouldn't be copied over in any browser
-		var clone = ret.find("*").andSelf().each(function(){
-			if ( this[ expando ] != undefined )
-				this[ expando ] = null;
-		});
-
-		// Copy the events from the original to the clone
-		if ( events === true )
-			this.find("*").andSelf().each(function(i){
-				if (this.nodeType == 3)
-					return;
-				var events = jQuery.data( this, "events" );
-
-				for ( var type in events )
-					for ( var handler in events[ type ] )
-						jQuery.event.add( clone[ i ], type, events[ type ][ handler ], events[ type ][ handler ].data );
-			});
-
-		// Return the cloned set
-		return ret;
-	},
-
-	filter: function( selector ) {
-		return this.pushStack(
-			jQuery.isFunction( selector ) &&
-			jQuery.grep(this, function(elem, i){
-				return selector.call( elem, i );
-			}) ||
-
-			jQuery.multiFilter( selector, this ) );
-	},
-
-	not: function( selector ) {
-		if ( selector.constructor == String )
-			// test special case where just one selector is passed in
-			if ( isSimple.test( selector ) )
-				return this.pushStack( jQuery.multiFilter( selector, this, true ) );
-			else
-				selector = jQuery.multiFilter( selector, this );
-
-		var isArrayLike = selector.length && selector[selector.length - 1] !== undefined && !selector.nodeType;
-		return this.filter(function() {
-			return isArrayLike ? jQuery.inArray( this, selector ) < 0 : this != selector;
-		});
-	},
-
-	add: function( selector ) {
-		return this.pushStack( jQuery.unique( jQuery.merge(
-			this.get(),
-			typeof selector == 'string' ?
-				jQuery( selector ) :
-				jQuery.makeArray( selector )
-		)));
-	},
-
-	is: function( selector ) {
-		return !!selector && jQuery.multiFilter( selector, this ).length > 0;
-	},
-
-	hasClass: function( selector ) {
-		return this.is( "." + selector );
-	},
-
-	val: function( value ) {
-		if ( value == undefined ) {
-
-			if ( this.length ) {
-				var elem = this[0];
-
-				// We need to handle select boxes special
-				if ( jQuery.nodeName( elem, "select" ) ) {
-					var index = elem.selectedIndex,
-						values = [],
-						options = elem.options,
-						one = elem.type == "select-one";
-
-					// Nothing was selected
-					if ( index < 0 )
-						return null;
-
-					// Loop through all the selected options
-					for ( var i = one ? index : 0, max = one ? index + 1 : options.length; i < max; i++ ) {
-						var option = options[ i ];
-
-						if ( option.selected ) {
-							// Get the specifc value for the option
-							value = jQuery.browser.msie && !option.attributes.value.specified ? option.text : option.value;
-
-							// We don't need an array for one selects
-							if ( one )
-								return value;
-
-							// Multi-Selects return an array
-							values.push( value );
-						}
-					}
-
-					return values;
-
-				// Everything else, we just grab the value
-				} else
-					return (this[0].value || "").replace(/\r/g, "");
-
-			}
-
-			return undefined;
-		}
-
-		if( value.constructor == Number )
-			value += '';
-
-		return this.each(function(){
-			if ( this.nodeType != 1 )
-				return;
-
-			if ( value.constructor == Array && /radio|checkbox/.test( this.type ) )
-				this.checked = (jQuery.inArray(this.value, value) >= 0 ||
-					jQuery.inArray(this.name, value) >= 0);
-
-			else if ( jQuery.nodeName( this, "select" ) ) {
-				var values = jQuery.makeArray(value);
-
-				jQuery( "option", this ).each(function(){
-					this.selected = (jQuery.inArray( this.value, values ) >= 0 ||
-						jQuery.inArray( this.text, values ) >= 0);
-				});
-
-				if ( !values.length )
-					this.selectedIndex = -1;
-
-			} else
-				this.value = value;
-		});
-	},
-
-	html: function( value ) {
-		return value == undefined ?
-			(this[0] ?
-				this[0].innerHTML :
-				null) :
-			this.empty().append( value );
-	},
-
-	replaceWith: function( value ) {
-		return this.after( value ).remove();
-	},
-
-	eq: function( i ) {
-		return this.slice( i, i + 1 );
-	},
-
-	slice: function() {
-		return this.pushStack( Array.prototype.slice.apply( this, arguments ) );
-	},
-
-	map: function( callback ) {
-		return this.pushStack( jQuery.map(this, function(elem, i){
-			return callback.call( elem, i, elem );
-		}));
-	},
-
-	andSelf: function() {
-		return this.add( this.prevObject );
-	},
-
-	data: function( key, value ){
-		var parts = key.split(".");
-		parts[1] = parts[1] ? "." + parts[1] : "";
-
-		if ( value === undefined ) {
-			var data = this.triggerHandler("getData" + parts[1] + "!", [parts[0]]);
-
-			if ( data === undefined && this.length )
-				data = jQuery.data( this[0], key );
-
-			return data === undefined && parts[1] ?
-				this.data( parts[0] ) :
-				data;
-		} else
-			return this.trigger("setData" + parts[1] + "!", [parts[0], value]).each(function(){
-				jQuery.data( this, key, value );
-			});
-	},
-
-	removeData: function( key ){
-		return this.each(function(){
-			jQuery.removeData( this, key );
-		});
-	},
-
-	domManip: function( args, table, reverse, callback ) {
-		var clone = this.length > 1, elems;
-
-		return this.each(function(){
-			if ( !elems ) {
-				elems = jQuery.clean( args, this.ownerDocument );
-
-				if ( reverse )
-					elems.reverse();
-			}
-
-			var obj = this;
-
-			if ( table && jQuery.nodeName( this, "table" ) && jQuery.nodeName( elems[0], "tr" ) )
-				obj = this.getElementsByTagName("tbody")[0] || this.appendChild( this.ownerDocument.createElement("tbody") );
-
-			var scripts = jQuery( [] );
-
-			jQuery.each(elems, function(){
-				var elem = clone ?
-					jQuery( this ).clone( true )[0] :
-					this;
-
-				// execute all scripts after the elements have been injected
-				if ( jQuery.nodeName( elem, "script" ) )
-					scripts = scripts.add( elem );
-				else {
-					// Remove any inner scripts for later evaluation
-					if ( elem.nodeType == 1 )
-						scripts = scripts.add( jQuery( "script", elem ).remove() );
-
-					// Inject the elements into the document
-					callback.call( obj, elem );
-				}
-			});
-
-			scripts.each( evalScript );
-		});
-	}
-};
-
-// Give the init function the jQuery prototype for later instantiation
-jQuery.fn.init.prototype = jQuery.fn;
-
-function evalScript( i, elem ) {
-	if ( elem.src )
-		jQuery.ajax({
-			url: elem.src,
-			async: false,
-			dataType: "script"
-		});
-
-	else
-		jQuery.globalEval( elem.text || elem.textContent || elem.innerHTML || "" );
-
-	if ( elem.parentNode )
-		elem.parentNode.removeChild( elem );
-}
-
-function now(){
-	return +new Date;
-}
-
-jQuery.extend = jQuery.fn.extend = function() {
-	// copy reference to target object
-	var target = arguments[0] || {}, i = 1, length = arguments.length, deep = false, options;
-
-	// Handle a deep copy situation
-	if ( target.constructor == Boolean ) {
-		deep = target;
-		target = arguments[1] || {};
-		// skip the boolean and the target
-		i = 2;
-	}
-
-	// Handle case when target is a string or something (possible in deep copy)
-	if ( typeof target != "object" && typeof target != "function" )
-		target = {};
-
-	// extend jQuery itself if only one argument is passed
-	if ( length == i ) {
-		target = this;
-		--i;
-	}
-
-	for ( ; i < length; i++ )
-		// Only deal with non-null/undefined values
-		if ( (options = arguments[ i ]) != null )
-			// Extend the base object
-			for ( var name in options ) {
-				var src = target[ name ], copy = options[ name ];
-
-				// Prevent never-ending loop
-				if ( target === copy )
-					continue;
-
-				// Recurse if we're merging object values
-				if ( deep && copy && typeof copy == "object" && !copy.nodeType )
-					target[ name ] = jQuery.extend( deep, 
-						// Never move original objects, clone them
-						src || ( copy.length != null ? [ ] : { } )
-					, copy );
-
-				// Don't bring in undefined values
-				else if ( copy !== undefined )
-					target[ name ] = copy;
-
-			}
-
-	// Return the modified object
-	return target;
-};
-
-var expando = "jQuery" + now(), uuid = 0, windowData = {},
-	// exclude the following css properties to add px
-	exclude = /z-?index|font-?weight|opacity|zoom|line-?height/i,
-	// cache defaultView
-	defaultView = document.defaultView || {};
-
-jQuery.extend({
-	noConflict: function( deep ) {
-		window.$ = _$;
-
-		if ( deep )
-			window.jQuery = _jQuery;
-
-		return jQuery;
-	},
-
-	// See test/unit/core.js for details concerning this function.
-	isFunction: function( fn ) {
-		return !!fn && typeof fn != "string" && !fn.nodeName &&
-			fn.constructor != Array && /^[\s[]?function/.test( fn + "" );
-	},
-
-	// check if an element is in a (or is an) XML document
-	isXMLDoc: function( elem ) {
-		return elem.documentElement && !elem.body ||
-			elem.tagName && elem.ownerDocument && !elem.ownerDocument.body;
-	},
-
-	// Evalulates a script in a global context
-	globalEval: function( data ) {
-		data = jQuery.trim( data );
-
-		if ( data ) {
-			// Inspired by code by Andrea Giammarchi
-			// http://webreflection.blogspot.com/2007/08/global-scope-evaluation-and-dom.html
-			var head = document.getElementsByTagName("head")[0] || document.documentElement,
-				script = document.createElement("script");
-
-			script.type = "text/javascript";
-			if ( jQuery.browser.msie )
-				script.text = data;
-			else
-				script.appendChild( document.createTextNode( data ) );
-
-			// Use insertBefore instead of appendChild  to circumvent an IE6 bug.
-			// This arises when a base node is used (#2709).
-			head.insertBefore( script, head.firstChild );
-			head.removeChild( script );
-		}
-	},
-
-	nodeName: function( elem, name ) {
-		return elem.nodeName && elem.nodeName.toUpperCase() == name.toUpperCase();
-	},
-
-	cache: {},
-
-	data: function( elem, name, data ) {
-		elem = elem == window ?
-			windowData :
-			elem;
-
-		var id = elem[ expando ];
-
-		// Compute a unique ID for the element
-		if ( !id )
-			id = elem[ expando ] = ++uuid;
-
-		// Only generate the data cache if we're
-		// trying to access or manipulate it
-		if ( name && !jQuery.cache[ id ] )
-			jQuery.cache[ id ] = {};
-
-		// Prevent overriding the named cache with undefined values
-		if ( data !== undefined )
-			jQuery.cache[ id ][ name ] = data;
-
-		// Return the named cache data, or the ID for the element
-		return name ?
-			jQuery.cache[ id ][ name ] :
-			id;
-	},
-
-	removeData: function( elem, name ) {
-		elem = elem == window ?
-			windowData :
-			elem;
-
-		var id = elem[ expando ];
-
-		// If we want to remove a specific section of the element's data
-		if ( name ) {
-			if ( jQuery.cache[ id ] ) {
-				// Remove the section of cache data
-				delete jQuery.cache[ id ][ name ];
-
-				// If we've removed all the data, remove the element's cache
-				name = "";
-
-				for ( name in jQuery.cache[ id ] )
-					break;
-
-				if ( !name )
-					jQuery.removeData( elem );
-			}
-
-		// Otherwise, we want to remove all of the element's data
-		} else {
-			// Clean up the element expando
-			try {
-				delete elem[ expando ];
-			} catch(e){
-				// IE has trouble directly removing the expando
-				// but it's ok with using removeAttribute
-				if ( elem.removeAttribute )
-					elem.removeAttribute( expando );
-			}
-
-			// Completely remove the data cache
-			delete jQuery.cache[ id ];
-		}
-	},
-
-	// args is for internal usage only
-	each: function( object, callback, args ) {
-		var name, i = 0, length = object.length;
-
-		if ( args ) {
-			if ( length == undefined ) {
-				for ( name in object )
-					if ( callback.apply( object[ name ], args ) === false )
-						break;
-			} else
-				for ( ; i < length; )
-					if ( callback.apply( object[ i++ ], args ) === false )
-						break;
-
-		// A special, fast, case for the most common use of each
-		} else {
-			if ( length == undefined ) {
-				for ( name in object )
-					if ( callback.call( object[ name ], name, object[ name ] ) === false )
-						break;
-			} else
-				for ( var value = object[0];
-					i < length && callback.call( value, i, value ) !== false; value = object[++i] ){}
-		}
-
-		return object;
-	},
-
-	prop: function( elem, value, type, i, name ) {
-		// Handle executable functions
-		if ( jQuery.isFunction( value ) )
-			value = value.call( elem, i );
-
-		// Handle passing in a number to a CSS property
-		return value && value.constructor == Number && type == "curCSS" && !exclude.test( name ) ?
-			value + "px" :
-			value;
-	},
-
-	className: {
-		// internal only, use addClass("class")
-		add: function( elem, classNames ) {
-			jQuery.each((classNames || "").split(/\s+/), function(i, className){
-				if ( elem.nodeType == 1 && !jQuery.className.has( elem.className, className ) )
-					elem.className += (elem.className ? " " : "") + className;
-			});
-		},
-
-		// internal only, use removeClass("class")
-		remove: function( elem, classNames ) {
-			if (elem.nodeType == 1)
-				elem.className = classNames != undefined ?
-					jQuery.grep(elem.className.split(/\s+/), function(className){
-						return !jQuery.className.has( classNames, className );
-					}).join(" ") :
-					"";
-		},
-
-		// internal only, use hasClass("class")
-		has: function( elem, className ) {
-			return jQuery.inArray( className, (elem.className || elem).toString().split(/\s+/) ) > -1;
-		}
-	},
-
-	// A method for quickly swapping in/out CSS properties to get correct calculations
-	swap: function( elem, options, callback ) {
-		var old = {};
-		// Remember the old values, and insert the new ones
-		for ( var name in options ) {
-			old[ name ] = elem.style[ name ];
-			elem.style[ name ] = options[ name ];
-		}
-
-		callback.call( elem );
-
-		// Revert the old values
-		for ( var name in options )
-			elem.style[ name ] = old[ name ];
-	},
-
-	css: function( elem, name, force ) {
-		if ( name == "width" || name == "height" ) {
-			var val, props = { position: "absolute", visibility: "hidden", display:"block" }, which = name == "width" ? [ "Left", "Right" ] : [ "Top", "Bottom" ];
-
-			function getWH() {
-				val = name == "width" ? elem.offsetWidth : elem.offsetHeight;
-				var padding = 0, border = 0;
-				jQuery.each( which, function() {
-					padding += parseFloat(jQuery.curCSS( elem, "padding" + this, true)) || 0;
-					border += parseFloat(jQuery.curCSS( elem, "border" + this + "Width", true)) || 0;
-				});
-				val -= Math.round(padding + border);
-			}
-
-			if ( jQuery(elem).is(":visible") )
-				getWH();
-			else
-				jQuery.swap( elem, props, getWH );
-
-			return Math.max(0, val);
-		}
-
-		return jQuery.curCSS( elem, name, force );
-	},
-
-	curCSS: function( elem, name, force ) {
-		var ret, style = elem.style;
-
-		// A helper method for determining if an element's values are broken
-		function color( elem ) {
-			if ( !jQuery.browser.safari )
-				return false;
-
-			// defaultView is cached
-			var ret = defaultView.getComputedStyle( elem, null );
-			return !ret || ret.getPropertyValue("color") == "";
-		}
-
-		// We need to handle opacity special in IE
-		if ( name == "opacity" && jQuery.browser.msie ) {
-			ret = jQuery.attr( style, "opacity" );
-
-			return ret == "" ?
-				"1" :
-				ret;
-		}
-		// Opera sometimes will give the wrong display answer, this fixes it, see #2037
-		if ( jQuery.browser.opera && name == "display" ) {
-			var save = style.outline;
-			style.outline = "0 solid black";
-			style.outline = save;
-		}
-
-		// Make sure we're using the right name for getting the float value
-		if ( name.match( /float/i ) )
-			name = styleFloat;
-
-		if ( !force && style && style[ name ] )
-			ret = style[ name ];
-
-		else if ( defaultView.getComputedStyle ) {
-
-			// Only "float" is needed here
-			if ( name.match( /float/i ) )
-				name = "float";
-
-			name = name.replace( /([A-Z])/g, "-$1" ).toLowerCase();
-
-			var computedStyle = defaultView.getComputedStyle( elem, null );
-
-			if ( computedStyle && !color( elem ) )
-				ret = computedStyle.getPropertyValue( name );
-
-			// If the element isn't reporting its values properly in Safari
-			// then some display: none elements are involved
-			else {
-				var swap = [], stack = [], a = elem, i = 0;
-
-				// Locate all of the parent display: none elements
-				for ( ; a && color(a); a = a.parentNode )
-					stack.unshift(a);
-
-				// Go through and make them visible, but in reverse
-				// (It would be better if we knew the exact display type that they had)
-				for ( ; i < stack.length; i++ )
-					if ( color( stack[ i ] ) ) {
-						swap[ i ] = stack[ i ].style.display;
-						stack[ i ].style.display = "block";
-					}
-
-				// Since we flip the display style, we have to handle that
-				// one special, otherwise get the value
-				ret = name == "display" && swap[ stack.length - 1 ] != null ?
-					"none" :
-					( computedStyle && computedStyle.getPropertyValue( name ) ) || "";
-
-				// Finally, revert the display styles back
-				for ( i = 0; i < swap.length; i++ )
-					if ( swap[ i ] != null )
-						stack[ i ].style.display = swap[ i ];
-			}
-
-			// We should always get a number back from opacity
-			if ( name == "opacity" && ret == "" )
-				ret = "1";
-
-		} else if ( elem.currentStyle ) {
-			var camelCase = name.replace(/\-(\w)/g, function(all, letter){
-				return letter.toUpperCase();
-			});
-
-			ret = elem.currentStyle[ name ] || elem.currentStyle[ camelCase ];
-
-			// From the awesome hack by Dean Edwards
-			// http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291
-
-			// If we're not dealing with a regular pixel number
-			// but a number that has a weird ending, we need to convert it to pixels
-			if ( !/^\d+(px)?$/i.test( ret ) && /^\d/.test( ret ) ) {
-				// Remember the original values
-				var left = style.left, rsLeft = elem.runtimeStyle.left;
-
-				// Put in the new values to get a computed value out
-				elem.runtimeStyle.left = elem.currentStyle.left;
-				style.left = ret || 0;
-				ret = style.pixelLeft + "px";
-
-				// Revert the changed values
-				style.left = left;
-				elem.runtimeStyle.left = rsLeft;
-			}
-		}
-
-		return ret;
-	},
-
-	clean: function( elems, context ) {
-		var ret = [];
-		context = context || document;
-		// !context.createElement fails in IE with an error but returns typeof 'object'
-		if (typeof context.createElement == 'undefined')
-			context = context.ownerDocument || context[0] && context[0].ownerDocument || document;
-
-		jQuery.each(elems, function(i, elem){
-			if ( !elem )
-				return;
-
-			if ( elem.constructor == Number )
-				elem += '';
-
-			// Convert html string into DOM nodes
-			if ( typeof elem == "string" ) {
-				// Fix "XHTML"-style tags in all browsers
-				elem = elem.replace(/(<(\w+)[^>]*?)\/>/g, function(all, front, tag){
-					return tag.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i) ?
-						all :
-						front + "></" + tag + ">";
-				});
-
-				// Trim whitespace, otherwise indexOf won't work as expected
-				var tags = jQuery.trim( elem ).toLowerCase(), div = context.createElement("div");
-
-				var wrap =
-					// option or optgroup
-					!tags.indexOf("<opt") &&
-					[ 1, "<select multiple='multiple'>", "</select>" ] ||
-
-					!tags.indexOf("<leg") &&
-					[ 1, "<fieldset>", "</fieldset>" ] ||
-
-					tags.match(/^<(thead|tbody|tfoot|colg|cap)/) &&
-					[ 1, "<table>", "</table>" ] ||
-
-					!tags.indexOf("<tr") &&
-					[ 2, "<table><tbody>", "</tbody></table>" ] ||
-
-				 	// <thead> matched above
-					(!tags.indexOf("<td") || !tags.indexOf("<th")) &&
-					[ 3, "<table><tbody><tr>", "</tr></tbody></table>" ] ||
-
-					!tags.indexOf("<col") &&
-					[ 2, "<table><tbody></tbody><colgroup>", "</colgroup></table>" ] ||
-
-					// IE can't serialize <link> and <script> tags normally
-					jQuery.browser.msie &&
-					[ 1, "div<div>", "</div>" ] ||
-
-					[ 0, "", "" ];
-
-				// Go to html and back, then peel off extra wrappers
-				div.innerHTML = wrap[1] + elem + wrap[2];
-
-				// Move to the right depth
-				while ( wrap[0]-- )
-					div = div.lastChild;
-
-				// Remove IE's autoinserted <tbody> from table fragments
-				if ( jQuery.browser.msie ) {
-
-					// String was a <table>, *may* have spurious <tbody>
-					var tbody = !tags.indexOf("<table") && tags.indexOf("<tbody") < 0 ?
-						div.firstChild && div.firstChild.childNodes :
-
-						// String was a bare <thead> or <tfoot>
-						wrap[1] == "<table>" && tags.indexOf("<tbody") < 0 ?
-							div.childNodes :
-							[];
-
-					for ( var j = tbody.length - 1; j >= 0 ; --j )
-						if ( jQuery.nodeName( tbody[ j ], "tbody" ) && !tbody[ j ].childNodes.length )
-							tbody[ j ].parentNode.removeChild( tbody[ j ] );
-
-					// IE completely kills leading whitespace when innerHTML is used
-					if ( /^\s/.test( elem ) )
-						div.insertBefore( context.createTextNode( elem.match(/^\s*/)[0] ), div.firstChild );
-
-				}
-
-				elem = jQuery.makeArray( div.childNodes );
-			}
-
-			if ( elem.length === 0 && (!jQuery.nodeName( elem, "form" ) && !jQuery.nodeName( elem, "select" )) )
-				return;
-
-			if ( elem[0] == undefined || jQuery.nodeName( elem, "form" ) || elem.options )
-				ret.push( elem );
-
-			else
-				ret = jQuery.merge( ret, elem );
-
-		});
-
-		return ret;
-	},
-
-	attr: function( elem, name, value ) {
-		// don't set attributes on text and comment nodes
-		if (!elem || elem.nodeType == 3 || elem.nodeType == 8)
-			return undefined;
-
-		var notxml = !jQuery.isXMLDoc( elem ),
-			// Whether we are setting (or getting)
-			set = value !== undefined,
-			msie = jQuery.browser.msie;
-
-		// Try to normalize/fix the name
-		name = notxml && jQuery.props[ name ] || name;
-
-		// Only do all the following if this is a node (faster for style)
-		// IE elem.getAttribute passes even for style
-		if ( elem.tagName ) {
-
-			// These attributes require special treatment
-			var special = /href|src|style/.test( name );
-
-			// Safari mis-reports the default selected property of a hidden option
-			// Accessing the parent's selectedIndex property fixes it
-			if ( name == "selected" && jQuery.browser.safari )
-				elem.parentNode.selectedIndex;
-
-			// If applicable, access the attribute via the DOM 0 way
-			if ( name in elem && notxml && !special ) {
-				if ( set ){
-					// We can't allow the type property to be changed (since it causes problems in IE)
-					if ( name == "type" && jQuery.nodeName( elem, "input" ) && elem.parentNode )
-						throw "type property can't be changed";
-
-					elem[ name ] = value;
-				}
-
-				// browsers index elements by id/name on forms, give priority to attributes.
-				if( jQuery.nodeName( elem, "form" ) && elem.getAttributeNode(name) )
-					return elem.getAttributeNode( name ).nodeValue;
-
-				return elem[ name ];
-			}
-
-			if ( msie && notxml &&  name == "style" )
-				return jQuery.attr( elem.style, "cssText", value );
-
-			if ( set )
-				// convert the value to a string (all browsers do this but IE) see #1070
-				elem.setAttribute( name, "" + value );
-
-			var attr = msie && notxml && special
-					// Some attributes require a special call on IE
-					? elem.getAttribute( name, 2 )
-					: elem.getAttribute( name );
-
-			// Non-existent attributes return null, we normalize to undefined
-			return attr === null ? undefined : attr;
-		}
-
-		// elem is actually elem.style ... set the style
-
-		// IE uses filters for opacity
-		if ( msie && name == "opacity" ) {
-			if ( set ) {
-				// IE has trouble with opacity if it does not have layout
-				// Force it by setting the zoom level
-				elem.zoom = 1;
-
-				// Set the alpha filter to set the opacity
-				elem.filter = (elem.filter || "").replace( /alpha\([^)]*\)/, "" ) +
-					(parseInt( value ) + '' == "NaN" ? "" : "alpha(opacity=" + value * 100 + ")");
-			}
-
-			return elem.filter && elem.filter.indexOf("opacity=") >= 0 ?
-				(parseFloat( elem.filter.match(/opacity=([^)]*)/)[1] ) / 100) + '':
-				"";
-		}
-
-		name = name.replace(/-([a-z])/ig, function(all, letter){
-			return letter.toUpperCase();
-		});
-
-		if ( set )
-			elem[ name ] = value;
-
-		return elem[ name ];
-	},
-
-	trim: function( text ) {
-		return (text || "").replace( /^\s+|\s+$/g, "" );
-	},
-
-	makeArray: function( array ) {
-		var ret = [];
-
-		if( array != null ){
-			var i = array.length;
-			//the window, strings and functions also have 'length'
-			if( i == null || array.split || array.setInterval || array.call )
-				ret[0] = array;
-			else
-				while( i )
-					ret[--i] = array[i];
-		}
-
-		return ret;
-	},
-
-	inArray: function( elem, array ) {
-		for ( var i = 0, length = array.length; i < length; i++ )
-		// Use === because on IE, window == document
-			if ( array[ i ] === elem )
-				return i;
-
-		return -1;
-	},
-
-	merge: function( first, second ) {
-		// We have to loop this way because IE & Opera overwrite the length
-		// expando of getElementsByTagName
-		var i = 0, elem, pos = first.length;
-		// Also, we need to make sure that the correct elements are being returned
-		// (IE returns comment nodes in a '*' query)
-		if ( jQuery.browser.msie ) {
-			while ( elem = second[ i++ ] )
-				if ( elem.nodeType != 8 )
-					first[ pos++ ] = elem;
-
-		} else
-			while ( elem = second[ i++ ] )
-				first[ pos++ ] = elem;
-
-		return first;
-	},
-
-	unique: function( array ) {
-		var ret = [], done = {};
-
-		try {
-
-			for ( var i = 0, length = array.length; i < length; i++ ) {
-				var id = jQuery.data( array[ i ] );
-
-				if ( !done[ id ] ) {
-					done[ id ] = true;
-					ret.push( array[ i ] );
-				}
-			}
-
-		} catch( e ) {
-			ret = array;
-		}
-
-		return ret;
-	},
-
-	grep: function( elems, callback, inv ) {
-		var ret = [];
-
-		// Go through the array, only saving the items
-		// that pass the validator function
-		for ( var i = 0, length = elems.length; i < length; i++ )
-			if ( !inv != !callback( elems[ i ], i ) )
-				ret.push( elems[ i ] );
-
-		return ret;
-	},
-
-	map: function( elems, callback ) {
-		var ret = [];
-
-		// Go through the array, translating each of the items to their
-		// new value (or values).
-		for ( var i = 0, length = elems.length; i < length; i++ ) {
-			var value = callback( elems[ i ], i );
-
-			if ( value != null )
-				ret[ ret.length ] = value;
-		}
-
-		return ret.concat.apply( [], ret );
-	}
-});
-
-var userAgent = navigator.userAgent.toLowerCase();
-
-// Figure out what browser is being used
-jQuery.browser = {
-	version: (userAgent.match( /.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/ ) || [])[1],
-	safari: /webkit/.test( userAgent ),
-	opera: /opera/.test( userAgent ),
-	msie: /msie/.test( userAgent ) && !/opera/.test( userAgent ),
-	mozilla: /mozilla/.test( userAgent ) && !/(compatible|webkit)/.test( userAgent )
-};
-
-var styleFloat = jQuery.browser.msie ?
-	"styleFloat" :
-	"cssFloat";
-
-jQuery.extend({
-	// Check to see if the W3C box model is being used
-	boxModel: !jQuery.browser.msie || document.compatMode == "CSS1Compat",
-
-	props: {
-		"for": "htmlFor",
-		"class": "className",
-		"float": styleFloat,
-		cssFloat: styleFloat,
-		styleFloat: styleFloat,
-		readonly: "readOnly",
-		maxlength: "maxLength",
-		cellspacing: "cellSpacing"
-	}
-});
-
-jQuery.each({
-	parent: function(elem){return elem.parentNode;},
-	parents: function(elem){return jQuery.dir(elem,"parentNode");},
-	next: function(elem){return jQuery.nth(elem,2,"nextSibling");},
-	prev: function(elem){return jQuery.nth(elem,2,"previousSibling");},
-	nextAll: function(elem){return jQuery.dir(elem,"nextSibling");},
-	prevAll: function(elem){return jQuery.dir(elem,"previousSibling");},
-	siblings: function(elem){return jQuery.sibling(elem.parentNode.firstChild,elem);},
-	children: function(elem){return jQuery.sibling(elem.firstChild);},
-	contents: function(elem){return jQuery.nodeName(elem,"iframe")?elem.contentDocument||elem.contentWindow.document:jQuery.makeArray(elem.childNodes);}
-}, function(name, fn){
-	jQuery.fn[ name ] = function( selector ) {
-		var ret = jQuery.map( this, fn );
-
-		if ( selector && typeof selector == "string" )
-			ret = jQuery.multiFilter( selector, ret );
-
-		return this.pushStack( jQuery.unique( ret ) );
-	};
-});
-
-jQuery.each({
-	appendTo: "append",
-	prependTo: "prepend",
-	insertBefore: "before",
-	insertAfter: "after",
-	replaceAll: "replaceWith"
-}, function(name, original){
-	jQuery.fn[ name ] = function() {
-		var args = arguments;
-
-		return this.each(function(){
-			for ( var i = 0, length = args.length; i < length; i++ )
-				jQuery( args[ i ] )[ original ]( this );
-		});
-	};
-});
-
-jQuery.each({
-	removeAttr: function( name ) {
-		jQuery.attr( this, name, "" );
-		if (this.nodeType == 1)
-			this.removeAttribute( name );
-	},
-
-	addClass: function( classNames ) {
-		jQuery.className.add( this, classNames );
-	},
-
-	removeClass: function( classNames ) {
-		jQuery.className.remove( this, classNames );
-	},
-
-	toggleClass: function( classNames ) {
-		jQuery.className[ jQuery.className.has( this, classNames ) ? "remove" : "add" ]( this, classNames );
-	},
-
-	remove: function( selector ) {
-		if ( !selector || jQuery.filter( selector, [ this ] ).r.length ) {
-			// Prevent memory leaks
-			jQuery( "*", this ).add(this).each(function(){
-				jQuery.event.remove(this);
-				jQuery.removeData(this);
-			});
-			if (this.parentNode)
-				this.parentNode.removeChild( this );
-		}
-	},
-
-	empty: function() {
-		// Remove element nodes and prevent memory leaks
-		jQuery( ">*", this ).remove();
-
-		// Remove any remaining nodes
-		while ( this.firstChild )
-			this.removeChild( this.firstChild );
-	}
-}, function(name, fn){
-	jQuery.fn[ name ] = function(){
-		return this.each( fn, arguments );
-	};
-});
-
-jQuery.each([ "Height", "Width" ], function(i, name){
-	var type = name.toLowerCase();
-
-	jQuery.fn[ type ] = function( size ) {
-		// Get window width or height
-		return this[0] == window ?
-			// Opera reports document.body.client[Width/Height] properly in both quirks and standards
-			jQuery.browser.opera && document.body[ "client" + name ] ||
-
-			// Safari reports inner[Width/Height] just fine (Mozilla and Opera include scroll bar widths)
-			jQuery.browser.safari && window[ "inner" + name ] ||
-
-			// Everyone else use document.documentElement or document.body depending on Quirks vs Standards mode
-			document.compatMode == "CSS1Compat" && document.documentElement[ "client" + name ] || document.body[ "client" + name ] :
-
-			// Get document width or height
-			this[0] == document ?
-				// Either scroll[Width/Height] or offset[Width/Height], whichever is greater
-				Math.max(
-					Math.max(document.body["scroll" + name], document.documentElement["scroll" + name]),
-					Math.max(document.body["offset" + name], document.documentElement["offset" + name])
-				) :
-
-				// Get or set width or height on the element
-				size == undefined ?
-					// Get width or height on the element
-					(this.length ? jQuery.css( this[0], type ) : null) :
-
-					// Set the width or height on the element (default to pixels if value is unitless)
-					this.css( type, size.constructor == String ? size : size + "px" );
-	};
-});
-
-// Helper function used by the dimensions and offset modules
-function num(elem, prop) {
-	return elem[0] && parseInt( jQuery.curCSS(elem[0], prop, true), 10 ) || 0;
-}var chars = jQuery.browser.safari && parseInt(jQuery.browser.version) < 417 ?
-		"(?:[\\w*_-]|\\\\.)" :
-		"(?:[\\w\u0128-\uFFFF*_-]|\\\\.)",
-	quickChild = new RegExp("^>\\s*(" + chars + "+)"),
-	quickID = new RegExp("^(" + chars + "+)(#)(" + chars + "+)"),
-	quickClass = new RegExp("^([#.]?)(" + chars + "*)");
-
-jQuery.extend({
-	expr: {
-		"": function(a,i,m){return m[2]=="*"||jQuery.nodeName(a,m[2]);},
-		"#": function(a,i,m){return a.getAttribute("id")==m[2];},
-		":": {
-			// Position Checks
-			lt: function(a,i,m){return i<m[3]-0;},
-			gt: function(a,i,m){return i>m[3]-0;},
-			nth: function(a,i,m){return m[3]-0==i;},
-			eq: function(a,i,m){return m[3]-0==i;},
-			first: function(a,i){return i==0;},
-			last: function(a,i,m,r){return i==r.length-1;},
-			even: function(a,i){return i%2==0;},
-			odd: function(a,i){return i%2;},
-
-			// Child Checks
-			"first-child": function(a){return a.parentNode.getElementsByTagName("*")[0]==a;},
-			"last-child": function(a){return jQuery.nth(a.parentNode.lastChild,1,"previousSibling")==a;},
-			"only-child": function(a){return !jQuery.nth(a.parentNode.lastChild,2,"previousSibling");},
-
-			// Parent Checks
-			parent: function(a){return a.firstChild;},
-			empty: function(a){return !a.firstChild;},
-
-			// Text Check
-			contains: function(a,i,m){return (a.textContent||a.innerText||jQuery(a).text()||"").indexOf(m[3])>=0;},
-
-			// Visibility
-			visible: function(a){return "hidden"!=a.type&&jQuery.css(a,"display")!="none"&&jQuery.css(a,"visibility")!="hidden";},
-			hidden: function(a){return "hidden"==a.type||jQuery.css(a,"display")=="none"||jQuery.css(a,"visibility")=="hidden";},
-
-			// Form attributes
-			enabled: function(a){return !a.disabled;},
-			disabled: function(a){return a.disabled;},
-			checked: function(a){return a.checked;},
-			selected: function(a){return a.selected||jQuery.attr(a,"selected");},
-
-			// Form elements
-			text: function(a){return "text"==a.type;},
-			radio: function(a){return "radio"==a.type;},
-			checkbox: function(a){return "checkbox"==a.type;},
-			file: function(a){return "file"==a.type;},
-			password: function(a){return "password"==a.type;},
-			submit: function(a){return "submit"==a.type;},
-			image: function(a){return "image"==a.type;},
-			reset: function(a){return "reset"==a.type;},
-			button: function(a){return "button"==a.type||jQuery.nodeName(a,"button");},
-			input: function(a){return /input|select|textarea|button/i.test(a.nodeName);},
-
-			// :has()
-			has: function(a,i,m){return jQuery.find(m[3],a).length;},
-
-			// :header
-			header: function(a){return /h\d/i.test(a.nodeName);},
-
-			// :animated
-			animated: function(a){return jQuery.grep(jQuery.timers,function(fn){return a==fn.elem;}).length;}
-		}
-	},
-
-	// The regular expressions that power the parsing engine
-	parse: [
-		// Match: [@value='test'], [@foo]