<!DOCTYPE HTML>
<html lang="en">
<head>
<title>{aspcms:sortname}--{aspcms:sitetitle}</title>
<meta charset="gb2312">
<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black" />
<link rel="stylesheet" type="text/css" href="{aspcms:sitepath}/Templates/{aspcms:defaulttemplate}/wap/css/style.css" media="screen" />
<!--[if lt IE 9]>
		<script src="../../../../html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<!-- JQuery -->
<script src="{aspcms:sitepath}/Templates/{aspcms:defaulttemplate}/wap/js/jquery.min.js"></script>
<!-- 	
	Simple Carousel
	Copyright (c) 2010 Tobias Zeising, http://www.aditu.de
	Licensed under the MIT license
	
	http://code.google.com/p/simple-carousel
-->
<script src="{aspcms:sitepath}/Templates/{aspcms:defaulttemplate}/wap/js/slider.js"></script>
<!-- JQueryUI -->
<script src="{aspcms:sitepath}/Templates/{aspcms:defaulttemplate}/wap/js/jquery-ui-1.8.16.custom.min.js"></script>
<!-- Script Controls -->
<script src="{aspcms:sitepath}/Templates/{aspcms:defaulttemplate}/wap/js/site.js"></script>

<script type="text/javascript">

var messageDelay = 2000;  // How long to display status messages (in milliseconds)

// Init the form once the document is ready
$( init );


// Initialize the form

function init() {

  // Hide the form initially.
  // Make submitForm() the form's submit handler.
  // Position the form so it sits in the centre of the browser window.
  $('#contactForm').submit( submitForm ).addClass( 'positioned' );

  // When the "Send us an email" link is clicked:
  // 1. Fade the content out
  // 2. Display the form
  // 3. Move focus to the first field
  // 4. Prevent the link being followed

  $('a[href="#contactForm"]').click( function() {
    $('#content').fadeTo( 'slow', .2 );
    $('#contactForm').fadeIn( 'slow', function() {
      $('#senderName').focus();
    } )

    return false;
  } );
  
  // When the "Escape" key is pressed, close the form
  $('#contactForm').keydown( function( event ) {
    if ( event.which == 27 ) {
      $('#contactForm').fadeOut();
      $('#content').fadeTo( 'slow', 1 );
    }
  } );

}


// Submit the form via Ajax

function submitForm() {
  var contactForm = $(this);

  // Are all the fields filled in?

  if ( !$('#senderName').val() || !$('#senderEmail').val() || !$('#message').val() ) {

    // No; display a warning message and return to the form
    $('#incompleteMessage').fadeIn().delay(messageDelay).fadeOut();
    contactForm.fadeOut().delay(messageDelay).fadeIn();

  } else {

    // Yes; submit the form to the PHP script via Ajax

    $('#sendingMessage').fadeIn();
   

    $.ajax( {
      url: contactForm.attr( 'action' ) + "@ajax=true",
      type: contactForm.attr( 'method' ),
      data: contactForm.serialize(),
      success: submitFinished
    } );
  }

  // Prevent the default form submission occurring
  return false;
}


// Handle the Ajax response

function submitFinished( response ) {
  response = $.trim( response );
  $('#sendingMessage').fadeOut();

  if ( response == "success" ) {

    // Form submitted successfully:
    // 1. Display the success message
    // 2. Clear the form fields
    // 3. Fade the content back in

    $('#successMessage').fadeIn().delay(messageDelay).fadeOut();
    $('#senderName').val( "" );
    $('#senderEmail').val( "" );
    $('#message').val( "" );

    $('#content').delay(messageDelay+500).fadeTo( 'slow', 1 );

  } else {

    // Form submission failed: Display the failure message,
    // then redisplay the form
    $('#failureMessage').fadeIn().delay(messageDelay).fadeOut();
    $('#contactForm').delay(messageDelay+500).fadeIn();
  }
}

</script>
</head>
<body>
<div id="wrapper">
{aspcms:top}
  <!--Section Starts-->
  <section id="main">
    <!--Block Starts-->
    <div class="block_module paper_bh_white">
      <h2>Get in touch</h2>
      <img class="fl_left" alt="" src="{aspcms:sitepath}/Templates/{aspcms:defaulttemplate}/wap/images/map.jpg" />
      <ul id="contact">
        <li class="address"><strong>Moby - Europe</strong><br/>
          1036 Budapest, Kolosy t¨¦r 2<br/>
          Hungary</li>
        <li class="telephone"><strong>+37 7 200 323 324 </strong></li>
        <li class="website"><a href="#">www.demourl.com</a></li>
      </ul>
    </div>
    <!--Block Ends-->
    <!--Comments Starts-->
    <div class="block_module comment_form">
      <h2>Contact Form</h2>
      <form id="contactForm" action="processForm.php" method="post">
        <ul id="moby_form">
          <li>
            <input type="text" name="senderName" id="senderName" placeholder="Please type your name" required="required"/>
          </li>
          <li>
           <input type="email" name="senderEmail" id="senderEmail" placeholder="Please type your email address" required="required" />
          </li>
          <li>
            <textarea name="message" id="message" placeholder="Please type your message" required="required" cols="80" rows="10" maxlength="10000"></textarea>
          </li>
          <li>
          <input type="submit" id="sendMessage" name="sendMessage" value="Send Email" />
          </li>
        </ul>
      </form>      
      <div id="sendingMessage" class="statusMessage">
        <p>Sending your message. Please wait...</p>
      </div>
      <div id="successMessage" class="statusMessage">
        <p>Thanks for sending your message! We'll get back to you shortly.</p>
      </div>
      <div id="failureMessage" class="statusMessage">
        <p>There was a problem sending your message. Please try again.</p>
      </div>
      <div id="incompleteMessage" class="statusMessage">
        <p>Please complete all the fields in the form before sending.</p>
      </div>
    </div>
    <!--Comments Ends-->
  </section>
  <!--Section Ends-->
{aspcms:foot}
</div>
</body>
</html>
