﻿/* Copyright:2008-2011,重庆五奥网络科技有限公司
* Version: 1.0
* Encoding:UTF-8
* Creater:     Steven
* Create Date: 2011-12-12
* Description: 排行切换
* Modifier: 
* Modify Date: 
* Description: 
*/

 var intervalOpen;

 $(document).ready(function () {

     $(".skinBtn").mousemove(function () {

         $(this).siblings().removeClass("listCur");
         $(this).addClass("listCur");
         var title = $(this).attr("title");
         var id = $(this).attr("id");
         $("#spnPH").html(title);

         id = "#ul" + id.substring(2);
         $(id).show();
         $(id).siblings(".lf02Cont").hide();
     });


     $("#btnflClose").click(function () {
         $(".advPop").hide();
         intervalOpen = setInterval("openTopPop()", 1);
     });

     var height = $(".topAdv").height();
     if (height<50)
         $("#FlashID").hide();
     
 });

//自动关闭弹出的Flash
var intervalClose = setTimeout("closeAdvPop()", 15000);

//关闭弹出的Flash
function closeAdvPop() {
    if ($(".advPop").css("display") == "none")
        clearTimeout(intervalClose);
    else 
    {
        $(".advPop").hide();
        intervalOpen = setInterval("openTopPop()", 1);
    }
}

//慢慢打开头部的Flash
function openTopPop() {
   var height=$(".topAdv").height();
   if (height < 50)
       $(".topAdv").height(height + 10);
   else if (height == 50)
       $(".topAdv").height(height + 8);
   else if (height > 50) {
       $("#FlashID").show();
       clearInterval(intervalOpen);
   }
}
