//
// psd2css.js
//
//   This is where all the javascript required by your design is written.
//
//   Originally generated at http://psd2cssonline.com 
//   January 18, 2011, 3:52 pm with psd2css Online version 1.93

var timerId;
$(document).ready(function(){

  // This is required for the PNG fix to work.
  if (window.DD_belatedPNG)
    DD_belatedPNG.fix('.pngimg');

  // This is some javascript to stop IE from displaying the img alt attributes
  // when you mouse over imagess.  If you would like IE to display the alt attributes,
  // just comment out the following 4 lines.  Don't worry, if you leave this in 
  // place, your ALT attributes are still readable by the search engines.
  var tmpalt;
  $("img").hover( 
    function(){ tmpalt = $(this).attr( "alt" ); $(this).attr( "alt", "" ); },
    function(){ $(this).attr( "alt", tmpalt ); });

  // This is code to handle all of the _linkover events.  It works by
  // creating a special Wrap class, adding it to the link and linkover
  // divs of each link and linkover pair, and assigning a hover event to
  // that.
  $("#Layer-3").addClass("Wrap-2-3").hide();
  $("#Layer-2").addClass("Wrap-2-3");
  $(".Wrap-2-3").hover(
    function(){ $("#Layer-3").show(); $("#Layer-2").hide(); },
    function(){ $("#Layer-2").show(); $("#Layer-3").hide(); });
  $("#Layer-5").addClass("Wrap-4-5").hide();
  $("#Layer-4").addClass("Wrap-4-5");
  $(".Wrap-4-5").hover(
    function(){ $("#Layer-5").show(); $("#Layer-4").hide(); },
    function(){ $("#Layer-4").show(); $("#Layer-5").hide(); });
  $("#Layer-7").addClass("Wrap-6-7").hide();
  $("#Layer-6").addClass("Wrap-6-7");
  $(".Wrap-6-7").hover(
    function(){ $("#Layer-7").show(); $("#Layer-6").hide(); },
    function(){ $("#Layer-6").show(); $("#Layer-7").hide(); });
  $("#Layer-9").addClass("Wrap-8-9").hide();
  $("#Layer-8").addClass("Wrap-8-9");
  $(".Wrap-8-9").hover(
    function(){ $("#Layer-9").show(); $("#Layer-8").hide(); },
    function(){ $("#Layer-8").show(); $("#Layer-9").hide(); });
  $("#Layer-11").addClass("Wrap-10-11").hide();
  $("#Layer-10").addClass("Wrap-10-11");
  $(".Wrap-10-11").hover(
    function(){ $("#Layer-11").show(); $("#Layer-10").hide(); },
    function(){ $("#Layer-10").show(); $("#Layer-11").hide(); });
  $("#Layer-14").addClass("Wrap-13-14").hide();
  $("#Layer-13").addClass("Wrap-13-14");
  $(".Wrap-13-14").hover(
    function(){ $("#Layer-14").show(); $("#Layer-13").hide(); },
    function(){ $("#Layer-13").show(); $("#Layer-14").hide(); });
  $("#Layer-16").addClass("Wrap-15-16").hide();
  $("#Layer-15").addClass("Wrap-15-16");
  $(".Wrap-15-16").hover(
    function(){ $("#Layer-16").show(); $("#Layer-15").hide(); },
    function(){ $("#Layer-15").show(); $("#Layer-16").hide(); });
  $("#Layer-18").addClass("Wrap-17-18").hide();
  $("#Layer-17").addClass("Wrap-17-18");
  $(".Wrap-17-18").hover(
    function(){ $("#Layer-18").show(); $("#Layer-17").hide(); },
    function(){ $("#Layer-17").show(); $("#Layer-18").hide(); });
  $("#Layer-21").addClass("Wrap-20-21").hide();
  $("#Layer-20").addClass("Wrap-20-21");
  $(".Wrap-20-21").hover(
    function(){ $("#Layer-21").show(); $("#Layer-20").hide(); },
    function(){ $("#Layer-20").show(); $("#Layer-21").hide(); });
  $("#Layer-23").addClass("Wrap-22-23").hide();
  $("#Layer-22").addClass("Wrap-22-23");
  $(".Wrap-22-23").hover(
    function(){ $("#Layer-23").show(); $("#Layer-22").hide(); },
    function(){ $("#Layer-22").show(); $("#Layer-23").hide(); });
  $("#Layer-25").addClass("Wrap-24-25").hide();
  $("#Layer-24").addClass("Wrap-24-25");
  $(".Wrap-24-25").hover(
    function(){ $("#Layer-25").show(); $("#Layer-24").hide(); },
    function(){ $("#Layer-24").show(); $("#Layer-25").hide(); });
  $("#Layer-28").addClass("Wrap-27-28").hide();
  $("#Layer-27").addClass("Wrap-27-28");
  $(".Wrap-27-28").hover(
    function(){ $("#Layer-28").show(); $("#Layer-27").hide(); },
    function(){ $("#Layer-27").show(); $("#Layer-28").hide(); });
  $("#Layer-30").addClass("Wrap-29-30").hide();
  $("#Layer-29").addClass("Wrap-29-30");
  $(".Wrap-29-30").hover(
    function(){ $("#Layer-30").show(); $("#Layer-29").hide(); },
    function(){ $("#Layer-29").show(); $("#Layer-30").hide(); });
  $("#Layer-32").addClass("Wrap-31-32").hide();
  $("#Layer-31").addClass("Wrap-31-32");
  $(".Wrap-31-32").hover(
    function(){ $("#Layer-32").show(); $("#Layer-31").hide(); },
    function(){ $("#Layer-31").show(); $("#Layer-32").hide(); });
  $("#Layer-35").addClass("Wrap-34-35").hide();
  $("#Layer-34").addClass("Wrap-34-35");
  $(".Wrap-34-35").hover(
    function(){ $("#Layer-35").show(); $("#Layer-34").hide(); },
    function(){ $("#Layer-34").show(); $("#Layer-35").hide(); });
  $("#Layer-37").addClass("Wrap-36-37").hide();
  $("#Layer-36").addClass("Wrap-36-37");
  $(".Wrap-36-37").hover(
    function(){ $("#Layer-37").show(); $("#Layer-36").hide(); },
    function(){ $("#Layer-36").show(); $("#Layer-37").hide(); });
  $("#Layer-39").addClass("Wrap-38-39").hide();
  $("#Layer-38").addClass("Wrap-38-39");
  $(".Wrap-38-39").hover(
    function(){ $("#Layer-39").show(); $("#Layer-38").hide(); },
    function(){ $("#Layer-38").show(); $("#Layer-39").hide(); });
  $("#Layer-41").addClass("Wrap-40-41").hide();
  $("#Layer-40").addClass("Wrap-40-41");
  $(".Wrap-40-41").hover(
    function(){ $("#Layer-41").show(); $("#Layer-40").hide(); },
    function(){ $("#Layer-40").show(); $("#Layer-41").hide(); });
  $("#Layer-44").addClass("Wrap-43-44").hide();
  $("#Layer-43").addClass("Wrap-43-44");
  $(".Wrap-43-44").hover(
    function(){ $("#Layer-44").show(); $("#Layer-43").hide(); },
    function(){ $("#Layer-43").show(); $("#Layer-44").hide(); });
  $("#Layer-46").addClass("Wrap-45-46").hide();
  $("#Layer-45").addClass("Wrap-45-46");
  $(".Wrap-45-46").hover(
    function(){ $("#Layer-46").show(); $("#Layer-45").hide(); },
    function(){ $("#Layer-45").show(); $("#Layer-46").hide(); });
  $("#Layer-48").addClass("Wrap-47-48").hide();
  $("#Layer-47").addClass("Wrap-47-48");
  $(".Wrap-47-48").hover(
    function(){ $("#Layer-48").show(); $("#Layer-47").hide(); },
    function(){ $("#Layer-47").show(); $("#Layer-48").hide(); });
  $("#Layer-50").addClass("Wrap-49-50").hide();
  $("#Layer-49").addClass("Wrap-49-50");
  $(".Wrap-49-50").hover(
    function(){ $("#Layer-50").show(); $("#Layer-49").hide(); },
    function(){ $("#Layer-49").show(); $("#Layer-50").hide(); });
  
  // This is code to handle the screenprinting_menu menu
  $("#Layer-12").hide().addClass("allMenus");
  $("#Layer-3").click(function(e){
    e.preventDefault();
    $(".allMenus").hide("slow");
    $("#Layer-12").show("slow");
    // Remove the following 2 lines if you don't want this menu to dissappear
    // automatically.  Change how long the menu stays visible by changing
    // the 4000 to another number of milliseconds
    clearTimeout( timerId );
    timerId = setTimeout( '$("#Layer-12").hide("slow")', 4000 );
  });
  
  // This is code to handle the calendar_menu menu
  $("#Layer-19").hide().addClass("allMenus");
  $("#Layer-5").click(function(e){
    e.preventDefault();
    $(".allMenus").hide("slow");
    $("#Layer-19").show("slow");
    // Remove the following 2 lines if you don't want this menu to dissappear
    // automatically.  Change how long the menu stays visible by changing
    // the 4000 to another number of milliseconds
    clearTimeout( timerId );
    timerId = setTimeout( '$("#Layer-19").hide("slow")', 4000 );
  });
  
  // This is code to handle the contact_menu menu
  $("#Layer-26").hide().addClass("allMenus");
  $("#Layer-7").click(function(e){
    e.preventDefault();
    $(".allMenus").hide("slow");
    $("#Layer-26").show("slow");
    // Remove the following 2 lines if you don't want this menu to dissappear
    // automatically.  Change how long the menu stays visible by changing
    // the 4000 to another number of milliseconds
    clearTimeout( timerId );
    timerId = setTimeout( '$("#Layer-26").hide("slow")', 4000 );
  });
  
  // This is code to handle the catalog_menu menu
  $("#Layer-42").hide().addClass("allMenus");
  $("#Layer-9").click(function(e){
    e.preventDefault();
    $(".allMenus").hide("slow");
    $("#Layer-42").show("slow");
    // Remove the following 2 lines if you don't want this menu to dissappear
    // automatically.  Change how long the menu stays visible by changing
    // the 4000 to another number of milliseconds
    clearTimeout( timerId );
    timerId = setTimeout( '$("#Layer-42").hide("slow")', 4000 );
  });
  
  // This is code to handle the info_menu menu
  $("#Layer-33").hide().addClass("allMenus");
  $("#Layer-11").click(function(e){
    e.preventDefault();
    $(".allMenus").hide("slow");
    $("#Layer-33").show("slow");
    // Remove the following 2 lines if you don't want this menu to dissappear
    // automatically.  Change how long the menu stays visible by changing
    // the 4000 to another number of milliseconds
    clearTimeout( timerId );
    timerId = setTimeout( '$("#Layer-33").hide("slow")', 4000 );
  });
  
  // This is code to handle the addyourevent_menu menu
  $("#Layer-74").fadeOut().addClass("allMenus");
  $("#Layer-25").click(function(e){
    e.preventDefault();
    $(".allMenus").fadeOut("slow");
    $("#Layer-74").fadeIn("slow");
    // Remove the following 2 lines if you don't want this menu to dissappear
    // automatically.  Change how long the menu stays visible by changing
    // the 4000 to another number of milliseconds

  });
  
  // This is code to handle the email_menu menu
  $("#Layer-66").fadeOut().addClass("allMenus");
  $("#Layer-32").click(function(e){
    e.preventDefault();
    $(".allMenus").fadeOut("slow");
    $("#Layer-66").fadeIn("slow");
    // Remove the following 2 lines if you don't want this menu to dissappear
    // automatically.  Change how long the menu stays visible by changing
    // the 4000 to another number of milliseconds

  });


  /* Here we take care of any _close layers you have made */
  $("#Layer-73").click(function(){ $("#Layer-73").parent().hide("slow"); });
  $("#Layer-84").click(function(){ $("#Layer-84").parent().hide("slow"); });


  /* Custom code added by hand... 
   *  
   *  Here we hijack the click event for our submit button.  First, we call
   *  preventDefault on the event because we dont want the link to take us to
   *  another page anymore, we're going to take care of it ourselves with AJAX.
   *  So then we make our AJAX call to formmail.php, send our data from the
   *  form, and define a fade out of the form (the thank you message is hiding
   *  behind it) to thank our user for helping out.
   *  
   */

	$("#Layer-83").click(function(e){
    e.preventDefault();
    $.post( "formmail.php", 
      { 
        email: $("#email").val(),
		fullname: $("#fullname").val(),
		eventname: $("#eventname").val(),
		eventurl: $("#eventurl").val(),
		eventdate: $("#eventdate").val(),
        message: $("#deion").val(),
        recipients: "s_white@werunthistown.com",
        subject: "add event request ",
        env_report: "REMOTE_HOST,REMOTE_ADDR,HTTP_USER_AGENT,AUTH_TYPE,REMOTE_USER"
      },
      function(data){ $("#Layer-76").fadeOut("slow"); 
    }); 
  });
	
		$("#Layer-72").click(function(e){
    e.preventDefault();
    $.post( "formmail.php", 
      { 
        email: $("#email").val(),
		name: $("#name").val(),
		message: $("#message").val(),
        recipients: "s_white@werunthistown.com",
        subject: "message from website",
        env_report: "REMOTE_HOST,REMOTE_ADDR,HTTP_USER_AGENT,AUTH_TYPE,REMOTE_USER"
      },
      function(data){ $("#Layer-68").fadeOut("slow"); 
    }); 
  });

});

