{"size": 706, "ext": "js", "max_stars_repo_path": "Machete/plugins/image_popup/image_popup.js", "max_stars_repo_name": "chistery/DIGH402Slamdance", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "Machete/plugins/image_popup/image_popup.js", "max_issues_repo_name": "chistery/DIGH402Slamdance", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "Machete/plugins/image_popup/image_popup.js", "max_forks_repo_name": "chistery/DIGH402Slamdance", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 26.1481481481, "max_line_length": 66, "alphanum_fraction": 0.5127478754}
/**
 * image_popup.js - js for image_popup plugin using jquery library
 */

$(document).ready(function() {
    $("#image_popup").hide();
    $('div#content').append('<div id="gallery_popup"></div>');
    $('div#gallery_popup').empty();
});

$(document).ready(function() {
    $('.image img').click(function() {
        var img_src = $(this).attr('src');
        var img_url = '<img src="' + img_src + '">';
        $('div#gallery_popup').html(img_url);
        $('div#gallery_popup img').css({
            'width': '100%'
        });

        $("div#gallery_popup").dialog({
            width: '50%',
            modal: true,
            title: "Drag and resize window as required"
        });

    });
});