/**
Mootools Compatibility 1.2 Core
**/
Class.empty=$empty;Class.prototype.extend=function(a){a.Extends=this;return new Class(a)};Array.implement({copy:function(b,a){return $A(this,b,a)}});Array.alias({erase:"remove",combine:"merge"});Function.extend({bindAsEventListener:function(b,a){return this.create({bind:b,event:true,"arguments":a})}});Function.empty=$empty;Hash.alias({getKeys:"keys",getValues:"values",has:"hasKey",combine:"merge"});var Abstract=Hash;Element.extend=Element.implement;Elements.extend=Elements.implement;Element.implement({getFormElements:function(){return this.getElements("input, textarea, select")},replaceWith:function(a){a=$(a);this.parentNode.replaceChild(a,this);return a},removeElements:function(){return this.dispose()}});Element.alias({dispose:"remove",getLast:"getLastChild"});Element.implement({getText:function(){return this.get("text")},setText:function(a){return this.set("text",a)},setHTML:function(){return this.set("html",arguments)},getHTML:function(){return this.get("html")},getTag:function(){return this.get("tag")}});Event.keys=Event.Keys;Element.implement({setOpacity:function(a){return this.set("opacity",a)}});Object.toQueryString=Hash.toQueryString;var XHR=new Class({Extends:Request,options:{update:false},initialize:function(b,a){this.parent(a);this.url=b},request:function(a){return this.send(this.url,a||this.options.data)},send:function(a,b){if(!this.check(arguments.callee,a,b)){return this}return this.parent({url:a,data:b})},success:function(b,a){b=this.processScripts(b);if(this.options.update){$(this.options.update).empty().set("html",b)}this.onSuccess(b,a)},failure:function(){this.fireEvent("failure",this.xhr)}});var Ajax=XHR;JSON.Remote=new Class({options:{key:"json"},Extends:Request.JSON,initialize:function(b,a){this.parent(a);this.onComplete=$empty;this.url=b},send:function(a){if(!this.check(arguments.callee,a)){return this}return this.parent({url:this.url,data:{json:Json.encode(a)}})},failure:function(){this.fireEvent("failure",this.xhr)}});Fx.implement({custom:function(b,a){return this.start(b,a)},clearTimer:function(){return this.cancel()},stop:function(){return this.cancel()}});Fx.Base=Fx;Fx.Style=function(b,c,a){return new Fx.Tween(b,$extend({property:c},a))};Element.implement({effect:function(b,a){return new Fx.Tween(this,$extend({property:b},a))}});Fx.Styles=Fx.Morph;Element.implement({effects:function(a){return new Fx.Morph(this,a)}});Native.implement([Element,Document],{getElementsByClassName:function(a){return this.getElements("."+a)},getElementsBySelector:function(a){return this.getElements(a)}});Elements.implement({filterByTag:function(a){return this.filter(a)},filterByClass:function(a){return this.filter("."+a)},filterById:function(a){return this.filter("#"+a)},filterByAttribute:function(b,a,c){return this.filter("["+b+(a||"")+(c||"")+"]")}});var $E=function(a,b){return($(b)||document).getElement(a)};var $ES=function(a,b){return($(b)||document).getElements(a)};var Json=JSON;JSON.toString=JSON.encode;JSON.evaluate=JSON.decode;Cookie.set=function(b,c,a){return new Cookie(b,a).write(c)};Cookie.get=function(a){return new Cookie(a).read()};Cookie.remove=function(b,a){return new Cookie(b,a).dispose()};
(function(){
	var natives = [Array, Function, String, RegExp, Number];
	for (var i = 0, l = natives.length; i < l; i++) natives[i].extend = natives[i].implement;
})();

window.extend = document.extend = function(properties){
	for (var property in properties) this[property] = properties[property];
};
window[Browser.Engine.name] = window[Browser.Engine.name + Browser.Engine.version] = true;
window.ie = window.trident;
window.ie6 = window.trident4;
window.ie7 = window.trident5;

/*
MooTools Compatibility 1.2 More
*/
function $A(d){var c;try{c=d.item}catch(f){c=true}if(c){var g=[];for(var b=0,a=d.length;b<a;b++){g[b]=d[b]}return g}return Array.prototype.slice.call(d)}function $extend(c,a){if(!a){a=c;c=this}for(var b in (a||{})){c[b]=a[b]}return c}Drag.Base=Drag;Element.implement({getValue:function(){return this.get("value")},toQueryString:function(){var a=[];this.getElements("input, select, textarea").each(function(b){if(!b.name||b.disabled){return}var c=(b.tagName.toLowerCase()=="select")?Element.getSelected(b).map(function(d){return d.value}):((b.type=="radio"||b.type=="checkbox")&&!b.checked)?null:b.value;$splat(c).each(function(d){a.push(b.name+"="+encodeURIComponent(d))})});return a.join("&")}});Elements.implement({empty:function(){this.each(function(a){a.empty()})},remove:function(){this.each(function(a){a.remove()})}});Function.prototype.extend=function(a){if(this.prototype){a.Extends=this;return new Class(a)}for(var b in a){this[b]=a[b]}return this};Hash.implement({remove:function(a){return this.erase(a)}});Hash.Cookie.implement({remove:function(a){var b=this.hash.erase(a);if(this.options.autoSave){this.save()}return b}});XHR.implement({initialize:function(a){this.parent(a);this.transport=this.xhr}});var Ajax=new Class({Extends:XHR,initialize:function(b,a){this.url=b;this.parent(a)},success:function(b,a){stripped=b.stripScripts(this.options.evalScripts);if(this.options.update){$(this.options.update).empty().set("html",stripped)}b=this.processScripts(b);this.onSuccess(b,a)}});

/* For further information, read http://www.siafoo.net/article/62 */

Fx.Scroll.implement({
	scrollTo: function(y, x){
		return this.start(y, x);
	}
});