if (typeof HSP == "undefined") HSP = new Object();
if (typeof HSP.image == "undefined") HSP.image = new Object();

HSP.init_image = function ()
{
	console.log("HSP.init_image()");	
	
	HSP.image.bind_images();
	HSP.util.register_av();

	if (HSP.image.type_id == 12) {
		var object_id = HSP.videos[0];
		swfobject.registerObject("video-" + object_id, "9.0.115", "/_swf/expressInstall.swf");
	} else if (HSP.image.type_id == 13) {
		var object_id = HSP.audios[0];
		swfobject.registerObject("audio-" + object_id, "9.0.115", "/_swf/expressInstall.swf");
	}
		
	HSP.collection.init();
}

HSP.image.bind_images = function ()
{
	HSP.image.image = 0;
	
	if (HSP.images.length > 0) {
		$("#details img.image-hsp4").bind("click", function () {
			var id = parseInt($(this).attr("id").slice(11), 10);
	
			HSP.util.overlay_open(id);
	
			return false;									
		}).css("cursor", "pointer");
	}
}
