(function (window, $) {

    "use strict";

    if (window.document.body.id === "products") {
        $("#content-frame").append('<div id="image-view"></div>');
        $(".csc-textpic a").unbind("click")
            .removeAttr("onclick")
            .click(function () {
                var $imageView = $("#image-view"),
                    $this = $(this);

                $imageView.load(
                        $this.attr("href") + " img", null, function () {
                            var $img,
                                text;

                            $img = $this.find("img");
                            text = $img.attr("title");
                            if (!text) {
                                text = $img.attr("alt");
                            }
                            text = text.replace(/&/, '&amp;')
                                .replace(/</, '&lt;');
                            $imageView.append('<div>' + text + '</div>');
                        }
                    );
                return false;
            });
        $(".csc-textpic a:first-child").triggerHandler("click");
    }
}(window, jQuery));


