$(document).ready(function() {
  $('#maldives').click(function() {
	
	 //$('#maldives a').fadeOut('slow', function(){
	  $('#hulhumale a').removeClass("active");	
	  $('#hulhumale a').addClass("not_active");
	  $('#hulhumale li').removeClass("active");	
	  $('#hulhumale li').addClass("not_active");
	  
	  $('#maldives a').removeClass("not_active");	
	  $('#maldives a').addClass("active");
	  $('#maldives li').removeClass("not_active");	
	  $('#maldives li').addClass("active");

	  $(this).removeClass("not_active");
	  $(this).addClass("active");
	  
	  $('#div_hulhumale').addClass("hide");
	  $('#div_maldives').removeClass("hide");
	  
	  $('#maldives a').fadeIn('slow');
									  

      //$(this).fadeOut('slow', function(){
		//$('.topTen_infoBox_leftColl a').removeClass("topTen_infoBox_leftColl_selected");	
		//$(this).fadeIn('slow');
		//$(this).addClass("topTen_infoBox_leftColl_selected");
		//$(load_div).fadeOut('fast');	
		//load_todiv(load_div, urltoload);
		//$(load_div).fadeIn('slow');
		
		//alert('clicked');
		
//return false; 
      //});
	
  });						   
// return false to prevent normal browser submit and page navigation 
return false; 
});

$(document).ready(function() {
  $('#hulhumale').click(function() {
	
	 //$('#maldives a').fadeOut('slow', function(){
	  $('#maldives a').removeClass("active");	
	  $('#maldives a').addClass("not_active");
	  $('#maldives li').removeClass("active");	
	  $('#maldives li').addClass("not_active");
	  
	  $('#hulhumale a').removeClass("not_active");	
	  $('#hulhumale a').addClass("active");
	  $('#hulhumale li').removeClass("not_active");	
	  $('#hulhumale li').addClass("active");

	  $(this).removeClass("not_active");
	  $(this).addClass("active");
	  
	  $('#div_maldives').addClass("hide");
	  $('#div_hulhumale').removeClass("hide");
	  
	  $('#hulhumale a').fadeIn('slow');
									  

      //$(this).fadeOut('slow', function(){
		//$('.topTen_infoBox_leftColl a').removeClass("topTen_infoBox_leftColl_selected");	
		//$(this).fadeIn('slow');
		//$(this).addClass("topTen_infoBox_leftColl_selected");
		//$(load_div).fadeOut('fast');	
		//load_todiv(load_div, urltoload);
		//$(load_div).fadeIn('slow');
		
		//alert('clicked');
		
//return false; 
      //});
	
  });						   
// return false to prevent normal browser submit and page navigation 
return false; 
});



$(document).ready(function() {
  $('#announce_tab').click(function() {
	
	 //$('#maldives a').fadeOut('slow', function(){
	  $('#project_tab a').removeClass("active");	
	  $('#project_tab a').addClass("not_active");
	  $('#project_tab li').removeClass("active");	
	  $('#project_tab li').addClass("not_active");
	  
	  $('#announce_tab a').removeClass("not_active");	
	  $('#announce_tab a').addClass("active");
	  $('#announce_tab li').removeClass("not_active");	
	  $('#announce_tab li').addClass("active");

	  $(this).removeClass("not_active");
	  $(this).addClass("active");
	  
	  //$('#div_maldives').addClass("hide");
	 // $('#div_hulhumale').removeClass("hide");
	  
	  $('#announce_tab a').fadeIn('slow');
									  

      //$(this).fadeOut('slow', function(){
		//$('.topTen_infoBox_leftColl a').removeClass("topTen_infoBox_leftColl_selected");	
		//$(this).fadeIn('slow');
		//$(this).addClass("topTen_infoBox_leftColl_selected");
		 //var url = $(".load_x").attr("id"); ///url == to the id of the <a> link
     $("#load_div").html("<div class='date'> <div class='title'> <div class='tabs2_content'><img src='../images/loading.gif' /> ... loading</div></div></div>").fadeIn('slow');

    $("#load_div").load("../load_announcement.php");
	//$("#load_div").fadeOut('slow');
	//$("#load_div").fadeIn('slow');
		
		//alert('clicked');
		
//return false; 
      //});
	
  });						   
// return false to prevent normal browser submit and page navigation 
return false; 
});

$(document).ready(function() {
  $('#project_tab').click(function() {
	
	 //$('#maldives a').fadeOut('slow', function(){
	  $('#announce_tab a').removeClass("active");	
	  $('#announce_tab a').addClass("not_active");
	  $('#announce_tab li').removeClass("active");	
	  $('#announce_tab li').addClass("not_active");
	  
	  $('#project_tab a').removeClass("not_active");	
	  $('#project_tab a').addClass("active");
	  $('#project_tab li').removeClass("not_active");	
	  $('#project_tab li').addClass("active");

	  $(this).removeClass("not_active");
	  $(this).addClass("active");
	  
	  //$('#div_maldives').addClass("hide");
	 // $('#div_hulhumale').removeClass("hide");
	  
	  $('#project_tab a').fadeIn('slow');
									  

      //$(this).fadeOut('slow', function(){
		//$('.topTen_infoBox_leftColl a').removeClass("topTen_infoBox_leftColl_selected");	
		//$(this).fadeIn('slow');
		//$(this).addClass("topTen_infoBox_leftColl_selected");
		 //var url = $(".load_x").attr("id"); ///url == to the id of the <a> link
		 
     $("#load_div").html("<div class='date'> <div class='title'> <div class='tabs2_content'><img src='../images/loading.gif' /> ... loading</div></div></div>").fadeIn('slow');
    $("#load_div").load("../load_projects.php");
	//$("#load_div").fadeOut('slow');
	//$("#load_div").fadeIn('slow');
		
		//alert('clicked');
		
//return false; 
      //});
	
  });						   
// return false to prevent normal browser submit and page navigation 
return false; 
});






		//$('#topTen_infoBox_leftColl a').removeClass("topTen_infoBox_leftColl_selected")	
		//$(this).fadeIn('slow');
		//$(this).addClass("topTen_infoBox_leftColl_selected")

/// downloads_browse.php list all files for the rspective download
$(document).ready(function() {						   
  $('.xxx').click(function() {

   // $("#div_to_load").html("    <img src='../js/thickbox/loadingAnimation.gif' />.... Generating Translations ... Please wait").fadeIn('slow');
		
   var url = $(".load_x").attr("id"); ///url == to the id of the <a> link
   var txt = '.... Loading ... Please wait';
   var id = this.id;

     var load_to_div = '#div_to_load_' + id;
	 //$("tr:first").removeClass(id + " hide");
	 $('tr.xyz').addClass("hide");  ///tr.xyz -- xyz is a class common to all load dives (necessary to hide the loaded dives)
	 $('tr.backLight'+id).removeClass("hide"); //tr.backLight'+id  -- unique classname to identify and show the clicked one
	load_todiv(load_to_div, url, txt); 
	this.blur();
    //alert(load_to_div);
	//alert(url);

return false; 
 });
 });
// end of downloads_browse.php list all files for the rspective download


function load_todiv(divtoload, url, txt){
    $(divtoload).html('    <img src="../images/loading.gif" />'+ txt ).fadeIn('slow');	
    $(divtoload).load(url);	

}