var contentType="",QueryParam={},jgfeedloaded=!1;if(!FM)var FM={};if(!window.addthis_config)var addthis_config={};addthis_config.ui_language="en",addthis_config.ui_click=!0,addthis_config.data_track_clickback=!0,addthis_config.ui_cobrand="Freddie Mac",addthis_config.ui_header_background="#DA7601";
if ($('html').attr('lang') === 'es') { addthis_config.ui_language = "es"; };
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 (a,b,c,d){b||(b="");if(!c||isNaN(c))c=.5;d||(d="/");var e=new Date;e.setTime(e.getTime()+c*24*60*60*1e3),e=e.toGMTString(),a&&(document.cookie=a+"="+b+";expires="+e+";path="+d)},
 getCookie:	function (a){var b=new RegExp(a+"=[^;]+","i");return a&&document.cookie.match(b)?document.cookie.match(b)[0].split("=")[1]:""},
 deleteCookie: function (a,b){b||(b="/"),FM.form.getCookie(a)!==""&&FM.form.setCookie(a,"","-1",b)},
 ForceGlobalLinks :  function (a){var b=(FM.form.domain+a).replace(/\/slearnctr/,"");return b},
 AddChicklets : function (a){var b="Share";$("html").attr("lang")==="es"&&(b="Compartir"),$("#"+a+":first").html('<div class="addthis_toolbox"></div>'),$("#"+a+" div.addthis_toolbox").append('<a class="addthis_button" id="sharelink" href="http://www.addthis.com/bookmark.php?v=250&amp;username=freddiemac">'+b+'</a>\n <a id="at_fb" class="addthis_button_facebook"></a>\n<a id="at_tw" class="addthis_button_twitter"></a>\n<a id="at_em" class="addthis_button_email"></a>\n'),$.getScript("http://s7.addthis.com/js/250/addthis_widget.js#username=freddiemac")},
 AddTags : function (a,b){var c=$('meta[name="Keywords"]:first').attr("content");c=c.replace(/^\s+/,"");var d=c.split(/,/);if(c!==""){$("#"+a+":first").append('<p id="taglist"><strong>Tags:&nbsp;</strong> </p>');for(var e in d)d[e]=d[e].replace(/^\s+/,""),$("p#taglist").append('<a href="'+b+encodeURIComponent(d[e])+'">'+d[e]+"</a>"),e<d.length-1&&$("p#taglist").append(", ")}}
};

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^="/"], #header a[href^="/"], #nav-main a[href^="/"], #toc-nav a[href^="/"], #content-footer a[href^="/"]').each(function(){
			$(this).attr('href', FM.form.ForceGlobalLinks($(this).attr('href')));
		});		
	};		
	if($('#content-main div#chicklets').size() > 0) {
		FM.form.AddChicklets('chicklets');
	};	
	if($('#global-search #pathName').size() > 0) {
		$('#pathName').val(FM.form.pathname);
	};	
	if($(".fmform").size() > 0) { 
	 	var validatorFlag = typeof jQuery.validator;
        if (validatorFlag == 'function') { 
			jQuery.validator.addMethod("dateAmer", function(value, element) {
				return this.optional(element) || /^\d{1,2}\/\d{1,2}\/\d{4}$/.test(value);
			}, "Date format should be mm/dd/yyyy");
			jQuery.validator.methods.date = function(value, element) {
				return this.optional(element) || (/^(\d{4}[\/-]\d{1,2}[\/-]\d{1,2}|\d{1,2}[\/-]\d{1,2}[\/-]\d{4})$/.test(value));
			}
		}		
		$(".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(/(single|multi)family\/news\/2/) > -1) {	
		var backlink = (FM.form.pathname.search(/singlefamily\/news\/2/) > -1 && FM.form.referrer.search(/singlefamily\/news/) == -1) 
		? '/singlefamily/news/' : (FM.form.pathname.search(/multifamily\/news\/2/) > -1 && FM.form.referrer.search(/multifamily\/news/) == -1) 
		? '/multifamily/news/' : 'javascript:history.back();';	
		$('h1:first, p.subh1:last').last().after('<p><a class="rearward" href="' + backlink + '">Back to News Center</a></p>');
	};
};

