/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

 
jQuery(document).ready(function(){

    $(function() {
        var offset = $("#sidebar").offset();
        var topPadding = 70;
		
        $(window).scroll(function() {
        if($(window).innerHeight() > 800){ 
            if ($(window).scrollTop() > offset.top) {
                $("#sidebar").stop().animate({
                    marginTop: $(window).scrollTop() - offset.top + topPadding
                });
            } else {
                $("#sidebar").stop().animate({
                    marginTop: 0
                });
            };
        }
    });
    });
    
    $('#sidebarTablewizard').width(100);
    $('#sidebarTablewizard').mouseover(function()
    {
        $(this).css("cursor","pointer");
        $(this).animate({
            width: "350px",
            marginLeft: -125
        }, 'fast');
    });
    
    $('#sidebarTablewizard').mouseout(function()
    {   
        $(this).animate({
            width: "100px",
            marginLeft: 5
        }, 'fast');
    });  

    $('#sidebarTermTool').width(100);
    $('#sidebarTermTool').mouseover(function()
    {
        $(this).css("cursor","pointer");
        $(this).css("z-index","1");
        $(this).animate({
            width: "350px",
            marginLeft: -125
        }, 'fast');
    });
    
    $('#sidebarTermTool').mouseout(function()
    {   
        $(this).animate({
            width: "100px",
            marginLeft: 5
        }, 'fast');
    });
	 $('#sidebarImageWizard').width(100);
    $('#sidebarImageWizard').mouseover(function()
    {
        $(this).css("cursor","pointer");
        $(this).animate({
            width: "350px",
            marginLeft: -125
        }, 'fast');
    });
	 $('#sidebarImageWizard').mouseout(function()
    {   
        $(this).animate({
            width: "100px",
            marginLeft: 5
        }, 'fast');
    });
});

function FensterOeffnen (Adresse) {
  tmpFenster = window.open(Adresse, "Zweitfenster", "width=860,height=500,left=100,top=200");
  tmpFenster.focus();
}
