
<notempty name="visitor">
<if condition="$visitor['username'] eq C('ftx_index_admin')">
<script type="text/javascript">
	function noshow(id){
		if(!$.ftxia.dialog.islogin()) return ;
		$(this).html('<img src="/static/ftxia/images/loading.gif" />');
		$.ajax({
			url: FTXIAER.root + '/?m=item&a=noshow',
				type: 'POST',
				data: {
					id: id
				},
			dataType: 'json',
			success: function(result){
				if(result.status == 1){
					$.ftxia.tip({content:result.msg, icon:'success'});
				}else{
					$.ftxia.tip({content:result.msg, icon:'error'});
				}
			}
		});
	}

	$(".show a").click(function() {
		id = $(this).attr("data-id");
		if(!$.ftxia.dialog.islogin()) return ;
		$(this).html('<img src="/static/ftxia/images/loading.gif" />');
		$.ajax({
			url: FTXIAER.root + '/?m=item&a=noshow',
				type: 'POST',
				data: {
					id: id
				},
			dataType: 'json',
			success: function(result){
				if(result.status == 1){
					$(this).html('成功');
					$.ftxia.tip({content:result.msg, icon:'success'});
				}else{
					$(this).html('已取消');
					$.ftxia.tip({content:result.msg, icon:'error'});
				}
			}
		});
	});  
</script>
</if>
</notempty>
<div class="foot">
    <div class="foot-con">
        <div class="con-box-n clear">
            <div class="con-left-info fl">
                <dl class="update">
                    <dt>获取更新</dt>
                    <dd><a href="{:C('ftx_header_html')}" target="_blank" rel="nofollow"><i></i>手机访问</a></dd>
                    <dd><a href="{:C('ftx_qzone_url')}" target="_blank" rel="nofollow"><i></i>QQ空间</a></dd>
                    <dd><a href="{:C('ftx_sina_url')}" target="_blank" rel="nofollow"><i></i>新浪微博</a></dd>
                    <dd><a href="{:C('ftx_tenxun_url')}" target="_blank" rel="nofollow"><i></i>腾讯微博</a></dd>
                </dl>
                <dl class="cooperation">
                    <dt>商务合作</dt>
                    <dd><a href="{:U('baoming/index')}" target="_blank"><i></i>卖家免费报名</a></dd>
                    <dd><a href="{:U('help/read',array('id'=>2))}" target="_blank" rel="nofollow"><i></i>商务合作</a></dd>
                    
                </dl>
                <dl class="cor-info">
                    <dt>公司信息</dt>
                    <dd><a href="{:U('help/read',array('id'=>2))}" target="_blank" rel="nofollow"><i></i>广告合作</a></dd>
                    <dd><a href="{:U('help/read',array('id'=>5))}" target="_blank" rel="nofollow"><i></i>免责声明</a></dd>

                </dl>
                <dl class="help-info">
                    <dt>帮助中心</dt>
                    <dd><a href="{:U('help/read',array('id'=>6))}" target="_blank" rel="nofollow"><i></i>常见问题</a></dd>
                    <dd><a href="{:U('help/qianggou')}" target="_blank" rel="nofollow"><i></i>抢购小技巧</a></dd>
                    <dd><a href="{:U('article/index')}" target="_blank" rel="nofollow"><i></i>积分攻略</a></dd>
                    <dd><a href="{:U('map/index')}" target="_blank"><i></i>网站地图</a></dd>
                </dl>
            </div>
            <div class="con-menu fr">
                <a href="{:C('ftx_kefu_html')}" class="service-add fl" target="_blank"></a>
            <span class="service-time fl">
                <p>周一至周六 </p>
                <p>9:00-22:00 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</p>
            </span>
            </div>
        </div>
                    <div class="links">
	<span>友情链接：</span>
	<div class="links_list_box">
    <ul class="links_list">
        
            
        
            
        
            
        
            
        
            
        
            
        	<li><ftx:link type="lists" status="1">
<volist name="data" id="val">
<a href="{$val.url}" target="_blank">{$val.name}</a>
</volist>
</ftx:link></li></ul>
	</div>
	<a href="" class="more">更多&gt;&gt;</a>
</div>
        <p class="ft-company"><a href="{:C('ftx_site_url')} " target="_blank" rel="nofollow">{:C('ftx_site_name')}</a> {:C('ftx_site_icp')}　　Copyright © 2010 - 2014   {:C('ftx_site_url')} All Rights Reserved</p>
                   
            </div>

  <!--统计代码开始-->
  {:C('ftx_statistics_code')}<!--统计代码结束--> 
  </div>