FM.css = {
	searchBtnOn : "/images/site/btn-search-on.png",
	clearHrs : "clearHrs",
	tableAltRow : "alt",
	tableOddRow : "odd",
	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",
	inputTxt : "txt",
	imgClass : "imageBox",
	iconClass : "iconBox",
	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',
	onTabClass : 'selected',
	ulTabClass:  'tabsUL',
	toggleTabs:  function(container,tabID) {		
		$(container + ' .'+FM.css.ulTabClass+' li > a[rel="TabMenu"]').each(function(i){
			$(this).parent('li').removeClass(FM.css.onTabClass);
			$(this).parent('li').children('ul').hide();					
			$(container + ' #tab' + i).hide();
		});		
		$(container + ' .'+FM.css.ulTabClass+' li:eq('+tabID+')').children('ul').show();
		$(container + ' .'+FM.css.ulTabClass+' li:eq('+tabID+')').parent('ul').show();
		$(container + ' .'+FM.css.ulTabClass+' li:eq('+tabID+')').addClass(FM.css.onTabClass);					
		$(container + ' #tab' + tabID).show();
		if ( $(container + ' .'+FM.css.ulTabClass+' li:eq('+tabID+')').parent('ul').siblings('a[rel="TabMenu"]').size() > 0  ) {
			var parentTabID = $(container + ' .'+FM.css.ulTabClass+' li:eq('+tabID+')').parent('ul').siblings('a[rel="TabMenu"]:first').attr('id');
			$(container + ' #'+parentTabID).parent('li').addClass(FM.css.onTabClass);
			$(container + ' #tab' + parentTabID.replace(/activeNumber/,'')).show();
		}
	},
	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 ); 
	},
	feedLoad: function(feedurl, container, title, highlight, date, today, blurb, count, format) {
	  $.jGFeed(encodeURIComponent(feedurl), function(feeds){ FM.css.feedAction(feeds, container, title, highlight, date, today, blurb, format)}, count);
	},
	feedAction: function(feed, container, title, highlight, date, today, blurb, format) {
		if(!feed){  return false;	 }
		else {
			var feedcode = '';
			var snippet = '';
			var max = feed.entries.length;
			var monthnames = ['January', 'February', 'March', 'April','May','June','July','August','September','October','November','December'];
			var today = new Date();
			if(title) { feedcode += '<h3><a href=' + feed.link + '>' + feed.title + '</a></h3>'; }
			for(var i=0; i<max; i++){		    
				var entry = feed.entries[i]; 
				snippet = blurb == 'snippet' ? entry.contentSnippet.replace(/\/PRNewswire\/\s--\s/,'') : 
						  blurb == 'description' ? entry.content.replace(/^MCLEAN,\s+Va\.,\s+\w+\.?\s+\d\d?,\s+\d{4}\s+\/PRNewswire\/\s+--\s?/,'').replace(/\(OTC:\s*FMCC\)\s/,'').replace(/\.\W+\.{3}$/,'.') : '';		
				if(highlight>i){ feedcode += '<div id="pr_feature">'; }
				if(highlight==i && i>0){ feedcode += '</div>'; }				
				if(format == 'bullet'){ feedcode += '<li><p>'; }
				else { feedcode += '<p class="headline">';   }
				feedcode += '<a href="' + entry.link + '">' + entry.title + '</a>';				
				if (date) { 
					var dt = new Date(entry.publishedDate);	
					var dtStr = monthnames[dt.getMonth()] + ' ' + dt.getDate() + ', ' + dt.getFullYear();
					if(format == 'bullet') {   feedcode += '<br> <em>' + dtStr + '</em>'; }
					else { feedcode += '<br>' + dtStr; }	
					if (snippet !== ''	&& format == 'bullet') { feedcode += ' - '; }			
				}
				else if(format == 'bullet') {   feedcode += '<br>'; }
				if(format !== 'bullet'){ feedcode += '</p>'; }
				if(highlight > i && snippet !== ''){ feedcode += '<p class="headline_blurb">' + snippet + '</p>'; }
				if(format == 'bullet'){ feedcode += snippet + '</p></li>'; }
			}
		}
		if(highlight == 0 && format == 'bullet'){ feedcode = '<ul>' + feedcode + '</ul>'; }
		$('#'+container).append(feedcode);
	},
 	setTimer: function(routine,delay) {
		if(routine && delay > 0){
		  var currentTimer=0;
		  clearTimeout(currentTimer);
		  currentTimer = setTimeout(routine, delay);
		}
 	}	
};

