// Handles injecting the Ad Fed Store featured items into the sidebar wherever the
// featured items module appears on a page.
//
(function ($) {
    function insertFeaturedItemsModule() {
        var container = $('.featured-items-container');
        if (container.length > 0) {
            $.ajax({
                url: '/wp-content/themes/thesis_16/custom/featured_items_proxy.php',
                success: function (response, status, xhr) {
                    container.append(response);
                }
            });
        }
    }

    $(document).ready(insertFeaturedItemsModule);
})(jQuery);

