$(document).ready(function() {
  
  
  //externi odkazy
  $("#stat-stat-in a")
  .filter(function() {
    return this.hostname &&  this.hostname != location.hostname;
  })
  .addClass("a-extstr")
  .click(function() {
    window.open(this.href);
    return false;
  });
  
  $(".no-extstr").removeClass("a-extstr");
  
  
  
  
  
  //oveření placeholderu, pokud prohlížeč umí, tak odebrat atribut value

  function overit_HTML5funkce(element, atribut) {
    var test = document.createElement(element);
    if (atribut in test) { return true; } else { return false; }
  }

/*
  if (overit_HTML5funkce("input", "placeholder")) {
    $("#ujmeno").removeAttr("value");
    $("#uheslo").removeAttr("value");
    $("#ujmenoObj").removeAttr("value");
    $("#uhesloObj").removeAttr("value");
  }
*/

  if (!overit_HTML5funkce("input", "placeholder")) {
    $("#ujmeno").val("Email");
    $("#uheslo").val("Heslo");
    $("#ujmeno").focus(function() { if ($(this).val() == "Email") { $(this).val(""); } });
    $("#ujmeno").focusout(function() { if ($(this).val() == "") { $(this).val("Email"); } });
    $("#uheslo").focus(function() { if ($(this).val() == "Heslo") { $(this).val(""); } });
    $("#uheslo").focusout(function() { if ($(this).val() == "") { $(this).val("Heslo"); } });

    $("#ujmenoObj").val("Email");
    $("#uhesloObj").val("Heslo");
    $("#ujmenoObj").focus(function() { if ($(this).val() == "Email") { $(this).val(""); } });
    $("#ujmenoObj").focusout(function() { if ($(this).val() == "") { $(this).val("Email"); } });
    $("#uhesloObj").focus(function() { if ($(this).val() == "Heslo") { $(this).val(""); } });
    $("#uhesloObj").focusout(function() { if ($(this).val() == "") { $(this).val("Heslo"); } });
  }

  //místo placeholderu
  //$("#ujmeno").focus(function() { if ($(this).val() == "Email") { $(this).val(""); } });
  //$("#ujmeno").focusout(function() { if ($(this).val() == "") { $(this).val("Email"); } });
  //$("#ujmenoObj").focus(function() { if ($(this).val() == "Email") { $(this).val(""); } });
  //$("#ujmenoObj").focusout(function() { if ($(this).val() == "") { $(this).val("Email"); } });




  
  
  /*
  //doresi se az pak
  $(".prod-nahl-in .prod-nahl-shop-koupit").click(function() {
    alert("do ko");
    $(".prod-nahl-obr").animate({
      opacity: 0.25
    }, 5000, function() {
      alert("v košíku!");
    });
  });
  */
  
});

