$(document).ready(function()
{
    //Navigation Hover Effekte
    $('#link1').mouseover(function() {
        $('#link-img-1').attr('src', 'template/images/navi/startseite-hover.jpg');
    });
    $('#link1').mouseout(function() {
        if (!link1) $('#link-img-1').attr('src', 'template/images/navi/startseite.jpg');
    });

    $('#link2').mouseover(function() {
        $('#link-img-2').attr('src', 'template/images/navi/unternehmen-hover.jpg');
    });
    $('#link2').mouseout(function() {
        if (!link2) $('#link-img-2').attr('src', 'template/images/navi/unternehmen.jpg');
    });

    $('#link3').mouseover(function() {
        $('#link-img-3').attr('src', 'template/images/navi/projekte-hover.jpg');
    });
    $('#link3').mouseout(function() {
        if (!link3) $('#link-img-3').attr('src', 'template/images/navi/projekte.jpg');
    });

    $('#link4').mouseover(function() {
        $('#link-img-4').attr('src', 'template/images/navi/portfolio-hover.jpg');
    });
    $('#link4').mouseout(function() {
        if (!link4) $('#link-img-4').attr('src', 'template/images/navi/portfolio.jpg');
    });

    $('#link5').mouseover(function() {
        $('#link-img-5').attr('src', 'template/images/navi/presse-hover.jpg');
    });
    $('#link5').mouseout(function(){
        if (!link5) $('#link-img-5').attr('src', 'template/images/navi/presse.jpg');
    });

    $('#link6').mouseover(function(){
        $('#link-img-6').attr('src', 'template/images/navi/kontakt-hover.jpg');
    });
    $('#link6').mouseout(function(){
        if (!link6) $('#link-img-6').attr('src', 'template/images/navi/kontakt.jpg');
    });

    $('#link7').mouseover(function(){
        $('#link-img-7').attr('src', 'template/images/navi/impressum-hover.jpg');
    });
    $('#link7').mouseout(function(){
        if (!link7) $('#link-img-7').attr('src', 'template/images/navi/impressum.jpg');
    });


    // Boxes Hover Effekte
    $('#box1.box-visible').mouseover(function() {
        $('#box1').addClass('box-hover');
        $('#box1-img').attr('src', 'template/images/boxes/speck-hover.jpg');
    });
    $('#box1.box-visible').mouseout(function() {
        if($('#box1').hasClass('box-visible')) {
            $('#box1').removeClass('box-hover');
            $('#box1-img').attr('src', 'template/images/boxes/speck.jpg');
        }
    });

    $('#box2.box-visible').mouseover(function(){
        $('#box2').addClass('box-hover');
        $('#box2-img').attr('src', 'template/images/boxes/eks-hover.jpg');
    });
    $('#box2.box-visible').mouseout(function(){
        if($('#box2').hasClass('box-visible')) {
            $('#box2').removeClass('box-hover');
            $('#box2-img').attr('src', 'template/images/boxes/eks.jpg');
        }
    });

    $('#box3.box-visible').mouseover(function() {
        $('#box3').addClass('box-hover');
        $('#box3-img').attr('src', 'template/images/boxes/kraus-hover.jpg');
    });
    $('#box3.box-visible').mouseout(function(){
        if($('#box3').hasClass('box-visible')) {
            $('#box3').removeClass('box-hover');
            $('#box3-img').attr('src', 'template/images/boxes/kraus.jpg');
        }
    });

    $('#box4.box-visible').mouseover(function(){
        $('#box4').addClass('box-hover');
        $('#box4-img').attr('src', 'template/images/boxes/krausm-hover.jpg');
    });
    $('#box4.box-visible').mouseout(function(){
        if($('#box4').hasClass('box-visible')) {
            $('#box4').removeClass('box-hover');
            $('#box4-img').attr('src', 'template/images/boxes/krausm.jpg');
        }
    });
	
	    $('#box5.box-visible').mouseover(function(){
        $('#box5').addClass('box-hover');
        $('#box5-img').attr('src', 'template/images/boxes/trinklein-hover.jpg');
    });
    $('#box5.box-visible').mouseout(function(){
        if($('#box5').hasClass('box-visible')) {
            $('#box5').removeClass('box-hover');
            $('#box5-img').attr('src', 'template/images/boxes/trinklein.jpg');
        }
    });


    // Hover Effekte für Language Symbole
    $('#en-hover').mouseover(function(){
        $('#en-hover').attr('src', "template/images/lang/en_on.jpg");
        $('#aktuelle-sprache').text('englisch');
    });
    $('#en-hover').mouseout(function(){
        $('#en-hover').attr('src', "template/images/lang/en.jpg");
        $('#aktuelle-sprache').text('deutsch');
    });

    $('#de-hover').mouseover(function(){
        $('#de-hover').attr('src', "template/images/lang/de_on.jpg");
        $('#aktuelle-sprache').text('deutsch');
    });
    $('#de-hover').mouseout(function(){
        $('#de-hover').attr('src', "template/images/lang/de.jpg");
        $('#aktuelle-sprache').text('englisch');
    });

});


