var dwDefaults = new Class({
	//implements
	Implements: [Options],

	//options
	options: {
		collection: $$('input[type=text]')
	},
	
	//initialization
	initialize: function(options) {
		//set options
		this.setOptions(options);
		this.defaults();
	},
	
	//a method that does whatever you want
	defaults: function() {
		this.options.collection.each(function(el) {
			el.set('value',el.get('rel'));
			el.addEvent('focus', function() { if(el.get('value') == el.get('rel')) { el.set('value',''); } });
			el.addEvent('blur', function() { if(el.get('value') == '') { el.set('value',el.get('rel')); } });
		});
	}
	
});


// ONEPROFESSION CODE

//Load up things that should happen after DOM
window.addEvent('domready', function() {
	//Process Nifty Boxes
	Nifty("div.outer","bottom small");
    Nifty("div#topstrip","bottom small fixed-height");
    Nifty("div.outerfeatures","all small");
    Nifty("div.toolbox","tl bottom");
    Nifty("div#loginbox", "tl bottom");
    
    Nifty("div.topmenu", "top");
    Nifty("div.bottommenu", "bottom");
    
    //Do default form fields:
/*
    var defs = new dwDefaults({
		collection: $$('input.predefined')
	});
*/
	(function(){
		$$('input.predefined').each(function(item, index){
    		new OverText(item);
		})
	}).delay(1000);
    
});


//Load Menu

var mainMenu = new UvumiDropdown("maindropdown",{closeDelay:200});
var subMenu = new UvumiDropdown("subdropdown",{closeDelay:200});

