    $(document).ready(function(){ 
        $(document).pngFix(); 
    }); 
function mycarousel_initCallback(carousel) {
 jQuery('.jcarousel-control a').bind('click', function() {
carousel.scroll(jQuery.jcarousel.intval(jQuery(this).text()));
return false;
});

jQuery('#next-btn').bind('click', function() {
carousel.next();
return false;
});

jQuery('#prev-btn').bind('click', function() {
carousel.prev();
return false;
});
};

// Ride the carousel...
jQuery(document).ready(function() {
jQuery("#events-gallery-tn").jcarousel({
scroll: 4,
animation: "slow",
initCallback: mycarousel_initCallback,
// This tells jCarousel NOT to autobuild prev/next buttons
buttonNextHTML: null,
buttonPrevHTML: null
});
});


/*$(document).ready(function(){


	$("#events-gallery-tn img").click(function(){
//'/images/events-gallery/images/'.
	  var imagePath = "inc/imageresize.inc.php?width=306&height=383&image=/images/events-gallery/images/"
	  var largePath = imagePath.concat($(this).attr("alt"));
	  var largeAlt = $(this).attr("title");
	  $("#gallery-img").attr({ src: largePath, alt: largeAlt });
	  if( largeAlt == undefined || largeAlt == "0"){largeAlt = " ";}
	  $("#events-gallery-img h3").html(" " + largeAlt + ""); return false;
	});

});
*/
$(document).ready(function(){


	$("#events-gallery-tn img").click(function(){
//'/images/events-gallery/images/'.
	  var imagePath = "inc/imageresize.inc.php?width=306&height=383&image=/images/events-gallery/images/"
	  var largePath = imagePath.concat($(this).attr("alt"));
	  var largeAlt = $(this).attr("title");
	  if( largeAlt == undefined || largeAlt == "0"){largeAlt = " ";}
	  $("#events-gallery-img h3").css({display: "none"});
	  $("#loader").addClass("loading");
	  showImage(largePath, largeAlt);
	  return false;
	});
	
	function showImage(mysrc, myalt){
		$("#loader img").fadeOut("slow").remove();
				var largeImage = new Image();
             $(largeImage).load(function()
             	{
                $(this).hide();
                $("#loader").removeClass("loading").append(this);
                $(this).fadeIn("slow");                      
                });   
	  $(largeImage).attr("src", mysrc);
	  
	  $("#events-gallery-img h3").html(" " + myalt + "");
	  $("#events-gallery-img h3").show("fast");
								   }
});

	



