
$(document).ready(function(){removeEmptyZones();setContentWidth();setTimeout('setContentWidth();',1000);$(window).resize(function(){setContentWidth();setTimeout('setContentWidth();',1000);});init();});function init()
{$("body").css("display","block");if(topMenu=="YES")
{$("#menu ul").dropDownMenu({});}
if(sideMenuStyle=="tree"||$(".tree").length>0)
{$(".tree").treeview({collapsed:true,animated:"medium",persist:"location"});}
if(sideMenuStyle=="drop-down"||$(".drop-down-menu-vertical").length>0)
{$(".drop-down-menu-vertical").parent(".panel .content").each(function(){$(this).css("padding","0px").css("margin","0px");});$(".drop-down-menu-vertical .current").parents('li').each(function(){$(this).addClass('current');});$(".drop-down-menu-vertical").dropDownMenu({layout:'vertical',onBeforeShow:function()
{var w=$(this).parent().parent().width();$(this).css("left",w+"px").css("width",w+"px");}});}
if($("body").hasClass("page-catalog"))
{var currentSortItem=$("#catalog-navigation-menu-sort ul li a.current");if(currentSortItem.length>0)
{var a=$("#catalog-navigation-menu-sort a:first");a.click(function(e){e.preventDefault();});$(a).html($(a).html()+': '+$(currentSortItem).html());}
var currentViewItem=$("#catalog-navigation-menu-view ul li a.current");if(currentViewItem.length>0)
{var a=$("#catalog-navigation-menu-view a:first");a.click(function(e){e.preventDefault();});$(a).html($(a).html()+': '+$(currentViewItem).html());}
$("#catalog-navigation-menu").dropDownMenu({subMenuWidth:'100%',menuMinWidth:'100px',arrowCode:'<img src="/images/icon-downarrow.png" width="22" height="22" alt="" align="right" />'});}
if($(".catalog-view-flexible").length>0)
{setCatalogViewFlexible();setTimeout('setCatalogViewFlexible();',500);var winWidth=$(window).width(),winHeight=$(window).height();$(window).resize(function(){var newWinWidth=$(window).width(),newWinHeight=$(window).height();if(winWidth!=newWinWidth||winHeight!=newWinHeight)
{setCatalogViewFlexible();setTimeout('setCatalogViewFlexible();',500);winWidth=newWinWidth;winHeight=newWinHeight;}});}
$(".product-rating-small").each(function(){$(this).rater({'curvalue':this.title,'style':'small','disable':true});});if($("body").hasClass("page-product"))
{if($(".product-page-blocks").hasClass("product-page-blocks-tabs"))
{var html='';var blockCounter=0;$(".product-page-blocks .product-page-block").each(function(){if($(this).find(".product-page-block-header").length>0)
{var blockId=$(this).attr("id")!=''?$(this).attr("id"):'product-page-block-'+blockCounter;$(this).attr("id",blockId);var title=$(this).find(".product-page-block-header:first").html();html=html+'<li><a href="#'+blockId+'">'+title+'</a></li>';}
blockCounter++;});$(".product-page-blocks .product-page-block .product-page-block-header").remove();if(html!='')$(".product-page-blocks").prepend('<ul>'+html+'</ul>').tabs();}}}
