EMPLOYERS

        
   /*form specific onload functionality*/
jQuery(document).ready(function () {
if(jQuery("#form_2_1 [name='rm_payment_method']").length>0 && jQuery("#form_2_1 [name='rm_payment_method']:checked").val()=='stripe'){jQuery('#rm_stripe_fields_container_2_1').show();}

    jQuery('[data-rm-unique="1"]').change(function(event) {
        rm_unique_field_check(jQuery(this));
    });
    
   });
                
if (typeof window['rm_multipage'] == 'undefined') {

    rm_multipage = {
        global_page_no_form_2_1: 1
    };

}
else
 rm_multipage.global_page_no_form_2_1 = 1;

function gotonext_form_2_1(){
        /* Making sure action attribute is empty */
        jQuery("form.rmagic-form").attr("action","");
        var maxpage = 1 ;
                jQuery.extend(jQuery.validator.messages, {
            required:"This field is required.",
        });
        jQuery.validator.setDefaults({errorClass: 'rm-form-field-invalid-msg',
                                        ignore:':hidden,.ignore,:not(:visible),.rm_untouched', wrapper:'div',
                                        errorPlacement: function(error, element) { 

                                                            var elementId= element.attr('id');
                                                            if(elementId){
                                                                var target_element_id= elementId.replace('-error','');
                                                                var target_element= jQuery("#" + target_element_id);
                                                                if(target_element.length>0){
                                                                    if(target_element.hasClass('rm_untouched')){
                                                                        return true;
                                                                        }
                                                                }
                                                            }
                                                                
                                                            
                                                            error.appendTo(element.closest('div'));
                                                          }
                                    });        
        
        var jq_prev_button = jQuery("#rm_prev_form_page_button_2_1");
        var jq_next_button = jQuery("#rm_next_form_page_button_2_1");
        
        var next_label = jq_next_button.data("label-next");
        var payment_method = jQuery('[name=rm_payment_method]:checked').val();
        var form_object= jQuery("#rm_form_page_form_2_1_"+rm_multipage.global_page_no_form_2_1).closest("form");
        var submit_btn= form_object.find("[type=submit]:not(.rm_noscript_btn)");
        var sub_label = submit_btn.data("label-sub");
        if(form_object.find('.rm_privacy_cb').is(':visible') && !form_object.find('.rm_privacy_cb').prop('checked')){
             form_object.find('.rm_privacy_cb').trigger('change');
             return false;
        } 
        if(typeof payment_method == 'undefined' || payment_method != 'stripe')
        {            
            elements_to_validate = jQuery("#rm_form_page_form_2_1_"+rm_multipage.global_page_no_form_2_1+" :input").not('#rm_stripe_fields_container_2_1 :input');
        }
        else
            var elements_to_validate = jQuery("#rm_form_page_form_2_1_"+rm_multipage.global_page_no_form_2_1+" :input");
        
        
        if(elements_to_validate.length > 0)
        {
            var valid = elements_to_validate.valid();  
            elements_to_validate.each(function(){
            var if_mobile= jQuery(this).attr('data-mobile-intel-field');
                if(if_mobile){
                    var tel_error= rm_toggle_tel_error(jQuery(this).intlTelInput('isValidNumber'),jQuery(this),jQuery(this).data('error-message'));
                    if(tel_error){
                        valid= false;
                    }
                    else
                    {
                        jQuery(this).val(jQuery(this).intlTelInput('getNumber'));
                    }
                }
            });

            if(!valid)
            {   
                setTimeout(function(){ submit_btn.prop('disabled',false); }, 1000);
                var error_element= jQuery(document).find("input.rm-form-field-invalid-msg")[0];
                if(error_element){
                    error_element.focus();
                }
                return false;
            }
            else{
                if(maxpage==rm_multipage.global_page_no_form_2_1){
                    return true;
                }
            }
           
        } else{
            if(maxpage==rm_multipage.global_page_no_form_2_1){
                    return true;
            }
        }
        
        /* Server validation for Username and Email field */
        for(var i=0;i=maxpage){
            submit_btn.prop('value',sub_label);
        }
        else{
            submit_btn.prop('value','Next');
        }
       
        /*skip blank form pages*/
        /*while(jQuery("#rm_form_page_form_2_1_"+rm_multipage.global_page_no_form_2_1+" :input").length == 0)
        {
            if(maxpage = maxpage){
            jq_next_button.attr("value", sub_label);
        }
	if(maxpage 0 && '1'==1){
            jq_prev_button.show();
        }
        
        if(jq_prev_button.length>0 && rm_multipage.global_page_no_form_2_1>=1){
            jq_prev_button.show();
        }
        
        if(maxpage=='1'){
            return true;
        }
        return false;
           
}
    
function gotoprev_form_2_1(){
	
	var maxpage = 1 ;
        var jq_prev_button = jQuery("#rm_prev_form_page_button_2_1");
        var jq_next_button = jQuery("#rm_next_form_page_button_2_1");
        //var sub_label = jq_next_button.data("label-sub");
        var next_label = jq_next_button.data("label-next");
        var form_object= jQuery("#rm_form_page_form_2_1_"+rm_multipage.global_page_no_form_2_1).closest("form");
        var submit_btn= form_object.find("[type=submit]:not(.rm_noscript_btn)");
        var sub_label = submit_btn.data("label-sub");
        if(form_object.find('.rm_privacy_cb').is(':visible') && !form_object.find('.rm_privacy_cb').prop('checked')){
             form_object.find('.rm_privacy_cb').trigger('change');
             return false;
        } 
	rm_multipage.global_page_no_form_2_1--;
        jq_next_button.attr('type','button');        
        
        if(maxpage==rm_multipage.global_page_no_form_2_1){
            submit_btn.prop('value',sub_label);
        }
        else{
            submit_btn.prop('value','Next');
        }
        /*skip blank form pages*/
        while(jQuery("#rm_form_page_form_2_1_"+rm_multipage.global_page_no_form_2_1+" :input,.rm-total-price ").length == 0)
        {
            if(1 >= rm_multipage.global_page_no_form_2_1)
            {
                    if(jQuery("#rm_form_page_form_2_1_"+rm_multipage.global_page_no_form_2_1+" :input,.rm-total-price ").length == 0){
                        rm_multipage.global_page_no_form_2_1 = 1;
                        //jq_prev_button.prop('disabled',true);
                        return;
                    }        
                    else
                        break;
            }
        
            rm_multipage.global_page_no_form_2_1--;
        }
        
        if(rm_multipage.global_page_no_form_2_1 <= maxpage-1)
            jq_next_button.attr("value", next_label);
            
	jQuery(".rmformpage_form_2_1").each(function (){
		var visibledivid = "rm_form_page_form_2_1_"+rm_multipage.global_page_no_form_2_1;
		if(jQuery(this).attr('id') == visibledivid){
			jQuery(this).show();
                }
		else
			jQuery(this).hide();
	});
        jQuery('.rmformpage_form_2_1').find(':input').filter(':visible').eq(0).focus();
        if(rm_multipage.global_page_no_form_2_1 <= 1)
        {
            rm_multipage.global_page_no_form_2_1 = 1;
           // jq_prev_button.prop('disabled',true);
        }
        jQuery('html, body').animate({
            scrollTop: (jQuery('.rmformpage_form_2_1').first().offset().top)
        },500);
        
        if(rm_multipage.global_page_no_form_2_1==1){
            jq_prev_button.hide();
        }
}
         

    
    
    var players = [];
    function onYouTubePlayerAPIReady() {
        // create the global player from the specific iframe (#video)
        var pre_id = '';
        jQuery(".allow-autoplay").each(function(){
            if(pre_id!=jQuery(this).attr("id")){
                players.push(new YT.Player(jQuery(this).attr("id")));
            }
            pre_id = jQuery(this).attr("id");
        });
    }
    jQuery(document).ready(function(){
        var videosArr = [];
        var pre_id = '';
        jQuery(".allow-autoplay").each(function(i){
            if(pre_id!=jQuery(this).attr("id")){
                videosArr[jQuery(this).attr("id")] = i;
            }
            pre_id = jQuery(this).attr("id");
        });
        jQuery('.buttonarea input').click(function(){
            setTimeout(function(){
                jQuery(".rmformpage_form_2_1").each(function(){
                    if(jQuery(this).css('display')=='block'){
                        var page_video_id= jQuery(this).attr("id");
                        if(jQuery('#'+page_video_id+' .allow-autoplay').length){
                            players[videosArr[jQuery('#'+page_video_id+' .allow-autoplay').attr('id')]].playVideo();
                        }
                    }
                });
            }, 300);
        });
    });
     
   

Note: It looks like JavaScript is disabled in your browser. Some elements of this form may require JavaScript to work properly. If you have trouble submitting the form, try enabling JavaScript momentarily and resubmit. JavaScript settings are usually found in Browser Settings or Browser Developer menu.