/*
 * targetBlank 1.0 - windows opener with mootools 1.2
 * By Mario Zambon (http://www.urbangap.com)
 * Copyright (c) 2008 cody urbangap
 * Licensed under the MIT License: http://www.opensource.org/licenses/mit-license.php
*/

function targetblank() {	
	var lnk = $$('a.blank')
	//var txt = '(apri il collegamento in una nuova finestra)'
	//var txt = ''
	
	lnk.addEvent('click', $lambda(false))
	lnk.each(function(item, index){
		//var title = item.getProperty('title')
		//item.setProperty('title', title+' '+txt)
		item.addEvent('click', function(event){
			window.open(this)
		})
	})

	var lnk2 = $$('a.self')
	
	//lnk2.addEvent('click', $lambda(false))
	lnk2.each(function(item, index){
		item.addEvent('click', function(event){
			window.navigate(this)
		})
	})
}
window.addEvent('domready', targetblank)