﻿$(function () {

    $(".water").each(function () {
        $tb = $(this);
        if ($tb.val() != this.title) {
            $tb.removeClass("water");
        }
    });

    $(".water").focus(function () {
        $tb = $(this);
        if ($tb.val() == this.title) {
            $tb.val("");
            $tb.removeClass("water");
        }
    });

    $(".water").blur(function () {
        $tb = $(this);
        if ($.trim($tb.val()) == "") {
            $tb.val(this.title);
            $tb.addClass("water");
        }
    });
});


function equalHeight(group) {
    var tallest = 0;
    group.each(function () {
        var thisHeight = $(this).height();
        if (thisHeight > tallest) {
            tallest = thisHeight;
        }
    });
    group.height(tallest);

}

$(document).ready(function () {
    equalHeight($(".orta"));
    if (typeof sepetiGuncelle == 'function') {
        sepetiGuncelle();
    }
   
});

function MinLength6(sender, args) {
    args.IsValid = (args.Value.length >= 6);
    $('.orta').height("auto");
    setTimeout("equalHeight($('.orta'))", 1);
}
function MinLength3(sender, args) {
    args.IsValid = (args.Value.length >= 3);
    $('.orta').height("auto");
    setTimeout("equalHeight($('.orta'))", 1);
}
function MinLength10(sender, args) {
    args.IsValid = (args.Value.length >= 10);
    $('.orta').height("auto");
    setTimeout("equalHeight($('.orta'))", 1);
}
function MinLength9(sender, args) {
    args.IsValid = (args.Value.length >= 9);
    $('.orta').height("auto");
    setTimeout("equalHeight($('.orta'))", 1);
}
function MinLength5(sender, args) {
    args.IsValid = (args.Value.length >= 5);
    $('.orta').height("auto");
    setTimeout("equalHeight($('.orta'))", 1);
}
function MinLength20(sender, args) {
    args.IsValid = (args.Value.length >= 20);
    $('.orta').height("auto");
    setTimeout("equalHeight($('.orta'))", 1);
} 
