<?php $__env->startSection('content'); ?>

<div class="row margin-top-55">
    <div class="col-md-2">
		<?php echo $__env->make('offerings.registration.left_nav', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
    </div>
    <div id="yes-no-field" class="col-md-10">
        <div class="gray_container standart-15">
        	<?php if(empty($account)): ?> 
        		<?php echo Form::open(array('id' => 'folio_form')); ?>
            <?php else: ?>
            	<?php echo Form::open(array('method' => 'put', 'id' => 'folio_form')); ?>
            <?php endif; ?>
            <div class="row">
                <div class="col-md-offset-1 col-md-10">
                    <h4 class="head_h4">ACCOUNT TYPE</h4>
                    <p>Since this is your first investment through BANQ, you will need to setup your account at TriPoint Global Equities, LLC. Please complete the following form.</p>
                  	<?php if($errors->has()): ?>
                        <div class="alert alert-danger">
                        <?php foreach ($errors->all() as $row): ?>
                          <div><?php echo $row; ?></div>
                        <?php endforeach; ?>
                        </div>
                    <?php endif; ?>
                  	<div class="form-group">
                        <div class="col-sm-9 col-sm-offset-3">
                            <div id="messages"></div>
                        </div>
                    </div>
                    <div class="account_type">
                        <p>1.  Please select the type of account you wish to open:</p>
                        <ul>
                            <li> 
                            	<input type="text" maxlength="16" name="accountName" value="<?php echo !empty($account->accountName)?$account->accountName:Input::old('accountName'); ?>" class="form-control tooltip-info" data-toggle="tooltip" data-trigger="focus" data-placement="right" data-original-title="Letters, digits, spaces and special characters are allowed. The maximum length of the field is 16 characters." placeholder="The name of the account">      
                                <?php if(empty($account)): ?>                         
                                <label class="btn">
                                    <?php echo Form::radio('accountType', 'I', Input::old('accountType'), array('id' => 'individual')); ?> Individual
                                </label>
                                <?php endif; ?>
                            </li>
                            <?php if(empty($account)): ?>
                            <li>
                                <label class="btn">
                                    <?php echo Form::radio('category', 'retirement', Input::old('category'), array('id' => 'retirement_cat')); ?> Retirement
                                </label>
                                <ul class="hidden" id="retirement">
                                    <li>
                                        <label class="btn">
                                            <?php echo Form::radio('accountType', 'S', Input::old('accountType')); ?> Roth IRA
                                        </label>
                                    </li>
                                    <li>
                                        <label class="btn">
                                            <?php echo Form::radio('accountType', 'R', Input::old('accountType')); ?> Traditional IRA
                                        </label>
                                    </li>
                                    <li>
                                        <label class="btn">
                                       		<?php echo Form::radio('accountType', 'Q', Input::old('accountType')); ?> Rollover IRA
                                        </label>
                                    </li>
                                    <li>
                                        <label class="btn">
                                            <?php echo Form::radio('accountType', 'P', Input::old('accountType')); ?> SEP-IRA
                                        </label>
                                    </li>
                                    <li>
                                        <label class="btn">
                                        	<?php echo Form::radio('accountType', '9', Input::old('accountType')); ?> Simple IRA
                                        </label>
                                    </li>
                                    <li>
                                   		<?php if(!empty($account->initContributionDate)): ?>
                                            <input type="text" name="initContributionDate" id="initContributionDate" autocomplete="off" value="<?php echo $account->initContributionDate; ?>" class="form-control tooltip-info" data-toggle="tooltip" data-trigger="focus" data-placement="right" data-original-title="The date of the first contribution to the IRA." placeholder="Contribution Date">
                                        <?php else: ?>
                                        <input type="text" name="initContributionDate" id="initContributionDate" autocomplete="off" value="<?php Input::old('initContributionDate'); ?>" class="form-control tooltip-info hidden" data-toggle="tooltip" data-trigger="focus" data-placement="right" data-original-title="The date of the first contribution to the IRA." placeholder="Contribution Date">
                                        <?php endif; ?>
                                    </li>
                                </ul>
                            </li>
                            <li>                                
                                <label class="btn">
                                    <?php echo Form::radio('category', 'joint', Input::old('category'), array('id' => 'joint_cat')); ?> Joint
                                </label>
                                <ul class="hidden" id="joint">
                                    <li>
                                        <label class="btn">
                                            <?php echo Form::radio('accountType', 'J', Input::old('accountType')); ?> Rights of Survivorship
                                        </label>
                                    </li>
                                    <li>
                                        <label class="btn">
                                            <?php echo Form::radio('accountType', 'K', Input::old('accountType')); ?> Tenants in Common
                                        </label>
                                    </li>
                                    <li>
                                        <label class="btn">
                                            <?php echo Form::radio('accountType', 'L', Input::old('accountType')); ?> Community Property
                                        </label>
                                    </li>
                                    <li>
                                        <label class="btn">
                                          	<?php echo Form::radio('accountType', 'M', Input::old('accountType')); ?> Tenants by Entirety
                                        </label>
                                    </li>
                                    <?php if(empty($account)): ?> 
                                    <li>
                                   		<input type="text" name="jointOwners" value="<?php echo Input::old('jointOwners'); ?>" class="form-control tooltip-info hidden" data-toggle="tooltip" data-trigger="focus" placeholder="Owners">	
                                    </li>
                                    <?php endif; ?>
                                </ul>
                            </li>
                            <li>                              
                                <label class="btn">
                                    <?php echo Form::radio('accountType', 'U', Input::old('accountType'), array('id' => 'custodial')); ?> Custodial (UGMA/UTMA)
                                </label>
                                    <input type="text" maxlength="20" name="firstName" value="<?php echo Input::old('firstName'); ?>" class="form-control tooltip-info hidden" data-toggle="tooltip" data-trigger="focus" data-placement="right" data-original-title="Maximum of 20 characters"  placeholder="First Name">
                                    <input type="text" maxlength="35" name="lastName" value="<?php echo Input::old('lastName'); ?>" class="form-control tooltip-info hidden" data-toggle="tooltip" data-trigger="focus" data-placement="right" data-original-title="Maximum of 35 characters." placeholder="Last Name">
                                    <input type="text" name="dateOfBirth" value="<?php echo Input::old('dateOfBirth'); ?>" autocomplete="off" class="form-control tooltip-info hidden" data-toggle="tooltip" data-trigger="focus" data-placement="right" data-original-title="Date of Birth" id="datepicker" placeholder="Date of Birth">
                                    <input type="text" name="SSN" value="<?php echo Input::old('SSN'); ?>" class="form-control tooltip-info hidden" data-toggle="tooltip" data-trigger="focus" data-placement="right" data-original-title="Social Security Number. The length must be 9 digits." placeholder="Social Security Number">
                                     
                                    <?php echo Form::select('citizenship', array('' => 'Citizenship Status', 'C' => 'C', 'R' => 'R'), null, array('class' => 'form-control tooltip-info hidden', 'data-toggle' => 'tooltip', 'data-placement' => 'right', 'data-original-title' => 'The available values are "C" for a US citizen and "R" for a resident alien.')); ?>
                                    
                                    <?php echo Form::select('state', $states, null, array('class' => 'form-control width2 tooltip-info hidden', 'data-toggle' => 'tooltip', 'data-placement' => 'left', 'data-original-title' => 'States')); ?>
                                                       
                            </li>
                            <li>
                             	<label class="btn">
                                    <?php echo Form::radio('category', 'corporate', Input::old('category'), array('id' => 'corporate_cat')); ?> Corporate Account
                                </label>
                                <ul class="hidden" id="corporate">
                                    <li>
                                        <label class="btn">
                                            <?php echo Form::radio('accountType', 'D', Input::old('accountType')); ?>  Business Trust (Irrevocable Trust)
                                        </label>
                                    </li>
                               		<li>
                                        <label class="btn">
                                            <?php echo Form::radio('accountType', 'A', Input::old('accountType')); ?> Corporation
                                        </label>
                                    </li>
                                 	<li>
                                        <label class="btn">
                                            <?php echo Form::radio('accountType', 'F', Input::old('accountType')); ?> LLC
                                        </label>
                                    </li>
                                 	<li>
                                        <label class="btn">
                                            <?php echo Form::radio('accountType', 'E', Input::old('accountType')); ?> Limited Partnership
                                        </label>
                                    </li>
                                   	<li>
                                        <label class="btn">
                                            <?php echo Form::radio('accountType', 'B', Input::old('accountType')); ?> General Partnership
                                        </label>
                                    </li>
                                 	<li>
                                        <label class="btn">
                                            <?php echo Form::radio('accountType', 'V', Input::old('accountType')); ?> Unincorporated Organization
                                        </label>
                                    </li>
                                    <li>
                                        <label class="btn">
                                            <?php echo Form::radio('accountType', 'C', Input::old('accountType')); ?> Investment Club
                                        </label>
                                    </li>
                                 	<li>
                                        <label class="btn">
                                            <?php echo Form::radio('accountType', 'H', Input::old('accountType')); ?> Sole Proprietorship
                                        </label>
                                        	<?php if(empty($firms->firmTaxId)): ?>
                                            <input type="text" name="firmTaxId" value="<?php echo Input::old('firmTaxId'); ?>" maxlength="9" class="form-control tooltip-info" data-toggle="tooltip" data-trigger="focus" data-placement="right" data-original-title="The length must be 9 digits" placeholder="Tax Identification number of the entity">
                                            <?php else: ?>
                                            <p style="font-size:14px;">Tax Identification number: <?php echo $firms->firmTaxId; ?> </p>
                                            <?php endif; ?>
                                            
                                            <?php if(empty($firms->firmTaxIdType)): ?>
                                            <?php echo Form::select('firmTaxIdType', array('TIN' => 'TIN', 'SSN' => 'SSN'), null, array('class' => 'form-control width2 tooltip-info', 'data-toggle' => 'tooltip', 'data-placement' => 'left', 'data-original-title' => 'TIN and SSN are the only acceptable values"')); ?>
                                            <?php else: ?>
                                            <p style="font-size:14px;">Tax Id Type: <?php echo $firms->firmTaxIdType; ?></p>
                                            <?php endif; ?>
                                            
                                            <?php if(empty($firms->firmName)): ?>
                                            <input type="text" name="firmName" value="<?php echo Input::old('firmName'); ?>" maxlength="50" class="form-control tooltip-info" data-toggle="tooltip" data-trigger="focus" data-placement="right" data-original-title="Maximum of 50 characters. Valid characters are letters, digits, spaces and the following special characters: ~`!@#$%^&*()_-+=[{]}|:',./?" placeholder="Firm name">
                                            <?php else: ?>
                                            <p style="font-size:14px;">Firm Name: <?php echo $firms->firmName; ?></p>	
                                            <?php endif; ?>
                                            
                                            <?php if(empty($firms->firmTelephone1)): ?>
                                            <input type="text" name="firmTelephone1" value="<?php echo Input::old('firmTelephone1'); ?>" class="form-control tooltip-info" data-toggle="tooltip" data-trigger="focus" data-placement="right" data-original-title="The firm's primary phone number. The length should be between 10 and 14 digits. Enter numbers only (ex. 70324540001234)." placeholder="Firm phone number">
                                            <?php else: ?>
                                            <p style="font-size:14px;">Firm phone number: <?php echo $firms->firmTelephone1; ?></p>	
                                            <?php endif; ?>
                                            
                                            <?php if(empty($firms->firmTelephone1)): ?>
                                            <input type="text" name="firmEmail1" value="<?php echo Input::old('firmEmail1'); ?>" class="form-control tooltip-info" data-toggle="tooltip" data-trigger="focus" data-placement="right" data-original-title="The primary email address of the firm" placeholder="Firm Email">
                                            <?php else: ?>
                                            <p style="font-size:14px;">Email address of the firm: <?php echo $firms->firmEmail1; ?></p>
                                            <?php endif; ?>
                                            
                                        <div style="font-size:14px;">
                                        Are you, your spoise or any other immediate family members, including parents, in-laws, and siblings that are dependents , employed by or associated with the securities industry (for example, Investment Adviso, Sole Proprieter, Partner, Officer, Director, Branch Manager or Broker at a Broker-Dealer Firm or Municipal Securities Dealer) or a financial regulatory agency, such as FINRA or the New York Stock Exchange? If yes, and if this entity requires that you obtain its approval for to open this account, please select Yes below:
                                      	</div>
                                        
                                        <?php if(empty($firms)): ?>
                                        <div class="controls">
											<label class="radio inline">
                                            	<?php echo Form::radio('finraAffiliated', '0'); ?> No
                                            </label>
											<label class="radio inline">
                                            	<?php echo Form::radio('finraAffiliated', '1'); ?> Yes
                                            </label>
                                        </div>
                                        <?php else: ?>
                                        	<?php if($firms->finraAffiliated == false): ?>
                                            	<p style="font-size:14px;">No</p>
                                          	<?php else: ?>
                                            	<p style="font-size:14px;">Yes</p>
                                           	<?php endif; ?>
                                        <?php endif; ?>
                                        
										<div <?php echo (empty($firms->finraAffiliated) || $firms->finraAffiliated == false)?'class="hidden"':''; ?> id="finraAffiliated">
                                            <div class="border-line">
                                                <label for="liquid-net-worth control-label" class="control-label">FINRA Affiliation</label>
                                                <label class="no-bold padding-all">
                                                You have indicated a FINRA affiliation that requires us to restrict your account until the employer of the FINRA affiliated person approves.
                                                <br/><br/>
                                                Please download, complete and send us the <a href="https://www.folioclient.com/servlets/ProcessAction/nuxeo/proxy?path=/WHITE-LABEL/sections/Public%20Content/forms/FINRACompliance" target="_blank">Compliance Officer Form</a> to un-restrict the account
                                                </label>
                                            </div>
                                        </div>
                                        
                                     	<div style="font-size:14px;">
                                        Are you or someone in your household or immediate family a 10% shareholder, policymaking officer or member of the board of directors of a publicly traded company?
                                      	</div>
                                        
                                        <?php if(empty($firms)): ?>
                                   		<div class="controls">
											<label class="radio inline">
                                            	<?php echo Form::radio('directorOrTenPercentShareholder', '0'); ?> No
                                            </label>
											<label class="radio inline">
                                            	<?php echo Form::radio('directorOrTenPercentShareholder', '1'); ?> Yes
                                            </label>
                                        </div>
                                        <?php else: ?>
                                     		<?php if($firms->directorOrTenPercentShareholder == false): ?>
                                            	<p style="font-size:14px;">No</p>
                                          	<?php else: ?>
                                            	<p style="font-size:14px;">Yes</p>
                                            <?php endif; ?>
                                        <?php endif; ?>
                                        
                                        <div class="col-sm-12<?php echo (empty($firms->directorOrTenPercentShareholder) || $firms->directorOrTenPercentShareholder == false)?' hidden':''; ?>" id="directorOrTenPercentShareholderCompany">
                                            <div class="row">
                                                <div class="row border-line">
                                                    <div class="form-group">
                                                        <label for="liquid-net-worth" class="col-sm-12 control-label">Enter Trading Symbols: </label>
                                                        <?php if (Input::old('directorOrTenPercentShareholderCompany')): ?>
                                                            <?php foreach(Input::old('directorOrTenPercentShareholderCompany') as $value): ?>
                                                            <div class="col-sm-2">
                                                                <input type="text" name="directorOrTenPercentShareholderCompany[]"  value="<?php echo $value; ?>" class="form-control" />
                                                            </div>
                                                            <?php endforeach; ?>
                                                        <?php else: ?>
                                                            <div class="col-sm-2">
                                                                <input type="text" name="directorOrTenPercentShareholderCompany[]"  value="<?php echo !empty($folio->directorOrTenPercentShareholderCompany[0])?$folio->directorOrTenPercentShareholderCompany[0]:''; ?>" class="form-control" />
                                                            </div>
                                                            <div class="col-sm-2">
                                                                <input type="text" name="directorOrTenPercentShareholderCompany[]"  value="<?php echo !empty($folio->directorOrTenPercentShareholderCompany[1])?$folio->directorOrTenPercentShareholderCompany[1]:''; ?>" class="form-control" />
                                                            </div>
                                                            <div class="col-sm-2">
                                                                <input type="text" name="directorOrTenPercentShareholderCompany[]"  value="<?php echo !empty($folio->directorOrTenPercentShareholderCompany[2])?$folio->directorOrTenPercentShareholderCompany[2]:''; ?>" class="form-control" />	
                                                            </div>
                                                            <div class="col-sm-2">
                                                                <input type="text" name="directorOrTenPercentShareholderCompany[]"  value="<?php echo !empty($folio->directorOrTenPercentShareholderCompany[3])?$folio->directorOrTenPercentShareholderCompany[3]:''; ?>" class="form-control" />	
                                                            </div>
                                                            <div class="col-sm-2">
                                                                <input type="text" name="directorOrTenPercentShareholderCompany[]"  value="<?php echo !empty($folio->directorOrTenPercentShareholderCompany[4])?$folio->directorOrTenPercentShareholderCompany[4]:''; ?>" class="form-control" />		
                                                            </div>
                                                        <?php endif; ?>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                        <span style="font-size:14px;">Primary Address</span>
                                        <?php if(empty($firms->primaryAddress->line1)): ?>
                                        <input type="text" maxlength="35" name="line1" class="form-control" value="<?php echo Input::old('line1'); ?>" placeholder="Address 1">
                                        <?php else: ?>
                                        <p style="font-size:14px;">Address 1: <?php echo $firms->primaryAddress->line1; ?></p>
                                        <?php endif; ?>
                                        
                                        <?php if(empty($firms->primaryAddress->line1)): ?>
                                        <input type="text" maxlength="35" name="line2" class="form-control" value="<?php echo Input::old('line2'); ?>" placeholder="Address 2">
                                        <?php else: ?>
                                        <p style="font-size:14px;">Address 2: <?php echo $firms->primaryAddress->line2; ?></p>
                                        <?php endif; ?>
                                        
                                        <?php if(empty($firms->primaryAddress->city)): ?>
                                        <input type="text" name="city" class="form-control" value="<?php echo Input::old('city'); ?>" placeholder="City">
                                        <?php else: ?>
                                        <p style="font-size:14px;">City: <?php echo $firms->primaryAddress->city; ?></p>
                                        <?php endif; ?>
                                        
                                        <?php if(empty($firms->primaryAddress->state)): ?>
                                        <?php echo Form::select('states', $states, null, array('class' => 'form-control width2 tooltip-info', 'data-toggle' => 'tooltip', 'data-placement' => 'left', 'data-original-title' => 'States')); ?>
                                        <?php else: ?>
                                        <p style="font-size:14px;">State: <?php echo $firms->primaryAddress->state; ?></p>	
                                        <?php endif; ?>
                                        
                                        <?php if(empty($firms->primaryAddress->zipcode)): ?>
                                        <input type="text" name="zipcode" class="form-control" value="<?php echo Input::old('zipcode'); ?>" placeholder="Zip Code">
                                        <?php else: ?>
                                        <p style="font-size:14px;">Zip Code: <?php echo $firms->primaryAddress->zipcode; ?></p>
                                        <?php endif; ?>
                                        
                                        <span style="font-size:14px;">Country: United States</span>
                       					
                                        <input type="text" maxlength="20" name="firstNameTrustee" class="form-control" value="<?php echo Input::old('firstNameTrustee'); ?>" placeholder="The first name of the trustee"> 
                                        
                                        <input type="text" maxlength="35" name="lastNameTrustee" class="form-control" value="<?php echo Input::old('lastNameTrustee'); ?>" placeholder="The last name of the trustee"> 
                                        
                                        <input type="text" name="email1Trustee" class="form-control" value="<?php echo Input::old('email1Trustee'); ?>" placeholder="The primary email address of the trustee"> 
                                        
                                        <input type="text" name="dateOfBirthTrustee" value="<?php echo Input::old('dateOfBirthTrustee'); ?>" autocomplete="off" class="form-control tooltip-info" data-toggle="tooltip" data-trigger="focus" data-placement="right" data-original-title="The trustee's date of birth" id="datepickerTrustee" placeholder="The trustee's date of birth">  
                                        
                                        <input type="text" name="loginIdTrustee" class="form-control" value="<?php echo Input::old('loginIdTrustee'); ?>" placeholder="The username of the trustee">             
                                    	
                                        <input type="text" name="accountRegistrationInfo" value="<?php echo Input::old('accountRegistrationInfo'); ?>" class="form-control hidden" placeholder="Registration Info">
                                        <input type="text" name="trustees" value="<?php echo Input::old('trustees'); ?>" class="form-control hidden" placeholder="A list of trustee usernames">
                                        <?php echo Form::select('taxClassification', array('S' => 'Type \'S\'', 'C' => 'Type \'C\''), null, array('class' => 'form-control tooltip-info hidden', 'id' => 'taxClassification', 'data-toggle' => 'tooltip', 'data-placement' => 'right', 'data-original-title' => 'Tax Classification')); ?>

                                    </li>
                            	</ul>
                            </li>
                            <?php endif; ?>
                        </ul>
                    </div>
                </div> 
            </div>          
            <div class="wrap_next_step">
                <button type="submit" class="btn next_step">NEXT STEP  &nbsp; &#62;</button>
            </div>
          	<?php echo Form::close(); ?>
        </div>
    </div>
</div>

<?php $__env->startSection('scripts'); ?>	
<script type="text/javascript">
	$(function() {
		$('#retirement_cat').on("ifClicked", function () {
			$('input').iCheck('uncheck');
			$(this).iCheck('check');
			$("#retirement").hide().removeClass('hidden').fadeIn("slow");
			
			$("#joint").addClass('hidden');
			$("input[name='jointOwners']").addClass("hidden");
			$("input[name='initContributionDate']").removeClass("hidden");
			
			$("#corporate").addClass('hidden');
			
			$("input[name='firstName']").addClass("hidden");
			$("input[name='lastName']").addClass("hidden");
			$("input[name='dateOfBirth']").addClass("hidden");
			$("input[name='SSN']").addClass("hidden");
			$("select[name='citizenship']").addClass("hidden");
			$("select[name='state']").addClass("hidden");	
		});
		
		$('#joint_cat').on("ifClicked", function () {
			$('input').iCheck('uncheck');
			$(this).iCheck('check');
			
			$("#joint").hide().removeClass('hidden').fadeIn("slow");
			$("#retirement").addClass('hidden');
			$("input[name='jointOwners']").removeClass("hidden");
			$("input[name='initContributionDate']").addClass("hidden");	
			
			$("#corporate").addClass('hidden');
			
			$("input[name='firstName']").addClass("hidden");
			$("input[name='lastName']").addClass("hidden");
			$("input[name='dateOfBirth']").addClass("hidden");
			$("input[name='SSN']").addClass("hidden");
			$("select[name='citizenship']").addClass("hidden");
			$("select[name='state']").addClass("hidden");
		});
		
		$('#individual').on("ifClicked", function () {
			$('input').iCheck('uncheck');
			$(this).iCheck('check');
			
			$("#retirement").addClass('hidden');
			$("#joint").addClass('hidden');
			$("input[name='jointOwners']").addClass("hidden");
			$("input[name='initContributionDate']").addClass("hidden");
			
			$("#corporate").addClass('hidden');
			
			$("input[name='firstName']").addClass("hidden");
			$("input[name='lastName']").addClass("hidden");
			$("input[name='dateOfBirth']").addClass("hidden");
			$("input[name='SSN']").addClass("hidden");
			$("select[name='citizenship']").addClass("hidden");
			$("select[name='state']").addClass("hidden");	
		});
		
		$('#custodial').on("ifClicked", function () {
			$('input').iCheck('uncheck');
			$(this).iCheck('check');
			
			$("#individual").addClass('hidden');
			$("#retirement").addClass('hidden');
			$("#joint").addClass('hidden');
			$("input[name='jointOwners']").addClass("hidden");
			$("input[name='initContributionDate']").addClass("hidden");	
			
			$("#corporate").addClass('hidden');
			
			$("input[name='firstName']").removeClass("hidden");
			$("input[name='lastName']").removeClass("hidden");
			$("input[name='dateOfBirth']").removeClass("hidden");
			$("input[name='SSN']").removeClass("hidden");
			$("select[name='citizenship']").removeClass("hidden");
			$("select[name='state']").removeClass("hidden");
					
		});
		
		$('#corporate_cat').on("ifClicked", function () {
			$('input').iCheck('uncheck');
			$(this).iCheck('check');
			
			$("#individual").addClass('hidden');
			$("#retirement").addClass('hidden');
			$("#joint").addClass('hidden');
			$("input[name='jointOwners']").addClass("hidden");
			$("input[name='initContributionDate']").addClass("hidden");	
			
			$("#corporate").hide().removeClass('hidden').fadeIn("slow");
			
			$("input[name='firstName']").addClass("hidden");
			$("input[name='lastName']").addClass("hidden");
			$("input[name='dateOfBirth']").addClass("hidden");
			$("input[name='SSN']").addClass("hidden");
			$("select[name='citizenship']").addClass("hidden");
			$("select[name='state']").addClass("hidden");
					
		});
		
		$('input[name="finraAffiliated"]:radio').on("ifClicked", function () {
			value = $(this).val();
			if(value == '1')
				$("#finraAffiliated").removeClass("hidden");
			else
				$("#finraAffiliated").addClass("hidden");
		});
		
		$('input[name="directorOrTenPercentShareholder"]:radio').on("ifClicked", function () {
			value = $(this).val();
			if(value == '1')
				$("#directorOrTenPercentShareholderCompany").removeClass("hidden");
			else
				$("#directorOrTenPercentShareholderCompany").addClass("hidden");				
		});
		
		$('input:radio[name="accountType"]').on("ifClicked", function () {
			accType = this.value;
			if(accType == 'D' || accType == 'A')
				$("input[name='accountRegistrationInfo']").removeClass("hidden");
			else
				$("input[name='accountRegistrationInfo']").addClass("hidden");
			
			if(accType == 'A' || accType == 'F')
				$("select[name='taxClassification']").removeClass("hidden");
			else
				$("select[name='taxClassification']").addClass("hidden");	
			
			if(accType == 'F')
				$('#taxClassification').append($("<option></option>").attr("value", 'P').text('Partnership'));
			else
				$("#taxClassification option[value=P]").remove();
			
			if(accType == 'A')
				$("input[name='trustees']").removeClass("hidden");
			else
				$("input[name='trustees']").addClass("hidden");
		});
		
		var accountType = $('input:radio[name="category"]:checked').val();
		
		if(accountType == 'retirement')
		{
			$("#retirement").hide().removeClass('hidden').fadeIn("slow");	
			$("input[name='initContributionDate']").removeClass("hidden");
		}
		
		if(accountType == 'joint')
		{
			$("#joint").hide().removeClass('hidden').fadeIn("slow");
			$("input[name='jointOwners']").removeClass("hidden");
		}
		
		if(accountType == 'corporate')
		{
			$("#corporate").hide().removeClass('hidden').fadeIn("slow");
		}
		
		var accountSubType = $('input:radio[name="accountType"]:checked').val();
		
		if(accountSubType == 'D' || accountSubType == 'A')
			$("input[name='accountRegistrationInfo']").removeClass("hidden");
		
		if(accountSubType == 'A' || accountSubType == 'F')
			$("select[name='taxClassification']").removeClass("hidden");
		
		if(accountSubType == 'A')	
			$("input[name='trustees']").removeClass("hidden");
		
		if(accountSubType == 'F')
			$('#taxClassification').append($("<option></option>").attr("value", 'P').text('Partnership'));
		
		if($('input[name="finraAffiliated"]:checked').val() == '1')
			$("#finraAffiliated").removeClass("hidden");
		
		if($('input[name="directorOrTenPercentShareholder"]:checked').val() == '1')
			$("#directorOrTenPercentShareholderCompany").removeClass("hidden");	
				
		if(accountSubType == 'U')
		{
			$("input[name='firstName']").removeClass("hidden");
			$("input[name='lastName']").removeClass("hidden");
			$("input[name='dateOfBirth']").removeClass("hidden");
			$("input[name='SSN']").removeClass("hidden");
			$("select[name='citizenship']").removeClass("hidden");
			$("select[name='state']").removeClass("hidden");	
		}		
		
		$("#initContributionDate").datepicker({
			changeMonth: true,
			changeYear: true,
			yearRange: "1924:<?php echo date("Y") ?>"
		});
		
		$( "#datepickerTrustee" ).datepicker({
			changeMonth: true,
			changeYear: true,
			yearRange: "1924:<?php echo date("Y") ?>"
		});
		
	});
</script>
<?php $__env->stopSection(); ?>

<?php $__env->stopSection(); ?>


