﻿/// <summary>
/// Displays a purr to the user.
/// </summary>
/// <param name="text">The text to display to the user.</param>
function ShowPurr(text, sticky, title) {
    if ( title == undefined )
    {
        title = 'EduArt';
    }

    if (sticky == undefined) {
        sticky = false;
    }

    var notice = '<div class="notice">'
              + '<div class="notice-body">'
              + '<img src="../images/purrInfo.png" alt="" />'
              + '<h3>' + title + '</h3>'
              + '<p>' + text + '</p>'
            + '</div>'
            + '<div class="notice-bottom">'
            + '</div>'
             + '</div>';

    $(notice).purr(
    {
        usingTransparentPNG: true,
        isSticky: sticky,
        removeTimer: 8000
    }
    );
} // End of ShowPurr

///// <summary>
///// Serializes the controls of a page without the ASP .NET view state.
///// </summary>
//$.fn.serializeWithoutViewState() = function () {
//    return this.find("input,textarea,select,hidden")
//               .not("[type=hidden][name^=__]")
//               .serialize();
//} // End of serializeWithoutViewState

function ShowBlockUI(msg) {

    if (msg == null) {
        msg = 'Kérem várjon...';
    }

    $.blockUI({ message: msg, css: {
        border: 'none',
        padding: '25px',
        backgroundColor: '#000',
        '-webkit-border-radius': '10px',
        '-moz-border-radius': '10px',
        opacity: .5,
        color: '#fff',
        fontSize: '14px',
        fontWeight: 'bold'}
    });
}