// Place your application-specific JavaScript functions and classes here
// This file is automatically included by javascript_include_tag :defaults
$(document).ready(function() {
  $('.flash').hide().slideDown().animate({opacity: 1.0}, 3000).slideUp();
  $('.fancybox').fancybox();

  $('input.clearme').focus(function(i) {
    if (this.value == this.title) {
      this.value = "";
      $(this).removeClass('clearme');
    }
  });
  $('input.clearme').blur(function(i) {
    if (this.value == "") {
      this.value = this.title;
      $(this).addClass('clearme');
    }
  });
  $('#subscriber_form').submit(function() {
    $.post('/subscribers', $(this).serialize(), function(data) {
      if (data.status == "success") {
        $('#subscriber_form_wrap').html(data.message);
      }
    }, "json");
    return false;
  });

  FB.init("2a1b73bde9547c09d3167d5c4137b7dd");

  /*$('.landowners-btn').mouseover(function() {
    $('.landowners-ban').show();
  });

  $('.landowners-btn').mouseout(function() {
    $('.landowners-ban').hide();
  });

  $('.oil-gas-btn').mouseover(function() {
    $('.oil-gas-ban').show();
  });

  $('.oil-gas-btn').mouseout(function() {
    $('.oil-gas-ban').hide();
  });

  $('.clean-energy-btn').mouseover(function() {
    $('.clean-energy-ban').show();
  });

  $('.clean-energy-btn').mouseout(function() {
    $('.clean-energy-ban').hide();
  });

  $('.environment-btn').mouseover(function() {
    $('.environment-ban').show();
  });

  $('.environment-btn').mouseout(function() {
    $('.environment-ban').hide();
  });*/

});

