(function(){
	if (typeof MKAvail === 'boolean') {return;}

	var MK = function(ls) {
		this.els = [];
		for (var i = 0, k = ls.length; i < k; i++) {
			var l = ls[i];
			if (typeof l === 'string') l = $i(l);
			this.els.push(l);
		}
		return this;
	}

	MK.prototype = {
		push : function(a) {
			for (var j = 0, p = a.length; j < p; j++) {
				this.els.push(a[j]);
			}
			return this;
		},

		all : function(f) {
			for (var i = 0, xn = this.els.length; i < xn; ++i) {
				f.call(this, this.els[i]);
			}
			return this;
		},

		on : function(t, f) {
			var lsn = function(el) {
				if (window.addEventListener) {
					el.addEventListener(t, f, false);
				} else if (window.attachEvent) {
					el.attachEvent('on' + t, function() {
							f.call(el, window.event);
						}
					);
				}
			};
			this.all(function(el) {
				lsn(el);
			});
			return this;
		},

		style : function(p, v) {
			this.all(function(el) {
				var u = v;
				if (p === 'opacity') {
					el.style['filter'] = 'alpha(opacity='+ u +')';
					u = u / 100;
				}
				el.style[p] = u;
			});
			return this;
		},

		css : function(o) {
			for (var p in o) {
				this.style(p, o[p]);
			}
			return this;
		},

		anim : function(f, b, e, t, c) {
			var that = this;
			for (var p in b) {
				if (p !== 'opacity' || p !== 'zIndex') {
					e[p] = (e[p] - b[p]);
				}
			} 
			var nd = new Date().getTime() + t;
			setTimeout(function() {
				var k = (t - (nd - new Date().getTime()));
				if (t <= k) k = t;	
				for (var p in b) {
					if (p === 'scrollLeft' || p === 'scrollTop') {
						that.all(function(el) {
							el[p] = f(k, b[p], e[p], t);
						});
					} else {
						var prt = (p === 'zIndex' || p === 'opacity') ? '' : 'px';
						that.style(p, Math.floor(f(k, b[p], e[p], t)) + prt);
					}
				}
				if (k === t) {
					if (c) c();
				} else {
					setTimeout(arguments.callee, 30);
				}
			}, 30);
			return this;
		}
	};

	window.$ = function() {
		return new MK(arguments);
	};

	$i = function(o) {
		if (typeof o == 'string') {
			return document.getElementById(o);
		}
		return o;
	};

	$e = function(i, e) {
		var d = i ? $i(i) : document;
		return d.getElementsByTagName(e);
	};

	$c = function(c, e) {
		var d = e ? $i(e) : document;
		if (!document.getElementsByClassName) {
			var r = [];
			c = new RegExp('\\b'+c+'\\b');
			d = d.getElementsByTagName('*');
			for (var i = 0;i < d.length;i++) {
				if (c.test(d[i].className)) {
					r.push(d[i]);
				}
			}
			return r;
		}
		return d.getElementsByClassName(c);
	};

	xhr = function(u, p, s, f) {
		var X = window.XMLHttpRequest ? new XMLHttpRequest() : new ActiveXObject('Microsoft.XMLHTTP');
		if (p == '') {
			X.open('GET', u, true);
		} else {
			X.open('POST', u, true);
			X.setRequestHeader('Content-type', 'application/x-www-form-urlencoded');
		}
		X.onreadystatechange = function() {
			if (X.readyState === 4) {
				var r = X.responseText;
				if (X.status === 200) {
					if (s) s(r, X);
				} else {
					if (f) f(r, X);
				}
			}
		};
		X.send(p);
	};

	load = function(s, c) {
		var f = document.createElement('script');
		f.type = 'text/javascript';
		f.setAttribute('async', 'true');
		f.onloadDone = false;
		if (c) {
            f.onload = function() {
	     		f.onloadDone = true;        
            	c();
            };
	     	f.onreadystatechange = function() {
	     		if (('loaded' === f.readyState || 'complete' === f.readyState) && !f.onloadDone) {
		     		f.onloadDone = true;
	     			c();
	     		}
	     	};
        }
		f.src = s;
		var h = $e(document, 'head')[0];
		h.insertBefore(f, h.firstChild);
	};

	offSet = function(o) {
		var l = 0;
		var t = 0;
		if (o.offsetParent) {
			do {
				l += o.offsetLeft;
				t += o.offsetTop;
			} while(o = o.offsetParent);
			return [l, t];
		}
	};

	preventDefault = function(e) {
		if (!e) e = window.event;
		e.cancelBubble = true;
		e.returnValue = false;
		if (e.preventDefault) {
			e.preventDefault();
		}
	};

	if (!Array.indexOf) {
		Array.prototype.indexOf = function(o, i) {
			for(var j = this.length, i = i < 0 ? i + j < 0 ? 0 : i + j : i || 0; i < j && this[i] !== o; i++);
			return j <= i ? -1 : i
		}
	}

	ease = {
		cubic : function(t, b, c, d) {
			if((t /= d / 2) < 1){
				return (c / 2 * t * t * t + b) * 1;
			}
			return (c / 2 * ((t -= 2) * t * t + 2) + b) * 1;
		},

		bounce : function(t, b, c, d) {
			if((t /= d) < (1 / 2.75)) {
				return c * (7.5625 * t * t) + b;
			} else if(t < (2 / 2.75)) {
				return c * (7.5625 * (t -= (1.5 / 2.75)) * t + .75) + b;
			} else if(t < (2.5 / 2.75)) {
				return c * (7.5625 * (t -= (2.25 / 2.75)) * t + .9375) + b;
			}else{
				return c * (7.5625 * (t -= (2.625 / 2.75)) * t + .984375) + b;
			}
		}
	}
	MKAvail = true;
})();