<load href="__STATIC__/ftxia/js/report.js" />
<script type="text/javascript">
var FTXIAER = {
    root: "__ROOT__",
	site: "{:C('ftx_site_url')}",
    uid: "<?php echo $visitor['id'];?>", 
    url: {}
};
var lang = {};
<volist name=":L('js_lang')" id="val">lang.{$key} = "{$val}";</volist>
</script>
<ftx:load type="js" href="__STATIC__/js/jquery/plugins/jquery.tools.min.js,__STATIC__/js/jquery/plugins/jquery.masonry.js,__STATIC__/js/jquery/plugins/formvalidator.js,__STATIC__/js/fileuploader.js,__STATIC__/js/ftxia.js,__STATIC__/js/front.js,__STATIC__/js/dialog.js,__STATIC__/js/item.js,__STATIC__/js/user.js,__STATIC__/js/comment.js,__STATIC__/zhe800/js/comm.js" />
{:C('ftx_taojindian_html')}

  <!-- /页脚 -->
        <!-- 脚本 -->
        <script type="text/javascript" src="__STATIC__/juanpi/js/md-lazyload.js"></script>
        <script src="__STATIC__/juanpi/js/md-login.js" type="text/javascript"></script>
        <!--有些页面不要到顶部图标 -->
                    <div id="back_top" class="back_top" style="display: none;"><a href="javascript:;"></a><span class="call-survey"></span></div>
                
	<script type="text/javascript" src="__STATIC__/juanpi/js/md-viewregistreward.js"></script>
<script type="text/javascript">
	$("img.lazy").lazyload({threshold:200,failure_limit:30});
	seajs.use([
		'__STATIC__/juanpi/js/zhe-item.js'
		],function(a){
		a();
	});

	var F_showTwoDimeBox = function(){
	$('.list-good .dimension').parents('li').hover(
			function(){
				var $self = $(this);
				var $selfDimension = $self.find('.dimension');
				var imgHtml = '<img id="dime_img" src="" width="97"/>';
				var imgSrcUrl = $self.find('.img_inputid').attr('d_src');
				if( $self.find('#dime_img').length == 0 ){
					$self.find('.dime-pic').append(imgHtml);
				}
				$self.find('#dime_img').attr('src', imgSrcUrl);
				$self.find('.two-iphone-n').attr('class', 'two-iphone');
				$selfDimension.show();
				var curSpanWid = $selfDimension.find('span').width();
				if(curSpanWid > 25){
					$selfDimension.find('.unit').hide();
				}
			}, function(){
				$(this).find('.two-iphone').attr('class', 'two-iphone-n');
				$(this).find('.dimension').hide();
			}
		);
	}
	F_showTwoDimeBox();
