/**/ (function() { var files = ["https://lh3.googleusercontent.com/-j4N2KS9Z2Dk/T-uywnRT10I/AAAAAAAAAGg/kCn6bYZVoZYXG8rWFm4jkag5xSN3WgxCACHMYBhgL/s1024/Slide1.jpg", "https://lh3.googleusercontent.com/--e0NfWdozZQ/UCNyNJAQybI/AAAAAAAAAIo/ZLBQbOO4LXQuh01FGLBkDU5bwcU7xECfQCHMYBhgL/s1024/louis_lebel_v2.jpg", "https://lh3.googleusercontent.com/-sJbdDSqLmZo/T-uykL3xn5I/AAAAAAAAAGY/mIwPpp2ipJMYIrtdrqXapI2PVK6ACR4BQCHMYBhgL/s1024/Slide5.jpg", "https://lh3.googleusercontent.com/-6DJrT1nw4p4/UCNx-4o1tTI/AAAAAAAAAIU/AheaNtkO_OEugjT0_EtaOgFMP2VTh05pACHMYBhgL/s1024/peter_haas_v2.jpg", "https://lh3.googleusercontent.com/-TY4eCupHQzc/T-uyzhTNwOI/AAAAAAAAAGw/ioV1_xkCWos07wphf69pohXXjMrQVf0zwCHMYBhgL/s1024/Slide3.jpg", "https://lh3.googleusercontent.com/-zFFP4VpWWds/T-uyyOzloqI/AAAAAAAAAGo/DGoTuXutlHIVpqtPSj76QBnc96cMLrTigCHMYBhgL/s1024/Slide2.jpg", "https://lh3.googleusercontent.com/-XrqNq_SB1BE/UP804W5IfkI/AAAAAAAAAJ0/lOSFbGVhdyAeeGvVDkUed6qEwvLG3Q7qACHMYBhgL/s1024/Slide4.jpg"], currentObj = null, currentIndex = Math.floor(Math.random() * files.length), frame = document.getElementById("slideshow"), frameW = parseInt("0"), frameH = parseInt("0"), scale = parseInt("1"), raf = window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.oRequestAnimationFrame || window.msRequestAnimationFrame || function(callback, element) {setTimeout(callback, 16)}, alpha if (~navigator.userAgent.indexOf("MSIE")) { alpha = function(o, n) { o.style.filter = "alpha(opacity=" + Math.floor(n * 100) + ")"; } } else { alpha = function(o, n) { o.style.opacity = n; } } if (!frameW) { frameW = parseInt(frame.offsetWidth); } else { frame.style.width = frameW + "px"; } if (!frameH) { frameH = parseInt(frame.offsetHeight); } else { frame.style.height = frameH + "px"; } frame.style.overflow = "hidden"; frame.style.position = "relative"; frame.style.background = "#eee"; show(); function show() { var img = document.createElement("img"); img.onload = function () { if (img.width / img.height * scale > frameW / frameH * scale) { img.height *= (frameW / img.width); img.width = frameW; } else { img.width *= (frameH / img.height); img.height = frameH; } img.style.position = "absolute"; img.style.borderStyle = "solid"; img.style.borderWidth = Math.ceil(frameH - img.height) / 2 + "px " + Math.ceil(frameW - img.width) / 2 + "px"; img.style.borderColor = "#eee"; if (!currentObj) { frame.appendChild(img); currentObj = img; setTimeout(show, 5000); } else { frame.insertBefore(img, currentObj); var start = getTimer(); function fade() { var n = (getTimer() - start) / 1000; if (n > 1) { frame.removeChild(currentObj); currentObj = img; setTimeout(show, 4000); } else { alpha(currentObj, 1 - n); raf(fade); } } fade(); } }; img.onerror = function() { setTimeout(show, 500); }; img.src = files[(currentIndex ++) % files.length]; } function getTimer() { return new Date().getTime(); } })();