1/*global $*/ 2 3var Home = (function () { 4 5 "use strict"; 6 7 var routes; 8 9 var handleHospitals = function () { 10 $("div.bhoechie-tab-menu>div.list-group>a").click(function (e) { 11 e.preventDefault(); 12 $(this).siblings('a.active').removeClass("active"); 13 $(this).addClass("active"); 14 var index = $(this).index(); 15 $("div.bhoechie-tab>div.bhoechie-tab-content").removeClass("active"); 16 $("div.bhoechie-tab>div.bhoechie-tab-content").eq(index).addClass("active"); 17 }); 18 }; 19 20 var handleAdviseModal = function () { 21 $.get(routes.showAdvise, function (data) { 22 if (data.showAdvise == true) { 23 $.fancybox.open({ 24 src: '#adviseModal', 25 type: 'inline', 26 }); 27 } 28 }); 29 }; 30 31 return { 32 //main function to initiate the module 33 init: function (params) { 34 35 routes = params; 36 37 handleHospitals(); 38 handleAdviseModal(); 39 } 40 }; 41}()); 42 43 44function setREVStartSize(e) { 45 //window.requestAnimationFrame(function() { 46 window.RSIW = window.RSIW === undefined ? window.innerWidth : window.RSIW; 47 window.RSIH = window.RSIH === undefined ? window.innerHeight : window.RSIH; 48 try { 49 var pw = document.getElementById(e.c).parentNode.offsetWidth, 50 newh; 51 pw = pw === 0 || isNaN(pw) ? window.RSIW : pw; 52 e.tabw = e.tabw === undefined ? 0 : parseInt(e.tabw); 53 e.thumbw = e.thumbw === undefined ? 0 : parseInt(e.thumbw); 54 e.tabh = e.tabh === undefined ? 0 : parseInt(e.tabh); 55 e.thumbh = e.thumbh === undefined ? 0 : parseInt(e.thumbh); 56 e.tabhide = e.tabhide === undefined ? 0 : parseInt(e.tabhide); 57 e.thumbhide = e.thumbhide === undefined ? 0 : parseInt(e.thumbhide); 58 e.mh = e.mh === undefined || e.mh == "" || e.mh === "auto" ? 0 : parseInt(e.mh, 0); 59 if (e.layout === "fullscreen" || e.l === "fullscreen") 60 newh = Math.max(e.mh, window.RSIH); 61 else { 62 e.gw = Array.isArray(e.gw) ? e.gw : [e.gw]; 63 for (var i in e.rl) if (e.gw[i] === undefined || e.gw[i] === 0) e.gw[i] = e.gw[i - 1]; 64 e.gh = e.el === undefined || e.el === "" || (Array.isArray(e.el) && e.el.length == 0) ? e.gh : e.el; 65 e.gh = Array.isArray(e.gh) ? e.gh : [e.gh]; 66 for (var i in e.rl) if (e.gh[i] === undefined || e.gh[i] === 0) e.gh[i] = e.gh[i - 1]; 67 68 var nl = new Array(e.rl.length), 69 ix = 0, 70 sl; 71 e.tabw = e.tabhide >= pw ? 0 : e.tabw; 72 e.thumbw = e.thumbhide >= pw ? 0 : e.thumbw; 73 e.tabh = e.tabhide >= pw ? 0 : e.tabh; 74 e.thumbh = e.thumbhide >= pw ? 0 : e.thumbh; 75 for (var i in e.rl) nl[i] = e.rl[i] < window.RSIW ? 0 : e.rl[i]; 76 sl = nl[0]; 77 for (var i in nl) if (sl > nl[i] && nl[i] > 0) { 78 sl = nl[i]; 79 ix = i; 80 } 81 var m = pw > (e.gw[ix] + e.tabw + e.thumbw) ? 1 : (pw - (e.tabw + e.thumbw)) / (e.gw[ix]); 82 newh = (e.gh[ix] * m) + (e.tabh + e.thumbh); 83 } 84 if (window.rs_init_css === undefined) window.rs_init_css = document.head.appendChild(document.createElement("style")); 85 document.getElementById(e.c).height = newh + "px"; 86 window.rs_init_css.innerHTML += "#" + e.c + "_wrapper { height: " + newh + "px }"; 87 } catch (e) { 88 console.log("Failure at Presize of Slider:" + e) 89 } 90 //}); 91}; 92 93var revapi9, 94 tpj; 95 96function revinit_revslider91() { 97 jQuery(function () { 98 tpj = jQuery; 99 revapi9 = tpj("#rev_slider_9_1"); 100 if (revapi9 == undefined || revapi9.revolution == undefined) { 101 revslider_showDoubleJqueryError("rev_slider_9_1"); 102 } else { 103 revapi9.revolution({ 104 sliderLayout: "auto", 105 duration: "5000ms", 106 visibilityLevels: "1240,1024,778,480", 107 //gridwidth: 1240, 108 gridheight: 300, 109 autoHeight: true, 110 spinner: "spinner0", 111 perspective: 600, 112 perspectiveType: "global", 113 editorheight: "477,768,960,720", 114 responsiveLevels: "1240,1024,778,480", 115 progressBar: { 116 color:"rgba(0,146,196,1)", 117 size: 5, 118 x: 0, 119 y: 0 120 }, 121 navigation: { 122 arrows: { 123 enable: true, 124 style: "uranus", 125 left: { 126 h_offset: 0 127 }, 128 right: { 129 h_offset: 0 130 } 131 } 132 }, 133 fallbacks: { 134 allowHTML5AutoPlayOnAndroid: true 135 }, 136 }); 137 } 138 139 }); 140} // End of RevInitScript 141var once_revslider91 = false;
142if (document.readyState === "loading") { 143 document.addEventListener('readystatechange', function () { 144 if ((document.readyState === "interactive" || document.readyState === "complete") && !once_revslider91) { 145 once_revslider91 = true; 146 revinit_revslider91(); 147 } 148 }); 149} else { 150 once_revslider91 = true; 151 revinit_revslider91(); 152}
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.