度假生活

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!--
<!--#include virtual="/hotels/head.shtml"-->
-->
<script type="text/javascript" src="http://js.mymhotel.com/common/common.js"></script>
<link rel="stylesheet" type="text/css" href="http://css.mymhotel.com/common/newcommon01.css">
<link rel="stylesheet" type="text/css" href="http://css.mymhotel.com/front/djsh_new.css">
<script type="text/javascript">
var jChapter={photoinfo:[{name:'',pic:['front/pic2_01.jpg']},{name:'假日故事:旅游时代 VS 休闲度假时代',pic:['front/pic2_02.jpg','front/pic4_02.jpg']},{name:'“世界”之广  遍及中国',pic:['front/pic5_01.jpg']},{name:'“世界”之大  包罗万象',pic:['front/pic5_02.jpg','front/pic6_01.jpg','front/pic7_01.jpg']},{name:'"世界"之美  目不暇接',pic:['front/pic7_02.jpg']},{name:'“世界”的钥匙 等你珍藏',pic:['front/pic8_01.jpg']},{name:'三亚湾红树林度假世界—最大 最全 最High 最IN的红树林',pic:['front/pic9_02.jpg']},{name:'开创者,自在格局之上',pic:['front/pic10_02.jpg','front/pic11_02.jpg','front/pic12_02.jpg','front/pic13_02.jpg','front/pic14_02.jpg','front/pic17_02.jpg','front/pic18_01.jpg']} ]};
var chapter = -1;
var picIndex = 0;
var cTotal = jChapter.photoinfo.length;
$(function(){
//图片切换
    $('.picshow li').html($('#js_list').html());
    $('.prev,.prevo').click(function(){//上一张
        if(chapter<=0){
            chapter = -1;
            picIndex = 0;
            $('.picshow li').html($('#js_list').html());
            return false;
        };
        if(picIndex==0){
            chapter = chapter - 1;
            picIndex = jChapter.photoinfo[chapter].pic.length-1;
            goto(chapter,picIndex);
        }else{
            picIndex = picIndex -1;
            goto(chapter,picIndex);    
        }
        return false;
    });
    $('.next,.nexto').click(function(){//下一张
        if(chapter==-1){
            chapter = 0;
            goto(chapter,0);
            return false;
        };
        if(chapter>jChapter.photoinfo.length-1) return;
        cNowTotal = jChapter.photoinfo[chapter].pic.length;
        if(picIndex>=cNowTotal-1){
            picIndex = 0;
            chapter = chapter +1;
            goto(chapter,0);
        }else{
            picIndex = picIndex +1;
            goto(chapter,picIndex);    
        }
        ///alert(chapter+1+'//////'+picIndex);
        return false;
    });
    $('.list,.listx').click(function(){
        chapter = -1;
        picIndex = 0;
        $('.picshow li').html($('#js_list').html());
        //var infoa="";
        //var infob=jChapter.photoinfo[0+1].name;
        $('.namelist span cite.txt1').html('无');
        $('.namelist span cite.txt2').html(jChapter.photoinfo[chapter+2].name);
        return false;
    });
    $('#Map area').live('click',function(){
        chapter = parseInt($(this).attr('chapter'));
        goto(chapter,0);
        
        return false;
    })
    if(chapter=-1){
        var info2=jChapter.photoinfo[chapter+2].name;
        $('.namelist span cite.txt1').html('无');
        $('.namelist span cite.txt2').html(info2);
    }
    $('ul.picshow li').hover(function(){
        $('ul.pagecon').show();
    })
});
function goto(cIndex,pIndex){
    if(cIndex>jChapter.photoinfo.length-1) return;
    $('.picshow li').html('<img border="0" alt="" src="http://img.mymhotel.com/'+jChapter.photoinfo[cIndex].pic[pIndex]+'">');
        /*上一章 下一章 name的显示*/
        if(cIndex-1>=1){
         var info1=jChapter.photoinfo[cIndex-1].name;
        }
        else{ info1="无"; }
        if(cIndex+1<=cTotal-1){
         var info2=jChapter.photoinfo[cIndex+1].name;  //读取当前图片的下一章name            
        }
        else{
          info2="无";
        }
         $('.namelist span cite.txt1').html(info1);
         $('.namelist span cite.txt2').html(info2);
}
</script>
</head>
<body class="body10">
<div class="bg">
  <div style="display:none;">
    <!--#include virtual="/hotels/header01.shtml"-->
  </div>
  <div style='display:none'>
    <!--#include virtual="/hotels/slogan_main.shtml"-->
  </div>
  <div style='display:none'>
    <!--#include virtual="/hotels/subnav2.shtml"-->
  </div>
  <div class="whitebox">
  <div class="btn_c"><a href="#" class="img_xs"><img src="http://img.mymhotel.com/front/djsh_xs.jpg"  alt="红树林销售中心"/></a><a href="#"><img src="http://img.mymhotel.com/front/djsh_df.jpg" alt="红树林订房中心" /></a></div>
  <div class="piclist">
    <div class="pagelist"> <a href="#" class="prev">上一章</a> <a href="#" class="list">返回目录</a> <a href="#" class="next">下一章</a> </div>
    <ul class="picshow">
      <li>
      </li>
    </ul>
    <div id="js_list" style="display:none;"><img id="js_listimg" src="http://img.mymhotel.com/front/pic1_01.jpg"  alt="" border="0" usemap="#Map"/>
        <map name="Map" id="Map">
          <area chapter="1" shape="rect" coords="80,181,445,211" href="#" />
          <area chapter="2" shape="rect" coords="81,240,347,272" href="#" />
          <area chapter="3" shape="rect" coords="80,301,341,335" href="#" />
          <area chapter="4" shape="rect" coords="79,361,339,398" href="#" />
          <area chapter="5" shape="rect" coords="81,425,358,457" href="#" />
          <area chapter="6" shape="rect" coords="80,488,657,523" href="#" />
          <area chapter="7" shape="rect" coords="81,546,335,582" href="#" />
        </map></div>
    <div class="pagecon"> <a href="#" class="prevo">前一张</a><a href="#" class="nexto">后一张</a> </div>
    <div class="namelist">
         <span class="prevspan">上一章 <cite class="txt1"> </cite></span><a href="#" class="listx">返回目录</a><span class="nextspan">下一章 <cite class="txt2"></cite></span>
    </div>
  </div>
</div>
</div>
</body>
</html>

posted @ 2014-03-12 17:36  Western Journey  阅读(88)  评论(0编辑  收藏  举报