	window.addEvent('domready', function() {
			var wLow = $('s7wrap').getStyle('min-width').toInt(), wHigh = 1300;//$('s7wrap').getStyle('max-width').toInt();	
			var fxWrap = new Fx.Style('s7wrap','max-width',{duration: 1000,transition: Fx.Transitions.Bounce.easeOut});	
		
		
			var settings = {
				wopen : 0
			}
 
			var HashCookie = new Hash.Cookie('s7',{path:'/'});
		
			if (HashCookie.get('wopen')) {
				settings['wopen'] = HashCookie.get('wopen');
				if(settings['wopen']==1)
				{
					$('s7wrap').setStyle('max-width','1300px');
				}
			}
		
			$('whigh').addEvent('click', function(event) {
				event = new Event(event).stop();
			
				Expand();
				
			});
			
			$('wlow').addEvent('click', function(event) {
				event = new Event(event).stop();
				
				Contract();
				
			});
			
			function Expand() {
				if	($('s7wrap').getStyle('width').toInt()<wHigh)
				{	
					fxWrap.start($('s7wrap').getStyle('max-width').toInt(),wHigh);
					settings['wopen'] = 1;
					HashCookie.extend(settings);
				}
			}
			
			function Contract() {
				if	($('s7wrap').getStyle('width').toInt()>wLow)
				{
					fxWrap.start($('s7wrap').getStyle('max-width').toInt(),wLow);
					settings['wopen'] = 0;
					HashCookie.extend(settings);
				}
			}
			
			var mySlide = new Fx.Slide('s7cntWrap',{transition: Fx.Transitions.Expo.easeInOut});
 
			$('toggle').addEvent('click', function(e){
				e = new Event(e);
				mySlide.toggle();
				e.stop();
			});
			
			/*
			var szNormal = 50, szSmall  = 60, szFull   = 40;
 
			var kwicks = $$("#kwicks .kwick");
			var fx = new Fx.Elements(kwicks, {wait: false, duration: 300, transition: Fx.Transitions.Back.easeOut});
			kwicks.each(function(kwick, i) {
				kwick.addEvent("mouseenter", function(event) {
					var o = {};
					var mtp = kwick.getStyle("margin-top").toInt();
					o[i] = {
						'margin-top': [mtp, szFull],
						'height': [kwick.getStyle("height").toInt(),kwick.getStyle("height").toInt()+(mtp-szFull)]};
					kwicks.each(function(other, j) {
						if(i != j) {
							var mtp = other.getStyle("margin-top").toInt();
							if(mtp != szSmall) {
								o[j] = {
									'margin-top': [mtp, szSmall],
									'height': [other.getStyle("height").toInt(), other.getStyle("height").toInt()-(szSmall-mtp)]};
							}
						}
					});
					fx.start(o);
				});
			});
 
			$("kwicks").addEvent("mouseleave", function(event) {
				var o = {};
				kwicks.each(function(kwick, i) {
					o[i] = {
						'margin-top': [kwick.getStyle("margin-top").toInt(), szNormal],
						'height': [kwick.getStyle("height").toInt(), kwick.getStyle("height").toInt() + (kwick.getStyle("margin-top").toInt()- szNormal)]}
				});
				fx.start(o);
			});
			*/
			
			
	
		});
