(function() { var ua = navigator.userAgent.toLowerCase(), S = { version: "3.0b", adapter: null, cache: [], client: { isIE: ua.indexOf("msie") > -1, isIE6: ua.indexOf("msie 6") > -1, isIE7: ua.indexOf("msie 7") > -1, isGecko: ua.indexOf("gecko") > -1 && ua.indexOf("safari") == -1, isWebkit: ua.indexOf("applewebkit/") > -1, isWindows: ua.indexOf("windows") > -1 || ua.indexOf("win32") > -1, isMac: ua.indexOf("macintosh") > -1 || ua.indexOf("mac os x") > -1, isLinux: ua.indexOf("linux") > -1 }, content: null, current: -1, dimensions: null, gallery: [], expando: "shadowboxCacheKey", libraries: { Prototype: "prototype", jQuery: "jquery", MooTools: "mootools", YAHOO: "yui", dojo: "dojo", Ext: "ext" }, options: { adapter: null, animate: true, animateFade: true, autoplayMovies: true, continuous: false, ease: function(x) { return 1 + Math.pow(x - 1, 3) }, enableKeys: true, errors: { fla: { name: "Flash", url: "http://www.adobe.com/products/flashplayer/" }, qt: { name: "QuickTime", url: "http://www.apple.com/quicktime/download/" }, wmp: { name: "Windows Media Player", url: "http://www.microsoft.com/windows/windowsmedia/" }, f4m: { name: "Flip4Mac", url: "http://www.flip4mac.com/wmv_download.htm"} }, ext: { img: ["png", "jpg", "jpeg", "gif", "bmp"], swf: ["swf"], flv: ["flv", "m4v"], qt: ["dv", "mov", "moov", "movie", "mp4"], wmp: ["asf", "wm", "wmv"], qtwmp: ["avi", "mpg", "mpeg"] }, flashParams: { bgcolor: "#000000", allowfullscreen: true }, flashVars: {}, flashVersion: "9.0.115", handleOversize: "resize", handleUnsupported: "link", language: "en", onChange: null, onClose: null, onFinish: null, onOpen: null, players: ["img"], showMovieControls: true, skipSetup: false, slideshowDelay: 0, useSizzle: true, viewportPadding: 20 }, path: "", plugins: null, ready: false, regex: { domain: /:\/\/(.*?)[:\/]/, inline: /#(.+)$/, rel: /^(light|shadow)box/i, gallery: /^(light|shadow)box\[(.*?)\]/i, unsupported: /^unsupported-(\w+)/, param: /\s*([a-z_]*?)\s*=\s*(.+)\s*/ }, applyOptions: function(opts) { if (opts) { default_options = apply({}, S.options); apply(S.options, opts) } }, revertOptions: function() { apply(S.options, default_options) }, change: function(index) { if (!S.gallery) { return } if (!S.gallery[index]) { if (!S.options.continuous) { return } else { index = index < 0 ? S.gallery.length - 1 : 0 } } S.current = index; if (typeof slide_timer == "number") { clearTimeout(slide_timer); slide_timer = null; slide_delay = slide_start = 0 } if (S.options.onChange) { S.options.onChange() } loadContent() }, close: function() { if (!active) { return } active = false; listenKeys(false); if (S.content) { S.content.remove(); S.content = null } if (typeof slide_timer == "number") { clearTimeout(slide_timer) } slide_timer = null; slide_delay = 0; if (S.options.onClose) { S.options.onClose() } S.skin.onClose(); S.revertOptions() }, contentId: function() { return content_id }, error: function(msg) { if (!S.debug) { return } if (typeof window.console != "undefined" && typeof console.log == "function") { console.log(msg) } else { alert(msg) } }, getCurrent: function() { return S.current > -1 ? S.gallery[S.current] : null }, hasNext: function() { return S.gallery.length > 1 && (S.current != S.gallery.length - 1 || S.options.continuous) }, init: function(opts) { if (initialized) { return } initialized = true; opts = opts || {}; init_options = opts; if (opts) { apply(S.options, opts) } for (var e in S.options.ext) { S.regex[e] = new RegExp(".(" + S.options.ext[e].join("|") + ")s*$", "i") } if (!S.path) { var pathre = /(.+\/)shadowbox\.js/i, path; each(document.getElementsByTagName("script"), function(s) { path = pathre.exec(s.src); if (path) { S.path = path[1]; return false } }) } if (S.options.adapter) { S.adapter = S.options.adapter.toLowerCase() } else { for (var lib in S.libraries) { if (typeof window[lib] != "undefined") { S.adapter = S.libraries[lib]; break } } if (!S.adapter) { S.adapter = "base" } } if (S.options.useSizzle && !window.Sizzle) { if (window.jQuery) { window.Sizzle = jQuery.find } else { U.include(S.path + "libraries/sizzle/sizzle.js") } } if (!S.lang) { U.include(S.path + "languages/shadowbox-" + S.options.language + ".js") } each(S.options.players, function(p) { if ((p == "swf" || p == "flv") && !window.swfobject) { U.include(S.path + "libraries/swfobject/swfobject.js") } if (!S[p]) { U.include(S.path + "players/shadowbox-" + p + ".js") } }); if (!S.lib) { U.include(S.path + "adapters/shadowbox-" + S.adapter + ".js") } waitDom(waitLibs) }, isActive: function() { return active }, isPaused: function() { return slide_timer == "paused" }, load: function() { if (S.ready) { return } S.ready = true; if (S.skin.options) { apply(S.options, S.skin.options); apply(S.options, init_options) } S.skin.init(); if (!S.options.skipSetup) { S.setup() } }, next: function() { S.change(S.current + 1) }, open: function(obj) { if (U.isLink(obj)) { if (S.inCache(obj)) { obj = S.cache[obj[S.expando]] } else { obj = S.buildCacheObj(obj) } } if (obj.constructor == Array) { S.gallery = obj; S.current = 0 } else { if (!obj.gallery) { S.gallery = [obj]; S.current = 0 } else { S.current = null; S.gallery = []; each(S.cache, function(c) { if (c.gallery && c.gallery == obj.gallery) { if (S.current == null && c.content == obj.content && c.title == obj.title) { S.current = S.gallery.length } S.gallery.push(c) } }); if (S.current == null) { S.gallery.unshift(obj); S.current = 0 } } } obj = S.getCurrent(); if (obj.options) { S.revertOptions(); S.applyOptions(obj.options) } var item, remove, m, format, replace, oe = S.options.errors, msg, el; for (var i = 0; i < S.gallery.length; ++i) { item = S.gallery[i] = apply({}, S.gallery[i]); remove = false; if (m = S.regex.unsupported.exec(item.player)) { if (S.options.handleUnsupported == "link") { item.player = "html"; switch (m[1]) { case "qtwmp": format = "either"; replace = [oe.qt.url, oe.qt.name, oe.wmp.url, oe.wmp.name]; break; case "qtf4m": format = "shared"; replace = [oe.qt.url, oe.qt.name, oe.f4m.url, oe.f4m.name]; break; default: format = "single"; if (m[1] == "swf" || m[1] == "flv") { m[1] = "fla" } replace = [oe[m[1]].url, oe[m[1]].name] } msg = S.lang.errors[format].replace(/\{(\d+)\}/g, function(m, n) { return replace[n] }); item.content = '<div class="sb-message">' + msg + "</div>" } else { remove = true } } else { if (item.player == "inline") { m = S.regex.inline.exec(item.content); if (m) { var el = U.get(m[1]); if (el) { item.content = el.innerHTML } else { S.error("Cannot find element with id " + m[1]) } } else { S.error("Cannot find element id for inline content") } } else { if (item.player == "swf" || item.player == "flv") { var version = (item.options && item.options.flashVersion) || S.options.flashVersion; if (!swfobject.hasFlashPlayerVersion(version)) { item.width = 310; item.height = 177 } } } } if (remove) { S.gallery.splice(i, 1); if (i < S.current) { --S.current } else { if (i == S.current) { S.current = i > 0 ? i - 1 : i } } --i } } if (S.gallery.length) { if (!active) { if (typeof S.options.onOpen == "function" && S.options.onOpen(obj) === false) { return } S.skin.onOpen(obj, loadContent) } else { loadContent() } active = true } }, pause: function() { if (typeof slide_timer != "number") { return } var time = new Date().getTime(); slide_delay = Math.max(0, slide_delay - (time - slide_start)); if (slide_delay) { clearTimeout(slide_timer); slide_timer = "paused"; if (S.skin.onPause) { S.skin.onPause() } } }, play: function() { if (!S.hasNext()) { return } if (!slide_delay) { slide_delay = S.options.slideshowDelay * 1000 } if (slide_delay) { slide_start = new Date().getTime(); slide_timer = setTimeout(function() { slide_delay = slide_start = 0; S.next() }, slide_delay); if (S.skin.onPlay) { S.skin.onPlay() } } }, previous: function() { S.change(S.current - 1) }, setDimensions: function(height, width, max_h, max_w, tb, lr, resizable) { var h = height = parseInt(height), w = width = parseInt(width), pad = parseInt(S.options.viewportPadding) || 0; var extra_h = 2 * pad + tb; if (h + extra_h >= max_h) { h = max_h - extra_h } var extra_w = 2 * pad + lr; if (w + extra_w >= max_w) { w = max_w - extra_w } var resize_h = height, resize_w = width, change_h = (height - h) / height, change_w = (width - w) / width, oversized = (change_h > 0 || change_w > 0); if (resizable && oversized && S.options.handleOversize == "resize") { if (change_h > change_w) { w = Math.round((width / height) * h) } else { if (change_w > change_h) { h = Math.round((height / width) * w) } } resize_w = w; resize_h = h } S.dimensions = { height: h + tb, width: w + lr, inner_h: h, inner_w: w, top: (max_h - (h + extra_h)) / 2 + pad, left: (max_w - (w + extra_w)) / 2 + pad, oversized: oversized, resize_h: resize_h, resize_w: resize_w} }, setup: function(links, opts) { each(S.findLinks(links), function(link) { S.addCache(link, opts) }) }, teardown: function(links) { each(S.findLinks(links), S.removeCache) }, findLinks: function(links) { if (!links) { var links = [], rel; each(document.getElementsByTagName("a"), function(a) { rel = a.getAttribute("rel"); if (rel && S.regex.rel.test(rel)) { links.push(a) } }) } else { var len = links.length; if (len) { if (window.Sizzle) { if (typeof links == "string") { links = Sizzle(links) } else { if (len == 2 && links.push && typeof links[0] == "string" && links[1].nodeType) { links = Sizzle(links[0], links[1]) } } } } else { links = [links] } } return links }, inCache: function(link) { return typeof link[S.expando] == "number" && S.cache[link[S.expando]] }, addCache: function(link, opts) { if (!S.inCache(link)) { link[S.expando] = S.cache.length; S.lib.addEvent(link, "click", handleClick) } S.cache[link[S.expando]] = S.buildCacheObj(link, opts) }, removeCache: function(link) { S.lib.removeEvent(link, "click", handleClick); S.cache[link[S.expando]] = null; delete link[S.expando] }, clearCache: function() { each(S.cache, function(obj) { S.removeCache(obj.link) }); S.cache = [] }, buildCacheObj: function(link, opts) { var obj = { link: link, title: link.getAttribute("title"), options: apply({}, opts || {}), content: link.href }; if (opts) { each(["player", "title", "height", "width", "gallery"], function(option) { if (typeof obj.options[option] != "undefined") { obj[option] = obj.options[option]; delete obj.options[option] } }) } if (!obj.player) { obj.player = S.getPlayer(obj.content) } var rel = link.getAttribute("rel"); if (rel) { var match = rel.match(S.regex.gallery); if (match) { obj.gallery = escape(match[2]) } each(rel.split(";"), function(parameter) { match = parameter.match(S.regex.param); if (match) { if (match[1] == "options") { eval("apply(obj.options," + match[2] + ")") } else { obj[match[1]] = match[2] } } }) } return obj }, getPlayer: function(content) { var r = S.regex, p = S.plugins, m = content.match(r.domain), same_domain = m && document.domain == m[1]; if (content.indexOf("#") > -1 && same_domain) { return "inline" } var q = content.indexOf("?"); if (q > -1) { content = content.substring(0, q) } if (r.img.test(content)) { return "img" } if (r.swf.test(content)) { return p.fla ? "swf" : "unsupported-swf" } if (r.flv.test(content)) { return p.fla ? "flv" : "unsupported-flv" } if (r.qt.test(content)) { return p.qt ? "qt" : "unsupported-qt" } if (r.wmp.test(content)) { if (p.wmp) { return "wmp" } if (p.f4m) { return "qt" } if (S.client.isMac) { return p.qt ? "unsupported-f4m" : "unsupported-qtf4m" } return "unsupported-wmp" } if (r.qtwmp.test(content)) { if (p.qt) { return "qt" } if (p.wmp) { return "wmp" } return S.client.isMac ? "unsupported-qt" : "unsupported-qtwmp" } return "iframe" } }, U = S.util = { animate: function(el, p, to, d, cb) { var from = parseFloat(S.lib.getStyle(el, p)); if (isNaN(from)) { from = 0 } var delta = to - from; if (delta == 0) { if (cb) { cb() } return } var op = p == "opacity"; function fn(ease) { var to = from + ease * delta; if (op) { U.setOpacity(el, to) } else { el.style[p] = to + "px" } } if (!d || (!op && !S.options.animate) || (op && !S.options.animateFade)) { fn(1); if (cb) { cb() } return } d *= 1000; var begin = new Date().getTime(), ease = S.options.ease, end = begin + d, time, timer = setInterval(function() { time = new Date().getTime(); if (time >= end) { clearInterval(timer); fn(1); if (cb) { cb() } } else { fn(ease((time - begin) / d)) } }, 10) }, apply: function(o, e) { for (var p in e) { o[p] = e[p] } return o }, clearOpacity: function(el) { var s = el.style; if (window.ActiveXObject) { if (typeof s.filter == "string" && (/alpha/i).test(s.filter)) { s.filter = s.filter.replace(/[\w\.]*alpha\(.*?\);?/i, "") } } else { s.opacity = "" } }, each: function(obj, fn, scope) { for (var i = 0, len = obj.length; i < len; ++i) { if (fn.call(scope || obj[i], obj[i], i, obj) === false) { return } } }, get: function(id) { return document.getElementById(id) }, include: function() { var includes = {}; return function(file) { if (includes[file]) { return } includes[file] = true; var head = document.getElementsByTagName("head")[0], script = document.createElement("script"); script.src = file; head.appendChild(script) } } (), isLink: function(obj) { if (!obj || !obj.tagName) { return false } var up = obj.tagName.toUpperCase(); return up == "A" || up == "AREA" }, removeChildren: function(el) { while (el.firstChild) { el.removeChild(el.firstChild) } }, setOpacity: function(el, o) { var s = el.style; if (window.ActiveXObject) { s.zoom = 1; s.filter = (s.filter || "").replace(/\s*alpha\([^\)]*\)/gi, "") + (o == 1 ? "" : " alpha(opacity=" + (o * 100) + ")") } else { s.opacity = o } } }, apply = U.apply, each = U.each, init_options, initialized = false, default_options = {}, content_id = "sb-content", active = false, slide_timer, slide_start, slide_delay = 0; if (navigator.plugins && navigator.plugins.length) { var names = []; each(navigator.plugins, function(p) { names.push(p.name) }); names = names.join(); var f4m = names.indexOf("Flip4Mac") > -1; S.plugins = { fla: names.indexOf("Shockwave Flash") > -1, qt: names.indexOf("QuickTime") > -1, wmp: !f4m && names.indexOf("Windows Media") > -1, f4m: f4m} } else { function detectPlugin(n) { try { var axo = new ActiveXObject(n) } catch (e) { } return !!axo } S.plugins = { fla: detectPlugin("ShockwaveFlash.ShockwaveFlash"), qt: detectPlugin("QuickTime.QuickTime"), wmp: detectPlugin("wmplayer.ocx"), f4m: false} } function waitDom(cb) { if (document.addEventListener) { document.addEventListener("DOMContentLoaded", function() { document.removeEventListener("DOMContentLoaded", arguments.callee, false); cb() }, false) } else { if (document.attachEvent) { document.attachEvent("onreadystatechange", function() { if (document.readyState === "complete") { document.detachEvent("onreadystatechange", arguments.callee); cb() } }); if (document.documentElement.doScroll && window == window.top) { (function() { if (S.ready) { return } try { document.documentElement.doScroll("left") } catch (error) { setTimeout(arguments.callee, 0); return } cb() })() } } } if (typeof window.onload == "function") { var oldonload = window.onload; window.onload = function() { oldonload(); cb() } } else { window.onload = cb } } function waitLibs() { if (S.lib && S.lang) { S.load() } else { setTimeout(waitLibs, 0) } } function handleClick(e) { var link; if (U.isLink(this)) { link = this } else { link = S.lib.getTarget(e); while (!U.isLink(link) && link.parentNode) { link = link.parentNode } } S.lib.preventDefault(e); if (link) { S.open(link); if (S.gallery.length) { S.lib.preventDefault(e) } } } function listenKeys(on) { if (!S.options.enableKeys) { return } S.lib[(on ? "add" : "remove") + "Event"](document, "keydown", handleKey) } function handleKey(e) { var code = S.lib.keyCode(e), handler; switch (code) { case 81: case 88: case 27: handler = S.close; break; case 37: handler = S.previous; break; case 39: handler = S.next; break; case 32: handler = typeof slide_timer == "number" ? S.pause : S.play } if (handler) { S.lib.preventDefault(e); handler() } } function loadContent() { var obj = S.getCurrent(); if (!obj) { return } var p = obj.player == "inline" ? "html" : obj.player; if (typeof S[p] != "function") { S.error("Unknown player: " + p) } var change = false; if (S.content) { S.content.remove(); change = true; S.revertOptions(); if (obj.options) { S.applyOptions(obj.options) } } U.removeChildren(S.skin.bodyEl()); S.content = new S[p](obj); listenKeys(false); S.skin.onLoad(S.content, change, function() { if (!S.content) { return } if (typeof S.content.ready != "undefined") { var id = setInterval(function() { if (S.content) { if (S.content.ready) { clearInterval(id); id = null; S.skin.onReady(contentReady) } } else { clearInterval(id); id = null } }, 100) } else { S.skin.onReady(contentReady) } }); if (S.gallery.length > 1) { var next = S.gallery[S.current + 1] || S.gallery[0]; if (next.player == "img") { var a = new Image(); a.src = next.content } var prev = S.gallery[S.current - 1] || S.gallery[S.gallery.length - 1]; if (prev.player == "img") { var b = new Image(); b.src = prev.content } } } function contentReady() { if (!S.content) { return } S.content.append(S.skin.bodyEl(), content_id, S.dimensions); S.skin.onFinish(finishContent) } function finishContent() { if (!S.content) { return } if (S.content.onLoad) { S.content.onLoad() } if (S.options.onFinish) { S.options.onFinish() } if (!S.isPaused()) { S.play() } listenKeys(true) } window.Shadowbox = S })(); (function() { var g = Shadowbox, f = g.util, q = false, b = [], m = ["sb-nav-close", "sb-nav-next", "sb-nav-play", "sb-nav-pause", "sb-nav-previous"], o = { markup: '<div id="sb-container"><div id="sb-overlay"></div><div id="sb-wrapper"><div id="sb-title"><div id="sb-title-inner"></div></div><div id="sb-body"><div id="sb-body-inner"></div><div id="sb-loading"><a onclick="Shadowbox.close()">{cancel}</a></div></div><div id="sb-body-bottom"></div><div id="sb-info"><div id="sb-info-inner"><div id="sb-counter"></div><div id="sb-nav"><a id="sb-nav-close" title="{close}" onclick="Shadowbox.close()"></a><a id="sb-nav-next" title="{next}" onclick="Shadowbox.next()"></a><a id="sb-nav-play" title="{play}" onclick="Shadowbox.play()"></a><a id="sb-nav-pause" title="{pause}" onclick="Shadowbox.pause()"></a><a id="sb-nav-previous" title="{previous}" onclick="Shadowbox.previous()"></a></div><div style="clear:both"></div></div></div></div></div>', options: { animSequence: "sync", autoDimensions: false, counterLimit: 10, counterType: "default", displayCounter: true, displayNav: true, fadeDuration: 0.35, initialHeight: 160, initialWidth: 320, modal: false, overlayColor: "#000", overlayOpacity: 0.8, resizeDuration: 0.35, showOverlay: true, troubleElements: ["select", "object", "embed", "canvas"] }, init: function() { var s = o.markup.replace(/\{(\w+)\}/g, function(w, x) { return g.lang[x] }); g.lib.append(document.body, s); if (g.client.isIE6) { f.get("sb-body").style.zoom = 1; var u, r, t = /url\("(.*\.png)"\)/; f.each(m, function(w) { u = f.get(w); if (u) { r = g.lib.getStyle(u, "backgroundImage").match(t); if (r) { u.style.backgroundImage = "none"; u.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true,src=" + r[1] + ",sizingMethod=scale);" } } }) } var v; g.lib.addEvent(window, "resize", function() { if (v) { clearTimeout(v); v = null } if (g.isActive()) { v = setTimeout(function() { o.onWindowResize(); var w = g.content; if (w && w.onWindowResize) { w.onWindowResize() } }, 50) } }) }, bodyEl: function() { return f.get("sb-body-inner") }, onOpen: function(u, r) { e(false); var t = g.options.autoDimensions && "height" in u ? u.height : g.options.initialHeight, s = g.options.autoDimensions && "width" in u ? u.width : g.options.initialWidth; f.get("sb-container").style.display = "block"; var v = p(t, s); d(v.inner_h, v.top, false); h(v.width, v.left, false); i(r) }, onLoad: function(s, t, r) { k(true); j(t, function() { if (!s) { return } if (!t) { f.get("sb-wrapper").style.display = "" } r() }) }, onReady: function(r) { var t = g.content; if (!t) { return } var s = p(t.height, t.width, t.resizable); o.resizeContent(s.inner_h, s.width, s.top, s.left, true, function() { l(r) }) }, onFinish: function(r) { k(false, r) }, onClose: function() { i(); e(true) }, onPlay: function() { c("play", false); c("pause", true) }, onPause: function() { c("pause", false); c("play", true) }, onWindowResize: function() { var t = g.content; if (!t) { return } var s = p(t.height, t.width, t.resizable); h(s.width, s.left, false); d(s.inner_h, s.top, false); var r = f.get(g.contentId()); if (r) { if (t.resizable && g.options.handleOversize == "resize") { r.height = s.resize_h; r.width = s.resize_w } } }, resizeContent: function(s, t, w, v, u, r) { var y = g.content; if (!y) { return } var x = p(y.height, y.width, y.resizable); switch (g.options.animSequence) { case "hw": d(x.inner_h, x.top, u, function() { h(x.width, x.left, u, r) }); break; case "wh": h(x.width, x.left, u, function() { d(x.inner_h, x.top, u, r) }); break; default: h(x.width, x.left, u); d(x.inner_h, x.top, u, r) } } }; function n() { f.get("sb-container").style.top = document.documentElement.scrollTop + "px" } function e(r) { if (r) { f.each(b, function(s) { s[0].style.visibility = s[1] || "" }) } else { b = []; f.each(g.options.troubleElements, function(s) { f.each(document.getElementsByTagName(s), function(t) { b.push([t, t.style.visibility]); t.style.visibility = "hidden" }) }) } } function i(r) { var s = f.get("sb-overlay"), t = f.get("sb-container"), v = f.get("sb-wrapper"); if (r) { if (g.client.isIE6) { n(); g.lib.addEvent(window, "scroll", n) } if (g.options.showOverlay) { q = true; s.style.backgroundColor = g.options.overlayColor; f.setOpacity(s, 0); if (!g.options.modal) { g.lib.addEvent(s, "click", g.close) } v.style.display = "none" } t.style.visibility = "visible"; if (q) { var u = parseFloat(g.options.overlayOpacity); f.animate(s, "opacity", u, g.options.fadeDuration, r) } else { r() } } else { if (g.client.isIE6) { g.lib.removeEvent(window, "scroll", n) } g.lib.removeEvent(s, "click", g.close); if (q) { v.style.display = "none"; f.animate(s, "opacity", 0, g.options.fadeDuration, function() { t.style.display = ""; v.style.display = ""; f.clearOpacity(s) }) } else { t.style.visibility = "hidden" } } } function c(t, r) { var s = f.get("sb-nav-" + t); if (s) { s.style.display = r ? "" : "none" } } function k(s, r) { var u = f.get("sb-loading"), w = g.getCurrent().player, v = (w == "img" || w == "html"); if (s) { function t() { f.clearOpacity(u); if (r) { r() } } f.setOpacity(u, 0); u.style.display = ""; if (v) { f.animate(u, "opacity", 1, g.options.fadeDuration, t) } else { t() } } else { function t() { u.style.display = "none"; f.clearOpacity(u); if (r) { r() } } if (v) { f.animate(u, "opacity", 0, g.options.fadeDuration, t) } else { t() } } } function a(u) { var z = g.getCurrent(); f.get("sb-title-inner").innerHTML = z.title || ""; var C, t, x, D, s; if (g.options.displayNav) { C = true; var B = g.gallery.length; if (B > 1) { if (g.options.continuous) { t = s = true } else { t = (B - 1) > g.current; s = g.current > 0 } } if (g.options.slideshowDelay > 0 && g.hasNext()) { D = !g.isPaused(); x = !D } } else { C = t = x = D = s = false } c("close", C); c("next", t); c("play", x); c("pause", D); c("previous", s); var r = ""; if (g.options.displayCounter && g.gallery.length > 1) { var B = g.gallery.length; if (g.options.counterType == "skip") { var y = 0, w = B, v = parseInt(g.options.counterLimit) || 0; if (v < B && v > 2) { var A = Math.floor(v / 2); y = g.current - A; if (y < 0) { y += B } w = g.current + (v - A); if (w > B) { w -= B } } while (y != w) { if (y == B) { y = 0 } r += '<a onclick="Shadowbox.change(' + y + ');"'; if (y == g.current) { r += ' class="sb-counter-current"' } r += ">" + (y++) + "</a>" } } else { var r = (g.current + 1) + " " + g.lang.of + " " + B } } f.get("sb-counter").innerHTML = r; u() } function j(u, s) { var y = f.get("sb-wrapper"), B = f.get("sb-title"), v = f.get("sb-info"), r = f.get("sb-title-inner"), z = f.get("sb-info-inner"), A = parseInt(g.lib.getStyle(r, "height")) || 0, x = parseInt(g.lib.getStyle(z, "height")) || 0; var w = function() { r.style.visibility = z.style.visibility = "hidden"; a(s) }; if (u) { f.animate(B, "height", 0, 0.35); f.animate(v, "height", 0, 0.35); f.animate(y, "paddingTop", A, 0.35); f.animate(y, "paddingBottom", x, 0.35, w) } else { B.style.height = v.style.height = "0px"; y.style.paddingTop = A + "px"; y.style.paddingBottom = x + "px"; w() } } function l(u) { var s = f.get("sb-wrapper"), w = f.get("sb-title"), v = f.get("sb-info"), z = f.get("sb-title-inner"), y = f.get("sb-info-inner"), x = parseInt(g.lib.getStyle(z, "height")) || 0, r = parseInt(g.lib.getStyle(y, "height")) || 0; z.style.visibility = y.style.visibility = ""; if (z.innerHTML != "") { f.animate(w, "height", x, 0.35); f.animate(s, "paddingTop", 0, 0.35) } f.animate(v, "height", r, 0.35); f.animate(s, "paddingBottom", 0, 0.35, u) } function d(u, z, y, r) { var A = f.get("sb-body"), x = f.get("sb-wrapper"), w = parseInt(u), v = parseInt(z); if (y) { f.animate(A, "height", w, g.options.resizeDuration); f.animate(x, "top", v, g.options.resizeDuration, r) } else { A.style.height = w + "px"; x.style.top = v + "px"; if (r) { r() } } } function h(x, z, y, r) { var v = f.get("sb-wrapper"), u = parseInt(x), t = parseInt(z); if (y) { f.animate(v, "width", u, g.options.resizeDuration); f.animate(v, "left", t, g.options.resizeDuration, r) } else { v.style.width = u + "px"; v.style.left = t + "px"; if (r) { r() } } } function p(r, u, t) { var s = f.get("sb-body-inner"); sw = f.get("sb-wrapper"), so = f.get("sb-overlay"), tb = sw.offsetHeight - s.offsetHeight, lr = sw.offsetWidth - s.offsetWidth, max_h = so.offsetHeight, max_w = so.offsetWidth; g.setDimensions(r, u, max_h, max_w, tb, lr, t); return g.dimensions } g.skin = o })();
if(typeof jQuery=="undefined"){throw"Unable to load Shadowbox adapter, jQuery not found"}if(typeof Shadowbox=="undefined"){throw"Unable to load Shadowbox adapter, Shadowbox not found"}(function(b,a){a.lib={getStyle:function(d,c){return b(d).css(c)},remove:function(c){b(c).remove()},getTarget:function(c){return c.target},getPageXY:function(c){return[c.pageX,c.pageY]},preventDefault:function(c){c.preventDefault()},keyCode:function(c){return c.keyCode},addEvent:function(e,c,d){b(e).bind(c,d)},removeEvent:function(e,c,d){b(e).unbind(c,d)},append:function(d,c){b(d).append(c)}}})(jQuery,Shadowbox);(function(a){a.fn.shadowbox=function(b){return this.each(function(){var d=a(this);var e=a.extend({},b||{},a.metadata?d.metadata():a.meta?d.data():{});var c=this.className||"";e.width=parseInt((c.match(/w:(\d+)/)||[])[1])||e.width;e.height=parseInt((c.match(/h:(\d+)/)||[])[1])||e.height;Shadowbox.setup(d,e)})}})(jQuery);
if(typeof Shadowbox=="undefined"){throw"Unable to load Shadowbox language file, Shadowbox not found."}Shadowbox.lang={code:"nl",of:"/",loading:"",cancel:"",next:"",previous:"",play:"",pause:"",close:"",errors:{single:'U moet de <a href="{0}">{1}</a> browser plugin installeren om dit media type te kunnen bekijken.',shared:'U moet de <a href="{0}">{1}</a> en de <a href="{2}">{3}</a> browser plugins installeren om dit media type te kunnen bekijken.',either:'U moet de <a href="{0}">{1}</a> of de <a href="{2}">{3}</a> browser plugin installeren om dit media type te kunnen bekijken.'}};
(function(b) { var a = b.util, c = 20; b.flv = function(d) { this.obj = d; this.resizable = true; this.height = d.height ? parseInt(d.height, 10) : 300; if (b.options.showMovieControls == true) { this.height += c } this.width = d.width ? parseInt(d.width, 10) : 300 }; b.flv.prototype = { append: function(l, e, n) { this.id = e; var j = document.createElement("div"); j.id = e; l.appendChild(j); var k = n.resize_h, o = n.resize_w, f = b.path + "libraries/mediaplayer/player.swf", m = b.options.flashVersion, d = b.path + "libraries/swfobject/expressInstall.swf", g = a.apply({ file: this.obj.content, height: k, width: o, autostart: (b.options.autoplayMovies ? "true" : "false"), controlbar: (b.options.showMovieControls ? "bottom" : "none"), backcolor: "0x000000", frontcolor: "0xCCCCCC", lightcolor: "0x557722" }, b.options.flashVars), i = b.options.flashParams; swfobject.embedSWF(f, e, o, k, m, d, g, i) }, remove: function() { swfobject.expressInstallCallback(); swfobject.removeSWF(this.id) } } })(Shadowbox);
(function(a){a.html=function(b){this.obj=b;this.height=b.height?parseInt(b.height,10):300;this.width=b.width?parseInt(b.width,10):500};a.html.prototype={append:function(b,e,c){this.id=e;var d=document.createElement("div");d.id=e;d.className="html";d.innerHTML=this.obj.content;b.appendChild(d)},remove:function(){var b=document.getElementById(this.id);if(b){a.lib.remove(b)}}}})(Shadowbox);
(function(a){a.iframe=function(c){this.obj=c;var b=document.getElementById("sb-overlay");this.height=c.height?parseInt(c.height,10):b.offsetHeight;this.width=c.width?parseInt(c.width,10):b.offsetWidth};a.iframe.prototype={append:function(b,e,d){this.id=e;var c='<iframe id="'+e+'" name="'+e+'" height="100%" width="100%" frameborder="0" marginwidth="0" marginheight="0" scrolling="auto"';if(a.client.isIE){c+=' allowtransparency="true"';if(a.client.isIE6){c+=" src=\"javascript:false;document.write('');\""}}c+="></iframe>";b.innerHTML=c},remove:function(){var b=document.getElementById(this.id);if(b){a.lib.remove(b);if(a.client.isGecko){delete window.frames[this.id]}}},onLoad:function(){var b=a.client.isIE?document.getElementById(this.id).contentWindow:window.frames[this.id];b.location.href=this.obj.content}}})(Shadowbox);
(function(h){var e=h.util,i,k,j="sb-drag-layer",d;function b(){i={x:0,y:0,start_x:null,start_y:null}}function c(m,o,l){if(m){b();var n=["position:absolute","height:"+o+"px","width:"+l+"px","cursor:"+(h.client.isGecko?"-moz-grab":"move"),"background-color:"+(h.client.isIE?"#fff;filter:alpha(opacity=0)":"transparent")].join(";");h.lib.append(h.skin.bodyEl(),'<div id="'+j+'" style="'+n+'"></div>');h.lib.addEvent(e.get(j),"mousedown",g)}else{var p=e.get(j);if(p){h.lib.removeEvent(p,"mousedown",g);h.lib.remove(p)}k=null}}function g(m){h.lib.preventDefault(m);var l=h.lib.getPageXY(m);i.start_x=l[0];i.start_y=l[1];k=e.get(h.contentId());h.lib.addEvent(document,"mousemove",f);h.lib.addEvent(document,"mouseup",a);if(h.client.isGecko){e.get(j).style.cursor="-moz-grabbing"}}function a(){h.lib.removeEvent(document,"mousemove",f);h.lib.removeEvent(document,"mouseup",a);if(h.client.isGecko){e.get(j).style.cursor="-moz-grab"}}function f(o){var q=h.content,p=h.dimensions,n=h.lib.getPageXY(o);var m=n[0]-i.start_x;i.start_x+=m;i.x=Math.max(Math.min(0,i.x+m),p.inner_w-q.width);k.style.left=i.x+"px";var l=n[1]-i.start_y;i.start_y+=l;i.y=Math.max(Math.min(0,i.y+l),p.inner_h-q.height);k.style.top=i.y+"px"}h.img=function(m){this.obj=m;this.resizable=true;this.ready=false;var l=this;d=new Image();d.onload=function(){l.height=m.height?parseInt(m.height,10):d.height;l.width=m.width?parseInt(m.width,10):d.width;l.ready=true;d.onload="";d=null};d.src=m.content};h.img.prototype={append:function(l,o,n){this.id=o;var m=document.createElement("img");m.id=o;m.src=this.obj.content;m.style.position="absolute";m.setAttribute("height",n.resize_h);m.setAttribute("width",n.resize_w);l.appendChild(m)},remove:function(){var l=e.get(this.id);if(l){h.lib.remove(l)}c(false);if(d){d.onload="";d=null}},onLoad:function(){var l=h.dimensions;if(l.oversized&&h.options.handleOversize=="drag"){c(true,l.resize_h,l.resize_w)}},onWindowResize:function(){if(k){var p=h.content,o=h.dimensions,n=parseInt(h.lib.getStyle(k,"top")),m=parseInt(h.lib.getStyle(k,"left"));if(n+p.height<o.inner_h){k.style.top=o.inner_h-p.height+"px"}if(m+p.width<o.inner_w){k.style.left=o.inner_w-p.width+"px"}}}}})(Shadowbox);
(function(b) { var a = b.util; b.swf = function(c) { this.obj = c; this.resizable = true; this.height = c.height ? parseInt(c.height, 10) : 300; this.width = c.width ? parseInt(c.width, 10) : 300 }; b.swf.prototype = { append: function(k, d, m) { this.id = d; var i = document.createElement("div"); i.id = d; k.appendChild(i); var j = m.resize_h, n = m.resize_w, e = this.obj.content, l = b.options.flashVersion, c = b.path + "libraries/swfobject/expressInstall.swf", f = b.options.flashVars, g = b.options.flashParams; swfobject.embedSWF(e, d, n, j, l, c, f, g) }, remove: function() { swfobject.expressInstallCallback(); swfobject.removeSWF(this.id) } } })(Shadowbox);
/*
 * Sizzle CSS Selector Engine - v1.0
 *  Copyright 2009, The Dojo Foundation
 *  Released under the MIT, BSD, and GPL Licenses.
 *  More information: http://sizzlejs.com/
 */
(function(){var p=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?/g,i=0,d=Object.prototype.toString,n=false;var b=function(D,t,A,v){A=A||[];var e=t=t||document;if(t.nodeType!==1&&t.nodeType!==9){return[]}if(!D||typeof D!=="string"){return A}var B=[],C,y,G,F,z,s,r=true,w=o(t);p.lastIndex=0;while((C=p.exec(D))!==null){B.push(C[1]);if(C[2]){s=RegExp.rightContext;break}}if(B.length>1&&j.exec(D)){if(B.length===2&&f.relative[B[0]]){y=g(B[0]+B[1],t)}else{y=f.relative[B[0]]?[t]:b(B.shift(),t);while(B.length){D=B.shift();if(f.relative[D]){D+=B.shift()}y=g(D,y)}}}else{if(!v&&B.length>1&&t.nodeType===9&&!w&&f.match.ID.test(B[0])&&!f.match.ID.test(B[B.length-1])){var H=b.find(B.shift(),t,w);t=H.expr?b.filter(H.expr,H.set)[0]:H.set[0]}if(t){var H=v?{expr:B.pop(),set:a(v)}:b.find(B.pop(),B.length===1&&(B[0]==="~"||B[0]==="+")&&t.parentNode?t.parentNode:t,w);y=H.expr?b.filter(H.expr,H.set):H.set;if(B.length>0){G=a(y)}else{r=false}while(B.length){var u=B.pop(),x=u;if(!f.relative[u]){u=""}else{x=B.pop()}if(x==null){x=t}f.relative[u](G,x,w)}}else{G=B=[]}}if(!G){G=y}if(!G){throw"Syntax error, unrecognized expression: "+(u||D)}if(d.call(G)==="[object Array]"){if(!r){A.push.apply(A,G)}else{if(t&&t.nodeType===1){for(var E=0;G[E]!=null;E++){if(G[E]&&(G[E]===true||G[E].nodeType===1&&h(t,G[E]))){A.push(y[E])}}}else{for(var E=0;G[E]!=null;E++){if(G[E]&&G[E].nodeType===1){A.push(y[E])}}}}}else{a(G,A)}if(s){b(s,e,A,v);b.uniqueSort(A)}return A};b.uniqueSort=function(r){if(c){n=false;r.sort(c);if(n){for(var e=1;e<r.length;e++){if(r[e]===r[e-1]){r.splice(e--,1)}}}}};b.matches=function(e,r){return b(e,null,null,r)};b.find=function(x,e,y){var w,u;if(!x){return[]}for(var t=0,s=f.order.length;t<s;t++){var v=f.order[t],u;if((u=f.match[v].exec(x))){var r=RegExp.leftContext;if(r.substr(r.length-1)!=="\\"){u[1]=(u[1]||"").replace(/\\/g,"");w=f.find[v](u,e,y);if(w!=null){x=x.replace(f.match[v],"");break}}}}if(!w){w=e.getElementsByTagName("*")}return{set:w,expr:x}};b.filter=function(A,z,D,t){var s=A,F=[],x=z,v,e,w=z&&z[0]&&o(z[0]);while(A&&z.length){for(var y in f.filter){if((v=f.match[y].exec(A))!=null){var r=f.filter[y],E,C;e=false;if(x==F){F=[]}if(f.preFilter[y]){v=f.preFilter[y](v,x,D,F,t,w);if(!v){e=E=true}else{if(v===true){continue}}}if(v){for(var u=0;(C=x[u])!=null;u++){if(C){E=r(C,v,u,x);var B=t^!!E;if(D&&E!=null){if(B){e=true}else{x[u]=false}}else{if(B){F.push(C);e=true}}}}}if(E!==undefined){if(!D){x=F}A=A.replace(f.match[y],"");if(!e){return[]}break}}}if(A==s){if(e==null){throw"Syntax error, unrecognized expression: "+A}else{break}}s=A}return x};var f=b.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF_-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF_-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF_-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF_-]|\\.)+)\s*(?:(\S?=)\s*(['"]*)(.*?)\3|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*_-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\((even|odd|[\dn+-]*)\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF_-]|\\.)+)(?:\((['"]*)((?:\([^\)]+\)|[^\2\(\)]*)+)\2\))?/},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(e){return e.getAttribute("href")}},relative:{"+":function(x,e,w){var u=typeof e==="string",y=u&&!/\W/.test(e),v=u&&!y;if(y&&!w){e=e.toUpperCase()}for(var t=0,s=x.length,r;t<s;t++){if((r=x[t])){while((r=r.previousSibling)&&r.nodeType!==1){}x[t]=v||r&&r.nodeName===e?r||false:r===e}}if(v){b.filter(e,x,true)}},">":function(w,r,x){var u=typeof r==="string";if(u&&!/\W/.test(r)){r=x?r:r.toUpperCase();for(var s=0,e=w.length;s<e;s++){var v=w[s];if(v){var t=v.parentNode;w[s]=t.nodeName===r?t:false}}}else{for(var s=0,e=w.length;s<e;s++){var v=w[s];if(v){w[s]=u?v.parentNode:v.parentNode===r}}if(u){b.filter(r,w,true)}}},"":function(t,r,v){var s=i++,e=q;if(!r.match(/\W/)){var u=r=v?r:r.toUpperCase();e=m}e("parentNode",r,s,t,u,v)},"~":function(t,r,v){var s=i++,e=q;if(typeof r==="string"&&!r.match(/\W/)){var u=r=v?r:r.toUpperCase();e=m}e("previousSibling",r,s,t,u,v)}},find:{ID:function(r,s,t){if(typeof s.getElementById!=="undefined"&&!t){var e=s.getElementById(r[1]);return e?[e]:[]}},NAME:function(s,v,w){if(typeof v.getElementsByName!=="undefined"){var r=[],u=v.getElementsByName(s[1]);for(var t=0,e=u.length;t<e;t++){if(u[t].getAttribute("name")===s[1]){r.push(u[t])}}return r.length===0?null:r}},TAG:function(e,r){return r.getElementsByTagName(e[1])}},preFilter:{CLASS:function(t,r,s,e,w,x){t=" "+t[1].replace(/\\/g,"")+" ";if(x){return t}for(var u=0,v;(v=r[u])!=null;u++){if(v){if(w^(v.className&&(" "+v.className+" ").indexOf(t)>=0)){if(!s){e.push(v)}}else{if(s){r[u]=false}}}}return false},ID:function(e){return e[1].replace(/\\/g,"")},TAG:function(r,e){for(var s=0;e[s]===false;s++){}return e[s]&&o(e[s])?r[1]:r[1].toUpperCase()},CHILD:function(e){if(e[1]=="nth"){var r=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(e[2]=="even"&&"2n"||e[2]=="odd"&&"2n+1"||!/\D/.test(e[2])&&"0n+"+e[2]||e[2]);e[2]=(r[1]+(r[2]||1))-0;e[3]=r[3]-0}e[0]=i++;return e},ATTR:function(u,r,s,e,v,w){var t=u[1].replace(/\\/g,"");if(!w&&f.attrMap[t]){u[1]=f.attrMap[t]}if(u[2]==="~="){u[4]=" "+u[4]+" "}return u},PSEUDO:function(u,r,s,e,v){if(u[1]==="not"){if(u[3].match(p).length>1||/^\w/.test(u[3])){u[3]=b(u[3],null,null,r)}else{var t=b.filter(u[3],r,s,true^v);if(!s){e.push.apply(e,t)}return false}}else{if(f.match.POS.test(u[0])||f.match.CHILD.test(u[0])){return true}}return u},POS:function(e){e.unshift(true);return e}},filters:{enabled:function(e){return e.disabled===false&&e.type!=="hidden"},disabled:function(e){return e.disabled===true},checked:function(e){return e.checked===true},selected:function(e){e.parentNode.selectedIndex;return e.selected===true},parent:function(e){return !!e.firstChild},empty:function(e){return !e.firstChild},has:function(s,r,e){return !!b(e[3],s).length},header:function(e){return/h\d/i.test(e.nodeName)},text:function(e){return"text"===e.type},radio:function(e){return"radio"===e.type},checkbox:function(e){return"checkbox"===e.type},file:function(e){return"file"===e.type},password:function(e){return"password"===e.type},submit:function(e){return"submit"===e.type},image:function(e){return"image"===e.type},reset:function(e){return"reset"===e.type},button:function(e){return"button"===e.type||e.nodeName.toUpperCase()==="BUTTON"},input:function(e){return/input|select|textarea|button/i.test(e.nodeName)}},setFilters:{first:function(r,e){return e===0},last:function(s,r,e,t){return r===t.length-1},even:function(r,e){return e%2===0},odd:function(r,e){return e%2===1},lt:function(s,r,e){return r<e[3]-0},gt:function(s,r,e){return r>e[3]-0},nth:function(s,r,e){return e[3]-0==r},eq:function(s,r,e){return e[3]-0==r}},filter:{PSEUDO:function(w,s,t,x){var r=s[1],u=f.filters[r];if(u){return u(w,t,s,x)}else{if(r==="contains"){return(w.textContent||w.innerText||"").indexOf(s[3])>=0}else{if(r==="not"){var v=s[3];for(var t=0,e=v.length;t<e;t++){if(v[t]===w){return false}}return true}}}},CHILD:function(e,t){var w=t[1],r=e;switch(w){case"only":case"first":while(r=r.previousSibling){if(r.nodeType===1){return false}}if(w=="first"){return true}r=e;case"last":while(r=r.nextSibling){if(r.nodeType===1){return false}}return true;case"nth":var s=t[2],z=t[3];if(s==1&&z==0){return true}var v=t[0],y=e.parentNode;if(y&&(y.sizcache!==v||!e.nodeIndex)){var u=0;for(r=y.firstChild;r;r=r.nextSibling){if(r.nodeType===1){r.nodeIndex=++u}}y.sizcache=v}var x=e.nodeIndex-z;if(s==0){return x==0}else{return(x%s==0&&x/s>=0)}}},ID:function(r,e){return r.nodeType===1&&r.getAttribute("id")===e},TAG:function(r,e){return(e==="*"&&r.nodeType===1)||r.nodeName===e},CLASS:function(r,e){return(" "+(r.className||r.getAttribute("class"))+" ").indexOf(e)>-1},ATTR:function(v,t){var s=t[1],e=f.attrHandle[s]?f.attrHandle[s](v):v[s]!=null?v[s]:v.getAttribute(s),w=e+"",u=t[2],r=t[4];return e==null?u==="!=":u==="="?w===r:u==="*="?w.indexOf(r)>=0:u==="~="?(" "+w+" ").indexOf(r)>=0:!r?w&&e!==false:u==="!="?w!=r:u==="^="?w.indexOf(r)===0:u==="$="?w.substr(w.length-r.length)===r:u==="|="?w===r||w.substr(0,r.length+1)===r+"-":false},POS:function(u,r,s,v){var e=r[2],t=f.setFilters[e];if(t){return t(u,s,r,v)}}}};var j=f.match.POS;for(var l in f.match){f.match[l]=new RegExp(f.match[l].source+/(?![^\[]*\])(?![^\(]*\))/.source)}var a=function(r,e){r=Array.prototype.slice.call(r);if(e){e.push.apply(e,r);return e}return r};try{Array.prototype.slice.call(document.documentElement.childNodes)}catch(k){a=function(u,t){var r=t||[];if(d.call(u)==="[object Array]"){Array.prototype.push.apply(r,u)}else{if(typeof u.length==="number"){for(var s=0,e=u.length;s<e;s++){r.push(u[s])}}else{for(var s=0;u[s];s++){r.push(u[s])}}}return r}}var c;if(document.documentElement.compareDocumentPosition){c=function(r,e){var s=r.compareDocumentPosition(e)&4?-1:r===e?0:1;if(s===0){n=true}return s}}else{if("sourceIndex" in document.documentElement){c=function(r,e){var s=r.sourceIndex-e.sourceIndex;if(s===0){n=true}return s}}else{if(document.createRange){c=function(t,r){var s=t.ownerDocument.createRange(),e=r.ownerDocument.createRange();s.selectNode(t);s.collapse(true);e.selectNode(r);e.collapse(true);var u=s.compareBoundaryPoints(Range.START_TO_END,e);if(u===0){n=true}return u}}}}(function(){var r=document.createElement("div"),s="script"+(new Date).getTime();r.innerHTML="<a name='"+s+"'/>";var e=document.documentElement;e.insertBefore(r,e.firstChild);if(!!document.getElementById(s)){f.find.ID=function(u,v,w){if(typeof v.getElementById!=="undefined"&&!w){var t=v.getElementById(u[1]);return t?t.id===u[1]||typeof t.getAttributeNode!=="undefined"&&t.getAttributeNode("id").nodeValue===u[1]?[t]:undefined:[]}};f.filter.ID=function(v,t){var u=typeof v.getAttributeNode!=="undefined"&&v.getAttributeNode("id");return v.nodeType===1&&u&&u.nodeValue===t}}e.removeChild(r)})();(function(){var e=document.createElement("div");e.appendChild(document.createComment(""));if(e.getElementsByTagName("*").length>0){f.find.TAG=function(r,v){var u=v.getElementsByTagName(r[1]);if(r[1]==="*"){var t=[];for(var s=0;u[s];s++){if(u[s].nodeType===1){t.push(u[s])}}u=t}return u}}e.innerHTML="<a href='#'></a>";if(e.firstChild&&typeof e.firstChild.getAttribute!=="undefined"&&e.firstChild.getAttribute("href")!=="#"){f.attrHandle.href=function(r){return r.getAttribute("href",2)}}})();if(document.querySelectorAll){(function(){var e=b,s=document.createElement("div");s.innerHTML="<p class='TEST'></p>";if(s.querySelectorAll&&s.querySelectorAll(".TEST").length===0){return}b=function(w,v,t,u){v=v||document;if(!u&&v.nodeType===9&&!o(v)){try{return a(v.querySelectorAll(w),t)}catch(x){}}return e(w,v,t,u)};for(var r in e){b[r]=e[r]}})()}if(document.getElementsByClassName&&document.documentElement.getElementsByClassName){(function(){var e=document.createElement("div");e.innerHTML="<div class='test e'></div><div class='test'></div>";if(e.getElementsByClassName("e").length===0){return}e.lastChild.className="e";if(e.getElementsByClassName("e").length===1){return}f.order.splice(1,0,"CLASS");f.find.CLASS=function(r,s,t){if(typeof s.getElementsByClassName!=="undefined"&&!t){return s.getElementsByClassName(r[1])}}})()}function m(r,w,v,A,x,z){var y=r=="previousSibling"&&!z;for(var t=0,s=A.length;t<s;t++){var e=A[t];if(e){if(y&&e.nodeType===1){e.sizcache=v;e.sizset=t}e=e[r];var u=false;while(e){if(e.sizcache===v){u=A[e.sizset];break}if(e.nodeType===1&&!z){e.sizcache=v;e.sizset=t}if(e.nodeName===w){u=e;break}e=e[r]}A[t]=u}}}function q(r,w,v,A,x,z){var y=r=="previousSibling"&&!z;for(var t=0,s=A.length;t<s;t++){var e=A[t];if(e){if(y&&e.nodeType===1){e.sizcache=v;e.sizset=t}e=e[r];var u=false;while(e){if(e.sizcache===v){u=A[e.sizset];break}if(e.nodeType===1){if(!z){e.sizcache=v;e.sizset=t}if(typeof w!=="string"){if(e===w){u=true;break}}else{if(b.filter(w,[e]).length>0){u=e;break}}}e=e[r]}A[t]=u}}}var h=document.compareDocumentPosition?function(r,e){return r.compareDocumentPosition(e)&16}:function(r,e){return r!==e&&(r.contains?r.contains(e):true)};var o=function(e){return e.nodeType===9&&e.documentElement.nodeName!=="HTML"||!!e.ownerDocument&&e.ownerDocument.documentElement.nodeName!=="HTML"};var g=function(e,x){var t=[],u="",v,s=x.nodeType?[x]:x;while((v=f.match.PSEUDO.exec(e))){u+=v[0];e=e.replace(f.match.PSEUDO,"")}e=f.relative[e]?e+"*":e;for(var w=0,r=s.length;w<r;w++){b(e,s[w],t)}return b.filter(u,t)};window.Sizzle=b})();
/* SWFObject v2.1 <http://code.google.com/p/swfobject/>
	Copyright (c) 2007-2008 Geoff Stearns, Michael Williams, and Bobby van der Sluis
	This software is released under the MIT License <http://www.opensource.org/licenses/mit-license.php>
*/
var swfobject=function(){var UNDEF="undefined",OBJECT="object",SHOCKWAVE_FLASH="Shockwave Flash",SHOCKWAVE_FLASH_AX="ShockwaveFlash.ShockwaveFlash",FLASH_MIME_TYPE="application/x-shockwave-flash",EXPRESS_INSTALL_ID="SWFObjectExprInst",win=window,doc=document,nav=navigator,domLoadFnArr=[],regObjArr=[],objIdArr=[],listenersArr=[],script,timer=null,storedAltContent=null,storedAltContentId=null,isDomLoaded=false,isExpressInstallActive=false;var ua=function(){var w3cdom=typeof doc.getElementById!=UNDEF&&typeof doc.getElementsByTagName!=UNDEF&&typeof doc.createElement!=UNDEF,playerVersion=[0,0,0],d=null;if(typeof nav.plugins!=UNDEF&&typeof nav.plugins[SHOCKWAVE_FLASH]==OBJECT){d=nav.plugins[SHOCKWAVE_FLASH].description;if(d&&!(typeof nav.mimeTypes!=UNDEF&&nav.mimeTypes[FLASH_MIME_TYPE]&&!nav.mimeTypes[FLASH_MIME_TYPE].enabledPlugin)){d=d.replace(/^.*\s+(\S+\s+\S+$)/,"$1");playerVersion[0]=parseInt(d.replace(/^(.*)\..*$/,"$1"),10);playerVersion[1]=parseInt(d.replace(/^.*\.(.*)\s.*$/,"$1"),10);playerVersion[2]=/r/.test(d)?parseInt(d.replace(/^.*r(.*)$/,"$1"),10):0}}else{if(typeof win.ActiveXObject!=UNDEF){var a=null,fp6Crash=false;try{a=new ActiveXObject(SHOCKWAVE_FLASH_AX+".7")}catch(e){try{a=new ActiveXObject(SHOCKWAVE_FLASH_AX+".6");playerVersion=[6,0,21];a.AllowScriptAccess="always"}catch(e){if(playerVersion[0]==6){fp6Crash=true}}if(!fp6Crash){try{a=new ActiveXObject(SHOCKWAVE_FLASH_AX)}catch(e){}}}if(!fp6Crash&&a){try{d=a.GetVariable("$version");if(d){d=d.split(" ")[1].split(",");playerVersion=[parseInt(d[0],10),parseInt(d[1],10),parseInt(d[2],10)]}}catch(e){}}}}var u=nav.userAgent.toLowerCase(),p=nav.platform.toLowerCase(),webkit=/webkit/.test(u)?parseFloat(u.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):false,ie=false,windows=p?/win/.test(p):/win/.test(u),mac=p?/mac/.test(p):/mac/.test(u);
/*@cc_on
			ie = true;
			@if (@_win32)
				windows = true;
			@elif (@_mac)
				mac = true;
			@end
		@*/
return{w3cdom:w3cdom,pv:playerVersion,webkit:webkit,ie:ie,win:windows,mac:mac}}();var onDomLoad=function(){if(!ua.w3cdom){return}addDomLoadEvent(main);if(ua.ie&&ua.win){try{doc.write("<script id=__ie_ondomload defer=true src=//:><\/script>");script=getElementById("__ie_ondomload");if(script){addListener(script,"onreadystatechange",checkReadyState)}}catch(e){}}if(ua.webkit&&typeof doc.readyState!=UNDEF){timer=setInterval(function(){if(/loaded|complete/.test(doc.readyState)){callDomLoadFunctions()}},10)}if(typeof doc.addEventListener!=UNDEF){doc.addEventListener("DOMContentLoaded",callDomLoadFunctions,null)}addLoadEvent(callDomLoadFunctions)}();function checkReadyState(){if(script.readyState=="complete"){script.parentNode.removeChild(script);callDomLoadFunctions()}}function callDomLoadFunctions(){if(isDomLoaded){return}if(ua.ie&&ua.win){var s=createElement("span");try{var t=doc.getElementsByTagName("body")[0].appendChild(s);t.parentNode.removeChild(t)}catch(e){return}}isDomLoaded=true;if(timer){clearInterval(timer);timer=null}var dl=domLoadFnArr.length;for(var i=0;i<dl;i++){domLoadFnArr[i]()}}function addDomLoadEvent(fn){if(isDomLoaded){fn()}else{domLoadFnArr[domLoadFnArr.length]=fn}}function addLoadEvent(fn){if(typeof win.addEventListener!=UNDEF){win.addEventListener("load",fn,false)}else{if(typeof doc.addEventListener!=UNDEF){doc.addEventListener("load",fn,false)}else{if(typeof win.attachEvent!=UNDEF){addListener(win,"onload",fn)}else{if(typeof win.onload=="function"){var fnOld=win.onload;win.onload=function(){fnOld();fn()}}else{win.onload=fn}}}}}function main(){var rl=regObjArr.length;for(var i=0;i<rl;i++){var id=regObjArr[i].id;if(ua.pv[0]>0){var obj=getElementById(id);if(obj){regObjArr[i].width=obj.getAttribute("width")?obj.getAttribute("width"):"0";regObjArr[i].height=obj.getAttribute("height")?obj.getAttribute("height"):"0";if(hasPlayerVersion(regObjArr[i].swfVersion)){if(ua.webkit&&ua.webkit<312){fixParams(obj)}setVisibility(id,true)}else{if(regObjArr[i].expressInstall&&!isExpressInstallActive&&hasPlayerVersion("6.0.65")&&(ua.win||ua.mac)){showExpressInstall(regObjArr[i])}else{displayAltContent(obj)}}}}else{setVisibility(id,true)}}}function fixParams(obj){var nestedObj=obj.getElementsByTagName(OBJECT)[0];if(nestedObj){var e=createElement("embed"),a=nestedObj.attributes;if(a){var al=a.length;for(var i=0;i<al;i++){if(a[i].nodeName=="DATA"){e.setAttribute("src",a[i].nodeValue)}else{e.setAttribute(a[i].nodeName,a[i].nodeValue)}}}var c=nestedObj.childNodes;if(c){var cl=c.length;for(var j=0;j<cl;j++){if(c[j].nodeType==1&&c[j].nodeName=="PARAM"){e.setAttribute(c[j].getAttribute("name"),c[j].getAttribute("value"))}}}obj.parentNode.replaceChild(e,obj)}}function showExpressInstall(regObj){isExpressInstallActive=true;var obj=getElementById(regObj.id);if(obj){if(regObj.altContentId){var ac=getElementById(regObj.altContentId);if(ac){storedAltContent=ac;storedAltContentId=regObj.altContentId}}else{storedAltContent=abstractAltContent(obj)}if(!(/%$/.test(regObj.width))&&parseInt(regObj.width,10)<310){regObj.width="310"}if(!(/%$/.test(regObj.height))&&parseInt(regObj.height,10)<137){regObj.height="137"}doc.title=doc.title.slice(0,47)+" - Flash Player Installation";var pt=ua.ie&&ua.win?"ActiveX":"PlugIn",dt=doc.title,fv="MMredirectURL="+win.location+"&MMplayerType="+pt+"&MMdoctitle="+dt,replaceId=regObj.id;if(ua.ie&&ua.win&&obj.readyState!=4){var newObj=createElement("div");replaceId+="SWFObjectNew";newObj.setAttribute("id",replaceId);obj.parentNode.insertBefore(newObj,obj);obj.style.display="none";var fn=function(){obj.parentNode.removeChild(obj)};addListener(win,"onload",fn)}createSWF({data:regObj.expressInstall,id:EXPRESS_INSTALL_ID,width:regObj.width,height:regObj.height},{flashvars:fv},replaceId)}}function displayAltContent(obj){if(ua.ie&&ua.win&&obj.readyState!=4){var el=createElement("div");obj.parentNode.insertBefore(el,obj);el.parentNode.replaceChild(abstractAltContent(obj),el);obj.style.display="none";var fn=function(){obj.parentNode.removeChild(obj)};addListener(win,"onload",fn)}else{obj.parentNode.replaceChild(abstractAltContent(obj),obj)}}function abstractAltContent(obj){var ac=createElement("div");if(ua.win&&ua.ie){ac.innerHTML=obj.innerHTML}else{var nestedObj=obj.getElementsByTagName(OBJECT)[0];if(nestedObj){var c=nestedObj.childNodes;if(c){var cl=c.length;for(var i=0;i<cl;i++){if(!(c[i].nodeType==1&&c[i].nodeName=="PARAM")&&!(c[i].nodeType==8)){ac.appendChild(c[i].cloneNode(true))}}}}}return ac}function createSWF(attObj,parObj,id){var r,el=getElementById(id);if(el){if(typeof attObj.id==UNDEF){attObj.id=id}if(ua.ie&&ua.win){var att="";for(var i in attObj){if(attObj[i]!=Object.prototype[i]){if(i.toLowerCase()=="data"){parObj.movie=attObj[i]}else{if(i.toLowerCase()=="styleclass"){att+=' class="'+attObj[i]+'"'}else{if(i.toLowerCase()!="classid"){att+=" "+i+'="'+attObj[i]+'"'}}}}}var par="";for(var j in parObj){if(parObj[j]!=Object.prototype[j]){par+='<param name="'+j+'" value="'+parObj[j]+'" />'}}el.outerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'+att+">"+par+"</object>";objIdArr[objIdArr.length]=attObj.id;r=getElementById(attObj.id)}else{if(ua.webkit&&ua.webkit<312){var e=createElement("embed");e.setAttribute("type",FLASH_MIME_TYPE);for(var k in attObj){if(attObj[k]!=Object.prototype[k]){if(k.toLowerCase()=="data"){e.setAttribute("src",attObj[k])}else{if(k.toLowerCase()=="styleclass"){e.setAttribute("class",attObj[k])}else{if(k.toLowerCase()!="classid"){e.setAttribute(k,attObj[k])}}}}}for(var l in parObj){if(parObj[l]!=Object.prototype[l]){if(l.toLowerCase()!="movie"){e.setAttribute(l,parObj[l])}}}el.parentNode.replaceChild(e,el);r=e}else{var o=createElement(OBJECT);o.setAttribute("type",FLASH_MIME_TYPE);for(var m in attObj){if(attObj[m]!=Object.prototype[m]){if(m.toLowerCase()=="styleclass"){o.setAttribute("class",attObj[m])}else{if(m.toLowerCase()!="classid"){o.setAttribute(m,attObj[m])}}}}for(var n in parObj){if(parObj[n]!=Object.prototype[n]&&n.toLowerCase()!="movie"){createObjParam(o,n,parObj[n])}}el.parentNode.replaceChild(o,el);r=o}}}return r}function createObjParam(el,pName,pValue){var p=createElement("param");p.setAttribute("name",pName);p.setAttribute("value",pValue);el.appendChild(p)}function removeSWF(id){var obj=getElementById(id);if(obj&&(obj.nodeName=="OBJECT"||obj.nodeName=="EMBED")){if(ua.ie&&ua.win){if(obj.readyState==4){removeObjectInIE(id)}else{win.attachEvent("onload",function(){removeObjectInIE(id)})}}else{obj.parentNode.removeChild(obj)}}}function removeObjectInIE(id){var obj=getElementById(id);if(obj){for(var i in obj){if(typeof obj[i]=="function"){obj[i]=null}}obj.parentNode.removeChild(obj)}}function getElementById(id){var el=null;try{el=doc.getElementById(id)}catch(e){}return el}function createElement(el){return doc.createElement(el)}function addListener(target,eventType,fn){target.attachEvent(eventType,fn);listenersArr[listenersArr.length]=[target,eventType,fn]}function hasPlayerVersion(rv){var pv=ua.pv,v=rv.split(".");v[0]=parseInt(v[0],10);v[1]=parseInt(v[1],10)||0;v[2]=parseInt(v[2],10)||0;return(pv[0]>v[0]||(pv[0]==v[0]&&pv[1]>v[1])||(pv[0]==v[0]&&pv[1]==v[1]&&pv[2]>=v[2]))?true:false}function createCSS(sel,decl){if(ua.ie&&ua.mac){return}var h=doc.getElementsByTagName("head")[0],s=createElement("style");s.setAttribute("type","text/css");s.setAttribute("media","screen");if(!(ua.ie&&ua.win)&&typeof doc.createTextNode!=UNDEF){s.appendChild(doc.createTextNode(sel+" {"+decl+"}"))}h.appendChild(s);if(ua.ie&&ua.win&&typeof doc.styleSheets!=UNDEF&&doc.styleSheets.length>0){var ls=doc.styleSheets[doc.styleSheets.length-1];if(typeof ls.addRule==OBJECT){ls.addRule(sel,decl)}}}function setVisibility(id,isVisible){var v=isVisible?"visible":"hidden";if(isDomLoaded&&getElementById(id)){getElementById(id).style.visibility=v}else{createCSS("#"+id,"visibility:"+v)}}function urlEncodeIfNecessary(s){var regex=/[\\\"<>\.;]/;var hasBadChars=regex.exec(s)!=null;return hasBadChars?encodeURIComponent(s):s}var cleanup=function(){if(ua.ie&&ua.win){window.attachEvent("onunload",function(){var ll=listenersArr.length;for(var i=0;i<ll;i++){listenersArr[i][0].detachEvent(listenersArr[i][1],listenersArr[i][2])}var il=objIdArr.length;for(var j=0;j<il;j++){removeSWF(objIdArr[j])}for(var k in ua){ua[k]=null}ua=null;for(var l in swfobject){swfobject[l]=null}swfobject=null})}}();return{registerObject:function(objectIdStr,swfVersionStr,xiSwfUrlStr){if(!ua.w3cdom||!objectIdStr||!swfVersionStr){return}var regObj={};regObj.id=objectIdStr;regObj.swfVersion=swfVersionStr;regObj.expressInstall=xiSwfUrlStr?xiSwfUrlStr:false;regObjArr[regObjArr.length]=regObj;setVisibility(objectIdStr,false)},getObjectById:function(objectIdStr){var r=null;if(ua.w3cdom){var o=getElementById(objectIdStr);if(o){var n=o.getElementsByTagName(OBJECT)[0];if(!n||(n&&typeof o.SetVariable!=UNDEF)){r=o}else{if(typeof n.SetVariable!=UNDEF){r=n}}}}return r},embedSWF:function(swfUrlStr,replaceElemIdStr,widthStr,heightStr,swfVersionStr,xiSwfUrlStr,flashvarsObj,parObj,attObj){if(!ua.w3cdom||!swfUrlStr||!replaceElemIdStr||!widthStr||!heightStr||!swfVersionStr){return}widthStr+="";heightStr+="";if(hasPlayerVersion(swfVersionStr)){setVisibility(replaceElemIdStr,false);var att={};if(attObj&&typeof attObj===OBJECT){for(var i in attObj){if(attObj[i]!=Object.prototype[i]){att[i]=attObj[i]}}}att.data=swfUrlStr;att.width=widthStr;att.height=heightStr;var par={};if(parObj&&typeof parObj===OBJECT){for(var j in parObj){if(parObj[j]!=Object.prototype[j]){par[j]=parObj[j]}}}if(flashvarsObj&&typeof flashvarsObj===OBJECT){for(var k in flashvarsObj){if(flashvarsObj[k]!=Object.prototype[k]){if(typeof par.flashvars!=UNDEF){par.flashvars+="&"+k+"="+flashvarsObj[k]}else{par.flashvars=k+"="+flashvarsObj[k]}}}}addDomLoadEvent(function(){createSWF(att,par,replaceElemIdStr);if(att.id==replaceElemIdStr){setVisibility(replaceElemIdStr,true)}})}else{if(xiSwfUrlStr&&!isExpressInstallActive&&hasPlayerVersion("6.0.65")&&(ua.win||ua.mac)){isExpressInstallActive=true;setVisibility(replaceElemIdStr,false);addDomLoadEvent(function(){var regObj={};regObj.id=regObj.altContentId=replaceElemIdStr;regObj.width=widthStr;regObj.height=heightStr;regObj.expressInstall=xiSwfUrlStr;showExpressInstall(regObj)})}}},getFlashPlayerVersion:function(){return{major:ua.pv[0],minor:ua.pv[1],release:ua.pv[2]}},hasFlashPlayerVersion:hasPlayerVersion,createSWF:function(attObj,parObj,replaceElemIdStr){if(ua.w3cdom){return createSWF(attObj,parObj,replaceElemIdStr)}else{return undefined}},removeSWF:function(objElemIdStr){if(ua.w3cdom){removeSWF(objElemIdStr)}},createCSS:function(sel,decl){if(ua.w3cdom){createCSS(sel,decl)}},addDomLoadEvent:addDomLoadEvent,addLoadEvent:addLoadEvent,getQueryParamValue:function(param){var q=doc.location.search||doc.location.hash;if(param==null){return urlEncodeIfNecessary(q)}if(q){var pairs=q.substring(1).split("&");for(var i=0;i<pairs.length;i++){if(pairs[i].substring(0,pairs[i].indexOf("="))==param){return urlEncodeIfNecessary(pairs[i].substring((pairs[i].indexOf("=")+1)))}}}return""},expressInstallCallback:function(){if(isExpressInstallActive&&storedAltContent){var obj=getElementById(EXPRESS_INSTALL_ID);if(obj){obj.parentNode.replaceChild(storedAltContent,obj);if(storedAltContentId){setVisibility(storedAltContentId,true);if(ua.ie&&ua.win){storedAltContent.style.display="block"}}storedAltContent=null;storedAltContentId=null;isExpressInstallActive=false}}}}}();
Shadowbox.options.players=["flv","html","iframe","img","swf"];
Shadowbox.options.useSizzle = true;

jQuery(document).ready(function() {
    /*
    * Initialize Shadowbox
    */
    Shadowbox.init({
        players: ["flv"],
        continuous: false,
        autoDimensions: true,
        fadeDuration: 0.2,
        resizeDuration: 0.35,
        handleUnsupported: "remove",
        onOpen: function() {
            //Add closing text
            jQuery("#sb-nav-close").html(jQuery(".sb-nav-title").html());
            jQuery("#sb-nav-next").html(jQuery(".photos-forward.nextPage").html());
            jQuery("#sb-nav-previous").html(jQuery(".photos-back.prevPage").html());
        }
    });
});
