var contentType="";
var QueryParam = {};
var currentTimer = 0;
// is FM object defined? if not, define
if (!FM) var FM = {};

FM.form = {  						
 domain : 'http://www.freddiemac.com',	// if URL is: http://www.fm.com/test.htm#part2
 protocol : location.protocol, 			// returns http:
 hostname : location.hostname, 			// returns www.fm.com
 pathname : location.pathname, 			// returns /test/test.htm
 pathElements: location.pathname.replace(/^\//,'').split("/"),   // returns array of path sections 
 hash : location.hash, 					// returns #part2 
 href : location.href, 					// returns http://www.fm.com/test.htm#part2
 querystr : location.search, 			// returns ?f=try&g=it if URL is: http://fm.com/js/aa.cgi?f=try&g=it
 referrer:  document.referrer,          // returns referring page, if available
 QueryPairs : location.search.replace(/^\?/,'').split(/\&/),
 setCookie: function(name, value, expiredays, path) {
	if (!value) { value = ''; }
	if (!expiredays || isNaN(expiredays)){ expiredays=0.5; }  // 12 hours
	if (!path) { path = '/'; }
	var exdate=new Date();	
	exdate.setTime(exdate.getTime()+(expiredays*24*60*60*1000));
	exdate=exdate.toGMTString();		
	if (name) { document.cookie = name+"="+value+";expires="+exdate+";path="+path; }
 },
 getCookie:	function(name){ 
		var re=new RegExp(name+"=[^;]+", "i"); 
		if ((name) && document.cookie.match(re)) { return document.cookie.match(re)[0].split("=")[1]; }
		else { return ""; }
 },
 deleteCookie: function (name, path) {
	if (!path) { path = '/'; }
    if (FM.form.getCookie(name)!=='') { FM.form.setCookie(name, '', '-1', path); }
},
 ForceGlobalLinks :  function(href){
	var link = (FM.form.domain + href).replace(/\/slearnctr/,'');
	return link;
 }
};

FM.form.setUp = function() {

	for (var i in FM.form.QueryPairs) { 
		QueryParam[decodeURIComponent(FM.form.QueryPairs[i].split('=')[0] || "")] = decodeURIComponent(FM.form.QueryPairs[i].split('=')[1] || "");
	}; 

	if(FM.form.protocol === 'https:') {		
		$('#nav-global a[href^=/]').each(function(){
			$(this).attr('href', FM.form.ForceGlobalLinks($(this).attr('href')));
		});		
		$('#header a[href^=/]').each(function(){
			$(this).attr('href', FM.form.ForceGlobalLinks($(this).attr('href')));
		});		
		$('#nav-main a[href^=/]').each(function(){
			$(this).attr('href', FM.form.ForceGlobalLinks($(this).attr('href')));
		});		
		$('#toc-nav a[href^=/]').each(function(){
			$(this).attr('href', FM.form.ForceGlobalLinks($(this).attr('href')));
		});		
		$('#content-footer a[href^=/]').each(function(){
			$(this).attr('href', FM.form.ForceGlobalLinks($(this).attr('href')));
		});		
	};	
	
	if($('#global-search #pathName').size() > 0) {
		$('#pathName').val(FM.form.pathname);
	};	

	if($(".fmform").size() > 0) { 
	 	$(".fmform input[type='reset']").each(function() {
			$(".fmform input[type='reset']").click(function() {
				$(this).parents().find(".fmform").children().find("label.error").hide().end().find(".error").not("label").removeClass("error");
			});
		});				
		$(".formLabel:contains('*')").each(function() {
			var label = $(this).html().replace(/\*$/,'<span class="'+FM.css.requiredClass+'">*</span>');
			$(this).html(label);			
		});		
		$(".form_instructions:contains('*')").each(function() {
			var form_instructions = $(this).html().replace(/\*/,'<span class="'+FM.css.requiredClass+'">*</span>');
			$(this).html(form_instructions);		
		});	
	};
	
	if(FM.form.pathname.search(/singlefamily\/news\/2/) > -1 || FM.form.pathname.search(/singlefamily\/news\/newsletter/) > -1) {
	   var backlink = 'javascript:history.back();'; 
	   if (FM.form.referrer.search(/singlefamily\/news/) == -1) { backlink = "/singlefamily/news/"; }
	   $('h1').after('<p><a id="backlink" href="' + backlink + '">Back to Single-Family News Center</a></p>');
	};
};

FM.css = {
	clearHrs : "clearHrs",
	firstTocLink : "firstNavLink",
	onToc : "on",
	onGlobal : "on",
	activeGlobal : 0,
	tableAltRow : "alt",
	moreClass : "more",
	moreLinkClass : "morelink",
	securedClass : "secured",
	securedLinkClass : "securedlink",
	offsiteClass: "offsite",
	offsiteLinkClass: "offsitelink",
	videoClass: "video",
	videoLinkClass: "videolink",
	workshopClass: "workshop",
	workshopLinkClass: "workshoplink",
	webconfClass: "webconf",
	webconfLinkClass: "webconflink",
	fileMarkerClass: "fileSize",
	tableInput : "txt",
	inputTxt : "txt",
	imgClass : "imageBox",
	hrClass : "contentDiv",
	hrDiv : "hr",
	requiredClass : "req_mark",
	printBoxID : "content-main", // used by FM.print
	printID : "print-this-page",
	printHoverClass : "hover",
	closeText : 'close window',
	closeTextEs : 'cierre ventana',
	closeClass : 'popup-close',
	transCode : 'En espa&ntilde;ol',
	transCodeEs : 'In English',
	onTabClass : 'selected',
	ulTabClass:  'tabsUL',
	resized: 'no',
	resetHeights: function(){
		FM.css.resized = 'yes';
		if ($("#short1").size() == 0) { $("#content-footer").prepend('<div id="short1"></div>'); }
		var z = 0, x= $("#short1").height();	
		z = $(window).height() - $(document).height();
		if(z > 1) { x=x+z; $("#short1").height(x); }		
		z = $("#content-toc").height()-$("#content-display").height();
		if(z > 5) { x=x+z; $("#short1").height(x);}
		z = $(document).height() - $("#grid").height();
		if(z > 11) { x=x+z; $("#short1").height(x);}
		clearTimeout(currentTimer);
		FM.css.resized = 'no';
	},
	setTimer: function() {
		if (FM.css.resized == 'no') {
		clearTimeout(currentTimer);
		currentTimer = setTimeout("FM.css.resetHeights()", 10);
		}
	},
	toggleTabs:  function(tabID) {		
		$('.'+FM.css.ulTabClass+' li > a[rel="TabMenu"]').each(function(i){
			$(this).parent('li').removeClass(FM.css.onTabClass);
			$(this).parent('li').children('ul').hide();					
			$('#tab' + i).hide();
		});		
		$('.'+FM.css.ulTabClass+' li:eq('+tabID+')').children('ul').show();
		$('.'+FM.css.ulTabClass+' li:eq('+tabID+')').parent('ul').show();
		$('.'+FM.css.ulTabClass+' li:eq('+tabID+')').addClass(FM.css.onTabClass);					
		$('#tab' + tabID).show();
		if ( $('.'+FM.css.ulTabClass+' li:eq('+tabID+')').parent('ul').siblings('a[rel="TabMenu"]').size() > 0  ) {
			var parentTabID = $('.'+FM.css.ulTabClass+' li:eq('+tabID+')').parent('ul').siblings('a[rel="TabMenu"]:first').attr('id');
			$('#'+parentTabID).parent('li').addClass(FM.css.onTabClass);
			$('#tab' + parentTabID.replace(/activeNumber/,'')).show();
		}
		FM.css.setTimer();
	},
	openAllRegs:  function(URL) { 
		var left = (screen.availWidth/2) - 400; 
		var top = (screen.availHeight/2) - 300; 
		window.open( URL, "TLinkAuth", "height=600,width=800,top=" + top + ",left="+left, true ); 
	} 
};

FM.css.setUp = function(){
	
	if ( $("#content-toc").size() > 0 ) {
		if ( $('#content-toc a:first').hasClass(FM.css.onToc) ) {
			$("#content-toc a:first").addClass(FM.css.firstTocLink) 
		}
	};
	
	if ($("table.zebra").size() > 0) {
		$("table.zebra tbody tr:odd td").addClass(FM.css.tableAltRow)
	};

	$("hr." + FM.css.hrClass).wrap('<div class="' + FM.css.hrDiv + '"></div>');
	
	// MSIE ONLY SCRIPTS
	if ($.browser.msie) {
		$("hr." + FM.css.clearHrs).wrap("<div class='" + FM.css.clearHrs + "'></div>");
		$(".fmform input[type=text]").addClass(FM.css.inputTxt);
	};
	
	if(FM.css.activeGlobal > 0) {
		$('#nav-global li:nth-child('+FM.css.activeGlobal+') a').addClass(FM.css.onGlobal);
	};

	if ($('a[title] img[src$="tooltip.gif"]').size() > 0) {
		$('body').append('<div id="tip"></div>');
		$('a[title] img[src$="tooltip.gif"]').each(function(){
			var title = $(this).parent().attr('title');
			$(this).mouseover(function(event){
				$(this).parent().attr('title', '');	
				$('#tip div').attr('style', ' width:expression(' + document.body.clientWidth + ' > 350? "330px":"auto")');
				$('#tip').html('<div>' + title + '</div>').attr('style', 'top: ' + event.pageY + 'px; left: '+ event.pageX + 'px;').show();			
			});
			$(this).mouseout(function(){ $('#tip').hide(); });
		});		
	};
		
	if ($("#translate a").size() > 0) {
		if ($('html').attr('lang') === 'es') { 	FM.css.transCode = FM.css.transCodeEs; }			
		if (FM.form.pathname.match(/corporate\/buyown\/spanish\/avoiding_foreclosure\/avoid_fraud/)) {
			$("#translate a:first").attr('href', FM.form.href.replace(/corporate\/buyown\/spanish\/avoiding_foreclosure\/avoid_fraud/,'avoidfraud')); 
		}
		else if (FM.form.pathname.match(/corporate\/buyown\/spanish\/avoiding_foreclosure/)) {
			$("#translate a:first").attr('href', FM.form.href.replace(/corporate\/buyown\/spanish\/avoiding_foreclosure/,'avoidforeclosure')); 
		}
		else if (FM.form.pathname.match(/avoidfraud/)) {
			$("#translate a:first").attr('href', FM.form.href.replace(/avoidfraud/,'corporate/buyown/spanish/avoiding_foreclosure/avoid_fraud')); 
		}
		else if (FM.form.pathname.match(/avoidforeclosure/)) {
			$("#translate a:first").attr('href', FM.form.href.replace(/avoidforeclosure/,'corporate/buyown/spanish/avoiding_foreclosure')); 
		}
		else if (FM.form.pathname.match(/corporate\/buying_and_owning\.html/)) {	
			$("#translate a:first").attr('href', FM.form.href.replace(/corporate\/buying_and_owning\.html/,'corporate/buyown/spanish.html'));
		}
		else if (FM.form.pathname.match(/corporate\/buyown\/spanish\.html/)) {	
			$("#translate a:first").attr('href', FM.form.href.replace(/corporate\/buyown\/spanish\.html/,'corporate/buying_and_owning.html'));
		}
		else if (FM.form.pathname.match(/english/)) {
			$("#translate a:first").attr('href', FM.form.href.replace(/english/,'spanish')); 
		}
		else if (FM.form.pathname.match(/spanish/)) {	
			$("#translate a:first").attr('href', FM.form.href.replace(/spanish/,'english'));
		}
		$("#translate a:first").append(FM.css.transCode);
	};
		
	$('#content-main h2:has("a[href]:not([href*=.pdf])")').each(function() {
		$(this).addClass('hdrDiv');
		var link = $(this).children('a[href]:first').addClass(FM.css.moreClass).attr('href');
		$(this).append('<a href="' + link + '" class="'+FM.css.moreLinkClass+'">More</a>');
	});
	
	$('a.'+ FM.css.offsiteClass).each(function(){
		$(this).attr('target', '_blank').after('<span class="'+FM.css.offsiteLinkClass+'"> </span>');
	});
	$('a.'+ FM.css.videoClass).each(function(){
		$(this).after('<span class="'+FM.css.videoLinkClass+'"> </span>');
	});
	$('a.' + FM.css.securedClass).each(function(){
		$(this).after('<span class="'+FM.css.securedLinkClass+'"> </span>');
	});
	$('a.' + FM.css.workshopClass).each(function(){
		$(this).after('<span class="'+FM.css.workshopLinkClass+'"> </span>');
	});
	$('a.' + FM.css.webconfClass).each(function(){
		$(this).after('<span class="'+FM.css.webconfLinkClass+'"> </span>');
	});

	if ($('span.popup-copy').size() > 0) {
		$('span.popup-copy:first').after('<span class="' + FM.css.closeClass + '"><a href="javascript:window.close();">'+FM.css.closeText+'</a></span>').andSelf();
		if ($('html').attr('lang') === 'es') { 
			$('span.popup-close:first a').html(FM.css.closeTextEs); 
		}
	};
	
	if ($('.'+FM.css.ulTabClass+' li > a[rel="TabMenu"]').size() > 0) {
		$('.'+FM.css.ulTabClass+' li > a[rel="TabMenu"]').each(function(i){
		 // set links and hide all children and tab contents
			$(this).attr('href', 'javascript:FM.css.toggleTabs(' + i + ');').attr('id', 'activeNumber' + i); 
			$('#tab' + i).hide();		
		});
		var tab = QueryParam['tab'] || '';
		if ($('#activeNumber' + tab).size() < 1) {tab = 0;}		
		FM.css.toggleTabs(tab);
	};
	
		$('img[src*="style=box"][width]').each(function(n){
		var w = $(this).attr('width');
		$(this).width(w); 
		if ($(this).parent().is('a')) {
			$(this).parent().wrap('<p class="image" id="image_'+n+'"></p>');
		} 
		else {
			$(this).wrap('<p class="image" id="image_'+n+'"></p>');
		}
		$("#image_"+n).width(w).wrap('<div class="'+FM.css.imgClass+'" id="image_box_'+n+'"></div>');
		$("#image_box_"+n).width(w+10);
		if ($(this).attr('title') !== '') {
			$("#image_"+n).before('<p class="header" id="image_title_'+n+'">'+$(this).attr('title')+'</p>\n\t');
			$(this).removeAttr('title');
		}	
		if ($(this).attr('alt') !== '') {
			$("#image_"+n).after('<p class="caption" id="image_caption_'+n+'">'+$(this).attr('alt')+'</p>\n');
			$(this).attr('alt', $("#image_caption_"+n).text());
		}
		if ($(this).hasClass('image-lead')) {
			$(this).removeClass('image-lead');
			$("#image_box_"+n).addClass('major');
			$("#image_box_"+n).css('margin-left', '0px');
		}
		else if ($(this).hasClass('image-post')) {
			$(this).removeClass('image-post');
			$("#image_box_"+n).addClass('minor');
			$("#image_box_"+n).css('margin-right', '2px');
		}						
		else {
			$("#image_box_"+n).wrap('<div class="full"></div>');
		}
		$(this).removeAttr('align');	
	});	
		
	$("a[href*='type=popup'],area[href*='type=popup']").each(function(n){
		var link = $(this).attr('href');	
		var linkType = $(this).attr('rel');
		var linkPairs = link.replace(/^\?/,'').split(/\&/);
		var linkParam = {};
		for (var i in linkPairs) { 
			linkParam[decodeURIComponent(linkPairs[i].split('=')[0] || "")] = decodeURIComponent(linkPairs[i].split('=')[1] || "");
		}; 
		var popHeight = linkParam['height'] || 0;
		var popWidth = linkParam['width'] || 0;
		if (popHeight > 600 || popHeight < 150) { popHeight = 400 };
		if (popWidth  > 800 || popWidth < 250) { popWidth = 600 };
		var popTop = ( screen.availHeight / 2 ) - ( popHeight / 2 );
		var popLeft= ( screen.availWidth / 2 ) - ( popWidth / 2 ); 	
		var baseURL = link.replace(/\?type=popup$/,'');
		if (linkType == 'AllRegs') {  //add overrides
			baseURL = 'http://www.allregs.com/tpl/public/fhlmc_freesite_tll.aspx';
			$(this).attr('href', "javascript:void(0);").click(function() {FM.css.openAllRegs(baseURL);});
		}
		else {		
			$(this).attr('href', "javascript:void(window.open('"+baseURL+"','FMpopup"+n+"', 'height="+popHeight+",width="+popWidth+",top=" + popTop + ",left="+popLeft+",resizable=yes,scrollbars=yes', true))"); 
		}	
	});
	
	
	$("a[href$=.pdf],a[href$=.PDF]").after(' <span class="'+ FM.css.fileMarkerClass +'">[PDF]</span>');
	$("a[href$=.doc],a[href$=.DOC]").after(' <span class="'+ FM.css.fileMarkerClass +'">[DOC]</span>');
	$("a[href$=.zip],a[href$=.ZIP]").after(' <span class="'+ FM.css.fileMarkerClass +'">[ZIP]</span>');
	$("a[href$=.xls],a[href$=.XLS]").after(' <span class="'+ FM.css.fileMarkerClass +'">[XLS]</span>');
	$("a[href$=.mp3],a[href$=.MP3]").after(' <span class="'+ FM.css.fileMarkerClass +'">[MP3]</span>');
	$("a[href$=.mov],a[href$=.MOV]").after(' <span class="'+ FM.css.fileMarkerClass +'">[MOV]</span>');
	$("a[href$=.ppt],a[href$=.PPT]").after(' <span class="'+ FM.css.fileMarkerClass +'">[PPT]</span>');
	$("a[href*=.pdf#page=],a[href*=.PDF#page=]").after(' <span class="'+ FM.css.fileMarkerClass +'">[PDF]</span>');
	$("a[href^=/]~span." + FM.css.fileMarkerClass).each(function(){
		var link = $(this).prev();
		var contents = link.html();
		if (contents.match(/<img/) || contents.match(/<IMG/)) {  
			$(this).html('');
		}
		else {
			var href = link.attr('href') || "";
			var bits = href.split('.');
			var type = bits[bits.length -1].toUpperCase();
			bits = bits[bits.length -1].split('#page=');
			if (parseInt(bits[bits.length -1]) > 1) { 
				type = bits[bits.length -2].toUpperCase(); 
				href = href.replace(/#page=\d+/,'');
			};
			$.get("/cgi-bin/crawl/filesize.cgi?url=" + encodeURIComponent(href), {a:1}, function(data){
			 	 if(data) { 			 	 
				 link.next().html(' <span class="'+ FM.css.fileMarkerClass +'">['+type+' '+data+']</span>'); 
				 };
			});
		}
	});

	FM.css.setTimer();		
}


$(window).resize(function(){
	FM.css.setTimer();
})

FM.Print = {
	add : true, // override on a given page by setting FM.Print.add = false;
	htmlCode : '&nbsp;<p><a id="' + FM.css.printID + '">Print This Page</a></p>',
	htmlCodeEs : '&nbsp;<p><a id="' + FM.css.printID + '">Imprima esta P&aacute;gina</a></p>'
};

FM.Print.setUp = function() {
	if (FM.Print.add) {
		if ($('html').attr('lang') === 'es') { 	FM.Print.htmlCode = FM.Print.htmlCodeEs; };
		$("#" + FM.css.printBoxID).append(FM.Print.htmlCode);
		$("#" + FM.css.printID).click(function(){
			window.print();
		});
		if ($.browser.msie) {
			$("#" + FM.css.printID).hover(function(){
				$(this).addClass(FM.css.printHoverClass)
			},function(){
				$(this).removeClass(FM.css.printHoverClass)
			});
		};
	};
};

FM.sites = { // top level directories only
		"cim":  	"/DoingBusiness", 
		"cgi-bin":  "/DoingBusiness", 
		"debt":  	"/DoingBusiness", 
		"mbs":  	"/DoingBusiness", 
		"singlefamily":  "/DoingBusiness", 
		"sell":  	"/DoingBusiness", 
		"service":  "/DoingBusiness", 
		"homepossible":  "/DoingBusiness", 
		"learn":  	"/DoingBusiness", 
		"lpoutreach":  "/DoingBusiness", 
		"multifamily":  "/DoingBusiness", 
		"multisuite":  "/DoingBusiness", 
		"ontrack":  "/DoingBusiness", 
		"hve":  	"/DoingBusiness", 
		"forms": 	"/DoingBusiness", 
		"dgtq": 	"/DoingBusiness", 
		"earlyindicator":  "/DoingBusiness", 
		"freddienotes":  "/DoingBusiness", 
		"realestatepros":  "/DoingBusiness", 
		"slearnctr":  "/DoingBusiness", 
		"uniform":  "/DoingBusiness", 
		"usbank":  "/DoingBusiness", 
		"wellsfargo":  "/DoingBusiness",
		"bios":  	"/AboutUs", 
		"careers":  "/AboutUs", 
		"jobs":  "/AboutUs", 
		"Careers":  "/AboutUs", 
		"citizenship":  "/AboutUs", 
		"dlink":  	"/AboutUs", 
		"news":  	"/AboutUs", 
		"pmms":  	"/AboutUs", 
		"investors":  "/AboutUs", 
		"smm":  	"/AboutUs", 
		"finance":  "/AboutUs", 
		"initiatives":  "/AboutUs", 
		"governance":  "/AboutUs", 
		"whoweare":  "/AboutUs", 
		"speeches":  "/AboutUs", 
		"freddiemac":  "/AboutUs", 
		"freddiefacts":  "/AboutUs",
		"avoidfraud":  "/AboutHO", 
		"avoidforeclosure":  "/AboutHO", 
		"calculadoras":  "/AboutHO", 
		"calculators":  "/AboutHO", 
		"creditsmartespanol":  "/AboutHO", 
		"hrc":  	"/AboutHO", 
		"hrcsp":  "/AboutHO",
		"terms":  "/Other"
};

FM.omni = {
	exceptions: [  // full path url exceptions
		"/corporate/about/feedback.html",
		"/corporate/about/contactus.htm",
		"/corporate/about/sitemap.html",
		"/corporate/company_profile/fmsites.html"
	],
	solveBucket: function() { 	
		var bucket="";	
		var exception = '';
		if (FM.form.pathElements[0] === "corporate") {  
			var i = FM.omni.exceptions.length;
			while (i--) { 
				try {  exception = FM.form.pathname.indexOf(exceptions[i])    // Code to run
				} catch ( e ) {  
						exception = -1;
				} 
				if (exception === 0){ bucket= "/Other"; }
			}
			if (FM.form.pathname === "/corporate/doing_business.html") {  bucket = "/DoingBusiness"; }		
			else if (FM.form.pathname === "/corporate/about/vendors.html") {  bucket = "/DoingBusiness"; }		
			else if (FM.form.pathname === "/corporate/about_freddie.html") { bucket = "/AboutUs";  }	
			else if (FM.form.pathname === "/corporate/buying_and_owning.html") { bucket = "/AboutHO";  }	
			else if (FM.form.pathElements[1] === "buyown") { bucket= "/AboutHO"; }
			if (bucket==="") { bucket= "/AboutUs"; }
		}	
		else if (FM.sites[FM.form.pathElements[0]]) { bucket= FM.sites[FM.form.pathElements[0]]; } 
		if (bucket==="") { bucket= "/Other"; }
		return bucket;
	},
	scSetVisType: function(vType,lType,obj){
	    var s = s_gi(s_account); 
	    s.linkTrackVars='prop9,eVar9,events'; 
	    s.linkTrackEvents='event3'; 
	    s.events='event3';
	    s.prop9=s.eVar9=vType;  
	    s.tl(obj,lType,vType); 
	    s.linkTrackVars='None'; 
	    s.linkTrackEvents='None'; 
	    s.prop9=s.eVar9=''; 
	    s.events='';
	}
};

FM.omni.setUp = function()  {
	if (FM.form.pathElements[0] == "ontrack" || FM.form.pathElements[0] == "dlink") {
		s.pageName = s.getPageName() + FM.form.querystr;
	} 
	s.channel = s.siteID + FM.omni.solveBucket();
	if ( FM.form.referrer.match(/loanprospector\.com/) )  { s.prop9 = "lp" }
	else if ( FM.form.pathname.match(/debt\/data\/cgi-bin/) ) { s.prop9 = "debt" }
	else if ( FM.form.pathname.match(/mbs\/cgi-bin/) ) { s.prop9 = "mbs" }
	else if ( FM.form.pathname.match(/help\/ss/)) { s.prop9 = "ss" }
	else if ( FM.form.pathname.match(/careers\/campus\/thankyou.html/)) { s.prop9 = "cjs" }
	else if (FM.form.pathname.match(/careers\/jobsearch/)) { s.prop9 = "js" }
	else if ( FM.form.pathname.match(/singlefamily\/doingbusiness\/checklist.html/)) { s.prop9 = "sfnew" }
	s.prop12="en";
	if ($('html').attr('lang') === 'es') { s.prop12="es" };
	if (FM.form.pathElements[0] !== "search") { 
		var s_code=s.t();if(s_code) {$('body:first').append(s_code) };	
		$("a[href^='https://www.loanprospector']").click(function(){ FM.omni.scSetVisType('lp','e',this); var a='s.tl(';	});
		$("a[href^='https://sell.freddiemac']").click(function(){ FM.omni.scSetVisType('ss','e',this); var a='s.tl(';	});
	}
};
 
// DOM loaded function
// 	code executed when DOM has loaded into browser
$(function(){
	// add other setups here
	FM.form.setUp();  // add form processing
	FM.css.setUp();
	FM.Print.setUp(); // add print link
	FM.omni.setUp();
	FM.css.setTimer();
});

// IE6 flicker fix
try { document.execCommand("BackgroundImageCache", false, true); } catch(err) {}

// fix column heights
/**
 * Copyright (c) 2007 Tom Deater (http://www.tomdeater.com)
 * Licensed under the MIT License:
 * http://www.opensource.org/licenses/mit-license.php
 */
(function($) {
    /**
    * equalizes the heights of all elements in a jQuery collection
    * thanks to John Resig for optimizing this!
    * usage: $("#col1, #col2, #col3").equalizeCols();
    */
    $.fn.equalizeCols = function(){
        var height = 0,
            reset = $.browser.msie ? "1%" : "auto";

        return this
            .css("height", reset)
            .each(function() {
                height = Math.max(height, this.offsetHeight);
            })
            .css("height", height)
            .each(function() {
                var h = this.offsetHeight;
                if (h > height) {
                    $(this).css("height", height - (h - height));
                };
            });
    };
})(jQuery);
