jQuery.fn.ezjax=function(o){obj=jQuery(this).attr('class');var o=jQuery.extend({container:'#ezjax_content',initial:null,effect:null,speed:'normal',easing:null,bind:'.'+obj},o);if(o.initial!=null){jQuery(o.container).load(o.initial,function(){bind();});}
function bind(){jQuery(o.container+' '+o.bind).ezjax({container:o.container,initial:null,effect:o.effect,speed:o.speed,easing:o.easing});}
return this.each(function(){jQuery(this).click(function(){var url=jQuery(this).attr('href');if(o.effect!=null){switch(o.effect){case'slide':jQuery(o.container).animate({height:"0px"},o.speed,function(){jQuery(o.container).css('overflow','hidden');jQuery(o.container).load(url,function(){jQuery(o.container).animate({height:jQuery(o.container).children().height()+20},o.speed,o.easing,function(){jQuery(o.container).css('overflow','visible');});bind();});});break;case'fade':jQuery(o.container).animate({opacity:0.0},o.speed,function(){jQuery(o.container).load(url,function(){jQuery(o.container).animate({opacity:1.0},o.speed);bind();});});break;}}
else{jQuery(o.container).load(url,function(){bind();});}
return false;});});};