$(document).ready(function(){
						   
	// Makes external links gray as well as open in a new window and add the external link graphic
	$("a[href^='http']").not("[href*='fbfs.com']").not("[href*='facebook.com']").not("[href*='simplifymyinsurance.com']").not("[href*='aquariumpreview.com']").not("[href*='aqdev.com']").not("[href*='addthis.com']").not("[href*='youtube.com']").not("[href*='twitter.com']").attr('target','_blank').css("color","#666").after('<img src="/_img/icon-external-link.gif" alt="external link""/>'); 
	
						   
	// Makes external links gray as well as open in a new window and add the external link graphic
	$("iframe[src^='http://fls.doubleclick.net/activityi']").attr('align','right'); 
	
	// Makes fbfs.com links open in new window
	$("a[href*='fbfs.com']").attr('target','_blank');
	
	// Controls the E-news Colorbox Overlay
	$(".enewsForm").colorbox({width:"500px", height:"530px", iframe:true});
	
	// Controls the Advertising Videos
	$(".adVideo").colorbox({width:"475px", height:"415px", iframe:true});
	
	// Controls the Identity Video
	$(".identityVideo").colorbox({width:"471px", height:"328px", iframe:true});
	
	
	// checking for the quiz cookie
	var COOKIE_SURVEY = 'smisurvey';
	var options = { path: '/', expires: 90 };
 
	// check if the user has been here before
	if ( !$.cookie(COOKIE_SURVEY) )
	{ 	
		// display the quiz and set a cookie
		$.fn.colorbox({href:'/survey/index.php'});
		
		$.cookie(COOKIE_SURVEY, 'true', options);
	}
	else
	{
		// user has already been here so no survey
	};

	

});
// -- end DOM ready events -- //