<?php $__env->startSection('content'); ?>
	
    <?php echo $__env->make('about_us/menu', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>

    <?php $__env->startSection('background_img'); ?>
	    <div class="fixed_img">
			<img src="<?php echo asset('img/banq_frame5.jpg'); ?>" class="img-responsive" alt="img">
			<div class="text_box">
				<div class="wcaption frame-stairs">
					<div class="caption">
						<div class="bg1">
							<h1>Seamless, complianT, MEANINGFUL</h1>
							<h3>This is the sacred mantra we abide by - in genuine appreciation of the importance in approaching each and every transaction with these values at heart. &lt;3 </h3>
						</div>
						<div class="bg2"></div>
					</div>
				</div>
			</div>
		</div>
	<?php $__env->stopSection(); ?>

    <div class="row">
    	<div class="col-md-8 col-md-offset-2">
    		<div class="gray_container font-narrow">
    			<h4 class="head_h4">Contact us</h4><br>
                <?php echo Form::open(array('action' => 'ContactController@postIndex', 'class' => 'contact-us')); ?>
	    			<div class="form-group">
	    				<label for="name">Name</label>
	    				<input type="text" required="true" name="name" id="name" class="form-control" placeholder="Name">
	    			</div>
	    			<div class="form-group">
	    				<label for="email">Email</label>
	    				<input type="email" required="true" name="email" id="email" class="form-control" placeholder="Email">
	    			</div>
	    			<div class="form-group">
	    				<label for="phone">Phone</label>
	    				<input type="text" name="phone" id="phone" class="form-control" placeholder="Phone">
	    			</div>
	    			<div class="form-group">
	    				<label for="message">Message</label>
	    				<textarea id="message" required="true"  name="message_body" class="form-control" rows="5" placeholder="Message"></textarea>
	    			</div>
	    			<div class="form-group text-right">
	    				<input type="submit" class="btn" id="contact_btn" value="SEND">
	    			</div>
    			<?php echo Form::close(); ?>
    		</div>
    	</div>
    </div>
    
    <?php $__env->startSection('scripts'); ?>
   	<script>
		$(document).ready(function(){	
    		$('.contact-us').on('submit', function(){
				var $form = $(this);
				$('#contact_btn').attr('disabled','disabled');
				$.post('/contact', $(this).serialize(), function(data){
					if(data.code == 200) {
						$form.find('.alert-danger').remove();
						$form.find('.form-control').val('');
						$('#contact_btn').removeAttr('disabled');
						$form.prepend('<div class="alert alert-success">'+data.message+'</div>').fadeIn();
					} else {
						$form.find('.alert-danger').remove();
						$('#contact_btn').removeAttr('disabled');
						var html = '<div class="alert alert-danger">';
						for(i=0; i<data.message.length;i++) {
							html += data.message[i]+'<br />';
						}
						html += '</div>';
						
						$form.prepend(html);
					}
				}, 'json');
				
				return false;
			});
		});
    </script>
	<?php $__env->stopSection(); ?>
    
    
<?php $__env->stopSection(); ?>