﻿//**********************************************************************
// Default Values
//**********************************************************************
Search.defaults = {};

Search.defaults.langCode = "en-us";
Search.defaults.category = "prefered";
Search.defaults.saveHistory = 20;
Search.defaults.loadAll = 0;

Search.defaults.preferedList = {};

Search.defaults.preferedList["en-us"] = [
	{c: "web", n: "google"},
	{c: "web", n: "yahoo"},
	{c: "web", n: "live"},
	{c: "news", n: "live"},
	{c: "images", n: "google"}
]

Search.defaults.preferedList["zh-cn"] = [
	{c: "web", n: "115"},
	{c: "web", n: "baidu"},
	{c: "web", n: "google"},
	{c: "images", n: "baidu"},
	{c: "music", n: "baidu"},
	{c: "video", n: "youku"},
	{c: "web", n: "知识"}
]


//**********************************************************************
// Search Engine Lists
//**********************************************************************
Search.localeList = {};

//**********************************************************************
// English
//**********************************************************************
Search.localeList["en-us"] = {};

Search.localeList["en-us"]["web"] = {
	"title": "Web",
	"items": {
		"google": { title: "Google",
			url: "http://www.google.com/search?client=aff-&forid=1&ie=utf-8&oe=utf-8&hl=en&q={keyword}" },
		"yahoo": { title: "Yahoo!",
			url: "http://search.yahoo.com/search?fr=cb-&serveUrl=so..cn&ei=utf-8&p={keyword}" },
		"ask": { title: "Ask.com",
			url: "http://www.ask.com/web?q={keyword}" },
		"live": { title: "Live Search",
			url: "http://search.live.com/results.aspx?q={keyword}" },
		"looksmart": { title: "Looksmart",
			url: "http://search.looksmart.com/p/search?free=1&qta=1&qt={keyword}" },
		"gigablast": { title: "Gigablast",
			url: "http://www.gigablast.com/search?q={keyword}" }
	}

}


Search.localeList["en-us"]["news"] = {
	"title": "News",
	"items": {
		"google": { title: "Google", subtitle: " News",
			url: "http://news.google.com/news?hl=en&ned=us&q={keyword}" },
		"yahoo": { title: "Yahoo!", subtitle: " News",
			url: "http://news.search.yahoo.com/news/search?p={keyword}" },
		"live": { title: "Live Search", subtitle: " News",
			url: "http://search.live.com/news/results.aspx?q={keyword}&FORM=BNRE" },
		"daypop": { title: "Daypop", subtitle: " News",
			url: "http://www.daypop.com/search?q={keyword}&t=n" },
		"alltheweb": { title: "AllTheWeb", subtitle: " News",
			url: "http://www.alltheweb.com/search?cat=news&cs=utf8&q={keyword}&rys=0&itag=crv&_sb_lang=any" },
		"altavista": { title: "AltaVista", subtitle: " News",
			url: "http://www.altavista.com/news/results?q={keyword}&nc=0&nr=0&nd=2" }
	}
}


Search.localeList["en-us"]["images"] = {
	"title": "Images",
	"items": {
		"google": { title: "Google", subtitle: " Images",
			url: "http://images.google.com/images?hl=en&q={keyword}&gbv=2" },
		"yahoo": { title: "Yahoo!", subtitle: " Images",
			url: "http://images.search.yahoo.com/search/images?ei=UTF-8&fr=cb-&serveUrl=so..cn&p={keyword}" },
		"ask": { title: "Ask.com", subtitle: " Images",
			url: "http://images.ask.com/pictures?q={keyword}&qsrc=2072&tool=img" },
		"live": { title: "Live Search", subtitle: " Images",
			url: "http://search.live.com/images/results.aspx?q={keyword}&FORM=BIRE" },
		"flickr": { title: "Flickr",
			url: "http://www.flickr.com/search/?q={keyword}" },
		"picsearch": { title: "PicSearch",
			url: "http://www.picsearch.com/search.cgi?q={keyword}" }
	}
}


