$.fn.wait = function(time, type) {
	time = time || 3000;
	type = type || "fx";
	return this.queue(type, function() {
		var self = this;
		setTimeout(function() {
			$(self).dequeue();
		}, time);
	});
};

$(document).ready(function() {
						   
	// do curvy corners
	settings = {
	  tl: { radius: 11 }, tr: { radius: 11 },
	  bl: { radius: 11 }, br: { radius: 11 },
	  antiAlias: true,
	  autoPad: false
	}	
	var cornersObj = new curvyCorners(settings, "main");
	cornersObj.applyCornersToAll();	
	var cornersObj = new curvyCorners(settings, "box");
	cornersObj.applyCornersToAll();	
	var cornersObj = new curvyCorners(settings, "person");
	cornersObj.applyCornersToAll();	
	var cornersObj = new curvyCorners(settings, "contents");
	cornersObj.applyCornersToAll();						   
	
	// do css drop down
	if (document.all&&document.getElementById) {
		navRoot = document.getElementById("nav");
		for (i=0; i<navRoot.childNodes.length; i++) {
			node = navRoot.childNodes[i];
			if (node.nodeName=="LI") {
				node.onmouseover=function() {
					this.className+=" over";
				}
				node.onmouseout=function() {
					this.className=this.className.replace(" over", "");
				}
			}
		}
 	}
	
	// do login help button hover	
	$('#helpbtn').mouseover().addClass('sfhover');
	$('#helpbtn').mouseout().removeClass('sfhover');
	
	// do slideshow
	$('#slideshow div.one').cycle({
		fx: 'fade',
		delay: -6000,
		timeout: 9000
	});
	$('#slideshow div.two').cycle({
		fx: 'fade',
		delay: -3000,
		timeout: 9000
	});
	$('#slideshow div.three').cycle({
		fx: 'fade',
		delay: 0000,
		timeout: 9000
	});

});
