@using GBLab.Common.Expand;
@using System.Text;
@{
    Layout = "~/Views/School_Pre/Shared/_Layout.cshtml";
    var data = ViewData["data"] as GBLab.Entities.T_CmsTeacher;
    var pre = ViewData["pre"] as GBLab.Entities.T_CmsTeacher;
    var next = ViewData["next"] as GBLab.Entities.T_CmsTeacher;
    var top10data = ViewData["top10data"] as List<GBLab.Entities.T_CmsTeacher>;
}

@section HeadStyle{
    <link href="~/App_Themes/Skin_Site/School_Pre/css/inner.css?v=@(ViewBag.Version)" rel="stylesheet" type="text/css" />
    <link href="~/App_Themes/Skin_Site/School_Pre/Plus/sexylightbox.css?v=@(ViewBag.Version)" rel="stylesheet" type="text/css" />
    <style>
        .alertbox { background: url(images/dialog-help.png) no-repeat scroll left top; margin: 0 10px; padding: 0 0 5px 40px; font-family: Verdana; font-size: 12px; text-align: left; }
        .alertbox .buttons { text-align: right; }
    </style>
}

@section HeadScript{
}

@section JavaScript{
    <script type="text/javascript" src="~/App_Themes/Skin_Site/School_Pre/js/submodalsource.js?v=@(ViewBag.Version)"></script>
    <script type="text/javascript" src="~/App_Themes/Skin_Site/School_Pre/Plus/sexylightbox.v2.3.jquery.min.js?v=@(ViewBag.Version)"></script>
    <script>
        $(document).ready(function () {
            SexyLightbox.initialize(
                {
                    color: 'white'
                    , imagesdir: '/App_Themes/Skin_Site/School_Pre/Plus/sexyimages/'
                });
        });
    </script>
}

<div id="body">
    <div id="InnerBanner">
    </div>
    <div class="HeightTab clearfix"></div>
    <div class="inner">
        <div class="left">
            @{Html.RenderPartial("~/Views/School_Pre/Views/Module/Common/Menu.cshtml");}
            @{Html.RenderPartial("~/Views/School_Pre/Views/Module/CmsTeacher/_Part/Top10.cshtml");}
        </div>
        <div class="right">
            @{Html.RenderPartial("~/Views/School_Pre/Views/Module/Common/HeadPath.cshtml");}
            <div class="HeightTab clearfix"></div>
            <div class="main">
                <div class="content">
                    <div class="title"><h3>@(data.F_Name)</h3></div>
                    <div class="infos">@(data.F_AddDate.ToShortDateString())</div>
                    <div class="ImageList">
                        @{
                            StringBuilder sbImgHead = new StringBuilder();
                            string[] imgList = data.F_Logo.Split('|');
                            foreach (var item in imgList)
                            {
                                if (!string.IsNullOrWhiteSpace(item))
                                {
                                    sbImgHead.AppendFormat(@"
<div>
<div style='text-align:center;'>
<a href='{0}' rel='sexylightbox[group1]' title='{1}'>
<img src='{0}' alt='{1}' style='max-width:400px;'>
</a>
</div>
</div>"
                                        , item
                                        , data.F_Name.DefaultIsNullOrEmpty("")
                                    );
                                }
                            }
                        }
                        @Html.Raw(sbImgHead.ToString())
                        <div class="clearfix"></div>
                    </div>
                    <!--image end -->
                    <div class="IntroTitle">详细介绍</div>
                    <div id="MainContent" class="maincontent clearfix">
                        @Html.Raw(data.F_Info)
                        <div class="HeightTab clearfix"></div>
                    </div>
                    <div class="prenext">
                        <div class="IntroTitle">更多教师</div>
                        <div class="blk_29">
                            <div class="LeftBotton" id="LeftArr"></div>
                            <div class="Cont" id="ISL_Cont_1" style="width: 720px; overflow: hidden;">
                                <div style="overflow: hidden; zoom:1;">
                                    <div style="float: left;">
                                        @{
                                            StringBuilder sbTop = new StringBuilder();
                                            if (top10data != null)
                                            {
                                                foreach (var item in top10data)
                                                {
                                                    sbTop.AppendFormat(@"
<div class='box'>
<a class='imgBorder' href='{0}' target='_blank' title='{1}'>
<img alt='{1}' src='{0}'>
</a>
<p>
<a class='imgBorder' href='{2}' target='_blank' title='{1}'>{1}</a>
</p>
</div>"

, item.F_Logo.DefaultIsNullOrEmpty("").ChangeToImageUrl("")
, item.F_Name.DefaultIsNullOrEmpty("")
, "/CmsImg/" + item.F_TypeId.ToString() + "/" + item.F_Id.ToString() + ".html"
);
                                                }
                                            }
                                        }
                                        @Html.Raw(sbTop)
                                    </div>
                                </div>
                            </div>
                            <div class="RightBotton" id="RightArr"></div>
                        </div>
                    </div>

                    <div class="IntroTitle">更多教师</div>
                    <div class="prenext">
                        <ul>
                            @if (pre != null)
                            {
                                <li>
                                    上一篇：
                                    <a href="@("/CmsImg/"+pre.F_TypeId.ToString()+"/"+pre.F_Id.ToString()+".html")" title="@(pre.F_Name.DefaultIsNullOrEmpty(""))">@(pre.F_Name.DefaultIsNullOrEmpty(""))</a>
                                    <span class="ListDate">@(pre.F_AddDate.ToShortDateString())</span>
                                </li>
                            }
                            @if (next != null)
                            {
                                <li>
                                    下一篇：
                                    <a href="@("/CmsImg/"+next.F_TypeId.ToString()+"/"+next.F_Id.ToString()+".html")" title="@(next.F_Name.DefaultIsNullOrEmpty(""))">@(next.F_Name.DefaultIsNullOrEmpty(""))</a>
                                    <span class="ListDate">@(next.F_AddDate.ToShortDateString())</span>
                                </li>
                            }
                        </ul>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<div class="HeightTab clearfix"></div>

<script language="javascript" type="text/javascript">
    $(document).ready(function () {
        initImageList_Common("ISL_Cont_1", "LeftArr", "RightArr", 720);
    });
</script>