';
var first_ul=$('#nav_layer1423D745578811B136E3A457F4E437B4');
var second_ul=$('#nav_layer1423D745578811B136E3A457F4E437B4 >li.wp_subtop>ul');
var third_ul=$('#nav_layer1423D745578811B136E3A457F4E437B4 >li.wp_subtop>ul>li>ul');
var first_li=$('#nav_layer1423D745578811B136E3A457F4E437B4 >li.wp_subtop');
var second_li=$('#nav_layer1423D745578811B136E3A457F4E437B4 >li.wp_subtop>ul>li');
var third_li=$('#nav_layer1423D745578811B136E3A457F4E437B4 >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_layer1423D745578811B136E3A457F4E437B4').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('layer1423D745578811B136E3A457F4E437B4')
$('#nav_layer1423D745578811B136E3A457F4E437B4').children('li').each(function(){
$(this).addClass("lihover").children('a').addClass("ahover");
});
}
$("#nav_layer1423D745578811B136E3A457F4E437B4").css('visibility','');
(function(){
var deferred=$.Deferred();
setTimeout(function(){
deferred.resolve("{\"status\":\"ok\",\"message\":\"layer0B38DBA4EC00E31049B356A14094CBE3,layerDD3B96C97A1A76D9BB5C468316907494,layer72CA1638DF764E527D7B58F757A03C93,layer912E20D6F9AC4182A5AE9752D3093D26,layer5E9421032FBE12C41F7C3AFC9B52356D,layerDD8E46FDD355F974041744C33F4CDA4C,layer41D6BD9489B99A1874E93E9521A7D92D,layer7F2949F161B4544252EBF90B95D05EFB,layerC3A737591AB2E296AA4F5993F63CF8CC,layer98413B29C2B39187C82E9AC573B5E495,layer2E1F62502EF8587BA5D76885F3403644,layer80B5B7E679C9F9D435875A98FC5498BD,layerBA158DF0326641F8C7D42BA376A20254,layer891E673262AF23A3C21923C4617BFC09,layerF99E9CC9AAEBB2F79780B58ED6954D6D,layer1423D745578811B136E3A457F4E437B4\"}");
},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($('#layer1423D745578811B136E3A457F4E437B4'));
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("#layer1423D745578811B136E3A457F4E437B4").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('layer1423D745578811B136E3A457F4E437B4');
$(this).children('a').attr("style", '');
}
});
gzlayer.height(first_ul.height());
diff_height = parseInt(first_ul.height()) - oldHeight;
//move_height(diff_height);
wp_heightAdapt($('#layer1423D745578811B136E3A457F4E437B4'));
}
// 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('layer1423D745578811B136E3A457F4E437B4');
$(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($('#layer1423D745578811B136E3A457F4E437B4'));
},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();
});
}
})