;
$(function(){
    //初始化Tab
    $('#container-1 > ul').tabs();
    //同步输入框文字
    $("#container-1 input[type='text']").change(function(){
        var v = $(this).val();
        $("#container-1 input[type='text']").val(v);
    })
    //
    $.jMessageBox.settings.title = 'System Message';
    $.jMessageBox.settings.yesButtonText = 'OK';
    $("#container-1 form#whois_lookup").submit(function(){
        var v = $("#container-1 form#whois_lookup input[type='text']").val();
        if (v == "" || !$.IpAndDomain.DomainAndIpCheck(v)) {
            $.jMessageBox.show('Invalid IP address Or Domain name!');
            return false;
        }
        
    })
	$("#container-1 form#ping_lookup").submit(function(){
        var v = $("#container-1 form#ping_lookup input[type='text']").val();
        if (v == "" || !$.IpAndDomain.DomainAndIpCheck(v)) {
            $.jMessageBox.show('Invalid IP address Or Domain name!');
            return false;
        }
        
    })
	$("#container-1 form#reverse_lookup").submit(function(){
        var v = $("#container-1 form#reverse_lookup input[type='text']").val();
        if (v == "" || !$.IpAndDomain.DomainAndIpCheck(v)) {
            $.jMessageBox.show('Invalid IP address Or Domain name!');
            return false;
        }
        
    })
	$("#container-1 form#ip_lookup").submit(function(){
        var v = $("#container-1 form#ip_lookup input[type='text']").val();
        if (v == "" || !$.IpAndDomain.IpCheck(v)) {
            $.jMessageBox.show('Invalid IP address !');
            return false;
        }
        
    })
	$("#container-1 form#pr_lookup").submit(function(){
        var v = $("#container-1 form#pr_lookup input[type='text']").val();
        if (v == "" || !$.IpAndDomain.IsURL(v)) {
            $.jMessageBox.show('Invalid Website address.!');
            return false;
        }
        
    })
    
});

