﻿$(document).ready(function() {

    $("#ctl00_ContentPlaceHolder1_btnSave").attr("disabled", "disabled");

    $("#ctl00_ContentPlaceHolder1_wysiwgyHidden").hide();

    $("#show-join").click(function() {
        $("#join-form").show('slow');

        $("#login-form").hide('slow');
    });

    $("#show-login").click(function() {
        $("#login-form").show('slow');

        $("#join-form").hide('slow');
    });

    $("#wysiwgy").keypress(function() {
        $("#ctl00_ContentPlaceHolder1_wysiwgyHidden").attr("value", $("#wysiwgy").attr("value"));

    });

    $("#show-email").click(function() {
        $("#dCaptcha").show("slow");
        $("#show-email").hide("slow");
    });  
    
    $('#chkAgreement').click(function(){
        if($(this).is(':checked'))
        {
           $("#ctl00_ContentPlaceHolder1_btnSave").removeAttr("disabled");
        }
        else
        {
            $("#ctl00_ContentPlaceHolder1_btnSave").attr("disabled", "disabled");
        }
    });
    
});

setTimeout(function() {
    $(document).ready(function() {
	    $(".search-field").autocomplete('Service/autocomplete.aspx',
    {
	    delay: 10,
	    minChars: 2,
	    autoFill: false
    }
    );

    });
}, 1500);

