$("#top_links").ready(function(){
   /*if ($.browser.msie && ($.browser.version == 6)) // css fixes
   {
       $("#top_links li + li").css("padding-left","10px").css("border-left","1px solid #808080");
   }*/
});

function loadAll()
{
   // put autocomplete initialization here, and any other global javascript setup
   //$(document).pngFix();

   //var roundedRadius = 5;

   $("#news_container, #features_container").equalizeCols();

 //  $("#top_list").idTabs();

   //$("#region_list").tabs();

  // rounded corners

//$("#news_container, #city_directory_container, #ad_container, #features_container, #top_list_container, #sponsored_container, #welcome_box").corner(roundedRadius + "px");
   //$("#americas, #europe, #africa, #asia, #middle_east, #oceana, #top_cities, #top_websites, #top_keywords, #login_tab, #create_account, #login_container h2, #region_list > li, #top_list > li").corner("tl tr " + roundedRadius + "px");
   //$("#login_box").corner("bl br tr " + roundedRadius + "px");

   $(".tabs_box").css("background-color","white");

   if ($.browser.msie && ($.browser.version == 6)) // css fixes
   {
       $("#num_cities").css("top","8px");
       //$("#num_cities").wrapInner('<div id="ie6_num_cities"></div>');
       //$("#ie6_num_cities").css("margin-top","40px");

       
   }



    fixDirectoryTabs();



   $("#region_list, #top_list").tabs();
       if ($.browser.msie && ($.browser.version == 6))
   {
               $("#region_list").parent().css("height","10px");
       }
  // $("#top_list, #region_list").idTabs();

       /*if ($.browser.msie && ($.browser.version == 6))
   {
       $(.ui-tabs-selected > a).attr("style","text-decoration: none !important;background: none;background-color: white;border-bottom: 1px solid white !important;color: #d9990f !important;font-weight: bold;padding: 9px 7px 3px 7px !important;");
   }*/

	$('#region_list').bind('tabsload', function(event, ui) {
	  fixDirectoryTabs();
	});

}

function fixDirectoryTabs() {
	$(".div_tab > ul > li:odd").each(function(){
	           var prevHeight = $(this).prev().height();
	           var thisHeight = $(this).height();
	           if (prevHeight != thisHeight) {

	               if (prevHeight > thisHeight)
	               {
	                   newheight = prevHeight;
	               }
	               else
	               {
	                   newheight = thisHeight;
	               }
	               $(this).height(newheight);
	               $(this).prev().height(newheight);
	           }
	   });

	   $(".div_tab").css("float", "left");
	   $(".div_tab").css("display", "none");
}

function moveAds() {
       $("#sponsored_ads_hidden iframe").appendTo('#sponsored_ads');
       $("#ad_container_hidden iframe").appendTo('#ad_container');
}
