$(function()
  {
   
    $("table.tbl1").find("tr").hover( function(){ $(this).addClass("hover"); }, function(){ $(this).removeClass("hover"); } ); 
  
    $("input.reset").click( function()
      {
        $(this).parents("form").find("input[type=text]").val("");
        $(this).parents("form").find("input.resetable[type=hidden]").val("");
        $(this).parents("form").find("select").find("option").each( function() 
            { 
              if ( $(this).hasClass("default") )
                this.selected = true;
              else  
                this.selected = false;
            } );            
       } );
  
    $("input.smallbutton").hover( function(){ $(this).addClass("hover"); }, function(){ $(this).removeClass("hover"); } );
  
    $("#udalosti-form input[name=ticker]").keyup(function()
        {
          if ( !$(this).val() )
          {
            $("#udalosti-form input[name=id_cenina]").val("");
          }
        });
  }
)


function okno(h, w, cil) 
{
  var w = window.open('', cil, 'toolbar=n,height='+h+',width='+w+',resizable=1,scrollbars=1');
  setTimeout("var x=1;",500);
  w.focus(this);
}

function trim(str) 
{
  return str.replace(/^\s*|\s*$/g, "");
}

