//this function is called if the ajax call is successful
function buildFeatures3(xml){

    //loop through the features in the XML, doing this to each
    $(xml).find('feature3').each(function(){

         //put the subnodes of the xml feature nodes into disposable variables
         var name_text = jQuery.trim($(this).find('name').text());
         var image_text = jQuery.trim($(this).find('image').text());
         var destination_text = jQuery.trim($(this).find('destination').text());
	 var heading_text = jQuery.trim($(this).find('heading').text());
	 var caption_text = jQuery.trim($(this).find('caption').text());
    	 
         //create an empty div with class slide
         var newDv = $('<div></div>').addClass("slide3");
        
         //create an anchor for image
         var imgLink = $('<span></span>').attr({
             href: destination_text,
             title: heading_text
         })

         //create a new img with the attributes here
         //and put it in the empty div above
    	 $('<img />').attr({ 
             src: image_text,
             title: heading_text,
             alt: heading_text,
             longdesc: caption_text
         }).appendTo(imgLink);
         imgLink.appendTo(newDv);

         //create a link in a para w/ the caption and put it in the div above
    	 var paraLink = $('<span></span>').attr({
             href: destination_text,
             title: heading_text
         }).html(caption_text);
         var para = $('<p></p>');
         paraLink.appendTo(para);
         para.appendTo(newDv);
    	 
         //put that div into  the slideshow
         newDv.appendTo("#slideShow3");
		     
    }); //end xml features loop

    // start the slideshow
    $('#slideShow3').cycle({ 
    	fx:     'fade', 
    	speed:   300, 
    	timeout: 4500,
    	pause:   3
    });
	}

