PageSourceSearch

https://www.alclubs.london/scr/homepage.js?260225

js alclubs.london collected 2026-10-02 23:20:45 UTC 10,043 bytes, 373 lines download raw bytes

1var timeoutrange, _heightPercentage = 0.75;
2
3$(function () {
4    if ($('#module66 div').length > 0) // careers page
5    {
6        _heightPercentage = 0.5;
7    }
8
9    setTimeout("Slideshow();", 200);
10
11    $(window).on('resize', function () {
12        Slideshow();
13    });
14
15
16    $(window).scroll(function () {
17        //HomepageNavigationCheck();
18        Slideshow();
19        AnimateHomepageCalculations();
20    });
21
22    setTimeout("FixIphoneSlideshowViewports();", 150);
23
24
25    var sBrowser, sUsrAg = navigator.userAgent;
26
27    
28    
29
30    if (sUsrAg.indexOf("Chrome") > -1) {
31        sBrowser = "Google Chrome";
32    } else if (sUsrAg.indexOf("Safari") > -1) {
33        sBrowser = "Apple Safari";
34    } else if (sUsrAg.indexOf("Opera") > -1) {
35        sBrowser = "Opera";
36    } else if (sUsrAg.indexOf("Firefox") > -1) {
37        sBrowser = "Mozilla Firefox";
38    } else if (sUsrAg.indexOf("MSIE") > -1) {
39        sBrowser = "Microsoft Internet Explorer";
40    }
41
42    if (sBrowser == "Apple Safari") {
43        $('.btn').each(function () {
44            $(this).attr("style", "padding: 10px 0 10px 0;");
45        });
46    }
47
48    if (sBrowser == "Google Chrome") {
49        //tester
50    }
51
52    $('#module93').find('.fixwidth').css({ 'margin-top': '4vh', 'margin-bottom': '2vh' });
53
54    if (sUsrAg.indexOf("Windows") > -1) {
55        setTimeout("ButtonCircle();", 100);
56    }
57
58});
59
60function ButtonCircle() {   
61    $('.nsspager span').each(function () {
62        $(this).attr("style", "padding: 0px 4px;"); 
63    });
64}
65
66
67function HomepageNavigationCheck() {
68
69    var topscrol = $(window).scrollTop();
70    var winheight = $(window).height();
71
72    if (topscrol > winheight) {
73        /*var navigationstyle = $('#navigationbox').attr('style');
74        if (navigationstyle.indexOf('block') > -1)
75        {
76            HideMenu();
77        }*/
78        $('header').attr('style', 'position:fixed !important;');
79
80
81    }
82    else if (topscrol == 0) {
83        $('header').attr('style', '');
84    }
85}
86
87function Slideshow() {
88
89    // $("#navigationbox").attr('style', 'height:' + $(window).height() + 'px;');
90    var heightscreen = $(window).height() / 2; //* _heightPercentage;
91    var allmenuheight = $('#bigheaderdiv').height();
92    allmenuheight2 = $('#bigheaderdiv').height();
93    var total = (heightscreen - allmenuheight) + 50;
94
95    $(".slideshowbox").css('height', heightscreen);
96    $(".slideshowbox").css('max-height', heightscreen);
97
98    $('.slideshow li').each(function () {
99
100        $(this).css('height', heightscreen);
101    });
102    $('.slideshow li .items').each(function () {
103
104        $(this).css('height', heightscreen);
105        $(this).css('padding-top', total / 2);
106    });
107}
108
109function HomepagePrepAnimation() {
110    //$('html, body').animate({ scrollTop: 0 }, 'fast');
111    // return false;
112
113    setTimeout("HomepageInitAnimation();", 1000);
114}
115
116function HomepageInitAnimation() {
117    $('.topbannervideo .listboxcontent img ').fadeIn(1500);
118
119    //setTimeout("HomepageAnimation2();", 3500);
120}
121
122function HomepageAnimation2() {
123    var whiteheight = $(window).height() - 0;
124
125    $("html, body").animate({
126        scrollTop: whiteheight + 'px'
127    }, 2500);
128}
129
130function AnimateHomepageCalculations() {
131    if ($("#navdivcontent").length > 0) {
132        var navbaroffset = $(window).scrollTop();
133        var windowhei = $(window).height();
134        var varheight = $("#navdivcontent").height();
135
136        //console.log("offset: " + navbaroffset + " -- checker: " + windowhei + " -- checker: " +varheight);
137
138        if (navbaroffset >= (windowhei - (varheight + 70))) {// && $("#navdivcontent").attr("class").indexOf("barf") > -1
139            $("#navdivcontent").addClass("navbarfixed");
140        }
141        else if (navbaroffset <= (windowhei - (varheight + 50))) // && $("#navdivcontent").attr("class").indexOf("barf") == -1
142        {
143            $("#navdivcontent").removeClass("navbarfixed");
144        }
145        //console.log(navbaroffset);
146    }
147
148    $('#ctl00_textPL_ucPanel .container').each(function () {
149        var fieldID = $(this).attr('id');
150        var offset = $(this).offset().top;
151        var halfheight = $(window).height() / 2;
152        var topscrol = $(window).scrollTop();
153
154        var footerheight = $('#bluefooter').height();
155
156        if (footerheight < halfheight) {
157            halfheight += (halfheight / 2);
158        }
159
160        if (topscrol <= (offset - halfheight)) {
161            //$(this).children().children(".listboxcontent").fadeOut(1000);
162        }
163        else {
164            //console.log(fieldID);
165            //$(this).children().children(".listboxcontent").fadeIn(1000);
166
167
168            $(this).children().children(".listboxcontent").animate({
169                opacity: "1",
170                filter: "alpha(opacity=100)"
171            }, 600);
172
173            if (fieldID == "fourboxesicontextid") {
174                FourBoxesAnimation1();
175            }
176
177            if ($(this).attr("class").indexOf("gridindex") > -1) {
178                $(this).children().children(".listitembox").each(function () {
179                    if ($(this).attr("class").indexOf("gridshowed") == -1) {
180                        $(this).addClass("gridshowed")
181                    }
182                });
183            }
184        }
185    });
186}
187
188function PlayMyVideo(moduleid) {
189
190    $('#module' + moduleid + " div.bimg div.listboxcontent").fadeOut();
191
192    $('#module' + moduleid + " div.bimg video").get(0).play();
193}
194
195function FixIphoneSlideshowViewports() {
196    $('.slideshowmodule').each(function () {
197
198        var width;
199        var innerWidth;
200        //width = $(window).height() * _heightPercentage;
201
202        width = $(window).height() * 0.5;
203                
204        if ($(window).width() > 750) {
205            innerWidth = $(window).innerHeight();
206        }
207        else {
208            innerWidth = $(this).width() * 0.68;
209        }
210
211        if (innerWidth > width) {
212            innerWidth = width;
213        }
214
215        /*if ($(window).width() > 678 && $(this).attr('id') != 'module64') {
216            innerWidth = $(this).width() * 0.30;
217        }*/
218
219        $(this).attr("style", "height: " + innerWidth + "px !important;aa");
220
221        //alert(width + " -- " + innerHeight);
222    });
223
224    setTimeout("FixIphoneSlideshowViewports2()", 500);
225}
226
227function FixIphoneSlideshowViewports2() {
228    $('.slideshowmodule').each(function () {
229        var width;
230        var innerWidth;
231        //width = $(window).height() * _heightPercentage;
232
233        width = $(window).height() * 0.5;
234
235        if ($(window).width() > 750) {
236            innerWidth = $(window).innerHeight();
237        }
238        else {
239            innerWidth = $(this).width() * 0.68;
240        }
241
242        if (innerWidth > width) {
243            innerWidth = width;
244        }
245
246        /*if ($(window).width() > 678 && $(this).attr('id') != 'module64') {
247            innerWidth = $(this).width() * 0.30;
248        }*/
249
250        $(this).attr("style", "height: " + innerWidth + "px !important;");
251        //alert(width + " -- " + innerHeight);
252
253        
254
255    });
256}
257
258/*** form functions ***/
259
260function SaveRegister() {
261    //event.preventDefault();
262
263    var isOK = CheckRequired('mregform', '');
264
265    if (isOK == '') {
266
267        $("#regbtt").prop('onclick', null).off('click');
268
269        //$('#passwdmsg').html('<img src="/access/gfx/loading.gif" width="20" height="20" alt="processing .."/>');
270        //$('#passwdmsg').show();
271
272        //var deparsel = $('#ctl00_textPL_Select1').val();
273
274        //console.log(deparsel);
275
276        var title = $('#titledd').val();
277
278        if (title == 'Please Select') {
279            title = '';
280        }
281
282        var country = $('#countrydd').val();
283
284        if (country == 'Please Select') {
285            country = '';
286        }
287
288        var postData = 'title=' + title + '&fname=' + $('#name').val() + '&sname=' + $('#surname').val()
289            + '&email=' + $('#email').val() + '&telephone=' + $('#phone').val()
290            + '&country=' + country + '&subject=register';
291
292        if ($('#contactcbx').is(':checked')) {
293            postData += '&cancontact=yes';
294        }
295        else {
296            postData += '&cancontact=';
297        }
298
299        //console.log(postData);
300
301        $.ajax({
302            type: 'POST',
303            url: 'ProcessForm.aspx',
304            data: postData,
305            error: function (msg) {
306                $('#formfields').fadeOut(700);
307
308                setTimeout("SaveRegister2();", 1000);
309            },
310            success: function (msg) {
311                $('#formfields').fadeOut(700);
312
313                setTimeout("SaveRegister2();", 1000);
314            }
315        });
316    }
317    else {
318        return false;
319    }
320
321}
322
323function SaveRegister2() {
324    $('#tymsg').fadeIn(700);
325
326    setTimeout("HideContactForm();", 10000);
327}
328
329function Dropdownshow(mydd) {
330    //alert("--" + mydd + "--");
331    $('.dropdownsmc').fadeOut();
332    $("." + mydd + "d").attr('style', 'display:block');
333}
334
335function HideContactForm() {
336    $('#contactformbigdiv').fadeOut();
337
338    $('#contactformimage').attr('style', '');
339    $('#contactformcontent').attr('style', '');
340    $('#formbluebox').attr('style', '');
341}
342
343function ShowContactForm() {
344    //RecordButtonClick(2);
345
346    $('#contactformbigdiv').fadeIn(900);
347
348    $('#contactformimage').animate({ left: '0' }, 900);
349
350    $('#contactformcontent').animate({ left: '50%' }, 900);
351
352    setTimeout("$('#formbluebox').fadeIn(900);", 950);
353}
354
355function RecordButtonClick(buttonId) {
356    var postData = 'button=' + buttonId;
357    //console.log(buttonId);
358    $.ajax({
359        type: 'POST',
360        url: 'RecordButtonClick.aspx',
361        data: postData,
362        timeout: 50000,
363        error: function (msg) {
364
365        },
366        success: function (msg) {
367
368        }
369    });
370}
371
372
373

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.