FM.css.runOnce = function() {
	if (!(FM.form.hostname.match(/fhlmc\.com/) ||  FM.form.hostname.match(/www\.freddiemac\.com/))) { FM.css.searchBtnOn = "http://www.freddiemac.com/images/site/btn-search-on.png"; }
	$('body:first').append('<div id="tip"></div>');
	$("input.btnSearch").hover(function(){
		$(this).attr("oldsrc", $(this).attr("src"));
		$(this).attr("src",FM.css.searchBtnOn);
	}, function(){
		$(this).attr("src",$(this).attr("oldsrc"));
	})
	if ($('span.popup-copy').size() > 0) {
		if ($('html').attr('lang') === 'es') { FM.css.closeText = FM.css.closeTextEs; }
		$('span.popup-copy:first').after('<span class="' + FM.css.closeClass + '"><a href="javascript:window.close();">'+FM.css.closeText+'</a></span>').andSelf();
	};
}

FM.css.setUp = function(container){
	
	$(container + " table.zebra tbody tr:odd").addClass(FM.css.tableOddRow);
	$(container + " hr." + FM.css.hrClass).wrap('<div class="' + FM.css.hrDiv + '"></div>');
	$(container + " a.blockLink1, "+container + " a.blockLink2, "+container + " a.blockLink3").append("<span class='redge'></span>");
	// MSIE ONLY SCRIPTS
	if ($.browser.msie) {
		$(container + " hr." + FM.css.clearHrs).wrap("<div class='" + FM.css.clearHrs + "'></div>");
		$(container + " .fmform input[type=text]").addClass(FM.css.inputTxt);
	};
	
	$(container + ' a[title] img[src$="tooltip.gif"],' + container + ' dfn[title],' + container + ' acronym[title],' + container + ' abbr[title]').each(function(){
		var title = '';
		if ($(this).filter('dfn[title], acronym[title], abbr[title]').size() > 0) {
			title = $(this).attr('title'); $(this).attr('title', '');	
		}
		else if ($(this).filter('a[title] img[src$="tooltip.gif"]').size() > 0) {
			title = $(this).parent().attr('title'); $(this).parent().attr('title', '');	
		}		
		$(this).mouseover(function(event){ 
			$('#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(); });
	});		

	$(container + ' #content-main h2:not(".blog, .col-head"):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>');
	});
	
	$(container + ' a.'+ FM.css.offsiteClass).not('[href*=".pdf"]').each(function(){
		$(this).attr('target', '_blank').after('<span class="'+FM.css.offsiteLinkClass+'"> </span>');
	});
	$(container + ' a.'+ FM.css.videoClass).each(function(){
		$(this).after('<span class="'+FM.css.videoLinkClass+'"> </span>');
	});
	$(container + ' a.' + FM.css.workshopClass).each(function(){
		$(this).after('<span class="'+FM.css.workshopLinkClass+'"> </span>');
	});
	$(container + ' a.' + FM.css.webconfClass).each(function(){
		$(this).after('<span class="'+FM.css.webconfLinkClass+'"> </span>');
	});
	$(container + ' a.' + FM.css.securedClass).each(function(){
		$(this).after('<span class="'+FM.css.securedLinkClass+'"> </span>');
	});

	if ($(container + ' .'+FM.css.ulTabClass+' li > a[rel="TabMenu"]').size() > 0) {
		$(container + ' .'+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("' + container + '",' + i + ');').attr('id', 'activeNumber' + i); 
			$(container + ' #tab' + i).hide();		
		});
		var tab = QueryParam['tab'] || '';
		if ($(container + ' #activeNumber' + tab).size() < 1) {tab = 0;}		
		FM.css.toggleTabs(container,tab);
	};
	
	$(container + ' img[src*="style=box"][width]').each(function(n){
		var j = n;
		if (container !== '#grid') { j = 'container_'+ n; }
		var w = $(this).attr('width');
		if (w < 10) { next; }
		$(this).width(w); 
		if ($(this).parent().is('a')) {
			$(this).parent().wrap('<p class="image" id="image_'+j+'"></p>');
		} 
		else {
			$(this).wrap('<p class="image" id="image_'+j+'"></p>');
		}
		$("#image_"+j).width(w).wrap('<div class="'+FM.css.imgClass+'" id="image_box_'+j+'"></div>');
		$("#image_box_"+j).width(w);
		if ($(this).attr('title') && $(this).attr('title') !== '') {
			$("#image_"+j).before('<p class="header" id="image_title_'+j+'">'+$(this).attr('title')+'</p>\n\t');
			$(this).removeAttr('title');
		}	
		if ($(this).attr('alt') && $(this).attr('alt') !== '') {
			$("#image_"+j).after('<p class="caption" id="image_caption_'+j+'">'+$(this).attr('alt')+'</p>\n');
			$(this).attr('alt', $("#image_caption_"+j).text());
		}
		if ($(this).attr('class').match(/image-lead/)) {
			$(this).removeClass('image-lead').removeClass('image-lead-snug');
			$("#image_box_"+j).addClass('major');
		}
		else if ($(this).attr('class').match(/image-post/)) {
			$(this).removeClass('image-post').removeClass('image-post-snug');
			$("#image_box_"+j).addClass('minor');
		}						
		else {
			$("#image_box_"+j).wrap('<div class="full"></div>');
		}
		$(this).removeAttr('align');	
	});	
	$(container + ' img[src*="style=icon"][width]').each(function(n){
		$(this).addClass(FM.css.iconClass);
			$(this).removeAttr('align');
		if ($(this).parents('div.column').size()>0) { 
			if ($(this).parent().is('a')) {	$(this).parent().wrap('<div class="full"></div>');	} 
			else { $(this).wrap('<div class="full"></div>'); }	
		}
		else {
			if ($(this).parent().is('a')) {	$(this).parent().wrap('<div class="image-lead-snug"></div>');	} 
			else { $(this).wrap('<div class="image-lead-snug"></div>'); }	
		
		}
	});	
	
	$(container + " a[href*='type=popup']," + container + " area[href*='type=popup']").each(function(n){
		var link = $(this).attr('href');	
		var linkType = $(this).attr('rel') || '';
		var linkPairs = link.replace(/^\?/,'').split(/(\&amp;|\&)/);
		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))"); 
		}	
	});
	
	
	$(container + ' a[href$=".pdf"],' + container + ' a[href*=".pdf#page="], ' + container + ' a[href$=".PDF"]').not('.image').after(' <span class="'+ FM.css.fileMarkerClass +'">[PDF]</span>');
	$(container + ' a[href$=".zip"],' + container + ' a[href$=".ZIP"]').not('.image').after(' <span class="'+ FM.css.fileMarkerClass +'">[ZIP]</span>');
	$(container + ' a[href$=".mp3"],' + container + ' a[href$=".MP3"]').not('.image').after(' <span class="'+ FM.css.fileMarkerClass +'">[MP3]</span>');
	$(container + ' a[href$=".mov"],' + container + ' a[href$=".MOV"]').not('.image').after(' <span class="'+ FM.css.fileMarkerClass +'">[MOV]</span>');
	$(container + ' a[href$=".xls"],' + container + ' a[href$=".xlsx"],' + container + ' a[href$=".XLS"]').not('.image').after(' <span class="'+ FM.css.fileMarkerClass +'">[XLS]</span>');
	$(container + ' a[href$=".doc"],' + container + ' a[href$=".docx"],' + container + ' a[href$=".DOC"]').not('.image').after(' <span class="'+ FM.css.fileMarkerClass +'">[DOC]</span>');
	$(container + ' a[href$=".ppt"],' + container + ' a[href$=".pptx"],' + container + ' a[href$=".PPT"]').not('.image').after(' <span class="'+ FM.css.fileMarkerClass +'">[PPT]</span>');
	$(container + ' 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+/,'');
			};
			if (href.match(/^\//i)) {
			  $.get("/cgi-bin/crawl/filesize.cgi?url=" + encodeURIComponent(href), {a:1}, function(data){
				   if(data) { link.next('span.'+ FM.css.fileMarkerClass).html('['+type+' '+data+']'); };
			  });
			}
		}
	});
	 // important -- this needs to come after all content injection to correctly measure height.
	$(container + " .col_twin").each(function(n){ 
		$(this).children(".col2:first").attr('id', 'col_'+n+'_1');
		$(this).children(".col2:last").attr('id', 'col_'+n+'_2');
		$('#col_'+n+'_1, #col_'+n+'_2').equalizeCols();
	});
	
}

