


           $(function() {
                $('nav a').bind('click',function(event){
                    var $anchor = $(this);
                    $('html, body').stop().animate({
                        scrollTop: $($anchor.attr('href')).offset().top
                    }, 1500,'easeInOutExpo');
				
				//document.getElementById('tracer').innerHTML = "anchor " + $(this);
				
                    event.preventDefault();
                });
            });
		  
		   $(function() {
                $('#right a').bind('click',function(event){
                    var $anchor = $(this);
                    $('html, body').stop().animate({
                        scrollTop: $($anchor.attr('href')).offset().top
                    }, 1500,'easeInOutExpo');
				
				//document.getElementById('tracer').innerHTML = "anchor " + $(this);
				
                    event.preventDefault();
                });
            });
		  
		  
		  window.onscroll = function () {
		    var height = $(window).height();
		    var scrollTop = $(window).scrollTop();
		    var obj = $("#page-2")
		    var pos = obj.position();
		   // document.getElementById('tracer').innerHTML = " height " + height + "+" + " scrollTop " + scrollTop + " = " + Number(height + scrollTop) + " > " + " pos.top " + pos.top; 	
		   
		   //document.getElementById('tracer').innerHTML = scrollTop;
		   
		    if (scrollTop > pos.top && scrollTop < Number(4000)) {
			  //$("#menu-right").show(); 
			  document.getElementById("menu-right").style.opacity = 1 
			  
			  
		    }
		    else {
			 document.getElementById("menu-right").style.opacity = 0 
			 
		    }
		}
		  
		function clearText(field){
		    if (field.defaultValue == field.value) field.value = '';
		    else if (field.value == '') field.value = field.defaultValue;
		
		}
		  
	
