jQuery.fn.addEvent = jQuery.fn.bind;

function close_walk_on(){
	$('#walkOnContainer').remove();
	$.cookie("walk_on", "no");
}

function play_walk_on(){
	$.cookie("walk_on", "yes");
	window.location.reload(false);
}

$(function() {
	 $('.field').focus(function() {
        if(this.title==this.value) {
            this.value = '';
        }
    }).blur(function(){
        if(this.value=='') {
            this.value = this.title;
        }
    });
	/*
	if($('#close_walk_on')){
		$('#close_walk_on').addEvent('click', function(){ close_walk_on(); });
	}
	
	if($('#walk_on_player')){
		$('#walk_on_player').addEvent('click', function(){ play_walk_on(); });
	}
	
	if($.cookie("walk_on") == "no") {
		$('#walkOnContainer').remove();	
	}
	else { 
		$('#walk_on').flash({
			swf: '/videos/walk_on.swf',
				width: 300,
				height: 400,		
			params: {
				wmode: "transparent",
				loop: false
			}
		});
	}
	*/
	$('a[class~="external"]').click(function(){
		$(this).attr('target','_blank');
 	});
	$('a[rel~="external"]').click(function(){
		$(this).attr('target','_blank');
 	}); 
	
	if($("#dr-oogle").length > 0){
		$('head').append('<link rel="stylesheet" href="http://www.doctoroogle.com/getRatingStyles.css" type="text/css" />');
		$("#dr-oogle").append('<a href="http://www.doctoroogle.com"><img src="http://www.doctoroogle.com/images/medlogo.png" style="border:0" /></a>');
		$("#dr-oogle").append('<div id="getRating4_11840455" style="text-align:center;"></div>');
		$("#dr-oogle").css({ backgroundColor: "#FFF", textAlign: "center", paddingLeft: "5px", border: "solid 1px #5AB5E7", marginBottom: "10px" });
	}
});

function pageLoaded() {
	Cufon.replace('h2');
	Cufon.replace('#intro h2', {
		textShadow: '2px 2px #504843'
	});
	Cufon.replace('#intro .cnt p', {
		fontFamily : 'leftist',
		textShadow: '2px 2px #504843'
	});
	Cufon.now();
}