FM.Print={add:!0,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(){FM.Print.add&&($("html").attr("lang")==="es"&&(FM.Print.htmlCode=FM.Print.htmlCodeEs),$("#"+FM.css.printBoxID).append(FM.Print.htmlCode),$("#"+FM.css.printID).click(function(){window.print()}),$.browser.msie&&$("#"+FM.css.printID).hover(function(){$(this).addClass(FM.css.printHoverClass)},function(){$(this).removeClass(FM.css.printHoverClass)}))};

FM.omni = {
	solveBucket: function() { 	
		var bucket = $('#nav-top > li a#topnav-current').parent().index() ==2 ? '/AboutHO' : $('#nav-top > li a#topnav-current').parent().index() ==0 ? '/DoingBusiness' :
			($('#nav-top > li a#topnav-current').parent().index() ==1 || FM.form.hostname.match(/(findfreddiemac|mediaroom)/i)) ? '/AboutUs' : '/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.hostname.match(/findfreddiemac\.jobs/i)) {
		s.siteID = 'fmjobs';
		s.defaultPage = '';
	}
	else if (FM.form.pathElements[0] === "avoidforeclosure") {
		s.pageName = "fmcom/homeownership" + FM.form.pathname;
	}
	else if (FM.form.hostname.match(/freddiemac\.mediaroom/i) || FM.form.hostname.match(/mediaroom\.freddiemac/i))  {
		var pageTitle = $('h1:first').html();
			pageTitle = pageTitle.replace(/<(\S+).*>(.*)<\/\1>/gi,'').replace(/\W+/g,'_').replace(/_$/,'');			
		if (pageTitle == '' && $('div.wd_webinator_search').size() > 0) {   pageTitle = 'Search_Results';  }
		s.pageName = "fmcom/news/index.php" + FM.form.querystr + '_' + pageTitle;
	}
	else if (FM.form.pathElements[0] == "ontrack") {	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" }
	else if (FM.form.pathname.match(/purchasemarket/)) { s.prop9 = "pmrc" }
	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
$(function(){
	FM.form.setUp();  // add form processing
	FM.css.runOnce();
	if ( $('#grid').size() > 0 ) {	FM.css.setUp('#grid'); }
	else if  ( $('#content-display').size() > 0 ) {	FM.css.setUp('#content-display'); }	
	FM.Print.setUp(); 
	FM.omni.setUp();
});

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

(function($) {
/* 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
 * 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));};});
  };
/* jGFeed 1.0 - Google Feed API abstraction plugin for jQuery
 * Copyright (c) 2009 jQuery HowTo (http://jquery-howto.blogspot.com)
 * Licensed under the GPL license: http://www.gnu.org/licenses/gpl.html
 * Author URL: http://me.boo.uz */
  $.extend({jGFeed:function(url,fnk,num,key){
	if(url==null){return false;}var gurl="http://ajax.googleapis.com/ajax/services/feed/load?v=1.0&callback=?&q="+url;
	if(num!=null){gurl+="&num="+num;} if(key!=null){gurl+="&key="+key;}
	$.getJSON(gurl,function(data){if(typeof fnk=="function"){fnk.call(this,data.responseData.feed);}else{return false;}});
   }});
})(jQuery);
