
jQuery.extend({html:{tag:function(tag){return jQuery('<'+tag+'></'+tag+'>');},hN:function(n){return this.tag('h'+n);},h1:function(n){return this.hN(1);},h2:function(n){return this.hN(2);},h3:function(n){return this.hN(3);},br:function(){return jQuery('<br/>');},hr:function(){return jQuery('<hr/>');},nbsp:function(){return this.span().append('&nbsp;');},div:function(){return this.tag('div');},pre:function(){return this.tag('pre');},blockquote:function(){return this.tag('blockquote');},iframe:function(){return jQuery("<iframe src='about:blank'/>");},span:function(){return this.tag('span');},tt:function(){return this.tag('tt');},b:function(){return this.tag('b');},strong:function(){return this.tag('strong');},em:function(){return this.tag('em');},i:function(){return this.tag('i');},strike:function(){return this.tag('strike');},u:function(){return this.tag('u');},sup:function(){return this.tag('sup');},sub:function(){return this.tag('sub');},td:function(){return this.tag('td');},th:function(){return this.tag('th');},thead:function(){return this.tag('thead');},tr:function()
{var tr=this.tag('tr');var self=this;var td=arguments.callee.td;if(!td)
{td=arguments.callee.td=function td()
{return self.td().appendTo(this);};}
var th=arguments.callee.th;if(!th)
{th=arguments.callee.th=function th()
{return self.th().appendTo(this);};}
tr.td=td;tr.th=th;return tr;},table:function()
{var tbl=jQuery('<table>'+'</table>');var self=this;var tr=arguments.callee.tr;if(!tr)
{tr=arguments.callee.tr=function tr()
{var x=self.tr();x.appendTo(this);return x;};}
var thead=arguments.callee.thead;if(!thead)
{thead=arguments.callee.thead=function thead()
{return jQuery('thead',this);};}
var tbody=arguments.callee.tbody;if(!tbody)
{tbody=arguments.callee.tbody=function tbody()
{return jQuery('tbody',this);};}
tbl.thead=thead;tbl.tbody=tbody;tbl.tr=tr;return tbl;},li:function(n){return this.tag('li');},ul:function(n)
{var l=this.tag('ul');var self=this;var li=arguments.callee.li;if(!li)
{li=arguments.callee.li=function li()
{return self.li().appendTo(this);};}
l.li=li;return l;},ol:function(n)
{var l=this.tag('ol');var self=this;var li=arguments.callee.li;if(!li)
{li=arguments.callee.li=function li()
{return self.li().appendTo(this);};}
l.li=li;return l;},form:function(){return this.tag('form');},input:function(inputType){return jQuery("<input type='"+inputType+"'></input>");},button:function(){return this.input('button');},textfield:function(){return this.input('text');},checkbox:function(){return this.input('checkbox');},radio:function(){return this.input('radio');},hidden:function(){return this.input('hidden');},select:function()
{var sel=this.tag('select');var self=this;var option=arguments.callee.option;if(!option)
{option=arguments.callee.option=function option()
{return self.option().appendTo(this);};}
sel.option=option;return sel;},option:function(){return this.tag('option');},textarea:function(){return this.tag('textarea');},fieldset:function(){return this.tag('fieldset');},img:function(){return this.tag('img');},a:function(){return this.tag('a').attr('href','#');}}});
