/*
js.js
Copyright (C) 2007 Media Promotion Link
Create:  2007-11-13
Modify: 2007-12-10
*/

$(function(){

  if($("body#detail"))  {

    if ($("a#iconDescription")) {
      $("div#shopDetail ul li.description").append('<div id="explanatoryNote" style="position: absolute; width: 157px; height: 139px; top: 22px; left: 220px;">'
       +'<img src="images/icon_description.gif" alt="" usemap="#mapLink" /><map name="mapLink" id="mapLink">'
       +'<area shape="rect" coords="135, 7, 150, 21" href="#" id="explanatoryNoteClose" title="閉じる" /></map></div>');
      $("div#explanatoryNote").hide();
    
      $("area#explanatoryNoteClose").click(function() {
        $("div#explanatoryNote").fadeOut(500);
        return false;
      });
      $("a#iconDescription").click(function() {
        $("div#explanatoryNote").fadeIn(500);
        return false;
      });
    }

    if ($("img.thumbShop")) {
      $("img.thumbShop").mouseover(function() {
        $("img#zoomShop").attr("src", this.src);
      });
      $("img.thumbShop").mouseout(function() {
        $("img#zoomShop").attr("src", $("a.slidea img").attr("src"));
      });
    }

    //GoogleMaps
    if ($("dl#shopAddress dd span a")) {
      $("dl#shopAddress dd span a").click(function() {
        window.open(this.href, "googlemap", "width=500, height=500, toolbar=no, menubar=yes, scrollbar=no");
        return false;
      });
    }

    //GoogleMaps(search result)
    if ($("a.gmaps")) {
      $("a.gmaps").click(function() {
        window.open(this.href, "googlemap", "width=500, height=500, toolbar=no, menubar=yes, scrollbar=no");
        return false;
      });
    }

  }




});

