jQuery.fn.roundcorners=function(i){settings=jQuery.extend({radius:3,myClass:"roundcorner",topleft:true,topright:true,bottomleft:true,bottomright:true},i);return this.each(function(){var V=this,v=$(V),i=$("<div/>").addClass(settings.myClass).width(settings.radius).height(settings.radius),I=(settings.radius>3)?-settings.radius:0,c=I+"px 0px",o=I+"px "+-settings.radius+"px",C=I+"px "+-(settings.radius*2)+"px",O=I+"px "+-(settings.radius*3)+"px",l={topleft:{backgroundPosition:c,top:0,left:0},topright:{backgroundPosition:o,top:0,right:0},bottomleft:{backgroundPosition:C,bottom:0,left:0},bottomright:{backgroundPosition:O,bottom:0,right:0}},crnrTopLeft=(settings.topleft)?i.clone().css(l.topleft):null,crnrTopRight=(settings.topright)?i.clone().css(l.topright):null,crnrBottomLeft=(settings.bottomleft)?i.clone().css(l.bottomleft):null,crnrBottomRight=(settings.bottomright)?i.clone().css(l.bottomright):null;if(v.css("position")!="relative"&&v.css("position")!="absolute"){v.css("position","relative")}
if($.browser.msie&$.browser.version<7){$(V).height("1%").css({zoom:1})}
$(V).prepend(crnrTopLeft,crnrTopRight).append(crnrBottomLeft,crnrBottomRight)})};