';
var first_ul=$('#nav_layer689B605ED0FF98D748389D982959F273');
var second_ul=$('#nav_layer689B605ED0FF98D748389D982959F273 >li.wp_subtop>ul');
var third_ul=$('#nav_layer689B605ED0FF98D748389D982959F273 >li.wp_subtop>ul>li>ul');
var first_li=$('#nav_layer689B605ED0FF98D748389D982959F273 >li.wp_subtop');
var second_li=$('#nav_layer689B605ED0FF98D748389D982959F273 >li.wp_subtop>ul>li');
var third_li=$('#nav_layer689B605ED0FF98D748389D982959F273 >li.wp_subtop>ul>li>ul>li');
var diff_height=0;
var plugin_id='';
var li_hover_style='';
if(second_ul.length)second_ul.addClass('secondul');
if(third_ul.length)third_ul.addClass('thirdul');
var mainMenu_line_height_value = first_li.height();
$.each(first_li,function(){
if($(this).children('a').length)$(this).children('a').addClass('firlink');
var span=$(this).find('.firlink').text();
$(this).find('.firlink').text('');
span_html='
'+span+'';
$(this).find('.firlink').append(click_image,span_html);
if($(this).find('.secondul').length){
$(this).find('.firlink').addClass('downlistBox1');
$(this).find('img').addClass('subfiles1');
$(this).find('.secondul li').addClass('secondli');
}
mainMenu_line_height_value = $(this).height();
$('#nav_layer689B605ED0FF98D748389D982959F273').find('li.wp_subtop a.firlink img.fileicon').css({'margin-top':(mainMenu_line_height_value-25)/2+'px'});
});
$.each(second_li,function(){
if($(this).children('a').length){
$(this).children('a').addClass('seclink');
if("0"=="1"){
$(this).children('a').attr("title",$(this).children('a').text());
}
}
if($(this).find('.thirdul').length){
var subspan_html=$(this).find('.seclink').text();
subspan_html='
'+subspan_html+'';
$(this).find('.seclink').text('');
$(this).find('.seclink').addClass('downlistBox2').append(subspan_html);
//$(this).find('.seclink').append(subspan_html);
}
if($(this).find('a.seclink img').length) {
var imgtop=(parseInt($(this).height())-15)/2;
$(this).find('a.seclink img').css("margin-top",imgtop+'px');
}
});
$.each(third_li,function(){
if($(this).children('a').length)$(this).children('a').addClass('thirlink');
});
first_ul.append(all_data);
if(subopen==1){
wp_getdefaultHoverCss('layer689B605ED0FF98D748389D982959F273')
$('#nav_layer689B605ED0FF98D748389D982959F273').children('li').each(function(){
$(this).addClass("lihover").children('a').addClass("ahover");
});
}
$("#nav_layer689B605ED0FF98D748389D982959F273").css('visibility','');
(function(){
var deferred=$.Deferred();
setTimeout(function(){
deferred.resolve("{\"status\":\"ok\",\"message\":\"layerEC53EBE4182B2BB9A0DE44721A49E7AB,layerCEF35B9B3015EB22909AF3B0B8BC4271,layerEE5EC73C1A8CD1D1A5FFD98CF1DF50F3,layer9CFA144F048BE2B6A50181FB09E87DA1,layer4FDE33402123A525464BCD105AAC9659,layer0EDAF24D2EDAC2E53825963928CB17CE,layer828798ABE128547009E3D20A6E3DFA7E,layer689B605ED0FF98D748389D982959F273,layer7AD34457C79B514BF65CA22944B8FACA,layer3A4EA8375900B204DBEBA534B68AF8C2,layer0E587258CE2F43064321A03CAEDE203C,layer3794F6318A2C425837719A177FEB5946,layerFB3F5F87BED3BF858096E1AF21880F51,layerB8DF31D71644F3099FC7296CC7094025,layer391023DB11D3AEC8200DDF5FD124FEBF\"}");
},60);
return deferred;
})().done(function(response){
response=JSON.parse(response);
if(response.status=='ok'){
var layer_arr=response.message.split(",");
var gotlayers={};
var func=function(layerid,layerh){
if( gotlayers[layerid]) return;
gotlayers[layerid]=true;
var layerarr=[]
var el=$('#'+layerid);
var bottomsize=el.height()+parseInt(el.css('top'));
if(layerh==null) layerh=bottomsize;
var leftpos=parseInt(el.css('left'));
var rightpos=leftpos+el.width()
$.each(layer_arr,function(k,v){
if(v==layerid || layer_arr2[v] != null) return;
var el2=$('#'+v);
var fatherid=$.getElementFatherid(el2);
var modfatherid=$.getElementFatherid($('#layer689B605ED0FF98D748389D982959F273'));
if(modfatherid != fatherid &&layer_arr2[fatherid] != null){
return;
}
var parentsbox2 = el2.parents("[type='box']");
var parentsboxtop2 = 0;
if(parentsbox2.length){
var is_catsibling = $('#'+v).siblings("#layer689B605ED0FF98D748389D982959F273").length;
if(!is_catsibling){return true;}
parentsbox2.each(function(){
var boxtop2 = $(this).css('top');
parentsboxtop2 = parseInt(parentsboxtop2)+parseInt(boxtop2);
});
}
top2=parseInt( el2.css('top')) + parentsboxtop2;
var left2 = el2.css('left')=='auto'?0:el2.css('left');
var top3=parseInt($('#'+v).css('top')) + parentsboxtop2;
var leftpos2=parseInt(left2);
var rightpos2=leftpos2+el2.width();
if(layerh
=leftpos&&leftpos2<=rightpos) || (rightpos2>=leftpos &&rightpos2<=rightpos))){
layerarr.push(v)
layer_arr2[v]=top2;
layer_arr3[v]=top3;
parenttops[v]=parentsboxtop2;
}
for(var i=0;icategoryBom){
$("#"+k).css('top',(parseInt(layer_arr2[k])+diff_height-parenttop)+'px');
}
}
var maxheight=0;
var helperfunc=function(dom){
var degree=dom.data('deg')||dom.attr('deg');
var pos=[parseInt(dom.css('left')),parseInt(dom.css('top'))]
var w=dom.width();
var h=dom.height();
if(dom.hasClass('cstlayer')){
var buttompos=$.divrotate.getDegreeModMaxPointOrigin(dom,degree,pos,[w,h],'buttom');
}else{
var buttompos=dom.ab_pos_cnter('top')+parseInt(dom.css('height'));
}
return buttompos;
}
var filterfunc=function(){
return $(this).is(":not(div[deleted='deleted'])") && $(this).attr('childdel') != 'del';
}
var site_footer = $("#site_footer");
if(site_footer&&site_footer.length>0){
$('#canvas .cstlayer,#canvas .full_column').filter(filterfunc).each(function(){
var canvheight=helperfunc($(this));
if(canvheight>maxheight) maxheight=canvheight;
})
if(diff_height<=0){
var canh=Math.max(maxheight,site_top+diff_height);
}else{
var canh=Math.max(maxheight,site_top);
}
$('#canvas').css('height',canh+'px');
site_footer.css('top',canh+"px");
scroll_container_adjust();
}
}
function add_firston(firdom,click){
var click=click?click:0;
if(click){
if(firdom.find('.secondul').length && firdom.find('.secondul').css("display")=='none'){
firdom.find('a.firlink').addClass('firston');
}else{
firdom.find('a.firlink').removeClass('firston');
}
}else{
if(firdom.find('.secondul').length && firdom.find('.secondul').css("display")=='none') firdom.find('a.firlink').addClass('firston');
}
}
function add_secondon(secdom,click){
var click=click?click:0;
if(click){
if(secdom.find('.thirdul').length && secdom.find('.thirdul').css("display")=='none'){
secdom.find('.seclink').addClass('secondon');
}else{
secdom.find('a.seclink').removeClass('secondon');
}
}else{
if(secdom.find('.thirdul').length && secdom.find('.thirdul').css("display")=='none') secdom.find('a.seclink').addClass('secondon');
}
}
function remove_firston(firdom){
if(firdom.find('.secondul').length && firdom.find('.secondul').css("display")=='block') firdom.find('a.firlink').removeClass('firston');
}
function remove_secondon(secdom){
if(secdom.find('.thirdul').length && secdom.find('.thirdul').css("display")=='block') secdom.find('a.seclink').removeClass('secondon');
}
function first_li_hover_styles2(firindex,click){
var firindex=firindex;
var click=click?click:0;
var chang_css_dom= first_li.eq(firindex).find('.firston');
var chang_opne_img_dom= first_li.eq(firindex).find('.firston img');
var chang_img_dom= first_li.eq(firindex).find('.firlink img');
plugin_id=first_li.eq(firindex).closest('.navigation').attr('id');
plugin_id=plugin_id.substr(4);
if(first_li.eq(firindex).find('.secondul').length) {
if (!click) {
if (first_li.eq(firindex).find('.secondul').length) {
first_li.eq(firindex).find('.secondul').css("display", "block");
first_li.eq(firindex).siblings().find('.secondul').css("display", "none");
chang_opne_img_dom.attr("src", chang_img_dom.attr("data-src_h"));
}
} else {
if (first_li.eq(firindex).find('.secondul').css("display") == "none") {
first_li.eq(firindex).find('.secondul').css("display", "block");
li_hover_style = JSON.parse($('#' + plugin_id).find("#alldata").attr("data-main_hover_style"));
chang_css_dom.css(li_hover_style);
chang_opne_img_dom.attr("src", chang_img_dom.attr("data-src_h"));
} else {
first_li.eq(firindex).find('.secondul').css("display", "none");
chang_img_dom.attr("src", chang_img_dom.attr("data-src"));
}
}
$.each(first_li, function () {
if ($(this).find('.secondul').length && $(this).find('.secondul').css('display') == 'none') {
wp_showdefaultHoverCss('layer689B605ED0FF98D748389D982959F273');
$(this).children('a').attr("style", '');
}
});
gzlayer.height(first_ul.height());
diff_height = parseInt(first_ul.height()) - oldHeight;
//move_height(diff_height);
wp_heightAdapt($('#layer689B605ED0FF98D748389D982959F273'));
}
// fixed bug#6347
else {
var hsrc = chang_img_dom.attr("data-src_h") || '';
!(click || !hsrc.length) && chang_img_dom.attr("src", hsrc);
}
}
function getrads(layer_id){
var ul_rads=0;
var navstyle = $('#'+layer_id).data("datastys_");
if(!navstyle) return ul_rads;
if(ul_rads==0){
var doms='#nav_'+layer_id+' ul li';
if(navstyle.indexOf(doms+'{border-radius:') > 0){
var tcolorlist=navstyle.split(doms+'{border-radius:');
if(tcolorlist[1].indexOf(';') > 0){
var tctmp=tcolorlist[1].split(';');
ul_rads=parseInt(tctmp[0]);
}
}
}
var navstyle = $('#'+layer_id).data("datasty_");
if(!navstyle) return ul_rads;
if(ul_rads==0){
var doms='#nav_'+layer_id+' ul li';
if(navstyle.indexOf(doms+' {') > 0){
var tcolorlist=navstyle.split(doms+' {');
if(tcolorlist[1].indexOf('border-radius:') > 0){
var tctmp=tcolorlist[1].split('border-radius:');
if(tctmp[1].indexOf(';') > 0){
var tctmpx=tctmp[1].split(';');
ul_rads=parseInt(tctmpx[0]);
}
}
}
}
return ul_rads;
}
function second_li_hover_styles2(firindex,click,secindex){
var click=click?click:0;
var chang_css_dom= first_li.eq(firindex).children('ul').children('li').eq(secindex);
plugin_id=second_li.eq(secindex).closest('.navigation').attr('id');
plugin_id=plugin_id.substr(4);
if(chang_css_dom.find('.thirdul').length) {
if (!click) {
chang_css_dom.find('.thirdul').css("display", "block");
chang_css_dom.siblings().find('.thirdul').css("display", "none");
chang_css_dom.find('a.seclink img').attr('src',chang_css_dom.find('a.seclink img').attr('data-src_h'));
} else {
if (chang_css_dom.find('.thirdul').css("display") == "none") {
first_ul.find('.thirdul').css("display", "none");
chang_css_dom.find('.thirdul').css("display", "block");
if (chang_css_dom.children('a').hasClass("secondon")) {
var ul_rads = getrads(plugin_id);
if(ul_rads>0){
chang_css_dom.find(".secondon").css("border-radius",ul_rads+"px");
}
li_hover_style = JSON.parse($('#' + plugin_id).find("#alldata").attr("data-sub_hover_style"));
chang_css_dom.find(".secondon").css(li_hover_style);
chang_css_dom.find('img').attr("src", chang_css_dom.find('img').attr("data-src_h"))
}
} else {
chang_css_dom.find('.thirdul').css("display", "none");
chang_css_dom.children('a').find('img').attr("src", chang_css_dom.children('a').find('img').attr("data-src"));
}
}
$.each(second_li, function () {
if ($(this).find('.thirdul').length && $(this).find('.thirdul').css('display') == 'none') {
wp_showdefaultHoverCss('layer689B605ED0FF98D748389D982959F273');
$(this).children('a').attr("style", '');
}
});
}
}
function first_li_move_styles2(firindex){
var firindex=firindex;
var change_dom=first_li.eq(firindex).find('.secondul');
setTimeout(function(){
if(change_dom.length){
change_dom.css("display","none");
first_li.eq(firindex).find('a.firlink>img').attr('src',first_li.eq(firindex).find('a.firlink>img').attr('data-src'));
}
gzlayer.height(first_ul.height());
diff_height=parseInt(first_ul.height())-oldHeight;
wp_heightAdapt($('#layer689B605ED0FF98D748389D982959F273'));
},500);
// fixed bug#6347
if (! change_dom.length) {
var $lnkimg = first_li.eq(firindex).find('a.firlink > img'),
_src = $lnkimg.attr("data-src") || '';
_src.length && $lnkimg.attr("src", _src);
}
}
function second_li_move_styles2(firindex,secindex){
var firindex=firindex;
var secindex=secindex;
var change_dom=first_li.eq(firindex).children('ul').children('li').eq(secindex).find('.thirdul');
var change_img=first_li.eq(firindex).children('ul').children('li').eq(secindex).find('a.seclink img');
setTimeout(function(){
if(change_dom.length){
change_dom.css("display","none");
change_img.attr('src',change_img.attr('data-src'));
}
},500);
}
if(subopen=='0'&&submethod=='1'){
first_li.hover(function () {
var firdom=$(this);
add_firston(firdom,0);
var firindex=$(this).index();
first_li_hover_styles2(firindex,0);
},function(){
var dom=$(this);
remove_firston(dom);
var firindex=$(this).index();
first_li_move_styles2(firindex);
});
second_li.hover(function () {
var dom=$(this);
add_secondon(dom,0);
var firindex=$(this).closest("li.wp_subtop").index();
var secindex=$(this).index();
second_li_hover_styles2(firindex,0,secindex);
},function(){
var dom=$(this);
remove_secondon(dom);
var firindex=$(this).closest("li.wp_subtop").index();
var secindex=$(this).index();
second_li_move_styles2(firindex,secindex);
});
}else{
first_li.hover(function () {
var firdom=$(this);
var chang_img_dom= firdom.find('.firlink img');
var hsrc = chang_img_dom.attr("data-src_h") || '';
if(hsrc && hsrc.length) chang_img_dom.attr("src", hsrc);
},function(){
var dom=$(this);
var $lnkimg = dom.find('a.firlink > img'),
_src = $lnkimg.attr("data-src") || '';
if(_src && _src.length) $lnkimg.attr("src", _src);
});
}
if(subopen=='1'||submethod=='0'){
first_li.find('.downlistBox1').click(function(e){
e.preventDefault();
var dom=$(this).closest('.wp_subtop');
add_firston(dom,1);
var firindex=dom.index();
first_li_hover_styles2(firindex,1);
if(subopen==1){
if($(this).hasClass("ahover")){
dom.removeClass("lihover").children('a').removeClass("ahover");
}else{
dom.addClass("lihover").children('a').addClass("ahover");
}
}
});
first_li.find('.downlistBox1 span').click(function(e){
e.stopPropagation();
});
second_li.find('.downlistBox2').click(function(event){
event.preventDefault();
var dom=$(this).closest('.secondli');
add_secondon(dom,1);
var firindex=$(this).closest("li.wp_subtop").index();
var secindex=dom.index();
second_li_hover_styles2(firindex,1,secindex);
event.stopPropagation();
});
second_li.find('.downlistBox2 span').click(function(e){
event.stopPropagation();
});
}
})