var FujitsuSearch = {
onEvent: function(type, api) {
if (type === 'form') {
if (api.params.as_sitesearch !== undefined) {
$('#search-select-scope').append(
'
'
);
}
}
}
};
var ssConfig = {
site: '7NQUZ45S',
base: 'syncsearch',
search: {
group: '',
charset: 'utf-8',
count: 10,
paginationSize: 10,
align: 'center', //left, center
dateFormat: 'dd.MM.yyyy',
opacityTime: 500,
summaryLength: 200,
theme: 'gray', //gray, blue,
loadingAnimation: true,
onEvent: FujitsuSearch.onEvent,
templates: {}
},
image: {
popup: true,
adPosition: 2,
thumbPosition: 2,
templates: {}
},
suggest: {
forms: [
{
id: '', //ss-form, ss-query
group: '',
depth: 3
},
{
id: '1', //ss-form1, ss-query1
group: '',
depth: 3
},
{
id: '2', //ss-form2, ss-query2
group: '',
depth: 3
}
],
depth: 3,
wmModeExcludes: '',
cssPath: '/cssv5/search/ss_suggest_custom.css',
templates: {}
}
};
ssConfig.search.templates.form =
'';
ssConfig.search.templates.item =
'' +
'
' +
'
' +
'
' +
'
{{item.summary}}
' +
'
' +
'
({{item.contentLength}})' +
'
{{item.lastModified}}' +
'
' +
'
';
ssConfig.search.templates.aditem =
'' +
'
' +
'
' +
'
' +
'
{{item.summary}}
' +
'
' +
'
' +
'
';
ssConfig.search.templates.navigation =
'' +
'
' +
'Searched for "{{query}}"' +
'Results {{start}} ~ {{end}}' +
'of {{total}} ' +
'
' +
'
' +
'Relevance' +
'Date' +
'
' +
'
';
ssConfig.search.templates.pagePrev =
'Prev';
ssConfig.search.templates.pagination =
'{{page}}';
ssConfig.search.templates.pageNext =
'Next';
ssConfig.search.templates.notfound =
'' +
'Your search "
{{query}}" did not match any documents.
' +
'No pages were found containing "
{{query}}"' +
'
Suggestions:
' +
'
' +
'- Make sure all words are spelled correctly.
' +
'- Try different keywords.
' +
'- Try more general keywords.
' +
'
' +
'
';
if (ssConfig.image != undefined && ssConfig.image.templates != undefined) {
ssConfig.image.templates.preview =
'' +
'
' +
'
' +
'
' +
'
';
}
if (ssConfig.suggest != undefined && ssConfig.suggest.templates != undefined) {
ssConfig.suggest.templates.item =
'' +
'{{item.keyword}}' +
'
';
}
/*!
* ss_loader.js
* http://www.syncsearch.jp/
*
* @version 1.0.0
* @date 2017-06-19
* @license Copyright 2017 SyncThought,Inc. All Rights Reserved.
* This software is the proprietary information of SyncThought,Inc.
* Use is subject to license terms.
*/
var SyncSearchLoader=function(){this.proto="https:"===location.protocol?"https://":"http://",this.server="",this.CDN={host:"cdn.syncsearch.jp",path:"/libs/"},this.ALT={host:"static.syncsearch.jp",path:"/libs/"}};SyncSearchLoader.prototype={load:function(){var url=this.proto+this.CDN.host+this.CDN.path+ssConfig.base+"_version.js?d="+(new Date).getTime(),xhr=this.createAjaxRequest();try{xhr.open("GET",url,!0),xhr.timeout=500,xhr.onreadystatechange=function(){4==xhr.readyState&&(200==xhr.status?(ssLoader.server=ssLoader.CDN,eval(xhr.responseText)):0==xhr.status&&ssLoader.loadScript())},xhr.send(null)}catch(t){ssLoader.loadScript()}},createAjaxRequest:function(){var t;if(window.XMLHttpRequest)t=new XMLHttpRequest;else try{t=new ActiveXObject("Msxml2.XMLHTTP")}catch(e){try{t=new ActiveXObject("Microsoft.XMLHTTP")}catch(t){}}return t},loadScript:function(t){this.server=this.ALT;var t=this.proto+this.ALT.host+this.ALT.path+ssConfig.base+"_version.js?d="+(new Date).getTime(),e=document.getElementsByTagName("head").item(0),s=document.createElement("script");s.setAttribute("type","text/javascript"),s.setAttribute("charset","utf-8"),s.setAttribute("src",t),e.appendChild(s)},init:function(initObj,version){var url=this.proto+this.server.host+this.server.path+ssConfig.base+"_"+version+".min.js";"undefined"!=typeof SS_DEV_SCRIPT&&(url=SS_DEV_SCRIPT);var script=document.createElement("script");script.setAttribute("type","text/javascript"),script.setAttribute("charset","utf-8"),script.setAttribute("src",url);var done=!1;script.onload=script.onreadystatechange=function(){done||this.readyState&&"loaded"!==this.readyState&&"complete"!==this.readyState||(done=!0,eval(initObj+".init()"))},document.body.appendChild(script)}};var ssLoader=new SyncSearchLoader;ssLoader.load();