
 	
 $(document).ready(function(){
	$("div[@id=foldme]").hide();
 
 
       	     	$("div[@name=logout]").hover(
      function () {
    
         	 $(this).attr({id: "navitem2" });
   
   
       	 document.body.style.cursor='pointer';
      }, 
      function () {
             $(this).attr({id: "navitem" });
             document.body.style.cursor='auto';
      }
   );

     $("input[@title=naam").focus();
   
   
    
 
	
	
	
	  $("input:text, textarea").each(function(){
        if(this.value == '')
            this.value = this.title;
    });
    $("input:text, textarea").focus(function(){
        if(this.value == this.title)
            this.value = '';
 
            
    });
    
    $("input:text, textarea").blur(function(){
        if(this.value == '')
            this.value = this.title;
            
       });
    
    
   		$("input[@title=toegangscode]").each(function(){
        if(this.value == '') {
            this.value = this.title;
        		 $(this).attr({TYPE: "text" });
    		}
    		
    });
    $("input[@title=toegangscode]").focus(function(){
        if(this.value == this.title) {
            this.value = '';
                 $(this).attr({TYPE: "password" });
                
            
                
            }
                $("input[@title=naam").focus();
       
 
            
    });
    
    $("input[@title=toegangscode]").blur(function(){
        if(this.value == '') {
            this.value = this.title;
                 $(this).attr({TYPE: "text" });
          }
       });
    
    
    
    
    
    $("input:image, input:button").click(function(){
        $(this.form.elements).each(function(){
            if(this.type =='text' || this.type =='textarea'  ){
                if(this.value == this.title && this.title != ''){
                    this.value='';
                }
            }
        });
    });
	
	$("div[@name=logout]").attr({title: "service online" });

			$("div[@name=logout]").hover(
				function () {
					$(this).attr({id: "navitem_green" });
					document.body.style.cursor='pointer';
				}, 
				function () {
					$(this).attr({id: "navitem" });
					document.body.style.cursor='auto';
				}
			);

			
			$("div[@name=logout]").toggle(function(){
			$("div[@id=foldme]").slideDown('fast');
			},function(){
			$("div[@id=foldme]").slideUp('fast');
			});
	

	
	
});


function CS() {
/* 
//$.ajax({
	//type: "POST",
//	url: "checkServer.php",
//	data: "a=http://login.eyehear.nl",
	
//	success: function(msg){
 
		if (msg=="up" || 1==1) {
			//green
			$("div[@name=logout]").attr({title: "service online" });

			$("div[@name=logout]").hover(
				function () {
					$(this).attr({id: "navitem_green" });
					document.body.style.cursor='pointer';
				}, 
				function () {
					$(this).attr({id: "navitem" });
					document.body.style.cursor='auto';
				}
			);

			
			$("div[@name=logout]").toggle(function(){
			$("div[@id=foldme]").slideDown('fast');
			},function(){
			$("div[@id=foldme]").slideUp('fast');
			});
		
		} else {
			//red
			$("div[@name=logout]").attr({title: "service offline" });
			$("div[@name=logout]").hover(
				function () {
					$(this).attr({id: "navitem_red" });
					document.body.style.cursor='pointer';
				}, 
					function () {
					$(this).attr({id: "navitem" });
					document.body.style.cursor='auto';
				}
			);
			
			$("div[@name=logout]").click(function(){
				alert ('service offline');
			});
		}

//		}


	});
	*/
} 