
window.addEvent('domready', function(){
	var divs = $$(['docs', 'js', 'html', 'css']);
	divs.each(function(div){
		var link = $(div.id + 'code');
		div.setStyle('display', 'none');
		link.addEvent('click', function(e){
			e = new Event(e);
			divs.each(function(other){
				if (other != div) other.setStyle('display', 'none');
			});
			div.setStyle('display', (div.getStyle('display') == 'block') ? 'none' : 'block');
			e.stop();
		});
	});
});






window.addEvent('domready', function(){
			Fx.Morph = Fx.Styles.extend({
			
				start: function(className){
					
					var to = {};
					
					$each(document.styleSheets, function(style){
						var rules = style.rules || style.cssRules;
						$each(rules, function(rule){
							if (!rule.selectorText.test('\.' + className + '$')) return;
							Fx.CSS.Styles.each(function(style){
								if (!rule.style || !rule.style[style]) return;
								var ruleStyle = rule.style[style];
								to[style] = (style.test(/color/i) && ruleStyle.test(/^rgb/)) ? ruleStyle.rgbToHex() : ruleStyle;
							});
						});
					});
					return this.parent(to);
				}
				
			});
			
			Fx.CSS.Styles = ["backgroundColor", "backgroundPosition", "color", "width", "height", "left", "top", "bottom", "right", "fontSize", "letterSpacing", "lineHeight", "textIndent", "opacity"];
			
			Fx.CSS.Styles.extend(Element.Styles.padding);
			Fx.CSS.Styles.extend(Element.Styles.margin);
			
			Element.Styles.border.each(function(border){
				['Width', 'Color'].each(function(property){
					Fx.CSS.Styles.push(border + property);
				});
			});
			
			var myMorph = new Fx.Morph('morpher', {wait: false});
			
			$('morph1').addEvent('click', function(e){
				new Event(e).stop();
				
				myMorph.start('morph1');
				
			});
			
			$('morph2').addEvent('click', function(e){
				new Event(e).stop();
				
				myMorph.start('morph2');
				
			});
		}); 





	
window.addEvent('domready', function(){
			Fx.MorphLeeds = Fx.Styles.extend({
			
				start: function(className){
					
					var to = {};
					
					$each(document.styleSheets, function(style){
						var rules = style.rules || style.cssRules;
						$each(rules, function(rule){
							if (!rule.selectorText.test('\.' + className + '$')) return;
							Fx.CSS.Styles.each(function(style){
								if (!rule.style || !rule.style[style]) return;
								var ruleStyle = rule.style[style];
								to[style] = (style.test(/color/i) && ruleStyle.test(/^rgb/)) ? ruleStyle.rgbToHex() : ruleStyle;
							});
						});
					});
					return this.parent(to);
				}
				
			});
			
			Fx.CSS.Styles = ["backgroundColor", "backgroundPosition", "color", "width", "height", "left", "top", "bottom", "right", "fontSize", "letterSpacing", "lineHeight", "textIndent", "opacity"];
			
			Fx.CSS.Styles.extend(Element.Styles.padding);
			Fx.CSS.Styles.extend(Element.Styles.margin);
			
			Element.Styles.border.each(function(border){
				['Width', 'Color'].each(function(property){
					Fx.CSS.Styles.push(border + property);
				});
			});
			
			var myMorphLeeds = new Fx.MorphLeeds('MorphLeedser', {wait: false});
			
			$('MorphLeeds1').addEvent('click', function(e){
				new Event(e).stop();
				
				myMorphLeeds.start('MorphLeeds1');
				
			});
			
			$('MorphLeeds2').addEvent('click', function(e){
				new Event(e).stop();
				
				myMorphLeeds.start('MorphLeeds2');
				
			});
		}); 







window.addEvent('domready', function(){
			Fx.MorphBelfast = Fx.Styles.extend({
			
				start: function(className){
					
					var to = {};
					
					$each(document.styleSheets, function(style){
						var rules = style.rules || style.cssRules;
						$each(rules, function(rule){
							if (!rule.selectorText.test('\.' + className + '$')) return;
							Fx.CSS.Styles.each(function(style){
								if (!rule.style || !rule.style[style]) return;
								var ruleStyle = rule.style[style];
								to[style] = (style.test(/color/i) && ruleStyle.test(/^rgb/)) ? ruleStyle.rgbToHex() : ruleStyle;
							});
						});
					});
					return this.parent(to);
				}
				
			});
			
			Fx.CSS.Styles = ["backgroundColor", "backgroundPosition", "color", "width", "height", "left", "top", "bottom", "right", "fontSize", "letterSpacing", "lineHeight", "textIndent", "opacity"];
			
			Fx.CSS.Styles.extend(Element.Styles.padding);
			Fx.CSS.Styles.extend(Element.Styles.margin);
			
			Element.Styles.border.each(function(border){
				['Width', 'Color'].each(function(property){
					Fx.CSS.Styles.push(border + property);
				});
			});
			
			var myMorphBelfast = new Fx.MorphBelfast('MorphBelfaster', {wait: false});
			
			$('MorphBelfast1').addEvent('click', function(e){
				new Event(e).stop();
				
				myMorphBelfast.start('MorphBelfast1');
				
			});
			
			$('MorphBelfast2').addEvent('click', function(e){
				new Event(e).stop();
				
				myMorphBelfast.start('MorphBelfast2');
				
			});
		}); 












window.addEvent('domready', function(){
			Fx.MorphRisk = Fx.Styles.extend({
			
				start: function(className){
					
					var to = {};
					
					$each(document.styleSheets, function(style){
						var rules = style.rules || style.cssRules;
						$each(rules, function(rule){
							if (!rule.selectorText.test('\.' + className + '$')) return;
							Fx.CSS.Styles.each(function(style){
								if (!rule.style || !rule.style[style]) return;
								var ruleStyle = rule.style[style];
								to[style] = (style.test(/color/i) && ruleStyle.test(/^rgb/)) ? ruleStyle.rgbToHex() : ruleStyle;
							});
						});
					});
					return this.parent(to);
				}
				
			});
			
			Fx.CSS.Styles = ["backgroundColor", "backgroundPosition", "color", "width", "height", "left", "top", "bottom", "right", "fontSize", "letterSpacing", "lineHeight", "textIndent", "opacity"];
			
			Fx.CSS.Styles.extend(Element.Styles.padding);
			Fx.CSS.Styles.extend(Element.Styles.margin);
			
			Element.Styles.border.each(function(border){
				['Width', 'Color'].each(function(property){
					Fx.CSS.Styles.push(border + property);
				});
			});
			
			var myMorphBelfast = new Fx.MorphRisk('MorphRisk', {wait: false});
			
			$('MorphRisk1').addEvent('click', function(e){
				new Event(e).stop();
				
				myMorphBelfast.start('MorphRisk1');
				
			});
			
			$('MorphRisk2').addEvent('click', function(e){
				new Event(e).stop();
				
				myMorphBelfast.start('MorphRisk2');
				
			});
		}); 