function mycarousel_initCallback(carousel)
{
    // Disable autoscrolling if the user clicks the prev or next button.
    carousel.buttonNext.bind('click', function() {
        carousel.startAuto(0);
    });

    carousel.buttonPrev.bind('click', function() {
        carousel.startAuto(0);
    });

    // Pause autoscrolling if the user moves with the cursor over the clip.
    carousel.clip.hover(function() {
        carousel.stopAuto();
    }, function() {
        carousel.startAuto();
    });
};

function equalHeight(group) {
	var tallest = 0;
	group.each(function() {
		var thisHeight = $(this).height();
		if(thisHeight > tallest) {
			tallest = thisHeight;
		}
	});
	group.height(tallest);
}

$(document).ready(function(){
	//Fix PNG				
	$('div#intro-logo').pngFix( );	   	
	$('div#leaf').pngFix( );
	$('div#logo').pngFix( );
	//$('div#left-1').pngFix( );
/*	$('img#imgleft').pngFix( );
*/	$('div#logo-company').pngFix( );
	$('div.media-item').pngFix( );
	
	$('ul#menu-foot li:first').css({background:'none'});
	$('ul#thumbnail li:last').css({padding:'0'});
	
/*	$(".datepicker").datepicker({
		showOn: 'both',
		buttonImage: '/themes/images/calendar.gif',
		buttonImageOnly: true
	});
*/
	
	jQuery('#mycarousel').jcarousel({
        vertical: true,
		wrap: 'last',
		auto: 4
    });
	
	
	//Slide Img
	$("#thumbnail li a").click(function(){
		$(".large img").hide().attr({"src": $(this).attr("href"), "title": $("> img", this).attr("title")});
		$(".large h2").html($("> img", this).attr("title"));
		return false;
	});
	$(".large>img").load(function(){$(".large>img:hidden").fadeIn("slow")});
	
	equalHeight($(".ser-other"));
	equalHeight($(".ser-other h1"));
});
