function replaceBorder()
{
	$('*.imgborder1 img,img.imgborder1').wrap('<div class=\"imgborder1wrapper\" />');

	$('.imgborder1wrapper').replaceWith(
function(){
	return "<table cellpadding=\"0\" cellspacing=\"0\" class=\"noFixed\">"+
    "<tr style=\"height: 16px;\">"+
        "<td style=\"width: 16px; height: 16px; background-image: url('uploads/images/borders/1/1.png');\"></td>"+
        "<td style=\"height: 16px; background-image: url('uploads/images/borders/1/2.png');\"></td>"+
        "<td style=\"width: 16px; height: 16px; background-image: url('uploads/images/borders/1/3.png');\"></td>"+
    "</tr>"+
    "<tr>"+
        "<td style=\"width: 16px; background-image: url('uploads/images/borders/1/4.png');\"></td>"+
        "<td>"+$(this).html()+"</td>"+
        "<td style=\"width: 16px; background-image: url('uploads/images/borders/1/6.png');\"></td>"+
    "</tr>"+
    "<tr style=\"height: 16px;\">"+
        "<td style=\"width: 16px; height: 16px; background-image: url('uploads/images/borders/1/7.png');\"></td>"+
        "<td style=\"height: 16px; background-image: url('uploads/images/borders/1/8.png');\"></td>"+
        "<td style=\"width: 16px; height: 16px; background-image: url('uploads/images/borders/1/9.png');\"></td>"+
    "</tr>"+
"</table>"
	});
	
	
	$('*.imgborder1 img,img.imgborder1').css("padding",0);
}

$('*.imgborder1 img,img.imgborder1').ready(replaceBorder);

