jQuery.fn.extend({
	esky_cities: function() {
	$(this).each(function(){
		//alert('sada');
		$this = $(this);
		var c1 = $this.offset();
		var url = $this.attr('href');		
		var title = $this.attr('title');
		var scrolling = ($.browser.msie) ? 'yes' : 'auto';
		var scrolling = 'auto';
		var txt_close = 'Zamknij';
		
		$this.click(function(){
			esky_cities_remove();
			var c2 = $this.prev().offset();
			
			//alert(c2.top);
			//return false;
			
			$('body')
			.append(
				$('<div></div>')
					.attr('id','esky_cities')
					.css({
						'position':'absolute',
						'top':(c1.top>0)?c1.top:c2.top,
						'left':(c1.left>0)?c1.left-0:c2.left-50

						
						
					})//css
					.append(
						$('<h3></h3>')
							.text(title)
							.append($('<a></a>')
								.attr('href','javascript:void(0);')								
								.text(txt_close)
								.click(esky_cities_remove)
							)
					)
					.append(
						$('<iframe >')
							
							.attr('id','esky_cities_frame')
							.attr('src',url)
							.attr('width',220)
							.attr('height',330)
							.attr('frameborder',0)
							//.attr('scrolling',scrolling)
							.attr('marginwidth',0)
							.attr('marginheight',0)
							.attr('allowTransparency','true')
							.css({
								'border':'none',
								'background':'transparent',
								'font-weight':'bold'
								
							})
					)
					.bgIframe()
			);//append
			return false;
		}); //onclick
	}); //each
	}
});

function esky_cities_remove() {
	$('#esky_cities').empty().remove();
	$(document).blur();
}