PageSourceSearch

https://beachboxphysiotherapy.com.au/wp-content/plugins/miguras-di…/scripts/main-scripts.js?ver=6.8.10

js beachboxphysiotherapy.com.au collected 2026-10-07 04:19:11 UTC 8,769 bytes, 245 lines download raw bytes

1function divienhancer_additional_scripts() {
2
3  /*================= GENERAL VARIABLES ================*/
4
5
6
7
8  /*================================== BREADCRUMB ============================*/
9  /*============================================================================*/
10  function de_breadcrumb() {
11    jQuery(function ($) {
12
13      $('.de-breadcrumb').each(function () {
14
15        var $this = $(this);
16        var $parentHeight = $this.parents('.et_pb_module_inner').outerHeight();
17        var $parentWidth = $this.parents('.et_pb_module_inner').outerWidth();
18        var $item = $this.find('.de-crumb-item');
19        var $itemnumber = $this.find('.de-crumb-item').length;
20        var $maxWidthItem = $parentWidth / $itemnumber;
21        var $delimiter = $this.find('.divienhancer-crumb-delimiter');
22        var $styles = '';
23        var $itembackground = $this.attr('data-background');
24        var $itembackgroundhover = $this.attr('data-backgroundhover');
25        var $id = $this.attr('id');
26        if ($id == '' || typeof $id == 'undefined') {
27          $this.attr('id', 'de-breadcrumb' + Math.floor((Math.random() * 1000) + 1) + Math.random().toString(36).substring(2, 15));
28          $id = $this.attr('id');
29        }
30
31        if ($this.hasClass('de-crumb-basic')) {
32          $item.css({ maxWidth: $maxWidthItem });
33          $styles += '<style class="de-breadcrumb-styles" type="text/css">';
34          $styles += '#' + $id + '.de-crumb-basic span.divienhancer-crumb-delimiter.et-pb-icon {font-size: inherit;} ';
35          $styles += '#' + $id + '.de-crumb-basic span.divienhancer-crumb-delimiter.et-pb-icon {position: relative;} ';
36          $styles += '#' + $id + '.de-crumb-basic span.divienhancer-crumb-delimiter.et-pb-icon {top: 0.15em;} ';
37          $styles += '#' + $id + '.de-crumb-basic span.divienhancer-crumb-delimiter.et-pb-icon {padding: 0 0.5em;} ';
38          $styles += '</style>';
39
40
41
42
43        }
44        else {
45          $item.css({ maxWidth: '' });
46        }
47
48        if ($this.hasClass('de-crumb-styleone')) {
49          $styles += '<style class="de-breadcrumb-styles" type="text/css">';
50          $styles += '#' + $id + '.de-crumb-styleone .de-crumb-item:after {background-color:' + $itembackground + ';} ';
51          $styles += '#' + $id + '.de-crumb-styleone .de-crumb-item {background-color:' + $itembackground + ';} ';
52          $styles += '#' + $id + '.de-crumb-styleone .de-crumb-item:hover {background-color:' + $itembackgroundhover + ';} ';
53          $styles += '#' + $id + '.de-crumb-styleone span.de-crumb-item {background-color:' + $itembackgroundhover + ';} ';
54          $styles += '#' + $id + '.de-crumb-styleone span.de-crumb-item:after {background-color:' + $itembackgroundhover + ';} ';
55          $styles += '#' + $id + '.de-crumb-styleone .de-crumb-item:hover:after {background-color:' + $itembackgroundhover + ';} ';
56          $styles += '</style>';
57        }
58
59        $this.find('.de-breadcrumb-styles').remove();
60        $this.append($styles);
61
62
63      })
64
65
66
67    })
68  }
69
70
71  /*================================= DIVIENHANCER BING MAP =====================================*/
72
73
74
75  function divienhancer_bing_map_script(origin) {
76    window.deBingMaps = [];
77  
78    let bingMap = document.createElement("script");
79    let deBingKey = divienhancerData.bingKey;
80    let documentHead = document.getElementsByTagName("head")[0];
81  
82    bingMap.src = `https://www.bing.com/api/maps/mapcontrol?key=${deBingKey}`;
83    bingMap.type = "text/javascript";
84    bingMap.async = true;
85    bingMap.defer = true;
86    documentHead.appendChild(bingMap);
87  
88  
89    let bingMapLoader = () => {
90  
91  
92      jQuery('.divienhancer_bing_map').each(function () {
93        var self = jQuery(this);
94        self.attr('data-id', `de-bing-map-${Math.floor((Math.random() * 1000) + 1) + Math.random().toString(36).substring(2, 15)}`);
95        var dataId = self.attr("data-id");
96        self.find('.divienhancer_bing_map_load').attr('id', dataId)
97        var mapid = jQuery(this).find('.divienhancer_bing_map_load').attr('id');
98        var zoom = jQuery(this).attr('data-zoom');
99        var maptypedata = jQuery(this).attr('data-type');
100        var maptype = 'Microsoft.Maps.MapTypeId.' + maptypedata;
101        var mapcenter = jQuery(this).attr("data-address")
102
103  
104  
105  
106        if (Microsoft) {
107          window.deBingMaps[mapid] = new Microsoft.Maps.Map(document.getElementById(mapid), {
108          });
109          window.deBingMaps[mapid].setView({
110            zoom: parseInt(zoom),
111            mapTypeId: eval(maptype)
112          });
113  
114  
115          if(window.deBingMaps[mapid]){
116            
117  
118            Microsoft.Maps.loadModule('Microsoft.Maps.Search', function () {
119  
120              self.attr("data-valid", "Invalid Address");
121      
122              var searchManager = new Microsoft.Maps.Search.SearchManager(window.deBingMaps[mapid]);
123              var requestOptions = {
124                bounds: window.deBingMaps[mapid].getBounds(),
125                where: mapcenter,
126                callback: function (answer, userData) {
127                  self.attr("data-valid", "Valid Address")
128                  jQuery(".divienhancer_bing_map_loading").css({display: "none"});
129                  window.deBingMaps[mapid].setView({ 
130                    center: answer.results[0].location,
131                    mapTypeId: eval(maptype)
132                  });
133                  
134                }
135              };
136              searchManager.geocode(requestOptions);
137            });
138  
139  
140          }
141          
142          
143          
144        }
145  
146  
147      });
148  
149  
150  
151      jQuery('.divienhancer_bing_map_pin').each(function () {
152        let self = jQuery(this);
153        let parentid = jQuery(this).parents('.divienhancer_bing_map').attr('data-id');
154        let mapType = jQuery(this).parents('.divienhancer_bing_map').attr('data-type');
155        let map = window.deBingMaps[parentid];
156        let address = jQuery(this).attr("data-address");
157        let title = jQuery(this).attr("data-title");
158  
159        
160        Microsoft.Maps.loadModule('Microsoft.Maps.Search', function () {
161       
162  
163          var searchManager = new Microsoft.Maps.Search.SearchManager(map);
164          var requestOptions = {
165            bounds: map.getBounds(),
166            where: address,
167            callback: function (answer, userData) {
168       
169              let pinAddress = answer.results[0].location;
170             
171              let pin = new Microsoft.Maps.Pushpin(pinAddress, {
172                title: title,
173              });
174              map.entities.push(pin);
175
176              // function to display pin content on click
177              Microsoft.Maps.Events.addHandler(pin, 'click', function (e) { 
178                let pinLeft = e.point.x;
179                let pinTop = e.point.y;
180                let pinWrapper = self.parents('.divienhancer_bingMapChild');
181                
182                //hide all pins before display the clicked one
183                jQuery('.divienhancer_bingMapChild').css({display: "none"});
184
185                // display pin before get height, then get height to adjust position
186                pinWrapper.css({display: "block"});
187                self.parents('.divienhancer_bingMapChild').find('.divienhancer_bing_map_pin_content').css({display: "block"});
188                let contentHeight = pinWrapper.outerHeight();
189                pinWrapper.css({left: (pinLeft - 40), top: (pinTop - contentHeight - 30)});
190              });
191
192
193              //function to hide pin content when users moves the map
194              Microsoft.Maps.Events.addHandler(map, 'viewchange', function () { 
195                self.parents('.divienhancer_bingMapChild').css({display: "none"});
196              });
197
198              jQuery('.divienhancer_bing_map_pin_close').on("click", function(){
199                self.parents('.divienhancer_bingMapChild').css({display: "none"});
200              })
201
202
203            }
204          };
205          searchManager.geocode(requestOptions);
206        });
207  
208  
209      });
210  
211
212    }
213  
214  
215    if (origin == "front") {
216      window.addEventListener("load", function () {
217        bingMapLoader();
218      });
219    }
220    else if (origin == "back") {
221      setTimeout(function () {
222        bingMapLoader();
223      }, 2000);
224    }
225  
226  }
227
228  return {
229    de_breadcrumb: de_breadcrumb,
230    divienhancer_bing_map_script: divienhancer_bing_map_script
231  }
232}
233
234
235
236
237
238
239jQuery(document).ready(function () {
240  divienhancer_additional_scripts().de_breadcrumb();
241  divienhancer_additional_scripts().divienhancer_bing_map_script("front");
242
243});
244
245

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.