
var $j=jQuery.noConflict();
var message = "You are leaving First Federal Bank's web-site and will be redirected to another site.  First Federal Bank makes no endorsement or claims about the accuracy or content of the information contained in these sites.  The security and privacy policies on these sites may be different than those of First Federal Bank.";
$j(document).ready(function(){
// jQuery replacement for warn
	if( $j('.warn').length > 0 ){
		$j('.warn').click( function(){
			alert( message );
		});
	}
	
	if( $j('.confirm').length > 0 ){
		$j('.confirm').click( function( event ){
			event = new Event(event);
			if( confirm(message) ) {
				return true;
			} else {
				event.stop();
				return false;
			}
		});
	}
	
	
	
// toggle product details
  
  $j('.showDetails')
  .click(function(){
		$j(this).closest("li").animate({height : "45em"}, function(){
			$j(this).closest("li").css('height','100%');
		});
		$j(this).closest("li").addClass("selected")
		$j(this).hide()
		$j(this).next().show()
	})
  
  $j('.hideDetails')
  .click(function(){
		$j(this).closest("li").animate({height:"10.5em"}, {duration:500})
		$j(this).closest("li").removeClass("selected")
		$j(this).hide()
		$j(this).prev().show()
	})
  
    $j('#olbPersonal').click( function(){
		$j('#Logon').attr('action', 'https://ns.bankbyweb.net/PBI_PBI1961/pbi1961.asp?WCI=RemoteLogin&Rt=253170334&LogonBy=Connect3&PRMAccess=Account');
			$j('#theLoginID').attr('name', 'AccessId');
  });
	$j('#olbBusiness').click( function(){
		$j('#Logon').attr('action', 'https://ws.ecorphost.net/EBC_EBC1961/EBC1961.ASP?WCI=Process&WCE=RemoteLogon&RID=3000&RTN=253170334&nmRTN=253170334&MFA=2');
	$j('#theLoginID').attr('name', 'nmUID');
  });
	
    /* -- adds notification that you need to read disclosure on contact us when the esign was there --
	
	if( $j('#formContactUs').length > 0 ){
		$j('#ROI-submit').click( function(){
			var disclosure = "Please read the disclosure before proceeding.";
			if( $j('#esignCenter :checkbox').is(':checked') ){
				return true;
			}
			else{
				alert( disclosure );
				return false;
			}
			
			
			$j('#esignCenter :checkbox').is(':checked').submit(function() {	
				return true;
			});
			$j('#esignCenter :checkbox').is(':unchecked').submit(function() {	
				alert( disclosure );
			});
		});
	}*/
	
});
