﻿$(function() {
    function examples() {
        var w = $(window);
        $("[popup]").click(function() {
            var elm = $('<pre>waiting...</pre>');
            elm.dialog({
                modal: true,
                width: w.width() * 0.9,
                height: w.height() * 0.9
            });
            $.get($(this).attr("popup"), function(html) {
                elm.html(html.replace(/\.\.\//g, ""));
            });
            return false;
        });
        $("[img_popup]").click(function() {
            var data = window["eval"]("(" + $(this).attr("img_popup") + ")");
			$.fn.colorbox({transition: "none", href: data.s});
            return false;
        });
    }
    examples();
});
