"); } }else{ jQuery("#TB_ajaxContent")[0].style.width = ajaxContentW +"px"; jQuery("#TB_ajaxContent")[0].style.height = ajaxContentH +"px"; jQuery("#TB_ajaxContent")[0].scrollTop = 0; jQuery("#TB_ajaxWindowTitle").html(caption); } } jQuery("#TB_closeWindowButton").on( 'click', tb_remove ); if(url.indexOf('TB_inline') != -1){ jQuery("#TB_ajaxContent").append(jQuery('#' + params['inlineId']).children()); jQuery("#TB_window").on('tb_unload', function () { jQuery('#' + params['inlineId']).append( jQuery("#TB_ajaxContent").children() ); }); tb_position(); jQuery("#TB_load").remove(); jQuery("#TB_window").css({'visibility':'visible'}); }else if(url.indexOf('TB_iframe') != -1){ tb_position(); jQuery("#TB_load").remove(); jQuery("#TB_window").css({'visibility':'visible'}); }else{ var load_url = url; load_url += -1 === url.indexOf('?') ? '?' : '&'; jQuery("#TB_ajaxContent").load(load_url += "random=" + (new Date().getTime()),function(){ tb_position(); jQuery("#TB_load").remove(); tb_init("#TB_ajaxContent a.thickbox"); jQuery("#TB_window").css({'visibility':'visible'}); }); } } if(!params['modal']){ jQuery(document).on('keydown.thickbox', function(e){ if ( e.which == 27 ){ tb_remove(); return false; } }); } $closeBtn = jQuery( '#TB_closeWindowButton' ); if ( $closeBtn.find( '.tb-close-icon' ).is( ':visible' ) ) { $closeBtn.trigger( 'focus' ); } } catch(e) { } } function tb_showIframe(){ jQuery("#TB_load").remove(); jQuery("#TB_window").css({'visibility':'visible'}).trigger( 'thickbox:iframe:loaded' ); } function tb_remove() { jQuery("#TB_imageOff").off("click"); jQuery("#TB_closeWindowButton").off("click"); jQuery( '#TB_window' ).fadeOut( 'fast', function() { jQuery( '#TB_window, #TB_overlay, #TB_HideSelect' ).trigger( 'tb_unload' ).off().remove(); jQuery( 'body' ).trigger( 'thickbox:removed' ); }); jQuery( 'body' ).removeClass( 'modal-open' ); jQuery("#TB_load").remove(); if (typeof document.body.style.maxHeight == "undefined") { jQuery("body","html").css({height: "auto", width: "auto"}); jQuery("html").css("overflow",""); } jQuery(document).off('.thickbox'); return false; } function tb_position() { var isIE6 = typeof document.body.style.maxHeight === "undefined"; jQuery("#TB_window").css({marginLeft: '-' + parseInt((TB_WIDTH / 2),10) + 'px', width: TB_WIDTH + 'px'}); if ( ! isIE6 ) { jQuery("#TB_window").css({marginTop: '-' + parseInt((TB_HEIGHT / 2),10) + 'px'}); } } function tb_parseQuery ( query ) { var Params = {}; if ( ! query ) {return Params;} var Pairs = query.split(/[;&]/); for ( var i = 0; i < Pairs.length; i++ ) { var KeyVal = Pairs[i].split('='); if ( ! KeyVal || KeyVal.length != 2 ) {continue;} var key = unescape( KeyVal[0] ); var val = unescape( KeyVal[1] ); val = val.replace(/\+/g, ' '); Params[key] = val; } return Params; } function tb_getPageSize(){ var de = document.documentElement; var w = window.innerWidth || self.innerWidth || (de&&de.clientWidth) || document.body.clientWidth; var h = window.innerHeight || self.innerHeight || (de&&de.clientHeight) || document.body.clientHeight; arrayPageSize = [w,h]; return arrayPageSize; } function tb_detectMacXFF() { var userAgent = navigator.userAgent.toLowerCase(); if (userAgent.indexOf('mac') != -1 && userAgent.indexOf('firefox')!=-1) { return true; } } !function(){function t(){}var n=this,r=n._,e=Array.prototype,o=Object.prototype,u=Function.prototype,i=e.push,c=e.slice,l=o.toString,a=o.hasOwnProperty,f=Array.isArray,s=Object.keys,p=u.bind,h=Object.create,v=function(n){return n instanceof v?n:this instanceof v?void(this._wrapped=n):new v(n)};"undefined"!=typeof exports?(exports="undefined"!=typeof module&&module.exports?module.exports=v:exports)._=v:n._=v,v.VERSION="1.8.3";var y=function(u,i,n){if(void 0===i)return u;switch(null==n?3:n){case 1:return function(n){return u.call(i,n)};case 2:return function(n,t){return u.call(i,n,t)};case 3:return function(n,t,r){return u.call(i,n,t,r)};case 4:return function(n,t,r,e){return u.call(i,n,t,r,e)}}return function(){return u.apply(i,arguments)}},d=function(n,t,r){return null==n?v.identity:v.isFunction(n)?y(n,t,r):v.isObject(n)?v.matcher(n):v.property(n)};v.iteratee=function(n,t){return d(n,t,1/0)};function g(n){return v.isObject(n)?h?h(n):(t.prototype=n,n=new t,t.prototype=null,n):{}}var m=function(c,f){return function(n){var t=arguments.length;if(t<2||null==n)return n;for(var r=1;r<=n&&n<=x};function w(a){return function(n,t,r,e){t=y(t,e,4);var u=!j(n)&&v.keys(n),i=(u||n).length,o=0<3&&(r=n[u?u[o]:o],o+=a),function(n,t,r,e,u,i){for(;0<=u&&u<=(r=o(c.call(n,e,u),v.isNaN))?r+e:-1;for(r=0<=r&&r<1)return t.apply(this,arguments)}},v.before=function(n,t){var r;return function(){return 0<--n&&(r=t.apply(this,arguments)),n<=1&&(t=null),r}},v.once=v.partial(v.before,2);var S=!{toString:null}.propertyIsEnumerable("toString"),E=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"];function M(n,t){var r=E.length,e=n.constructor,u=v.isFunction(e)&&e.prototype||o,i="constructor";for(v.has(n,i)&&!v.contains(t,i)&&t.push(i);r--;)(i=E[r])in n&&n[i]!==u[i]&&!v.contains(t,i)&&t.push(i)}v.keys=function(n){if(!v.isObject(n))return[];if(s)return s(n);var t,r=[];for(t in n)v.has(n,t)&&r.push(t);return S&&M(n,r),r},v.allKeys=function(n){if(!v.isObject(n))return[];var t,r=[];for(t in n)r.push(t);return S&&M(n,r),r},v.values=function(n){for(var t=v.keys(n),r=t.length,e=Array(r),u=0;u":">",'"':""","'":"'","`":"`"},f=v.invert(m),b=function(t){function r(n){return t[n]}var n="(?:"+v.keys(t).join("|")+")",e=RegExp(n),u=RegExp(n,"g");return function(n){return n=null==n?"":""+n,e.test(n)?n.replace(u,r):n}};v.escape=b(m),v.unescape=b(f),v.result=function(n,t,r){t=null==n?void 0:n[t];return void 0===t&&(t=r),v.isFunction(t)?t.call(n):t};var N=0;v.uniqueId=function(n){var t=++N+"";return n?n+t:t},v.templateSettings={evaluate://g,interpolate://g,escape://g};function B(n){return"\\"+R[n]}var T=/(.)^/,R={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},q=/\\|'|\r|\n|\u2028|\u2029/g;v.template=function(i,n,t){!n&&t&&(n=t),n=v.defaults({},n,v.templateSettings);var r=RegExp([(n.escape||T).source,(n.interpolate||T).source,(n.evaluate||T).source].join("|")+"|$","g"),o=0,a="__p+='";i.replace(r,function(n,t,r,e,u){return a+=i.slice(o,u).replace(q,B),o=u+n.length,t?a+="'+\n((__t=("+t+"))==null?'':_.escape(__t))+\n'":r?a+="'+\n((__t=("+r+"))==null?'':__t)+\n'":e&&(a+="';\n"+e+"\n__p+='"),n}),a+="';\n",a="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+(a=!n.variable?"with(obj||{}){\n"+a+"}\n":a)+"return __p;\n";try{var e=new Function(n.variable||"obj","_",a)}catch(n){throw n.source=a,n}t=function(n){return e.call(this,n,v)},r=n.variable||"obj";return t.source="function("+r+"){\n"+a+"}",t},v.chain=function(n){n=v(n);return n._chain=!0,n};function K(n,t){return n._chain?v(t).chain():t}v.mixin=function(r){v.each(v.functions(r),function(n){var t=v[n]=r[n];v.prototype[n]=function(){var n=[this._wrapped];return i.apply(n,arguments),K(this,t.apply(v,n))}})},v.mixin(v),v.each(["pop","push","reverse","shift","sort","splice","unshift"],function(t){var r=e[t];v.prototype[t]=function(){var n=this._wrapped;return r.apply(n,arguments),"shift"!==t&&"splice"!==t||0!==n.length||delete n[0],K(this,n)}}),v.each(["concat","join","slice"],function(n){var t=e[n];v.prototype[n]=function(){return K(this,t.apply(this._wrapped,arguments))}}),v.prototype.value=function(){return this._wrapped},v.prototype.valueOf=v.prototype.toJSON=v.prototype.value,v.prototype.toString=function(){return""+this._wrapped},"function"==typeof define&&define.amd&&define("underscore",[],function(){return v})}.call(this); window.wp=window.wp||{},wp.shortcode={next:function(t,e,n){var s=wp.shortcode.regexp(t);if(s.lastIndex=n||0,n=s.exec(e))return"["===n[1]&&"]"===n[7]?wp.shortcode.next(t,e,s.lastIndex):(s={index:n.index,content:n[0],shortcode:wp.shortcode.fromMatch(n)},n[1]&&(s.content=s.content.slice(1),s.index++),n[7]&&(s.content=s.content.slice(0,-1)),s)},replace:function(t,e,h){return e.replace(wp.shortcode.regexp(t),function(t,e,n,s,r,o,i,c){if("["===e&&"]"===c)return t;var a=h(wp.shortcode.fromMatch(arguments));return a?e+a+c:t})},string:function(t){return new wp.shortcode(t).string()},regexp:_.memoize(function(t){return new RegExp("\\[(\\[?)("+t+")(?![\\w-])([^\\]\\/]*(?:\\/(?!\\])[^\\]\\/]*)*?)(?:(\\/)\\]|\\](?:([^\\[]*(?:\\[(?!\\/\\2\\])[^\\[]*)*)(\\[\\/\\2\\]))?)(\\]?)","g")}),attrs:_.memoize(function(t){var e,n={},s=[],r=/([\w-]+)\s*=\s*"([^"]*)"(?:\s|$)|([\w-]+)\s*=\s*'([^']*)'(?:\s|$)|([\w-]+)\s*=\s*([^\s'"]+)(?:\s|$)|"([^"]*)"(?:\s|$)|'([^']*)'(?:\s|$)|(\S+)(?:\s|$)/g;for(t=t.replace(/[\u00a0\u200b]/g," ");e=r.exec(t);)e[1]?n[e[1].toLowerCase()]=e[2]:e[3]?n[e[3].toLowerCase()]=e[4]:e[5]?n[e[5].toLowerCase()]=e[6]:e[7]?s.push(e[7]):e[8]?s.push(e[8]):e[9]&&s.push(e[9]);return{named:n,numeric:s}}),fromMatch:function(t){var e=t[4]?"self-closing":t[6]?"closed":"single";return new wp.shortcode({tag:t[2],attrs:t[3],type:e,content:t[5]})}},wp.shortcode=_.extend(function(t){_.extend(this,_.pick(t||{},"tag","attrs","type","content"));var e=this.attrs;this.attrs={named:{},numeric:[]},e&&(_.isString(e)?this.attrs=wp.shortcode.attrs(e):0===_.difference(_.keys(e),["named","numeric"]).length?this.attrs=_.defaults(e,this.attrs):_.each(t.attrs,function(t,e){this.set(e,t)},this))},wp.shortcode),_.extend(wp.shortcode.prototype,{get:function(t){return this.attrs[_.isNumber(t)?"numeric":"named"][t]},set:function(t,e){return this.attrs[_.isNumber(t)?"numeric":"named"][t]=e,this},string:function(){var n="["+this.tag;return _.each(this.attrs.numeric,function(t){/\s/.test(t)?n+=' "'+t+'"':n+=" "+t}),_.each(this.attrs.named,function(t,e){n+=" "+e+'="'+t+'"'}),"single"===this.type?n+"]":"self-closing"===this.type?n+" /]":(n+="]",this.content&&(n+=this.content),n+"[/"+this.tag+"]")}}),wp.html=_.extend(wp.html||{},{attrs:function(t){var e;return"/"===t[t.length-1]&&(t=t.slice(0,-1)),t=wp.shortcode.attrs(t),e=t.named,_.each(t.numeric,function(t){/\s/.test(t)||(e[t]="")}),e},string:function(t){var n="<"+t.tag,e=t.content||"";return _.each(t.attrs,function(t,e){n+=" "+e,_.isBoolean(t)&&(t=t?"true":"false"),n+='="'+t+'"'}),t.single?n+" />":(n+=">",(n+=_.isObject(e)?wp.html.string(e):e)+"")}}); window.send_to_editor=function(t){var e,i="undefined"!=typeof tinymce,n="undefined"!=typeof QTags;if(wpActiveEditor)i&&(e=tinymce.get(wpActiveEditor));else if(i&&tinymce.activeEditor)e=tinymce.activeEditor,window.wpActiveEditor=e.id;else if(!n)return!1;if(e&&!e.isHidden()?e.execCommand("mceInsertContent",!1,t):n?QTags.insertContent(t):document.getElementById(wpActiveEditor).value+=t,window.tb_remove)try{window.tb_remove()}catch(t){}},function(d){window.tb_position=function(){var t=d("#TB_window"),e=d(window).width(),i=d(window).height(),n=833 0) { jQuery('tr.found').hide(); } else { jQuery('tr.found').show(); } return true; }); jQuery('input[name=primary_insurance]').bind('change',function(){ v = jQuery('input[name=primary_insurance]:checked').val(); if (v > 0) { jQuery('tr.primaryins').hide(); } else { jQuery('tr.primaryins').show(); } return true; }); jQuery('input[name=secondary_insurance]').bind('change',function(){ v = jQuery('input[name=secondary_insurance]:checked').val(); if (v > 0) { jQuery('tr.secondaryins').hide(); } else { jQuery('tr.secondaryins').show(); } return true; }); jQuery('input[name=field_accept_cc]').bind('change',function(){ v = jQuery('input[name=field_accept_cc]:checked').val(); if (v > 0) { jQuery('tr.creditcards').hide(); } else { } return true; }); jQuery('input[name=field_accept_carecredit]').bind('change',function(){ v = jQuery('input[name=field_accept_carecredit]:checked').val(); if (v > 0) { jQuery('tr.carecredit').hide(); } else { jQuery('tr.carecredit').show(); } return true; }); jQuery('.individual_fields_checkbox').change( function(){ checked = jQuery(this).attr('checked'); name = jQuery(this).val(); if (checked) { jQuery('tbody#'+name).show(); } else { jQuery('tbody#'+name).hide(); } } ); jQuery('.multifield_header input[type=radio], .submodule input[type=radio]').bind('change',function() { change_multihead(); }); jQuery('.custom_text').change( function(){ if (jQuery(this).val()) { jQuery(this).parent().parent().find('input[type=radio][value=0]').trigger('click'); } else { jQuery(this).parent().parent().find('input[type=radio][value=1]').trigger('click'); } } ); jQuery('body.toplevel_page_patient_form_settings div.wrap div.icon32 + h2, body.patient-forms_page_patient_forms_top div.wrap div.icon32 + h2, body.patient-forms_page_patient_form_pdf_options div.wrap div.icon32 + h2').prependTo('#wpbody-content'); jQuery('body.toplevel_page_patient_form_settings div.wrap div#icon-bpi-patient-forms, body.patient-forms_page_patient_forms_top div.wrap div#icon-bpi-patient-forms, body.patient-forms_page_patient_form_pdf_options div.wrap div#icon-bpi-patient-forms').prependTo('#wpbody-content'); jQuery('#patient_search #clear_search').click( function() { } ); jQuery('#custom_info_sections').change( function(){ custom_info_sections_change() } ); custom_info_sections_change(); change_multihead(); module_change(); }); function custom_info_sections_change(){ jQuery('.custom_info_section').hide(); for (i=0; i<=jQuery('#custom_info_sections').val();i++) { jQuery('#custom_info_section_'+i).show(); } } function module_change() { jQuery('tr.module input[type=radio], tr.module input[type=checkbox]').each(function(){	if (jQuery(this).attr('name')) { n=jQuery(this).attr('name'); } else if (jQuery(this).attr('id')) { n=jQuery(this).attr('id'); } n=n.replace(/_fields$/); v = jQuery('tr.module input[name='+n+']:checked').val(); c = jQuery('input[type=checkbox][value='+n+']:checked').length; if (v > 0 || !c) { jQuery('tr.'+n).hide(); } else { jQuery('tr.'+n).show(); } }); return true; } function change_multihead() { jQuery('.multifield_header, .submodule').each(function(){ which = jQuery(this).find('input[type=radio]').first().attr('name'); val = jQuery('input[name='+which+'][type=radio]:checked').val(); if (val == 1) { jQuery('tr.'+which).hide(); } else { jQuery('tr.'+which).show(); } }); } var BPForms = {}; BPForms.ajax = { request: function(action, data, callback) { var url = '/wp-admin/admin-ajax.php'; if (typeof ajaxurl !== 'undefined') { url = ajaxurl; } if (typeof ajax_url !== 'undefined') { url = ajax_url; } var params = {}; if (data && typeof data === 'object') { params = data; } params.action = action; var formData = new FormData(); for (var i in params) { formData.append(i, params[i]); } jQuery.ajax({ url: url, type: 'POST', data: formData, success: callback, cache: false, contentType: false, processData: false }); }, post: function(action, formData, callback) { var self = this; jQuery.ajax({ url: '/wp-admin/admin-ajax.php', type: 'POST', data: formData, success: callback, cache: false, contentType: false, processData: false }); }, }; BPForms.getParams = function() { var str = window.location.search; var objURL = {}; var regExp = /([^?=&]+)(=([^&]*))?/g; str.replace(regExp, function(a, b, c, d) { objURL[b] = d; }); return objURL; }; BPForms.fillPDFViewer = function() { var queryString = this.getParams(); var label = document.getElementById('bp-form-viewer-name'); var obj = document.getElementById('bp-form-viewer'); var frame = obj.children[0]; var params = { id: queryString.id }; this.ajax.request('bp_forms_get_form', params, function(data) { data = JSON.parse(data); label.textContent = data.name; var url = '/wp-content/uploads/bp-forms/' + data.path; obj.data = url; }); }; BPForms.markAsRead = function(id) { var params = { id: id }; this.ajax.request('bpforms_fr_markread', params, function(data) { }); }; (function(r,G,f,v){var J=f("html"),n=f(r),p=f(G),b=f.fancybox=function(){b.open.apply(this,arguments)},I=navigator.userAgent.match(/msie/i),B=null,s=G.createTouch!==v,t=function(a){return a&&a.hasOwnProperty&&a instanceof f},q=function(a){return a&&"string"===f.type(a)},E=function(a){return q(a)&&0