var $j=jQuery.noConflict();
var message = "Please be advised that you are leaving Southwest Airlines Federal Credit Union's website. This link is provided as a courtesy.  Southwest Airlines Federal Credit Union does not endorse or control the content of third party websites.";

$j(document).ready(function(){
	// jQuery replacement for warn
	if( $j('a.warn').length > 0 ){
		$j('a.warn').click( function(){
			alert( message );
		});
	}
	if( $j('a.confirm').length > 0 ){
		$j('a.confirm').click( function( event ){
			event = new Event(event);
			if( confirm(message) ) {
				return true;
			} else {
				event.stop();
				return false;
			}
		});
	}
	var IE6 = (navigator.userAgent.indexOf("MSIE 6")>=0) ? true : false;
	if(!IE6){
		jQuery(document).ready(function(){
			$j("#printShare li").hover(
				function(){
					$j(this).find("span").attr({"style": 'display:block'});
					$j(this).find("span").animate({opacity: 1}, {queue:false, duration:400});
				},
				function(){
					$j(this).find("span").animate({opacity: 0}, {queue:false, duration:400}, "linear",
					function(){
						$j(this).find("span").attr({"style": 'display:none'});
					}
				);
			});
		});
	}
	//This adds iframe class inorder for forms to work
	$j('#tellMeMoreButton a').addClass('iframe');

	$j("#tellMeMoreButton a").fancybox({
		'hideOnContentClick': false,
		'frameWidth': 550,
		'frameHeight': 430,
		'overlayOpacity': 0.8
	});

	$j('#shareButton a').addClass('iframe');

	$j("#shareButton a").fancybox({
		'hideOnContentClick': false,
		'frameWidth': 550,
		'frameHeight': 500,
		'overlayOpacity': 0.8
	});
	$j('#financialCalculators li a').addClass('iframe');

	$j("#financialCalculators li a").fancybox({
		'hideOnContentClick': false,
		'frameWidth': 650,
		'frameHeight': 400,
		'overlayOpacity': 0.8
	});
	// fancybox popup on apps
	$j("a#ssnWhy").fancybox({
		'frameWidth': 300,
		'frameHeight': 150
	});
});
