(function() {
var ds_namespace = '__dsns_', ds_plugin_name = 'KATU_WidgetsV1';
window[ds_plugin_name] = function() {
		var Keywords = '50 Cent,Adam Ghassemi,Adam Putnam,Adam Sandler,Adam Smith,AFC,Akon,Al Franken,Alan Jackson,Alanis Morissette,Albany,Alec Baldwin,Alfred Hitchcock,Alicia Keys,Alison Krauss,Alsea,Amboy,Amity,Amy Klobuchar,Amy Winehouse,Anderson Cooper,Angelica Thornton,Angelina Jolie,Anita Kissee,Anna Nicole Smith,Anna Song,Antelope,Antonio Banderas,Aretha Franklin,Ariel,Arlen Specter,Arnold Schwarzenegger,Ashanti,Ashlee Simpson,Ashley Judd,Ashley Tisdale,Ashton Kutcher,Astoria,Audrey Hepburn,Aurora,Avril Lavigne,Banks,Barack Obama,Barbara Boxer,Barbara Lee,Barbara Mikulski,Barney Frank,Barry Manilow,Bart Gordon,Baseball,Basketball,Battle Ground,Beaver,Beavercreek,Beaverton,Ben Nelson,Ben Stiller,Bennie Thompson,Bernie Mac,Bette Midler,Beverly Perdue,Beyonce Knowles,Bill Cosby,Bill Maher,Bill Nelson,Bill Richardson,Bill Ritter,Billy Joel,Billy Ray Cyrus,Bingen,Birdman,Bjork,Bob Casey,Bob Corker,Bob Dylan,Bob Heye,Bob Marley,Bob Newhart,Bob Riley,Bob Skipper,Bobby Brown,Bobby Jindal,Bobby Rush,Boring,Bow Wow,Bowling,Boxing,Brad Henry,Brad Miller,Brad Paisley,Brad Pitt,Brian Baird,Brian Barker,Brian Wood,Britney Spears,Brooke Burke,Bruce Lee,Bruce Springsteen,Brush Prairie,Buddy Holly,Busta Rhymes,Byron Dorgan,Camas,Cameron Diaz,Canby,Cannon Beach,Carl Click,Carl Levin,Carla Gugino,Carlos Faura,Carlos Gutierrez,Carlton,Carmen Electra,Carol Burnett,Carrie Underwood,Carson,Cascade Locks,Cassie,Castle Rock,Cathlamet,Celine Dion,Centralia,Channing Tatum,Charles Manson,Charlie Brown,Charlie Chaplin,Charlie Crist,Charlie Rangel,Charlie Sheen,Charlie Wilson,Charlize Theron,Chehalis,Chet Culver,Chevy Chase,Chris Brown,Chris Dodd,Chris Gregoire,Chris Lee,Chris Rock,Chris Smith,Chris Van Hollen,Christian Bale,Christie Brinkley,Christina Aguilera,Chuck Berry,Chuck Grassley,Chuck Schumer,Chuck Wicks,Ciara,Clackamas,Claire McCaskill,Clatskanie,Clay Aiken,Clint Eastwood,Colton,Condoleezza Rice,Contests,Corbett,Cornelius,Corvallis,Cougar,Courtney Love,Crabtree,Craig Birnbach,Craig Ferguson,Cricket,Curtis,Cycling,Dakota Fanning,Damascus,Dan Tilkin,Dana Rohrabacher,Dane Cook,Daniel Inouye,Danny Kaye,Darius Rucker,Darrell Issa,Dave Anderson,Dave Hunt,Dave Matthews,David Archuleta,David Beckham,David Bowie,David Foster,David Letterman,David Price,David Robinson,David Vitter,David Wu,Dayton,Dean Martin,Debbie Stabenow,Debora Knapp,Demi Moore,Denise Richards,Dennis Kucinich,Dennis Quaid,Dennis Rodman,Denny Doyle,Denzel Washington,Depoe Bay,Deval Patrick,Diana Ross,Diane Lane,Dianne Feinstein,Dick Cheney,Dick Durbin,Dick Van Dyke,Diddy,DMX,Dolly Parton,Don Young,Donald,Dr. Dre,Drew Barrymore,Drew Carey,Duke Ellington,Duncan Hunter,Dundee,Eagle Creek,Earl Blumenauer,Ed Rendell,Eddie Murphy,Edolphus Towns,Elaine Chao,Elijah Cummings,Elizabeth Dole,Elizabeth Taylor,Ella Fitzgerald,Ellen DeGeneres,Ellen Tauscher,Elton John,Elvis Presley,Eminem,Emma Watson,Eric Cantor,Eric Clapton,Estacada,Etta James,Eva Longoria,Eva Mendes,Evan Bayh,Events,Fairview,Faith Hill,Falls City,Fergie,Football,Forest Grove,Foster,Frank Lautenberg,Frank Lucas,Frank Sinatra,Fred Thompson,Gales Creek,Garibaldi,Garth Brooks,Gaston,Gates,Gene Taylor,George Bush,George Clooney,George Harrison,George Jones,George Lopez,George Michael,George Miller,George Strait,Gerard Butler,Gervais,Gladstone,Goldendale,Golf,Gordon Smith,Government Camp,Grace Kelly,Greg Walden,Gresham,Gwen Stefani,Gwyneth Paltrow,Gymnastics,Haley Barbour,Halle Berry,Halsey,Hammond,Hank Williams,Happy Valley,Harold Ford,Harrisburg,Harrison Ford,Harry Reid,Hayden Panettiere,Heath Ledger,Heather Wilson,Heidi Klum,Helen Raptis,Henry Waxman,Hilary Duff,Hilda Solis,Hillary Clinton,Hillsboro,Hockey,Hood River,Hotlinks,Howard Stern,Hubbard,Hugh Jackman,Hulk Hogan,Ice Cube,Ike Skelton,Independence,Jack Benny,Jack Black,Jack Johnson,Jack Kevorkian,Jack Nicholson,Jack Reed,Jackson Browne,Jade Goody,James Blunt,James Brown,James Dean,James Franco,James Taylor,Jamie Foxx,Jane Harman,Janet Jackson,Janet Napolitano,Janis Joplin,Jay Leno,Jay Rockefeller,Jay-Z,Jeff Jaeger,Jeff Merkley,Jeff Miller,Jeff Sessions,Jefferson,Jennifer Aniston,Jennifer Garner,Jennifer Granholm,Jennifer Hudson,Jennifer Lopez,Jerry Lewis,Jerry Springer,Jesse Jackson,Jessica Alba,Jessica Biel,Jessica Simpson,Jim Bunning,Jim Carrey,Jim Doyle,Jim Gibbons,Jim Jones,Jim Morrison,Jim Webb,Jimi Hendrix,Jimmy Buffett,Jimmy Fallon,Jimmy Kimmel,Joan Jett,Joaquin Phoenix,Jodie Foster,Joe Biden,Joe English,Joe Manchin,Joe Sestak,Joe Wilson,John Baldacci,John Boehner,John Conyers,John Cornyn,John Denver,John Dingell,John Edwards,John Hall,John Kerry,John Legend,John Lennon,John Lynch,John Mayer,John McCain,John Tierney,John Travolta,John Warner,John Wayne,Johnny Carson,Johnny Cash,Johnny Depp,Johnny Isakson,JoJo,Jon Kyl,Jon Stewart,Jordin Sparks,Josh Groban,Josh Hartnett,Judy Garland,Julia Roberts,Justin Timberlake,Kalama,Kanye West,Karate,Kate Beckinsale,Kate Hudson,Kate Moss,Kate Winslet,Katharine McPhee,Katherine Heigl,Kathleen Sebelius,Kathy Ireland,Katie Couric,Katie Holmes,Katy Brown,Keira Knightley,Keith Ellison,Keith Urban,Keizer,Kellie Pickler,Kelly Clarkson,Kelly Ripa,Kelso,Ken Salazar,Kenny Chesney,Kenny Rogers,Kevin Costner,Kid Rock,Kim Kardashian,Kimora Lee Simmons,King County,Kirsten Gillibrand,Kit Bond,Kitsap County,Klickitat,Kristen Stewart,Kurt Cobain,Kurt Schrader,Kylie Minogue,La Center,Lafayette,Lake Oswego,Lamar Alexander,Lamar Smith,Larry Craig,Larry the Cable,Lauren Conrad,LeAnn Rimes,Lebanon,Leonard Cohen,Leonardo DiCaprio,Lil\' Kim,Lil Wayne,Lily Allen,Lincoln City,Lindsay Lohan,Lindsey Graham,Lionel Richie,Lisa Murkowski,LL Cool J,Longview,Louis Armstrong,Lucille Ball,Ludacris,Lyons,Madonna,Mandy Moore,Manning,Manzanita,Marc Anthony,Margaret Spellings,Margy Lynch,Maria Cantwell,Mariah Carey,Marie Osmond,Marilyn Monroe,Mariska Hargitay,Mark Begich,Mark Pryor,Mark Sanford,Mark Udall,Mark Warner,Marsha Blackburn,Martin Lawrence,Martin O\'Malley,Martina McBride,Marvin Gaye,Mary J. Blige,Mary Landrieu,Mary Tyler Moore,Matt Damon,Maupin,Max Baucus,Maxine Waters,McMinnville,Meg Ryan,Megan Fox,Meghan Kalkstein,Mel Gibson,Mel Martinez,Melanie Wingo,Melica Johnson,Merle Haggard,Meryl Streep,Michael Chertoff,Michael Douglas,Michael J. Fox,Michael Jackson,Michelle Williams,Mickey Rourke,Mike Beebe,Mike Crapo,Mike Doyle,Mike Huckabee,Mike Pence,Mike Thompson,Mila Kunis,Miley Cyrus,Mineral,Miranda Lambert,Mitch Daniels,Mitch McConnell,Mitt Romney,MLB,MLS,Molalla,Monmouth,Monroe,Morgan Freeman,Mosier,Mount Angel,Mount Hood Parkdale,Mulino,Nancy Pelosi,Naomi Campbell,NASCAR,Natali Marmion,Natalie Portman,Natasha Bedingfield,NBA,Nehalem,Neil Diamond,Neil Young,Nelly,Newberg,Newport,Ne-Yo,NFC,NFL,NHL,Nicole Kidman,Nicole Richie,Norm Coleman,Norm Dicks,North Bonneville,North Plains,Oceanside,Odell,Olympia Snowe,Onalaska,Oprah Winfrey,Oregon City,Orlando Bloom,Orrin Hatch,Otis,Ozzy Osbourne,Pacific City,Packwood,Pamela Anderson,Paris Hilton,Pat Roberts,Patrick Leahy,Patrick Swayze,Patty Duke,Patty Murray,Paul McCartney,Paul Newman,Paul Ryan,Paul Simon,Paula Abdul,Penelope Cruz,Pete Stark,Peter Courtney,Peter DeFazio,Peter Welch,PGA,Philomath,Pierce County,Portland,Queen Latifah,Question of the Day,R. Kelly,Rahm Emanuel,Rainier,Randy Jackson,Ray Charles,Reba McEntire,Rebecca Romijn,Reese Witherspoon,Rhododendron,Rhonda Shelby,Richard Burr,Richard Gere,Richard Shelby,Rick Larsen,Rick Perry,Ricky Martin,Ridgefield,Rob Zombie,Robert Byrd,Robin Thicke,Robin Williams,Rockaway Beach,Rod Blagojevich,Rod Hill,Rod Stewart,Rodeo,Ron Howard,Ron Paul,Ron Wyden,Ronald Reagan,Rosie Sizer,Roy Orbison,Roy Rogers,Royce Pollard,Rudy Giuliani,Rugby,Russ Feingold,Ryan Reynolds,Ryan Seacrest,Saint Helens,Salem,Salma Hayek,Sam Adams,Sam Johnson,Samuel L. Jackson,Sandra Bullock,Sandy,Sara Evans,Sarah Jessica Parker,Sarah Palin,Sarah Silverman,Saxby Chambliss,Scappoose,Scarlett Johansson,Scio,Sean Connery,Sean Penn,Seaside,Seattle Center,Selena,Seth Rogen,Shaggy,Shakira,Shania Twain,Shaquille O\'Neal,Sharon Stone,Shellie Bailey-Shah,Sheridan,Sherrod Brown,Sherwood,Sheryl Crow,Siletz,Silver Creek,Silverton,Silvestre Reyes,Simon Cowell,Skagit County,Skiing,Snohomish County,Snoop Dogg,Snowboarding,Soccer,Softball,Sonny Perdue,Sophia Loren,Stayton,Stephen Johnson,Steve Dunn,Steve Miller,Steve Young,Stevenson,Stevie Wonder,Susan Collins,Susan Harding,Susan Lucci,Sweet Home,Taylor Hicks,Taylor Swift,Ted Kennedy,Ted Kulongoski,Ted Stevens,Ted Strickland,Tennis,The Dalles,Thom Jensen,Thurston County,Tiger Woods,Tillamook,Tim Burton,Tim Johnson,Tim Mahoney,Tim McGraw,Tim Pawlenty,Timber,Tina Turner,Toby Keith,Toledo,Tom Coburn,Tom Cruise,Tom Hanks,Tom Harkin,Tom Jones,Tom Petty,Tommy Lee,T-Pain,Trace Adkins,Track & Field,Trent Lott,Trout Lake,Troutdale,Tualatin,Turner,Ty Pennington,Tyler Perry,Tyra Banks,Underwood,Usher,Valerie Hurst,Vancouver,Vernonia,Vin Diesel,Vince Gill,Volleyball,Waldport,Walter Jones,Walter Reed,Warren,Warrenton,Washougal,Welches,West Linn,Whatcom County,Wheeler,White Salmon,Whitney Houston,Will Ferrell,Will Smith,Willamina,Wilsonville,WNBA,Woodburn,Woodland,Woody Allen,Wrestling,WWE,Yachats,Yacolt,Yamhill,Zac Efron,'.split(','); var qsHTML = '<div class="dsnsqs">\n\t<div class="title">\n\t\t<div class="text">Advanced Search</div>\n\t\t<div class="close">&times;</div><i></i>\n\t</div>\n\t<form action="http://search.komonews.com">\n\t\t<input type="hidden" name="ct" value="r" />\n\t\t<label for="qscat_{id}">Category</label><select id="qscat_{id}" rel="20198">\n\t\t\t<option value="">( any category )</option>\n\t\t\t<option value="89000002">National &amp; World</option>\n\t\t\t<option value="20249361">Entertainment</option>\n\t\t\t<option value="89000030">Business</option>\n\t\t\t<option value="112000015">Tech</option>\n\t\t\t<option value="112000001">Health</option>\n\t\t\t<option value="89000014">Local &amp; Regional</option>\n\t\t\t<option value="112000016">Weird</option>\n\t\t\t<option value="20249405">Sports</option>\n\t\t\t<option value="90000033">Consumer</option>\n\t\t\t<option value="90000001">YouNews</option>\n\t\t\t<option value="112000002">Mind & Money</option>\n\t\t\t<option value="20249394">Outdoors</option>\n\t\t\t<option value="91005679">Special Reports</option>\n\t\t\t<option value="91005678">Education</option>\n\t\t\t<option value="20249412">Traffic</option>\n\t\t\t<option value="20249416">Weather</option>\n\t\t</select><i></i>\n\t\t<label for="qsfeat_{id}">When</label><select id="qsdate_{id}" rel="r.STRDAT">\n\t\t\t<option value="">( anytime )</option>\n\t\t\t<option value="0">Today</option>\n\t\t\t<option value="7">Past 7 Days</option>\n\t\t\t<option value="30">Past 30 Days</option>\n\t\t\t<option value="365">Past 12 Months</option>\n\t\t</select><i></i>\n\t\t<label for="qscity_{id}">City</label><select id="qscity_{id}" rel="361">\n\t\t\t<option value="">( any city )</option>\n\t\t\t<option value="81210" rel="">Detroit</option>\n\t\t\t<option value="102513" rel="">Portland</option>\n\t\t\t<option value="80603" rel="">Dallas</option>\n\t\t\t<option value="113204" rel="">Vancouver</option>\n\t\t\t<option value="71809" rel="">Albany</option>\n\t\t\t<option value="105944" rel="">Salem</option>\n\t\t\t<option value="97012" rel="">Mount Hood</option>\n\t\t</select><i></i>\n\t\t<label for="qscnty_{id}">County</label><select id="qscnty_{id}" rel="6">\n\t\t\t<option value="">( any county )</option>\n\t\t\t<option value="183">Marion</option>\n\t\t\t<option value="2118">Multnomah</option>\n\t\t\t<option value="203">Polk</option>\n\t\t\t<option value="119">Clark</option>\n\t\t\t<option value="2108">Clackamas</option>\n\t\t\t<option value="1575">Linn</option>\n\t\t\t<option value="231">Washington</option>\n\t\t\t<option value="635">Cowlitz</option>\n\t\t</select><i></i>\n\t\t<label for="qstext">Keywords</label><input class="qstext" name="q" /><i></i>\n\t\t<input type="submit" class="normalbutton" value="Search" /><i></i>\n\t</form>\n</div>'; var lfHTML = '<div id="dsnspickcommunity">\n\t<div class="title">Select your community</div>\n\t<ul></ul>\n</div>\n\n<div id="dsnslocalnews">\n\t<div class="title"><a href="http://community_link/">community_name News</a></div>\n\t<a class="pickcommunity" href="#pickcommunity">Change your community</a>\n\t<ul>\n\t\t<li class="first"><a href="http://first_link/"><div class="localimg"><img src="http://the_image/" alt="first_title"/></div>first_title</a></li>\n\t\t<li class="second"><a href="http://second_link/">second_title</a></li>\n\t\t<li class="third"><a href="http://third_link/">third_title</a></li>\n\t\t<li class="fourth"><a href="http://fourth_link/">fourth_title</a></li>\n\t\t<li class="fifth"><a href="http://fifth_link/">fifth_title</a></li>\n\t</ul>\n</div>\n<div class="bottom_links" id="dsnslocallinks"><ul>\n\t<li><a href="http://community_link/" class="morenews">More community_name News</a><br /></li>\n\t<li><a href="http://community_link/forum/69" class="morenews rantsandraves">community_name Rants &amp; Raves</a></li>\n</ul></div>\n<div id="dsnsOverlay">&nbsp;</div>\n<div id="dsnsLfPopup">\n\t<div class="topHead">\n\t\t<h1>Choose your neighborhood</h1>\n\t\t<div class="subHead">Tell us where you live and get your community headlines along with your local, breaking news.</div>\n\t\t<div class="closeButton"><a href="#close">close window</a></div>\n\t</div>\n\t<div class="mainHoodContent">\n\t\t<div class="introText">Choose the neighborhood closest to you. If you don\'t see your neighborhood, <a href="http://www.katu.com/about/contact">let us know</a>! We\'ll be adding more neighborhoods soon!</div>\n\t\t<div class="box">\n\t\t\t<h3>City of Portland</h3>\n\t\t\t<div class="column">\n\t\t\t\t<ul>\n\t\t\t\t\t<li><a href="#citycenter" title="City Center News">City Center</a></li>\n\t\t\t\t\t<li><a href="#eastportland" title="East Portland News">East Portland</a></li>\n\t\t\t\t\t<li><a href="#northeastportland" title="Northeast Portland News">Northeast Portland</a></li>\n\t\t\t\t\t<li><a href="#northwestportland" title="Northwest Portland News">Northwest Portland</a></li>\n\t\t\t\t\t<li><a href="#northportland" title="North Portland News">North Portland</a></li>\n\t\t\t\t\t<li><a href="#southeastportland" title="Southeast Portland News">Southeast Portland</a></li>\n\t\t\t\t\t<li><a href="#southwestportland" title="Southwest Portland News">Southwest Portland</a></li>\n\t\t\t\t</ul>\n\t\t\t</div>\n\t\t</div>\n\t\t<div class="box">\n\t\t\t<h3>Eastside</h3>\n\t\t\t<div class="column">\n\t\t\t\t<ul>\n\t\t\t\t\t<li><a href="#clackamas" title="Clackamas News">Clackamas</a></li>\n\t\t\t\t\t<li><a href="#gresham" title="Gresham News">Gresham</a></li>\n\t\t\t\t\t<li><a href="#milwaukie" title="Milwaukie News">Milwaukie</a></li>\n\t\t\t\t\t<li><a href="#oregoncity" title="Oregon City News">Oregon City</a></li>\n\t\t\t\t</ul>\n\t\t\t</div>\n\t\t</div>\n\t\t<div class="box">\n\t\t\t<h3>Westside</h3>\n\t\t\t<div class="column">\n\t\t\t\t<ul>\n\t\t\t\t\t<li><a href="#beaverton" title="Beaverton News">Beaverton</a></li>\n\t\t\t\t\t<li><a href="#hillsboro" title="Hillsboro News">Hillsboro</a></li>\n\t\t\t\t\t<li><a href="#lakeoswego" title="Lake Oswego News">Lake Oswego</a></li>\n\t\t\t\t\t<li><a href="#sherwood" title="Sherwood News">Sherwood</a></li>\n\t\t\t\t\t<li><a href="#sunset" title="Sunset News">Sunset</a></li>\n\t\t\t\t\t<li><a href="#tigard" title="Tigard News">Tigard</a></li>\n\t\t\t\t\t<li><a href="#tualatin" title="Tualatin News">Tualatin</a></li>\n\t\t\t\t\t<li><a href="#westlinn" title="West Linn News">West Linn</a></li>\n\t\t\t\t\t<li><a href="#wilsonville" title="Wilsonville News">Wilsonville</a></li>\n\t\t\t\t</ul>\n\t\t\t</div>\n\t\t</div>\n\t\t<div class="box">\n\t\t\t<h3>SW Washington</h3>\n\t\t\t<div class="column">\n\t\t\t\t<ul>\n\t\t\t\t\t<li><a href="#battleground" title="Battle Ground News">Battle Ground</a></li>\n\t\t\t\t\t<li><a href="#camas" title="Camas News">Camas</a></li>\n\t\t\t\t\t<li><a href="#felida" title="Felida News">Felida</a></li>\n\t\t\t\t\t<li><a href="#hazeldell" title="Hazel Dell News">Hazel Dell</a></li>\n\t\t\t\t\t<li><a href="#orchards" title="Orchards News">Orchards</a></li>\n\t\t\t\t\t<li><a href="#salmoncreek" title="Salmon Creek News">Salmon Creek</a></li>\n\t\t\t\t\t<li><a href="#vancouver" title="Vancouver News">Vancouver</a></li>\n\t\t\t\t\t<li><a href="#washougal" title="qwe News">Washougal</a></li>\n\t\t\t\t</ul>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n\t<div class="popupBottom">\n\t\t<div class="logo">KATU.com</div>\n\t</div>\n</div>';
		var plugin_name = ds_plugin_name;
		var Load = function() {
				if(typeof window[ds_namespace] == "object" && typeof window[ds_namespace].OnInit != "undefined") {
						if(window[ds_namespace].Initialized) {
								window[ds_plugin_name].Init(window[ds_namespace]);
								if(window[ds_namespace].IsReady)
										window[ds_plugin_name].Ready(window[ds_namespace]);
								else
										window[ds_namespace].OnReady.push(window[ds_plugin_name].Ready);
						}
						else {
								window[ds_namespace].OnInit.push(window[ds_plugin_name].Init);
						}
						return;
				} else {
						window[ds_namespace] = {};
				}
				if(typeof jQuery == "function")
						window[ds_plugin_name].other = jQuery;
				if(typeof jQuery == "function" && (jQuery.fn.jquery == '1.3.1' || jQuery.fn.jquery == '1.3.2')) {
						window[ds_plugin_name].$ = jQuery;
						window[ds_plugin_name].Init();
				}
				else
				{
						var el = document.createElement('SCRIPT');
						el.setAttribute('language', 'JavaScript');
						el.setAttribute('src', 'http://cdn.secondspace.com/fshr/1.2.0b/jQuery.js');
						document.getElementsByTagName('head')[0].appendChild(el);
						WaitForInit(1000);
				}
		}
				
		var WaitForInit = function(max) {
				if(typeof window[ds_namespace].$ != "function") {
						if (max > 0)
								setTimeout(function() { window[ds_plugin_name].WaitForInit(max - 1); }, 10);
						return;
				}
				window[ds_plugin_name].Init();
		}
		var WaitForReady = function(max) {
				if(!max) max = 100;
				if(typeof window[ds_plugin_name].FullyInitialized != 'bool') {
						if (max > 0)
								setTimeout(function() { window[ds_plugin_name].WaitForReady(max - 1); }, 10);
						return;
				}
				window[ds_plugin_name].Ready();
		}
		var WaitForBody = function(max) {
				if(!max) max = 100;
				try {
						document.body.className += ' dsnsjs';
				} catch (e) {
						if (max > 0)
								setTimeout(function() { window[ds_plugin_name].WaitForBody(max - 1); }, 10);
				}
		}
		
		var SetCookie = function(name, value, expires, domain, path) {
				if(!expires) expires = 'Wed, 1 Jan 2020 00:00:00 UTC';
				if(!path) path = '/';
				if(!domain && location.host.indexOf('.') != -1) { // default to topmost domain
						var a = location.host.split('.');
						domain = '.' + a[a.length-2] + '.'+ a[a.length-1];
				}
				document.cookie = name+'='+value+'; expires='+expires+'; domain='+domain+'; path='+path;
		}
		
		var GetCookie = function(name) { 
				var nameEQ = name + '=';
				var ca = document.cookie.split(';');
				for(var i=0;i < ca.length;i++) {
						var c = ca[i];
						while (c.charAt(0)==' ') c = c.substring(1,c.length);
						if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
				}
				return null;
		}
		
		var Init = function(host) {
				if(window[ds_plugin_name].Initialized) return;
				window[ds_plugin_name].Initialized = true;
				if(typeof $ == 'undefined')
				{
						if(host) // we're a plugin
								$ = window[ds_plugin_name].$ = host.$;
						else 
								$ = window[ds_namespace].$;
				}
				if(typeof $ == 'undefined')
						return;
				
				$.ajaxSetup({ cache: true });
				var IE = $.browser.msie;
				var IE6 = IE && /MSIE 6/.test(navigator.userAgent);
				var IE8 = IE && /MSIE 8/.test(navigator.userAgent);
				
				function Bind(sel, ev, func) {$(sel).live(ev, func);}
				function FullQuery(q) {var r = {};if(!q) q = CurrentSearch();if(!q) return new Array(); q = q.replace(/^\?/,'').replace(/\&$/,'');$.each(q.split('&'), function(){r[this.split('=')[0]] = this.split('=')[1];});return r;};
				function CurrentSearch() {var s = GetMetaData($('.searchquery'), location.search);if(!s || s == undefined)return false;return s;}
				function GetMetaData(el, fallback) {el = $(el);if(typeof fallback == 'undefined')fallback = false;if(el.length == 0)return fallback;var h = $.trim(el.html());if(h.slice(0, 4) == '<!--')h = h.slice(4);if(h.slice(-3) == '-->')h = h.slice(0, -3);return $.trim(h);}
				
				var Autocomplete = function(input) {
var cache = new Array();
var pending,popup,seeAllLink,list;
var options = {extraleft:0, extrawidth:0, maxheight:175, extratop:0, host:'BODY', match:'startword'}; // match:all, start, startword

function Render(data, q, c) {
	if(typeof data == 'undefined' || typeof data.suggest == 'undefined')
		return;

	list.empty();
	seeAllLink.css({ display: 'none' }).unbind();
	var html1 = new Array();
	var html2 = new Array();
	var html3 = new Array();
	var all = new RegExp(query, 'i');
	var start = new RegExp('^'+query, 'i');
	var startword = new RegExp(' '+query, 'i');
	var count = 0;
	var truncated = false;
	for(var i=0;i<data.suggest.length;i++) {
		var matched = false;
		var s = data.suggest[i].replace( all, function(q) { matched = true; return '<span class="match">' + q + '</span>' });
		if (matched) {
			// test if the cached data is valid
			var l = data.suggest[i].toLowerCase();
			if (typeof q != 'undefined' && typeof c != 'undefined' && l.indexOf(c) != l.indexOf(q))
				return false;
			if(start.test(l))
					html1.push('<li>' + s + '</li>');
			else if(startword.test(l) && options.match == 'startword')
					html2.push('<li>' + s + '</li>');
			else if(options.match == 'all')
					html3.push('<li>' + s + '</li>');
			else
				continue;
			count++;
			if (count > 100 && !seeAll) {
				truncated = true;
				break;
			}
		}			
	}
	if (html1.length + html2.length + html3.length == 0) {
		popup.css({ display: 'none' });
		return true;
	}
	list.append(html1.join('') + html2.join('') + html3.join(''));
	if (truncated) seeAllLink.css({ display: 'inline' }).click(function() { Complete(true); host.focus(); return false; });
	var o = host.offset();
	var d = {height:host.height(), width:host.outerWidth()};
	var top = o.top + d.height + options.extratop + 5;
	var left = o.left + options.extraleft;
	var width = d.width + options.extrawidth - 1;
	popup.css({height:'auto', overflowY:'auto', display:'block', top:top, left:left, width:width});
	if(list.height() > options.maxheight)
		popup.css({height:options.maxheight, overflowY:'scroll'});
	list.find('LI').hover(MouseOver, MouseOut).click(Click);
	popup.scrollTop(0);
	host.focus();
	$(document).click(BodyClick);
	return true;
}
function BodyClick(event) {							
	$(document).unbind('click', BodyClick);
	var target = $(event.target);
	if(target.parents('#AutoComplete_'+id).length == 0)
	{
		popup.css({display:'none'});
		return;
	}

	list = $('#AutoComplete_'+id);				
	if (list == null)
		return;

	var selected = list.find('.mouseover');
	if (selected.length == 0) return;
	host.val(selected.text()).focus();		 
}

function ScrollToView() {
	var selected = list.find('.selected');
	var pos = selected.position().top;
	var max = popup.height() - selected.outerHeight();
	if(pos > max)
		popup.scrollTop(popup.scrollTop() + pos - max);
	if(pos < 0)
		popup.scrollTop(popup.scrollTop() + pos);
}
function HandleKey(event) {
	var selected = list.find('.selected');
	var keycode = event.which;
	if(keycode == 9) {
		// if there's only one choice, select it
		if(selected.length > 0 && list.find('LI').length == 1) {
			popup.css({display:'none'});
			host.val(selected.text()+' ').focus();
			return false;
		}
		if(event.shiftKey)
			keycode = 38; // shift+tab = up
		else
			keycode = 40; // tab = down
	}
	switch(keycode) {
		case 13:	// return when item selected, get text
			if(selected.length == 0)
			{				
				return true;
			}
			popup.css({display:'none'});
			host.val(selected.text()).focus();
			return true;
		case 40: // down selects the one below
			if(selected.length == 0) {
				list.find('LI:first').addClass('selected');
				ScrollToView();
				return false;
			}
			var next = selected.removeClass('selected').next();
			if(next.length == 0)
				list.find('LI:first').addClass('selected');
			else
				next.addClass('selected');
			ScrollToView();
			return false;
		case 38: // up selects the one on top
			if(selected.length == 0) {
				list.find('LI:last').addClass('selected');
				ScrollToView();
				return false;
			}
			var prev = selected.removeClass('selected').prev();
			if(prev.length == 0)
				list.find('LI:last').addClass('selected');
			else
				prev.addClass('selected');
			ScrollToView();
			return false;
		case 16: // shift by itself
			return true;
		case 33: //page up
			popup.scrollTop(popup.scrollTop() - popup.height());
			return false;
		case 34: // page down
			popup.scrollTop(popup.scrollTop() + popup.height());
			return false;
		case 27: // esc: disable autocomplete
			popup.css({display:'none'});
			host.attr('autocomplete', 'on');
			host.attr('AutoCompleted', 'false');
			host.unbind('keydown', HandleKey);
			return false;
		default:
			setTimeout(function() {Complete();}, 10);
			return true;
	}
}

function Complete(forceSeeAll) {
	if(!host || !popup || !list) return;
	seeAll = false;
	if (forceSeeAll) seeAll = true;
	var v = host.val();
	if(v.length < 3) {
		popup.css({display:'none'});
		return;
	}
	
	query = v.toLowerCase();
	var p = host.val().substring(0,i);
	prefix = ''
	if(p.length > 0)
		prefix = '<span class="before">'+p+' </span>';

	// check if we have a cache for the the full length down to the first 3 letters
	// if we do, call render and see if it's a valid one
	var cacheKey = query +'';
	var data = false;
	for(var i=query.length;i>2;i--) {
		cacheKey = query.substring(0, i);
		data = cache[cacheKey];
		if (typeof data != 'undefined')
			if(Render(data, query, cacheKey))
				return;
	}
	cacheKey = query + ''; // revert to the full key
	var data = {suggest:new Array()};
	var r = new RegExp(query, 'i');
	data.suggest = $.grep(Keywords, function(n,i) {return r.test(n);} );
	cache[cacheKey] = data;
	Render(data);
	// call the web service
	/*
	var url = "/ws.aspx?key=SUGGEST&q=" + query;
	if (pending) return;
	pending = true;
	setTimeout(function() {pending = false;}, 2000);
	$.getJSON(url,
		function(data){
			cache[cacheKey] = data;
			pending = false;
			Render(data);
		}
	);
	*/
}
function MouseOver() {
	$(this).addClass('mouseover');
}
function MouseOut(event) {
	$(this).removeClass('mouseover');
}
function Click(event) {
	if(!host) return;
	popup.css({display:'none'});
	host.val($(this).text()+' ').focus();
}
function Resized(event) {
	if($(window).width() != savedWidth)
		setTimeout(function() {Complete();}, 10);
	savedWidth = $(window).width();
}
var savedWidth = $(window).width();
$(window).bind('resize', Resized);
			
var host = $(input);
// look for options
var temp = host.parent().html();
var start = temp.indexOf('<!-- autocompleted.options');
if(start > -1) {
	temp = temp.substring(start + 26, temp.indexOf('-->', start))+' ';
	var extraleft = temp.indexOf('extraleft:');
	if(extraleft > -1)
		try {options.extraleft = parseInt(temp.substring(extraleft + 10, temp.indexOf(' ', extraleft + 10)));} catch(err) {}
	var extrawidth = temp.indexOf('extrawidth:');
	if(extrawidth > -1)
		try {options.extrawidth = parseInt(temp.substring(extrawidth + 11, temp.indexOf(' ', extrawidth + 11)));} catch(err) {}
	var extratop = temp.indexOf('extratop:');
	if(extratop > -1)
		try {options.extratop = parseInt(temp.substring(extratop + 9, temp.indexOf(' ', extratop + 9)));} catch(err) {}
	var maxheight = temp.indexOf('maxheight:');
	if(maxheight > -1)
		try {options.maxheight = parseInt(temp.substring(maxheight + 10, temp.indexOf(' ', maxheight + 10)));} catch(err) {}
	var achost = temp.indexOf('host:');
	if(achost > -1)
		try {options.host = temp.substring(achost + 5, temp.indexOf(' ', achost + 5));} catch(err) {}
	var match = temp.indexOf('match:');
	if(match > -1)
		try {options.match = temp.substring(match + 6, temp.indexOf(' ', match + 6));} catch(err) {}
}
var id = (''+Math.random()).substr(2);
var popupid = '__dsns_autocomplete_'+id;
if(host.data('dsnsAutoCompleted') == 'false')
	return;

if(host.data('dsnsAutoCompleted') == 'true') {
	popup = $('#'+popupid);
	seeAllLink = popup.find('A[href$=#all]');
	list = popup.find('UL');
	return;
}

host.attr('autocomplete', 'off');
host.data('dsnsAutoCompleted', 'true');
host.keydown(HandleKey);
var tmp = $(options.host);
if(tmp.length == 0)
	tmp = $('#loaderhost');
if(tmp.length == 0)
	tmp = $('BODY');
if($('#'+popupid).length == 0)
	tmp.append('<div id="'+popupid+'" class="dsnsAutoComplete"><ul></ul><a href="#all" class="dsnsAutoCompleteSeeAll">See all...</a></div>');

popup = $('#'+popupid);
seeAllLink = popup.find('A[href$=#all]');
list = popup.find('UL');
};     var localFeeds = new Array({"t":"Battle Ground", "u":"http://battleground.katu.com", "k":"battleground", "lp":"/node/", "ip":"/sites/katu.com/files/imagecache/story_image_widget/",  "i": [ {"t":"Vandals chuck huge pumpkin through car&#039;s back window", "n":"49129", "i":"bg_pumpkins.jpg"},{"t":"Rail-Trail has recreational and economic potential", "n":"48153"},{"t":"Did you know that the I-5 Bridge was originally a toll bridge?", "n":"47295"},{"t":"Battle Ground Holds Community Health Fair", "n":"46266"},{"t":"Dalesandro has vision for Youth Commission", "n":"45304"} ]},{"t":"Beaverton", "u":"http://beaverton.katu.com", "k":"beaverton", "lp":"/node/", "ip":"/sites/katu.com/files/imagecache/story_image_widget/",  "i": [ {"t":"Get out to the October Moon Festival on Oct. 24", "n":"48436", "i":"moon.jpg"},{"t":"Single car rollover crash in Beaverton", "n":"47282"},{"t":"Suspect in bank bomb threat captured", "n":"46598"},{"t":"Neighbors tell odd tales about man being held in weird crime spree ", "n":"46184"},{"t":"Police: Attempted carjacking of mom dropping off kid at day care", "n":"43215"} ]},{"t":"Camas", "u":"http://camas.katu.com", "k":"camas", "lp":"/node/", "ip":"/sites/katu.com/files/imagecache/story_image_widget/",  "i": [ {"t":"You can honor veterans on Nov. 7 and Nov. 11", "n":"48207", "i":"veterans_0.jpg"},{"t":"If your kids love math and science, head to WSU-Vancouver on Oct. 30", "n":"48205"},{"t":"Future of the airport at Grove Field up for debate", "n":"47531"},{"t":"Providence Hospital Stage Band to perform Saturday", "n":"46798"},{"t":"Camas High School College &amp;  Career Planning Event set for Oct. 26", "n":"46752"} ]},{"t":"City Center", "u":"http://portlandcitycenter.katu.com", "k":"citycenter", "lp":"/node/", "ip":"/sites/katu.com/files/imagecache/story_image_widget/",  "i": [ {"t":"Get out to Morton&#039;s The Steakhouse tonight for a book signing", "n":"48367", "i":"steak.jpg"},{"t":"You&#039;ll be seeing the purple and gold of the UW Huskies on a Portland bridge this week", "n":"48301"},{"t":"Made in Oregon goes dark -- Come on Portland! Solar power is here!", "n":"47826"},{"t":"Man sent to federal prison after handgun incident at a MAX Train platform", "n":"47532"},{"t":"Worldwide paddlesport enthusiasts to unite for climate cause", "n":"46404"} ]},{"t":"Clackamas", "u":"http://clackamas.katu.com", "k":"clackamas", "lp":"/node/", "ip":"/sites/katu.com/files/imagecache/story_image_widget/",  "i": [ {"t":"Local dentist will pay you for your Halloween candy ", "n":"48366", "i":"halloween_2_3.jpg"},{"t":"What&#039;s Going Around?", "n":"48486"},{"t":"Clackamas High School students earn recognition for being eco-friendly", "n":"48298"},{"t":"Clackamas County Marine Deputies recognized as heroes", "n":"47293"},{"t":"Machine shop goes up in flames", "n":"46264"} ]},{"t":"East Portland", "u":"http://eastportland.katu.com", "k":"eastportland", "lp":"/node/", "ip":"/sites/katu.com/files/imagecache/story_image_widget/",  "i": [ {"t":"Meet Portland&#039;s newest partner to an arson investigator", "n":"48437", "i":"Lila_ID.jpg"},{"t":"Get out to Morton&#039;s The Steakhouse tonight for a book signing", "n":"48367"},{"t":"Man sent to federal prison after handgun incident at a MAX Train platform", "n":"47532"},{"t":"International Day of Climate Action set for Oct. 24", "n":"47244"},{"t":"Cold cases go up on billboards", "n":"46552"} ]},{"t":"Felida", "u":"http://felida.katu.com", "k":"felida", "lp":"/node/", "ip":"/sites/katu.com/files/imagecache/story_image_widget/",  "i": [ {"t":"You can honor veterans on Nov. 7 and Nov. 11", "n":"48207", "i":"veterans_0.jpg"},{"t":"If your kids love math and science, head to WSU-Vancouver on Oct. 30", "n":"48205"},{"t":"Get out to Fort Vancouver National Historic Site on Oct. 24 ", "n":"47464"},{"t":"Keep your Halloween fire free", "n":"46265"},{"t":"Olbrich 5th at Small College Nationals", "n":"43811"} ]},{"t":"Gresham", "u":"http://gresham.katu.com", "k":"gresham", "lp":"/node/", "ip":"/sites/katu.com/files/imagecache/story_image_widget/",  "i": [ {"t":"Unsolved, but not forgotten", "n":"48156", "i":"101909_cold_case_billboard_one_0.JPG"},{"t":"City Council declines to change chicken code", "n":"47824"},{"t":"Man sent to federal prison after handgun incident at a MAX Train platform", "n":"47532"},{"t":"You can cluck about urban chickens at 3 p.m. today at city hall", "n":"47242"},{"t":"Arrest made in 7-11 shooting case", "n":"46665"} ]},{"t":"Hazel Dell", "u":"http://hazeldell.katu.com", "k":"hazeldell", "lp":"/node/", "ip":"/sites/katu.com/files/imagecache/story_image_widget/",  "i": [ {"t":"You can honor veterans on Nov. 7 and Nov. 11", "n":"48207", "i":"veterans_0.jpg"},{"t":"If your kids love math and science, head to WSU-Vancouver on Oct. 30", "n":"48205"},{"t":"Get out to Fort Vancouver National Historic Site on Oct. 24 ", "n":"47464"},{"t":"Baseball games will be coming to a park near you", "n":"46405"},{"t":"Heavy rain on tap - time to clear those storm drains", "n":"43584"} ]},{"t":"Hillsboro", "u":"http://hillsboro.katu.com", "k":"hillsboro", "lp":"/node/", "ip":"/sites/katu.com/files/imagecache/story_image_widget/",  "i": [ {"t":"Get out to the October Moon Festival on Oct. 24", "n":"48436", "i":"moon.jpg"},{"t":"Smoking banned in public parks", "n":"47939"},{"t":"New-look River Road bridge opens today", "n":"47365"},{"t":"Get out to tonight&#039;s city council because they&#039;ll be talking about the smoking ban", "n":"47243"},{"t":"You can face your fear of getting chased by zombies now", "n":"46596"} ]},{"t":"Lake Oswego", "u":"http://lakeoswego.katu.com", "k":"lakeoswego", "lp":"/node/", "ip":"/sites/katu.com/files/imagecache/story_image_widget/",  "i": [ {"t":"Pio Patrol ready to help out kids on Halloween", "n":"49198", "i":"halloween_7.jpg"},{"t":"Oswego Place Assisted Living to host Harvest Party", "n":"47463"},{"t":"Your Kid Can Win a Ride to School on a Lake Oswego Fire Truck...and Lunch with The Chief!", "n":"47434"},{"t":"Lake Oswego travel company offers new program for singles", "n":"47284"},{"t":"Ski &amp; Board Swap &amp; Sale...Saturday", "n":"46434"} ]},{"t":"Milwaukie", "u":"http://milwaukie.katu.com", "k":"milwaukie", "lp":"/node/", "ip":"/sites/katu.com/files/imagecache/story_image_widget/",  "i": [ {"t":"Milwaukie High School&#039;s new performing arts center is ready to go", "n":"47542", "i":"high_school_play.jpg"},{"t":"Keep your Halloween fire free", "n":"46265"},{"t":"Milwaukie woman caught in theft by deception trap", "n":"43504"},{"t":"Traffic Alert: Oversize load will delay traffic", "n":"43502"},{"t":"Mandatory closures at many state offices Friday", "n":"41957"} ]},{"t":"Northeast Portland", "u":"http://northeastportland.katu.com", "k":"northeastportland", "lp":"/node/", "ip":"/sites/katu.com/files/imagecache/story_image_widget/",  "i": [ {"t":"Woodlawn Neighborhood Association invites you to join", "n":"31983", "i":"sticker.jpg"},{"t":"Made in Oregon goes dark -- Come on Portland! Solar power is here!", "n":"47826"},{"t":"Get Involved in your neighborhood schools", "n":"47825"},{"t":"Man sent to federal prison after handgun incident at a MAX Train platform", "n":"47532"},{"t":"International Day of Climate Action set for Oct. 24", "n":"47244"} ]},{"t":"North Portland", "u":"http://northportland.katu.com", "k":"northportland", "lp":"/node/", "ip":"/sites/katu.com/files/imagecache/story_image_widget/",  "i": [ {"t":"Meet Portland&#039;s newest partner to an arson investigator", "n":"48437", "i":"Lila_ID.jpg"},{"t":"International Day of Climate Action set for Oct. 24", "n":"47244"},{"t":"Want a say in Portland&#039;s future?", "n":"46327"},{"t":"Keep your Halloween fire free", "n":"46265"},{"t":"Haircutter&#039;s Help &quot;Sticks to the Roof of Your Mouth&quot;", "n":"43840"} ]},{"t":"Northwest Portland", "u":"http://northwestportland.katu.com", "k":"northwestportland", "lp":"/node/", "ip":"/sites/katu.com/files/imagecache/story_image_widget/",  "i": [ {"t":"What&#039;s Going Around?", "n":"48485", "i":"swine_flu_--_cropped_0.jpg"},{"t":"Meet Portland&#039;s newest partner to an arson investigator", "n":"48437"},{"t":"Get out to Morton&#039;s The Steakhouse tonight for a book signing", "n":"48367"},{"t":"International Day of Climate Action set for Oct. 24", "n":"47244"},{"t":"Want a say in Portland&#039;s future?", "n":"46331"} ]},{"t":"Southwest Portland", "u":"http://southwestportland.katu.com", "k":"southwestportland", "lp":"/node/", "ip":"/sites/katu.com/files/imagecache/story_image_widget/",  "i": [ {"t":"Pio Patrol ready to help out kids on Halloween", "n":"49198", "i":"halloween_7.jpg"},{"t":"Coat &amp; Blanket Drive", "n":"48647"},{"t":"Meet Portland&#039;s newest partner to an arson investigator", "n":"48437"},{"t":"Get out to Morton&#039;s The Steakhouse tonight for a book signing", "n":"48367"},{"t":"International Day of Climate Action set for Oct. 24", "n":"47244"} ]},{"t":"Southeast Portland", "u":"http://southeastportland.katu.com", "k":"southeastportland", "lp":"/node/", "ip":"/sites/katu.com/files/imagecache/story_image_widget/",  "i": [ {"t":"Reward offered for leads into who shot this Portland teen", "n":"48300", "i":"102109_broisshell_washington-murder.jpg"},{"t":"Head over to Campbell Salgado Studio on Oct. 31 for a fun time", "n":"48152"},{"t":"Vandals target Halloween decorations", "n":"47534"},{"t":"Mt. Tabor Neighborhood Association meeting set for Oct. 21", "n":"47530"},{"t":"International Day of Climate Action set for Oct. 24", "n":"47244"} ]},{"t":"Orchards", "u":"http://orchards.katu.com", "k":"orchards", "lp":"/node/", "ip":"/sites/katu.com/files/imagecache/story_image_widget/",  "i": [ {"t":"You can honor veterans on Nov. 7 and Nov. 11", "n":"48207", "i":"veterans_0.jpg"},{"t":"If your kids love math and science, head to WSU-Vancouver on Oct. 30", "n":"48205"},{"t":"Get out to Fort Vancouver National Historic Site on Oct. 24 ", "n":"47464"},{"t":"Police investigating man&#039;s death after night of partying", "n":"46187"},{"t":"Haircutter&#039;s Help &quot;Sticks to the Roof of Your Mouth&quot;", "n":"43840"} ]},{"t":"Oregon City", "u":"http://oregoncity.katu.com", "k":"oregoncity", "lp":"/node/", "ip":"/sites/katu.com/files/imagecache/story_image_widget/",  "i": [ {"t":"H1N1 vaccine goes fast in Oregon City", "n":"48438", "i":"flu_clinic.jpg"},{"t":"City and employees union finally come to agreement", "n":"48276"},{"t":"Clackamas County Marine Deputies recognized as heroes", "n":"47293"},{"t":"Sandbag station opens in Oregon City", "n":"46323"},{"t":"Keep your Halloween fire free", "n":"46265"} ]},{"t":"Salmon Creek", "u":"http://salmoncreek.katu.com", "k":"salmoncreek", "lp":"/node/", "ip":"/sites/katu.com/files/imagecache/story_image_widget/",  "i": [ {"t":"You can honor veterans on Nov. 7 and Nov. 11", "n":"48207", "i":"veterans_0.jpg"},{"t":"If your kids love math and science, head to WSU-Vancouver on Oct. 30", "n":"48205"},{"t":"Head over to Legacy Salmon Creek Medical Center on Oct. 29", "n":"47283"},{"t":"Dream Big launch party &amp; book fair", "n":"44256"},{"t":"Olbrich 5th at Small College Nationals", "n":"43811"} ]},{"t":"Sherwood", "u":"http://sherwood.katu.com", "k":"sherwood", "lp":"/node/", "ip":"/sites/katu.com/files/imagecache/story_image_widget/",  "i": [ {"t":"Sherwood Police Department is doing more than its share on Halloween", "n":"48299", "i":"halloween_2_2.jpg"},{"t":"Rescued horses now have new home", "n":"48275"},{"t":"It&#039;s almost time for ... Thanksgiving?", "n":"47193"},{"t":"Get to know new people on Oct. 22", "n":"46551"},{"t":"Big game for the No. 1-ranked Bowmen", "n":"43506"} ]},{"t":"Sunset", "u":"http://sunset.katu.com", "k":"sunset", "lp":"/node/", "ip":"/sites/katu.com/files/imagecache/story_image_widget/",  "i": [ {"t":"Get out to the October Moon Festival on Oct. 24", "n":"48436", "i":"moon.jpg"},{"t":"New-look River Road bridge opens today", "n":"47365"},{"t":"Three boys arrested for last week&#039;s fire", "n":"46599"},{"t":"Bazaar and gown sale to benefit breast cancer patients", "n":"44985"},{"t":"Senior Veterans at Laurel Parc is having a flag ceremony Oct. 16 at 3:20pm", "n":"43587"} ]},{"t":"Tigard", "u":"http://tigard.katu.com", "k":"tigard", "lp":"/node/", "ip":"/sites/katu.com/files/imagecache/story_image_widget/",  "i": [ {"t":"This should be an interesting show at Tigard High School on Oct. 24", "n":"47294", "i":"bollywood.jpg"},{"t":"Fall is in the air", "n":"46329"},{"t":"Woman pleads guilty to embezzling from Tigard furniture store", "n":"43434"},{"t":"You can have a huge play structure -- for free", "n":"42498"},{"t":"City of Tigard names new Police Chief", "n":"42449"} ]},{"t":"Tualatin", "u":"http://tualatin.katu.com", "k":"tualatin", "lp":"/node/", "ip":"/sites/katu.com/files/imagecache/story_image_widget/",  "i": [ {"t":"Ready to get creeped out?", "n":"47366", "i":"halloween_6.jpg"},{"t":"If you&#039;re in the market for a new job, or a job in general, there&#039;s good news", "n":"46433"},{"t":"Get ready for a Halloween outing Saturday", "n":"43317"},{"t":"Tualatin elementary student disappears, but is found a short time later", "n":"42576"},{"t":"Free health check Saturday for your kids", "n":"42447"} ]},{"t":"Vancouver", "u":"http://vancouver.katu.com", "k":"vancouver", "lp":"/node/", "ip":"/sites/katu.com/files/imagecache/story_image_widget/",  "i": [ {"t":"You can honor veterans on Nov. 7 and Nov. 11", "n":"48207", "i":"veterans_0.jpg"},{"t":"If your kids love math and science, head to WSU-Vancouver on Oct. 30", "n":"48205"},{"t":"Get out to Fort Vancouver National Historic Site on Oct. 24 ", "n":"47464"},{"t":"Vancouver City Council approves plan to develop waterfront", "n":"46895"},{"t":"There&#039;s a Vancouver waterfront meeting tonight", "n":"46268"} ]},{"t":"Washougal", "u":"http://washougal.katu.com", "k":"washougal", "lp":"/node/", "ip":"/sites/katu.com/files/imagecache/story_image_widget/",  "i": [ {"t":"If your kids love math and science, head to WSU-Vancouver on Oct. 30", "n":"48205", "i":"Math__Science_2129.jpg"},{"t":"Police aren&#039;t sure what to make of mystery man in Columbia View neighborhood", "n":"47533"},{"t":"Future of the airport at Grove Field up for debate", "n":"47531"},{"t":"Hey Washougal -- KATU reporter Joe English is out there today", "n":"47431"},{"t":"Fall Colors Highlight the Gorge", "n":"46799"} ]},{"t":"Wilsonville", "u":"http://wilsonville.katu.com", "k":"wilsonville", "lp":"/node/", "ip":"/sites/katu.com/files/imagecache/story_image_widget/",  "i": [ {"t":"Better hurry up and apply now for a cool job in Wilsonville", "n":"48302", "i":"bike_and_pedestrian_signal.jpg"},{"t":"Wilsonville Target store cleared out last week", "n":"47367"},{"t":"Remember Samantha Boehm?", "n":"46324"},{"t":"Wilsonville Library says it&#039;s not too late for Octoberfest", "n":"43360"},{"t":"Take a look around at an Oct. 27 open house at city hall", "n":"42570"} ]},{"t":"West Linn", "u":"http://westlinn.katu.com", "k":"westlinn", "lp":"/node/", "ip":"/sites/katu.com/files/imagecache/story_image_widget/",  "i": [ {"t":"Get ready to dance Oct. 23", "n":"47432", "i":"halloween_2_0.jpg"},{"t":"This guy got to spin the big wheel", "n":"46507"},{"t":"Boulders from the Ice Age in West Linn? You bet ...", "n":"43503"},{"t":"West Linn spot earns entry into National Register of Historic Places", "n":"42494"},{"t":"Mandatory closures at many state offices Friday", "n":"41957"} ]}); var GetLocationFromGoogleLoader = function(callback) {
		var AjaxGeoLocation = (function() {
				var loading = false;
				var loadGoogleLoader = function() {
						if (!hasGoogleLoader() && !loading) { loading = true; var s = document.createElement('script'); s.src = 'http://www.google.com/jsapi?callback=_google_loader_apiLoaded'; s.type = "text/javascript"; document.getElementsByTagName('head')[0].appendChild(s); }
				};
				var queue = [];
				var addLocationQueue = function(callback) { queue.push(callback); }
				var runLocationQueue = function() {
						if (hasGoogleLoader()) while (queue.length > 0) { var call = queue.pop(); call(); }
				}

				window['_google_loader_apiLoaded'] = function() { runLocationQueue(); }
				var hasGoogleLoader = function() { return (window['google'] && google['loader']); }
				var checkGoogleLoader = function(callback) { if (hasGoogleLoader()) return true; addLocationQueue(callback); loadGoogleLoader(); return false; };
				loadGoogleLoader();
				return { shim: true, type: "ClientLocation", lastPosition: null,
						getCurrentPosition: function(successCallback) {
								var self = this;
								if (!checkGoogleLoader(function() { self.getCurrentPosition(successCallback); })) return;
								if (google.loader.ClientLocation) {
										var cl = google.loader.ClientLocation;
										var position = { latitude: cl.latitude, longitude: cl.longitude, altitude: null, accuracy: 43000, altitudeAccuracy: null, heading: null, velocity: null, timestamp: new Date(),
												address: { city: cl.address.city, country: cl.address.country, country_code: cl.address.country_code, region: cl.address.region }
										};
										successCallback(position);
										this.lastPosition = position;
								} else {
										successCallback(false);
								}
						}
				};
		})();
		AjaxGeoLocation.getCurrentPosition(function(pos) { if (pos) callback(pos.address.city.toLowerCase()); else callback(false); });
}

var CommunityFromCity = function(city) {
		switch (city) {
				case 'seattle':
						return 'ballard';
				case 'eugene':
						return 'downtowneugene';
				case 'portland':
						return 'citycenter';
				default:
						return city;
		}
		return false;
}
var GetLocationFromAdManager = function(callback) {
		var loc = window['__dsns_'].GetCookie('dsnsloc');
		if (loc) callback(CommunityFromCity(loc));
		else callback(false);
}

var GetLocationFromCookie = function(callback) {
		var loc = window['__dsns_'].GetCookie('dsnscomm');
		if (loc) callback(loc);
		else callback(false);
}
var adHider = false;
var HideFlash = function() {
		$('object, embed').each(function() {
				var me = $(this);
				if(me.data('hiddenflash')) return;
				if(me.css('visibility') == 'visible') {
						me.data('hiddenflash', true);
						me.css({visibility:'hidden'});
				}
		});
}
var ShowFlash = function() {
		$('object, embed').each(function() {
				var me = $(this);
				if(me.data('hiddenflash'))
						me.css({visibility:'visible'});
						me.data('hiddenflash', false);
		});
}

var AddOverlay = function() {
		var mask = $('#dsnsOverlay');
		if(mask.length == 0 || mask.is(':visible'))
				return;
		var w = $(window).width();
		var h = $(window).height();
		var dw = $(document).width();
		var dh = $(document).height();
		if(dh>h)h=dh;
		if(dw>w)w=dw;
		if(IE6 || IE8) w -= 22;
		if(IE6) $('SELECT').css({visibility:'hidden'});
		HideFlash();
		mask.css({position:'absolute', opacity:.0, backgroundColor:'#333', top:0, left:0, width:w, height:h,display:'block', zIndex:100}).animate({opacity:.3}, 500);
		adHider = setInterval(function() {HideFlash();}, 500);
		return this;
}
var RemoveOverlay = function(outto) {
		clearInterval(adHider);
		if(outto)
				$('#dsnsOverlay').css({height:$(window).height(), backgroundColor:'#5B8CBE'}).animate({opacity:.0, top:outto.position().top, left:outto.position().left, width:outto.width(), height:outto.height()}, 1000, function() {$(this).hide();ShowFlash();if(IE6) $('SELECT').css({visibility:'visible'});});
		else
				$('#dsnsOverlay').animate({opacity:.0}, 300, function() {$(this).hide();ShowFlash();if(IE6) $('SELECT').css({visibility:'visible'});});
		return this;
}
function RenderFeed(source) {
		$('#dsnslocalnews, #dsnslocallinks').hide().find('*').show();
		var newshtml = dsnsLFHTMLTemplates.news + '';
		var linkshtml = dsnsLFHTMLTemplates.links + '';
		newshtml = newshtml.replace(/community_name/ig, source.t);
		newshtml = newshtml.replace(/http:\/\/community_link/ig, source.u);
		linkshtml = linkshtml.replace(/community_name/ig, source.t);
		linkshtml = linkshtml.replace(/http:\/\/community_link/ig, source.u);
		var img = source.i[0].i;

		if (!img || img.length < 1) {
				img = false;
				newshtml = newshtml.replace(/http:\/\/the_image./ig, 'http://cdn.secondspace.com/fshr/blank.gif');
		} else {
				newshtml = newshtml.replace(/http:\/\/the_image./ig, source.u + source.ip + source.i[0].i);
		}

		newshtml = newshtml.replace(/http:\/\/first_link./ig, source.u + source.lp + source.i[0].n);
		newshtml = newshtml.replace(/first_title/ig, source.i[0].t);

		if (source.i.length > 1) {
				newshtml = newshtml.replace(/http:\/\/second_link./ig, source.u + source.lp + source.i[1].n);
				newshtml = newshtml.replace(/second_title/ig, source.i[1].t);
		}
		if (source.i.length > 2) {
				newshtml = newshtml.replace(/http:\/\/third_link./ig, source.u + source.lp + source.i[2].n);
				newshtml = newshtml.replace(/third_title/ig, source.i[2].t);
		}
		if (source.i.length > 3) {
				newshtml = newshtml.replace(/http:\/\/fourth_link./ig, source.u + source.lp + source.i[3].n);
				newshtml = newshtml.replace(/fourth_title/ig, source.i[3].t);
		}
		if (source.i.length > 4) {
				newshtml = newshtml.replace(/http:\/\/fifth_link./ig, source.u + source.lp + source.i[4].n);
				newshtml = newshtml.replace(/fifth_title/ig, source.i[4].t);
		}

		$('#dsnslocalnews').html(newshtml);
		$('#dsnslocallinks').html(linkshtml);
		if(img) $('#dsnslocalnews .localimg').show();
		$('#dsnslocalnews, #dsnslocallinks').show();
}
function GetDefault() {
		switch(window.location.host){
				case 'www.katu.com':
						return CommunityFromCity('portland');
				break;
				case 'www.kval.com':
						return CommunityFromCity('eugene');
				break;
				break;
		}
		return CommunityFromCity('seattle');
}
var dsnsLFHTMLTemplates = {news:'', links:''};
function ShowFeeds(picked) {
		var defcom = GetDefault();
		if (!picked)
				picked = defcom;
		
		var com = false, dcom = false;;
		var communityList = new Array();

		function feedSort(a, b) {
				var A = a.t.charAt(0), B = b.t.charAt(0);
				return A > B ? 1 : A < B ? -1 : 0;
		}
		localFeeds.sort(feedSort);

		$.each(localFeeds, function(i, c) {
				if (c.i.length == 0)
						return true;
				communityList.push('<li><a href="#pick' + i + '">' + c.t + '</a></li>');
				if (c.k == picked) com = c;
				if (c.k == defcom) dcom = c;
		});
		if (!com) com = dcom;
		if (!com || communityList.length == 0) {
				$('#dsnslocal').show();
				return;
		}

		$('#dsnslocal').hide().html(lfHTML);
		dsnsLFHTMLTemplates.news = $('#dsnslocalnews').html();
		dsnsLFHTMLTemplates.links = $('#dsnslocallinks').html();
		RenderFeed(com);


		$('#dsnspickcommunity').hide().find('UL').html(communityList.join(''));
		$('#dsnspickcommunity UL LI A').live('click', function() {
				$('#dsnspickcommunity').hide();
				var sel = localFeeds[parseInt(/[0-9]+$/.exec($(this).attr('href')))];
				RenderFeed(sel);
				window['__dsns_'].SetCookie('dsnscomm', sel.k);
				return false;
		});
		$('#dsnslocalnews').find('a[href$="pickcommunity"]').live('click', function() {
				setTimeout(function() {ShowPicker();}, 100);
				return false;
		});
		$('#dsnslocal').show();

		
		var c1 = window['__dsns_'].GetCookie('dsnsloc');
if(c1) {
	document.cookie = 'dsnsloc=; expires=Wed, 1 Jan 2000 00:00:00 UTC; domain='+location.host+'; path=/';
	document.cookie = 'dsnsloc=; expires=Wed, 1 Jan 2000 00:00:00 UTC; path=/';
	window['__dsns_'].SetCookie('dsnsloc', c1);
}

	var c2 = window['__dsns_'].GetCookie('dsnscomm');
if(c2) {
	document.cookie = 'dsnscomm=; expires=Wed, 1 Jan 2000 00:00:00 UTC; domain='+location.host+'; path=/';
	document.cookie = 'dsnscomm=; expires=Wed, 1 Jan 2000 00:00:00 UTC; path=/';
	window['__dsns_'].SetCookie('dsnscomm', c2);
}
	
	var c3 = window['__dsns_'].GetCookie('dsnslfpop');
if(c3) {
	document.cookie = 'dsnslfpop=; expires=Wed, 1 Jan 2000 00:00:00 UTC; domain='+location.host+'; path=/';
	document.cookie = 'dsnslfpop=; expires=Wed, 1 Jan 2000 00:00:00 UTC; path=/';
	window['__dsns_'].SetCookie('dsnslfpop', c3);
}	
	
		var date = new Date();
		if((c1 && !c2 && !c3) || c3 && c3 != '1')
		{
			try {
				if(date.getTime() > parseInt(c3))
				{
					date.setTime(date.getTime()+(30*24*60*60*1000));
					window['__dsns_'].SetCookie('dsnslfpop', '1', date.toGMTString());
					setTimeout(function() {ShowPicker();}, 100);
				}
			} catch(e) {}
		}
		if(!c2 && !c1 && !c3) {
				date.setTime(date.getTime()+(3*24*60*60*1000));
				window['__dsns_'].SetCookie('dsnslfpop', date.getTime());
		}
}
var HidePicker = function(outto) {
		RemoveOverlay(outto);
		$('#dsnsLfPopup').hide();
}

var ShowPicker = function() {
		if(!window['__dsns_'].GetCookie('dsnsloc')) {
				var date = new Date();
				date.setTime(date.getTime()+(30*24*60*60*1000));
				window['__dsns_'].SetCookie('dsnslfpop', '1', date.toGMTString());
		}
		if($('#header #dsnsOverlay').length == 0) {
				$('#dsnsOverlay').appendTo($('#header')).hide();
				$('#dsnsLfPopup').appendTo($('#header'));
		}
		AddOverlay();
		var p = $('#dsnsLfPopup');
		p.css({left:-1000,top:-1000}).show();
		var ww = $(window).width();
		var wh = $(window).height();
		var dl = $(document).scrollLeft();
		var dt = $(document).scrollTop();
		var ew = p.width();
		var eh = p.height();
		var left = (ww - ew) / 2 + dl;
		var top = (wh - eh) / 2 + dt;
		if(top < 10) top = 10;
		if(left < 10) left = 10;
		p.css({left:left,top:top});
		if(!p.data('bound')) {
				p.data('bound', true);
				p.find('A[href$=close], .closeButton').click(function() {
						HidePicker();
						return false;
				});
				p.find('.column A').click(function() {
						var n = $(this).attr('href');
						n = n.substr(n.indexOf('#')+1);
						var com = false;
								
						$.each(localFeeds, function(i, c) {
								if (c.k == n) {
										com = c;
										return false;
								}
						});
						if(com) {
								RenderFeed(com);
								window['__dsns_'].SetCookie('dsnscomm', com.k);
								HidePicker($('#dsnslocal'));
						} else
								HidePicker();
						return false;
				});
		}
}

var localReady = function() {		
		var max = 100;
		if ($('#dsnslocal').length == 0 || typeof window['__dsns_'] != 'object') {
				if(max-- > 0)
						setTimeout(function() { localReady(); }, 100);
				return;
		}
		GetLocationFromCookie(function(city) {
				if (city) ShowFeeds(city);
				else GetLocationFromAdManager(function(city) {
						if (city) ShowFeeds(city);
						else GetLocationFromGoogleLoader(function(city) {
								if (city) ShowFeeds(CommunityFromCity(city));
								else ShowFeeds(false);
						});
				});
		});
}
localReady();
				
				var Ready = function(host) {
						if(window[ds_plugin_name].IsReady) return;
						window[ds_plugin_name].IsReady = true;
						if(typeof $ == 'undefined')
						{
								if(host) // we're a plugin
										$ = window[ds_plugin_name].$ = host.$;
								else 
										$ = window[ds_namespace].$;
						}
						if(typeof $ == 'undefined')
								return;
						var boxes = $('.autocompleted');
if(IE)
	$(function(){boxes.each(function() {Autocomplete($(this));});});
else
	boxes.each(function() {
		Autocomplete($(this));
	}); $('#advancedsearch, #header .advanced A, #search .advanced A').click(function() {
	var me = $(this);
	var id = me.data('dsns_quicksearch');
	if(!me.data('dsns_quicksearch')) {
		id = (''+Math.random()).substr(2);
		me.data('dsns_quicksearch', id);
	}
	
	var popupid = '__dsns_quicksearch_'+id;
	var popup = $('#'+popupid);

	var tmp = $('#loaderhost');
	if(tmp.length == 0)
		tmp = $('body');
			
	var created = false;
	if(popup.length == 0) {
		popup = $('<div id="'+popupid+'" class="dsnsQuickSearch"></div>').appendTo(tmp);
		popup.html(qsHTML.replace(/\{id\}/ig, id));
		created = true;
	}
	var pos = me.position();
	popup.css({display:'block', top: pos.top + me.height(), left: -1000});
	popup.css({left:$('#header').width() - 50});
	if(!created) return false;
	
	function BodyClick(event) {							
		var target = $(event.target);
		if (!(target.parents().index(popup) >= 0 || target[0] == popup[0] || target[0].tagName == 'HTML')) {
			popup.css({display:'none'});
			return;
		}
	}
	$(document).mousedown(BodyClick);
	
	function Resized(event) {
		if($(window).width() != savedWidth)
			popup.css({display:'none'});
		savedWidth = $(window).width();
	}
	var savedWidth = $(window).width();
	$(window).bind('resize', Resized);
	
	popup.find('.close').click(function() {
		popup.css({display:'none'});
	});
	
	$('#qscity_' + id).bind('change', function() {
		var me = $(this);
		var city = me.find('OPTION:selected');
		var v = city.val();
		if(v && v.length > 0)
			$('#qscnty_' + id).attr('disabled', true).find('option[value="'+city.attr('rel')+'"]').attr('selected', 'selected');
		else
			$('#qscnty_' + id).attr('disabled', false);
	});
	
	popup.find('FORM').bind('submit', function() {
		var type = '', q = '', date = '';
		var me = $(this);
		q = me.find('.qstext').val();
		
		var cat = $('#qscat_' + id +' OPTION:selected').val();
		if(cat && cat.length > 0)
			type += $('#qscat_'+id).attr('rel') + ',' + cat + ';';
			
		var feat = $('#qsfeat_' + id +' OPTION:selected').val();
		if(feat && feat.length > 0)
			type += $('#qsfeat_'+id).attr('rel') + ',' + feat + ';';
		
		var city = $('#qscity_' + id +' OPTION:selected').val();
		if(city && city.length > 0)
			type += $('#qscity_'+id).attr('rel') + ',' + city + ';';
			
		var cnty = $('#qscnty_' + id +' OPTION:selected').val();
		if(cnty && cnty.length > 0)
			type += $('#qscnty_'+id).attr('rel') + ',' + cnty + ';';
		
		var date = $('#qsdate_' + id +' OPTION:selected').val();
		if(date && date.length > 0) {
			var d = new Date();
			d.setDate(d.getDate() - parseInt(date));
			var day = d.getDate();
			if(day < 10) day = '0'+day;
			var month = d.getMonth() + 1;
			if(month < 10) month = '0'+month;
			date = $('#qsdate_'+id).attr('rel') + '=' + month + '%2f' + day + '%2f' + d.getFullYear() + '%2c';
		}
		
		if(type.length > 0)
			type = type.substr(0, type.length - 1);
		
		var url = '/default.aspx?ct=r';
		if(q && q.length > 0)
			url += '&q="'+q+'"';
		if(type && type.length > 0)
			url += '&type='+type;
		if(date && date.length > 0)
			url += '&'+date;
		window.location = url;
		return false;
	});
	
	return false;
}); 
				}
				window[ds_plugin_name].Ready = Ready;
				window[ds_plugin_name].FullyInitialized = true;
				if(host)
						host.OnReady.push(window[ds_plugin_name].Ready);
				else
						$(function(){window[ds_plugin_name].Ready();});
		}
		Ready = false;
		
		return {
				Load: Load,
				WaitForInit: WaitForInit,
				Init: Init,
				WaitForReady: WaitForReady,
				WaitForBody: WaitForBody,
				Ready: Ready,
				GetCookie: GetCookie,
				SetCookie: SetCookie
		};
}();
window[ds_plugin_name].WaitForBody();
window[ds_plugin_name].Load();
var l = window.location.href.substr(7);
if(l.match(/[0-9]+\.html$/ig)) setTimeout(function() {(new Image()).src='http://search.komonews.com/ws.aspx?key=MLT&rand='+(Math.random()*5)+'&u='+escape(l);}, 10000);
})();
if(typeof window['__dsns_'] == 'undefined') window['__dsns_'] = {};
window['__dsns_'].GetCookie = window['KATU_WidgetsV1'].GetCookie;
window['__dsns_'].SetCookie = window['KATU_WidgetsV1'].SetCookie;