/**
* @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
 *
 * @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
});

/* (C) 2008 YOOtheme.com, mod_yoo_carousel.js */

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}('C I=h n({1r:5(d,3){2.o({1b:n.t,Y:n.t,1l:n.t,11:n.t,10:\'.s\',13:\'.1g\',17:\'.a\',16:\'.a-6\',Z:\'.a-1s\',X:1q,1j:1t,z:\'x\',K:0,D:\'1u\',N:\'1v\',M:\'19\',k:1p,9:\'x\',j:\'T\'},3);2.d=$(d);2.s=2.d.H(2.3.10);2.8=2.d.14(2.3.13);2.E=2.d.14(2.3.17);2.G=2.d.H(2.3.16);2.F=2.d.H(2.3.Z);2.7=W;4(2.3.z==\'p\'||2.3.9==\'p\'){2.l=h 1w();2.8.r(5(e,i){2.l[i]=h J.18(e,\'v\');4(i!=2.3.K)e.1E(\'v\',0)},2);2.3.z=\'p\';2.3.9=\'p\'}f{2.q=h J.1B(2.s,{\'S\':R});2.y=h J.18(2.s,\'v\',{\'S\':R})}2.U();2.g(2.3.K,1);4(2.3.j==\'T\'||2.3.j==\'Q\')2.j()},U:5(){4(2.3.M!=\'19\'){C L=W;2.E.r(5(e,i){$(e).O(2.3.M,5(){4(2.3.9==\'x\'){2.g(i,2.3.k,2.3.9)}f{$1F(L);L=2.g.1z(2.3.k,2,[i,2.3.k,2.3.9])}2.m()}.u(2))},2)}4(2.G&&2.F){2.G.O(\'1k\',5(){4(2.7+1>=2.8.B){6=0}f{6=2.7+1};2.g(6,2.3.k,2.3.9);2.m()}.u(2));2.F.O(\'1k\',5(){4(2.7-1<0){6=2.8.B-1}f{6=2.7-1};2.g(6,2.3.k,2.3.9);2.m()}.u(2))}},g:5(c,b,1a){4(c==2.7)V;2.8.r(5(1g,i){C a=$(2.E[i]);4(i==c&&i!=2.7){4(a)a.1c(2.3.N).1f(2.3.D)}f{4(a)a.1c(2.3.D).1f(2.3.N)}},2);1A(1a){P\'1m\':2.y.o({\'b\':b});2.y.w(1,0.1i).1o(5(){2.q.o({\'b\':1});2.q.15(2.8[c]);2.y.w(0.1i,1)}.u(2));1e;P\'p\':2.8.r(5(e,i){2.l[i].o({\'b\':b});4(i==c){2.l[i].w(1)}f 4(e.1y(\'v\')>0){2.l[i].w(0)}},2);1e;P\'x\':2.q.o({\'b\':b});2.q.15(2.8[c])}2.7=c;2.A(\'11\',c)},1d:5(){4(2.7+1>=2.8.B){6=0}f{6=2.7+1};4(2.3.j==\'Q\'&&6==0){2.m();V};2.g(6,2.3.1j,2.3.z);2.A(\'1b\')},j:5(){2.1h=2.1d.1D(2.3.X,2);2.A(\'1l\')},m:5(){1x(2.1h);2.A(\'Y\')}});I.12(h 1C);I.12(h 1n);',62,104,'||this|options|if|function|next|currentSlide|slides|rotateActionEffect|button|duration|index|container|el|else|showSlide|new||autoplay|rotateActionDuration|fxCrossfade|stop|Class|setOptions|crossfade|fxScroll|each|panel|empty|bind|opacity|start|scroll|fxFade|transitionEffect|fireEvent|length|var|buttonOnClass|buttons|buttonPrev|buttonNext|getElement|YOOcarousel|Fx|startIndex|timer|rotateAction|buttonOffClass|addEvent|case|once|false|wait|on|setupButtons|return|null|slideInterval|onStop|buttonPrevSelector|panelSelector|onShowSlide|implement|slidesSelector|getElements|toElement|buttonNextSelector|buttonsSelector|Style|none|transition|onRotate|removeClass|rotate|break|addClass|slide|slideshowInt|01|transitionDuration|click|onAutoPlay|fade|Events|chain|100|4000|initialize|prev|700|selected|off|Array|clearInterval|getStyle|delay|switch|Scroll|Options|periodical|setStyle|clear'.split('|'),0,{}))

