

$(function(){

    // alternate class for teasers
    $("div.teaser:odd").addClass("odd");

    // swap values on form focus / blur
    swapValues = [];
    $(".swapvalue").each(function(i){
        swapValues[i] = $(this).val();
        $(this).focus(function(){
            if ($(this).val() == swapValues[i]) {
                $(this).val("");
            }
        }).blur(function(){
            if ($.trim($(this).val()) == "") {
                $(this).val(swapValues[i]);
            }
        });
    });

    // validate the sign-in form
    $("#login-tile-form").submit(function() {
      if ($("#login-tile-emailaddress").val() != "email address") {
        return true;
      }
      return false;
    });

    // validate the article search form
    $("#article-search").submit(function() {
      if ($("#s").val() != "Enter a keyword") {
        return true;
      }
      return false;
    });

});
