<?php if (!defined('THINK_PATH')) exit();?><!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" />
<title><?php echo ($tpl["wxname"]); ?></title>
<base href="." />
<meta name="viewport" content="width=device-width,height=device-height,inital-scale=1.0,maximum-scale=1.0,user-scalable=no;" />
<link rel="stylesheet" type="text/css" href="<?php echo RES;?>/css/reset.css?2013-9-13-2" media="all" />
<link rel="stylesheet" type="text/css" href="<?php echo RES;?>/css/font-awesome.css" media="all" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black" />
<meta name="format-detection" content="telephone=no" />
<link href="<?php echo RES;?>/css/allcss/cate1_0.css" rel="stylesheet" type="text/css" />
<link href="<?php echo RES;?>/css/101/iscroll.css" rel="stylesheet" type="text/css" />
<script src="<?php echo RES;?>/css/101/iscroll.js" type="text/javascript"></script>
<script type="text/javascript" src="<?php echo RES;?>/js/jQuery.js"></script>
<script type="text/javascript">
            var myScroll;

            function loaded() {
                myScroll = new iScroll('wrapper', {
                    snap: true,
                    momentum: false,
                    hScrollbar: false,
                    onScrollEnd: function () {
                        document.querySelector('#indicator > li.active').className = '';
                        document.querySelector('#indicator > li:nth-child(' + (this.currPageX+1) + ')').className = 'active';
                    }
                });
 
 
            }

            document.addEventListener('DOMContentLoaded', loaded, false);
        </script>
</head>
<body id="cate1">
<?php if($homeInfo['play_audio'] == 'on'): if($homeInfo['musicurl'] != false): ?><style>
.btn_music {
display: inline-block;
width: 35px;
height: 35px;
background: url('<?php echo RES;?>/img/play.png') no-repeat center center;
background-size: 100% auto;
position: absolute;
z-index: 100;
left: 15px;
top: 20px;
}
.btn_music.on {
    background-image: url("<?php echo RES;?>/img/stop.png");
}

</style>
<script src="<?php echo RES;?>/js/audio.js" type="text/javascript"></script>
<script type="text/javascript">
// 两秒后模拟点击
setTimeout(function() {
    // IE
    if(document.all) {
        document.getElementById("playbox").click();
    }
    // 其它浏览器
    else {
        var e = document.createEvent("MouseEvents");
        e.initEvent("click", true, true);
        document.getElementById("playbox").dispatchEvent(e);
    }
}, 2000);
</script>
<span id="playbox" class="btn_music" onclick="playbox.init(this).play();">
<audio src="<?php echo ($homeInfo["musicurl"]); ?>" loop="" id="audio"></audio>
</span><?php endif; endif; ?>
<div class="banner">
  <div id="wrapper">
    <div id="scroller">
      <ul id="thelist">
        <?php if(is_array($flash)): $i = 0; $__LIST__ = $flash;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$so): $mod = ($i % 2 );++$i;?><li>
            <p><?php echo ($so["info"]); ?></p>
            <a href="<?php echo ($so["url"]); ?>"><img src="<?php echo ($so["img"]); ?>" /></a></li><?php endforeach; endif; else: echo "" ;endif; ?>
      </ul>
    </div>
  </div>
  <div id="nav">
    <div id="prev" onclick="myScroll.scrollToPage('prev', 0,400,3);return false">&larr; prev</div>
    <ul id="indicator">
      <?php if(is_array($flash)): $i = 0; $__LIST__ = $flash;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$so): $mod = ($i % 2 );++$i;?><li   
        <?php if($i == 1): ?>class="active"<?php endif; ?>
        ><?php echo ($i); ?>
        </li><?php endforeach; endif; else: echo "" ;endif; ?>
    </ul>
    <div id="next" onclick="myScroll.scrollToPage('next', 0);return false">next &rarr;</div>
  </div>
  <div class="clr"></div>