//Content koontrollieren
function ShowContent(i)
{
    Reset();

    if (i == 1)
    {
        $('#box1').removeClass("box-visible");
        $('#art-1').show('slow', "linear");
        $('#box1').addClass('box-hover');
        $('#box1-img').attr('src', 'template/images/boxes/speck-hover.jpg');
    }
    else if (i == 2)
    {
        $('#box2').removeClass("box-visible");
        $('#art-2').show('slow', "linear");
        $('#box2').addClass('box-hover');
        $('#box2-img').attr('src', 'template/images/boxes/eks-hover.jpg');
    }
    else if (i == 3)
    {
        $('#box3').removeClass("box-visible");
        $('#art-3').show('slow', "linear");
        $('#box3').addClass('box-hover');
        $('#box3-img').attr('src', 'template/images/boxes/kraus-hover.jpg');
    }
    else if (i == 4)
    {
        $('#box4').removeClass("box-visible");
        $('#art-4').show('slow', "linear");
        $('#box4').addClass('box-hover');
        $('#box4-img').attr('src', 'template/images/boxes/krausm-hover.jpg');
    }
    else if (i == 5)
    {
        $('#box5').removeClass("box-visible");
        $('#art-5').show('slow', "linear");
        $('#box5').addClass('box-hover');
        $('#box5-img').attr('src', 'template/images/boxes/trinklein-hover.jpg');
    }
    else if (i == 6)
    {
        $('#box6').removeClass("box-visible");
        $('#art-6').show('slow', "linear");
        $('#box6').addClass('box-hover');
        $('#box6-img').attr('src', 'template/images/boxes/speck-hover.jpg');
    }
    else
    {
        $('#box1').removeClass("box-visible");
        $('#art-1').show('slow', "linear");
        $('#box1').addClass('box-hover');
        $('#box1-img').attr('src', 'template/images/boxes/speck-hover.jpg');
    }
}

// Nullzustand bei Boxen wiederherstellen
function Reset()
{
    $('.article').hide('slow');
    $('#box1,#box2,#box3,#box4,#box5,#box6').addClass("box-visible");
    $('#box1,#box2,#box3,#box4,#box5,#box6').removeClass("box-hover");

    $('#box1').removeClass('box-hover');
    $('#box1-img').attr('src', 'template/images/boxes/speck.jpg');

    $('#box2').removeClass('box-hover');
    $('#box2-img').attr('src', 'template/images/boxes/eks.jpg');

    $('#box3').removeClass('box-hover');
    $('#box3-img').attr('src', 'template/images/boxes/kraus.jpg');

    $('#box4').removeClass('box-hover');
    $('#box4-img').attr('src', 'template/images/boxes/krausm.jpg');

    $('#box5').removeClass('box-hover');
    $('#box5-img').attr('src', 'template/images/boxes/trinklein.jpg');

    $('#box6').removeClass('box-hover');
    $('#box6-img').attr('src', 'template/images/boxes/speck.jpg');
}
