// ==UserScript==
// @name		Podnatpisi no ads
// @namespace		http://www.rulac.net/userjs/podnatpisi-no-ads/
// @description		remove ads
// @version		2.5
// @include		http://*.podnapisi.net/*
// @include		http://podnapisi.net/*
// @include		http://*.titlovi.eu/*
// @include		http://titlovi.eu/*
// @include		http://*.sub-titles.net/*
// @include		http://sub-titles.net/*
// ==/UserScript==

document.addEventListener("DOMContentLoaded", function(){
	var ad = getElementsByClass("ad", null, "div");
	for (var i = 0; i < ad.length; i++){
		removeWho(ad[i]);
	}
	var ad_frame = getElementsByClass("ad_frame", null, "div");
	for (var i = 0; i < ad_frame.length; i++){
		removeWho(ad_frame[i]);
	}
	function getElementsByClass( searchClass, domNode, tagName){ 
		if (domNode == null) domNode = document;
		if (tagName == null) tagName = '*';
		var el = new Array();
		var tags = domNode.getElementsByTagName(tagName);
		var tcl = " "+searchClass+" ";
		for(i=0,j=0; i<tags.length; i++){ 
			var test = " " + tags[i].className + " ";
			if (test.indexOf(tcl) != -1) 
				el[j++] = tags[i];
		} 
		return el;
	}
	function removeWho(who) {
		if (typeof who== 'string') who=document.getElementById(who);
		if (who && who.parentNode) who.parentNode.removeChild(who);
	}
}, false);
opera.defineMagicFunction("baseSetupAds",function(){
	// none here
});
