﻿$(document).ready(function () {
    $(".scroll").click(function (event) {
        event.preventDefault();
        $('html,body').animate({
            scrollTop: $(this.hash).offset().top
        }, 800);
    });
     $(".scrollToCenter").click(function (event) {
        event.preventDefault();
        var target = $('#centerOverview');
		$('html,body').animate({scrollTop: target.offset().top}, 800);

    });

    $(function () {
        // OPACITY OF BUTTON SET TO 50%
        $(".greyFade").css("opacity", "0.5");
        // ON MOUSE OVER
        $(".greyFade").hover(function () {
            // SET OPACITY TO 100%
            $(this).stop().animate({
                opacity: 1.0
            }, "slow");
        },
        // ON MOUSE OUT

        function () {
            // SET OPACITY BACK TO 50%
            $(this).stop().animate({
                opacity: 0.5
            }, "slow");
        });;
    })
        
    //Highslide
    hs.graphicsDir = '../highslide/graphics/';
    hs.align = 'center';
    hs.transitions = ['expand', 'crossfade'];
    hs.wrapperClassName = 'borderless floating-caption';
    hs.fadeInOut = true;
    hs.dimmingOpacity = .90;
    hs.showCredits = false;


    $("#newsletterMail").bind({
        click: function() {
            if ( $("#newsletterMail").val() == "eMail" ) {
                $("#newsletterMail").val("");
            }
        },
        focusout: function() {
            if ( $("#newsletterMail").val() == "" ) {
                $("#newsletterMail").val("eMail");
            }
        }
     });

    $("#newsletterName").bind({
        click: function() {
            if ( $("#newsletterName").val() == "Name" ) {
                $("#newsletterName").val("");
            }
        },
        focusout: function() {
            if ( $("#newsletterName").val() == "" ) {
                $("#newsletterName").val("Name");
            }
        }
     });


});



