﻿//首页大广告
var gg960ShowTime = 10000; //播放时间
var gg960Time = null;

function open_gg960(showBtn){
    $('.gg_full .gg_fcon').html(gg960Con).slideDown(300,function(){
        if(showBtn !== false){
            $('.gg_full .gg_fbtn').fadeIn();
        }
        if(gg960Time){clearTimeout(gg960Time);}
        gg960Time = setTimeout(close_gg960,gg960ShowTime);
    });
}
function close_gg960(){
    $('.gg_full .gg_fcon').slideUp(500,function(){
        $(this).html('');
        $('.gg_fclose').hide();
        $('.gg_freplay').show();
    });
}
$('.gg_fclose').click(function(){
    if(gg960Time){clearTimeout(gg960Time);}
    close_gg960();
    return false;
});
$('.gg_freplay').click(function(){
    if(gg960Time){clearTimeout(gg960Time);}
    open_gg960(false);
    $('.gg_freplay').hide();
    $('.gg_fclose').show();
    return false;
});

var gg960Con;
var fullAdType = 'swf';
var fullAdUrl = 'http://special.qhdxw.com/2011nyf/';
var fullAdName = '/public/images/home/top_650x505_flash.swf';
if(fullAdName)
{
    /*if(fullAdType == 'swf')
    {*/
        gg960Con = '<embed wmode="transparent" width="650" height="505" flashvars="alink1='+fullAdUrl+'" allowscriptaccess="always" quality="high" name="Advertisement" id="Advertisement" style="" src="http://static.qhdxw.com/public/ads/top_650x505_flash.swf" type="application/x-shockwave-flash"></embed>';
        
        //gg960Con = "<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0' width='970' height='753'><param name='movie' value='http://static.qhdxw.com/public/ads/top_w970_flash.swf'/><param name='quality' value='high'/><param name='wmode' value='transparent'/> <embed src='http://static.qhdxw.com/public/ads/top_w970_flash.swf' width='970' height='753' quality='high' pluginspage='http://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash' wmode='transparent'></embed></object>";
    //}
    /*else*/
    //{
        //gg960Con = '<a href="'+fullAdUrl+'" target="_blank"><img width="580" height="450" src="http://static.qhdxw.com/js/lz_bg.jpg"/></a>'; //flash无法显示时，显示JPG广告
    //}
    
    setTimeout(open_gg960, 1000);//延迟显示
}
