PageSourceSearch

https://medicalcouncil.ie/includes/scripts/global.js

js medicalcouncil.ie collected 2026-10-02 04:13:02 UTC 9,805 bytes, 289 lines download raw bytes

1var j = jQuery.noConflict();
2
3j(document).ready(function () {
4    if ($('body').width() < 641) {
5        var $tertiaryNav = $('.maincontentWrapper').find('ul.tertiaryNav');
6        $('.maincontentWrapper').find('ul.tertiaryNav').remove();
7        $('.sidebarWrapper .sidebarWrapper_inner').find('ul li.hasChildren a');
8        $('ul li.hasChildren a').after($tertiaryNav.clone());
9    }
10
11    if ($('body').width() < 641) {
12        $(document).ready(function () {
13
14        });
15    }
16
17    // Remove blank p tags
18
19    $('.no-grey-lines .top-left-text p').each(function () {
20        var $this = $(this);
21        if ($this.html().replace(/\s|&nbsp;/g, '').length == 0)
22            $this.remove();
23    });
24
25    // Remove blank div (.top-right-buttons)
26
27    if ($(window).width() < 768) {
28        //Add your javascript for small screens here
29        $('.no-grey-lines .top-right-buttons').each(function () {
30            var $this = $(this);
31            if ($this.html().replace(/\s|&nbsp;/g, '').length == 0)
32                $this.remove();
33        });
34    }
35
36    $('.cc_banner-wrapper  .cc_banner.cc_container.cc_container--open').each(function () {
37        $(this).wrapInner('<div class="cookie-content"></div>');
38    });
39
40    $('#header').each(function () {
41        $(this).wrapInner('<div class="header-content"></div>');
42    });
43    $('.mainWrapper.noSideCol.report.media-article, .mainWrapper.media-archive').each(function () {
44        $(this).wrapInner('<div class="banner-after-header"></div>');
45    });
46
47    $(".home_panels p > img").each(function () {
48        $(this).parent().addClass('p-img');
49    })
50
51    if ($('body').width() < 641) {
52        var $loginButtons = $('#header #utilities').find('.tools');
53        $('#header #utilities').find('.tools').remove();
54        $('#header').find('ul.primaryNav li:last-of-type');
55        $('ul.primaryNav li:last-of-type').after($loginButtons.clone());
56    }
57
58    $("#ContentPlaceHolder_Main_btnSearch").hover(function () {
59        $(this).attr("src", function (index, attr) {
60            return attr.replace("search-doctors-btn.gif", "search-doctors-btn-hover.jpg");
61        });
62    }, function () {
63        $(this).attr("src", function (index, attr) {
64            return attr.replace("search-doctors-btn-hover.jpg", "search-doctors-btn.gif");
65        });
66    });
67
68    j(" .home_quicklinks img, .bx-auto a, .home-btn").hover(
69        function () { j(this).fadeTo("fast", 0.5); },
70        function () { j(this).fadeTo("fast", 1.0); }
71
72    );
73
74    var el = j('input[type=text]');
75    el.focus(function (e) {
76        if (e.target.value == e.target.defaultValue)
77            e.target.value = '';
78    });
79
80    el.blur(function (e) {
81        if (e.target.value == '')
82            e.target.value = e.target.defaultValue;
83    });
84
85    //Home page slider http://bxslider.com/
86    var slider = j('#homepageFlashWrapper').bxSlider({
87        auto: false,
88        speed: 2000,
89        pause: 5000,
90        mode: 'fade',
91        controls: false,
92        autoControls: true,
93        pager: true
94    });
95
96
97    //set homepage hero image
98    if ($("#homePageHeroBanner").length > 0) {
99        var homepageHeroImgSrc = "../images/banner-bg.png";
100
101        if ($("#homePageHeroBanner img").length > 0) {
102
103            var src = $("#homePageHeroBanner img").attr("src");
104
105            if (src != null && src != "") {
106                homepageHeroImgSrc = src
107            }
108        }
109        var background = "url(" + homepageHeroImgSrc + ")";
110        $("#homePageHeroBanner img").hide();
111        $("#homePageHeroBanner").css("background-image", background);
112
113        $(".banner-title-outer").show();
114
115    }
116
117    //set landing hero image
118    if ($("#landingPageHeroBanner").length > 0) {
119        var homepageHeroImgSrc = "../images/banner-bg.png";
120
121        if ($("#landingPageHeroBanner img").length > 0) {
122
123            $("#standardLandingHeader").hide();
124            $("#heroLandingHeader").show();
125
126            var src = $("#landingPageHeroBanner img").attr("src");
127
128            if (src != null && src != "") {
129                homepageHeroImgSrc = src
130            }
131
132
133            var background = "url(" + homepageHeroImgSrc + ")";
134            $("#landingPageHeroBanner img").hide();
135            $("#landingPageHeroBanner").css("background-image", background);
136
137        }
138        else {
139            $("#landingPageHeroBanner").hide();
140        }
141
142      
143    }
144
145
146
147
148
149
150    //Wrap bx slider pager in container 
151    if ($(".bx-pager")[0]) {
152        $(".bx-pager").wrap("<div class='standard-container'></div>");
153    }
154
155    j('#go-prev').click(function () {
156        slider.goToPreviousSlide();
157        return false;
158    });
159
160    j('#go-next').click(function () {
161        slider.goToNextSlide();
162        return false;
163    });
164
165    //FAQ interactivity
166    if ($('.report dl, .no-grey-lines dl').length) {
167
168        $(this).find('dt').click(function () {
169            var isSelected = $(this).hasClass('selected');
170            isSelected ? $(this).removeClass('selected') : $(this).addClass('selected');
171            isSelected ? $(this).next().hide() : $(this).next().show();
172        })
173    }
174
175    if (j("#medCouncilVids").length) {
176        // setup player without "internal" playlists
177        j("medCouncilVids", "/includes/flash/flowplayer-3.2.7.swf",
178            {
179                clip: {
180                    baseUrl: 'http://www.medicalcouncil.ie/',
181                    scaling: 'scale',
182                    autoPlay: false,
183                    autoBuffering: true
184                }
185            }
186            // use playlist plugin. 
187        ).playlist(".mc_vid_playlist",
188            {
189                playingClass: 'playing',
190                pausedClass: 'paused',
191                progressClass: 'progress',
192                loop: true
193            }
194        );
195    }
196
197
198
199
200
201    j(".banner_edit_icon, .documentComposite_edit_icon").hover(
202        function () { j(this).toggleClass("hover"); },
203        function () { j(this).toggleClass("hover"); }
204    );
205
206
207    j(".datepicker").datepicker({
208        showOn: 'both',
209        dateFormat: 'dd/mm/yy',
210        buttonImage: 'includes/images/maincontent/ico_datepicker.gif',
211        buttonImageOnly: true
212    });
213
214    j(".cma_events_imgs a").lightBox();
215
216    j(".mainWrapper").height() > j(".sidebarWrapper").height() ? j(".sidebarWrapper").height(j(".mainWrapper").height()) : null;
217    j(".maincontentWrapper").height() > j(".sidebarWrapper-archive").height() ? j(".sidebarWrapper-archive").height(j(".maincontentWrapper").height()) : null;
218    j(".maincontent table").each(function () {
219        if (j(this).width() > 650) {
220            j(this).children("colgroup").remove();
221            j(this).attr("width", "90%");
222        }
223    });
224
225    // =========================================== ASSIGN ZEBRA CLASSES TO EVERY SECOND ITEM 
226    var i = 0;
227    jQuery(".formRowWrapper, .maincontent .checkdetails tr").each(function (i) {
228        i % 2 == 0 ? jQuery(this).addClass("zebra_row_0") : jQuery(this).addClass("zebra_row_1");
229        i++;
230    });
231
232    var so = new SWFObject("includes/flash/flash_1_002.swf", "flash_area", "950", "310", "8", "#ffffff");
233    so.addParam("wmode", "transparent");
234    if (document.getElementById("homepageFlash")) { so.write("homepageFlash"); }
235
236    /* ------------------------------------------------ FONT SIZE TOGGLE ------------------------------------------------ */
237    // If there's a cookie present for this site, assign the font size based on this value.
238    if (j.cookie('fontSizeCookie')) {
239        var getCookie = parseFloat(j.cookie('fontSizeCookie'));
240        jQuery(".maincontentWrapper").css({ 'font-size': getCookie + 'em' });
241    }
242
243    // Increase the font size based on <current cookie size> + 0.25.
244    jQuery("a.font_inc").click(function () {
245        if (j.cookie('fontSizeCookie')) {
246
247            j.cookie('fontSizeCookie', parseFloat(j.cookie('fontSizeCookie')) + 0.25, { path: '/' });
248            jQuery(".maincontentWrapper").css({ 'font-size': parseFloat(j.cookie('fontSizeCookie')) + 'em' });
249        }
250        else // No Cookie Present? Set a Cookie based on initial step-up (0.25), then increase font size
251        {
252            j.cookie('fontSizeCookie', 1.25, { path: '/' });
253            jQuery(".maincontentWrapper").css({ 'font-size': parseFloat(j.cookie('fontSizeCookie')) + 'em' });
254        }
255    });
256
257    // Decrease the font size based on <current cookie size> - 0.25.
258    jQuery("a.font_dec").click(function () {
259        if (j.cookie('fontSizeCookie')) {
260            if (parseFloat(j.cookie('fontSizeCookie')) > 1.0) {
261                j.cookie('fontSizeCookie', parseFloat(j.cookie('fontSizeCookie')) - 0.25, { path: '/' });
262                jQuery(".maincontentWrapper").css({ 'font-size': parseFloat(j.cookie('fontSizeCookie')) + 'em' });
263            }
264        }
265    });
266
267    /* ------------------------------------------------ FONT SIZE TOGGLE ------------------------------------------------ */
268
269    /* ------------------------------------------------ FANCYBOX ------------------------------------------------ */
270
271    $('a.video').click(function (e) {
272        e.preventDefault();
273        $('.fancybox-media')
274            .attr('rel', 'media-gallery')
275            .fancybox({
276                openEffect: 'none',
277                closeEffect: 'none',
278                prevEffect: 'none',
279                nextEffect: 'none',
280
281                arrows: false,
282                helpers: {
283                    media: {},
284                    buttons: {}
285                }
286            });
287    });
288
289});

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.