/**
 * Created by Cyan on 3/6/2016.
 */

$(document).ready(function () {
    $('.alert .glyphicon').click(function() {
        $(this).parent().hide();
    });
});

// UTILS
function showErrorMessage(message) {
    $('.general-success').hide();
    $('.general-error').hide();
    $('.general-error .text').text(message);
    $('.general-error').show();
    $('.general-error').delay(3000).fadeOut(3000 );
    $("html, body").animate({ scrollTop: 0 }, "slow");
}

function showSuccessMessage(message) {
    $('.general-error').hide();
    $('.general-success').hide();
    $('.general-success .text').text(message);
    $('.general-success').show();
    $('.general-success').delay(3000).fadeOut(3000 );
    $("html, body").animate({ scrollTop: 0 }, "slow");
}