
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);
}

$(document).ready(function() {
//jQuery(function() {

	Cufon.replace('.header-right h3, .left-sidebar h3, .free-report h3, .right-sidebar .box h3, #footer p.ac, #footer h5');
	Cufon.replace('.header-right p', { textShadow:'#000 1px 1px 0' });
	Cufon.replace('#navigation ul li a', { hover: { color: '#d0856e' } });

//	$("ul.sf-menu").superfish({ 
//	    animation: {height:'show'},   // slide-down effect without fade-in 
//	    delay:     1200               // 1.2 second delay on mouseout 
//	});

	$("ul.sf-menu").superfish();
	
	if ($("a[rel^='prettyPhoto']").length) {
		$("a[rel^='prettyPhoto']").prettyPhoto();
	}
	

	$(function() {
		$("#photo-set").accordion({
			autoHeight: false,
			collapsible: true,
			active: false
		});
	});
	
	$('a[rel="external"]').click(function(){
		$(this).attr('target','_blank');
 	});
	

	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: '/video/walk_on.swf',
				width: 300,
				height: 400,		
			params: {
				wmode: "transparent",
				loop: false
			}
		});
	}

	
});
