var runningIntervals=Array();function InitAccordeon(f){var a=document.getElementById(f);if(a!=null){var b=0;for(var c=0;c<a.childNodes.length;c++){if(a.childNodes[c].className!=undefined){if(a.childNodes[c].className.indexOf("box_mostpopular")!=-1){for(var e=0;e<a.childNodes[c].childNodes.length;e++){if(a.childNodes[c].childNodes[e].className!=undefined){if(a.childNodes[c].childNodes[e].className.indexOf("mostpopular_inner")!=-1){var d=$(a.childNodes[c].childNodes[e]).outerHeight();b=Math.max(b,d)}}}}}}for(var c=0;c<a.childNodes.length;c++){if(a.childNodes[c].className!=undefined){if(a.childNodes[c].className.indexOf("box_mostpopular")!=-1){for(var e=0;e<a.childNodes[c].childNodes.length;e++){if(a.childNodes[c].childNodes[e].className!=undefined){if(a.childNodes[c].childNodes[e].className.indexOf("mostpopular_inner")!=-1){$(a.childNodes[c].childNodes[e]).height(b)}}}}}}for(var c=0;c<a.childNodes.length;c++){if(a.childNodes[c].className!=undefined){if(a.childNodes[c].className.indexOf("box_mostpopular")!=-1){ResizeAccordeonPart(f,a.childNodes[c].id,true);break}}}$(a).parent().css("padding-top","1px");$(a).parent().css("padding-bottom","3px")}}function ActivateAccordeonPart(c,d){var a=document.getElementById(c);if(a!=null){var b=c+"_int";if((runningIntervals[b]!=undefined)&&(runningIntervals[b]!=null)){window.clearInterval(runningIntervals[b])}runningIntervals[b]=window.setInterval('ResizeAccordeonPart("'+c+'","'+d+'",false)',100)}}function ResizeAccordeonPart(g,f,p){var l=document.getElementById(g);var h=document.getElementById(f);if(l!=null){var m=0;var b=0;for(var j=0;j<l.childNodes.length;j++){if((l.childNodes[j].className!=undefined)&&(l.childNodes[j].className.indexOf("box_mostpopular")!=-1)){var d=l.childNodes[j];if(d==h){var e=$(d).height();var a=0;var c=0;for(var n=0;n<d.childNodes.length;n++){if(d.childNodes[n].className!=undefined){if(d.childNodes[n].className.indexOf("mostpopular_heading")!=-1){a=$(d.childNodes[n]).outerHeight()}else{if(d.childNodes[n].className.indexOf("mostpopular_inner")!=-1){c=$(d.childNodes[n]).outerHeight()}}}}if(e<a+c){if(!p){var k=Math.ceil(Math.min(a+c,e+Math.max(((a+c)-e)/2,5)))}else{var k=a+c}b=k-e;$(d).height(k);m++}}}}for(var j=0;j<l.childNodes.length;j++){if(l.childNodes[j].className!=undefined){if(l.childNodes[j].className.indexOf("box_mostpopular")!=-1){var d=l.childNodes[j];if(d!=h){var e=$(d).height();var a=0;var c=0;for(var n=0;n<d.childNodes.length;n++){if(d.childNodes[n].className!=undefined){if(d.childNodes[n].className.indexOf("mostpopular_heading")!=-1){a=$(d.childNodes[n]).outerHeight()}else{if(d.childNodes[n].className.indexOf("mostpopular_inner")!=-1){c=$(d.childNodes[n]).outerHeight()}}}}if(e>a){if(!p){$(d).height(Math.max(a,e-b))}else{$(d).height(a)}m++}}}}}if(m==0){var o=g+"_int";window.clearInterval(runningIntervals[o])}}};