</script>

	<script>
    var F_createEle = function(ele){
        var div = document.createElement('div');
        div.id = "likeico";
        div.innerHTML = "<span class='heart_left'></span><span class='heart_right'></span>";
        ele.append(div);
    }
    var Mylike_add = function(event) {
        if (XDPROFILE.uid == '') {
            XD.user_handsome_login_init();
            XD.user_handsome_login();
            return false;
        }
        $("#likeico").remove();
        var obj = $(this);
        var parent = obj;
        var id = parent.attr('lkid');
        var s = parent.attr('lks');
        var gtype = parent.attr("gtype");

        F_createEle(obj);
        setTimeout(function(){$("#likeico").remove()}, 600);
        if(s == 1) {
            // like success
            parent.attr('lks',0);
            obj.find('i.like-ico').addClass('l-active');
            obj.closest('li').find('.like-ceng').show();
            $("#likeico").removeClass('unliked').addClass('like-big').addClass('demo1');
            parent.css('display','block');
        } else {
            // un like success
            parent.attr('lks',1);
            obj.find('i.like-ico').removeClass('l-active');
            $("#likeico").removeClass('l-active').addClass('unliked').removeClass('demo1');
            obj.closest('li').find('.like-ceng').hide();
            parent.css('display','');
        }
        
        var params = {
        		'gid':id,
        		'status':s,
        		'app':1,
        		'gtype':gtype
        }
        $.getJSON('http://www.juanpi.com/favorite/option?callback=?',params, function(data){
                    if(data.code == 1001){

                    } else if(data.code == 1004){
                        XD.user_handsome_login_init();
                        XD.user_handsome_login();
                    }
                }
        ).error(function() {
        });
    }
    var Pause_click = function(){
        $("a.my-like").on('click', _.throttle( Mylike_add, 300 ) );
        $(".list-good").on('mouseleave',function(){$('.like-ceng',$(this)).hide();});

        //
        var b = [];
        var s  = $('.my-like').each(function(i){
        	var gtype = $(this).attr("gtype");
        	var prefix = "";
        	//得到商品主键前缀
        	if(gtype==3){
        		prefix = "t";
        	}
            b[i] = prefix + $(this).attr('lkid');
        });
        if( XDPROFILE.uid != '' && b.length>0) {
            var s = b.join(',');
            $.getJSON('http://www.juanpi.com/favorite/goods_fav_status?callback=?', {g_ids:s}, function(data){
                        if(data.code == 1001){
                            var s = data.data.toString();
                            $('.my-like').each(function(i){
                            	var gtype = $(this).attr("gtype");
                                var prefix = "";
                            	//得到商品主键前缀
                                if(gtype==3){
                                    prefix = "t";
                                }
                                var sid = $(this).attr('lkid');
                                var prefixsid = prefix + $(this).attr('lkid');
                                if( s.indexOf(sid) != -1 || s.indexOf(prefixsid) != -1 ) {
                                    $(this).css('display','block');
                                    $(this).attr('lks',0);
                                    $('i.like-ico',$(this)).addClass('l-active');
                                }
                            });
                        }
                    }
            ).error(function() {});
        }
    }
    Pause_click();

	//抢光弹窗
	var box = null;


	//未开抢商品弹窗
	$(".list-good").on('click', '.btn.start', function () {
		var _this = $(this);
		var m_link = _this.find('a').attr('href');
		if(m_link.match(/deal/i) && m_link.match(/jump|click/i)){
			var d_link = _this.parent().parent().find('a').attr('href');
			var title = '开抢提醒-卷皮手机端用户特权';
			var gid_data = _this.parent().parent().find("a.my-like").attr('lkid');
			var gtype = _this.parent().parent().find("a.my-like").attr('gtype');
			if(_this.parent().parent().find("i.like-ico").hasClass("l-active")){
				var content = '<div class="top_tips"><p>哎呀呀，宝贝还没开始涅~</p><p class="top_tips01">你已收藏过啦，宝贝开抢前会在手机端提醒你哦～</p></div><div class="item-btn"><a href="'+d_link+'" class="item-like  l-actives active" gtype="'+gtype+'"  data="'+gid_data+'" target="_blank"><em class="heart"></em><p class="like-o">查看宝贝详情</p></a></div><div class="foot_tips">还没有安装客户端？~<a class="foot_app" href="http://www.juanpi.com/apps#jp" target="_blank">点击下载>></a></div>';		
			}else{
				var content = '<div class="top_tips"><p>哎呀呀，宝贝还没开始涅~</p></div><div class="item-btn"><a href="'+d_link+'" class="item-like  l-actives" gtype="'+gtype+'" data="'+gid_data+'" target="_blank"><em class="heart"></em><p class="like-o">收藏后提醒开抢</p></a></div><div class="foot_tips">收藏后，宝贝开抢前会在<em>客户端提醒</em>您开抢哦~</div>';
			}
			box = getBox(title,content);
			box.init();
			return false;
		}
	});

	$('body').on('click', '.alert_content a.item-like', function () {
			if (XDPROFILE.uid == '') {
        		XD.user_handsome_login_init();
        		XD.user_handsome_login();
        		return false;
   			}
			var _this = $(this);
			var gid  = _this.attr('data');
			var gtype = _this.attr('gtype');
			
			if(_this.hasClass("active")){
				var do_status = 0;
			}else{
				var do_status = 1;
			}
			var params = {
					'gid':gid,
					'status':do_status,
					'app':1,
					'gtype':gtype
			}
			if(do_status == 1){
                _this.addClass("active");
				$('a[lkid='+gid+']').find('i.like-ico').addClass('l-active');
				$('a[lkid='+gid+']').attr('lks',0);
				$('a[lkid='+gid+']').show();
				$.getJSON('http://www.juanpi.com' + '/favorite/option?callback=?', params, function(data){
					if(data.code == 1001){
					    $('.alert_content .item-like .like-l').html('已收藏');
                        $('.alert_content .like-o .fl').html('随时留意您的手机哦');	
                    }else if(data.code == 1004){
						XD.user_handsome_login_init();
        				XD.user_handsome_login();	
					}else{
						return false;
					}
				}
				).error(function() {
			 	});
				return false;
            }else{
				//跳转
				if(box) box.close();
            }

		  
	});


	//关闭弹出框
    $('body').on('click', 'a.alert_close,a.sub', function(){
        if(box) box.close();
    });
	//收藏 抢光弹框
    function getBox(title,content) {
        var box = new XDLightBox({
            title:title,
            lightBoxId:'alert_remind',
            contentHtml:content,
            scroll:true
        });

        return box;
    }

</script>

    <script type="text/javascript" src="__STATIC__/juanpi/js/md-time.js"></script>
 

        <script src="__STATIC__/juanpi/js/md-ga.js" language="javascript"></script><script src=" http://hm.baidu.com/h.js?db55e4f19d63bf355540efe831dc46ed" type="text/javascript"></script>
    <link rel=stylesheet type=text/css href="__STATIC__/juanpi/css/alert.css" />   

    
        <!-- /脚本 -->
