Cufon.replace('h1.page-title', { fontFamily: 'zapfino' });
Cufon.replace('h1.post-title', { fontFamily: 'Trajan Pro' });
Cufon.replace('.signature', { fontFamily: 'kaufman' });

	var currentAudioTime;
	var setVolume;

$(document).ready(function () {

	$("a:not(#print_button):not(#fancybox-close):not(#wedding-party a):not(#registry a):not(#footer a):not(a.no-capture)").click(function (e) {
		e.preventDefault();
		var href = this;
		$.ajax({
   			type: "POST",
  			url: "/wp-content/themes/wedding/assets/includes/update_session.php",
   			data: "time=" + currentAudioTime + "&volume=" + setVolume,
   			success: function(){
     			window.location.href = href;
   			}
	 	});
	});
	$("a.no-capture").click(function (e) {
		$("#footer #music-on").click();
	});
	
	$("#footer #music-off").click(function (e) {
		e.preventDefault();
		$(this).hide();
		$("#footer #music-on").show();
		setVolume = 100;
		$("#jquery_jplayer").jPlayer('volume', setVolume);
		
	});
	$("#footer #music-on").click(function (e) {
		e.preventDefault();
		$(this).hide();
		$("#footer #music-off").show();
		setVolume = 0;
		$("#jquery_jplayer").jPlayer('volume', setVolume);
	});

	
	$("#jquery_jplayer").jPlayer({
		ready: function () {
			this.element.jPlayer("setFile", "http://cdn.jeffandnikkiswedding.com/assets/mp3/music.mp3", "http://cdn.jeffandnikkiswedding.com/assets/ogg/music.ogg");
			this.element.jPlayer("playHeadTime", currentAudioTimeStart);	
			this.element.jPlayer("play");
		},
		swfPath: "http://cdn.jeffandnikkiswedding.com/assets/swf",
		volume: setVolumeStart
	})
	.jPlayer("onProgressChange", function(loadPercent, playedPercentRelative, playedPercentAbsolute, playedTime, totalTime) {
		currentAudioTime = playedTime;
	})
	.jPlayer("onSoundComplete", function() {
		this.element.jPlayer("play");
	});	
	
	$("#tabs").tabs();
	$('.slideshow').cycle({
		fx: 'fade'
	});
	$( '.slideshow' ).scrollFollow( {
		offset: 60,
		random:1
	});
	
	if(setVolumeStart==100){
		$("#footer #music-off").click();
	} else {
		$("#footer #music-on").click();
	}
	
});





		var flashvars = {};
		flashvars.xml = "/wp-content/themes/wedding/assets/cu3er/config.xml";
		flashvars.font = "http://cdn.jeffandnikkiswedding.com/assets/cu3er/font.swf";
		var attributes = {};
		attributes.wmode = "transparent";
		attributes.id = "slider";
		swfobject.embedSWF("http://cdn.jeffandnikkiswedding.com/assets/cu3er/cu3er.swf", "cu3er-container", "900", "300", "9", "", flashvars, attributes);

