function showPoll() {
  document.getElementById('poll-options').innerHTML = document.getElementById('poll-options-temp').innerHTML;
  if (Element.visible('poll-options')) {
    new Effect.Opacity('poll-options', {duration:0.5, from:0.1, to:1.0});
  }
  else {
    new Effect.Appear('poll-options', {duration:0.5});
  }
}


function changePoll(content) {
  document.getElementById('poll-options-temp').innerHTML = content;
  if (Element.visible('poll-options')) {
    new Effect.Opacity('poll-options', {duration:0.5, from:1.0, to:0.1});
  }
  window.setTimeout('showPoll()',1500);
}

(function($) {
	jQuery.fn.extend({
		showInterstitial: function(options) {
		    var blockingCookiePair = 'interstitial=true';
		    // Was already shown today (in this browser session)
		    if (options.blocking_cookie && document.cookie.indexOf(blockingCookiePair) > -1) {
		        return;
		    }
		    $('#adblock-interstitial-skip a').click(function() {
		        $().closeInterstitial();
		        return false;
		    });
		    if (options.timeout) {
		        setTimeout(function() {$().closeInterstitial()}, options.timeout * 1000);
		    }
		    $('body').addClass('interstitial');
		    if (options.blocking_cookie) {
		        document.cookie = blockingCookiePair;
		    }
		},
		closeInterstitial: function() {
		    $('body').removeClass('interstitial');
		},
		showStickyLeaderboard: function() {
			var lb = $('#adblock-leaderboard');
			lb.addClass('sticky');
                                                  $('#web').css('margin-top',lb.height());
		},
		closeStickyLeaderboard: function() {
		    $('#adblock-leaderboard.sticky').removeClass('sticky');
                                     $('#web').css('margin-top','0');
		},
		showStickySkyscraper: function() {
		},
		setHeightLeaderboard: function() {
		}
	});
})(jQuery);