(function($) {
		  
	$.fn.popup = function(o) {
		return this.each(function() {
			new $.popup(this, o) ;
		}) ;
	} ;
	
	$.popup = function (el, o) {
		el = $(el) ;
		o = o || {} ;
		if (!el.attr('target')) el.attr('target', 'popup_'+$.rand()) ;
		el.click(function() {
			window.open('', this.attr('target'), o.params || '') ;
		}.bind(el)) ;
	} ;
	
	$.popup.fn = $.popup.prototype = {
        popup: '1.0'
    } ;
	
 	$.popup.fn.extend = $.popup.extend = $.extend ;
	
})(jQuery) ;

