// js included in footer
(function ($) {
  $(document).ready(function(){
    $("label.inlined + .textInput").each(function (type) {
      $(this).focus(function () {
        $(this).prev("label.inlined").addClass("focus");
      });
      $(this).keypress(function () {
        $(this).prev("label.inlined").addClass("has-text").removeClass("focus");
      });
      $(this).blur(function () {
        if($(this).val() == "") {
          $(this).prev("label.inlined").removeClass("has-text").removeClass("focus");
        }
      });
    });
    
    // beta code
    /*queryString = window.location.search.substring(1);
    if (queryString.indexOf('beta=1') != -1) {
      $('a[href*="php"], a[href="/"]').each(function(){
        // make sure it's not a popup link
        if ($(this).attr('href').indexOf('disclaimer') == -1) {
          // add query string based on if one is present in link or not
          if ($(this).attr('href').indexOf('?') == -1) {
            $(this).attr('href', $(this).attr('href') + '?beta=1');
          }
          else {
            $(this).attr('href', $(this).attr('href') + '&beta=1');
          }
        }
      });
    }*/
  });
})(jQuery);
