
    jQuery(function($) {

        if ($('#bottles_home').height() != undefined) {
            $('div.box_main').hide();

            $('#bottles_home map area').bind('mouseover', function(){
                var index = $(this).attr('href').substr(1);

                $('div.box_main').hide();
                $('div.box_main').eq(index-1).show();
                $('#bottles_home img').attr('src','./img/bottles_'+index+'.png');
                $('#bottles_home img').pngfix();
                $('#footer, .bottles').hide().show();
            });
        }
        else {
            $('div.text div.floatbox').addClass('accordeon');
            $('div.absatz:not(:last)').addClass('accordeon');
            $('div.text h1').addClass('accordeon');

            $('div.floatbox.accordeon:not(:first)').hide();

            $('h1.accordeon').bind('click', function(){
                var index = $('div.text h1.accordeon').index(this);
                do_bottles(index);
            });

            $('#bottles_product map area').bind('click', function(){
                var index = ($(this).attr('href').substr(1)) -1;
                do_bottles(index);
            });

            if($('#bottles_product map area').height() != undefined) {
                $('div.text h1:eq(0)').attr('id','green');
                $('div.text h1:eq(1)').attr('id','jasmin');
                $('div.text h1:eq(2)').attr('id','white');
            }
        }
    });

    function do_bottles(index){

        var curr_headline	= $('div.text h1.accordeon').eq(index);
        var curr_block 		= curr_headline.next();
        var display 		= curr_block.css('display');

        $('div.text h1.accordeon').next().slideUp('slow',function(){
            $('#footer').hide().show();
        });

        if(display != 'block'){
            curr_block.slideDown('slow',function(){
                $('#footer').hide().show();
            });
            $('#bottles_product img').attr('src','./img/bottles_'+(index+1)+'.png');
        }
        else{
            $('#bottles_product img').attr('src','./img/bottles_0.png');
        }
        $('#bottles_product img').pngfix();
        $('#footer').hide().show();
    }