﻿function updateCanvas(h, g) { var i = h[0]; i.width = h.width(); i.height = h.height(); var j = h.offset(); var f = i.getContext("2d"); f.clearRect(0, 0, i.width, i.height); f.beginPath(); $(g).each(function() { var b = $(this); var c = $(b); if (c.attr("rel")) { var p = c.position(); var q = c.outerHeight(true) / 2; var a = c.outerWidth(true) / 2; var o = $("#" + c.attr("rel")); if (o.length) { var r = o.position(); var d = o.outerWidth(true) / 2; var e = o.outerHeight(true) / 2; f.moveTo(a - j.left + p.left, p.top - j.top + q); f.lineTo(r.left + d - j.left, r.top - j.top + e) } } }); f.stroke(); f.closePath() } function startUpdate() { setTimeout(startUpdate, 200); if ($(".module").length == 0) { updateCanvas($("canvas"), $(".circle")) } } var page = 1; $(document).ready(function() { $("#musicplayer").flash({ src: "/files/flash/muziek.swf", width: 20, height: 20 }); var e = 0.2; var d = document.createElement("canvas"); if ($(".module").length == 0) { $(d).attr("width", 1000).attr("height", 600).attr("style", "position: absolute; left: 0px; top: 0px; z-index: -1").insertBefore($("#content")) } if ($.browser.msie) { if (parseInt($.browser.version, 10) < 9) { d = G_vmlCanvasManager.initElement(d) } } $(".fade").hide(); $(".sm-history").hover(function() { var a = this; $(".parent-image").fadeTo("fast", e, function() { $(a).addClass("circle-active") }) }, function() { $(".parent-image").fadeTo("fast", 1); $(this).removeClass("circle-active") }); $(".circle-middle").hover(function() { $(".img.circle-middle").fadeTo("fase", e) }, function() { $(".img.circle-middle").fadeTo("fase", 1) }); var f; $(".circle").hover(function() { $(this).find(".fade").show(); var a = $(this).attr("class").replace("circle ss ", ""); $(".img.real." + a).fadeTo("fast", e); if ($(this).find(".hidden-content").length > 0) { f = $(".hl").find(".circle-content td").html(); $(".hl").find(".circle-content td").html($(this).find(".hidden-content").html()) } }, function() { var a = $(this).attr("class").replace("circle ss ", ""); $(".img.real." + a).fadeTo("fast", 1); $(this).find(".fade").hide(); if ($(this).find(".hidden-content").length > 0) { $(".hl").find(".circle-content td").html(f) } }); setTimeout(startUpdate, 10); $(".circle-content").attr("cellpadding", "0"); $(".circle-content").attr("cellspacing", "0"); $(".videoplayer").each(function() { $(this).attr("href", "/video/player.aspx?filepath=" + escape($(this).attr("href")) + "&title=" + escape($(this).attr("title"))) }); $(".fancybox").fancybox(); $(".fancybox-iframe").fancybox({ type: "iframe", titleShow: false, width: 800, height: 600 }); $(".videoplayer").fancybox({ type: "iframe", titleShow: false, width: 350, height: 270 }); $(".slideshow").fancybox({ cyclic: true, onComplete: setSlideShow }); $(".slideshow").each(function() { $(this).attr("rel", "a"); $(this).attr("title", "Pause") }); $(".slideshow-folder").each(function() { $(this).attr("href", "/slideshow" + $(this).attr("href")) }); $(".next").click(function() { page++; doPaging(); return false }); $(".prev").click(function() { page--; doPaging(); return false }); doPaging() }); function doPaging() { if (page == 1) { $(".prev").hide() } else { $(".prev").show() } if (page == $(".page").length) { $(".next").hide() } else { $(".next").show() } if ($(".page").length > 1) { $(".page").hide() } var b = ".page:nth-child(" + page.toString() + ")"; $(b).show() } function setSlideShow() { $("#fancybox-title-main").css("cursor", "pointer"); $("#fancybox-title-main").click(function() { toggleRotating(true) }) } var rotatingInterval = false; function toggleRotating(b) { if (rotatingInterval) { clearInterval(rotatingInterval); rotatingInterval = false; $("#fancybox-title-main").html("Play") } else { rotatingInterval = setInterval($.fancybox.next, 4000); $("#fancybox-title-main").html("Pause"); if (b) { $.fancybox.next() } } } toggleRotating(false); (function() { var b; b = jQuery.fn.flash = function(g, f, d, i) { var h = d || b.replace; f = b.copy(b.pluginOptions, f); if (!b.hasFlash(f.version)) { if (f.expressInstall && b.hasFlash(6, 0, 65)) { var e = { flashvars: { MMredirectURL: location, MMplayerType: "PlugIn", MMdoctitle: jQuery("title").text()}} } else { if (f.update) { h = i || b.update } else { return this } } } g = b.copy(b.htmlOptions, e, g); return this.each(function() { h.call(this, b.copy(g)) }) }; b.copy = function() { var f = {}, e = {}; for (var g = 0; g < arguments.length; g++) { var d = arguments[g]; if (d == undefined) { continue } jQuery.extend(f, d); if (d.flashvars == undefined) { continue } jQuery.extend(e, d.flashvars) } f.flashvars = e; return f }; b.hasFlash = function() { if (/hasFlash\=true/.test(location)) { return true } if (/hasFlash\=false/.test(location)) { return false } var e = b.hasFlash.playerVersion().match(/\d+/g); var f = String([arguments[0], arguments[1], arguments[2]]).match(/\d+/g) || String(b.pluginOptions.version).match(/\d+/g); for (var d = 0; d < 3; d++) { e[d] = parseInt(e[d] || 0); f[d] = parseInt(f[d] || 0); if (e[d] < f[d]) { return false } if (e[d] > f[d]) { return true } } return true }; b.hasFlash.playerVersion = function() { try { try { var d = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6"); try { d.AllowScriptAccess = "always" } catch (f) { return "6,0,0" } } catch (f) { } return new ActiveXObject("ShockwaveFlash.ShockwaveFlash").GetVariable("$version").replace(/\D+/g, ",").match(/^,?(.+),?$/)[1] } catch (f) { try { if (navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin) { return (navigator.plugins["Shockwave Flash 2.0"] || navigator.plugins["Shockwave Flash"]).description.replace(/\D+/g, ",").match(/^,?(.+),?$/)[1] } } catch (f) { } } return "0,0,0" }; b.htmlOptions = { height: 240, flashvars: {}, pluginspage: "http://www.adobe.com/go/getflashplayer", src: "#", type: "application/x-shockwave-flash", width: 320 }; b.pluginOptions = { expressInstall: false, update: true, version: "6.0.65" }; b.replace = function(d) { this.innerHTML = '<div class="alt">' + this.innerHTML + "</div>"; jQuery(this).addClass("flash-replaced").prepend(b.transform(d)) }; b.update = function(e) { var d = String(location).split("?"); d.splice(1, 0, "?hasFlash=true&"); d = d.join(""); var f = '<p>This content requires the Flash Player. <a href="http://www.adobe.com/go/getflashplayer">Download Flash Player</a>. Already have Flash Player? <a href="' + d + '">Click here.</a></p>'; this.innerHTML = '<span class="alt">' + this.innerHTML + "</span>"; jQuery(this).addClass("flash-update").prepend(f) }; function a() { var e = ""; for (var d in this) { if (typeof this[d] != "function") { e += d + '="' + this[d] + '" ' } } return e } function c() { var e = ""; for (var d in this) { if (typeof this[d] != "function") { e += d + "=" + encodeURIComponent(this[d]) + "&" } } return e.replace(/&$/, "") } b.transform = function(d) { d.toString = a; if (d.flashvars) { d.flashvars.toString = c } return "<embed " + String(d) + "/>" }; if (window.attachEvent) { window.attachEvent("onbeforeunload", function() { __flash_unloadHandler = function() { }; __flash_savedUnloadHandler = function() { } }) } })();
