1var addW, addH = 0; 2$(document).ready(function () { 3 $("img[class*=lightboxImage]").each(function () { 4 $(this).click(function () { 5 var tmpSrc = $(this).attr('src'); 6 var imgSrc = tmpSrc.substring(0, tmpSrc.indexOf('?')); 7 centerPopup(createBackPop(), createImageWrapper(), createImg(imgSrc + '?height=' + (document.documentElement.clientHeight - 60), $(this).attr('alt'))); 8 initLB(); 9 }); 10 }); 11 $("img[class*=lightboxSlideshow]").each(function () { 12 $(this).click(function () { 13 14 var slideid = $(this).attr('slideid'); 15 centerSlideshow(createBackPop(), createSlideshowWrapper(slideid), createSlideshow(slideid)); 16 initLB(); 17 }); 18 }); 19 addW = -22; 20 addH = 22; 21 if (getInternetExplorerVersion() != 6) { 22 addW = 0; addH = 0; 23 $(window).resize(function () { destLB(); }); 24 } 25}); 26 27function centerSlideshow(iObjBack, iObjWrap, iObjSlideShow) { 28 $('.lightBoxBlocker').remove(); 29 $('.lightboxPopupImageWrapper').remove(); 30 31 var winW = $(document).width(); // document.body.clientWidth; // document.documentElement.clientWidth; 32 var winH = $(document).height(); // document.body.clientHeight; // document.documentElement.clientHeight; 33 34 $('body').append(iObjBack); 35 $('.lightBoxBlocker').css({ 'width': (winW + addW), 'height': (winH + addH) }); //.fadeIn("slow"); 36 37 iObjWrap.append(createCloseTab()); 38 iObjWrap.html(iObjSlideShow); 39 $('body').append(iObjWrap); 40 41 var toppos = ((document.documentElement.clientHeight - $(this).height()) / 2) + $(window).scrollTop(); 42 var leftpos = (document.documentElement.clientWidth / 2); 43 44 //$(iObjWrap).css({ 'position': 'absolute', 'top': '200px', 'left': '200px' }); 45 $(iObjWrap).css({ 'position': 'absolute', 'top': '200px', 'left': Math.round(leftpos - 300), 'max-width': '650px' }); 46 47} 48 49function centerPopup(iObjBack, iObjWrap, iObjImg) { 50 $('.lightBoxBlocker').remove(); 51 $('.lightboxPopupImageWrapper').remove(); 52 53 var winW = $(document).width(); // document.body.clientWidth; // document.documentElement.clientWidth; 54 var winH = $(document).height(); // document.body.clientHeight; // document.documentElement.clientHeight; 55 56 $('body').append(iObjBack); 57 $('.lightBoxBlocker').css({ 'width': (winW + addW), 'height': (winH + addH) }); //.fadeIn("slow"); 58 59 iObjWrap.append(createCloseTab()); 60 iObjWrap.append(iObjImg); 61 $('body').append(iObjWrap); 62 63 var tmpImg = new Image(); 64 tmpImg.onload = function (evt) { 65 $(iObjWrap).css({ 'position': 'absolute', 'top': ((document.documentElement.clientHeight - this.height) / 2) + $(window).scrollTop(), 'left': ((document.documentElement.clientWidth - this.width) / 2) }); 66 } 67 tmpImg.src = iObjImg.attr('src'); 68} 69 70function createImageWrapper(iSrc, iAltTitle) { 71 return $('<div>').addClass('lightboxPopupImageWrapper').click(function () { destLB(); }); 72} 73function createSlideshowWrapper(iID) { 74 return $('<div>').addClass('lightboxPopupImageWrapper').click(function () { 75 //var SlideHtml = $('#js_slider' + iID + '_container').parent().html(); 76 77 78 }); //<div id="backgroundPopup"> </div> 79} 80function createBackPop() { 81 return $('<div>').addClass('lightBoxBlocker').html(' ').click(function () { destLB(); }); //<div id="backgroundPopup"> </div> 82} 83function createCloseTab() { 84 return $('<div>').addClass('displayBlock autoflow').html('<a href="#" class="close-button"><img class="close-x" src="/Content/Images/identifikation/soeg-bar/x-close.png"></a>'); 85 //return $('<div>').addClass('displayBlock autoflow').html('<a href="#" class="close-button"><img class="close-x" src="/Content/Images/identifikation/soeg-bar/x-close.png"></a><a href="javascript:void(0);" class="flashLeftPopupClose glob-main-color">Luk dette vindue</a>'); 86} 87function createImg(iSrc, iAltTitle) { 88 return $('<img>').addClass('padtop21').addClass('glob-image-responsive').attr({ src: iSrc, alt: iAltTitle, title: iAltTitle }); 89} 90function createSlideshow(iID) { 91 //alert($('#js_slider' + iID + '_container').html()); 92 var SlideHtml = $('#js_slider' + iID + '_container').parent().html(); 93 $('#js_slider' + iID + '_container').parent().html('<div id="js_slider' + iID + '_container_replaced"></div>'); 94 return SlideHtml; 95} 96 97function initLB() { 98 $('.lightboxPopupImageWrapper').fadeIn("slow"); 99 $('.lightBoxBlocker').fadeTo('slow', 0.7); 100} 101function destLB() { 102 $('.lightboxPopupImageWrapper').fadeOut("slow"); 103 $('.lightBoxBlocker').fadeOut("slow"); 104}
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.