/*
		GNU/GPL, see LICENSE.php
 Joomla! is free software. This version may have been modified pursuant
 to the GNU General Public License, and as distributed it includes or
 is derivative of works licensed under the GNU General Public License or
 other free or open source software licenses.
 See COPYRIGHT.php for copyright notices and details.
*/
var JCaption=new Class({initialize:function(a){this.selector=a;a=$$(a);a.each(function(c){this.createCaption(c)},this)},createCaption:function(a){var c=document.createTextNode(a.title),b=document.createElement("div"),e=document.createElement("p"),d=a.getAttribute("width"),f=a.getAttribute("align");if(!d)d=a.width;e.appendChild(c);a.parentNode.insertBefore(b,a);b.appendChild(a);a.title!=""&&b.appendChild(e);b.className=this.selector.replace(".","_");b.className=b.className+" "+f;b.setAttribute("style",
"float:"+f);b.style.width=d+"px"}});document.caption=null;window.addEvent("load",function(){var a=new JCaption("img.caption");document.caption=a});
