views:

42

answers:

0

I checked this in firebug lite, and it's loading everything into the DOM properly, but immediately hangs on the second image. When I try visiting the images individually they don't load either. Any ideas?

I should also point out that this script works fine in: IE7, IE8, Firefox 2,3, and Safari.

$(document).ready(function() {

var regexp = /_m\.jpg/g;
           $.getJSON("http://api.flickr.com/services/feeds/photoset.gne?set=72157623264302432&nsid=(thisHiddenId)&lang=en-us&format=json&jsoncallback=?",

    function(data){

        $.each(data.items, function(i,item){
            $("<img/>").attr("src", item.media.m.replace(regexp,'.jpg')).appendTo(".imageGallery")
            .wrap("<div class='imageContainer'></div>")
            .before("<div class='overlay'>" + item.title + " " + item.description + "</div>")
            .wrap("<a href='" + item.link + "'></a>");
        });

        $("div.overlay p").hide();
        $("div.overlay p:contains('Photo credit')").show();
        $("div.overlay p:contains('Photo Credit')").show();
        $("div.overlay").slideUp("fast");

        $("div.imageContainer").each(function(index) {

            $(this).mouseenter(function() {
                $("div.overlay", this).slideDown("fast");
            });

            $(this).mouseleave(function() {
                $("div.overlay", this).slideUp("fast");
            });

        });

    });

});