<?php
$CI = & get_instance();
$_c = strtolower($CI->router->fetch_class());
$_a = strtolower($CI->router->fetch_method());
?>

<section class="content contactus m-0-t" id="contactus">
	<div class="row p-5-x p-5-t p-1-b text-center">
		<div class="col">
			<h1 class="m-0-t font-weight-bold">Contact Us</h1>
			<h4 class="m-0-b font-weight-normal">Questions? Comments? Send us a message!</h4>
		</div>
	</div>
	<div class="row p-5-x p-xs-1-x p-sm-1-t p-sm-1-b">
		<div class="col-sm-6 push-sm-6 p-xs-2-x">
			<div class="row">
				<div class="col-xs-2"><i class="fa fa-building"></i></div>
				<div class="col-xs-10">
					555, Jalan Samudra Utara 1,
					Taman Samudra,
					68100 Batu Caves,
					Selangor Darul Ehsan.
				</div>
				
				<div class="col-xs-2"><i class="fa fa-phone"></i></div>
				<div class="col-xs-10">603-6185 9970</div>

				<div class="col-xs-2"><i class="fa fa-fax"></i></div>
				<div class="col-xs-10">603-6184 2524</div>

				<div class="col-xs-2"><i class="fa fa-envelope"></i></div>
				<div class="col-xs-10">info@salihinpremier.com</div>

				<div class="col-xs-2"><i class="fa fa-globe"></i></div>
				<div class="col-xs-10">http://www.salihinpremier.com/</div>
			</div>
		</div>
		
		<div class="col-sm-6 pull-sm-6 m-xs-2-t">
			<form class="form-horizontal" action="<?php echo base_url(); ?>contact/send" method="post" id="contact_form">
				<input type="hidden" name="from_url" id="from_url" value="<?php echo $CI->uri->uri_string(); ?>" />
				<div class="form-group">
					<label class="col-xs-12 required">Full Name</label>
					<div class="col-xs-12"><input type="text" name="name" id="contact_name" class="form-control validate[required]" /></div>
				</div>
				
				<div class="form-group">
					<label class="col-xs-12 required">Phone No</label>
					<div class="col-xs-12"><input type="text" name="phoneNo" id="contact_phoneNo" class="form-control validate[required]" /></div>
				</div>
				
				<div class="form-group">
					<label class="col-xs-12 required">Email</label>
					<div class="col-xs-12"><input type="text" name="email" id="contact_email" class="form-control validate[required, custom[email]]" /></div>
				</div>
				
				<div class="form-group">
					<label class="col-xs-12 required">Subject / Title</label>
					<div class="col-xs-12">
						<select name="subject" id="contact_subject" class="form-control validate[required]">
						<option value="">...</option>
						<option value="General Inquiry">General Inquiry</option>
						<option value="Payment Inquiry">Payment Inquiry</option>
						<option value="Technical Inquiry">Technical Inquiry</option>
						</select>
					</div>
				</div>
				
				<div class="form-group">
					<label class="col-xs-12 required">Message</label>
					<div class="col-xs-12"><textarea name="message" id="contact_message" class="form-control validate[required]" rows="5"></textarea></div>
				</div>
				
				<div class="form-group text-center p-1-x p-xs-0-x">
					<div class="flex-btn-group">
						<button type="submit" class="btn btn-success"><i class="fa fa-check"></i>&nbsp;Send</button>
						<button type="button" class="btn btn-warning" onclick="return resetContact(this);"><i class="fa fa-undo"></i>&nbsp;Reset</button>
					</div>
				</div>
			</div>
		</form>
	</div>
</section>

<script>
$(function() {
	$('form#contact_form').off('submit').on('submit',function() {
		if ($(this).validationEngine('validate')) {
			var proceed = true;
			
			var name = $.trim(	$('#contact_name').val()	);
			if(name == "") { proceed =  false; $('#contact_name').validationEngine('showPrompt', 'Please enter Full Name', 'load','bottomRight',1); }
			if(!proceed) return false;
			
			var phoneno = $.trim(	$('#contact_phoneNo').val()	);
			if(phoneno == "") { proceed =  false; $('#contact_phoneNo').validationEngine('showPrompt', 'Please enter Phone No', 'load','bottomRight',1); }
			if(!proceed) return false;
			
			var email = $.trim(	$('#contact_email').val()	);
			if(email == "") { proceed =  false; $('#contact_email').validationEngine('showPrompt', 'Please enter Email', 'load','bottomRight',1); }
			if(!proceed) return false;
			
			var subject = $.trim(	$('#contact_subject').val()	);
			if(subject == "") { proceed =  false; $('#contact_subject').validationEngine('showPrompt', 'Please enter Subject', 'load','bottomRight',1); }
			if(!proceed) return false;
			
			var message = $.trim(	$('#contact_message').val()	);
			if(message == "") { proceed =  false; $('#contact_message').validationEngine('showPrompt', 'Please enter Subject', 'load','bottomRight',1); }
			if(!proceed) return false;
			
			return true;
		} else {
			return false;
		}
	});
});

function resetContact(me) {
	$('#contact_name').val('');
	$('#contact_email').val('');
	$('#contact_subject').val('');
	$('#contact_message').val('');
}
</script>









