﻿
@model CrowdMall.Bizness.Products.IItem[]
@{
    ViewBag.Title = "红酒";
    var Category = (CrowdMall.Bizness.Products.ICategory)ViewBag.Collection;
    var ItemArg = new Func<int, bool,ViewDataDictionary>((s,h) =>
    {
        var d=new ViewDataDictionary {
            { "HideAddToCart", true },
            { "HideRound", true },
            { "ImageSize", s },
            { "HideBuyText", true },
            { "NoDelayImage",true },
            {"Mobile",true }
        };
        if (h)
            d["HideTotal"] = true;
        return d;
    });
}
@section header{
    <link href="~/content/ActivityMobile/RedWine/css/style.min.css" rel="stylesheet" type="text/css" />
}
<!--内容区域-->
<div id="wrapper" style="overflow:hidden">
    <div id="main" class="main">
        <script>
            var ww = document.documentElement &&
                    document.documentElement.clientWidth ||
                    document.body.clientWidth ||
                    window.innerWidth;
            var w = document.getElementById('main');
            var ws = w.style;
            var cw = 640;
            window.scale = ww / cw;
            ws.transformOrigin = 'top left';
            ws.transform = 'scale(' + (ww / cw) + ')';
            ws.MozTransformOrigin = 'top left';
            ws.MozTransform = 'scale(' + (ww / cw) + ')';
            ws.webkitTransformOrigin = 'top left';
            ws.webkitTransform = 'scale(' + (ww / cw) + ')';
        </script>

        <div class="banner" style="background-image:url(@Html.Media(Category.MobileBannerImage))">
            <a href="@(Category.MobileBannerUrl ?? "#")">
            </a>
        </div>
        @if (Model.Length >= 2)
        {
            <div class="s1">
                <div class="container">
                    <div class="title"></div>
                    <ul class="clearfix">
                        @Html.Partial("../Product/_Item", Model[0], ItemArg(160, true))
                        @Html.Partial("../Product/_Item", Model[1], ItemArg(160, true))
                    </ul>
                </div>
            </div>
        }
        @if (Model.Length >= 3)
        {
            <div class="s2">
                <div class="container">
                    <div class="title"></div>
                    <ul>
                        @Html.Partial("../Product/_Item", Model[2], ItemArg(360, false))
                    </ul>
                </div>
            </div>
        }
        @if (Model.Length >= 5)
        {
            <div class="s3">
                <div class="container">
                    <div class="title"></div>
                    <ul class="clearfix">
                        @Html.Partial("../Product/_Item", Model[3], ItemArg(160, true))
                        @Html.Partial("../Product/_Item", Model[4], ItemArg(160, true))
                    </ul>
                </div>
            </div>
        }
        @if (Model.Length >= 6)
        {
            <div class="s4">
                <div class="container">
                    <div class="title"></div>
                    <ul>
                        @Html.Partial("../Product/_Item", Model[5], ItemArg(660, false))
                    </ul>
                </div>
            </div>
        }
        @if (Model.Length >= 9)
        {
            <div class="s5">
                <div class="container">
                    <div class="title"></div>
                    <ul class="clearfix">
                        @Html.Partial("../Product/_Item", Model[6], ItemArg(160, true))
                        @Html.Partial("../Product/_Item", Model[7], ItemArg(160, true))
                    </ul>
                    <ul class="tail">
                        @Html.Partial("../Product/_Item", Model[8], ItemArg(400, false))
                    </ul>
                </div>
            </div>
        }
        <script>
            document.getElementById('wrapper').style.height=ws.height = w.clientHeight * (ww / 640) + "px";
            //ws.height = 1200 + "px";
        </script>
    </div>
</div>