﻿//**********************************************************************
// 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: "baidu"},
	{c: "web", n: "google"},
	{c: "web", n: "yahoo"},
	{c: "images", n: "baidu"},
	{c: "images", n: "google"},
	{c: "movie", n: "gougou"}
]


//**********************************************************************
// 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=pub-2385525966262576&hl=en&q={keyword}" },
		"yahoo": { title: "Yahoo!",
			url: "http://search.yahoo.com/search?p={keyword}&fr=ush-ans" },
		"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"]["cnic"] = {
	"title": "IC Search",
	"items": {
		//"baidu": { title: "百度", subtitle: "(网页)",
			//url: "http://www.baidu.com/s?tn=xingyu8013_pg&ie=utf-8&wd={keyword}" },
		"google": { title: "Google", subtitle: "(网页)",
			url: "http://www.google.cn/search?client=pub-2385525966262576&prog=aff&forid=1&q={keyword}" },
		"IC jiaoyiwang": { title: "IC jiaoyiwang",
			url: "http://www.ic.net.cn/partsearch/searchinstock.asp?area=&Page=1&partnumber={keyword}" },
		"huaqiang": { title: "huaqiang",
			url: "http://wt.hqew.com/Buy/Inventory/Searchic.asp?Action=search&keyword={keyword}" },
		"21ic": { title: "21ic",
			url: "http://www.21ic.com.cn/kucun/search.asp?Catalog=1&T1={keyword}" },
		"ic72": { title: "ic72",
			url: "http://www.ic72.com/page/Search.asp?search1={keyword}" },
		"kucun online": { title: "kucun online",
			url: "http://www.oemresource.com/product/search.phtml?key={keyword}" },
		"shengming": { title: "shengming",
			url: "http://www.icminer.com/icminer_Search.php?search={keyword}" },
		"Brokerforum": { title: "Brokerforum",
			url: "http://www.brokerforum.com/bfparts?ZH/FREE_SEARCH/LIST/FullPartNo={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;_ylt=A0oGkxGfaVtIFeUAKatXNyoA?ei=UTF-8&fr2=tab-web&fr=sfp&p={keyword}" },
		"ask": { title: "Ask.com", subtitle: " Images",
			url: "http://www.ask.com/pictures?q={keyword}&qsrc=0&o=0&l=dir" },
		"live": { title: "Live Search", subtitle: " Images",
			url: "http://cnweb.search.live.com/images/results.aspx?q={keyword}&go=&form=QBLH&scope=images" },
		"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?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=A0S0201KaltIYC8BDJuJzbkF?ei=UTF-8&p={keyword}&fr2=tab-img&fr=sfp" }
	}
}


//**********************************************************************
// 简体中文
//**********************************************************************
Search.localeList["zh-cn"] = {};

Search.localeList["zh-cn"]["web"] = {
	"title": "网页",
	"items": {
		"baidu": { title: "百度", subtitle: "(网页)",
			url: "http://www.baidu.com/s?tn=xingyu8013_pg&ie=utf-8&wd={keyword}" },
		"google": { title: "Google", subtitle: "(网页)",
			url: "http://www.google.cn/search?client=pub-2385525966262576&prog=aff&forid=1&q={keyword}" },
		"yahoo": { title: "雅虎", subtitle: "(网页)",
			url: "http://search.cn.yahoo.com/search?ei=UTF-8&p={keyword}" },
		"zhongshou": { title: "中搜",
			url: "http://p.zhongsou.com/p?w={keyword:gb2312}" },
		"sogou": { title: "搜狗",
			url: "http://www.sogou.com/web?query={keyword:gb2312}" },
		"yodao": { title: "有道",
			url: "http://www.yodao.com/search?q={keyword}" },
		"live": { title: "Live 搜索",
			url: "http://search.live.com/results.aspx?q={keyword}" }
	}
}

Search.localeList["zh-cn"]["cnic"] = {
	"title": "IC搜索",
	"items": {
		//"baidu": { title: "百度", subtitle: "(网页)",
			//url: "http://www.baidu.com/s?tn=xingyu8013_pg&ie=utf-8&wd={keyword}" },
		"google": { title: "Google", subtitle: "(网页)",
			url: "http://www.google.cn/search?client=pub-2385525966262576&prog=aff&forid=1&q={keyword}" },
		"IC交易网": { title: "IC交易网",
			url: "http://www.ic.net.cn/partsearch/searchinstock.asp?area=&Page=1&partnumber={keyword}" },
		"华强电子世界网": { title: "华强电子世界网",
			url: "http://wt.hqew.com/Buy/Inventory/Searchic.asp?Action=search&keyword={keyword}" },
		"21ic": { title: "21ic",
			url: "http://www.21ic.com.cn/kucun/search.asp?Catalog=1&T1={keyword}" },
		"ic72": { title: "ic72芯片交易",
			url: "http://www.ic72.com/page/Search.asp?search1={keyword}" },
		"库存在线": { title: "库存在线",
			url: "http://www.oemresource.com/product/search.phtml?key={keyword}" },
		"盛明零件网": { title: "盛明零件网",
			url: "http://www.icminer.com/icminer_Search.php?search={keyword}" },
		"Brokerforum": { title: "Brokerforum",
			url: "http://www.brokerforum.com/bfparts?ZH/FREE_SEARCH/LIST/FullPartNo={keyword}" }
		
	}
}


