		window.addEvent('domready',function() {
			
		
			if($('featured-projects')) 
			{
				var featurepanel = new FeaturePanel(
					'featured-projects',
					'#featured-projects .feature-item', 
					{ 
						duration: 5000,
						showTOC: '#featured-projects-thumbnails a',
						tocWidth: 91,
						tocActiveClass: 'active',
						showControls:false,
						thumbnails: 'thumbnail-holder',
						pagingControls: true,
						placePagingControls: 'featured-projects-thumbnails',
						visibleThumbs: 7
					}
				);
				//featurepanel.start();	
			}
			if($('projects-grid')) 
			{
				var Projects = $$('.project-thumb');				
				Projects.each(function(project) {
					
					var link = project.getElement('a.project-link');
					
					project.tip = new Element('span', {'class':'tool-tip'}).set('text', link.title).inject(project).fade('hide');
					
					link.title = '';
					
					project.addEvents({
						'mouseenter' : function(){
							this.show = true;
							this.fireEvent('tool-tip',this, 500);
						},
						'mouseleave' : function() {
							//this.tip.addClass('display-none');
							this.tip.fade('out');
							this.show = false;
						},
						'tool-tip' : function() {
							if(this.show) this.tip.fade('in');;
						}
					});
				});
			}

			if ($('Search-field')) 
			{
				$('Search-field').addEvents({
					'focus' : function() {
						if(this.value == 'Search') this.value = '';
					},
					'blur' : function() {
						if(this.value == '') this.value = 'Search';
					}
				});
			};
			if(Browser.Engine.name != 'trident' && Browser.Engine.version != 4) {
				$('navigation').getElements('li.menu').each( function( elem ){
					var list = elem.getElement('ul.sub-menu');
					if(list) 
					{
						list.removeClass('display-none');
						
						var myFx = new Fx.Slide(list).hide();
						
						elem.addEvents({
							'mouseenter' : function(){
								this.show = true;
								this.getElement(('a.top-level')).addClass('section');
								this.fireEvent('slideout');
							},
							'mouseleave' : function(){
								myFx.cancel();
								myFx.slideOut();
								this.getElement('a.top-level').removeClass('section');
								this.show = false;
							},
							'slideout' : function() {
								if(this.show) 
								{
									myFx.cancel();
									myFx.slideIn();								
								}
							}
						});
					}
				});				
			};


			if($('contact-form'))
			{
				var Fields = $('contact-form').getElements('input[type="text"]');
				Fields.push($('contact-form').getElement('textarea'));
				
				Fields.addEvents({
					'focus' : function() {
						//if(this.value == this.title) 
						this.value = '';
					},
					'blur' : function() {
						if(this.value == '') this.value = this.title;
					}
					
				});
				
				new FormCheck('contact-form');
				
			}

		});
