$(function()
{
    var isResizing;

    $("#contentWrap").css({'overflow-y':'auto'});
    $("html").css({'overflow-y':'auto'});

    var setContainerHeight = function()
    {
        if (!isResizing) {
            isResizing = true;
            $window = $(window);
            $contentWrap = $("#contentWrap");
            
            //var p = (parseInt($c.css('paddingLeft')) || 0) + (parseInt($c.css('paddingRight')) || 0);
            //var height = $window.height - parseInt($contentWrap.css('top'));
            var height = $window.height() - parseInt($contentWrap.css('top'));
            $contentWrap.css({'height': height + 'px'});
            isResizing = false;
        }
    }
    $(window).bind('resize', setContainerHeight);
    setContainerHeight();

    // it seems like you need to call this twice to get consistantly correct results cross browser...
    setContainerHeight();

});


$(document).ready(function() {



	$.localScroll.hash({
		target: '#contentWrap',
		queue:true,
		duration:1000
	});

	$.localScroll({
		target: '#contentWrap',
		queue:true,
		duration:1000,
		hash:false

	});


    /*$.localScroll({
        target:'#contentWrap'
    });*/

    //$("#footer").css({ 'bottom':'0','left':'0','position':'fixed'});


    // GhostNavi auf Home einscghalten

    var giWidth;
    var giHeight;
    $("#homeGhostNav img").each(function() {

        giWidth = $(this).width();
        giHeight = $(this).height();
        $(this).attr("src", basePath+"/docroot/customdir/images/clear.gif");
        $(this).width(giWidth);
        $(this).height(giHeight);

    })
    $("#homeGhostNav").css("z-index","1");

});


