@using GBLab.Common.Expand
@{
    var cmsAdItems = ViewData["Ad_4"] as List<GBLab.Entities.T_CmsAdItem>;
}
<div id="support" class="container-fluid">
    <div class="row">
        <div class="col-md-12" style="padding: 0px;">
            <div id="carousel-example-generic" class="carousel slide" data-ride="carousel">
                <ol class="carousel-indicators">
                    @if (cmsAdItems.Count > 0)
                    {
                        for (int i = 0; i < cmsAdItems.Count; i++)
                        {
                            if (i == 0)
                            {
                                <li data-target="#carousel-example-generic" data-slide-to="@i" class="active"></li>
                            }
                            else
                            {
                                <li data-target="#carousel-example-generic" data-slide-to="@i"></li>
                            }
                        }
                    }
                </ol>
                <div id="item-Support" class="carousel-inner" role="listbox">
                    @if (cmsAdItems.Count > 0)
                    {
                        for (int i = 0; i < cmsAdItems.Count; i++)
                        {
                            if (i == 0)
                            {
                                <div class="item active"><a href="@(cmsAdItems[i].F_Url)" target="_blank"><img src="@(cmsAdItems[i].F_Image.ChangeToImageUrl(""))" class="" alt=""></a><div class="carousel-caption pointereventsnone">@*<h1>@(cmsAdItems[i].F_Name)</h1>*@<p>@(cmsAdItems[i].F_Name)</p></div></div>
                            }
                            else
                            {
                                <div class="item"><a href="@(cmsAdItems[i].F_Url)" target="_blank"><img src="@(cmsAdItems[i].F_Image.ChangeToImageUrl(""))" alt=""></a><div class="carousel-caption pointereventsnone">@*<h1>@(cmsAdItems[i].F_Name)</h1>*@<p>@(cmsAdItems[i].F_Name)</p></div></div>
                            }
                        }
                    }
                </div>
                <a class="left carousel-control" href="#carousel-example-generic" role="button" data-slide="prev"><span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span><span class="sr-only">上一张</span></a>
                <a class="right carousel-control" href="#carousel-example-generic" role="button" data-slide="next"><span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span><span class="sr-only">下一张</span></a>
            </div>
        </div>
    </div>
</div>