/*	apre un div tipo popup
	che si chiude cliccandoci sopra
	- il contenuto è l'href del link
	- accetta anche width e height
*/
jQuery.fn.popAlpiScaloVGTO = function(style_params, other_params){

    jQuery(this).unbind("click"); 
 	
 	jQuery(this).click(function(e){
 	
	 	setOpacity('#containerOpacity');
 	
		var file = jQuery(this).attr('url');
		var x = e.pageX;
		var y = e.pageY;
		var style = {
			'position': 'absolute',
			'top': y - 70 + 'px',
			'left': x - 150 + 'px',
			'background-color': '#fff',
			'color': '#000',
			'border': '1px solid #999',
			'padding': '10px',
			'cursor': 'pointer'
		};
		var config = {
			'closeOnClick': true,
			'id': '#poaltoScalo'
		};
		jQuery.extend(style, style_params);
		jQuery.extend(config, other_params);
		jQuery('#' + config.id).remove();
		jQuery('<div id="' + config.id + '"></div>')
			.css(style)
			.load(file)			
			.appendTo('body')
			.fadeIn("slow")
		jQuery('#poaltoScalo').bgiframe();
		return;
	});
};
