<?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 class="col-md-10">
        <div class="gray_container standart-15">
        	<?php if(empty($account)): ?> 
        		<?php echo Form::open(); ?>
            <?php else: ?>
            	<?php echo Form::open(array('method' => 'put')); ?>
            <?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 Securities, 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="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>
                            <?php endif; ?>
                            <li>  
                            	<?php if(empty($account)): ?>                              
                                <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="lorem ipsum" 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' => 'lorem ipsum')); ?>
                                
                                <?php endif; ?>
                             
                            </li>
                        </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");
			
			$("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");	
			
			$("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");
			
			$("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");	
			
			$("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");
					
		});
		
		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($('input:radio[name="accountType"]:checked').val() == '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") ?>"
		});
		
	});
</script>
<?php $__env->stopSection(); ?>

<?php $__env->stopSection(); ?>


