$(document).ready(function(){
    lastBlock = $("#a1");
    maxWidth = 200;
    minWidth = 25;

    $("#accordeon ul li a").hover(
      function(){
        $(lastBlock).animate({width: minWidth+"px"}, { queue:false, duration:400 });
        if (lastBlock != this){
           	$("img", lastBlock).fadeIn();
        }
	    $(this).animate({width: maxWidth+"px"}, { queue:false, duration:400});
    	lastBlock = this;
     	$("img", this).fadeOut();
      }
    );
    if ($("#accordeon").length){
        $("#accordeon").parents(".article").addClass("withacc");
        $(".article_separator").remove();
        $("#vox-top-article").attr("id", "vox-top-accordeon");
        $("#vox-bottom-article").attr("id", "vox-bottom-accordeon");
        $("#vox-header-img img").css("margin-left", "9px");
        $(".buttonheading").remove();
    }
    if(jQuery.browser.mozilla){
        /* Rusine, rusine, rusine sa va fie! */
        firefox_bug();
    }
});

function firefox_bug(){
    $("#accordeon ul>li>p").each(function(){
        $(this).hide();
        $(this).prev("a").append("<p>" + $(this).text() + "</p>");
        $(this).remove();
    });
}

