document.onkeypress = prePaidCardKeyHandler;
   
function prePaidCardKeyHandler(evt){

	if(evt==null){
		evt=window.event;
	}
	if(evt==null)
		return ;
			
	if(isEnterKeyPressed(evt)){
		prepaidClamshellEnterPressed();
		evt.returnValue=false;
    	evt.cancel = true;
		return false;
	}else{
		return true;
	}
	
}

	function prepaidClamshellEnterPressed(){
	if ($("#prePaidPanel").attr("id")!=null && $("#prePaidPanel").hasClass("ui-state-active") && document.getElementById("loginDD").style.display=='none'
	 && document.getElementById("gcTab2").style.display=='none' && document.getElementById("ppSlider").style.left=='-270px'){
		if($('#ppCardCode').val()!=null && (!(document.getElementById("ppCardCode").className=="toggleval")) && (!(trimAll($('#ppCardCode').val()))=="") ){				
				if (trimAll($('#ppCardCode').val()).length == 8 && !isNaN($('#ppCardCode').val())){
				var binNum = document.getElementById('ppCardCode').value;
					var URL = lookupBin(binNum);
					if(URL==null){
						showErrModalWin('show3');							
					}else{
					document.location.href = URL ;
					}
				}else{
				showErrModalWin('show2');							
				}
			}else {
				showErrModalWin('show1');
			}
		}else if ($("#prePaidLogInPanel").attr("id")!=null && document.getElementById("prePaidLogInPanel").style.display=='block'){ 
		 if($('#prepaidLoginInput').val()!=null && (!(document.getElementById("prepaidLoginInput").className=="prepaidLoginInput toggleVal toggleval")) && (!(trimAll($('#prepaidLoginInput').val()))=="") ){
				if (trimAll($('#prepaidLoginInput').val()).length == 8 && !isNaN($('#prepaidLoginInput').val())){
				var loginBinNum = document.getElementById('prepaidLoginInput').value;
					var URL = lookupBin(loginBinNum);
					if(URL==null){
						showErrModalWin('show3');							
					}else{
					document.location.href = URL ;
					}
				}else{
				showErrModalWin('show2');							
				}
			}else {
				showErrModalWin('show1');
			}
		}			
}

	$(function(){
	try{	
					$('.prepaidNext').click(function(){
						$('.prepaidslider').animate({left: '-270px'});
						return false;
					});
					
					$('.prepaidPrevious').click(function(){
						$('.prepaidslider').animate({left: '0'});
						return false;
					});
				
		$('.inmateButton').click(function(){
			$('.startBillPanel').hide();
			$('.inmateBillPanel').show();
			
			return false;
		});
		
		
		$('.inmateBackButton').click(function(){
			$('.inmateBillPanel').hide();
			$('.startBillPanel').show();
			
			return false;
		});
		
		
		$('.billPayTab2').hide();
		$('.billPayTab, .billPayTab2').click(function(){
			$('.billPayTab').toggle();
			$('.billPayTab2').toggle();
			
			$('.pane2').hide();
			$('.billPayTab').toggleClass('open2');
			
			if ($('.billPayTab').hasClass('open2')){
				$('.otherPaymentPane').show();
				
			} else {
				$('.billPayPane').show();
			}
		});
		
		
		$('.giftCardTab2').hide();
				$('.giftCardPane').hide();
		
	
		$('.giftCardTab, .giftCardTab2').click(function(){
			$('.giftCardTab').toggle();
			$('.giftCardTab2').toggle();
			
			$('.pane').hide();
			$('.giftCardTab').toggleClass('open');
			
			if ($('.giftCardTab').hasClass('open')){
				$('.giftCardPane').show();
				
			} else {

				$('.prePaidPane').show();
				$('.prepaidslider').show();
			}
		});
			 
		
		$('.languageDrop').hide();
		$('.languageSelect, .languageDrop a').click(function(){
			$('.languageDrop').toggle();
			return false;
		});
		
		
		$(".loginSelect").change(function(){
			
			$("#header .loginDropDown .panel").hide();
			panel = $(this).val();
			
			
			$(".loginSelect").val($(".loginSelect option:first").val());
			
			
			$("#header .loginDropDown ." + panel).show();
		});
		
		
		$("#login .loginBox .loginDropBox").hide();
		
		
		$("#login .loginBox .radioButton").click(function(){
			if ($("#login .loginBox .radioButton:checked").val() == 'return'){
				$("#login .loginBox .loginDropBox").fadeIn('fast');
			}
			if ($("#login .loginBox .radioButton:checked").val() == 'new'){
				$("#login .loginBox .loginDropBox").fadeOut('fast');
			}
		});
		
		
		$(".button").click(function(){
			
			$("#login .loginBox .panel").hide();
			
			
			$(".button").removeClass('active');
			
			
			$(this).addClass('active');
			
			
			if ($(this).hasClass("sendMoneyLink")) {
				$("#login .loginBox .loginSendMoney").show();
			} else if ($(this).hasClass("goldCardRewardsLink")) {
				$("#login .loginBox .loginGoldCard").show();
			} else if ($(this).hasClass("goldCardPhoneLink")) {
				$("#login .loginBox .loginPhone").show();
			} else if ($(this).hasClass("prePaidLink")) {
				$("#login .loginBox .loginPrePaid").show();
			} else if ($(this).hasClass("wuPerksLink")) {
				$("#login .loginBox .loginPerks").show();
			} else if ($(this).hasClass("agentsLink")) {
				$("#login .loginBox .loginAgent").show();
			}
			
			return false;
		});
		
		
		$(".loginButton").click(function(){
			
			$("#header .loginDropDown .panel").hide();
			$("#header .loginDropDown .mainTitle").hide();
			
			
			if ($(this).hasClass("sendMoneyLink")) {
				$("#header .loginDropDown .loginSendMoney").show();
			} else if ($(this).hasClass("goldCardRewardsLink")) {
				$("#header .loginDropDown .loginGoldCard").show();
			} else if ($(this).hasClass("goldCardPhoneLink")) {
				$("#header .loginDropDown .loginPhone").show();
			} else if ($(this).hasClass("prePaidLink")) {
				$("#header .loginDropDown .loginPrePaid").show();
			} else if ($(this).hasClass("wuPerksLink")) {
				$("#header .loginDropDown .loginPerks").show();
			} else if ($(this).hasClass("agentsLink")) {
				$("#header .loginDropDown .loginAgent").show();
			}
			
			return false;
		});
		
		
		$(".helpIcon").qtip({
						content: {title: 'Contextual Header', text: 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.' },
						show: 'mouseover',
						hide: 'mouseout',
						style: { width: 200, padding: 5, background: '#fff', color: '#000', name: 'dark', tip: false, 'font-size': 10, 'padding': 3,
							border: { width: 1, radius: 3, color: '#ffdf1c' },
							title: {'color': '#000', 'font-size': 11, 'height': 12, 'margin': 2, 'margin-top': 0, 'padding': 5, 'padding-bottom': 0, 'background': '#fff', 'font-weight': 'bold' }
						},
						position: { adjust: { screen: true } }	
						});
		$(".helpIcon2").qtip({
						content: {text: 'Your Money Transfer Control Number (MTCN) is the 10-digit number provided on your receipt or transfer confirmation page and confirmation e-mail if your transfer was made online.' },
						show: 'mouseover',
						hide: 'mouseout',
						style: { width: 200, padding: 5, background: '#fff', color: '#000', name: 'dark', tip: false, 'font-size': 10, 'padding': 3,
							border: { width: 1, radius: 3, color: '#ffdf1c' },
							title: {'color': '#000', 'font-size': 11, 'height': 12, 'margin': 2, 'margin-top': 0, 'padding': 5, 'padding-bottom': 0, 'background': '#fff', 'font-weight': 'bold' }
						},
						position: { adjust: { screen: true } }	
						});
	}catch(e)
	{
	}		
		try{
		$("#header .loginDropDown").hide();
		$("#header .userLoginLink").click(function(){
		$("#header .loginDropDown .mainTitle").show();
			if (!$("#header .userLoginLink").hasClass("userLinkActive")){
				$("#header .userLoginLink").addClass("userLinkActive");
				
				$('#content .accordion select:visible').addClass('revert');
				$('#content .accordion select:visible').hide();
				$("#header .loginDropDown").show();
			} else {
				$("#header .userLoginLink").removeClass("userLinkActive");
				$("#header .loginDropDown").hide();
				$("#header .loginDropDown .panel").hide();
				$("#header .loginDropDown .loginMenu").show();
				
				$('#content .accordion .revert').show();
			}
			return false;
		});
		
		$("#header .closeLogin").click(function(){
			$("#header .userLoginLink").removeClass("userLinkActive");
			$("#header .loginDropDown").hide();
			$("#header .loginDropDown .panel").hide();
			$("#header .loginDropDown .loginMenu").show();
			return false;
		});
		}catch(e)
	{
	}
		
		try
		{
		$(".pngFix").ifixpng();
		$("h3").ifixpng();
		$(".panel .sendMoneyContent").ifixpng();
		$(".panel .checkTransferContent").ifixpng();
		$(".panel .goldCardContent").ifixpng();
		$(".panel .prePaidContent").ifixpng();
		$(".panel .billPayContent").ifixpng();
		$(".panel .billPayButton").ifixpng();
		

		
		$('.nextHide').hide();
		$('.billPayMort').hide();
		$('.billPayFin').hide();
		
		
		$('.nextPanel').click(function(){
			
			sliderEle = $(this).closest('.slider');
			$(sliderEle).animate({left: '-=275px'}, 'slow');
			return false;
		}); 
		
		
		$('.prevPanel').click(function(){
			
			sliderEle = $(this).closest('.slider');
			$(sliderEle).animate({left: '+=275px'}, 'slow');
			return false;
		});
		
		
		$('#transferCountry').change(function(){
			value = $('#transferCountry :selected').val();
			switch(value){
				case 'CAN': $('#transferCaProv').fadeIn();$('#transferUsState').hide();$('#transferAustProv').hide();$('.transferNextButt1').hide();break;
				case 'AUS': $('#transferAustProv').fadeIn();$('#transferUsState').hide();$('#transferCaProv').hide();$('.transferNextButt1').hide();break;
				case 'USA': $('#transferUsState').fadeIn();$('#transferCaProv').hide();$('#transferAustProv').hide();$('.transferNextButt1').hide();break;
				case '': $('#transferUsState').hide();$('#transferCaProv').hide();$('#transferAustProv').hide();$('.transferNextButt1').hide();break;
				default: $('#transferUsState').hide();$('#transferCaProv').hide();$('#transferAustProv').hide();$('.transferNextButt1').fadeIn();break;
			}
		});
		
		
		$('#transferCaProv').change(function(){
			value = $('#transferCaProv :selected').val();
			switch(value){
				case '': $('.transferNextButt1').hide();break;
				default: $('.transferNextButt1').fadeIn();break;
			}
		});
		
		
		$('#transferUsState').change(function(){
			value = $('#transferUsState :selected').val();
			switch(value){
				case '': $('.transferNextButt1').hide();break;
				default: $('.transferNextButt1').fadeIn();break;
			}
		});
		
		
		$('#transferAustProv').change(function(){
			value = $('#transferAustProv :selected').val();
			switch(value){
				case '': $('.transferNextButt1').hide();break;
				default: $('.transferNextButt1').fadeIn();break;
			}
		});
		
		
		$('#transferTCountry').change(function(){
			value = $('#transferTCountry :selected').val();
			switch(value){
				case 'CAN': $('#transferTCaProv').fadeIn();$('#transferTUsState').hide();$('#transferTAustProv').hide();$('.transferNextButt2').hide();break;
				case 'AUS': $('#transferTAustProv').fadeIn();$('#transferTUsState').hide();$('#transferTCaProv').hide();$('.transferNextButt2').hide();break;
				case 'USA': $('#transferTUsState').fadeIn();$('#transferTCaProv').hide();$('#transferTAustProv').hide();$('.transferNextButt2').hide();break;
				case '': $('#transferTUsState').hide();$('#transferTCaProv').hide();$('#transferTAustProv').hide();$('.transferNextButt2').hide();break;
				default: $('#transferTUsState').hide();$('#transferTCaProv').hide();$('#transferTAustProv').hide();$('.transferNextButt2').fadeIn();break;
			}
		});
		
		
		$('#transferTCaProv').change(function(){
			value = $('#transferTCaProv :selected').val();
			switch(value){
				case '': $('.transferNextButt2').hide();break;
				default: $('.transferNextButt2').fadeIn();break;
			}
		});
		
		
		$('#transferTUsState').change(function(){
			value = $('#transferTUsState :selected').val();
			switch(value){
				case '': $('.transferNextButt2').hide();break;
				default: $('.transferNextButt2').fadeIn();break;
			}
		});
		
		
		$('#transferTAustProv').change(function(){
			value = $('#transferTAustProv :selected').val();
			switch(value){
				case '': $('.transferNextButt2').hide();break;
				default: $('.transferNextButt2').fadeIn();break;
			}
		});
		
		
		$('#transferType').change(function(){
			value = $('#transferType :selected').val();
			switch(value){
				case '': $('.transferAmount').hide();$('.amountHelp').hide();$('.transferNextButt3').hide();break;
				default: $('.transferAmount').val('Amount to send');$('.transferAmount').fadeIn();$('.amountHelp').fadeIn();break;
			}
		});
		
		
		$('#transferAmount').keyup(function(){
			value = $(this).val();
			if (value == 'Amount to send' || value == ''){
				$('.transferNextButt3').hide();
			} else {
				$('.transferNextButt3').fadeIn();
			}
		});
		
		
		$('#transferRecipientFirst').keyup(function(){
			recipientStep();
		});
		$('#transferRecipientLast').keyup(function(){
			recipientStep();
		});
		
		
		$('#billPayUsState').change(function(){
			value = $('#billPayUsState :selected').val();
			switch(value){
				case '': $('.billPayMort').hide();break;
				default: $('.billPayMort').fadeIn();break;
			}
		});
		
		
		$('#billPayMort').change(function(){
			value = $('#billPayMort :selected').val();
			switch(value){
				case '': $('.billPayFin').hide();break;
				default: $('.billPayFin').fadeIn();break;
			}
		});
		
		
		$('#billPayInst').change(function(){
			billPayStep();
		});
		
		
		$('#billPayOther').change(function(){
			billPayStep();
		});
		
		
		$("#content .accordion").accordion({ collapsible: true, active: false });
		
		}catch(e)
		{
		}
		accordInit();
		
		try
		{
		$("#contentBackground .rotatingSlides").cycle({fx: 'fade', speed: 2500, timeout: 8000, cleartype: 1});
		
		
		
		window.initState = false;
		$("#content .accordion").bind('accordionchangestart', function(event, ui) {
			
			
			if ($("#content h3").hasClass("ui-state-active")){ 
				initState = true;
			} else {
				initState = false;
			}
			
			
			if (!initState){
				accordInit();
				$("#contentBackground .rotatingSlides").cycle('resume');
				$('.slide').fadeIn();
				$(".heroSlide").fadeOut();
			} else {
				if ($("#content .sendMoneyPanel").hasClass("ui-state-active")){
					accordDeInit(2);
showPanel('.sendMoneySlide');
captureLinkOmni('SignInCl');
				} else if ($("#content .checkTransferPanel").hasClass("ui-state-active")){
					accordDeInit(3);
showPanel('.checkTransferSlide');
					captureLinkOmni('checkTransferCl');
				} else if ($("#content .goldCardPanel").hasClass("ui-state-active")){
					accordDeInit(4);
showPanel('.goldCardSlide');
					captureLinkOmni('goldCardCl');
				} else if ($("#content .prePaidPanel").hasClass("ui-state-active")){
					accordDeInit(5);
showPanel('.prePaidSlide');
					captureLinkOmni('prepaidCardsCl');
				} else if ($("#content .billPayPanel").hasClass("ui-state-active")){
					accordDeInit(6);
showPanel('.billPaySlide');
					captureLinkOmni('billPayCl');
				}
			}
		});
		
		$(".prePaidButton").click(function(){
			
			$("#content .accordion").accordion( 'activate' , 3 )
		});
		
		
		$("#content h3, #content .panel, #contentBackground").hover(function(){
			if (!initState) {
				$("#contentBackground .rotatingSlides").cycle('pause');
			}
		}, function(){
			if (!initState) {
				$("#contentBackground .rotatingSlides").cycle('resume');
			}
		});
		
		
		$('input.auto').focus(function(){
			$('input.auto').autoNumeric();
		});
		}
		catch(e)
		{
		}
		try
		{
		$("#loginUsername").toggleVal({ populateFrom: "label", removeLabels: true, focusClass: "hasFocus", changedClass: "isChanged" });
		$("#loginPassword").toggleVal({ populateFrom: "label", removeLabels: true, focusClass: "hasFocus", changedClass: "isChanged" });
		$("#loginCaptcha").toggleVal({ populateFrom: "label", removeLabels: true, focusClass: "hasFocus", changedClass: "isChanged" });
		
		$("#transferAmount").toggleVal({ populateFrom: "label", removeLabels: true, focusClass: "hasFocus", changedClass: "isChanged" });
		
		$("#transferRecipientFirst").toggleVal({ populateFrom: "label", removeLabels: true, focusClass: "hasFocus", changedClass: "isChanged" });
		$("#transferRecipientLast").toggleVal({ populateFrom: "label", removeLabels: true, focusClass: "hasFocus", changedClass: "isChanged" });
		
		$("#checkMTCN").toggleVal({ populateFrom: "label", removeLabels: true, focusClass: "hasFocus", changedClass: "isChanged" });
		$("#checkSendersFirst").toggleVal({ populateFrom: "label", removeLabels: true, focusClass: "hasFocus", changedClass: "isChanged" });
		$("#checkSendersLast").toggleVal({ populateFrom: "label", removeLabels: true, focusClass: "hasFocus", changedClass: "isChanged" });
		$("#checkReceiversFirst").toggleVal({ populateFrom: "label", removeLabels: true, focusClass: "hasFocus", changedClass: "isChanged" });
		$("#checkReceiversLast").toggleVal({ populateFrom: "label", removeLabels: true, focusClass: "hasFocus", changedClass: "isChanged" });
		
		$("#checkSendersFirst2").toggleVal({ populateFrom: "label", removeLabels: true, focusClass: "hasFocus", changedClass: "isChanged" });
		$("#checkSendersLast2").toggleVal({ populateFrom: "label", removeLabels: true, focusClass: "hasFocus", changedClass: "isChanged" });
			
		$("#ppCardCode").toggleVal({ populateFrom: "label", removeLabels: true, focusClass: "hasFocus", changedClass: "isChanged" });
		
		$("#countrySelect").toggleVal({ populateFrom: "label", removeLabels: true, focusClass: "hasFocus", changedClass: "isChanged" });
		$("#city").toggleVal({ populateFrom: "label", removeLabels: true, focusClass: "hasFocus", changedClass: "isChanged" });
		$("#state").toggleVal({ populateFrom: "label", removeLabels: true, focusClass: "hasFocus", changedClass: "isChanged" });
		$("#zip").toggleVal({ populateFrom: "label", removeLabels: true, focusClass: "hasFocus", changedClass: "isChanged" });
		$("#zipCode").toggleVal({ populateFrom: "label", removeLabels: true, focusClass: "hasFocus", changedClass: "isChanged" });
		
		$("#goldCardUsername").toggleVal({ populateFrom: "label", removeLabels: true, focusClass: "hasFocus", changedClass: "isChanged" });
		$("#goldCardPassword").toggleVal({ populateFrom: "label", removeLabels: true, focusClass: "hasFocus", changedClass: "isChanged" });
		
		$("#usernameAgents").toggleVal({ populateFrom: "label", removeLabels: true, focusClass: "hasFocus", changedClass: "isChanged" });
		$("#passwordAgents").toggleVal({ populateFrom: "label", removeLabels: true, focusClass: "hasFocus", changedClass: "isChanged" });
		
		$("#usernamePerks").toggleVal({ populateFrom: "label", removeLabels: true, focusClass: "hasFocus", changedClass: "isChanged" });
		$("#passwordPerks").toggleVal({ populateFrom: "label", removeLabels: true, focusClass: "hasFocus", changedClass: "isChanged" });
		
		$("#usernamePhone").toggleVal({ populateFrom: "label", removeLabels: true, focusClass: "hasFocus", changedClass: "isChanged" });
		$("#passwordPhone").toggleVal({ populateFrom: "label", removeLabels: true, focusClass: "hasFocus", changedClass: "isChanged" });

		$("#usernamePrePaid").toggleVal({ populateFrom: "label", removeLabels: true, focusClass: "hasFocus", changedClass: "isChanged" });
		$("#passwordPrePaid").toggleVal({ populateFrom: "label", removeLabels: true, focusClass: "hasFocus", changedClass: "isChanged" });

		$("#usernameSendMoney").toggleVal({ populateFrom: "label", removeLabels: true, focusClass: "hasFocus", changedClass: "isChanged" });
		$("#signInPasswordText").toggleVal({ populateFrom: "label", removeLabels: true, focusClass: "hasFocus", changedClass: "isChanged" });
		$("#passwordSendMoney").toggleVal({ populateFrom: "label", removeLabels: true, focusClass: "hasFocus", changedClass: "isChanged" });
		$("#captchaSendMoney").toggleVal({ populateFrom: "label", removeLabels: true, focusClass: "hasFocus", changedClass: "isChanged" });

		$("#usernameGoldCard").toggleVal({ populateFrom: "label", removeLabels: true, focusClass: "hasFocus", changedClass: "isChanged" });
		$("#passwordGoldCard").toggleVal({ populateFrom: "label", removeLabels: true, focusClass: "hasFocus", changedClass: "isChanged" });
		$(".toggleVal").toggleVal({ populateFrom: "label", removeLabels: true, focusClass: "hasFocus", changedClass: "isChanged" });
		
		
		$('.captchaLink').openDOMWindow({ 
			eventType:'click',
			borderSize: 0,
			width: 750,
			height: 500,
			windowBGColor: 'none'
		});
		
		
		$('.privacyLink').openDOMWindow({ 
			eventType:'click',
			borderSize: 0,
			width: 750,
			height: 500,
			windowBGColor: 'none'
		});
		
		$('.confirmationButton').click(function(){
			prepaidClamshellEnterPressed();
		});
		
		$('.confirmationButtonLoginPrepaid').click(function(){
			prepaidClamshellEnterPressed();
		});
		
		$('#registerBtn').openDOMWindow({ 
			eventType:'click',
			borderSize: 0,
			width: 750,
			height: 500,
			windowSourceID:'#confirmationMessage2', 
			windowBGColor: 'none'
		});
		}
		catch(e)
		{
		}
		
	});
	
	
	function accordInit(){
		
		try
		{
			$("#contentBackground").cycle('resume');
		
		
		activePanel = -1;
		
		
		
		$("#content h3 span").removeClass("small");
		$("#content .sendMoneyPanel").animate({height: "72px", lineHeight: "72px"}, 600);
		$("#content .checkTransferPanel").animate({height: "74px", lineHeight: "74px"}, 600);
		$("#content .goldCardPanel").animate({height: "73px", lineHeight: "73px"}, 600);
		$("#content .prePaidPanel").animate({height: "73px", lineHeight: "73px"}, 600);
		$("#content .billPayPanel").animate({height: "75px", lineHeight: "75px"}, 600);
		}
		catch(e)
		{
		}
	}
	
	
	function accordDeInit(panelAct){
		
		
		$("#content .accordion h3").animate({height: "30px", lineHeight: "34px"}, 310);
		$("#content h3 span").addClass("small");
	}
	
	
	function slideNum(number){
		$("#contentBackground").cycle(number);
		$('#content .accordion').accordion('activate', number);
		
		if (initState) {
			activePanel = number;
			$("#contentBackground").cycle('pause');
		}
	}
	
	
	function showPanel(heroName) {
		$(".heroSlide").fadeOut();
		if (initState) {
			$("#contentBackground .rotatingSlides").cycle('pause');
			$(heroName).fadeIn();
			$('.slide').fadeOut();
			
		} else {
			$("#contentBackground .rotatingSlides").cycle('resume');
			$('.slide').fadeIn();
			$(".heroSlide").fadeOut();
			
		}
	}
	
	function recipientStep(){
		value1 = $('#transferRecipientFirst').val();
		value2 = $('#transferRecipientLast').val();
		
		if (value1 == 'Recipient first name' || value1 == ''){
			$('.transferNextButt4').hide();
		} else {
			if (value2 == 'Recipient last name' || value2 == ''){
				$('.transferNextButt4').hide();
			} else {
				$('.transferNextButt4').fadeIn();	
			}
		}
	}
	
	function billPayStep(){
		value1 = $('#billPayInst').val();
		value2 = $('#billPayOther').val();
		
		$('.nextHide').hide();
		if (value1 == 'Select Bank' || value1 == ''){
			
		} else {
			$('.transferNextButt5').fadeIn();	
		}
		
		if (value2 == 'Select Other Billers' || value2 == ''){
			
		} else {
			$('.transferNextButt5').fadeIn();	
		}
	}
	
	function replaceBg(selector, backgroundimage){
		
		$(selector).css('background', backgroundimage);
}
function captureLinkOmni(crName){
	if($('#s_pageName') != null)
		crName = $('#pnameId').val() + crName;
var channel='US:wucom';		
var langCode = 'en';
	if($('#languageCode') != null){
		langCode = $('#languageCode').val();
	}	
	setOmnitureVal(crName,channel,langCode);
}


	function BinLookUp(subBin,redirectURL) {
		this.subBin=subBin;
		this.redirectURL=redirectURL;
	}
	
		var binLookUpArr=new Array();
		binLookUpArr[0]=new BinLookUp('414665','https://wugoldcard.mycardplace.com/cholder');
		binLookUpArr[1]=new BinLookUp('425068','http://www.westernunion.com/goldcardgift');
		binLookUpArr[2]=new BinLookUp('435858','http://www.westernunion.com/moneywise');
		binLookUpArr[3]=new BinLookUp('49135501','https://www.mycardplace.com/cards/cardholder/wuvisalogin.jsp');
		binLookUpArr[4]=new BinLookUp('49135502','https://www.mycardplace.com/cards/cardholder/wuvisalogin.jsp');
		binLookUpArr[5]=new BinLookUp('49135503','https://www.mycardplace.com/cards/cardholder/wuvisalogin.jsp');
		binLookUpArr[6]=new BinLookUp('49135504','https://www.mycardplace.com/giftcards/cardholder/wuondlogin.jsp');
		binLookUpArr[7]=new BinLookUp('510250','https://www.mycardplace.com/cards/cardholder/westernunionlogin.jsp');
		binLookUpArr[8]=new BinLookUp('511235','https://wups.solspark.com/westernunion-web/fwdTologon.wu');
		binLookUpArr[9]=new BinLookUp('519108','http://www.westernunion.com/prepaidgoldcard');
		binLookUpArr[10]=new BinLookUp('534788','https://www.mycardplace.com/cards/cardholder/westernunionlogin.jsp');
		binLookUpArr[11]=new BinLookUp('543296','http://'+location.hostname+'/mymoneywise');
		binLookUpArr[12]=new BinLookUp('543352','http://'+location.hostname+'/myprepaidgoldcard');
		binLookUpArr[13]=new BinLookUp('543411','http://www.westernunion.com/prepaidmoneywise');				
		binLookUpArr[14]=new BinLookUp('42503300','http://'+location.hostname+'/wugiftcard&bin=42503300');
		binLookUpArr[15]=new BinLookUp('42503301','http://'+location.hostname+'/wugiftcard&bin=42503301');
		binLookUpArr[16]=new BinLookUp('42503302','http://'+location.hostname+'/wugiftcard&bin=42503302');
		binLookUpArr[17]=new BinLookUp('42503303','http://'+location.hostname+'/wugiftcard&bin=42503303');
		binLookUpArr[18]=new BinLookUp('42503399','http://'+location.hostname+'/wugiftcard&bin=42503399');		
		
	function lookupBin(binNum){
		var url = null;
		var index = -1;
		index=binFound(binNum);
		if(index != -1)
			{
			url = binLookUpArr[index].redirectURL;
			}
		else
			{
			url = null;			
			}
			return url;
	}
	
	function binFound(binNum)
	{
			var index=0;
			for(index=0;index<binLookUpArr.length;index++)
			{
			if(binLookUpArr[index].subBin == binNum || binLookUpArr[index].subBin == binNum.substring(0,6)){
			return index;}
			}
			return -1;
	}

		function showErrModalWin(show){

			$('#modalWindow .show1').hide();
			$('#modalWindow .show2').hide();
			$('#modalWindow .show3').hide();

			
			if(show=="show1"){
				$('#modalWindow .show1').show();
			}else if(show=="show2"){
				$('#modalWindow .show2').show();
			}else if(show=="show3"){
				$('#modalWindow .show3').show();
			}
					
				$.openDOMWindow({
				borderSize: 0,
				width: 750,
				height: 500,
				windowSourceID:'#confirmationMessage', 
				windowBGColor: 'none',
				windowSource: 'inline'
			});
		}
		
		

