/**
 * @fileOverview All JS-code for kruikenstad.nl
 * @author Martijn Bos
 * @since 1.0 - 2010-8-23
 * @version 1.0 - 2010-8-23
 */

if (typeof (nl) == "undefined") {
	/**
	 * @namespace Top Level Domain
	 */
	var nl = {}
}

/**
 * @namespace Domain name and container for simple public functions
 */
nl.kruikenstad = (function() {
	/* Start public */
	return {
		/**
		 * Sets class to floating images in generic content blocks
		 * @requires jQuery
		 * @example
		 * nl.kruikenstad.FixImageFloat()
		 */
		FixImageFloat: function() {
			jQuery('*.genericContent img[style*="float"][style*="left"]').addClass('floatLeft')
			jQuery('*.genericContent img[style*="float"][style*="right"]').addClass('floatRight')
		},
		
		/**
		 * Add Flash Klok to page
		 * @param {String} swfUrl URL of SWF
		 * @param {String} flashContainer ID of the DOM element where the SWF will be placed in
		 * @requires swfobject
		 * @requires jQuery
		 * @example
		 * nl.kruikenstad.AddFlashElement("/flash/animationHeader.swf", "FlashSpotlight")
		 */
		AddFlashElement: function(swfUrl, flashContainer, elementWidth, elementHeight, flashVarString) {
			var flashvars = {};
            flashvars.xmlfile = flashVarString;

			var params = {};
				params.wmode = "transparent";
			var attributes = {};

			if (swfobject.getFlashPlayerVersion().major >= 9) {
				swfobject.embedSWF(swfUrl +"?random=" + Math.random(), flashContainer, elementWidth, elementHeight, "9.0.0", "/flash/expressInstall.swf", flashvars, params, attributes);
			}
		}
	}
	/* End public */
})();






/**
* @namespace Sets class on odd menu items
*/
nl.kruikenstad.EvenEventItems = (function() {
	
	/**
	 * Sets class on odd menu items
	 * @requires jQuery
	 * @example
	 * nl.groenhorst.EvenMenuItem.Init()
	 */
	return {
		Init: function() {
			jQuery("ol.sf_eventsList li:even").addClass("evenLi");
		}
	}

})();
