function dropdown(o, dd, cs) {		
	// Swap user settings
	var enableSwap = true;
	var swapClass = 'active';
	
	// Global vars
	var dd = get.id(dd);
	var cs = cs ? get.id(cs) : o;
	var oc = cs.className;
	
	// Archive fix -- 09 02 17
	if(o.className == 'archiveFix' && o.parentNode.parentNode.id == 'archiveFix4')
		return false;
	
	if(dd.hasChildNodes()) {
		// Mouseover
		dd.style.display = 'block';
		if(enableSwap) cs.className = swapClass;
		
		// Mouseout
		o.onmouseout = function() {
			dd.style.display = 'none';
			if(enableSwap) cs.className = oc;
		};
	};
};
function snActivate(s, t) {
	if(get.id(t).hasChildNodes()) {
		var t = get.id(t).firstChild.firstChild;
		t.className = 'active';
		s.onmouseout = function() {
			t.removeAttribute('className');
			t.removeAttribute('class');
		};
	};
};
// LightWindow URLs
var artists = {
	url : ''
};
var image_types = {     
	'strips' : {
		url : '/strips',
		label: 'Strips'
	},
	'cartoons' : {
		url : '/cartoons',
		label : 'Cartoons'
	},
	'illustraties' : {
		url : '/illustraties',
		label : 'Illustraties'
	},
	'animaties' : {
		url : '/animaties',
		label : 'Animaties'
	},
	'character design' : {
		url : '/character_design',
		label: 'Character Design'
	}
};
var get = {
	id : function(id) {
		return document.getElementById(id);
	},
	tag : function(t, p) {
		return p ? p.getElementsByTagName(t) : document.getElementsByTagName(t);
	}
};
// zClass 1.2
function zClass(id, t, eClass, b) {
	var p = get.id(id);
	var e = get.tag(t, p);
	var c = 0;
	for(i = 0; i < e.length; i++) {
		var node = e[i];
		if(node.className == eClass) {
			if(b == false && c == 0)
				c++;
			else if(c == 0) {
				node.className = eClass + '_even';
				c++;
			} else {
				node.className = eClass + '_odd';
				c = 0;
			};
		};
	};
};
// shorten 1.2
var shorten = {
	byClass : function(t, c, l, e) {
		var o = get.tag(t);
		for(var i = 0, j = o.length; i < j; i++) {
			if(o[i].className == c) {
				var t = o[i].firstChild;
				if(t.length > l) {
					t.nodeValue = t.nodeValue.substring(0, l);
					if(t.nodeValue.substring(t.nodeValue.length - 1, t.nodeValue.length) == ' ')
						t.nodeValue = t.nodeValue.substring(0, t.nodeValue.length - 1);
					if(e)
						t.parentNode.innerHTML += e;
				};
			};
		};
	}
};
function toggleForm(objId) {
	obj = document.getElementById(objId);
	if(obj.style.display !== 'block') {
		obj.style.display = 'block'
	} else {
		obj.style.display = 'none'
	};
};

var Archive = {
	
	node : null,
	
	init : function(node) {
		if(!this.node) {
			if(typeof node == 'string') {
				this.node = document.getElementById(node);
			} else {
				this.node = node;
			};
		};
	},
	
	hide : function() {
		if(this.node) {
			this.node.style.display = 'none';
		};
	},
	
	show : function() {
		if(this.node) {
			this.node.style.display = 'block';
		};
	},
	
	move : function(target) {
		if(this.node) {
			if(typeof target == 'string') {
				target = document.getElementById(target);
			};
			if(target) {
				target.insertBefore(this.node, target.firstChild);
			};
		};
	}
	
};

var fs = {};

(function() {

	fs.VimeoHandler = function(vimeoId, videoId, imageId, options) {		
		
		if(!vimeoId) {
			return;
		};
		
		if(!options) {
			options = {};
		};
		
		var opts = {
			width : options.width || 525,
			height : options.height || 295,
			color : options.color || 'bf0000'
		};
		
		var video = document.getElementById(videoId);
		var image = document.getElementById(imageId);
		var template = '<iframe src="http://player.vimeo.com/video/%id?title=0&amp;byline=0&amp;portrait=0&amp;color=' + opts.color + '" width="' + opts.width + '" height="' + opts.height + '" frameborder="0" webkitAllowFullScreen allowFullScreen></iframe>';
		
		image.style.display = 'none';
		video.innerHTML = template.replace(/%id/g, vimeoId);
		
	};

})();
