

$(function () {
        $('.functions').each(function () {
            var distance = 10;
            var time = 250;
            var hideDelay = 500;

            var hideDelayTimer = null;

            var beingShown = false;
            var shown = false;
            var trigger = $('.trigger', this);
            var info = $('.popup', this).css('opacity', 0);
	    

            $([trigger.get(0), info.get(0)]).mouseover(function () {
                if (hideDelayTimer) clearTimeout(hideDelayTimer);
                if (beingShown || shown) {
                    // don't trigger the animation again
                    return;
                } else {
                    // reset position of info box
                    beingShown = true;

                    info.css({
                        top: -10,
                        left: -122,
                        display: 'block'
                    }).animate({
                        top: '-=' + distance + 'px',
                        opacity: 1
                    }, time, 'swing', function() {
                        beingShown = false;
                        shown = true;
                    });
                }

                return false;
            }).mouseout(function () {
                if (hideDelayTimer) clearTimeout(hideDelayTimer);
                hideDelayTimer = setTimeout(function () {
                    hideDelayTimer = null;
                    info.animate({
                        top: '-=' + distance + 'px',
                        opacity: 0
                    }, time, 'swing', function () {
                        shown = false;
                        info.css('display', 'none');
                    });

                }, hideDelay);
                return false;
            });
        });
    });


$(function() {

    $("#product-tabs ul li a").click(function() {
        
        // Figure out current list via CSS class
        var curList = $("#product-tabs ul  li a.current").attr("rel");
        
        // List moving to
        var $newList = $(this);
        
        // Set outer wrapper height to height of current inner list
        var curListHeight = $("#all-list-wrap").height();
        $("#all-list-wrap").height(curListHeight);
        
        // Remove highlighting - Add to just-clicked tab
        $("#product-tabs ul  li a").removeClass("current");
        $newList.addClass("current");
        
        // Figure out ID of new list
        var listID = $newList.attr("rel");
        
        if (listID != curList) {
            
            // Fade out current list
            $("#"+curList).fadeOut(300, function() {
                
                // Fade in new list on callback
                $("#"+listID).fadeIn();
                
                // Adjust outer wrapper to fit new list snuggly
                var newHeight = $("#"+listID).height();
                $("#all-list-wrap").animate();
            
            });
            
        }        
        
        // Don't behave like a regular link
        return false;
    });

});



$(document).ready(function(){
	$("#test123").click(function () {
		$("#hometabs").toggle("slow");
	});
	
	$(".close").click(function () {
		$("#hometabs").hide("slow");
	});

		var vormals = document.getElementById('contentbox');
		var content = vormals.innerHTML;
		vormals.innerHTML = content.replace(/##at##/g, "@");
		
		var vormals2 = document.getElementById('printheader');
		var content2 = vormals2.innerHTML;
		vormals2.innerHTML = content2.replace(/##at##/g, "@");

//		var vormals3 = document.getElementById('content1');
//		var content3 = vormals3.innerHTML;
//		vormals3.innerHTML = content3.replace(/##at##/g, "@");
		

});


