﻿//------------------------------------------------------------------------------------------------------------------
// Algemene Parade Technologies Namespace file
//------------------------------------------------------------------------------------------------------------------
var ParadeTechnologies = {
	Sites: {
		General: {
			OpenWindow: function(url) {
				window.open(url, "WPopup", 'location=yes,scrollbars=yes,resizable=yes,status=yes,menubar=yes,toolbar=yes');
			},

			IsValidEmail: function(text) {
				if (!/^([\w\-\.]+)@((\[([0-9]{1,3}\.){3}[0-9]{1,3}\])|(([\w\-]+\.)+)([a-zA-Z]{2,4}))$/.test(text)) {
					return false;
				}
				return true;
			},

			GetStyle: function(obj, styleProp) {
				if (obj.currentStyle)
					var y = obj.currentStyle[styleProp];
				else if (window.getComputedStyle)
					var y = document.defaultView.getComputedStyle(obj, null).getPropertyValue(styleProp);
				return y;
			},
			/*toggleDiv functie kan 1 of meerdere divs togglen ToggleDiv('id1|id2|id3')*/
			ToggleDiv: function(elid) {
				var arr = elid.split("|");
				for (var i = 0; i < arr.length; i++) {
					var el = $(arr[i]);
					if (PT.Sites.General.GetStyle(el, 'display') == 'none') {
						el.style.display = 'block';
					}
					else {
						el.style.display = 'none';
					}
				}
			},
			GetElementsByClass: function(obj, className) {
				var classElements = new Array();

				if (!obj) obj = document;
				var els = obj.getElementsByTagName("*");
				var elsLen = els.length;
				var pattern = new RegExp("(^|\\s)" + className + "(\\s|$)");
				for (i = 0, j = 0; i < elsLen; i++) { if (pattern.test(els[i].className)) { classElements[j] = els[i]; j++; } }
				return classElements;
			},

			RegisterEvent: function(obj, evt, fnc) {
				if (obj.addEventListener) {
					obj.addEventListener(evt, fnc, false);
				} else {
					obj.attachEvent("on" + evt, fnc);
				}
			},

			UnregisterEvent: function(obj, evt, fnc) {
				if (obj.addEventListener) {
					obj.removeEventListener(evt, fnc, false);
				} else {
					obj.detachEvent("on" + evt, fnc);
				}
			},

			EventSrv: function(e) {
				var targ;
				if (!e) var e = window.event;
				if (e.target) targ = e.target;
				else if (e.srcElement) targ = e.srcElement;
				if (targ.nodeType == 3) targ = targ.parentNode;
				return targ;
			},

			EditorActive: function() {
				try {
					if (CmsEditorActive !== true) {
						return false;
					}
				}
				catch (err) {
					return false;
				}
				return true;
			},

			includeJS: function(file) {
				var script = document.createElement('script');
				script.src = file;
				script.type = 'text/javascript';
				script.defer = true;
				document.getElementsByTagName('head').item(0).appendChild(script);
			},

			includeCSS: function(file) {
				var css = document.createElement('link');
				css.href = file;
				css.setAttribute('rel', 'stylesheet');
				css.type = "text/css";
				document.getElementsByTagName('head').item(0).appendChild(css);
			},

			FixIEFlicker: function() {
				if (PT.Browser.isIE) {
					try {
						document.execCommand("BackgroundImageCache", false, true);
					}
					catch (err) { }
				}
			},

			DSLCheck: function(id) {
				if (PT.Sites.General.EditorActive()) {
					var ds = $(id);
					if (ds) {
						var node = document.createElement('p');
						node.className = 'dscheck';
						node.innerHTML = 'Toevoegen kan alleen vanuit het overzicht! Klik hiervoor met de rechtermuisknop op het item dat u wil wijzigen.';
						ds.parentNode.insertBefore(node, ds.nextSibling);
						ds.style.display = 'none';
						//ds.parentNode.removeChild(ds);
						//alert("Toevoegen kan alleen vanuit het overzicht! Klik hiervoor met de rechtermuisknop op het item dat u wil wijzigen.");
					}
				}
			},

			Object: {
				Delete: function(obj) {
					if (obj) { var pn = obj.parentNode; pn.removeChild(obj); }
				},

				DeleteChildren: function(obj) {
					while (obj.childNodes.length > 0) { obj.removeChild(obj.childNodes[0]); }
				},

				AJAX: function() {
					var xmlHttp;
					try {    // Firefox, Opera 8.0+, Safari
						xmlHttp = new XMLHttpRequest();
					} catch (e) {    // Internet Explorer    
						try {
							xmlHttp = new ActiveXObject("Msxml2.XMLHTTP");
						} catch (e) {
							try {
								xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
							} catch (e) {
								return null;
							}
						}
					}
					return xmlHttp;
				},

				/* aanroepen van de functie: Pt.Sites.General.Object.AJAX_Request(this.href, Pt.Sites.Geofort.ReplaceContent, Pt.Sites.Geofort.ErrorContent);*/
				/*ReplaceContent moet altijd de parameters voor de responsetext en de url bevatten.*/
				AJAX_Request: function(url, fn_succes, fn_error) {
					var xmlhttp = PT.Sites.General.Object.AJAX();
					if (xmlhttp != null) {
						//xmlhttp.urlname = url; // WERKT DIT IN IE6???
						xmlhttp.onreadystatechange = function() { PT.Sites.General.Object.AJAX_state_Change(xmlhttp, fn_succes, fn_error); };
						xmlhttp.open("GET", url, true);
						xmlhttp.send(null);
					}
					else {
						if (fn_error) { fn_error(); }
					}
				},

				AJAX_Post: function(url, fn_succes, fn_error, params) {
					var xmlhttp = PT.Sites.General.Object.AJAX();
					if (xmlhttp != null) {
						xmlhttp.onreadystatechange = function() { PT.Sites.General.Object.AJAX_state_Change(xmlhttp, fn_succes, fn_error); };
						xmlhttp.open("POST", url, true);
						xmlhttp.send(params);
					}
					else {
						if (fn_error) { fn_error(); }
					}
				},

				//fn_succes = function(responseText, url)	            
				AJAX_state_Change: function(xmlhttp, fn_succes, fn_error) {
					if (xmlhttp.readyState == 4) {// 4 = "loaded"
						if (xmlhttp.status == 200) {// 200 = "OK"
							if (fn_succes) {
								fn_succes(xmlhttp.responseText);
							}
						}
						else {
							if (fn_error) { fn_error(); }
						}
					}
				},

				XML: function() {
					var xmldom = null;
					try {
						xmldom = new ActiveXObject("Microsoft.XMLDOM");
						xmldom.async = false;
					} catch (e) { return null; }
					return xmldom;
				}
			}
		}
	},
	Social: {
		addThis: function(networks) {
			if (!PT.Sites.General.EditorActive()) {
				if (!networks) { return false; }
				var addthis_config = { username: "paradesk", data_track_clickback: true, ui_language: "nl" };

				var div = document.getElementsByTagName('div');
				for (var i = 0; i < div.length; i++) {
					if (div[i].className.indexOf('addThis') != -1) { //er staat addThis in de className
						var obj = PT.Social.createObject(networks);
						if (div[i].className.indexOf('repetition') != -1) { // het is een repetition
							var ahref = "addthis:url=\"" + div[i].parentNode.getElementsByTagName('a')[0].href + "\"";
							obj = obj.replace(/\{0}/g, ahref);
							div[i].innerHTML = obj;
						}
						else { // het is geen repetition
							obj = obj.replace(/\{0}/g, "");
							div[i].innerHTML = obj;
						}
					}
				}
			}
			/* (c) 2008, 2009, 2010 Add This, LLC http://s7.addthis.com/js/250/addthis_widget.js*/
			if (!window._ate) { var _atd = "www.addthis.com/", _atr = "//s7.addthis.com/", _atn = "//l.addthiscdn.com/", _euc = encodeURIComponent, _duc = decodeURIComponent, _atc = { dr: 0, ver: 250, loc: 0, enote: "", cwait: 500, tamp: 0.5, xamp: 0, camp: 1, vamp: 1, famp: 0.02, pamp: 0.2, damp: 1, abf: !!window.addthis_do_ab, unt: 0 }; (function() { var F; try { F = window.location; if (F.protocol.indexOf("file") === 0 || F.protocol.indexOf("safari-extension") === 0 || F.protocol.indexOf("chrome-extension") === 0) { _atr = "http:" + _atr } if (F.hostname.indexOf("localhost") != -1) { _atc.loc = 1 } } catch (L) { } var J = navigator.userAgent.toLowerCase(), M = document, t = window, H = M.location, O = { win: /windows/.test(J), xp: /windows nt 5.1/.test(J) || /windows nt 5.2/.test(J), osx: /os x/.test(J), chr: /chrome/.test(J), iph: /iphone/.test(J), ipa: /ipad/.test(J), saf: /safari/.test(J), web: /webkit/.test(J), opr: /opera/.test(J), msi: (/msie/.test(J)) && !(/opera/.test(J)), ffx: /firefox/.test(J), ff2: /firefox\/2/.test(J), ie6: /msie 6.0/.test(J), ie7: /msie 7.0/.test(J), mod: -1 }, f = { vst: [], rev: "80002", bro: O, wlp: (F || {}).protocol, show: 1, dl: H, upm: !!t.postMessage && ("" + t.postMessage).toLowerCase().indexOf("[native code]") !== -1, camp: _atc.camp - Math.random(), xamp: _atc.xamp - Math.random(), vamp: _atc.vamp - Math.random(), tamp: _atc.tamp - Math.random(), pamp: _atc.pamp - Math.random(), ab: "-", seq: 1, inst: 1, wait: 500, tmo: null, cvt: [], avt: null, sttm: new Date().getTime(), max: 4294967295, sid: 0, sub: !!window.at_sub, dbm: 0, uid: null, spt: "static/r07/widget22.png", api: {}, imgz: [], hash: window.location.hash }; M.ce = M.createElement; M.gn = M.getElementsByTagName; window._ate = f; var u = function(r, p, q, d) { if (!r) { return q } if (r instanceof Array || (r.length && (typeof r !== "function"))) { for (var l = 0, a = r.length, b = r[0]; l < a; b = r[++l]) { q = p.call(d || r, q, b, l, r) } } else { for (var e in r) { q = p.call(d || r, q, r[e], e, r) } } return q }, A = Array.prototype.slice, C = function(b) { return A.apply(b, A.call(arguments, 1)) }, B = function(a) { return ("" + a).replace(/(^\s+|\s+$)/g, "") }, K = function(a, b) { return u(C(arguments, 1), function(e, d) { return u(d, function(p, l, i) { if (p) { p[i] = l } return p }, e) }, a) }, m = function(b, a) { return u(b, function(i, e, d) { d = B(d); if (d) { i.push(_euc(d) + "=" + _euc(B(e))) } return i }, []).join(a || "&") }, j = function(b, a) { return u((b || "").split(a || "&"), function(p, r) { try { var l = r.split("="), i = B(_duc(l[0])), d = B(_duc(l.slice(1).join("="))); if (i) { p[i] = d } } catch (q) { } return p }, {}) }, Q = function() { var a = C(arguments, 0), d = a.shift(), b = a.shift(); return function() { return d.apply(b, a.concat(C(arguments, 0))) } }, G = function(b, e, a, d) { if (!e) { return } if (we) { e[(b ? "detach" : "attach") + "Event"]("on" + a, d) } else { e[(b ? "remove" : "add") + "EventListener"](a, d, false) } }, k = function(d, a, b) { G(0, d, a, b) }, g = function(d, a, b) { G(1, d, a, b) }, c = { reduce: u, slice: C, strip: B, extend: K, toKV: m, fromKV: j, bind: Q, listen: k, unlisten: g }; f.util = c; K(f, c); (function(r, w, R) { var p, T = r.util; function s(W, V, Y, U, X) { this.type = W; this.triggerType = V || W; this.target = Y || U; this.triggerTarget = U || Y; this.data = X || {} } T.extend(s.prototype, { constructor: s, bubbles: false, preventDefault: T.noop, stopPropagation: T.noop, clone: function() { return new this.constructor(this.type, this.triggerType, this.target, this.triggerTarget, T.extend({}, this.data)) } }); function i(U, V) { this.target = U; this.queues = {}; this.defaultEventType = V || s } function a(U) { var V = this.queues; if (!V[U]) { V[U] = [] } return V[U] } function q(U, V) { this.getQueue(U).push(V) } function e(V, W) { var X = this.getQueue(V), U = X.indexOf(W); if (U !== -1) { X.splice(U, 1) } } function b(U, Y, X, W) { var V = this; if (!W) { setTimeout(function() { V.dispatchEvent(new V.defaultEventType(U, U, Y, V.target, X)) }, 10) } else { V.dispatchEvent(new V.defaultEventType(U, U, Y, V.target, X)) } } function S(V) { for (var W = 0, Y = V.target, X = this.getQueue(V.type), U = X.length; W < U; W++) { X[W].call(Y, V.clone()) } } function d(V) { if (!V) { return } for (var U in l) { V[U] = T.bind(l[U], this) } return V } var l = { constructor: i, getQueue: a, addEventListener: q, removeEventListener: e, dispatchEvent: S, fire: b, decorate: d }; T.extend(i.prototype, l); r.event = { PolyEvent: s, EventDispatcher: i} })(f, f.api, f); f.ed = new f.event.EventDispatcher(f); var n = { isBound: 0, isReady: 0, readyList: [], onReady: function() { if (!n.isReady) { n.isReady = 1; var a = n.readyList.concat(window.addthis_onload || []); for (var b = 0; b < a.length; b++) { a[b].call(window) } n.readyList = [] } }, addLoad: function(a) { var b = t.onload; if (typeof t.onload != "function") { t.onload = a } else { t.onload = function() { if (b) { b() } a() } } }, bindReady: function() { if (x.isBound || _atc.xol) { return } x.isBound = 1; if (M.addEventListener && !O.opr) { M.addEventListener("DOMContentLoaded", x.onReady, false) } var a = window.addthis_product; if (a && a.indexOf("f") > -1) { x.onReady(); return } if (O.msi && window == top) { (function() { if (x.isReady) { return } try { M.documentElement.doScroll("left") } catch (d) { setTimeout(arguments.callee, 0); return } x.onReady() })() } if (O.opr) { M.addEventListener("DOMContentLoaded", function() { if (x.isReady) { return } for (var d = 0; d < M.styleSheets.length; d++) { if (M.styleSheets[d].disabled) { setTimeout(arguments.callee, 0); return } } x.onReady() }, false) } if (O.saf) { var b; (function() { if (x.isReady) { return } if (M.readyState != "loaded" && M.readyState != "complete") { setTimeout(arguments.callee, 0); return } if (b === undefined) { var d = M.gn("link"); for (var e = 0; e < d.length; e++) { if (d[e].getAttribute("rel") == "stylesheet") { b++ } } var l = M.gn("style"); b += l.length } if (M.styleSheets.length != b) { setTimeout(arguments.callee, 0); return } x.onReady() })() } x.addLoad(x.onReady) }, append: function(b, a) { x.bindReady(); if (x.isReady) { b.call(window, []) } else { x.readyList.push(function() { return b.call(window, []) }) } } }, x = n, P = f; K(f, { plo: [], lad: function(a) { f.plo.push(a) } }); K(f, { pub: function() { return _euc((window.addthis_config || {}).username || window.addthis_pub || "") }, igv: function(a, b) { if (!t.addthis_share) { t.addthis_share = {} } if (!addthis_share.url) { addthis_share.url = (t.addthis_url || a || "").split("#{").shift() } if (!addthis_share.title) { addthis_share.title = (t.addthis_title || b || "").split("#{").shift() } if (!t.addthis_config) { t.addthis_config = { username: t.addthis_pub} } else { if (addthis_config.data_use_cookies === false) { _atc.xck = 1 } } } }); if (!_atc.ost) { if (!t.addthis_conf) { t.addthis_conf = {} } for (var I in addthis_conf) { _atc[I] = addthis_conf[I] } _atc.ost = 1 } (function(b, l, e) { var q, p = document, a = b.util; b.ckv = a.fromKV(p.cookie, ";"); function i(d) { return a.fromKV(p.cookie, ";")[d] } if (!b.cookie) { b.cookie = {} } b.cookie.rck = i })(f, f.api, f); K(f, { qtp: [], xtp: function() { var b = f, d; while (d = b.qtp.pop()) { b.trk(d) } }, pcs: [], apc: function(b) { b = b.split("-").shift(); for (var a = 0; a < f.pcs.length; a++) { if (f.pcs[a] == b) { return } } f.pcs.push(b) }, gat: function() { }, atf: null, get_atssh: function() { var e = document, b = f, i = e.getElementById("_atssh"); if (!i) { i = e.ce("div"); i.style.visibility = "hidden"; i.id = "_atssh"; b.opp(i.style); e.body.insertBefore(i, e.body.firstChild) } return i }, ctf: function(i) { var p = document, e = window, b = f, s, l = Math.floor(Math.random() * 1000), q = b.get_atssh(); if (!b.bro.msi) { s = p.ce("iframe"); s.id = "_atssh" + l } else { if (b.bro.ie6 && !i && p.location.protocol.indexOf("https") == 0) { i = "javascript:''" } q.innerHTML = '<iframe id="_atssh' + l + '" width="1" height="1" name="_atssh' + l + '" ' + (i ? 'src="' + i + '"' : "") + ">"; s = p.getElementById("_atssh" + l) } b.opp(s.style); s.frameborder = s.style.border = 0; s.style.top = s.style.left = 0; return s }, off: function() { return Math.floor((new Date().getTime() - f.sttm) / 100).toString(16) }, oms: function(d) { var b = f; if (d && d.data && d.data.service) { if (!b.upm) { if (b.dcp) { return } b.dcp = 1 } b.trk({ gen: 300, sh: d.data.service }) } }, omp: function(b, d, e) { var a = {}; if (b) { a.sh = b } if (d) { a.cm = d } if (e) { a.cs = e } f.img("sh", "3", null, a) }, trk: function(e) { var d = f, i = d.dr, b = (d.rev || ""); if (!e) { return } if (i) { i = i.split("http://").pop() } e.xck = _atc.xck ? 1 : 0; e.xxl = 1; e.sid = d.ssid(); e.pub = d.pub(); e.ssl = d.ssl || 0; e.du = d.tru(d.du || d.dl.href); if (d.dt) { e.dt = d.dt } if (d.cb) { e.cb = d.cb } e.lng = d.lng(); e.ver = _atc.ver; if (!d.upm && d.uid) { e.uid = d.uid } e.pc = d.pcs.join(","); if (i) { e.dr = d.tru(i) } if (d.dh) { e.dh = d.dh } if (b) { e.rev = b } if (d.xfr) { if (d.upm) { if (d.atf) { d.atf.contentWindow.postMessage(m(e), "*") } } else { var l = d.get_atssh(); base = "static/r07/sh21.html" + (false ? "?t=" + new Date().getTime() : ""); if (d.atf) { l.removeChild(l.firstChild) } d.atf = d.ctf(); d.atf.src = _atr + base + "#" + m(e); l.appendChild(d.atf) } } else { f.qtp.push(e) } }, img: function(l, r, b, p, q) { if (!window.at_sub && !_atc.xtr) { var d = f, e = p || {}; e.evt = l; if (b) { e.ext = b } d.avt = e; if (q === 1) { d.xmi(true) } else { d.sxm(true) } } }, cuid: function() { return ((f.sttm / 1000) & f.max).toString(16) + ("00000000" + (Math.floor(Math.random() * (f.max + 1))).toString(16)).slice(-8) }, ssid: function() { if (f.sid === 0) { f.sid = f.cuid() } return f.sid }, sta: function() { var b = f; return "AT-" + (b.pub() ? b.pub() : "unknown") + "/-/" + b.ab + "/" + b.ssid() + "/" + (b.seq++) + (b.uid !== null ? "/" + b.uid : "") }, cst: function(a) { return "CXNID=2000001.521545608054043907" + (a || 2) + "NXC" }, fcv: function(b, a) { return _euc(b) + "=" + _euc(a) + ";" + f.off() }, cev: function(b, a) { f.cvt.push(f.fcv(b, a)); f.sxm(true) }, sxm: function(a) { if (f.tmo !== null) { clearTimeout(f.tmo) } if (a) { f.tmo = f.sto("_ate.xmi(false)", f.wait) } }, xmi: function(r) { var b = f, p = b.dl ? b.dl.hostname : ""; if (b.cvt.length > 0 || b.avt) { b.sxm(false); if (_atc.xtr) { return } var l = b.avt || {}; l.ce = b.cvt.join(","); b.cvt = []; b.avt = null; b.trk(l); if (r) { var q = document, e = q.ce("iframe"); e.id = "_atf"; f.opp(e.style); q.body.appendChild(e); e = q.getElementById("_atf") } } } }); K(f, { _rec: [], rec: function(e) { if (!e) { return } var q = j(e), b = f, d = b.atf, l = b._rec, w; if (q.ssh) { b.ssh(q.ssh) } if (q.uid) { b.uid = q.uid } if (q.dbm) { b.dbm = q.dbm } if (q.rdy) { b.xfr = 1; b.xtp(); return } for (var R = 0; R < l.length; R++) { l[R](q) } }, xfr: !f.upm || !f.bro.ffx, ssh: function(b) { f.gssh = 1; var a = window.addthis_ssh = _duc(b); f._ssh = a.split(",") }, com: function(a) { if (window.parent && window.postMessage) { window.parent.postMessage(a, "*") } else { f.ifm(a) } }, ifm: function(b) { if (addthis_wpl) { var d = (addthis_wpl.split("#"))[0]; window.parent.location.href = d + "#at" + b } return false }, pmh: function(a) { if (a.origin.slice(-12) == ".addthis.com") { f.rec(a.data) } } }); K(f, { lng: function() { return window.addthis_language || (window.addthis_config || {}).ui_language || (f.bro.msi ? navigator.userLanguage : navigator.language) }, iwb: function(a) { var b = { th: 1, pl: 1, sl: 1, gl: 1, hu: 1, is: 1, nb: 1, se: 1, su: 1 }; return !!b[a] }, ivl: function(a) { var b = { af: 1, afr: "af", ar: 1, ara: "ar", az: 1, aze: "az", be: 1, bye: "be", bg: 1, bul: "bg", bn: 1, ben: "bn", bs: 1, bos: "bs", ca: 1, cat: "ca", cs: 1, ces: "cs", cze: "cs", cy: 1, cym: "cy", da: 1, dan: "da", de: 1, deu: "de", ger: "de", el: 1, gre: "el", ell: "ell", es: 1, esl: "es", spa: "spa", et: 1, est: "et", eu: 1, fa: 1, fas: "fa", per: "fa", fi: 1, fin: "fi", fo: 1, fao: "fo", fr: 1, fra: "fr", fre: "fr", ga: 1, gae: "ga", gdh: "ga", gl: 1, glg: "gl", he: 1, heb: "he", hi: 1, hin: "hin", hr: 1, cro: "hr", hu: 1, hun: "hu", id: 1, ind: "id", is: 1, ice: "is", it: 1, ita: "it", ja: 1, jpn: "ja", ko: 1, kor: "ko", ku: 1, lb: 1, ltz: "lb", lt: 1, lit: "lt", lv: 1, lav: "lv", mk: 1, mac: "mk", mak: "mk", mn: 1, ml: 1, ms: 1, msa: "ms", may: "ms", nb: 1, nl: 1, nla: "nl", dut: "nl", no: 1, nn: 1, nno: "no", oc: 1, oci: "oc", pl: 1, pol: "pl", pt: 1, por: "pt", ro: 1, ron: "ro", rum: "ro", ru: 1, rus: "ru", sk: 1, slk: "sk", slo: "sk", sl: 1, slv: "sl", sq: 1, alb: "sq", sr: 1, se: 1, ser: "sr", su: 1, sv: 1, sve: "sv", sw: 1, swe: "sv", ta: 1, tam: "ta", te: 1, teg: "te", th: 1, tha: "th", tl: 1, tgl: "tl", tr: 1, tur: "tr", uk: 1, ukr: "uk", ur: 1, urd: "ur", vi: 1, vie: "vi", "zh-hk": 1, "chi-hk": "zh-hk", "zho-hk": "zh-hk", "zh-tr": 1, "chi-tr": "zh-tr", "zho-tr": "zh-tr", "zh-tw": 1, "chi-tw": "zh-tw", "zho-tw": "zh-tw", zh: 1, chi: "zh", zho: "zh" }; if (b[a]) { return b[a] } a = a.split("-").shift(); if (b[a]) { if (b[a] === 1) { return a } else { return b[a] } } return 0 }, gvl: function(a) { var b = f.ivl(a) || "en"; if (b === 1) { b = a } return b }, alg: function(e, d) { var a = (e || f.lng() || "en").toLowerCase(), b = f.ivl(a); if (a.indexOf("en") !== 0 && (!f.pll || d)) { if (b) { if (b !== 1) { a = b } f.pll = f.ajs("static/r07/lang05/" + a + ".js") } } } }); K(f, { trim: function(a, b) { try { a = a.replace(/^[\s\u3000]+|[\s\u3000]+$/g, ""); if (b) { a = _euc(a) } } catch (b) { } return a || "" }, trl: [], tru: function(b, a) { var d = ""; if (b) { d = b.substr(0, 300); if (d != b) { f.trl.push(a) } } return d }, sto: function(b, a) { return setTimeout(b, a) }, opp: function(a) { a.width = a.height = "1px"; a.position = "absolute"; a.zIndex = 100000 }, jlr: {}, ajs: function(b, a) { if (!f.jlr[b]) { var e = M.ce("script"), d = M.gn("head")[0] || M.documentElement; e.src = (a ? "" : _atr) + b; d.insertBefore(e, d.firstChild); f.jlr[b] = 1; return e } return 1 }, jlo: function() { try { var q = document, b = f, p = b.lng(), i = function(d) { var a = new Image(); f.imgz.push(a); a.src = d }; b.alg(p); if (!b.pld) { if (b.bro.ie6) { i(_atr + b.spt); i(_atr + "static/t00/logo1414.gif"); i(_atr + "static/t00/logo88.gif"); if (window.addthis_feed) { i("static/r05/feed00.gif", 1) } } if (b.pll && !window.addthis_translations) { b.sto(function() { b.pld = b.ajs("static/r07/menu59.js") }, 10) } else { b.pld = b.ajs("static/r07/menu59.js") } } } catch (l) { } }, ao: function(b, l, i, d, e, a) { f.lad(["open", b, l, i, d, e, a]); f.jlo(); return false }, ac: function() { }, as: function(b, d, a) { f.lad(["send", b, d, a]); f.jlo() } }); (function(e, l, q) { var w = document, r = 1, a = ["cbea", "kkk", "zvys", "phz"]; function b(d) { return d.replace(/[a-zA-Z]/g, function(i) { return String.fromCharCode((i <= "Z" ? 90 : 122) >= (i = i.charCodeAt(0) + 13) ? i : i - 26) }) } for (var p = 0; p < a.length; p++) { a[p] = " " + b(a[p]) + " " } function s(i) { var T = 0, S; i = (i || "").toLowerCase() + " "; if (!i) { return T } for (var d = 0; d < a.length; d++) { S = a[d]; if (i == S.replace(/ /g, "") || i.indexOf(S) > -1 || i.indexOf(S.replace(/^ /g, "")) === 0) { T |= r } } return T } function R() { var V = (t.addthis_title || w.title), S = s(V), U = w.all ? w.all.tags("META") : w.getElementsByTagName ? w.getElementsByTagName("META") : new Array(); if (U && U.length) { for (var T = 0; T < U.length; T++) { var d = U[T] || {}, X = (d.name || "").toLowerCase(), W = d.content; if (X == "description" || X == "keywords") { S |= s(W) } } } return S } if (!e.ad) { e.ad = {} } e.ad.cla = R })(f, f.api, f); (function(l, p, q) { var e, s = document, S = l.util, b = l.event.EventDispatcher, w = 25, i = []; function r(V, X, U) { var d = []; function d() { d.push(arguments) } function W() { U[V] = X; while (d.length) { X.apply(U, d.shift()) } } d.ready = W; return d } function R(V) { if (V && V instanceof a) { i.push(V) } for (var d = 0; d < i.length; ) { var U = i[d]; if (U && U.test()) { i.splice(d, 1); a.fire("load", U, { resource: U }) } else { d++ } } if (i.length) { setTimeout(R, w) } } function a(X, U, W) { var d = this, V = new b(d); V.decorate(V).decorate(d); this.ready = false; this.loading = false; this.id = X; this.url = U; if (typeof (W) === "function") { this.test = W } else { this.test = function() { return (!!_window[W]) } } a.addEventListener("load", function(Y) { var Z = Y.resource; if (!Z || Z.id !== d.id) { return } d.loading = false; d.ready = true; V.fire(Y.type, Z, { resource: Z }) }) } S.extend(a.prototype, { load: function() { if (this.url.substr(this.url.length - 4) == ".css") { var d = s.ce("link"), U = (s.gn("head")[0] || s.documentElement); d.rel = "stylesheet"; d.type = "text/css"; d.href = this.url; d.media = "all"; U.insertBefore(d, U.firstChild) } else { f.ajs(this.url, 1) } this.loading = true; a.monitor(this) } }); var T = new b(a); T.decorate(T).decorate(a); S.extend(a, { known: { jquery: new a("jquery", "//ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js", "jQuery"), ga: new a("ga", "//www.google-analytics.com/ga.js", function() { var d = _window._gat; return !!(d && (typeof (d._getTracker) === "function")) }) }, loading: i, monitor: R }); l.resource = { Resource: a, ApiQueueFactory: r} })(f, f.api, f); var t = window, N = t.addthis_config || {}, o = new f.resource.Resource("widgetcss", _atr + "static/r07/widget42.css", function() { return true }); function h() { try { if (_atc.xol && !_atc.xcs) { o.load() } var ae = f, q = ae.bro.msi, b = 0, T = M.title, U = M.referer || M.referrer || "", S = H ? H.href : null, r = S, ab = H.hostname, ad = S ? S.indexOf("sms_ss") : -1, X = (f.lng().split("-")).shift(), p = (H.href.indexOf(_atr) == -1 && !ae.sub), Y = M.gn("link"), d = _atr + "static/r07/sh21.html#", V = S && S.indexOf("https") === 0 ? 1 : 0, s, af, R = function() { if (!f.pcs.length) { var a = window.addthis_product || ("men-" + _atc.ver); f.pcs.push(a) } af.pc = f.pcs.join(",") }; ae.ab = window.addthis_ab || "pz-" + (ae.tamp > 0 ? 1 : 0); if (window.addthis_product) { f.pcs.push(addthis_product) } for (var Z = 0; Z < Y.length; Z++) { var W = Y[Z]; if (W.rel && W.rel == "canonical" && W.href) { r = W.href } } r = r.split("#{").shift(); ae.igv(r, M.title || ""); ae.dr = ae.tru(U, "fr"); ae.du = ae.tru(r, "fp"); ae.dt = T = t.addthis_share.title; ae.cb = ae.ad.cla(); ae.dh = H.hostname; ae.ssl = V; af = { cb: ae.cb, ab: ae.ab, dh: ae.dh, dr: ae.dr, du: ae.du, dt: T, inst: ae.inst, lng: ae.lng(), pc: t.addthis_product || "men", pub: ae.pub(), ssl: V, sid: f.ssid(), srd: _atc.damp, srf: _atc.famp, srp: _atc.pamp, srx: _atc.xamp, ver: _atc.ver, xck: _atc.xck || 0 }; if (ae.trl.length) { af.trl = ae.trl.join(",") } if (ae.rev) { af.rev = ae.rev } if (ad > -1 && S.indexOf(_atd + "book") == -1) { var w = []; var aa = S.substr(ad); aa = aa.split("&").shift().split("#").shift().split("=").pop(); af.sr = aa; if (ae.vamp >= 0 && !ae.sub && aa.length) { w.push(ae.fcv("plv", Math.round(1 / _atc.vamp))); w.push(ae.fcv("rsc", aa)); af.ce = w.join(",") } } if (ae.upm) { af.xd = 1; if (f.bro.ffx) { af.xld = 1 } } if (p) { if (ae.upm) { if (q) { f.sto(function() { R(); ae.atf = s = ae.ctf(d + m(af)) }, f.wait); t.attachEvent("onmessage", ae.pmh) } else { s = ae.ctf(); t.addEventListener("message", ae.pmh, false) } if (f.bro.ffx) { s.src = d; f.qtp.push(af) } else { if (!q) { f.sto(function() { R(); s.src = d + m(af) }, f.wait) } } } else { s = ae.ctf(); f.sto(function() { R(); s.src = d + m(af) }, f.wait) } if (s) { ae.atf = s = ae.get_atssh().appendChild(s) } } if (t.addthis_language || N.ui_language) { ae.alg() } if (ae.plo.length > 0) { ae.jlo() } } catch (ac) { } } f.ed.addEventListener("addthis.menu.share", f.oms); t._ate = P; t._adr = x; try { var E = M.gn("script"), v = E[E.length - 1], y = v.src.indexOf("#") > -1 ? v.src.replace(/^[^\#]+\#?/, "") : v.src.replace(/^[^\?]+\??/, ""), z = j(y); if (z.pub || z.username) { t.addthis_pub = _duc(z.pub ? z.pub : z.username) } if (t.addthis_pub && t.addthis_config) { t.addthis_config.username = t.addthis_pub } if (z.domready) { _atc.dr = 1 } if (z.async) { _atc.xol = 1 } if (_atc.ver === 120) { var D = "atb" + f.cuid(); M.write('<span id="' + D + '"></span>'); f.igv(); f.lad(["span", D, addthis_share.url || "[url]", addthis_share.title || "[title]"]) } if (t.addthis_clickout) { f.lad(["cout"]) } if (!_atc.xol && !_atc.xcs && N.ui_use_css !== false) { o.load() } } catch (L) { if (window.console) { console.log("main", L) } } n.bindReady(); n.append(h); (function(l, r, s) { var w = document, X = function() { var Y = w.gn("link"), aa = {}; for (var Z = 0; Z < Y.length; Z++) { var d = Y[Z]; if (d.href && d.rel) { aa[d.rel] = d.href } } return aa }, U = X(), i = function() { var d = w.location.protocol; if (d == "file:") { d = "http:" } return d + "//" + _atd }, W = function() { if (f.dr) { return "&pre=" + _euc(f.dr) } else { return "" } }, e = function(Z, aa, Y, d) { return i() + (aa ? "feed.php" : "bookmark.php") + "?v=" + (_atc.ver) + "&winname=addthis&" + q(Z, aa, Y, d) + "&" + f.cst(4) + W() + "&tt=0" + (Z === "more" && f.bro.ipa ? "&imore=1" : "") }, q = function(ah, aa, ak, ap) { var ae = f.trim, am = window, ai = f.pub(), ac = window._atw || {}, ad = ae((ak && ak.url ? ak.url : (ac.share && ac.share.url ? ac.share.url : addthis_url)), 1), ao, Z = function(aq) { if (ad && ad != "") { var d = ad.indexOf("%23at" + aq); if (d > -1) { ad = ad.substr(0, d) } } }; if (!ap) { ap = ac.conf || {} } else { for (var aj in ac.conf) { if (!(ap[aj])) { ap[aj] = ac.conf[aj] } } } if (!ak) { ak = ac.share } else { for (var aj in ac.share) { if (!(ak[aj])) { ak[aj] = ac.share[aj] } } } ao = ap.services_custom; Z("pro"); Z("opp"); Z("cle"); Z("clb"); Z("abc"); if (ad.indexOf("addthis.com/static/r07/ab") > -1) { ad = _duc(ad); ad = ad.split("&"); for (var al = 0; al < ad.length; al++) { var af = ad[al].split("="); if (af.length == 2) { if (af[0] == "url") { ad = ae(af[1], 1); break } } } } if (ao instanceof Array) { for (var al = 0; al < ao.length; al++) { if (ao[al].code == ah) { ao = ao[al]; break } } } var an = ((ak && ak.templates && ak.templates[ah]) ? ak.templates[ah] : ""), Y = ((ak && ak.modules && ak.modules[ah]) ? ak.modules[ah] : ""), ag = (ap.product || am.addthis_product || ("men-" + _atc.ver)), ab = ""; if (ak.email_vars) { for (var aj in ak.email_vars) { ab += (ab == "" ? "" : "&") + _euc(aj) + "=" + _euc(ak.email_vars[aj]) } } if (ac.mck > 1 || (ac.mck == 1 && ah !== "e")) { ag = ag.replace("men", "max") } return "pub=" + ai + "&source=" + ag + "&lng=" + (f.lng() || "xx") + "&s=" + ah + (ap.ui_508_compliant ? "&u508=1" : "") + (aa ? "&h1=" + ae((ak.feed || ak.url).replace("feed://", ""), 1) + "&t1=" : "&url=" + ad + "&title=") + ae(ak.title || am.addthis_title, 1) + (_atc.ver < 200 ? "&logo=" + ae(am.addthis_logo, 1) + "&logobg=" + ae(am.addthis_logo_background, 1) + "&logocolor=" + ae(am.addthis_logo_color, 1) : "") + "&ate=" + f.sta() + (window.addthis_ssh && addthis_ssh.indexOf(ah) > -1 ? "&ips=1" : "") + (f.uid ? "&uid=" + _euc(f.uid) : "") + (ak.email_template ? "&email_template=" + _euc(ak.email_template) : "") + (ab ? "&email_vars=" + _euc(ab) : "") + (ak.description ? "&description=" + ae(ak.description, 1) : "") + (ak.html ? "&html=" + ae(ak.html, 1) : (ak.content ? "&html=" + ae(ak.content, 1) : "")) + (ak.screenshot ? "&screenshot=" + ae(ak.screenshot, 1) : "") + (ak.swfurl ? "&swfurl=" + ae(ak.swfurl, 1) : "") + (ak.iframeurl ? "&iframeurl=" + ae(ak.iframeurl, 1) : "") + (ak.width ? "&width=" + ak.width : "") + (ak.height ? "&height=" + ak.height : "") + (ap.data_track_p32 ? "&p32=" + ap.data_track_p32 : "") + (ap.data_track_clickback || ap.data_track_linkback || !ai || ai == "AddThis" ? "&sms_ss=1" : "") + ((ao && ao.url) ? "&acn=" + _euc(ao.name) + "&acc=" + _euc(ao.code) + "&acu=" + _euc(ao.url) : "") + (an ? "&template=" + ae(an, 1) : "") + (Y ? "&module=" + ae(Y, 1) : "") + (ap.ui_cobrand ? "&ui_cobrand=" + ae(ap.ui_cobrand, 1) : "") + (ap.ui_header_color ? "&ui_header_color=" + ae(ap.ui_header_color, 1) : "") + (ap.ui_header_background ? "&ui_header_background=" + ae(ap.ui_header_background, 1) : "") }, S = function(d, aa, Y) { var Z = f.pub(); return aa.url + (Y.data_track_clickback || Y.data_track_linkback || !Z || Z == "AddThis" ? ((aa.url.indexOf("?") > -1) ? "&" : "?") + "sms_ss=" + d : "") }, R = function(Y, d) { var d = d || {}; return "mailto:?subject=" + _euc(Y.title ? Y.title : Y.url) + "&body=" + _euc(S("mailto", Y, d)) }, p = function(d) { return _atc.unt && ((!d.templates || !d.templates.twitter) && (!f.wlp || f.wlp == "http:")) }, b = function(ag, Y) { var ad = 550, af = 450, aa = screen.height, ab = screen.width, ac = Math.round((ab / 2) - (ad / 2)), d = 0, ae; if (aa > af) { d = Math.round((aa / 2) - (af / 2)) } t.open("http://twitter.com/share?url=" + _euc(S("twitter", ag, Y)) + "&text=" + _euc(ag.title) + "&via=AddThis", "twitter_tweet", "left=" + ac + ",top=" + d + ",width=" + ad + ",height=" + af + ",personalbar=no,toolbar=no,scrollbars=yes,location=yes,resizable=yes"); var ae = new Image(); f.opp(ae); ae.src = f.share.genurl("twitter", 0, ag, Y); return false }, V = [], a = function(aa, ab, Z, Y) { var d; if (aa == "email") { d = e(Z, Y) } else { d = e(aa, ab, Z, Y) } V.push(f.ajs(d, 1)) }, T = function(Y, d) { return i() + "tellfriend.php?&fromname=aaa&fromemail=" + _euc(d.from) + "&frommenu=1&tofriend=" + _euc(d.to) + (Y.email_template ? "&template=" + _euc(Y.email_template) : "") + (d.vars ? "&vars=" + _euc(d.vars) : "") + (window.addthis_ssh.indexOf("email") > -1 ? "&ips=1" : "") + "&lng=" + (f.lng() || "xx") + "&note=" + _euc(d.note) + "&" + q("e") }; l.share = { pts: b, unt: p, uadd: q, genurl: e, geneurl: T, genieu: R, svcurl: i, track: a, links: U} })(f, f.api, f) })(); function addthis_open() { if (typeof iconf == "string") { iconf = null } return _ate.ao.apply(_ate, arguments) } function addthis_close() { _ate.ac() } function addthis_sendto() { _ate.as.apply(_ate, arguments); return false } if (_atc.dr) { _adr.onReady() } } else { _ate.inst++ } if (_atc.abf) { addthis_open(document.getElementById("ab"), "emailab", window.addthis_url || "[URL]", window.addthis_title || "[TITLE]") }; if (!window.addthis || window.addthis.nodeType !== undefined) { window.addthis = (function() { var g = { a1webmarks: "A1&#8209;Webmarks", aim: "AOL Lifestream", amazonwishlist: "Amazon", aolmail: "AOL Mail", aviary: "Aviary Capture", domaintoolswhois: "Whois Lookup", googlebuzz: "Google Buzz", googlereader: "Google Reader", googletranslate: "Google Translate", linkagogo: "Link-a-Gogo", meneame: "Men&eacute;ame", misterwong: "Mister Wong", mailto: "Email App", myaol: "myAOL", myspace: "MySpace", readitlater: "Read It Later", rss: "RSS", stumbleupon: "StumbleUpon", typepad: "TypePad", wordpress: "WordPress", yahoobkm: "Y! Bookmarks", yahoomail: "Y! Mail", youtube: "YouTube" }, i = document, f = i.gn("body").item(0), h = _ate.util.bind, c = _ate.ed, b = function(d, n) { var o; if (window._atw && _atw.list) { o = _atw.list[d] } else { if (g[d]) { o = g[d] } else { o = (n ? d : (d.substr(0, 1).toUpperCase() + d.substr(1))) } } return (o || "").replace(/&nbsp;/g, " ") }, l = function(d, w, u, t, v) { w = w.toUpperCase(); var r = (d == f && addthis.cache[w] ? addthis.cache[w] : (d || f || i.body).getElementsByTagName(w)), q = [], s, p; if (d == f) { addthis.cache[w] = r } if (v) { for (s = 0; s < r.length; s++) { p = r[s]; if (p.className.indexOf(u) > -1) { q.push(p) } } } else { u = u.replace(/\-/g, "\\-"); var n = new RegExp("(^|\\s)" + u + (t ? "\\w*" : "") + "(\\s|$)"); for (s = 0; s < r.length; s++) { p = r[s]; if (n.test(p.className)) { q.push(p) } } } return (q) }, m = i.getElementsByClassname || l; function k(d) { if (typeof d == "string") { var n = d.substr(0, 1); if (n == "#") { d = i.getElementById(d.substr(1)) } else { if (n == ".") { d = m(f, "*", d.substr(1)) } else { } } } if (!d) { d = [] } else { if (!(d instanceof Array)) { d = [d] } } return d } function a(n, d) { return function() { addthis.plo.push({ call: n, args: arguments, ns: d }) } } function j(o) { var n = this, d = this.queue = []; this.name = o; this.call = function() { d.push(arguments) }; this.call.queuer = this; this.flush = function(r, q) { for (var p = 0; p < d.length; p++) { r.apply(q || n, d[p]) } return r } } return { ost: 0, cache: {}, plo: [], links: [], ems: [], init: _adr.onReady, _Queuer: j, _queueFor: a, _select: k, _gebcn: l, button: a("button"), toolbox: a("toolbox"), update: a("update"), util: { getServiceName: b }, addEventListener: h(_ate.ed.addEventListener, _ate.ed), removeEventListener: h(_ate.ed.removeEventListener, _ate.ed)} })() } _adr.append((function() { if (!window.addthis.ost) { _ate.extend(addthis, _ate.api); var d = document, u = undefined, w = window, unaccent = function(s) { if (s.indexOf("&") > -1) { s = s.replace(/&([aeiou]).+;/g, "$1") } return s }, customServices = {}, globalConfig = w.addthis_config, globalShare = w.addthis_share, upConfig = {}, upShare = {}, body = d.gn("body").item(0), mrg = function(o, n) { if (n && o !== n) { for (var k in n) { if (o[k] === u) { o[k] = n[k] } } } }, addEvents = function(o, ss, au) { var oldclick = o.onclick || function() { }, genshare = function() { _ate.ed.fire("addthis.menu.share", window.addthis || {}, { service: ss, url: o.share.url }) }; if (o.conf.data_ga_tracker || addthis_config.data_ga_tracker || o.conf.data_ga_property || addthis_config.data_ga_property) { o.onclick = function() { _ate.gat(ss, au, o.conf, o.share); genshare(); oldclick() } } else { o.onclick = function() { genshare(); oldclick() } } }, getFollowUrl = function(ss, userid) { var urls = { googlebuzz: "http://www.google.com/profiles/%s", youtube: "http://www.youtube.com/user/%s", facebook: "http://www.facebook.com/profile.php?id=%s", facebook_url: "http://www.facebook.com/%s", rss: "%s", flickr: "http://www.flickr.com/photos/%s", twitter: "http://twitter.com/%s", linkedin: "http://www.linkedin.com/in/%s" }; if (ss == "facebook" && isNaN(parseInt(userid))) { ss = "facebook_url" } return (urls[ss] || "").replace("%s", userid) || "" }, registerProductCode = function(o) { var opc = (o.parentNode || {}).className || "", pc = o.conf && o.conf.product && opc.indexOf("toolbox") == -1 ? o.conf.product : "tbx" + (o.className.indexOf("32x32") > -1 || opc.indexOf("32x32") > -1 ? "32" : "") + "-" + _atc.ver; _ate.apc(pc); return pc }, rpl = function(o, n) { var r = {}; for (var k in o) { if (n[k]) { r[k] = n[k] } else { r[k] = o[k] } } return r }, addthis = window.addthis, f_title = { rss: "Subscribe via RSS" }, b_title = { email: "Email", mailto: "Email", print: "Print", favorites: "Save to Favorites", twitter: "Tweet This", digg: "Digg This", more: "View more services" }, json = { email_vars: 1, modules: 1, templates: 1, services_custom: 1 }, nosend = { feed: 1, more: 1, email: 1, mailto: 1 }, nowindow = { feed: 1, email: 1, mailto: 1, print: 1, more: !_ate.bro.ipa, favorites: 1 }, _uniqueConcat = function(a, b) { var keys = {}; for (var i = 0; i < a.length; i++) { keys[a[i]] = 1 } for (var i = 0; i < b.length; i++) { if (!keys[b[i]]) { a.push(b[i]); keys[b[i]] = 1 } } return a }, _makeButton = function(w, h, alt, url) { var img = d.ce("img"); img.width = w; img.height = h; img.border = 0; img.alt = alt; img.src = url; return img }, _parseThirdPartyAttributes = function(el, prefix) { var key, attr = [], rv = {}; for (var i = 0; i < el.attributes.length; i++) { key = el.attributes[i]; attr = key.name.split(prefix + ":"); if (attr.length == 2) { rv[attr.pop()] = key.value } } return rv }, _parseAttributes = function(el, overrides, childWins) { var overrides = overrides || {}, rv = {}, at_attr = _parseThirdPartyAttributes(el, "addthis"); for (var k in overrides) { rv[k] = overrides[k] } for (var k in at_attr) { if (overrides[k] && !childWins) { rv[k] = overrides[k] } else { var v = at_attr[k]; if (v) { rv[k] = v } else { if (overrides[k]) { rv[k] = overrides[k] } } if (rv[k] === "true") { rv[k] = true } else { if (rv[k] === "false") { rv[k] = false } } } if (rv[k] !== undefined && json[k] && (typeof rv[k] == "string")) { eval("var e = " + rv[k]); rv[k] = e } } return rv }, _processCustomServices = function(conf) { var acs = (conf || {}).services_custom; if (!acs) { return } if (!(acs instanceof Array)) { acs = [acs] } for (var i = 0; i < acs.length; i++) { var service = acs[i]; if (service.name && service.icon && service.url) { service.code = service.url = service.url.replace(/ /g, ""); if (service.code.indexOf("http") === 0) { service.code = service.code.substr((service.code.indexOf("https") === 0 ? 8 : 7)) } service.code = service.code.split("?").shift().split("/").shift().toLowerCase(); customServices[service.code] = service } } }, _select = addthis._select, _getCustomService = function(ss, conf) { return customServices[ss] || {} }, _getATtributes = function(el, config, share, childWins) { var rv = { conf: config || {}, share: share || {} }; rv.conf = _parseAttributes(el, config, childWins); rv.share = _parseAttributes(el, share, childWins); return rv }, _render = function(what, conf, attrs) { _ate.igv(); if (what) { conf = conf || {}; attrs = attrs || {}; var config = conf.conf || globalConfig, share = conf.share || globalShare, onmouseover = attrs.onmouseover, onmouseout = attrs.onmouseout, onclick = attrs.onclick, internal = attrs.internal, follow = attrs.follow, ss = attrs.singleservice; if (ss) { if (onclick === u) { onclick = nosend[ss] ? function(el, config, share) { var s = rpl(share, upShare); return addthis_open(el, ss, s.url, s.title, rpl(config, upConfig), s) } : nowindow[ss] ? function(el, config, share) { var s = rpl(share, upShare); return addthis_sendto(ss, rpl(config, upConfig), s) } : null } } else { if (!attrs.noevents) { if (!attrs.nohover) { if (onmouseover === u) { onmouseover = function(el, config, share) { return addthis_open(el, "", null, null, config, share) } } if (onmouseout === u) { onmouseout = function(el) { return addthis_close() } } if (onclick === u) { onclick = function(el, config, share) { return addthis_sendto("more", config, share) } } } else { if (onclick === u) { onclick = function(el, config, share) { return addthis_open(el, "more", null, null, config, share) } } } } } what = _select(what); for (var i = 0; i < what.length; i++) { var o = what[i], oattr = _getATtributes(o, config, share, true) || {}; mrg(oattr.conf, globalConfig); mrg(oattr.share, globalShare); o.conf = oattr.conf; o.share = oattr.share; if (o.conf.ui_language) { _ate.alg(o.conf.ui_language) } _processCustomServices(o.conf); if (ss) { o.conf.product = registerProductCode(o) } if ((!o.conf || !o.conf.ui_click) && !_ate.bro.ipa) { if (onmouseover) { o.onmouseover = function() { return onmouseover(this, this.conf, this.share) } } if (onmouseout) { o.onmouseout = function() { return onmouseout(this) } } if (onclick) { o.onclick = function() { return onclick(this, this.conf, this.share) } } } else { if (onclick) { if (ss) { o.onclick = function() { return onclick(this, this.conf, this.share) } } else { o.onclick = function() { return addthis_open(this, "", null, null, this.conf, this.share) } } } } if (o.tagName.toLowerCase() == "a") { if (ss) { var customService = _getCustomService(ss, o.conf); if (customService && customService.code && customService.icon) { if (o.firstChild && o.firstChild.className.indexOf("at300bs") > -1) { o.firstChild.style.background = "url(" + customService.icon + ") no-repeat top left" } } if (!nowindow[ss]) { var url = o.share.url || addthis_share.url; if (attrs.follow) { o.href = url; o.onclick = function() { _ate.share.track(ss, 1, o.share, o.conf) }; if (o.children && o.children.length == 1 && o.parentNode && o.parentNode.className.indexOf("toolbox") > -1) { var sp = d.ce("span"); sp.className = "addthis_follow_label"; sp.innerHTML = addthis.util.getServiceName(ss); o.appendChild(sp) } } else { if (ss == "twitter") { if (_ate.share.unt(o.share)) { o.onclick = function(e) { return _ate.share.pts(o.share, o.conf) }; o.noh = 1 } else { o.onclick = null; o.href = _ate.share.genurl(ss, 0, o.share, o.conf); o.noh = 0 } } else { if (!o.noh) { o.href = _ate.share.genurl(ss, 0, o.share, o.conf) } } } addEvents(o, ss, url); o.target = "_blank"; addthis.links.push(o) } else { if (ss == "mailto" || (ss == "email" && (o.conf.ui_use_mailto || _ate.bro.iph || _ate.bro.ipa))) { o.onclick = function() { (new Image()).src = _ate.share.genurl("mailto", 0, o.share, o.config) }; o.href = _ate.share.genieu(o.share); addEvents(o, ss, url); addthis.ems.push(o) } } if (!o.title || o.at_titled) { var serviceName = addthis.util.getServiceName(ss, !customService); o.title = unaccent(attrs.follow ? (f_title[ss] ? f_title[ss] : "Follow on " + serviceName) : (b_title[ss] ? b_title[ss] : "Send to " + serviceName)); o.at_titled = 1 } } else { if (o.conf.product && o.parentNode.className.indexOf("toolbox") == -1) { registerProductCode(o) } } } var app; switch (internal) { case "img": if (!o.hasChildNodes()) { var lang = (o.conf.ui_language || _ate.lng()).split("-").shift(), validatedLang = _ate.ivl(lang); if (!validatedLang) { lang = "en" } else { if (validatedLang !== 1) { lang = validatedLang } } app = _makeButton(_ate.iwb(lang) ? 150 : 125, 16, "Share", _atr + "static/btn/v2/lg-share-" + lang.substr(0, 2) + ".gif") } break } if (app) { o.appendChild(app) } } } }, buttons = addthis._gebcn(body, "A", "addthis_button_", true, true), _renderToolbox = function(collection, config, share, reprocess) { for (var i = 0; i < collection.length; i++) { var b = collection[i]; if (b == null) { continue } if (reprocess !== false || !b.ost) { var attr = _getATtributes(b, config, share, true), hc = 0, a = "at300", c = b.className || "", passthrough = "", s = c.match(/addthis_button_([\w\.]+)(?:\s|$)/), options = {}, sv = s && s.length ? s[1] : 0; mrg(attr.conf, globalConfig); mrg(attr.share, globalShare); if (sv) { if (sv === "tweetmeme") { if (b.ost) { continue } var tm_attr = _parseThirdPartyAttributes(b, "tm"), tmw = 50, tmh = 61; passthrough = _ate.util.toKV(tm_attr); if (tm_attr.style === "compact") { tmw = 95; tmh = 25 } b.innerHTML = '<iframe frameborder="0" width="' + tmw + '" height="' + tmh + '" scrolling="no" allowTransparency="true" scrollbars="no"' + (_ate.bro.ie6 ? " src=\"javascript:''\"" : "") + "></iframe>"; var tm = b.firstChild; tm.src = "//api.tweetmeme.com/button.js?url=" + _euc(attr.share.url) + "&" + passthrough; b.noh = b.ost = 1 } else { if (sv === "tweet") { if (b.ost) { continue } var tw_attr = _parseThirdPartyAttributes(b, "tw"), tww = 110, twh = 20; if (!tw_attr.text) { tw_attr.text = attr.share.title } if (!tw_attr.via) { tw_attr.via = "AddThis" } passthrough = _ate.util.toKV(tw_attr); if (tw_attr.count === "none") { tww = 55 } else { if (tw_attr.count === "vertical") { tww = 55; twh = 63 } } b.innerHTML = '<iframe allowtransparency="true" frameborder="0" role="presentation" scrolling="no" style="width:' + tww + "px; height:" + twh + 'px;"></iframe>'; var tw = b.firstChild; tw.src = "//platform.twitter.com/widgets/tweet_button.html?url=" + _euc(tw_attr.url || attr.share.url) + "&" + passthrough; b.noh = b.ost = 1 } else { if (sv === "facebook_like") { if (b.ost) { continue } var fblike; passthrough = _ate.util.toKV(_parseThirdPartyAttributes(b, "fb:like")); if (!_ate.bro.msi) { fblike = d.ce("iframe") } else { b.innerHTML = '<iframe frameborder="0" scrolling="no" allowTransparency="true" scrollbars="no"' + (_ate.bro.ie6 ? " src=\"javascript:''\"" : "") + "></iframe>"; fblike = b.firstChild } fblike.style.overflow = "hidden"; fblike.style.border = "none"; fblike.style.borderWidth = "0px"; fblike.style.width = "82px"; fblike.style.height = "25px"; fblike.style.marginTop = "-2px"; fblike.src = "//www.facebook.com/plugins/like.php?href=" + _euc(attr.share.url) + "&layout=button_count&show_faces=false&width=100&action=like&font=arial&" + passthrough; if (!_ate.bro.msi) { b.appendChild(fblike) } b.noh = b.ost = 1 } else { if (sv.indexOf("preferred") > -1) { if (b._iss) { continue } registerProductCode(b); s = c.match(/addthis_button_preferred_([0-9]+)(?:\s|$)/); var svidx = ((s && s.length) ? Math.min(16, Math.max(1, parseInt(s[1]))) : 1) - 1; if (window._atw) { if (!b.parentNode.services) { b.parentNode.services = {} } var excl = _atw.conf.services_exclude, locopts = _atw.loc, parentServices = b.parentNode.services, opts = _uniqueConcat(addthis_options.replace(",more", "").split(","), locopts.split(",")); do { sv = opts[svidx++] } while (svidx < opts.length && (excl.indexOf(sv) > -1 || parentServices[sv])); if (parentServices[sv]) { for (var k in _atw.list) { if (!parentServices[k] && excl.indexOf(k) == -1) { sv = k; break } } } b._ips = 1; if (b.className.indexOf(sv) == -1) { b.className += " addthis_button_" + sv; b._iss = 1 } b.parentNode.services[sv] = 1 } else { _ate.alg(attr.conf.ui_language || window.addthis_language); _ate.plo.unshift(["deco", _renderToolbox, [b], config, share, true]); if (_ate.gssh) { _ate.pld = _ate.ajs("static/r07/menu59.js") } else { if (!_ate.pld) { _ate.pld = 1; var loadmenu = function() { _ate.pld = _ate.ajs("static/r07/menu59.js") }; if (_ate.upm) { _ate._rec.push(function(data) { if (data.ssh) { loadmenu() } }); _ate.sto(loadmenu, 500) } else { loadmenu() } } } continue } } else { if (sv.indexOf("follow") > -1) { sv = sv.split("_follow").shift(); options.follow = true; attr.share.url = getFollowUrl(sv, attr.share.userid) } } } } } if (!b.childNodes.length) { var sp = d.ce("span"); b.appendChild(sp); sp.className = a + "bs at15t_" + sv } else { if (b.childNodes.length == 1) { var cn = b.childNodes[0]; if (cn.nodeType == 3) { var sp = d.ce("span"), tv = cn.nodeValue; b.insertBefore(sp, cn); sp.className = a + "bs at15t_" + sv } } else { hc = 1 } } if (sv === "compact" || sv === "expanded") { if (!hc && c.indexOf(a) == -1) { b.className += " " + a + "m" } if (!attr.conf.product) { attr.conf.product = "men-" + _atc.ver } if (sv === "expanded") { options.nohover = true; options.singleservice = "more" } } else { if ((b.parentNode.className || "").indexOf("toolbox") > -1) { if (!b.parentNode.services) { b.parentNode.services = {} } b.parentNode.services[sv] = 1 } if (!hc && c.indexOf(a) == -1) { b.className += " " + a + "b" } options.singleservice = sv } if (b._ips) { options.issh = true } _render([b], attr, options); b.ost = 1; registerProductCode(b) } } } }, gat = function(s, au, conf, share) { var pageTracker = conf.data_ga_tracker, propertyId = conf.data_ga_property; if (propertyId && typeof (window._gat) == "object") { pageTracker = _gat._getTracker(propertyId) } if (pageTracker && typeof (pageTracker) == "string") { pageTracker = window[pageTracker] } if (pageTracker && typeof (pageTracker) == "object") { var gaUrl = au || (share || {}).url || location.href; if (gaUrl.toLowerCase().replace("https", "http").indexOf("http%3a%2f%2f") == 0) { gaUrl = _duc(gaUrl) } try { pageTracker._trackEvent("addthis", s, gaUrl) } catch (e) { try { pageTracker._initData(); pageTracker._trackEvent("addthis", s, gaUrl) } catch (e) { } } } }; _ate.gat = gat; addthis.update = function(which, what, value) { if (which == "share") { if (!window.addthis_share) { window.addthis_share = {} } window.addthis_share[what] = value; upShare[what] = value; for (var i in addthis.links) { var o = addthis.links[i], rx = new RegExp("&" + what + "=(.*)&"), ns = "&" + what + "=" + _euc(value) + "&"; if (!o.noh) { o.href = o.href.replace(rx, ns) } if (o.href.indexOf(what) == -1) { o.href += ns } } for (var i in addthis.ems) { var o = addthis.ems[i]; o.href = _ate.share.genieu(addthis_share) } } else { if (which == "config") { if (!window.addthis_config) { window.addthis_config = {} } window.addthis_config[what] = value; upConfig[what] = value } } }; addthis._render = _render; var rsrcs = [new _ate.resource.Resource("countercss", _atr + "static/r07/counter42.css", function() { return true }), new _ate.resource.Resource("counter", _atr + "js/250/plugin.sharecounter.js", function() { return window.addthis.counter.ost })]; if (!w.JSON || !w.JSON.stringify) { rsrcs.unshift(new _ate.resource.Resource("json2", _atr + "static/r07/json2.js", function() { return w.JSON && w.JSON.stringify })) } addthis.counter = function(what, config, share) { if (what) { what = addthis._select(what); if (what.length) { for (var k in rsrcs) { rsrcs[k].load() } } } }; addthis.button = function(what, config, share) { config = config || {}; if (!config.product) { config.product = "men-" + _atc.ver } _render(what, { conf: config, share: share }, { internal: "img" }) }; addthis.toolbox = function(what, config, share) { var toolboxes = _select(what); for (var i = 0; i < toolboxes.length; i++) { var tb = toolboxes[i], attr = _getATtributes(tb, config, share), sp = d.ce("div"), c; if (!attr.conf.product) { attr.conf.product = "tbx" + (tb.className.indexOf("32x32") > -1 ? "32" : "") + "-" + _atc.ver } if (tb) { c = tb.getElementsByTagName("a"); if (c) { _renderToolbox(c, attr.conf, attr.share) } tb.appendChild(sp) } sp.className = "atclear" } }; addthis.ready = function() { var at = addthis, a = ".addthis_"; if (at.ost) { return } at.ost = 1; addthis.toolbox(a + "toolbox"); addthis.button(a + "button"); addthis.counter(a + "counter"); _renderToolbox(buttons, null, null, false); _ate.ed.fire("addthis.ready", addthis); for (var i = 0, plo = at.plo, q; i < plo.length; i++) { q = plo[i]; (q.ns ? at[q.ns] : at)[q.call].apply(this, q.args) } }; addthis.util.getAttributes = _getATtributes; window.addthis = addthis; window.addthis.ready() } })); _ate.extend(addthis, { user: (function() { var f = _ate, c = addthis, g = {}, d = 0, j; function i(a, k) { return f.reduce(["getID", "getServiceShareHistory"], a, k) } function h(a, k) { return function(l) { setTimeout(function() { l(f[a] || k) }, 0) } } function b() { if (d) { return } if (j !== null) { clearTimeout(j) } j = null; d = 1; i(function(l, a, k) { g[a] = g[a].queuer.flush(h.apply(c, l[k]), c); return l }, [["uid", ""], ["_ssh", []]]) } f._rec.push(b); j = setTimeout(b, 5000); g.getPreferredServices = function(a) { if (window._atw) { a(addthis_options.split(",")) } else { f.plo.push(["pref", a]); _ate.alg(); if (f.gssh) { f.pld = f.ajs("static/r07/menu59.js") } else { if (!f.pld) { f.pld = 1; _ate._rec.push(function(k) { if (k.ssh) { _ate.pld = _ate.ajs("static/r07/menu59.js") } }) } } } }; return i(function(k, a) { k[a] = (new c._Queuer(a)).call; return k }, g) })() });
		},
		createObject: function(networks) { //returnt een html string
			/* maken van het object*/
			var obj = "<div class=\"addthis_toolbox addthis_default_style\">";
			for (var i = 0; i < networks.length; i++) { obj += "<a {0} class=\"addthis_button_" + networks[i] + "\"></a>"; }
			obj += "</div>";
			return obj;
		},
		placeSnPanel: function(networks) {
			if (!networks) { return false; }
			if (PT.Sites.General.EditorActive()) {
				PT.Instances.div = new Array();
				var div = document.getElementsByTagName('div');
				for (var i = 0; i < div.length; i++) {
					if (div[i].className.indexOf('snContainer') != -1) {
						var pos = Cms.General.ObjectBounds(div[i]);
						var checkedSNs = div[i].getElementsByTagName('p')[0];
						PT.Instances.div[i] = div[i];
						var a = PT.Instances.div[i];
						var desdiv = document.createElement('div');
						desdiv.style.position = "absolute";
						desdiv.style.backgroundColor = "#ffffff";
						desdiv.style.left = 0 + "px";
						desdiv.style.top = 0 + "px";
						desdiv.style.zIndex = 999;
						for (var j = 0; j < networks.length; j++) {
							var input = document.createElement('input');
							input.type = "checkbox";
							input.className = networks[j];
							input.onclick = function() { PT.Social.registerSn(this, a); };
							var img = document.createElement('img');
							img.src = "http://cms.paradesk.nl/images/social/" + networks[j] + "-16x16.png";
							img.alt = "Toevoegeven op " + networks[j];
							desdiv.appendChild(input);
							desdiv.appendChild(img);
							if(checkedSNs.innerHTML.indexOf(networks[j])!=-1){
								input.checked = true;
							}
						}
						document.body.appendChild(desdiv);
						desdiv.style.marginLeft = pos.x+1;
						desdiv.style.marginTop = pos.y+1;
						div[i].style.height = desdiv.clientHeight + "px";
					}
				}
			}
		},
		registerSn: function (input, snContainer){
			var network = input.className;
			var p = snContainer.getElementsByTagName('p')[0];
			p.innerHTML = p.innerHTML.replace(("{uw tekst}"),""); // verwijder uit string
			if(p.innerHTML.indexOf(","+network)!=-1){ // hij staat er in
				input.checked = false;
				p.innerHTML = p.innerHTML.replace((","+network),""); // verwijder uit string
			}
			else{
				input.checked = true;
				p.innerHTML += ","+network; //toevoegen
			}
			
			var pm = feleditor.pageManager;
			pm.UpdateElement(p.id, "site", p.innerHTML, "", "", "", false);
		}
	},
	Shop: {
	// code komt in PTShopGeneral.js
},
Browser: {},
Instances: {},
Settings: {}
}

var PT = ParadeTechnologies;
var $ = function (obj) { if (typeof obj == "string") { return document.getElementById(obj); } return obj; }
var c$ = document.createElement;

PT.Settings.Language = "nl";

//------------------------------------------------------------------------------------------------------------------
// PT.Browser. Checkt de browserversie
//------------------------------------------------------------------------------------------------------------------

function InitializePTBrowser() {
    var ua = navigator.userAgent.toLowerCase();
    var isStrict = document.compatMode == "CSS1Compat",
        isOpera = ua.indexOf("opera") > -1,
        isSafari = (/webkit|khtml/).test(ua),
        isSafari3 = isSafari && ua.indexOf('webkit/5') != -1,
        isIE = !isOpera && ua.indexOf("msie") > -1,
        isIE7 = !isOpera && ua.indexOf("msie 7") > -1,
        isIE8 = !isOpera && ua.indexOf("msie 8") > -1,
        isGecko = !isSafari && ua.indexOf("gecko") > -1,
        isWindows = (ua.indexOf("windows") != -1 || ua.indexOf("win32") != -1),
        isMac = (ua.indexOf("macintosh") != -1 || ua.indexOf("mac os x") != -1),
        isAir = (ua.indexOf("adobeair") != -1),
        isLinux = (ua.indexOf("linux") != -1),
        isSecure = window.location.href.toLowerCase().indexOf("https") === 0;
	
	// add browserversion to head.class
    var css_browser_selector = function(u){var ua = u.toLowerCase(),is=function(t){return ua.indexOf(t)>-1;},g='gecko',w='webkit',s='safari',h=document.getElementsByTagName('html')[0],b=[(!(/opera|webtv/i.test(ua))&&/msie\s(\d)/.test(ua))?('ie ie'+RegExp.$1):is('firefox/2')?g+' ff2':is('firefox/3')?g+' ff3':is('gecko/')?g:/opera(\s|\/)(\d+)/.test(ua)?'opera opera'+RegExp.$2:is('konqueror')?'konqueror':is('chrome')?w+' '+s+' chrome':is('applewebkit/')?w+' '+s+(/version\/(\d+)/.test(ua)?' '+s+RegExp.$1:''):is('mozilla/')?g:'',is('j2me')?'mobile':is('iphone')?'iphone':is('ipod')?'ipod':is('mac')?'mac':is('darwin')?'mac':is('webtv')?'webtv':is('win')?'win':is('freebsd')?'freebsd':(is('x11')||is('linux'))?'linux':'','js']; c = b.join(' '); h.className += ' '+c; return c;}; 
	css_browser_selector(ua); 

    with (ParadeTechnologies) {
		Browser.isStrict = isStrict;
		Browser.isOpera = isOpera;
		Browser.isSafari = isSafari;
		Browser.isSafari3 = isSafari3;
		Browser.isIE = isIE;
		Browser.isIE7 = isIE7;
		Browser.isIE8 = isIE8;
		Browser.isGecko = isGecko;
		Browser.isWindows = isWindows;
		Browser.isMac = isMac;
		Browser.isAir = isAir;
		Browser.isLinux = isLinux;
		Browser.isSecure = isSecure;
	}
}
InitializePTBrowser();

//------------------------------------------------------------------------------------------------------------------
// String (uitbreiding van js string-class)
//------------------------------------------------------------------------------------------------------------------
String.prototype.Trim = function() {
	var value = this;
	value = value.replace(/^\s+/, '');
	value = value.replace(/\s+$/, '');

	return value;
}

String.prototype.Left = function(count) {
	if (count < 1) { return ""; }
	var value = this;
	value = value.substring(0, count);

	return value;
}