// JavaScript Document

// center body in the whole page vertical
function centerV(){
	heightBody = $('#bodyArea').height();

	heightWindow = $(window).height();

	if (heightWindow > heightBody){
	padTopBottom = Math.round((heightWindow - heightBody) / 2);
	$('#bodyArea').css('margin-top', padTopBottom +'px')
	}
}


$('document').ready(function(){
							 
							 // Top dawa website nav, 
							 // mouseover nav swap images name...
							 // jpg=>name..._1.jpg =>name...jpg
							 
$('#dawa_top_nav .mo').hover(function(){
   el = $(this);
   v = el.attr('src');
   if (!el.hasClass('nav_active'))
   {
	   el.attr('src',v.replace('.jpg', '_1.jpg'));
   }
   
   }, function(){
	   el = $(this);
	   v = el.attr('src');
   if (!el.hasClass('nav_active')){ 
	   el.attr('src',v.replace('_1.jpg', '.jpg'));
   }
   });

   centerV(); 
   // vertical center body of page
   setTimeout(function(){ centerV(); }, 1000);
   
   // vertical center body of page
   setTimeout(function(){ centerV(); }, 3000);
   
      // vertical center body of page
   setTimeout(function(){ centerV(); }, 6000);
});
