

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();
    });
};

    jQuery(document).ready(function() {
             $.ajax({
                 type: "GET",
                 url: "/xml/aupairs_available_carousel.xml",
                 dataType: "xml",
                 success: function(xml) {
                     $(xml).find('profile').each(function(){
                        var APid = $(this).find('id').text();
						
                         $('<li></li>')
                             .html('<a href=\"\/aupairs/available.asp" >' + '<img src=\/images/profiles/carousel/' + APid + '\.jpg border=0 \/><\/>')							 
                             .appendTo('#mycarousel ul');
                     }); //close each(
                
				
 				jQuery('#mycarousel').jcarousel({
        auto: 5,
        wrap: null,
		scroll: 1,
        initCallback: mycarousel_initCallback
    });
				 
				}
				 
             }); //close $.ajax(
			 
			 
         }); //close click(

