annoyance = document.getElementsByTagName('h3');
i = 0;
while (i<annoyance.length && annoyance[i].firstChild.nodeValue != "Eseménynaptár") i++;

var newAnchor = document.createElement("a");
newAnchor.appendChild(document.createTextNode('Eseménynaptár'));
newAnchor.href = "index.php?option=com_eventlist&view=eventlist&Itemid=3";
// annoyance[i].replaceChild(newAnchor, annoyance[i].firstChild);


function replaceImageUrls () {
	for (i=0; i < document.images.length; i++) {
		if (document.images[i].src.indexOf('http://images') != -1) {
			url = document.images[i].src.replace(/http:\//, "");
			document.images[i].src = url;
		}
	}
}

function isSearchPage() {
	res = document.URL.indexOf("searchword");
	return (res == -1) ? false : true;
}

function removeSearchExtras() {
	if (isSearchPage()) {
		annoyance = document.getElementById("searchForm");
		for (var i=29; i > 1; i--) {
			annoyance.removeChild(annoyance.childNodes[i]);	
		};	
	};
}

replaceImageUrls();
removeSearchExtras();