﻿
$(function () {

    /*  选项卡悬停版 （推荐促销）  */
    $(".BrandRecommendTags > li").TagsHover({ TagsHover: "BrandRecommendTagsHover", TagsContent: ".BrandRecommendContent" });
    /*  选项卡悬停版 （商铺评价）  */
    $("#ShopCreditTags > li").TagsHover({ TagsHover: "ShowHover", TagsContent: ".ShowBox" });
    /*  选项卡悬停版 （个人中心）  */
    $(".CenterTags > li").TagsHover({ TagsHover: "CenterTagsHover", TagsContent: ".CenterTagsBox" });
    /*  切换样式  */
    $(".TurnListText").TurnList({ TurnImg: "TurnListImg", TurnList: "TurnListText" });
    $(".TurnListText").TurnList({ TurnImg: "TurnListImg", TurnList: "TurnListText" });
    /*  显示分类  */
    $(".DefaultCategoryList > li").ShowCategory({ ShowBoxId: ".DefaultCategoryLowerList" });
    /*  首页三联图  */
    $(".DefaultUIFlash").UIFlash({ ImgHeight: "230" });
    /*  资讯频道三联图  */
    $(".InfoFlash").UIFlash({ ImgHeight: "283" });
    /*  八点商城五联图  */
    $("#MallDefaultFlash").UIFlash({ ImgHeight: "240" });
    $(".ChannelFlash").UIFlash({ ImgHeight: "240" });

    /*  悬停出现(商品搜索)  */
    $(".SelectSearchRegion").HoverShowID({ ShowID: ".SelectSearchRegionBox" });
    /*  悬停出现（产品列表——默认排序）  */
    $(".BusinessModel").HoverShowID({ ShowID: ".BusinessModel ul" });

    /*  点击出现(选择收货地址——其他地址)  */
    $("input[name='ChooseAddress']").ClickShowInput({ ShowID: ".CheckProdOtherAddress", RadioName: "#OtherAddressRadio" });
    /*  点击出现(选择物流公司——其他)  */
    $("input[name='Logistics']").ClickShowInput({ ShowID: "#OtherLogisticsInput", RadioName: "#OtherLogistics" });
    /*  点击出现(付款步骤-商品详情)  */
    $(".ShowProdDetails").ClickShowID({ ShowID: ".ShowProdDetailsBox" });

    /*  全选  */

    $(".CenterOrderBox").AllCheck({ CheckName: "AllProd", AllCheckBtn: "#AllCheck" });

    /*  图片展廊 放大镜  */

    $(".ProdTopPicBig").Zoom({ ZoomFingerBox: ".ZoomFingerBox", ZoomShowBox: ".ZoomBox", ZoomBigImg: ".ZoomBox img" });
    $(".ProdTopPicSmall").PicGallery({ TurnLeft: ".PicTurnLeft", TurnRight: ".PicTurnRight", PicSmallBox: ".PicSmallBox", BigPic: ".ProdTopPicBig img" });

    /*  相册展示  */

    $("#UIPhotoBox").UIPhoto({ PhotoGroupWidth: 720 });
    $("#UIPhotoNewsBox").UIPhoto({ PhotoGroupWidth: 420 });

    /*  模拟控件  */
    $("select.UIDropDown").UISelect({ IsShow: true, ShowBox: "#RefundReasonTips" });
    $("select.UISelectRegion").UISelect({ Addition: "Region" });
    //$(".UIfile").UIFile({FileBtn:".UIfileBtn"});

    /*  验证控件  */
    //$("input[alt]").AttrInfo({ TestTips: "alt" });


    /*  上传页面  */
    $("#UpLoadFile input").UpLoadFile({ FileWait: "#UpLoadWait", FileFrom: "#formFile" });
    /*  选择地区  */
    $("#Text_Region").ClickShow({ ShowID: "#RegionList" });
    $("#RegionList li").ShowRegion({ ShowBox: "#RegionList", GetUrl: "ReturnRegion.aspx", UrlID: "RegionGUID", LocationUrl: "Group.aspx" });
    /*  选择分类  */

    $(".ProdPublishSelect li").SelectCategory({ HoverCss: "PublishHover", ShowBox: ".ProdPublishSelect", UrlID: "CategoryGUID", GetUrl: "ReturnCategory.aspx", HiddenVal: "#HiddenCategory", Btn: ".ProdPublishBtnBox" });
    /*  关闭提示  */
    $("#CloseTipsBtn").CloseBox({ CloseBoxID: ".CommonTips" });


});
function UploadSuccess(msg) {
    if (msg.split('|').length > 1) {
        $("#UpLoadPic img").attr("src", msg.split('|')[1]);
        $("#UpLoadWait").show();
        $("#UpLoadWait").html(msg.split('|')[0]);
    } else {
        $("#UpLoadWait").show();
        $("#UpLoadWait").html(msg);
    }
}
function Layer(iFrame, w, h, Hide) {
    $("body").UILayer({ Width: w, Height: h, Module: "iFrame", FrameUrl: iFrame, BtnHide: Hide });
}

$(function () {
    var len = $('.GroupMes').find('.C').length;
    $('.GroupMes').find('.C:gt(4)').hide();
    $('.ShowAll').toggle(function () {
        $(this).text('显示部分▲')
        $('.GroupMes').find('.C').show();
    }, function () {
        $(this).text('查看更多▼')
        $('.GroupMes').find('.C:gt(4)').hide();
    })
})

$(function () {

    $('.TravelLine .BorderBox>h4:eq(0)').FoldMenu({ FoldBox: 'ul' });
    $('.TravelLine .BorderBox>h4:gt(0)').FoldMenu({ FoldBox: 'ul' }).trigger('click');

    $('.DetailTravelTab li').HoverTab({ HoverCss: 'Hover', SelectedCss: "On", ShowBox: ".DetailTravelTabBox li" });

})
