var GB_ANIMATION = true; $(document).ready(function(){ $("a.greybox").click(function(){ var t = this.title || $(this).text() || this.href; GB_show(t,this.href,264,272); return false; }); $.validator.setDefaults({ errorLabelContainer: null, errorClass: "textbox_error", highlight: function(element, errorClass, validClass) { if($(element).attr('id') == "TOS") { $("#table_TOS").addClass(errorClass); } else { $(element).addClass(errorClass).removeClass(validClass); } }, unhighlight: function(element, errorClass, validClass) { if($(element).attr('id') == "TOS") { $("#table_TOS").removeClass(errorClass); } else { $(element).removeClass(errorClass).addClass(validClass); } } }); $.metadata.setType("attr", "validate"); $(".form").validate({submitHandler: function(){ joinNow(); return false; }}); }); function captureEmail() { $(document).ready(function(){ $.ajax({ url: "/ajax/captureEmail.ajax.php", type: "POST", data: { email: $("#Email").val() }, dataType: "json" }); }); } $(document).ready(function(){ $("#scroller").simplyScroll({ autoMode: 'loop' }); }); function updatePromoCode() { if ($("#promocode").val() != "") { $(document).ready(function(){ $.ajax({ url: "/ajax/promocode.ajax.php", type: "POST", data: { code: $("#promocode").val() }, dataType: "json", success: function(msg) { if (msg.status == "SUCCESS") { $("#promocodeTD").html("" + msg.code + " - " + msg.description); } else { $("#promocode").addClass("textbox_error"); $("#promocode").val($("#promocode").val() + " - Invalid Code Try Again"); } } }); }); } } $(function() { // initialize scrollable $("#slider").scrollable({circular: true}).navigator().autoscroll({ steps: 1, interval: 10000 }); });