var TextHoroscope = {
  _q_num: 1,
  _q_total: 4,

  init: function() {
    if (typeof sc_sentinel == 'function') {
      if (!sc_sentinel({cookie_name:'TextHoroscope_completed'})) {
        return;
      }
    }
    else if (Get_Cookie('TextHoroscope_completed') == 'true') {
      return;
    }
    $('#inputzone').hide();
    $('#q1').show();
    $('#container').removeClass('imagestep1').addClass('imagestep0');
    $('#q1 .answers a, #q2 .answers a').click(function(e) {e.preventDefault(); TextHoroscope.next();});
    $('#q3 .imagesubmit, #q4 .imagesubmit').click(function(e) {e.preventDefault(); TextHoroscope.next();});
  },

  next: function() {
    if (this._q_num + 1 > this._q_total) {
      this.end();
    }
    else {
      $('#q'+this._q_num).hide();
      $('#q'+(this._q_num+1)).fadeIn('slow');
      this._q_num++;
    }
  },

  end: function() {
    $('#q'+this._q_total).hide();
    $('#inputzone').fadeIn('slow');
    $('#container').removeClass('imagestep0').addClass('imagestep1');
    Set_Cookie('TextHoroscope_completed', 'true');
  }
};

landingControlHolder['precontroller'] = TextHoroscope;