$(document).ready(function(){

	$('.tileRowFlip').bind("click",function(){
		var elem = $(this);
		if(elem.data('flipped'))
		{
			// If flipped then revert flip
			elem.revertFlip();
			elem.data('flipped',false)
		}
		else
		{
			elem.flip({
				direction:'lr',
				speed: 350,
				onBefore: function(){
					// onbefore action
					elem.html(elem.siblings('.tileRowData').html());
				}
			});
			elem.data('flipped',true);
		}
	});
});
