$(document).ready(function(){
	/*
	$("#map").gMap({ markers: [{
        latitude: 55.8637,
        longitude: -4.2638,
        popup: false,
        icon: { image: "resources/images/layout/map_pin.png",
            iconsize: [24, 37],
            iconanchor: [10,30]}
    	}],
    zoom: 15 });
    */
	
	$('#pane').jScrollPane({ showArrows: true });
	
	$('input[type=text], textarea').each(function(){			
	    var d_value = this.value;			    
	    $(this).focus(function(){
	        if(this.value == d_value){
	            this.value = '';
	        }
	    });			    
	    $(this).blur(function(){
	    	if(this.value == ''){
	            this.value = d_value;
	        }
	    });		    
	});
		
});

function addEvent(obj, evType, fn){ 
	if (obj.addEventListener){ 
		obj.addEventListener(evType, fn, true); 
		return true; 
	}else if (obj.attachEvent){ 
		var r = obj.attachEvent("on"+evType, fn); 
		return r; 
	}else{ 
		return false; 
	} 
}

function hideFocusBorders(){
var theahrefs = document.getElementsByTagName("a");
	if (!theahrefs){return;}
		for(var x=0;x!=theahrefs.length;x++){
		theahrefs[x].onfocus = function stopLinkFocus(){this.hideFocus=true;};
	}
}

addEvent(window, 'load', hideFocusBorders);
