$(document).ready(function () {
	function appear() {
		$(".menuBlock").stop().fadeTo("fast", 1);
	}
	
	$(".gd").mouseenter(function () {
		$(".wd, .pr, .po, .cu").stop().fadeTo("slow", 0.3);
	}).mouseleave(function () {
		appear();
	});
	$(".wd").mouseenter(function () {
		$(".gd, .pr, .po, .cu").stop().fadeTo("slow", 0.3);
	}).mouseleave(function () {
		appear();
	});
	$(".pr").mouseenter(function () {
		$(".gd, .wd, .po, .cu").stop().fadeTo("slow", 0.3);
	}).mouseleave(function () {
		appear();
	});
	$(".po").mouseenter(function () {
		$(".gd, .pr, .wd, .cu").stop().fadeTo("slow", 0.3);
	}).mouseleave(function () {
		appear();
	});
	$(".cu").mouseenter(function () {
		$(".gd, .pr, .po, .wd").stop().fadeTo("slow", 0.3);
	}).mouseleave(function () {
		appear();
	});
	
	$(".rollOver").hover(function () {
		this.src = this.src.replace("_off","_on");
	},function() {
		this.src = this.src.replace("_on","_off");
	});
	
	$("#helpInput").attr({ value: "Enter your e-mail address" }).focus(function() {
		if($(this).val() == "Enter your e-mail address") {
			$(this).val("");
		}
	}).blur(function() {
		if($(this).val() == "") {
			$(this).val("Enter your e-mail address");
		}
	});
	
	$(".comingSoon").click(function () {
		alert('Coming soon. If you need assistance, feel free to contact us at info@designsbykeith.com');
	});
	
	$("#helpInput").attr({ autocomplete: "off" });

	$.fn.qtip.styles.topnav = {
		width: 200,
		textAlign: 'center',
		color: '#666',
		background: 'none',
		border: {
			width: 0
		}
	}
	
	$("#tipHome").qtip({
		content: 'Home',
		position: {
			corner: {
				target: 'topMiddle',
				tooltip: 'bottomMiddle'
			}
		},
		style: 'topnav'
	});
	$("#tipGd").qtip({
		content: 'Graphic Design',
		position: {
			corner: {
				target: 'topMiddle',
				tooltip: 'bottomMiddle'
			}
		},
		style: 'topnav'
	});
	$("#tipWd").qtip({
		content: 'Website Design',
		position: {
			corner: {
				target: 'topMiddle',
				tooltip: 'bottomMiddle'
			}
		},
		style: 'topnav'
	});
	$("#tipPrint").qtip({
		content: 'Printing',
		position: {
			corner: {
				target: 'topMiddle',
				tooltip: 'bottomMiddle'
			}
		},
		style: 'topnav'
	});
	$("#tipPort").qtip({
		content: 'Portfolio',
		position: {
			corner: {
				target: 'topMiddle',
				tooltip: 'bottomMiddle'
			}
		},
		style: 'topnav'
	});
	$("#tipContact").qtip({
		content: 'Contact Us',
		position: {
			corner: {
				target: 'topMiddle',
				tooltip: 'bottomMiddle'
			}
		},
		style: 'topnav'
	});
});