</div>
<div id="insert1"></div>
<ul class="mainmenu">
  <?php if(is_array($info)): $i = 0; $__LIST__ = $info;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?><li>
      <div class="menubtn"> <a href="<?php if($vo['url'] == ''): echo U('Wap/Index/lists',array('classid'=>$vo['id'],'token'=>$vo['token']));?>
        <?php else: ?>
        <?php echo (htmlspecialchars_decode($vo["url"])); endif; ?>
        ">
        <div class="menumesg">
          <div class="menuimg"><img src="<?php echo ($vo["img"]); ?>"></div>
          <div class="menutitle"><?php echo ($vo["name"]); ?></div>
        </div>
        </a> </div>
    </li><?php endforeach; endif; else: echo "" ;endif; ?>
  <div class="clr"></div>
</ul>
<script>
            var count = document.getElementById("thelist").getElementsByTagName("img").length;	

            var count2 = document.getElementsByClassName("menuimg").length;
            for(i=0;i<count;i++){
                document.getElementById("thelist").getElementsByTagName("img").item(i).style.cssText = " width:"+document.body.clientWidth+"px";

            }
            document.getElementById("scroller").style.cssText = " width:"+document.body.clientWidth*count+"px";

            setInterval(function(){
                myScroll.scrollToPage('next', 0,400,count);
            },3500 );
            window.onresize = function(){ 
                for(i=0;i<count;i++){
                    document.getElementById("thelist").getElementsByTagName("img").item(i).style.cssText = " width:"+document.body.clientWidth+"px";

                }
                document.getElementById("scroller").style.cssText = " width:"+document.body.clientWidth*count+"px";
            } 


        </script>
<div id="insert2"></div>
<div style="display:none"> </div>
<script>
    $(function(){
        new Swipe(document.getElementById('banner_box'), {
            speed:500,
            auto:3000,
            callback: function(){
                var lis = $(this.element).next("ol").children();
                lis.removeClass("on").eq(this.index).addClass("on");
            }
        });
    });
</script>
<script src="http://libs.baidu.com/jquery/2.0.0/jquery.min.js" type="text/javascript"></script>

<script>
function displayit(n){
	for(i=0;i<4;i++){
		if(i==n){
			var id='menu_list'+n;
			if(document.getElementById(id).style.display=='none'){
				document.getElementById(id).style.display='';
				document.getElementById("plug-wrap").style.display='';
			}else{
				document.getElementById(id).style.display='none';
				document.getElementById("plug-wrap").style.display='none';
			}
		}else{
			if($('#menu_list'+i)){
				$('#menu_list'+i).css('display','none');
			}
		}
	}
}
function closeall(){
	var count = document.getElementById("top_menu").getElementsByTagName("ul").length;
	for(i=0;i<count;i++){
		document.getElementById("top_menu").getElementsByTagName("ul").item(i).style.display='none';
	}
	document.getElementById("plug-wrap").style.display='none';
}

document.addEventListener('WeixinJSBridgeReady', function onBridgeReady() {
	WeixinJSBridge.call('hideToolbar');
});
</script> 
<?php if($copyid == '0'): ?><section>
    <div id="plug-wrap" class="plug-wrap" style="display:none;"></div>
    <div class="plug-div">
      <div id="plug-phone" class="plug-phone">
        <input id="plug-btn" type="checkbox" name="" value="" class="plug-menu" style="background-color:<?php echo ($tpl["namecolor"]); ?>;"/>
         </div>
    </div>
  </section>
  <script>
			window.addEventListener("DOMContentLoaded", function(){
				btn = document.getElementById("plug-btn");
				btn.onclick = function(){
					var divs = document.getElementById("plug-phone").querySelectorAll("div");
					var className = className=this.checked?"on":"";
					for(i = 0;i<divs.length; i++){
						divs[i].className = className;
					}
					document.getElementById("plug-wrap").style.display = "on" == className? "block":"none";
				}
			}, false);
		</script><?php endif; ?>
