//  rewrite links with SSL
var sslLinks = new Array(
	"/contact/"
);

$(function(){
	protcChange();
});

//  http: or https:
function protcChange(){
	var nowUrl = location.href;
	if(nowUrl.indexOf("file://",0) == 0){
		return;
	}

	var i;
	for(i=0;i<document.links.length;i++){
	var linkStr = document.links[i].href;

		for(j=0;j<sslLinks.length;j++){
			if(linkStr.indexOf(sslLinks[j],0) >= 1){
				continue;
			}
			if(linkStr.indexOf("https://",0) == 0){
				linkStr = linkStr.replace(/https:/,"http:");
				document.links[i].href = linkStr;
			}
		}
	}
}