$(function() {

	<!-- Google Analytics Pageview Tracking -->
	$('.logo').click(function() {
		_gaq.push(['_trackPageview', 'PickupPage/MainLogo']);;		
	});
	
	$('.banner').click(function() {
		_gaq.push(['_trackPageview', 'PickupPage/Banner']);	
	});
	
	
	$('.fl_resident').click(function() {
		_gaq.push(['_trackPageview', 'PickupPage/FL_Resident']);
		window.open('http://www.misrecuerdosdisney.com/');	
	});
	
	
	<!-- Popup -->
	$('.open_popup').click(function() {
		$('#resend-wrap').show();
	});
	
	$('.close').click(function() {
		$('#resend-wrap').hide();
	});
	
	
	
	
	
	
	$('.header .top_links .en').click(function() {
		_gaq.push(['_trackPageview', 'PickupPage/TopLinks/English']);
		
		showPrivacyPage('http://disneyworld.disney.go.com/passholder-program/?CMP=VAN-WDWFY11Q2USENAPMPRadioCampaign0001')
		//window.open( ');	
	});
	
	$('.header .top_links .esp').click(function() {
		_gaq.push(['_trackPageview', 'PickupPage/TopLinks/Spanish']);
		
		
		
		$('.privacy_page').show();
		
		showPrivacyPage('http://disneyworld.disney.go.com/wdwi/es_US/tickets/ticketsLandingPage?id=APMPLandingPage&CMP=VAN-WDWUSESFY11Q2USESAPMPRadioCampaign0001');

	});
	
	
	
	<!-- Privacy Page -->
	
	function showPrivacyPage(url) {
		
		$('.banner').hide();
		$('.fl_resident').hide();
		$('.pickup_form	').hide();	
		$('.privacy_page').html('<div onClick="window.location.href=\'' + url + '\'" class="privacy_continue"></div><div class="privacy_cancel"></div>');	
		$('.privacy_page').show();
		
		
		
		
		
	}
	
	

	
	
	<!-- Poptastic code -->
	
	$('a.help').click(function(e) {
		popstatic('http://www.picturemarketing.com/help.php');
		e.preventDefault();
	});
	
	$('a.privacy_terms').click(function(e){
		popstatic('http://www.picturemarketing.com/privacy.php');
		e.preventDefault();
	});
	
	$('a.patent_island').click(function(e) {
		popstatic('http://www.picturemarketing.com/patent-island.php');
		e.preventDefault();
	});	
	
	function popstatic(url, width, height) {
		var newwindow = window.open(url, '', 'height=700,width=1020,left=100,top=100,resizable=yes,scrollbars=yes,toolbar=yes,status=yes');
		if (window.focus) {newwindow.focus()}
	}
			
});





/*
 * Tooltip script 
 * powered by jQuery (http://www.jquery.com)
 * 
 * written by Alen Grakalic (http://cssglobe.com)
 * 
 * for more info visit http://cssglobe.com/post/1695/easiest-tooltip-and-image-preview-using-jquery
 *
 */
 


this.tooltip = function(){	
	/* CONFIG */		
		xOffset = 10;
		yOffset = 20;		
		// these 2 variable determine popup's distance from the cursor
		// you might want to adjust to get the right result		
	/* END CONFIG */		
	$(".tooltip").hover(function(e){											  
		this.t = this.title;
		this.title = "";									  
		$("body").append("<p id='tooltip'>"+ this.t +"</p>");
		$("#tooltip")
			.css("top",(e.pageY - xOffset) + "px")
			.css("left",(e.pageX + yOffset) + "px")
			.fadeIn("fast");		
    },
	function(){
		this.title = this.t;		
		$("#tooltip").remove();
    });	
	$(".tooltip").mousemove(function(e){
		$("#tooltip")
			.css("top",(e.pageY - xOffset) + "px")
			.css("left",(e.pageX + yOffset) + "px");
	});			
};



// starting the script on page load
$(document).ready(function(){
	tooltip();
});
