PageSourceSearch

https://www.windsurf.co.uk/wp-content/themes/windsurf/js/myplugins.js?v=1.2

js windsurf.co.uk collected 2026-09-24 10:06:49 UTC 40,050 bytes, 850 lines download raw bytes

1// Avoid `console` errors in browsers that lack a console.
2if (!(window.console && console.log)) {
3    (function () {
4        var noop = function () {
5        };
6        var methods = ['assert', 'clear', 'count', 'debug', 'dir', 'dirxml', 'error', 'exception', 'group', 'groupCollapsed', 'groupEnd', 'info', 'log', 'markTimeline', 'profile', 'profileEnd', 'markTimeline', 'table', 'time', 'timeEnd', 'timeStamp', 'trace', 'warn'];
7        var length = methods.length;
8        var console = window.console = {};
9        while (length--) {
10            console[methods[length]] = noop;
11        }
12    }());
13}
14// Place any jQuery/helper plugins in here.
15/*! Backstretch - v2.0.0 - 2012-09-05
16 * http://srobbin.com/jquery-plugins/backstretch/
17 * Copyright (c) 2012 Scott Robbin; Licensed MIT */
18(function (e, t, n) {
19    "use strict";
20    e.fn.backstretch = function (n, r) {
21        return e( t ).scrollTop() === 0 && t.scrollTo( 0, 0 ), this.each( function () {
22            var t = e( this ), s = t.data( "backstretch" );
23            s && (r = e.extend( s.options, r ), s.destroy( !0 )), s = new i( this, n, r ), t.data( "backstretch", s )
24        } )
25    }, e.backstretch = function (t, n) {
26        return e( "body" ).backstretch( t, n ).data( "backstretch" )
27    }, e.expr[":"].backstretch = function (t) {
28        return e( t ).data( "backstretch" ) !== n
29    }, e.fn.backstretch.defaults = {centeredX: !0, centeredY: !0, duration: 5e3, fade: 0};
30    var r = {
31        wrap: {
32            left: 0,
33            top: 0,
34            overflow: "hidden",
35            margin: 0,
36            padding: 0,
37            height: "100%",
38            width: "100%",
39            zIndex: -999999
40        },
41        img: {
42            position: "absolute",
43            display: "none",
44            margin: 0,
45            padding: 0,
46            border: "none",
47            width: "auto",
48            height: "auto",
49            maxWidth: "none",
50            zIndex: -999999
51        }
52    }, i = function (n, i, o) {
53        this.options = e.extend( {}, e.fn.backstretch.defaults, o || {} ), this.images = e.isArray( i ) ? i : [i], e.each( this.images, function () {
54            e( "<img />" )[0].src = this
55        } ), this.isBody = n === document.body, this.$container = e( n ), this.$wrap = e( '<div class="backstretch"></div>' ).css( r.wrap ).appendTo( this.$container ), this.$root = this.isBody ? s ? e( t ) : e( document ) : this.$container;
56        if (!this.isBody) {
57            var u = this.$container.css( "position" ), a = this.$container.css( "zIndex" );
58            this.$container.css( {
59                position: u === "static" ? "relative" : u,
60                zIndex: a === "auto" ? 0 : a,
61                background: "none"
62            } ), this.$wrap.css( {zIndex: -999998} )
63        }
64        this.$wrap.css( {position: this.isBody && s ? "fixed" : "absolute"} ), this.index = 0, this.show( this.index ), e( t ).on( "resize.backstretch", e.proxy( this.resize, this ) ).on( "orientationchange.backstretch", e.proxy( function () {
65            this.isBody && t.pageYOffset === 0 && (t.scrollTo( 0, 1 ), this.resize())
66        }, this ) )
67    };
68    i.prototype = {
69        resize: function () {
70            try {
71                var e = {left: 0, top: 0}, n = this.isBody ? this.$root.width() : this.$root.innerWidth(), r = n,
72                    i = this.isBody ? t.innerHeight ? t.innerHeight : this.$root.height() : this.$root.innerHeight(),
73                    s = r / this.$img.data( "ratio" ), o;
74                s >= i ? (o = (s - i) / 2, this.options.centeredY && (e.top = "-" + o + "px")) : (s = i, r = s * this.$img.data( "ratio" ), o = (r - n) / 2, this.options.centeredX && (e.left = "-" + o + "px")), this.$wrap.css( {
75                    width: n,
76                    height: i
77                } ).find( "img:not(.deleteable)" ).css( {width: r, height: s} ).css( e )
78            } catch (u) {
79            }
80            return this
81        }, show: function (t) {
82            if (Math.abs( t ) > this.images.length - 1)return;
83            this.index = t;
84            var n = this, i = n.$wrap.find( "img" ).addClass( "deleteable" ),
85                s = e.Event( "backstretch.show", {relatedTarget: n.$container[0]} );
86            return clearInterval( n.interval ), n.$img = e( "<img />" ).css( r.img ).bind( "load", function (t) {
87                var r = this.width || e( t.target ).width(), o = this.height || e( t.target ).height();
88                e( this ).data( "ratio", r / o ), n.resize(), e( this ).fadeIn( n.options.fade || n.options.speed, function () {
89                    i.remove(), n.paused || n.cycle(), n.$container.trigger( s )
90                } )
91            } ).appendTo( n.$wrap ), n.$img.attr( "src", n.images[t] ), n
92        }, next: function () {
93            return this.show( this.index < this.images.length - 1 ? this.index + 1 : 0 )
94        }, prev: function () {
95            return this.show( this.index === 0 ? this.images.length - 1 : this.index - 1 )
96        }, pause: function () {
97            return this.paused = !0, this
98        }, resume: function () {
99            return this.paused = !1, this.next(), this
100        }, cycle: function () {
101            return this.images.length > 1 && (clearInterval( this.interval ), this.interval = setInterval( e.proxy( function () {
102                this.paused || this.next()
103            }, this ), this.options.duration )), this
104        }, destroy: function (n) {
105            e( t ).off( "resize.backstretch orientationchange.backstretch" ), clearInterval( this.interval ), n || this.$wrap.remove(), this.$container.removeData( "backstretch" )
106        }
107    };
108    var s = function () {
109        var e = navigator.userAgent, n = navigator.platform, r = e.match( /AppleWebKit\/([0-9]+)/ ), i = !!r && r[1],
110            s = e.match( /Fennec\/([0-9]+)/ ), o = !!s && s[1], u = e.match( /Opera Mobi\/([0-9]+)/ ), a = !!u && u[1],
111            f = e.match( /MSIE ([0-9]+)/ ), l = !!f && f[1];
112        return !((n.indexOf( "iPhone" ) > -1 || n.indexOf( "iPad" ) > -1 || n.indexOf( "iPod" ) > -1) && i && i < 534 || t.operamini && {}.toString.call( t.operamini ) === "[object OperaMini]" || u && a < 7458 || e.indexOf( "Android" ) > -1 && i && i < 533 || o && o < 6 || "palmGetResource" in t && i && i < 534 || e.indexOf( "MeeGo" ) > -1 && e.indexOf( "NokiaBrowser/8.5.0" ) > -1 || l && l <= 6)
113    }()
114})( jQuery, window );
115/* Jquery Columnizer */
116//////////////////////////
117(function ($) {
118    $.fn.columnize = function (options) {
119        var defaults = {
120            width: 400, columns: false, buildOnce: false, overflow: false, doneFunc: function () {
121            }, target: false, ignoreImageLoading: true, columnFloat: "left", lastNeverTallest: false, accuracy: false
122        };
123        var options = $.extend( defaults, options );
124        if (typeof(options.width) == "string") {
125            options.width = parseInt( options.width );
126            if (isNaN( options.width )) {
127                options.width = defaults.width;
128            }
129        }
130        return this.each( function () {
131            var $inBox = options.target ? $( options.target ) : $( this );
132            var maxHeight = $( this ).height();
133            var $cache = $( '<div></div>' );
134            var lastWidth = 0;
135            var columnizing = false;
136            var adjustment = 0;
137            $cache.append( $( this ).contents().clone( true ) );
138            if (!options.ignoreImageLoading && !options.target) {
139                if (!$inBox.data( "imageLoaded" )) {
140                    $inBox.data( "imageLoaded", true );
141                    if ($( this ).find( "img" ).length > 0) {
142                        var func = function ($inBox, $cache) {
143                            return function () {
144                                if (!$inBox.data( "firstImageLoaded" )) {
145                                    $inBox.data( "firstImageLoaded", "true" );
146                                    $inBox.empty().append( $cache.children().clone( true ) );
147                                    $inBox.columnize( options );
148                                }
149                            }
150                        }( $( this ), $cache );
151                        $( this ).find( "img" ).one( "load", func );
152                        $( this ).find( "img" ).one( "abort", func );
153                        return;
154                    }
155                }
156            }
157            $inBox.empty();
158            columnizeIt();
159            if (!options.buildOnce) {
160                $( window ).resize( function () {
161                    if (!options.buildOnce && $.browser.msie) {
162                        if ($inBox.data( "timeout" )) {
163                            clearTimeout( $inBox.data( "timeout" ) );
164                        }
165                        $inBox.data( "timeout", setTimeout( columnizeIt, 200 ) );
166                    } else if (!options.buildOnce) {
167                        columnizeIt();
168                    } else {
169                    }
170                } );
171            }
172            function columnize($putInHere, $pullOutHere, $parentColumn, height) {
173                while ($parentColumn.height() < height && $pullOutHere[0].childNodes.length) {
174                    $putInHere.append( $pullOutHere[0].childNodes[0] );
175                }
176                if ($putInHere[0].childNodes.length == 0)return;
177                var kids = $putInHere[0].childNodes;
178                var lastKid = kids[kids.length - 1];
179                $putInHere[0].removeChild( lastKid );
180                var $item = $( lastKid );
181                if ($item[0].nodeType == 3) {
182                    var oText = $item[0].nodeValue;
183                    var counter2 = options.width / 18;
184                    if (options.accuracy)
185                        counter2 = options.accuracy;
186                    var columnText;
187                    var latestTextNode = null;
188                    while ($parentColumn.height() < height && oText.length) {
189                        if (oText.indexOf( ' ', counter2 ) != '-1') {
190                            columnText = oText.substring( 0, oText.indexOf( ' ', counter2 ) );
191                        } else {
192                            columnText = oText;
193                        }
194                        latestTextNode = document.createTextNode( columnText );
195                        $putInHere.append( latestTextNode );
196                        if (oText.length > counter2) {
197                            oText = oText.substring( oText.indexOf( ' ', counter2 ) );
198                        } else {
199                            oText = "";
200                        }
201                    }
202                    if ($parentColumn.height() >= height && latestTextNode != null) {
203                        $putInHere[0].removeChild( latestTextNode );
204                        oText = latestTextNode.nodeValue + oText;
205                    }
206                    if (oText.length) {
207                        $item[0].nodeValue = oText;
208                    } else {
209                        return false;
210                    }
211                }
212                if ($pullOutHere.children().length) {
213                    $pullOutHere.prepend( $item );
214                } else {
215                    $pullOutHere.append( $item );
216                }
217                return $item[0].nodeType == 3;
218            }
219
220            function split($putInHere, $pullOutHere, $parentColumn, height) {
221                if ($pullOutHere.children().length) {
222                    $cloneMe = $pullOutHere.children( ":first" );
223                    $clone = $cloneMe.clone( true );
224                    if ($clone.prop( "nodeType" ) == 1 && !$clone.hasClass( "dontend" )) {
225                        $putInHere.append( $clone );
226                        if ($clone.is( "img" ) && $parentColumn.height() < height + 20) {
227                            $cloneMe.remove();
228                        } else if (!$cloneMe.hasClass( "dontsplit" ) && $parentColumn.height() < height + 20) {
229                            $cloneMe.remove();
230                        } else if ($clone.is( "img" ) || $cloneMe.hasClass( "dontsplit" )) {
231                            $clone.remove();
232                        } else {
233                            $clone.empty();
234                            if (!columnize( $clone, $cloneMe, $parentColumn, height )) {
235                                if ($cloneMe.children().length) {
236                                    split( $clone, $cloneMe, $parentColumn, height );
237                                }
238                            }
239                            if ($clone.get( 0 ).childNodes.length == 0) {
240                                $clone.remove();
241                            }
242                        }
243                    }
244                }
245            }
246
247            function singleColumnizeIt() {
248                if ($inBox.data( "columnized" ) && $inBox.children().length == 1) {
249                    return;
250                }
251                $inBox.data( "columnized", true );
252                $inBox.data( "columnizing", true );
253                $inBox.empty();
254                $inBox.append( $( "<div class='first last column' style='width:100%; float: " + options.columnFloat + ";'></div>" ) );
255                $col = $inBox.children().eq( $inBox.children().length - 1 );
256                $destroyable = $cache.clone( true );
257                if (options.overflow) {
258                    targetHeight = options.overflow.height;
259                    columnize( $col, $destroyable, $col, targetHeight );
260                    if (!$destroyable.contents().find( ":first-child" ).hasClass( "dontend" )) {
261                        split( $col, $destroyable, $col, targetHeight );
262                    }
263                    while (checkDontEndColumn( $col.children( ":last" ).length && $col.children( ":last" ).get( 0 ) )) {
264                        var $lastKid = $col.children( ":last" );
265                        $lastKid.remove();
266                        $destroyable.prepend( $lastKid );
267                    }
268                    var html = "";
269                    var div = document.createElement( 'DIV' );
270                    while ($destroyable[0].childNodes.length > 0) {
271                        var kid = $destroyable[0].childNodes[0];
272                        for (var i = 0; i < kid.attributes.length; i++) {
273                            if (kid.attributes[i].nodeName.indexOf( "jQuery" ) == 0) {
274                                kid.removeAttribute( kid.attributes[i].nodeName );
275                            }
276                        }
277                        div.innerHTML = "";
278                        div.appendChild( $destroyable[0].childNodes[0] );
279                        html += div.innerHTML;
280                    }
281                    var overflow = $( options.overflow.id )[0];
282                    overflow.innerHTML = html;
283                } else {
284                    $col.append( $destroyable );
285                }
286                $inBox.data( "columnizing", false );
287                if (options.overflow) {
288                    options.overflow.doneFunc();
289                }
290            }
291
292            function checkDontEndColumn(dom) {
293                if (dom.nodeType != 1)return false;
294                if ($( dom ).hasClass( "dontend" ))return true;
295                if (dom.childNodes.length == 0)return false;
296                return checkDontEndColumn( dom.childNodes[dom.childNodes.length - 1] );
297            }
298
299            function columnizeIt() {
300                if (lastWidth == $inBox.width())return;
301                lastWidth = $inBox.width();
302                var numCols = Math.round( $inBox.width() / options.width );
303                if (options.columns) numCols = options.columns;
304                if (numCols <= 1) {
305                    return singleColumnizeIt();
306                }
307                if ($inBox.data( "columnizing" ))return;
308                $inBox.data( "columnized", true );
309                $inBox.data( "columnizing", true );
310                $inBox.empty();
311                $inBox.append( $( "<div style='width:" + (Math.floor( 100 / numCols )) + "%; float: " + options.columnFloat + ";'></div>" ) );
312                $col = $inBox.children( ":last" );
313                $col.append( $cache.clone() );
314                maxHeight = $col.height();
315                $inBox.empty();
316                var targetHeight = maxHeight / numCols;
317                var firstTime = true;
318                var maxLoops = 3;
319                var scrollHorizontally = false;
320                if (options.overflow) {
321                    maxLoops = 1;
322                    targetHeight = options.overflow.height;
323                } else if (options.height && options.width) {
324                    maxLoops = 1;
325                    targetHeight = options.height;
326                    scrollHorizontally = true;
327                }
328                for (var loopCount = 0; loopCount < maxLoops; loopCount++) {
329                    $inBox.empty();
330                    var $destroyable;
331                    try {
332                        $destroyable = $cache.clone( true );
333                    } catch (e) {
334                        $destroyable = $cache.clone();
335                    }
336                    $destroyable.css( "visibility", "hidden" );
337                    for (var i = 0; i < numCols; i++) {
338                        var className = (i == 0) ? "first column" : "column";
339                        var className = (i == numCols - 1) ? ("last " + className) : className;
340                        $inBox.append( $( "<div class='" + className + "' style='width:" + (Math.floor( 100 / numCols )) + "%; float: " + options.columnFloat + ";'></div>" ) );
341                    }
342                    var i = 0;
343                    while (i < numCols - (options.overflow ? 0 : 1) || scrollHorizontally && $destroyable.contents().length) {
344                        if ($inBox.children().length <= i) {
345                            $inBox.append( $( "<div class='" + className + "' style='width:" + (Math.floor( 100 / numCols )) + "%; float: " + options.columnFloat + ";'></div>" ) );
346                        }
347                        var $col = $inBox.children().eq( i );
348                        columnize( $col, $destroyable, $col, targetHeight );
349                        if (!$destroyable.contents().find( ":first-child" ).hasClass( "dontend" )) {
350                            split( $col, $destroyable, $col, targetHeight );
351                        } else {
352                        }
353                        while (checkDontEndColumn( $col.children( ":last" ).length && $col.children( ":last" ).get( 0 ) )) {
354                            var $lastKid = $col.children( ":last" );
355                            $lastKid.remove();
356                            $destroyable.prepend( $lastKid );
357                        }
358                        i++;
359                    }
360                    if (options.overflow && !scrollHorizontally) {
361                        var IE6 = false;
362                        var IE7 = (document.all) && (navigator.appVersion.indexOf( "MSIE 7." ) != -1);
363                        if (IE6 || IE7) {
364                            var html = "";
365                            var div = document.createElement( 'DIV' );
366                            while ($destroyable[0].childNodes.length > 0) {
367                                var kid = $destroyable[0].childNodes[0];
368                                for (var i = 0; i < kid.attributes.length; i++) {
369                                    if (kid.attributes[i].nodeName.indexOf( "jQuery" ) == 0) {
370                                        kid.removeAttribute( kid.attributes[i].nodeName );
371                                    }
372                                }
373                                div.innerHTML = "";
374                                div.appendChild( $destroyable[0].childNodes[0] );
375                                html += div.innerHTML;
376                            }
377                            var overflow = $( options.overflow.id )[0];
378                            overflow.innerHTML = html;
379                        } else {
380                            $( options.overflow.id ).empty().append( $destroyable.contents().clone( true ) );
381                        }
382                    } else if (!scrollHorizontally) {
383                        $col = $inBox.children().eq( $inBox.children().length - 1 );
384                        while ($destroyable.contents().length)$col.append( $destroyable.contents( ":first" ) );
385                        var afterH = $col.height();
386                        var diff = afterH - targetHeight;
387                        var totalH = 0;
388                        var min = 10000000;
389                        var max = 0;
390                        var lastIsMax = false;
391                        $inBox.children().each( function ($inBox) {
392                            return function ($item) {
393                                var h = $inBox.children().eq( $item ).height();
394                                lastIsMax = false;
395                                totalH += h;
396                                if (h > max) {
397                                    max = h;
398                                    lastIsMax = true;
399                                }
400                                if (h < min) min = h;
401                            }
402                        }( $inBox ) );
403                        var avgH = totalH / numCols;
404                        if (options.lastNeverTallest && lastIsMax) {
405                            adjustment += 30;
406                            if (adjustment < 100) {
407                                targetHeight = targetHeight + 30;
408                                if (loopCount == maxLoops - 1) maxLoops++;
409                            } else {
410                                debugger;
411                                loopCount = maxLoops;
412                            }
413                        } else if (max - min > 30) {
414                            targetHeight = avgH + 30;
415                        } else if (Math.abs( avgH - targetHeight ) > 20) {
416                            targetHeight = avgH;
417                        } else {
418                            loopCount = maxLoops;
419                        }
420                    } else {
421                        $inBox.children().each( function (i) {
422                            $col = $inBox.children().eq( i );
423                            $col.width( options.width + "px" );
424                            if (i == 0) {
425                                $col.addClass( "first" );
426                            } else if (i == $inBox.children().length - 1) {
427                                $col.addClass( "last" );
428                            } else {
429                                $col.removeClass( "first" );
430                                $col.removeClass( "last" );
431                            }
432                        } );
433                        $inBox.width( $inBox.children().length * options.width + "px" );
434                    }
435                    $inBox.append( $( "<br style='clear:both;'>" ) );
436                }
437                $inBox.find( '.column' ).find( ':first.removeiffirst' ).remove();
438                $inBox.find( '.column' ).find( ':last.removeiflast' ).remove();
439                $inBox.data( "columnizing", false );
440                if (options.overflow) {
441                    options.overflow.doneFunc();
442                }
443                options.doneFunc();
444            }
445        } );
446    };
447})( jQuery );
448// Tiny Scroller
449(function (a) {
450    a.tiny = a.tiny || {};
451    a.tiny.scrollbar = {
452        options: {
453            axis: "y",
454            wheel: 40,
455            scroll: true,
456            lockscroll: true,
457            size: "auto",
458            sizethumb: "auto",
459            invertscroll: false
460        }
461    };
462    a.fn.tinyscrollbar = function (d) {
463        var c = a.extend( {}, a.tiny.scrollbar.options, d );
464        this.each( function () {
465            a( this ).data( "tsb", new b( a( this ), c ) )
466        } );
467        return this
468    };
469    a.fn.tinyscrollbar_update = function (c) {
470        return a( this ).data( "tsb" ).update( c )
471    };
472    function b(q, g) {
473        var k = this, t = q, j = {obj: a( ".viewport", q )}, h = {obj: a( ".overview", q )},
474            d = {obj: a( ".scrollbar", q )}, m = {obj: a( ".track", d.obj )}, p = {obj: a( ".thumb", d.obj )},
475            l = g.axis === "x", n = l ? "left" : "top", v = l ? "Width" : "Height", r = 0, y = {start: 0, now: 0},
476            o = {}, e = "ontouchstart" in document.documentElement;
477
478        function c() {
479            k.update();
480            s();
481            return k
482        }
483
484        this.update = function (z) {
485            j[g.axis] = j.obj[0]["offset" + v];
486            h[g.axis] = h.obj[0]["scroll" + v];
487            h.ratio = j[g.axis] / h[g.axis];
488            d.obj.toggleClass( "disable", h.ratio >= 1 );
489            m[g.axis] = g.size === "auto" ? j[g.axis] : g.size;
490            p[g.axis] = Math.min( m[g.axis], Math.max( 0, (g.sizethumb === "auto" ? (m[g.axis] * h.ratio) : g.sizethumb) ) );
491            d.ratio = g.sizethumb === "auto" ? (h[g.axis] / m[g.axis]) : (h[g.axis] - j[g.axis]) / (m[g.axis] - p[g.axis]);
492            r = (z === "relative" && h.ratio <= 1) ? Math.min( (h[g.axis] - j[g.axis]), Math.max( 0, r ) ) : 0;
493            r = (z === "bottom" && h.ratio <= 1) ? (h[g.axis] - j[g.axis]) : isNaN( parseInt( z, 10 ) ) ? r : parseInt( z, 10 );
494            w()
495        };
496        function w() {
497            var z = v.toLowerCase();
498            p.obj.css( n, r / d.ratio );
499            h.obj.css( n, -r );
500            o.start = p.obj.offset()[n];
501            d.obj.css( z, m[g.axis] );
502            m.obj.css( z, m[g.axis] );
503            p.obj.css( z, p[g.axis] )
504        }
505
506        function s() {
507            if (!e) {
508                p.obj.bind( "mousedown", i );
509                m.obj.bind( "mouseup", u )
510            } else {
511                j.obj[0].ontouchstart = function (z) {
512                    if (1 === z.touches.length) {
513                        i( z.touches[0] );
514                        z.stopPropagation()
515                    }
516                }
517            }
518            if (g.scroll && window.addEventListener) {
519                t[0].addEventListener( "DOMMouseScroll", x, false );
520                t[0].addEventListener( "mousewheel", x, false )
521            } else {
522                if (g.scroll) {
523                    t[0].onmousewheel = x
524                }
525            }
526        }
527
528        function i(A) {
529            a( "body" ).addClass( "noSelect" );
530            var z = parseInt( p.obj.css( n ), 10 );
531            o.start = l ? A.pageX : A.pageY;
532            y.start = z == "auto" ? 0 : z;
533            if (!e) {
534                a( document ).bind( "mousemove", u );
535                a( document ).bind( "mouseup", f );
536                p.obj.bind( "mouseup", f )
537            } else {
538                document.ontouchmove = function (B) {
539                    B.preventDefault();
540                    u( B.touches[0] )
541                };
542                document.ontouchend = f
543            }
544        }
545
546        function x(B) {
547            if (h.ratio < 1) {
548                var A = B || window.event, z = A.wheelDelta ? A.wheelDelta / 120 : -A.detail / 3;
549                r -= z * g.wheel;
550                r = Math.min( (h[g.axis] - j[g.axis]), Math.max( 0, r ) );
551                p.obj.css( n, r / d.ratio );
552                h.obj.css( n, -r );
553                if (g.lockscroll || (r !== (h[g.axis] - j[g.axis]) && r !== 0)) {
554                    A = a.event.fix( A );
555                    A.preventDefault()
556                }
557            }
558        }
559
560        function u(z) {
561            if (h.ratio < 1) {
562                if (g.invertscroll && e) {
563                    y.now = Math.min( (m[g.axis] - p[g.axis]), Math.max( 0, (y.start + (o.start - (l ? z.pageX : z.pageY))) ) )
564                } else {
565                    y.now = Math.min( (m[g.axis] - p[g.axis]), Math.max( 0, (y.start + ((l ? z.pageX : z.pageY) - o.start)) ) )
566                }
567                r = y.now * d.ratio;
568                h.obj.css( n, -r );
569                p.obj.css( n, y.now )
570            }
571        }
572
573        function f() {
574            a( "body" ).removeClass( "noSelect" );
575            a( document ).unbind( "mousemove", u );
576            a( document ).unbind( "mouseup", f );
577            p.obj.unbind( "mouseup", f );
578            document.ontouchmove = document.ontouchend = null
579        }
580
581        return c()
582    }
583}( jQuery ));
584//My script
585var hideTop;
586if (typeof(background) != "undefined") $.backstretch( background );
587$( document ).ready( function (e) {
588    if (jQuery.isFunction( jQuery.fn.fancybox )) {
589        $( "a[rel=fancybox]" ).fancybox();
590		// detect direct image links in post body & add fancybox
591		$('a[href$=".jpg"], a[href$=".jpeg"], a[href$=".png"]', '.post-body' ).attr('rel', 'gallery').fancybox();
592    }
593
594    $( "#respond_all.js input" ).focusin( function (e) {
595        $( this ).parents( "div.comment-form-field" ).children( "label" ).animate( {
596            opacity: 0
597        }, 250, function (e) {
598            $( e ).hide();
599        } );
600    } );
601
602    $( "#respond_all.js input" ).focusout( function (e) {
603        if (jQuery( this ).val() == "")
604            $( this ).parents( "div.comment-form-field" ).children( "label" ).animate( {
605                opacity: 1
606            }, 250, function (e) {
607                $( e ).show();
608            } );
609    } );
610
611    $( ".select_star" ).click( function () {
612        var star_class = $( this ).attr( "class" );
613        var pos = star_class.search( "x" ) + 1;
614        var rating = star_class.substring( pos, pos + 1 );
615        $( ".select_rating" ).children( "div" ).each( function (index, element) {
616            if (index < rating) {
617                $( this ).removeClass( "no_star" );
618            } else {
619                $( this ).addClass( "no_star" );
620            }
621        } );
622        $( "#beach_rating" ).val( rating );
623        $( "#beach_rating" ).attr( "value", rating )
624    } );
625    if ($( "#email" ).val() != "") {
626        $( "#label_email" ).attr( "style", "display:none;" );
627    }
628    if ($( "#author" ).val() != "") {
629        $( "#label_author" ).attr( "style", "display:none;" );
630    }
631    if ($( "#url" ).val() != "") {
632        $( "#label_url" ).attr( "style", "display:none;" );
633    }
634    $( "#comment" ).focus( function (e) {
635        $( "#comment-form-identity" ).slideDown( "fast" );
636        $( "#comment-form-subscribe" ).slideDown( "fast" );
637        $( ".form-submit" ).slideDown( "fast" );
638    } );
639    $( "#tweetblender-2 .sidebar-title" ).html( "&nbsp;" );
640    $( "#wpinstagram-widget-2 h3" ).remove();
641    $( "#wpinstagram-widget-2" ).prepend( '<div id="instragram_title"></div>' );
642    if ($( "#cookies .cookies_info" ).css( "display" ) == "none") hideCookies(); else window.setTimeout( hideCookies, 20000 );
643    var img_top = $( "img.top" ).parentsUntil( "p" ).parent();
644    var img_bottom = $( "img.bottom" ).parentsUntil( "p" ).parent();
645    if (img_top.length != 0) $( ".test-content" ).prepend( img_top );
646    if (img_bottom.length != 0) $( ".test-content" ).append( img_bottom );
647    $( '.test-body' ).columnize( {width: 290, lastNeverTallest: true} );
648    $( '.test-body li' ).addClass( "dontsplit" );
649    $( 'table' ).addClass( "dontsplit" );
650    $( '#featured-body' ).tinyscrollbar();
651    hideTop = window.setTimeout( hideBanner, 5000 );
652    $( ".header_featured" ).mouseenter( function (e) {
653        window.clearTimeout( hideTop )
654    } );
655    $( ".header_featured" ).mouseleave( function (e) {
656        hideTop = window.setTimeout( hideBanner, 5000 )
657    } );
658    $( "#show_hide" ).click( function (e) {
659        if ($( "#content_featured" ).css( "display" ) != "none") {
660            $( "#content_featured" ).slideUp( "slow", function () {
661                $( "#show_hide" ).css( "background-position", "-254px -145px" )
662            } )
663        } else {
664            $( "#content_featured" ).slideDown( "slow", function () {
665                $( "#show_hide" ).css( "background-position", "-254px -130px" )
666            } )
667        }
668    } )
669} );
670
671function hideCookies() {
672    if ($( "#loginform" ).css( "display" ) == "block")
673        $( "#loginform" ).slideUp();
674    $( "#log_in_button" ).html( "Log In" );
675    $( "#cookies .icon_info" ).animate( {opacity: 0.4}, 'fast' );
676    $( "#cookies .cookies_info" ).slideUp( "slow" );
677    $( "#cookies .icon_info" ).mouseenter( function (e) {
678        $( this ).animate( {opacity: 1}, 'fast', function () {
679            $( this ).removeClass( "transparente" )
680        } )
681    } );
682    $( "#cookies .icon_info" ).mouseleave( function (e) {
683        if ($( "#cookies .cookies_info" ).css( "display" ) == "none") {
684            $( this ).animate( {opacity: 0.4}, 'fast', function () {
685                $( this ).addClass( "transparente" )
686            } )
687        }
688    } );
689
690    $( "#cookies .icon_info" ).click( function (e) {
691        if ($( "#cookies .cookies_info" ).css( "display" ) == "none") {
692            if ($( "#loginform" ).css( "display" ) == "block") {
693                $( "#loginform" ).css( "display", "none" );
694                window.setTimeout( function () {
695                    $( "#cookies .cookies_info" ).slideDown( "slow" );
696                }, 100 );
697                $( "#cookies .icon_info" ).removeClass( "transparente" );
698                $( "#log_in_button" ).html( "Log In" );
699            } else {
700                $( "#cookies .icon_info" ).removeClass( "transparente" );
701                $( "#cookies .cookies_info" ).slideDown( "slow" )
702            }
703
704            if ($( "#sall" ).css( "width" ) == "150px") {
705                $( "#sall" ).css( "width", "0px" );
706                $( "#global_search" ).css( "width", "31px" );
707                $( this ).removeClass( "transparente" );
708                $( "#cookies .cookies_info" ).slideDown( "slow" );
709            } else {
710                $( this ).removeClass( "transparente" );
711                $( "#cookies .cookies_info" ).slideDown( "slow" )
712            }
713
714        } else {
715            $( this ).addClass( "transparente" );
716            $( "#cookies .cookies_info" ).slideUp( "slow" );
717            $( this ).animate( {opacity: 0.4}, 'fast' )
718        }
719    } )
720}
721
722function validate(e) {
723    var form = e.id;
724    var error;
725    var name;
726    var pattern = new RegExp( /^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$/i );
727    $( "#" + form ).find( "input" ).each( function (index, element) {
728        name = $( this ).attr( "placeholder" );
729        error = false;
730        if ($( this ).attr( "required" ) == "required" && $( this ).val() == "") {
731            $( this ).focus();
732            $( "#msg" ).html( "*Please fill all required fields. (" + name + ")" );
733            error = true;
734            return false
735        } else {
736            if ($( this ).attr( "placeholder" ) == $( this ).val()) {
737                $( this ).focus();
738                $( "#msg" ).html( "*Please fill all required fields. (" + name + ")" );
739                error = true;
740                return false
741            } else {
742                if ($( this ).attr( "type" ) == "email" && !pattern.test( $( this ).val() )) {
743                    $( this ).focus();
744                    $( "#msg" ).html( "*Please use a valid email address." );
745                    error = true;
746                    return false
747                }
748            }
749        }
750    } );
751    if (error === true)return false; else {
752        $( "#" + form ).find( "textarea" ).each( function (index, element) {
753            error = false;
754            if ($( this ).attr( "required" ) == "required" && $( this ).val() == "") {
755                $( this ).focus();
756                $( "#msg" ).html( "*Please fill all required areas." );
757                error = true;
758                return false
759            }
760        } );
761        if (error === true)return false
762    }
763}
764function featured(url) {
765    var w = screen.width;
766    var h = screen.height - 100;
767    if (w < 1500)var x = window.open( url, "featured", 'top=0,left=0,width=' + w + ',height=' + h ); else var x = window.open( url, "featured", 'top=0,left=0,width=' + 1500 + ',height=' + 1000 )
768}
769function hideBanner() {
770    $( ".header_featured" ).slideUp( "slow" )
771}
772
773function logForm() {
774    if ($( "#loginform" ).css( "display" ) == "none") {
775        if ($( "#cookies .cookies_info" ).css( "display" ) == "block") {
776            $( "#cookies .icon_info" ).animate( {opacity: 0.4}, 'fast' );
777            $( "#cookies .icon_info" ).addClass( "transparente" );
778            $( "#cookies .cookies_info" ).css( "display", "none" );
779            window.setTimeout( function () {
780                $( "#loginform" ).slideDown( function () {
781                    $( "#user_login" ).focus();
782                } );
783            }, 1000 );
784        }
785        else if ($( "#global_search" ).css( "width" ) == "190px") {
786            $( "#global_search" ).css( "width", "31px" );
787            $( "#sall" ).css( "width", "0px" );
788        }
789        $( "#loginform" ).slideDown( function () {
790            $( "#user_login" ).focus();
791        } );
792        $( "#log_in_button" ).html( "Cancel" );
793    }
794    else {
795        $( "#loginform" ).slideUp();
796        $( "#log_in_button" ).html( "Log In" );
797    }
798}
799
800function showResults() {
801    if ($( "#sall" ).css( "width" ) == "0px") {
802        if ($( "#loginform" ).css( "display" ) != "none") {
803            $( "#loginform" ).css( "display", "none" );
804            $( "#log_in_button" ).html( "Log In" );
805        }
806        if ($( "#cookies .cookies_info" ).css( "display" ) == "block") {
807            $( "#cookies .icon_info" ).animate( {opacity: 0.4}, 'fast' );
808            $( "#cookies .icon_info" ).addClass( "transparente" );
809            $( "#cookies .cookies_info" ).css( "display", "none" );
810        }
811        $( "#sall" ).animate( {width: "150px"}, "slow" );
812        $( "#global_search" ).animate( {width: "190px"}, "slow" );
813        return false
814    } else {
815        if ($( ".sall" ).val() == "") {
816            $( "#sall" ).animate( {width: "0px"}, "slow" );
817            $( "#global_search" ).animate( {width: "31px"}, "slow" );
818            return false
819        } else
820            return true
821    }
822}
823
824function setCookie(c_name, value, exdays) {
825    var exdate = new Date();
826    exdate.setDate( exdate.getDate() + exdays );
827    var c_value = escape( value ) + ((exdays == null) ? "" : "; expires=" + exdate.toUTCString());
828    document.cookie = c_name + "=" + c_value;
829}
830function getCookie(c_name) {
831    var i, x, y, ARRcookies = document.cookie.split( ";" );
832    for (i = 0; i < ARRcookies.length; i++) {
833        x = ARRcookies[i].substr( 0, ARRcookies[i].indexOf( "=" ) );
834        y = ARRcookies[i].substr( ARRcookies[i].indexOf( "=" ) + 1 );
835        x = x.replace( /^\s+|\s+$/g, "" );
836        if (x == c_name) {
837            return unescape( y );
838        }
839    }
840}
841function coming_soon(e) {
842    var avai = $( e ).parents( ".app" ).children( ".title" );
843    avai.html( "Coming Soon" );
844    var soon = window.setTimeout( function () {
845        soon_out( avai )
846    }, 2000 );
847}
848function soon_out(e) {
849    e.html( "Available on" );
850}

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.