(function() {
	//searchHTML = '<form name="ka_search" method="get" action="/service/searchEverything.kickAction?as=111703" enctype="application/x-www-form-urlencoded"><table cellpadding="0" cellspacing="0" border="0" width="232" height="56"><tr><td height="51" colspan="5" background="http://www.myfoodlovers.com/kickapps/images/search_bg.gif" width="232" height="51" align="center"><a href="#"><img src="http://www.myfoodlovers.com/kickapps/images/search.gif" align="right" width="32" height="20" border="0"></a><font color="#5d6c65" style="font-family: Verdana, Helvetica, sans-serif; font-size: 11px; line-height: 11px;"><strong>Search</strong>&nbsp;&nbsp;</font><input class="ka_searchField" type="text" tabindex="50" alt="searchfield" name="keywords" value="" maxlength="50" size="16"/></td></tr><tr><td height="5"><div id="ka_searchText"><a id="ka_search_advanced" href="#"	onclick="basicAdvancedSearch(this); return false;">advanced</a></div></td></tr></table><div id="ka_searchAdv1" style="display: none"><ul><li id="ka_searchAdv_vid"><span><input type="checkbox" id="includeVideo" name="includeVideo" checked="checked" /> video</span></li><li id="ka_searchAdv_aud"><span><input type="checkbox" id="includeAudio" name="includeAudio" checked="checked" /> audio</span></li><li id="ka_searchAdv_pho"><span><input type="checkbox" id="includePhoto" name="includePhoto" checked="checked" /> photo</span></li><li id="ka_searchAdv_blog"><span><input type="checkbox" id="includeBlog" name="includeBlog" checked="checked" /> blog</span></li><li id="ka_searchAdv_member"><span><input type="checkbox" id="includeUser" name="includeUser" checked="checked" /> member</span></li><li id="ka_searchAdv_group"></li><li id="ka_searchAdv_messages"><span><input type="checkbox" id="includeMessages" name="includeMessages" checked="checked" /> message</span></li></ul></div><input type="hidden" name="as" value="111703" escapeXml="false"/></form>';
 
	// move blog
	var blog = document.getElementById('ka_blogModule');

	// replace discussions
	var discussions = document.getElementById('ka_discussionModule');
	if (discussions) {
		discussions.innerHTML = searchHTML + blog.innerHTML;

		// replace tags
		//var tags = document.getElementById('ka_tagModule');
		//tags.innerHTML = '';

		var groups = document.getElementById('ka_groupModule');
		groups.innerHTML = '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="233" height="423" id="kickWidget_111703_301516" ><param name="movie" value="http://serve.a-widget.com/service/getWidgetSwf.kickAction"></param><param name="FlashVars" value="affiliateSiteId=111703&amp;widgetId=301516&amp;width=233&amp;height=423&amp;revision=4" ></param><param name="wmode" value="transparent" ></param><param name="allowFullScreen" value="true" ></param><param name="allowScriptAccess" value="always" ></param><embed src="http://serve.a-widget.com/service/getWidgetSwf.kickAction" name="kickWidget_111703_301516" width="233" height="423" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" wmode="transparent" allowScriptAccess="always" allowFullScreen="true" FlashVars="affiliateSiteId=111703&amp;widgetId=301516&amp;width=233&amp;height=423&amp;revision=4"></embed></object>';
	}

	// replace headerSearch
	//var headerSearch = document.getElementById('ka_headerSearch');
	//headerSearch.innerHTML = '';

	if (document.body.id == 'ka_homepage') {
		// replace members
		var leftColumn = document.getElementById('ka_leftColumn');
		leftColumn.innerHTML = '<form><div id="hero_image"><img src="http://www.myfoodlovers.com/kickapps/images/com_home1.jpg" width="745" height="302" border="0"></div><table cellpadding="0" cellspacing="0" border="0" width="745"><tr><td colspan="2" height="4"><img src="http://www.myfoodlovers.com/kickapps/images/spacer.gif" width="1" height="4" border="0"></td></tr><tr><td width="164" valign="top"><div class="visit_us"><img src="http://www.myfoodlovers.com/kickapps/images/mfl_help_left2.jpg" width="164" height="108" hspace="0" vspace="0" border="0" usemap="#map3"></div></div></td><td valign="top"><div class="letter_header"><img src="http://www.myfoodlovers.com/kickapps/images/letter_header.gif" width="581" height="29" hspace="0" vspace="0" border="0"></div><div class="letter_bg" style="background:url(http://www.myfoodlovers.com/kickapps/images/letter_bg.gif) no-repeat 50% 0; width:581px; height:193px;">' +
'<iframe src="http://www.myfoodlovers.com/index.php/kickapps-letter-of-the-week.html" width=581 height=193 frameborder=0></iframe>' +
'</div><div class="letter_header"><img src="http://www.myfoodlovers.com/kickapps/images/robert_header.gif" width="581" height="29" hspace="0" vspace="0" border="0"></div><div class="letter_bg" style="background:url(http://www.myfoodlovers.com/kickapps/images/robert_image.jpg) no-repeat 50% 0; width:581px; height:394px;"><div style="padding: 67px 0 0 167px">' +
'<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="409" height="272" id="kickWidget_111703_309516" ><param name="movie" value="http://serve.a-widget.com/service/getWidgetSwf.kickAction"></param><param name="FlashVars" value="affiliateSiteId=111703&amp;widgetId=309516&amp;width=409&amp;height=272&amp;revision=3" ></param><param name="wmode" value="transparent" ></param><param name="allowFullScreen" value="true" ></param><param name="allowScriptAccess" value="always" ></param><embed src="http://serve.a-widget.com/service/getWidgetSwf.kickAction" name="kickWidget_111703_309516" width="409" height="272" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" wmode="transparent" allowScriptAccess="always" allowFullScreen="true" FlashVars="affiliateSiteId=111703&amp;widgetId=309516&amp;width=409&amp;height=272&amp;revision=3"></embed></object>' +
'</div><a href="http://chat.myfoodlovers.com/service/searchEverything.kickAction?as=111703&u=7573741&mediaType=blog&sortType=recent&tab=yes&includeBlog=on" style="position:relative; top:27px"><img src="http://www.myfoodlovers.com/kickapps/images/spacer.gif" width="200" height="19" hspace="0" vspace="0" border="0" align="right"></a>' +
'<img src="http://link.p0.com/1x1c.dyn?p=64W5YALN" width=0 height=0></form>';
	} else if (document.body.className.indexOf('audio') >= 0) {
		var tds = document.getElementById('footerLinks').getElementsByTagName('td');
		tds[tds.length - 1].innerHTML += '<img src="http://link.p0.com/1x1c.dyn?p=64W5YAKQ" width=0 height=0>';
	}
})();
