$(document).ready(function(){
	//INITIATE THE SLIDER ON THE HOME PAGE
    $('.slideshow').cycle({
		fx: 'fade' // choose your transition type, ex: fade, scrollUp, shuffle, etc...
	});
	
    //convert richtext popup images to fancybox images
    $("#content-right 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");
               $(this).attr( "rel", "group" ) 
            }
        }
    });
    $("a.single_image").fancybox();
    //end convert richtext popup images to fancybox images	
	
});
