/** * noty - jQuery Notification Plugin v1.2.1 * Contributors: https://github.com/needim/noty/graphs/contributors * * Examples and Documentation - http://needim.github.com/noty/ * * Licensed under the MIT licenses: * http://www.opensource.org/licenses/mit-license.php * **/ (function($) { $.noty = function(options, customContainer) { var base = {}; var $noty = null; var isCustom = false; base.init = function(options) { base.options = $.extend({}, $.noty.defaultOptions, options); base.options.type = base.options.cssPrefix+base.options.type; base.options.id = base.options.type+'_'+new Date().getTime(); base.options.layout = base.options.cssPrefix+'layout_'+base.options.layout; if (base.options.custom.container) customContainer = base.options.custom.container; isCustom = ($.type(customContainer) === 'object') ? true : false; return base.addQueue(); }; // Push notification to queue base.addQueue = function() { var isGrowl = ($.inArray(base.options.layout, $.noty.growls) == -1) ? false : true; if (!isGrowl) (base.options.force) ? $.noty.queue.unshift({options: base.options}) : $.noty.queue.push({options: base.options}); return base.render(isGrowl); }; // Render the noty base.render = function(isGrowl) { // Layout spesific container settings var container = (isCustom) ? customContainer.addClass(base.options.theme+' '+base.options.layout+' noty_custom_container') : $('body'); if (isGrowl) { if ($('ul.noty_cont.' + base.options.layout).length == 0) container.prepend($('