$(document).ready(function(){


/////email

	//	$('.email').mailto();
		$('.email').dcSpamless();
	
	
////flip

$('.turn').bind("click",function(){

		// point to the clicked .turn element (caching it in elem for speed):

		var elem = $("#page");

		// data('flipped') is a flag we set when we flip the element:

		if(elem.data('flipped'))
		{
			// If the element has already been flipped, use the revertFlip method
			// defined by the plug-in to revert to the default state automatically:

			elem.revertFlip();

			// Unsetting the flag:
			elem.data('flipped',false);
			
			
		}
		else
		{
			// Using the flip method defined by the plugin:

			elem.flip({
				direction:'bt',
				speed: 300,
				color:'#ffffff',
				onBefore: function(){
					// Insert the contents of the .back div (hidden
					// from view with display:none) into the clicked
					// #page div before the flipping animation starts:
					elem.html(elem.siblings('.back').html());
				}
			});

			// Setting the flag:
			elem.data('flipped',true);
		}
	}); // end flip



}); //closure is important, also in javascript

