/*
 * JS library containing various gui web 2.0 feature to Click2Sell
 *
 */

var pathLoaderGif = "../images/ajax-loader.gif";

/* Plugged in functions */

/**
 * Show informational message in div
 * @param messageText
 */
jQuery.fn.showInfo = function(messageText) {

    $(this).empty();
    var errorContent = "<div class=\"ui-state-highlight ui-corner-all\" style=\"padding: 0pt 0.7em; margin-top: 20px;\"><p><span class=\"ui-icon ui-icon-info\" style=\"float: left; margin-right: 0.3em;\"></span>";
		errorContent +=	messageText;
        errorContent += "</p></div>";
    $(this).append(errorContent);

};

/**
 * Show error message in div, stylized according current jquery ui widget style
 * @param messageText
 */
jQuery.fn.showError = function(messageText) {

    $(this).empty();
    var errorContent = "<div class=\"ui-state-error ui-corner-all\" style=\"padding: 0pt 0.7em;\"><p><span class=\"ui-icon ui-icon-alert\" style=\"float: left; margin-right: 0.3em;\"></span>";
		errorContent +=	messageText;
        errorContent += "</p></div>";
    $(this).append(errorContent);

};

jQuery.fn.showProgress = function() {
    $(this).empty();
    $(this).append("<img vspace=\"" + (Math.round($(this).height()/2-7)) +"\" hspace=\"" + (Math.round($(this).width()/2-64)) +"\"  src=\"" + pathLoaderGif + "\" height=\"15\" width=\"128\" />");
};



jQuery.fn.doSomething = function()
{
    // do something
};


