$(document).ready(function() {
  
  /**
   * ÏÎÄÑÊÀÇÊÈ
   */
  $(".tips").tooltip();

  /**
   * ÔÎÐÌÀ ÀÂÒÎÐÈÇÀÖÈÈ
   */
  // Âñå ïîëÿ ôîðìû
  var elements = $('#user-auth .medium-input');
  
  // Blur
  elements.blur(function() {
    if (this.value.replace(/(^[\s ]+|[\s ]+$)/g, '') == '') {
      $(this).css('color', '#ACACAC');
      $(this).val($(this).attr('alt'));
    }
  });
  
  // Focus
  elements.focus(function() {
    if (this.value == $(this).attr('alt')) {
      $(this).css('color', '#000000');
      $(this).val('');
    }
  });
  
});

function sliderShow(element) {
  var body = $(element).parent().parent();
  body.find("a:first").css({"border-bottom": "0", "color": "#585858"});
  body.find("h3:first").css({"background": "#86c5ef"});
  body.find("div:first").show("normal");
  body.css({"background": "#c2ddef", "border": "1px solid #d1e3ef", "margin": "10px 5px"});
};

function sliderHide(element) {
  var body = $(element).parent().parent();
  body.find("a:first").css({"border-bottom": "1px dashed #036ECA", "color": "#036ECA"});
  body.find("h3:first").css({"background": "#b3d7ef"});
  body.find("div:first").hide("normal");
  body.css({"background": "#b3d7ef", "border": "1px solid #b3d7ef", "margin": "5px 0"});
};