$(document).ready(function(){
	
$('#splash').cycle({ 
    fx:      'fade', 
    speed:    1000, 
    timeout:  5000,
	random: 1
});

$("a.bookmark").click(function(e){
	e.preventDefault(); 
	var bookmarkUrl = this.href;
	var bookmarkTitle = this.title;
 
	if (window.sidebar) { 
		window.sidebar.addPanel(bookmarkTitle, bookmarkUrl,"");
	} else if( window.external || document.all) { 
		window.external.AddFavorite( bookmarkUrl, bookmarkTitle);
	} else if(window.opera) { 
		$("a.bookmark").attr("href",bookmarkUrl);
		$("a.bookmark").attr("title",bookmarkTitle);
		$("a.bookmark").attr("rel","sidebar");
	} else { 
		 alert('Your browser does not support the bookmark action. Instead, try pressing Ctrl + D (on Windows) or Cmd + D (on Mac).');
		 return false;
	}
});
});


$(function() {
$("a.player").flowplayer({
		src: "http://canadianfarmrealty.com/wp-content/themes/cfr/js/flowplayer-3.2.7-0.swf"
	});
	$("a[rel]").overlay({
		effect: 'apple',
		mask: {
			color: '#000000',
			opacity: .8
		},
		onLoad: function(content) {
			this.getOverlay().find("a.player").flowplayer(0).ipad().load();
		},

		onClose: function(content) {
			$f().unload();
		}
	});
	
flowplayer("trailer-player", "http://canadianfarmrealty.com/wp-content/themes/cfr/js/flowplayer-3.2.7-0.swf").ipad();
});
