// JavaScript Document

/*
function showDemo(){
        $('#sendDemo_link').colorbox({href:"../askforhelp/demo_send_money.html"});
        $('#registerDemo_link').colorbox({href:"../askforhelp/demo_register.html"});
        $('#addingAReceiverDemo_link').colorbox({href:"../askforhelp/demo_adding_receiver.html"});
        $('#howToUseQuickSendDemo_link').colorbox({href:"../askforhelp/demo_quick_send.html"});
        $('#modesOfRemittanceDemo_link').colorbox({href:"../askforhelp/demo_modes_of_remittances.html"});
        $('#passwordManagementDemo_link').colorbox({href:"../askforhelp/demo_password_management.html"});
        $('#transactionCancellationDemo_link').colorbox({href:"../askforhelp/demo_transaction_cancellation.html"});
}*/

$(document).ready(function(){
	$('#sendDemo_link').colorbox({href:"http://www.click2remit.com/askforhelp/demo_send_money.html"});
        $('#registerDemo_link').colorbox({href:"http://www.click2remit.com/askforhelp/demo_register.html"});
        $('#addingAReceiverDemo_link').colorbox({href:"http://www.click2remit.com/askforhelp/demo_adding_receiver.html"});
        $('#howToUseQuickSendDemo_link').colorbox({href:"http://www.click2remit.com/askforhelp/demo_send_money.html"});
        $('#modesOfRemittanceDemo_link').colorbox({href:"http://www.click2remit.com/askforhelp/demo_modes_of_remittances.html"});
        $('#passwordManagementDemo_link').colorbox({href:"http://www.click2remit.com/askforhelp/demo_password_management.html"});
        $('#transactionCancellationDemo_link').colorbox({href:"http://www.click2remit.com/askforhelp/demo_transaction_cancellation.html"});

	
	 $("tr.fieldrow").bind("mouseenter",function(){
      	var index=$("tr.fieldrow").index(this);
			$(".call"+index).fadeIn('slow');
     }).bind("mouseleave",function(){
      var index=$("tr.fieldrow").index(this);
			$(".call"+index).fadeOut('fast');	
    });
	 $('body').bind('click', function(e) {
		var $clicked=$(e.target);
		if($clicked.is('#personalized') || $clicked.parents().is('#personalized')) {
			$('#personalized').show();																
		} else {
			$('#personalized').hide();
		}
  	});	
});




function showPersonalized(){
	$('#personalized').show();		
}

//menu
var current_tab = "m1";
var timeout	= 100;
var closetimer	= 0;
var ddmenuitem	= 0;

// open hidden layer
function mopen(id)
{		
	// cancel close timer
	var sddm = document.getElementById('nav');
	mcancelclosetime();

	// close old layer
	if(ddmenuitem) ddmenuitem.style.visibility = 'hidden';

	// get new layer and show it
	ddmenuitem = document.getElementById(id);
	ddmenuitem.style.visibility = 'visible';
}
// close showed layer
function mclose()
{
	if(ddmenuitem) ddmenuitem.style.visibility = 'hidden';
}

// go close timer
function mclosetime()
{
	closetimer = window.setTimeout(mclose, timeout);
}

// cancel close timer
function mcancelclosetime()
{
	
	if(closetimer)
	{
		window.clearTimeout(closetimer);
		closetimer = null;
	}
}

// close layer when click-out
document.onclick = mclose; 






var current = "1";
function pageSwitch (id){
	if(!document.getElementById) return false;
	var div = document.getElementById("step"+id);
	var curDiv = document.getElementById("step"+current);
	div.style.display = "block";
	curDiv.style.display = "none";
	current = id;
}




function showReminder(id){
	var div = document.getElementById("reminder-tooltip"+id);
	$(div).show('slow');
}
function closeReminder(id){
	var div = document.getElementById("reminder-tooltip"+id);
	$(div).fadeOut();
}



currentFaq=1;
/*
function showOptions(id){
	var div = document.getElementById("faq-title"+id);
	var curDiv = document.getElementById("faq-title"+currentFaq);
	curDiv.style.display="none";
	div.style.display="block";
	currentFaq=id;
}*//*
function show(num){
	document.getElementById('ans'+num).style.display = 'block';
	document.getElementById('anslink'+num).style.display = 'none';
	document.getElementById('hidelink'+num).style.display = 'block';
	document.getElementById('que'+num).href = 'javascript:hide('+num+');';
}
function hide(num){
	document.getElementById('ans'+num).style.display = 'none';
	document.getElementById('anslink'+num).style.display = 'block';
	document.getElementById('hidelink'+num).style.display = 'none';
	document.getElementById('que'+num).href = 'javascript:show('+num+');';
}

function showmore(){
	document.getElementById('compareexpand').style.display = 'block';
	document.getElementById('expandlink').style.display = 'none';
}
*/

