// ==ClosureCompiler==
// @compilation_level SIMPLE_OPTIMIZATIONS
// @output_file_name showcase.min.js
// ==/ClosureCompiler==
(function($){
function ShowcaseWidget(id) {
    this.id = id;
    this.context = $('#'+id);
};

ShowcaseWidget.prototype.defaults = {
    containerWidth: 620,
    containerHeight: 212,
    headerWidth: 32,
    enumerateSlides: true,
    theme: 'vw'
};

ShowcaseWidget.prototype.addPixelTagToURL = function(url, param) {
    var pixelTagPrefix = 'cs:a:i=';
    return (url.indexOf(pixelTagPrefix) > -1) ? url : (url + (url.split('?')[1] ? '&':'?') + pixelTagPrefix + param);
};

ShowcaseWidget.prototype.init = function() {
    var me = this;
    var showcase = me.showcase = $(".widget-showcase", me.context);
    showcase.liteAccordion(me.defaults);
    showcase.find('a').each(function() {
        $(this).attr('href', me.addPixelTagToURL($(this).attr('href'), "showcasewidget"));
    });
};

// Publish
window.ShowcaseWidget = ShowcaseWidget;

// Trigger
$(function() { $(window).trigger('ShowcaseWidget.loaded'); });

})(jQuery);

