var App_Form_Newsletter = qs.createObject(); App_Form_Newsletter.prototype = { options: null, hintOptions: {useWrapper: true}, from: null, initialize: function(options) { this.options = options; this.form = $('form#' + this.options.formId); if (this.options.hasBackgroundLabels) { $(this.form).defaultHint(this.hintOptions); this.hideLabels(); } }, hideLabels: function() { $('dt[id$="-label"]', this.form).each(function () { $(this).addClass('hidden'); }); }, showThanks: function() { if ($('.' + this.options.formId + '-block h3').size()) { /* cms block */ $('.' + this.options.formId + '-block h3').hide(); } else { /* side block */ $('.' + this.options.formId + '-block').prev('h3').hide(); } $('#' + this.options.formId + '-container').hide(); $('#' + this.options.formId + '-thanks').show(); qs.scrollToNode('#' + this.options.formId + '-thanks', 250); } };