$(document).ready(function(){
	$('#membersonly a.login').click(function(event) {
		event.preventDefault();
		$.ajax({
			url: "http://www.tietheknotkc.com/brides/ajax/start_login_form",
			success: function(data) {
				$("#loginform").html(data);
			}
		});
		$("#loginform").dialog({
			autoOpen: true,
			modal: true,
			hide: 'blind',
			show: 'blind',
			title: "<h3>Sign In</h3>"
		});
	});
	$('li.maplink a').click(function(event) {
		event.preventDefault();
		currenturl = window.location.href;
		var filename = $(this).attr('href');
		mapurl = currenturl+filename;

		data = '<iframe src="'+mapurl+'" width="800" height="445"><p>Your browser does not support iframes.</p></iframe>';
		$("#popupbox").html(data);
		$("#popupbox").dialog({
			height: 535,
			width: 860,
			autoOpen: true,
			modal: true,
			hide: 'blind',
			show: 'blind',
			title: "Map &amp; Directions"
		});
	});
	//$('li.videolinks a').click(function(event) {
	//	event.preventDefault();
	//	currenturl = window.location.href;
	//	videourl = currenturl+"video.html";
	//
	//	data = '<iframe src="'+videourl+'" width="640" height="490"><p>Your browser does not support iframes.</p></iframe>';
	//	$("#popupbox").html(data);
	//	$("#popupbox").dialog({
	//		height: 560,
	//		width: 680,
	//		autoOpen: true,
	//		modal: true,
	//		hide: 'blind',
	//		show: 'blind',
	//		title: "Videos"
	//	});
	//});
	$('.videolinks a').click(function(event) {
		event.preventDefault();
		var currenturl = window.location.href;
		var filename = $(this).attr('href');
		var videourl = currenturl+filename;

		data = '<iframe src="'+videourl+'" width="640" height="490"><p>Your browser does not support iframes.</p></iframe>';
		$("#popupbox").html(data);
		$("#popupbox").dialog({
			height: 560,
			width: 680,
			autoOpen: true,
			modal: true,
			hide: 'blind',
			show: 'blind',
			title: "Videos"
		});
	});
	$('div.vendorvideo a').click(function(event) {
		event.preventDefault();
		currenturl = $(this).attr('href');
		videourl = "";

		data = '<iframe src="'+currenturl+'" width="640" height="490"><p>Your browser does not support iframes.</p></iframe>';
		$("#popupbox").html(data);
		$("#popupbox").dialog({
			height: 560,
			width: 680,
			autoOpen: true,
			modal: true,
			hide: 'blind',
			show: 'blind',
			title: "Videos"
		});
	});
});

