var CONFIG = {}, Waterkoelers = {}, objLargeCart, objSmallCart, objOrderOverview, objAjaxCall, objOverlay, objMessage;window.addEvent('domready', function(){	CONFIG.BASE_URL = $(document.head).getElement('base').get('href');	objMessage = new Waterkoelers.Message;	// Filter Accordion	$$('.togglerWrapper').each(function(e, i)	{		var slider = new Fx.Slide(e.getElement('.element'),		{			duration: 300,			transition: Fx.Transitions.Sine.easeOut,			onComplete: function()			{				if(slider.open){ e.getElement('.toggler').removeClass('close'); }				else { e.getElement('.toggler').addClass('close'); }			}		});		e.getElement('.toggler').addEvent('click', function(e)		{			e.stop();			slider.toggle();		});		if(e.getElement('.toggler').hasClass('close'))		{			slider.hide();		}	});			// Slider with tho knots	if($('slide_container'))	{		var doubleSlider = new Slider($('slider_minmax_gutter_m'), $('slider_minmax_minKnobA'), $('slider_bkg_img'), 		{			start: 0,			end: 100,			offset: 2,			snap: false,			onChange: function(pos)			{				$('slider_minmax_min').set('html', pos.minpos);				$('slider_minmax_max').set('html', pos.maxpos);				$('max-amount').set('value', pos.maxpos);				$('min-amount').set('value', pos.minpos);			},			onComplete: function()			{				if ($('slide_container').hasClass('triggerChange'))				{										$('slide_container').getParent('form').fireEvent('change');				}			}		}, $('slider_minmax_maxKnobA')).setMin(0).setMax(100);		if ($('slide_container').getElement('span.minAm'))		{			doubleSlider.setMin($('slide_container').getElement('span.minAm').get('text').toInt());		}		if ($('slide_container').getElement('span.maxAm'))		{			doubleSlider.setMax($('slide_container').getElement('span.maxAm').get('text').toInt());		}	}		// Reset Form Inputfields	new Waterkoelers.resetInputs('.resetinput');		// Create Tabs	$$('.tabcontent').each(function(el, i)	{		new Waterkoelers.Tabs( 			el.getElements('ul.tabs li'),			el.getElements('div.tab'), 			el.getElement('ul.tabs li.active')		);	});		// Create Small Shopping Cart	if ($('shoppingcart'))	{		objSmallCart = new Waterkoelers.ShoppingCartSmall({}, $('shoppingcart'));	}		// Create Large Shopping Cart	if ($('shoppingcart_large'))	{		objLargeCart = new Waterkoelers.ShoppingCartLarge({}, $('shoppingcart_large'));	}	// Create Order Overview	if($('order'))	{		objOrderOverview = new Waterkoelers.OrderOverview({}, $('order'));	}			// Product Detail Page	if ($('product_detail'))	{		new Waterkoelers.ProductDetailPage;	};		// Customer Form For Copy fields	if ($('customerform'))	{		new Waterkoelers.CustomerForm(		{			elWrapper: $('customerform')		});	};		if ($('topoffer'))	{		new Waterkoelers.Topoffer;	};		// Custom Form Submits	$$('.formSubmit').addEvent('click', function(e)	{		e.stop();		this.getParent('form').submit();	});		new Waterkoelers.customFormSubmit;		// Payment Form, Click Events	$$('fieldset.payment-option').each(function(el, i)	{		el.getElement('input.radio').addEvents(		{			click: function()			{				if (this.get('checked'))				{					if (el.getParent('form').getElement('fieldset.active'))					{						el.getParent('form').getElement('fieldset.active').removeClass('active');					}					el.addClass('active');				};			}		});				el.getElement('input.radio').fireEvent('click');	});		objOverlay = new Waterkoelers.Overlay;	new Waterkoelers.ImageOverlay;		$$('.defaultamounter').each(function(el)	{		new Waterkoelers.ProductAmounterDefault(		{			'elAmounter': el,			'minAmount': 6		});	});		if ($('filterForm'))	{		new Waterkoelers.Filter(		{			form: $('filterForm'),			wrapper: $('filterContent'),			totalProducts: $$('.totalProducts')		});	}	});Waterkoelers.Filter = new Class({	options: {		form: null,		wrapper: null,		totalProducts: null	},	Implements: Options,		initialize: function(options)	{		this.setOptions(options);				this.createLoadingOverlay();				this.setFormEvents();	},		createLoadingOverlay: function()	{		var coords = this.options.wrapper.getCoordinates();		this.loadingOverlay = new Element('div',		{			'class': 'loadingOverlay',			'rel': this.options.wrapper.get('id'),			'styles': {				'left': coords.left,				'top': coords.top			}		}).inject(this.options.wrapper, 'after').fade('hide');				this.loadingOverlay.set('tween', { duration: 200 });		this.resizeOverlay();	},		resizeOverlay: function()	{		this.loadingOverlay.setStyles(		{			'width': $(this.loadingOverlay.get('rel')).getSize().x,			'height': $(this.loadingOverlay.get('rel')).getSize().y		});	},		setFormEvents: function()	{		this.options.form.addEvent('change', function(e)		{			this.options.form.fireEvent('submit');		}.bind(this));				this.options.form.set('send', 		{			method: 'post',			onComplete: function(objResponse)			{				// Return Object				objReturn = JSON.decode(objResponse);				this.createProducts(objReturn);			}.bind(this)		});		this.options.form.addEvent('submit', function(e)		{			if (e){ e.stop(); }			this.showOverlay();			this.options.form.send();		}.bind(this));	},		createProducts: function(objReturn)	{		if (objReturn.blnValid)		{				this.setTotalProducts(objReturn.arrData.length);								this.options.wrapper.empty();						var wrapper = new Element('div',			{				'class': 'pushbox products',				'styles': {					'height': 'auto'				}			}).inject(this.options.wrapper);						if (objReturn.arrData.length == 0)			{				var text = new Element('div',				{					'class': 'noProducts',					'text': 'Er zijn geen kerstpakketten gevonden die aan uw wensen voldoen, pas uw wensen aan met de filter'				}).inject(wrapper);			}						var clear = new Element('div', { 'class': 'clear' });						objReturn.arrData.each(function(productData, key)			{				if (key % 3 == 0 && key > 0)				{					var clear = new Element('div', { 'class': 'clear' }).inject(wrapper, 'bottom');										wrapper = new Element('div',					{						'class': 'pushbox products',						'styles': {							'height': 'auto'						}					}).inject(this.options.wrapper);				}								var product = new Element('div',				{					'class': 'product',					'styles': {						'paddingTop': 200,						'paddingBottom': 15,						'opacity': 0					}				}).inject(wrapper).fade(1);								var image = new Element('img',				{					'src': productData.image_view3,					'class': 'prod_image',					'alt': productData.title,					'styles': {						'width': 225					}				}).inject(product);								if ((key - 2) % 3 != 0){ new Element('span', { 'class': 'line' }).inject(product); }								var h3 = new Element('h3').inject(product);				var h3a = new Element('a',				{					'html': productData.title,					'href': CONFIG.BASE_URL + productData.pt_type + '/' + productData.url_title,					'title': productData.title				}).inject(h3);								var price = productData.price_buy.replace('.', ',').split(',');								var priceballHtmlFrom = '';				if(productData.price_buyold && productData.price_buyold != '0.00')				{					priceballHtmlFrom = '<span>van ' + productData.price_buyold.replace('.', ',') + '</span>';				}				var priceballHtml = '<div>' + productData.price_text + priceballHtmlFrom + '</div>' + price[0] + ',<sup>' + price[1] + '</sup>';				var priceBall = new Element('a',				{					'href': CONFIG.BASE_URL + productData.pt_type + '/' + productData.url_title,					'title': productData.title,					'class': 'price priceOfferSmall priceTwoNumbers',					'html': priceballHtml				}).inject(product);								if (productData.sold == 1){ priceBall.addClass('priceSold'); }								var order = new Element('div',				{					'class': 'order'				}).inject(product);								var orderInhoud = new Element('a',				{					'html': '&rsaquo; bekijk de inhoud',					'href': CONFIG.BASE_URL + productData.pt_type + '/' + productData.url_title,					'title': productData.title				}).inject(order);				var orderInhoud = new Element('a',				{					'class': 'btn-small red',					'html': 'Bekijken',					'href': CONFIG.BASE_URL + productData.pt_type + '/' + productData.url_title,					'title': productData.title				}).inject(order);							}.bind(this));					clear.inject(wrapper, 'bottom');		}				this.hideOverlay();				this.resizeOverlay();	},		setTotalProducts: function(total)	{		this.options.totalProducts.each(function(el, i){ el.set('text', '(' + total + ')'); });	},		showOverlay: function()	{		this.loadingOverlay.fade(.8);	},		hideOverlay: function()	{		this.loadingOverlay.fade(0);	}});Waterkoelers.Topoffer = new Class({	options: {		elWrapper: false,		arrItems: false,		intItems: false,		intDelay: 8000,		intActive: 0,		intTimer: false	},	Implements: Options,		initialize: function(options)	{		this.setOptions(options);				this.options.elWrapper = $('topoffer');		this.options.arrItems = this.options.elWrapper.getElements('div.pushbox');		this.options.intItems = this.options.arrItems.length;				this.hideOthers();				if (this.options.intItems > 1)		{			this.options.intTimer = this.showNext.periodical(this.options.intDelay, this);		}	},		hideOthers: function()	{		this.options.arrItems.each(function(el, i)		{			if (i != 0)			{				el.setStyle('display', 'block').fade('hide');			};						el.set('tween', { 'duration': 500 });		});	},		getNext: function()	{		this.options.intActive++;		if (this.options.intActive >= this.options.intItems)		{			this.options.intActive = 0;		}	},		showNext: function()	{		this.options.arrItems[this.options.intActive].fade(0);		this.getNext();		this.options.arrItems[this.options.intActive].fade(1);	}});Waterkoelers.CustomerForm = new Class({	options: {		elWrapper: false,		arrCopyFields: false,		arrResultFields: new Array(),		elToggler: false	},	Implements: [Options, Events],		initialize: function(options, elWrapper)	{		this.setOptions(options);				this.options.elToggler = this.options.elWrapper.getElement('.togglecopy');				this.options.arrCopyFields = this.options.elWrapper.getElements('.copyfield');				this.options.arrCopyFields.each(function(el, i)		{						this.options.arrResultFields.push(this.options.elWrapper.getElement('input[name='+el.get('name')+'_invoice]'));		}.bind(this));				this.options.arrCopyFields.addEvents(		{			blur: function()			{				this.options.arrResultFields.each(function(el, i)				{					el.set('value', this.options.arrCopyFields[i].get('value'));				}.bind(this));								if (this.options.elWrapper.getElement('.genderfield:checked'))				{					var strValue = this.options.elWrapper.getElement('.genderfield:checked').get('value');					this.options.elWrapper.getElements('input[name=gender_invoice]').each(function(el, i)					{						if (el.get('value') == strValue)						{							el.set('checked', true);						};					});				};			}.bind(this)		});				this.options.elToggler.addEvents(		{			click: function()			{				var blnChecked = this.options.elToggler.get('checked');				if (blnChecked)				{					this.options.arrResultFields.each(function(el, i)					{						el.set('value', '');					}.bind(this));					this.options.elWrapper.getElement('.invoiceaddress').show();				}				else				{					this.options.arrCopyFields[0].fireEvent('blur');					this.options.elWrapper.getElement('.invoiceaddress').hide();				}			}.bind(this)		});	}});Waterkoelers.customFormSubmit = new Class({	options: {		arrForms: false	},	Implements: Options,		initialize: function(options)	{				this.options.arrForms = $$('.customFormSubmit');						this.submitToSession();				this.options.arrForms.each(function(elForm, intKey)		{			elForm.getElement('.link_submit').addEvent('click', function(e)			{				e.stop();				elForm.send();			});		});	},		submitToSession: function()	{		this.options.arrForms.each(function(elForm, intKey)		{			elForm.set('send', 			{				method: 'post',				onComplete: function(objResponse)				{					// Return Object					objReturn = JSON.decode(objResponse);					if (objReturn.blnValid)					{						document.location.href = CONFIG.BASE_URL + 'bestellen/winkelwagen/type/' + objReturn.data.ordertype;					};				}.bind(this)			});			elForm.addEvent('submit', function(e)			{				e.stop();				elForm.send();			}.bind(this));		});	}});Waterkoelers.ProductDetailPage = new Class({	options: {		elWrapper: false,		elFormsToSession: false,		arrOrderTypeElements: false	},	Implements: [Options, Events],		initialize: function(options)	{		this.setOptions(options);				this.options.elWrapper = $('product_detail');				this.options.elFormsToSession = this.options.elWrapper.getElement('.formToSession');		this.options.arrOrderTypeElements = this.options.elWrapper.getElements('.setOrderType');				this.options.elWrapper.getElement('form button').addEvent('click', function()		{			$('ordertype').set('value', 'order');		});						this.submitToSession();				this.changeInputs();	},		changeInputs: function()	{		this.options.arrOrderTypeElements.each(function(elButton, intKey)		{			elButton.addEvents(			{				click: function(e)				{					e.stop();					arrValue = elButton.get('title').split('::');					$('ordertype').set('value', arrValue[0]);					$('sellingtype').set('value', arrValue[1]);										this.options.elFormsToSession.send();				}.bind(this)			});		}.bind(this));	},		submitToSession: function()	{		this.options.elFormsToSession.set('send', 		{			method: 'post',			onComplete: function(objResponse)			{				// Return Object				objReturn = JSON.decode(objResponse);								if (objReturn.blnValid)				{					document.location.href = CONFIG.BASE_URL + 'bestellen/winkelwagen/type/' + objReturn.data.ordertype;				};			}.bind(this)		});				this.options.elFormsToSession.addEvent('submit', function(e)		{			e.stop();			this.options.elFormsToSession.send();		}.bind(this));	}	});// ShoppingCart LargeWaterkoelers.ShoppingCartLarge = new Class({	options: {		elWrapper: false,		elLoading: false,		elOrderMessage: false,		elTotalField: false,		ProductAmounter: false,		strAjaxCallPath: 'sessionHandler.php',		blnFirst: true	},	Implements: Options,		initialize: function(options, elWrapper)	{				$('submit-small-cart').addEvent('click', function(event)		{			var amountTotal = 0;						// Count the total products			$$('input[class="productamount"]').each(function(value, key)			{				amountTotal += value.get('value').toInt();			});						if(amountTotal < 5)			{				alert('U moet minimaal 5 pakketten bestellen.');				event.preventDefault();			}		});										this.setOptions(options);				this.options.elWrapper = elWrapper;		this.options.elLoading = elWrapper.getElement('#cart_loading');				this.options.elOrderMessage = elWrapper.getElement('#order-message');		this.options.elTotalField = elWrapper.getElement('.totalprice-cart');				$$('.productrow').each(function(el, i)		{			this.updateProductTotal(el);		}.bind(this));				this.updateTotal();						this.options.blnFirst = false;					this.addCartEvents();	},		updateProductTotal: function(elMain)	{		var intPrice, intAmount, intTime = 0;		// Set Stuff		elMain.getElement('span.subtotal_product_buy').inline();		intPrice = elMain.getElement('span.subtotal_product_buy').get('text').replace(',', '.').toFloat();		intAmount = elMain.getElement('.productamount').get('value');		/*		if (elMain.hasClass('waterItem'))		{			if (intAmount <= 12)			{				intPrice = elMain.getElement('span.subtotal_product_buy_org').get('text').replace(',', '.').toFloat();			};			if(intAmount > 12 && intAmount < 25)			{				intPrice = elMain.getElement('span.subtotal_product_buy_org').get('text').replace(',', '.').toFloat();							intPrice = this.toNumber(intPrice * 12 / 13, 15);				intPrice = this.toCalculate(intPrice).toFloat();			}			if(intAmount > 24)			{				intPrice = elMain.getElement('span.subtotal_product_buy_org').get('text').replace(',', '.').toFloat();				intPrice = this.toNumber(intPrice * 12 / 13, 15);				intPrice = this.toCalculate(intPrice);				intPrice = this.toNumber(intPrice * 24 / 25, 15);				intPrice = this.toCalculate(intPrice);			}						if (elMain.getElement('.subtotal_product_buy').get('text') != this.toNumber(intPrice) && this.options.blnFirst == false)			{				// Set Message				objMessage.set('De prijs van het geselecteerde product is veranderd in: &euro; '+ this.toNumber(intPrice));			}			elMain.getElement('.subtotal_product_buy').set('text', this.toNumber(intPrice));		}*/				elMain.getElement('.total_product').set('text', this.toNumber(intPrice * intAmount));						this.updateTotal();	},		addCartEvents: function()	{		this.options.ProductAmounter = new Waterkoelers.ProductAmounter;				$$('.btn_delete_large').each(function(el, i)		{			if (el.hasEvent('click') == null)			{				el.addEvents(				{					click: function(e)					{						e.stop();						el.getParent('tr').getElements('td').highlight('#ffb2b2');						this.removeProduct.delay(400, this, el.getParent('tr'));					}.bind(this)				});			}		}.bind(this));				$$('.updateSelect').each(function(el, i)		{			el.addEvent('change', function()			{				this.updateSession(el);			}.bind(this));		}.bind(this));	},		updateSession: function(elInput)	{		var objUpdateRequest = new Request.JSON(		{			url: CONFIG.BASE_URL + this.options.strAjaxCallPath + '?function=updateSession'		}).post(		{			'hash': elInput.getParent('tr').getElement('.hashname').get('value'),			'key': elInput.get('name'),			'value': elInput.get('value')		});				this.updateProductTotal(elInput.getParent('tr'));	},		removeFromSession: function(el)	{		var objUpdateRequest = new Request.JSON(		{			url: CONFIG.BASE_URL + this.options.strAjaxCallPath + '?function=removeFromSession'		}).post({ 'hash': el.getElement('.hashname').get('value') });	},		removeProduct: function(el)	{		this.removeFromSession(el);		el.dispose();				this.updateTotal();	},		updateTotal: function()	{				var intTotalItems = 0;		var intSubTotal = 0;		var intShipping = 0;								this.options.elWrapper.getElements('.shoppingcart_table tbody tr.productrow').each(function(elTr, intKey)		{			intSubTotal += this.toCalculate(elTr.getElement('.total_product').get('text')).toFloat();			intTotalItems += elTr.getElement('input.productamount').get('value').toInt();		}.bind(this));				if(intTotalItems <  5)		{			this.options.elOrderMessage.set('text', 'U moet minimaal 5 pakketten bestellen.').addClass('error');			}		else		{			this.options.elOrderMessage.set('text', 'Bekijk hieronder uw bestelling.').removeClass('error');			}						//console.log(intTotalItems);						if(intTotalItems >= 60)		{			intShipping = 0;		}			else if(intTotalItems >= 30)		{			intShipping = 21.5;		}		else		{			intShipping = 32.5;		}		//var intShipping = Math.ceil(intTotalItems/35) * 43;					this.options.elTotalField.getElement('span.subtotal').set('text', this.toNumber(intSubTotal));		this.options.elTotalField.getElement('span.shipping').set('text', this.toNumber(intShipping));		this.options.elTotalField.getElement('span.totalprice').set('text', this.toNumber((intSubTotal + intShipping)));	},		toCalculate: function(argStrNumber)	{		return argStrNumber.replace(',', '.');	},		toNumber: function(argIntNumber, argIntFloat)	{		if(argIntFloat == null)		{			argIntFloat = 2;		}		return argIntNumber.toFloat().toFixed(argIntFloat).replace('.', ',');	}	});// ShoppingCart SmallWaterkoelers.ShoppingCartSmall = new Class({		options: {		elWrapper: false,		elEmpty: false,		elFull: false,		elAddCartButtons: false,		elTotalField: false,		ProductAmounter: false,		Cart: false,		strAjaxCallPath: 'sessionHandler.php',		blnFirst: true	},	Implements: Options,		initialize: function(options, elWrapper)	{		this.setOptions(options);				this.options.elWrapper = elWrapper;		this.options.elEmpty = elWrapper.getElement('#cart_empty');		this.options.elFull = elWrapper.getElement('#cart_full');				if (this.options.elFull)		{			this.options.elTotalField = this.options.elFull.getElement('.cart_total');			this.options.Cart = this.options.elFull.getElements('.cart_item');						this.addCartEvents();						this.updateTotal();						this.options.blnFirst = false;		}		else		{			this.options.Cart = new Hash();		}	},		updateWaterPrice: function(elMain)	{		var intPrice, intAmount;				// Set Stuff		intPrice = elMain.getElement('span.price em.price_buy').get('text').split(' ')[0];		intPrice = intPrice.replace(',', '.').toFloat();		intAmount = elMain.getElement('.product_amounter input').get('value');		if (intAmount <= 12)		{			intPrice = elMain.getElement('span.price_buy_org').get('text').replace(',', '.').toFloat();		}					if(intAmount > 12 && intAmount < 25)		{			intPrice = elMain.getElement('span.price_buy_org').get('text').replace(',', '.').toFloat();						intPrice = this.toNumber(intPrice * 12 / 13, 15);			intPrice = this.toCalculate(intPrice).toFloat();		}		if(intAmount > 24)		{			intPrice = elMain.getElement('span.price_buy_org').get('text').replace(',', '.').toFloat();			intPrice = this.toNumber(intPrice * 12 / 13, 15);			intPrice = this.toCalculate(intPrice);						intPrice = this.toNumber(intPrice * 24 / 25, 15);			intPrice = this.toCalculate(intPrice);		}				if (elMain.getElement('span.price em.price_buy').get('text') != this.toNumber(intPrice) && this.options.blnFirst == false)		{			// Set Message			objMessage.set('De prijs van het geselecteerde product is veranderd in: &euro; '+ this.toNumber(intPrice));		};				elMain.getElement('span.price em.price_buy').set('text', this.toNumber(intPrice));		return intPrice;		},			addCartEvents: function()	{		this.options.ProductAmounter = new Waterkoelers.ProductAmounterSmallCart;				$$('.btn_delete').each(function(el, i)		{			if (el.hasEvent('click') == null)			{				el.addEvents(				{					click: function()					{						el.getParent().highlight('#ffb2b2');						this.removeProduct.delay(400, this, el.getParent());					}.bind(this)				});			}		}.bind(this));		},		removeProduct: function(el)	{		// Remove Element From Cookie		var objUpdateRequest = new Request.JSON(		{			url: CONFIG.BASE_URL + this.options.strAjaxCallPath + '?function=removeFromSession'		}).post({ 'hash': el.getElement('.hashname').get('value') });				el.dispose();				this.updateTotal();				this.checkEmpty();	},		updateAmount: function(argElInput)	{		var objUpdateRequest = new Request.JSON(		{			url: CONFIG.BASE_URL + this.options.strAjaxCallPath + '?function=updateSession'		}).post(		{			'hash': argElInput.getParent('.cart_item').getElement('.hashname').get('value'),			'key': argElInput.get('name'),			'value': argElInput.get('value')		});				if(argElInput.hasClass('waterBottle'))		{			this.updateWaterPrice(argElInput.getParent('.cart_item'));		}				this.updateTotal();	},	/*	updateSellingType: function(argElMain)	{		var strSellingType = argElMain.getElement('input[type=radio]:checked').get('value');		var objUpdateRequest = new Request.JSON(		{			url: CONFIG.BASE_URL + this.options.strAjaxCallPath + '?function=updateSession'		}).post(		{			'hash': argElMain.getElement('.hashname').get('value'),			'key': 'sellingtype',			'value': strSellingType		});				switch (strSellingType)		{			case 'buy':			{				argElMain.getElement('span.price em.price_rent').hide();				argElMain.getElement('span.price em.price_buy').inline();				break;			}			case 'rent':			{				argElMain.getElement('span.price em.price_rent').inline();				argElMain.getElement('span.price em.price_buy').hide()				break;			}		}				argElMain.getElement('.sellingtype').set('value', strSellingType);				this.updateTotal();	},*/		updateTotal: function()	{		var intTotalItems = 0		var intSubTotal = 0;		var intShipping = 0;				this.options.elFull.getElements('.cart_item').each(function(elItem, intKey)		{						intSubTotal += this.toCalculate(elItem.getElement('span.price em.price_buy').get('text').split(' ')[0]) * elItem.getElement('div.product_amounter input').get('value').toInt();			intTotalItems += elItem.getElement('input[name=amount]').get('value').toInt();		}.bind(this));				if(intTotalItems >= 60)		{			intShipping = 0;		}			else if(intTotalItems >= 30)		{			intShipping = 21.5;		}		else		{			intShipping = 32.5;		}						this.options.elTotalField.getElement('span.subtotal').set('text', this.toNumber(intSubTotal));		this.options.elTotalField.getElement('span.shipping').set('text', this.toNumber(intShipping));		this.options.elTotalField.getElement('span.totalprice').set('text', this.toNumber((intSubTotal + intShipping)));	},		checkEmpty: function()	{		if (this.options.elFull.getElements('.cart_item').length > 0)		{			// Cart Full			this.options.elWrapper.getElement('.fullcart').show();				this.options.elWrapper.getElement('.emptycart').hide();			}		else		{			// Cart Empty			this.options.elWrapper.getElement('.fullcart').hide();				this.options.elWrapper.getElement('.emptycart').show();		}	},		toCalculate: function(argStrNumber)	{		return argStrNumber.replace(',', '.');	},		toNumber: function(argIntNumber, argIntFloat)	{		if(argIntFloat == null)		{			argIntFloat = 2;		}		return argIntNumber.toFloat().toFixed(argIntFloat).replace('.', ',');	}	});Waterkoelers.OrderOverview = new Class({	prices: {		0: 0, // Subtotal		1: 0, // Transport		2: 0, // Administration		3: 0, // Total		4: 0, // LowTax		5: 0, // HighTax		6: 0  // TotalTax	},		initialize: function()	{		this.getPrices();				$$('input[name="pay"]').addEvents(		{			click: function(event)			{				var elAdmin = $('costs-administration');				this.prices[2] = 0;								if(event.target.value == 3)				{					// Administration costs need to be 5% of the subtotal					this.prices[2] = this.prices[0] * 0.05;				}								elAdmin.set('html', '&euro; ' + this.priceToString(this.prices[2]));				this.updateTotals();							}.bind(this)		});	},		/**	 * Turn all the prices into something we can calculate things with	 */ 	getPrices: function()	{		$$('.totalprice-overview dd').each(function(item, key)		{			this.prices[key] = this.stringToPrice(item.get('text'));		}.bind(this));	},		updateTotals: function()	{		this.prices[3] = this.prices[0] + this.prices[1] + this.prices[2];		this.prices[6] = this.prices[3] + this.prices[4] + this.prices[5];				$$('dl.total dd.total').each(function(item, key)		{			if(key == 0)			{				// Total without tax				item.getElement('strong').set('html', '&euro; ' + this.priceToString(this.prices[3]));							}			else if(key == 3)			{				// Total with tax				item.set('html', '&euro; ' + this.priceToString(this.prices[6]));			}		}.bind(this));	},		stringToPrice: function(string)	{		return string.toString().trim().substr(2).trim().replace(',', '.').toFloat();	},		priceToString: function(price)	{		price = price.toFloat().round(2).toString();		index = price.indexOf('.');				if(index == -1)		{			// Price is an integer, add the decimals			price += '.00';		}		else		{			if(price.split('.', 2)[1].length == 1)			{				// Last digit was zero, add it again				price += '0';			}		}				return price.toString().replace('.', ',');	}});// Product Amounter in Shopping CartWaterkoelers.ProductAmounter = new Class({	options: {		minAmount: 6,		maxAmount: 1000	},	Implements: [Options, Events],	initialize: function(options)	{		$$('.product_amounter').each(function(elAmounter, intKey)		{						// RETURN if Amounter already exists			if (elAmounter.hasClass('defined')){ return; }			else { elAmounter.addClass('defined'); }						var elInput = elAmounter.getElement('input');			var strValue = elInput.get('value');			var elPlusButton = elAmounter.getElement('li.plus');			var elMinButton = elAmounter.getElement('li.min');						elInput.addEvents(			{				keydown: function(e)				{					if (this.isNumeric(e.key, e.code) == false)					{						e.preventDefault();					}				}.bind(this),				blur: function(e)				{					if (elInput.hasClass('waterBottle'))					{						if (elInput.get('value') == '' || elInput.get('value') < this.options.minAmount)						{							objMessage.set('De minimale afname hoeveelheid is ' + this.options.minAmount);							elInput.set('value', this.options.minAmount);							elInput.fireEvent('change');						};					}					else					{						if (elInput.get('value') == '' || elInput.get('value') < 1)						{							elInput.set('value', 1);							elInput.fireEvent('change');						};					}				}.bind(this),				mousewheel: function(event)				{					event.preventDefault();					if (elInput.hasClass('waterBottle'))					{						if (event.wheel > 0)						{							elInput.set('value', elInput.get('value').toInt() + 1);							elInput.fireEvent('change');						}						else						{							if (elInput.get('value').toInt() > this.options.minAmount)							{								elInput.set('value', elInput.get('value').toInt() - 1);								elInput.fireEvent('change');							}						}					}					else					{						if (event.wheel > 0)						{							elInput.set('value', elInput.get('value').toInt() + 1);							elInput.fireEvent('change');						}						else						{							if (elInput.get('value').toInt() > 1)							{								elInput.set('value', elInput.get('value').toInt() - 1);								elInput.fireEvent('change');							}						}					}				}.bind(this),				change: function()				{					if (elInput.get('value') > this.options.maxAmount)					{						elInput.set('value', this.options.maxAmount);												// Set Message						objMessage.set('Maximale afname overschreden. Neem contact met ons op indien u meer wilt.');					}					objLargeCart.updateSession(elInput);				}.bind(this)			});						elPlusButton.addEvent('click', function(e)			{				e.preventDefault();				elInput.set('value', elInput.get('value').toInt() + 1);				elInput.fireEvent('change');			});						elMinButton.addEvent('click', function(e)			{				e.preventDefault();								var intValue = elInput.get('value').toInt();				if (elInput.hasClass('waterBottle'))				{					if (intValue - 1 > (this.options.minAmount - 1))					{						--intValue;						elInput.set('value', intValue);						elInput.fireEvent('change');					};				}				else				{					if (intValue - 1 > 0)					{						--intValue;						elInput.set('value', intValue);						elInput.fireEvent('change');					};				}			}.bind(this))		}.bind(this));	},		isNumeric: function(strText, intKeyCode)	{		var strValidChars = '0123456789';		var blnIsNumber = true;		var strChar;				var arrAcceptKeys = new Array('8', '37', '39', '46');				for (i = 0; i < strText.length && blnIsNumber == true; i++) 		{ 			strChar = strText.charAt(i); 			if (strValidChars.indexOf(strChar) == -1 && this.in_array(intKeyCode, arrAcceptKeys) == false) 			{				blnIsNumber = false;				if(intKeyCode >= 96 && intKeyCode <= 105)				{					blnIsNumber = true;				}			}		}		return blnIsNumber;	},		in_array: function(needle, haystack, argStrict)	{	    var key = '', strict = !!argStrict; 	    if (strict) {	        for (key in haystack) {	            if (haystack[key] === needle) {	                return true;				}	        }	    } else {	        for (key in haystack) {	            if (haystack[key] == needle)				{					return true;	            }	        }	    }		return false;	}});// Product Amounter in Shopping CartWaterkoelers.ProductAmounterSmallCart = new Class({	options: {		minAmount: 6,		maxAmount: 1000	},	Implements: [Options, Events],		initialize: function(options)	{		$('shoppingcart').getElements('.product_amounter').each(function(elAmounter, intKey)		{					// RETURN if Amounter already exists			if (elAmounter.hasClass('defined')){ return; }			else { elAmounter.addClass('defined'); }						var elInput = elAmounter.getElement('input');			var strValue = elInput.get('value');			var elPlusButton = elAmounter.getElement('li.plus');			var elMinButton = elAmounter.getElement('li.min');						elInput.addEvents(			{				keydown: function(e)				{					if (this.isNumeric(e.key, e.code) == false)					{						e.preventDefault();					}				}.bind(this),				blur: function(e)				{					if (elInput.hasClass('waterBottle'))					{						if (elInput.get('value') == '' || elInput.get('value') < this.options.minAmount)						{							objMessage.set('De minimale afname hoeveelheid is ' + this.options.minAmount);							elInput.set('value', this.options.minAmount);							elInput.fireEvent('change');						};					}					else					{						if (elInput.get('value') == '' || elInput.get('value') < 1)						{							elInput.set('value', 1);							elInput.fireEvent('change');						};					}				}.bind(this),				mousewheel: function(event)				{					event.preventDefault();					if (elInput.hasClass('waterBottle'))					{						if (event.wheel > 0)						{							elInput.set('value', elInput.get('value').toInt() + 1);							elInput.fireEvent('change');						}						else						{							if (elInput.get('value').toInt() > this.options.minAmount)							{								elInput.set('value', elInput.get('value').toInt() - 1);								elInput.fireEvent('change');							}						}					}					else					{						if (event.wheel > 0)						{							elInput.set('value', elInput.get('value').toInt() + 1);							elInput.fireEvent('change');						}						else						{							if (elInput.get('value').toInt() > 1)							{								elInput.set('value', elInput.get('value').toInt() - 1);								elInput.fireEvent('change');							}						}					}				}.bind(this),				change: function()				{					if (elInput.get('value') > this.options.maxAmount)					{						elInput.set('value', this.options.maxAmount);												// Set Message						objMessage.set('Maximale afname overschreden. Neem contact met ons op indien u meer wilt.');					}					objSmallCart.updateAmount(elInput);				}.bind(this)			});						elPlusButton.addEvent('click', function(e)			{				e.preventDefault();				elInput.set('value', elInput.get('value').toInt() + 1);				elInput.fireEvent('change');			});						elMinButton.addEvent('click', function(e)			{				e.preventDefault();								var intValue = elInput.get('value').toInt();				if (elInput.hasClass('waterBottle'))				{					if (intValue - 1 > (this.options.minAmount - 1))					{						--intValue;						elInput.set('value', intValue);						elInput.fireEvent('change');					};				}				else				{					if (intValue - 1 > 0)					{						--intValue;						elInput.set('value', intValue);						elInput.fireEvent('change');					};				}			}.bind(this))		}.bind(this));	},		isNumeric: function(strText, intKeyCode)	{		var strValidChars = '0123456789';		var blnIsNumber = true;		var strChar;				var arrAcceptKeys = new Array('8', '37', '39', '46');				for (i = 0; i < strText.length && blnIsNumber == true; i++) 		{ 			strChar = strText.charAt(i); 			if (strValidChars.indexOf(strChar) == -1 && this.in_array(intKeyCode, arrAcceptKeys) == false) 			{				blnIsNumber = false;				if(intKeyCode >= 96 && intKeyCode <= 105)				{					blnIsNumber = true;				}			}		}		return blnIsNumber;	},		in_array: function(needle, haystack, argStrict)	{	    var key = '', strict = !!argStrict; 	    if (strict) {	        for (key in haystack) {	            if (haystack[key] === needle) {	                return true;				}	        }	    } else {	        for (key in haystack) {	            if (haystack[key] == needle)				{					return true;	            }	        }	    }		return false;	}});// Product Amounter in Shopping CartWaterkoelers.ProductAmounterDefault = new Class({	options: {		elAmounter: false,		minAmount: 6,		maxAmount: 1000	},	Implements: [Options, Events],		initialize: function(options)	{		this.setOptions(options);						// RETURN if Amounter already exists		if (this.options.elAmounter.hasClass('defined')){ return; }		else { this.options.elAmounter.addClass('defined'); }				var elInput = this.options.elAmounter.getElement('input');		var strValue = elInput.get('value');		var elPlusButton = this.options.elAmounter.getElement('li.plus');		var elMinButton = this.options.elAmounter.getElement('li.min');		elInput.addEvents(		{			keydown: function(e)			{				if (this.isNumeric(e.key, e.code) == false)				{					e.preventDefault();				}			}.bind(this),			blur: function(e)			{				if (elInput.hasClass('waterBottle'))				{					if (elInput.get('value') == '' || elInput.get('value') < this.options.minAmount)					{						objMessage.set('De minimale afname hoeveelheid is ' + this.options.minAmount);						elInput.set('value', this.options.minAmount);						elInput.fireEvent('change');					};				}				else				{					if (elInput.get('value') == '' || elInput.get('value') < 1)					{						elInput.set('value', 1);						elInput.fireEvent('change');					};				}			}.bind(this),			mousewheel: function(event)			{				event.preventDefault();				if (elInput.hasClass('waterBottle'))				{					if (event.wheel > 0)					{						elInput.set('value', elInput.get('value').toInt() + 1);						elInput.fireEvent('change');					}					else					{						if (elInput.get('value').toInt() > this.options.minAmount)						{							elInput.set('value', elInput.get('value').toInt() - 1);							elInput.fireEvent('change');						}					}				}				else				{					if (event.wheel > 0)					{						elInput.set('value', elInput.get('value').toInt() + 1);						elInput.fireEvent('change');					}					else					{						if (elInput.get('value').toInt() > 1)						{							elInput.set('value', elInput.get('value').toInt() - 1);							elInput.fireEvent('change');						}					}				}			}.bind(this),			change: function()			{				if (elInput.get('value') > this.options.maxAmount)				{					elInput.set('value', this.options.maxAmount);										// Set Message					objMessage.set('Maximale afname overschreden. Neem contact met ons op indien u meer wilt.');				}				return;			}.bind(this)		});		elPlusButton.addEvent('click', function(e)		{			e.preventDefault();			elInput.set('value', elInput.get('value').toInt() + 1);			elInput.fireEvent('change');		});				elMinButton.addEvent('click', function(e)		{			e.preventDefault();						var intValue = elInput.get('value').toInt();			if (elInput.hasClass('waterBottle'))			{				if (intValue - 1 > (this.options.minAmount - 1))				{					--intValue;					elInput.set('value', intValue);					elInput.fireEvent('change');				};			}			else			{				if (intValue - 1 > 0)				{					--intValue;					elInput.set('value', intValue);					elInput.fireEvent('change');				};			}		}.bind(this));	},		isNumeric: function(strText, intKeyCode)	{		var strValidChars = '0123456789';		var blnIsNumber = true;		var strChar;				var arrAcceptKeys = new Array('8', '37', '39', '46');				for (i = 0; i < strText.length && blnIsNumber == true; i++) 		{ 			strChar = strText.charAt(i); 			if (strValidChars.indexOf(strChar) == -1 && this.in_array(intKeyCode, arrAcceptKeys) == false) 			{				blnIsNumber = false;				if(intKeyCode >= 96 && intKeyCode <= 105)				{					blnIsNumber = true;				}			}		}		return blnIsNumber;	},		in_array: function(needle, haystack, argStrict)	{	    var key = '', strict = !!argStrict; 	    if (strict) {	        for (key in haystack) {	            if (haystack[key] === needle) {	                return true;				}	        }	    } else {	        for (key in haystack) {	            if (haystack[key] == needle)				{					return true;	            }	        }	    }		return false;	}});// Reset form InputsWaterkoelers.resetInputs = new Class({	strInputElements: false,	arrDefaultValues: new Array(),			initialize: function(strInputFields)	{				this.strInputElements = $$(strInputFields);		this.strInputElements.each(function(el, i)		{			this.arrDefaultValues[i] = el.get('value');					el.addEvents(			{				focus: function(){ if (el.get('value') == this.arrDefaultValues[i]){ el.set('value', ''); }; }.bind(this),				blur: function(){ if (!$chk(el.get('value'))){ el.set('value', this.arrDefaultValues[i]); }; }.bind(this)			});		}.bind(this));	}});// Default TabsWaterkoelers.Tabs = new Class({	Implements: [Options,Events],	initialize:function(tabs,content,activate)	{		this.tabs = $A(tabs);		this.content = $A(content);				if(!activate){ activate = 0; }					this.tabs.each(function(el,i)		{			el._parent = this;			el.i = i;			el.addEvent('click', function(e)			{				this._parent.activate(this.i);				return false;			});		}.bind(this));				if(activate != undefined)		{			if($type(activate) == 'element'){ activate.fireEvent('click'); }			else { this.activate( activate ); }		}	},		activate:function(argI)	{				this.tabs.each(function(el,i)		{			el.removeClass('active');						if(i == argI){ el.addClass('active'); }		}.bind(this));				this.content.each(function(el,i)		{						if(i == argI)			{				el.setStyle('display','block');				el.fade('hide').fade(1);			}			else			{				el.hide();			}		}.bind(this));	}	});Waterkoelers.Overlay = new Class({	options: {		strLinkPath: 'a[rel=showoverlay]',		arrLinks: false,		elOverlay: false,		elMask: false,		elImage: false	},	Implements: Options,		initialize: function(options)	{		this.setOptions(options);				this.setDefaultOptions();	},		reinit: function()	{		this.options.elMask = document.body.getElement('.mask');		this.options.elOverlay = document.body.getElement('.ajax_overlay');	},		setDefaultOptions: function()	{		this.options.arrLinks = $$(this.options.strLinkPath);				if (this.options.arrLinks.length > 0)		{			this.options.elOverlay = new Element('div',			{				'class': 'ajax_overlay'			}).inject(document.body, 'bottom');						this.createCloseBtn();						this.options.elMask = new Mask;			this.options.elMask.addEvents(			{				click: function()				{					this.hideOverlay();				}.bind(this)			});		};				this.addLinkEvents();	},		createCloseBtn: function()	{		var elCloseBtn = new Element('span',		{			'class': 'btn_close',			'events': 			{				click: function()				{					this.hideOverlay();				}.bind(this)			}		}).inject(this.options.elOverlay);	},		addLinkEvents: function()	{		this.options.arrLinks.each(function(el, i)		{			el.addEvents(			{				click: function(e)				{					e.stop();										this.getHtml(el.get('href'));											}.bind(this)			});		}.bind(this));	},		getHtml: function(strLocation)	{		var objRequest = new Request(		{			url: strLocation,			onSuccess: function(strHtml)			{				new Fx.Scroll(window, 				{					duration: 300,					onComplete: function()					{						this.showOverlay();					}.bind(this)				}).toElement(document.body);								this.options.elOverlay.empty().set('html', strHtml);								if (this.options.elOverlay.getElement('form.formToDatabase'))				{					new Waterkoelers.FormToDatabase(this.options.elOverlay.getElement('form.formToDatabase'));				}								this.createCloseBtn();			}.bind(this)		}).send();	},		showOverlay: function(strLocation)	{				this.options.elMask.show();		this.options.elOverlay.show();	},		hideOverlay: function()	{		objOverlay.options.elMask.hide();		objOverlay.options.elOverlay.empty().hide();	}});Waterkoelers.ImageOverlay = new Class({	options: {		strLinkPath: 'a[rel=overlay]',		arrLinks: false,		elOverlay: false,		elMask: false,		elImage: false	},	Implements: Options,		initialize: function(options)	{		this.setOptions(options);				this.setDefaultOptions();	},		setDefaultOptions: function()	{		this.options.arrLinks = $$(this.options.strLinkPath);				if (this.options.arrLinks.length > 0)		{			this.options.elOverlay = new Element('div',			{				'class': 'image_overlay'			}).inject(document.body, 'bottom');						this.createCloseBtn();						this.options.elMask = new Mask;			this.options.elMask.addEvents(			{				click: function()				{					this.hideOverlay();				}.bind(this)			});		};				this.addLinkEvents();	},		createCloseBtn: function()	{		var elCloseBtn = new Element('span',		{			'class': 'btn_close',			'events': 			{				click: function()				{					this.hideOverlay();				}.bind(this)			}		}).inject(this.options.elOverlay);	},		addLinkEvents: function()	{		this.options.arrLinks.each(function(el, i)		{			el.addEvents(			{				click: function(e)				{					e.stop();										this.setOverlay('loading', el.getParent().getCoordinates(document.body));					this.loadImage(el);												}.bind(this)			});		}.bind(this));	},		setOverlay: function(strType, objCoordinates)	{		switch(strType)		{			default:			case 'normal':			{				this.options.elOverlay.setStyles(				{					'position': 'absolute',					'width': 0,					'height': 0,					'left': 0,					'top': 0,					'margin-left': 0,					'margin-top': 0				});				break;			}							case 'loading':			{				this.options.elOverlay.empty();				this.options.elOverlay.setStyles({					'width': objCoordinates.width - 20,					'height': objCoordinates.height - 20,					'left': objCoordinates.left,					'top': objCoordinates.top				});				this.options.elOverlay.setStyles({'display': 'block', 'opacity': .6});						this.options.elOverlay.addClass('loading');				break;			}		}	},		loadImage: function(el)	{				var loadImage = new Asset.image(el.get('href'), 		{			id: 'loadImage', 			onload: function()			{								this.resizeImage(loadImage);						    }.bind(this)		});	},		resizeImage: function(loadImage)	{			this.options.elMask.show();		this.options.elOverlay.setStyle('opacity', 1);				this.createCloseBtn();				this.options.elOverlay.removeClass('loading');		loadImage.inject(this.options.elOverlay);				var objImageSize = loadImage.getSize();		loadImage.setStyles(		{			'width': this.options.elOverlay.getStyle('width'),			'height': this.options.elOverlay.getStyle('height')		});				var objMorph = new Fx.Morph(this.options.elOverlay,		{			duration: 400,			onComplete: function()			{				this.options.elOverlay.setStyles(				{					'left': '50%',					'top': '50%',					'position': 'fixed'				});			}.bind(this)		}).start(		{			'width': objImageSize.x,			'height': objImageSize.y,			'left': document.body.getSize().x / 2,			'top': (document.body.getSize().y / 2) + document.getScroll().y,			'margin-left': '-'+ (objImageSize.x / 2),			'margin-top': '-'+ (objImageSize.y / 2)		});				var objMorphImage = new Fx.Morph(loadImage,		{			duration: 400		}).start(		{			'width': objImageSize.x,			'height': objImageSize.y		});	},		hideOverlay: function()	{		this.options.elMask.hide();		this.options.elOverlay.empty().hide();		this.setOverlay('normal', '');	}});Waterkoelers.FormToDatabase = new Class({	options: {		elWrapper: false	},		Implements: Options,		initialize: function(elForm, options)	{		this.options.elWrapper = elForm;				this.options.elWrapper.addEvent('submit', function(e)		{			e.stop();						if (this.checkInputs())			{				this.options.elWrapper.getElement('fieldset.form').hide();				var PostRequest = new Request.JSON(				{					url: CONFIG.BASE_URL + 'ajax/index/addreview',					onSuccess: function(objJSON)					{						if (objJSON.blnValid == true)						{							strHtml = '<h3>Uw recensie is toegevoegd</h3><p>Wij hebben uw recensie ontvangen. Bedankt voor het delen van uw mening.</p>';							this.options.elWrapper.getElement('fieldset.message').set('html', strHtml);														this.addComment(objJSON);														objOverlay.hideOverlay.bind(this).delay(2000);						}					}.bind(this)				}).post(				{					'product_id': this.options.elWrapper.getElement('#input-productid').get('value'),					'name': this.options.elWrapper.getElement('#input-name').get('value'),					'score': this.options.elWrapper.getElement('#input-score').get('value'),					'content': this.options.elWrapper.getElement('#input-content').get('value')				});							}		}.bind(this));	},		checkInputs: function()	{		var blnSuccess = true;		this.options.elWrapper.getElements('.check').each(function(el)		{			if (el.get('value').length == 0)			{				el.addClass('errorfield');				blnSuccess = false;			}			else			{				el.removeClass('errorfield');			}		});				return blnSuccess;	},		addComment: function(objJSON)	{		if ($('reviews'))		{			var reviewWrapper = $('reviews');			if (reviewWrapper.getElement('p.noreviews'))			{				reviewWrapper.getElement('p.noreviews').destroy();				var reviewList = new Element('dl', { 'class': 'review_overview'}).inject(reviewWrapper.getElement('h2'), 'after');			}			else			{				var reviewList = reviewWrapper.getElement('dl.review_overview');			}						var defTitle = new Element('dt').inject(reviewList, 'top');			var dtStrong = new Element('strong', { 'text': objJSON.arrRow.name }).inject(defTitle);			for (var i = 1; i < 6; i++)			{				var strImage = '';				if (i <= objJSON.arrRow.score){ strImage = 'inc/image/img_star_active.png'; }				else { strImage = 'inc/image/img_star_inactive.png'; }								var dtImage = new Element('img',				{					'src': strImage,					'alt': 'score'				}).inject(defTitle, 'bottom');			}						var defDesc = new Element('dd',			{				'html': '<p>'+ objJSON.arrRow.content +'</p>'			}).inject(defTitle, 'after');		}	}});Waterkoelers.Message = new Class({	options: {		elMessageWrapper: false,		elContent: false,		fxMorph: false,		blnActive: false,		showDuration: 2500,		defaultDuration: 2500,		intTimer: null	},	Implements: Options,		initialize: function(options)	{		this.setOptions(options);				this.createElements();	},		createElements: function()	{		this.options.elMessageWrapper = new Element('div',		{			'id': 'alertMessage',			'styles': {				'opacity': 0,				'top': -100			}		}).inject(document.body, 'bottom');		this.options.elContent = new Element('p').inject(this.options.elMessageWrapper);				this.options.fxMorph = new Fx.Morph(this.options.elMessageWrapper,		{			duration: 500,			onStart: function()			{				this.options.blnActive = true;				this.options.intTimer = $clear(this.options.intTimer);			}.bind(this),			onComplete: function()			{				this.options.intTimer = (function()				{					this.hide();				}).delay(this.options.showDuration, this)			}.bind(this)		});	},		set: function(strText)	{		if (this.options.blnActive)		{			if (this.options.elContent.get('html') != strText)			{				this.options.elContent.set('html', this.options.elContent.get('html') + '<br /><br />' + strText);			}		}		else		{			this.options.elContent.set('html', strText);		}		this.show();	},		show: function()	{		this.options.fxMorph.start(		{			'top': -5,			'opacity': 1		});	},		hide: function()	{		(function()		{			this.options.elContent.empty();			this.options.elMessageWrapper.setStyle('top', -100);		}).delay(400, this);				this.options.elMessageWrapper.fade(0);		this.options.blnActive = false;	}		// objMessage.set('Maximale afname overschreden. Neem contact met ons op indien u meer wilt.');});// Element ImplementsElement.implement({	hasEvent: function(eventType,fn)	{		var myEvents = this.retrieve('events');		return myEvents && myEvents[eventType] && (fn == undefined || myEvents[eventType].keys.contains(fn));	},	show: function()	{		this.setStyle('display','block');	},	inline: function()	{		this.setStyle('display','inline');	},	hide: function()	{		this.setStyle('display','none');	}});
