$(document).ready(function() {
$.ajax({
	   type: "GET", 
	   url: "port.xml", 
	   dataType: "xml",
	   success: function(xml){
	 var showme = function(whichport, whichsec){
	   $('/portfolio/'+whichsec+'/client', xml).each(function(){
		   
		   var title = $('title', this).text();
		   var image = $('image', this).text();
		   var url = $('url', this).text();
		   var description = $('description', this).text();
		   if(url){
		   $(whichport).append("<dt>"+title+"</dt><dd><a href=\""+url+"\"><img src=\""+image+"\" alt=\"\"></a><p>"+description+"</p></dd>");
		   }else{
		   $(whichport).append("<dt>"+title+"</dt><dd><img src=\""+image+"\" alt=\"\"><p>"+description+"</p></dd>");
		   }//end if
		   } ); //end each
	 }//end showme
	 
	 showme("#webport", "websites");
	  showme("#printport", "print");
	   showme("#idport", "ident");
	 $('dl').Accordion({ active: false,
					      alwaysOpen: false 
						  });
	
	 
	   }//success
	   });


});
