$(document).ready(function() {

	// Clear value on focus and restor to default if nothing was enteried
	$('.clear').focus(function() {
		if( this.value == this.defaultValue ) {
			this.value = "";
		}
	}).blur(function() {
		if( !this.value.length ) {
			this.value = this.defaultValue;
		}
	});

	// IE6 functions
	if($.browser.msie && $.browser.version == '6.0') {
		// Add pseudo class styling for IE6
		$('#nav > ul > li:first-child').css({'margin-left':'0','padding-left':'0'});
		$('.box.split-horizontal > .row:first-child').css({'background':'none','padding-top':'0'});
		$('.box blockquote > .qmark:first-child').css({'margin':'-8px 0 0 -22px'});
		$('.box > .col:first-child .wrapper').css({'margin':'0 20px 0 0'});
		$('#right-nav > li:first-child').css({'border-top':'none'});
		$('#footer .wrapper > ul > li:first-child').css({'background':'none','padding-left':'5px'})

		// Run clear function on click for IE6
		$('.clear').click(function() {
			$('.clear').focus();
		});

		// PNG Support
		DD_belatedPNG.fix('#header h1 a, #keyword, #nav, #nav ul, #hero, #carousel, #carousel li, #mast, .box, .box .row, #footer, #footer ul.icons li a span');
	}
	
	$("a[rel^='modal']").prettyPhoto({show_title: false,theme:'facebook'});

});