Search.localeList["en-us"]["blog"] = {
	"title": "Blog",
	"items": {
		"google": { title: "Google", subtitle: " Blogs",
			url: "http://blogsearch.google.com/blogsearch?ie=UTF8&oe=UTF-8&hl=en&q={keyword}&om=1&z=4&tab=lb" },
		"ask": { title: "Ask.com", subtitle: " Blogs",
			url: "http://www.ask.com/blogsearch?q={keyword}" },
		"technorati": { title: "Technorati",
			url: "http://technorati.com/search/{keyword}" },
		"feedster": { title: "Feedster",
			url: "http://www.feedster.com/search/{keyword}" }
	}
}


Search.localeList["en-us"]["reference"] = {
	"title": "Reference",
	"items": {
		"dictionary": { title: "Dictionary.com",
			url: "http://dictionary.reference.com/browse/{keyword}" },
		"webster": { title: "Merriam-Webster",
			url: "http://www.webster.com/dictionary/{keyword}" },
		"wikipedia": { title: "Wikipedia",
			url: "http://www.wikipedia.org/w/wiki.phtml?search={keyword}" },
		"encarta": { title: "Encarta",
			url: "http://encarta.msn.com/encnet/refpages/search.aspx?q={keyword}" },
		"britannica": { title: "Britannica",
			url: "http://www.britannica.com/search?query={keyword}" },
		"infomine": { title: "Infomine",
			url: "http://infomine.ucr.edu/cgi-bin/canned_search?query={keyword}" }
	}
}


Search.localeList["en-us"]["other"] = {
	"title": "Other",
	"items": {
		"google_groups": { title: "Google Groups",
			url: "http://groups.google.com/groups/search?q={keyword}" },
		"google_maps": { title: "Google Maps",
			url: "http://maps.google.com/maps?ie=UTF-8&oe=UTF-8&hl=en&q={keyword}&z=4&om=1&um=1&sa=N&tab=wl" },
		"amazon": { title: "Amazon",
			url: "http://www.amazon.com/s/ref=nb_ss_gw/002-0555077-8828815?url=search-alias%3Daps&field-keywords={keyword}" },
		"ebay": { title: "eBay",
			url: "http://buy.ebay.com/{keyword}" },
		"youtube": { title: "YouTube",
			url: "http://www.youtube.com/results?search_query={keyword}" },
		"yahoo": { title: "Yahoo! Answers", subtitle: "",
			url: "http://answers.yahoo.com/search/search_result;_ylt=AlnxKjDWkwMepoT1FRXn2tgjzKIX?p={keyword}" }
	}
}




//**********************************************************************
// 简体中文

//**********************************************************************
Search.localeList["zh-cn"] = {};

Search.localeList["zh-cn"]["web"] = {
	"title": "网页",
	"items": {
		"baidu": { title: "百度", subtitle: "(网页)",
			url: "http://www.baidu.com/s?tn=song2816&ie=utf-8&wd={keyword}" },
		"google": { title: "Google", subtitle: "(网页)",
			url: "http://www.google.com.hk/search?q={keyword}" },
		"115": { title: "115", subtitle: "(网页)",
			url: "http://115.com/s?q={keyword:gb2312}" },
		"zhongshou": { title: "中搜",
			url: "http://p.zhongsou.com/p?w={keyword:gb2312}&k=song2816" },
		"sogou": { title: "搜狗",
			url: "http://www.sogou.com/web?query={keyword:gb2312}" },
		"yodao": { title: "有道", subtitle: "(网页)",
			url: "http://www.yodao.com/search?q={keyword}" },
		"Bing": { title: "必应",
			url: "http://cn.bing.com/search?q={keyword}&FORM=BWFD" },
				"GAIS": { title: "GAIS",
			url: "http://gais.cs.ccu.edu.tw/search.php?q={keyword}" },
				"知识": { title: "知识",
			url: "http://search.cnki.net/search.aspx?q={keyword}" }
			
	

	}
}


Search.localeList["zh-cn"]["news"] = {
	"title": "新闻",
	"items": {
		"baidu": { title: "百度",
			url: "http://news.baidu.com/ns?tn=yuzi_pg&word={keyword:gb2312}" },
		"google": { title: "Google",
			url: "http://news.google.com.hk/news?q={keyword}" },
		"yahoo": { title: "雅虎",
			url: "http://cn.news.yahoo.com/search.html?p={keyword:gb2312}" },
		"zhongshou": { title: "中搜",
			url: "http://z.zhongsou.com/n?w={keyword:gb2312}" },
		"iask": { title: "爱问",
			url: "http://www.iask.com/n?k={keyword:gb2312}" },
		"sogou": { title: "搜狗",
			url: "http://news.sogou.com/news?query={keyword:gb2312}" },
		"qihoo": { title: "奇虎",
			url: "http://so.news.qihoo.com/index.html?kw={keyword:gb2312}" }
	}
}


