// Whistler Blackcomb Whats New Panel - Latest News
// Built September 14, 2010.  WBImedia
// Visit whistlerblackcomb.com for more information.

$(function() {

	$.get("http://www.whistlerblackcomb.com/local/xml/wn_news.xml",{},function(xml){
      	
	// Build an HTML string
		pContentN = '';
	 	pContentN += '<table class="wn_news" width="100%" border="0" cellspacing="0">';

	  	
		// Run the function for each student tag in the XML file
		$('news',xml).each(function(i) {
			wnn1 = $(this).find("content").text();
			wnn2 = $(this).find("link").text();


 	if (i == 3) return false;
 	
			// Build row HTML data and store in string
			mDataN = buildNews(wnn1, wnn2);
			pContentN = pContentN + mDataN;
			

				});
				
		pContentN += '</table>';
		
		// Update the DIV called Content Area with the HTML string
		$("#menuFeed1").append(pContentN);
	});
});
 

 
 function buildNews(){
	

	// Build HTML string and return
	output = '';
	output += '<tr>';
	output += '<td>' + wnn1 + '</td></tr><tr><td><a href="' + wnn2 + '">More Information  &raquo;</a></td>';
	output += '</tr>';
	return output;
}
	 

