';
var first_ul=$('#nav_layer773FE331EBF0A43312BB25BA7E203BD3');
var second_ul=$('#nav_layer773FE331EBF0A43312BB25BA7E203BD3 >li.wp_subtop>ul');
var third_ul=$('#nav_layer773FE331EBF0A43312BB25BA7E203BD3 >li.wp_subtop>ul>li>ul');
var first_li=$('#nav_layer773FE331EBF0A43312BB25BA7E203BD3 >li.wp_subtop');
var second_li=$('#nav_layer773FE331EBF0A43312BB25BA7E203BD3 >li.wp_subtop>ul>li');
var third_li=$('#nav_layer773FE331EBF0A43312BB25BA7E203BD3 >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_layer773FE331EBF0A43312BB25BA7E203BD3').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(""=="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('layer773FE331EBF0A43312BB25BA7E203BD3')
$('#nav_layer773FE331EBF0A43312BB25BA7E203BD3').children('li').each(function(){
$(this).addClass("lihover").children('a').addClass("ahover");
});
}
$("#nav_layer773FE331EBF0A43312BB25BA7E203BD3").css('visibility','');
(function(){
var deferred=$.Deferred();
setTimeout(function(){
deferred.resolve("{\"status\":\"ok\",\"message\":\"layer97DD31E4C303D04578BDAFEB782071BE,layerC2DFA2C100151A681FF037BC41E6D2CD,layerA4D080A801F2A02CFAC864D16823B602,layerE0B668F012646104EB76299138087213,layer773FE331EBF0A43312BB25BA7E203BD3,layerDCCAADB9AA2D097B4DDF78AFDC15E23E,layerE6A7262E251A1F23BAD54EC9E2F90EBA,layer598DFD4E8AD650AE7323325943EB1368,layer8E08F264C4532F9BC65EBE5686CF64D5,layer9CCDF7A4DEE580CD573051C5ABECF1C0,layerD1C8A34B0FDC968BFF845FEB85034FE5,layerCB00E603A578ABD33BC12ECF8CE405DB,layerECACCAA68387EC45EC1EE50D3FF70DF7\"}");
},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($('#layer773FE331EBF0A43312BB25BA7E203BD3'));
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("#layer773FE331EBF0A43312BB25BA7E203BD3").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=leftpos &&rightpos2';
$('#layer773FE331EBF0A43312BB25BA7E203BD3').find('ul.navigation').append(input_height);
}
var parenttops = [];
var layer_arr='', layer_arr2=[],top2='',layer_arr3=[],top2='';
var oldHeight=parseInt(first_ul.height());
var parentsbox = $("#layer773FE331EBF0A43312BB25BA7E203BD3").parents("[type='box']");
var parentsboxtop = 0;
if(parentsbox.length){
parentsbox.each(function(){
var boxtop = $(this).css('top');
parentsboxtop = parseInt(parentsboxtop)+parseInt(boxtop);
});
}
var categoryBom=parseInt(oldHeight)+parseInt($("#layer773FE331EBF0A43312BB25BA7E203BD3").css('top'))+parseInt(parentsboxtop);
var domlayer773FE331EBF0A43312BB25BA7E203BD3 = $("#canvas");
var site_top = parseInt(domlayer773FE331EBF0A43312BB25BA7E203BD3.css('height'));
window.onload=function(){
site_top = parseInt(domlayer773FE331EBF0A43312BB25BA7E203BD3.css('height'));
}
var full_column = $("#layer773FE331EBF0A43312BB25BA7E203BD3").closest(".full_column");
var full_id = full_column.attr("id")||'';
function move_height(diff_height){
if(full_id.length) diff_height =0;
for(k in layer_arr2){
var parenttop = parseInt(parenttops[k] || 0);
if(parseInt(layer_arr2[k])>categoryBom){
$("#"+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 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('layer773FE331EBF0A43312BB25BA7E203BD3');
$(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;
move_height(diff_height);
},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();
});
}
})