Search.localeList["zh-cn"]["news"] = {
	"title": "新闻",
	"items": {
		"baidu": { title: "百度",
			url: "http://news.baidu.com/ns?tn=xingyu8013_pg&word={keyword:gb2312}" },
		"google": { title: "Google",
			url: "http://news.google.cn/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=xingyu8013_pg&ct=201326592&lm=-1&word={keyword:gb2312}" },
		"google": { title: "Google", subtitle: "(图像)",
			url: "http://images.google.cn/images?q={keyword}" },
		"yahoo": { title: "雅虎", subtitle: "(图像)",
			url: "http://image.cn.yahoo.com/search?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://music.cn.yahoo.com/search.html?p={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"]["bbs"] = {
	"title": "论坛",
	"items": {
		"qihoo": { title: "奇虎",
			url: "http://bbs.qihoo.com/search.html?kw={keyword:gb2312}" },
		"google": { title: "Google",
			url: "http://groups.google.com/groups?q={keyword}" },
		"zhongshou": { title: "中搜",
			url: "http://bbs.zhongsou.com/b?w={keyword:gb2312}" },
		"daqi": { title: "大旗",
			url: "http://search.daqi.com/cgi-bin/search?keyword={keyword:gb2312}" },
		"teein": { title: "帖易",
			url: "http://search.teein.com/s.php?q={keyword}" }
	}
}

Search.localeList["zh-cn"]["video"] = {
	"title": "视频",
	"items": {
		"gougou": { title: "狗狗",
			url: "http://video.gougou.com/search?id=3037981&s={keyword}" },
		"Google": { title: "Google",
			url: "http://video.google.cn/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}" },
		"iask": { title: "爱问",
			url: "http://v.iask.com/v?k={keyword}" },
		"live": { title: "LIVE",
			url: "http://cnweb.search.live.com/video/results.aspx?q={keyword}" }
	}
}


Search.localeList["zh-cn"]["movie"] = {
	"title": "影视",
	"items": {
		"gougou": { title: "狗狗", subtitle: "(下载)",
			url: "http://www.gougou.com/search?id=3037981&pattern=10100&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}" },
		"ED2000": { title: "ED2000",
			url: "http://www.ed2000.com/FileList.asp?SearchWord={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}" },
		"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?id=3037981&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/search-{keyword:gb2312}----1.html" },
		"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}" }
	}
}

Search.localeList["zh-cn"]["blog"] = {
	"title": "博客",
	"items": {
		"baidu": { title: "百度",
			url: "http://blogsearch.baidu.com/s?wd={keyword:gb2312}" },
		"qihoo": { title: "奇虎",
			url: "http://so.blog.qihoo.com/index.html?kw={keyword:gb2312}" },
		"yodao": { title: "有道",
			url: "http://blog.yodao.com/search?q={keyword}" },
		"blogool": { title: "博狗",
			url: "http://www.blogool.com/search?query={keyword}" },
		"souyo": { title: "SouYo",
			url: "http://www.souyo.com/search?q={keyword}" },
		"cgogo": { title: "搜个够",
			url: "http://blog.cgogo.com/blogSearch.htm?stype=article&keyword={keyword:gb2312}" }
	}
}

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}" },
		"yahoo": { title: "雅虎",
			url: "http://zidian.cn.yahoo.com/result_en2cn.html?p={keyword}" },
		"stardict": { title: "星际译王",
			url: "http://www.stardict.cn/query.php?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?commend=all&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}" }
	}
}
//		"IT": { title: "IT",
//			url: "http://bt.it.com.cn/search.asp?key={keyword:gb2312}" },
//		"SoGua": { title: "SoGua",
//			url: "http://search.sogua.com/movie.asp?key={keyword:gb2312}" },
//		"yahoo": { title: "雅虎",
//			url: "http://cool.cn.yahoo.com/psearch.html?p={keyword:gb2312}" },
//		"YouTube": { title: "YouTube",
//			url: "http://www.youtube.com/results?search_query={keyword}" }
