!function(a,b){"use strict";a.Concrete=a.Concrete||{},a.console=a.console||{},a.ConcreteEvent=function(c){function d(b,c,d){h?(a.console.groupCollapsed(b),d||"function"!=typeof c?a.console.log(c):c(),a.console.groupEnd()):i&&(d||"function"!=typeof c?a.console.log(b,c):(a.console.log('Group: "'+b+'"'),c(),a.console.log('GroupEnd: "'+b+'"')))}function e(a){return a||(a=f),a instanceof b||(a=b(a)),a.length||(a=f),a}var f=b("<span />"),g=!1,h="function"==typeof a.console.group&&"function"==typeof a.console.groupEnd,i="function"==typeof a.console.log,j={debug:function(a){return"undefined"==typeof a?g:g=!!a},subscribe:function(b,c,f){var h=c,i=new Error("EventStack").stack;return c=function(){g&&d("Handler Fired.",function(){d("Type",b,!0),d("Handler",h,!0),d("Target",f,!0),d("Bound Stack",i,!0),"function"==typeof a.console.trace?a.console.trace():d("Stack",new Error("EventStack").stack)}),h.apply(this,_(arguments).toArray())},g&&d("Event Subscribed",function(){d("Type",b,!0),d("Handler",h,!0),d("Target",f,!0),"function"==typeof a.console.trace?a.console.trace():d("Stack",new Error("EventStack").stack)}),b instanceof Array?_(b).each(function(a){j.subscribe(a,c,f)}):(e(f).bind(b.toLowerCase(),c),j)},publish:function(b,c,f){return g&&d("Event Published",function(){d("Type",b,!0),d("Data",c,!0),d("Target",f,!0),"function"==typeof a.console.trace?a.console.trace():d("Stack",new Error("EventStack").stack)}),b instanceof Array?_(b).each(function(a){j.publish(a,c,f)}):(e(f).trigger(b.toLowerCase(),c),j)},unsubscribe:function(c,f,h){var i;return g&&d("Event Unsubscribed",function(){d("Type",c,!0),d("Secondary Argument",f,!0),d("Target",h,!0),"function"==typeof a.console.trace?a.console.trace():d("Stack",new Error("EventStack").stack)}),i=["function"==typeof c.toLowerCase?c.toLowerCase():c],"undefined"!=typeof f&&i.push(f),b.fn.unbind.apply(e(h),i),j}};return j.sub=j.bind=j.watch=j.on=j.subscribe,j.pub=j.fire=j.trigger=j.publish,j.unsub=j.unbind=j.unwatch=j.off=j.unsubscribe,c.event=j,j}(a.Concrete)}(window,jQuery);