jQuery(document).ready(function() {
	jQuery('.hiddenAdDiv').alignToSpacer();
});

jQuery.fn.extend({
	alignToSpacer: function() {
		return this.each(function() {
			
			var spacerId = $(this).attr('id').replace('idAd', '');

			if($('#anchorAd' + spacerId).length == 1) {

				$(this).removeClass('hiddenAdDiv').find("script[src]").attr('src', '/js/gamepro/dummy.js')
				
				var e = $(this).get(0);
				e.parentNode.removeChild(e);
				$('#anchorAd' + spacerId).get(0).appendChild(e);
			
				$('#anchorAd' + spacerId).removeClass('hiddenAdAnchor');

			}
			
		});
	}
});

function setad(){}
function activateads(){}