<?php if($copyid == '2'): ?><link rel="stylesheet" type="text/css" href="<?php echo RES;?>/css/home-menu-2.css" media="all" />
  <div class="top_bar footer_bar" style="-webkit-transform:translate3d(0,0,0)">
    <nav>
      <ul class="top_menu">
        <li onclick="location.reload();"><span></span></li>
        
        <li onclick="$('#menu_list').toggleClass('hidden');"> <a onclick="return false;"> <span class="icon-list-ul"></span>
          <label class="homemenu_text">更多</label>
          </a>
          <ul id="menu_list" class="menu_font hidden" onclick="$('#menu_list').toggleClass('hidden');">
            
          </ul>
        </li>
      </ul>
    </nav>
  </div><?php endif; ?>
<?php if($copyid == '1'): ?><link rel="stylesheet" type="text/css" href="<?php echo RES;?>/css/home-menu-1.css" media="all" />
<article id="shareCover" class="share" onclick="$('#shareCover').toggleClass('on')">
  <table>
    <tr>
      <td colspan="2" style="text-align:right;"><img src="<?php echo RES;?>/img/share_1.png?v=2013-12-06-5" style="width:120px!important;" /> <img src="<?php echo RES;?>/img/share_2.png?v=2013-12-06-5" style="width:30px!important;" /></td>
    </tr>
    <tr>
      <td style="width:50%;"><img src="<?php echo RES;?>/img/share_4.png?v=2013-12-06-5" />
        <div>发送给朋友</div></td>
      <td><img src="<?php echo RES;?>/img/share_3.png?v=2013-12-06-5" />
        <div>分享到朋友圈</div></td>
    </tr>
  </table>
