$(function(){

 $(".ximg").each(function(){
    var s = $(this).attr("src");
    var files = s.split("/");
    var img = "b_"+files[1];
    var tmp = new Image();
    tmp.src="/_data/"+img;

 });

 $(".ximg").bind("mouseenter",function(){
    var s = $(this).attr("src");
    var files = s.split("/");
    img = "b_"+files[1];
    Tip("<img src='/_data/"+img+"' alt='Nincs nagy kép' />",DURATION,1000);
 }
 );

 $("input.must").blur(function()
 {
  $(this).removeClass("ok");
  $(this).removeClass("err");
  if($(this).attr("type")=="password" )
  {
    var s = new String($(this).val());
    if(s.length<6 )
    {
        $(this).addClass("err");
        $(this).mouseout(function(){
            UnTip();
        }
        );
        Tip("Legalább 6 karakter hosszú jelszót adjon meg!");
        setTimeout(function(){
            UnTip();
        },3000
        );
    }else{
        $(this).addClass("ok");
    }
  }
  else
  {
        ($(this).val()=="")?$(this).addClass("err"):$(this).addClass("ok");
  }
 });

 $(".reload").click(function(){
    document.location=document.location;
 });

 $(".elf").bind("click",
    function()
    {
        $(this).html("Kérem a jelszavamat e-mailben");
        $(".gg").hide();
        $(".login").fadeOut(function()
        {
            $(".passw").hide();
            $(".login").prepend("<tr><td style='background-color:#CBD4e5;'>E-mail cím:&nbsp;&nbsp;&nbsp;</td><td style='background-color:#CBD4e5;'><input class='logininp' type='text' id='emails' name='emails' value='' /></td></tr>");
            $(".login").fadeIn();
            $(".elf").unbind();
            $(".elf").click(function(){
                $(".del").remove();
                $.get("index.php","mod=store&em="+$("#emails").val(),function(html)
                {
                    $(".login").prepend("<tr class='del'><td colspan='2' style='text-align:center;padding:10px;background-color:#CBD4e5;'>"+html+"</td></tr>");
                },"html");
                return false;
            }
            );
        });
        return false;
    }
 );

});
