1//<![CDATA[ 2 3 /********************************** 4 Highslide Popup Script 5 ***********************************/ 6 7 hs.graphicsDir = '/images/highslide/graphics/', 8 hs.showCredits = false; 9 hs.dimmingOpacity = .85; 10 hs.useBox = false; 11 hs.allowHeightReduction = true; 12 hs.allowWidthReduction = true; 13 hs.align = 'center'; 14 hs.lang.restoreTitle = 'Click for next image'; 15 hs.zIndexCounter = 99999; 16 17 hs.Expander.prototype.onInit = function(sender) { 18 hs.Expander.prototype.onDrag = function(e) { 19 e.reflow(); 20 varHeight = ($(window).height() < (e.y.size + 40)) ? $(window).height() - 40 : e.y.size; 21 varWidth = e.x.size; 22 leftMove = ($(window).width() - varWidth) / 2; 23 topMove = (varHeight < $(window).height()) ? ((($(window).height() - varHeight) / 2) + $(window).scrollTop()) : $(window).scrollTop() + 20; 24 e.resizeTo(varWidth, varHeight); 25 e.moveTo(leftMove,topMove); 26 return false; 27 } 28 groupName = ''; 29 groupName = this.slideshowGroup; 30 if(groupName != 'misc' && groupName != undefined) { 31 // Add the slideshow providing the controlbar and the thumbstrip 32 if($(window).width() < 768 || $(window).height() < 800) { 33 margBottom = 146; 34 } else { 35 margBottom = 125; 36 } 37 hs.marginBottom = margBottom; // make room for the thumbstrip and the controls 38 hs.marginTop = 60; 39 hs.addSlideshow({ 40 slideshowGroup: groupName, 41 interval: 5000, 42 repeat: true, 43 useControls: true, 44 overlayOptions: { 45 className: 'text-controls', 46 position: 'bottom center', 47 relativeTo: 'viewport', 48 offsetY: -60 49 }, 50 thumbstrip: { 51 position: 'bottom center', 52 mode: 'horizontal', 53 relativeTo: 'viewport' 54 } 55 }); 56 57 // Cancel the default action for image click and do next instead 58 hs.Expander.prototype.onImageClick = function() { 59 return hs.next(); 60 }; 61 } else { 62 console.log(sender); 63 if(sender.contentType == 'image') { 64 if($(window).width() > 768 && $(window).height() < 800) { 65 hs.marginBottom = 80; 66 hs.marginTop = 80; 67 } else if($(window).width() < 768) { 68 hs.marginBottom = 60; 69 hs.marginTop = 60; 70 } 71 } else { 72 hs.marginBottom = 20; 73 hs.marginTop = 20; 74 } 75 } 76 hs.Expander.prototype.onBeforeExpand = function(e) { 77 e.el.draggable = false; 78 e.content.draggable = false; 79 $('.highslide-container').children('div').each(function(i) { 80 if(!$(this).attr('class') && $(this).children('div').hasClass('highslide-controls')) { 81 $(this).remove(); 82 } 83 }); 84 if(e.objectType != 'iframe' && e.contentType != 'image') { 85 if($(window).width() > 770) { 86 e.reflow(); 87 varHeight = ($(window).height() < (e.y.size + 40)) ? $(window).height() - 40 : e.y.size; 88 varWidth = e.x.size; 89 leftMove = ($(window).width() - varWidth) / 2; 90 topMove = (varHeight < $(window).height()) ? ((($(window).height() - varHeight) / 2) + $(window).scrollTop()) : $(window).scrollTop() + 20; 91 e.resizeTo(varWidth, varHeight); 92 e.moveTo(leftMove,topMove); 93 } else { 94 hs.height = $(window).height() - 40; 95 } 96 } 97 } 98 } 99 100hs.registerOverlay({ 101 html: '<div class="title"></div>', 102 position: 'top left', 103 fade: false, 104 offsetY: -45 105}); 106 107hs.registerOverlay({ 108 html: '<div class="altCaption"></div>', 109 position: 'bottom left', 110 offsetY: 35, 111 fade: false, 112}); 113 114hs.Expander.prototype.onAfterGetCaption = function (sender) { 115 fullWidth = (sender.x.full - 60); 116 galTitle = sender.thumb.title; 117 galCaption = sender.thumb.alt; 118 galCaption = (galCaption === undefined) ? sender.el.attributes.alt.value : galCaption; 119 120 setTimeout(function() { 121 $('.title').html(galTitle); 122 $('.title').parent().parent().css({'margin': '0px', 'width':'100%'});
123 $('.altCaption').html(galCaption); 124 }, 200); 125}; 126 127hs.registerOverlay({ 128 html: '<div class="closebutton" onclick="return hs.close(this)" title="Close"></div>', 129 position: 'top right', 130 useOnHtml: true 131}); 132 133 // Highslide fixed popup mod. Requires the "Events" component. 134 if (!hs.ie || hs.uaVersion > 6) hs.extend ( hs.Expander.prototype, { 135 fix: function(on) { 136 var sign = on ? -1 : 1, 137 stl = this.wrapper.style; 138 139 if (!on) hs.getPageSize(); // recalculate scroll positions 140 141 142 hs.setStyles (this.wrapper, { 143 position: on ? 'fixed' : 'absolute', 144 zoom: 1, // IE7 hasLayout bug, 145 left: (parseInt(stl.left) + sign * hs.page.scrollLeft) +'px', 146 top: (parseInt(stl.top) + sign * hs.page.scrollTop) +'px' 147 }); 148 149 if (this.outline) { 150 stl = this.outline.table.style; 151 hs.setStyles (this.outline.table, { 152 position: on ? 'fixed' : 'absolute', 153 zoom: 1, // IE7 hasLayout bug, 154 left: (parseInt(stl.left) + sign * hs.page.scrollLeft) +'px', 155 top: (parseInt(stl.top) + sign * hs.page.scrollTop) +'px' 156 }); 157 158 } 159 this.fixed = on; // flag for use on dragging 160 }, 161 onAfterExpand: function() { 162 this.fix(true); // fix the popup to viewport coordinates 163 }, 164 165 onBeforeClose: function() { 166 this.fix(false); // unfix to get the animation right 167 }, 168 169 onDrop: function() { 170 this.fix(true); // fix it again after dragging 171 }, 172 173 onDrag: function(sender, args) { 174 //if (this.fixed) { // only unfix it on the first drag event 175 this.fix(true); 176 //} 177 } 178 179 }); 180 181 //]]>
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.