</article>
<section>
<div class="plug-div model1">
  <div id="plug-phone" class="plug-phone"> 
    <div> <a href="javascript:$('#shareCover').toggleClass('on');" class="icon-share">
      <label>分享</label>
      </a> </div>
  </div>
  </section><?php endif; ?>
  <?php if($copyid == '3'): ?><link rel="stylesheet" type="text/css" href="<?php echo RES;?>/css/home-menu-3.css" media="all" />
    <div class="top_bar footer_bar">
      <section>
        <div class="nav_7">
          <ul class="box">
            
            <li style="display:none;"> <a href="javascript:;" onclick="this.classList.toggle('on');"><span>更多</span></a>
              <dl>
                <dd> <a href="/sps/webfood/RestList?aid=26221&wechatid=fromUsername&v=282fb2da1b908c45b781033acea3558f&wxref=mp.weixin.qq.com&wxref=mp.weixin.qq.com"> <span>代理</span> </a> </dd>
              </dl>
            </li>
          </ul>
        </div>
      </section>
    </div><?php endif; ?>
  <?php if($copyid == '4'): ?><link rel="stylesheet" type="text/css" href="<?php echo RES;?>/css/home-menu-4.css" media="all" />
    <script>
		window.addEventListener("DOMContentLoaded", function(){
			var nav = document.querySelectorAll(".nav_8")[0];
			
			var evts = {
				handleEvent: function(evt){
					if("A" == evt.target.nodeName){
						evt.target.classList.toggle("active");
					}
				}
			}
			nav.addEventListener("mousedown", evts, false);
			nav.addEventListener("mouseup", evts, false);
			nav.addEventListener("touchstart", evts, false);
			nav.addEventListener("touchend", evts, false);
		});
		</script>
    <div class="top_bar footer_bar">
      <section>
        <div class="nav_8">
          <ul class="box">
            
          </ul>
        </div>
      </section>
    </div><?php endif; ?>
  <?php if($copyid == '5'): ?><link rel="stylesheet" type="text/css" href="<?php echo RES;?>/css/home-menu-5.css" media="all" />
    <script>
		window.addEventListener("DOMContentLoaded", function(){
			var nav = document.querySelectorAll(".nav_9")[0];
			
			var evts = {
				handleEvent: function(evt){
					if("A" == evt.target.nodeName){
						evt.target.classList.toggle("active");
					}
				}
			}
			nav.addEventListener("mousedown", evts, false);
			nav.addEventListener("mouseup", evts, false);
			nav.addEventListener("touchstart", evts, false);
			nav.addEventListener("touchend", evts, false);
		});
		</script>
    <div class="top_bar footer_bar">
      <section>
        <div class="nav_9">
          <ul class="box">
            
            <li> <a href="<?php echo C('site_url');?>/index.php?g=Wap&m=Index&a=index&token=<?php echo ($gtoken); ?>&weixin=mp.weixin.qq.com" class="home"> </a> </li>
            
          </ul>
        </div>
      </section>
    </div><?php endif; ?>
  <?php if($copyid == '6'): ?><link rel="stylesheet" type="text/css" href="<?php echo RES;?>/css/home-menu-6.css" media="all" />
    <script>
			window.addEventListener("DOMContentLoaded", function(){
				var nav = document.querySelectorAll(".nav_10")[0];
				
				var evts = {
					handleEvent: function(evt){
						if("A" == evt.target.nodeName){
							evt.target.classList.toggle("active");
						}
					}
				}
				nav.addEventListener("mousedown", evts, false);
				nav.addEventListener("mouseup", evts, false);
				nav.addEventListener("touchstart", evts, false);
				nav.addEventListener("touchend", evts, false);
			});
		</script>
    <div class="top_bar footer_bar">
      <section>
        <div class="nav_10">
          <ul class="box">
            
          </ul>
        </div>
      </section>
    </div><?php endif; ?>
  <script>
		document.addEventListener('WeixinJSBridgeReady', function onBridgeReady() {
			window.shareData = {
				"imgUrl": "<?php echo ($homeInfo["picurl"]); ?>",
				"timeLineLink": "<?php echo C('site_url'); echo U('Index/index',array('token'=>$vo['token']));?>",
				"sendFriendLink": "<?php echo C('site_url'); echo U('Index/index',array('token'=>$vo['token']));?>",
				"weiboLink": "<?php echo C('site_url'); echo U('Index/index',array('token'=>$vo['token']));?>",
				"tTitle": "欢迎访问<?php echo ($tpl["wxname"]); ?>微信版3G网站",
				"tContent": "欢迎访问<?php echo ($tpl["wxname"]); ?>微信版3G网站",
				"fTitle": "欢迎访问<?php echo ($tpl["wxname"]); ?>微信版3G网站",
				"fContent": "欢迎访问<?php echo ($tpl["wxname"]); ?>微信版3G网站",
				"wContent": "欢迎访问<?php echo ($tpl["wxname"]); ?>微信版3G网站"
			};
			// 发送给好友
			WeixinJSBridge.on('menu:share:appmessage', function (argv) {
				WeixinJSBridge.invoke('sendAppMessage', {
					"img_url": window.shareData.imgUrl,
					"img_width": "640",
					"img_height": "640",
					"link": window.shareData.sendFriendLink,
					"desc": window.shareData.fContent,
					"title": window.shareData.fTitle
				}, function (res) {
					_report('send_msg', res.err_msg);
				})
			});
			// 分享到朋友圈
			WeixinJSBridge.on('menu:share:timeline', function (argv) {
				WeixinJSBridge.invoke('shareTimeline', {
					"img_url": window.shareData.imgUrl,
					"img_width": "640",
					"img_height": "640",
					"link": window.shareData.timeLineLink,
					"desc": window.shareData.tContent,
					"title": window.shareData.tTitle
				}, function (res) {
					_report('timeline', res.err_msg);
				});
			});
		}, false)
	</script>
  <footer>
    <div class="copyright">
      <p align="center">
        <?php if($iscopyright == 1): ?>©<?php echo ($homeInfo["copyright"]); ?>
          <?php else: ?>
         ©<?php echo ($siteCopyright); endif; ?>
      </p>
    </div>
    <span class="support" style="display:none;">
    <?php if($iscopyright == 1): ?>©<?php echo ($homeInfo["copyright"]); ?>
      <?php else: ?>
      ©<?php echo ($siteCopyright); endif; ?>
    </span> </footer>
</div>
</body>
</html>
</body>
</html>