--- /dev/null
+var active = false;\r
+\r
+//changes the preview image\r
+function switchCloseup(to) {\r
+ /* Deselect all closeups */\r
+ $(".closeup div").removeClass('selected');\r
+ /* Select the wanted one */\r
+ $(".closeup div." + to).addClass('selected');\r
+}\r
+\r
+//hides all previewcontent and reveales the selected info\r
+function switchInfo(cls) {\r
+ /* Deselect all summaries */\r
+ $(".summary div").removeClass('selected');\r
+ /* Select the wanted one */\r
+ $(".summary div." + cls).addClass('selected');\r
+ /* Save the selected area to reset to on mouseout */\r
+ active = cls;\r
+}\r
+\r
+//after loading the document do this:\r
+$(document).ready( function () {\r
+ $("area").mouseout (function (){\r
+ /* Switch back to the selected area */\r
+ switchCloseup(active);\r
+ });\r
+\r
+ $("area").mousemove (function (){\r
+ /* Switch to the area we're hovering over */\r
+ switchCloseup($(this).attr('class'));\r
+ });\r
+\r
+ $("area").click (function (){\r
+ /* Select a different area */\r
+ switchInfo($(this).attr('class'));\r
+ return false;\r
+ });\r
+});\r