function $object(obj){var tmp='';for(var x in obj)tmp+=x+'='+obj[x]+'\n';return alert(tmp)}
function $E(css,hold){return (hold?$(hold):document).getElement(css)}
function go_here(e){$E('ol a[href="'+this.href.replace(base,'')+'"]').fireEvent('click',e)}
function get_href(el){return el.href.replace(base,'')}

var base=window.location.toString().replace(/\/[^\/]*$/gi,'/');

window.addEvent('domready',function(){
	$$('.cont a').forEach(function(el,i,tag){
		if((i=get_href(el)).contains('/'))el.set('target','_blank');
		else if($(i))el.addEvent('click',go_here);
	});
	$$('ol a').addEvent('click',function(e){
		var e=new Event(e).stop(),par=this.getParent('.wrap');
		par.getElements('.cont,ol a').removeClass('cur');
		$$(this,'#'+get_href(this)).addClass('cur');
	});
	new SmoothScroll();
	new MultiBox('dt a',{
		descSelector:'dd',
		useOverlay:true,
		showNumbers:false
	});
});
