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

			$("#flipBT").click(function(){
				$("#flipBox").flip({
					direction: 'bt',
					color: '#FF9',
					speed: 400,
					content: "<div class='demo_one'><div style='width:200px;position:absolute;margin-left:10px;'><h1 style='padding:0px;margin:0px;'>Features</h1><ul><li><strong>Highlight</strong> your docs.</li><li>Take <strong>Margin Notes</strong>.</li><li><strong>Bookmark</strong> pages.</li><li><strong>Copy Text</strong> and paste it.</li><li><strong>Outline</strong> your notes.</li><li><strong>Search</strong> through your notes.</li><a href='demo'><h2 style='color:black;text-decoration:underline;'>Try our Demo now</h2></a></div><div style='width:260px;margin-left:220px;position:absolute;'><h2>Storage</h2><ul><li>Basic</li><ul><li><strong>10</strong> PDF uploads / month</li><li><strong>5</strong> megabyte files max</li><li>PDF only</li></ul></ul><ul><li>Pro</li><ul><li>Unlimited Uploads / Month</li><li>Uploads up to 15 megs</li><li>PDF, .Doc, .Csv, .Ppt, + many more file types</li><li><a href='pro'>Learn about Pro</a></li></ul></ul><br /><a href='register'><span style='color:black;float:right;background-color:#59a5d1;'>Sign up</span></a></div></div>"
				});
			});
			$("#flipTB").click(function(){
				$("#flipBox").flip({
					direction: 'tb',
					color: '#59a5d1',
					speed: 600,
					content: "<div class='demo_two'><h1 style='padding:0px;margin:0px;'>Why?</h1><div style='width:148px;position:absolute;margin-left:10px;'><h2 style='color:black;text-decoration:underline;'>Take Better Notes</h2>Marqed is way more efficient way of reading and note-taking compared to the paper and highlighter method.  Why?  Honestly, it's simply because your hand isn't getting in the way.  And search helps. </div><div style='width:145px;margin-left:180px;position:absolute;'><h2 style='color:black;text-decoration:underline;'>Save Your Dollars</h2>And also save the burden of carrying around a bunch of stuff! Stop printing and save some money, Marqed is available wherever there's internet.</div><div style='width:140px;margin-left:340px;position:absolute;'><h2 style='color:black;text-decoration:underline;'>Help Our Planet</h2>Don't print when you don't need to, and now with Marqed you really don't have to print.  Our users are saving thousands of pages of paper.  Help out and join them.  <br /><a href='register'><span style='color:black;'><h2>Sign up</h2></span></a></div>"
				});
			});
			$("#flipVideo").click(function(){
				$("#flipBox").flip({
					direction: 'rl',
					color: '#CCC',
					speed: 550,
					content: "<div class='demo_four' style='margin:0;padding:0;'><object width='500' height='345'><param name='allowfullscreen' value='true' /><param name='allowscriptaccess' value='always' /><param name='movie' value='http://vimeo.com/moogaloop.swf?clip_id=7873773&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=00adef&amp;fullscreen=1' /><embed src='http://vimeo.com/moogaloop.swf?clip_id=7873773&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=00adef&amp;fullscreen=1' type='application/x-shockwave-flash' allowfullscreen='true' allowscriptaccess='always' width='500' height='345'></embed></object></div>"
				});
			});
			$("#flipRL").click(function(){
				$("#flipBox").flip({
					direction: 'lr',
					color: '#FFF',
					speed: 550,
					content: "<div class='demo_five'<h1 style='text-align:center;'>Sign Up for Marqed Basic</h1><div id='signup'><div style='position:absolute'><form action='RegisteredSuccessful.php' method = 'post'><strong>Email</strong>:<br /><input name='User_email' type='text' size='20'/><br /><strong>Password:</strong><br /><input name='Password' type='password' size='20'/><br /><p /><span style='font-size:10px;'><label>I have read the <a href='basicUserAgreement'>Marqed Basic<br /> Subscription Terms of Service</a>.  <input type='checkbox' name='userAgreement' value='confirm' /></label></div><div style='text-align:right;margin-left:200px;'>...or get the whole shebang with <a href='pro'>Marqed Pro</a>.<div style='text-align:left;font-size:10px;margin-left:60px;'><br />New Features<br />Unlimited Upload Space<br />Larger File Sizes<br />.Doc Uploads<br /><strong>Learn about Pro <a href='pro'>here</a></strong></div><input type='submit' class='button' value='Sign Up' /></form></div></div></div>"
				});
			});					
		});

			$(function() {
	$("#tabs").tabs();
});




//function to move buttons up 2 pixels and add box shadow w/ css addclass commands in jquery
	$(function(){
		$(".buttonHover").hover(
			function () {
			 $(this).css({'text-decoration' : 'none'}); 	
		 $(this).animate({ 
			opacity: 1, 
			borderWidth: "3px"
			}, 100 );
			},
			function () {
			 $(this).css({'text-decoration' : 'none'}); 	
			 $(this).animate({ 
			opacity: 0.7,
			borderWidth: "1px"
			}, 100 );
			});
	});


$("#block").animate({ 
width: "70%",
opacity: 0.4,
marginLeft: "0.6in",
fontSize: "3em", 
borderWidth: "10px"
}, 1500 );

//function that fades out a div after 5 seconds
$(function(){
	var t1 = setTimeout(divFade,10000);
	});

function divFade() {		
	$("div.divFade").fadeOut(1000);
}


//


//function to fade out site + forward to demo account
$("#timedMsg").click(function () { 
	timedMsg();
});

function timedMsg() {
	$("#default").fadeOut(1000);
	$("#leaving").show();
	var t = setTimeout (redirectFunction,1000);
}

function redirectFunction() {
	location.href="http://www.marqed.com/demo";
}


//function to popup login box
function loginBox() {	
	$("#default").animate( { opacity: 0.2 }, 2000 );
	var t = setTimeout ( function() {
		$("#login").css( "visibility" , "visible" );
		$("#login").show('slide', 1000);
	} , 1000);
}

//function to close login box
function loginBoxClose() {
	$("#default").animate( { opacity: 1.0}, 1000 );
	$("#login").hide('slide',1000);
}

//popup password box
function getPassword() {	
	loginBoxClose();
		$("#retrievePass").css( "visibility" , "visible" );
		$("#retrievePass").show('slide', 1000);
}

//close password box
function getPasswordClose() {
	$("#default").animate( { opacity: 1.0}, 1000 );
	$("#retrievePass").hide('slide',1000);
}

//retrieve password
$(function() {
	$("#retrievePw").submit(function() {
		$.post("retrievePwScript.php", {u_em: "" + $("#userEmail").val()},
			function(response) {
				if(response == "success") {
					$("#retrieveResults").html("Your password has been sent to your email account! To change it go to your settings page.");
				} else {
					$("#retrieveResults").html("You have entered an incorrect username, please try again.");
				}
			}
		);
		return false;
	});
});


//UPLOAD popup
function videoPopup () {
	$("#indexContent").animate( { opacity: 0.2 }, 2000 );
	$("#videoPopup").css({'visibility' : 'visible' });
	$("#videoPopup").css({'display' : 'inline' });
}

function videoPopupClose () {
		$("#indexContent").animate( { opacity: 1.0}, 1000 );
	 $("#videoPopup").hide('slide',1000);
}

$(function() {
	$("#registerMarqedForm").submit(function() {
		if(!$("#checkUserAgreement").is(':checked')) {
			alert("Please read our terms of service.");
		}
	
		return $("#checkUserAgreement").is(':checked');
	});
});
