diff --git a/jquery-ptlinked_plugin.js b/jquery-ptlinked_plugin.js
index ac019c9..17c265e 100644
--- a/jquery-ptlinked_plugin.js
+++ b/jquery-ptlinked_plugin.js
@@ -2225,7 +2225,7 @@
results_container_html += ' Save ' ;
}
if( !options["training_mode"] && options["secure_messaging"] && ( options["user_type"] == "physician" || options["user_type"] == "staff" ) ) {
- results_container_html += ' Send ' ;
+ results_container_html += ' Send ' ;
}
results_container_html += '' +
'' +
@@ -2235,7 +2235,7 @@
results_container_html += ' Save ' ;
}
if( !options["training_mode"] && options["secure_messaging"] && ( options["user_type"] == "physician" || options["user_type"] == "staff" ) ) {
- results_container_html += 'Send ' ;
+ results_container_html += 'Send ' ;
}
results_container_html += '' +
'
' +
diff --git a/jquery-ptlinked_plugin.min.js b/jquery-ptlinked_plugin.min.js
index 93931e9..a75782b 100644
--- a/jquery-ptlinked_plugin.min.js
+++ b/jquery-ptlinked_plugin.min.js
@@ -1 +1 @@
-!function(W){var U="ptlinkedLibrary";function r(e,u){var s=e,t=W(e);u=W.extend({},W.fn[U].defaults,u);var a,i,l=0,o={},n=500,h={},r={},d=!1,c=!0,p=!1,m=0,g=25,f=0,v="",_=!1,b={};function y(){var e=u.api_root_url+"/predesigned/bodyregions/html";G()&&(e=u.api_root_url+"/predesigned/bodyregions/html2"),W.ajax({type:"GET",url:e,crossDomain:!0,headers:{"token-authorization-x":u.api_key,"ptlinked-uid-x":u.user_uid,"ptlinked-utype-x":u.user_type},dataType:"json",error:function(e,i,s){u.debug_mode&&(console.log("::::: Load Categories AJAX :::::"),console.log("Request Error or Timeout"),console.log("Status Code: "+e.status),console.log("Status Msg: "+e.statusText),console.log("Response Msg: "+e.responseText),console.log("::::: ===== ===== ===== ===== :::::")),_=!0,X("predesigned--sys_error","CAT"+e.status+" - "+e.statusText)},success:function(e,i,s){var v,t,r;G()?(v=W("#predesigned_filters--bodyregion-mobile"),W.each(e,function(e,i){v.append(i)}),t=u.assets_cdn+"bodyregion_highlights/bodyregion--empty.png",W(".ptlinked--m_bodyregion_highlight").find("img").attr("src",t),W(".ptlinked--m_bodyregion_highlight").find(".highlight-label").html("All Programs"),W(".ptlinked--m_bodyregion_highlight").show(),v.select2(),v.unbind("select2:select").on("select2:select",function(e){var i=W("#predesigned_filters--bodyregion-mobile").val(),s=W("#predesigned_filters--bodyregion-mobile").find(":selected").data("customcat");0Type');for(var c,p=0;p'+d[p].title+"";W("#predesigned_filters--types-mobile").append(g)}W("#predesigned_filters--types-mobile").select2(),0==i&&A(a,"","bodyregion","remove"),w("c",i),w("c1",s),n=0 View All '),a.html("Type "),W.each(e.types,function(e,i){s.append(i),a.append(i)});var n=W("ul.filter--item_list li");a.select2(),n.unbind("click").on("click",function(){var e=W(this).data("oid"),i=W(this).data("filter_label"),s=W(this).data("filter_type"),t=W("#selected_bodyregion_id").val(),r=b[t].title;A(h.c,"","bodyregion","remove"),W("ul.category-bubbles-list li").removeClass("active-filter"),A(t,r,"bodyregion","add"),W("ul.category-bubbles-list li[data-oid='"+t+"'][data-customcat='0']").addClass("active-filter"),h.c=t,0Filter by condition"),a.html("Condition "),W.each(e,function(e,i){s.append(i),a.append(i)}),e.length<1||0==e?W("#predesigned_filters--conditions-mobile").prop("disabled",!0):W("#predesigned_filters--conditions-mobile").prop("disabled",!1),s.select2(),a.select2(),s.unbind("select2:select").on("select2:select",function(e){var i=W("#filter--condition_type").val(),s=W("#filter--condition_type").select2().find(":selected").data("title"),t=W("#filter--condition_type").select2().find(":selected").data("type"),r=W("#selected_bodyregion_id").val(),a=W(".ptlinked--dropdown_bodyregion_highlight").find(".highlight-label").html();A(h.c,"","bodyregion","remove"),W("ul.category-bubbles-list li").removeClass("active-filter"),A(r,a,"bodyregion","add"),W("ul.category-bubbles-list li[data-oid='"+r+"'][data-customcat='0']").addClass("active-filter"),h.c=r,m=(void 0!==h.f4?h.f4!=i?(W(".clear-condition-filters").hasClass("hide")&&W(".clear-condition-filters").removeClass("hide"),A(h.f4=i,s,t,"add"),W("ul.filter--item_list li").removeClass("selected"),W("ul.filter--item_list").find("li[data-oid=1]").addClass("selected"),A(h.f1,"","type","remove"),h.f1=1):(W("ul.filter--item_list li").removeClass("selected"),0Filter by sub-category"),t.html("Filter by sub-category "),W.each(e,function(e,i){s.append(i),t.append(i)}),s.select2(),t.select2(),s.on("select2:select",function(e){var i=W("#predesigned_filters--subcategories").val();h.c1=i,r.hasClass("open")&&r.removeClass("open"),m=0,E()}),t.on("select2:select",function(e){var i=W("#predesigned_filters--subcategories-mobile").val();h.c1=i,m=0,E(),a.hasClass("opened")&&a.removeClass("opened");var s=t.parent().parent().find(".mobile-filter--clear");1==i?s.hasClass("active")&&s.removeClass("active"):s.hasClass("active")||s.addClass("active")}),void 0!==h.c1&&1Type');for(var s=0;s'+i[s].title+"";W("#predesigned_filters--types-mobile").append(t)}W("#predesigned_filters--types-mobile").select2(),W("#predesigned_filters--types-mobile").parent().parent().find(".mobile-filter--clear").hasClass("active")&&W("#predesigned_filters--types-mobile").parent().parent().find(".mobile-filter--clear").removeClass("active")}W("#predesigned_filters--conditions").val(0).trigger("change"),void 0!==h.f4&&0Type');for(s=0;s'+i[s].title+"";W("#predesigned_filters--types-mobile").append(t)}W("#predesigned_filters--types-mobile").select2(),W("#predesigned_filters--types-mobile").parent().parent().find(".mobile-filter--clear").hasClass("active")&&W("#predesigned_filters--types-mobile").parent().parent().find(".mobile-filter--clear").removeClass("active"),W("#predesigned_filters--conditions").val(0).trigger("change"),W("#predesigned_filters--conditions-mobile").val(0).trigger("change"),W("#predesigned_filters--conditions-mobile").parent().parent().find(".mobile-filter--clear").hasClass("active")&&W("#predesigned_filters--conditions-mobile").parent().parent().find(".mobile-filter--clear").removeClass("active"),W("#predesigned_filters--subcategories").val(0).trigger("change"),W("#predesigned_filters--subcategories-mobile").val(0).trigger("change"),W("#predesigned_filters--subcategories-mobile").parent().parent().find(".mobile-filter--clear").hasClass("active")&&W("#predesigned_filters--subcategories-mobile").parent().parent().find(".mobile-filter--clear").removeClass("active")}}function R(){var e=W(".grid-filter--drop_down");W("ul.mobile-filter-panel_list");0'+t.bodyregion.title+' ',i.append(e),s.append(e)),void 0!==t.type.oid&&(e=''+t.type.title+' ',i.append(e),s.append(e)),void 0!==t.condition.oid&&(e=''+t.condition.title+' ',i.append(e),s.append(e)),W("ul.predesigned--filter_crumbtrail li.service-bubble span.remove_filter").unbind("click").on("click",j),W("ul.mobile-predesigned--filter_crumbtrail li.service-bubble span.remove_filter").unbind("click").on("click",j)}function j(){var e=W(this).parent().data("oid"),i=W(this).parent().data("type");switch(i){case"bodyregion":h.c=0,h.c1=0,1==h.f1&&(P(h.f4,"condition"),h.f4=0,P(1,"type"),h.f1=0);break;case"type":h.f1=0,1==h.f1&&(P(h.f4,"condition"),h.f4=0,P(1,"type"),h.f1=0);break;case"condition":P(h.f4,"condition"),h.f4=0,P(1,"type"),h.f1=0}P(e,i),M(),L(),E()}function E(){D(),function(){var e=!1,i=!1;"none"!=W(".mobile-filter-panel").css("display")&&(i=!0),void 0!==h.f1&&0
')}(),I(t.total_returned,t.total_records),p=!1},200),0==m&&W(".ptlinked--application_container > .scroll-on-hover").scrollTop(0),W(".cards--grid_container_item").not(".cards--grid_placeholder").unbind("click").on("click",F),-1==h.c&&W(".cards--grid_container_item .btn-remove-favorite").unbind("click").on("click",function(e){e.stopPropagation();e=W(this).data("exercise_program_id");W("#ptlinked--dialog-message").data("exercise_program_id",e),H("Are you sure?","This action cannot be undone. Are you sure you want to remove this favorite exercise program?","Yes, Remove",z)}),R(),T(e.conditions),S(e.subcategories),_||X("predesigned--results_display")):201==s&&(I(0,0),R(),T(e.conditions),S(e.subcategories),_||X("predesigned--no_results_display"),p=!1)}}))}function z(){var e=u.api_root_url+"/users/remove_favorite",i=W("#ptlinked--dialog-message").data("exercise_program_id");W.ajax({type:"POST",crossDomain:!0,headers:{"token-authorization-x":u.api_key,"ptlinked-uid-x":u.user_uid,"ptlinked-utype-x":u.user_type},url:e,data:{exercise_program_id:i},dataType:"json",error:function(e,i,s){u.debug_mode&&(console.log("::::: Remove Favorite Program AJAX :::::"),console.log("Request Error or Timeout"),console.log("Status Code: "+e.status),console.log("Status Msg: "+e.statusText),console.log("Response Msg: "+e.responseText),console.log("::::: ===== ===== ===== ===== :::::")),_=!0,X("predesigned--sys_error","USR"+e.status+" - "+e.statusText)},success:function(e,i,s){s=s.status;200==s?D():201==s&&H("Error","There was an error trying to remove the exercise program. Please refresh and try again.")}})}function F(e){var i=W(this).data("epid"),s=W(this).data("code"),t=W(this).find(".cards--program_title").text();0').append(function(){var e="";"mdvip"==u.category_slider_style&&(e="mdvip");return''}()).append(''),t.find(".cards--grid_renderer").prepend(''),$bel=W("body"),$bel.append(function(){var e="";"modal"==u.exercise_program_viewer&&(e="mdvip-modal");var i="";i='',i+='
'}()),$bel.append('Hip
'),$bel.append("bootstrap"==u.dialog_box_type?'':''),$bel.append('Hip
View By Condition
Select a condition or diagnosis here ')}function X(e,i){"predesigned--results_display"==e?(W(".info-box-item").hasClass("active")&&W(".info-box-item").removeClass("active"),W("#predesigned--results_display").hasClass("display_info_box")&&W("#predesigned--results_display").removeClass("display_info_box")):("predesigned--sys_error"==e&&(W(".info-box-item").find("p.error-number").html("#"+i),t.find(".scroll-container").hide(),t.find("#grid-filter").hide()),W("#predesigned--results_display").hasClass("display_info_box")||W("#predesigned--results_display").addClass("display_info_box"),W(".info-box-item").hasClass("active")&&W(".info-box-item").removeClass("active"),W("#"+e).addClass("active"),W("#load-more-records").hide())}function G(){var e=window.matchMedia("only screen and (max-width: 1024px)").matches;return u.debug_mode&&(e?console.log("----- Mobile Device Detected"):console.log("----- Desktop Device Detected")),e}function H(e,i,s,t){var r;"jquery"==u.dialog_box_type?((r=W("#ptlinked--dialog-message")).attr("title",e),r.find("p.ptlinked-dialog--message").html(i),s&&t?(r.find("#ptlinked-modal--action_btn").html(s),r.dialog({modal:!0,title:e,buttons:[{text:s,click:function(){W(this).dialog("close"),t()}},{text:"Cancel",click:function(){W(this).dialog("close")}}]})):r.dialog({modal:!0,title:e,buttons:[{text:"Ok",click:function(){W(this).dialog("close")}}]})):((r=[]).title=e,r.content=i,r.confirmation_btn=s,r.confirmation_callbackn=t,J("onShowDialog",r))}function J(e,i){void 0!==u[e]&&u[e].call(s,i)}return u.debug_mode&&console.log("----- Rendering User Interface"),O(),u.debug_mode&&console.log("----- Register User Session"),i=u.api_root_url+"/users/register_plugin",W.ajax({type:"POST",crossDomain:!0,headers:{"token-authorization-x":u.api_key,"ptlinked-uid-x":u.user_uid,"ptlinked-utype-x":u.user_type},url:i,dataType:"json",error:function(e,i,s){u.debug_mode&&(console.log("::::: Register User AJAX :::::"),console.log("Request Error or Timeout"),console.log("Status Code: "+e.status),console.log("Status Msg: "+e.statusText),console.log("Response Msg: "+e.responseText),console.log("::::: ===== ===== ===== ===== :::::")),_=!0,X("predesigned--sys_error","REG"+e.status+" - "+e.statusText)},success:function(e,i,s){s=s.status;200==s&&(u.debug_mode&&console.log("::::: Plugin Initialization :::::"),h.c=0,h.c1=0,h.v="",h.f1=0,h.f4=0,m=0,g=25,o={bodyregion:{},type:{},condition:{},myfavorites:{},customcat:{}},u.debug_mode&&console.log("----- Calculate Plugin Container Height"),function(){var e=0;u.header_element_class.split(","),e=Math.round(W("#block-siteheader").outerHeight()),u.debug_mode&&console.log("----- Calculated Page Header Height: "+e);var i=Math.round(W("body").outerHeight()),i=Math.round(i-e);t.css("height",i),e=W(".scroll-container"),e=Math.round(W(e).outerHeight()),W(".scroll-on-hover").css("height",Math.round(i-e))}(),u.debug_mode&&console.log("----- Process Page Request Parameters"),r=function(){var i={};return document.location.search.replace(/\??(?:([^=]+)=([^&]*)&?)/g,function(){function e(e){return decodeURIComponent(e.split("+").join(" "))}i[e(arguments[1])]=e(arguments[2])}),i}(),u.debug_mode&&console.log("----- Initializing the Filter Drop Down"),W(".card--grid_filter").unbind("click").on("click",function(){var e=W("#grid-filter");e.hasClass("open")?e.removeClass("open"):e.addClass("open")}),u.debug_mode&&console.log("----- Initializing the Mobile Filter Menu"),W("#mobile-predesigned--filter_link").unbind("click").on("click",function(){W(".mobile-filter-panel").hasClass("opened")?W(".mobile-filter-panel").removeClass("opened"):W(".mobile-filter-panel").addClass("opened")}),W("#mbtn-close_filter_menu").unbind("click").on("click",function(){W(".mobile-filter-panel").hasClass("opened")&&W(".mobile-filter-panel").removeClass("opened")}),u.debug_mode&&console.log("----- Initializing Search Bar"),function(){var i=W("#header-search"),s=W("#mheader-search"),t=W(".header-search-bar-clear"),r=W(".mheader-search-bar-clear");i.val(""),s.val(""),i.unbind("keypress").on("keypress",function(e){13==e.keyCode&&(h.v=W.trim(i.val()),""==h.v?(i.val(""),m=0,D(),t.hasClass("active")&&t.removeClass("active")):(m=0,D(),t.hasClass("active")||t.addClass("active")))}),s.unbind("keypress").on("keypress",function(e){13==e.keyCode&&(h.v=W.trim(s.val()),""==h.v?(s.val(""),m=0,D(),r.hasClass("active")&&r.removeClass("active")):(m=0,D(),r.hasClass("active")||r.addClass("active"),W(".navbar-mobile--search_panel").hasClass("displayed")&&W(".navbar-mobile--search_panel").removeClass("displayed"),W(".ptl-mobile_search_button").hasClass("active")||W(".ptl-mobile_search_button").addClass("active")))}),W("#search-icon-legacy").unbind("click").on("click",function(e){2Type');for(var c,p=0;p'+d[p].title+"";W("#predesigned_filters--types-mobile").append(g)}W("#predesigned_filters--types-mobile").select2(),0==i&&A(a,"","bodyregion","remove"),w("c",i),w("c1",s),n=0 View All '),a.html("Type "),W.each(e.types,function(e,i){s.append(i),a.append(i)});var n=W("ul.filter--item_list li");a.select2(),n.unbind("click").on("click",function(){var e=W(this).data("oid"),i=W(this).data("filter_label"),s=W(this).data("filter_type"),t=W("#selected_bodyregion_id").val(),r=b[t].title;A(h.c,"","bodyregion","remove"),W("ul.category-bubbles-list li").removeClass("active-filter"),A(t,r,"bodyregion","add"),W("ul.category-bubbles-list li[data-oid='"+t+"'][data-customcat='0']").addClass("active-filter"),h.c=t,0Filter by condition"),a.html("Condition "),W.each(e,function(e,i){s.append(i),a.append(i)}),e.length<1||0==e?W("#predesigned_filters--conditions-mobile").prop("disabled",!0):W("#predesigned_filters--conditions-mobile").prop("disabled",!1),s.select2(),a.select2(),s.unbind("select2:select").on("select2:select",function(e){var i=W("#filter--condition_type").val(),s=W("#filter--condition_type").select2().find(":selected").data("title"),t=W("#filter--condition_type").select2().find(":selected").data("type"),r=W("#selected_bodyregion_id").val(),a=W(".ptlinked--dropdown_bodyregion_highlight").find(".highlight-label").html();A(h.c,"","bodyregion","remove"),W("ul.category-bubbles-list li").removeClass("active-filter"),A(r,a,"bodyregion","add"),W("ul.category-bubbles-list li[data-oid='"+r+"'][data-customcat='0']").addClass("active-filter"),h.c=r,m=(void 0!==h.f4?h.f4!=i?(W(".clear-condition-filters").hasClass("hide")&&W(".clear-condition-filters").removeClass("hide"),A(h.f4=i,s,t,"add"),W("ul.filter--item_list li").removeClass("selected"),W("ul.filter--item_list").find("li[data-oid=1]").addClass("selected"),A(h.f1,"","type","remove"),h.f1=1):(W("ul.filter--item_list li").removeClass("selected"),0Filter by sub-category"),t.html("Filter by sub-category "),W.each(e,function(e,i){s.append(i),t.append(i)}),s.select2(),t.select2(),s.on("select2:select",function(e){var i=W("#predesigned_filters--subcategories").val();h.c1=i,r.hasClass("open")&&r.removeClass("open"),m=0,E()}),t.on("select2:select",function(e){var i=W("#predesigned_filters--subcategories-mobile").val();h.c1=i,m=0,E(),a.hasClass("opened")&&a.removeClass("opened");var s=t.parent().parent().find(".mobile-filter--clear");1==i?s.hasClass("active")&&s.removeClass("active"):s.hasClass("active")||s.addClass("active")}),void 0!==h.c1&&1Type');for(var s=0;s'+i[s].title+"";W("#predesigned_filters--types-mobile").append(t)}W("#predesigned_filters--types-mobile").select2(),W("#predesigned_filters--types-mobile").parent().parent().find(".mobile-filter--clear").hasClass("active")&&W("#predesigned_filters--types-mobile").parent().parent().find(".mobile-filter--clear").removeClass("active")}W("#predesigned_filters--conditions").val(0).trigger("change"),void 0!==h.f4&&0Type');for(s=0;s'+i[s].title+"";W("#predesigned_filters--types-mobile").append(t)}W("#predesigned_filters--types-mobile").select2(),W("#predesigned_filters--types-mobile").parent().parent().find(".mobile-filter--clear").hasClass("active")&&W("#predesigned_filters--types-mobile").parent().parent().find(".mobile-filter--clear").removeClass("active"),W("#predesigned_filters--conditions").val(0).trigger("change"),W("#predesigned_filters--conditions-mobile").val(0).trigger("change"),W("#predesigned_filters--conditions-mobile").parent().parent().find(".mobile-filter--clear").hasClass("active")&&W("#predesigned_filters--conditions-mobile").parent().parent().find(".mobile-filter--clear").removeClass("active"),W("#predesigned_filters--subcategories").val(0).trigger("change"),W("#predesigned_filters--subcategories-mobile").val(0).trigger("change"),W("#predesigned_filters--subcategories-mobile").parent().parent().find(".mobile-filter--clear").hasClass("active")&&W("#predesigned_filters--subcategories-mobile").parent().parent().find(".mobile-filter--clear").removeClass("active")}}function R(){var e=W(".grid-filter--drop_down");W("ul.mobile-filter-panel_list");0'+t.bodyregion.title+' ',i.append(e),s.append(e)),void 0!==t.type.oid&&(e=''+t.type.title+' ',i.append(e),s.append(e)),void 0!==t.condition.oid&&(e=''+t.condition.title+' ',i.append(e),s.append(e)),W("ul.predesigned--filter_crumbtrail li.service-bubble span.remove_filter").unbind("click").on("click",j),W("ul.mobile-predesigned--filter_crumbtrail li.service-bubble span.remove_filter").unbind("click").on("click",j)}function j(){var e=W(this).parent().data("oid"),i=W(this).parent().data("type");switch(i){case"bodyregion":h.c=0,h.c1=0,1==h.f1&&(P(h.f4,"condition"),h.f4=0,P(1,"type"),h.f1=0);break;case"type":h.f1=0,1==h.f1&&(P(h.f4,"condition"),h.f4=0,P(1,"type"),h.f1=0);break;case"condition":P(h.f4,"condition"),h.f4=0,P(1,"type"),h.f1=0}P(e,i),M(),L(),E()}function E(){D(),function(){var e=!1,i=!1;"none"!=W(".mobile-filter-panel").css("display")&&(i=!0),void 0!==h.f1&&0')}(),I(t.total_returned,t.total_records),p=!1},200),0==m&&W(".ptlinked--application_container > .scroll-on-hover").scrollTop(0),W(".cards--grid_container_item").not(".cards--grid_placeholder").unbind("click").on("click",F),-1==h.c&&W(".cards--grid_container_item .btn-remove-favorite").unbind("click").on("click",function(e){e.stopPropagation();e=W(this).data("exercise_program_id");W("#ptlinked--dialog-message").data("exercise_program_id",e),H("Are you sure?","This action cannot be undone. Are you sure you want to remove this favorite exercise program?","Yes, Remove",z)}),R(),T(e.conditions),S(e.subcategories),_||X("predesigned--results_display")):201==s&&(I(0,0),R(),T(e.conditions),S(e.subcategories),_||X("predesigned--no_results_display"),p=!1)}}))}function z(){var e=u.api_root_url+"/users/remove_favorite",i=W("#ptlinked--dialog-message").data("exercise_program_id");W.ajax({type:"POST",crossDomain:!0,headers:{"token-authorization-x":u.api_key,"ptlinked-uid-x":u.user_uid,"ptlinked-utype-x":u.user_type},url:e,data:{exercise_program_id:i},dataType:"json",error:function(e,i,s){u.debug_mode&&(console.log("::::: Remove Favorite Program AJAX :::::"),console.log("Request Error or Timeout"),console.log("Status Code: "+e.status),console.log("Status Msg: "+e.statusText),console.log("Response Msg: "+e.responseText),console.log("::::: ===== ===== ===== ===== :::::")),_=!0,X("predesigned--sys_error","USR"+e.status+" - "+e.statusText)},success:function(e,i,s){s=s.status;200==s?D():201==s&&H("Error","There was an error trying to remove the exercise program. Please refresh and try again.")}})}function F(e){var i=W(this).data("epid"),s=W(this).data("code"),t=W(this).find(".cards--program_title").text();0').append(function(){var e="";"mdvip"==u.category_slider_style&&(e="mdvip");return''}()).append(''),t.find(".cards--grid_renderer").prepend(''),$bel=W("body"),$bel.append(function(){var e="";"modal"==u.exercise_program_viewer&&(e="mdvip-modal");var i="";i='',i+='
'}()),$bel.append('Hip
'),$bel.append("bootstrap"==u.dialog_box_type?'':''),$bel.append('Hip
View By Condition
Select a condition or diagnosis here ')}function X(e,i){"predesigned--results_display"==e?(W(".info-box-item").hasClass("active")&&W(".info-box-item").removeClass("active"),W("#predesigned--results_display").hasClass("display_info_box")&&W("#predesigned--results_display").removeClass("display_info_box")):("predesigned--sys_error"==e&&(W(".info-box-item").find("p.error-number").html("#"+i),t.find(".scroll-container").hide(),t.find("#grid-filter").hide()),W("#predesigned--results_display").hasClass("display_info_box")||W("#predesigned--results_display").addClass("display_info_box"),W(".info-box-item").hasClass("active")&&W(".info-box-item").removeClass("active"),W("#"+e).addClass("active"),W("#load-more-records").hide())}function G(){var e=window.matchMedia("only screen and (max-width: 1024px)").matches;return u.debug_mode&&(e?console.log("----- Mobile Device Detected"):console.log("----- Desktop Device Detected")),e}function H(e,i,s,t){var r;"jquery"==u.dialog_box_type?((r=W("#ptlinked--dialog-message")).attr("title",e),r.find("p.ptlinked-dialog--message").html(i),s&&t?(r.find("#ptlinked-modal--action_btn").html(s),r.dialog({modal:!0,title:e,buttons:[{text:s,click:function(){W(this).dialog("close"),t()}},{text:"Cancel",click:function(){W(this).dialog("close")}}]})):r.dialog({modal:!0,title:e,buttons:[{text:"Ok",click:function(){W(this).dialog("close")}}]})):((r=[]).title=e,r.content=i,r.confirmation_btn=s,r.confirmation_callbackn=t,J("onShowDialog",r))}function J(e,i){void 0!==u[e]&&u[e].call(s,i)}return u.debug_mode&&console.log("----- Rendering User Interface"),O(),u.debug_mode&&console.log("----- Register User Session"),i=u.api_root_url+"/users/register_plugin",W.ajax({type:"POST",crossDomain:!0,headers:{"token-authorization-x":u.api_key,"ptlinked-uid-x":u.user_uid,"ptlinked-utype-x":u.user_type},url:i,dataType:"json",error:function(e,i,s){u.debug_mode&&(console.log("::::: Register User AJAX :::::"),console.log("Request Error or Timeout"),console.log("Status Code: "+e.status),console.log("Status Msg: "+e.statusText),console.log("Response Msg: "+e.responseText),console.log("::::: ===== ===== ===== ===== :::::")),_=!0,X("predesigned--sys_error","REG"+e.status+" - "+e.statusText)},success:function(e,i,s){s=s.status;200==s&&(u.debug_mode&&console.log("::::: Plugin Initialization :::::"),h.c=0,h.c1=0,h.v="",h.f1=0,h.f4=0,m=0,g=25,o={bodyregion:{},type:{},condition:{},myfavorites:{},customcat:{}},u.debug_mode&&console.log("----- Calculate Plugin Container Height"),function(){var e=0;u.header_element_class.split(","),e=Math.round(W("#block-siteheader").outerHeight()),u.debug_mode&&console.log("----- Calculated Page Header Height: "+e);var i=Math.round(W("body").outerHeight()),i=Math.round(i-e);t.css("height",i),e=W(".scroll-container"),e=Math.round(W(e).outerHeight()),W(".scroll-on-hover").css("height",Math.round(i-e))}(),u.debug_mode&&console.log("----- Process Page Request Parameters"),r=function(){var i={};return document.location.search.replace(/\??(?:([^=]+)=([^&]*)&?)/g,function(){function e(e){return decodeURIComponent(e.split("+").join(" "))}i[e(arguments[1])]=e(arguments[2])}),i}(),u.debug_mode&&console.log("----- Initializing the Filter Drop Down"),W(".card--grid_filter").unbind("click").on("click",function(){var e=W("#grid-filter");e.hasClass("open")?e.removeClass("open"):e.addClass("open")}),u.debug_mode&&console.log("----- Initializing the Mobile Filter Menu"),W("#mobile-predesigned--filter_link").unbind("click").on("click",function(){W(".mobile-filter-panel").hasClass("opened")?W(".mobile-filter-panel").removeClass("opened"):W(".mobile-filter-panel").addClass("opened")}),W("#mbtn-close_filter_menu").unbind("click").on("click",function(){W(".mobile-filter-panel").hasClass("opened")&&W(".mobile-filter-panel").removeClass("opened")}),u.debug_mode&&console.log("----- Initializing Search Bar"),function(){var i=W("#header-search"),s=W("#mheader-search"),t=W(".header-search-bar-clear"),r=W(".mheader-search-bar-clear");i.val(""),s.val(""),i.unbind("keypress").on("keypress",function(e){13==e.keyCode&&(h.v=W.trim(i.val()),""==h.v?(i.val(""),m=0,D(),t.hasClass("active")&&t.removeClass("active")):(m=0,D(),t.hasClass("active")||t.addClass("active")))}),s.unbind("keypress").on("keypress",function(e){13==e.keyCode&&(h.v=W.trim(s.val()),""==h.v?(s.val(""),m=0,D(),r.hasClass("active")&&r.removeClass("active")):(m=0,D(),r.hasClass("active")||r.addClass("active"),W(".navbar-mobile--search_panel").hasClass("displayed")&&W(".navbar-mobile--search_panel").removeClass("displayed"),W(".ptl-mobile_search_button").hasClass("active")||W(".ptl-mobile_search_button").addClass("active")))}),W("#search-icon-legacy").unbind("click").on("click",function(e){2