/**
 *
 * @access automatic on document load
 * @return parameters
 **/

$(document).ready(function() {

	$('#wikiContent img').each( function()
		{
			var src = this.src.replace(/thumb_/,'');
			$(this).before('<a href="'+src+'" rel="prettyPhoto"></a>');
			$(this).prev().html($(this).clone());
			$(this).replaceWith('');
		}
	);
	
	//lightbox
	$("a[rel^='prettyOverlay'],a[rel^='prettyPhoto']").prettyPhoto({
		animationSpeed: 'fast', /* fast/slow/normal */
		padding: 20, /* padding for each side of the picture */
		opacity: 0.35, /* Value betwee 0 and 1 */
		showTitle: true, /* true/false */
		allowresize: true, /* true/false */
		counter_separator_label: '/', /* The separator for the gallery counter 1 "of" 2 */
		theme: 'light_rounded'
	});
});

Cufon.replace('.header_holder');
Cufon.replace('#main-menu,#read-more,.navigatorholder,#small-menu,#footer,#showsponsors', { hover: true });
Cufon.replace('#content');

Cufon.refresh = function(what)
{
	Cufon.replace(what);
	Cufon.now();
}
