$().ready(function(){$('#of1').validate({errorPlacement: function(error, element) {if ( element.is(":text") )error.appendTo( $(element).parent().find("span.error"));else if ( element.is("select") ) error.appendTo( $(element).parent().find("span.error"));else if ( element.is(":file") ) error.appendTo( $(element).parent().find("span.error"));else if ( element.is("textarea") ) error.appendTo( $(element).parent().find("span.error"));else if ( element.is(":checkbox") ) error.appendTo( $(element).closest("li.lisub").find("span.error"));else if ( element.is(":radio") ) error.appendTo( $(element).closest("li.lisub").find("span.error"));else $(element).after(error);},rules: {"item-23": {required: true},"item-24": {required: true,number: true},"item-25": {required: true},"item-26": {required: true}}, submitHandler: function(form) {$(form).ajaxSubmit({url:"https://masshold.com.ua/index.php?route=information/form/ajax_send&form_id=1",target:'#sid-1',type:"post",beforeSubmit: function(){$('#of1 .hide-form').show();},success: function(){$('#of1 .hide-form').hide();$('#mas-1').fancybox().trigger('click');}});}});});