// Place your application-specific JavaScript functions and classes here
// This file is automatically included by javascript_include_tag :defaults

// Global behaviour

var application_controller = new ApplicationController;

$(document).ready(function() {

  $("#ie-blocker").slideDown('slow');
  
  $('.close-ie-blocker').click(function() {
    $("#ie-blocker").slideUp();
    return false;
  });
  
});

// AdLocation model

function ApplicationController() {
  
  this.setup_wait_page = function(redirect_url) {
    
    $(function() {
      
      if ($(".ad_location.wait_page").size() > 0) {
        setTimeout(function() {
          window.location = redirect_url;
        }, 5000);
      } else {
        window.location = redirect_url;
      }
      
    });
    
  };
  
};
