$(document).ready(function(){
	
	$(".fancybox").fancybox({
	'type':'iframe',
	'margin':0,
	'padding':0,
	'overlayColor':'#FFFFFF',
	'width': 590,
	'height': 390,
	'showCloseButton': true,
	'scrolling': 'no',
	'overlayOpacity':0.66
	});	
	
	$(".fancyboxtickets").fancybox({
	'type':'iframe',
	'padding':0,
	'overlayColor':'#FFFFFF',
	'showCloseButton': true,
	'width': 500,
	'height': 600,
	'scrolling': 'no',
	'overlayOpacity':0.66
	});	
	
$('#twitterfeed').css('opacity',0);

$("#twitterbtn").mouseenter(function () {openTwitter();});
$("#twitterfeed").mouseleave(function () {closeTwitter();});
$("#backimage").click(function() {$.fancybox.close();});
	
	function openTwitter(){
		$("#twitterfeed").animate({         
      	width: "360px",
      	height: "405px",
		marginLeft: "690px",
		marginTop: "255px",
		opacity: 1
      }, 400, function(){$('#twitterfeed').css('zIndex',5);$('#facebtn').css('zIndex',5);});
			}
	
	function closeTwitter(){
		$("#twitterfeed").animate({         
      	width: "0px",
      	height: "0px",
		marginLeft: "954",
		marginTop: "635px",
		opacity: 1,
		zIndex:10
      }, 400, function(){$('#twitterfeed').css('zIndex',2);$('#facebtn').css('zIndex',2);} );
		
		
	}
	
	
	

$("#facebtn").mouseenter(function () {openFacebook();});
$("#facebadge").mouseleave(function () {closeFacebook();});
	
	function openFacebook(){
		$("#facebadge").animate({         
      	width: "350px",
      	height: "405px",
		marginLeft: "630px",
		marginTop: "255px",
		opacity: 1,
		zIndex:10
      }, 400, function(){$('#facebadge').css('zIndex',5);$('#twitterholder').css('zIndex',9);} );
		
	}
	
	function closeFacebook(){
		$("#facebadge").animate({         
      	width: "0px",
      	height: "0px",
		marginLeft: "854",
		marginTop: "637px",
		opacity: 1
      }, 400, function(){$('#facebadge').css('zIndex',5);$('#twitterholder').css('zIndex',4);} );
		
		
	}

	
});



