function contentheight(){
    $(document).ready(function(){
        
        var documentHeight = $(document).height();
        var leftcolumnHeight = $("#left").height();
        var centercolumnHeight = $("#center").height();
        
        resizeContent();
        
        $(window).resize(function() {
            documentHeight = $(document).height();
            resizeContent();
        });
        function resizeContent(){
                
            $("#trace").text(centercolumnHeight + ", " + leftcolumnHeight );
            
            if(centercolumnHeight < leftcolumnHeight){
                $("#center").css("height", documentHeight - 20);
                $("#trace").text("1: " + centercolumnHeight + ", " + leftcolumnHeight );
            }
            if((centercolumnHeight > leftcolumnHeight)){
                //$("#center").css("height", "auto");
                $("#trace").text("2: " + centercolumnHeight + ", " + leftcolumnHeight );
            }
        
        }
        
    });

}

function hoverleftmenu(){
    $(document).ready(function(){
        
        var leftmenuItemIndex;
        
        $(".leftmenu a").mouseover(function(){
            
            leftmenuItemIndex = $(".leftmenu a").index(this);
            $(".leftmenu li:eq(" + leftmenuItemIndex + ")").addClass("hover");
        
        });
        $(".leftmenu a").mouseout(function(){
            
            $(".leftmenu li:eq(" + leftmenuItemIndex + ")").removeClass("hover");
        
        });
        
    });

}

function footerpos(){
    $(document).ready(function(){
        
        var clientmenu = $("#left .leftmenu.clientmenu");
        var clientmenuPosition = clientmenu.position();
        var bukietwinHeight = $("#bukietwin").height();
        var copyrightHeight = $("#copyright").height();
        var loginformHeight = $(".right .login").height() + $("#loginform").height();
        
        $("#bukietwin").css("margin-top", clientmenuPosition.top + clientmenu.height() - bukietwinHeight - copyrightHeight + 30 - loginformHeight);
        $("#copyright").css("margin-top", clientmenuPosition.top + clientmenu.height() - copyrightHeight - 20 - loginformHeight);
        
    });

}

function aboutimg(){
    $(document).ready(function(){
        
        $('#aboutimg').mouseover(function() {
            $("#aboutimg").css("height", "77px");
        });
        $('#aboutimg').mouseout(function() {
            $("#aboutimg").css("height", "67px");
        });
        
    });

}

function onasppos(){
    $(document).ready(function(){
        
        var windowWidth = $(window).width();
        var windowHeight = $(window).height();
        var photoWidth = $("#onasphoto").width();
        var photoHeight = $("#onasphoto").height();
        
        var content = $("#center.onas .content");
        var contentHeight = content.height();
        var contentPosition = content.position();
        
        resizeContent();
        
        $(window).resize(function() {
            windowWidth = $(document).width();
            resizeContent();
        });
        
        function resizeContent(){
            $("#center.onas .content").css("margin-top", photoHeight - 20);
            $("#onasphoto").css("left", ( (windowWidth - photoWidth) / 2 ) + 40);
            $("#onasphoto").css("top", contentPosition.top);
        }
        
    });
}

function logininput(){
    $(document).ready(function(){
        
        $('#loginBtn input').mouseover(function() {
            $("#loginBtn input").addClass("loginhover");
        });
        $('#loginBtn input').mouseout(function() {
            $("#loginBtn input").removeClass("loginhover");
        });
        
        $('#right .login, #loginform').mouseover(function() {
            $("#right .login").addClass("loginheadhover");
        });
        $('#right .login, #loginform').mouseout(function() {
            $("#right .login").removeClass("loginheadhover");
        });
        
    });
}