Search.localeList["zh-cn"]["images"] = {
	"title": "图像",
	"items": {
		"baidu": { title: "百度", subtitle: "(图像)",
			url: "http://image.baidu.com/i?tn=yuzi_pg&ct=201326592&lm=-1&word={keyword:gb2312}" },
		"google": { title: "Google", subtitle: "(图像)",
			url: "http://www.google.com.hk/images?q={keyword}" },
		"yahoo": { title: "雅虎", subtitle: "(图像)",
			url: "http://one.cn.yahoo.com/s?v=image&p={keyword:gb2312}" },
		"zhongshou": { title: "中搜",
			url: "http://img.zhongsou.com/i?w={keyword:gb2312}" },
		"iask": { title: "爱问",
			url: "http://p.iask.com/p?k={keyword:gb2312}" },
		"sogou": { title: "搜狗",
			url: "http://pic.sogou.com/pics?query={keyword:gb2312}" },
		"qihoo": { title: "奇虎",
			url: "http://so.image.qihoo.com/index.html?kw={keyword:gb2312}" },
		"live": { title: "Live 搜索",
			url: "http://search.live.com/images/results.aspx?q={keyword}" }
	}
}


Search.localeList["zh-cn"]["music"] = {
	"title": "音乐",
	"items": {
		"baidu": { title: "百度",
			url: "http://mp3.baidu.com/m?ct=134217728&word={keyword:gb2312}" },
		"yahoo": { title: "雅虎",
			url: "http://one.cn.yahoo.com/s?v=music&p={keyword:gb2312}{keyword:gb2312}" },
		"zhongshou": { title: "中搜",
			url: "http://mp3.zhongsou.com/m?w={keyword:gb2312}" },
		"sogou": { title: "搜狗",
			url: "http://d.sogou.com/music.so?query={keyword:gb2312}" },
		"qihoo": { title: "奇虎",
			url: "http://so.mp3.qihoo.com/index.html?kw={keyword:gb2312}" },
		"sogua": { title: "SoGua",
			url: "http://search.sogua.com/search.asp?key={keyword:gb2312}" }
	}
}




Search.localeList["zh-cn"]["video"] = {
	"title": "视频",
	"items": {
		"gougou": { title: "狗狗",
			url: "http://video.gougou.com/search?s={keyword}" },
		"Google": { title: "Google",
			url: "http://video.google.com.hk/videosearch?q={keyword}" },
		"baidu": { title: "百度",
			url: "http://video.baidu.com/v?word={keyword:gb2312}&ct=301989888&rn=20&pn=0&db=0&s=0" },
		"yahoo": { title: "雅虎",
			url: "http://video.cn.yahoo.com/search.html?p={keyword:gb2312}" },
		"sina": { title: "新浪",
			url: "http://search.you.video.sina.com.cn/s?type=topic&key={keyword:gb2312}" },
		"youku": { title: "优酷",
			url: "http://so.youku.com/search_playlist?q={keyword}" },
		"tudou": { title: "土豆",
			url: "http://so.tudou.com/psearch.do?kw={keyword:gb2312}" },
		"酷六": { title: "酷六",
			url: "http://so.ku6.com/p/q{keyword}" },
		"6间房": { title: "56",
			url: "http://so.56.com/index?st=2&key={keyword}&charset=utf-8&type=album&bn=&kw=" }
	}
}


