function getElementsByClass(etype, className){
	var	result = [],
		re = new RegExp("(^|\\s)" + className + "(\\s|$)"),
		elements = document.getElementsByTagName(etype),
		i = elements.length;
	while(i--) {
		if(re.test(elements[i].className))
			result.push(elements[i]);
	};
	result.reverse();
	return result;
};
if((window.opera && window.opera.version() > 7) || !/msie 5.0|msie 4/i.test(navigator.userAgent)) {
	notwo.$event(window, "onload", function() {
		var	bg = "backgroundColor",
			footer = document.getElementById("footer"),
			section = getElementsByClass("DIV", "clear"),
			menu = getElementsByClass("A", "menu"),
			open = document.location.href.split("#"),
			h3 = null,
			lastview = null,
			lastscroll = null,
			element = null,
			index = 0,
			i = menu.length;
		while(i--) {

			menu[i].onclick = function(){
				function show() {
					notwo.alpha(section, 0);
					section.className = "clear";
					notwo.fade(section, 0, 100, 2, function(){notwo.fade(footer, 0, 100, 2)});
					lastview = section;
				};
				var	section = this.section, force = lastview !== null;
				if(lastview !== section) {
					if(force)
						notwo.clear(lastview);
					notwo.fade(footer, (footer.style.opacity * 100 || 100), 0, 4, function(){
						if(force)
							notwo.fade(lastview, (lastview.style.opacity * 100 || 100), 0, 4, function(){
								this.className = "hide";
								show();
							});
						else
							show();
					});
				};
				this.blur();
				return false;
			};
			menu[i].section = section[i];
		};


		if(open.length == 2) {
			api = ["introduction", "examples", "faq"];
			i = api.length;
			while(i--) {
				if(api[i] === open[1]) {
					menu[i].onclick();
					api = [];
					i = 0;
				}
			};
			if(api.length)
				menu[0].onclick();
		}
		else
			menu[0].onclick();
	});
	document.write('<style type="text/css" media="screen">.hide{display: none}</style>');
};