// remap jQuery to $
(function($){})(window.jQuery);


/* trigger when page is ready */
$(document).ready(function (){
 
	//Tell the function where the feed is located
	$.getJSON("/json/plaza.php", function(data){
	
		//Grab each of the "entries"
		//console.log(data[1].global_topic.title);
		
		var myHTMLString = '';		
		
		//for(var i = 0 ; i < 3 ; i++){
		for(var i = 0 ; i < data.length ; i++){
		
			 myHTMLString = myHTMLString + '<h3><a href="' + data[i].global_topic.short_url + '" target="_blank">' + data[i].global_topic.title + '<a></h3>'
		 
		}
		
		$('#json-div').html(myHTMLString);
		
	
	});	
	//alert("hello?");


//end ready
});




$(window).load(function() {
	
	//alert("I'm the window load function");
	$('#featured').orbit({
		bullets: false,
		animation: 'fade',
		directionalNav: false,
		timer: true,
		advanceSpeed: 8000
	});
	
});

/* optional triggers

$(window).resize(function() {
	
});

*/
