(function($){ $.extend($, { sky: {} } ); $.extend($.sky, { controls: {} }); function IPPool_create(){ } $.fn.IPPool = function( opts ){ alert(this); var select = this.find("select")[0]; if (!select) throw "IPPool needs an ").IPPool().attr( "id", key ); }; }( jQuery ));