Search.localeList["zh-cn"]["movie"] = {
	"title": "影视",
	"items": {
		"gougou": { title: "狗狗",
			url: "http://movie.gougou.com/search?search={keyword}" },
		"kuaiche": { title: "快车",
			url: "http://s.kuaiche.com/s/search?q={keyword:gb2312}&r=2" },
		"yahoo": { title: "雅虎",
			url: "http://ys.cn.yahoo.com/mohu/index.html?p={keyword:gb2312}" },
		"verycd": { title: "VeryCD电骡资源",
			url: "http://find.verycd.com/folders/{keyword}" },
		"BTchina": { title: "BT@China",
			url: "http://search.btchina.net/btsearch.php?query={keyword:gb2312}" },
		"fkee": { title: "飞客",
			url: "http://bt.fkee.com/search.aspx?q={keyword:gb2312}" },
		"souyo": { title: "BT特工",
			url: "http://game.souyo.com/exec/search?rr=5&k={keyword:gb2312}" },
		"SoGua": { title: "SoGua",
			url: "http://search.sogua.com/movie.asp?key={keyword:gb2312}" },
		"IT": { title: "IT",
			url: "http://bt.it.com.cn/search.asp?key={keyword:gb2312}" },
		"ttbt": { title: "天天BT",
			url: "http://www.ttbt.cn/search.asp?action=true&k={keyword:gb2312}" }
	}
}


Search.localeList["zh-cn"]["soft"] = {
	"title": "软件",
	"items": {
		"gougou": {	title: "狗狗",		url: "http://soft.gougou.com/search?restype=2&search={keyword}" },
		"kuaiche": {	title: "快车",		url: "http://s.kuaiche.com/s/search?r=1&q={keyword:gb2312}" },
		"sina": {	title: "新浪",		url: "http://php.tech.sina.com.cn/download/d_search.php?f_name={keyword:gb2312}" },
		"pconline": {	title: "太平洋",	url: "http://dlc2.pconline.com.cn/search.jsp?keyword={keyword:gb2312}" },
		"newhua": {	title: "华军",		url: "http://search.newhua.com/search.asp?Keyword={keyword:gb2312}" },
		"pchome": {	title: "电脑之家",	url: "http://download.pchome.net/php/search.php?searchstr={keyword:gb2312}" },
		"skycn": {	title: "天空",		url: "http://www.skycn.com/search.php?sor=00&ss_name={keyword:gb2312}" },
		"crsky": {	title: "霏凡",		url: "http://search.crsky.com/search.asp?sType=ResName&keyword={keyword:gb2312}" },
                "Netton": {	title: "网罗天下",	url: "http://netton.cn/softsou/soft8.asp?by=name&site=all=&word={keyword}" }
	}
}


Search.localeList["zh-cn"]["dict"] = {
	"title": "词典",
	"items": {
		"dictcn": { title: "DICT",
			url: "http://www.dict.cn/search/?q={keyword:gb2312}" },
		"iciba": { title: "爱词霸",
			url: "http://www.iciba.com/search?s={keyword}" },
		"yodao": { title: "有道",
			url: "http://dict.yodao.com/search?q={keyword}" },
		"baidu": { title: "百度",
			url: "http://www.baidu.com/s?ct=1048576&wd={keyword:gb2312}" }
	}
}

Search.localeList["zh-cn"]["buy"] = {
	"title": "购物",
	"items": {
		"taobao": { title: "淘宝网",
			url: "http://search1.taobao.com/browse/search_auction.htm?q={keyword:gb2312}" },
		"eachnet": { title: "易趣",
			url: "http://search.eachnet.com/search/basicsearch.do?satitle={keyword}" },
		"dangdang": { title: "当当",
			url: "http://search.dangdang.com/search.aspx?key={keyword:gb2312}" },
		"chinaec": { title: "中商网",
			url: "http://www.chinaec.com/SearchEngine/?key={keyword:gb2312}" },
		"amazon": { title: "卓越亚马逊",
			url: "http://www.amazon.cn/search/search.asp?searchWord={keyword}" }
	}
}

Search.localeList["zh-cn"]["zhishi"] = {
	"title": "知识",
	"items": {
		"baidu": { title: "百度",
			url: "http://zhidao.baidu.com/q?ct=17&tn=ikaslist&word={keyword:gb2312}" },
		"yahoo": { title: "雅虎",
			url: "http://ks.cn.yahoo.com/search/search_result2?ei=UTF-8&p={keyword}" },
		"iask": { title: "爱问",
			url: "http://iask.sina.com.cn/search_engine/search_knowledge_engine.php?key={keyword:gb2312}" }
	}
}


//		"yahoo": { title: "雅虎",
//			url: "http://cool.cn.yahoo.com/psearch.html?p={keyword:gb2312}" },