$(document).ready(function() {
  $(".hide").hide();
  $('#slideshow').cycle({
		fx: 'fade',
		timeout: 6000,
    speed: 3500
	});
  $('.slideshow2').cycle({
		fx: 'fade',
		timeout: 7000,
    speed: 4000
	});
  $(document).ready(function(){
    $( '#target' ).fold();
  });
  $(".show-information").click(function () {
    $("#content-information").toggle(500,function(){
      $('html, body').animate({
      scrollTop: $("#content-information").offset().top
      }, 2000);
      $(".show-information").hide();
      $(".hide-information").show();
    });
  });
  $(".hide-information").click(function () {
    $("#content-information").toggle(500,function(){
      $('html, body').animate({
      scrollTop: $("#content-information").offset().top
      }, 2000);
      $(".hide-information").hide();
      $(".show-information").show();
    });
  });

  $(".show-information2").click(function () {
    $("#content-information2").toggle(500,function(){
      $('html, body').animate({
      scrollTop: $("#content-information2").offset().top
      }, 2000);
      $(".show-information2").hide();
      $(".hide-information2").show();
    });
  });
  $(".hide-information2").click(function () {
    $("#content-information2").toggle(500,function(){
      $('html, body').animate({
      scrollTop: $("#content-information2").offset().top
      }, 2000);
      $(".hide-information2").hide();
      $(".show-information2").show();
    });
  });

  $("#sendpromotion").click(function() {
  	var email = $("input#emailpromotion").val();
  	if (email == "") {
      $("input#emailpromotion").val("Please enter email address");
      $("input#emailpromotion").focus();
      return false;
    }
  	var dataString = 'email=' + email;
  	$.ajax({
      type: "POST",
      url: "bin/process.php",
      data: dataString,
      success: function() {
        $('#contactpromotion').html("Thank you for your interest in our special promotion!")
        .hide()
        .fadeIn(1500, function() {
          $('#contactpromotion').append("<br><span style='font-weight:bold'>You will receive the requested information via email shortly.</p>");
        });
      }
     });
    return false;
  });


})

