/*
* Script for disabling form submits when enter is pressed in input boxes.
* 
* Copyright (c) 2008-2010 Exan Academic
*
* Date: 2010-01-15
*/
$(function() {
    $("form").on('keypress', 'input', function (e) {       // AX-24898.24919.2 use on() instead of live()
        var code = (e.keyCode || e.which);
        if (code == 13) {
            if (!($(this).hasClass('finish'))) {
                return false;
            }
        }
        return true;
    });

    $("form").live('click', 'a.seeMore', function (e) {     // AX-24898.24919.2 use on() instead of live()
        e.preventDefault();
        $(this).hide();
        $("span.seeMore").animate({ 'opacity' : 'toggle' });
    });

    $("form").live('click', 'a.seeLess', function (e) {     // AX-24898.24919.2 use on() instead of live()
        e.preventDefault();
        $("span.seeMore").animate({ 'opacity': 'toggle' });
        $("a.seeMore").show();
        $('html, body').animate({ scrollTop: 0 }, 200);
    });
});

