// Email Harvesting prevention
function spawnMail(receipient){
	window.location="mail"+"to:"+ receipient +"@"+"arrkgroup"+"."+"com";
	return false;
}



if (document.images)
{
  pic1= new Image(); 
  pic1.src="images/button/mBtns/mbtn_left_default.png"; 

  pic2= new Image(); 
  pic2.src="images/button/mBtns/mbtn_right_default.png"; 

  pic3= new Image(); 
  pic3.src="images/button/mBtns/mbtn_left_hover.png";
  
  pic4= new Image(); 
  pic4.src="images/button/mBtns/mbtn_right_hover.png";

  pic5= new Image(); 
  pic5.src="images/button/mBtns/mbtn_left_click.png";
  
  pic6= new Image(); 
  pic6.src="images/button/mBtns/mbtn_right_click.png";   
}

// Define the hover function
		function mBtnHover(){
			$('span.mBtnLeft', $(this).parent()).addClass("mBtnLeftHover");
			$('span.mBtnRight', $(this).parent()).addClass("mBtnRightHover");
			$('span.mBtnTxt', $(this).parent()).addClass("mBtnTxtHover");
			$('span.mBtnTxt1', $(this).parent()).addClass("mBtnTxtHover");
		};

// Define the remove hover function			
		function mBtnRemoveHover(){
			$('span.mBtnLeft', $(this).parent()).removeClass("mBtnLeftHover");
			$('span.mBtnRight', $(this).parent()).removeClass("mBtnRightHover");
			$('span.mBtnTxt', $(this).parent()).removeClass("mBtnTxtHover");
			$('span.mBtnTxt1', $(this).parent()).removeClass("mBtnTxtHover");
		};

// Define the down State function
		function mBtnDown(){
			$('span.mBtnLeft', $(this).parent()).addClass("mBtnLeftDown");
			$('span.mBtnRight', $(this).parent()).addClass("mBtnRightDown");
			$('span.mBtnTxt', $(this).parent()).addClass("mBtnTxtDown");
			$('span.mBtnTxt1', $(this).parent()).addClass("mBtnTxtDown");
		
		};

// Define the up state function
		function mBtnUp(){
			$('span.mBtnLeft', $(this).parent()).removeClass("mBtnLeftDown");
			$('span.mBtnRight', $(this).parent()).removeClass("mBtnRightDown");
			$('span.mBtnTxt', $(this).parent()).removeClass("mBtnTxtDown");
			$('span.mBtnTxt1', $(this).parent()).removeClass("mBtnTxtDown");
		};

function initMagicButton(){
// Find A tags with the magicBtn Class and build the button around them
		$(".magicBtn").each(function(i){
			this.innerHTML = "<span class='mBtnLeft'/><span class='mBtnTxt'>"+this.innerHTML+"</span></span><span class='mBtnRight'></span>";
		});
		$(".magicBtn1").each(function(i){
			this.innerHTML = "<span class='mBtnLeft'/><span class='mBtnTxt1'>"+this.innerHTML+"</span></span><span class='mBtnRight'></span>";
		});
		
// Add the hover behaviour
		$(".mBtnLeft").hover(mBtnHover, mBtnRemoveHover);
		$(".mBtnRight").hover(mBtnHover, mBtnRemoveHover);
// Add the mouse click behaviour				
		$(".mBtnLeft").mousedown(mBtnDown);
		$(".mBtnRight").mousedown(mBtnDown);		
// Add the mouse release behaviour
		$(".mBtnLeft").mouseup(mBtnUp);
		$(".mBtnRight").mouseup(mBtnUp);				
// Add the mouse release outside behaviour	
		$(".mBtnLeft").mouseout(mBtnUp);
		$(".mBtnRight").mouseout(mBtnUp);	
};


