if (device.windows()) {
jQuery('.indexScroll').slide({titCell:".hd li",mainCell:".bd ul",effect:"leftLoop",autoPlay:true,interTime:5000});
jQuery('.scrollLeftOne').slide({titCell:".hd ul",mainCell:".bd ul",effect:"topLoop",autoPlay:true,interTime:5000,autoPage:"
$",vis:1});
jQuery('.scrollLeftTwo').slide({titCell:".hd ul",mainCell:".bd ul",effect:"topLoop",autoPlay:true,interTime:5000,autoPage:"$",vis:1});
jQuery('.scrollLeftThree').slide({titCell:".hd ul",mainCell:".bd ul",effect:"topLoop",autoPlay:true,interTime:5000,autoPage:"$",vis:1});
jQuery('.picIntroduce').slide({titCell:".hd li",mainCell:".bd ul",effect:"leftLoop",autoPlay:true,interTime:5000});
}else{
TouchSlide({
slideCell:"#indexScroll",
titCell:".hd li",
mainCell:".bd ul",
effect:"leftLoop",
delayTime:1500,
autoPlay:true,
vis:1
});
TouchSlide({
slideCell:"#picIntroduce",
titCell:".hd li",
mainCell:".bd ul",
effect:"leftLoop",
autoPlay:true
});
function changeImg(){
var imgW = $('.mainTop').width(),
imgW2 = '',
imgW3 = '',
imgH = '14rem',
imgH2 = '25rem';
if (w < 768) {
imgW2 = imgW * ($('.indexScroll .bd img').length + 1);
$('.indexScroll').height(imgH);
$('.indexScroll .bd .tempWrap ul').width(imgW2);
$('.indexScroll .bd li,.indexScroll .bd img').css({
'width':imgW,
'height':imgH
});
}else if(w < 1024){
imgW2 = imgW * ($('.indexScroll .bd img').length + 1);
$('.indexScroll').height(imgH2);
$('.indexScroll .bd .tempWrap ul').width(imgW2);
$('.indexScroll .bd li,.indexScroll .bd img').css({
'width':imgW,
'height':imgH2
});
}
}
changeImg();
$(window).resize(function() {
changeImg();
});
}
$('.box').slide({titCell:'.nav-x .normal',mainCell:'.main',delayTime:0,trigger:'click',autoPlay:false,autoPage:false,defaultIndex:cid});
/*政声传递*/
function getStrLen(str)
{
var l = str.length;
var blen = 0;
for(i=0; i 4) {
//中文字符的长度经编码之后大于4
str_length++;
}
str_cut = str_cut.concat(a);
if (str_length >= len) {
str_cut = str_cut.concat("...");
return str_cut;
}
}
//如果给定字符串小于指定长度,则返回源字符串;
if (str_length < len) return str;
}
function pushInfoJsonpCallBack(data) {
jQuery.each(data,function(i,json){
if(i <= 11){
date = $.trim(json.pubDate);
date = date.substr(5,5);
title = json.title;
if(getStrLen(title) > 65) {
title = cutstr(title,65);
}
title2 = json.title;
if(getStrLen(title2) > 40) {
title2 = cutstr(title2,40);
}
jQuery("#zscd_table").append(" | "+title+" | "+date+" |
");
jQuery("#zscd_table2").append(" | "+json.title+""+json.pubDate+" |
");
}
})
}
function get_zscd(){
jQuery.ajax({
url : 'http://app.gd.gov.cn/xxts/pushinfo_json.php?num=11',
dataType : "jsonp",
jsonp : "pushInfoJsonpCallBack",
jsonpCallback:"pushInfoJsonpCallBack",
success : function(data) {
// 2018-07-12 暂时屏蔽
// date = json.pubDate;
// date = date.substr(7,5);
// title = json.title;
// title = title.substr(0,30) + "...";
// jQuery("#zscd_table").append(" | "+title+" | ["+date+"] |
|
");
},
error: function(){}
});
}
function delay_load(){
$('#xfsd iframe').attr('src','http://widget.weibo.com/livestream/listlive.php?language=zh_cn&width=382&height=365&uid=3167374503&skin=1&refer=0&appkey=&pic=0&titlebar=0&border=0&publish=0&atalk=0&recomm=1&at=0&listid=527843797&dpc=1');
$('#bmzjwb iframe').attr('src','http://widget.weibo.com/livestream/listlive.php?language=zh_cn&width=382&height=365&uname=%E7%AD%94%E6%A1%88Li&uid=2341912030&skin=1&refer=0&appkey=&pic=0&titlebar=0&border=0&publish=0&atalk=0&recomm=1&at=0&listid=465422777&listname=%E9%83%A8%E9%97%A8%E9%95%87%E8%A1%97%E5%BE%AE%E5%8D%9A&dpc=1');
if(device.windows()){
var link = document.createElement('link');
link.type = 'text/css';
link.rel = 'stylesheet';
link.href = '/css/hover.css?v=20190221';
$('head')[0].appendChild(link);
}
}
$(function(){
$(document).delegate('.bottomOptions li','mouseover',function(){
var img = $(this).find('img');
var new_src = img.attr('src').replace(/bt_/,'bt_hover_');
img.attr('src',new_src);
});
$(document).delegate('.bottomOptions li','mouseout',function(){
var img = $(this).find('img');
var new_src = img.attr('src').replace(/bt_hover_/,'bt_');
img.attr('src',new_src);
});
$(document).delegate('.tab2_con1 table tr','mouseover',function(){
var tr = $(this);
tr.find('img').attr('src','/images/dot_hover.png');
tr.find('a,font').css('color','#169f00');
});
$(document).delegate('.tab2_con1 table tr','mouseout',function(){
var tr = $(this);
tr.find('img').attr('src','/images/index_dot.png');
tr.find('a').css('color','#1e1e1e');
tr.find('font').css('color','#908f8f');
});
// window.setTimeout('get_zscd()',3000);
window.setTimeout('delay_load()',5000);
$('.scrollLeft .bd ul li').show();
$($('#tab_2 .threeTab .tab3con a.newMess')).each(function(ind,el){
if(getStrLen($(el).text()) <= 43){
$(el).css('line-height','56px');
}
});
});
// 顺德百事通热门搜索
function sdbst_hit_search(obj)
{
$('input[name=zwbstwt]').val($(obj).text());
// console.log($(obj).text())
searchhead();
}