﻿$(document).ready(function() {
    $(function() {
        $(document).bind("keydown", { combi: "Ctrl+q", disableInInput: true }, handlekey);
        $(document).bind("keydown", { combi: "Ctrl+Shift+q", disableInInput: true }, handlekey);
        
    });
    function handlekey(e) {        
        e.preventDefault();
        $("#txtHdnScanId").select();
    }
    jQuery.fn.fadeToggle = function(speed, easing, callback) {
        return this.animate({ opacity: 'toggle' }, speed, easing, callback);
    };

    $(document).ready(function() {
        $(".HandlesEnter").keypress(function(e) {
            if ((e.which && e.which == 13) || (e.keyCode && e.keyCode == 13)) {
                $(".EnterAction").click();
            }
        });
    });
    $(".login-btn").click(function() {
        $(".login-signup").toggle();
        $(".login-signin").fadeToggle("slow");
        document.getElementById('returnUrl').value = document.location;
        //Set focus to the Username
        $("#Email").focus();

        //On Enter key pressed, log them in
        $("#Password").keypress(function(e) {
            if ((e.which && e.which == 13) || (e.keyCode && e.keyCode == 13)) {
                $("#Login").click();
            }
        });

    });

});
