$(document).ready(function(){
    /*
	//homepage slideshow initator
    $('.slideshow').cycle({
		fx: 'fade' // choose your transition type, ex: fade, scrollUp, shuffle, etc...	
	});
 	//yet another stupid lightbox
 	$('.imageGallery a').lightBox();
 	*/
	
	/*convert richtext popup full size images to fancybox images
	$(".leftColumn img").each(function(){
		if(!$(this).parent().is("a"))
			$(this).wrap("<a class='single_image' href='" + $(this).attr("src") + "'></a>");
	});
	end convert richtext popup full size images to fancybox images*/
	
	//convert richtext popup thumb images to fancybox images
	$(".leftColumn a").each(function(){
		var href = $(this).attr("href");
		if(href != undefined){
			var index = href.indexOf("viewImage");
			if(index > -1){
				href = href.replace("javascript:viewImage('", "");
				href = href.replace("')","");
				$(this).attr("href", href);
				$(this).addClass("single_image"); 
			}
		}
	});
	
	$("a.single_image").fancybox();
	//end convert richtext popup images to fancybox images
	
});
