// JavaScript Document

jQuery.noConflict();

jQuery(document).ready(function(){

     jQuery("#news").show(); //usually news
     jQuery("#tweets").hide();
	 jQuery("#homenews").hide();
	 jQuery("#promo").hide("fast"); //hack to show news

   jQuery("#homenewsbtn").click(function () {
     jQuery("#homenews").show("normal");
     jQuery("#about").hide();
   });
   
   jQuery("#aboutbtn").click(function () {
     jQuery("#homenews").hide();
     jQuery("#about").show("normal");
   });

   jQuery("#promobtn").click(function () {
     jQuery("#news").hide();
     jQuery("#tweets").hide();
     jQuery("#promo").show("fast");
   });
 
   jQuery("#newsbtn").click(function () { 
     jQuery("#promo").hide();
     jQuery("#tweets").hide();
     jQuery("#news").show("fast");
   });
 
   jQuery("#tweetsbtn").click(function () { 
     jQuery("#news").hide();
     jQuery("#promo").hide();
     jQuery("#tweets").show("fast");
   });
   
   //People's Gallery AJAX calls
   /*jQuery("#peoples_left_arrow").click(function () {
		var page_num = this.name;
		jQuery("#peoplesgalleryimages").load("../modules/peoples.php?page="+page_num);
	});
   
   jQuery("#peoples_right_arrow").click(function () {
		var page_num = this.name;
		jQuery("#peoplesgalleryimages").load("../modules/peoples.php?page="+page_num);
	});*/

   
 });

function load_peoples(page_number,group_id)
{
	jQuery("#peoples_photos").empty().html("<img src='../../../images/icons/ajax-loader.gif' />");
	//jQuery("#peoples_photos").toggle();
	jQuery("#peoplesgalleryimages").load("../modules/peoples.php?page="+page_number+"&group_id="+group_id);
}

function load_peoples_small(page_number,flickrTags)
{
	jQuery("#peoples_photos").empty().html("<img src='../../../images/icons/ajax-loader.gif' />");
	//jQuery("#peoples_photos").toggle();
	jQuery("#peoplesgalleryimages").load("../modules/peoples_small.php?page="+page_number+"&flickrTags="+flickrTags);
}

function load_peoples_gallery(page_number,flickrTags)
{
	jQuery("#peoples_photos").empty().html("<img src='../../../images/icons/ajax-loader.gif' />");
	//jQuery("#peoples_photos").toggle();
	jQuery("#peoplesgallerygrid").load("../modules/peoples_gallery.php?page="+page_number+"&flickrTags="+flickrTags);
}
