<?php 



/*



Template Name:Contact



*/



?>



<?php get_header(); ?>



<script type="text/javascript">



// <![CDATA[







jQuery(document).ready(function(){







	$('#contactform').submit(function(){				  







		var action = $(this).attr('action');







		$.post(action, { 		   







			name: $('#name').val(),







			email: $('#email').val(),



			



			message: $('#message').val(),

			

			admin_email: $('#admin_email').val()







		},







			function(data){







				$('#contactform #submit').attr('disabled','');







				$('.response').remove();







				$('#contactform').before('<p class="response">'+data+'</p>');







				$('.response').slideDown();







				if(data=='Message sent!') $('#contactform').slideUp('slow', function() {







					$('#name').val('');







					$('#email').val('');



					



					$('#message').val('');







					$('#contactform').slideDown();







					







					} );







			}







		); 







		return false;







	});







	







});







// ]]>







</script>















	<div id="content2">



    	<div class="cnt">



        <?php while ( have_posts() ) : the_post(); ?>



        	<div class="left_main">



			



              <?php the_content(); ?> 



        



          <div class="cnt-left">



			



            



            <div class="form_main">



            	<h2>Get in touch with us!</h2>

                   

                	<form action="<?php bloginfo('template_url');?>/sendmail.php" method="post" id="contactform">



              	<span class="form">NAME*<input name="name" id="name" type="text" class="post-input" /></span>



                <span class="form">EMAIL*<input name="email" id="email" type="text" class="post-input" /></span>



                <span class="form1">MESSAGE*<textarea name="message" id="message"  cols="" rows="" class="post-textarea"></textarea></span>



                <span class="form1"><input name="submit" type="submit" class="post-submit" value="Submit" /></span>

                <?php global $NHP_Options; ?>

					<?php if($NHP_Options->get('505050') !=''){?>

                    <?php $admin_email = $NHP_Options->get('505050'); ?>

                <?php } else { $admin_email = 'support@imbuilders.com'; }?>

                <input type="hidden" id="admin_email" value="<?php echo $admin_email; ?>" />



                </form>



            </div><!--close form_main-->



            



          </div><!--close cnt-left-->



                



             	



        </div><!--close left-main--><?php endwhile; ?>



            



           <?php include('contact-sidebar.php');?> 



        </div><!--close cnt-->



    </div><!--close content-->



</div><!--close Wrapper-->



<?php get_footer(); ?>