var images;
var next;

function swap_img(shift, images) {
	next = ((shift == images.length - 1) ? 0 : shift + 1);
    images.eq(shift).delay(5000).fadeOut("slow");
    images.eq(next).delay(5000).fadeIn("slow", function(){swap_img(next, images);});
}

$("document").ready(
		function () {
        	images = $("img", "#woman");
            images.hide();
            images.first().show();
            if (images.length > 1) {swap_img(0, images);}
        }
);

$("#map").click(function (event) {
	event.preventDefault();
    $("#dialog").dialog({autoOpen: false, modal: true, width: "auto", position: "center"});
    $("#dialog").dialog("open");
});
