function prepareTargetBlank(){
   var className = 'external';
   var as = document.getElementsByTagName('a');
   for(i=0;i<as .length;i++){
	  var a = as[i];
	  r=new RegExp("(^| )"+className+"($| )");
	  if(r.test(a.className)){
		 a.onclick = function(){
			window.open(this.href);
			return false;
		 }
	  }
	}
}

window.onload = prepareTargetBlank;

//when the dom is ready...
window.addEvent('domready', function() {
	//time to implement basic show / hide
	Element.implement({
		//implement show
		show: function() {
			this.setStyle('display','');
		},
		//implement hide
		hide: function() {
			this.setStyle('display','none');
		}
	});
	if ($('subir')) {
		$('subir').addEvent('click', function(e){
			var e = new Event(e).stop();
			var fxScroll = new SmoothScroll({ duration: 1500 }, document.body).toTop();
		})
	};
	var el = window.location.hash.substring(1); // the hash
	if(el){
	window.scrollTo(0,0);
	var scroll = new Fx.Scroll(window, { wait: true, duration: 1500, transition: Fx.Transitions.Quad.easeInOut });
	scroll.toElement(el);
	};
	new SmoothScroll({ duration: 1500 }, window);
});


