/*
 * Yahoo! Open Local Platform JavaScript API
 * http://www.yahoo.co.jp
 *
 * Copyright (c) 2016 Yahoo! Japan
 *
 */
(function(__YOLP_VERSION, __YOLP_HOST) {

var JSON;if(!JSON){JSON={};}(function(){function f(n){return n<10?"0"+n:n;}if(typeof Date.prototype.toJSON!=="function"){Date.prototype.toJSON=function(key){return isFinite(this.valueOf())?this.getUTCFullYear()+"-"+f(this.getUTCMonth()+1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"Z":null;};String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(key){return this.valueOf();
};}var cx=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,escapable=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,gap,indent,meta={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},rep;function quote(string){escapable.lastIndex=0;return escapable.test(string)?'"'+string.replace(escapable,function(a){var c=meta[a];
return typeof c==="string"?c:"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4);})+'"':'"'+string+'"';}function str(key,holder){var i,k,v,length,mind=gap,partial,value=holder[key];if(value&&typeof value==="object"&&typeof value.toJSON==="function"){value=value.toJSON(key);}if(typeof rep==="function"){value=rep.call(holder,key,value);}switch(typeof value){case"string":return quote(value);case"number":return isFinite(value)?String(value):"null";
case"boolean":case"null":return String(value);case"object":if(!value){return"null";}gap+=indent;partial=[];if(Object.prototype.toString.apply(value)==="[object Array]"){length=value.length;for(i=0;i<length;i+=1){partial[i]=str(i,value)||"null";}v=partial.length===0?"[]":gap?"[\n"+gap+partial.join(",\n"+gap)+"\n"+mind+"]":"["+partial.join(",")+"]";gap=mind;return v;}if(rep&&typeof rep==="object"){length=rep.length;
for(i=0;i<length;i+=1){if(typeof rep[i]==="string"){k=rep[i];v=str(k,value);if(v){partial.push(quote(k)+(gap?": ":":")+v);}}}}else{for(k in value){if(Object.prototype.hasOwnProperty.call(value,k)){v=str(k,value);if(v){partial.push(quote(k)+(gap?": ":":")+v);}}}}v=partial.length===0?"{}":gap?"{\n"+gap+partial.join(",\n"+gap)+"\n"+mind+"}":"{"+partial.join(",")+"}";gap=mind;return v;}}if(typeof JSON.stringify!=="function"){JSON.stringify=function(value,replacer,space){var i;
gap="";indent="";if(typeof space==="number"){for(i=0;i<space;i+=1){indent+=" ";}}else{if(typeof space==="string"){indent=space;}}rep=replacer;if(replacer&&typeof replacer!=="function"&&(typeof replacer!=="object"||typeof replacer.length!=="number")){throw new Error("JSON.stringify");}return str("",{"":value});};}if(typeof JSON.parse!=="function"){JSON.parse=function(text,reviver){var j;function walk(holder,key){var k,v,value=holder[key];
if(value&&typeof value==="object"){for(k in value){if(Object.prototype.hasOwnProperty.call(value,k)){v=walk(value,k);if(v!==undefined){value[k]=v;}else{delete value[k];}}}}return reviver.call(holder,key,value);}text=String(text);cx.lastIndex=0;if(cx.test(text)){text=text.replace(cx,function(a){return"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4);});}if(/^[\],:{}\s]*$/.test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,""))){j=eval("("+text+")");
return typeof reviver==="function"?walk({"":j},""):j;}throw new SyntaxError("JSON.parse");};}}());

/*
 * jQuery JavaScript Library v1.9.1
 * http://jquery.com/
 *
 * Includes Sizzle.js
 * http://sizzlejs.com/
 *
 * Copyright 2005, 2012 jQuery Foundation, Inc. and other contributors
 * Released under the MIT license
 * http://jquery.org/license
 *
 * Date: 2013-2-4
 */
(function(a2,aG){var ai,w,aC=typeof aG,l=a2.document,aL=a2.location,bi=a2.jQuery,H=a2.$,aa={},a6=[],s="1.9.1",aI=a6.concat,ao=a6.push,a4=a6.slice,aM=a6.indexOf,z=aa.toString,V=aa.hasOwnProperty,aQ=s.trim,bJ=function(e,b3){return new bJ.fn.init(e,b3,w);
},bA=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,ac=/\S+/g,C=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,br=/^(?:(<[\w\W]+>)[^>]*|#([\w-]*))$/,a=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,bh=/^[\],:{}\s]*$/,bk=/(?:^|:|,)(?:\s*\[)+/g,bG=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,aZ=/"[^"\\\r\n]*"|true|false|null|-?(?:\d+\.|)\d+(?:[eE][+-]?\d+|)/g,bS=/^-ms-/,aV=/-([\da-z])/gi,M=function(e,b3){return b3.toUpperCase();},bW=function(e){if(l.addEventListener||e.type==="load"||l.readyState==="complete"){bl();
bJ.ready();}},bl=function(){if(l.addEventListener){l.removeEventListener("DOMContentLoaded",bW,false);a2.removeEventListener("load",bW,false);}else{l.detachEvent("onreadystatechange",bW);a2.detachEvent("onload",bW);}};bJ.fn=bJ.prototype={jquery:s,constructor:bJ,init:function(e,b5,b4){var b3,b6;if(!e){return this;}if(typeof e==="string"){if(e.charAt(0)==="<"&&e.charAt(e.length-1)===">"&&e.length>=3){b3=[null,e,null];
}else{b3=br.exec(e);}if(b3&&(b3[1]||!b5)){if(b3[1]){b5=b5 instanceof bJ?b5[0]:b5;bJ.merge(this,bJ.parseHTML(b3[1],b5&&b5.nodeType?b5.ownerDocument||b5:l,true));if(a.test(b3[1])&&bJ.isPlainObject(b5)){for(b3 in b5){if(bJ.isFunction(this[b3])){this[b3](b5[b3]);}else{this.attr(b3,b5[b3]);}}}return this;}else{b6=l.getElementById(b3[2]);if(b6&&b6.parentNode){if(b6.id!==b3[2]){return b4.find(e);}this.length=1;
this[0]=b6;}this.context=l;this.selector=e;return this;}}else{if(!b5||b5.jquery){return(b5||b4).find(e);}else{return this.constructor(b5).find(e);}}}else{if(e.nodeType){this.context=this[0]=e;this.length=1;return this;}else{if(bJ.isFunction(e)){return b4.ready(e);}}}if(e.selector!==aG){this.selector=e.selector;this.context=e.context;}return bJ.makeArray(e,this);},selector:"",length:0,size:function(){return this.length;
},toArray:function(){return a4.call(this);},get:function(e){return e==null?this.toArray():(e<0?this[this.length+e]:this[e]);},pushStack:function(e){var b3=bJ.merge(this.constructor(),e);b3.prevObject=this;b3.context=this.context;return b3;},each:function(b3,e){return bJ.each(this,b3,e);},ready:function(e){bJ.ready.promise().done(e);return this;},slice:function(){return this.pushStack(a4.apply(this,arguments));
},first:function(){return this.eq(0);},last:function(){return this.eq(-1);},eq:function(b4){var e=this.length,b3=+b4+(b4<0?e:0);return this.pushStack(b3>=0&&b3<e?[this[b3]]:[]);},map:function(e){return this.pushStack(bJ.map(this,function(b4,b3){return e.call(b4,b3,b4);}));},end:function(){return this.prevObject||this.constructor(null);},push:ao,sort:[].sort,splice:[].splice};bJ.fn.init.prototype=bJ.fn;
bJ.extend=bJ.fn.extend=function(){var e,b8,b3,b4,cb,b9,b7=arguments[0]||{},b6=1,b5=arguments.length,ca=false;if(typeof b7==="boolean"){ca=b7;b7=arguments[1]||{};b6=2;}if(typeof b7!=="object"&&!bJ.isFunction(b7)){b7={};}if(b5===b6){b7=this;--b6;}for(;b6<b5;b6++){if((cb=arguments[b6])!=null){for(b4 in cb){e=b7[b4];b3=cb[b4];if(b7===b3){continue;}if(ca&&b3&&(bJ.isPlainObject(b3)||(b8=bJ.isArray(b3)))){if(b8){b8=false;
b9=e&&bJ.isArray(e)?e:[];}else{b9=e&&bJ.isPlainObject(e)?e:{};}b7[b4]=bJ.extend(ca,b9,b3);}else{if(b3!==aG){b7[b4]=b3;}}}}}return b7;};bJ.extend({noConflict:function(e){if(a2.$===bJ){a2.$=H;}if(e&&a2.jQuery===bJ){a2.jQuery=bi;}return bJ;},isReady:false,readyWait:1,holdReady:function(e){if(e){bJ.readyWait++;}else{bJ.ready(true);}},ready:function(e){if(e===true?--bJ.readyWait:bJ.isReady){return;}if(!l.body){return setTimeout(bJ.ready);
}bJ.isReady=true;if(e!==true&&--bJ.readyWait>0){return;}ai.resolveWith(l,[bJ]);if(bJ.fn.trigger){bJ(l).trigger("ready").off("ready");}},isFunction:function(e){return bJ.type(e)==="function";},isArray:Array.isArray||function(e){return bJ.type(e)==="array";},isWindow:function(e){return e!=null&&e==e.window;},isNumeric:function(e){return !isNaN(parseFloat(e))&&isFinite(e);},type:function(e){if(e==null){return String(e);
}return typeof e==="object"||typeof e==="function"?aa[z.call(e)]||"object":typeof e;},isPlainObject:function(b5){if(!b5||bJ.type(b5)!=="object"||b5.nodeType||bJ.isWindow(b5)){return false;}try{if(b5.constructor&&!V.call(b5,"constructor")&&!V.call(b5.constructor.prototype,"isPrototypeOf")){return false;}}catch(b4){return false;}var b3;for(b3 in b5){}return b3===aG||V.call(b5,b3);},isEmptyObject:function(b3){var e;
for(e in b3){return false;}return true;},error:function(e){throw new Error(e);},parseHTML:function(b6,b4,b5){if(!b6||typeof b6!=="string"){return null;}if(typeof b4==="boolean"){b5=b4;b4=false;}b4=b4||l;var b3=a.exec(b6),e=!b5&&[];if(b3){return[b4.createElement(b3[1])];}b3=bJ.buildFragment([b6],b4,e);if(e){bJ(e).remove();}return bJ.merge([],b3.childNodes);},parseJSON:function(e){if(a2.JSON&&a2.JSON.parse){return a2.JSON.parse(e);
}if(e===null){return e;}if(typeof e==="string"){e=bJ.trim(e);if(e){if(bh.test(e.replace(bG,"@").replace(aZ,"]").replace(bk,""))){return(new Function("return "+e))();}}}bJ.error("Invalid JSON: "+e);},parseXML:function(b5){var b3,b4;if(!b5||typeof b5!=="string"){return null;}try{if(a2.DOMParser){b4=new DOMParser();b3=b4.parseFromString(b5,"text/xml");}else{b3=new ActiveXObject("Microsoft.XMLDOM");b3.async="false";
b3.loadXML(b5);}}catch(b6){b3=aG;}if(!b3||!b3.documentElement||b3.getElementsByTagName("parsererror").length){bJ.error("Invalid XML: "+b5);}return b3;},noop:function(){},globalEval:function(e){if(e&&bJ.trim(e)){(a2.execScript||function(b3){a2["eval"].call(a2,b3);})(e);}},camelCase:function(e){return e.replace(bS,"ms-").replace(aV,M);},nodeName:function(b3,e){return b3.nodeName&&b3.nodeName.toLowerCase()===e.toLowerCase();
},each:function(b7,b8,b3){var b6,b4=0,b5=b7.length,e=ab(b7);if(b3){if(e){for(;b4<b5;b4++){b6=b8.apply(b7[b4],b3);if(b6===false){break;}}}else{for(b4 in b7){b6=b8.apply(b7[b4],b3);if(b6===false){break;}}}}else{if(e){for(;b4<b5;b4++){b6=b8.call(b7[b4],b4,b7[b4]);if(b6===false){break;}}}else{for(b4 in b7){b6=b8.call(b7[b4],b4,b7[b4]);if(b6===false){break;}}}}return b7;},trim:aQ&&!aQ.call("\uFEFF\xA0")?function(e){return e==null?"":aQ.call(e);
}:function(e){return e==null?"":(e+"").replace(C,"");},makeArray:function(e,b4){var b3=b4||[];if(e!=null){if(ab(Object(e))){bJ.merge(b3,typeof e==="string"?[e]:e);}else{ao.call(b3,e);}}return b3;},inArray:function(b5,b3,b4){var e;if(b3){if(aM){return aM.call(b3,b5,b4);}e=b3.length;b4=b4?b4<0?Math.max(0,e+b4):b4:0;for(;b4<e;b4++){if(b4 in b3&&b3[b4]===b5){return b4;}}}return -1;},merge:function(b6,b4){var e=b4.length,b5=b6.length,b3=0;
if(typeof e==="number"){for(;b3<e;b3++){b6[b5++]=b4[b3];}}else{while(b4[b3]!==aG){b6[b5++]=b4[b3++];}}b6.length=b5;return b6;},grep:function(b3,b8,e){var b7,b4=[],b5=0,b6=b3.length;e=!!e;for(;b5<b6;b5++){b7=!!b8(b3[b5],b5);if(e!==b7){b4.push(b3[b5]);}}return b4;},map:function(b4,b9,e){var b8,b6=0,b7=b4.length,b3=ab(b4),b5=[];if(b3){for(;b6<b7;b6++){b8=b9(b4[b6],b6,e);if(b8!=null){b5[b5.length]=b8;}}}else{for(b6 in b4){b8=b9(b4[b6],b6,e);
if(b8!=null){b5[b5.length]=b8;}}}return aI.apply([],b5);},guid:1,proxy:function(b6,b5){var e,b4,b3;if(typeof b5==="string"){b3=b6[b5];b5=b6;b6=b3;}if(!bJ.isFunction(b6)){return aG;}e=a4.call(arguments,2);b4=function(){return b6.apply(b5||this,e.concat(a4.call(arguments)));};b4.guid=b6.guid=b6.guid||bJ.guid++;return b4;},access:function(e,b7,b9,b8,b5,cb,ca){var b4=0,b3=e.length,b6=b9==null;if(bJ.type(b9)==="object"){b5=true;
for(b4 in b9){bJ.access(e,b7,b4,b9[b4],true,cb,ca);}}else{if(b8!==aG){b5=true;if(!bJ.isFunction(b8)){ca=true;}if(b6){if(ca){b7.call(e,b8);b7=null;}else{b6=b7;b7=function(cd,cc,ce){return b6.call(bJ(cd),ce);};}}if(b7){for(;b4<b3;b4++){b7(e[b4],b9,ca?b8:b8.call(e[b4],b4,b7(e[b4],b9)));}}}}return b5?e:b6?b7.call(e):b3?b7(e[0],b9):cb;},now:function(){return(new Date()).getTime();}});bJ.ready.promise=function(b6){if(!ai){ai=bJ.Deferred();
if(l.readyState==="complete"){setTimeout(bJ.ready);}else{if(l.addEventListener){l.addEventListener("DOMContentLoaded",bW,false);a2.addEventListener("load",bW,false);}else{l.attachEvent("onreadystatechange",bW);a2.attachEvent("onload",bW);var b5=false;try{b5=a2.frameElement==null&&l.documentElement;}catch(b4){}if(b5&&b5.doScroll){(function b3(){if(!bJ.isReady){try{b5.doScroll("left");}catch(b7){return setTimeout(b3,50);
}bl();bJ.ready();}})();}}}}return ai.promise(b6);};bJ.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(b3,e){aa["[object "+e+"]"]=e.toLowerCase();});function ab(b4){var b3=b4.length,e=bJ.type(b4);if(bJ.isWindow(b4)){return false;}if(b4.nodeType===1&&b3){return true;}return e==="array"||e!=="function"&&(b3===0||typeof b3==="number"&&b3>0&&(b3-1) in b4);}w=bJ(l);
var bY={};function ae(b3){var e=bY[b3]={};bJ.each(b3.match(ac)||[],function(b5,b4){e[b4]=true;});return e;}bJ.Callbacks=function(cc){cc=typeof cc==="string"?(bY[cc]||ae(cc)):bJ.extend({},cc);var b6,b5,e,b7,b8,b4,b9=[],ca=!cc.once&&[],b3=function(cd){b5=cc.memory&&cd;e=true;b8=b4||0;b4=0;b7=b9.length;b6=true;for(;b9&&b8<b7;b8++){if(b9[b8].apply(cd[0],cd[1])===false&&cc.stopOnFalse){b5=false;break;}}b6=false;
if(b9){if(ca){if(ca.length){b3(ca.shift());}}else{if(b5){b9=[];}else{cb.disable();}}}},cb={add:function(){if(b9){var ce=b9.length;(function cd(cf){bJ.each(cf,function(ch,cg){var ci=bJ.type(cg);if(ci==="function"){if(!cc.unique||!cb.has(cg)){b9.push(cg);}}else{if(cg&&cg.length&&ci!=="string"){cd(cg);}}});})(arguments);if(b6){b7=b9.length;}else{if(b5){b4=ce;b3(b5);}}}return this;},remove:function(){if(b9){bJ.each(arguments,function(cf,cd){var ce;
while((ce=bJ.inArray(cd,b9,ce))>-1){b9.splice(ce,1);if(b6){if(ce<=b7){b7--;}if(ce<=b8){b8--;}}}});}return this;},has:function(cd){return cd?bJ.inArray(cd,b9)>-1:!!(b9&&b9.length);},empty:function(){b9=[];return this;},disable:function(){b9=ca=b5=aG;return this;},disabled:function(){return !b9;},lock:function(){ca=aG;if(!b5){cb.disable();}return this;},locked:function(){return !ca;},fireWith:function(ce,cd){cd=cd||[];
cd=[ce,cd.slice?cd.slice():cd];if(b9&&(!e||ca)){if(b6){ca.push(cd);}else{b3(cd);}}return this;},fire:function(){cb.fireWith(this,arguments);return this;},fired:function(){return !!e;}};return cb;};bJ.extend({Deferred:function(b4){var b3=[["resolve","done",bJ.Callbacks("once memory"),"resolved"],["reject","fail",bJ.Callbacks("once memory"),"rejected"],["notify","progress",bJ.Callbacks("memory")]],b5="pending",b6={state:function(){return b5;
},always:function(){e.done(arguments).fail(arguments);return this;},then:function(){var b7=arguments;return bJ.Deferred(function(b8){bJ.each(b3,function(ca,b9){var cc=b9[0],cb=bJ.isFunction(b7[ca])&&b7[ca];e[b9[1]](function(){var cd=cb&&cb.apply(this,arguments);if(cd&&bJ.isFunction(cd.promise)){cd.promise().done(b8.resolve).fail(b8.reject).progress(b8.notify);}else{b8[cc+"With"](this===b6?b8.promise():this,cb?[cd]:arguments);
}});});b7=null;}).promise();},promise:function(b7){return b7!=null?bJ.extend(b7,b6):b6;}},e={};b6.pipe=b6.then;bJ.each(b3,function(b8,b7){var ca=b7[2],b9=b7[3];b6[b7[1]]=ca.add;if(b9){ca.add(function(){b5=b9;},b3[b8^1][2].disable,b3[2][2].lock);}e[b7[0]]=function(){e[b7[0]+"With"](this===e?b6:this,arguments);return this;};e[b7[0]+"With"]=ca.fireWith;});b6.promise(e);if(b4){b4.call(e,e);}return e;},when:function(b6){var b4=0,b8=a4.call(arguments),e=b8.length,b3=e!==1||(b6&&bJ.isFunction(b6.promise))?e:0,cb=b3===1?b6:bJ.Deferred(),b5=function(cd,ce,cc){return function(cf){ce[cd]=this;
cc[cd]=arguments.length>1?a4.call(arguments):cf;if(cc===ca){cb.notifyWith(ce,cc);}else{if(!(--b3)){cb.resolveWith(ce,cc);}}};},ca,b7,b9;if(e>1){ca=new Array(e);b7=new Array(e);b9=new Array(e);for(;b4<e;b4++){if(b8[b4]&&bJ.isFunction(b8[b4].promise)){b8[b4].promise().done(b5(b4,b9,b8)).fail(cb.reject).progress(b5(b4,b7,ca));}else{--b3;}}}if(!b3){cb.resolveWith(b9,b8);}return cb.promise();}});bJ.support=(function(){var ce,cd,cb,ca,cc,b9,b5,b7,b4,b6,b3=l.createElement("div");
b3.setAttribute("className","t");b3.innerHTML="  <link/><table></table><a href='/a'>a</a><input type='checkbox'/>";cd=b3.getElementsByTagName("*");cb=b3.getElementsByTagName("a")[0];if(!cd||!cb||!cd.length){return{};}cc=l.createElement("select");b5=cc.appendChild(l.createElement("option"));ca=b3.getElementsByTagName("input")[0];cb.style.cssText="top:1px;float:left;opacity:.5";ce={getSetAttribute:b3.className!=="t",leadingWhitespace:b3.firstChild.nodeType===3,tbody:!b3.getElementsByTagName("tbody").length,htmlSerialize:!!b3.getElementsByTagName("link").length,style:/top/.test(cb.getAttribute("style")),hrefNormalized:cb.getAttribute("href")==="/a",opacity:/^0.5/.test(cb.style.opacity),cssFloat:!!cb.style.cssFloat,checkOn:!!ca.value,optSelected:b5.selected,enctype:!!l.createElement("form").enctype,html5Clone:l.createElement("nav").cloneNode(true).outerHTML!=="<:nav></:nav>",boxModel:l.compatMode==="CSS1Compat",deleteExpando:true,noCloneEvent:true,inlineBlockNeedsLayout:false,shrinkWrapBlocks:false,reliableMarginRight:true,boxSizingReliable:true,pixelPosition:false};
ca.checked=true;ce.noCloneChecked=ca.cloneNode(true).checked;cc.disabled=true;ce.optDisabled=!b5.disabled;try{delete b3.test;}catch(b8){ce.deleteExpando=false;}ca=l.createElement("input");ca.setAttribute("value","");ce.input=ca.getAttribute("value")==="";ca.value="t";ca.setAttribute("type","radio");ce.radioValue=ca.value==="t";ca.setAttribute("checked","t");ca.setAttribute("name","t");b9=l.createDocumentFragment();
b9.appendChild(ca);ce.appendChecked=ca.checked;ce.checkClone=b9.cloneNode(true).cloneNode(true).lastChild.checked;if(b3.attachEvent){b3.attachEvent("onclick",function(){ce.noCloneEvent=false;});b3.cloneNode(true).click();}for(b6 in {submit:true,change:true,focusin:true}){b3.setAttribute(b7="on"+b6,"t");ce[b6+"Bubbles"]=b7 in a2||b3.attributes[b7].expando===false;}b3.style.backgroundClip="content-box";
b3.cloneNode(true).style.backgroundClip="";ce.clearCloneStyle=b3.style.backgroundClip==="content-box";bJ(function(){var cf,ci,ch,cg="padding:0;margin:0;border:0;display:block;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;",e=l.getElementsByTagName("body")[0];if(!e){return;}cf=l.createElement("div");cf.style.cssText="border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px";
e.appendChild(cf).appendChild(b3);b3.innerHTML="<table><tr><td></td><td>t</td></tr></table>";ch=b3.getElementsByTagName("td");ch[0].style.cssText="padding:0;margin:0;border:0;display:none";b4=(ch[0].offsetHeight===0);ch[0].style.display="";ch[1].style.display="none";ce.reliableHiddenOffsets=b4&&(ch[0].offsetHeight===0);b3.innerHTML="";b3.style.cssText="box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;";
ce.boxSizing=(b3.offsetWidth===4);ce.doesNotIncludeMarginInBodyOffset=(e.offsetTop!==1);if(a2.getComputedStyle){ce.pixelPosition=(a2.getComputedStyle(b3,null)||{}).top!=="1%";ce.boxSizingReliable=(a2.getComputedStyle(b3,null)||{width:"4px"}).width==="4px";ci=b3.appendChild(l.createElement("div"));ci.style.cssText=b3.style.cssText=cg;ci.style.marginRight=ci.style.width="0";b3.style.width="1px";ce.reliableMarginRight=!parseFloat((a2.getComputedStyle(ci,null)||{}).marginRight);
}if(typeof b3.style.zoom!==aC){b3.innerHTML="";b3.style.cssText=cg+"width:1px;padding:1px;display:inline;zoom:1";ce.inlineBlockNeedsLayout=(b3.offsetWidth===3);b3.style.display="block";b3.innerHTML="<div></div>";b3.firstChild.style.width="5px";ce.shrinkWrapBlocks=(b3.offsetWidth!==3);if(ce.inlineBlockNeedsLayout){e.style.zoom=1;}}e.removeChild(cf);cf=b3=ch=ci=null;});cd=cc=b9=b5=cb=ca=null;return ce;
})();var bw=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,aN=/([A-Z])/g;function ba(b5,b3,b7,b6){if(!bJ.acceptData(b5)){return;}var b8,ca,cb=bJ.expando,b9=typeof b3==="string",cc=b5.nodeType,e=cc?bJ.cache:b5,b4=cc?b5[cb]:b5[cb]&&cb;if((!b4||!e[b4]||(!b6&&!e[b4].data))&&b9&&b7===aG){return;}if(!b4){if(cc){b5[cb]=b4=a6.pop()||bJ.guid++;}else{b4=cb;}}if(!e[b4]){e[b4]={};if(!cc){e[b4].toJSON=bJ.noop;}}if(typeof b3==="object"||typeof b3==="function"){if(b6){e[b4]=bJ.extend(e[b4],b3);
}else{e[b4].data=bJ.extend(e[b4].data,b3);}}b8=e[b4];if(!b6){if(!b8.data){b8.data={};}b8=b8.data;}if(b7!==aG){b8[bJ.camelCase(b3)]=b7;}if(b9){ca=b8[b3];if(ca==null){ca=b8[bJ.camelCase(b3)];}}else{ca=b8;}return ca;}function Z(b5,b3,b6){if(!bJ.acceptData(b5)){return;}var b8,b7,b9,ca=b5.nodeType,e=ca?bJ.cache:b5,b4=ca?b5[bJ.expando]:bJ.expando;if(!e[b4]){return;}if(b3){b9=b6?e[b4]:e[b4].data;if(b9){if(!bJ.isArray(b3)){if(b3 in b9){b3=[b3];
}else{b3=bJ.camelCase(b3);if(b3 in b9){b3=[b3];}else{b3=b3.split(" ");}}}else{b3=b3.concat(bJ.map(b3,bJ.camelCase));}for(b8=0,b7=b3.length;b8<b7;b8++){delete b9[b3[b8]];}if(!(b6?N:bJ.isEmptyObject)(b9)){return;}}}if(!b6){delete e[b4].data;if(!N(e[b4])){return;}}if(ca){bJ.cleanData([b5],true);}else{if(bJ.support.deleteExpando||e!=e.window){delete e[b4];}else{e[b4]=null;}}}bJ.extend({cache:{},expando:"jQuery"+(s+Math.random()).replace(/\D/g,""),noData:{embed:true,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:true},hasData:function(e){e=e.nodeType?bJ.cache[e[bJ.expando]]:e[bJ.expando];
return !!e&&!N(e);},data:function(b3,e,b4){return ba(b3,e,b4);},removeData:function(b3,e){return Z(b3,e);},_data:function(b3,e,b4){return ba(b3,e,b4,true);},_removeData:function(b3,e){return Z(b3,e,true);},acceptData:function(b3){if(b3.nodeType&&b3.nodeType!==1&&b3.nodeType!==9){return false;}var e=b3.nodeName&&bJ.noData[b3.nodeName.toLowerCase()];return !e||e!==true&&b3.getAttribute("classid")===e;
}});bJ.fn.extend({data:function(b5,b8){var b3,e,b6=this[0],b4=0,b7=null;if(b5===aG){if(this.length){b7=bJ.data(b6);if(b6.nodeType===1&&!bJ._data(b6,"parsedAttrs")){b3=b6.attributes;for(;b4<b3.length;b4++){e=b3[b4].name;if(!e.indexOf("data-")){e=bJ.camelCase(e.slice(5));by(b6,e,b7[e]);}}bJ._data(b6,"parsedAttrs",true);}}return b7;}if(typeof b5==="object"){return this.each(function(){bJ.data(this,b5);
});}return bJ.access(this,function(b9){if(b9===aG){return b6?by(b6,b5,bJ.data(b6,b5)):null;}this.each(function(){bJ.data(this,b5,b9);});},null,b8,arguments.length>1,null,true);},removeData:function(e){return this.each(function(){bJ.removeData(this,e);});}});function by(b5,b4,b6){if(b6===aG&&b5.nodeType===1){var b3="data-"+b4.replace(aN,"-$1").toLowerCase();b6=b5.getAttribute(b3);if(typeof b6==="string"){try{b6=b6==="true"?true:b6==="false"?false:b6==="null"?null:+b6+""===b6?+b6:bw.test(b6)?bJ.parseJSON(b6):b6;
}catch(b7){}bJ.data(b5,b4,b6);}else{b6=aG;}}return b6;}function N(b3){var e;for(e in b3){if(e==="data"&&bJ.isEmptyObject(b3[e])){continue;}if(e!=="toJSON"){return false;}}return true;}bJ.extend({queue:function(b4,b3,b5){var e;if(b4){b3=(b3||"fx")+"queue";e=bJ._data(b4,b3);if(b5){if(!e||bJ.isArray(b5)){e=bJ._data(b4,b3,bJ.makeArray(b5));}else{e.push(b5);}}return e||[];}},dequeue:function(b7,b6){b6=b6||"fx";
var b3=bJ.queue(b7,b6),b8=b3.length,b5=b3.shift(),e=bJ._queueHooks(b7,b6),b4=function(){bJ.dequeue(b7,b6);};if(b5==="inprogress"){b5=b3.shift();b8--;}e.cur=b5;if(b5){if(b6==="fx"){b3.unshift("inprogress");}delete e.stop;b5.call(b7,b4,e);}if(!b8&&e){e.empty.fire();}},_queueHooks:function(b4,b3){var e=b3+"queueHooks";return bJ._data(b4,e)||bJ._data(b4,e,{empty:bJ.Callbacks("once memory").add(function(){bJ._removeData(b4,b3+"queue");
bJ._removeData(b4,e);})});}});bJ.fn.extend({queue:function(e,b3){var b4=2;if(typeof e!=="string"){b3=e;e="fx";b4--;}if(arguments.length<b4){return bJ.queue(this[0],e);}return b3===aG?this:this.each(function(){var b5=bJ.queue(this,e,b3);bJ._queueHooks(this,e);if(e==="fx"&&b5[0]!=="inprogress"){bJ.dequeue(this,e);}});},dequeue:function(e){return this.each(function(){bJ.dequeue(this,e);});},delay:function(b3,e){b3=bJ.fx?bJ.fx.speeds[b3]||b3:b3;
e=e||"fx";return this.queue(e,function(b5,b4){var b6=setTimeout(b5,b3);b4.stop=function(){clearTimeout(b6);};});},clearQueue:function(e){return this.queue(e||"fx",[]);},promise:function(b4,b8){var b3,b5=1,b9=bJ.Deferred(),b7=this,e=this.length,b6=function(){if(!(--b5)){b9.resolveWith(b7,[b7]);}};if(typeof b4!=="string"){b8=b4;b4=aG;}b4=b4||"fx";while(e--){b3=bJ._data(b7[e],b4+"queueHooks");if(b3&&b3.empty){b5++;
b3.empty.add(b6);}}b6();return b9.promise(b8);}});var a8,bZ,bM=/[\t\r\n]/g,ak=/\r/g,aF=/^(?:input|select|textarea|button|object)$/i,D=/^(?:a|area)$/i,L=/^(?:checked|selected|autofocus|autoplay|async|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped)$/i,aq=/^(?:checked|selected)$/i,bP=bJ.support.getSetAttribute,bF=bJ.support.input;bJ.fn.extend({attr:function(e,b3){return bJ.access(this,bJ.attr,e,b3,arguments.length>1);
},removeAttr:function(e){return this.each(function(){bJ.removeAttr(this,e);});},prop:function(e,b3){return bJ.access(this,bJ.prop,e,b3,arguments.length>1);},removeProp:function(e){e=bJ.propFix[e]||e;return this.each(function(){try{this[e]=aG;delete this[e];}catch(b3){}});},addClass:function(b9){var b3,e,ca,b6,b4,b5=0,b7=this.length,b8=typeof b9==="string"&&b9;if(bJ.isFunction(b9)){return this.each(function(cb){bJ(this).addClass(b9.call(this,cb,this.className));
});}if(b8){b3=(b9||"").match(ac)||[];for(;b5<b7;b5++){e=this[b5];ca=e.nodeType===1&&(e.className?(" "+e.className+" ").replace(bM," "):" ");if(ca){b4=0;while((b6=b3[b4++])){if(ca.indexOf(" "+b6+" ")<0){ca+=b6+" ";}}e.className=bJ.trim(ca);}}}return this;},removeClass:function(b9){var b3,e,ca,b6,b4,b5=0,b7=this.length,b8=arguments.length===0||typeof b9==="string"&&b9;if(bJ.isFunction(b9)){return this.each(function(cb){bJ(this).removeClass(b9.call(this,cb,this.className));
});}if(b8){b3=(b9||"").match(ac)||[];for(;b5<b7;b5++){e=this[b5];ca=e.nodeType===1&&(e.className?(" "+e.className+" ").replace(bM," "):"");if(ca){b4=0;while((b6=b3[b4++])){while(ca.indexOf(" "+b6+" ")>=0){ca=ca.replace(" "+b6+" "," ");}}e.className=b9?bJ.trim(ca):"";}}}return this;},toggleClass:function(b5,b3){var b4=typeof b5,e=typeof b3==="boolean";if(bJ.isFunction(b5)){return this.each(function(b6){bJ(this).toggleClass(b5.call(this,b6,this.className,b3),b3);
});}return this.each(function(){if(b4==="string"){var b8,b7=0,b6=bJ(this),b9=b3,ca=b5.match(ac)||[];while((b8=ca[b7++])){b9=e?b9:!b6.hasClass(b8);b6[b9?"addClass":"removeClass"](b8);}}else{if(b4===aC||b4==="boolean"){if(this.className){bJ._data(this,"__className__",this.className);}this.className=this.className||b5===false?"":bJ._data(this,"__className__")||"";}}});},hasClass:function(e){var b5=" "+e+" ",b4=0,b3=this.length;
for(;b4<b3;b4++){if(this[b4].nodeType===1&&(" "+this[b4].className+" ").replace(bM," ").indexOf(b5)>=0){return true;}}return false;},val:function(b5){var b3,e,b6,b4=this[0];if(!arguments.length){if(b4){e=bJ.valHooks[b4.type]||bJ.valHooks[b4.nodeName.toLowerCase()];if(e&&"get" in e&&(b3=e.get(b4,"value"))!==aG){return b3;}b3=b4.value;return typeof b3==="string"?b3.replace(ak,""):b3==null?"":b3;}return;
}b6=bJ.isFunction(b5);return this.each(function(b8){var b9,b7=bJ(this);if(this.nodeType!==1){return;}if(b6){b9=b5.call(this,b8,b7.val());}else{b9=b5;}if(b9==null){b9="";}else{if(typeof b9==="number"){b9+="";}else{if(bJ.isArray(b9)){b9=bJ.map(b9,function(ca){return ca==null?"":ca+"";});}}}e=bJ.valHooks[this.type]||bJ.valHooks[this.nodeName.toLowerCase()];if(!e||!("set" in e)||e.set(this,b9,"value")===aG){this.value=b9;
}});}});bJ.extend({valHooks:{option:{get:function(e){var b3=e.attributes.value;return !b3||b3.specified?e.value:e.text;}},select:{get:function(e){var b8,b4,ca=e.options,b6=e.selectedIndex,b5=e.type==="select-one"||b6<0,b9=b5?null:[],b7=b5?b6+1:ca.length,b3=b6<0?b7:b5?b6:0;for(;b3<b7;b3++){b4=ca[b3];if((b4.selected||b3===b6)&&(bJ.support.optDisabled?!b4.disabled:b4.getAttribute("disabled")===null)&&(!b4.parentNode.disabled||!bJ.nodeName(b4.parentNode,"optgroup"))){b8=bJ(b4).val();
if(b5){return b8;}b9.push(b8);}}return b9;},set:function(b3,b4){var e=bJ.makeArray(b4);bJ(b3).find("option").each(function(){this.selected=bJ.inArray(bJ(this).val(),e)>=0;});if(!e.length){b3.selectedIndex=-1;}return e;}}},attr:function(b7,b5,b8){var e,b6,b4,b3=b7.nodeType;if(!b7||b3===3||b3===8||b3===2){return;}if(typeof b7.getAttribute===aC){return bJ.prop(b7,b5,b8);}b6=b3!==1||!bJ.isXMLDoc(b7);if(b6){b5=b5.toLowerCase();
e=bJ.attrHooks[b5]||(L.test(b5)?bZ:a8);}if(b8!==aG){if(b8===null){bJ.removeAttr(b7,b5);}else{if(e&&b6&&"set" in e&&(b4=e.set(b7,b8,b5))!==aG){return b4;}else{b7.setAttribute(b5,b8+"");return b8;}}}else{if(e&&b6&&"get" in e&&(b4=e.get(b7,b5))!==null){return b4;}else{if(typeof b7.getAttribute!==aC){b4=b7.getAttribute(b5);}return b4==null?aG:b4;}}},removeAttr:function(b4,b6){var e,b5,b3=0,b7=b6&&b6.match(ac);
if(b7&&b4.nodeType===1){while((e=b7[b3++])){b5=bJ.propFix[e]||e;if(L.test(e)){if(!bP&&aq.test(e)){b4[bJ.camelCase("default-"+e)]=b4[b5]=false;}else{b4[b5]=false;}}else{bJ.attr(b4,e,"");}b4.removeAttribute(bP?e:b5);}}},attrHooks:{type:{set:function(e,b3){if(!bJ.support.radioValue&&b3==="radio"&&bJ.nodeName(e,"input")){var b4=e.value;e.setAttribute("type",b3);if(b4){e.value=b4;}return b3;}}}},propFix:{tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},prop:function(b7,b5,b8){var b4,e,b6,b3=b7.nodeType;
if(!b7||b3===3||b3===8||b3===2){return;}b6=b3!==1||!bJ.isXMLDoc(b7);if(b6){b5=bJ.propFix[b5]||b5;e=bJ.propHooks[b5];}if(b8!==aG){if(e&&"set" in e&&(b4=e.set(b7,b8,b5))!==aG){return b4;}else{return(b7[b5]=b8);}}else{if(e&&"get" in e&&(b4=e.get(b7,b5))!==null){return b4;}else{return b7[b5];}}},propHooks:{tabIndex:{get:function(b3){var e=b3.getAttributeNode("tabindex");return e&&e.specified?parseInt(e.value,10):aF.test(b3.nodeName)||D.test(b3.nodeName)&&b3.href?0:aG;
}}}});bZ={get:function(b5,b3){var b6=bJ.prop(b5,b3),e=typeof b6==="boolean"&&b5.getAttribute(b3),b4=typeof b6==="boolean"?bF&&bP?e!=null:aq.test(b3)?b5[bJ.camelCase("default-"+b3)]:!!e:b5.getAttributeNode(b3);return b4&&b4.value!==false?b3.toLowerCase():aG;},set:function(b3,b4,e){if(b4===false){bJ.removeAttr(b3,e);}else{if(bF&&bP||!aq.test(e)){b3.setAttribute(!bP&&bJ.propFix[e]||e,e);}else{b3[bJ.camelCase("default-"+e)]=b3[e]=true;
}}return e;}};if(!bF||!bP){bJ.attrHooks.value={get:function(b4,b3){var e=b4.getAttributeNode(b3);return bJ.nodeName(b4,"input")?b4.defaultValue:e&&e.specified?e.value:aG;},set:function(b3,b4,e){if(bJ.nodeName(b3,"input")){b3.defaultValue=b4;}else{return a8&&a8.set(b3,b4,e);}}};}if(!bP){a8=bJ.valHooks.button={get:function(b4,b3){var e=b4.getAttributeNode(b3);return e&&(b3==="id"||b3==="name"||b3==="coords"?e.value!=="":e.specified)?e.value:aG;
},set:function(b4,b5,b3){var e=b4.getAttributeNode(b3);if(!e){b4.setAttributeNode((e=b4.ownerDocument.createAttribute(b3)));}e.value=b5+="";return b3==="value"||b5===b4.getAttribute(b3)?b5:aG;}};bJ.attrHooks.contenteditable={get:a8.get,set:function(b3,b4,e){a8.set(b3,b4===""?false:b4,e);}};bJ.each(["width","height"],function(b3,e){bJ.attrHooks[e]=bJ.extend(bJ.attrHooks[e],{set:function(b4,b5){if(b5===""){b4.setAttribute(e,"auto");
return b5;}}});});}if(!bJ.support.hrefNormalized){bJ.each(["href","src","width","height"],function(b3,e){bJ.attrHooks[e]=bJ.extend(bJ.attrHooks[e],{get:function(b5){var b4=b5.getAttribute(e,2);return b4==null?aG:b4;}});});bJ.each(["href","src"],function(b3,e){bJ.propHooks[e]={get:function(b4){return b4.getAttribute(e,4);}};});}if(!bJ.support.style){bJ.attrHooks.style={get:function(e){return e.style.cssText||aG;
},set:function(e,b3){return(e.style.cssText=b3+"");}};}if(!bJ.support.optSelected){bJ.propHooks.selected=bJ.extend(bJ.propHooks.selected,{get:function(b3){var e=b3.parentNode;if(e){e.selectedIndex;if(e.parentNode){e.parentNode.selectedIndex;}}return null;}});}if(!bJ.support.enctype){bJ.propFix.enctype="encoding";}if(!bJ.support.checkOn){bJ.each(["radio","checkbox"],function(){bJ.valHooks[this]={get:function(e){return e.getAttribute("value")===null?"on":e.value;
}};});}bJ.each(["radio","checkbox"],function(){bJ.valHooks[this]=bJ.extend(bJ.valHooks[this],{set:function(e,b3){if(bJ.isArray(b3)){return(e.checked=bJ.inArray(bJ(e).val(),b3)>=0);}}});});var bH=/^(?:input|select|textarea)$/i,a3=/^key/,bN=/^(?:mouse|contextmenu)|click/,bB=/^(?:focusinfocus|focusoutblur)$/,bu=/^([^.]*)(?:\.(.+)|)$/;function R(){return true;}function X(){return false;}bJ.event={global:{},add:function(b6,cb,cg,b8,b7){var b9,ch,ci,b4,cd,ca,cf,b5,ce,e,b3,cc=bJ._data(b6);
if(!cc){return;}if(cg.handler){b4=cg;cg=b4.handler;b7=b4.selector;}if(!cg.guid){cg.guid=bJ.guid++;}if(!(ch=cc.events)){ch=cc.events={};}if(!(ca=cc.handle)){ca=cc.handle=function(cj){return typeof bJ!==aC&&(!cj||bJ.event.triggered!==cj.type)?bJ.event.dispatch.apply(ca.elem,arguments):aG;};ca.elem=b6;}cb=(cb||"").match(ac)||[""];ci=cb.length;while(ci--){b9=bu.exec(cb[ci])||[];ce=b3=b9[1];e=(b9[2]||"").split(".").sort();
cd=bJ.event.special[ce]||{};ce=(b7?cd.delegateType:cd.bindType)||ce;cd=bJ.event.special[ce]||{};cf=bJ.extend({type:ce,origType:b3,data:b8,handler:cg,guid:cg.guid,selector:b7,needsContext:b7&&bJ.expr.match.needsContext.test(b7),namespace:e.join(".")},b4);if(!(b5=ch[ce])){b5=ch[ce]=[];b5.delegateCount=0;if(!cd.setup||cd.setup.call(b6,b8,e,ca)===false){if(b6.addEventListener){b6.addEventListener(ce,ca,false);
}else{if(b6.attachEvent){b6.attachEvent("on"+ce,ca);}}}}if(cd.add){cd.add.call(b6,cf);if(!cf.handler.guid){cf.handler.guid=cg.guid;}}if(b7){b5.splice(b5.delegateCount++,0,cf);}else{b5.push(cf);}bJ.event.global[ce]=true;}b6=null;},remove:function(b5,cb,ci,b6,ca){var b8,cf,b9,b7,ch,cg,cd,b4,ce,e,b3,cc=bJ.hasData(b5)&&bJ._data(b5);if(!cc||!(cg=cc.events)){return;}cb=(cb||"").match(ac)||[""];ch=cb.length;
while(ch--){b9=bu.exec(cb[ch])||[];ce=b3=b9[1];e=(b9[2]||"").split(".").sort();if(!ce){for(ce in cg){bJ.event.remove(b5,ce+cb[ch],ci,b6,true);}continue;}cd=bJ.event.special[ce]||{};ce=(b6?cd.delegateType:cd.bindType)||ce;b4=cg[ce]||[];b9=b9[2]&&new RegExp("(^|\\.)"+e.join("\\.(?:.*\\.|)")+"(\\.|$)");b7=b8=b4.length;while(b8--){cf=b4[b8];if((ca||b3===cf.origType)&&(!ci||ci.guid===cf.guid)&&(!b9||b9.test(cf.namespace))&&(!b6||b6===cf.selector||b6==="**"&&cf.selector)){b4.splice(b8,1);
if(cf.selector){b4.delegateCount--;}if(cd.remove){cd.remove.call(b5,cf);}}}if(b7&&!b4.length){if(!cd.teardown||cd.teardown.call(b5,e,cc.handle)===false){bJ.removeEvent(b5,ce,cc.handle);}delete cg[ce];}}if(bJ.isEmptyObject(cg)){delete cc.handle;bJ._removeData(b5,"events");}},trigger:function(b3,ca,b6,ch){var cb,b5,cf,cg,cd,b9,b8,b7=[b6||l],ce=V.call(b3,"type")?b3.type:b3,b4=V.call(b3,"namespace")?b3.namespace.split("."):[];
cf=b9=b6=b6||l;if(b6.nodeType===3||b6.nodeType===8){return;}if(bB.test(ce+bJ.event.triggered)){return;}if(ce.indexOf(".")>=0){b4=ce.split(".");ce=b4.shift();b4.sort();}b5=ce.indexOf(":")<0&&"on"+ce;b3=b3[bJ.expando]?b3:new bJ.Event(ce,typeof b3==="object"&&b3);b3.isTrigger=true;b3.namespace=b4.join(".");b3.namespace_re=b3.namespace?new RegExp("(^|\\.)"+b4.join("\\.(?:.*\\.|)")+"(\\.|$)"):null;b3.result=aG;
if(!b3.target){b3.target=b6;}ca=ca==null?[b3]:bJ.makeArray(ca,[b3]);cd=bJ.event.special[ce]||{};if(!ch&&cd.trigger&&cd.trigger.apply(b6,ca)===false){return;}if(!ch&&!cd.noBubble&&!bJ.isWindow(b6)){cg=cd.delegateType||ce;if(!bB.test(cg+ce)){cf=cf.parentNode;}for(;cf;cf=cf.parentNode){b7.push(cf);b9=cf;}if(b9===(b6.ownerDocument||l)){b7.push(b9.defaultView||b9.parentWindow||a2);}}b8=0;while((cf=b7[b8++])&&!b3.isPropagationStopped()){b3.type=b8>1?cg:cd.bindType||ce;
cb=(bJ._data(cf,"events")||{})[b3.type]&&bJ._data(cf,"handle");if(cb){cb.apply(cf,ca);}cb=b5&&cf[b5];if(cb&&bJ.acceptData(cf)&&cb.apply&&cb.apply(cf,ca)===false){b3.preventDefault();}}b3.type=ce;if(!ch&&!b3.isDefaultPrevented()){if((!cd._default||cd._default.apply(b6.ownerDocument,ca)===false)&&!(ce==="click"&&bJ.nodeName(b6,"a"))&&bJ.acceptData(b6)){if(b5&&b6[ce]&&!bJ.isWindow(b6)){b9=b6[b5];if(b9){b6[b5]=null;
}bJ.event.triggered=ce;try{b6[ce]();}catch(cc){}bJ.event.triggered=aG;if(b9){b6[b5]=b9;}}}}return b3.result;},dispatch:function(e){e=bJ.event.fix(e);var b6,b7,cb,b3,b5,ca=[],b9=a4.call(arguments),b4=(bJ._data(this,"events")||{})[e.type]||[],b8=bJ.event.special[e.type]||{};b9[0]=e;e.delegateTarget=this;if(b8.preDispatch&&b8.preDispatch.call(this,e)===false){return;}ca=bJ.event.handlers.call(this,e,b4);
b6=0;while((b3=ca[b6++])&&!e.isPropagationStopped()){e.currentTarget=b3.elem;b5=0;while((cb=b3.handlers[b5++])&&!e.isImmediatePropagationStopped()){if(!e.namespace_re||e.namespace_re.test(cb.namespace)){e.handleObj=cb;e.data=cb.data;b7=((bJ.event.special[cb.origType]||{}).handle||cb.handler).apply(b3.elem,b9);if(b7!==aG){if((e.result=b7)===false){e.preventDefault();e.stopPropagation();}}}}}if(b8.postDispatch){b8.postDispatch.call(this,e);
}return e.result;},handlers:function(e,b4){var b3,b9,b7,b6,b8=[],b5=b4.delegateCount,ca=e.target;if(b5&&ca.nodeType&&(!e.button||e.type!=="click")){for(;ca!=this;ca=ca.parentNode||this){if(ca.nodeType===1&&(ca.disabled!==true||e.type!=="click")){b7=[];for(b6=0;b6<b5;b6++){b9=b4[b6];b3=b9.selector+" ";if(b7[b3]===aG){b7[b3]=b9.needsContext?bJ(b3,this).index(ca)>=0:bJ.find(b3,this,null,[ca]).length;}if(b7[b3]){b7.push(b9);
}}if(b7.length){b8.push({elem:ca,handlers:b7});}}}}if(b5<b4.length){b8.push({elem:this,handlers:b4.slice(b5)});}return b8;},fix:function(b5){if(b5[bJ.expando]){return b5;}var b3,b8,b7,b4=b5.type,e=b5,b6=this.fixHooks[b4];if(!b6){this.fixHooks[b4]=b6=bN.test(b4)?this.mouseHooks:a3.test(b4)?this.keyHooks:{};}b7=b6.props?this.props.concat(b6.props):this.props;b5=new bJ.Event(e);b3=b7.length;while(b3--){b8=b7[b3];
b5[b8]=e[b8];}if(!b5.target){b5.target=e.srcElement||l;}if(b5.target.nodeType===3){b5.target=b5.target.parentNode;}b5.metaKey=!!b5.metaKey;return b6.filter?b6.filter(b5,e):b5;},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(b3,e){if(b3.which==null){b3.which=e.charCode!=null?e.charCode:e.keyCode;
}return b3;}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(b5,b4){var e,b6,b7,b3=b4.button,b8=b4.fromElement;if(b5.pageX==null&&b4.clientX!=null){b6=b5.target.ownerDocument||l;b7=b6.documentElement;e=b6.body;b5.pageX=b4.clientX+(b7&&b7.scrollLeft||e&&e.scrollLeft||0)-(b7&&b7.clientLeft||e&&e.clientLeft||0);
b5.pageY=b4.clientY+(b7&&b7.scrollTop||e&&e.scrollTop||0)-(b7&&b7.clientTop||e&&e.clientTop||0);}if(!b5.relatedTarget&&b8){b5.relatedTarget=b8===b5.target?b4.toElement:b8;}if(!b5.which&&b3!==aG){b5.which=(b3&1?1:(b3&2?3:(b3&4?2:0)));}return b5;}},special:{load:{noBubble:true},click:{trigger:function(){if(bJ.nodeName(this,"input")&&this.type==="checkbox"&&this.click){this.click();return false;}}},focus:{trigger:function(){if(this!==l.activeElement&&this.focus){try{this.focus();
return false;}catch(b3){}}},delegateType:"focusin"},blur:{trigger:function(){if(this===l.activeElement&&this.blur){this.blur();return false;}},delegateType:"focusout"},beforeunload:{postDispatch:function(e){if(e.result!==aG){e.originalEvent.returnValue=e.result;}}}},simulate:function(b4,b6,b5,b3){var b7=bJ.extend(new bJ.Event(),b5,{type:b4,isSimulated:true,originalEvent:{}});if(b3){bJ.event.trigger(b7,null,b6);
}else{bJ.event.dispatch.call(b6,b7);}if(b7.isDefaultPrevented()){b5.preventDefault();}}};bJ.removeEvent=l.removeEventListener?function(b3,e,b4){if(b3.removeEventListener){b3.removeEventListener(e,b4,false);}}:function(b4,b3,b5){var e="on"+b3;if(b4.detachEvent){if(typeof b4[e]===aC){b4[e]=null;}b4.detachEvent(e,b5);}};bJ.Event=function(b3,e){if(!(this instanceof bJ.Event)){return new bJ.Event(b3,e);
}if(b3&&b3.type){this.originalEvent=b3;this.type=b3.type;this.isDefaultPrevented=(b3.defaultPrevented||b3.returnValue===false||b3.getPreventDefault&&b3.getPreventDefault())?R:X;}else{this.type=b3;}if(e){bJ.extend(this,e);}this.timeStamp=b3&&b3.timeStamp||bJ.now();this[bJ.expando]=true;};bJ.Event.prototype={isDefaultPrevented:X,isPropagationStopped:X,isImmediatePropagationStopped:X,preventDefault:function(){var b3=this.originalEvent;
this.isDefaultPrevented=R;if(!b3){return;}if(b3.preventDefault){b3.preventDefault();}else{b3.returnValue=false;}},stopPropagation:function(){var b3=this.originalEvent;this.isPropagationStopped=R;if(!b3){return;}if(b3.stopPropagation){b3.stopPropagation();}b3.cancelBubble=true;},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=R;this.stopPropagation();}};bJ.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(b3,e){bJ.event.special[b3]={delegateType:e,bindType:e,handle:function(b6){var b4,b8=this,b7=b6.relatedTarget,b5=b6.handleObj;
if(!b7||(b7!==b8&&!bJ.contains(b8,b7))){b6.type=b5.origType;b4=b5.handler.apply(this,arguments);b6.type=e;}return b4;}};});if(!bJ.support.submitBubbles){bJ.event.special.submit={setup:function(){if(bJ.nodeName(this,"form")){return false;}bJ.event.add(this,"click._submit keypress._submit",function(b5){var b4=b5.target,b3=bJ.nodeName(b4,"input")||bJ.nodeName(b4,"button")?b4.form:aG;if(b3&&!bJ._data(b3,"submitBubbles")){bJ.event.add(b3,"submit._submit",function(e){e._submit_bubble=true;
});bJ._data(b3,"submitBubbles",true);}});},postDispatch:function(e){if(e._submit_bubble){delete e._submit_bubble;if(this.parentNode&&!e.isTrigger){bJ.event.simulate("submit",this.parentNode,e,true);}}},teardown:function(){if(bJ.nodeName(this,"form")){return false;}bJ.event.remove(this,"._submit");}};}if(!bJ.support.changeBubbles){bJ.event.special.change={setup:function(){if(bH.test(this.nodeName)){if(this.type==="checkbox"||this.type==="radio"){bJ.event.add(this,"propertychange._change",function(e){if(e.originalEvent.propertyName==="checked"){this._just_changed=true;
}});bJ.event.add(this,"click._change",function(e){if(this._just_changed&&!e.isTrigger){this._just_changed=false;}bJ.event.simulate("change",this,e,true);});}return false;}bJ.event.add(this,"beforeactivate._change",function(b4){var b3=b4.target;if(bH.test(b3.nodeName)&&!bJ._data(b3,"changeBubbles")){bJ.event.add(b3,"change._change",function(e){if(this.parentNode&&!e.isSimulated&&!e.isTrigger){bJ.event.simulate("change",this.parentNode,e,true);
}});bJ._data(b3,"changeBubbles",true);}});},handle:function(b3){var e=b3.target;if(this!==e||b3.isSimulated||b3.isTrigger||(e.type!=="radio"&&e.type!=="checkbox")){return b3.handleObj.handler.apply(this,arguments);}},teardown:function(){bJ.event.remove(this,"._change");return !bH.test(this.nodeName);}};}if(!bJ.support.focusinBubbles){bJ.each({focus:"focusin",blur:"focusout"},function(b5,e){var b3=0,b4=function(b6){bJ.event.simulate(e,b6.target,bJ.event.fix(b6),true);
};bJ.event.special[e]={setup:function(){if(b3++===0){l.addEventListener(b5,b4,true);}},teardown:function(){if(--b3===0){l.removeEventListener(b5,b4,true);}}};});}bJ.fn.extend({on:function(b4,e,b7,b6,b3){var b5,b8;if(typeof b4==="object"){if(typeof e!=="string"){b7=b7||e;e=aG;}for(b5 in b4){this.on(b5,e,b7,b4[b5],b3);}return this;}if(b7==null&&b6==null){b6=e;b7=e=aG;}else{if(b6==null){if(typeof e==="string"){b6=b7;
b7=aG;}else{b6=b7;b7=e;e=aG;}}}if(b6===false){b6=X;}else{if(!b6){return this;}}if(b3===1){b8=b6;b6=function(b9){bJ().off(b9);return b8.apply(this,arguments);};b6.guid=b8.guid||(b8.guid=bJ.guid++);}return this.each(function(){bJ.event.add(this,b4,b6,b7,e);});},one:function(b3,e,b5,b4){return this.on(b3,e,b5,b4,1);},off:function(b4,e,b6){var b3,b5;if(b4&&b4.preventDefault&&b4.handleObj){b3=b4.handleObj;
bJ(b4.delegateTarget).off(b3.namespace?b3.origType+"."+b3.namespace:b3.origType,b3.selector,b3.handler);return this;}if(typeof b4==="object"){for(b5 in b4){this.off(b5,e,b4[b5]);}return this;}if(e===false||typeof e==="function"){b6=e;e=aG;}if(b6===false){b6=X;}return this.each(function(){bJ.event.remove(this,b4,b6,e);});},bind:function(e,b4,b3){return this.on(e,null,b4,b3);},unbind:function(e,b3){return this.off(e,null,b3);
},delegate:function(e,b3,b5,b4){return this.on(b3,e,b5,b4);},undelegate:function(e,b3,b4){return arguments.length===1?this.off(e,"**"):this.off(b3,e||"**",b4);},trigger:function(e,b3){return this.each(function(){bJ.event.trigger(e,b3,this);});},triggerHandler:function(e,b4){var b3=this[0];if(b3){return bJ.event.trigger(e,b4,b3,true);}}});
/*
 * Sizzle CSS Selector Engine
 * Copyright 2012 jQuery Foundation and other contributors
 * Released under the MIT license
 * http://sizzlejs.com/
 */
(function(da,ch){var cx,cb,cn,cH,cJ,cS,cT,dg,cV,cB,co,cd,cZ,db,ca,cF,cD,c5="sizzle"+-(new Date()),cI=da.document,dd={},de=0,c0=0,b5=cz(),c4=cz(),cG=cz(),c9=typeof ch,cN=1<<31,c7=[],c8=c7.pop,b4=c7.push,cm=c7.slice,b9=c7.indexOf||function(di){var dh=0,e=this.length;
for(;dh<e;dh++){if(this[dh]===di){return dh;}}return -1;},cp="[\\x20\\t\\r\\n\\f]",b3="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",cK=b3.replace("w","w#"),ci="([*^$|!~]?=)",c2="\\["+cp+"*("+b3+")"+cp+"*(?:"+ci+cp+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+cK+")|)|)"+cp+"*\\]",ck=":("+b3+")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|"+c2.replace(3,8)+")*)|.*)\\)|)",cr=new RegExp("^"+cp+"+|((?:^|[^\\\\])(?:\\\\.)*)"+cp+"+$","g"),cu=new RegExp("^"+cp+"*,"+cp+"*"),cA=new RegExp("^"+cp+"*([\\x20\\t\\r\\n\\f>+~])"+cp+"*"),cP=new RegExp(ck),cQ=new RegExp("^"+cK+"$"),cY={ID:new RegExp("^#("+b3+")"),CLASS:new RegExp("^\\.("+b3+")"),NAME:new RegExp("^\\[name=['\"]?("+b3+")['\"]?\\]"),TAG:new RegExp("^("+b3.replace("w","w*")+")"),ATTR:new RegExp("^"+c2),PSEUDO:new RegExp("^"+ck),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+cp+"*(even|odd|(([+-]|)(\\d*)n|)"+cp+"*(?:([+-]|)"+cp+"*(\\d+)|))"+cp+"*\\)|)","i"),needsContext:new RegExp("^"+cp+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+cp+"*((?:-\\d)?\\d*)"+cp+"*\\)|)(?=[^-]|$)","i")},cW=/[\x20\t\r\n\f]*[+~]/,cM=/^[^{]+\{\s*\[native code/,cO=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,b8=/^(?:input|select|textarea|button)$/i,cl=/^h\d$/i,cL=/'|\\/g,ct=/\=[\x20\t\r\n\f]*([^'"\]]*)[\x20\t\r\n\f]*\]/g,cs=/\\([\da-fA-F]{1,6}[\x20\t\r\n\f]?|.)/g,c1=function(e,di){var dh="0x"+di-65536;
return dh!==dh?di:dh<0?String.fromCharCode(dh+65536):String.fromCharCode(dh>>10|55296,dh&1023|56320);};try{cm.call(cI.documentElement.childNodes,0)[0].nodeType;}catch(cC){cm=function(dh){var di,e=[];while((di=this[dh++])){e.push(di);}return e;};}function cE(e){return cM.test(e+"");}function cz(){var e,dh=[];return(e=function(di,dj){if(dh.push(di+=" ")>cn.cacheLength){delete e[dh.shift()];}return(e[di]=dj);
});}function cj(e){e[c5]=true;return e;}function cc(dh){var dj=cB.createElement("div");try{return dh(dj);}catch(di){return false;}finally{dj=null;}}function cv(dp,dh,dt,dv){var du,dl,dm,dr,ds,dk,dj,e,di,dq;if((dh?dh.ownerDocument||dh:cI)!==cB){cV(dh);}dh=dh||cB;dt=dt||[];if(!dp||typeof dp!=="string"){return dt;}if((dr=dh.nodeType)!==1&&dr!==9){return[];}if(!cd&&!dv){if((du=cO.exec(dp))){if((dm=du[1])){if(dr===9){dl=dh.getElementById(dm);
if(dl&&dl.parentNode){if(dl.id===dm){dt.push(dl);return dt;}}else{return dt;}}else{if(dh.ownerDocument&&(dl=dh.ownerDocument.getElementById(dm))&&cF(dh,dl)&&dl.id===dm){dt.push(dl);return dt;}}}else{if(du[2]){b4.apply(dt,cm.call(dh.getElementsByTagName(dp),0));return dt;}else{if((dm=du[3])&&dd.getByClassName&&dh.getElementsByClassName){b4.apply(dt,cm.call(dh.getElementsByClassName(dm),0));return dt;
}}}}if(dd.qsa&&!cZ.test(dp)){dj=true;e=c5;di=dh;dq=dr===9&&dp;if(dr===1&&dh.nodeName.toLowerCase()!=="object"){dk=cf(dp);if((dj=dh.getAttribute("id"))){e=dj.replace(cL,"\\$&");}else{dh.setAttribute("id",e);}e="[id='"+e+"'] ";ds=dk.length;while(ds--){dk[ds]=e+cg(dk[ds]);}di=cW.test(dp)&&dh.parentNode||dh;dq=dk.join(",");}if(dq){try{b4.apply(dt,cm.call(di.querySelectorAll(dq),0));return dt;}catch(dn){}finally{if(!dj){dh.removeAttribute("id");
}}}}}return dc(dp.replace(cr,"$1"),dh,dt,dv);}cJ=cv.isXML=function(e){var dh=e&&(e.ownerDocument||e).documentElement;return dh?dh.nodeName!=="HTML":false;};cV=cv.setDocument=function(e){var dh=e?e.ownerDocument||e:cI;if(dh===cB||dh.nodeType!==9||!dh.documentElement){return cB;}cB=dh;co=dh.documentElement;cd=cJ(dh);dd.tagNameNoComments=cc(function(di){di.appendChild(dh.createComment(""));return !di.getElementsByTagName("*").length;
});dd.attributes=cc(function(dj){dj.innerHTML="<select></select>";var di=typeof dj.lastChild.getAttribute("multiple");return di!=="boolean"&&di!=="string";});dd.getByClassName=cc(function(di){di.innerHTML="<div class='hidden e'></div><div class='hidden'></div>";if(!di.getElementsByClassName||!di.getElementsByClassName("e").length){return false;}di.lastChild.className="e";return di.getElementsByClassName("e").length===2;
});dd.getByName=cc(function(dj){dj.id=c5+0;dj.innerHTML="<a name='"+c5+"'></a><div name='"+c5+"'></div>";co.insertBefore(dj,co.firstChild);var di=dh.getElementsByName&&dh.getElementsByName(c5).length===2+dh.getElementsByName(c5+0).length;dd.getIdNotName=!dh.getElementById(c5);co.removeChild(dj);return di;});cn.attrHandle=cc(function(di){di.innerHTML="<a href='#'></a>";return di.firstChild&&typeof di.firstChild.getAttribute!==c9&&di.firstChild.getAttribute("href")==="#";
})?{}:{href:function(di){return di.getAttribute("href",2);},type:function(di){return di.getAttribute("type");}};if(dd.getIdNotName){cn.find.ID=function(dk,dj){if(typeof dj.getElementById!==c9&&!cd){var di=dj.getElementById(dk);return di&&di.parentNode?[di]:[];}};cn.filter.ID=function(dj){var di=dj.replace(cs,c1);return function(dk){return dk.getAttribute("id")===di;};};}else{cn.find.ID=function(dk,dj){if(typeof dj.getElementById!==c9&&!cd){var di=dj.getElementById(dk);
return di?di.id===dk||typeof di.getAttributeNode!==c9&&di.getAttributeNode("id").value===dk?[di]:ch:[];}};cn.filter.ID=function(dj){var di=dj.replace(cs,c1);return function(dl){var dk=typeof dl.getAttributeNode!==c9&&dl.getAttributeNode("id");return dk&&dk.value===di;};};}cn.find.TAG=dd.tagNameNoComments?function(di,dj){if(typeof dj.getElementsByTagName!==c9){return dj.getElementsByTagName(di);}}:function(di,dm){var dn,dl=[],dk=0,dj=dm.getElementsByTagName(di);
if(di==="*"){while((dn=dj[dk++])){if(dn.nodeType===1){dl.push(dn);}}return dl;}return dj;};cn.find.NAME=dd.getByName&&function(di,dj){if(typeof dj.getElementsByName!==c9){return dj.getElementsByName(name);}};cn.find.CLASS=dd.getByClassName&&function(dj,di){if(typeof di.getElementsByClassName!==c9&&!cd){return di.getElementsByClassName(dj);}};db=[];cZ=[":focus"];if((dd.qsa=cE(dh.querySelectorAll))){cc(function(di){di.innerHTML="<select><option selected=''></option></select>";
if(!di.querySelectorAll("[selected]").length){cZ.push("\\["+cp+"*(?:checked|disabled|ismap|multiple|readonly|selected|value)");}if(!di.querySelectorAll(":checked").length){cZ.push(":checked");}});cc(function(di){di.innerHTML="<input type='hidden' i=''/>";if(di.querySelectorAll("[i^='']").length){cZ.push("[*^$]="+cp+"*(?:\"\"|'')");}if(!di.querySelectorAll(":enabled").length){cZ.push(":enabled",":disabled");
}di.querySelectorAll("*,:x");cZ.push(",.*:");});}if((dd.matchesSelector=cE((ca=co.matchesSelector||co.mozMatchesSelector||co.webkitMatchesSelector||co.oMatchesSelector||co.msMatchesSelector)))){cc(function(di){dd.disconnectedMatch=ca.call(di,"div");ca.call(di,"[s!='']:x");db.push("!=",ck);});}cZ=new RegExp(cZ.join("|"));db=new RegExp(db.join("|"));cF=cE(co.contains)||co.compareDocumentPosition?function(dj,di){var dl=dj.nodeType===9?dj.documentElement:dj,dk=di&&di.parentNode;
return dj===dk||!!(dk&&dk.nodeType===1&&(dl.contains?dl.contains(dk):dj.compareDocumentPosition&&dj.compareDocumentPosition(dk)&16));}:function(dj,di){if(di){while((di=di.parentNode)){if(di===dj){return true;}}}return false;};cD=co.compareDocumentPosition?function(dj,di){var dk;if(dj===di){cT=true;return 0;}if((dk=di.compareDocumentPosition&&dj.compareDocumentPosition&&dj.compareDocumentPosition(di))){if(dk&1||dj.parentNode&&dj.parentNode.nodeType===11){if(dj===dh||cF(cI,dj)){return -1;
}if(di===dh||cF(cI,di)){return 1;}return 0;}return dk&4?-1:1;}return dj.compareDocumentPosition?-1:1;}:function(dj,di){var dq,dm=0,dp=dj.parentNode,dl=di.parentNode,dk=[dj],dn=[di];if(dj===di){cT=true;return 0;}else{if(!dp||!dl){return dj===dh?-1:di===dh?1:dp?-1:dl?1:0;}else{if(dp===dl){return b6(dj,di);}}}dq=dj;while((dq=dq.parentNode)){dk.unshift(dq);}dq=di;while((dq=dq.parentNode)){dn.unshift(dq);
}while(dk[dm]===dn[dm]){dm++;}return dm?b6(dk[dm],dn[dm]):dk[dm]===cI?-1:dn[dm]===cI?1:0;};cT=false;[0,0].sort(cD);dd.detectDuplicates=cT;return cB;};cv.matches=function(dh,e){return cv(dh,null,null,e);};cv.matchesSelector=function(di,dk){if((di.ownerDocument||di)!==cB){cV(di);}dk=dk.replace(ct,"='$1']");if(dd.matchesSelector&&!cd&&(!db||!db.test(dk))&&!cZ.test(dk)){try{var dh=ca.call(di,dk);if(dh||dd.disconnectedMatch||di.document&&di.document.nodeType!==11){return dh;
}}catch(dj){}}return cv(dk,cB,null,[di]).length>0;};cv.contains=function(e,dh){if((e.ownerDocument||e)!==cB){cV(e);}return cF(e,dh);};cv.attr=function(dh,e){var di;if((dh.ownerDocument||dh)!==cB){cV(dh);}if(!cd){e=e.toLowerCase();}if((di=cn.attrHandle[e])){return di(dh);}if(cd||dd.attributes){return dh.getAttribute(e);}return((di=dh.getAttributeNode(e))||dh.getAttribute(e))&&dh[e]===true?e:di&&di.specified?di.value:null;
};cv.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e);};cv.uniqueSort=function(di){var dj,dk=[],dh=1,e=0;cT=!dd.detectDuplicates;di.sort(cD);if(cT){for(;(dj=di[dh]);dh++){if(dj===di[dh-1]){e=dk.push(dh);}}while(e--){di.splice(dk[e],1);}}return di;};function b6(dh,e){var dj=e&&dh,di=dj&&(~e.sourceIndex||cN)-(~dh.sourceIndex||cN);if(di){return di;}if(dj){while((dj=dj.nextSibling)){if(dj===e){return -1;
}}}return dh?1:-1;}function cw(e){return function(di){var dh=di.nodeName.toLowerCase();return dh==="input"&&di.type===e;};}function b7(e){return function(di){var dh=di.nodeName.toLowerCase();return(dh==="input"||dh==="button")&&di.type===e;};}function c3(e){return cj(function(dh){dh=+dh;return cj(function(di,dm){var dk,dj=e([],di.length,dh),dl=dj.length;while(dl--){if(di[(dk=dj[dl])]){di[dk]=!(dm[dk]=di[dk]);
}}});});}cH=cv.getText=function(dk){var dj,dh="",di=0,e=dk.nodeType;if(!e){for(;(dj=dk[di]);di++){dh+=cH(dj);}}else{if(e===1||e===9||e===11){if(typeof dk.textContent==="string"){return dk.textContent;}else{for(dk=dk.firstChild;dk;dk=dk.nextSibling){dh+=cH(dk);}}}else{if(e===3||e===4){return dk.nodeValue;}}}return dh;};cn=cv.selectors={cacheLength:50,createPseudo:cj,match:cY,find:{},relative:{">":{dir:"parentNode",first:true}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:true},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){e[1]=e[1].replace(cs,c1);
e[3]=(e[4]||e[5]||"").replace(cs,c1);if(e[2]==="~="){e[3]=" "+e[3]+" ";}return e.slice(0,4);},CHILD:function(e){e[1]=e[1].toLowerCase();if(e[1].slice(0,3)==="nth"){if(!e[3]){cv.error(e[0]);}e[4]=+(e[4]?e[5]+(e[6]||1):2*(e[3]==="even"||e[3]==="odd"));e[5]=+((e[7]+e[8])||e[3]==="odd");}else{if(e[3]){cv.error(e[0]);}}return e;},PSEUDO:function(dh){var e,di=!dh[5]&&dh[2];if(cY.CHILD.test(dh[0])){return null;
}if(dh[4]){dh[2]=dh[4];}else{if(di&&cP.test(di)&&(e=cf(di,true))&&(e=di.indexOf(")",di.length-e)-di.length)){dh[0]=dh[0].slice(0,e);dh[2]=di.slice(0,e);}}return dh.slice(0,3);}},filter:{TAG:function(e){if(e==="*"){return function(){return true;};}e=e.replace(cs,c1).toLowerCase();return function(dh){return dh.nodeName&&dh.nodeName.toLowerCase()===e;};},CLASS:function(e){var dh=b5[e+" "];return dh||(dh=new RegExp("(^|"+cp+")"+e+"("+cp+"|$)"))&&b5(e,function(di){return dh.test(di.className||(typeof di.getAttribute!==c9&&di.getAttribute("class"))||"");
});},ATTR:function(di,dh,e){return function(dk){var dj=cv.attr(dk,di);if(dj==null){return dh==="!=";}if(!dh){return true;}dj+="";return dh==="="?dj===e:dh==="!="?dj!==e:dh==="^="?e&&dj.indexOf(e)===0:dh==="*="?e&&dj.indexOf(e)>-1:dh==="$="?e&&dj.slice(-e.length)===e:dh==="~="?(" "+dj+" ").indexOf(e)>-1:dh==="|="?dj===e||dj.slice(0,e.length+1)===e+"-":false;};},CHILD:function(dh,dk,dj,dl,di){var dn=dh.slice(0,3)!=="nth",e=dh.slice(-4)!=="last",dm=dk==="of-type";
return dl===1&&di===0?function(dp){return !!dp.parentNode;}:function(dv,dt,dy){var dp,dB,dw,dA,dx,ds,du=dn!==e?"nextSibling":"previousSibling",dz=dv.parentNode,dr=dm&&dv.nodeName.toLowerCase(),dq=!dy&&!dm;if(dz){if(dn){while(du){dw=dv;while((dw=dw[du])){if(dm?dw.nodeName.toLowerCase()===dr:dw.nodeType===1){return false;}}ds=du=dh==="only"&&!ds&&"nextSibling";}return true;}ds=[e?dz.firstChild:dz.lastChild];
if(e&&dq){dB=dz[c5]||(dz[c5]={});dp=dB[dh]||[];dx=dp[0]===de&&dp[1];dA=dp[0]===de&&dp[2];dw=dx&&dz.childNodes[dx];while((dw=++dx&&dw&&dw[du]||(dA=dx=0)||ds.pop())){if(dw.nodeType===1&&++dA&&dw===dv){dB[dh]=[de,dx,dA];break;}}}else{if(dq&&(dp=(dv[c5]||(dv[c5]={}))[dh])&&dp[0]===de){dA=dp[1];}else{while((dw=++dx&&dw&&dw[du]||(dA=dx=0)||ds.pop())){if((dm?dw.nodeName.toLowerCase()===dr:dw.nodeType===1)&&++dA){if(dq){(dw[c5]||(dw[c5]={}))[dh]=[de,dA];
}if(dw===dv){break;}}}}}dA-=di;return dA===dl||(dA%dl===0&&dA/dl>=0);}};},PSEUDO:function(dj,di){var e,dh=cn.pseudos[dj]||cn.setFilters[dj.toLowerCase()]||cv.error("unsupported pseudo: "+dj);if(dh[c5]){return dh(di);}if(dh.length>1){e=[dj,dj,"",di];return cn.setFilters.hasOwnProperty(dj.toLowerCase())?cj(function(dm,dp){var dl,dk=dh(dm,di),dn=dk.length;while(dn--){dl=b9.call(dm,dk[dn]);dm[dl]=!(dp[dl]=dk[dn]);
}}):function(dk){return dh(dk,0,e);};}return dh;}},pseudos:{not:cj(function(e){var dh=[],di=[],dj=cS(e.replace(cr,"$1"));return dj[c5]?cj(function(dl,dr,dp,dm){var dq,dk=dj(dl,null,dm,[]),dn=dl.length;while(dn--){if((dq=dk[dn])){dl[dn]=!(dr[dn]=dq);}}}):function(dm,dl,dk){dh[0]=dm;dj(dh,null,dk,di);return !di.pop();};}),has:cj(function(e){return function(dh){return cv(e,dh).length>0;};}),contains:cj(function(e){return function(dh){return(dh.textContent||dh.innerText||cH(dh)).indexOf(e)>-1;
};}),lang:cj(function(e){if(!cQ.test(e||"")){cv.error("unsupported lang: "+e);}e=e.replace(cs,c1).toLowerCase();return function(di){var dh;do{if((dh=cd?di.getAttribute("xml:lang")||di.getAttribute("lang"):di.lang)){dh=dh.toLowerCase();return dh===e||dh.indexOf(e+"-")===0;}}while((di=di.parentNode)&&di.nodeType===1);return false;};}),target:function(e){var dh=da.location&&da.location.hash;return dh&&dh.slice(1)===e.id;
},root:function(e){return e===co;},focus:function(e){return e===cB.activeElement&&(!cB.hasFocus||cB.hasFocus())&&!!(e.type||e.href||~e.tabIndex);},enabled:function(e){return e.disabled===false;},disabled:function(e){return e.disabled===true;},checked:function(e){var dh=e.nodeName.toLowerCase();return(dh==="input"&&!!e.checked)||(dh==="option"&&!!e.selected);},selected:function(e){if(e.parentNode){e.parentNode.selectedIndex;
}return e.selected===true;},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling){if(e.nodeName>"@"||e.nodeType===3||e.nodeType===4){return false;}}return true;},parent:function(e){return !cn.pseudos.empty(e);},header:function(e){return cl.test(e.nodeName);},input:function(e){return b8.test(e.nodeName);},button:function(dh){var e=dh.nodeName.toLowerCase();return e==="input"&&dh.type==="button"||e==="button";
},text:function(dh){var e;return dh.nodeName.toLowerCase()==="input"&&dh.type==="text"&&((e=dh.getAttribute("type"))==null||e.toLowerCase()===dh.type);},first:c3(function(){return[0];}),last:c3(function(e,dh){return[dh-1];}),eq:c3(function(e,di,dh){return[dh<0?dh+di:dh];}),even:c3(function(e,di){var dh=0;for(;dh<di;dh+=2){e.push(dh);}return e;}),odd:c3(function(e,di){var dh=1;for(;dh<di;dh+=2){e.push(dh);
}return e;}),lt:c3(function(e,dj,di){var dh=di<0?di+dj:di;for(;--dh>=0;){e.push(dh);}return e;}),gt:c3(function(e,dj,di){var dh=di<0?di+dj:di;for(;++dh<dj;){e.push(dh);}return e;})}};for(cx in {radio:true,checkbox:true,file:true,password:true,image:true}){cn.pseudos[cx]=cw(cx);}for(cx in {submit:true,reset:true}){cn.pseudos[cx]=b7(cx);}function cf(dk,dq){var dh,dl,dn,dp,dm,di,e,dj=c4[dk+" "];if(dj){return dq?0:dj.slice(0);
}dm=dk;di=[];e=cn.preFilter;while(dm){if(!dh||(dl=cu.exec(dm))){if(dl){dm=dm.slice(dl[0].length)||dm;}di.push(dn=[]);}dh=false;if((dl=cA.exec(dm))){dh=dl.shift();dn.push({value:dh,type:dl[0].replace(cr," ")});dm=dm.slice(dh.length);}for(dp in cn.filter){if((dl=cY[dp].exec(dm))&&(!e[dp]||(dl=e[dp](dl)))){dh=dl.shift();dn.push({value:dh,type:dp,matches:dl});dm=dm.slice(dh.length);}}if(!dh){break;}}return dq?dm.length:dm?cv.error(dk):c4(dk,di).slice(0);
}function cg(dj){var di=0,dh=dj.length,e="";for(;di<dh;di++){e+=dj[di].value;}return e;}function cq(dk,di,dj){var e=di.dir,dl=dj&&e==="parentNode",dh=c0++;return di.first?function(dp,dn,dm){while((dp=dp[e])){if(dp.nodeType===1||dl){return dk(dp,dn,dm);}}}:function(dr,dp,dn){var dt,dm,dq,ds=de+" "+dh;if(dn){while((dr=dr[e])){if(dr.nodeType===1||dl){if(dk(dr,dp,dn)){return true;}}}}else{while((dr=dr[e])){if(dr.nodeType===1||dl){dq=dr[c5]||(dr[c5]={});
if((dm=dq[e])&&dm[0]===ds){if((dt=dm[1])===true||dt===cb){return dt===true;}}else{dm=dq[e]=[ds];dm[1]=dk(dr,dp,dn)||cb;if(dm[1]===true){return true;}}}}}};}function df(e){return e.length>1?function(dk,dj,dh){var di=e.length;while(di--){if(!e[di](dk,dj,dh)){return false;}}return true;}:e[0];}function cX(e,dh,di,dj,dm){var dk,dq=[],dl=0,dn=e.length,dp=dh!=null;for(;dl<dn;dl++){if((dk=e[dl])){if(!di||di(dk,dj,dm)){dq.push(dk);
if(dp){dh.push(dl);}}}}return dq;}function ce(di,dh,dk,dj,dl,e){if(dj&&!dj[c5]){dj=ce(dj);}if(dl&&!dl[c5]){dl=ce(dl,e);}return cj(function(dx,du,dp,dw){var dz,dv,dr,dq=[],dy=[],dn=du.length,dm=dx||cy(dh||"*",dp.nodeType?[dp]:dp,[]),ds=di&&(dx||!dh)?cX(dm,dq,di,dp,dw):dm,dt=dk?dl||(dx?di:dn||dj)?[]:du:ds;if(dk){dk(ds,dt,dp,dw);}if(dj){dz=cX(dt,dy);dj(dz,[],dp,dw);dv=dz.length;while(dv--){if((dr=dz[dv])){dt[dy[dv]]=!(ds[dy[dv]]=dr);
}}}if(dx){if(dl||di){if(dl){dz=[];dv=dt.length;while(dv--){if((dr=dt[dv])){dz.push((ds[dv]=dr));}}dl(null,(dt=[]),dz,dw);}dv=dt.length;while(dv--){if((dr=dt[dv])&&(dz=dl?b9.call(dx,dr):dq[dv])>-1){dx[dz]=!(du[dz]=dr);}}}}else{dt=cX(dt===du?dt.splice(dn,dt.length):dt);if(dl){dl(null,du,dt,dw);}else{b4.apply(du,dt);}}});}function c6(dm){var dh,dk,di,dl=dm.length,dq=cn.relative[dm[0].type],dr=dq||cn.relative[" "],dj=dq?1:0,dn=cq(function(ds){return ds===dh;
},dr,true),dp=cq(function(ds){return b9.call(dh,ds)>-1;},dr,true),e=[function(du,dt,ds){return(!dq&&(ds||dt!==dg))||((dh=dt).nodeType?dn(du,dt,ds):dp(du,dt,ds));}];for(;dj<dl;dj++){if((dk=cn.relative[dm[dj].type])){e=[cq(df(e),dk)];}else{dk=cn.filter[dm[dj].type].apply(null,dm[dj].matches);if(dk[c5]){di=++dj;for(;di<dl;di++){if(cn.relative[dm[di].type]){break;}}return ce(dj>1&&df(e),dj>1&&cg(dm.slice(0,dj-1)).replace(cr,"$1"),dk,dj<di&&c6(dm.slice(dj,di)),di<dl&&c6((dm=dm.slice(di))),di<dl&&cg(dm));
}e.push(dk);}}return df(e);}function cU(dj,di){var dl=0,e=di.length>0,dk=dj.length>0,dh=function(dw,dq,dv,du,dC){var dr,ds,dx,dB=[],dA=0,dt="0",dm=dw&&[],dy=dC!=null,dz=dg,dp=dw||dk&&cn.find.TAG("*",dC&&dq.parentNode||dq),dn=(de+=dz==null?1:Math.random()||0.1);if(dy){dg=dq!==cB&&dq;cb=dl;}for(;(dr=dp[dt])!=null;dt++){if(dk&&dr){ds=0;while((dx=dj[ds++])){if(dx(dr,dq,dv)){du.push(dr);break;}}if(dy){de=dn;
cb=++dl;}}if(e){if((dr=!dx&&dr)){dA--;}if(dw){dm.push(dr);}}}dA+=dt;if(e&&dt!==dA){ds=0;while((dx=di[ds++])){dx(dm,dB,dq,dv);}if(dw){if(dA>0){while(dt--){if(!(dm[dt]||dB[dt])){dB[dt]=c8.call(du);}}}dB=cX(dB);}b4.apply(du,dB);if(dy&&!dw&&dB.length>0&&(dA+di.length)>1){cv.uniqueSort(du);}}if(dy){de=dn;dg=dz;}return dm;};return e?cj(dh):dh;}cS=cv.compile=function(e,dl){var di,dh=[],dk=[],dj=cG[e+" "];
if(!dj){if(!dl){dl=cf(e);}di=dl.length;while(di--){dj=c6(dl[di]);if(dj[c5]){dh.push(dj);}else{dk.push(dj);}}dj=cG(e,cU(dk,dh));}return dj;};function cy(dh,dk,dj){var di=0,e=dk.length;for(;di<e;di++){cv(dh,dk[di],dj);}return dj;}function dc(di,e,dj,dm){var dk,dp,dh,dq,dn,dl=cf(di);if(!dm){if(dl.length===1){dp=dl[0]=dl[0].slice(0);if(dp.length>2&&(dh=dp[0]).type==="ID"&&e.nodeType===9&&!cd&&cn.relative[dp[1].type]){e=cn.find.ID(dh.matches[0].replace(cs,c1),e)[0];
if(!e){return dj;}di=di.slice(dp.shift().value.length);}dk=cY.needsContext.test(di)?0:dp.length;while(dk--){dh=dp[dk];if(cn.relative[(dq=dh.type)]){break;}if((dn=cn.find[dq])){if((dm=dn(dh.matches[0].replace(cs,c1),cW.test(dp[0].type)&&e.parentNode||e))){dp.splice(dk,1);di=dm.length&&cg(dp);if(!di){b4.apply(dj,cm.call(dm,0));return dj;}break;}}}}}cS(di,dl)(dm,e,cd,dj,cW.test(di));return dj;}cn.pseudos.nth=cn.pseudos.eq;
function cR(){}cn.filters=cR.prototype=cn.pseudos;cn.setFilters=new cR();cV();cv.attr=bJ.attr;bJ.find=cv;bJ.expr=cv.selectors;bJ.expr[":"]=bJ.expr.pseudos;bJ.unique=cv.uniqueSort;bJ.text=cv.getText;bJ.isXMLDoc=cv.isXML;bJ.contains=cv.contains;})(a2);var aj=/Until$/,bt=/^(?:parents|prev(?:Until|All))/,an=/^.[^:#\[\.,]*$/,y=bJ.expr.match.needsContext,bx={children:true,contents:true,next:true,prev:true};
bJ.fn.extend({find:function(b3){var b6,b5,b4,e=this.length;if(typeof b3!=="string"){b4=this;return this.pushStack(bJ(b3).filter(function(){for(b6=0;b6<e;b6++){if(bJ.contains(b4[b6],this)){return true;}}}));}b5=[];for(b6=0;b6<e;b6++){bJ.find(b3,this[b6],b5);}b5=this.pushStack(e>1?bJ.unique(b5):b5);b5.selector=(this.selector?this.selector+" ":"")+b3;return b5;},has:function(b5){var b4,b3=bJ(b5,this),e=b3.length;
return this.filter(function(){for(b4=0;b4<e;b4++){if(bJ.contains(this,b3[b4])){return true;}}});},not:function(e){return this.pushStack(aO(this,e,false));},filter:function(e){return this.pushStack(aO(this,e,true));},is:function(e){return !!e&&(typeof e==="string"?y.test(e)?bJ(e,this.context).index(this[0])>=0:bJ.filter(e,this).length>0:this.filter(e).length>0);},closest:function(b6,b5){var b7,b4=0,e=this.length,b3=[],b8=y.test(b6)||typeof b6!=="string"?bJ(b6,b5||this.context):0;
for(;b4<e;b4++){b7=this[b4];while(b7&&b7.ownerDocument&&b7!==b5&&b7.nodeType!==11){if(b8?b8.index(b7)>-1:bJ.find.matchesSelector(b7,b6)){b3.push(b7);break;}b7=b7.parentNode;}}return this.pushStack(b3.length>1?bJ.unique(b3):b3);},index:function(e){if(!e){return(this[0]&&this[0].parentNode)?this.first().prevAll().length:-1;}if(typeof e==="string"){return bJ.inArray(this[0],bJ(e));}return bJ.inArray(e.jquery?e[0]:e,this);
},add:function(e,b3){var b5=typeof e==="string"?bJ(e,b3):bJ.makeArray(e&&e.nodeType?[e]:e),b4=bJ.merge(this.get(),b5);return this.pushStack(bJ.unique(b4));},addBack:function(e){return this.add(e==null?this.prevObject:this.prevObject.filter(e));}});bJ.fn.andSelf=bJ.fn.addBack;function aX(b3,e){do{b3=b3[e];}while(b3&&b3.nodeType!==1);return b3;}bJ.each({parent:function(b3){var e=b3.parentNode;return e&&e.nodeType!==11?e:null;
},parents:function(e){return bJ.dir(e,"parentNode");},parentsUntil:function(b3,e,b4){return bJ.dir(b3,"parentNode",b4);},next:function(e){return aX(e,"nextSibling");},prev:function(e){return aX(e,"previousSibling");},nextAll:function(e){return bJ.dir(e,"nextSibling");},prevAll:function(e){return bJ.dir(e,"previousSibling");},nextUntil:function(b3,e,b4){return bJ.dir(b3,"nextSibling",b4);},prevUntil:function(b3,e,b4){return bJ.dir(b3,"previousSibling",b4);
},siblings:function(e){return bJ.sibling((e.parentNode||{}).firstChild,e);},children:function(e){return bJ.sibling(e.firstChild);},contents:function(e){return bJ.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:bJ.merge([],e.childNodes);}},function(e,b3){bJ.fn[e]=function(b6,b4){var b5=bJ.map(this,b3,b6);if(!aj.test(e)){b4=b6;}if(b4&&typeof b4==="string"){b5=bJ.filter(b4,b5);}b5=this.length>1&&!bx[e]?bJ.unique(b5):b5;
if(this.length>1&&bt.test(e)){b5=b5.reverse();}return this.pushStack(b5);};});bJ.extend({filter:function(b4,e,b3){if(b3){b4=":not("+b4+")";}return e.length===1?bJ.find.matchesSelector(e[0],b4)?[e[0]]:[]:bJ.find.matches(b4,e);},dir:function(b4,b3,b6){var e=[],b5=b4[b3];while(b5&&b5.nodeType!==9&&(b6===aG||b5.nodeType!==1||!bJ(b5).is(b6))){if(b5.nodeType===1){e.push(b5);}b5=b5[b3];}return e;},sibling:function(b4,b3){var e=[];
for(;b4;b4=b4.nextSibling){if(b4.nodeType===1&&b4!==b3){e.push(b4);}}return e;}});function aO(b5,b4,e){b4=b4||0;if(bJ.isFunction(b4)){return bJ.grep(b5,function(b7,b6){var b8=!!b4.call(b7,b6,b7);return b8===e;});}else{if(b4.nodeType){return bJ.grep(b5,function(b6){return(b6===b4)===e;});}else{if(typeof b4==="string"){var b3=bJ.grep(b5,function(b6){return b6.nodeType===1;});if(an.test(b4)){return bJ.filter(b4,b3,!e);
}else{b4=bJ.filter(b4,b3);}}}}return bJ.grep(b5,function(b6){return(bJ.inArray(b6,b4)>=0)===e;});}function A(e){var b4=d.split("|"),b3=e.createDocumentFragment();if(b3.createElement){while(b4.length){b3.createElement(b4.pop());}}return b3;}var d="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",aA=/ jQuery\d+="(?:null|\d+)"/g,J=new RegExp("<(?:"+d+")[\\s/>]","i"),b2=/^\s+/,aD=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,m=/<([\w:]+)/,bX=/<tbody/i,I=/<|&#?\w+;/,al=/<(?:script|style|link)/i,q=/^(?:checkbox|radio)$/i,bU=/checked\s*(?:[^=]|=\s*.checked.)/i,bz=/^$|\/(?:java|ecma)script/i,ar=/^true\/(.*)/,aK=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,T={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],area:[1,"<map>","</map>"],param:[1,"<object>","</object>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:bJ.support.htmlSerialize?[0,"",""]:[1,"X<div>","</div>"]},aS=A(l),j=aS.appendChild(l.createElement("div"));
T.optgroup=T.option;T.tbody=T.tfoot=T.colgroup=T.caption=T.thead;T.th=T.td;bJ.fn.extend({text:function(e){return bJ.access(this,function(b3){return b3===aG?bJ.text(this):this.empty().append((this[0]&&this[0].ownerDocument||l).createTextNode(b3));},null,e,arguments.length);},wrapAll:function(e){if(bJ.isFunction(e)){return this.each(function(b4){bJ(this).wrapAll(e.call(this,b4));});}if(this[0]){var b3=bJ(e,this[0].ownerDocument).eq(0).clone(true);
if(this[0].parentNode){b3.insertBefore(this[0]);}b3.map(function(){var b4=this;while(b4.firstChild&&b4.firstChild.nodeType===1){b4=b4.firstChild;}return b4;}).append(this);}return this;},wrapInner:function(e){if(bJ.isFunction(e)){return this.each(function(b3){bJ(this).wrapInner(e.call(this,b3));});}return this.each(function(){var b3=bJ(this),b4=b3.contents();if(b4.length){b4.wrapAll(e);}else{b3.append(e);
}});},wrap:function(e){var b3=bJ.isFunction(e);return this.each(function(b4){bJ(this).wrapAll(b3?e.call(this,b4):e);});},unwrap:function(){return this.parent().each(function(){if(!bJ.nodeName(this,"body")){bJ(this).replaceWith(this.childNodes);}}).end();},append:function(){return this.domManip(arguments,true,function(e){if(this.nodeType===1||this.nodeType===11||this.nodeType===9){this.appendChild(e);
}});},prepend:function(){return this.domManip(arguments,true,function(e){if(this.nodeType===1||this.nodeType===11||this.nodeType===9){this.insertBefore(e,this.firstChild);}});},before:function(){return this.domManip(arguments,false,function(e){if(this.parentNode){this.parentNode.insertBefore(e,this);}});},after:function(){return this.domManip(arguments,false,function(e){if(this.parentNode){this.parentNode.insertBefore(e,this.nextSibling);
}});},remove:function(e,b5){var b4,b3=0;for(;(b4=this[b3])!=null;b3++){if(!e||bJ.filter(e,[b4]).length>0){if(!b5&&b4.nodeType===1){bJ.cleanData(k(b4));}if(b4.parentNode){if(b5&&bJ.contains(b4.ownerDocument,b4)){bs(k(b4,"script"));}b4.parentNode.removeChild(b4);}}}return this;},empty:function(){var b3,e=0;for(;(b3=this[e])!=null;e++){if(b3.nodeType===1){bJ.cleanData(k(b3,false));}while(b3.firstChild){b3.removeChild(b3.firstChild);
}if(b3.options&&bJ.nodeName(b3,"select")){b3.options.length=0;}}return this;},clone:function(b3,e){b3=b3==null?false:b3;e=e==null?b3:e;return this.map(function(){return bJ.clone(this,b3,e);});},html:function(e){return bJ.access(this,function(b6){var b5=this[0]||{},b4=0,b3=this.length;if(b6===aG){return b5.nodeType===1?b5.innerHTML.replace(aA,""):aG;}if(typeof b6==="string"&&!al.test(b6)&&(bJ.support.htmlSerialize||!J.test(b6))&&(bJ.support.leadingWhitespace||!b2.test(b6))&&!T[(m.exec(b6)||["",""])[1].toLowerCase()]){b6=b6.replace(aD,"<$1></$2>");
try{for(;b4<b3;b4++){b5=this[b4]||{};if(b5.nodeType===1){bJ.cleanData(k(b5,false));b5.innerHTML=b6;}}b5=0;}catch(b7){}}if(b5){this.empty().append(b6);}},null,e,arguments.length);},replaceWith:function(b3){var e=bJ.isFunction(b3);if(!e&&typeof b3!=="string"){b3=bJ(b3).not(this).detach();}return this.domManip([b3],true,function(b6){var b5=this.nextSibling,b4=this.parentNode;if(b4){bJ(this).remove();b4.insertBefore(b6,b5);
}});},detach:function(e){return this.remove(e,true);},domManip:function(ca,cg,cf){ca=aI.apply([],ca);var b8,b4,e,b6,cd,b9,b7=0,b5=this.length,cc=this,ce=b5-1,cb=ca[0],b3=bJ.isFunction(cb);if(b3||!(b5<=1||typeof cb!=="string"||bJ.support.checkClone||!bU.test(cb))){return this.each(function(ci){var ch=cc.eq(ci);if(b3){ca[0]=cb.call(this,ci,cg?ch.html():aG);}ch.domManip(ca,cg,cf);});}if(b5){b9=bJ.buildFragment(ca,this[0].ownerDocument,false,this);
b8=b9.firstChild;if(b9.childNodes.length===1){b9=b8;}if(b8){cg=cg&&bJ.nodeName(b8,"tr");b6=bJ.map(k(b9,"script"),t);e=b6.length;for(;b7<b5;b7++){b4=b9;if(b7!==ce){b4=bJ.clone(b4,true,true);if(e){bJ.merge(b6,k(b4,"script"));}}cf.call(cg&&bJ.nodeName(this[b7],"table")?x(this[b7],"tbody"):this[b7],b4,b7);}if(e){cd=b6[b6.length-1].ownerDocument;bJ.map(b6,bc);for(b7=0;b7<e;b7++){b4=b6[b7];if(bz.test(b4.type||"")&&!bJ._data(b4,"globalEval")&&bJ.contains(cd,b4)){if(b4.src){bJ.ajax({url:b4.src,type:"GET",dataType:"script",async:false,global:false,"throws":true});
}else{bJ.globalEval((b4.text||b4.textContent||b4.innerHTML||"").replace(aK,""));}}}}b9=b8=null;}}return this;}});function x(b3,e){return b3.getElementsByTagName(e)[0]||b3.appendChild(b3.ownerDocument.createElement(e));}function t(b3){var e=b3.getAttributeNode("type");b3.type=(e&&e.specified)+"/"+b3.type;return b3;}function bc(b3){var e=ar.exec(b3.type);if(e){b3.type=e[1];}else{b3.removeAttribute("type");
}return b3;}function bs(e,b4){var b5,b3=0;for(;(b5=e[b3])!=null;b3++){bJ._data(b5,"globalEval",!b4||bJ._data(b4[b3],"globalEval"));}}function at(b9,b3){if(b3.nodeType!==1||!bJ.hasData(b9)){return;}var b6,b5,e,b8=bJ._data(b9),b7=bJ._data(b3,b8),b4=b8.events;if(b4){delete b7.handle;b7.events={};for(b6 in b4){for(b5=0,e=b4[b6].length;b5<e;b5++){bJ.event.add(b3,b6,b4[b6][b5]);}}}if(b7.data){b7.data=bJ.extend({},b7.data);
}}function Q(b6,b3){var b7,b5,b4;if(b3.nodeType!==1){return;}b7=b3.nodeName.toLowerCase();if(!bJ.support.noCloneEvent&&b3[bJ.expando]){b4=bJ._data(b3);for(b5 in b4.events){bJ.removeEvent(b3,b5,b4.handle);}b3.removeAttribute(bJ.expando);}if(b7==="script"&&b3.text!==b6.text){t(b3).text=b6.text;bc(b3);}else{if(b7==="object"){if(b3.parentNode){b3.outerHTML=b6.outerHTML;}if(bJ.support.html5Clone&&(b6.innerHTML&&!bJ.trim(b3.innerHTML))){b3.innerHTML=b6.innerHTML;
}}else{if(b7==="input"&&q.test(b6.type)){b3.defaultChecked=b3.checked=b6.checked;if(b3.value!==b6.value){b3.value=b6.value;}}else{if(b7==="option"){b3.defaultSelected=b3.selected=b6.defaultSelected;}else{if(b7==="input"||b7==="textarea"){b3.defaultValue=b6.defaultValue;}}}}}}bJ.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,b3){bJ.fn[e]=function(b4){var b5,b7=0,b6=[],b9=bJ(b4),b8=b9.length-1;
for(;b7<=b8;b7++){b5=b7===b8?this:this.clone(true);bJ(b9[b7])[b3](b5);ao.apply(b6,b5.get());}return this.pushStack(b6);};});function k(b5,e){var b3,b6,b4=0,b7=typeof b5.getElementsByTagName!==aC?b5.getElementsByTagName(e||"*"):typeof b5.querySelectorAll!==aC?b5.querySelectorAll(e||"*"):aG;if(!b7){for(b7=[],b3=b5.childNodes||b5;(b6=b3[b4])!=null;b4++){if(!e||bJ.nodeName(b6,e)){b7.push(b6);}else{bJ.merge(b7,k(b6,e));
}}}return e===aG||e&&bJ.nodeName(b5,e)?bJ.merge([b5],b7):b7;}function bV(e){if(q.test(e.type)){e.defaultChecked=e.checked;}}bJ.extend({clone:function(b3,b5,e){var b7,b4,ca,b6,b8,b9=bJ.contains(b3.ownerDocument,b3);if(bJ.support.html5Clone||bJ.isXMLDoc(b3)||!J.test("<"+b3.nodeName+">")){ca=b3.cloneNode(true);}else{j.innerHTML=b3.outerHTML;j.removeChild(ca=j.firstChild);}if((!bJ.support.noCloneEvent||!bJ.support.noCloneChecked)&&(b3.nodeType===1||b3.nodeType===11)&&!bJ.isXMLDoc(b3)){b7=k(ca);
b8=k(b3);for(b6=0;(b4=b8[b6])!=null;++b6){if(b7[b6]){Q(b4,b7[b6]);}}}if(b5){if(e){b8=b8||k(b3);b7=b7||k(ca);for(b6=0;(b4=b8[b6])!=null;b6++){at(b4,b7[b6]);}}else{at(b3,ca);}}b7=k(ca,"script");if(b7.length>0){bs(b7,!b9&&k(b3,"script"));}b7=b8=b4=null;return ca;},buildFragment:function(b3,b5,ca,cf){var cb,b7,b9,ce,cg,cd,b4,b8=b3.length,b6=A(b5),e=[],cc=0;for(;cc<b8;cc++){b7=b3[cc];if(b7||b7===0){if(bJ.type(b7)==="object"){bJ.merge(e,b7.nodeType?[b7]:b7);
}else{if(!I.test(b7)){e.push(b5.createTextNode(b7));}else{ce=ce||b6.appendChild(b5.createElement("div"));cg=(m.exec(b7)||["",""])[1].toLowerCase();b4=T[cg]||T._default;ce.innerHTML=b4[1]+b7.replace(aD,"<$1></$2>")+b4[2];cb=b4[0];while(cb--){ce=ce.lastChild;}if(!bJ.support.leadingWhitespace&&b2.test(b7)){e.push(b5.createTextNode(b2.exec(b7)[0]));}if(!bJ.support.tbody){b7=cg==="table"&&!bX.test(b7)?ce.firstChild:b4[1]==="<table>"&&!bX.test(b7)?ce:0;
cb=b7&&b7.childNodes.length;while(cb--){if(bJ.nodeName((cd=b7.childNodes[cb]),"tbody")&&!cd.childNodes.length){b7.removeChild(cd);}}}bJ.merge(e,ce.childNodes);ce.textContent="";while(ce.firstChild){ce.removeChild(ce.firstChild);}ce=b6.lastChild;}}}}if(ce){b6.removeChild(ce);}if(!bJ.support.appendChecked){bJ.grep(k(e,"input"),bV);}cc=0;while((b7=e[cc++])){if(cf&&bJ.inArray(b7,cf)!==-1){continue;}b9=bJ.contains(b7.ownerDocument,b7);
ce=k(b6.appendChild(b7),"script");if(b9){bs(ce);}if(ca){cb=0;while((b7=ce[cb++])){if(bz.test(b7.type||"")){ca.push(b7);}}}}ce=null;return b6;},cleanData:function(b3,cb){var b5,ca,b4,b6,b7=0,cc=bJ.expando,e=bJ.cache,b8=bJ.support.deleteExpando,b9=bJ.event.special;for(;(b5=b3[b7])!=null;b7++){if(cb||bJ.acceptData(b5)){b4=b5[cc];b6=b4&&e[b4];if(b6){if(b6.events){for(ca in b6.events){if(b9[ca]){bJ.event.remove(b5,ca);
}else{bJ.removeEvent(b5,ca,b6.handle);}}}if(e[b4]){delete e[b4];if(b8){delete b5[cc];}else{if(typeof b5.removeAttribute!==aC){b5.removeAttribute(cc);}else{b5[cc]=null;}}a6.push(b4);}}}}}});var aE,bo,E,bg=/alpha\([^)]*\)/i,aT=/opacity\s*=\s*([^)]*)/,bn=/^(top|right|bottom|left)$/,F=/^(none|table(?!-c[ea]).+)/,aY=/^margin/,a9=new RegExp("^("+bA+")(.*)$","i"),W=new RegExp("^("+bA+")(?!px)[a-z%]+$","i"),S=new RegExp("^([+-])=("+bA+")","i"),bj={BODY:"block"},bb={position:"absolute",visibility:"hidden",display:"block"},bC={letterSpacing:0,fontWeight:400},bT=["Top","Right","Bottom","Left"],av=["Webkit","O","Moz","ms"];
function b(b5,b3){if(b3 in b5){return b3;}var b6=b3.charAt(0).toUpperCase()+b3.slice(1),e=b3,b4=av.length;while(b4--){b3=av[b4]+b6;if(b3 in b5){return b3;}}return e;}function P(b3,e){b3=e||b3;return bJ.css(b3,"display")==="none"||!bJ.contains(b3.ownerDocument,b3);}function p(b8,e){var b9,b6,b7,b3=[],b4=0,b5=b8.length;for(;b4<b5;b4++){b6=b8[b4];if(!b6.style){continue;}b3[b4]=bJ._data(b6,"olddisplay");
b9=b6.style.display;if(e){if(!b3[b4]&&b9==="none"){b6.style.display="";}if(b6.style.display===""&&P(b6)){b3[b4]=bJ._data(b6,"olddisplay",bE(b6.nodeName));}}else{if(!b3[b4]){b7=P(b6);if(b9&&b9!=="none"||!b7){bJ._data(b6,"olddisplay",b7?b9:bJ.css(b6,"display"));}}}}for(b4=0;b4<b5;b4++){b6=b8[b4];if(!b6.style){continue;}if(!e||b6.style.display==="none"||b6.style.display===""){b6.style.display=e?b3[b4]||"":"none";
}}return b8;}bJ.fn.extend({css:function(e,b3){return bJ.access(this,function(b8,b5,b9){var b4,b7,ca={},b6=0;if(bJ.isArray(b5)){b7=bo(b8);b4=b5.length;for(;b6<b4;b6++){ca[b5[b6]]=bJ.css(b8,b5[b6],false,b7);}return ca;}return b9!==aG?bJ.style(b8,b5,b9):bJ.css(b8,b5);},e,b3,arguments.length>1);},show:function(){return p(this,true);},hide:function(){return p(this);},toggle:function(b3){var e=typeof b3==="boolean";
return this.each(function(){if(e?b3:P(this)){bJ(this).show();}else{bJ(this).hide();}});}});bJ.extend({cssHooks:{opacity:{get:function(b4,b3){if(b3){var e=E(b4,"opacity");return e===""?"1":e;}}}},cssNumber:{columnCount:true,fillOpacity:true,fontWeight:true,lineHeight:true,opacity:true,orphans:true,widows:true,zIndex:true,zoom:true},cssProps:{"float":bJ.support.cssFloat?"cssFloat":"styleFloat"},style:function(b5,b4,cb,b6){if(!b5||b5.nodeType===3||b5.nodeType===8||!b5.style){return;
}var b9,ca,cc,b7=bJ.camelCase(b4),b3=b5.style;b4=bJ.cssProps[b7]||(bJ.cssProps[b7]=b(b3,b7));cc=bJ.cssHooks[b4]||bJ.cssHooks[b7];if(cb!==aG){ca=typeof cb;if(ca==="string"&&(b9=S.exec(cb))){cb=(b9[1]+1)*b9[2]+parseFloat(bJ.css(b5,b4));ca="number";}if(cb==null||ca==="number"&&isNaN(cb)){return;}if(ca==="number"&&!bJ.cssNumber[b7]){cb+="px";}if(!bJ.support.clearCloneStyle&&cb===""&&b4.indexOf("background")===0){b3[b4]="inherit";
}if(!cc||!("set" in cc)||(cb=cc.set(b5,cb,b6))!==aG){try{b3[b4]=cb;}catch(b8){}}}else{if(cc&&"get" in cc&&(b9=cc.get(b5,false,b6))!==aG){return b9;}return b3[b4];}},css:function(b8,b6,b3,b7){var b5,b9,e,b4=bJ.camelCase(b6);b6=bJ.cssProps[b4]||(bJ.cssProps[b4]=b(b8.style,b4));e=bJ.cssHooks[b6]||bJ.cssHooks[b4];if(e&&"get" in e){b9=e.get(b8,true,b3);}if(b9===aG){b9=E(b8,b6,b7);}if(b9==="normal"&&b6 in bC){b9=bC[b6];
}if(b3===""||b3){b5=parseFloat(b9);return b3===true||bJ.isNumeric(b5)?b5||0:b9;}return b9;},swap:function(b7,b6,b8,b5){var b4,b3,e={};for(b3 in b6){e[b3]=b7.style[b3];b7.style[b3]=b6[b3];}b4=b8.apply(b7,b5||[]);for(b3 in b6){b7.style[b3]=e[b3];}return b4;}});if(a2.getComputedStyle){bo=function(e){return a2.getComputedStyle(e,null);};E=function(b6,b4,b8){var b5,b3,ca,b7=b8||bo(b6),b9=b7?b7.getPropertyValue(b4)||b7[b4]:aG,e=b6.style;
if(b7){if(b9===""&&!bJ.contains(b6.ownerDocument,b6)){b9=bJ.style(b6,b4);}if(W.test(b9)&&aY.test(b4)){b5=e.width;b3=e.minWidth;ca=e.maxWidth;e.minWidth=e.maxWidth=e.width=b9;b9=b7.width;e.width=b5;e.minWidth=b3;e.maxWidth=ca;}}return b9;};}else{if(l.documentElement.currentStyle){bo=function(e){return e.currentStyle;};E=function(b5,b3,b8){var b4,b7,b9,b6=b8||bo(b5),ca=b6?b6[b3]:aG,e=b5.style;if(ca==null&&e&&e[b3]){ca=e[b3];
}if(W.test(ca)&&!bn.test(b3)){b4=e.left;b7=b5.runtimeStyle;b9=b7&&b7.left;if(b9){b7.left=b5.currentStyle.left;}e.left=b3==="fontSize"?"1em":ca;ca=e.pixelLeft+"px";e.left=b4;if(b9){b7.left=b9;}}return ca===""?"auto":ca;};}}function aJ(e,b4,b5){var b3=a9.exec(b4);return b3?Math.max(0,b3[1]-(b5||0))+(b3[2]||"px"):b4;}function aw(b6,b3,e,b8,b5){var b4=e===(b8?"border":"content")?4:b3==="width"?1:0,b7=0;
for(;b4<4;b4+=2){if(e==="margin"){b7+=bJ.css(b6,e+bT[b4],true,b5);}if(b8){if(e==="content"){b7-=bJ.css(b6,"padding"+bT[b4],true,b5);}if(e!=="margin"){b7-=bJ.css(b6,"border"+bT[b4]+"Width",true,b5);}}else{b7+=bJ.css(b6,"padding"+bT[b4],true,b5);if(e!=="padding"){b7+=bJ.css(b6,"border"+bT[b4]+"Width",true,b5);}}}return b7;}function u(b6,b3,e){var b5=true,b7=b3==="width"?b6.offsetWidth:b6.offsetHeight,b4=bo(b6),b8=bJ.support.boxSizing&&bJ.css(b6,"boxSizing",false,b4)==="border-box";
if(b7<=0||b7==null){b7=E(b6,b3,b4);if(b7<0||b7==null){b7=b6.style[b3];}if(W.test(b7)){return b7;}b5=b8&&(bJ.support.boxSizingReliable||b7===b6.style[b3]);b7=parseFloat(b7)||0;}return(b7+aw(b6,b3,e||(b8?"border":"content"),b5,b4))+"px";}function bE(b4){var b3=l,e=bj[b4];if(!e){e=a1(b4,b3);if(e==="none"||!e){aE=(aE||bJ("<iframe frameborder='0' width='0' height='0'/>").css("cssText","display:block !important")).appendTo(b3.documentElement);
b3=(aE[0].contentWindow||aE[0].contentDocument).document;b3.write("<!doctype html><html><body>");b3.close();e=a1(b4,b3);aE.detach();}bj[b4]=e;}return e;}function a1(e,b5){var b3=bJ(b5.createElement(e)).appendTo(b5.body),b4=bJ.css(b3[0],"display");b3.remove();return b4;}bJ.each(["height","width"],function(b3,e){bJ.cssHooks[e]={get:function(b6,b5,b4){if(b5){return b6.offsetWidth===0&&F.test(bJ.css(b6,"display"))?bJ.swap(b6,bb,function(){return u(b6,e,b4);
}):u(b6,e,b4);}},set:function(b6,b7,b4){var b5=b4&&bo(b6);return aJ(b6,b7,b4?aw(b6,e,b4,bJ.support.boxSizing&&bJ.css(b6,"boxSizing",false,b5)==="border-box",b5):0);}};});if(!bJ.support.opacity){bJ.cssHooks.opacity={get:function(b3,e){return aT.test((e&&b3.currentStyle?b3.currentStyle.filter:b3.style.filter)||"")?(0.01*parseFloat(RegExp.$1))+"":e?"1":"";},set:function(b6,b7){var b5=b6.style,b3=b6.currentStyle,e=bJ.isNumeric(b7)?"alpha(opacity="+b7*100+")":"",b4=b3&&b3.filter||b5.filter||"";
b5.zoom=1;if((b7>=1||b7==="")&&bJ.trim(b4.replace(bg,""))===""&&b5.removeAttribute){b5.removeAttribute("filter");if(b7===""||b3&&!b3.filter){return;}}b5.filter=bg.test(b4)?b4.replace(bg,e):b4+" "+e;}};}bJ(function(){if(!bJ.support.reliableMarginRight){bJ.cssHooks.marginRight={get:function(b3,e){if(e){return bJ.swap(b3,{display:"inline-block"},E,[b3,"marginRight"]);}}};}if(!bJ.support.pixelPosition&&bJ.fn.position){bJ.each(["top","left"],function(e,b3){bJ.cssHooks[b3]={get:function(b5,b4){if(b4){b4=E(b5,b3);
return W.test(b4)?bJ(b5).position()[b3]+"px":b4;}}};});}});if(bJ.expr&&bJ.expr.filters){bJ.expr.filters.hidden=function(e){return e.offsetWidth<=0&&e.offsetHeight<=0||(!bJ.support.reliableHiddenOffsets&&((e.style&&e.style.display)||bJ.css(e,"display"))==="none");};bJ.expr.filters.visible=function(e){return !bJ.expr.filters.hidden(e);};}bJ.each({margin:"",padding:"",border:"Width"},function(e,b3){bJ.cssHooks[e+b3]={expand:function(b6){var b5=0,b4={},b7=typeof b6==="string"?b6.split(" "):[b6];
for(;b5<4;b5++){b4[e+bT[b5]+b3]=b7[b5]||b7[b5-2]||b7[0];}return b4;}};if(!aY.test(e)){bJ.cssHooks[e+b3].set=aJ;}});var bv=/%20/g,aR=/\[\]$/,U=/\r?\n/g,c=/^(?:submit|button|image|reset|file)$/i,au=/^(?:input|select|textarea|keygen)/i;bJ.fn.extend({serialize:function(){return bJ.param(this.serializeArray());},serializeArray:function(){return this.map(function(){var e=bJ.prop(this,"elements");return e?bJ.makeArray(e):this;
}).filter(function(){var e=this.type;return this.name&&!bJ(this).is(":disabled")&&au.test(this.nodeName)&&!c.test(e)&&(this.checked||!q.test(e));}).map(function(e,b3){var b4=bJ(this).val();return b4==null?null:bJ.isArray(b4)?bJ.map(b4,function(b5){return{name:b3.name,value:b5.replace(U,"\r\n")};}):{name:b3.name,value:b4.replace(U,"\r\n")};}).get();}});bJ.param=function(e,b4){var b5,b3=[],b6=function(b7,b8){b8=bJ.isFunction(b8)?b8():(b8==null?"":b8);
b3[b3.length]=encodeURIComponent(b7)+"="+encodeURIComponent(b8);};if(b4===aG){b4=bJ.ajaxSettings&&bJ.ajaxSettings.traditional;}if(bJ.isArray(e)||(e.jquery&&!bJ.isPlainObject(e))){bJ.each(e,function(){b6(this.name,this.value);});}else{for(b5 in e){i(b5,e[b5],b4,b6);}}return b3.join("&").replace(bv,"+");};function i(b4,b6,b3,b5){var e;if(bJ.isArray(b6)){bJ.each(b6,function(b8,b7){if(b3||aR.test(b4)){b5(b4,b7);
}else{i(b4+"["+(typeof b7==="object"?b8:"")+"]",b7,b3,b5);}});}else{if(!b3&&bJ.type(b6)==="object"){for(e in b6){i(b4+"["+e+"]",b6[e],b3,b5);}}else{b5(b4,b6);}}}bJ.each(("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu").split(" "),function(b3,e){bJ.fn[e]=function(b5,b4){return arguments.length>0?this.on(e,null,b5,b4):this.trigger(e);
};});bJ.fn.hover=function(e,b3){return this.mouseenter(e).mouseleave(b3||e);};var b1,Y,bO=bJ.now(),az=/\?/,ap=/#.*$/,O=/([?&])_=[^&]*/,ag=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,B=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,o=/^(?:GET|HEAD)$/,aH=/^\/\//,aU=/^([\w.+-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,b0=bJ.fn.load,v={},a7={},aW="*/".concat("*");try{Y=aL.href;}catch(bf){Y=l.createElement("a");
Y.href="";Y=Y.href;}b1=aU.exec(Y.toLowerCase())||[];function bL(e){return function(b6,b7){if(typeof b6!=="string"){b7=b6;b6="*";}var b3,b4=0,b5=b6.toLowerCase().match(ac)||[];if(bJ.isFunction(b7)){while((b3=b5[b4++])){if(b3[0]==="+"){b3=b3.slice(1)||"*";(e[b3]=e[b3]||[]).unshift(b7);}else{(e[b3]=e[b3]||[]).push(b7);}}}};}function n(e,b4,b8,b5){var b3={},b6=(e===a7);function b7(b9){var ca;b3[b9]=true;
bJ.each(e[b9]||[],function(cc,cb){var cd=cb(b4,b8,b5);if(typeof cd==="string"&&!b6&&!b3[cd]){b4.dataTypes.unshift(cd);b7(cd);return false;}else{if(b6){return !(ca=cd);}}});return ca;}return b7(b4.dataTypes[0])||!b3["*"]&&b7("*");}function r(b4,b5){var e,b3,b6=bJ.ajaxSettings.flatOptions||{};for(b3 in b5){if(b5[b3]!==aG){(b6[b3]?b4:(e||(e={})))[b3]=b5[b3];}}if(e){bJ.extend(true,b4,e);}return b4;}bJ.fn.load=function(b5,b8,b9){if(typeof b5!=="string"&&b0){return b0.apply(this,arguments);
}var e,b4,b6,b3=this,b7=b5.indexOf(" ");if(b7>=0){e=b5.slice(b7,b5.length);b5=b5.slice(0,b7);}if(bJ.isFunction(b8)){b9=b8;b8=aG;}else{if(b8&&typeof b8==="object"){b6="POST";}}if(b3.length>0){bJ.ajax({url:b5,type:b6,dataType:"html",data:b8}).done(function(ca){b4=arguments;b3.html(e?bJ("<div>").append(bJ.parseHTML(ca)).find(e):ca);}).complete(b9&&function(cb,ca){b3.each(b9,b4||[cb.responseText,ca,cb]);
});}return this;};bJ.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,b3){bJ.fn[b3]=function(b4){return this.on(b3,b4);};});bJ.each(["get","post"],function(e,b3){bJ[b3]=function(b4,b6,b7,b5){if(bJ.isFunction(b6)){b5=b5||b7;b7=b6;b6=aG;}return bJ.ajax({url:b4,type:b3,dataType:b5,data:b6,success:b7});};});bJ.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Y,type:"GET",isLocal:B.test(b1[1]),global:true,processData:true,async:true,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":aW,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":a2.String,"text html":true,"text json":bJ.parseJSON,"text xml":bJ.parseXML},flatOptions:{url:true,context:true}},ajaxSetup:function(b3,e){return e?r(r(b3,bJ.ajaxSettings),e):r(bJ.ajaxSettings,b3);
},ajaxPrefilter:bL(v),ajaxTransport:bL(a7),ajax:function(b7,b4){if(typeof b7==="object"){b4=b7;b7=aG;}b4=b4||{};var cg,ci,b8,cn,cc,b3,cj,b5,cb=bJ.ajaxSetup({},b4),cp=cb.context||cb,ce=cb.context&&(cp.nodeType||cp.jquery)?bJ(cp):bJ.event,co=bJ.Deferred(),cl=bJ.Callbacks("once memory"),b9=cb.statusCode||{},cf={},cm={},b6=0,ca="canceled",ch={readyState:0,getResponseHeader:function(cq){var e;if(b6===2){if(!b5){b5={};
while((e=ag.exec(cn))){b5[e[1].toLowerCase()]=e[2];}}e=b5[cq.toLowerCase()];}return e==null?null:e;},getAllResponseHeaders:function(){return b6===2?cn:null;},setRequestHeader:function(cq,cr){var e=cq.toLowerCase();if(!b6){cq=cm[e]=cm[e]||cq;cf[cq]=cr;}return this;},overrideMimeType:function(e){if(!b6){cb.mimeType=e;}return this;},statusCode:function(cq){var e;if(cq){if(b6<2){for(e in cq){b9[e]=[b9[e],cq[e]];
}}else{ch.always(cq[ch.status]);}}return this;},abort:function(cq){var e=cq||ca;if(cj){cj.abort(e);}cd(0,e);return this;}};co.promise(ch).complete=cl.add;ch.success=ch.done;ch.error=ch.fail;cb.url=((b7||cb.url||Y)+"").replace(ap,"").replace(aH,b1[1]+"//");cb.type=b4.method||b4.type||cb.method||cb.type;cb.dataTypes=bJ.trim(cb.dataType||"*").toLowerCase().match(ac)||[""];if(cb.crossDomain==null){cg=aU.exec(cb.url.toLowerCase());
cb.crossDomain=!!(cg&&(cg[1]!==b1[1]||cg[2]!==b1[2]||(cg[3]||(cg[1]==="http:"?80:443))!=(b1[3]||(b1[1]==="http:"?80:443))));}if(cb.data&&cb.processData&&typeof cb.data!=="string"){cb.data=bJ.param(cb.data,cb.traditional);}n(v,cb,b4,ch);if(b6===2){return ch;}b3=cb.global;if(b3&&bJ.active++===0){bJ.event.trigger("ajaxStart");}cb.type=cb.type.toUpperCase();cb.hasContent=!o.test(cb.type);b8=cb.url;if(!cb.hasContent){if(cb.data){b8=(cb.url+=(az.test(b8)?"&":"?")+cb.data);
delete cb.data;}if(cb.cache===false){cb.url=O.test(b8)?b8.replace(O,"$1_="+bO++):b8+(az.test(b8)?"&":"?")+"_="+bO++;}}if(cb.ifModified){if(bJ.lastModified[b8]){ch.setRequestHeader("If-Modified-Since",bJ.lastModified[b8]);}if(bJ.etag[b8]){ch.setRequestHeader("If-None-Match",bJ.etag[b8]);}}if(cb.data&&cb.hasContent&&cb.contentType!==false||b4.contentType){ch.setRequestHeader("Content-Type",cb.contentType);
}ch.setRequestHeader("Accept",cb.dataTypes[0]&&cb.accepts[cb.dataTypes[0]]?cb.accepts[cb.dataTypes[0]]+(cb.dataTypes[0]!=="*"?", "+aW+"; q=0.01":""):cb.accepts["*"]);for(ci in cb.headers){ch.setRequestHeader(ci,cb.headers[ci]);}if(cb.beforeSend&&(cb.beforeSend.call(cp,ch,cb)===false||b6===2)){return ch.abort();}ca="abort";for(ci in {success:1,error:1,complete:1}){ch[ci](cb[ci]);}cj=n(a7,cb,b4,ch);if(!cj){cd(-1,"No Transport");
}else{ch.readyState=1;if(b3){ce.trigger("ajaxSend",[ch,cb]);}if(cb.async&&cb.timeout>0){cc=setTimeout(function(){ch.abort("timeout");},cb.timeout);}try{b6=1;cj.send(cf,cd);}catch(ck){if(b6<2){cd(-1,ck);}else{throw ck;}}}function cd(cu,cq,cv,cs){var e,cy,cw,ct,cx,cr=cq;if(b6===2){return;}b6=2;if(cc){clearTimeout(cc);}cj=aG;cn=cs||"";ch.readyState=cu>0?4:0;if(cv){ct=g(cb,ch,cv);}if(cu>=200&&cu<300||cu===304){if(cb.ifModified){cx=ch.getResponseHeader("Last-Modified");
if(cx){bJ.lastModified[b8]=cx;}cx=ch.getResponseHeader("etag");if(cx){bJ.etag[b8]=cx;}}if(cu===204){e=true;cr="nocontent";}else{if(cu===304){e=true;cr="notmodified";}else{e=af(cb,ct);cr=e.state;cy=e.data;cw=e.error;e=!cw;}}}else{cw=cr;if(cu||!cr){cr="error";if(cu<0){cu=0;}}}ch.status=cu;ch.statusText=(cq||cr)+"";if(e){co.resolveWith(cp,[cy,cr,ch]);}else{co.rejectWith(cp,[ch,cr,cw]);}ch.statusCode(b9);
b9=aG;if(b3){ce.trigger(e?"ajaxSuccess":"ajaxError",[ch,cb,e?cy:cw]);}cl.fireWith(cp,[ch,cr]);if(b3){ce.trigger("ajaxComplete",[ch,cb]);if(!(--bJ.active)){bJ.event.trigger("ajaxStop");}}}return ch;},getScript:function(e,b3){return bJ.get(e,aG,b3,"script");},getJSON:function(e,b3,b4){return bJ.get(e,b3,b4,"json");}});function g(cb,ca,b7){var e,b6,b5,b8,b3=cb.contents,b9=cb.dataTypes,b4=cb.responseFields;
for(b8 in b4){if(b8 in b7){ca[b4[b8]]=b7[b8];}}while(b9[0]==="*"){b9.shift();if(b6===aG){b6=cb.mimeType||ca.getResponseHeader("Content-Type");}}if(b6){for(b8 in b3){if(b3[b8]&&b3[b8].test(b6)){b9.unshift(b8);break;}}}if(b9[0] in b7){b5=b9[0];}else{for(b8 in b7){if(!b9[0]||cb.converters[b8+" "+b9[0]]){b5=b8;break;}if(!e){e=b8;}}b5=b5||e;}if(b5){if(b5!==b9[0]){b9.unshift(b5);}return b7[b5];}}function af(cd,b5){var b3,b9,cb,b6,cc={},b7=0,ca=cd.dataTypes.slice(),b4=ca[0];
if(cd.dataFilter){b5=cd.dataFilter(b5,cd.dataType);}if(ca[1]){for(cb in cd.converters){cc[cb.toLowerCase()]=cd.converters[cb];}}for(;(b9=ca[++b7]);){if(b9!=="*"){if(b4!=="*"&&b4!==b9){cb=cc[b4+" "+b9]||cc["* "+b9];if(!cb){for(b3 in cc){b6=b3.split(" ");if(b6[1]===b9){cb=cc[b4+" "+b6[0]]||cc["* "+b6[0]];if(cb){if(cb===true){cb=cc[b3];}else{if(cc[b3]!==true){b9=b6[0];ca.splice(b7--,0,b9);}}break;}}}}if(cb!==true){if(cb&&cd["throws"]){b5=cb(b5);
}else{try{b5=cb(b5);}catch(b8){return{state:"parsererror",error:cb?b8:"No conversion from "+b4+" to "+b9};}}}}b4=b9;}}return{state:"success",data:b5};}bJ.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(e){bJ.globalEval(e);return e;}}});bJ.ajaxPrefilter("script",function(e){if(e.cache===aG){e.cache=false;
}if(e.crossDomain){e.type="GET";e.global=false;}});bJ.ajaxTransport("script",function(b4){if(b4.crossDomain){var e,b3=l.head||bJ("head")[0]||l.documentElement;return{send:function(b5,b6){e=l.createElement("script");e.async=true;if(b4.scriptCharset){e.charset=b4.scriptCharset;}e.src=b4.url;e.onload=e.onreadystatechange=function(b8,b7){if(b7||!e.readyState||/loaded|complete/.test(e.readyState)){e.onload=e.onreadystatechange=null;
if(e.parentNode){e.parentNode.removeChild(e);}e=null;if(!b7){b6(200,"success");}}};b3.insertBefore(e,b3.firstChild);},abort:function(){if(e){e.onload(aG,true);}}};}});var bq=[],a5=/(=)\?(?=&|$)|\?\?/;bJ.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=bq.pop()||(bJ.expando+"_"+(bO++));this[e]=true;return e;}});bJ.ajaxPrefilter("json jsonp",function(b5,e,b6){var b8,b3,b4,b7=b5.jsonp!==false&&(a5.test(b5.url)?"url":typeof b5.data==="string"&&!(b5.contentType||"").indexOf("application/x-www-form-urlencoded")&&a5.test(b5.data)&&"data");
if(b7||b5.dataTypes[0]==="jsonp"){b8=b5.jsonpCallback=bJ.isFunction(b5.jsonpCallback)?b5.jsonpCallback():b5.jsonpCallback;if(b7){b5[b7]=b5[b7].replace(a5,"$1"+b8);}else{if(b5.jsonp!==false){b5.url+=(az.test(b5.url)?"&":"?")+b5.jsonp+"="+b8;}}b5.converters["script json"]=function(){if(!b4){bJ.error(b8+" was not called");}return b4[0];};b5.dataTypes[0]="json";b3=a2[b8];a2[b8]=function(){b4=arguments;
};b6.always(function(){a2[b8]=b3;if(b5[b8]){b5.jsonpCallback=e.jsonpCallback;bq.push(b8);}if(b4&&bJ.isFunction(b3)){b3(b4[0]);}b4=b3=aG;});return"script";}});var ah,ax,ay=0,aP=a2.ActiveXObject&&function(){var e;for(e in ah){ah[e](aG,true);}};function bD(){try{return new a2.XMLHttpRequest();}catch(b3){}}function bd(){try{return new a2.ActiveXObject("Microsoft.XMLHTTP");}catch(b3){}}bJ.ajaxSettings.xhr=a2.ActiveXObject?function(){return !this.isLocal&&bD()||bd();
}:bD;ax=bJ.ajaxSettings.xhr();bJ.support.cors=!!ax&&("withCredentials" in ax);ax=bJ.support.ajax=!!ax;if(ax){bJ.ajaxTransport(function(e){if(!e.crossDomain||bJ.support.cors){var b3;return{send:function(b9,b4){var b7,b5,b8=e.xhr();if(e.username){b8.open(e.type,e.url,e.async,e.username,e.password);}else{b8.open(e.type,e.url,e.async);}if(e.xhrFields){for(b5 in e.xhrFields){b8[b5]=e.xhrFields[b5];}}if(e.mimeType&&b8.overrideMimeType){b8.overrideMimeType(e.mimeType);
}if(!e.crossDomain&&!b9["X-Requested-With"]){b9["X-Requested-With"]="XMLHttpRequest";}try{for(b5 in b9){b8.setRequestHeader(b5,b9[b5]);}}catch(b6){}b8.send((e.hasContent&&e.data)||null);b3=function(cc,cb){var ca,cd,cg,ce;try{if(b3&&(cb||b8.readyState===4)){b3=aG;if(b7){b8.onreadystatechange=bJ.noop;if(aP){delete ah[b7];}}if(cb){if(b8.readyState!==4){b8.abort();}}else{ce={};ca=b8.status;cd=b8.getAllResponseHeaders();
if(typeof b8.responseText==="string"){ce.text=b8.responseText;}try{cg=b8.statusText;}catch(cf){cg="";}if(!ca&&e.isLocal&&!e.crossDomain){ca=ce.text?200:404;}else{if(ca===1223){ca=204;}}}}}catch(ch){if(!cb){b4(-1,ch);}}if(ce){b4(ca,cg,ce,cd);}};if(!e.async){b3();}else{if(b8.readyState===4){setTimeout(b3);}else{b7=++ay;if(aP){if(!ah){ah={};bJ(a2).unload(aP);}ah[b7]=b3;}b8.onreadystatechange=b3;}}},abort:function(){if(b3){b3(aG,true);
}}};}});}var K,ad,bR=/^(?:toggle|show|hide)$/,bK=new RegExp("^(?:([+-])=|)("+bA+")([a-z%]*)$","i"),bQ=/queueHooks$/,aB=[h],a0={"*":[function(e,b9){var b5,ca,cb=this.createTween(e,b9),b6=bK.exec(b9),b7=cb.cur(),b3=+b7||0,b4=1,b8=20;if(b6){b5=+b6[2];ca=b6[3]||(bJ.cssNumber[e]?"":"px");if(ca!=="px"&&b3){b3=bJ.css(cb.elem,e,true)||b5||1;do{b4=b4||".5";b3=b3/b4;bJ.style(cb.elem,e,b3+ca);}while(b4!==(b4=cb.cur()/b7)&&b4!==1&&--b8);
}cb.unit=ca;cb.start=b3;cb.end=b6[1]?b3+(b6[1]+1)*b5:b5;}return cb;}]};function bm(){setTimeout(function(){K=aG;});return(K=bJ.now());}function be(b3,e){bJ.each(e,function(b8,b6){var b7=(a0[b8]||[]).concat(a0["*"]),b4=0,b5=b7.length;for(;b4<b5;b4++){if(b7[b4].call(b3,b8,b6)){return;}}});}function f(b4,b8,cb){var cc,e,b7=0,b3=aB.length,ca=bJ.Deferred().always(function(){delete b6.elem;}),b6=function(){if(e){return false;
}var ci=K||bm(),cf=Math.max(0,b5.startTime+b5.duration-ci),cd=cf/b5.duration||0,ch=1-cd,ce=0,cg=b5.tweens.length;for(;ce<cg;ce++){b5.tweens[ce].run(ch);}ca.notifyWith(b4,[b5,ch,cf]);if(ch<1&&cg){return cf;}else{ca.resolveWith(b4,[b5]);return false;}},b5=ca.promise({elem:b4,props:bJ.extend({},b8),opts:bJ.extend(true,{specialEasing:{}},cb),originalProperties:b8,originalOptions:cb,startTime:K||bm(),duration:cb.duration,tweens:[],createTween:function(cf,cd){var ce=bJ.Tween(b4,b5.opts,cf,cd,b5.opts.specialEasing[cf]||b5.opts.easing);
b5.tweens.push(ce);return ce;},stop:function(ce){var cd=0,cf=ce?b5.tweens.length:0;if(e){return this;}e=true;for(;cd<cf;cd++){b5.tweens[cd].run(1);}if(ce){ca.resolveWith(b4,[b5,ce]);}else{ca.rejectWith(b4,[b5,ce]);}return this;}}),b9=b5.props;am(b9,b5.opts.specialEasing);for(;b7<b3;b7++){cc=aB[b7].call(b5,b4,b9,b5.opts);if(cc){return cc;}}be(b5,b9);if(bJ.isFunction(b5.opts.start)){b5.opts.start.call(b4,b5);
}bJ.fx.timer(bJ.extend(b6,{elem:b4,anim:b5,queue:b5.opts.queue}));return b5.progress(b5.opts.progress).done(b5.opts.done,b5.opts.complete).fail(b5.opts.fail).always(b5.opts.always);}function am(b5,b7){var b6,b4,b3,b8,e;for(b3 in b5){b4=bJ.camelCase(b3);b8=b7[b4];b6=b5[b3];if(bJ.isArray(b6)){b8=b6[1];b6=b5[b3]=b6[0];}if(b3!==b4){b5[b4]=b6;delete b5[b3];}e=bJ.cssHooks[b4];if(e&&"expand" in e){b6=e.expand(b6);
delete b5[b4];for(b3 in b6){if(!(b3 in b5)){b5[b3]=b6[b3];b7[b3]=b8;}}}else{b7[b4]=b8;}}}bJ.Animation=bJ.extend(f,{tweener:function(b3,b6){if(bJ.isFunction(b3)){b6=b3;b3=["*"];}else{b3=b3.split(" ");}var b5,e=0,b4=b3.length;for(;e<b4;e++){b5=b3[e];a0[b5]=a0[b5]||[];a0[b5].unshift(b6);}},prefilter:function(b3,e){if(e){aB.unshift(b3);}else{aB.push(b3);}}});function h(b6,cc,e){var b4,cb,b5,ce,ci,b8,ch,cg,cf,b7=this,b3=b6.style,cd={},ca=[],b9=b6.nodeType&&P(b6);
if(!e.queue){cg=bJ._queueHooks(b6,"fx");if(cg.unqueued==null){cg.unqueued=0;cf=cg.empty.fire;cg.empty.fire=function(){if(!cg.unqueued){cf();}};}cg.unqueued++;b7.always(function(){b7.always(function(){cg.unqueued--;if(!bJ.queue(b6,"fx").length){cg.empty.fire();}});});}if(b6.nodeType===1&&("height" in cc||"width" in cc)){e.overflow=[b3.overflow,b3.overflowX,b3.overflowY];if(bJ.css(b6,"display")==="inline"&&bJ.css(b6,"float")==="none"){if(!bJ.support.inlineBlockNeedsLayout||bE(b6.nodeName)==="inline"){b3.display="inline-block";
}else{b3.zoom=1;}}}if(e.overflow){b3.overflow="hidden";if(!bJ.support.shrinkWrapBlocks){b7.always(function(){b3.overflow=e.overflow[0];b3.overflowX=e.overflow[1];b3.overflowY=e.overflow[2];});}}for(cb in cc){ce=cc[cb];if(bR.exec(ce)){delete cc[cb];b8=b8||ce==="toggle";if(ce===(b9?"hide":"show")){continue;}ca.push(cb);}}b5=ca.length;if(b5){ci=bJ._data(b6,"fxshow")||bJ._data(b6,"fxshow",{});if("hidden" in ci){b9=ci.hidden;
}if(b8){ci.hidden=!b9;}if(b9){bJ(b6).show();}else{b7.done(function(){bJ(b6).hide();});}b7.done(function(){var cj;bJ._removeData(b6,"fxshow");for(cj in cd){bJ.style(b6,cj,cd[cj]);}});for(cb=0;cb<b5;cb++){b4=ca[cb];ch=b7.createTween(b4,b9?ci[b4]:0);cd[b4]=ci[b4]||bJ.style(b6,b4);if(!(b4 in ci)){ci[b4]=ch.start;if(b9){ch.end=ch.start;ch.start=b4==="width"||b4==="height"?1:0;}}}}}function G(b4,b3,b6,e,b5){return new G.prototype.init(b4,b3,b6,e,b5);
}bJ.Tween=G;G.prototype={constructor:G,init:function(b5,b3,b7,e,b6,b4){this.elem=b5;this.prop=b7;this.easing=b6||"swing";this.options=b3;this.start=this.now=this.cur();this.end=e;this.unit=b4||(bJ.cssNumber[b7]?"":"px");},cur:function(){var e=G.propHooks[this.prop];return e&&e.get?e.get(this):G.propHooks._default.get(this);},run:function(b4){var b3,e=G.propHooks[this.prop];if(this.options.duration){this.pos=b3=bJ.easing[this.easing](b4,this.options.duration*b4,0,1,this.options.duration);
}else{this.pos=b3=b4;}this.now=(this.end-this.start)*b3+this.start;if(this.options.step){this.options.step.call(this.elem,this.now,this);}if(e&&e.set){e.set(this);}else{G.propHooks._default.set(this);}return this;}};G.prototype.init.prototype=G.prototype;G.propHooks={_default:{get:function(b3){var e;if(b3.elem[b3.prop]!=null&&(!b3.elem.style||b3.elem.style[b3.prop]==null)){return b3.elem[b3.prop];}e=bJ.css(b3.elem,b3.prop,"");
return !e||e==="auto"?0:e;},set:function(e){if(bJ.fx.step[e.prop]){bJ.fx.step[e.prop](e);}else{if(e.elem.style&&(e.elem.style[bJ.cssProps[e.prop]]!=null||bJ.cssHooks[e.prop])){bJ.style(e.elem,e.prop,e.now+e.unit);}else{e.elem[e.prop]=e.now;}}}}};G.propHooks.scrollTop=G.propHooks.scrollLeft={set:function(e){if(e.elem.nodeType&&e.elem.parentNode){e.elem[e.prop]=e.now;}}};bJ.each(["toggle","show","hide"],function(b3,e){var b4=bJ.fn[e];
bJ.fn[e]=function(b5,b7,b6){return b5==null||typeof b5==="boolean"?b4.apply(this,arguments):this.animate(bI(e,true),b5,b7,b6);};});bJ.fn.extend({fadeTo:function(e,b5,b4,b3){return this.filter(P).css("opacity",0).show().end().animate({opacity:b5},e,b4,b3);},animate:function(b8,b5,b7,b6){var b4=bJ.isEmptyObject(b8),e=bJ.speed(b5,b7,b6),b3=function(){var b9=f(this,bJ.extend({},b8),e);b3.finish=function(){b9.stop(true);
};if(b4||bJ._data(this,"finish")){b9.stop(true);}};b3.finish=b3;return b4||e.queue===false?this.each(b3):this.queue(e.queue,b3);},stop:function(b4,b3,e){var b5=function(b6){var b7=b6.stop;delete b6.stop;b7(e);};if(typeof b4!=="string"){e=b3;b3=b4;b4=aG;}if(b3&&b4!==false){this.queue(b4||"fx",[]);}return this.each(function(){var b9=true,b6=b4!=null&&b4+"queueHooks",b8=bJ.timers,b7=bJ._data(this);if(b6){if(b7[b6]&&b7[b6].stop){b5(b7[b6]);
}}else{for(b6 in b7){if(b7[b6]&&b7[b6].stop&&bQ.test(b6)){b5(b7[b6]);}}}for(b6=b8.length;b6--;){if(b8[b6].elem===this&&(b4==null||b8[b6].queue===b4)){b8[b6].anim.stop(e);b9=false;b8.splice(b6,1);}}if(b9||!e){bJ.dequeue(this,b4);}});},finish:function(e){if(e!==false){e=e||"fx";}return this.each(function(){var b5,b8=bJ._data(this),b4=b8[e+"queue"],b3=b8[e+"queueHooks"],b7=bJ.timers,b6=b4?b4.length:0;
b8.finish=true;bJ.queue(this,e,[]);if(b3&&b3.cur&&b3.cur.finish){b3.cur.finish.call(this);}for(b5=b7.length;b5--;){if(b7[b5].elem===this&&b7[b5].queue===e){b7[b5].anim.stop(true);b7.splice(b5,1);}}for(b5=0;b5<b6;b5++){if(b4[b5]&&b4[b5].finish){b4[b5].finish.call(this);}}delete b8.finish;});}});function bI(b4,b6){var b5,e={height:b4},b3=0;b6=b6?1:0;for(;b3<4;b3+=2-b6){b5=bT[b3];e["margin"+b5]=e["padding"+b5]=b4;
}if(b6){e.opacity=e.width=b4;}return e;}bJ.each({slideDown:bI("show"),slideUp:bI("hide"),slideToggle:bI("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,b3){bJ.fn[e]=function(b4,b6,b5){return this.animate(b3,b4,b6,b5);};});bJ.speed=function(b4,b5,b3){var e=b4&&typeof b4==="object"?bJ.extend({},b4):{complete:b3||!b3&&b5||bJ.isFunction(b4)&&b4,duration:b4,easing:b3&&b5||b5&&!bJ.isFunction(b5)&&b5};
e.duration=bJ.fx.off?0:typeof e.duration==="number"?e.duration:e.duration in bJ.fx.speeds?bJ.fx.speeds[e.duration]:bJ.fx.speeds._default;if(e.queue==null||e.queue===true){e.queue="fx";}e.old=e.complete;e.complete=function(){if(bJ.isFunction(e.old)){e.old.call(this);}if(e.queue){bJ.dequeue(this,e.queue);}};return e;};bJ.easing={linear:function(e){return e;},swing:function(e){return 0.5-Math.cos(e*Math.PI)/2;
}};bJ.timers=[];bJ.fx=G.prototype.init;bJ.fx.tick=function(){var b4,b3=bJ.timers,e=0;K=bJ.now();for(;e<b3.length;e++){b4=b3[e];if(!b4()&&b3[e]===b4){b3.splice(e--,1);}}if(!b3.length){bJ.fx.stop();}K=aG;};bJ.fx.timer=function(e){if(e()&&bJ.timers.push(e)){bJ.fx.start();}};bJ.fx.interval=13;bJ.fx.start=function(){if(!ad){ad=setInterval(bJ.fx.tick,bJ.fx.interval);}};bJ.fx.stop=function(){clearInterval(ad);
ad=null;};bJ.fx.speeds={slow:600,fast:200,_default:400};bJ.fx.step={};if(bJ.expr&&bJ.expr.filters){bJ.expr.filters.animated=function(e){return bJ.grep(bJ.timers,function(b3){return e===b3.elem;}).length;};}bJ.fn.offset=function(b3){if(arguments.length){return b3===aG?this:this.each(function(b8){bJ.offset.setOffset(this,b3,b8);});}var e,b7,b5={top:0,left:0},b4=this[0],b6=b4&&b4.ownerDocument;if(!b6){return;
}e=b6.documentElement;if(!bJ.contains(e,b4)){return b5;}if(typeof b4.getBoundingClientRect!==aC){b5=b4.getBoundingClientRect();}b7=bp(b6);return{top:b5.top+(b7.pageYOffset||e.scrollTop)-(e.clientTop||0),left:b5.left+(b7.pageXOffset||e.scrollLeft)-(e.clientLeft||0)};};bJ.offset={setOffset:function(b5,ce,b8){var b9=bJ.css(b5,"position");if(b9==="static"){b5.style.position="relative";}var b7=bJ(b5),b3=b7.offset(),e=bJ.css(b5,"top"),cc=bJ.css(b5,"left"),cd=(b9==="absolute"||b9==="fixed")&&bJ.inArray("auto",[e,cc])>-1,cb={},ca={},b4,b6;
if(cd){ca=b7.position();b4=ca.top;b6=ca.left;}else{b4=parseFloat(e)||0;b6=parseFloat(cc)||0;}if(bJ.isFunction(ce)){ce=ce.call(b5,b8,b3);}if(ce.top!=null){cb.top=(ce.top-b3.top)+b4;}if(ce.left!=null){cb.left=(ce.left-b3.left)+b6;}if("using" in ce){ce.using.call(b5,cb);}else{b7.css(cb);}}};bJ.fn.extend({position:function(){if(!this[0]){return;}var b4,b5,e={top:0,left:0},b3=this[0];if(bJ.css(b3,"position")==="fixed"){b5=b3.getBoundingClientRect();
}else{b4=this.offsetParent();b5=this.offset();if(!bJ.nodeName(b4[0],"html")){e=b4.offset();}e.top+=bJ.css(b4[0],"borderTopWidth",true);e.left+=bJ.css(b4[0],"borderLeftWidth",true);}return{top:b5.top-e.top-bJ.css(b3,"marginTop",true),left:b5.left-e.left-bJ.css(b3,"marginLeft",true)};},offsetParent:function(){return this.map(function(){var e=this.offsetParent||l.documentElement;while(e&&(!bJ.nodeName(e,"html")&&bJ.css(e,"position")==="static")){e=e.offsetParent;
}return e||l.documentElement;});}});bJ.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(b4,b3){var e=/Y/.test(b3);bJ.fn[b4]=function(b5){return bJ.access(this,function(b6,b9,b8){var b7=bp(b6);if(b8===aG){return b7?(b3 in b7)?b7[b3]:b7.document.documentElement[b9]:b6[b9];}if(b7){b7.scrollTo(!e?b8:bJ(b7).scrollLeft(),e?b8:bJ(b7).scrollTop());}else{b6[b9]=b8;}},b4,b5,arguments.length,null);
};});function bp(e){return bJ.isWindow(e)?e:e.nodeType===9?e.defaultView||e.parentWindow:false;}bJ.each({Height:"height",Width:"width"},function(e,b3){bJ.each({padding:"inner"+e,content:b3,"":"outer"+e},function(b4,b5){bJ.fn[b5]=function(b9,b8){var b7=arguments.length&&(b4||typeof b9!=="boolean"),b6=b4||(b9===true||b8===true?"margin":"border");return bJ.access(this,function(cb,ca,cc){var cd;if(bJ.isWindow(cb)){return cb.document.documentElement["client"+e];
}if(cb.nodeType===9){cd=cb.documentElement;return Math.max(cb.body["scroll"+e],cd["scroll"+e],cb.body["offset"+e],cd["offset"+e],cd["client"+e]);}return cc===aG?bJ.css(cb,ca,b6):bJ.style(cb,ca,cc,b6);},b3,b7?b9:aG,b7,null);};});});a2.jQuery=a2.$=bJ;if(typeof define==="function"&&define.amd&&define.amd.jQuery){define("jquery",[],function(){return bJ;});}})(window);

/* Copyright (c) 2011 Brandon Aaron (http://brandonaaron.net)
 * Licensed under the MIT License (LICENSE.txt).
 *
 * Thanks to: http://adomas.org/javascript-mouse-wheel/ for some pointers.
 * Thanks to: Mathias Bank(http://www.mathias-bank.de) for a scope bug fix.
 * Thanks to: Seamus Leahy for adding deltaX and deltaY
 *
 * Version: 3.0.6
 * 
 * Requires: 1.2.2+
 */
(function(d){var b=["DOMMouseScroll","mousewheel"];
if(d.event.fixHooks){for(var a=b.length;a;){d.event.fixHooks[b[--a]]=d.event.mouseHooks;}}d.event.special.mousewheel={setup:function(){if(this.addEventListener){for(var e=b.length;e;){this.addEventListener(b[--e],c,false);}}else{this.onmousewheel=c;}},teardown:function(){if(this.removeEventListener){for(var e=b.length;e;){this.removeEventListener(b[--e],c,false);}}else{this.onmousewheel=null;}}};d.fn.extend({mousewheel:function(e){return e?this.bind("mousewheel",e):this.trigger("mousewheel");
},unmousewheel:function(e){return this.unbind("mousewheel",e);}});function c(j){var h=j||window.event,g=[].slice.call(arguments,1),k=0,i=true,f=0,e=0;j=d.event.fix(h);j.type="mousewheel";if(h.wheelDelta){k=h.wheelDelta/120;}if(h.detail){k=-h.detail/3;}e=k;if(h.axis!==undefined&&h.axis===h.HORIZONTAL_AXIS){e=0;f=-1*k;}if(h.wheelDeltaY!==undefined){e=h.wheelDeltaY/120;}if(h.wheelDeltaX!==undefined){f=-1*h.wheelDeltaX/120;
}g.unshift(j,k,f,e);return(d.event.dispatch||d.event.handle).apply(this,g);}})(jQuery);(function(a){a.fn.samplebox=function(b){var c=this;b.display=b.display||false;var f="inline";if(!b.display){f="none";}var d=a(this).width()||"";var e=a("<span></span>").html(b.text).css({position:"absolute",color:"#666666",width:d,marginTop:2,marginLeft:2,display:f});a(this).before(e);e.click(function(){a(this).hide();c.focus();});c.blur(function(){if(a(this).val()==""){e.css({display:"inline"});}});
c.focus(function(){e.hide();});};a.fn.change_value=function(b){a(this).val(b);if(b==""){a(this).prev().css({display:"inline"});}else{a(this).prev().hide();}};})(jQuery);

/* jQuery Migrate v1.2.1 | (c) 2005, 2013 jQuery Foundation, Inc. and other contributors | jquery.org/license */
jQuery.migrateMute===void 0&&(jQuery.migrateMute=!0),function(ah,O,Y){function U(b){var a=O.console;ad[b]||(ad[b]=!0,ah.migrateWarnings.push(b),a&&a.warn&&!ah.migrateMute&&(a.warn("JQMIGRATE: "+b),ah.migrateTrace&&a.trace&&a.trace()));}function al(d,b,c,f){if(Object.defineProperty){try{return Object.defineProperty(d,b,{configurable:!0,enumerable:!0,get:function(){return U(f),c;
},set:function(a){U(f),c=a;}}),Y;}catch(e){}}ah._definePropertyBroken=!0,d[b]=c;}var ad={};ah.migrateWarnings=[],!ah.migrateMute&&O.console&&O.console.log&&O.console.log("JQMIGRATE: Logging is active"),ah.migrateTrace===Y&&(ah.migrateTrace=!0),ah.migrateReset=function(){ad={},ah.migrateWarnings.length=0;},"BackCompat"===document.compatMode&&U("jQuery is not compatible with Quirks Mode");var X=ah("<input/>",{size:1}).attr("size")&&ah.attrFn,P=ah.attr,L=ah.attrHooks.value&&ah.attrHooks.value.get||function(){return null;
},aj=ah.attrHooks.value&&ah.attrHooks.value.set||function(){return Y;},aa=/^(?:input|button)$/i,ai=/^[238]$/,W=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,ag=/^(?:checked|selected)$/i;al(ah,"attrFn",X||{},"jQuery.attrFn is deprecated"),ah.attr=function(f,b,e,d){var j=b.toLowerCase(),h=f&&f.nodeType;return d&&(4>P.length&&U("jQuery.fn.attr( props, pass ) is deprecated"),f&&!ai.test(h)&&(X?b in X:ah.isFunction(ah.fn[b])))?ah(f)[b](e):("type"===b&&e!==Y&&aa.test(f.nodeName)&&f.parentNode&&U("Can't change the 'type' of an input or button in IE 6/7/8"),!ah.attrHooks[j]&&W.test(j)&&(ah.attrHooks[j]={get:function(k,l){var c,g=ah.prop(k,l);
return g===!0||"boolean"!=typeof g&&(c=k.getAttributeNode(l))&&c.nodeValue!==!1?l.toLowerCase():Y;},set:function(g,k,i){var c;return k===!1?ah.removeAttr(g,i):(c=ah.propFix[i]||i,c in g&&(g[c]=!0),g.setAttribute(i,i.toLowerCase())),i;}},ag.test(j)&&U("jQuery.fn.attr('"+j+"') may use property instead of attribute")),P.call(ah,f,b,e));},ah.attrHooks.value={get:function(b,a){var c=(b.nodeName||"").toLowerCase();
return"button"===c?L.apply(this,arguments):("input"!==c&&"option"!==c&&U("jQuery.fn.attr('value') no longer gets properties"),a in b?b.value:null);},set:function(d,c){var b=(d.nodeName||"").toLowerCase();return"button"===b?aj.apply(this,arguments):("input"!==b&&"option"!==b&&U("jQuery.fn.attr('value', val) no longer sets properties"),d.value=c,Y);}};var af,ae,K=ah.fn.init,Z=ah.parseJSON,F=/^([^<]*)(<[\w\W]+>)([^>]*)$/;
ah.fn.init=function(d,e,b){var c;return d&&"string"==typeof d&&!ah.isPlainObject(e)&&(c=F.exec(ah.trim(d)))&&c[0]&&("<"!==d.charAt(0)&&U("$(html) HTML strings must start with '<' character"),c[3]&&U("$(html) HTML text after last tag is ignored"),"#"===c[0].charAt(0)&&(U("HTML string cannot start with a '#' character"),ah.error("JQMIGRATE: Invalid selector string (XSS)")),e&&e.context&&(e=e.context),ah.parseHTML)?K.call(this,ah.parseHTML(c[2],e,!0),e,b):K.apply(this,arguments);
},ah.fn.init.prototype=ah.fn,ah.parseJSON=function(a){return a||null===a?Z.apply(this,arguments):(U("jQuery.parseJSON requires a valid JSON string"),null);},ah.uaMatch=function(b){b=b.toLowerCase();var a=/(chrome)[ \/]([\w.]+)/.exec(b)||/(webkit)[ \/]([\w.]+)/.exec(b)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(b)||/(msie) ([\w.]+)/.exec(b)||0>b.indexOf("compatible")&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(b)||[];
return{browser:a[1]||"",version:a[2]||"0"};},ah.browser||(af=ah.uaMatch(navigator.userAgent),ae={},af.browser&&(ae[af.browser]=!0,ae.version=af.version),ae.chrome?ae.webkit=!0:ae.webkit&&(ae.safari=!0),ah.browser=ae),al(ah,"browser",ah.browser,"jQuery.browser is deprecated"),ah.sub=function(){function a(c,d){return new a.fn.init(c,d);}ah.extend(!0,a,this),a.superclass=this,a.fn=a.prototype=this(),a.fn.constructor=a,a.sub=this.sub,a.fn.init=function(d,c){return c&&c instanceof ah&&!(c instanceof a)&&(c=a(c)),ah.fn.init.call(this,d,c,b);
},a.fn.init.prototype=a.fn;var b=a(document);return U("jQuery.sub() is deprecated"),a;},ah.ajaxSetup({converters:{"text json":ah.parseJSON}});var ak=ah.fn.data;ah.fn.data=function(d){var b,c,e=this[0];return !e||"events"!==d||1!==arguments.length||(b=ah.data(e,d),c=ah._data(e,d),b!==Y&&b!==c||c===Y)?ak.apply(this,arguments):(U("Use of jQuery.fn.data('events') is deprecated"),c);};var ac=/\/(java|ecma)script/i,J=ah.fn.andSelf||ah.fn.addBack;
ah.fn.andSelf=function(){return U("jQuery.fn.andSelf() replaced by jQuery.fn.addBack()"),J.apply(this,arguments);},ah.clean||(ah.clean=function(m,j,f,b){j=j||document,j=!j.nodeType&&j[0]||j,j=j.ownerDocument||j,U("jQuery.clean() is deprecated");var n,k,h,e,g=[];if(ah.merge(g,ah.buildFragment(m,j).childNodes),f){for(h=function(a){return !a.type||ac.test(a.type)?b?b.push(a.parentNode?a.parentNode.removeChild(a):a):f.appendChild(a):Y;
},n=0;null!=(k=g[n]);n++){ah.nodeName(k,"script")&&h(k)||(f.appendChild(k),k.getElementsByTagName!==Y&&(e=ah.grep(ah.merge([],k.getElementsByTagName("script")),h),g.splice.apply(g,[n+1,0].concat(e)),n+=e.length));}}return g;});var B=ah.event.add,G=ah.event.remove,ab=ah.event.trigger,D=ah.fn.toggle,q=ah.fn.live,E=ah.fn.die,z="ajaxStart|ajaxStop|ajaxSend|ajaxComplete|ajaxError|ajaxSuccess",R=RegExp("\\b(?:"+z+")\\b"),I=/(?:^|\s)hover(\.\S+|)\b/,V=function(a){return"string"!=typeof a||ah.event.special.hover?a:(I.test(a)&&U("'hover' pseudo-event is deprecated, use 'mouseenter mouseleave'"),a&&a.replace(I,"mouseenter$1 mouseleave$1"));
};ah.event.props&&"attrChange"!==ah.event.props[0]&&ah.event.props.unshift("attrChange","attrName","relatedNode","srcElement"),ah.event.dispatch&&al(ah.event,"handle",ah.event.dispatch,"jQuery.event.handle is undocumented and deprecated"),ah.event.add=function(f,d,g,b,c){f!==document&&R.test(d)&&U("AJAX events should be attached to document: "+d),B.call(this,f,V(d||""),g,b,c);},ah.event.remove=function(f,c,g,d,b){G.call(this,f,V(c)||"",g,d,b);
},ah.fn.error=function(){var a=Array.prototype.slice.call(arguments,0);return U("jQuery.fn.error() is deprecated"),a.splice(0,0,"error"),arguments.length?this.bind.apply(this,a):(this.triggerHandler.apply(this,a),this);},ah.fn.toggle=function(d,g){if(!ah.isFunction(d)||!ah.isFunction(g)){return D.apply(this,arguments);}U("jQuery.fn.toggle(handler, handler...) is deprecated");var b=arguments,c=d.guid||ah.guid++,f=0,e=function(h){var a=(ah._data(this,"lastToggle"+d.guid)||0)%f;
return ah._data(this,"lastToggle"+d.guid,a+1),h.preventDefault(),b[a].apply(this,arguments)||!1;};for(e.guid=c;b.length>f;){b[f++].guid=c;}return this.click(e);},ah.fn.live=function(c,d,b){return U("jQuery.fn.live() is deprecated"),q?q.apply(this,arguments):(ah(this.context).on(c,this.selector,d,b),this);},ah.fn.die=function(a,b){return U("jQuery.fn.die() is deprecated"),E?E.apply(this,arguments):(ah(this.context).off(a,this.selector||"**",b),this);
},ah.event.trigger=function(d,c,f,b){return f||R.test(d)||U("Global events are undocumented and deprecated"),ab.call(this,d,c,f||document,b);},ah.each(z.split("|"),function(a,b){ah.event.special[b]={setup:function(){var c=this;return c!==document&&(ah.event.add(document,b+"."+ah.guid,function(){ah.event.trigger(b,null,c,!0);}),ah._data(this,b,ah.guid++)),!1;},teardown:function(){return this!==document&&ah.event.remove(document,b+"."+ah._data(this,b)),!1;
}};});}(jQuery,window);var YOLP={},Y=YOLP;window.Y=window.YOLP=Y;var $=jQuery.noConflict(true);var jsc=$.now();$.ajaxSetup({jsonp:"callback",jsonpCallback:function(){return"jquery"+(jsc++);}});Y.VERSION=__YOLP_VERSION;Y.HOST_NAME=__YOLP_HOST||"http://olp.yahooapis.jp";Y.CTRL_IMAGE_URL="http://i.yimg.jp/images/map/api/yolp/images/yolp_ctrl.png";Y.ICON_IMAGE_URL="http://i.yimg.jp/images/map/api/yolp/images/yolp_icn.png";Y.DEFAULT_TILE_SIZE=256;
Y.NORMAL_LAYERSET="map";Y.PHOTO_LAYERSET="photo";Y.B1_LAYERSET="map-b1";Y.EARTHQUAKEPHOTO_LAYERSET="eq-photo";var LayerSetId=Y.LayerSetId={NORMAL:"map",PHOTO:"photo",B1:"map-b1",OSM:"osm",EARTHQUAKEPHOTO:"eq-photo",ENGLISH:"english",KOREAN:"korean",CHINESE_TRADITIONAL:"chinese-tr",CHINESE_SIMPLE:"chinese-si"};var LanguageType=Y.LanguageType={JAPANESE:"ja",ENGLISH:"en",KOREAN:"ko",CHINESE_TRADITIONAL:"zh-tw",CHINESE_SIMPLE:"zh-cn"};
var LayerSetNames=Y.LayerSetNames={Japanese:{NORMAL:"\u5730\u56f3",PHOTO:"\u822a\u7a7a\u5199\u771f",B1:"\u5730\u4e0b\u8857",OSM:"OSM",EARTHQUAKEPHOTO:"\u5730\u9707",ENGLISH:"Map",KOREAN:"\u97d3\u56fd\u8a9e",CHINESE_TRADITIONAL:"\u7e41\u4f53\u4e2d\u56fd\u8a9e",CHINESE_SIMPLE:"\u7c21\u4f53\u4e2d\u56fd\u8a9e"},English:{NORMAL:"Map",PHOTO:"Photo",B1:"Underground",OSM:"OSM",EARTHQUAKEPHOTO:"EARTHQUAKE",ENGLISH:"Map",KOREAN:"Korean",CHINESE_TRADITIONAL:"TraditionalChinese",CHINESE_SIMPLE:"SimplifiedChinese"},Korean:{NORMAL:"\uc9c0\ub3c4",PHOTO:"\ud56d\uacf5\uc0ac\uc9c4",B1:"\uc9c0\ud558 ",OSM:"OSM",EARTHQUAKEPHOTO:"\uc9c0\uc9c4",ENGLISH:"Map",KOREAN:"\uc9c0\ub3c4",CHINESE_TRADITIONAL:"\u5730\u5716",CHINESE_SIMPLE:"\u5730\u56fe"},ChineseTraditional:{NORMAL:"\u5730\u5716",PHOTO:"\u885b\u661f",B1:"\u5730\u4e0b",OSM:"OSM",EARTHQUAKEPHOTO:"\u5730\u9707",ENGLISH:"Map",KOREAN:"\uc9c0\ub3c4",CHINESE_TRADITIONAL:"\u5730\u5716",CHINESE_SIMPLE:"\u5730\u56fe"},ChineseSimple:{NORMAL:"\u5730\u56fe",PHOTO:"\u536b\u661f",B1:"\u5730\u4e0b ",OSM:"OSM",EARTHQUAKEPHOTO:"\u5730\u9707",ENGLISH:"Map",KOREAN:"\uc9c0\ub3c4",CHINESE_TRADITIONAL:"\u5730\u5716",CHINESE_SIMPLE:"\u5730\u56fe"}};
YOLP.browserIsCompatible=function(){return true;};YOLP.extend=function(c,a){function b(){}b.prototype=c.prototype;a.prototype=new b();a.prototype.__super__=c.prototype;a.prototype.__super__.constructor=c;a.prototype.constructor=a;return a;};YOLP.loadScript=function(a,b){$.ajax({url:a,dataType:"script",success:function(){if(b){setTimeout(function(){b();},100);}}});};YOLP.loadCSS=function(b){var a=$('<link rel="stylesheet" href="'+b+'" type="text/css" />');
$(window.document.body).append(a);};YOLP.useJQuery=function(){return $;};var __css="http://i.yimg.jp/images/map/api/yolp/css/yolp_map.css?_v="+__YOLP_VERSION;if(document.compatMode=="BackCompat"){__css="http://i.yimg.jp/images/map/api/yolp/css/yolp_map_nodoctype.css?_v="+__YOLP_VERSION;}if($.isReady){YOLP.loadCSS(__css);}else{if(document&&document.getElementsByTagName("head").length>0){var head=document.getElementsByTagName("head")[0];
var linkCss=document.createElement("link");linkCss.type="text/css";linkCss.rel="stylesheet";linkCss.href=__css;head.insertBefore(linkCss,head.firstChild);}else{document.write('<link href="'+__css+'" rel="stylesheet" type="text/css" />');}}var Drawer=Y.Drawer=function(c){if(!c){return;}this.container=c;if(typeof(document.namespaces)=="unknown"){Log.write("Drawer: unknown document.namespaces");return;}var a=document,h=typeof a.documentMode!=="undefined",b=h&&a.documentMode===8,i=h&&a.documentMode===9;if(document.namespaces&&!i){this.type=Drawer.RENDERING.VML;}else{if(document.createElementNS){this.svg_xmlns="http://www.w3.org/2000/svg";
var g=document.createElementNS(this.svg_xmlns,"svg");if(g.width){this.type=Drawer.RENDERING.SVG;}g=null;delete g;}}if(!this.type&&document.createElement("canvas").getContext){this.type=Drawer.RENDERING.CANVAS;}if(!this.type){return;}while(this.container.hasChildNodes()){this.container.removeChild(this.container.firstChild);}switch(this.type){case Drawer.RENDERING.VML:if(!document.namespaces.v){document.namespaces.add("v","urn:schemas-microsoft-com:vml");
var d="behavior:url(#default#VML);margin:auto;";if(b){var f=[];f.push("v\\:stroke");f.push("v\\:polyline");f.push("v\\:fill");f.push("v\\:oval");var j=document.createStyleSheet();j.cssText=f.join(",")+"{"+d+"}";}else{document.createStyleSheet().addRule("v\\:*",d);}}break;case Drawer.RENDERING.CANVAS:break;case Drawer.RENDERING.SVG:this.svg=document.createElementNS(this.svg_xmlns,"svg");this.svg.setAttribute("width",this.container.offsetWidth);
this.svg.setAttribute("height",this.container.offsetHeight);this.svg.setAttribute("viewBox","0 0 "+this.container.offsetWidth+" "+this.container.offsetHeight);this.svg.style.position="relative";this.container.appendChild(this.svg);break;default:break;}this.strokeColor=[0,0,255];this.strokeOpacity=1;this.fillColor=[255,0,0];this.fillOpacity=0.5;};if(!Drawer.RENDERING){Drawer.RENDERING={};}Drawer.RENDERING.VML=1;
Drawer.RENDERING.CANVAS=2;Drawer.RENDERING.SVG=3;Drawer.prototype.getContainer=function(){return this.container;};Drawer.prototype.clear=function(){if(!this.type){return;}switch(this.type){case Drawer.RENDERING.VML:while(this.container.hasChildNodes()){this.container.removeChild(this.container.firstChild);}break;case Drawer.RENDERING.CANVAS:while(this.container.hasChildNodes()){this.container.removeChild(this.container.firstChild);
}break;case Drawer.RENDERING.SVG:while(this.svg.hasChildNodes()){this.svg.removeChild(this.svg.firstChild);}break;default:break;}};Drawer.prototype.setStrokeColor=function(a){if(!this.type){return;}if(arguments.length==3){for(var b=0;b<3;b++){this.strokeColor[b]=parseInt(arguments[b]);}}else{if(typeof(a)=="string"){for(var b=0;b<3;b++){this.strokeColor[b]=parseInt("0x"+a.substr(b*2,2));}}}};Drawer.prototype.setStrokeOpacity=function(a){if(!this.type){return;
}this.strokeOpacity=a;};Drawer.prototype.setStrokeStartLine=function(a){if(!this.type){return;}this.strokeStartLine=a;};Drawer.prototype.setStrokeEndLine=function(a){if(!this.type){return;}this.strokeEndLine=a;};Drawer.prototype.setFillColor=function(a){if(!this.type){return;}if(arguments.length==3){for(var b=0;b<3;b++){this.fillColor[b]=parseInt(arguments[b]);}}else{if(typeof(a)=="string"){for(var b=0;
b<3;b++){this.fillColor[b]=parseInt("0x"+a.substr(b*2,2));}}}};Drawer.prototype.setFillOpacity=function(a){if(!this.type){return;}this.fillOpacity=a;};Drawer.prototype.createCanvasWrapper=function(f,b,g,a,e,d){var h=document.createElement("div");var c=h.style;c.width=(g+e)+"px";c.height=(a+e)+"px";c.position="absolute";c.top=(f.y-d)+"px";c.left=(f.x-d)+"px";return h;};Drawer.prototype.createCanvasBySize=function(d,a,b){var c=document.createElement("canvas");
c.setAttribute("width",(d+b)+"px");c.setAttribute("height",(a+b)+"px");return c;};Drawer.prototype.createCanvasContext=function(d,c,e,a){var b=d.getContext("2d");b.strokeStyle="rgba("+this.strokeColor.join(",")+","+this.strokeOpacity+")";b.fillStyle="rgba("+this.fillColor.join(",")+","+this.fillOpacity+")";b.lineWidth=c||0;b.lineCap=e||"round";b.lineJoin=a||"round";return b;};Drawer.prototype.getArrowPoint=function(h,f,b){var c=b.r||10;
var e=b.beta||35;var g={};g.x=f.x-h.x;g.y=f.y-h.y;var d=Math.atan2(g.x,g.y)*(180/Math.PI)-90;var a=[];a[0]={};a[0].x=c*0.8*Math.cos((d)*(Math.PI/180))+h.x;a[0].y=-c*0.8*Math.sin((d)*(Math.PI/180))+h.y;a[1]={};a[1].x=c*Math.cos((d+e)*(Math.PI/180))+h.x;a[1].y=-c*Math.sin((d+e)*(Math.PI/180))+h.y;a[2]={};a[2].x=c*0.5*Math.cos((d)*(Math.PI/180))+h.x;a[2].y=-c*0.5*Math.sin((d)*(Math.PI/180))+h.y;a[3]={};
a[3].x=c*Math.cos((d-e)*(Math.PI/180))+h.x;a[3].y=-c*Math.sin((d-e)*(Math.PI/180))+h.y;a[4]={};a[4].x=c*0.8*Math.cos((d)*(Math.PI/180))+h.x;a[4].y=-c*0.8*Math.sin((d)*(Math.PI/180))+h.y;return a;};Drawer.prototype.drawLine=function(l,h){if(!this.type){return;}var n;switch(this.type){case Drawer.RENDERING.VML:var k=document.createElement("v:polyline");if(!h||!this.strokeOpacity){k.stroked=false;}k.filled=false;
var s=new Array();for(var u=0;u<l.length;u++){s.push(l[u].x);s.push(l[u].y);}k.points=s.join(",");k.style.position="absolute";var f=document.createElement("v:stroke");f.weight=h+"px";f.color="rgb("+this.strokeColor.join(",")+")";f.opacity=this.strokeOpacity;f.endcap="round";f.joinstyle="round";if(this.strokeEndLine=="arrow"){f.endarrow="classic";}if(this.strokeStartLine=="arrow"){f.startarrow="classic";
}k.appendChild(f);this.container.appendChild(k);n=k;break;case Drawer.RENDERING.CANVAS:if(l.length===0){n=document.createElement("div");return n;}var e=new Y.Bounds(l);var r=h/2;var t=e.max();var q=e.min();var m=t.x-q.x;var j=t.y-q.y;var c=this.createCanvasWrapper(q,t,m,j,h,r);var a=this.createCanvasBySize(m,j,h);var o=this.createCanvasContext(a,h);o.beginPath();var b=new Y.Point(l._offset.x+((q.x-r)-l._offset.x),l._offset.y+((q.y-r)-l._offset.y));
o.moveTo(l[0].x-b.x,l[0].y-b.y);for(var u=1,v=l.length;u<v;u++){o.lineTo(l[u].x-b.x,l[u].y-b.y);}o.stroke();c.appendChild(a);this.container.appendChild(c);n=c;break;case Drawer.RENDERING.SVG:var x=document.createElementNS(this.svg_xmlns,"path");var g=l.length;var s=new Array();if(g>=2){if(this.strokeStartLine=="arrow"){$.each(this.getArrowPoint(l[0],l[1],{r:h*2+3,beta:17.5}),function(d,i){if(d==0){s.push("M "+(i.x)+","+(i.y));
}else{s.push("L "+(i.x)+","+(i.y));}});}else{s.push("M "+l[0].x+","+l[0].y);}for(var u=1;u<g-1;u++){s.push("L "+l[u].x+","+l[u].y);}if(this.strokeEndLine=="arrow"){$.each(this.getArrowPoint(l[g-1],l[g-2],{r:h*2+3,beta:17.5}),function(d,i){s.push("L "+(i.x)+","+(i.y));});}else{s.push("L "+l[g-1].x+","+l[g-1].y);}}var y=s.join(" ");if(y===""){x.removeAttribute("d");}else{x.setAttribute("d",y);}x.setAttribute("fill","none");
x.setAttribute("stroke","rgb("+this.strokeColor.join(",")+")");x.setAttribute("stroke-opacity",this.strokeOpacity);x.setAttribute("stroke-width",h);if(this.strokeStartLine=="arrow"||this.strokeEndLine=="arrow"){x.setAttribute("stroke-miterlimit",15);}else{x.setAttribute("stroke-linecap","round");x.setAttribute("stroke-linejoin","round");}this.svg.appendChild(x);n=x;break;default:break;}return n;};Drawer.prototype.drawArea=function(l,h){if(!this.type){return;
}var n;switch(this.type){case Drawer.RENDERING.VML:var k=document.createElement("v:polyline");if(!h||!this.strokeOpacity){k.stroked=false;}if(!this.fillOpacity){k.filled=false;}var t=new Array();for(var v=0;v<l.length;v++){t.push(l[v].x);t.push(l[v].y);}if(l[0].x!=l[l.length-1].x||l[0].y!=l[l.length-1].y){t.push(l[0].x);t.push(l[0].y);}k.points=t.join(",");k.style.position="absolute";var s=document.createElement("v:fill");
s.color="rgb("+this.fillColor.join(",")+")";s.opacity=this.fillOpacity;k.appendChild(s);var f=document.createElement("v:stroke");f.weight=h+"px";f.color="rgb("+this.strokeColor.join(",")+")";f.opacity=this.strokeOpacity;f.endcap="round";f.joinstyle="round";k.appendChild(f);this.container.appendChild(k);n=k;break;case Drawer.RENDERING.CANVAS:if(l.length===0){n=document.createElement("div");return n;
}var e=new Y.Bounds(l);var r=h/2;var u=e.max();var q=e.min();var m=u.x-q.x;var j=u.y-q.y;var c=this.createCanvasWrapper(q,u,m,j,h,r);var a=this.createCanvasBySize(m,j,h);var o=this.createCanvasContext(a,h);var b=new Y.Point(l._offset.x+((q.x-r)-l._offset.x),l._offset.y+((q.y-r)-l._offset.y));if(this.fillOpacity){o.beginPath();o.moveTo(l[0].x-b.x,l[0].y-b.y);for(var v=1;v<l.length;v++){o.lineTo(l[v].x-b.x,l[v].y-b.y);
}o.closePath();o.fill();}if(h&&this.strokeOpacity){o.beginPath();o.moveTo(l[0].x-b.x,l[0].y-b.y);for(var v=1;v<l.length;v++){o.lineTo(l[v].x-b.x,l[v].y-b.y);}o.closePath();o.stroke();}c.appendChild(a);this.container.appendChild(c);n=c;break;case Drawer.RENDERING.SVG:var x=document.createElementNS(this.svg_xmlns,"path");var g=l.length;var t=new Array();for(var v=0;v<g;v++){if(v>=1){t.push("L "+l[v].x+","+l[v].y);
}else{t.push("M "+l[v].x+","+l[v].y);}if(v==(g-1)){t.push(" z");}}var y=t.join(" ");if(y===""){x.removeAttribute("d");}else{x.setAttribute("d",y);}x.setAttribute("fill","none");x.setAttribute("stroke","rgb("+this.strokeColor.join(",")+")");x.setAttribute("stroke-opacity",this.strokeOpacity);x.setAttribute("stroke-width",h);x.setAttribute("stroke-linecap","round");x.setAttribute("stroke-linejoin","round");
x.setAttribute("fill","rgb("+this.fillColor.join(",")+")");x.setAttribute("fill-opacity",this.fillOpacity);x.style.overflow="hidden";this.svg.appendChild(x);n=x;break;default:break;}return n;};Drawer.prototype.drawCircle=function(q,n,i,t){if(!this.type){return;}switch(this.type){case Drawer.RENDERING.VML:var k;if(t){k=t;}else{k=document.createElement("v:oval");}if(!i||!this.strokeOpacity){k.stroked=false;
}if(!this.fillOpacity){k.filled=false;}k.style.position="absolute";k.style.left=(q.x-n.width)+"px";k.style.top=(q.y-n.height)+"px";k.style.width=(n.width*2)+"px";k.style.height=(n.height*2)+"px";this.container.appendChild(k);var y=document.createElement("v:fill");y.color="rgb("+this.fillColor.join(",")+")";y.opacity=this.fillOpacity;k.appendChild(y);var g=document.createElement("v:stroke");g.weight=i+"px";
g.color="rgb("+this.strokeColor.join(",")+")";g.opacity=this.strokeOpacity;g.endcap="round";g.joinstyle="round";k.appendChild(g);t=k;break;case Drawer.RENDERING.CANVAS:var x=i/2;var z=new Y.Point(q.x+n.width,q.y+n.height);var v=new Y.Point(q.x-n.width,q.y-n.height);var s=z.x-v.x;var o=z.y-v.y;var f;if(t){f=t;}else{f=this.createCanvasWrapper(v,z,s,o,i,x);}var d=this.createCanvasBySize(s,o,i);var u=this.createCanvasContext(d,i);
var e=new Y.Point(q._offset.x+((v.x-x)-q._offset.x),q._offset.y+((v.y-x)-q._offset.y));var i=n.width;var A=n.height;var m=0.5522847498307933;var l=m*i;var j=m*A;var D=q.x-e.x-i;var B=q.x-e.x+i;var b=q.y-e.y-A;var a=q.y-e.y+A;u.beginPath();u.moveTo(B,b+A);u.bezierCurveTo(B,b+A-j,D+i+l,b,D+i,b);u.bezierCurveTo(D+i-l,b,D,b+A-j,D,b+A);u.bezierCurveTo(D,b+A+j,D+i-l,a,D+i,a);u.bezierCurveTo(D+i+l,a,B,b+A+j,B,b+A);
if(this.fillOpacity){u.fill();}if(i&&this.strokeOpacity){u.stroke();}f.appendChild(d);this.container.appendChild(f);t=f;break;case Drawer.RENDERING.SVG:var E;if(t){E=t;}else{E=document.createElementNS(this.svg_xmlns,"ellipse");}E.setAttribute("cx",q.x);E.setAttribute("cy",q.y);E.setAttribute("rx",n.width);E.setAttribute("ry",n.height);E.setAttribute("fill","none");E.setAttribute("stroke","rgb("+this.strokeColor.join(",")+")");
E.setAttribute("stroke-opacity",this.strokeOpacity);E.setAttribute("stroke-width",i);E.setAttribute("stroke-linecap","round");E.setAttribute("stroke-linejoin","round");E.setAttribute("fill","rgb("+this.fillColor.join(",")+")");E.setAttribute("fill-opacity",this.fillOpacity);this.svg.appendChild(E);t=E;break;default:break;}return t;};var Service=Y.Service={};(function(){var c=["Map","GeoCoder","LocalSearch","RouteSearch","WeatherPlace","WeatherMapLayer"];for(var b=0,a=c.length;b<a;++b){Service[c[b]]={};}})();Service.setApplicationId=function(b){var a=this._serviceName;if(typeof Service[a]==="undefined"){return;}Service[a].AppID=b;};Service.getApplicationId=function(){var b="",a=this._serviceName;if(typeof Service[a]==="undefined"){return b;
}if(Service[a]&&Service[a].AppID){return Service[a].AppID;}if(Service.Map&&Service.Map.AppID){return Service.Map.AppID;}return b;};Service.findOwnApplicationId=function(){var a=(typeof Service.Options["appid"]==="undefined")?"":Service.Options["appid"];return a;};Service.getUrlOptions=function(){var m=document,a="",n="",c="",p=null,h=null,k={},b=m.getElementsByTagName("script"),o=(Y.VERSION==="debug")?/^.*yahoomap-dev.php\?(.*)$/:/^.*js\.api\.olp\.yahooapis\.jp\/.*\/jsapi\?(.*)$/,g=function(j){var i=j.match(o);
if(i){return i[1];}return"";};for(var d=b.length,f=d-1;f>=0;--f){a=b[f].getAttribute("src")||"";c=g(a);p=c.split("&");for(var e=0;e<p.length;e++){h=p[e].split("=");k[h[0]]=h[1];}}return k;};var Map=Y.Map=function(d,p){Y.Service.Options=Service.getUrlOptions();p=p||{};this.enableIndoorMapLayer=(typeof p.enableIndoorMapLayer=="undefined")?false:p.enableIndoorMapLayer;if(!this.enableIndoorMapLayer){delete Y.IndoorMapLayer;delete Y.IndoorMapControl;}var f=Y.Map.TYPE.STANDARD;this.overlays={};this.overlays.weather=null;this.overlays.typhoon=null;this.overlays.indoor=null;this.overlays.tsunami=null;
this.systemLayer=new Y.FeatureLayer("\u30b7\u30b9\u30c6\u30e0");this.configure=p.configure||{};this.configure.dragging=(this.configure.dragging==undefined)?true:this.configure.dragging;this.configure.doubleClickZoom=this.configure.doubleClickZoom||false;this.configure.doubleClickPan=this.configure.doubleClickPan||false;this.configure.singleClickPan=this.configure.singleClickPan||false;this.configure.continuousZoom=this.configure.continuousZoom||false;
this.configure.PinchZoomCenter=(this.configure.PinchZoomCenter==undefined)?false:this.configure.PinchZoomCenter;this.configure.scrollPinchZoom=(this.configure.scrollPinchZoom==undefined)?true:this.configure.scrollPinchZoom;this.configure.scrollWheelZoom=this.configure.scrollWheelZoom||false;this.configure.infoWindowAutoPan=(this.configure.infoWindowAutoPan==undefined)?true:this.configure.infoWindowAutoPan;
this.configure.touchSupport=(typeof this.configure.touchSupport==="undefined")?true:this.configure.touchSupport;this.configure.holdSupport=(typeof this.configure.holdSupport==="undefined")?false:this.configure.holdSupport;this.configure.hybridPhoto=(typeof this.configure.hybridPhoto==="undefined")?false:this.configure.hybridPhoto;this.configure.enableFlickScroll=(typeof this.configure.enableFlickScroll==="undefined")?true:this.configure.enableFlickScroll;
this.configure.enableOpenStreetMap=(typeof this.configure.enableOpenStreetMap==="undefined")?false:this.configure.enableOpenStreetMap;this.configure.weatherOverlay=(typeof this.configure.weatherOverlay==="undefined")?false:this.configure.weatherOverlay;this.configure.typhoonOverlay=(typeof this.configure.typhoonOverlay==="undefined")?false:this.configure.typhoonOverlay;this.configure.indoorOverlay=(typeof this.configure.indoorOverlay==="undefined")?false:this.configure.indoorOverlay;
this.configure.DblTap=(this.configure.DblTap==undefined)?true:this.configure.DblTap;this.configure.DblPointDblTap=(this.configure.DblPointDblTap==undefined)?true:this.configure.DblPointDblTap;this.configure.tsunamiOverlay=(typeof this.configure.tsunamiOverlay==="undefined")?false:this.configure.tsunamiOverlay;this.configure.nogpu=(typeof this.configure.nogpu==="undefined")?false:this.configure.nogpu;
this.appendImgStyles={};if(!this.configure.nogpu&&Y.Util.Platform.isAndroid){var g="";if(Y.Util.Platform.isChrome){this.appendImgStyles["-webkit-transform"]="translateZ(0px)";}else{if(Y.Util.Platform.isFireFox){this.appendImgStyles["-moz-transform"]="translateZ(0px)";}else{this.appendImgStyles["-webkit-transform"]="translateZ(0px)";}}}this.configure.language=(typeof this.configure.language==="undefined")?Y.LanguageType.JAPANESE:this.configure.language;
var j=[Y.LanguageType.JAPANESE];this.activateMultilingual=function(q,s){var r=this;$.ajax({url:"http://multi.olp.yahooapis.jp/v1/multilingual/langSet",data:{appid:q},type:"GET",dataType:"jsonp",timeout:3000,success:function(v){var t=v.Result;if(typeof t!=="undefined"&&t.Status==="OK"){for(var u=0;u<t.LangSet.length;u++){j.push(t.LangSet[u].ID);}s();}},error:function(t,v,u){s();}});};this.isEnabledLanguage=function(s){var q=false;
if(typeof s==="undefined"){s=this.getConfigure("language");}for(var r=0;r<j.length;r++){if(j[r]===s){q=true;break;}}return q;};var h;switch(this.configure.language){case Y.LanguageType.ENGLISH:h=Y.LayerSetNames.English;break;case Y.LanguageType.KOREAN:h=Y.LayerSetNames.Korean;break;case Y.LanguageType.CHINESE_TRADITIONAL:h=Y.LayerSetNames.ChineseTraditional;break;case Y.LanguageType.CHINESE_SIMPLE:h=Y.LayerSetNames.ChineseSimple;
break;case Y.LanguageType.JAPANESE:default:h=Y.LayerSetNames.Japanese;break;}var a={};var m=null,c=null,l=null,n=null;if(!p.layerSets){if(Y.Util.Platform.isIOS||Y.Util.Platform.isAndroid){m=new Y.SmartphoneNormalLayer();n=new Y.SmartphoneB1Layer();f=Y.Map.TYPE.SMARTPHONE;}else{m=new Y.NormalLayer();n=new Y.B1Layer();}c=new Y.PhotoLayer();l=new Y.PhotoLabelLayer();a[Y.LayerSetId.NORMAL]=new Y.LayerSet(h.NORMAL,[m]);
a[Y.LayerSetId.ENGLISH]=Y.Util.Platform.isIOS||Y.Util.Platform.isAndroid?new Y.LayerSet(h.ENGLISH,[new Y.SmartphoneEnglishLayer()],{minZoom:11,maxZoom:20}):new Y.LayerSet(h.ENGLISH,[new Y.EnglishLayer()],{minZoom:11,maxZoom:20});a[Y.LayerSetId.KOREAN]=Y.Util.Platform.isIOS||Y.Util.Platform.isAndroid?new Y.LayerSet(h.KOREAN,[new Y.SmartphoneKoreanLayer()],{minZoom:11,maxZoom:20}):new Y.LayerSet(h.KOREAN,[new Y.KoreanLayer()],{minZoom:11,maxZoom:20});
a[Y.LayerSetId.CHINESE_TRADITIONAL]=Y.Util.Platform.isIOS||Y.Util.Platform.isAndroid?new Y.LayerSet(h.CHINESE_TRADITIONAL,[new Y.SmartphoneChineseTraditionalLayer()],{minZoom:11,maxZoom:20}):new Y.LayerSet(h.CHINESE_TRADITIONAL,[new Y.ChineseTraditionalLayer()],{minZoom:11,maxZoom:20});a[Y.LayerSetId.CHINESE_SIMPLE]=Y.Util.Platform.isIOS||Y.Util.Platform.isAndroid?new Y.LayerSet(h.CHINESE_SIMPLE,[new Y.SmartphoneChineseSimpleLayer()],{minZoom:11,maxZoom:20}):new Y.LayerSet(h.CHINESE_SIMPLE,[new Y.ChineseSimpleLayer()],{minZoom:11,maxZoom:20});
a[Y.LayerSetId.PHOTO]=new Y.LayerSet(h.PHOTO,[c,l],{maxZoom:21});a[Y.LayerSetId.B1]=new Y.LayerSet(h.B1,[n],{minZoom:19,maxZoom:21});this.showLayerSets(this.configure.language,a);this.isUserLayerSets=false;}else{a=p.layerSets;this.isUserLayerSets=true;}this.configure.mapType=(typeof this.configure.mapType==="undefined")?f:this.configure.mapType;this.layerSets=[];this.controls=[];this.plugins=[];this.mainContainer;
this.mapContainer;this.center;this.bounds;this.zoom;this.currentContainerPosition=new Point(0,0);var o=p.backgroundColor||"#f1f1f1";if(typeof(d)=="string"){this.mainContainer=$("#"+d);}else{this.mainContainer=$(d);}this.mainContainer.empty();var b={position:"relative",overflow:"hidden",background:o};this.mainContainer.css(b);this.mapContainer=$('<div style="position: absolute;z-index:0;left:0px;top:0px"></div>');
this.updatePosition=this._createFunctionForScroll({debugTransforms:p.debugTransforms});this.mapContainer.bind("contextmenu",function(){return false;});if(Util.Platform.isSupportTouchScroll){this.mapContainer.css("webkit-user-select","none");}this.mainContainer.append(this.mapContainer);this.containerPosition=new Point(0,0);this.checkResize();this.initEvents();for(var e in a){if(!a.hasOwnProperty(e)){continue;
}var i=a[e];this.addLayerSet(e,i);}if(this.configure.enableOpenStreetMap){this.toggleOpenStreetMap(true);}this.setHybridPhoto(this.configure.hybridPhoto);this.setWeatherOverlay(this.configure.weatherOverlay);this.setTyphoonOverlay(this.configure.typhoonOverlay);this.setTsunamiOverlay(this.configure.tsunamiOverlay);this.indoorControl=null;this.indoorMaxZoom=null;this.setIndoorOverlay(this.configure.indoorOverlay);
this.toggleMapType(this.configure.mapType);var k=(typeof Service.Options["seamless"]==="undefined")?"":Service.Options["seamless"];if(k==="gws"){this.enableGWS=true;}else{this.enableGWS=false;}this.infoWindowMargin={left:10,right:10,top:30,bottom:30};this.infoWindowImage=p.infoWindowImage||"";p.logoControl=(p.logoControl==undefined)?true:p.logoControl;p.logoControlOptions=p.logoControlOptions||{};if(p.logoControl){this._logoControl=new Y.LogoControl(p.logoControlOptions);
this.addControl(this._logoControl);}if(false){this.addControl(new Y.AppBannerControl());}this.addControl(new Y.UBCountControl());this._serviceName="Map";};Map.TYPE={STANDARD:"normal",SMARTPHONE:"smartphone",WEATHER_RADAR:"weather-radar",TYPHOON:"typhoon"};Map.prototype.setConfigures=function(a){for(var b in a){if(!a.hasOwnProperty(b)){continue;}this.setConfigure(b,a[b]);}};Map.prototype.setConfigure=function(c,f){if(c!=="mapType"&&c!=="language"){f=(typeof f!=="boolean")?false:f;
}var e=(this.configure[c]!==f);var b=this.configure[c];this.configure[c]=f;if(c==="touchSupport"){var a;if(f&&this.operation.isTouchScreen){if(Y.Util.Platform.isIOS){a=new IphoneTouchBehavior();}else{if(Y.Util.Platform.isAndroid){a=new AndroidTouchBehavior();}else{a=new TouchBehavior();}}}else{a=new Y.MouseBehavior();}this.operation.setScreenBehavior(a);}if(c==="hybridPhoto"){this.setHybridPhoto(f);
if(e){Y.Event.trigger(this,"hybridphotochanged",f);}}if(c==="enableOpenStreetMap"){this.toggleOpenStreetMap(f);}if(c==="mapType"){this.toggleMapType(f);if(e){Y.Event.trigger(this,"maptypechanged",f);this.redraw(true);}}if(c==="weatherOverlay"){this.setWeatherOverlay(f);if(e){Y.Event.trigger(this,"weatheroverlaychanged",f);}}if(c==="typhoonOverlay"){this.setTyphoonOverlay(f);if(e){Y.Event.trigger(this,"typhoonoverlaychanged",f);
}}if(c==="indoorOverlay"){this.setIndoorOverlay(f);if(e){Y.Event.trigger(this,"indooroverlaychanged",f);}}if(c==="tsunamiOverlay"){this.setTsunamiOverlay(f);if(e){Y.Event.trigger(this,"tsunamioverlaychanged",f);}}if(c==="language"){if(e){if(!this.isEnabledLanguage(f)){this.configure.language=b;}else{if(!this.isUserLayerSets){if(f!==Y.LanguageType.JAPANESE){if(this.overlays.weather){this.setConfigure("weatherOverlay",false);
}}this.setLayerSetId(this.showLayerSets(f,this.layerSets));var d;switch(f){case Y.LanguageType.ENGLISH:d=Y.LayerSetNames.English;break;case Y.LanguageType.KOREAN:d=Y.LayerSetNames.Korean;break;case Y.LanguageType.CHINESE_TRADITIONAL:d=Y.LayerSetNames.ChineseTraditional;break;case Y.LanguageType.CHINESE_SIMPLE:d=Y.LayerSetNames.ChineseSimple;break;case Y.LanguageType.JAPANESE:default:d=Y.LayerSetNames.Japanese;
break;}this.layerSets[Y.LayerSetId.NORMAL].setName(d.NORMAL);this.layerSets[Y.LayerSetId.PHOTO].setName(d.PHOTO);this.layerSets[Y.LayerSetId.B1].setName(d.B1);this.layerSets[Y.LayerSetId.ENGLISH].setName(d.ENGLISH);this.layerSets[Y.LayerSetId.KOREAN].setName(d.KOREAN);this.layerSets[Y.LayerSetId.CHINESE_SIMPLE].setName(d.CHINESE_SIMPLE);this.layerSets[Y.LayerSetId.CHINESE_TRADITIONAL].setName(d.CHINESE_TRADITIONAL);
}Y.Event.trigger(this,"languagechanged",f);}}}};Map.prototype.showLayerSets=function(c,b){var a;for(var d in b){if(!b.hasOwnProperty(d)){continue;}b[d].setHidden(true);}switch(c){case Y.LanguageType.ENGLISH:a=Y.LayerSetId.ENGLISH;break;case Y.LanguageType.KOREAN:a=Y.LayerSetId.KOREAN;break;case Y.LanguageType.CHINESE_TRADITIONAL:a=Y.LayerSetId.CHINESE_TRADITIONAL;break;case Y.LanguageType.CHINESE_SIMPLE:a=Y.LayerSetId.CHINESE_SIMPLE;
break;case Y.LanguageType.JAPANESE:default:a=Y.LayerSetId.NORMAL;b[Y.LayerSetId.B1].setHidden(false);b[Y.LayerSetId.B1].setHidden(false);break;}b[a].setHidden(false);b[Y.LayerSetId.PHOTO].setHidden(false);return a;};Map.prototype.getConfigure=function(a){return this.configure[a];};Map.prototype.getConfigures=function(){return this.configure;};Map.prototype.addControl=function(c,a){if(this.isLoaded()){c.load(this,a);
}else{var d=this;var b=this.bind("load",function(){c.load(d,a);d.unbind(b);});}this.controls.push(c);};Map.prototype.removeControl=function(a){this.controls=$.grep(this.controls,function(d,b){if(d==a){d.remove();return false;}return true;});};Map.prototype.getContainer=function(){return this.mainContainer[0];};Map.prototype.getMapContainer=function(){return this.mapContainer[0];};Map.prototype.getMapContainerXY=function(){return this.currentContainerPosition.copy();
};Map.prototype.getLayerSets=function(){return this.layerSets;};Map.prototype.getCurrentLayerSet=function(){return this.currentLayerSet;};Map.prototype.getLayerSetByName=function(b){for(var c=0;c<this.layerSets.length;c++){var a=this.layerSets[c];if(a.getName()==b){return a;}}};Map.prototype.getLayerSet=function(a){return this.layerSets[a];};Map.prototype.setLayerSetId=Map.prototype.setLayerSet=function(d,c){c=(c==undefined)?true:c;
var a=this.layerSets[d];if(!a){return;}var b=this.currentLayerSet;if(this.currentLayerSet){this.currentLayerSet.remove(a);}this.currentLayerSet=a;this.currentLayerSet.initialize(this);this.currentLayerSetId=d;if(c){if(this.zoom>this.currentLayerSet.getMaxZoom()){this.zoom=this.currentLayerSet.getMaxZoom();}else{if(this.zoom<this.currentLayerSet.getMinZoom()){this.zoom=this.currentLayerSet.getMinZoom();
}}this.redraw(true);this.currentLayerSet.adjustLayerOrder();}Event.trigger(this,"layersetchanged",this.currentLayerSet,b);};Map.prototype.getCurrentLayerSetId=function(){return this.currentLayerSetId;};Map.prototype.addLayerSet=function(b,a){a.initialize(this);a.addLayer(this.systemLayer);this.layerSets[b]=a;Event.trigger(this,"addlayerset",a);};Map.prototype.removeLayerSet=function(b){var a=this.layerSets[b];
delete this.layerSets[b];Event.trigger(this,"removelayerset",a);};Map.prototype.addLayer=function(b){for(var a in this.layerSets){if(!this.layerSets.hasOwnProperty(a)){continue;}this.layerSets[a].addLayer(b);}this.redraw();};Map.prototype.removeLayer=function(b){for(var a in this.layerSets){if(!this.layerSets.hasOwnProperty(a)){continue;}this.layerSets[a].removeLayer(b);}this.redraw();};Map.prototype.getSystemLayer=function(){return this.systemLayer;
};Map.prototype.isLoaded=function(){return this.center!=null;};Map.prototype.getCenter=function(){return this.center;};Map.prototype.getBounds=function(){return this.bounds.copy();};Map.prototype.getBoundsZoomLevel=function(a){var f=this.getProjection();var l=a.getSouthWest();var e=a.getNorthEast();for(var g=this.getMaxZoom();g>this.getMinZoom();g--){var c=f.fromLatLngToPixel(l,g);var d=f.fromLatLngToPixel(e,g);
var k=d.x-c.x;var j=d.y-c.y;if(k<0){var b=f.getWrapWidth(g);if(b!=Infinity){k+=b;}}if(k*0.98<this.size.width&&j*0.98<this.size.height){return g;}}};Map.prototype.getSize=function(){return this.size;};Map.prototype.getZoom=function(){return parseInt(this.zoom,10);};Map.prototype.getMaxZoom=function(){if(!this.currentLayerSet){return 18;}return this.currentLayerSet.getMaxZoom();};Map.prototype.getMinZoom=function(){if(!this.currentLayerSet){return 1;
}return this.currentLayerSet.getMinZoom();};Map.prototype.setCenter=Map.prototype.drawMap=function(a,l,c){if(!this.isDefaultLanguage()){if(!this.isEnabledLanguage()){this.setConfigure("language",Y.LanguageType.JAPANESE);c=Y.LayerSetId.NORMAL;}}var b=Y.Util.isExpandedArgs(arguments);if(b&&arguments[0] instanceof Y.LatLng===false){var j=arguments[0],g=void 0,a=j.center||g,l=j.zoom||g,c=j.layerSetId||g;
}var h=this;var i=false;if(!c&&!this.currentLayerSetId||!this.isEnableLayerSetId(c)){c=Y.LayerSetId.NORMAL;}if(c&&(this.currentLayerSetId!=c)){this.setLayerSetId(c,false);}if(l>this.getMaxZoom()){l=this.getMaxZoom();}else{if(l<this.getMinZoom()){l=this.getMinZoom();}else{l=l||this.zoom||18;}}if(l&&!isNaN(l)&&(this.zoom!=l)){var d=this.zoom;this.zoom=l;i=true;}var f=false;var k=false;if(a&&a.valid){if(this.isLoaded()){this.center=a;
f=true;}else{this.center=a;this.addPlugin(new Y.YahooMapLayerPlugin());i=true;f=true;this.redraw(i);k=true;Event.trigger(this,"load");}this.checkRange();}if(f){Event.trigger(this,"movestart");}if(!k){this.redraw(i);}if(f){Event.trigger(this,"move");Event.trigger(this,"moveend");}if(i&&this.isLoaded()){if(f){var e=this.bind("layerlistchanged",function(){Event.trigger(this,"zoomstart",this.zoom,d);Event.trigger(this,"zoomend",this.zoom,d);
this.unbind(e);e=null;},this);}else{Event.trigger(this,"zoomstart",this.zoom,d);Event.trigger(this,"zoomend",this.zoom,d);}}};Map.prototype.panTo=function(a,d){var b=Y.Util.isExpandedArgs(arguments);if(b&&arguments[0] instanceof Y.LatLng===false){var i=arguments[0],h=void 0,a=i.center||h,d=i.animation||h;}var c=a,e=this.center;var f=this.getProjection();var k=f.fromLatLngToPixel(e,this.getZoom());var g=f.fromLatLngToPixel(c,this.getZoom());
var m=-g.x+k.x;var j=g.y-k.y;var l=this.getSize();if(l.width<Math.abs(m)||l.height<Math.abs(j)){this.drawMap(c);this.resetInfoWindow();}else{this.pan(m,j,d,false,c);}};Map.prototype.panBy=function(e,c){var d=Y.Util.isExpandedArgs(arguments);if(d&&arguments[0] instanceof Y.Size===false){var b=arguments[0],a=void 0,e=b.distance,c=b.animation||a;}this.pan(e.width,e.height,c);};Map.prototype.panDirection=function(i,g,b){var a=Y.Util.isExpandedArgs(arguments);
if(a&&typeof arguments[0]!=="number"){var d=arguments[0],c=void 0,i=d.dx,g=d.dy,b=d.animation||c;}var h=this.getSize();var f=i*h.width;var e=g*h.height;this.pan(f,e,b);};Map.prototype.panUpdate=function(b){var a=this.containerPosition.copy();var d=this.currentContainerPosition.copy();this.containerPosition=d;if(b){this.center=b.copy();}else{var g=d.x-a.x;var f=d.y-a.y;var h=this.center;var i=this.getZoom();
var c=this.getProjection();var e=c.fromLatLngToPixel(h,i);this.center=c.fromPixelToLatLng(new Point(e.x-g,e.y+f),i);}this.checkRange();};Map.prototype.pan=function(b,g,c,f,d){if(!f){Event.trigger(this,"movestart");}if(this.panning){clearTimeout(this.panning);}if(Y.Util.Platform.isAndroid){b=Math.round(b);g=Math.round(g);}var e=this.checkRange(new Point(b,g));b=e.x;g=e.y;var a=this.mapContainer;a.stop();
if(c){this.panAnimate(b,g,d);this.systemLayer.onPan(b,g);return;}this.updatePosition(b,g);this.panUpdate(d);this.systemLayer.onPan(b,g);if(!f){this.redraw();Event.trigger(this,"move");Event.trigger(this,"moveend");}};Map.prototype.panAnimate=function(a,c,b){this.operation.transitBehavior.pan(a,c,b);};Map.prototype.setZoom=function(d,e,g,b){var f=Y.Util.isExpandedArgs(arguments);if(f){var c=arguments[0],a=void 0,d=c.zoom||a,e=(typeof c.animation==="boolean")?c.animation:a,g=c.latlng||a,b=c.center||a;
}if(d>this.getMaxZoom()||d<this.getMinZoom()){return;}this._stopTween();Event.trigger(this,"zoomstart",d,this.zoom);e=(e==undefined)?this.configure.continuousZoom:e;if(g==undefined){g=this.getCenter();}this.zoomAnimate(d,g,b,e);};Map.prototype.zoomAnimate=function(d,c,a,b){this.operation.transitBehavior.zoom(d,c,a,b);};Map.prototype.zoomIn=function(g,e,b){var f=Y.Util.isExpandedArgs(arguments);if(f&&arguments[0] instanceof Y.LatLng===false){var c=arguments[0],a=void 0,g=c.latlng||a,e=(typeof c.animation==="boolean")?c.animation:a,b=c.center||a;
}var d=this.zoom;this.setZoom((++d),e,g,b);};Map.prototype.zoomOut=function(g,e,b){var f=Y.Util.isExpandedArgs(arguments);if(f&&arguments[0] instanceof Y.LatLng===false){var c=arguments[0],a=void 0,g=c.latlng||a,e=(typeof c.animation==="boolean")?c.animation:a,b=c.center||a;}var d=this.zoom;this.setZoom((--d),e,g,b);};Map.prototype.drawBounds=function(b,a){if(b.isEmpty()){throw Error("null bounds.");
}this.drawMap(b.getCenter(),this.getBoundsZoomLevel(b),a);};Map.prototype.redraw=function(a){if(!this.isLoaded()){return;}this.updateBounds();if(a){this.resetInfoWindow();}this.currentLayerSet.draw(a);};Map.prototype.updateSize=Map.prototype.checkResize=function(){var a=new Size(this.mainContainer.width(),this.mainContainer.height());this.size=a;this.mapContainer.width(this.size.width);this.mapContainer.height(this.size.height);
if(this.getCurrentLayerSet()){this.updateBounds();}this.resetInfoWindow();Y.Event.trigger(this,"resize");};Map.prototype.bind=function(a,b,c){return Event.addListener(this,a,b,c);};Map.prototype.unbind=function(a){Event.removeListener(a);};Map.prototype.addFeature=function(a){this.systemLayer.addFeature(a);};Map.prototype.addFeatures=function(a){this.systemLayer.addFeatures(a);};Map.prototype.removeFeature=function(a){this.systemLayer.removeFeature(a);
};Map.prototype.clearFeatures=function(){this.systemLayer.clearFeatures();};Map.prototype.getFeatures=function(){return this.systemLayer.getFeatures();};Map.prototype.openInfoWindow=function(g,d,c,e){if(!g){return;}var b=this.fromLatLngToDivPixel(g);this.closeInfoWindow();this.infoWindowLatLng=g;e=e||new Point(0,0);this.infoWindowOffset=e||new Point(0,0);b.offset(e.x,e.y);c=c||{};c.margin=this.infoWindowMargin;
c.image=c.image||this.infoWindowImage||"";var f=this;this.infoWindow=new Y.InfoWindow(this.mapContainer,b,d,c,e);var a=[Y.Event.addListener(this.infoWindow,"load",function(){f.resizeInfoWindow(true,true);Y.Event.trigger(f,"infowindowopen",f.infoWindow);}),Y.Event.addListener(this.infoWindow,"maximizeend",function(){f.resizeInfoWindow(true,true);Y.Event.trigger(f,"infowindowmaxmizeend",f.infoWindow);
}),Y.Event.addListener(this.infoWindow,"restoreend",function(){f.resizeInfoWindow(true,true);Y.Event.trigger(f,"infowindowrestoreend",f.infoWindow);}),Y.Event.addListener(this.infoWindow,"close",function(){f.infoWindowLatLng=null;f.infoWindow=null;f.infoWindowOffset=null;for(var h in a){Y.Event.removeListener(a[h]);}Y.Event.trigger(f,"infowindowclose",f.infoWindow);})];return this.infoWindow;};Map.prototype.setInfoWindowMargin=function(d,a,b,c){this.infoWindowMargin.left=d;
this.infoWindowMargin.right=b;this.infoWindowMargin.bottom=a;this.infoWindowMargin.top=c;};Map.prototype.resetInfoWindow=function(){if(!this.infoWindow||this.infoWindow.isHidden()){return;}var a=this.fromLatLngToDivPixel(this.infoWindowLatLng);a.offset(this.infoWindowOffset.x,this.infoWindowOffset.y);this.infoWindow.setPosition(a);};Map.prototype.resizeInfoWindow=function(a,f){if(!this.configure.infoWindowAutoPan){return;
}if(!this.infoWindow||this.infoWindow.isHidden()){return;}var c=this.infoWindow.getWindowPosition();var g=this.infoWindow.getWindowSize();var b=this.fromDivPixelToContainerPixel(c);var i=0;var h=0;var e=b.x-this.infoWindowMargin.left;if(e<0){i=-e;}var e=b.x+g.width+this.infoWindowMargin.right-this.size.width;if(e>0){i=-e;}var d=b.y-this.infoWindowMargin.top;if(d<0){h=-d;}var d=b.y+g.height+this.infoWindowMargin.bottom-this.size.height;
if(d>0){h=-d;}if(f||((Math.abs(i)>0&&Math.abs(i)<this.size.width)||(Math.abs(h)>0&&Math.abs(h)<this.size.height))){this.pan(i,h,a);}};Map.prototype.closeInfoWindow=function(){if(this.infoWindow){this.infoWindow.close();return true;}return false;};Map.prototype.getInfoWindow=function(){return this.infoWindow;};Map.prototype.isInfoWindowOpen=function(){return this.infoWindow&&!this.infoWindow.isHidden();
};Map.prototype.getInfoWindowLatLng=function(){return this.infoWindowLatLng;};Map.prototype.isInfoWindowInBounds=function(){if(this.isInfoWindowOpen()&&this.infoWindowLatLng){var e=this.infoWindow.getWindowPosition();e=this.fromDivPixelToContainerPixel(e);var c=this.infoWindow.getWindowSize();var a=parseInt(e.x);var f=parseInt(e.y);var b=new Y.Bounds([new Y.Point(a,f),new Y.Point(a+c.width,f+c.height)]);
var d=new Y.Bounds([new Y.Point(0,0),new Y.Point(this.size.width,this.size.height)]);return d.intersect(b);}return false;};Map.prototype.getProjection=function(){if(this.getCurrentLayerSet()){return this.getCurrentLayerSet().projection;}else{return new Y.MercatorProjection();}};Map.prototype.fromPagePixelToContainerPixel=function(a){var b=this.mainContainer.offset();return new Point(a.x-b.left,a.y-b.top);
};Map.prototype.fromContainerPixelToLatLng=function(c){var d=this.getProjection();var b=d.fromLatLngToPixel(this.center,this.getZoom());var a=new Y.Point(b.x-this.size.width/2+c.x,b.y+this.size.height/2-c.y);return d.fromPixelToLatLng(a,this.getZoom());};Map.prototype.fromDivPixelToLatLng=function(c){var b=this.getMapContainerXY();var a=new Point(c.x+b.x,c.y+b.y);return this.fromContainerPixelToLatLng(a);
};Map.prototype.fromLatLngToContainerPixel=function(g){var e=this.getProjection();var c=e.fromLatLngToPixel(g,this.getZoom());var d=e.fromLatLngToPixel(this.center,this.getZoom());var f=new Point(this.size.width/2,this.size.height/2);var b=c.x-d.x;var a=c.y-d.y;return new Point(f.x+b,f.y-a);};Map.prototype.fromLatLngsToContainerPixels=function(a,f){var e=this.getProjection();var k=this.getZoom();var h=e.fromLatLngToPixel(this.center,k);
var t=new Y.Point(this.size.width/2,this.size.height/2);var u=f.parent||new Y.Point(0,0);var w=f.container||this.getMapContainerXY();var c=new Y.Point(-w.x,-w.y);var p=e.getWrapWidth(k);var j=p/2;var g=this.size.width/2;var b=-w.x+g;var o=[];var r;for(var s=0,q=a.length;s<q;s++){r=e.fromLatLngToPixel(a[s],k);var n=r.x-h.x;var m=r.y-h.y;o[s]=new Point(t.x+n+c.x,t.y-m+c.y);if(p!=Infinity){var v=o[s].x-b;
while(v>j){v-=p;}while(v<-j){v+=p;}o[s].x=v+b;}o[s].x+=u.x;o[s].y+=u.y;}return o;};Map.prototype.fromLatLngToDivPixel=function(e){var c=this.getProjection();var a=this.fromLatLngToContainerPixel(e);var j=this.getMapContainerXY();var h=a.x-j.x;var f=a.y-j.y;var b=c.getWrapWidth(this.getZoom());if(b!=Infinity){var d=-j.x+this.size.width/2;var i=h-d;while(i>b/2){i-=b;}while(i<-b/2){i+=b;}h=i+d;}return new Point(h,f);
};Map.prototype.fromLatLngsToDivPixels=function(a,d){var c=this.getMapContainerXY();var d=d||new Y.Point(0,0);var b={current:c,parent:d};return this.fromLatLngsToContainerPixels(a,b);};Map.prototype.fromDivPixelToContainerPixel=function(b){var a=this.getMapContainerXY();return new Point(b.x+a.x,b.y+a.y);};Map.prototype.fromLatLngToTile=function(b){var a=this.getProjection();return a.fromLatLngToTile(b,this.getZoom());
};Map.prototype.fromTileToLatLng=function(c,b,a,e){var d=this.getProjection();return d.fromTileToLatLng(c,b,a,e,this.getZoom());};Map.prototype.updateBounds=function(){var d=this.getProjection();if(!this.isLoaded()){return;}var e=d.fromLatLngToPixel(this.center,this.getZoom());var f=new Point(e.x-this.size.width/2,e.y-this.size.height/2);var b=new Point(e.x+this.size.width/2,e.y+this.size.height/2);
var c=d.fromPixelToLatLng(f,this.getZoom(),true);var a=d.fromPixelToLatLng(b,this.getZoom(),true);this.bounds=new LatLngBounds(c,a);};Map.prototype.getMouseLatLng=function(c){var a=this.fromPagePixelToContainerPixel(new Point(c.pageX,c.pageY));var b=this.fromContainerPixelToLatLng(a);return b;};Map.prototype.checkRange=function(c){var e=this.getProjection();var f=e.scrollRange;if(c){if(!f||!f.enable){return c;
}var k=c.x;var j=c.y;var i=this.getZoom();var g=e.fromLatLngToPixel(this.center,i);var d=e.fromPixelToLatLng(new Point(g.x-c.x,g.y+c.y),i);var h=d.lat();var b=d.lng();if(f.top>h||f.bottom<h){if(f.top>h){h=f.top;}if(f.bottom<h){h=f.bottom;}var a=e.fromLatLngToPixel(new LatLng(h,d.lng()),i);j=parseInt(a.y-g.y);}if(b<f.left||b>f.right){if(b<f.left){b=f.left;}if(b>f.right){b=f.right;}var a=e.fromLatLngToPixel(new LatLng(d.lat(),b),i);
k=parseInt(a.x-g.x);}return new Point(k,j);}else{if(f&&f.enable){var h=this.center.lat();if(f.top>h||f.bottom<h){if(f.top>h){h=f.top;}if(f.bottom<h){h=f.bottom;}this.center=new Y.LatLng(h,this.center.lng());}}}};Map.prototype.initEvents=function(){var a=this;this.operation=new MapOperation(this,{touchSupport:this.configure.touchSupport});this.bind("resize",function(){this.redraw(true);},this);this.bind("moveend",function(){$.later(function(){Y.Event.trigger(a,"moveendlazy");
},800,"map-event-moveendlazy");});this.bind("zoomend",function(){$.later(function(){Y.Event.trigger(a,"zoomendlazy");},800,"map-event-zoomendlazy");});};Map.prototype.addPlugin=function(a){a.load(this);this.plugins.push(a);};Map.prototype.removePlugin=function(a){this.plugins=$.grep(this.plugins,function(c,b){if(c==a){c.unload();return false;}return true;});};Map.prototype.getPlugin=function(a){for(var b=0;
b<this.plugins.length;b++){if(this.plugins[b].getName()==a){return this.plugins[b];}}};Map.prototype.hasPlugin=function(b){var a=false;$.grep(this.plugins,function(d,c){if(d==b){a=true;}});return a;};Map.prototype.execMacro=function(a){};Map.prototype.setHybridPhoto=function(c){var a=this.getLayerSet(Y.LayerSetId.PHOTO),h=null;if(!a){return;}var g=a.getLayers(),h=null;for(var f=0,b=g.length;f<b;f++){var e=g[f];
if(e.constructor===Y.PhotoLabelLayer){h=e;}}if(!h){return;}var d=h.isHidden();if(c){if(d){h.show();}}else{if(!d){h.hide();}}};Map.prototype.toggleOpenStreetMap=function(b){var d=this.getLayerSet(Y.LayerSetId.OSM),a=typeof d==="object";if(b&&!a){var c=new Y.LayerSet(Y.OpenStreetMapLayer.LAYERSET_NAME,[new Y.OpenStreetMapLayer()]);this.addLayerSet(Y.LayerSetId.OSM,c);}else{if(!b&&a){if(this.getCurrentLayerSetId()===Y.LayerSetId.OSM){this.setLayerSetId(Y.LayerSetId.NORMAL);
}this.removeLayerSet(Y.LayerSetId.OSM);}}};Map.prototype.toggleMapType=function(c){var e=null;var b=this.getLayerSet(Y.LayerSetId.NORMAL);var d=typeof b==="object";if(d){var a=b.getLayerByName("NormalMap");if(a){e=a;}}if(e&&e.urlSet){switch(c){case Y.Map.TYPE.STANDARD:case Y.Map.TYPE.ENGLISH:case Y.Map.TYPE.SMARTPHONE:case Y.Map.TYPE.WEATHER_RADAR:e.url=e.urlSet[c];break;}}};Map.prototype.setIndoorOverlay=function(a){var b=this;
if(a){if(!this.overlays.indoor){this.overlays.indoor=new Y.IndoorMapLayer();this.addLayer(this.overlays.indoor);this.indoorControl=new Y.IndoorMapControl(this.overlays.indoor);this.addControl(this.indoorControl);}}else{if(this.overlays.indoor){this.removeLayer(this.overlays.indoor);this.removeControl(this.indoorControl);this.overlays.indoor=null;this.indoorControl=null;}}};Map.prototype.setFloorControl=function(b,a){var c=this;
if(a){if(!this.indoorcont){this.addControl(b);this.indoorcont=b;}}else{if(this.indoorcont){this.removeControl(this.indoorcont);this.indoorcont=null;}}};Map.prototype.setWeatherOverlay=function(b){if(typeof Y.WeatherMapLayer==="undefined"){return;}var c=this;if(b){if(!this.overlays.weather){var a=new Y.WeatherMapLayer({opacity:0.6});a.startAutoUpdate();a.setDispTime(true);this.addLayer(a);this.overlays.weather=a;
a.setTimePosition(a.getDefaultTimePosition());}}else{if(this.overlays.weather){this.removeLayer(this.overlays.weather);this.overlays.weather=null;}}};Map.prototype.getWeatherOverlayLayer=function(){return this.overlays.weather;};Map.prototype.setTyphoonOverlay=function(a){if(typeof Y.TyphoonMapLayer==="undefined"){return;}var c=this;if(a){if(!this.overlays.typhoon){var b=new Y.TyphoonMapLayer();this.addLayer(b);
this.overlays.typhoon=b;}}else{if(this.overlays.typhoon){this.removeLayer(this.overlays.typhoon);this.overlays.typhoon=null;}}};Map.prototype.getTyphoonOverlayLayer=function(){return this.overlays.typhoon;};Map.prototype.setTsunamiOverlay=function(b){if(typeof Y.TsunamiMapLayer==="undefined"){return;}var c=this;if(b){if(!this.overlays.tsunami){var a=new Y.TsunamiMapLayer({opacity:0.6});this.addLayer(a);
this.overlays.tsunami=a;}}else{if(this.overlays.tsunami){this.removeLayer(this.overlays.tsunami);this.overlays.tsunami=null;}}};Map.prototype.getTsunamiOverlayLayer=function(){return this.overlays.tsunami;};Map.prototype.setEnableGWS=function(b){var a=(this.enableGWS!==b);this.enableGWS=b;if(a){Y.Event.trigger(this,"enablegwschanged",b);this.redraw(true);}};Map.prototype.setEnableGuideLayer=function(a){if(this.operation.transitBehavior&&typeof this.operation.transitBehavior.enableGuideLayer!=="undefined"){this.operation.transitBehavior.enableGuideLayer=a;
}};Map.prototype.setEnableFadeIn=function(c){for(var a in this.layerSets){if(!this.layerSets.hasOwnProperty(a)){continue;}var d=this.layerSets[a].getLayers();for(var b=0;b<d.length;b++){if(d[b].enableFadeIn!=="undefined"){d[b].enableFadeIn=c;}}}};Map.prototype.setApplicationId=Y.Service.setApplicationId;Map.prototype.getApplicationId=Y.Service.getApplicationId;Map.prototype._startTween=function(a){this._stopTween();
this._tween=Y.Behavior.tween(this,a);};Map.prototype._stopTween=function(){var a=this.configure.enableFlickScroll,b=this._tween;if(a&&b){b.stop();this._tween=null;}};Map.prototype.fixFloatAccuracyContainerPosition=function(){var a=0.000001;if(Math.abs(this.currentContainerPosition.x)<a){this.currentContainerPosition.x=0;}if(Math.abs(this.currentContainerPosition.y)<a){this.currentContainerPosition.y=0;
}};Map.prototype.isDefaultLanguage=function(){return(typeof this.configure.language==="undefined"||this.configure.language===Y.LanguageType.JAPANESE);};Map.prototype.getLanguage=function(){if(typeof this.configure.language!=="undefined"){return this.configure.language;}return Y.LanguageType.JAPANESE;};Map.prototype.isEnableLayerSetId=function(a){var b=Y.LanguageType.JAPANESE;switch(a){case Y.LayerSetId.ENGLISH:b=Y.LanguageType.ENGLISH;
break;case Y.LayerSetId.KOREAN:b=Y.LanguageType.KOREAN;break;case Y.LayerSetId.CHINESE_TRADITIONAL:b=Y.LanguageType.CHINESE_TRADITIONAL;break;case Y.LayerSetId.CHINESE_SIMPLE:b=Y.LanguageType.CHINESE_SIMPLE;break;}return this.isEnabledLanguage(b);};Map.prototype._createFunctionForScroll=function(m){var f={transform:"transform",webkitTransform:"-webkit-transform",MozTransform:"-moz-transform",OTransform:"-o-transform",msTransform:"-ms-transform"},c=false,d={style:"",property:""},e=void 0,b=this.mapContainer[0].style;
for(var l in f){var g=(f.hasOwnProperty(l)&&b[l]!==e),k=Y.Util.Platform.isSupportTouchScroll,j=Y.Util.Platform.isIOS,a=(m.debugTransforms===true)||Y.Util.Platform.isAndroid;if(g&&a){c=true;d.style=f[l];d.property=l;if(j){var h="translate3d(0px, 0px, 0)";b[d.property]=h;}else{var h="translate(0px, 0px)";b[d.property]=h;}break;}}Y.Util.Platform.scrollType=(c)?"CSS3":"CSS2";var i=this;if(c){Y.Log.write("useTransform "+c);
Y.Log.write("that.currentContainerPosition.x "+i.currentContainerPosition.x);return function(p,o){i.currentContainerPosition.x+=p;i.currentContainerPosition.y+=o;i.fixFloatAccuracyContainerPosition();if(j){var q="translate3d("+i.currentContainerPosition.x+"px, "+i.currentContainerPosition.y+"px, 0)";}else{var n=this.currentContainerPosition.x;var r=this.currentContainerPosition.y;if(Y.Util.Platform.isAndroid){if(Y.Util.Platform.isChrome||Y.Util.Platform.isFireFox){n=Math.round(n);
r=Math.round(r);}else{if(n<0){n=Math.ceil(n-0.9);if(n%2!==0){++n;}}else{n=Math.floor(n+0.9);if(n%2!==0){++n;}}if(r<0){r=Math.ceil(r-0.9);if(r%2!==0){++r;}}else{r=Math.floor(r+0.9);if(r%2!==0){++r;}}}}var q="translate("+n+"px, "+r+"px)";}b[d.property]=q;};}else{Y.Log.write("useTransform "+c);return function(p,o){i.currentContainerPosition.x+=p;i.currentContainerPosition.y+=o;i.fixFloatAccuracyContainerPosition();
var n=i.mapContainer;n.css({left:i.currentContainerPosition.x+"px",top:i.currentContainerPosition.y+"px"});};}};var MapOperation=Y.MapOperation=function(d,c){this.map=d;var c=c||{};this.isTouchScreen=Y.Util.IS_TOUCH_SCREEN;var a=Y.Util.Platform;var b;if(c.touchSupport&&this.isTouchScreen){if(a.isIOS){b=new IphoneTouchBehavior();}else{if(a.isAndroid){b=new AndroidTouchBehavior();}else{b=new TouchBehavior();}}}else{b=new MouseBehavior();}var e;if(c.touchSupport&&this.isTouchScreen){if(a.isSupportPinchZoom){e=new PinchZoomBehavior();
}else{e=new AndroidPinchZoomBehavior();}}else{e=c.transit||new TransitBehavior();}this.setScreenBehavior(b);this.setTransitBehavior(e);};MapOperation.prototype.setScreenBehavior=function(a){if(this.screenBehavior){this.screenBehavior.uninitialize();}this.screenBehavior=a;this.screenBehavior.initialize(this.map);};MapOperation.prototype.getScreenBehavior=function(){return this.screenBehavior;};MapOperation.prototype.setTransitBehavior=function(a){if(this.transitBehavior){this.transitBehavior.uninitialize();
}this.transitBehavior=a;this.transitBehavior.initialize(this.map);};MapOperation.prototype.getTransitBehavior=function(){return this.transitBehavior;};var Behavior=Y.Behavior=function(){this.map=null;};Behavior.prototype.initialize=function(a){this.map=a;this.setValid(true);};Behavior.TWEEN_RANGE=300;Behavior.tween=function(a,e){var f=e.duration||500,j=e.diff,c=new Date().getTime(),h=a.currentContainerPosition.copy(),i=new Y.Point(h.x-j.x,h.y-j.y),g=false,b=setInterval(function(){var l=Math.min(1,(new Date().getTime()-c)/f),p=a.currentContainerPosition.copy(),m=(l===1),n=1-l,o=new Y.Point(parseInt(j.x*n,10),parseInt(j.y*n,10));
var k=a.checkRange(new Point(-o.x,-o.y));a.updatePosition(k.x,k.y);a.panUpdate();a.currentLayerSet.onPan(k.x,k.y);Y.Event.trigger(a,"move");if(m){clearInterval(b);if(!g){a.redraw();g=true;Y.Event.trigger(a,"dragend");Y.Event.trigger(a,"moveend");}}},10);var d={stop:function(){if(!g){clearInterval(b);g=true;Y.Event.trigger(a,"dragend");Y.Event.trigger(a,"moveend");}}};return d;};Behavior.prototype.uninitialize=function(){this.setValid(false);
this.map=null;};Behavior.prototype.setValid=function(a){};var ScreenBehavior=Y.ScreenBehavior=Y.extend(Y.Behavior,function(){Y.Behavior.call(this);});ScreenBehavior.prototype.initialize=function(a){this.map=a;this.initEventListener();this.setValid(true);};ScreenBehavior.prototype.initEventListener=function(){};ScreenBehavior.prototype.getScreenPoint=function(a){};var MouseBehavior=Y.MouseBehavior=Y.extend(Y.ScreenBehavior,function(){});
MouseBehavior.prototype.getScreenPoint=function(c){var b=0;var a=0;if(c&&c.pageX!=null&&c.pageY!=null){b=c.pageX;a=c.pageY;}return this.map.fromPagePixelToContainerPixel(new Point(b,a));};MouseBehavior.prototype.initEventListener=function(){var n=this;var d=this.map;function l(){if($.browser.mozilla){d.mapContainer.css("cursor","-moz-grabbing");}else{d.mapContainer.css("cursor","url(http://i.yimg.jp/images/map/icon/grabbing.cur),move");
}}function e(){d.mapContainer.css("cursor","default");}var c=function(){return new Date().getTime();};var i=false;var k;var j;var g;var m=false;var h=d.configure;if(h.dragging){e();}var f;var a=500;this._click=function(p){if(h.holdSupport&&(c()-k)>a){return;}var o=n.getScreenPoint(p);if(f){clearTimeout(f);}f=setTimeout(function(){if(!j||j.distance(o)<4){var q=d.fromContainerPixelToLatLng(o);if(h.singleClickPan){d.panTo(q,true);
}Event.trigger(d,"click",q);}},300);};this._dblclick=function(q){if(f){clearTimeout(f);}var o=n.getScreenPoint(q);var p=d.fromContainerPixelToLatLng(o);if(h.doubleClickPan&&h.doubleClickZoom){d.zoomIn(p,h.continuousZoom,true);}else{if(h.doubleClickPan){d.panTo(p,true);}else{if(h.doubleClickZoom){d.zoomIn(p,h.continuousZoom,false);}}}Event.trigger(d,"dblclick",p);};var b=null;this._mousedown=function(p){k=c();
j=n.getScreenPoint(p);g=j;i=true;d.mapContainer.stop();p.preventDefault();if(h.dragging){l();}if(h.holdSupport){if(b){clearTimeout(b);}var o=d.fromContainerPixelToLatLng(j);b=setTimeout(function(){Event.trigger(d,"hold",o);n._mouseup(p);},a);}};this._mousemove=function(s){if(!i||!h.dragging){return;}if(h.dragging&&!m){d._stopTween();Event.trigger(d,"movestart");Event.trigger(d,"dragstart",s);m=true;
if($.browser.msie&&d.mainContainer[0].setCapture){d.mainContainer[0].setCapture();}}if(h.holdSupport&&b){clearTimeout(b);b=null;}var r=n.getScreenPoint(s);var p=r.x-g.x;var o=r.y-g.y;var q=d.checkRange(new Point(p,o));d.updatePosition(q.x,q.y);d.panUpdate();d.currentLayerSet.onPan(q.x,q.y);g=r;Event.trigger(d,"move");Event.trigger(d,"drag",s);};this._mouseup=function(p){if(!i){return;}if($.browser.msie&&d.mainContainer[0].releaseCapture){d.mainContainer[0].releaseCapture();
}e();if(m){d.panUpdate();if(h.enableFlickScroll&&c()-k<Y.Behavior.TWEEN_RANGE){var o=new Y.Point(parseInt((j.x-g.x)/10),parseInt((j.y-g.y)/10));d._startTween({diff:o});}else{d.redraw();Event.trigger(d,"dragend");Event.trigger(d,"moveend");}}if(h.holdSupport&&b){clearTimeout(b);b=null;}i=false;m=false;};this._mousewheel=function(p,r){if(!r){return;}if(this.disableWheel){return;}var q=this;this.timerWheel=setTimeout(function(){q.disableWheel=false;
},450);this.disableWheel=true;if(h.scrollWheelZoom){var o;if(h.continuousZoom){o=d.fromContainerPixelToLatLng(n.getScreenPoint(p));d.operation.transitBehavior.screenPoint=n.getScreenPoint(p);}else{o=d.getCenter();}if(r>0){d.zoomIn(o,h.continuousZoom,false);}else{d.zoomOut(o,h.continuousZoom,false);}p.stopPropagation();p.preventDefault();}};if($.browser.mozilla){this._force_mouseup=function(p){if(!p.relatedTarget&&m){n._mouseup(p);
return;}var o;try{o=(p.relatedTarget)?p.relatedTarget.tagName.toLowerCase():null;}catch(p){o=null;}if(o==="iframe"&&m){n._mouseup(p);return;}};}if($.browser.msie){this._force_mouseup=function(p){var o=(p.toElement)?false:true;if(o&&m){n._mouseup(p);return;}};}};MouseBehavior.prototype.setValid=function(a){var c=$(window);var b=this.map;if(a){if($.browser.msie){b.mainContainer.bind("mousemove",this._mousemove);
b.mainContainer.bind("mouseup",this._mouseup);b.mainContainer.bind("mousedown",this._mousedown);}else{c.bind("mousemove",this._mousemove);c.bind("mouseup",this._mouseup);b.mainContainer.bind("mousedown",this._mousedown);}b.mainContainer.bind("click",this._click);b.mainContainer.bind("dblclick",this._dblclick);b.mainContainer.bind("mousewheel",this._mousewheel);if($.browser.mozilla){c.bind("mouseout",this._force_mouseup);
}else{if($.browser.msie){b.mainContainer.bind("mouseout",this._force_mouseup);}}}else{if($.browser.msie){b.mainContainer.unbind("mousemove",this._mousemove);b.mainContainer.unbind("mouseup",this._mouseup);b.mainContainer.unbind("mousedown",this._mousedown);}else{c.unbind("mousemove",this._mousemove);c.unbind("mouseup",this._mouseup);b.mainContainer.unbind("mousedown",this._mousedown);}b.mainContainer.unbind("click",this._click);
b.mainContainer.unbind("dblclick",this._dblclick);b.mainContainer.unbind("mousewheel",this._mousewheel);if($.browser.mozilla){c.unbind("mouseout",this._force_mouseup);}else{if($.browser.msie){b.mainContainer.unbind("mouseout",this._force_mouseup);}}}};MouseBehavior.prototype.uninitialize=function(){this.map.mapContainer.css("cursor","");Behavior.prototype.uninitialize.call(this);this._click=null;this._dblclick=null;
this._mousedown=null;this._mousemove=null;this._mouseup=null;this._mousewheel=null;if($.browser.mozilla||$.browser.msie){this._force_mouseup=null;}};var TouchBehavior=Y.TouchBehavior=Y.extend(Y.ScreenBehavior,function(){Y.ScreenBehavior.call(this);this.enableTouchScroll=true;this.zoomThreshold=30;});TouchBehavior.prototype.initEventListener=function(){var q=this;var g=this.map;var f=function(){return new Date().getTime();
};var i=false;var o;var n;var j;var p=false;var b=false;var m=false;var l=g.configure;var k=500;var c=null;var h=300;var e=0;var d=0;var a;this._touchstart=function(s){if(p&&s.touches.length>1){n=q.getScreenPoint(s,p);q._dblpoidbltap(s);}else{if(!q.enableTouchScroll){return;}n=q.getScreenPoint(s);q._dbltap(s);if(l.holdSupport){if(c){clearTimeout(c);}var r=g.fromContainerPixelToLatLng(n);c=setTimeout(function(){Event.trigger(g,"hold",r);
n=null;q._touchend(s);},k);}}o=f();j=n;s.preventDefault();};this._touchmove=function(v){if(!p&&!q.enableTouchScroll){return;}if(b){return;}if(!n){return;}if(!i){g._stopTween();i=true;Event.trigger(g,"movestart");Event.trigger(g,"dragstart");}if(l.holdSupport&&c){clearTimeout(c);c=null;}var u=q.getScreenPoint(v,p);var s=u.x-j.x;var r=u.y-j.y;var t=g.checkRange(new Point(s,r));g.updatePosition(t.x,t.y);
g.panUpdate();g.currentLayerSet.onPan(t.x,t.y);j=u;Event.trigger(g,"move");Event.trigger(g,"drag");};this._touchend=function(s){if(!p&&!q.enableTouchScroll){return;}if(i&&s.touches.length===0){g.panUpdate();g.updateBounds();if(l.enableFlickScroll&&f()-o<Y.Behavior.TWEEN_RANGE&&n){var r=new Y.Point(parseInt((n.x-j.x)/10),parseInt((n.y-j.y)/10));g._startTween({diff:r});}else{Event.trigger(g,"dragend");
Event.trigger(g,"moveend");}i=false;n=null;if(l.holdSupport&&c){clearTimeout(c);c=null;}}if(q.enableTouchScroll&&!i&&n){if(l.holdSupport){if((f()-o)>k){return;}else{if(c){clearTimeout(c);c=null;}}}q._sgltap(s);Event.trigger(g,"click",g.fromContainerPixelToLatLng(n));n=null;}};this._sgltap=function(r){if(a){clearTimeout(a);}a=setTimeout(function(){Event.trigger(g,"sgltap");},300);};this._dbltap=function(s){n=q.getScreenPoint(s,p);
var r=g.fromContainerPixelToLatLng(n);if(j&&n.distance(j)<20){if(f()-o<h){if(a){clearTimeout(a);}g.zoomIn(r,l.continuousZoom,false);Event.trigger(g,"dbltap");}}};this._dblpoidbltap=function(r){if(this.map.configure.DblPointDblTap==true){if(d===2&&r.touches.length===2){if(j&&n.distance(j)<20){if(f()-o<k){g.zoomOut(null,l.continuousZoom,false);d=0;Event.trigger(g,"dblpoidbltap");}}}else{d=r.touches.length;
}}};this._gesturestart=function(r){l.dragging=false;p=true;};this._gesturechange=function(s){s.preventDefault();var t=s.scale;if(!q.enableTouchScroll){return;}var r=g.mainContainer;r.css({"-webkit-transform":"scale("+t+")","-moz-transform":"scale("+t+")","-o-transform":"scale("+t+")",transform:"scale("+t+")"});};this._gestureend=function(x){x.preventDefault();if(!q.enableTouchScroll){p=false;x.stopPropagation();
n=null;if(i){Event.trigger(g,"dragend");Event.trigger(g,"moveend");i=false;}return;}var C=g.getCenter();var u=x.scale;var w=u*100;var B=(w>100)?Math.round(w-100):Math.round(100-w);var D=(B<=q.zoomThreshold);if(D){q._normalizeScale();}else{var t=Math.LOG2E*Math.log(u);t=(t>0)?Math.ceil(t):Math.floor(t);var A=g.getZoom();A+=t;if(g.getMaxZoom()<A){A=g.getMaxZoom();}if(g.getMinZoom()>A){A=g.getMinZoom();
}g.setZoom(A);b=true;}l.dragging=true;p=false;x.stopPropagation();n=null;var s=!D;if(Y.Util.Platform.scrollType==="CSS3"){var r=g.mapContainer.next()[0];var v=g.mapContainer[0];v.parentNode.removeChild(v);r.parentNode.insertBefore(v,r);}g.redraw(s);};this._normalizeScale=function(){var r=g.mainContainer;r.css({"-webkit-transform":"scale(1.0)","-moz-transform":"scale(1.0)","-o-transform":"scale(1.0)",transform:"scale(1.0)"});
b=false;};this._zoomendlistener=g.bind("zoomend",this._normalizeScale,q);};TouchBehavior.prototype.getScreenPoint=function(g,f){var f=(typeof f==="undefined")?false:f;if(g&&g.touches&&g.touches[0]){if(f&&g.touches.length>=2){var d=g.touches[0],b=g.touches[1];var c=(d.pageX+b.pageX)/2;var a=(d.pageY+b.pageY)/2;return new Y.Point(c,a);}else{var c=g.touches[0].pageX;var a=g.touches[0].pageY;}}else{return MouseBehavior.prototype.getScreenPoint.call(this,g);
}return this.map.fromPagePixelToContainerPixel(new Point(c,a));};TouchBehavior.prototype.setValid=function(a){var b=this.map;if(a){b.mapContainer[0].addEventListener("touchstart",this._touchstart,false);b.mainContainer[0].addEventListener("touchmove",this._touchmove,false);b.mainContainer[0].addEventListener("touchend",this._touchend,false);b.mainContainer[0].addEventListener("gesturestart",this._gesturestart,false);
b.mainContainer[0].addEventListener("gesturechange",this._gesturechange,false);b.mainContainer[0].addEventListener("gestureend",this._gestureend,false);}else{b.mainContainer[0].removeEventListener("touchmove",this._touchmove,false);b.mainContainer[0].removeEventListener("touchend",this._touchend,false);b.mapContainer[0].removeEventListener("touchstart",this._touchstart,false);b.mainContainer[0].removeEventListener("gesturestart",this._gesturestart,false);
b.mainContainer[0].removeEventListener("gesturechange",this._gesturechange,false);b.mainContainer[0].removeEventListener("gestureend",this._gestureend,false);b.unbind(this._zoomendlistener);}};TouchBehavior.prototype.uninitialize=function(){this.map.mapContainer.css("cursor","");Behavior.prototype.uninitialize.call(this);this._click=null;this._dblclick=null;this._mousedown=null;this._mousemove=null;
this._mouseup=null;this._mousewheel=null;this._gesturestart=null;this._gesturechange=null;this._gestureend=null;this._sgltap=null;this._dbltap=null;this._dblpoidbltap=null;};TouchBehavior.prototype._fixscale=function(l,h,i,f,c,b,p){l.preventDefault();if(f==undefined){return;}var q;var o;if(!c){var k=this.map.getSize();var s=(k.width/2)-f.x;var r=(k.height/2)-f.y;q=this.map.checkRange(new Point(s,r));
this.map.updatePosition(q.x,q.y);this.map.panUpdate();o=this.map.getCenter();}if(!p){var g=Math.LOG2E*Math.log(h);g=(g>0)?Math.ceil(g):Math.floor(g);var n=this.map.getZoom();n+=g;if(this.map.getMaxZoom()<n){n=this.map.getMaxZoom();}else{if(this.map.getMinZoom()>n){n=this.map.getMinZoom();}}this.map.setZoom(n);}if(!c){this.map.updatePosition(-(q.x),-(q.y));this.map.panUpdate();}b=true;l.stopPropagation();
var d=!p;if(Y.Util.Platform.scrollType==="CSS3"&&!Y.Util.Platform.isAndroid){var a=this.map.mapContainer.next()[0];var j=this.map.mapContainer[0];j.parentNode.removeChild(j);a.parentNode.insertBefore(j,a);}i.css({"-webkit-transform":"scale(1.0)","-moz-transform":"scale(1.0)","-o-transform":"scale(1.0)",transform:"scale(1.0)"});};TouchBehavior.prototype._scaletf=function(f,e,d,b){var a;var g;if(!b){a=d.x-this.map.currentContainerPosition.x;
g=d.y-this.map.currentContainerPosition.y;}else{var c=this.map.getSize();a=c.width/2-this.map.currentContainerPosition.x;g=c.height/2-this.map.currentContainerPosition.y;}e.css({"-webkit-transform-origin":a+"px "+g+"px","-webkit-transform":"scale("+f+")","-moz-transform-origin":a+"px "+g+"px","-moz-transform":"scale("+f+")","-o-transform-origin":a+"px "+g+"px","-o-transform":"scale("+f+")","transform-origin":a+"px "+g+"px",transform:"scale("+f+")"});
};TouchBehavior.prototype.pythagorean=function(b,a,d,c){return Math.sqrt(Math.pow(Math.abs(b-a),2)+Math.pow(Math.abs(d-c),2));};TouchBehavior.prototype._changeZoom=function(d){var c=d*100;var b=(c>100)?Math.round(c-100):Math.round(100-c);var a=(b<=this.zoomThreshold);return a;};TouchBehavior.prototype._makeCanvasMap=function(C,D,B,A){var e=this.map.getSize();this.canvas=$("#mapCanvas",this.map.getContainer()).get();
if(this.canvas.length>0){$("#mapCanvas",this.map.getContainer()).remove();}var a;var j=this.map.getZoom();var f=1;var d=1;var h=1;var s=Math.LOG2E*Math.log(C);s=(s>0)?Math.ceil(s):Math.floor(s);var a=j+s;if(j==this.map.getMaxZoom()&&a>this.map.getMaxZoom()){return;}if(j==this.map.getMinZoom()&&a<this.map.getMinZoom()){return;}if(this.map.getMaxZoom()<a){a=this.map.getMaxZoom();s=a-j;}if(this.map.getMinZoom()>a){a=this.map.getMinZoom();
s=a-j;}var n=Y.Util.level2Scale(j);var l=Y.Util.level2Scale(a);f=n/l;this.canvas=$('<canvas id="mapCanvas" width="'+e.width+'" height="'+e.height+'" style="visibility:hidden;z-index:0;"></canvas>');if(Y.Util.Platform.isAndroid){this.canvas.css({"-webkit-transform":"translateZ(0px)","-moz-transform":"translateZ(0px)","-o-transform":"translateZ(0px)",transform:"translateZ(0px)"});}$(this.map.getContainer()).prepend(this.canvas);
$(this.map.getContainer()).css({"text-align":"left"});if(!(this.canvas[0].getContext)||A){this.canvas.remove();return;}var x=$(".yolp-tilelayer img",this.map.getContainer()).get();var o=this.map.getProjection().tileSize;var v=this.canvas[0].getContext("2d");var r;var g;var u=0;var k=0;if(f<1){var b=B?new Y.Point(((e.width/2)-((e.width*C)/2)),((e.height/2)-((e.height*C)/2))):new Y.Point((D.x-(D.x*C)),(D.y-(D.y*C)));
this.canvas.css({position:"relative",width:e.width*C,height:e.height*C,top:b.y+"px",left:b.x+"px"});var q=Math.round(o);for(var w=0;w<x.length;w++){var p=$(x[w]);if(p.attr("src")!=undefined&&p.css("visibility")=="visible"){r=x[w].style.top.split("px");g=x[w].style.left.split("px");u=parseInt(g[0],10)+this.map.currentContainerPosition.x;k=parseInt(r[0],10)+this.map.currentContainerPosition.y;v.drawImage(x[w],u,k,q,q);
p.css("visibility","hidden");}}}else{var b=B?new Y.Point(((e.width/2)-((e.width*f)/2)),((e.height/2)-((e.height*f)/2))):new Y.Point((D.x-(D.x*f)),(D.y-(D.y*f)));v.translate(b.x,b.y);var q=Math.round(o*f);for(var w=0;w<x.length;w++){var p=$(x[w]);if(p.attr("src")!=undefined&&p.css("visibility")=="visible"){r=x[w].style.top.split("px");g=x[w].style.left.split("px");u=parseInt(g[0],10)+this.map.currentContainerPosition.x;
k=parseInt(r[0],10)+this.map.currentContainerPosition.y;v.drawImage(x[w],u*f,k*f,q,q);p.css("visibility","hidden");}}}this.canvas.css({visibility:"visible"});x=null;v=null;var c=this;setTimeout(function(){var i=$("#mapCanvas",c.map.getContainer()).get();if(i.length>0){$("#mapCanvas",c.map.getContainer()).remove();}i=null;},1000);};var TransitBehavior=Y.TransitBehavior=Y.extend(Y.Behavior,function(){});
TransitBehavior.prototype.initialize=function(c){this.enableGuideLayer=true;this.guide=null;this.lastll=null;this.map=c;this.platform={};var a={webkitTransform:"webkitTransformOrigin",MozTransform:"MozTransformOrigin",msTransform:"msTransformOrigin"};for(var b in a){if(this.map.mapContainer[0].style[b]!==void 0){this.platform.transform=b;this.platform.origin=a[b];switch(b){case"webkitTransform":this.platform.gpu="translate3d(0px, 0px, 0px)";
break;default:this.platform.gpu="";}break;}}var d=this;this._movestart=function(){if(d.guide){d.guide.remove();d.guide=null;}d.lastll=null;};this.setValid(true);};TransitBehavior.prototype.pan=function(l,j,a){var g=this;var d=this.map;var c=d.mapContainer;var k=d.currentContainerPosition.copy();var h=6;var o=l/h;var n=j/h;var f=1;b();function b(){d.panning=setTimeout(function(){d.updatePosition(o,n);
d.panUpdate();Event.trigger(d,"move");if(++f<h+1){b();}else{e();return;}},20);}function e(){d.panUpdate(a);d.redraw();d.panning=null;Event.trigger(d,"moveend");}};TransitBehavior.prototype.zoom=function(m,o,D,B){if(this.is_zooming){this.screenPoint=null;return;}this.is_zooming=true;var w=this;var a=this.map;var k=10;var r=a.getCenter();var n=false;if(a.configure.dragging&&o){n=!r.equals(o);}else{o=r;
}if(n){Event.trigger(a,"movestart");}var h;if(this.screenPoint&&a.configure.dragging){var f=a.getMapContainerXY();h=new Y.Point(this.screenPoint.x-f.x,this.screenPoint.y-f.y);this.screenPoint=null;}else{h=a.fromLatLngToDivPixel(o);}this.lastll=o;var l=a.zoom;var d=(a.getMinZoom()<=m&&m<=a.getMaxZoom())?m:a.zoom;var q=Y.Util.level2Scale(l);var p=Y.Util.level2Scale(d);var j=q/p;a.zoom=d;var E=this.platform;
var A=a.mapContainer.children(".yolp-tilelayer");var b=a.mapContainer.children().not(".yolp-tilelayer, .yolp-sumilayer");b.css({display:"none"});var v=null;if(a.isInfoWindowOpen()){v=a.mapContainer.children().not(".yolp-infowindow");v.css({display:"none"});}D=D||false;if(Math.abs(l-d)>3||D){c();return;}var x=1;if(!B){x=k;}var u;var C;var e;if(E.transform){A.css(E.origin,h.x+"px "+h.y+"px");}else{e=a.getProjection().getTilePixel();
C=[];u=a.mapContainer.find(".yolp-tilelayer").children();var s=0;u.each(function(){var i=$(this).position();C[s++]=new Y.Point(i.left,i.top);});}function g(){if(x<=k){var z;if(E.transform){if(j>1){z=((j-1)/k*x)+1;}else{if(j<1){z=1-((1-j)/k*x);}}A.css(E.transform,E.gpu+" scale("+z+")");}else{var i=0;if(j>1){z=j-1;u.each(function(){var t;if((t=C[i++])){$(this).css({left:Math.round(t.x+(t.x-h.x)/k*x*z)+"px",top:Math.round(t.y+(t.y-h.y)/k*x*z)+"px",width:Math.ceil(e+e/k*x*z),height:Math.ceil(e+e/k*x*z)});
}});}else{if(j<1){z=1-j;u.each(function(){var t;if((t=C[i++])){$(this).css({left:Math.round(t.x-(t.x-h.x)/k*x*z)+"px",top:Math.round(t.y-(t.y-h.y)/k*x*z)+"px",width:Math.ceil(e-e/k*x*z),height:Math.ceil(e-e/k*x*z)});}});}}}x++;}else{clearInterval(w.zoomAnimation);w.zoomAnimation=null;c();}}function c(){var i=h.x+a.currentContainerPosition.x;var H=h.y+a.currentContainerPosition.y;var G=a.getSize();var z=(G.width/2)-i;
var t=(G.height/2)-H;if(j<1){z=-z*j;t=-t*j;}var F=a.checkRange(new Point(z,t));if(w.enableGuideLayer){if(w.guide){w.guide.remove();w.guide=null;}w.guide=a.mapContainer.children(".yolp-tilelayer").clone();w.guide.css({left:(w.guide.position().left-F.x)+"px",top:(w.guide.position().top-F.y)+"px"});a.mapContainer.prepend(w.guide);}if(D){a.pan(F.x,F.y,false,true,o);}else{a.pan(F.x,F.y,false,true);}a.redraw(true);
delete w.zoomAnimation;if(w.enableGuideLayer){setTimeout(function(){if(w.guide){w.guide.remove();w.guide=null;}},1000);}if(E.transform){A.css(E.transform,"");A.css(E.origin,"");}b.css({display:"block"});if(v){v.css({display:"block"});}w.is_zooming=false;if(n){Event.trigger(a,"moveend");}Event.trigger(a,"zoomend",d,l);}w.zoomAnimation=setInterval(function(){g();},1);};TransitBehavior.prototype.setValid=function(a){if(a){this.map.bind("movestart",this._movestart);
}else{this.map.unbind("movestart",this._movestart);}};var PinchZoomBehavior=Y.PinchZoomBehavior=Y.extend(Y.TransitBehavior,function(){});PinchZoomBehavior.prototype.initialize=function(a){this.map=a;this.setValid(true);};PinchZoomBehavior.prototype.zoom=function(h,l,A,w){var v=this;var b=this.map;if(w){w=false;}var q=b.getCenter(),i=false;if(l){i=!q.equals(l);}else{l=q;}if(i){Event.trigger(b,"movestart");
}var e=b.fromLatLngToDivPixel(l);var j=Math.abs(b.zoom-h);var o=Math.pow(2,j)-1;var r=1-Math.pow(0.5,j);var a=b.zoom;var d=(b.getMinZoom()<=h&&h<=b.getMaxZoom())?h:b.zoom;b.zoom=d;var u=b.mapContainer;var s=b.getMapContainerXY();var x=b.getProjection().getTilePixel();var A=A||false;var f=3;if(A&&l){var g=b.fromLatLngToDivPixel(b.center);var t=b.fromLatLngToDivPixel(l);var n=parseFloat(g.x-t.x)/f;var k=parseFloat(g.y-t.y)/f;
}else{var g=b.fromLatLngToDivPixel(b.center);var t=g;var n=0;var k=0;}if(!w){c();return;}function c(){v.animationZoomEnd=setTimeout(function(){var m=y=0;if(A){if(a>d){var B=(n*f)*(o+1);var z=(k*f)*(o+1);}else{var B=(n*f)*(1-r);var z=(k*f)*(1-r);}}else{if(a>d){var B=(e.x-(u.width()/2-s.x))*r;var z=(e.y-(u.height()/2-s.y))*r;}else{var B=((u.width()/2-s.x)-e.x)*o;var z=((u.height()/2-s.y)-e.y)*o;}}var p=null;
if(A&&l){p=l;}b.pan(B,z,false,true,p);if(i){Event.trigger(b,"move");}b.redraw(true);Event.trigger(b,"zoomend",d,a);if(i){Event.trigger(b,"moveend");}v.animationZoomEnd=null;},50);}};PinchZoomBehavior.prototype.setValid=function(a){};var AndroidTouchBehavior=Y.AndroidTouchBehavior=Y.extend(Y.TouchBehavior,function(){Y.TouchBehavior.call(this);this.enableTouchScroll=true;this.zoomThreshold=5;});AndroidTouchBehavior.prototype.initEventListener=function(){var p=this;var d=this.map;var f=false;var x=true;var u=function(){return new Date().getTime();};this.enableTouchScroll=this.map.configure.dragging;if(this.enableTouchScroll){x=this.map.configure.PinchZoomCenter;
f=this.map.configure.enableFlickScroll;}var v=false;var q;var r;var t;var c;var g;var h;var m=false;var i=d.configure;var e;var z=500;var j=null;var s=1;var w,o;var b=0;var n=$(d.getMapContainer());var l=300;var k=0;var a;this._touchstart=function(E){if((E.touches.length>1)&&i.scrollPinchZoom){m=true;var B=$("#mapCanvas",d.getContainer()).get();if(B.length>0){$("#mapCanvas",d.getContainer()).remove();
}}if(E.touches.length>1){this.enableTouchScroll=false;t=p.getScreenPoint(E,m);w=p.pythagorean(E.touches[0].pageX,E.touches[1].pageX,E.touches[0].pageY,E.touches[1].pageY);o=w;var A=$(".yolp-layer",n);A.css({display:"none"});if(p.map.isInfoWindowOpen()){var C=$(".yolp-infowindow",n);C.css({display:"none"});}p._dblpoidbltap(E);r=u();g=t;h=null;}else{t=p.getScreenPoint(E,m);p._dbltap(E);if(i.holdSupport){if(j){clearTimeout(j);
}var D=d.fromContainerPixelToLatLng(t);j=setTimeout(function(){Event.trigger(d,"hold",D);p._touchend(E);},z);}h=t;}q=u();c=t;E.preventDefault();b=E.touches.length;};this._touchmove=function(G){G.preventDefault();if(G.touches.length>1){var F=10;var E=2;var C=p.pythagorean(G.touches[0].pageX,G.touches[1].pageX,G.touches[0].pageY,G.touches[1].pageY);if(i.scrollPinchZoom){m=true;var A=$(".yolp-tilelayer",n);
var B=d.getSize();var I=p.pythagorean(B.width,0,B.height,0);s=Math.abs(C/o);if(s<0.01){s=0.01;}e=p.getScreenPoint(G,m);p._scaletf(s,A,e,x);w=C;}}if(!p.enableTouchScroll){return;}if(!m&&!p.enableTouchScroll){return;}if(!t){return;}if(!v){d._stopTween();v=true;Event.trigger(d,"movestart");Event.trigger(d,"dragstart");}if(i.holdSupport&&j){clearTimeout(j);j=null;}var D=p.getScreenPoint(G,m);if(b==G.touches.length){var K=D.x-c.x;
var J=D.y-c.y;var H=d.checkRange(new Point(K,J));if(x&&(s>1)){}else{if(H.x===0&&H.y===0){}else{if(s>0.9){d.updatePosition(H.x,H.y);d.panUpdate();d.currentLayerSet.onPan(H.x,H.y);}else{if(!x){d.updatePosition(H.x,H.y);d.panUpdate();}}}}c=D;Event.trigger(d,"move");Event.trigger(d,"drag");}};this._touchend=function(F){if(F.touches.length==1&&i.scrollPinchZoom){var B=p._changeZoom(s);if(B){var A=$(".yolp-layer",n);
A.css({display:"block"});if(p.map.isInfoWindowOpen()){var E=$(".yolp-infowindow",n);E.css({display:"block"});}}var D=$(".yolp-tilelayer",n);p._makeCanvasMap(s,e,x,B);p._fixscale(F,s,D,e,x,this.enableTouchScroll,B);s=1;if(u()-q>Y.Behavior.TWEEN_RANGE){m=false;}}if(v&&F.touches.length===0){d.panUpdate();d.updateBounds();if(f&&u()-q<Y.Behavior.TWEEN_RANGE&&t){var C=new Y.Point(parseInt((t.x-c.x)/10),parseInt((t.y-c.y)/10));
d._startTween({diff:C});}else{Event.trigger(d,"dragend");Event.trigger(d,"moveend");}v=false;if(i.holdSupport&&j){clearTimeout(j);j=null;}}if(p.enableTouchScroll&&!v&&t){if(i.holdSupport){if((u()-q)>z){return;}else{if(j){clearTimeout(j);j=null;}}}if((p.pythagorean(c.x,t.x,c.y,t.y)<4)&&b==1){p._sgltap(F);Event.trigger(d,"click",d.fromContainerPixelToLatLng(t));}}t=null;};this._sgltap=function(A){if(a){clearTimeout(a);
}a=setTimeout(function(){Event.trigger(d,"sgltap");},l);};this._dbltap=function(B){var A=d.fromContainerPixelToLatLng(t);if(h&&t.distance(h)<20){if((u()-q)<l){if(a){clearTimeout(a);}if(this.map.configure.DblTap===true){d.zoomIn(A,i.continuousZoom,false);}Event.trigger(d,"dbltap");Event.trigger(d,"dblclick",d.fromContainerPixelToLatLng(t));}}};this._dblpoidbltap=function(A){if(this.map.configure.DblPointDblTap==true){if(k===2&&A.touches.length===2){if(g&&t.distance(g)<20){if((u()-r)<z){d.zoomOut(null,i.continuousZoom,false);
k=0;g=null;Event.trigger(d,"dblpoidbltap");}}}else{k=A.touches.length;}}};this._normalizeScale=function(){var A=$(".yolp-layer",n);A.css({display:"block"});if(p.map.isInfoWindowOpen()){var B=$(".yolp-infowindow",n);B.css({display:"block"});}};this._zoomendlistener=d.bind("zoomend",this._normalizeScale,p);};AndroidTouchBehavior.prototype.getScreenPoint=function(g,f){var f=(typeof f==="undefined")?false:f;
var d;var b;if(g&&g.touches&&g.touches[0]){if(f&&g.touches.length>=2){var c=g.touches[0],a=g.touches[1];d=(c.pageX+a.pageX)/2;b=(c.pageY+a.pageY)/2;}else{d=g.touches[0].pageX;b=g.touches[0].pageY;}}else{if(g&&g.pageX&&g.pageY){d=g.pageX;b=g.pageY;}}return this.map.fromPagePixelToContainerPixel(new Point(d,b));};AndroidTouchBehavior.prototype.setValid=function(a){var b=this.map;if(a){b.mapContainer[0].addEventListener("touchstart",this._touchstart,false);
b.mainContainer[0].addEventListener("touchmove",this._touchmove,false);b.mainContainer[0].addEventListener("touchend",this._touchend,false);}else{b.mainContainer[0].removeEventListener("touchmove",this._touchmove,false);b.mainContainer[0].removeEventListener("touchend",this._touchend,false);b.mapContainer[0].removeEventListener("touchstart",this._touchstart,false);b.unbind(this._zoomendlistener);}};
AndroidTouchBehavior.prototype.uninitialize=function(){this.map.mapContainer.css("cursor","");TouchBehavior.prototype.uninitialize.call(this);this._click=null;this._dblclick=null;this._mousedown=null;this._mousemove=null;this._mouseup=null;this._mousewheel=null;this._sgltap=null;this._dbltap=null;this._dblpoidbltap=null;};var AndroidPinchZoomBehavior=Y.AndroidPinchZoomBehavior=Y.extend(Y.Behavior,function(){});
AndroidPinchZoomBehavior.prototype.pan=function(l,j,a){var g=this;var d=this.map;var c=d.mapContainer;var k=d.currentContainerPosition.copy();var h=6;var o=l/h;var n=j/h;var f=1;b();function b(){d.panning=setTimeout(function(){d.updatePosition(o,n);d.panUpdate();Event.trigger(d,"move");if(++f<h+1){b();}else{e();return;}},20);}function e(){d.panUpdate(a);d.redraw();d.panning=null;Event.trigger(d,"moveend");
}};AndroidPinchZoomBehavior.prototype.zoom=function(l,s,I,F){var D=this;var b=this.map;if(this.is_zooming){c();}else{this.is_zooming=true;}if(this.removeImagesEvent!=null){clearTimeout(this.removeImagesEvent);this.removeImagesEvent=null;}if(this.animationZoomImages!=null){this.animationZoomImages.remove();this.animationZoomImages=null;}var v=b.getCenter(),o=false;if(s){o=!v.equals(s);}else{s=v;}if(o){Event.trigger(b,"movestart");
}var g=b.fromLatLngToDivPixel(s);var q=Math.abs(b.zoom-l);var u=Math.pow(2,q)-1;var x=1-Math.pow(0.5,q);var a=b.zoom;var e=(b.getMinZoom()<=l&&l<=b.getMaxZoom())?l:b.zoom;b.zoom=e;var C=b.mapContainer;var A=b.getMapContainerXY();var G=b.getProjection().getTilePixel();var I=I||false;var h=3;if(I&&s){var k=b.fromLatLngToDivPixel(b.center);var B=b.fromLatLngToDivPixel(s);var t=parseFloat(k.x-B.x)/h;var r=parseFloat(k.y-B.y)/h;
}else{var k=b.fromLatLngToDivPixel(b.center);var B=k;var t=0;var r=0;}if(!F){d();return;}var j={};var w=C.find(".yolp-tilelayer").children();w.each(function(){var p={};var i=$(this);var m=i.position();p.orgx=m.left;p.orgy=m.top;p.dx=(m.left-g.x)/h;p.dy=(m.top-g.y)/h;p.ds=G/h;j[i.attr("src")]=p;});this.animationZoomImages=w=w.clone();var H=this.animationZoomOthers=C.children(":visible");H.hide();C.prepend(w);
w.show();var E=1;f();function f(){D.zoomAnimation=setTimeout(function(){if(E<h){if(a<e){w.each(function(){var i;if((i=j[$(this).attr("src")])){$(this).css({left:i.orgx+(i.dx*E)*u+"px",top:i.orgy+(i.dy*E)*u+"px",width:G+(i.ds*E)*u,height:G+(i.ds*E)*u});}});if(I){b.updatePosition((t*E)*(1-x),(r*E)*(1-x));}}else{if(a>e){w.each(function(){var i;if((i=j[$(this).attr("src")])){$(this).css({left:i.orgx-(i.dx*E)*x+"px",top:i.orgy-(i.dy*E)*x+"px",width:G-(i.ds*E)*x,height:G-(i.ds*E)*x});
}});if(I){b.updatePosition((t*E)*(u+1),(r*E)*(u+1));}}}n(E);E++;f();}else{d();}},20);}function c(){if(typeof D.zoomAnimation!=="undefined"){clearTimeout(D.zoomAnimation);delete D.zoomAnimation;}if(D.animationZoomImages!=null){D.animationZoomImages.remove();D.animationZoomImages=null;}if(D.animationZoomEnd){clearTimeout(D.animationZoomEnd);D.animationZoomEnd=null;}if(D.animationZoomOthers){D.animationZoomOthers.show();
D.animationZoomOthers=null;}}function n(m){$("#zoomguide").remove();var p=$("<img id='zoomguide' src='http://i.yimg.jp/images/clear.gif'>");p.css({position:"relative",left:g.x-15,top:g.y-15});if(a>e){p.addClass("crtl"+(4-m));}else{p.addClass("mgnfctn"+m);}C.append(p);}function d(){$("#zoomguide").remove();D.animationZoomEnd=setTimeout(function(){var i=y=0;if(I){if(a>e){var z=(t*h)*(u+1);var p=(r*h)*(u+1);
}else{var z=(t*h)*(1-x);var p=(r*h)*(1-x);}}else{if(a>e){var z=(g.x-(C.width()/2-A.x))*x;var p=(g.y-(C.height()/2-A.y))*x;}else{var z=((C.width()/2-A.x)-g.x)*u;var p=((C.height()/2-A.y)-g.y)*u;}}if(!I&&w){w.each(function(){$(this).css({left:parseFloat($(this).css("left"))-z,top:parseFloat($(this).css("top"))-p});});}var m=null;if(I&&s){m=s;}else{m=b.getCenter();}b.pan(z,p,false,true,m);if(o){Event.trigger(b,"move");
}b.redraw(true);if(H){setTimeout(function(){H.show();D.animationZoomOthers=null;},50);}if(D.animationZoomImages){D.removeImagesEvent=setTimeout(function(){if(D.animationZoomImages!=null){D.animationZoomImages.remove();D.animationZoomImages=null;}},1000);}D.is_zooming=false;delete D.zoomAnimation;if(o){Event.trigger(b,"moveend");}D.animationZoomEnd=null;Event.trigger(b,"zoomend",e,a);},50);}};var IphoneTouchBehavior=Y.IphoneTouchBehavior=Y.extend(Y.TouchBehavior,function(){Y.TouchBehavior.call(this);this.enableTouchScroll=true;});IphoneTouchBehavior.prototype.initEventListener=function(){var m=this;var d=this.map;var u=true;var f=false;var s=function(){return new Date().getTime();};this.enableTouchScroll=this.map.configure.dragging;var n=$(d.getMapContainer());if(this.enableTouchScroll){u=this.map.configure.PinchZoomCenter;
f=this.map.configure.enableFlickScroll;}var t=false;var o;var p=0;var q;var c;var l=false;var h=d.configure;var e;var v=500;var i=null;var g=false;var r=false;var k=300;var b=0;var j=0;var a;this._touchstart=function(y){var w=$("#mapCanvas",d.getContainer()).get();if(w.length>0){$("#mapCanvas",d.getContainer()).remove();}if((y.touches.length>1)&&h.scrollPinchZoom){l=true;}if(y.touches.length>1){q=m.getScreenPoint(y,l);
m._dblpoidbltap(y);}else{if(!m.enableTouchScroll){return;}q=m.getScreenPoint(y,l);m._dbltap(y);if(h.holdSupport){if(i){clearTimeout(i);}var x=d.fromContainerPixelToLatLng(q);i=setTimeout(function(){Event.trigger(d,"hold",x);m._touchend(y);},v);}}o=s();c=q;y.preventDefault();b=y.touches.length;};this._touchmove=function(A){var z=m.getScreenPoint(A,l);e=z;if(!m.enableTouchScroll){return;}if(g){return;
}g=true;A.preventDefault();if(!l&&!m.enableTouchScroll){g=false;return;}if(!q){g=false;return;}if(!t){d._stopTween();t=true;Event.trigger(d,"movestart");Event.trigger(d,"dragstart");}if(h.holdSupport&&i){clearTimeout(i);i=null;}var x=z.x-c.x;var w=z.y-c.y;var y=d.checkRange(new Point(x,w));if((A.scale>1)&&(u)){}else{if(A.scale>0.9){d.updatePosition(y.x,y.y);d.panUpdate();d.currentLayerSet.onPan(y.x,y.y);
}else{if(!u){d.updatePosition(y.x,y.y);d.panUpdate();}}}c=z;Event.trigger(d,"move");Event.trigger(d,"drag");g=false;};this._touchend=function(x){if(x.touches.length==1){if(o&&s()-o>Y.Behavior.TWEEN_RANGE){l=false;}}if(!l&&!m.enableTouchScroll){q=null;return;}if(t&&x.touches.length===0){d.panUpdate();d.updateBounds();if(f&&s()-o<Y.Behavior.TWEEN_RANGE&&q){var w=new Y.Point(parseInt((q.x-c.x)/10),parseInt((q.y-c.y)/10));
d._startTween({diff:w});}else{Event.trigger(d,"dragend");Event.trigger(d,"moveend");}t=false;if(h.holdSupport&&i){clearTimeout(i);i=null;}}if(m.enableTouchScroll&&!t&&q){if(h.holdSupport){if((s()-o)>v){return;}else{if(i){clearTimeout(i);i=null;}}}if((m.pythagorean(c.x,q.x,c.y,q.y)<4)&&b==1){m._sgltap(x);Event.trigger(d,"click",d.fromContainerPixelToLatLng(q));}}q=null;g=false;};this._sgltap=function(w){if(a){clearTimeout(a);
}a=setTimeout(function(){Event.trigger(d,"sgltap");},300);};this._dbltap=function(x){q=m.getScreenPoint(x,l);var w=d.fromContainerPixelToLatLng(q);if(c&&q.distance(c)<20){if(s()-o<k){if(a){clearTimeout(a);}if(this.map.configure.DblTap===true){d.zoomIn(w,h.continuousZoom,false);}Event.trigger(d,"dbltap");Event.trigger(d,"dblclick",d.fromContainerPixelToLatLng(q));}}};this._dblpoidbltap=function(w){if(this.map.configure.DblPointDblTap==true){if(j===2&&w.touches.length===2){if(c&&q.distance(c)<20){if(s()-o<v){d.zoomOut(null,h.continuousZoom,false);
j=0;Event.trigger(d,"dblpoidbltap");}}}else{j=w.touches.length;}}};this._gesturestart=function(w){r=true;if(h.scrollPinchZoom){this.enableTouchScroll=false;}d.mainContainer[0].addEventListener("gestureend",m._gestureend,false);};this._gesturechange=function(z){if(!r){return;}if(h.scrollPinchZoom){z.preventDefault();if(!l&&!m.enableTouchScroll){return;}if(!e){return;}var x=$(".yolp-tilelayer",n);m._scaletf(z.scale,x,e,u);
if(z.scale!=1){var w=$(".yolp-layer",n);w.css({display:"none"});if(m.map.isInfoWindowOpen()){var y=$(".yolp-infowindow",n);y.css({display:"none"});}}}};this._gestureend=function(A){r=false;if(h.scrollPinchZoom){var B=A.scale;var x=m._changeZoom(B);if(x){var w=$(".yolp-layer",n);w.css({display:"block"});if(m.map.isInfoWindowOpen()){var z=$(".yolp-infowindow",n);z.css({display:"block"});}}var y=$(".yolp-tilelayer",n);
m._makeCanvasMap(B,e,u,x);m._fixscale(A,B,y,e,u,this.enableTouchScroll,x);l=false;}d.mainContainer[0].removeEventListener("gestureend",m._gestureend,false);};this._normalizeScale=function(){var w=$(".yolp-layer",n);w.css({display:"block"});if(m.map.isInfoWindowOpen()){var x=$(".yolp-infowindow",n);x.css({display:"block"});}};this._zoomendlistener=d.bind("zoomend",this._normalizeScale,m);};IphoneTouchBehavior.prototype.getScreenPoint=function(g,f){var f=(typeof f==="undefined")?false:f;
var d;var b;if(g&&g.touches&&g.touches[0]){if(f&&g.touches.length>=2){var c=g.touches[0],a=g.touches[1];d=(c.pageX+a.pageX)/2;b=(c.pageY+a.pageY)/2;}else{d=g.touches[0].pageX;b=g.touches[0].pageY;}}else{if(g&&g.pageX&&g.pageY){d=g.pageX;b=g.pageY;}}return this.map.fromPagePixelToContainerPixel(new Point(d,b));};IphoneTouchBehavior.prototype.setValid=function(a){var b=this.map;if(a){b.mapContainer[0].addEventListener("touchstart",this._touchstart,false);
b.mainContainer[0].addEventListener("touchmove",this._touchmove,false);b.mainContainer[0].addEventListener("touchend",this._touchend,false);b.mainContainer[0].addEventListener("gesturestart",this._gesturestart,false);b.mainContainer[0].addEventListener("gesturechange",this._gesturechange,false);}else{b.mainContainer[0].removeEventListener("touchmove",this._touchmove,false);b.mainContainer[0].removeEventListener("touchend",this._touchend,false);
b.mapContainer[0].removeEventListener("touchstart",this._touchstart,false);b.mainContainer[0].removeEventListener("gesturestart",this._gesturestart,false);b.mainContainer[0].removeEventListener("gesturechange",this._gesturechange,false);b.unbind(this._zoomendlistener);}};IphoneTouchBehavior.prototype.uninitialize=function(){this.map.mapContainer.css("cursor","");TouchBehavior.prototype.uninitialize.call(this);
this._click=null;this._dblclick=null;this._mousedown=null;this._mousemove=null;this._mouseup=null;this._mousewheel=null;this._gesturestart=null;this._gesturechange=null;this._gestureend=null;this._sgltap=null;this._dbltap=null;this._dblpoidbltap=null;};var Point=Y.Point=function(c,d,a){this.x=c||0;this.y=d||0;};Point.prototype.equals=function(a){if(a&&a.valid){return(this.x==a.x&&this.y==a.y);}return false;};Point.prototype.toString=function(){return this.x+","+this.y;};Point.prototype.valid=function(){return true;};Point.prototype.distance=function(c){var b=this.pointDiff(c);return Math.sqrt(b.x*b.x+b.y*b.y);};Point.prototype.pointDiff=function(c){var b=c.x-this.x;
var a=this.y-c.y;return(new Point(b,a));};Point.prototype.offset=function(b,a){this.x+=b;this.y+=a;};Point.prototype.copy=function(){return new Y.Point(this.x,this.y);};var Size=Y.Size=function(a,b){this.width=a||0;this.height=b||0;};Size.prototype.equals=function(a){if(a&&a.valid){return(this.width==a.width&&this.height==a.height);}return false;};Size.prototype.hasSmallerSide=function(a){return(this.width<a.width||this.height<a.height);
};Size.prototype.valid=function(){return true;};Size.prototype.area=function(a){if(a){return a.width*a.height;}return this.width*this.height;};Size.prototype.toString=function(){return this.width+","+this.height;};var Bounds=Y.Bounds=function(c){if(c.length<1){return null;}var f=minX=c[0].x;var d=minY=c[0].y;for(var b=0,a=c.length;b<a;b++){var e=c[b];minX=Math.min(minX,e.x);minY=Math.min(minY,e.y);
f=Math.max(f,e.x);d=Math.max(d,e.y);}this.minX=minX;this.minY=minY;this.maxX=f;this.maxY=d;};Bounds.prototype.toString=function(){return this.minX+","+this.minY+","+this.maxX+","+this.maxY;};Bounds.prototype.equals=function(a){};Bounds.prototype.mid=function(){return new Point((this.maxX+this.minX)/2,(this.maxY+this.minY)/2);};Bounds.prototype.min=function(){return new Point(this.minX,this.minY);};
Bounds.prototype.max=function(){return new Point(this.maxX,this.maxY);};Bounds.prototype.left=function(){return this.minX;};Bounds.prototype.right=function(){return this.maxX;};Bounds.prototype.top=function(){return this.maxY;};Bounds.prototype.bottom=function(){return this.minY;};Bounds.prototype.intersect=function(d,b){if(b==null){b=true;}var f=(d.bottom()==this.bottom()&&d.top()==this.top())?true:(((d.bottom()>this.bottom())&&(d.bottom()<this.top()))||((this.bottom()>d.bottom())&&(this.bottom()<d.top())));
var e=(d.bottom()==this.bottom()&&d.top()==this.top())?true:(((d.top()>this.bottom())&&(d.top()<this.top()))||((this.top()>d.bottom())&&(this.top()<d.top())));var a=(d.right()==this.right()&&d.left()==this.left())?true:(((d.right()>this.left())&&(d.right()<this.right()))||((this.right()>d.left())&&(this.right()<d.right())));var c=(d.right()==this.right()&&d.left()==this.left())?true:(((d.left()>this.left())&&(d.left()<this.right()))||((this.left()>d.left())&&(this.left()<d.right())));
return(this.containsBounds(d,true,b)||d.containsBounds(this,true,b)||((e||f)&&(c||a)));};Bounds.prototype.containsBounds=function(e,d,b){if(d==null){d=false;}if(b==null){b=true;}var c;var g;var a;var f;if(b){c=(e.left()>=this.left())&&(e.left()<=this.right());g=(e.top()>=this.bottom())&&(e.top()<=this.top());a=(e.right()>=this.left())&&(e.right()<=this.right());f=(e.bottom()>=this.bottom())&&(e.bottom()<=this.top());
}else{c=(e.left()>this.left())&&(e.left()<this.right());g=(e.top()>this.bottom())&&(e.top()<this.top());a=(e.right()>this.left())&&(e.right()<this.right());f=(e.bottom()>this.bottom())&&(e.bottom()<this.top());}return(d)?(g||f)&&(c||a):(g&&c&&f&&a);};Bounds.prototype.containsPoint=function(a){return(a.x>=this.minX&&a.x<=this.maxX)&&(a.y>=this.minY&&a.y<=this.maxY);};Bounds.prototype.extend=function(a){};
var LatLng=Y.LatLng=function(d,c,e){this.Lat=(typeof d==="number")?d:parseFloat(d)||0;this.Lon=(typeof c==="number")?c:parseFloat(c)||0;if(!e){this.unbound();}this.unbounded=e;this.isLatLng=true;};LatLng.prototype.unbound=function(){var d=this.Lat;var c=this.Lon;if(Math.abs(d)>180){d%=180;}if(d<-90){d+=180;}else{if(d>90){d-=180;}}if(Math.abs(c)>360){c%=360;}if(c<-180){c+=360;}else{if(c>180){c-=360;
}}this.Lat=d;this.Lon=c;};LatLng.prototype.lat=function(){return this.Lat;};LatLng.prototype.lng=function(){return this.Lon;};LatLng.prototype.setLat=function(a){this.Lat=a;};LatLng.prototype.setLng=function(a){this.Lon=a;};LatLng.prototype.copy=function(){return new Y.LatLng(this.Lat,this.Lon,this.unbounded);};LatLng.prototype.greater=function(a){if(a&&a.valid){return(this.Lat>a.Lat&&this.Lon>a.Lon);
}return false;};LatLng.prototype.equals=function(a){var b=1e-11;return(Math.abs(this.lat()-a.lat())<b&&Math.abs(this.lng()-a.lng())<b);};LatLng.prototype.valid=function(){return true;};LatLng.prototype.latRadians=function(){return this.lat()*Math.PI/180;};LatLng.prototype.lngRadians=function(){return this.lng()*Math.PI/180;};LatLng.prototype.getRad=function(){return new LatLng(this.Lat*Math.PI/180,this.Lon*Math.PI/180);
};LatLng.prototype.distance=function(e){if(!e){return;}var a=6378.137;var c=this.getRad();var g=e.getRad();var f=Math.cos(c.Lat)*Math.cos(c.Lon)*Math.cos(g.Lat)*Math.cos(g.Lon)+Math.cos(c.Lat)*Math.sin(c.Lon)*Math.cos(g.Lat)*Math.sin(g.Lon)+Math.sin(c.Lat)*Math.sin(g.Lat);if(f<-1){f=-1;}else{if(f>1){f=1;}}var b=Math.acos(f);return a*b;};LatLng.prototype.angle=function(g){var d=this.lng()*Math.PI/180;
var f=this.lat()*Math.PI/180;var c=g.lng()*Math.PI/180;var e=g.lat()*Math.PI/180;var b=c-d;var a=Math.log(Math.tan(Math.PI/4+e/2))-Math.log(Math.tan(Math.PI/4+f/2));var h=Math.acos(b/Math.sqrt(b*b+a*a))*180/Math.PI;if(a<0){h=180+180-h;}h-=90;if(h<0){h+=360;}return 360-h;};LatLng.prototype.detachedLatLng=function(b,a){var d=6366707;var e=this.lat();var c=this.lng();if(a){c=(a/(d*Math.cos(this.lat()*Math.PI/180)))*(180/Math.PI)+this.lng();
}if(b){e=(b/d)*(180/Math.PI)+this.lat();}return new Y.LatLng(e,c);};LatLng.prototype.pointDiff=function(b){if(!b){return;}var a=this.Lat-b.Lat;var c=b.Lon-this.Lon;return(new LatLng(a,c));};LatLng.prototype.middle=function(c){var b=(this.Lat+c.Lat)/2;var a=(this.Lon+c.Lon)/2;return(new LatLng(b,a));};LatLng.prototype.setgeobox=function(a){this.LatMax=(this.Lat>a.Lat)?this.Lat:a.Lat;this.LatMin=(this.Lat>a.Lat)?a.Lat:this.Lat;
this.LonMax=(this.Lon>a.Lon)?this.Lon:a.Lon;this.LonMin=(this.Lon>a.Lon)?a.Lon:this.Lon;this.min=new LatLng((this.Lat>a.Lat)?a.Lat:this.Lat,(this.Lon>a.Lon)?a.Lon:this.Lon);this.max=new LatLng((this.Lat>a.Lat)?this.Lat:a.Lat,(this.Lon>a.Lon)?this.Lon:a.Lon);};LatLng.prototype.toString=function(){return this.lat()+","+this.lng();};LatLng.prototype.toUrlValue=function(){return this.lng()+","+this.lat();
};LatLng.fromUrlValue=function(b){if(typeof(b)!="string"){return b;}var a=b.split(",");if(a.length<2){return b;}return new Y.LatLng(a[1],a[0]);};LatLng.fromString=function(a,b){var a=(a instanceof String)?a.toString():a;var b=(b instanceof String)?b.toString():b;if(typeof a!=="string"||typeof b!=="string"){return new Y.LatLng(0,0);}var c=function(l){var j="/";var g=(l.charAt(0)==="-")?-1:1;var h=l.split(j);
var f=h.length;var k=0,e=0,i=0;if(f>=1){k=parseFloat(Math.abs(h[0])/1);}if(f>=2){e=parseFloat(h[1]/60);}if(f>=3){i=parseFloat(h[2]/3600);}return g*(k+e+i);};return new Y.LatLng(c(a),c(b));};var LatLngBounds=Y.LatLngBounds=function(){var m,g;if(arguments.length==2){m=arguments[0];g=arguments[1];}else{if(arguments.length==1){var n=arguments[0];if(n.length<1){return null;}var f=maxX=n[0].lng();var d=maxY=n[0].lat();
for(var h=0,e=n.length;h<e;h++){var c=n[h];f=Math.min(f,c.lng());d=Math.min(d,c.lat());maxX=Math.max(maxX,c.lng());maxY=Math.max(maxY,c.lat());}m=new LatLng(d,f,true);g=new LatLng(maxY,maxX,true);}}if(g&&m){if(g.lng()-m.lng()>360){m=new LatLng(m.lat(),-180);g=new LatLng(g.lat(),180);}else{var k=m.lng();if(k==Number.POSITIVE_INFINITY){k=-180;}else{if(k==Number.NEGATIVE_INFINITY){k=180;}}while(k>180){k-=360;
}while(k<-180){k+=360;}var j=g.lng();if(j==Number.POSITIVE_INFINITY){j=-180;}else{if(j==Number.NEGATIVE_INFINITY){j=180;}}while(j>180){j-=360;}while(j<-180){j+=360;}m=new LatLng(m.lat(),k);g=new LatLng(g.lat(),j);}this.sw=m;this.ne=g;}this.isLatLngBounds=true;};LatLngBounds.prototype.equals=function(a){return(this.sw.equals(a.sw)&&this.ne.equals(a.ne));};LatLngBounds.prototype.isEmpty=function(){return(!this.ne||!this.sw);
};LatLngBounds.prototype.extend=function(a){if(!a){return;}if(this.isEmpty()){this.sw=a.copy();this.ne=a.copy();}if(this.sw.lat()>a.lat()){this.sw.Lat=a.lat();}if(this.sw.lng()>a.lng()){this.sw.Lon=a.lng();}if(this.ne.lat()<a.lat()){this.ne.Lat=a.lat();}if(this.ne.lng()<a.lng()){this.ne.Lon=a.lng();}return this;};LatLngBounds.prototype.extendRate=function(b){if(!this.isEmpty()){var a=this.toSpan();
var f=this.getCenter();if(a.lat()<0){this.sw.Lat=-90;this.ne.Lat=90;}else{var e=a.lat()/2*b;this.sw.Lat=f.lat()-e;this.ne.Lat=f.lat()+e;}if(a.lng()<0){this.sw.lon=-180;this.ne.lon=180;}else{var d=a.lng()/2*b;this.sw.Lon=f.lng()-d;this.ne.Lon=f.lng()+d;}}return this;};LatLngBounds.prototype.getSouthWest=function(){return this.sw;};LatLngBounds.prototype.getNorthEast=function(){return this.ne;};LatLngBounds.prototype.copy=function(){return new Y.LatLngBounds(this.sw.copy(),this.ne.copy());
};LatLngBounds.prototype.toSpan=function(){var a=this.ne.lat()-this.sw.lat();if(this.ne.lng()>this.sw.lng()){var b=this.ne.lng()-this.sw.lng();}else{var b=(180-this.sw.lng())+(180+this.ne.lng());}return new LatLng(a,b);};LatLngBounds.prototype.left=function(){return this.sw.lng();};LatLngBounds.prototype.right=function(){return this.ne.lng();};LatLngBounds.prototype.top=function(){return this.ne.lat();
};LatLngBounds.prototype.bottom=function(){return this.sw.lat();};LatLngBounds.prototype.containsLatLng=function(c,a){if(a==null){a=true;}var b=false;if(a){b=((c.lng()>=this.left())&&(c.lng()<=this.right())&&(c.lat()>=this.bottom())&&(c.lat()<=this.top()));}else{b=((c.lng()>this.left())&&(c.lng()<this.right())&&(c.lat()>this.bottom())&&(c.lat()<this.top()));}return b;};LatLngBounds.prototype.containsBounds=function(e,d,b){if(d==null){d=false;
}if(b==null){b=true;}var c;var g;var a;var f;if(b){c=(e.left()>=this.left())&&(e.left()<=this.right());g=(e.top()>=this.bottom())&&(e.top()<=this.top());a=(e.right()>=this.left())&&(e.right()<=this.right());f=(e.bottom()>=this.bottom())&&(e.bottom()<=this.top());}else{c=(e.left()>this.left())&&(e.left()<this.right());g=(e.top()>this.bottom())&&(e.top()<this.top());a=(e.right()>this.left())&&(e.right()<this.right());
f=(e.bottom()>this.bottom())&&(e.bottom()<this.top());}return(d)?(g||f)&&(c||a):(g&&c&&f&&a);};LatLngBounds.prototype.intersect=function(d,b){if(b==null){b=true;}var f=(d.bottom()==this.bottom()&&d.top()==this.top())?true:(((d.bottom()>this.bottom())&&(d.bottom()<this.top()))||((this.bottom()>d.bottom())&&(this.bottom()<d.top())));var e=(d.bottom()==this.bottom()&&d.top()==this.top())?true:(((d.top()>this.bottom())&&(d.top()<this.top()))||((this.top()>d.bottom())&&(this.top()<d.top())));
var a=(d.right()==this.right()&&d.left()==this.left())?true:(((d.right()>this.left())&&(d.right()<this.right()))||((this.right()>d.left())&&(this.right()<d.right())));var c=(d.right()==this.right()&&d.left()==this.left())?true:(((d.left()>this.left())&&(d.left()<this.right()))||((this.left()>d.left())&&(this.left()<d.right())));return(this.containsBounds(d,true,b)||d.containsBounds(this,true,b)||((e||f)&&(c||a)));
};LatLngBounds.prototype.getCenter=function(){if(this.isEmpty()){return null;}var a=(this.ne.lat()+this.sw.lat())/2;var b=(this.ne.lng()+this.sw.lng())/2;if(this.ne.lng()<this.sw.lng()){b=180+b;}return new LatLng(a,b);};LatLngBounds.prototype.toString=function(){return this.sw.toString()+","+this.ne.toString();};LatLngBounds.prototype.toUrlValue=function(){this.sw.unbound();this.ne.unbound();var d=this.sw.lat();
var b=this.sw.lng();var c=this.ne.lat();var a=this.ne.lng();if(a==0&&b==0){b=-180;a=179.999999;}if((a-b)==360){a-=0.000001;}return b+","+d+","+a+","+c;};var Command=Y.Command=function(a){this.keys=a||[];this.pointer=0;};Command.prototype.toString=function(){return"cmd_"+this.keys.join("_");};Command.prototype.isComplete=function(a){if(this.keys.length<1){return false;}if(this.keys[this.pointer]===a){if(typeof this.keys[++this.pointer]==="undefined"){this.pointer=0;return true;}}else{this.pointer=0;}return false;};var KeyMapping=Y.KeyMapping=function(b,a,c){if(b.length<1){return;
}this.enable=true;this.command=new Y.Command(b);if(typeof c==="object"&&c!==null){this.func=this.bind(a,c);}else{this.func=a;}this.keyEvent=this.bind(this.dispatch,this);$(window.document).bind("keydown",this.keyEvent);};KeyMapping.prototype.bind=function(a,b){return function(){a.apply(b,arguments);};};KeyMapping.prototype.dispatch=function(d){if(!this.enable){return;}var c=(document.activeElement||window.getSelection().focusNode)||window;
var a=c.tagName.toLowerCase()||null;switch(a){case"input":case"select":case"textarea":case"fileupload":case"frame":return;}var b=d.keyCode;if(this.command.isComplete(b)){this.func();}};KeyMapping.prototype.setEnable=function(a){this.enable=a;};KeyMapping.prototype.getEnable=function(){return this.enable;};KeyMapping.prototype.release=function(){if(this.keyEvent){$(window.document).unbind("keydown",this.keyEvent);
this.keyEvent=null;}};var Control=Y.Control=function(){};Control.prototype.load=function(b,a){this.map=b;this.node=this.initialize(b);if(!this.node){return;}this.node=$(this.node);var a=a||this.getDefaultPosition();if(a&&a.anchor){this.setPosition(a);this.node.stopMousePropagation();this.map.mainContainer.append(this.node);}else{if(a){this.position=$(a);this.position.append(this.node);}}if(!this.printable()){this.node.addClass("yolp-noprint");
}};Control.prototype.remove=function(){if(this.node){this.node.remove();this.node=null;}};Control.prototype.getDefaultPosition=function(){return new Y.ControlPosition(Y.ControlPosition.TOP_RIGHT,new Size(10,10));};Control.prototype.setPosition=function(a){if(!this.node){return;}if(a){this.position=a;}var b={position:"absolute"};var c=this.position.offset;var a=this.position.anchor;if(a===ControlPosition.TOP_RIGHT){b.right=c.width+"px";
b.top=c.height+"px";}else{if(a===ControlPosition.TOP_LEFT){b.left=c.width+"px";b.top=c.height+"px";}else{if(a===ControlPosition.BOTTOM_RIGHT){b.right=c.width+"px";b.bottom=c.height+"px";}else{if(a===ControlPosition.BOTTOM_LEFT){b.left=c.width+"px";b.bottom=c.height+"px";}else{if(a===ControlPosition.TOP_CENTER){b.left=b.right="0px";b.top=c.height+"px";b.margin="0 auto";}else{if(a===ControlPosition.BOTTOM_CENTER){b.left=b.right="0px";
b.bottom=c.height+"px";b.margin="0 auto";}}}}}}this.node.css(b);};Control.prototype.initialize=function(a){};Control.prototype.show=function(){this.node.show();};Control.prototype.hide=function(){this.node.hide();};Control.prototype.isVisible=function(){return(this.node&&this.node.css("display")!=="none");};Control.prototype.printable=function(){return true;};var ControlPosition=Y.ControlPosition=function(a,b){this.anchor=a||ControlPosition.TOP_RIGHT;
this.offset=b||new Size(10,10);};ControlPosition.TOP_RIGHT="TOP_RIGHT";ControlPosition.TOP_LEFT="TOP_LEFT";ControlPosition.BOTTOM_RIGHT="BOTTOM_RIGHT";ControlPosition.BOTTOM_LEFT="BOTTOM_LEFT";ControlPosition.TOP_CENTER="TOP_CENTER";ControlPosition.BOTTOM_CENTER="BOTTOM_CENTER";var Listing=Y.Listing=function(a,b){this.options=b||{};if(typeof(a)=="string"){this.container=$("#"+a);}else{this.container=$(a);}this.container.empty();this.layers=[];};Listing.prototype.addLayer=function(a){a.initializeByListing(this);this.layers.push(a);};Listing.prototype.removeLayer=function(b){var d=[];for(var a=0,c=this.layers.length;a<c;a++){if(this.layers[a]!=b){d.push(this.layers[a]);}}this.layers=d;
};Listing.prototype.getContainer=function(){return this.container[0];};Listing.prototype.hide=function(){this.container.hide();};Listing.prototype.show=function(){this.container.show();};Listing.prototype.empty=function(){this.container.empty();};var Util=Y.Util={error:function(a,b){if(a){a(b);}else{throw b;}},stripScript:function(a){if(!a){return a;}if(typeof(a)!="string"){return a;}var b="<script[^>]*>([\\S\\s]*?)<\/script>";return a.replace(new RegExp(b,"img"),"");},parseCoordinates:function(h,a,b){a=a||" ";var e=[];if(b){var f=0;var j=1;}else{var j=0;var f=1;}var k="";if(typeof h==="string"){if(a==","){k=h.split(a);for(var d=0,c=k.length;
d<c;d++){var g=new Y.LatLng(k[d],k[d+1]);e.push(g);d++;}}else{k=h.split(a);$.each(k,function(l,n){var i=n.split(",");if(i.length>1){var m=new Y.LatLng(i[f],i[j]);e.push(m);}});}}else{if($.isArray(h)){for(var d in h){if(h[d].lat){var g=new Y.LatLng(h[d].lat,h[d].lon);}else{var g=new Y.LatLng(h[d].Lat,h[d].Lon);}e.push(g);}}else{if(h.lat){var g=new Y.LatLng(h.lat,h.lon);e.push(g);}else{if(h.Lat){var g=new Y.LatLng(h.Lat,h.Lon);
e.push(g);}}}}return e;},encodeCoordinates:function(b,c,a){if(a){var h=0;var e=1;}else{var e=0;var h=1;}c=c||" ";var g=[];for(var d in b){if(b[d].isLatLng){var f=[];f[h]=b[d].lat();f[e]=b[d].lng();f.join(",");}g.push(f);}return g.join(c);},roundDigit:function(b,a){return Math.round((b+1/Math.pow(10,a+1))*Math.pow(10,a))/Math.pow(10,a);},isJapan:function(d,b){var c=[{max:{lat:21.2,lon:136.7},min:{lat:20.2,lon:135.5}},{max:{lat:29.5,lon:154.5},min:{lat:21.2,lon:122.5}},{max:{lat:33.7,lon:130},min:{lat:29.5,lon:127.3}},{max:{lat:37.2,lon:138},min:{lat:29.5,lon:130}},{max:{lat:45.75,lon:149.2},min:{lat:29.5,lon:138}},{max:{lat:34.8,lon:130},min:{lat:33.7,lon:129}},{max:{lat:39.3,lon:138},min:{lat:37.2,lon:131.35}}];
var a=false;$.each(c,function(e,f){if(!a&&f.min.lat<d&&d<f.max.lat&&f.min.lon<b&&b<f.max.lon){a=true;}});return a;},level2Scale:function(a){return Math.round(399999600000/(1<<7+a));},scale2Level:function(a){return Math.round(Math.log(399999600000/a)/Math.log(2))-7;},isExpandedArgs:function(a){return(a.length===1&&typeof a[0]==="object");},yyyymmddhhmm2date:function(a){if(typeof a==="string"&&!isNaN(a)&&a.length>=12){var b=new Date(a.slice(0,4),a.slice(4,6)-1,a.slice(6,8),a.slice(8,10),a.slice(10,12));
return b;}return null;}};Y.Util.Platform=(function(p){var u=$.browser;var o=!(u.msie&&u.version<=6);var h=p.indexOf("iphone")!==-1||p.indexOf("ipod")!==-1||p.indexOf("ipad")!==-1;var s=p.indexOf("iphone")!==-1;var t=p.indexOf("android")!==-1;var i=!(h)&&p.indexOf("mac os")!==-1;var j=p.indexOf("windows")!==-1;var g=!(t)&&!(h)&&!(i)&&!(j);var d=p.indexOf("chrome")!==-1;var f=p.indexOf("edge")!==-1;var m=(p.indexOf("mozilla")!==-1)&&(p.indexOf("firefox")!==-1);
var e="";if(h){e=p.substr(p.indexOf("("),p.indexOf(")")-p.indexOf("(")+1);e=e.substr(e.indexOf("cpu os")+6,6).replace(/_/g,".");}else{if(t){e=p.substr(p.indexOf("android")+8,3)+".0";}}var l=h&&"devicePixelRatio" in window&&window.devicePixelRatio>1;var r=("ontouchstart" in window);var k=("ongesturestart" in window);var q=(h||t)&&r;var n=(h||t)&&k;if(h&&/; CPU.*OS (?:3_2|4_0)/i.test(p)){$.fn.Oldoffset=$.fn.offset;
$.fn.offset=function(){var v=$(this).Oldoffset();v.top-=window.scrollY;v.left-=window.scrollX;return v;};}var b=true;if((t&&e.indexOf("4.2")==0||e.indexOf("4.3")==0)&&!d){b=false;}var c=location.protocol==="https:";var a=(window.devicePixelRatio||1);if(t&&a>1&&a<1.5){a=2;}return{osVersion:e,isIOS:h,isIPhone:s,isAndroid:t,isChrome:d,isEdge:f,isFireFox:m,isMac:i,isWin:j,isRetinaDisplay:l,isSupportAlphaChanel:o,isSupportTouchScroll:q,isSupportPinchZoom:n,isEnableFadeIn:b,isSecure:c,devicePixelRatio:a};
})(navigator.userAgent.toLowerCase());Y.Util.IS_LEGACY_MSIE=!Util.Platform.isSupportAlphaChanel;Y.Util.MSIE_BLANK_IMG="http://i.yimg.jp/images/map/api/blank.gif";Y.Util.IS_TOUCH_SCREEN=Util.Platform.isSupportTouchScroll;Y.Cache={_data:{},set:function(a,b){this._data[a]=b;},get:function(a){return this._data[a];},has:function(a){return this.get(a)!=null;},clear:function(){this._data={};}};Y.Cache.KEY_PLOT_LAYER="label";
$.extend({removeArray:function(b,a){$.grep(b,function(d,c){return(d!=a);});}});$.fn.extend({stopMousePropagation:function(){function a(b){b.stopPropagation();}this.bind("mousedown",a);this.bind("click",a);this.bind("dblclick",a);this.bind("mousewheel",a);return this;}});$.fn.extend({disableImageSelect:function(){if(this.css("MozUserSelect")!=undefined){this.css("MozUserSelect","none");}else{this[0].unselectable="on";
this[0].galleryImg="no";}return this;}});$.fn.extend({loadAlphaImage:function(e){if(!Y.Util.IS_LEGACY_MSIE){return this;}var f=this.attr("src");if(!(/\.(png)$/i).test(f)){return this;}var e=$.extend({blankImg:Y.Util.MSIE_BLANK_IMG},e);var a="DXImageTransform.Microsoft.AlphaImageLoader";var g="progid:"+a+"(src='__SRC__',sizingMethod='image');";var d=e.blankImg;var c=e.size||new Size(this.attr("width"),this.attr("height"));
var b=this.attr("filters");if(b&&b[a]){b[a].enabled=true;b[a].src=d;b[a].sizingMethod="image";}else{this.css("filter",g.replace("__SRC__",f)).attr("src",d);}if(c.width!==0&&c.height!==0){return this.attr({width:c.width,height:c.height});}else{return this;}}});Y.Util._later_timer={};$.extend({later:function(f,d,c){var e=Y.Util._later_timer;c=c||"_global";if(e[c]){clearTimeout(e[c]);}var a=f.arguments||[];
var b=function(){f.apply(this,a);};e[c]=setTimeout(b,d);}});var DraggableObject=Y.DraggableObject=function(b,l){l=l||{};l.container=l.container||$(window.document.body);l.handle=l.handle||b;l.disableMove=l.disableMove||false;var b=$(b);var g=$(l.handle);var a=$(l.container);$(b).css({position:"absolute"});var f=this;var j=false;var h;var c=false;var i=null;var d=function(n){var m;var o;if(Y.Util.IS_TOUCH_SCREEN){m=n.originalEvent.touches[0].pageX;o=n.originalEvent.touches[0].pageY;
}else{m=n.pageX;o=n.pageY;}i=b.position();n.stopPropagation();if(!Y.Util.IS_TOUCH_SCREEN){n.preventDefault();}j=true;c=false;h=new Point(m,o);DraggableObject.dragging=true;if(Y.Util.IS_TOUCH_SCREEN){a.bind("touchmove",k);a.bind("touchend",e);}else{a.bind("mousemove",k);a.bind("mouseup",e);}Event.trigger(f,"dragstart",h);};var k=function(q){if(!j){return;}var n;var m;if(Y.Util.IS_TOUCH_SCREEN){n=q.originalEvent.touches[0].pageX-h.x;
m=q.originalEvent.touches[0].pageY-h.y;}else{n=q.pageX-h.x;m=q.pageY-h.y;}if(!l.disableMove){var p=i.left+n;var o=i.top+m;b.css({left:p+"px",top:o+"px",bottom:"",right:""});i.left=p;i.top=o;}c=true;if(Y.Util.IS_TOUCH_SCREEN){h=new Point(q.originalEvent.touches[0].pageX,q.originalEvent.touches[0].pageY);}else{h=new Point(q.pageX,q.pageY);}q.preventDefault();q.stopPropagation();Event.trigger(f,"drag",h);
};var e=function(n){if(!j){return;}j=false;DraggableObject.dragging=false;if(c){var m=parseFloat(b.css("left"));var o=parseFloat(b.css("top"));Event.trigger(f,"dragend",new Point(m,o));}if(Y.Util.IS_TOUCH_SCREEN){a.unbind("touchmove",k);a.unbind("touchend",e);}else{a.unbind("mousemove",k);a.unbind("mouseup",e);}};if(Y.Util.IS_TOUCH_SCREEN){g.bind("touchstart",d);}else{g.bind("mousedown",d);}this.clearDrag=function(){if(Y.Util.IS_TOUCH_SCREEN){g.unbind("touchstart",d);
}else{g.unbind("mousedown",d);}};};var _stacks=[];var Request=Y.Request=function(){};Request.prototype.request=function(b){var a=this;if($.browser.msie&&$.browser.version=="6.0"){$.ajax(b);}else{if(this.is_cache(b)){b.success(this.load(b));}else{if(!this.is_wait(b)){$.ajax({url:b.url,data:b.data,dataType:b.dataType,success:function(c){a.save(b,c);a.free(b);b.success(c);},error:b.error});}}}};Request.prototype.request_force=function(c,b){var a=this;
if($.browser.msie&&$.browser.version=="6.0"){$.ajax(c);}else{if(!b&&this.is_cache(c)){c.success(this.load(c));}else{if(b||!this.is_wait(c)){$.ajax({url:c.url,data:c.data,dataType:c.dataType,timeout:3000,success:function(d){a.save(c,d);a.free(c);c.success(d);},error:c.error});}}}};Request.prototype.is_wait=function(b){var a=Y.Cache.get(this.hash(b));if(a==""){_stacks.push(b.success);return true;}else{Y.Cache.set(this.hash(b),"");
return false;}};Request.prototype.free=function(b){for(var a=0;a<_stacks.length;a++){_stacks[a](this.load(b));}_stacks=[];};Request.prototype.save=function(b,a){Y.Cache.set(this.hash(b),a);};Request.prototype.is_cache=function(b){var a=Y.Cache.get(this.hash(b));if(a!==undefined&&a!==""){return true;}return false;};Request.prototype.load=function(a){return Y.Cache.get(this.hash(a));};Request.prototype.hash=function(b){var a=b.url;
for(param in b.data){a+=b.data[param];}return a;};var InfoWindow=Y.InfoWindow=function(b,a,d,c){function e(h){if(typeof h==="string"){var g=$('<div class="dummy" style="position:absolute;">'+h+"</div>"),f=Y.Util.Platform;if(f.isSupportTouchScroll){g.css("-webkit-overflow-scrolling","touch");}return g;}else{return $(h);}}this.options=c||{};this.options.image=this.options.image||InfoWindow.IMAGE_DEFAULT_GRAY;this.margin=this.options.margin||{left:10,top:50,right:10,bottom:20};
this.padding=this.options.padding||{left:14,top:20,right:14,bottom:87};this.maxPadding=this.options.maxPadding||{left:14,top:20,right:14,bottom:36};this.maxContent=this.options.maxContent||null;if(this.maxContent){this.maxContent=e(this.maxContent);}this._maximize=this.options.maximize||false;this.container=$(b);this.content=e(d);this.open(a);};InfoWindow.IMAGE_DEFAULT_GRAY="http://i.yimg.jp/images/map/api/yolp/images/yolp_f_bg.png";
InfoWindow.prototype.hide=function(){this.node.hide();this._hidden=true;};InfoWindow.prototype.show=function(){this.node.show();this._hidden=false;};InfoWindow.prototype.isHidden=function(){return this._hidden;};InfoWindow.prototype.close=function(){this.hide();this.node.remove();this.content.remove();if(this.maxContent){this.maxContent.remove();}Y.Event.trigger(this,"close");};InfoWindow.prototype.getMinSize=function(){return new Y.Size(230,100);
};InfoWindow.prototype.getMaxSize=function(){var d=690;var b=690;var a=this.container.width()-this.margin.left-this.margin.right-5;var c=this.container.height()-this.margin.top-this.margin.bottom-5;if(d>a){d=a;}if(b>c){b=c;}return new Y.Size(d,b);};InfoWindow.prototype.setPosition=function(a){this.position=a;if(this._maximize){this.createMaxWindow();}else{this.createWindow();}};InfoWindow.prototype.getWindowPosition=function(){var a=parseInt(this.node.css("left"));
var b=parseInt(this.node.css("top"));return new Y.Point(a,b);};InfoWindow.prototype.getWindowSize=function(){var a=parseInt(this.node.width());var b=parseInt(this.node.height()+this.anchor.height());return new Y.Size(a,b);};InfoWindow.prototype.isMaximize=function(){return this._maximize;};InfoWindow.prototype.open=function(a){this._hidden=false;if(a){this.position=a;}if(this._maximize){this.createMaxWindow();
}else{this.createWindow();}if(this._maximize){var f=this.maxContent.find("img");}else{var f=this.content.find("img");}var b=0;var d=0;var e=this;if(f.length>0){$.each(f,function(){if(!this.complete){b++;$(this).bind("load",function(){$(this).show();d++;if(d>=b){if(e._maximize){e.createMaxWindow();}else{e.createWindow();}Y.Event.trigger(e,"load");}});}if(b<=0){c();}});}else{c();}function c(){setTimeout(function(){Y.Event.trigger(e,"load");
},100);}};InfoWindow.prototype.maximize=function(){this._maximize=true;this.open();Y.Event.trigger(this,"maximizeend");};InfoWindow.prototype.restore=function(){this._maximize=false;this.open();Y.Event.trigger(this,"restoreend");};InfoWindow.prototype.evacuateContent=function(){this.content.addClass("infowindow-content");this.content.hide();this.container.append(this.content);if(this.maxContent){this.maxContent.addClass("infowindow-content");
this.maxContent.addClass("infowindow-content-max");this.maxContent.hide();this.container.append(this.maxContent);}};InfoWindow.prototype.createWindow=function(){this.evacuateContent();this.content.css("position","absolute");this.content.css("width","");this.content.css("height","");var h=this.getMaxSize();var f=this.getMinSize();var c=this.content.width()+this.padding.left+this.padding.right;if(c>h.width){c=h.width;
}if(c<f.width){c=f.width;}var b=c-this.padding.left-this.padding.right;this.content.css("width",b+"px");var e=this.content.height()+this.padding.top+this.padding.bottom;if(e<f.height){e=f.height;}if(e>h.height){e=h.height;this.content.css("overflow","auto");}var d=e-this.padding.top-this.padding.bottom;this.content.css("height",d+"px");this.content.css("position","");var a=this.position.x-c/2;var g=this.position.y-e;
this.createWindowHtml(this.content,a,g,c,e,(this.maxContent!=null),false);};InfoWindow.prototype.createMaxWindow=function(){var h=this.getMaxSize();var f=this.getMinSize();var c=h.width;var e=h.height;var b=c-this.maxPadding.left-this.maxPadding.right;var d=e-this.maxPadding.top-this.maxPadding.bottom;this.maxContent.css("position","absolute");this.maxContent.css("position","relative");this.maxContent.css("overflow","auto");
this.maxContent.css("width",b+"px");this.maxContent.css("height",d+"px");var a=this.position.x-c/2-12;var g=this.position.y-e;this.createWindowHtml(this.maxContent,a,g,c,e,false,true);};InfoWindow.prototype.createWindowHtml=function(f,j,i,d,l,a,g){var e=this;if(this.node){this.evacuateContent();this.node.empty();this.node.css({left:j+"px",top:i+"px"});}else{this.node=$('<div class="yolp-infowindow" style="z-index:9999;position:absolute;left:'+j+"px; top:"+i+'px;"></div>');
}if(Y.Util.Platform.isAndroid){this.node.css({"-webkit-transform":"translateZ(0px)","-moz-transform":"translateZ(0px)","-o-transform":"translateZ(0px)",transform:"translateZ(0px)"});}var b=this.node;var k=$('<table border="0" cellspacing="0" cellpadding="0" style="width:'+d+'px;position: relative; z-index:9999;cursor:default;"></table>');b.append(k);var h=$("<tr></tr>").disableImageSelect();k.append(h);
var c=$('<td style="background:url('+this.options.image+') 0 0 no-repeat; height:20px; width:14px;"></td>');h.append(c);if(g){this.anchor=$('<div style="height:20px; width:23px; position: absolute; left: 50%; bottom: -15px; overflow: hidden;"></div>').append($('<img src="'+this.options.image+'" width="690" height="763" style="position: absolute; left: -96px; top: -694px;" />').loadAlphaImage());}else{this.anchor=$('<div style="height:70px; width:94px; position: absolute; left: 50%; bottom: -65px; overflow: hidden;"></div>').append($('<img src="'+this.options.image+'" width="690" height="763" style="position: absolute; left: 0; bottom: 0;" />').loadAlphaImage());
}c.append(this.anchor.disableImageSelect());if(a){c.append($('<a href="javascript:void(0)" title="\u8a73\u7d30\u3092\u898b\u308b" style="background:url('+Y.CTRL_IMAGE_URL+') 0 0 no-repeat; height:16px; width:16px; position: absolute; right: 27px; top: 5px;"><span style="display:none;">\u8a73\u7d30\u3092\u898b\u308b</span></a>').bind("click",function(m){e.maximize();m.stopPropagation();}));}if(g){c.append($('<a href="javascript:void(0)" title="\u5143\u306e\u30b5\u30a4\u30ba\u306b\u623b\u3059" style="background:url('+Y.CTRL_IMAGE_URL+') -30px -30px no-repeat; height:16px; width:16px; position: absolute; right: 27px; top: 5px;"><span style="display:none;">\u5143\u306e\u30b5\u30a4\u30ba\u306b\u623b\u3059</span></a>').bind("click",function(m){e.restore();
m.stopPropagation();}));}c.append($('<a href="javascript:void(0)" title="\u9589\u3058\u308b" style="background:url('+Y.CTRL_IMAGE_URL+') -16px 0 no-repeat; height:16px; width:16px; position: absolute; right: 8px; top: 5px;"><span style="display:none;">\u9589\u3058\u308b</span></a>').bind("click",function(m){e.close();m.stopPropagation();}));h.append($('<td style="background:url('+this.options.image+') -14px 0 no-repeat; height:22px;"></td>'));
h.append($('<td style="background:url('+this.options.image+') right 0 no-repeat; height:22px; width:14px;"></td>'));k.append(h);k.append($('<tr style=""></tr>').append($('<td style="background:url('+this.options.image+') 0 -14px no-repeat; width:14px;"></td>')).append($('<td valign="top" style="background:url('+this.options.image+') -14px -14px no-repeat;">').append(f)).append($('<td style="background:url('+this.options.image+') right -14px no-repeat; width:14px;"></td>').disableImageSelect()));
k.append($('<tr><td style="background:url('+this.options.image+') left -673px no-repeat; height:20px; width:14px;"></td><td style="background:url('+this.options.image+') 50% -673px no-repeat; height:20px;"></td><td style="background:url('+this.options.image+') right -673px no-repeat; height:20px; width:14px;"></td></tr>').disableImageSelect());f.show();this.container.append(b);if(Y.Util.IS_TOUCH_SCREEN){b[0].addEventListener("touchstart",function(m){m.stopPropagation();
},false);f[0].addEventListener("touchstart",function(m){m.stopPropagation();},false);}else{b.stopMousePropagation();f.stopMousePropagation();}};var Projection=Y.Projection=function(){};Projection.prototype.fromLatLngToPixel=function(b,a){};Projection.prototype.fromPixelToLatLng=function(a,b){};Projection.prototype.getWrapWidth=function(a){return Infinity;};var MercatorProjection=Y.MercatorProjection=Y.extend(Y.Projection,function(b,a){a=a||{};this.tileSize=b||Y.DEFAULT_TILE_SIZE;this.earthRadius=a.earthRadius||6378137;this.initialResolution=2*Math.PI*this.earthRadius/this.tileSize;this.originShift=2*Math.PI*this.earthRadius/2;this.scrollRange={};this.scrollRange.enable=true;this.scrollRange.top=-84.99999;this.scrollRange.bottom=85;});MercatorProjection.prototype.fromTileToLatLng=function(c,b,a,f,d){var e=this.fromTileToPixel(c,b,a,f,d);
return this.fromPixelToLatLng(e,d);};MercatorProjection.prototype.fromLatLngToPixel=function(c,b){var a=this.fromLatLngToMeters(c);return this.fromMetersToPixel(a,b);};MercatorProjection.prototype.fromLatLngToTile=function(c,a){var b=this.fromLatLngToPixel(c,a);return this.fromPixelToTile(b,a);};MercatorProjection.prototype.fromPixelToLatLng=function(b,c,d){var a=this.fromPixelToMeters(b,c);return this.fromMetersToLatLng(a,d);
};MercatorProjection.prototype.resolution=function(a){return this.initialResolution/Math.pow(2,a-1);};MercatorProjection.prototype.tileLength=function(a){return Math.pow(2,a-1);};MercatorProjection.prototype.fromLatLngToMeters=function(c){var b=c.lng()*this.originShift/180;var a=Math.log(Math.tan((90+c.lat())*Math.PI/360))/(Math.PI/180);a=a*this.originShift/180;return new Y.Point(b,a);};MercatorProjection.prototype.fromMetersToLatLng=function(a,d){var c=(a.x/this.originShift)*180;
var b=(a.y/this.originShift)*180;b=180/Math.PI*(2*Math.atan(Math.exp(b*Math.PI/180))-Math.PI/2);return new Y.LatLng(b,c,d);};MercatorProjection.prototype.fromPixelToMeters=function(d,b){var a=this.resolution(b);d.y=d.y+this.tileLength(b)/2*this.tileSize;var e=d.x*a-this.originShift;var c=d.y*a-this.originShift;return new Y.Point(e,c);};MercatorProjection.prototype.fromMetersToPixel=function(a,e){var d=this.resolution(e);
var c=(a.x+this.originShift)/d;var b=(a.y+this.originShift)/d;b=b-this.tileLength(e)/2*this.tileSize;return new Y.Point(c,b);};MercatorProjection.prototype.fromPixelToTile=function(e,d){var g=Math.abs(e.y);var c=Math.floor(e.x/this.tileSize);var b=Math.floor(g/this.tileSize);var a=e.x%this.tileSize;var f=g%this.tileSize;if(e.y<0){b=-b;var f=g%this.tileSize;if(f&&f>0){b--;f=this.tileSize-f;}}return{tx:c,ty:b,x:a,y:f};
};MercatorProjection.prototype.fromTileToPixel=function(c,b,a,g,f){var e=c*this.tileSize+a;var d=b*this.tileSize+g;return new Y.Point(e,d);};MercatorProjection.prototype.getWrapWidth=function(a){return(1<<(a-1))*this.tileSize;};MercatorProjection.prototype.setTilePixel=function(a){this.tileSize=a;this.initialResolution=2*Math.PI*this.earthRadius/this.tileSize;};MercatorProjection.prototype.getTilePixel=function(){return this.tileSize;
};var TokyoMercatorProjection=Y.TokyoMercatorProjection=Y.extend(Y.MercatorProjection,function(b,a){Y.MercatorProjection.apply(this,[b,a]);});TokyoMercatorProjection.prototype.WgsToTokyo=function(a){return this.BesslWgs(1,a);};TokyoMercatorProjection.prototype.TokyoToWgs=function(a){return this.BesslWgs(0,a);};TokyoMercatorProjection.prototype.BesslWgs=function(h,q){function a(f){return f*180/Math.PI;
}function B(f){return f*Math.PI/180;}var t=1e-15;var n=Math.PI;var e=new Array(2);e[0]=6377397.155;e[1]=6378137;var O=new Array(2);O[0]=1/299.152813;O[1]=1/298.257223563;var r=new Array(2);r[0]=O[0]*(2-O[0]);r[1]=O[1]*(2-O[1]);var d=new Array(2);var c=new Array(2);var b=new Array(2);d[0]=-146.43;c[0]=507.89;b[0]=681.46;d[1]=146.43;c[1]=-507.89;b[1]=-681.46;var u=h;var H=1-h;var I=B(q.lat());var N=B(q.lng());
var k=0;var o=e[u]/Math.sqrt(1-r[u]*Math.sin(I)*Math.sin(I));var K=(o+k)*Math.cos(I)*Math.cos(N);var j=(o+k)*Math.cos(I)*Math.sin(N);var A=(o*(1-r[u])+k)*Math.sin(I);var G=K+d[u];var F=j+c[u];var E=A+b[u];var J=Math.sqrt(G*G+F*F);var D=E/J;var m=Math.sqrt((1-r[H])*D*D+1);var v=m*m*m;var w=D-E/J-e[H]*r[H]*D/J/m;var l=1-e[H]*r[H]/J/v;var C=D-w/l;var M;for(var L=0;(w>t||-t>w)&&L<10;L++){D=C;m=Math.sqrt((1-r[H])*D*D+1);
v=m*m*m;M=e[H]*r[H]/J;w=D-E/J-M*D/m;l=1-M/v;C=D-w/l;}var P=Math.atan2(C,1);var g=Math.atan2(F,G);var s=e[H]/Math.sqrt(1-r[H]*Math.sin(P)*Math.sin(P));return new Y.LatLng(a(P),a(g));};TokyoMercatorProjection.prototype.fromLatLngToMeters=function(b){var a=this.TokyoToWgs(b);return MercatorProjection.prototype.fromLatLngToMeters.apply(this,[a]);};TokyoMercatorProjection.prototype.fromMetersToLatLng=function(a,c){var b=MercatorProjection.prototype.fromMetersToLatLng.apply(this,[a,c]);
return this.WgsToTokyo(b);};var Event=Y.Event=function(){};Event.addListener=function(d,a,f,e){var c=$(d);var b=function(){if(!e){e=d;}var g=[];for(var j=1,h=arguments.length;j<h;j++){g.push(arguments[j]);}f.apply(e,g);};c.bind(a,b);return new Y.EventListener(c,a,b);};Event.trigger=function(f,d){var e=$(f);var a=[];for(var c=2,b=arguments.length;c<b;c++){a.push(arguments[c]);}e.triggerHandler(d,a);};Event.removeListener=function(b){var a=$(b.source);
a.unbind(b.type,b.method);};Event.callback=function(a,b){return function(){b.apply(a);};};var EventListener=Y.EventListener=function(b,a,c){this.source=b;this.type=a;this.method=c;};var Icon=Y.Icon=function(b,a){this.options=a||{};this.image=b||Y.Icon.DEFAULT_ICONURL;this.iconSize=(b)?null:new Size(19,26);this.iconSize=this.options.iconSize||this.iconSize;this.iconAnchor=(b)?null:new Point(this.iconSize.width/2,this.iconSize.height);this.iconAnchor=this.options.iconAnchor||this.iconAnchor;this.infoWindowAnchor=(b)?null:new Point(this.iconSize.width/2,0,0);this.infoWindowAnchor=this.options.infoWindowAnchor||this.infoWindowAnchor;
this.labelAnchor=(b)?null:new Point(this.iconSize.width/2,-this.iconSize.height/3*2);this.labelAnchor=this.options.labelAnchor||this.labelAnchor;this.className=this.options.className||"";this.iconHtml=this.options.iconHtml||"";};Icon.prototype.createNode=function(a){this.appendStyles="";if(typeof a!=="undefined"){if(typeof a.appendStyles==="object"){this.appendStyles=a.appendStyles;}}if(this.iconHtml&&this.iconHtml!=""){var b=$(this.iconHtml);
}else{var b=$('<img src="'+this.image+'" class="'+this.className+'" />');}if(!this.iconSize){this.iconSize=Y.Cache.get("iconsize:"+this.image);if(!this.iconSize){b.hide();var c=this;b.bind("load",function(){c.iconSize=new Size(b.width(),b.height());Y.Cache.set("iconsize:"+c.image,c.iconSize);c.setIconStyle(b);b.show();});return b;}}this.setIconStyle(b);return b;};Icon.prototype.setIconStyle=function(b){if(!this.iconAnchor){this.iconAnchor=new Point(this.iconSize.width/2,this.iconSize.height);
}if(!this.infoWindowAnchor){this.infoWindowAnchor=new Point(this.iconSize.width/2,0);}if(!this.labelAnchor){this.labelAnchor=new Point(this.iconSize.width/2,-this.iconSize.height/3*2);}b.attr("width",this.iconSize.width);b.attr("height",this.iconSize.height);b.loadAlphaImage({size:this.iconSize}).css({marginLeft:-this.iconAnchor.x,marginTop:-this.iconAnchor.y});b.disableImageSelect();var a=Y.Util.Platform.isRetinaDisplay;
if(a){b.css("-webkit-transform","translate3d(0px, 0px, 0px)");}$.each(this.appendStyles,function(d,c){b.css(d,c);});};Y.Icon.DEFAULT_ICONURL="http://i.yimg.jp/images/map/icon/pin_crimson_s/shape/icon_0.png";Y.Icon.DEFAULT_ICON=new Y.Icon(Y.Icon.DEFAUTL_ICONURL);Y.Icon.HOME_ICONURL="http://i.yimg.jp/images/map/icon/pin_home_m/shape/home.png";var Style=Y.Style=function(b,d,c,a,e){this.color=b;this.weight=(typeof d==="undefined")?1:d;this.opacity=(typeof c==="undefined")?1:c;this.startline=a||"";this.endline=e||"";};var YDF=Y.YDF=function(d){this.result={};this.features=[];if(d.ResultInfo){this.result.count=parseInt(d.ResultInfo.Count,10);this.result.total=parseInt(d.ResultInfo.Total,10);this.result.start=parseInt(d.ResultInfo.Start,10);this.result.end=parseInt(this.result.start,10)+parseInt(this.result.count,10)-1;this.result.description=Y.Util.stripScript(d.ResultInfo.Description);this.result.status=parseInt(d.ResultInfo.Status,10);
this.result.copyright=Y.Util.stripScript(d.ResultInfo.Copyright,10);this.result.letency=parseFloat(d.ResultInfo.Latency,10);}else{if(d.Result){this.result.count=parseInt(d.Result.Count,10);this.result.total=parseInt(d.Result.Total,10);this.result.start=parseInt(d.Result.Start,10);this.result.end=parseInt(this.result.start,10)+parseInt(this.result.count,10)-1;this.result.description=Y.Util.stripScript(d.Result.Description,10);
}else{if(d.Error){this.result.count=this.result.total=this.result.start=this.result.end=0;this.error={};this.error.message=d.Error.Message;if(d.Error.Detail){this.error.code=d.Error.Detail.Code;}}}}if(d.Dictionary){this.result.dictionary=d.Dictionary;}this.styles=[];this.result.bounds=new Y.LatLngBounds();var c=d.Style;if(!c&&d.Dictionary&&d.Dictionary.Style){c=d.Dictionary.Style;}if(c){for(var a in c){if(c.hasOwnProperty(a)){var b=c[a];
this.styles[b.Id]=b;}}}var e=this;if(d.Feature){$.each(d.Feature,function(f,h){var g=e.parseFeature(h);if(g){e.features.push(g);e.result.bounds.extend(g.getLatLng());}});}else{if(d.ResultInfo&&d.Result){$.each(d.Feature,function(f,h){var g=e.parseFeature(h);if(g){e.features.push(g);e.result.bounds.extend(g.getLatLng());}});}else{if(d.Item){$.each(d.Item,function(f,h){var g=e.parseFeature(h);if(g){e.features.push(g);
e.result.bounds.extend(g.getLatLng());}});}}}};YDF.prototype.parseFeature=function(e){var c=null;var d=e.Geometry;if(!d){d={};d.Type="point";if(e.Property&&e.Property.Lon&&e.Property.Lat){d.Coordinates=e.Property.Lon+","+e.Property.Lat;}}else{if($.isArray(d)){d=d[0];}}var k={id:e.Id,gid:e.Gid,name:Y.Util.stripScript(e.Name),category:e.Category,description:Y.Util.stripScript(e.Description),property:e.Property,route:e.RouteInfo};
var g=e.Style;if(g){if(!$.isArray(g)){g=[g];}for(var b in g){if(g.hasOwnProperty(b)){var a=g[b];if(!a){continue;}if(a.Target){a=this.styles[a.Target];}if(!a||!a.Type){continue;}switch(a.Type){case"icon":k.icon=new Y.Icon(a.Image);if(a.Size){var j=a.Size.split(",");k.icon.iconSize=new Y.Size(j[0],j[1]);}if(a.Anchor){var h=a.Anchor.split(",");k.icon.iconAnchor=new Y.Point(h[0],h[1]);}break;case"fill":k.fillStyle=new Y.Style(a.Color,a.Size,a.Opacity/100);
break;case"line":k.strokeStyle=new Y.Style(a.Color,a.Size,a.Opacity/100,a.StartLine,a.EndLine);break;}}}}return this.parseGeometry(d,k);};YDF.prototype.parseGeometry=function(g,b){var i=this;var a=g.Radius?this.parseRadius(g.Radius):null;var e=g.Coordinates?Y.Util.parseCoordinates(g.Coordinates):null;if(g.Exterior){e=g.Exterior.Coordinates?Y.Util.parseCoordinates(g.Exterior.Coordinates):null;}var d=null;
if((!e||e.length<0|!e[0])&&g.Type!="multigeometry"){d=new Y.NonGeometry(b);}else{switch(g.Type){case"point":d=new Y.Marker(e[0],b);break;case"polyline":case"linestring":d=new Y.Polyline(e,b);break;case"polygon":if(g.Interior){var h=[];$.each(g.Interior.Coordinates,function(f,k){var j=k?Y.Util.parseCoordinates(k):null;h.push(new Y.Polygon(j));});d=new Y.Patch(h,new Y.Polygon(e),b);}else{d=new Y.Polygon(e,b);
}break;case"circle":b.unit="km";d=new Y.Circle(e[0],a,b);break;case"ellipse":b.unit="km";d=new Y.Circle(e[0],a,b);break;case"multigeometry":if(g.Geometry){var c=[];$.each(g.Geometry,function(f,j){c.push(i.parseGeometry(j,b));});d=new Y.Multi(c,b);}break;default:d=new Y.Marker(e[0],b);break;}}return d;};YDF.prototype.parseRadius=function(a){var b=a.split(",");if(b.length>=2){return new Y.Size(b[0]/1000,b[1]/1000);
}else{return parseInt(a,10)/1000;}};var Log=Y.Log={};Log.id="ymapdebug";Log.initialized=false;Log.initialize=function(i,f){if(this.initialized){return;}var i=new Size(400,200);var h=$(window.document).width()-i.width-30;var g=$(window.document).height()-i.height-20-30;var b='<div id="'+this.id+'"></div>';this.node=$(b);var a={display:"none",position:"absolute",background:"#EEEEEE",left:h+"px",top:g+"px",width:i.width+"px",height:(i.height+20)+"px",zIndex:999,borderStyle:"solid"};
var e={width:i.width+"px",height:i.height+"px",background:"#ffffff",overflow:"auto"};this.node.css(a);var d=$('<div style="height:20px;background-color:#ccc">Log</div>');var c=this;d.append($(' <span style="  margin-left:10px; text-decoration:underline; cursor:pointer; ">clear</span>').bind("click",function(){c.clear();}));d.append($(' <span style=" margin-left:10px; text-decoration:underline; cursor:pointer; ">close</span>').bind("click",function(){c.hide();
}));this.node.append(d);this.body=$("<div ></div>");this.body.css(e);this.node.append(this.body);$(document.body).append(this.node);this.initialized=true;this.visible=false;this.count=0;this.drag=new DraggableObject(this.node,{handle:d});};Log.print=function(a){this.initialize();if(this.visible){this.body.prepend("<div>"+(++this.count)+":"+a+"</div>");this.body.attr("scrollTop",0);}};Log.clear=function(){this.body.empty();
};Log.hide=function(){this.node.hide();this.visible=false;};Log.show=function(){this.initialize();this.node.show();this.visible=true;};Log.write=function(a){this.print(a);};Log.props=function props(l,q){if(l===null){this.print("props called with null argument","error");return;}if(l===undefined){this.print("props called with undefined argument","error");return;}var n=["Methods","Fields","Unreachables"];
var f=[[],[],[]];var d,h,k;var b=0;for(d=l;d;d=d.__proto__){for(k=0;k<n.length;++k){f[k][b]=[];}++b;}for(var o in l){var g=-1;try{for(d=l;d&&(o in d);d=d.__proto__){++g;}}catch(r){g=0;}var m=1;try{if((typeof l[o])=="function"){m=0;}}catch(r){m=2;}f[m][g].push(o);}function c(a,e){return e?a+c(a,e-1):"";}for(h=0;h<b;++h){for(k=0;k<n.length;++k){if(f[k][h].length){this.write(n[k]+c(" of prototype",h)+":"+(q?"\n\n":"")+f[k][h].sort().join(q?"\n":", ")+(q?"\n\n":""),"propList");
}}}};var Compress=Y.Compress=function(a){this.CompressFormat=a;};Compress.prototype.encode=function(a,b){plus=new Array();w=new Array();w=a.split(" ");latlon=new Array();for(i=0;i<w.length;i++){w2=new Array();w2=w[i].split(",");latlon.push(w2[0]);latlon.push(w2[1]);}for(i=0;i<latlon.length;i++){latlon[i]=parseFloat(latlon[i]);switch(b){case 3:latlon[i]=latlon[i]*1000;break;case 4:latlon[i]=latlon[i]*10000;
break;case 5:latlon[i]=latlon[i]*100000;break;case 6:latlon[i]=latlon[i]*1000000;break;case 7:latlon[i]=latlon[i]*10000000;break;default:latlon[i]=latlon[i]*100000;break;}latlon[i]=Math.floor(latlon[i]);}latlon_cp=new Array();latlon_cp=latlon.slice(0);for(i=0;i<latlon.length;i++){if(i>=2){latlon[i]=latlon_cp[i-2]-latlon_cp[i];}if(latlon[i]<0){latlon[i]=Math.abs(latlon[i]);plus[i]=1;}else{plus[i]=0;
}latlon[i]=latlon[i].toString(2);latlon[i]=latlon[i]+plus[i];}merge=new Array();for(i=0,k=0;i<latlon.length;i+=2,k++){lat_digit=latlon[i].length;lon_digit=latlon[i+1].length;if(lat_digit<lon_digit){diff=lon_digit-lat_digit;for(j=0,str="";diff>j;j++){str+="0";}latlon[i]=str+latlon[i];}else{if(lat_digit!=lon_digit){diff=lat_digit-lon_digit;for(j=0,str="";diff>j;j++){str+="0";}latlon[i+1]=str+latlon[i+1];
}}five_diff=5-latlon[i].length%5;if(five_diff<5){for(j=0,str="";five_diff>j;j++){str+="0";}latlon[i]=str+latlon[i];latlon[i+1]=str+latlon[i+1];}resolution_lat=new Array();resolution_lon=new Array();for(j=0;j<latlon[i].length;j++){resolution_lat.push(latlon[i].substr(j,1));resolution_lon.push(latlon[i+1].substr(j,1));}for(j=0,merge[k]="";j<resolution_lat.length;j++){merge[k]+=resolution_lat[j];merge[k]+=resolution_lon[j];
}}table=new Array();str="-_!~*|ABCDEFGHIJKLMNOPQRSTUVWXYZ";for(i=0;i<str.length;i++){table.push(str.substr(i,1));}result=new Array();for(i=0;i<merge.length;i++){str_array=new Array();for(j=0;j<merge[i].length;j+=5){str_array.push(merge[i].substr(j,5));}cnt=str_array.length;for(j=0;j<cnt;j++){str_array[j]=parseInt(str_array[j],"2");str_array[j]=str_array[j].toString("32");if(j==cnt-1){str_array[j]=table[parseInt(str_array[j],"32")];
}}for(j=0,result[i]="";j<str_array.length;j++){result[i]+=(str_array[j]);}}for(i=0,answer="";i<result.length;i++){answer+=result[i];}return answer;};Compress.prototype.decode=function(c,d){table=new Array();str="-_!~*|ABCDEFGHIJKLMNOPQRSTUVWXYZ";for(i=0;i<str.length;i++){table.push(str.substr(i,1));}resolution_data=new Array();for(i=0;i<c.length;i++){resolution_data.push(c.substr(i,1));}memory=0;array_latlon=new Array();
for(i=0;i<resolution_data.length;i++){poi="";res=str.indexOf(resolution_data[i]);if(res!=-1){for(;memory<=i;memory++){if(memory==i){poi+=res.toString(32);}else{poi+=resolution_data[memory];}}array_latlon.push(poi);}}lat=new Array();lon=new Array();for(i=0;i<array_latlon.length;i++){resolution_poi=new Array();for(j=0;j<array_latlon[i].length;j++){resolution_poi.push(array_latlon[i].substr(j,1));}five_poi=new Array();
for(j=0;j<resolution_poi.length;j++){var a=parseInt(resolution_poi[j],"32");five_poi[j]=a.toString(2);a=5-five_poi[j].length;var b="";for(;a>0;a--){b+="0";}five_poi[j]=b.concat(five_poi[j]);}merge="";for(j=0;j<five_poi.length;j++){merge+=five_poi[j];}while(resolution_poi[0]){resolution_poi.pop();}for(j=0;j<merge.length;j++){resolution_poi[j]=merge.substr(j,1);}for(j=0,lat[i]="",lon[i]="";j<resolution_poi.length;
j++){if(j%2==0){lat[i]+=resolution_poi[j];}else{lon[i]+=resolution_poi[j];}}lat[i]=lat[i].replace("^0+","");lon[i]=lon[i].replace("^0+","");cnt=lat[i].length;minus=lat[i].substr(cnt-1,1);work=lat[i].slice(0,lat[i].length-1);lat[i]=parseInt(work,2);if(minus==1){lat[i]*=-1;}cnt=lon[i].length;minus=lon[i].substr(cnt-1,1);work=lon[i].slice(0,lon[i].length-1);lon[i]=parseInt(work,2);if(minus==1){lon[i]*=-1;
}}for(i=1;i<lat.length;i++){lat[i]=lat[i-1]-lat[i];lon[i]=lon[i-1]-lon[i];}for(i=0;i<lat.length;i++){switch(d){case 3:lat[i]/=1000;lon[i]/=1000;break;case 4:lat[i]/=10000;lon[i]/=10000;break;case 5:lat[i]/=100000;lon[i]/=100000;break;case 6:lat[i]/=1000000;lon[i]/=1000000;break;case 7:lat[i]/=10000000;lon[i]/=10000000;break;default:lat[i]/=1000000;lon[i]/=1000000;break;}array_latlon[i]=lat[i]+","+lon[i];
}result=array_latlon.join(" ");return result;};var CopyrightCollection=Y.CopyrightCollection=function(b,a){this.options=a||{};this.copyrights=[];this.prefix=b||"";};CopyrightCollection.prototype.addCopyright=function(a){this.copyrights.push(a);};CopyrightCollection.prototype.getCopyrights=function(e,d){var f=[];for(var a=0;a<this.copyrights.length;a++){var b=this.copyrights[a];if(this.isCollision(b,e,d)){if(b.text){f.push(b.text);}}}return f;};
CopyrightCollection.prototype.getCopyrightNotice=function(b,a){var d=this.getCopyrights(b,a);if(this.prefix){d.unshift(this.prefix);}return d;};CopyrightCollection.prototype.setPrefix=function(a){this.prefix=a;};CopyrightCollection.prototype.isCollision=function(e,c,f){if(!e.bounds&&!e.minZoom){return true;}var d=e.bounds;if(d.sw.Lon<=c.ne.Lon&&c.sw.Lon<=d.ne.Lon&&d.sw.Lat<=c.ne.Lat&&c.sw.Lat<=d.ne.Lat){if(f>=e.minZoom){return true;
}}return false;};var Copyright=Y.Copyright=function(d,a,c,b){this.id=d;this.minZoom=c;this.bounds=a;this.text=b;};var Feature=Y.Feature=function(){};Feature.prototype.initialize=function(a){this.layer=a;this.drawn=false;};Feature.prototype.draw=function(a){Y.Log.write("not implement");};Feature.prototype.adjust=function(){Y.Log.write("not implement");};Feature.prototype.remove=function(){Y.Log.write("not implement");};Feature.prototype.getLayer=function(){return this.layer;};Feature.prototype.getMap=function(){return this.layer.getMap();
};Feature.prototype.bind=function(a,b,c){return Y.Event.addListener(this,a,b,c);};Feature.prototype.unbind=function(a){Y.Event.removeListener(a);};Feature.prototype.openInfoWindow=function(b,a){var d=this.getLatLng(),c;if(this.getInfoWindowOffset){c=this.getInfoWindowOffset();}else{c=new Y.Point(0,0);}return this.layer.getMap().openInfoWindow(d,b,a,c);};Feature.prototype.bindInfoWindow=function(b,a){var c=this;
this.bind("click",function(){c.openInfoWindow(b,a);});};Feature.prototype.isDrawn=function(){return this.drawn;};Feature.prototype.getLatLng=function(){return null;};Feature.prototype.getLatLngs=function(){return[];};Feature.prototype.isRaster=function(){return false;};Feature.prototype.getContainableBounds=function(d){if(!this.drawn){return null;}d=(typeof d==="undefined")?1:d;var a=this.getLatLngs(),c=a.length;
if(c===0){return null;}else{if(c===1){var b=new Y.LatLngBounds();return b.extend(a[0]);}else{if(c>=2){return new Y.LatLngBounds(this.getLatLngs());}}}};Feature.prototype.getContainableSize=function(a){return{sw:new Y.Size(0,0),ne:new Y.Size(0,0)};};Feature.prototype.addExStyle=function(){if(this.node&&Y.Util.Platform.isAndroid){this.node.css({"-webkit-transform":"translateZ(0px)","-moz-transform":"translateZ(0px)","-o-transform":"translateZ(0px)",transform:"translateZ(0px)"});
}return true;};var NonGeometry=Y.NonGeometry=Y.extend(Y.Feature,function(a){a=a||{};this.icon=a.icon||Y.Icon.DEFAULT_ICON;this.clickable=a.clickable||true;this.draggable=a.draggable||false;this.id=a.id||"";this.name=a.name||"";this.property=a.property||{};this.title=a.title||this.name||"";});var Label=Y.Label=Y.extend(Y.Feature,function(e,c,b){this.latlng=e;this.text=c;b=b||{};this.className=b.className||"yolp-tlchp";this.label;var d=window.navigator.userAgent.toLowerCase();if(d.indexOf("chrome")!=-1||d.indexOf("safari")!=-1){this.label=$("<p>",{"class":this.className,html:c});var a=$("<img>",{src:"http://i.yimg.jp/images/map/api/yolp/images/yolp_icn_02.png",alt:""}).css({position:"absolute",left:"-12px",top:"-139px"}).loadAlphaImage();
this.pointer=$("<p>",{"class":"yolp-tlchpimg"}).css({position:"absolute",left:"-9px",margin:0,padding:0,overflow:"hidden",background:"none"}).append(a);if(this.className=="yolp-tlchp"){this.label.append(this.pointer);}}else{this.label=$("<p>",{"class":this.className,html:c}).append($("<img>",{src:"http://i.yimg.jp/images/clear.gif",alt:"","class":"yolp-tlchpimg"}));}this.clickable=(typeof b.clickable==="undefined")?true:b.clickable;
this.draggable=b.draggable||false;this.centering=(typeof b.centering=="undefined")?false:b.centering;this.offset=b.offset||new Y.Point(0,0);this.id=b.id||"";this.name=b.name||"";this.property=b.property||{};});Label.prototype.remove=function(){if(this.node){this.node.empty();this.node.remove();this.node=null;this.drawn=false;}};Label.prototype.draw=function(e){if(!this.node||e){if(this.node){this.remove();
}var b=this.layer.getContainer();var d=this.layer.fromLatLngToDivPixel(this.latlng);var l=d.x;var k=d.y;var a=this.getMap();var g=a.getProjection();var f=g.getWrapWidth(a.getZoom());if(f!=Infinity){var j=this.layer.fromLatLngToDivPixel(a.getCenter());var o=l-j.x;while(o>f/2){o-=f;}while(o<-f/2){o+=f;}l=o+j.x;}l+=this.offset.x;k+=this.offset.y;this.node=$("<div></div>");this.node.append(this.label);
this.node.css({zIndex:0,position:"absolute",left:l+"px",top:k+"px"});this.addExStyle();b.append(this.node);var m=this.node.width();var i=this.node.height();if($.browser.msie&&$.support.boxModel){m+=10;}if(m>0&&i>0){this.node.css({fontSize:"90%",position:"absolute",margin:"0",padding:"0",width:m+"px",height:i+"px"});}var n=this.label.height();if(this.centering){if(n){k-=n;this.node.css("top",k+"px");
}}this.node.stopMousePropagation();this.drawn=true;this.setDraggable(this.draggable);this.setClickable(this.clickable);}};Label.prototype.setLatLng=function(a){this.latlng=a;this.draw(true);};Label.prototype.setClickable=function(a){Y.Marker.prototype.setClickable.call(this,a);};Label.prototype.isClickable=function(){return this.clickable;};Label.prototype.setDraggable=function(a){this.draggable=a;
if(a){var d=this;var c=this.getMap();var b=this.getLayer();this.drag=new Y.DraggableObject(this.node,{container:c.getContainer()});Y.Event.addListener(this.drag,"dragstart",function(e){c.closeInfoWindow();Y.Event.trigger(d,"dragstart");});Y.Event.addListener(this.drag,"dragend",function(g){var f=g.x;var h=g.y;f-=d.offset.x;h-=d.offset.y;var e=d.label.height();if(d.centering){if(e){h+=e;}}d.latlng=b.fromDivPixelToLatLng(new Y.Point(f,h));
Y.Event.trigger(d,"dragend");});}else{if(this.drag){this.drag.clearDrag();this.drag=null;}}};Label.prototype.isDraggable=function(){return this.draggable;};Label.prototype.focus=function(){if(this.node){this.node.css({zIndex:1});}};Label.prototype.blur=function(){if(this.node){this.node.css({zIndex:0});}};Label.prototype.adjust=function(){var b=this.layer.fromLatLngToDivPixel(this.latlng);var i=b.x,h=b.y;
var a=this.getMap();var f=a.getProjection();var d=f.getWrapWidth(a.getZoom());if(d!=Infinity){var g=this.layer.fromLatLngToDivPixel(a.getCenter());var k=i-g.x;while(k>d/2){k-=d;}while(k<-d/2){k+=d;}i=k+g.x;}var e=parseInt(this.node.css("left"),10);if(e==Math.round(i)){return;}i+=this.offset.x;h+=this.offset.y;if(this.centering){var j=this.label.height();if(j){h-=(j/2);}}this.node.css({left:i+"px",top:h+"px"});
};Label.prototype.isRaster=function(){return true;};Label.prototype.getLatLng=function(){return this.latlng;};Label.prototype.getLatLngs=function(){return[this.latlng];};Label.prototype.getInfoWindowOffset=function(){return new Y.Point(-this.icon.iconAnchor.x+this.icon.infoWindowAnchor.x,-this.icon.iconAnchor.y+this.icon.infoWindowAnchor.y);};Label.prototype.getPoint=function(){var a=parseInt(this.node.css("left"),10);
var b=parseInt(this.node.css("top"),10);return new Y.Point(a,b);};Label.prototype.getContainableBounds=function(){return Y.Feature.prototype.getContainableBounds.call(this);};var Marker=Y.Marker=Y.extend(Y.Feature,function(b,a){this.latlng=b;a=a||{};this.icon=a.icon||Y.Icon.DEFAULT_ICON;this.clickable=(typeof a.clickable==="undefined")?true:a.clickable;this.draggable=a.draggable||false;this.id=a.id||"";this.gid=a.gid||"";this.name=a.name||"";this.property=a.property||{};this.title=a.title||this.name||"";this.category=a.category||"";this.description=a.description||"";this.dictionary=a.dictionary||{};
this.labelClassName=a.labelClassName||"";});Marker.prototype.remove=function(){if(this.node){this.removeLabel();this.node.remove();this.drawn=false;}};Marker.prototype.draw=function(d){if(!this.node||d){if(this.node){this.remove();}var b=this.layer.getContainer();var c=this.layer.fromLatLngToDivPixel(this.latlng);var j=c.x;var i=c.y;var a=this.getMap();var h=a.getProjection();var e=h.getWrapWidth(a.getZoom());
if(e!=Infinity){var g=a.getMapContainerXY();var f=-g.x+a.size.width/2;var k=j-f;while(k>e/2){k-=e;}while(k<-e/2){k+=e;}j=k+f;}this.node=this.icon.createNode();this.node.css({position:"absolute",left:j+"px",top:i+"px"});if(!Y.Util.Platform.isAndroid){this.node.css({zIndex:0});}this.setIconOverEffect();b.append(this.node);this.drawn=true;this.setDraggable(this.draggable);this.setClickable(this.clickable);
}};Marker.prototype.setLatLng=function(a){this.latlng=a;this.draw(true);};Marker.prototype.setTitle=function(a){this.title=a;};Marker.prototype.addLabel=function(){if(Y.DraggableObject.dragging||!this.title||this.title===""){return;}var a=this.layer.map;var b=Y.Cache.get(Y.Cache.KEY_PLOT_LAYER);if(!b){b=new Y.FeatureLayer("label");Y.Cache.set(Y.Cache.KEY_PLOT_LAYER,b);}if(!b.isInitialized()){a.addLayer(b);
}this.fixLabelLayerOrder();if(this.label){b.removeFeature(this.label);}this.label=new Y.Label(this.getLatLng().copy(),this.title,{offset:this.icon.labelAnchor,className:this.labelClassName,clickable:false});b.addFeature(this.label);this.label.focus();};Marker.prototype.removeLabel=function(a){if(Y.DraggableObject.dragging||!this.label){return;}var b=this.layer.map;var e=Y.Cache.get(Y.Cache.KEY_PLOT_LAYER);
var d=this;if(e){if(this.label&&this.label.node){this.label.node.css({visibility:"hidden"});}if($.browser.safari){var c=this.label;setTimeout(function(){e.removeFeature(c);},0);}else{e.removeFeature(this.label);}}this.label=null;};Marker.prototype.fixLabelLayerOrder=function(){var e=this.layer.map;var g=Y.Cache.get(Y.Cache.KEY_PLOT_LAYER);var d=e.getCurrentLayerSet().getLayers();var f=0;for(var b=0,a=d.length;
b<a;b++){if(d[b]===g){f=b;break;}}var c=d.length-1;if(f!==c){e.removeLayer(g);e.addLayer(g);}};Marker.prototype.setClickable=function(a){var e=this,b=Y.Event;this.clickable=a;var d=function(f){f.stopPropagation();b.trigger(e,"click");};var c=function(f){f.stopPropagation();b.trigger(e,"rightclick");return false;};if(a){if(Y.Util.IS_TOUCH_SCREEN){this.node[0].addEventListener("touchstart",function(f){f.stopPropagation();
});}else{this.node.bind("mousedown",function(f){f.stopPropagation();});}this.node.bind("click",d);this.node.bind("contextmenu",c);this.node.css({cursor:"pointer"});}else{this.node.unbind("click",d);this.node.css({cursor:"default"});}};Marker.prototype.isClickable=function(){return this.clickable;};Marker.prototype.setDraggable=function(a){var d=Y.DraggableObject,b=Y.Event;this.draggable=a;if(!this.node){return;
}if(a&&!this.drag){var f=this;var e=this.getMap();var c=this.getLayer();this.drag=new d(this.node,{container:e.getContainer()});b.addListener(this.drag,"dragstart",function(g){f.removeLabel();e.closeInfoWindow();b.trigger(f,"dragstart");});b.addListener(this.drag,"dragend",function(h){var g=h.x;var i=h.y;f.latlng=c.fromDivPixelToLatLng(new Y.Point(g,i));f.removeLabel();b.trigger(f,"dragend");});}else{if(this.drag){this.drag.clearDrag();
this.drag=null;}}};Marker.prototype.isDraggable=function(){return this.draggable;};Marker.prototype.adjust=function(){var b=this.layer.fromLatLngToDivPixel(this.latlng);var i=b.x,h=b.y;var a=this.getMap();var f=a.getProjection();var c=f.getWrapWidth(a.getZoom());if(c!=Infinity){var e=a.getMapContainerXY();var g=-e.x+a.size.width/2;var j=i-g;while(j>c/2){j-=c;}while(j<-c/2){j+=c;}i=j+g;}var d=this.node.css("left");
if(d==Math.round(i)){return;}this.node.css({left:Math.round(i)+"px",top:Math.round(h)+"px"});};Marker.prototype.setIconOverEffect=function(){var b=this,a=Y.Event;if(!Y.Util.IS_TOUCH_SCREEN){this.node.bind("mouseover",function(){b.focus();a.trigger(b,"mouseover");});this.node.bind("mouseout",function(){b.blur();a.trigger(b,"mouseout");});}};Marker.prototype.focus=function(){this.node.css({zIndex:1});
this.addLabel();};Marker.prototype.blur=function(){this.node.css({zIndex:0});this.removeLabel();};Marker.prototype.isRaster=function(){return true;};Marker.prototype.getLatLng=function(){return this.latlng;};Marker.prototype.getLatLngs=function(){return[this.latlng];};Marker.prototype.getInfoWindowOffset=function(){var a=Y.Point;if(!this.icon||!this.icon.iconAnchor||!this.icon.infoWindowAnchor){return new a(0,0);
}return new a(-this.icon.iconAnchor.x+this.icon.infoWindowAnchor.x,-this.icon.iconAnchor.y+this.icon.infoWindowAnchor.y);};Marker.prototype.getPoint=function(){var a=parseInt(this.node.css("left"),10);var b=parseInt(this.node.css("top"),10);return new Y.Point(a,b);};Marker.prototype.getDOMNode=function(){if(this.node){return this.node[0];}return null;};Marker.prototype.setIcon=function(a){this.icon=a;
this.draw(true);};Marker.prototype.getContainableBounds=function(e){if(!this.drawn){return null;}e=(typeof e==="undefined")?1:e;var b=this.getPoint(),l=this.icon.iconSize,f=this.icon.iconAnchor,g=this.layer;var k=new Y.Point(b.x+(-f.x*e),b.y+(-f.y*e)),h=new Y.Point(k.x+l.width*e,k.y+l.height*e),d=new Y.Point(h.x,k.y),i=new Y.Point(k.x,h.y),j=g.fromDivPixelToLatLng(i),c=g.fromDivPixelToLatLng(d),a=new Y.LatLngBounds(g.fromDivPixelToLatLng(k),g.fromDivPixelToLatLng(h));
return a;};Marker.prototype.getContainableSize=function(d){d=(typeof d==="undefined")?1:d;var c=this.icon,b=c.iconSize,a=c.iconAnchor;return{ne:new Y.Size(Math.abs((b.width-a.x))*d,a.y*d),sw:new Y.Size(a.x*d,Math.abs((b.height-a.y))*d)};};var Polyline=Y.Polyline=Y.extend(Feature,function(a,b){this.options=b||{};this.strokeStyle=this.options.strokeStyle||new Style("ff0000",4,0.75);this.compress=this.options.compress||false;this.compressFormat=this.options.compressFormat||new Compress("YEncode");if(this.compress==true){this.latlngs=this.compressFormat.decode(a);}else{this.latlngs=a;}this.clickable=(this.options.clickable==undefined)?true:this.options.clickable;
this.draggable=this.options.draggable||false;this.clipping=(typeof this.options.clipping==="undefined")?true:this.options.clipping;this.id=this.options.id||"";this.name=this.options.name||"";this.property=this.options.property||{};this.route=this.options.route||{};});Polyline.prototype.draw=function(b){if(b||!this.node){var a=this.layer.getDrawer();if(this.node){this.remove();}var d=this.layer.vectorOffset;
var c=this.layer.fromLatLngsToDivPixels(this.latlngs,d.copy());if(this.clipping&&c.length>0){c=this.clipRect(c,this.layer.getDrawBounds());if(this.isCompatible()){c._offset=d.copy();}}a.setStrokeColor(this.strokeStyle.color);a.setStrokeOpacity(this.strokeStyle.opacity);a.setStrokeStartLine(this.strokeStyle.startline);a.setStrokeEndLine(this.strokeStyle.endline);this.node=$(a.drawLine(c,this.strokeStyle.weight));
this.drawn=true;this.setClickable(this.clickable);this.setDraggable(this.draggable);this.addExStyle();}};Polyline.prototype.clipRect=function(h,a){var d=function(n,m,l,i){if(n.x>=m.x){if((n.x<l.x&&n.x<i.x)||(m.x>l.x&&m.x>i.x)){return false;}}else{if((m.x<l.x&&m.x<i.x)||(n.x>l.x&&n.x>i.x)){return false;}}if(n.y>=m.y){if((n.y<l.y&&n.y<i.y)||(m.y>l.y&m.y>i.y)){return false;}}else{if((m.y<l.y&&m.y<i.y)||(n.y>l.y&&n.y>i.y)){return false;
}}if(((n.x-m.x)*(l.y-n.y)+(n.y-m.y)*(n.x-l.x))*((n.x-m.x)*(i.y-n.y)+(n.y-m.y)*(n.x-i.x))>0){return false;}if(((l.x-i.x)*(n.y-l.y)+(l.y-i.y)*(l.x-n.x))*((l.x-i.x)*(m.y-l.y)+(l.y-i.y)*(l.x-m.x))>0){return false;}return true;};var c=function(w,t,r,o){if(r.equals(o)){return new Y.Point(r.x,r.y);}var i=new Y.Point(0,0);var q=t.y-w.y;var n=w.x-t.x;var x=(t.y-w.y)*w.x-(t.x-w.x)*w.y;var m=o.y-r.y;var l=r.x-o.x;
var s=(o.y-r.y)*r.x-(o.x-r.x)*r.y;i.x=(l*x-n*s)/(q*l-n*m);i.y=(q*s-m*x)/(q*l-n*m);return i;};var k=function(l,r,u,o){var m=[];var t=l.length;var q=t-1;for(var n=0;n<t;n++){var v=l[n];var p;if(n!==q){p=l[n+1];}else{p=l[0];}if(r(v)){m.push(v);}if(n===q){break;}if(d(v,p,u,o)){m.push(c(v,p,u,o));}}return m;};var g=h.length;var j=h[0];var f=new Y.Point(j.x,j.y);var b=new Y.Point(j.x,j.y);for(var e=1;e<g;
e++){j=h[e];if(j.x>f.x){f.x=j.x;}if(j.y>f.y){f.y=j.y;}if(j.x<b.x){b.x=j.x;}if(j.y<b.y){b.y=j.y;}}h=k(h,function(i){return i.y>=a.bottom();},new Y.Point(b.x,a.bottom()),new Y.Point(f.x,a.bottom()));h=k(h,function(i){return i.y<=a.top();},new Y.Point(b.x,a.top()),new Y.Point(f.x,a.top()));h=k(h,function(i){return i.x>=a.left();},new Y.Point(a.left(),b.y),new Y.Point(a.left(),f.y));h=k(h,function(i){return i.x<=a.right();
},new Y.Point(a.right(),b.y),new Y.Point(a.right(),f.y));return h;};Polyline.prototype.isCompatible=function(){if(!this.layer){return true;}return this.layer.getDrawer().type===Drawer.RENDERING.CANVAS;};Polyline.prototype.getLength=function(){var a=0;for(var c=0,b=this.latlngs.length-1;c<b;c++){a+=this.latlngs[c].distance(this.latlngs[c+1]);}return a;};Polyline.prototype.setClickable=function(a){this.clickable=a;
if(!this.node){return;}if(this.isCompatible()){return;}var b=this;if(!this.func){this.func={};this.func.click=function(c){c.stopPropagation();Event.trigger(b,"click");};this.func.mousedown=function(c){c.stopPropagation();Y.Event.trigger(b,"mousedown",c);};this.func.mouseover=function(c){Y.Event.trigger(b,"mouseover",c);};this.func.mouseout=function(c){Y.Event.trigger(b,"mouseout",c);};}if(a){this.node.bind("click",this.func.click);
this.node.bind("mousedown",this.func.mousedown);this.node.bind("mouseover",this.func.mouseover);this.node.bind("mouseout",this.func.mouseout);this.node.css({cursor:"pointer"});}else{this.node.unbind("click",this.func.click);this.node.unbind("mousedown",this.func.mousedown);this.node.unbind("mouseover",this.func.mouseover);this.node.unbind("mouseout",this.func.mouseout);this.node.css({cursor:""});delete this.func;
this.func=null;}};Polyline.prototype.setDraggable=function(a){this.draggable=a;if(!this.node){return;}if(this.isCompatible()){return;}var d=this;var c=function(){if(!d.editingFeature){d.editingFeature=new EditingFeature(d);}d.outing=false;};var b=function(){d.outing=true;setTimeout(function(){d.clearEditingFeature();},500);};if(this.draggable){this.node.bind("mouseover",c);this.node.bind("mouseout",b);
}else{this.node.unbind("mouseover",c);this.node.unbind("mouseout",b);}};Polyline.prototype.clearEditingFeature=function(){if(this.outing&&this.editingFeature&&!this.editingFeature.nowEditing){this.editingFeature.remove();this.editingFeature=null;this.outing=false;}};Polyline.prototype.adjust=function(){this.draw(true);};Polyline.prototype.remove=function(){if(this.node){this.node.remove();}if(this.drawingFeature){this.drawingFeature.cancelLine();
this.drawingFeature.remove();this.drawingFeature=null;}};Polyline.prototype.startDrawing=function(){if(this.drawingFeature){Y.Event.removeListener(this.onFinishListner);this.onFinishListner=null;var a=this.drawingFeature;a.remove();a.cancelLine();this.drawingFeature=null;}this.drawingFeature=new DrawingFeature(this);this.onFinishListner=Y.Event.addListener(this.drawingFeature,"endline",this.finalizeDrawing,this);
};Polyline.prototype.finalizeDrawing=function(){if(this.drawingFeature){var a=this.drawingFeature;this.latlngs=a.latlngs;a.remove();this.drawingFeature=null;this.draw(true);a.endLine();Y.Event.trigger(this,"endline");}};Polyline.prototype.getLatLng=function(){var b=this.latlngs.length;var a=Math.floor(b/2);if(b>=2){var e=this.latlngs[a-1];var d=this.latlngs[a];var c=new LatLng((e.lat()+d.lat())/2,(e.lng()+d.lng())/2);
}else{if(b==1){var c=this.latlngs[0];}else{c=false;}}return c;};Polyline.prototype.getLatLngs=function(){return this.latlngs;};Polyline.prototype.getPoint=function(){var b=this.getLatLng();var a=this.layer.fromLatLngToDivPixel(b);return a;};Polyline.prototype.getContainableBounds=function(a){return Y.Feature.prototype.getContainableBounds.call(this);};var DrawingFeature=function(a){this.latlngs=[];
this.strokeStyle=new Style("000000",4,0.75);this.jointNodes=[];this.node;this.feature;var b=a.getLayer().getMap();this.initialize(b);};DrawingFeature.prototype.initialize=function(a){var a=this.map=a;this.layer=this.map.getSystemLayer();var b=this;this.clickListener=Y.Event.addListener(a,"click",function(d){if(d){var c=b.latlngs.length;if(c==0||!b.latlngs[c-1].equals(d)){b.addLatLng(d);}}});this.dblclickListener=Y.Event.addListener(a,"dblclick",function(c){b.endLine();
});};DrawingFeature.prototype.endLine=function(){Event.removeListener(this.clickListener);Event.removeListener(this.dblclickListener);Event.trigger(this,"endline");};DrawingFeature.prototype.cancelLine=function(){Event.removeListener(this.clickListener);Event.removeListener(this.dblclickListener);Event.trigger(this,"cancelline");};DrawingFeature.prototype.addLatLng=function(a){this.latlngs.push(a);
this.drawJoint(a);this.drawLine();};DrawingFeature.prototype.remove=function(){if(this.node){this.node.remove();}$.each(this.jointNodes,function(a,b){b.remove();});};DrawingFeature.prototype.drawLine=function(){var a=this.layer.getDrawer();if(this.node){this.node.remove();}var d=this.layer.vectorOffset;var c=this.layer.fromLatLngsToDivPixels(this.latlngs,d.copy());if(a.type===Y.Drawer.RENDERING.CANVAS&&c.length>0){c=Y.Polyline.prototype.clipRect.call(this,c,this.layer.getDrawBounds());
c._offset=d.copy();}a.setStrokeColor(this.strokeStyle.color);a.setStrokeOpacity(this.strokeStyle.opacity);a.setStrokeStartLine(this.strokeStyle.starline);a.setStrokeEndLine(this.strokeStyle.endline);this.node=$(a.drawLine(c,this.strokeStyle.weight));if(Y.Util.Platform.isIPhone){var b=this.node;b.hide().show();}};DrawingFeature.prototype.drawJoint=function(g){var b=12;var f=this.layer.fromLatLngToDivPixel(g);
var e=Math.round(f.x-b/2-2)+"px";var d=Math.round(f.y-b/2-2)+"px";var b=b+"px";var a='<div style="border:2px solid #ff0000;background-color:#ffcccc;cursor:pointer; position:absolute;font-size:1%;margin:0;padding:0;left:'+e+";top:"+d+";width:"+b+";height:"+b+';" ></div>';var c=$(a);this.layer.getContainer().append(c);this.jointNodes.push(c);return c;};var EditingFeature=function(a){this.latlngs=a.latlngs;
this.strokeStyle=new Style("000000",4,0.75);this.jointNodes=[];this.dragNodes=[];this.node;this.feature=a;var b=a.getLayer().getMap();this.initialize(b);};EditingFeature.prototype.initialize=function(a){var a=this.map=a;this.layer=this.map.getSystemLayer();this.drawLine();};EditingFeature.prototype.endLine=function(){Event.removeListener(this.clickListener);Event.removeListener(this.dblclickListener);
Event.trigger(this,"endline");};EditingFeature.prototype.cancelLine=function(){Event.removeListener(this.clickListener);Event.removeListener(this.dblclickListener);Event.trigger(this,"cancelline");};EditingFeature.prototype.addLatLng=function(a){this.latlngs.push(a);this.drawJoint(a);this.drawLine();};EditingFeature.prototype.remove=function(){if(this.node){this.node.remove();this.drawn=false;}$.each(this.jointNodes,function(a,b){b.remove();
});};EditingFeature.prototype.drawLine=function(){for(var b=0,a=this.latlngs.length;b<a;b++){this.drawJoint(b,this.latlngs[b]);}};EditingFeature.prototype.drawJoint=function(g,h){var k=12;var a=this.layer.fromLatLngToDivPixel(h);var b=Math.round(a.x-k/2-2)+"px";var i=Math.round(a.y-k/2-2)+"px";var e='<div style="z-index:9999;border:2px solid #ff0000;background-color:#ffcccc;cursor:pointer; position:absolute;font-size:1%;margin:0;padding:0;left:'+b+";top:"+i+";width:"+k+"px;height:"+k+'px;" ></div>';
var c=$(e);var d=new DraggableObject(c,{container:this.map.getContainer()});this.dragNodes.push(d);var f=this;var j=g;Event.addListener(d,"dragstart",function(){f.nowEditing=true;Log.write("EditingFeature:now editing");});Event.addListener(d,"dragend",function(m){f.nowEditing=false;var l=f.layer.fromDivPixelToLatLng(new Point(m.x+k/2+2,m.y+k/2+2));f.feature.latlngs[j]=l;f.feature.clearEditingFeature();
f.feature.draw(true);Log.write("EditingFeature:end editing");});this.layer.getContainer().append(c);this.jointNodes.push(c);return c;};var Polygon=Y.Polygon=Y.extend(Polyline,function(a,b){this.latlngs=a;this.options=b||{};this.strokeStyle=this.options.strokeStyle||new Style("000000",4,0.75);this.fillStyle=this.options.fillStyle||new Style("0000ff",4,0.5);this.clickable=(this.options.clickable==undefined)?true:this.options.clickable;this.draggable=this.options.draggable||false;this.clipping=(typeof this.options.clipping==="undefined")?true:this.options.clipping;
this.id=this.options.id||"";this.name=this.options.name||"";this.property=this.options.property||{};});Polygon.prototype.draw=function(b){if(b||!this.node){var a=this.layer.getDrawer();this.remove();var d=this.layer.vectorOffset;var c=this.layer.fromLatLngsToDivPixels(this.latlngs,d.copy());if(this.clipping&&c.length>0){c=this.clipRect(c,this.layer.getDrawBounds());if(this.isCompatible()){c._offset=d.copy();
}}a.setStrokeColor(this.strokeStyle.color);a.setStrokeOpacity(this.strokeStyle.opacity);a.setFillColor(this.fillStyle.color);a.setFillOpacity(this.fillStyle.opacity);if(c.length>2){this.node=$(a.drawArea(c,this.strokeStyle.weight));this.drawn=true;}this.setClickable(this.clickable);this.setDraggable(this.draggable);this.addExStyle();}};Polygon.prototype.clipRect=function(h,a){var d=function(n,m,l,i){if(n.x>=m.x){if((n.x<l.x&&n.x<i.x)||(m.x>l.x&&m.x>i.x)){return false;
}}else{if((m.x<l.x&&m.x<i.x)||(n.x>l.x&&n.x>i.x)){return false;}}if(n.y>=m.y){if((n.y<l.y&&n.y<i.y)||(m.y>l.y&m.y>i.y)){return false;}}else{if((m.y<l.y&&m.y<i.y)||(n.y>l.y&&n.y>i.y)){return false;}}if(((n.x-m.x)*(l.y-n.y)+(n.y-m.y)*(n.x-l.x))*((n.x-m.x)*(i.y-n.y)+(n.y-m.y)*(n.x-i.x))>0){return false;}if(((l.x-i.x)*(n.y-l.y)+(l.y-i.y)*(l.x-n.x))*((l.x-i.x)*(m.y-l.y)+(l.y-i.y)*(l.x-m.x))>0){return false;
}return true;};var c=function(w,t,r,o){if(r.equals(o)){return new Y.Point(r.x,r.y);}var i=new Y.Point(0,0);var q=t.y-w.y;var n=w.x-t.x;var x=(t.y-w.y)*w.x-(t.x-w.x)*w.y;var m=o.y-r.y;var l=r.x-o.x;var s=(o.y-r.y)*r.x-(o.x-r.x)*r.y;i.x=(l*x-n*s)/(q*l-n*m);i.y=(q*s-m*x)/(q*l-n*m);return i;};var k=function(l,r,u,o){var m=[];var t=l.length;var q=t-1;for(var n=0;n<t;n++){var v=l[n];var p;if(n!==q){p=l[n+1];
}else{p=l[0];}if(r(v)){m.push(v);}if(d(v,p,u,o)){m.push(c(v,p,u,o));}}return m;};var g=h.length;var j=h[0];var f=new Y.Point(j.x,j.y);var b=new Y.Point(j.x,j.y);for(var e=1;e<g;e++){j=h[e];if(j.x>f.x){f.x=j.x;}if(j.y>f.y){f.y=j.y;}if(j.x<b.x){b.x=j.x;}if(j.y<b.y){b.y=j.y;}}h=k(h,function(i){return i.y>=a.bottom();},new Y.Point(b.x,a.bottom()),new Y.Point(f.x,a.bottom()));h=k(h,function(i){return i.y<=a.top();
},new Y.Point(b.x,a.top()),new Y.Point(f.x,a.top()));h=k(h,function(i){return i.x>=a.left();},new Y.Point(a.left(),b.y),new Y.Point(a.left(),f.y));h=k(h,function(i){return i.x<=a.right();},new Y.Point(a.right(),b.y),new Y.Point(a.right(),f.y));return h;};Polygon.prototype.setClickable=function(a){Polyline.prototype.setClickable.apply(this,[a]);};Polygon.prototype.setDraggable=function(a){Polyline.prototype.setDraggable.apply(this,[a]);
};Polygon.prototype.adjust=function(){this.draw(true);};Polygon.prototype.remove=function(){if(this.node){this.node.remove();this.drawn=false;}};Polygon.prototype.getLatLng=function(){var d=0;var c=0;$.each(this.latlngs,function(e,f){d+=f.lat();c+=f.lng();});var a=this.latlngs.length;var b=new LatLng(d/a,c/a);return b;};Polygon.prototype.getPoint=function(){var b=this.getLatLng();var a=this.layer.fromLatLngToDivPixel(b);
return a;};var Circle=Y.Circle=Y.extend(Feature,function(c,a,b){this.latlng=c;if(a instanceof Size){this.radius=a;}else{this.radius=new Y.Size(a,a);}this.options=b||{};this.clickable=this.options.clickable||true;this.strokeStyle=this.options.strokeStyle||new Style("000000",4,0.75);this.fillStyle=this.options.fillStyle||new Style("0000ff",4,0.5);this.id=this.options.id||"";this.name=this.options.name||"";this.property=this.options.property||{};
this.editmode=false;this.move=false;this.eventDragstart=null;this.eventDrag=null;this.eventDragend=null;this.elem=null;this.shift=false;this.reverse_w=false;this.reverse_h=false;});Circle.prototype.getLatLng=function(){return this.latlng;};Circle.prototype.getLatLngs=function(){return[this.latlng];};Circle.prototype.getRadiusKilometers=function(){var d=this.getPoint();var c=new Point(d.x+this.radius.width,d.y+this.radius.height);
var b=this.layer.fromDivPixelToLatLng(d);var a=this.layer.fromDivPixelToLatLng(c);return b.distance(a).kilometers;};Circle.prototype.getRadiusPixel=function(){var a=new Y.Size(this.radius.width,this.radius.height);if(this.options.unit=="km"){var c=this.layer.fromLatLngToDivPixel(this.latlng);var b=this.layer.fromLatLngToDivPixel(this.latlng.detachedLatLng(this.radius.width*1000));a.width=Math.sqrt(Math.pow(c.x-b.x,2)+Math.pow(c.y-b.y,2));
b=this.layer.fromLatLngToDivPixel(this.latlng.detachedLatLng(this.radius.height*1000));a.height=Math.sqrt(Math.pow(c.x-b.x,2)+Math.pow(c.y-b.y,2));}a.width=Math.abs(a.width);a.height=Math.abs(a.height);return a;};Circle.prototype.setClickable=function(a){Polyline.prototype.setClickable.apply(this,[a]);};Circle.prototype.draw=function(c,a){if(c||!this.node){var b=this.layer.getDrawer();var f=a||{};f.editing=(typeof f.editing==="undefined")?false:f.editing;
if(this.node&&!f.editing){this.remove();}var d=this.layer.fromLatLngToDivPixel(this.latlng);var e=this.layer.vectorOffset;d.x+=e.x;d.y+=e.y;if(this.isCompatible()){d._offset=e.copy();}b.setStrokeColor(this.strokeStyle.color);b.setStrokeOpacity(this.strokeStyle.opacity);b.setFillColor(this.fillStyle.color);b.setFillOpacity(this.fillStyle.opacity);this.elem=b.drawCircle(d,this.getRadiusPixel(),this.strokeStyle.weight,this.elem);
this.node=$(this.elem);this.drawn=true;this.setClickable(this.clickable);this.addExStyle();if(this.editmode&&!f.editing){this.enableEditing();}}};Circle.prototype.adjust=function(){this.draw(true);};Circle.prototype.remove=function(){this.removeEvent();if(this.node){$(this.elem).remove();this.node.remove();this.drawn=false;}if(this.drawingFeature){this.drawingFeature.cancelLine();this.drawingFeature.remove();
this.drawingFeature=null;}};Circle.prototype.getPoint=function(){var a=this.layer.fromLatLngToDivPixel(this.latlng);return a;};Circle.prototype.isCompatible=function(){return Y.Polyline.prototype.isCompatible.call(this);};Circle.prototype.getContainableBounds=function(a){return Y.Feature.prototype.getContainableBounds.call(this);};Circle.prototype.enableEditing=function(){this.editmode=true;var d=this;
this.removeEvent();this.drag=new DraggableObject(this.node,{container:document,disableMove:true});var c;this.eventDragstart=Event.addListener(this.drag,"dragstart",function(l){c=l;var i=d.getRadiusPixel(d.radius);var e=i.width/2;var f=i.height/2;var k=d.getLayer().getMap();var j=k.fromLatLngToContainerPixel(d.latlng);var g=k.fromPagePixelToContainerPixel(l);if(j.x+e>g.x&&j.x-e<g.x&&j.y+f>g.y&&j.y-f<g.y){d.move=true;
}else{d.reverse_w=d.reverse_h=true;if(j.x<g.x){d.reverse_w=false;}if(j.y<g.y){d.reverse_h=false;}if(d.radius.width<0){d.reverse_w=!d.reverse_w;}if(d.radius.height<0){d.reverse_h=!d.reverse_h;}}});this.eventDrag=Event.addListener(this.drag,"drag",function(f){if(d.move){var j=d.layer.fromLatLngToDivPixel(d.latlng);j.x+=f.x-c.x;j.y+=f.y-c.y;d.latlng=d.layer.fromDivPixelToLatLng(j);c=f;d.draw(true,{editing:true});
}else{var i=1;var m=(f.x-c.x);var l=(f.y-c.y);m=d.reverse_w?m*-1:m;l=d.reverse_h?l*-1:l;if(d.shift){m=l=(m+l)/2;i=d.radius.width/d.radius.height;}if(d.options.unit==="km"){var e=d.getLayer().getMap();var k=e.getZoom();var g=e.getProjection();var h=g.resolution(k)/g.getTilePixel();d.radius.width+=m*(h/4)*i;d.radius.height+=l*(h/4);}else{d.radius.width+=m*i;d.radius.height+=l;}c=f;d.draw(true,{editing:true});
}});this.eventDragend=Event.addListener(this.drag,"dragend",function(e){d.move=false;Event.trigger(d,"endedit");});var b=function(f){if(f.keyCode===16){d.shift=false;}};var a=function(f){if(f.keyCode===16){d.shift=true;}};$(document).bind("keyup",b);$(document).bind("keydown",a);this.clearEvent=function(){$(document).unbind("keyup",b);$(document).unbind("keydown",a);};};Circle.prototype.disableEditing=function(){this.editmode=false;
this.removeEvent();};Circle.prototype.removeEvent=function(){if(this.eventDragstart){Event.removeListener(this.eventDragstart);}if(this.eventDrag){Event.removeListener(this.eventDrag);}if(this.eventDragend){Event.removeListener(this.eventDragend);}if(this.drag){this.drag.clearDrag();}if(this.clearEvent){this.clearEvent();}};var Patch=Y.Patch=Y.extend(Feature,function(d,b,a){this.options=a||{};var c=this;this.interior=[];$.each(d,function(e,f){f.latlngs.push(f.latlngs[0]);c.interior.push(new Polyline(f.latlngs));});b.latlngs.push(b.latlngs[0]);this.exterior=new Polyline(b.latlngs);this.strokeStyle=this.options.strokeStyle||new Style("0000ff",4,0.75);this.fillStyle=this.options.fillStyle||new Style("0000ff",4,0.5);this.clickable=(this.options.clickable==undefined)?true:this.options.clickable;
this.id=this.options.id||"";this.name=this.options.name||"";this.property=this.options.property||{};this.title=this.options.title||this.name||"";this.category=this.options.category||"";this.description=this.options.description||"";});Patch.prototype.initialize=function(b){this.layer=b;this.drawn=false;var d=this;this.exterior.strokeStyle=d.strokeStyle;this.exterior.layer=b;this.exterior.initialize(b);
this.exterior.setClickable(false);$.each(this.interior,function(e,f){f.strokeStyle=d.strokeStyle;f.setClickable(false);f.layer=b;f.initialize(b);});var c=[];$.each(this.interior,function(g,f){var e=f.latlngs[0];var h=10000;$.each(d.exterior.latlngs,function(i,k){var j=e.distance(k);if(j<h){c[g]=k;h=j;}});});var a=[];$.each(this.exterior.latlngs,function(f,e){a.push(e);$.each(c,function(g,h){if(e==h){$.each(d.interior[g].latlngs.reverse(),function(i,j){a.push(j);
});a.push(d.interior[g].latlngs[0]);a.push(e);}});});this.patch=new Polygon(a);this.patch.layer=b;this.patch.initialize(b);this.patch.strokeStyle=new Style(0,0,0.01);this.patch.fillStyle=this.fillStyle;};Patch.prototype.draw=function(b){var a=true;var c=this;if(!this.exterior.drawn){a=false;}if(b||!a){this.remove();$.each(this.interior,function(d,e){if(c!=e){e.draw(b);}});this.exterior.draw(b);this.patch.draw(b);
this.drawn=true;this.setClickable(this.clickable);}};Patch.prototype.adjust=function(){this.draw(true);};Patch.prototype.remove=function(){$.each(this.interior,function(a,b){b.remove();});this.exterior.remove();this.patch.remove();};Patch.prototype.getLatLng=function(){if(this.patch){return this.patch.getLatLng();}};Patch.prototype.setClickable=function(a){var c=this;if(this.evtClick){$.each(this.evtClick,function(d,e){Y.Event.removeListener(e);
});}this.evtClick=[];if(a){var b=Y.Event.addListener(this.patch,"click",function(d){if(d){d.stopPropagation();}Y.Event.trigger(c,"click",d);});c.evtClick.push(b);}};var Multi=Y.Multi=Y.extend(Feature,function(b,a){this.options=a||{};this.features=b;this.strokeStyle=this.options.strokeStyle||new Style("0000ff",4,0.75);this.fillStyle=this.options.fillStyle||new Style("0000ff",4,0.5);this.clickable=(this.options.clickable==undefined)?true:this.options.clickable;this.id=this.options.id||"";this.name=this.options.name||"";this.property=this.options.property||{};this.title=this.options.title||this.name||"";
this.category=this.options.category||"";this.description=this.options.description||"";this.setClickable(this.clickable);});Multi.prototype.initialize=function(a){this.layer=a;this.drawn=false;var b=this;$.each(this.features,function(c,d){d.strokeStyle=b.strokeStyle;d.fillStyle=b.fillStyle;d.layer=a;d.initialize(a);});};Multi.prototype.draw=function(b){var a=true;var c=this;$.each(this.features,function(d,e){if(!e.drawn){a=false;
}});if(b||!a){this.remove();$.each(this.features,function(d,e){if(c!=e){e.draw(b);}});this.drawn=true;this.setClickable(this.clickable);}};Multi.prototype.adjust=function(){this.draw(true);};Multi.prototype.remove=function(){$.each(this.features,function(a,b){b.remove();});};Multi.prototype.getLatLng=function(){var d=0;var c=0;$.each(this.features,function(e,g){var h=g.getLatLng();d+=h.lat();c+=h.lng();
});var a=this.features.length;var b=new LatLng(d/a,c/a);return b;};Multi.prototype.setClickable=function(a){var b=this;if(this.evtClick){$.each(this.evtClick,function(c,d){Y.Event.removeListener(d);});}this.evtClick=[];$.each(this.features,function(c,e){if(a){var d=Y.Event.addListener(e,"click",function(f){if(f){f.stopPropagation();}Y.Event.trigger(b,"click",f);});b.evtClick.push(d);}});};var CenterMarkControl=Y.CenterMarkControl=Y.extend(Y.Control,function(a){this.options=a||{};this.options.visible=typeof this.options.visible!=="undefined"?this.options.visible:true;this.options.visibleButton=this.options.visibleButton||false;this._isHideCenterMark=false;});CenterMarkControl.prototype.initialize=function(e){function d(){var j=e.getSize();var k=33;var i=33;var h=Math.round((j.width-k)/2);
var l=Math.round((j.height-i)/2);return{x:h,y:l};}var g=d();var f=this;var a="http://i.yimg.jp/images/map/api/ui_forprint.gif";if(Y.Util.Platform.isAndroid){this.centerMark=$('<p class="yolp-centermark" style="position:absolute;left:'+g.x+";top:"+g.y+';margin:0;padding:0;"></p>').append($('<img src="'+a+'" alt="" />').loadAlphaImage());}else{this.centerMark=$('<p class="yolp-centermark" style="z-index:10;position:absolute;left:'+g.x+";top:"+g.y+';margin:0;padding:0;"></p>').append($('<img src="'+a+'" alt="" />').loadAlphaImage());
}e.mainContainer.append(this.centerMark);if(!this.options.visible){this.centerMark.hide();}var b=Y.Util.Platform.scrollType==="CSS3"&&!Y.Util.Platform.isAndroid;if(b){this.centerMark.css("-webkit-transform","translate3d(0, 0, 0)");}this.button=$('<div style="cursor:pointer;"></div>').bind("click",function(){if(f.isVisibleCenterMark()){f.hideCenterMark();}else{f.showCenterMark();}});if(!this.options.visibleButton){this.button.hide();
}if(this.options.visible){this.showCenterMark();}else{this.hideCenterMark();}function c(){var h=d();if(b){f.centerMark.css("-webkit-transform","translate3d("+h.x+"px,"+h.y+"px,0)");}else{f.centerMark.css({left:h.x+"px",top:h.y+"px"});}}this.resizeEvent=this.map.bind("resize",c);c();return this.button;};CenterMarkControl.prototype.isVisibleCenterMark=function(){return this.visible;};CenterMarkControl.prototype.showCenterMark=function(){this.visible=true;
this.button.empty();this.button.append('<img src="http://i.yimg.jp/images/clear.gif" alt="\u4e2d\u5fc3\u70b9\u3092\u975e\u8868\u793a\u306b\u3059\u308b"  style="width: 20px; height: 21px; background:url('+Y.CTRL_IMAGE_URL+') -52px -79px no-repeat;" />');this.button.attr("title","\u4e2d\u5fc3\u70b9\u3092\u975e\u8868\u793a\u306b\u3059\u308b");this.centerMark.show();this._isHideCenterMark=false;};CenterMarkControl.prototype.hideCenterMark=function(){this.visible=false;this.button.empty();this.button.append('<img src="http://i.yimg.jp/images/clear.gif" alt="\u4e2d\u5fc3\u70b9\u3092\u8868\u793a\u3059\u308b"  style="width: 20px; height: 21px; background:url('+Y.CTRL_IMAGE_URL+') -31px -79px no-repeat;" />');
this.button.attr("title","\u4e2d\u5fc3\u70b9\u3092\u8868\u793a\u3059\u308b");this.centerMark.hide();this._isHideCenterMark=true;};CenterMarkControl.prototype.hide=function(){if(this.isVisibleCenterMark()){this.hideCenterMark();}if(this.options.visibleButton===true){Y.Control.prototype.hide.call(this);}};CenterMarkControl.prototype.show=function(){if(!this.isVisibleCenterMark()){this.showCenterMark();}if(this.options.visibleButton===true){Y.Control.prototype.show.call(this);
}};CenterMarkControl.prototype.isVisible=function(){if(this.options.visibleButton===true){return Y.Control.prototype.isVisible.call(this);}else{return this.isVisibleCenterMark();}};CenterMarkControl.prototype.getDefaultPosition=function(){return new Y.ControlPosition(Y.ControlPosition.TOP_LEFT,new Y.Size(5,5));};CenterMarkControl.prototype.printable=function(){return false;};CenterMarkControl.prototype.remove=function(){this.map.unbind(this.resizeEvent);
if(this.node){this.centerMark.remove();this.centerMark=null;}Y.Control.prototype.remove.call(this);};var LayerSetControl=Y.LayerSetControl=Y.extend(Control,function(a){this.options=a||{};this.options.enableOverlayButton=(typeof this.options.enableOverlayButton==="undefined")?true:this.options.enableOverlayButton;this.options.offsetOverlayButton=(typeof this.options.offsetOverlayButton==="undefined")?new Y.Point(0,0):this.options.offsetOverlayButton;this.isOverlay=(typeof Y.WeatherMapLayer==="undefined")?false:true;
});LayerSetControl.prototype.initialize=function(e){var c=$('<ul class="yolp-ctrl"></ul>');this.btn=$('<div id="yolp-ctrl-overlay-btn" class="yolp-ctrl-overlay-btn-on"></div>');this.list=$("<div class='yolp-ctrl-overlay-list'></div>").hide();this.overlays;var f=this;function a(){f.btn.empty();f.list.empty();c.empty();f.setEnableOverlayButton(f.options.enableOverlayButton);var k=$('<li class="yolp-ctrl-overlay"></li>');
if(f.options.offsetOverlayButton.x!==0||f.options.offsetOverlayButton.y!==0){k.css({position:"relative",left:f.options.offsetOverlayButton.x+"px",top:f.options.offsetOverlayButton.y+"px"});}if(Y.Util.IS_TOUCH_SCREEN){f.btn.bind("touchstart",function(){if(f.list.css("display")==="block"){f.setBtn();f.list.hide();}else{var q=20;if(!f.isUpper()){q=-f.list.height()-3;}f.setBtn(true);f.list.css({"margin-top":q+"px",color:"black"}).show();
}});}else{k.bind("mouseover",function(){var q=20;if(!f.isUpper()){q=-f.list.height()-3;}f.setBtn(true);f.list.css({"margin-top":q+"px",color:"black"}).show();});k.bind("mouseout",function(){f.setBtn();f.list.hide();});}f.overlays={};var j={};j.id="weatherOverlay";j.minZoom=1;j.maxZoom=15;j.name="\u96e8\u96f2\u30ec\u30fc\u30c0\u30fc";j.item=f.createOverlay(j);f.list.append(j.item);f.overlays[j.id]=j;if(f.map.enableIndoorMapLayer){var h={};
h.id="indoorOverlay";h.minZoom=18;h.maxZoom=22;h.name="\u5c4b\u5185\u5730\u56f3";h.item=f.createOverlay(h);f.list.append(h.item);f.overlays[h.id]=h;}k.append(f.btn);k.append(f.list);c.append(k);var p=e.getLayerSets();var n=e.getCurrentLayerSet();var i="\u3078\u5909\u66f4\u3059\u308b";if(!e.isDefaultLanguage()){i="";}for(var g in p){if(!p.hasOwnProperty(g)){continue;}var l=p[g],m;if(l.getHidden()===true){continue;}if(n==l){m="yolp-layerset-on";
}else{if(!l.getEnable()){m="yolp-layerset-disable";}else{m="yolp-layerset-off";}}m+=" "+g;var o=$('<li class="'+m+'" title="'+l.getFullName()+i+'" >'+l.getFullName()+"</li>");if(f.map.configure.touchSupport&&Y.Util.IS_TOUCH_SCREEN){o.bind("touchstart",(function(q){return function(s){var r=f.map.getLayerSet(q);if(r.getEnable()&&e.currentLayerSetId!=q){e.setLayerSet(q);}};})(g));}else{o.bind("click",(function(q){return function(s){var r=f.map.getLayerSet(q);
if(r.getEnable()&&e.currentLayerSetId!=q){e.setLayerSet(q);}};})(g));}c.append(o);}}function b(i){var h=f.map.getConfigure(i);var g=f.node.find("#"+i).children("input:checkbox");if(h){g.attr("checked","checked");}else{g.removeAttr("checked");}}function d(g){a();f.setEnableOverlayButton(f.options.enableOverlayButton);}a();this.setEnableOverlayButton(this.options.enableOverlayButton);this.listeners=[];
this.listeners.push(Event.addListener(e,"layersetchanged",function(){a();}));this.listeners.push(Event.addListener(e,"addlayerset",function(){a();}));this.listeners.push(Event.addListener(e,"removelayerset",function(){a();}));this.listeners.push(Event.addListener(e,"layerlistchanged",function(){var k=e.getLayerSets();var j=e.getCurrentLayerSet();for(var m in k){if(!k.hasOwnProperty(m)){continue;}var h=k[m],g;
if(j==h){g="yolp-layerset-on "+m;var l=$("."+m);var i=l.attr("class");if(g==i){}else{l.removeClass(i).addClass(g);}}else{if(!h.getEnable()){g="yolp-layerset-disable "+m;var l=$("."+m);var i=l.attr("class");if(g==i){}else{l.removeClass(i).addClass(g);}}else{g="yolp-layerset-off "+m;var l=$("."+m);var i=l.attr("class");if(g==i){}else{l.removeClass(i).addClass(g);}}}}f.setEnableIndoorOverlay();}));this.listeners.push(Event.addListener(this.map,"weatheroverlaychanged",function(){b("weatherOverlay");
}));this.listeners.push(Event.addListener(this.map,"indooroverlaychanged",function(){b("indoorOverlay");}));this.listeners.push(Event.addListener(f.map,"zoomend",function(){f.setEnableWeatherOverlay();f.setEnableIndoorOverlay();}));this.listeners.push(Event.addListener(this.map,"languagechanged",function(g){d(g);}));return c;};LayerSetControl.prototype.getDefaultPosition=function(){return new ControlPosition(ControlPosition.TOP_RIGHT,new Size(3,3));
};LayerSetControl.prototype.printable=function(){return false;};LayerSetControl.prototype.setPosition=function(a){Y.Control.prototype.setPosition.apply(this,[a]);this.setBtn();};LayerSetControl.prototype.load=function(b,a){Y.Control.prototype.load.apply(this,[b,a]);this.setBtn();};LayerSetControl.prototype.isUpper=function(){var b=$(this.map.getContainer());var a=b.height();var c=this.node.offset().top-b.offset().top;
if(c>a/2){return false;}return true;};LayerSetControl.prototype.setBtn=function(b){var a="yolp-ctrl-overlay-btn-on";var c="yolp-ctrl-overlay-btn-off";if(b){a="yolp-ctrl-overlay-btn-off";c="yolp-ctrl-overlay-btn-on";}if(this.isUpper()){this.btn.removeClass().addClass(a);}else{this.btn.removeClass().addClass(c);}};LayerSetControl.prototype.setEnableOverlayButton=function(a){var b=a&&this.isOverlay;if(b&&this.map.isDefaultLanguage()){this.btn.show();
}else{this.btn.hide();this.list.hide();}this.options.enableOverlayButton=b;};LayerSetControl.prototype.createOverlay=function(a){var d="";var f=this;if(this.map.getConfigure(a.id)){d="checked";}var b;var e=this.map.getZoom();if(e>a.maxZoom&&e<a.minZoom){b='style="color:#708090;"';}else{b='style="color:black;"';}var c=$('<div class="yolp-ctrl-overlay-item-off" id="'+a.id+'"><input class="yolp-overlaylayer-control-check" type="checkbox" '+d+' /><div class="yolp-overlaylayer-control-icon-'+a.id+'"></div><div class="'+a.id+' yolp-overlaylayer-control-name" '+b+">"+a.name+"</div></div>");
if(!Y.Util.IS_TOUCH_SCREEN){c.bind("mouseover",function(){$(this).removeClass().addClass("yolp-ctrl-overlay-item-on");});c.bind("mouseout",function(){$(this).removeClass().addClass("yolp-ctrl-overlay-item-off");});}if(Y.Util.IS_TOUCH_SCREEN){$("input:checkbox",c).click(function(g){g.preventDefault();});c.bind("touchstart",function(h){var j=$(this).attr("id");var i=f.map.getConfigure(j);f.map.setConfigure(j,!i);
var g=$(this).children("input:checkbox");if(!i){g.attr("checked","checked");}else{g.removeAttr("checked");}});}else{c.bind("click",function(h){var j=$(this).attr("id");var i=f.map.getConfigure(j);f.map.setConfigure(j,!i);var g=$(this).children("input:checkbox");if(!i){g.attr("checked","checked");}else{g.removeAttr("checked");}});}return c;};LayerSetControl.prototype.setEnableWeatherOverlay=function(){var c=this.overlays.weatherOverlay;
if(c){var b=this.map.getZoom();var a=(b>c.maxZoom||b<c.minZoom)?"#708090":"#000000";c.item.children(".yolp-overlaylayer-control-name").css("color",a);}};LayerSetControl.prototype.setEnableIndoorOverlay=function(){var c=this.overlays.indoorOverlay;if(c){if(this.map.overlays.indoor){var b=this.map.getZoom();this.plugin=this.map.getPlugin("YahooMapLayer");yml=false;if(this.plugin){yml=this.plugin.yml.getIndoorMaps();
}var a=(!yml||b>c.maxZoom||b<c.minZoom)?"#708090":"#000000";c.item.children(".yolp-overlaylayer-control-name").css("color",a);}}};var ScaleControl=Y.ScaleControl=Y.extend(Control,function(a){this.options=a||{};this.UI_IMG="http://i.yimg.jp/images/map/api/ui_forprint.gif";this.src=new Image().src=this.UI_IMG;this.UI_IMG_WIDTH=66;this.UI_IMG_HEIGHT=48;this.BOUNDARY_WIDTH=4;this.BOUNDARY_HEIGHT=10;this.START_BOUNDARY_LEFT=0;this.START_BOUNDARY_TOP=-34;this.END_BOUNDARY_LEFT=-4;this.END_BOUNDARY_TOP=-34;this.SCALE_PANEL_WIDTH=66;
this.SCALE_PANEL_HEIGHT=4;this.SCALE_PANEL_LEFT=0;this.SCALE_PANEL_TOP=-44;});ScaleControl.prototype.load=function(b,a){this.__super__.load.apply(this,arguments);this.redraw();};ScaleControl.prototype.initialize=function(b){var a=this.container=this.createScaleBar();this.moveEvent=this.map.bind("moveend",this.redraw,this);this.zoomEvent=this.map.bind("zoomend",this.redraw,this);this.layerSetEvent=this.map.bind("layersetchanged",this.redraw,this);
return a;};ScaleControl.prototype.remove=function(){this.map.unbind(this.moveEvent);this.map.unbind(this.zoomEvent);this.map.unbind(this.layerSetEvent);this.__super__.remove.call(this);};ScaleControl.prototype.createScaleBar=function(){var e=$("<div></div>").css({width:"206px",height:"10px",bottom:"1px",right:"1px",font:"normal 9px verdana",position:"absolute"}).attr({align:"left","class":"scalebar"});
var b=$("<div></div>").css({overflow:"hidden",width:this.BOUNDARY_WIDTH+"px",height:this.BOUNDARY_HEIGHT+"px",position:"absolute"}).attr("sBoundary",true);var j=this.getScaleImg(this.START_BOUNDARY_LEFT,this.START_BOUNDARY_TOP);b.append(j);e.append(b);var d=this.scalePanels=$("<div></div>").css({overflow:"hidden",width:"206px",height:"4px",position:"absolute",top:"3px"}).attr("scalePanels",true);for(var a=0;
a<3;a++){var f=this.getScaleImg(this.SCALE_PANEL_LEFT,this.SCALE_PANEL_TOP).css({left:this.SCALE_PANEL_WIDTH*a+"px"});d.append(f);}e.append(d);var c=$("<div></div>").css({overflow:"hidden",width:this.BOUNDARY_WIDTH+"px",height:this.BOUNDARY_HEIGHT+"px",position:"absolute"}).attr("eBoundary",true);var g=this.getScaleImg(this.END_BOUNDARY_LEFT,this.END_BOUNDARY_TOP);c.append(g);e.append(c);var h=this.unitsPanel=$("<span></span>").css({position:"absolute",top:"1px",right:"0px"}).attr("unitsPanel",true);
e.append(h);return e;};ScaleControl.prototype.getScaleImg=function(b,c){var a=$('<img src="'+this.src+'">');a.css({border:"0px none",margin:"0px",padding:"0px",position:"absolute",left:b+"px",top:c+"px",width:this.UI_IMG_WIDTH+"px",height:this.UI_IMG_HEIGHT+"px",filter:""}).disableImageSelect().loadAlphaImage({size:new Size(this.UI_IMG_WIDTH,this.UI_IMG_HEIGHT)});return a;};ScaleControl.prototype.redraw=function(){var c=this.getUnits();
var g=this.container.children();var f=c.scaleLength;var b=c.unitsContent;var h=(this.map.getCurrentLayerSetId()===Y.LayerSetId.PHOTO)?"white":"black";g.each(function(){var i=$(this);if(i.attr("scalePanels")){i.css("width",f+"px");}if(i.attr("unitsPanel")){i.css("color",h);i.html(b);}});var a=this.unitsPanel.width();var e=a+this.BOUNDARY_WIDTH;var d=e+this.scalePanels.width();g.each(function(){var i=$(this);
if(i.attr("eBoundary")){i.css("right",a+"px");}if(i.attr("scalePanels")){i.css("right",e+"px");}if(i.attr("sBoundary")){i.css("right",d+"px");}});};ScaleControl.prototype.getUnits=function(){var f=10;var n=(f/2);var e=this.map;var i=e.getSize();var g=i.width/2;var h=i.height/2;var c=new Point(g-n,h);var j=new Point(g+n,h);var d=e.fromContainerPixelToLatLng(c).distance(e.fromContainerPixelToLatLng(j))*1000;
f*=12;d*=12;var m=10;while(true){if(d<m){var l=m/10;temp=Math.floor(d/l)*l;f=f*temp/d;d=temp;break;}m*=10;}var k=(d<1000)?Math.round(d)+" m":Math.round(d/1000)+" km";return{scaleLength:f,unitsContent:k};};ScaleControl.prototype.getDefaultPosition=function(){var b=this.options.position||ControlPosition.BOTTOM_RIGHT;var a=this.options.size||new Size(80,8);return new ControlPosition(b,a);};var ZoomControl=Y.ZoomControl=Y.extend(Control,function(a){this.UI_IMG="http://i.yimg.jp/images/map/api/ui_merge_v3.png";this.options=a||{};});ZoomControl.prototype.initialize=function(d){var c=$('<div class="yjm-zoom"></div>');var b=$('<div title="\u7e2e\u5c0f" style="overflow: hidden; left: 0px; width: 22px; height: 22px; position: absolute;"><img style="border: 0px none ; margin: 0px; padding: 0px; position: absolute; left: 0px; top: -193px; width: 159px; height: 215px; " src="'+this.UI_IMG+'"/></div>').bind("click",function(){d.zoomOut();
});var e=$('<div title="\u62e1\u5927" style="overflow: hidden; left: 25px; width: 22px; height: 22px; position: absolute;"><img style="border: 0px none ; margin: 0px; padding: 0px; position: absolute; left: -133px; top: -193px; width: 159px; height: 215px; " src="'+this.UI_IMG+'"/></div>').bind("click",function(){d.zoomIn();});function a(h){var g,f;if(h===Y.LanguageType.JAPANESE){g="\u62e1\u5927";f="\u7e2e\u5c0f";}else{g="zoom in";
f="zoom out";}b.attr("title",f);e.attr("title",g);}a(d.getLanguage());c.append(b);c.append(e);Event.addListener(d,"languagechanged",function(f){a(f);});return c;};ZoomControl.prototype.getDefaultPosition=function(){var b=this.options.position||ControlPosition.TOP_LEFT;var a=this.options.size||new Size(3,3);return new ControlPosition(b,a);};ZoomControl.prototype.printable=function(){return false;};var LogoControl=Y.LogoControl=Y.extend(Y.Control,function(a){this.options=a||{};this.param=a.param||{};this.src=new Image().src="http://i.yimg.jp/images/maps/logo/yj_logo.png";this.URL_DEFAULT="http://map.yahoo.co.jp/maps?";this.URL_WEATHER="http://weather.yahoo.co.jp/weather/zoomradar/";this.link=this.URL_DEFAULT;});LogoControl.prototype.initialize=function(a){this.map=a;var c=this;this.node=this.container=$('<a href="" target="_blank" id="yolp-logo-link" class="yolp-logo" style="z-index:10;position:absolute;margin:0;padding:0;"></a>').append($('<img src="'+this.src+'" alt="" border="0" />').loadAlphaImage());
this.node.attr("href",this.getMapLink());a.bind("moveend",function(){c.node.attr("href",c.getMapLink());});a.bind("layersetchanged",function(){c.node.attr("href",c.getMapLink());});a.bind("zoomend",function(){c.node.attr("href",c.getMapLink());});a.bind("dispweathermaplayer",function(d){c.node.attr("href",c.getMapLink(d));});var b=this.node.children("img");b.bind("click",function(){c.rdsig();});if(Y.Util.Platform.isIPhone){this.node.css("-webkit-transform","translate3d(0, 0, 0)");
}return this.node;};LogoControl.prototype.rdsig=function(){var a="http://rdsig.yahoo.co.jp/maps/map_api/js_logo/RV=1/RU=aHR0cDovL21hcC55YWhvby5jby5qcC9hcGkvbWFwbG9n";if(a===""){return;}var b=this.container.children("iframe");if(b.length==0){$('<iframe width=100 height=100 style="display:none;" />').attr("src",a).appendTo(this.container);}else{b[0].src=b[0].src;}};LogoControl.prototype.getDefaultPosition=function(){var b=this.options.position||Y.ControlPosition.BOTTOM_RIGHT;
var a=this.options.size||new Y.Size(3,3);return new Y.ControlPosition(b,a);};LogoControl.prototype.getMapLink=function(b){if(b===true){this.link=this.URL_WEATHER;}else{if(b===false){this.link=this.URL_DEFAULT;}}if(this.link===this.URL_WEATHER){return this.link;}var c=this.link;var a=this.map.getCenter();this.param.lat=this.param.hlat=a.lat();this.param.lon=this.param.hlon=a.lng();this.param.z=this.map.getZoom();
this.param.datum="wgs";var d=this.param.mode;if(!d||d===""){d=this.map.getCurrentLayerSetId();if(d==Y.LayerSetId.PHOTO){this.param.mode="aero";}else{if(d==Y.LayerSetId.B1){this.param.mode="b1";}else{this.param.mode="map";}}}this.param[".f"]="jsapilogo";$.each(this.param,function(e,f){c+=e+"="+f+"&";});c=c.substr(0,c.length-1);return c;};var AppBannerControl=Y.AppBannerControl=Y.extend(Y.Control,function(a){this.options=a||{};this.param=this.options.param||{};this.src=new Image().src="http://i.yimg.jp/images/map/api/yolp/images/ymapbanner.png";this.URL_DEFAULT="http://map.yahoo.co.jp/maps?";this.URL_WEATHER="http://map.yahoo.co.jp/maps?layer=weather&v=3";this.link=this.URL_DEFAULT;});AppBannerControl.prototype.initialize=function(a){this.map=a;
var c=this;this.node=this.container=$('<a class="yolp-ymapbanner" href="" target="_blank"></a>').append($('<img src="'+this.src+'" alt="" border="0" />').loadAlphaImage());this.node.attr("href",this.getMapLink());a.bind("moveend",function(){c.node.attr("href",c.getMapLink());});a.bind("layersetchanged",function(){c.node.attr("href",c.getMapLink());});a.bind("zoomend",function(){c.node.attr("href",c.getMapLink());
});a.bind("dispweathermaplayer",function(d){c.node.attr("href",c.getMapLink(d));});var b=this.node.children("a");b.bind("click",function(){c.rdsig();});if(Y.Util.Platform.isIPhone){this.node.css("-webkit-transform","translate3d(0, 0, 0)");}return this.node;};AppBannerControl.prototype.rdsig=function(){var a="http://rdsig.yahoo.co.jp/maps/map_api/js_logo/RV=1/RU=aHR0cDovL21hcC55YWhvby5jby5qcC9hcGkvbWFwbG9n";
if(a===""){return;}var b=this.container.children("iframe");if(b.length==0){$('<iframe width=100 height=100 style="display:none;" />').attr("src",a).appendTo(this.container);}else{b[0].src=b[0].src;}};AppBannerControl.prototype.getDefaultPosition=function(){var b=this.options.position||Y.ControlPosition.TOP_CENTER;var a=this.options.size||new Y.Size(0,26);return new Y.ControlPosition(b,a);};AppBannerControl.prototype.getMapLink=function(b){if(b===true){this.link=this.URL_WEATHER;
}else{if(b===false){this.link=this.URL_DEFAULT;}}if(this.link===this.URL_WEATHER){return this.link;}var c=this.link;var a=this.map.getCenter();this.param.lat=this.param.hlat=a.lat();this.param.lon=this.param.hlon=a.lng();this.param.z=this.map.getZoom();this.param.datum="wgs";var d=this.param.mode;if(!d||d===""){d=this.map.getCurrentLayerSetId();if(d==Y.LayerSetId.PHOTO){this.param.mode="aero";}else{if(d==Y.LayerSetId.B1){this.param.mode="b1";
}else{this.param.mode="map";}}}this.param[".f"]="ymapbanner";$.each(this.param,function(e,f){c+=e+"="+f+"&";});c=c.substr(0,c.length-1);return c;};var SliderZoomControl=Y.SliderZoomControl=Y.extend(Control,function(a){this.options=a||{};this.mode=this.options.mode||MODE.HORIZONTAL;this.hasCaptureFunc=(document.releaseCapture)?true:false;this.isBlow=(this.options.blow===undefined)?true:a.blow;this.UI_IMG=Y.CTRL_IMAGE_URL;this.src=new Image().src=this.UI_IMG;this.UI_IMG_WIDTH=161;this.UI_IMG_HEIGHT=271;this.SLIDER_MARGIN=4;this.ATTRIBUTE_ZOOM="zoomLevel";
this.BLOW_LAYERSETS={};this.BLOW_LAYERSETS[Y.LayerSetId.NORMAL]="";this.BLOW_LAYERSETS[Y.LayerSetId.PHOTO]="";this.BLOW_LAYERSETS[Y.LayerSetId.B1]="";this.BLOW_ZOOM_LEVELS=[4,7,10,13,15,18];this.tooltipZoomOut=decodeURIComponent("%E7%B8%AE%E5%B0%8F");this.tooltipZoomIn=decodeURIComponent("%E6%8B%A1%E5%A4%A7");if(this.constructor!==SliderZoomControl){return this;}switch(this.mode){case MODE.VERTICAL:return new SliderZoomControlVertical(this.options);
break;case MODE.HORIZONTAL:return new SliderZoomControlHorizontal(this.options);break;default:return new SliderZoomControlVertical(this.options);break;}});var MODE=SliderZoomControl.MODE={VERTICAL:1,HORIZONTAL:2};SliderZoomControl.prototype.load=function(b,a){Control.prototype.load.apply(this,[b,a]);if(this.node&&this.hasCaptureFunc){this.node=$(this.node).stopMousePropagation();}};SliderZoomControl.prototype.printable=function(){return false;
};SliderZoomControl.prototype.initialize=function(c){var b=this.container=$("<div></div>");this.gripBar=null;this.blowButtons=null;this.blowTimer=null;this.gripMouseDown=false;this.enableBlow=true;this.gripDragged=false;this.minZoom=this.map.getMinZoom();this.maxZoom=this.map.getMaxZoom();this.zoomCount=this.maxZoom-this.minZoom+1;this.initAdjustPosition();this._window=window;this.sliderLayerSetId=this.map.getCurrentLayerSetId();
var d=this;function a(e){if(e===Y.LanguageType.JAPANESE){d.tooltipZoomOut="\u7e2e\u5c0f";d.tooltipZoomIn="\u62e1\u5927";}else{d.tooltipZoomIn="zoom in";d.tooltipZoomOut="zoom out";}b.find("#zibtn").attr("title",d.tooltipZoomIn);b.find("#zobtn").attr("title",d.tooltipZoomOut);}a(c.getLanguage());if(this._setup){this._window.clearTimeout(this._setup);}this._setup=this.later(this.setupSlider);this.zoomEvent=this.map.bind("zoomend",this.onZoomChanged,this);
this.layerSetEvent=this.map.bind("layersetchanged",this.onLayerSetChanged,this);this.numLayerEvent=this.map.bind("numlayerchanged",this.numLayerChanged,this);Event.addListener(c,"languagechanged",function(e){a(e);});return b;};SliderZoomControl.prototype.later=function(d,g){var a=this;var b=Array.prototype.slice.call(arguments);b.shift();b.shift();var c=g||10;var e=function(){return d.apply(a,b);};
return this._window.setTimeout(e,c);};SliderZoomControl.prototype.setupSlider=function(){if(!this.node){return;}var a=this.createSlider();this.container.append(a);this.setGripBarPosition(this.map.getZoom());delete this._setup;};SliderZoomControl.prototype.createSlider=function(){var b=$("<div></div>").css({top:this.SLIDER_MARGIN+"px",left:this.SLIDER_MARGIN+"px",position:"absolute"});var g=$("<div></div>").css({position:"absolute",borderColor:"orange",borderStyle:"none",borderWidth:"1px",cursor:"pointer"});
b.append(g);var e=this.createZoomOutButton();e.bind("click",this.bindThis(this.zoomOut));e.bind("mousedown",this.bindThis(this.stopEvent));e.bind("dblclick",this.bindThis(this.stopEvent));g.append(e);var i=this.createZoomInButton();i.bind("click",this.bindThis(this.zoomIn));i.bind("mousedown",this.bindThis(this.stopEvent));i.bind("dblclick",this.bindThis(this.stopEvent));g.append(i);var c=this.graduatedBar=this.createSliderGraduatedBar();
g.append(c);c.bind("click",this.bindThis(this.changeClickedZoomLevel));c.bind("mousedown",this.bindThis(this.stopEvent));c.bind("dblclick",this.bindThis(this.stopEvent));var f=this.blowButtons=$("<div></div>").css({position:"absolute",borderColor:"orange",borderStyle:"none",borderWidth:"1px",cursor:"pointer",visibility:"hidden"});if(this.isMercatorProjection()===true&&this.isBlow){b.append(f);this.createBlowButtons();
b.bind("mouseover",this.bindThis(this.setChangeBlowTimer));b.bind("mouseout",this.bindThis(this.setChangeBlowTimer));}var a=this.gripBar=this.createGripBar();b.append(a);var h=this.hasCaptureFunc?a:$(this._window);a.bind("mousedown",this.bindThis(this.startGrip));this.onMoveGrip=this.bindThis(this.moveGrip);h.bind("mousemove",this.onMoveGrip);var d=this;this.onEndGrip=function(j){d.endGrip(j);};h.bind("mouseup",this.onEndGrip);
a.bind("dblclick",this.bindThis(this.stopEvent));a.bind("click",this.bindThis(this.stopEvent));if($.browser.mozilla){this.forceOutGrip=this.bindThis(this.onWindowMouseOut);h.bind("mouseout",this.forceOutGrip);}if($.browser.msie){this.forceOutGrip=this.bindThis(this.onFrameMouseOut);h.bind("mouseout",this.forceOutGrip);}this.adjustMinZoomLevel();return b;};SliderZoomControl.prototype.remove=function(){this.map.unbind(this.zoomEvent);
this.map.unbind(this.layerSetEvent);this.map.unbind(this.numLayerEvent);if(!this.hasCaptureFunc){var a=$(this._window);if(this.onMoveGrip){a.unbind("mousemove",this.onMoveGrip);}if(this.onEndGrip){a.unbind("mouseup",this.onEndGrip);}if(this.forceOutGrip){a.unbind("mouseout",this.forceOutGrip);}}Control.prototype.remove.call(this);};SliderZoomControl.prototype.getContainer=function(){return this.container;
};SliderZoomControl.prototype.getEnableBlow=function(){return this.enableBlow;};SliderZoomControl.prototype.setEnableBlow=function(a){this.enableBlow=a;};SliderZoomControl.prototype.bindThis=function(b){var a=this;return function(){b.apply(a,arguments);};};SliderZoomControl.prototype.stopEvent=function(a){a.preventDefault();a.stopPropagation();};SliderZoomControl.prototype.zoomIn=function(a){this.map.zoomIn();
this.stopEvent(a);};SliderZoomControl.prototype.zoomOut=function(a){this.map.zoomOut();this.stopEvent(a);};SliderZoomControl.prototype.changeClickedZoomLevel=function(b){var a=$(b.target);var c=a.attr(this.ATTRIBUTE_ZOOM);if(typeof c!=="undefined"){this.map.setZoom(parseInt(c));}return this.stopEvent(b);};SliderZoomControl.prototype.isMercatorProjection=function(){var a=this.map.getProjection();if(a.constructor===Y.MercatorProjection){return true;
}else{if(a.__super__&&a.__super__.constructor===Y.MercatorProjection){return true;}else{return false;}}};SliderZoomControl.prototype.isDispBlowZoomLevel=function(c){if(this.isMercatorProjection()===false){return false;}if(!this.map.getCurrentLayerSetId() in this.BLOW_LAYERSETS){return false;}for(var b=0,a=this.BLOW_ZOOM_LEVELS.length;b<a;b++){var d=this.BLOW_ZOOM_LEVELS[b];if(c===d){return true;}}return false;
};SliderZoomControl.prototype.onZoomChanged=function(a,b){if(this.gripMouseDown){return;}this.setGripBarPosition(a);};SliderZoomControl.prototype.onLayerSetChanged=function(){var a=this.map.getCurrentLayerSetId();if(this.sliderLayerSetId===a){return;}this.remove();this.load(this.map,this.position);};SliderZoomControl.prototype.numLayerChanged=function(){this.remove();this.load(this.map,this.position);
};SliderZoomControl.prototype.onWindowMouseOut=function(a){if(!a.relatedTarget&&this.gripMouseDown){return this.endGrip(a);}};SliderZoomControl.prototype.onFrameMouseOut=function(a){if(!a.toElement&&this.gripMouseDown){return this.endGrip(a);}};SliderZoomControl.prototype.setChangeBlowTimer=function(c){if(!this.enableBlow){return;}if(this.blowTimer){this._window.clearTimeout(this.blowTimer);this.blowTimer=null;
}var a=this;var b=function(){return function(){a.changeBlowVisibility.call(a,c);}();};this.blowTimer=this._window.setTimeout(b,100);};SliderZoomControl.prototype.changeBlowVisibility=function(b){var a=b.type;switch(a){case"mouseover":if(this.map.isDefaultLanguage()){this.blowButtons.css({visibility:"visible"});}break;case"mouseout":this.blowButtons.css({visibility:"hidden"});break;default:return this.stopEvent(b);
}};SliderZoomControl.prototype.getSliderImg=function(b,c){var a=$('<img src="'+this.src+'">');a.css({border:"0px none",margin:"0px",padding:"0px",position:"absolute",left:b+"px",top:c+"px",width:this.UI_IMG_WIDTH+"px",height:this.UI_IMG_HEIGHT+"px",filter:""}).disableImageSelect().loadAlphaImage({size:new Size(this.UI_IMG_WIDTH,this.UI_IMG_HEIGHT)});return a;};SliderZoomControl.prototype.getDefaultPosition=function(){var b=this.options.position||ControlPosition.TOP_LEFT;
var a=this.options.size||new Size(5,2);return new ControlPosition(b,a);};var SliderZoomControlVertical=Y.SliderZoomControlVertical=Y.extend(SliderZoomControl,function(a){this.__super__.constructor.apply(this,arguments);});SliderZoomControlVertical.prototype.initialize=function(a){this.ZOOM_OUT_BUTTON_WIDTH=25;this.ZOOM_OUT_BUTTON_HEIGHT=24;this.ZOOM_OUT_BUTTON_LEFT=-135;this.ZOOM_OUT_BUTTON_LEFT=-93;
this.ZOOM_OUT_BUTTON_TOP=-44;this.ZOOM_OUT_BUTTON_TOP=-101;this.ZOOM_IN_BUTTON_WIDTH=25;this.ZOOM_IN_BUTTON_HEIGHT=24;this.ZOOM_IN_BUTTON_LEFT=-134;this.ZOOM_IN_BUTTON_LEFT=-93;this.ZOOM_IN_BUTTON_TOP=-147;this.ZOOM_IN_BUTTON_TOP=-203;this.STEP_WIDTH=25;this.STEP_HEIGHT=8;this.NORMAL_STEP_LEFT=-109;this.NORMAL_STEP_LEFT=-68;this.LONG_STEP_LEFT=-134;this.LONG_STEP_LEFT=-93;this.STEP_WIDE_LIMIT=9;this.GRADUATED_BAR_OFFSET=this.ZOOM_IN_BUTTON_TOP+this.STEP_HEIGHT-1;
this.BLOW_WIDTH=67;this.BLOW_HEIGHT=21;this.BLOW_LEFT=0;this.BLOW_TOP=-32;this.BLOW_TOP=-100;this.BLOW_OFFSET_Y=-11;this.BLOW_OFFSET_X=-5;this.GRIP_WIDTH=24;this.GRIP_HEIGHT=9;this.GRIP_LEFT=-32;this.GRIP_LEFT=-85;this.GRIP_TOP=-21;this.GRIP_TOP=-42;this.GRIP_OFFSET=-9;this.gripMouseDownY=0;this.gripPosY=0;return this.__super__.initialize.apply(this,arguments);};SliderZoomControlVertical.prototype.initAdjustPosition=function(){if(this.minZoom>0){this.adjustPosition=-((this.minZoom-1)*this.STEP_HEIGHT);
}else{this.adjustPosition=0;}};SliderZoomControlVertical.prototype.createZoomOutButton=function(){var a=$("<div></div>").attr({id:"zobtn",title:this.tooltipZoomOut}).css({top:"0px",overflow:"hidden",width:this.ZOOM_OUT_BUTTON_WIDTH+"px",height:this.ZOOM_OUT_BUTTON_HEIGHT+"px",position:"absolute"}).disableImageSelect().loadAlphaImage({size:new Size(this.ZOOM_OUT_BUTTON_WIDTH,this.ZOOM_OUT_BUTTON_HEIGHT)});
a.append(this.getSliderImg(this.ZOOM_OUT_BUTTON_LEFT,this.ZOOM_OUT_BUTTON_TOP));return a;};SliderZoomControlVertical.prototype.createZoomInButton=function(){var a=$("<div></div>").attr({id:"zibtn",title:this.tooltipZoomIn}).css({top:this.ZOOM_OUT_BUTTON_HEIGHT+(this.zoomCount*this.STEP_HEIGHT)+"px",overflow:"hidden",width:this.ZOOM_IN_BUTTON_WIDTH,height:this.ZOOM_IN_BUTTON_HEIGHT,position:"absolute"});
a.append(this.getSliderImg(this.ZOOM_IN_BUTTON_LEFT,this.ZOOM_IN_BUTTON_TOP));return a;};SliderZoomControlVertical.prototype.createSliderGraduatedBar=function(){var a;if(this.maxZoom>20){a=this._createSliderGraduatedBar();}else{a=this._createSliderGraduatedBar_old();}return a;};SliderZoomControlVertical.prototype._createSliderGraduatedBar_old=function(){this.STEP_WIDE_LIMIT=12;this.GRADUATED_BAR_OFFSET=this.ZOOM_OUT_BUTTON_TOP-this.ZOOM_OUT_BUTTON_HEIGHT;
var e=$("<div></div>").css({position:"absolute",borderStyle:"none",borderWidth:"1px",cursor:"pointer",top:this.ZOOM_OUT_BUTTON_HEIGHT});for(var c=this.minZoom,a=this.maxZoom;c<=a;c++){var b=$("<div></div>").css({top:((c-1)*this.STEP_HEIGHT)+"px",overflow:"hidden",width:this.STEP_WIDTH+"px",height:this.STEP_HEIGHT+"px",position:"absolute"});var g=c;if(g<=this.STEP_WIDE_LIMIT){g=0;}else{g-=this.STEP_WIDE_LIMIT;
}var f=this.NORMAL_STEP_LEFT;if(this.isDispBlowZoomLevel(c)){f=this.LONG_STEP_LEFT;}var d=this.getSliderImg(f,this.GRADUATED_BAR_OFFSET-(g*this.STEP_HEIGHT));d.attr(this.ATTRIBUTE_ZOOM,c);b.append(d);e.append(b);}return e;};SliderZoomControlVertical.prototype._createSliderGraduatedBar=function(){var e=$("<div></div>").css({position:"absolute",borderStyle:"none",borderWidth:"1px",cursor:"pointer",top:this.ZOOM_OUT_BUTTON_HEIGHT});
var a=this.maxZoom-this.minZoom;var g=(a<this.STEP_WIDE_LIMIT)?this.STEP_WIDE_LIMIT:0;for(var c=this.maxZoom;c>=this.minZoom;c--){var b=$("<div></div>").css({top:((c-1)*this.STEP_HEIGHT)+"px",overflow:"hidden",width:this.STEP_WIDTH+"px",height:this.STEP_HEIGHT+"px",position:"absolute"});var f=this.NORMAL_STEP_LEFT;if(this.isDispBlowZoomLevel(c)){f=this.LONG_STEP_LEFT;}var d=this.getSliderImg(f,this.GRADUATED_BAR_OFFSET+(g*this.STEP_HEIGHT));
d.attr(this.ATTRIBUTE_ZOOM,c);b.append(d);e.append(b);if(g<this.STEP_WIDE_LIMIT){g++;}}return e;};SliderZoomControlVertical.prototype.createBlowButtons=function(){var b=this.blowButtons;for(var e=0,a=this.BLOW_ZOOM_LEVELS.length;e<a;e++){var g=this.BLOW_ZOOM_LEVELS[e];if(g<this.minZoom||g>this.maxZoom){continue;}var c=$("<div></div>");b.append(c);var f=g*this.STEP_HEIGHT;c.css({left:this.STEP_WIDTH+this.BLOW_OFFSET_X+"px",top:(parseInt(f-(this.STEP_HEIGHT/2)+this.ZOOM_OUT_BUTTON_HEIGHT+this.BLOW_OFFSET_Y))+"px",overflow:"hidden",width:this.BLOW_WIDTH+"px",height:this.BLOW_HEIGHT+"px",position:"absolute"});
c.bind("click",this.bindThis(this.changeClickedZoomLevel));c.bind("mousedown",this.bindThis(this.stopEvent));c.bind("dblclick",this.bindThis(this.stopEvent));var d=this.getSliderImg(0,this.BLOW_TOP-(e*this.BLOW_HEIGHT));d.attr(this.ATTRIBUTE_ZOOM,(f/this.STEP_HEIGHT));c.append(d);}};SliderZoomControlVertical.prototype.createGripBar=function(){var b=$("<div></div>").css({left:"1px",overflow:"hidden",width:this.GRIP_WIDTH+"px",height:this.GRIP_HEIGHT+"px",position:"absolute"});
var a=this.getSliderImg(this.GRIP_LEFT,this.GRIP_TOP);b.append(a);return b;};SliderZoomControlVertical.prototype.adjustMinZoomLevel=function(){if(this.adjustPosition!==0){this.graduatedBar.css("top",this.adjustPosition+this.ZOOM_OUT_BUTTON_HEIGHT+"px");this.blowButtons.css("top",this.adjustPosition+"px");}};SliderZoomControlVertical.prototype.startGrip=function(a){if(!this.gripMouseDown){this.gripDragged=false;
this.gripMouseDownY=a.screenY;this.gripPosY=parseInt(this.gripBar.css("top"));if(this.hasCaptureFunc){this.gripBar[0].setCapture();}this.gripMouseDown=true;}return this.stopEvent(a);};SliderZoomControlVertical.prototype.moveGrip=function(c){if(this.gripMouseDown){var b=c.screenY-this.gripMouseDownY;var a=this.gripPosY+b;if(a<this.ZOOM_OUT_BUTTON_HEIGHT){a=this.ZOOM_OUT_BUTTON_HEIGHT;}if(a>this.ZOOM_OUT_BUTTON_HEIGHT+(this.zoomCount-1)*this.STEP_HEIGHT){a=this.ZOOM_OUT_BUTTON_HEIGHT+(this.zoomCount-1)*this.STEP_HEIGHT;
}this.gripBar.css("top",a+"px");this.gripDragged=true;}};SliderZoomControlVertical.prototype.endGrip=function(b){if(this.hasCaptureFunc){document.releaseCapture();}if(this.gripMouseDown){if(this.gripDragged){var a=parseInt(this.gripBar.css("top"));var c=this.getZoomLevelByGripBarPos(a);if(c>this.maxZoom){c=this.maxZoom;}if(c<this.minZoom){c=this.minZoom;}this.map.setZoom(c);this.setGripBarPosition(c);
}this.gripMouseDown=false;}};SliderZoomControlVertical.prototype.getZoomLevelByGripBarPos=function(a){var b=((a-this.STEP_HEIGHT)/this.STEP_HEIGHT)-0.5|0;if(this.minZoom>0){b+=(this.minZoom-1);}return b;};SliderZoomControlVertical.prototype.getGripBarPosByZoomLevel=function(a){return this.ZOOM_OUT_BUTTON_HEIGHT+(a*this.STEP_HEIGHT)+this.GRIP_OFFSET;};SliderZoomControlVertical.prototype.setGripBarPosition=function(b){if(!this.gripBar){return;
}if(b<this.minZoom||b>this.maxZoom){this.gripBar.css("visibility","hidden");}else{this.gripBar.css("visibility","visible");}var a=this.getGripBarPosByZoomLevel(b);if(this.adjustPosition!==0){a+=this.adjustPosition;}this.gripBar.css("top",a+"px");};var SliderZoomControlHorizontal=Y.SliderZoomControlHorizontal=Y.extend(SliderZoomControl,function(a){this.__super__.constructor.apply(this,arguments);});
SliderZoomControlHorizontal.prototype.initialize=function(a){this.ZOOM_OUT_BUTTON_WIDTH=22;this.ZOOM_OUT_BUTTON_HEIGHT=22;this.ZOOM_OUT_BUTTON_LEFT=0;this.ZOOM_OUT_BUTTON_TOP=-193;this.ZOOM_OUT_BUTTON_TOP=-248;this.ZOOM_IN_BUTTON_WIDTH=22;this.ZOOM_IN_BUTTON_HEIGHT=22;this.ZOOM_IN_BUTTON_LEFT=-133;this.ZOOM_IN_BUTTON_TOP=-193;this.ZOOM_IN_BUTTON_TOP=-248;this.STEP_WIDTH=8;this.STEP_HEIGHT=20;this.NORMAL_STEP_TOP=-193;
this.NORMAL_STEP_TOP=-248;this.LONG_STEP_TOP=-171;this.LONG_STEP_TOP=-226;this.STEP_WIDE_LIMIT=13;this.GRADUATED_BAR_OFFSET=this.ZOOM_IN_BUTTON_LEFT+this.STEP_WIDTH-1;this.BLOW_WIDTH=21;this.BLOW_HEIGHT=53;this.BLOW_LEFT=-67;this.BLOW_LEFT=-118;this.BLOW_TOP=0;this.BLOW_OFFSET_Y=-3;this.BLOW_OFFSET_X=-11;this.GRIP_WIDTH=9;this.GRIP_HEIGHT=26;this.GRIP_LEFT=-106;this.GRIP_TOP=0;this.GRIP_OFFSET=-9;this.gripMouseDownX=0;
this.gripPosX=0;return this.__super__.initialize.apply(this,arguments);};SliderZoomControlHorizontal.prototype.initAdjustPosition=function(){if(this.minZoom>0){this.adjustPosition=-((this.minZoom-1)*this.STEP_WIDTH);}else{this.adjustPosition=0;}};SliderZoomControlHorizontal.prototype.createZoomOutButton=function(){var a=$("<div></div>").attr({id:"zobtn",title:this.tooltipZoomOut}).css({left:"0px",overflow:"hidden",width:this.ZOOM_OUT_BUTTON_WIDTH+"px",height:this.ZOOM_OUT_BUTTON_HEIGHT+"px",position:"absolute"}).disableImageSelect().loadAlphaImage({size:new Size(this.ZOOM_OUT_BUTTON_WIDTH,this.ZOOM_OUT_BUTTON_HEIGHT)});
a.append(this.getSliderImg(this.ZOOM_OUT_BUTTON_LEFT,this.ZOOM_OUT_BUTTON_TOP));return a;};SliderZoomControlHorizontal.prototype.createZoomInButton=function(){var a=$("<div></div>").attr({id:"zibtn",title:this.tooltipZoomIn}).css({left:this.ZOOM_OUT_BUTTON_WIDTH+(this.zoomCount*this.STEP_WIDTH)+"px",overflow:"hidden",width:this.ZOOM_IN_BUTTON_WIDTH,height:this.ZOOM_IN_BUTTON_HEIGHT,position:"absolute"});
a.append(this.getSliderImg(this.ZOOM_IN_BUTTON_LEFT,this.ZOOM_IN_BUTTON_TOP));return a;};SliderZoomControlHorizontal.prototype.createSliderGraduatedBar=function(){var a;if(this.maxZoom>20){a=this._createSliderGraduatedBar();}else{a=this._createSliderGraduatedBar_old();}return a;};SliderZoomControlHorizontal.prototype._createSliderGraduatedBar_old=function(){this.STEP_WIDE_LIMIT=9;this.GRADUATED_BAR_OFFSET=this.ZOOM_OUT_BUTTON_LEFT-this.ZOOM_OUT_BUTTON_WIDTH;
var e=$("<div></div>").css({position:"absolute",borderStyle:"none",borderWidth:"1px",cursor:"pointer",left:this.ZOOM_OUT_BUTTON_HEIGHT});for(var c=this.minZoom,a=this.maxZoom;c<=a;c++){var b=$("<div></div>").css({left:((c-1)*this.STEP_WIDTH)+"px",overflow:"hidden",width:this.STEP_WIDTH+"px",height:this.STEP_HEIGHT+"px",position:"absolute"});var g=c;if(g<=this.STEP_WIDE_LIMIT){g=0;}else{g-=this.STEP_WIDE_LIMIT;
}var f=this.NORMAL_STEP_TOP;if(this.isDispBlowZoomLevel(c)){f=this.LONG_STEP_TOP;}var d=this.getSliderImg(this.GRADUATED_BAR_OFFSET-(g*this.STEP_WIDTH),f);d.attr(this.ATTRIBUTE_ZOOM,c);b.append(d);e.append(b);}return e;};SliderZoomControlHorizontal.prototype._createSliderGraduatedBar=function(){var e=$("<div></div>").css({position:"absolute",borderStyle:"none",borderWidth:"1px",cursor:"pointer",left:this.ZOOM_OUT_BUTTON_HEIGHT});
var a=this.maxZoom-this.minZoom;var g=(a<this.STEP_WIDE_LIMIT)?this.STEP_WIDE_LIMIT:0;for(var c=this.maxZoom;c>=this.minZoom;c--){var b=$("<div></div>").css({left:((c-1)*this.STEP_WIDTH)+"px",overflow:"hidden",width:this.STEP_WIDTH+"px",height:this.STEP_HEIGHT+"px",position:"absolute"});var f=this.NORMAL_STEP_TOP;if(this.isDispBlowZoomLevel(c)){f=this.LONG_STEP_TOP;}var d=this.getSliderImg(this.GRADUATED_BAR_OFFSET+(g*this.STEP_WIDTH),f);
d.attr(this.ATTRIBUTE_ZOOM,c);b.append(d);e.append(b);if(g<this.STEP_WIDE_LIMIT){g++;}}return e;};SliderZoomControlHorizontal.prototype.createBlowButtons=function(){var b=this.blowButtons;for(var e=0,a=this.BLOW_ZOOM_LEVELS.length;e<a;e++){var g=this.BLOW_ZOOM_LEVELS[e];if(g<this.minZoom||g>this.maxZoom){continue;}var c=$("<div></div>");b.append(c);var f=g*this.STEP_WIDTH;c.css({left:(parseInt(f-(this.STEP_WIDTH/2)+this.ZOOM_OUT_BUTTON_WIDTH+this.BLOW_OFFSET_X))+"px",top:this.STEP_HEIGHT+this.BLOW_OFFSET_Y+"px",overflow:"hidden",width:this.BLOW_WIDTH+"px",height:this.BLOW_HEIGHT+"px",position:"absolute"});
c.bind("click",this.bindThis(this.changeClickedZoomLevel));c.bind("mousedown",this.bindThis(this.stopEvent));c.bind("dblclick",this.bindThis(this.stopEvent));var d=this.getSliderImg(this.BLOW_LEFT-(parseInt(e%2)*this.BLOW_WIDTH),this.BLOW_TOP-(parseInt(e/2)*this.BLOW_HEIGHT));d.attr(this.ATTRIBUTE_ZOOM,(f/this.STEP_WIDTH));c.append(d);}};SliderZoomControlHorizontal.prototype.createGripBar=function(){var b=$("<div></div>").css({top:"-2px",overflow:"hidden",width:this.GRIP_WIDTH+"px",height:this.GRIP_HEIGHT+"px",position:"absolute"});
var a=this.getSliderImg(this.GRIP_LEFT,this.GRIP_TOP);b.append(a);return b;};SliderZoomControlHorizontal.prototype.adjustMinZoomLevel=function(){if(this.adjustPosition!==0){this.graduatedBar.css("left",this.adjustPosition+this.ZOOM_OUT_BUTTON_WIDTH+"px");this.blowButtons.css("left",this.adjustPosition+"px");}};SliderZoomControlHorizontal.prototype.startGrip=function(a){if(!this.gripMouseDown){this.gripDragged=false;
this.gripMouseDownX=a.screenX;this.gripPosX=parseInt(this.gripBar.css("left"));if(this.hasCaptureFunc){this.gripBar[0].setCapture();}this.gripMouseDown=true;}return this.stopEvent(a);};SliderZoomControlHorizontal.prototype.moveGrip=function(c){if(this.gripMouseDown){var a=c.screenX-this.gripMouseDownX;var b=this.gripPosX+a;if(b<this.ZOOM_OUT_BUTTON_WIDTH){b=this.ZOOM_OUT_BUTTON_WIDTH;}if(b>this.ZOOM_OUT_BUTTON_WIDTH+(this.zoomCount-1)*this.STEP_WIDTH){b=this.ZOOM_OUT_BUTTON_WIDTH+(this.zoomCount-1)*this.STEP_WIDTH;
}this.gripBar.css("left",b+"px");this.gripDragged=true;}};SliderZoomControlHorizontal.prototype.endGrip=function(b){if(this.hasCaptureFunc){document.releaseCapture();}if(this.gripMouseDown){if(this.gripDragged){var a=parseInt(this.gripBar.css("left"));var c=this.getZoomLevelByGripBarPos(a);if(c>this.maxZoom){c=this.maxZoom;}if(c<this.minZoom){c=this.minZoom;}this.map.setZoom(c);this.setGripBarPosition(c);
}this.gripMouseDown=false;}return this.stopEvent(b);};SliderZoomControlHorizontal.prototype.getZoomLevelByGripBarPos=function(a){var b=((a-this.STEP_WIDTH)/this.STEP_WIDTH)|0;if(this.minZoom>0){b+=(this.minZoom-1);}return b;};SliderZoomControlHorizontal.prototype.getGripBarPosByZoomLevel=function(a){return this.ZOOM_OUT_BUTTON_WIDTH+(a*this.STEP_WIDTH)+this.GRIP_OFFSET;};SliderZoomControlHorizontal.prototype.setGripBarPosition=function(b){if(!this.gripBar){return;
}if(b<this.minZoom||b>this.maxZoom){this.gripBar.css("visibility","hidden");}else{this.gripBar.css("visibility","visible");}var a=this.getGripBarPosByZoomLevel(b);if(this.adjustPosition!==0){a+=this.adjustPosition;}this.gripBar.css("left",a+"px");};var IndoorMapControl=Y.IndoorMapControl=Y.extend(Y.Control,function(a,b){this.options=b||{};this.indoorMapLayer=a;});IndoorMapControl.prototype.initialize=function(a){this.indoormaps=this.indoorMapLayer.indoormaps;this.buttonHeight=44;this.drumHeight=this.buttonHeight*6;this.listlength=0;this.minTop=0;this.maxTop=0;this.listTop;this.prevY;this.diffY;this.mosuedown=false;this.dragging=false;this.setFloorIdTime;
this.node=$('<div id="yolp-ctrl-floor-drum"></div>');this.scaler=$('<div id="scaler"></div>');this.list;this.node.css({width:"60px",height:this.drumHeight+"px",align:"center",padding:"0px",overflow:"hidden","background-color":"#ddd","border-radius":"8px",border:"solid 1px #aaa",opacity:".8",filter:"alpha(opacity=80)"}).bind("selectstart",function(){return false;});if(Y.Util.Platform.isSupportTouchScroll){this.node.css({"-webkit-user-select":"none","-webkit-tap-highlight-color":"rgba(0,0,0,0)"});
}this.scaler.css({position:"absolute",top:(this.drumHeight/2-this.buttonHeight/2)+"px",left:"2px",width:"54px",height:this.buttonHeight+"px","background-color":"#a55",border:"solid 1px #d22",opacity:".8",filter:"alpha(opacity=80)"});this.node.append(this.scaler);a.mainContainer.append(this.node);var b=this;this._mousedown=function(c){b.mosuedown=true;b.prevY=c.pageY?c.pageY:c.originalEvent.touches[0].pageY;
b.diffY=0;};this._mousemove=function(d){if(b.mosuedown){b.dragging=true;var c=d.pageY?d.pageY:d.originalEvent.touches[0].pageY;b.diffY=c-b.prevY;var f=b.listTop+b.diffY;f=b._range(f);b.list.css("top",f+"px");}};this._mouseup=function(g){if(b.dragging){var j=b.listTop+b.diffY;j=b._range(j);var f=b._ddjust(j);b.list.css("top",f+"px");b.listTop=f;var i=b._createFloorId(f);b.setFloorId(i);}else{if(b.mosuedown){var c=b.prevY;
var h=c-b.node.offset().top;var d=h-b.drumHeight/2;var j=b.listTop-d;j=b._range(j);var f=b._ddjust(j);b.list.css("top",f+"px");b.listTop=f;var i=b._createFloorId(f);b.setFloorId(i);}}b.mosuedown=false;b.dragging=false;};this._mousewheel=function(d,g){b.diffY=(g>0)?b.buttonHeight:-b.buttonHeight;var f=b.listTop+b.diffY;f=b._range(f);var c=b._ddjust(f);b.list.css("top",c+"px");b.listTop=c;if(b.setFloorIdTime){clearTimeout(b.setFloorIdTime);
}b.setFloorIdTime=setTimeout(function(){var e=b._createFloorId(c);b.setFloorId(e);},300);d.stopPropagation();d.preventDefault();};if(a.configure.touchSupport&&Y.Util.IS_TOUCH_SCREEN){this.node.bind("touchstart",this._mousedown);$(window).bind("touchmove",this._mousemove);$(window).bind("touchend",this._mouseup);}else{this.node.bind("mousedown",this._mousedown);this.node.bind("mousewheel",this._mousewheel);
if($.browser.msie){this.map.mainContainer.bind("mousemove",this._mousemove);this.map.mainContainer.bind("mouseup",this._mouseup);}else{$(window).bind("mousemove",this._mousemove);$(window).bind("mouseup",this._mouseup);}}this.createList();this._indoormaplayerchanged=this.indoorMapLayer.bind("indoormaplayerchanged",function(){b.indoormaps=b.indoorMapLayer.indoormaps;b.createList();});this._zoomend=this.map.bind("zoomend",function(){b.createList();
});return this.node;};IndoorMapControl.prototype.isDisplay=function(){if(this.indoormaps&&this.indoormaps.length>0){if(this.indoormaps[0].layers&&this.indoormaps[0].layers.length){var b=this.indoormaps[0].layers[this.indoormaps[0].layers.length-1];var a=this.indoormaps[0].layers[0];b=Y.Util.scale2Level(b);a=Y.Util.scale2Level(a);var c=this.map.getZoom();if(b<=c&&c<=a){return true;}}}return false;};
IndoorMapControl.prototype.createList=function(){if(this.isDisplay()){this.floorCount=this.indoormaps[0].floorlevels.length;this.listlength=this.floorCount*this.buttonHeight;this.minTop=this.drumHeight/2+(this.buttonHeight/2)-this.listlength;this.maxTop=this.drumHeight/2;var j=this.indoorMapLayer.floorId;var a=this.indoormaps[0].floorids.length-1;var e=this.indoormaps[0].floorlevels;var f=0;for(var b=0;
b<this.indoormaps[0].floorids.length;b++){if(j===this.indoormaps[0].floorids[b]){f=b;}}this.listTop=((this.drumHeight/2)-((a-f)*this.buttonHeight))-(this.buttonHeight/2);this.listTop=this._ddjust(this.listTop);if(this.list){this.list.remove();}this.list=$('<div id="drum-list" style="display:block;"></div>');this.list.css({position:"absolute",top:this.listTop+"px",left:"0px",width:this.buttonHeight+"px",height:this.listlength+"px",dispaly:"block"}).bind("selectstart",function(){return false;
});var d=e.length-1;var h=0;for(var b=d;b>=0;b--){var g=$("<div>"+e[b]+"</div>");g.css({position:"absolute",top:h*this.buttonHeight+"px",width:"60px",height:this.buttonHeight+"px","text-align":"center"});this.list.append(g);h++;}this.node.append(this.list);this.show();}else{this.hide();}};IndoorMapControl.prototype.remove=function(){if(this.map.configure.touchSupport&&Y.Util.IS_TOUCH_SCREEN){$(window).unbind("touchmove",this._mousemove);
$(window).unbind("touchend",this._mouseup);}else{if($.browser.msie){this.map.mainContainer.unbind("mousemove",this._mousemove);this.map.mainContainer.unbind("mouseup",this._mouseup);}else{$(window).unbind("mousemove",this._mousemove);$(window).unbind("mouseup",this._mouseup);}}this.map.unbind(this._zoomend);if(this.node){this.node.unbind();this.node.remove();this.node=null;}};IndoorMapControl.prototype.setFloorId=function(a){this.indoorMapLayer.setFloorId(a);
};Control.prototype.getDefaultPosition=function(){return new Y.ControlPosition(Y.ControlPosition.BOTTOM_LEFT,new Size(10,20));};IndoorMapControl.prototype._createFloorId=function(b){var c=0;if(this.indoormaps&&this.indoormaps.length>0){var a=this.indoormaps[0].floorids.length-1-Math.abs((b+8)-(this.drumHeight/2))/this.buttonHeight;c=this.indoormaps[0].floorids[a];}return c;};IndoorMapControl.prototype._ddjust=function(a){return this.buttonHeight*Math.round((a+8)/this.buttonHeight)-8;
};IndoorMapControl.prototype._range=function(a){a=(a>this.maxTop)?this.maxTop:a;a=(a<this.minTop)?this.minTop:a;return a;};var IndoorMapControl=Y.IndoorMapControl=Y.extend(Y.Control,function(a,b){this.options=b||{};this.indoorMapLayer=a;});IndoorMapControl.prototype.initialize=function(a){this.indoormaps=this.indoorMapLayer.indoormaps;this.buttonHeight=44;this.drumHeight=this.buttonHeight*6;this.listlength=0;this.minTop=0;this.maxTop=0;this.listTop;this.prevY;this.diffY;this.mosuedown=false;this.dragging=false;this.setFloorIdTime;
this.node=$('<div id="yolp-ctrl-floor-drum"></div>');this.scaler=$('<div id="scaler"></div>');this.list;this.node.css({width:"60px",height:this.drumHeight+"px",align:"center",padding:"0px",overflow:"hidden","background-color":"#ddd","border-radius":"8px",border:"solid 1px #aaa",opacity:".8",filter:"alpha(opacity=80)"}).bind("selectstart",function(){return false;});if(Y.Util.Platform.isSupportTouchScroll){this.node.css({"-webkit-user-select":"none","-webkit-tap-highlight-color":"rgba(0,0,0,0)"});
}this.scaler.css({position:"absolute",top:(this.drumHeight/2-this.buttonHeight/2)+"px",left:"2px",width:"54px",height:this.buttonHeight+"px","background-color":"#a55",border:"solid 1px #d22",opacity:".8",filter:"alpha(opacity=80)"});this.node.append(this.scaler);a.mainContainer.append(this.node);var b=this;this._mousedown=function(c){b.mosuedown=true;b.prevY=c.pageY?c.pageY:c.originalEvent.touches[0].pageY;
b.diffY=0;};this._mousemove=function(d){if(b.mosuedown){b.dragging=true;var c=d.pageY?d.pageY:d.originalEvent.touches[0].pageY;b.diffY=c-b.prevY;var f=b.listTop+b.diffY;f=b._range(f);b.list.css("top",f+"px");}};this._mouseup=function(g){if(b.dragging){var j=b.listTop+b.diffY;j=b._range(j);var f=b._ddjust(j);b.list.css("top",f+"px");b.listTop=f;var i=b._createFloorId(f);b.setFloorId(i);}else{if(b.mosuedown){var c=b.prevY;
var h=c-b.node.offset().top;var d=h-b.drumHeight/2;var j=b.listTop-d;j=b._range(j);var f=b._ddjust(j);b.list.css("top",f+"px");b.listTop=f;var i=b._createFloorId(f);b.setFloorId(i);}}b.mosuedown=false;b.dragging=false;};this._mousewheel=function(d,g){b.diffY=(g>0)?b.buttonHeight:-b.buttonHeight;var f=b.listTop+b.diffY;f=b._range(f);var c=b._ddjust(f);b.list.css("top",c+"px");b.listTop=c;if(b.setFloorIdTime){clearTimeout(b.setFloorIdTime);
}b.setFloorIdTime=setTimeout(function(){var e=b._createFloorId(c);b.setFloorId(e);},300);d.stopPropagation();d.preventDefault();};if(a.configure.touchSupport&&Y.Util.IS_TOUCH_SCREEN){this.node.bind("touchstart",this._mousedown);$(window).bind("touchmove",this._mousemove);$(window).bind("touchend",this._mouseup);}else{this.node.bind("mousedown",this._mousedown);this.node.bind("mousewheel",this._mousewheel);
if($.browser.msie){this.map.mainContainer.bind("mousemove",this._mousemove);this.map.mainContainer.bind("mouseup",this._mouseup);}else{$(window).bind("mousemove",this._mousemove);$(window).bind("mouseup",this._mouseup);}}this.createList();this._indoormaplayerchanged=this.indoorMapLayer.bind("indoormaplayerchanged",function(){b.indoormaps=b.indoorMapLayer.indoormaps;b.createList();});this._zoomend=this.map.bind("zoomend",function(){b.createList();
});return this.node;};IndoorMapControl.prototype.isDisplay=function(){if(this.indoormaps&&this.indoormaps.length>0){if(this.indoormaps[0].layers&&this.indoormaps[0].layers.length){var b=this.indoormaps[0].layers[this.indoormaps[0].layers.length-1];var a=this.indoormaps[0].layers[0];b=Y.Util.scale2Level(b);a=Y.Util.scale2Level(a);var c=this.map.getZoom();if(b<=c&&c<=a){return true;}}}return false;};
IndoorMapControl.prototype.createList=function(){if(this.isDisplay()){this.floorCount=this.indoormaps[0].floorlevels.length;this.listlength=this.floorCount*this.buttonHeight;this.minTop=this.drumHeight/2+(this.buttonHeight/2)-this.listlength;this.maxTop=this.drumHeight/2;var j=this.indoorMapLayer.floorId;var a=this.indoormaps[0].floorids.length-1;var e=this.indoormaps[0].floorlevels;var f=0;for(var b=0;
b<this.indoormaps[0].floorids.length;b++){if(j===this.indoormaps[0].floorids[b]){f=b;}}this.listTop=((this.drumHeight/2)-((a-f)*this.buttonHeight))-(this.buttonHeight/2);this.listTop=this._ddjust(this.listTop);if(this.list){this.list.remove();}this.list=$('<div id="drum-list" style="display:block;"></div>');this.list.css({position:"absolute",top:this.listTop+"px",left:"0px",width:this.buttonHeight+"px",height:this.listlength+"px",dispaly:"block"}).bind("selectstart",function(){return false;
});var d=e.length-1;var h=0;for(var b=d;b>=0;b--){var g=$("<div>"+e[b]+"</div>");g.css({position:"absolute",top:h*this.buttonHeight+"px",width:"60px",height:this.buttonHeight+"px","text-align":"center"});this.list.append(g);h++;}this.node.append(this.list);this.show();}else{this.hide();}};IndoorMapControl.prototype.remove=function(){if(this.map.configure.touchSupport&&Y.Util.IS_TOUCH_SCREEN){$(window).unbind("touchmove",this._mousemove);
$(window).unbind("touchend",this._mouseup);}else{if($.browser.msie){this.map.mainContainer.unbind("mousemove",this._mousemove);this.map.mainContainer.unbind("mouseup",this._mouseup);}else{$(window).unbind("mousemove",this._mousemove);$(window).unbind("mouseup",this._mouseup);}}this.map.unbind(this._zoomend);if(this.node){this.node.unbind();this.node.remove();this.node=null;}};IndoorMapControl.prototype.setFloorId=function(a){this.indoorMapLayer.setFloorId(a);
};Control.prototype.getDefaultPosition=function(){return new Y.ControlPosition(Y.ControlPosition.BOTTOM_LEFT,new Size(10,20));};IndoorMapControl.prototype._createFloorId=function(b){var c=0;if(this.indoormaps&&this.indoormaps.length>0){var a=this.indoormaps[0].floorids.length-1-Math.abs((b+8)-(this.drumHeight/2))/this.buttonHeight;c=this.indoormaps[0].floorids[a];}return c;};IndoorMapControl.prototype._ddjust=function(a){return this.buttonHeight*Math.round((a+8)/this.buttonHeight)-8;
};IndoorMapControl.prototype._range=function(a){a=(a>this.maxTop)?this.maxTop:a;a=(a<this.minTop)?this.minTop:a;return a;};var HomeControl=Y.HomeControl=Y.extend(Y.Control,function(a){this.options=a||{};this.visible=(typeof this.options.visible!=="undefined")?this.options.visible:true;this.popup=(typeof this.options.popup!=="undefined")?this.options.popup:true;this.latlng=this.options.latlng||null;this.visibleButton=(typeof this.options.visibleButton!=="undefined")?this.options.visibleButton:true;this.draggable=this.options.draggable||false;
this._isHideMarker=false;});HomeControl.prototype.initialize=function(b){var d=this,a;var c=this.latlng||b.getCenter();if(this.visibleButton){a=this.node=$('<p class="yolp-home-on" style="cursor:pointer;margin:0;"></p>').append($('<img src="'+Y.CTRL_IMAGE_URL+'" alt="\u76ee\u5370\u306b\u623b\u308b" />').loadAlphaImage());a.bind("click",function(){if(d.isVisibleHomeIcon()){d.panToHome();}else{d.showIcon();}});}if(this.visible){this.showIcon(c);
}else{this.hideIcon();}return a;};HomeControl.prototype.isVisibleHomeIcon=HomeControl.prototype.isHome=function(){return this.visible;};HomeControl.prototype.getLatLng=function(){if(this.marker){return this.marker.getLatLng();}};HomeControl.prototype.setIcon=function(c){var a=c||this.map.getCenter();var d=this;if(!this.visible){return;}if(a){if(this.marker){this.map.closeInfoWindow();this.getMarkerPlotLayer().removeFeature(this.marker);
}var b=new Y.Icon();b.iconHtml="<p class='yolp-h'><img src='http://i.yimg.jp/images/map/api/yolp/images/yolp_icn.png' alt='' /></p>";b.iconAnchor=new Y.Point(12,34);if(this.draggable){this.marker=new Y.Marker(a,{icon:b,draggable:true,title:"\u76ee\u5370\u3092\u30c9\u30e9\u30c3\u30b0\u3067\u304d\u307e\u3059"});}else{this.marker=new Y.Marker(a,{icon:b});}this.getMarkerPlotLayer().addFeature(this.marker);if(this.visibleButton){this.marker.bind("click",function(){var g=$("<div class='yolp-home'></div>");
var e=$("<p style='padding-bottom:2px;'></p>");g.append(e);var f=$("<a href='javascript:void(0)'>\u76ee\u5370\u3092\u975e\u8868\u793a\u306b\u3059\u308b</a>").click(function(h){h.stopPropagation();d.hideIcon();});e.append(f);e.append("\u76ee\u5370\u306e\u518d\u8868\u793a\uff1a\u5730\u56f3\u306e"+d.embedPosition()+"\u306e");e.append($('<img src="http://i.yimg.jp/images/clear.gif" alt="\u76ee\u5370\u3092\u4e2d\u5fc3\u70b9\u306b\u8868\u793a\u3059\u308b"  style="width: 20px; height: 20px; background:url('+Y.CTRL_IMAGE_URL+') -84px -54px no-repeat;" />').loadAlphaImage({size:new Y.Size(20,20)}));
e.append("\u3092\u30af\u30ea\u30c3\u30af");if(d.popup){d.marker.openInfoWindow(g);}});}}this.map.bind("dragend",function(){var e=d.map.getBounds();if(!e.containsLatLng(d.getLatLng())){d.map.closeInfoWindow();}});};HomeControl.prototype.embedPosition=function(){if(!this.position){return"";}switch(this.position.anchor){case Y.ControlPosition.TOP_RIGHT:return"\u53f3\u4e0a";case Y.ControlPosition.TOP_LEFT:return"\u5de6\u4e0a";case Y.ControlPosition.BOTTOM_RIGHT:return"\u53f3\u4e0b";
case Y.ControlPosition.BOTTOM_LEFT:return"\u5de6\u4e0b";}};HomeControl.prototype.panToHome=function(){if(this.isVisibleHomeIcon()){this.map.panTo(this.marker.getLatLng(),true);}};HomeControl.prototype.showIcon=function(a){this.visible=true;if(this.node){this.node.attr("title","\u76ee\u5370\u306b\u623b\u308b");this.node.attr("className","yolp-home-on");}this.setIcon(a);};HomeControl.prototype.hideIcon=function(){this.map.closeInfoWindow();
if(this.marker){this.getMarkerPlotLayer().removeFeature(this.marker);}if(this.node){this.node.attr("title","\u76ee\u5370\u3092\u4e2d\u5fc3\u70b9\u306b\u8868\u793a\u3059\u308b");this.node.attr("className","yolp-home-off");}this.visible=false;};HomeControl.prototype.hide=function(){if(this.visible===true){this.hideIcon();this._isHideMarker=true;}if(this.visibleButton===true){Y.Control.prototype.hide.call(this);}};HomeControl.prototype.show=function(){if(this._isHideMarker===true){this.showIcon();
this._isHideMarker=false;}if(this.visibleButton===true){Y.Control.prototype.show.call(this);}};HomeControl.prototype.isVisible=function(){if(this.visibleButton===true){return Y.Control.prototype.isVisible.call(this);}else{return this.visible;}};HomeControl.prototype.getDefaultPosition=function(){return new Y.ControlPosition(Y.ControlPosition.TOP_RIGHT,new Y.Size(5,5));};HomeControl.prototype.remove=function(){if(this.marker){this.getMarkerPlotLayer().removeFeature(this.marker);
}this.node.remove();};HomeControl.prototype.printable=function(){return false;};HomeControl.prototype.getMarkerPlotLayer=function(){var a=Y.Cache.get(Y.Cache.KEY_PLOT_LAYER);if(!a){a=new Y.FeatureLayer("label");Y.Cache.set(Y.Cache.KEY_PLOT_LAYER,a);}if(!a.isInitialized()){var b=this.map;b.addLayer(a);}return a;};var UBCountControl=Y.UBCountControl=Y.extend(Y.Control,function(a){this.options=a||{};this.param=this.options.param||{};this.tag='<!-- SpaceID=0 robot -->';});UBCountControl.prototype.initialize=function(a){this.map=a;var b=this;if(this.tag){this.node=this.container=$('<div id="yolp_mapcount"></div>');this.node.append(this.tag);}return this.node;};var LayerSet=Y.LayerSet=function(c,e,b){this.name=c;this.layers=e||[];this.layerList=new Y.LayerList();for(var d=0,a=this.layers.length;d<a;d++){this.layerList.add(this.layers[d]);}this.options=b||{};this.maxZoom=this.options.maxZoom||20;this.minZoom=this.options.minZoom||1;this.enable=true;this.hidden=false;this.projection=this.options.projection||new Y.MercatorProjection();this.magnify=1;if(Y.Util.Platform.isAndroid){if(Y.Util.Platform.devicePixelRatio>1&&Y.Util.Platform.devicePixelRatio<2){this.magnify=1.5;
}else{if(Y.Util.Platform.devicePixelRatio<3){this.magnify=2;}else{this.magnify=Math.round(Y.Util.Platform.devicePixelRatio);}}}else{if(Y.Util.Platform.devicePixelRatio>1&&Y.Util.Platform.devicePixelRatio<2){this.magnify=1.4140625;}else{if(Y.Util.Platform.devicePixelRatio>=2){this.magnify=2;}}}};LayerSet.prototype.initialize=function(d){this.map=d;var b=Y.DEFAULT_TILE_SIZE*this.magnify/Y.Util.Platform.devicePixelRatio;
if(Y.Util.Platform.isAndroid){b=Math.round(b);if(b%2!==0){++b;}}for(var a=0,c=this.layers.length;a<c;a++){if(!this.layers[a].isInitialized()){this.layers[a].initialize(d);if(this.layers[a].isTileLayer){this.layers[a].tileSize=new Y.Size(Math.round(b),Math.round(b));this.layers[a].floatTileSize=new Y.Size(b,b);}}}this.projection.setTilePixel(b);this.createCopyrightNode();};LayerSet.prototype.draw=function(c){this.copyrightDraw();
for(var a=0,b=this.layers.length;a<b;a++){this.layers[a].draw(c);}};LayerSet.prototype.adjustLayerOrder=function(){var a=this.map.getMapContainer();this.layerList.forEach(function(c){var b=c.getContainer();if(b){a.appendChild(b[0]);}});};LayerSet.prototype.getName=function(){return this.name;};LayerSet.prototype.setName=function(a){this.name=a;};LayerSet.prototype.getFullName=function(){return this.options.fullName||this.name;
};LayerSet.prototype.setFullName=function(a){this.options.fullName=a;};LayerSet.prototype.addLayer=function(b){if(!b){return;}if(!b.isInitialized()){b.initialize(this.map);}if(b.isTileLayer){var a=Math.round(Y.DEFAULT_TILE_SIZE*this.magnify/Y.Util.Platform.devicePixelRatio);if(Y.Util.Platform.isAndroid){if(a%2!==0){++a;}}b.tileSize=new Y.Size(a,a);}this.layers.push(b);this.layerList.add(b);};LayerSet.prototype.removeLayer=function(b){var d=[];
for(var a=0,c=this.layers.length;a<c;a++){if(this.layers[a]!=b){d.push(this.layers[a]);}else{this.layerList.remove(b);this.layers[a].remove();}}this.layers=d;};LayerSet.prototype.onPan=function(a,d){for(var b=0,c=this.layers.length;b<c;b++){if(this.layers[b].onPan){this.layers[b].onPan(a,d);}}};LayerSet.prototype.remove=function(b){for(var d in this.layers){if(!this.layers.hasOwnProperty(d)){continue;
}var a=this.layers[d];if(b){var e=false;for(var c in b.layers){if(!b.layers.hasOwnProperty(c)){continue;}if(a==b.layers[c]){e=true;}}if(!e){a.remove();}}else{a.remove();}}this.copyrightRemove();};LayerSet.prototype.getLayers=function(){return this.layers;};LayerSet.prototype.getLayerByName=function(b){for(var c=0;c<this.layers.length;c++){var a=this.layers[c];if(a.getName()==b){return a;}}};LayerSet.prototype.setMinZoom=function(a){this.minZoom=a;
};LayerSet.prototype.getMinZoom=function(){return this.minZoom;};LayerSet.prototype.setMaxZoom=function(a){this.maxZoom=a;};LayerSet.prototype.getMaxZoom=function(){if(this.map.indoorMaxZoom){return this.map.indoorMaxZoom;}return this.maxZoom;};LayerSet.prototype.getEnable=function(){return this.enable;};LayerSet.prototype.setEnable=function(a){this.enable=a;};LayerSet.prototype.setHidden=function(a){this.hidden=a;
};LayerSet.prototype.getHidden=function(a){return this.hidden;};LayerSet.prototype.copyrightDraw=function(){var f=this.map.getBounds();var e=this.map.getZoom();var j=[];for(var a=0,d=this.layers.length;a<d;a++){var h=this.layers[a].getCopyrightCollection();if(h){var b=h.getCopyrightNotice(f,e);j=j.concat(b);}}if(this.copyrightContainer){var g=this.copyrightContainer.children();g.each(function(){var c=$(this);
if(c.attr("cr")){c.html(j.join(","));}});}if(!this.copyrightAppended){this.map.mainContainer.append(this.copyrightContainer);this.copyrightAppended=true;}};LayerSet.prototype.createCopyrightNode=function(){var b=this.copyrightContainer=$('<div class="yjm-copyright"></div>').css({left:"1px",bottom:"1px",position:"absolute"});var a=$("<div></div>").css({position:"static",fontSize:"12px",fontFamily:"Arial, Helvetica, sans-serif",fontWeight:"bold",textAlign:"left",paddingBottom:"0px",paddingLeft:"0px",paddingRight:"0px",paddingTop:"0px",marginBottom:"0px",marginLeft:"0px",marginRight:"0px",marginTop:"0px",lineHeight:"100%",MozUserSelect:"none"}).attr("cr",true);
a.unselectable="on";a.onselectstart=function(){return false;};a.oncontextmenu=function(){return false;};if(Y.Util.Platform.isIPhone){b.css("-webkit-transform","translate3d(0, 0, 0)");}b.append(a);};LayerSet.prototype.copyrightRemove=function(){if(this.copyrightContainer){this.copyrightContainer.remove();}this.copyrightAppended=false;};LayerSet.prototype.setImageTileCustomStyle=function(c,d){var e=this.layers;
for(var b=0,a=e.length;b<a;b++){if(typeof e[b].setCustomStyle==="function"){e[b].setCustomStyle(c,d);}}};var Layer=Y.Layer=function(b,a){this.name=b;this.container=null;this.zIndex=0;this.initialized=false;this.options=a||{};this.copyrightCollection=this.options.copyrightCollection;};Layer.prototype.initialize=function(a){this.map=a;this.initialized=true;};Layer.prototype.isInitialized=function(){return this.initialized;};Layer.prototype.isSystemLayer=function(){if(!this.initialized){return false;}return this.map.getSystemLayer()===this;
};Layer.prototype.remove=function(){if(this.container){this.container.remove();this.container=null;}if(this.drawer){this.drawer=null;}this.initialized=false;};Layer.prototype.draw=function(b){if(!this.container||b){if(this.container){this.container.empty();this.drawLayer(b);return;}var a=this.options.className||"yolp-layer";var c=$('<div class="'+a+'" style="position:absolute;left:0px;top:0px;z-index:'+this.zIndex+'" name="'+this.name+'"></div>');
this.map.mapContainer.append(c);this.container=c;Y.Event.trigger(this,"containerRefreshed");}this.drawLayer(b);};Layer.prototype.drawLayer=function(a){};Layer.prototype.isDrawn=function(){return(this.container!=null);};Layer.prototype.setName=function(a){this.name=a;};Layer.prototype.getName=function(){return this.name;};Layer.prototype.getContainer=function(){return this.container;};Layer.prototype.getMap=function(){return this.map;
};Layer.prototype.getMapContainer=function(){return this.map.mapContainer;};Layer.prototype.initDrawer=function(){if(!this.isSystemLayer()){this.drawer=this.map.getSystemLayer().getDrawer();}else{var b=this.drawContainer=this.createDrawContainer();var a=this.getContainer();$(a).append(b);this.drawer=new Drawer(b[0]);}};Layer.prototype.getDrawer=function(){if(!this.drawer){this.initDrawer();}return this.drawer;
};Layer.prototype.fromContainerPixelToLatLng=function(a){return this.map.fromContainerPixelToLatLng(a);};Layer.prototype.fromDivPixelToLatLng=function(a){return this.map.fromDivPixelToLatLng(a);};Layer.prototype.fromLatLngToContainerPixel=function(a){return this.map.fromLatLngToContainerPixel(a);};Layer.prototype.fromLatLngToDivPixel=function(a){return this.map.fromLatLngToDivPixel(a);};Layer.prototype.fromLatLngsToDivPixels=function(a,b){return this.map.fromLatLngsToDivPixels(a,b);
};Layer.prototype.fromLatLngToTile=function(a){return this.map.fromLatLngToTile(a);};Layer.prototype.fromTileToLatLng=function(c,b,a,d){return this.map.fromTileToLatLng(c,b,a,d);};Layer.prototype.bind=function(a,b,d){var c=Event.addListener(this,a,b,d);return c;};Layer.prototype.unbind=function(a){Event.removeListener(a);};Layer.prototype.getCopyrightCollection=function(){return this.copyrightCollection;
};Layer.prototype.hasFeature=function(){return false;};Layer.prototype.show=function(){this.container.css("visibility","visible");};Layer.prototype.hide=function(){this.container.css("visibility","hidden");};Layer.prototype.isHidden=function(){return this.container.css("visibility")=="hidden";};var LayerList=Y.LayerList=function(){this.firstNode=null;this.lastNode=null;this.size=0;};LayerList.prototype.add=function(b,c){if(!this.firstNode){this.firstNode=this.lastNode=new LayerListNode(b);this.size++;return;}var a=c||this.lastNode;var d=new LayerListNode(b,a,a.getNextNode());a.setNextNode(d);if(a===this.lastNode){this.lastNode=d;}this.size++;};LayerList.prototype.remove=function(c){for(var d=this.firstNode;
d;d=d.getNextNode()){if(d.getLayer()===c){var b=d.getPrevNode();var a=d.getNextNode();if(d===this.firstNode){this.firstNode=a;}else{b.setNextNode(a);}if(d===this.lastNode){this.lastNode=b;}else{a.setPrevNode(b);}d.destruct();this.size--;return;}}};LayerList.prototype.forEach=function(c,b){for(var a=this.firstNode;a;a=a.getNextNode()){c.call(b,a.getLayer());}};LayerList.prototype.isEmpty=function(){return(this.size===0);
};LayerList.prototype.count=function(){return this.size;};LayerList.prototype.getFirstNode=function(){return this.firstNode;};LayerList.prototype.getLastNode=function(){return this.lastNode;};LayerList.prototype.clear=function(){this.firstNode=null;this.lastNode=null;this.size=0;};var LayerListNode=Y.LayerListNode=function(c,b,a){this.layer=c;this.prevNode=b||null;this.nextNode=a||null;};LayerListNode.prototype.getLayer=function(){return this.layer;
};LayerListNode.prototype.setNextNode=function(a){this.nextNode=a;};LayerListNode.prototype.getNextNode=function(){return this.nextNode;};LayerListNode.prototype.setPrevNode=function(a){this.prevNode=a;};LayerListNode.prototype.getPrevNode=function(){return this.prevNode;};LayerListNode.prototype.destruct=function(){this.layer=null;this.prevNode=null;this.nextNode=null;};var FeatureLayer=Y.FeatureLayer=Y.extend(Layer,function(a){this.features=[];Layer.apply(this,[a,{}]);});FeatureLayer.prototype.initialize=function(){Layer.prototype.initialize.apply(this,arguments);this.zIndex=1;if(!this.features){this.features=[];}for(var b=0,a=this.features.length;b<a;b++){this.features[b].initialize(this);}this.drawContainerSize=5000;if(this.isSystemLayer()){this.mapSize=this.map.getSize();
this.scrollOffset=new Y.Point(0,0);this.evtResize=this.map.bind("resize",this.onMapResize,this);this.vectorOffset=new Y.Point(this.drawContainerSize,this.drawContainerSize);}else{this.vectorOffset=this.map.getSystemLayer().vectorOffset;}this.evtOffset=this.map.getSystemLayer().bind("drawcontainerchanged",this.renewOffset,this);};FeatureLayer.prototype.createDrawContainer=function(){var c=-this.drawContainerSize,d=-this.drawContainerSize;
var b=this.drawContainerSize*2,e=this.drawContainerSize*2;var a=$('<div style="position: absolute; top: '+d+"px; left: "+c+"px; text-align: justify; width: "+b+"px; height: "+e+'px; z-index:0"></div>');return a;};FeatureLayer.prototype.onPan=function(a,i){if(!this.isSystemLayer()){return;}this.scrollOffset.offset(a,i);var h=this.mapSize.height-this.drawContainerSize;var f=this.drawContainerSize;var c=this.mapSize.width-this.drawContainerSize;
var g=this.drawContainerSize;if(this.scrollOffset.x<c||this.scrollOffset.x>g||this.scrollOffset.y<h||this.scrollOffset.y>f){var d=this.map.getMapContainerXY();this.drawer.clear();this.drawContainer.css({top:+(-this.drawContainerSize-d.y)+"px",left:(-this.drawContainerSize-d.x)+"px"});this.scrollOffset=new Y.Point(0,0);var b=new Y.Point(-(-this.drawContainerSize-d.x),-(-this.drawContainerSize-d.y));
Y.Event.trigger(this,"drawcontainerchanged",b);}};FeatureLayer.prototype.addFeature=function(a){if(!this.initialized){return;}a.initialize(this);this.features.push(a);a.draw(true);Event.trigger(this,"addfeature",a);};FeatureLayer.prototype.addFeatures=function(c){if(!this.initialized){return;}for(var b=0,a=c.length;b<a;b++){c[b].initialize(this);this.features.push(c[b]);}this.draw(true);Event.trigger(this,"addfeatures",c);
};FeatureLayer.prototype.removeFeature=function(c,g){var e;for(var b=0,a=this.features.length;b<a;b++){var d=this.features[b];if(c==d){d.remove();this.features.splice(b,1);}}if(g==undefined||g){this.draw(true);}Event.trigger(this,"removefeature",c);};FeatureLayer.prototype.draw=function(h){var j=this.fromLatLngToDivPixel(new LatLng(0,0));var a=Math.round(j.x);if(this.pixelX!=a){h=true;this.pixelX=a;
}if(!this.isDrawn()){Layer.prototype.draw.apply(this,arguments);this.initDrawer();}if(this.drawer&&h){for(var d=0,b=this.features.length;d<b;d++){var g=this.features[d];if(!g.isRaster()){g.remove();}}}var e=this.features.length;if(e===1){var c=this.features[0];if(c.isDrawn()){if(h||c.isRaster()){c.adjust();}}else{c.draw(h);}}else{if(e>=2){for(var d=0;d<e;d++){var c=this.features[d];if(c.isDrawn()){if(h||c.isRaster()){c.adjust();
}}else{c.draw(h);}}}}};FeatureLayer.prototype.getFeatures=function(){return this.features;};FeatureLayer.prototype.remove=function(){for(var b=0,a=this.features.length;b<a;b++){this.features[b].remove();}this.map.getSystemLayer().unbind(this.evtOffset);if(this.evtResize){this.map.unbind(this.evtResize);}Layer.prototype.remove.apply(this);};FeatureLayer.prototype.clearFeatures=function(){for(var b=0,a=this.features.length;
b<a;b++){this.features[b].remove();}this.features=[];};FeatureLayer.prototype.hasFeature=function(){return this.features.length>=1;};FeatureLayer.prototype.onMapResize=function(){var b=this.mapSize;var a=this.mapSize=this.map.getSize();if(b.hasSmallerSide(a)){this.onPan(-parseInt(a.width-b.width),-parseInt(a.height-b.height));}};FeatureLayer.prototype.renewOffset=function(d){this.vectorOffset=d;if(!this.hasFeature()){return;
}for(var c=0,a=this.features.length;c<a;c++){var b=this.features[c];if(!b.isRaster()){b.draw(true);}}};FeatureLayer.prototype.getDrawBounds=function(){return new Y.Bounds([new Y.Point(0,0),new Y.Point(this.drawContainerSize*2,this.drawContainerSize*2)]);};FeatureLayer.prototype.getSuitedBounds=function(){var j=new Y.LatLngBounds(),g=this.features,p=g.length;for(var q=0;q<p;++q){j.extend(g[q].getLatLng());
}var v=this.map,a=v.getBoundsZoomLevel(j),m=v.getZoom()-a,r=(m<1)?(1/Math.pow(2,Math.abs(m))):Math.pow(2,m);var u=j.getCenter(),k=a;if(m>=0){for(q=0;q<p;++q){var s=g[q];if(s.isRaster()&&s.icon){var b=s.getContainableBounds(r);j.extend(b.getSouthWest());j.extend(b.getNorthEast());}else{j.extend(s.getLatLng());}}}else{var d={sw:new Y.Size(0,0),ne:new Y.Size(0,0)};for(q=0;q<p;++q){var s=g[q];if(s.isRaster()&&s.icon){var n=s.getContainableSize(r);
if(d.sw.width<n.sw.width){d.sw.width=n.sw.width;}if(d.sw.height<n.sw.height){d.sw.height=n.sw.height;}if(d.ne.width<n.ne.width){d.ne.width=n.ne.width;}if(d.ne.height<n.ne.height){d.ne.height=n.ne.height;}}}var o=j.getSouthWest(),h=j.getNorthEast(),e=this.fromLatLngToDivPixel(o),t=this.fromLatLngToDivPixel(h);j.extend(this.fromDivPixelToLatLng(new Y.Point(e.x-d.sw.width,e.y+d.sw.height))).extend(this.fromDivPixelToLatLng(new Y.Point(t.x+d.ne.width,t.y-d.ne.height)));
}return j;};var Tile=function(c,b,a,d){this.tx=c;this.ty=b;this.x=a;this.y=d;};var TileLayer=Y.TileLayer=Y.extend(Layer,function(b,c,a){this.tileSize=this.floatTileSize=c||new Size(Y.DEFAULT_TILE_SIZE,Y.DEFAULT_TILE_SIZE);this.isTileLayer=true;this.tileArray=[];this.tileCount=0;a=a||{};a.className=a.className||"yolp-tilelayer";Layer.apply(this,[b,a]);this._isHidden=false;this.bind("containerRefreshed",this.reflectContainerDisplay,this);
});TileLayer.prototype.drawLayer=function(d){if(d){this.tileArray=null;delete this.tileArray;this.tileArray=[];this.tileCount=0;}var b=this.map.getProjection();this.geoCenter=this.map.getCenter();this.tileCenter=b.fromLatLngToTile(this.geoCenter,this.map.getZoom());this.fillSize=this.getFillSize();var e=this.fillSize.c-this.tileCount;if(e>0){for(var a=0;a<e;++a){var c=new Y.DomTile(this.createTile());
if(c){this.tileArray.push(c);this.container.append(c.dom);}}}else{if(e<0){for(var a=0;a<-e;++a){var c=this.tileArray.pop();if(c){c.dom.remove();}}}}this.tileCount=this.fillSize.c;this.drawTiles();};TileLayer.prototype.getFillSize=function(){var m=this.map.getSize();var n=Math.ceil(m.width/this.tileSize.width/2);var l=Math.ceil(m.height/this.tileSize.height/2);var b,a,d,i;b=a=n-1;d=i=l-1;if(this.tileCenter.x>this.tileSize.width/2){a++;
}else{b++;}if(this.tileCenter.y>this.tileSize.height/2){d++;}else{i++;}var e=m.width/2;var c=(this.tileSize.width-this.tileCenter.x)+(a*this.tileSize.width);if(c<=e){a++;}var j=this.tileCenter.x+(b*this.tileSize.width);if(j<=e){b++;}var h=m.height/2;var k=(this.tileSize.height-this.tileCenter.y)+(d*this.tileSize.height);if(k<h){d++;}var f=(this.tileCenter.y)+(i*this.tileSize.height);if(f<h){i++;}if(b<=0){b++;
}if(a<=0){a++;}if(d<=0){d++;}if(i<=0){i++;}var g=(b+a+1)*(d+i+1);return{l:b,r:a,t:d,b:i,c:g};};TileLayer.prototype.onPan=function(a,b){this.drawLayer();};TileLayer.prototype.drawTiles=function(){var v=this.map.getSize();var f=this.map.getMapContainerXY();var e=v.width/2-this.tileCenter.x;var c=v.height/2-this.tileSize.height+this.tileCenter.y;var a=new Point(e-f.x,c-f.y);var s=this.fillSize.l;var p=this.fillSize.r;
var h=this.fillSize.t;var A=this.fillSize.b;var P=this.tileCenter.tx;var O=this.tileCenter.ty;var w=this.map.getZoom();var u=[];var L=new Point((P+0.5)*this.tileSize.width,(O+0.5)*this.tileSize.height);for(var G=0,D=this.tileArray.length;G<D;++G){this.tileArray[G].enable=false;}var m=this.map.getProjection();var z=m.getWrapWidth(w);if(z!=Infinity){z/=m.tileSize;z--;}var b=(P-s);var N=(P+p);var C=(O-A);
var o=(O+h);for(var G=b;G<=N;G++){for(var F=C;F<=o;F++){var K=G;if(z!=Infinity){while(K>z){K=K-z-1;}while(K<0){K=K+z+1;}}var M=this.getTileById(K,F);var t=(a.x+(G-P)*this.tileSize.width);var r=(a.y+(O-F)*this.tileSize.height);if(M!=null){M.setPosition(Math.round(t),Math.round(r));M.enable=true;}else{var q=new Point((G+0.5)*this.tileSize.width,(F+0.5)*this.tileSize.height);var H=q.distance(L);var g=new Object();
g.i=G;g.j=F;g.tx=K;g.ty=F;g.x=t;g.y=r;g.name=this.name;u.push({d:H,request:g});}}}u.sort(function(i,d){return i.d-d.d;});this._newTiles=[];for(var E=0;E<u.length;E++){var g=u[E].request;var G=g.i;var F=g.j;var K=g.tx;var J=g.ty;var t=Math.round(g.x);var r=Math.round(g.y);var B=g.name;this.loadTile(K,J,t,r);}var I=this._newTiles;delete this._newTiles;if(I.length>0){this.requestTiles(I);}};TileLayer.prototype.getTileById=function(c,a){for(var d=0,b=this.tileArray.length;
d<b;++d){var e=this.tileArray[d];if(!e.enable&&(e.tx==c)&&(e.ty==a)){return e;}}return null;};TileLayer.prototype.getFirstEditableTile=function(){for(var b=0,a=this.tileArray.length;b<a;++b){var c=this.tileArray[b];if(c.enable==false){return c;}}return null;};TileLayer.prototype.requestTiles=function(a){};TileLayer.prototype.loadTile=function(c,b,a,d){this.drawTile(c,b,a,d);};TileLayer.prototype.createTile=function(){var a;
a=$("<div></div>");a.css({position:"absolute",border:"1px solid #ff0000",width:""+this.tileSize.width+"px",height:""+this.tileSize.height+"px"});return a;};TileLayer.prototype.drawTile=function(c,b,a,e){var d=this.getFirstEditableTile();if(d){d.enable=true;d.dom.css({visibility:"hidden"});d.tx=c;d.ty=b;d.setPosition(a,e);this._newTiles.push({dom:d.dom});}};TileLayer.prototype.show=function(){this._isHidden=false;
if(this.isDrawn()){this.reflectContainerDisplay();}};TileLayer.prototype.hide=function(){this._isHidden=true;if(this.isDrawn()){this.reflectContainerDisplay();}};TileLayer.prototype.reflectContainerDisplay=function(){if(this._isHidden){this.container.css("display","none");}else{this.container.css("display","");}};TileLayer.prototype.isHidden=function(){return this._isHidden;};var ImageTileLayer=Y.ImageTileLayer=Y.extend(TileLayer,function(c,b,a){this.url=b;
this.count=0;this.options=a||{};this.opacity=this.options.opacity||1;this.customStyle=this.options.customStyle||{};this.rangeOfBounds=this.options.rangeOfBounds||null;if(Util.Platform.isRetinaDisplay){this.customStyle["-webkit-transform"]="translate3d(0px, 0px, 0px)";}this.smartphoneOptimize=this.options.smartphoneOptimize||false;this.enableFadeIn=(typeof this.options.enableFadeIn==="undefined")?true:this.options.enableFadeIn;
this.isEnableFadeIn=Util.Platform.isEnableFadeIn;this.MIN_ZOOM_LEVEL=this.options.minZoomLevel||1;this.MAX_ZOOM_LEVEL=this.options.maxZoomLevel||20;TileLayer.apply(this,[c,this.options.tileSize,this.options]);});ImageTileLayer.prototype.createTile=function(){var d=[];d.push("position:absolute");d.push("padding:0px");d.push("visibility:hidden");d.push("border:none");d.push("margin:0px");d.push("width:"+this.tileSize.width+"px");
d.push("height:"+this.tileSize.height+"px");d.push("z-index:0");$.each(this.map.appendImgStyles,function(h,g){d.push(h+":"+g);});var c=this.customStyle;for(var b in c){if(!c.hasOwnProperty(b)){continue;}d.push(b+":"+c[b]);}var f=d.join(";");var a;if($.browser.msie){a='<img onselectstart="return false;" style="'+f+'" />';}else{a='<img style="'+f+'" />';}var e=$(a).disableImageSelect();e.bind("load",function(){$(this).css("visibility","visible");
});e.loadAlphaImage({size:this.tileSize});if(this.opacity&&this.opacity<1){$(e).fadeTo(0,this.opacity);}return e;};ImageTileLayer.prototype.setCustomStyle=function(d,e){this.customStyle[d]=e;var b=this.tileArray,a=b.length;for(var c=0;c<a;c++){var f=b[c].getDom();f.css(d,e);}};ImageTileLayer.prototype.drawTile=function(d,c,g,f){var e=this.getFirstEditableTile();if(e){e.enable=true;e.dom.css({visibility:"hidden"});
e.tx=d;e.ty=c;e.setPosition(g,f);var i=this.map.getZoom();var a=this.getImageSrc(d,c,i);if(!a){return null;}if(this.rangeOfBounds!==null){var h=this.fromTileToLatLng(d,c,0,0),b=this.fromTileToLatLng(d+1,c+1,0,0);tileRangeOfBounds=new Y.LatLngBounds(h,b);if(!this.rangeOfBounds.intersect(tileRangeOfBounds,true)){return;}}this._newTiles.push({url:a,dom:e.dom});}};ImageTileLayer.prototype.setOpacity=function(b){this.opacity=b;
for(var c=0,a=this.tileArray.length;c<a;c++){var d=this.tileArray[c];d.getDom().fadeTo("slow",b);}};ImageTileLayer.prototype.getImageSrc=function(a,g,f){var b=this.url;var e=this.map.getZoom();if(this.MAX_ZOOM_LEVEL&&this.MAX_ZOOM_LEVEL<e){return"";}if(this.MIN_ZOOM_LEVEL&&this.MIN_ZOOM_LEVEL>e){return"";}if(b instanceof Object){b=b[e]||b["0"];this.count=b.length<=this.count?0:this.count;b=b[this.count++];
}var d=b+"x="+a+"&y="+g+"&z="+f;if(this.smartphoneOptimize){var c=Math.round(this.floatTileSize.width*Y.Util.Platform.devicePixelRatio);if(c!==Y.DEFAULT_TILE_SIZE){if(c>512){c=512;}d+="&size="+c;}}return d;};ImageTileLayer.prototype.requestTiles=function(a){var b=a;var c=this;setTimeout(function(){for(var g=0,e=b.length;g<e;g++){var f=b[g]["url"];var h=b[g]["dom"];h[0].src=f;if(c.isEnableFadeIn&&c.enableFadeIn){$(h[0]).hide().fadeIn("slow");
}}b=null;delete b;},0);};Y.NormalLayer=function(){var e=new Y.CopyrightCollection();var c,b=(Y.HOST_NAME==="api.olp.yahoo.co.jp");var d={};d[Y.Map.TYPE.STANDARD]={0:{1:["http://m.map.c.yimg.jp/m?r=1&"],2:["http://m.map.c.yimg.jp/m?mode=gws&r=1&"]}};d[Y.Map.TYPE.SMARTPHONE]={0:{1:["http://m.map.c.yimg.jp/m?r=1&style=base:smartphone&"],2:["http://m.map.c.yimg.jp/m?mode=gws&r=1&"]}};d[Y.Map.TYPE.WEATHER_RADAR]={0:{1:["http://m.map.c.yimg.jp/m?mode=weather-radar&r=1&"],2:["http://m.map.c.yimg.jp/m?mode=gws&r=1&"]}};
var a="http://m.map.c.yimg.jp/m?mode=osm&r=1&";if(b){c=d[Y.Map.TYPE.STANDARD];}else{c=d[Y.Map.TYPE.STANDARD];}return new Y.YahooMapImageTileLayer("NormalMap",c,{copyrightCollection:e,smartphoneOptimize:true,urlSet:d,osmUrl:a});};Y.SmartphoneNormalLayer=function(){var e=new Y.CopyrightCollection();var c,b=(Y.HOST_NAME==="api.olp.yahoo.co.jp");var d={};d[Y.Map.TYPE.STANDARD]={0:{1:["http://m.map.c.yimg.jp/m?r=1&"],2:["http://m.map.c.yimg.jp/m?mode=gws&r=1&"]}};
d[Y.Map.TYPE.SMARTPHONE]={0:{1:["http://m.map.c.yimg.jp/m?r=1&style=base:smartphone&"],2:["http://m.map.c.yimg.jp/m?mode=gws&r=1&"]}};d[Y.Map.TYPE.WEATHER_RADAR]={0:{1:["http://m.map.c.yimg.jp/m?mode=weather-radar&r=1&"],2:["http://m.map.c.yimg.jp/m?mode=gws&r=1&"]}};var a="http://m.map.c.yimg.jp/m?mode=osm&r=1&";if(b){c=d[Y.Map.TYPE.SMARTPHONE];}else{c=d[Y.Map.TYPE.SMARTPHONE];}return new Y.YahooMapImageTileLayer("NormalMap",c,{copyrightCollection:e,smartphoneOptimize:true,urlSet:d,osmUrl:a});
};Y.ForeignLanguageLayer=function(f,c){var g=new Y.CopyrightCollection();var d,b=(Y.HOST_NAME==="api.olp.yahoo.co.jp");if(typeof f==="undefined"){f="ml-en";}if(typeof c==="undefined"){c="ml-en-sp";}var e={};e[Y.Map.TYPE.STANDARD]={0:{1:["http://m.map.c.yimg.jp/m?r=1&mode="+f+"&"],2:["http://m.map.c.yimg.jp/m?r=1&mode="+f+"&"]}};e[Y.Map.TYPE.SMARTPHONE]={0:{1:["http://m.map.c.yimg.jp/m?r=1&mode="+c+"&"],2:["http://m.map.c.yimg.jp/m?r=1&mode="+c+"&"]}};
e[Y.Map.TYPE.WEATHER_RADAR]={0:{1:["http://m.map.c.yimg.jp/m?mode=weather-radar&r=1&"],2:["http://m.map.c.yimg.jp/m?mode=gws&r=1&"]}};var a="http://m.map.c.yimg.jp/m?mode=osm&r=1&";if(b){d=e[Y.Map.TYPE.STANDARD];}else{d=e[Y.Map.TYPE.STANDARD];}return new Y.YahooMapImageTileLayer("NormalMap",d,{copyrightCollection:g,smartphoneOptimize:true,urlSet:e,osmUrl:a});};Y.SmartphoneForeignLanguageLayer=function(e){var f=new Y.CopyrightCollection();
var c,b=(Y.HOST_NAME==="api.olp.yahoo.co.jp");if(typeof e==="undefined"){e="ml-en-sp";}var d={};d[Y.Map.TYPE.STANDARD]={0:{1:["http://m.map.c.yimg.jp/m?r=1&mode="+e+"&"],2:["http://m.map.c.yimg.jp/m?r=1&mode="+e+"&"]}};d[Y.Map.TYPE.SMARTPHONE]={0:{1:["http://m.map.c.yimg.jp/m?r=1&mode="+e+"&"],2:["http://m.map.c.yimg.jp/m?r=1&mode="+e+"&"]}};d[Y.Map.TYPE.WEATHER_RADAR]={0:{1:["http://m.map.c.yimg.jp/m?mode=weather-radar&r=1&"],2:["http://m.map.c.yimg.jp/m?mode=gws&r=1&"]}};
var a="http://m.map.c.yimg.jp/m?mode=osm&r=1&";if(b){c=d[Y.Map.TYPE.STANDARD];}else{c=d[Y.Map.TYPE.STANDARD];}return new Y.YahooMapImageTileLayer("NormalMap",c,{copyrightCollection:f,smartphoneOptimize:true,urlSet:d,osmUrl:a});};Y.EnglishLayer=function(){return Y.ForeignLanguageLayer.call(this);};Y.SmartphoneEnglishLayer=function(){return Y.SmartphoneForeignLanguageLayer.call(this);};Y.KoreanLayer=function(){return Y.ForeignLanguageLayer.call(this,"ml-ko","ml-ko-sp");
};Y.SmartphoneKoreanLayer=function(){return Y.SmartphoneForeignLanguageLayer.call(this,"ml-ko-sp");};Y.ChineseTraditionalLayer=function(){return Y.ForeignLanguageLayer.call(this,"ml-zh-tw","ml-zh-tw-sp");};Y.SmartphoneChineseTraditionalLayer=function(){return Y.SmartphoneForeignLanguageLayer.call(this,"ml-zh-tw-sp");};Y.ChineseSimpleLayer=function(){return Y.ForeignLanguageLayer.call(this,"ml-zh-cn","ml-zh-cn-sp");
};Y.SmartphoneChineseSimpleLayer=function(){return Y.SmartphoneForeignLanguageLayer.call(this,"ml-zh-cn-sp");};Y.EarthQuakePhotoLayer=function(){var d=new Y.CopyrightCollection();var c,b=(Y.HOST_NAME==="api.olp.yahoo.co.jp");if(b){c={0:{1:["http://p.map.c.yimg.jp/p?mode=eq-photo&v=1.3&r=1&"],2:["http://p.map.c.yimg.jp/p?mode=gws_aero&r=1&"]}};}else{c={0:{1:["http://p.map.c.yimg.jp/p?mode=eq-photo&v=1.3&r=1&"],2:["http://p.map.c.yimg.jp/p?mode=gws_aero&r=1&"]}};
}var a="http://p.map.c.yimg.jp/p?mode=eq-photo&v=1.3&r=1&";return new Y.YahooMapImageTileLayer("EarthQuakePhotoMap",c,{copyrightCollection:d,osmUrl:a});};Y.PhotoLayer=function(){var d=new Y.CopyrightCollection();var c,b=(Y.HOST_NAME==="api.olp.yahoo.co.jp");if(b){c={0:{1:["http://p.map.c.yimg.jp/p?r=1&"],2:["http://p.map.c.yimg.jp/p?mode=gws_aero&r=1&"]}};}else{c={0:{1:["http://p.map.c.yimg.jp/p?r=1&"],2:["http://p.map.c.yimg.jp/p?mode=gws_aero&r=1&"]}};
}var a="http://p.map.c.yimg.jp/p?r=1&";return new Y.YahooMapImageTileLayer("PhotoMap",c,{copyrightCollection:d,osmUrl:a,maxZoomLevel:21});};Y.HybridPhotoLayer=function(){var d=new Y.CopyrightCollection();var c,b=(Y.HOST_NAME==="api.olp.yahoo.co.jp");if(b){c={0:{1:["http://p.map.c.yimg.jp/p?mode=hybrid&r=1&"],2:["http://p.map.c.yimg.jp/p?mode=gws_aero&r=1&"]}};}else{c={0:{1:["http://p.map.c.yimg.jp/p?mode=hybrid&r=1&"],2:["http://p.map.c.yimg.jp/p?mode=gws_aero&r=1&"]}};
}var a="http://p.map.c.yimg.jp/p?mode=hybrid&r=1&";return new Y.YahooMapImageTileLayer("PhotoMap(hybrid)",c,{copyrightCollection:d,smartphoneOptimize:true,osmUrl:a});};Y.B1Layer=function(){var b=new Y.CopyrightCollection();var a="http://m.map.c.yimg.jp/m?mode=map-b1&r=1&";return new ImageTileLayer("B1Map",a,{copyrightCollection:b,smartphoneOptimize:true,maxZoomLevel:21,minZoomLevel:19});};Y.SmartphoneB1Layer=function(){var b=new Y.CopyrightCollection();
var a="http://m.map.c.yimg.jp/m?mode=map-b1&r=1&style=base:smartphone&";return new ImageTileLayer("B1Map",a,{copyrightCollection:b,smartphoneOptimize:true,maxZoomLevel:21,minZoomLevel:19});};Y.OpenStreetMapLayer=function(){var b="http://m.map.c.yimg.jp/m?mode=osm&r=1&",c=new Y.CopyrightCollection(),a=new Y.Copyright("osm-copyright",new Y.LatLngBounds(),1,Y.OpenStreetMapLayer.COPYRIGHT);c.addCopyright(a);
c.isCollision=function(){return true;};return new Y.ImageTileLayer(Y.OpenStreetMapLayer.LAYERSET_NAME,b,{copyrightCollection:c});};Y.OpenStreetMapLayer.COPYRIGHT="(C)OpenStreetMap contributors,ODbL";Y.OpenStreetMapLayer.LAYERSET_NAME="OSM";Y.LabelLayer=function(){return new ImageTileLayer("LabelMap","http://p.map.c.yimg.jp/p?mode=gws_aero&r=1&");};var DomTile=Y.DomTile=Y.extend(Tile,function(d,c,b,a,e){this.dom=d;
this.enable=false;Tile.apply(this,[c,b,a,e]);});DomTile.prototype.getDom=function(){return this.dom;};DomTile.prototype.setPosition=function(a,d){if(this.x!==a||this.y!==d){var b=a;var c=d;if(Y.Util.Platform.isAndroid){if(b%2!==0){b++;}if(c%2!==0){c++;}}this.dom.css({left:b+"px",top:c+"px"});this.x=a;this.y=d;}};var YahooMapImageTileLayer=Y.YahooMapImageTileLayer=Y.extend(ImageTileLayer,function(c,b,a){this.param={};this.options=a||{};this.vendor=Y.YahooMapLayer.VENDOR.JAPAN;this.urlSet=this.options.urlSet||null;this.osmUrl=this.options.osmUrl||null;ImageTileLayer.apply(this,[c,b,a]);});YahooMapImageTileLayer.prototype.getImageSrc=function(a,f){var b=this.url;var e=this.map.getZoom();if(this.MAX_ZOOM_LEVEL&&this.MAX_ZOOM_LEVEL<e){return"";
}if(this.MIN_ZOOM_LEVEL&&this.MIN_ZOOM_LEVEL>e){return"";}if(b instanceof Object){b=b[e]||b["0"];this.count=b[this.vendor].length<=this.count?0:this.count;b=b[this.vendor][this.count++];if(this.vendor===Y.YahooMapLayer.VENDOR.INC){if(!this.map.enableGWS){b=this.osmUrl;}}}var d=b+"x="+a+"&y="+f+"&z="+e;if(this.smartphoneOptimize){var c=Math.round(this.floatTileSize.width*Y.Util.Platform.devicePixelRatio);
if(c!==Y.DEFAULT_TILE_SIZE){if(c>512){c=512;}d+="&size="+c;}}return d;};YahooMapImageTileLayer.prototype.setUrl=function(b,a){this.url[b]=a;};YahooMapImageTileLayer.prototype.getVendor=function(){return this.vendor;};YahooMapImageTileLayer.prototype.setVendor=function(a){this.vendor=a;};var PhotoLabelLayer=Y.PhotoLabelLayer=Y.extend(Y.ImageTileLayer,function(c,b,a){var c=c||"PhotoLabel";var b=b||"http://m.map.c.yimg.jp/m?r=1&style=base:hybrid&";var a=a||{};a.smartphoneOptimize=true;a.maxZoomLevel=21;Y.ImageTileLayer.apply(this,[c,b,a]);});PhotoLabelLayer.prototype.drawLayer=function(a){if(this.isHidden()||!this.map.getConfigure("hybridPhoto")){return;}this.__super__.drawLayer.call(this,a);
};PhotoLabelLayer.prototype.reflectContainerDisplay=function(){if(this._isHidden){this.container.css("display","none");}else{this.container.css("display","");this.drawLayer(true);}};var ListingLayer=Y.ListingLayer=Y.extend(Y.FeatureLayer,function(b,a){a=a||{};this.url=a.url;this.autoPanMap=(a.autoPanMap!=undefined)?a.autoPanMap:true;this.autoUpdate=a.autoUpdate||false;if(this.autoUpdate){this.setAutoUpdate(this.autoUpdate);}this.infoWindowEnable=(a.infoWindowEnable!=undefined)?a.infoWindowEnable:true;this.maxMapCount=a.maxMapCount||1000;this.maxListCount=a.maxListCount||1000;this.chunk=a.chunk||false;
this.chunkCount=a.chunkCount||10;this.name="Listing";this.dispProperties={};FeatureLayer.apply(this,[name]);});ListingLayer.prototype.initializeByListing=function(a){this.initialized=true;this.listing=a;};ListingLayer.prototype.isInitialized=function(){return this.initialized&&this.map;};ListingLayer.prototype.isAutoPanMap=function(){return this.autoPanMap;};ListingLayer.prototype.setAutoPanMap=function(a){this.autoPanMap=a;
};ListingLayer.prototype.isInfoWindowEnable=function(){return this.infoWindowEnable;};ListingLayer.prototype.execute=function(b,c,a){var b=b||{};this.drawList(b.query,b,c,a);};ListingLayer.prototype.drawList=function(c,b,e,a){this.query=c;this.options=$.extend(true,{},b);Y.Event.trigger(this,"drawstart");this.ydf=null;var d=this;this.abort();this.ajaxRequest=this.search(c,this.options,function(f){d.ydf=d.ydfFilter(f);
d.drawYDFToMap(d.ydf);d.drawYDFToList(d.ydf);if(e){e(f);}Y.Event.trigger(d,"drawend");},function(){if(typeof(a)=="function"){a();}});return this.ajaxRequest;};ListingLayer.prototype.abort=function(){if(this.ajaxRequest){this.ajaxRequest.abort();}};ListingLayer.prototype.ydfFilter=function(a){return a;};ListingLayer.prototype.getApiUrl=function(){return this.url;};ListingLayer.prototype.getApiRequest=function(c,b){var a=["results","start","detail","center","dist","bbox","lat","lon"];
var d=$.extend(true,{},b);d.ei="utf-8";d.query=c||"";d.output=b.output||"jsonp";d.results=b.results||10;d.page=b.page||1;d.detail=b.detail||"";if(b.center){d.lat=b.center.lat();d.lon=b.center.lng();if(b.dist){d.dist=b.dist;}delete d.center;}if(b.bbox){if(typeof(b.bbox)==="string"){d.bbox=b.bbox;}else{d.bbox=b.bbox.toUrlValue();}}return d;};ListingLayer.prototype.search=function(h,l,k,j){var a=new Y.Request();
try{var b=this.getApiUrl();var d=this.getApiRequest(h,l);if(!b||!d){Util.error({message:"getApiRequest\u304c\u30ad\u30e3\u30f3\u30bb\u30eb\u3055\u308c\u307e\u3057\u305f\u3002"});}d.opt=l.opt||{};if(d.opt&&typeof(d.opt)=="object"){var c=d.opt;d.opt="";for(var f in c){d.opt+="&"+f+"="+encodeURI(c[f]);}}$.each(d,function(e,i){if(typeof(i)=="function"){delete d[e];}});return a.request({url:b,data:d,dataType:"jsonp",success:function(e){var i=new Y.YDF(e);k(i);},error:function(e,m,i){Util.error(j,i);
}});}catch(g){Util.error(j,g);}};ListingLayer.prototype.setAutoUpdate=function(c,h,f,j,g){this.updateRate=h||this.updateRate||1;this.boundsRate=f||this.boundsRate||1;this.autoUpdate=c;this.callback=j||"";this.error=g||"";if(!this.map||!this.map.isLoaded()){return;}if(c){this.setAutoPanMap(false);this.moveend=this.map.bind("moveend",a);this.zoomend=this.map.bind("zoomend",a);}else{if(this.moveend){this.map.unbind(this.moveend);
}if(this.zoomend){this.map.unbind(this.zoomend);}}Y.Event.trigger(this,"autoUpdateChanged",c);var e=this;var b=this.map.getZoom();var i=this.map.getBounds();function a(){if(e.map.isInfoWindowInBounds()){return;}if(!e.options){return;}if(!e.ydf){d();return;}if(b!=e.map.getZoom()){d();return;}var k=e.map.getBounds();var l=i.copy();l.extendRate(e.updateRate);if(!l.containsBounds(k)){d();}}function d(){if(e.updating){clearTimeout(e.updating);
}e.updating=setTimeout(function(){var k=e.map.getBounds();k.extendRate(e.boundsRate);delete e.options.center;e.options.bbox=k;e.options.page=1;i=k;b=e.map.getZoom();e.drawList(e.query,e.options,e.callback,e.error);},500);}};ListingLayer.prototype.isAutoUpdate=function(){return this.autoUpdate;};ListingLayer.prototype.fitToMap=function(){if(this.ydf&&this.ydf.result.bounds&&!this.ydf.result.bounds.isEmpty()){this.getMap().drawBounds(this.ydf.result.bounds);
}};ListingLayer.prototype.drawYDFToMap=function(f){if(!this.isInitialized()){return;}if(!this.map){return;}this.clearFeatures();if(this.container){this.container.empty();}this.map.closeInfoWindow();if((this.isAutoPanMap()&&!this.isAutoUpdate())||!this.map.isLoaded()){}var g=this;if(f&&f.result&&f.result.count>0){var e=[];for(var c=0,a=f.features.length;c<a;c++){var b=f.features[c];var d=this.getCustomIcon(parseInt(c),b);
if(d){b.icon=d;}if(this.isInfoWindowEnable()){Y.Event.addListener(b,"click",(function(h){return function(){g.openInfoWindow(h);};})(b));}e.push(b);if(c>this.maxMapCount-2){break;}}this.addFeatures(e.reverse());}};ListingLayer.prototype.clearList=function(){if(this.listContainer){this.listContainer.empty();}};ListingLayer.prototype.drawYDFToList=function(b){if(!this.listing){return;}if(!this.listContainer){this.listContainer=$("<div></div>");
this.listing.container.append(this.listContainer);}var a=this.createResultHtml(b,this.query,this.options);this.listContainer.html(a);};ListingLayer.prototype.createResultHtml=function(d,c,a){var b=$('<div class="yolp-list" ></div>');if(d.result.count<=0){b.append(this.createNoMatchHtml(d,c,a));return b;}b.append(this.createHeaderHtml(d,c,a));b.append(this.createHeaderAdHtml(d,c,a));b.append(this.createListHtml(d,c,a));
b.append(this.createFooterAdHtml(d,c,a));b.append(this.createFooterHtml(d,c,a));return b;};ListingLayer.prototype.createNoMatchHtml=function(d,c,a){var b=$('<div class="yolp-list-nomatch">'+c+"\u306b\u4e00\u81f4\u3059\u308b\u7d50\u679c\u306f\u898b\u3064\u304b\u308a\u307e\u305b\u3093\u3067\u3057\u305f\u3002</div>");return b;};ListingLayer.prototype.createHeaderHtml=function(b){var a=$('<div class="yolp-list-header"></div>');if(b.result.description&&b.result.description!=""){a.append($("<p></p>").html(b.result.description));
}if(b.result.total!=b.result.count){a.append("<p>\u5168<span>"+b.result.total+"</span>\u4ef6\u4e2d<span>"+b.result.start+"</span>\uff5e<span>"+(b.result.start+b.result.count-1)+"</span>\u4ef6\u8868\u793a</p>");}return a;};ListingLayer.prototype.createListHtml=function(g,e,a){var c=$('<ul class="yolp-list-items" ></ul>');for(var b=0;b<g.result.count;b++){var d=g.features[b];c.append(this.createItemHtml(b,d));if(b>this.maxListCount-2){break;
}}return c;};ListingLayer.prototype.createItemHtml=function(b,d){if(!d){return"";}if(!d.name){return"";}var c=$("<li></li>");if(d.property.ListDescription){c.append(Util.stripScript(d.property.ListDescription));var e=c;}else{if(d.icon){var a='<img class="yolp-list-icon" src="'+d.icon.image+'" />';c.append(a);}var e=$('<p class="yolp-list-txt"></p>').html(d.name);c.append(e);}var f=this;if(f.map){e.bind("click",function(){f.openInfoWindow(d);
});e.bind("mouseover",function(){});e.css("cursor","pointer");}return c;};ListingLayer.prototype.createFooterHtml=function(b){var d=$('<div class="yolp-list-footer"></div>');if(b.result.total==b.result.count){return d;}var f=this.chunkCount;if((f%2)==0){var j=f/2;var a=f/2-1;}else{var j=f/2-0.5;var a=f/2-0.5;}var g=this.options.results;var h=this.getCurrentPage();var k=this.getTotalPageCount();var e=this;
if(h>1){d.append($('<a class="yolp-list-prev"><span>\u524d\u3078</span><img src="http://i.yimg.jp/images/clear.gif"></a>').bind("click",function(){e.drawPage(h-1);}));}if(this.chunk&&this.chunkCount>0){if(h<=a||k<=f){for(var c=1;c<=k&&c<=f;c++){if(h==c){d.append("<span class='select'>"+c+"</span>");}else{d.append($("<a rel='"+c+"' href='javascript:void(0);'>"+c+"</a> ").bind("click",{num:c},function(i){e.drawPage(i.data.num);
}));}}}else{if(h>k-j){for(var c=k-f+1;c<=k;c++){if(h==c){d.append("<span class='select'>"+c+"</span>");}else{d.append($("<a rel='"+c+"' href='javascript:void(0);'>"+c+"</a>").bind("click",{num:c},function(i){e.drawPage(i.data.num);}));}}}else{for(var c=h-a;c<=h+j;c++){if(h==c){d.append("<span class='select'>"+c+"</span>");}else{d.append($("<a rel='"+c+"' href='javascript:void(0);'>"+c+"</a>").bind("click",{num:c},function(i){e.drawPage(i.data.num);
}));}}}}}if(h<k){d.append($('<a class="yolp-list-next"><span>\u6b21\u3078</span><img src="http://i.yimg.jp/images/clear.gif"></a>').bind("click",function(){e.drawPage(h+1);}));}return d;};ListingLayer.prototype.createHeaderAdHtml=function(c,b,a){return"";};ListingLayer.prototype.createFooterAdHtml=function(c,b,a){return"";};ListingLayer.prototype.createCopyrightHtml=function(a){};ListingLayer.prototype.openInfoWindow=function(b,d){var c={};
var a=this.createInfoWindowMaxContentHtml(b);if(a){c.maxContent=a;}if(d){c.maximize=true;}if(this.isHidden()){this.infoWindow=this.map.openInfoWindow(b.getLatLng(),this.createInfoWindowHtml(b),c);}else{this.infoWindow=b.openInfoWindow(this.createInfoWindowHtml(b),c);}this.infoWindowFeature=b;Y.Event.trigger(this,"infowindowopen",b);};ListingLayer.prototype.getInfoWindow=function(){if(this.infoWindow&&!this.infoWindow.isHidden()){return this.infoWindow;
}};ListingLayer.prototype.getOpenFeature=function(){if(this.infoWindow&&!this.infoWindow.isHidden()){return this.infoWindowFeature;}};ListingLayer.prototype.createInfoWindowMaxContentHtml=function(a){return null;};ListingLayer.prototype.createInfoWindowHtml=function(b){var a=$('<div class="yolp-infow-"></div>');var c=b.description||b.Description||b.property.description||b.property.Description||b.property.desc||b.name;
if(c){c=$('<div class="yolp-infow-desc"></div>').html(Util.stripScript(c));a.append(c);}return a;};ListingLayer.prototype.getCustomIcon=function(a,b){return null;};ListingLayer.prototype.getCustomStyle=function(a,b){return null;};ListingLayer.prototype.getYDF=function(){return this.ydf;};ListingLayer.prototype.hasResult=function(){return this.ydf!=null;};ListingLayer.prototype.getTotalPageCount=function(){var a=this.options.results||10;
return parseInt((this.ydf.result.total-1)/a)+1;};ListingLayer.prototype.getCurrentPage=function(){var a=this.options.results||10;return parseInt(this.ydf.result.start/a)+1;};ListingLayer.prototype.getStart=function(){return this.ydf.result.start;};ListingLayer.prototype.drawPage=function(a){this.options.page=a;this.drawList(this.query,this.options);};ListingLayer.prototype.bind=function(a,b,c){return Event.addListener(this,a,b,c);
};ListingLayer.prototype.unbind=function(a){Event.removeListener(a);};ListingLayer.prototype.remove=function(){FeatureLayer.prototype.remove.apply(this);if(this.listContainer){this.listContainer.empty();this.listContainer.remove();this.listContainer=null;}if(this.infoWindow){this.infoWindow.close();this.infoWindow=null;}if(this.moveend){this.map.unbind(this.moveend);}if(this.zoomend){this.map.unbind(this.zoomend);
}if(this.rotateOpenInfoWindowId){clearInterval(this.rotateOpenInfoWindowId);}Y.Event.trigger(this,"removelayer");};ListingLayer.prototype.rotateOpenInfoWindow=function(c){var b=0;var d=this;function a(){if(d.ydf&&d.ydf.features[b]){var e=d.ydf.features[b];d.openInfoWindow(e);b++;}}if(this.rotateOpenInfoWindowId){clearInterval(this.rotateOpenInfoWindowId);}this.rotateOpenInfoWindowId=setInterval(a,c);
setTimeout(a,10);};ListingLayer.prototype.clearRotateOpenInfoWindow=function(){if(this.rotateOpenInfoWindowId){clearInterval(this.rotateOpenInfoWindowId);}};var GeoXmlLayer=Y.GeoXmlLayer=Y.extend(Y.ListingLayer,function(b,a){this.xmlurl=b;a=a||{};a.url=a.url||"http://"+Y.HOST_NAME+"/OpenLocalPlatform/V1/geoxmlProxy";Y.ListingLayer.apply(this,["Geoxml",a]);});GeoXmlLayer.prototype.getApiRequest=function(b,a){a.apiurl=this.xmlurl;a.output="jsonp";return Y.ListingLayer.prototype.getApiRequest.apply(this,[b,a]);};var WMSLayer=Y.WMSLayer=Y.extend(Y.ImageTileLayer,function(c,b,d,a){this.defaultparams={VERSION:"1.1.1",STYLES:"",SRS:"",FORMAT:"image/png",WIDTH:Y.DEFAULT_TILE_SIZE,HEIGHT:Y.DEFAULT_TILE_SIZE,SERVICE:"WMS"};a=a||{};a.enableFadeIn=a.enableFadeIn||false;this.options=a;this.wmsurl=b||"";this.name=c||"";this.wmsbaseurl=a.wmsbaseurl||"";this.params=$.extend(this.defaultparams,d||{});this.wmslayers=[];this.drawpost=false;
this.cache=new Y.Request();Y.ImageTileLayer.apply(this,[this.name,"",a]);});WMSLayer.prototype.setCapabilities=function(b){var a=this;this.getCapabilities(function(c){a.wmsbaseurl=$($(c).find("Service > OnlineResource")[0]).attr("xlink:href");var d=$(c).find("Capability > Layer > Layer");a.wmslayers=[];d.each(function(){var e={};e.name=$(this).find("Name").text();e.title=$(this).find("Title").text();
if($(this).find("ScaleHint").length>0){e.scalemin=$($(this).find("ScaleHint")[0]).attr("min");e.scalemax=$($(this).find("ScaleHint")[0]).attr("max");e.scalemin=e.scalemin*39.3701*72/Math.sqrt(2);e.scalemax=e.scalemax*39.3701*72/Math.sqrt(2);}if($(this).find("LatLonBoundingBox").length>0){e.latlngbox={};e.latlngbox.minx=$($(this).find("LatLonBoundingBox")[0]).attr("minx");e.latlngbox.miny=$($(this).find("LatLonBoundingBox")[0]).attr("miny");
e.latlngbox.maxx=$($(this).find("LatLonBoundingBox")[0]).attr("maxx");e.latlngbox.maxy=$($(this).find("LatLonBoundingBox")[0]).attr("maxy");}a.wmslayers.push(e);});Y.Event.trigger(a,"loadcomplete");});};WMSLayer.prototype.getCapabilities=function(d,b){var a="/OpenLocalPlatform/V1/wms";var c=this.params;c.REQUEST="getcapabilities";c.wmsurl=this.wmsurl;c.t="__";this.cache.request({url:a,data:c,cache:false,dataType:"xml",success:function(e){d(e);
},error:function(f){b(f);}});};WMSLayer.prototype.isLimitScale=function(c){var b=Math.pow(2,(20-c))*2980;var a=false;$.each(this.wmslayers,function(d,e){if(e.scalemin){if(b<=e.scalemin){a=true;}}if(e.scalemax){if(b>=e.scalemax){a=true;}}});a=false;return a;};WMSLayer.prototype.isOutOfRange=function(a,d,c){var b=false;return b;};WMSLayer.prototype.drawLayer=function(a){var b=this;if(!this.wmsbaseurl||this.wmsbaseurl==""){Y.Event.addListener(this,"loadcomplete",function(){Y.TileLayer.prototype.drawLayer.apply(b,[a]);
});this.setCapabilities();}else{Y.TileLayer.prototype.drawLayer.apply(this,[a]);}};WMSLayer.prototype.getImageSrc=function(f,e){var d=this.map.getZoom();if(this.isLimitScale(d)){return"";}if(this.isOutOfRange(f,e,d)){return"";}if(!this.wmsbaseurl||this.wmsbaseurl==""){return"";}var g=this.fromTileToLatLng(f,e,0,0);var b=this.fromTileToLatLng(f+1,e+1,0,0);var c=this.map.getProjection();var j=c.fromPixelToMeters(c.fromLatLngToPixel(g,d),d);
var h=c.fromPixelToMeters(c.fromLatLngToPixel(b,d),d);var i=j.x+","+j.y+","+h.x+","+h.y;delete this.params.wmsurl;this.params.BBOX=i;this.params.REQUEST="GetMap";this.params.SRS="EPSG:900913";this.params.LAYERS=this.params.LAYERS||this.params.layers||"";delete this.params.layers;var a=this.wmsbaseurl+$.param(this.params);return a;};var BlankMapLayer=Y.BlankMapLayer=Y.extend(ImageTileLayer,function(a){var a=a||{};a.smartphoneOptimize=true;this.param=a.param||{};this.url="http://m.map.c.yimg.jp/b?r=1&";this.name="BlankMapLayer";ImageTileLayer.apply(this,[this.name,this.url,a]);});BlankMapLayer.prototype.getImageSrc=function(a,d,c){var b=ImageTileLayer.prototype.getImageSrc.call(this,a,d,c);return b+this.createQueryParameter();};
BlankMapLayer.prototype.setStyle=function(c,e){var g="";for(var b in c){if(c.hasOwnProperty(b)){var f=c[b];if(b=="label"){for(var d in f){if(f.hasOwnProperty(d)){var a=f[d];if(g!=""){g+="|";}g+="bm.c."+d+":"+a;}}}else{if(b=="border"){for(var d in f){if(f.hasOwnProperty(d)){var a=f[d];if(g!=""){g+="|";}g+="bm.b."+d+":"+a;}}}else{if(b=="area"){for(var d in f){if(f.hasOwnProperty(d)){var a=f[d];if(g!=""){g+="|";
}g+="bm.p."+d+":"+a;}}}else{if(b=="bg"){if(g!=""){g+="|";}var a=f;g+="bm.bg:"+a;}}}}}}this.param.style=g;if(e){this.redraw();}};BlankMapLayer.prototype.createQueryParameter=function(){var b="";for(var a in this.param){if(this.param.hasOwnProperty(a)){b+="&"+a+"="+encodeURIComponent(this.param[a]);}}return b;};BlankMapLayer.prototype.redraw=function(){if(this.initialized&&this.container){this.container.empty();
this.drawLayer(true);}};var StyleMapLayer=Y.StyleMapLayer=Y.extend(Y.ImageTileLayer,function(a,b){this.url="http://m.map.c.yimg.jp/m?";this.base=a?a:"standard";this.mode=b||"";this.style="";this.onZoomend=null;this.onLayerListChanged=null;this.onLayerSetChanged=null;this.onMoved=null;Y.ImageTileLayer.apply(this,["StyleMapLayer",this.url,{copyrightCollection:new Y.CopyrightCollection(),smartphoneOptimize:true}]);});StyleMapLayer.prototype.initialize=function(b){this.__super__.initialize.call(this,b);
var a=this;setTimeout(function(){var e=a.map.getCurrentLayerSet().getLayers();for(var d=0,c=e.length;d<c;++d){if(e[d]===a){a.drawCopyright();}}},500);};StyleMapLayer.prototype.drawLayer=function(){Y.ImageTileLayer.prototype.drawLayer.apply(this,arguments);if(!this.onZoomend){this.onZoomend=this.map.bind("zoomend",this.drawCopyright,this);}if(!this.onLayerListChanged){this.onLayerListChanged=this.map.bind("layerlistchanged",this.drawCopyright,this);
}if(!this.onLayerSetChanged){this.onLayerSetChanged=this.map.bind("layersetchanged",this.drawCopyright,this);}if(!this.onMoved){this.onMoved=this.map.bind("moveend",this.drawCopyright,this);}this.drawCopyright();};StyleMapLayer.prototype.drawCopyright=function(){var c=this.getCopyrightCollection();var f=this.map.getPlugin("YahooMapLayer");var g=f.yml.getCurrentLayerList(Y.LayerSetId.NORMAL);var d=Y.Util.level2Scale(this.map.getZoom());
var j=this.map.getCurrentLayerSet();var a=j.copyrightContainer.children();var h=null;if(!g){return;}for(var e=0,b=g.length;e<b;++e){if(g[e].scale==d){h=g[e].copyright;a.html(h);break;}}};StyleMapLayer.prototype.getImageSrc=function(a,g,f){var b=this.url;var e=this.map.getZoom();if(b instanceof Object){b=b[e]||b["0"];this.count=b.length<=this.count?0:this.count;b=b[this.count++];}var d=b+"x="+a+"&y="+g+"&z="+f+"&r=1&style=base:"+this.base+this.style;
if(this.mode!==""){d=b+"x="+a+"&y="+g+"&z="+f+"&r=1&mode="+this.mode;}if(this.smartphoneOptimize){var c=Math.round(this.floatTileSize.width*Y.Util.Platform.devicePixelRatio);if(c!==Y.DEFAULT_TILE_SIZE){if(c>512){c=512;}d+="&size="+c;}}return d;};StyleMapLayer.prototype.setStyle=function(f,h){h=typeof h!=="undefined"?h:true;var d=null;if(!f||typeof f!=="object"||f.length===0){return;}var e="";for(var c=0,b=f.length;
c<b;++c){for(var a in f[c]){if(f[c].hasOwnProperty(a)){var g=f[c][a];if(typeof g!=="boolean"){continue;}if(d!==null&&g===d){e+=",";}else{e+="|"+(g?"on":"off")+":";}e+=a;d=g;}}}this.style=e;if(h){this.redraw();}};StyleMapLayer.prototype.redraw=function(){if(this.initialized&&this.container){this.container.empty();this.drawLayer(true);}};StyleMapLayer.prototype.remove=function(){if(this.onZoomend){this.map.unbind(this.onZoomend);
this.onZoomend=null;}if(this.onLayerListChanged){this.map.unbind(this.onLayerListChanged);this.onLayerListChanged=null;}if(this.onLayerSetChanged){this.map.unbind(this.onLayerSetChanged);this.onLayerSetChanged=null;}if(this.onMoved){this.map.unbind(this.onMoved);this.onMoved=null;}Y.Layer.prototype.remove.call(this);};var GeoXmlHeatmapLayer=Y.GeoXmlHeatmapLayer=Y.extend(Y.ImageTileLayer,function(b,a){a=a||{};this.isIE7=false;if($.browser.msie&&$.browser.version=="6.0"){a.opacity=a.opacity||0.5;}else{if($.browser.version=="7.0"){a.opacity=a.opacity||1;this.isIE7=true;}else{a.opacity=a.opacity||1;}}this.options=a;this.xmlurl=b;this.options.nogpu=true;Y.ImageTileLayer.apply(this,["GeoXml\u30d2\u30fc\u30c8\u30de\u30c3\u30d7","",a]);this.appendStyle="";
});GeoXmlHeatmapLayer.prototype.drawHeat=function(a){a=a||{};this.draw(true);};GeoXmlHeatmapLayer.prototype.getImageSrc=function(a,d){var c="http://"+Y.HOST_NAME+"/OpenLocalPlatform/V1/geoxmlProxy";c+="?apiurl="+encodeURIComponent(this.xmlurl);var b="http://h.map.srv.yimg.jp/h?t=11&";b+="x="+a+"&y="+d+"&z="+this.map.getZoom()+"&url="+encodeURIComponent(c);if(this.isIE7){b+="&tsize="+Y.DEFAULT_TILE_SIZE+"&dot=2,72&";
}return b;};var IndoorMapLayer=Y.IndoorMapLayer=Y.extend(ImageTileLayer,function(a){ImageTileLayer.apply(this,[this.name,this.url,a]);this.indoormaps;this.floorId=void 0;this.styles="";this.isRedraw;this.drawList;this.smartphoneOptimize=true;this.url="http://m.map.c.yimg.jp/m?r=1&mode=indoormap&";this.name="IndoorMapLayer";this.MAX_ZOOM_LEVEL=22;this.MIN_ZOOM_LEVEL=18;this.copyright=new Y.Copyright("indoor",null,null,"");
this.copyrightCollection=new Y.CopyrightCollection();this.copyrightCollection.addCopyright(this.copyright);});IndoorMapLayer.prototype.getImageSrc=function(a,e,d){if(this.MAX_ZOOM_LEVEL<d||this.MIN_ZOOM_LEVEL>d){return"";}if(!this.indoormaps||this.styles==""){return"";}var c=this.url+"x="+a+"&y="+e+"&z="+d;if(this.smartphoneOptimize){var b=Math.round(this.floatTileSize.width*Y.Util.Platform.devicePixelRatio);
if(b!==Y.DEFAULT_TILE_SIZE){c+="&size="+b;}}c=c+"&style="+this.styles;return c;};IndoorMapLayer.prototype.initialize=function(b){this.__super__.initialize.call(this,b);this.indoormaps=this.getIndoorMaps();if(this.indoormaps&&this.indoormaps.length>0){var a=this.indoormaps[0].defaultfloorid;this.createStyle(a);this.updateSlider();}var c=this;this.layerlistchanged=b.bind("layerlistchanged",function(){var e=c.indoormaps?c.indoormaps[0].indoorid:void 0;
c.indoormaps=c.getIndoorMaps();var d=c.findFloorId(e);c.setFloorId(d);c.updateSlider();if(c.updateCopyright()){c.map.currentLayerSet.copyrightDraw();}Y.Event.trigger(c,"indoormaplayerchanged");});this.copyrightCollection.getCopyrights=function(g,f){c.updateCopyright();var h=[];for(var d=0;d<this.copyrights.length;d++){var e=this.copyrights[d];if(this.isCollision(e,g,f)){if(e.text){h.push(e.text);}}}return h;
};};IndoorMapLayer.prototype.getIndoorMaps=function(){if(this.plugin){return this.plugin.yml.getIndoorMaps();}else{this.plugin=this.map.getPlugin("YahooMapLayer");if(this.plugin){return this.plugin.yml.getIndoorMaps();}}return null;};IndoorMapLayer.prototype.setFloorId=function(a){this.createStyle(a);if(this.isRedraw){this.drawLayer(true);}};IndoorMapLayer.prototype.updateSlider=function(){var b=this.map.getMaxZoom();
if(this.indoormaps&&this.indoormaps.length>0){var a=this.indoormaps[0].layers[0];a=Y.Util.scale2Level(a);this.MAX_ZOOM_LEVEL=this.map.indoorMaxZoom=a;}else{this.map.indoorMaxZoom=void 0;}if(b!=this.map.getMaxZoom()){Y.Event.trigger(this.map,"numlayerchanged");}};IndoorMapLayer.prototype.createStyle=function(k){var g=[];var e=[];var m={};if(this.indoormaps&&this.indoormaps.length>0&&k!==null){var f=this.indoormaps[0];
var l=f.indoorid;m[l]=k;e.push(l);if(f.floorconnections){for(var d=0;d<f.floorconnections.length;d++){var h=f.floorconnections[d];if(k===h.floorid){m[h.connection.indoorid]=h.connection.floorid;}}}for(var d=1;d<this.indoormaps.length;d++){var f=this.indoormaps[d];var l=f.indoorid;e.push(l);if(typeof m[l]==="undefined"){for(var b=0;b<f.floorids.length;b++){if(k===f.floorids[b]){m[l]=f.floorids[b];break;
}}}}for(var l in m){g.push("id."+l+"."+m[l]+":ids");}}this.styles=g.join("|");this.isRedraw=false;if(this.floorId!=k){this.floorId=k;this.isRedraw=true;}e.sort(function(i,c){if(i<c){return -1;}if(i>c){return 1;}return 0;});var a=e.join(",");if(!this.drawList||this.drawList!==a){this.drawList=a;this.isRedraw=true;}};IndoorMapLayer.prototype.findFloorId=function(e){var b=null;if(this.indoormaps&&this.indoormaps.length>0){var d=this.indoormaps[0];
if(d.floorconnections){for(var a=0;a<d.floorconnections.length;a++){var f=d.floorconnections[a];if(e===f.connection.indoorid&&this.floorId===f.connection.floorid){b=f.floorid;break;}}}if(b==null){for(var a=0;a<d.floorids.length;a++){if(d.floorids[a]===this.floorId){b=this.floorId;}}}if(b==null){b=d.defaultfloorid;}}return b;};IndoorMapLayer.prototype.drawLayer=function(d){if(d){this.tileArray=null;
delete this.tileArray;this.tileArray=[];this.tileCount=0;var f=this;if(this.delOldTiles){clearTimeout(this.delOldTiles);this.oldTiles.remove();}this.oldTiles=this.container.children();this.delOldTiles=setTimeout(function(){f.oldTiles.fadeTo("slow",0,function(){$(this).remove();});},1000);}var b=this.map.getProjection();this.geoCenter=this.map.getCenter();this.tileCenter=b.fromLatLngToTile(this.geoCenter,this.map.getZoom());
this.fillSize=this.getFillSize();var e=this.fillSize.c-this.tileCount;if(e>0){for(var a=0;a<e;++a){var c=new Y.DomTile(this.createTile());if(c){this.tileArray.push(c);this.container.prepend(c.dom);}}}else{if(e<0){for(var a=0;a<-e;++a){var c=this.tileArray.pop();if(c){c.dom.remove();}}}}this.tileCount=this.fillSize.c;this.drawTiles();};IndoorMapLayer.prototype.updateCopyright=function(){var d=this.map.getBounds();
var f=this.map.getZoom();var b="";var e=this.map.currentLayerSet.getLayers();if(this.MAX_ZOOM_LEVEL<f||this.MIN_ZOOM_LEVEL>f){b="";}else{b=this.indoormaps?this.indoormaps[0].copyright:"";for(var a=0;a<e.length;a++){if(e[a].name===this.name){continue;}var g=e[a].getCopyrightCollection();if(g){var c=g.getCopyrightNotice(d,f);if(c.join(",").indexOf(b)!==-1){b="";break;}}}}if(this.copyright.text!=b){this.copyright.text=b;
return true;}return false;};IndoorMapLayer.prototype.remove=function(){if(this.map.getMaxZoom()!=this.MAX_ZOOMLEVEL){this.map.indoorMaxZoom=null;Y.Event.trigger(this.map,"numlayerchanged");}if(this.layerlistchanged){this.map.unbind(this.layerlistchanged);this.layerlistchanged=null;}if(this.container){this.container.remove();this.container=null;}if(this.drawer){this.drawer=null;}this.initialized=false;
};var IndoorMapLayer=Y.IndoorMapLayer=Y.extend(ImageTileLayer,function(a){ImageTileLayer.apply(this,[this.name,this.url,a]);this.indoormaps;this.floorId=void 0;this.styles="";this.isRedraw;this.drawList;this.smartphoneOptimize=true;this.url="http://m.map.c.yimg.jp/m?r=1&mode=indoormap&";this.name="IndoorMapLayer";this.MAX_ZOOM_LEVEL=22;this.MIN_ZOOM_LEVEL=18;this.copyright=new Y.Copyright("indoor",null,null,"");
this.copyrightCollection=new Y.CopyrightCollection();this.copyrightCollection.addCopyright(this.copyright);});IndoorMapLayer.prototype.getImageSrc=function(a,e,d){if(this.MAX_ZOOM_LEVEL<d||this.MIN_ZOOM_LEVEL>d){return"";}if(!this.indoormaps||this.styles==""){return"";}var c=this.url+"x="+a+"&y="+e+"&z="+d;if(this.smartphoneOptimize){var b=Math.round(this.floatTileSize.width*Y.Util.Platform.devicePixelRatio);
if(b!==Y.DEFAULT_TILE_SIZE){c+="&size="+b;}}c=c+"&style="+this.styles;return c;};IndoorMapLayer.prototype.initialize=function(b){this.__super__.initialize.call(this,b);this.indoormaps=this.getIndoorMaps();if(this.indoormaps&&this.indoormaps.length>0){var a=this.indoormaps[0].defaultfloorid;this.createStyle(a);this.updateSlider();}var c=this;this.layerlistchanged=b.bind("layerlistchanged",function(){var e=c.indoormaps?c.indoormaps[0].indoorid:void 0;
c.indoormaps=c.getIndoorMaps();var d=c.findFloorId(e);c.setFloorId(d);c.updateSlider();if(c.updateCopyright()){c.map.currentLayerSet.copyrightDraw();}Y.Event.trigger(c,"indoormaplayerchanged");});this.copyrightCollection.getCopyrights=function(g,f){c.updateCopyright();var h=[];for(var d=0;d<this.copyrights.length;d++){var e=this.copyrights[d];if(this.isCollision(e,g,f)){if(e.text){h.push(e.text);}}}return h;
};};IndoorMapLayer.prototype.getIndoorMaps=function(){if(this.plugin){return this.plugin.yml.getIndoorMaps();}else{this.plugin=this.map.getPlugin("YahooMapLayer");if(this.plugin){return this.plugin.yml.getIndoorMaps();}}return null;};IndoorMapLayer.prototype.setFloorId=function(a){this.createStyle(a);if(this.isRedraw){this.drawLayer(true);}};IndoorMapLayer.prototype.updateSlider=function(){var b=this.map.getMaxZoom();
if(this.indoormaps&&this.indoormaps.length>0){var a=this.indoormaps[0].layers[0];a=Y.Util.scale2Level(a);this.MAX_ZOOM_LEVEL=this.map.indoorMaxZoom=a;}else{this.map.indoorMaxZoom=void 0;}if(b!=this.map.getMaxZoom()){Y.Event.trigger(this.map,"numlayerchanged");}};IndoorMapLayer.prototype.createStyle=function(k){var g=[];var e=[];var m={};if(this.indoormaps&&this.indoormaps.length>0&&k!==null){var f=this.indoormaps[0];
var l=f.indoorid;m[l]=k;e.push(l);if(f.floorconnections){for(var d=0;d<f.floorconnections.length;d++){var h=f.floorconnections[d];if(k===h.floorid){m[h.connection.indoorid]=h.connection.floorid;}}}for(var d=1;d<this.indoormaps.length;d++){var f=this.indoormaps[d];var l=f.indoorid;e.push(l);if(typeof m[l]==="undefined"){for(var b=0;b<f.floorids.length;b++){if(k===f.floorids[b]){m[l]=f.floorids[b];break;
}}}}for(var l in m){g.push("id."+l+"."+m[l]+":ids");}}this.styles=g.join("|");this.isRedraw=false;if(this.floorId!=k){this.floorId=k;this.isRedraw=true;}e.sort(function(i,c){if(i<c){return -1;}if(i>c){return 1;}return 0;});var a=e.join(",");if(!this.drawList||this.drawList!==a){this.drawList=a;this.isRedraw=true;}};IndoorMapLayer.prototype.findFloorId=function(e){var b=null;if(this.indoormaps&&this.indoormaps.length>0){var d=this.indoormaps[0];
if(d.floorconnections){for(var a=0;a<d.floorconnections.length;a++){var f=d.floorconnections[a];if(e===f.connection.indoorid&&this.floorId===f.connection.floorid){b=f.floorid;break;}}}if(b==null){for(var a=0;a<d.floorids.length;a++){if(d.floorids[a]===this.floorId){b=this.floorId;}}}if(b==null){b=d.defaultfloorid;}}return b;};IndoorMapLayer.prototype.drawLayer=function(d){if(d){this.tileArray=null;
delete this.tileArray;this.tileArray=[];this.tileCount=0;var f=this;if(this.delOldTiles){clearTimeout(this.delOldTiles);this.oldTiles.remove();}this.oldTiles=this.container.children();this.delOldTiles=setTimeout(function(){f.oldTiles.fadeTo("slow",0,function(){$(this).remove();});},1000);}var b=this.map.getProjection();this.geoCenter=this.map.getCenter();this.tileCenter=b.fromLatLngToTile(this.geoCenter,this.map.getZoom());
this.fillSize=this.getFillSize();var e=this.fillSize.c-this.tileCount;if(e>0){for(var a=0;a<e;++a){var c=new Y.DomTile(this.createTile());if(c){this.tileArray.push(c);this.container.prepend(c.dom);}}}else{if(e<0){for(var a=0;a<-e;++a){var c=this.tileArray.pop();if(c){c.dom.remove();}}}}this.tileCount=this.fillSize.c;this.drawTiles();};IndoorMapLayer.prototype.updateCopyright=function(){var d=this.map.getBounds();
var f=this.map.getZoom();var b="";var e=this.map.currentLayerSet.getLayers();if(this.MAX_ZOOM_LEVEL<f||this.MIN_ZOOM_LEVEL>f){b="";}else{b=this.indoormaps?this.indoormaps[0].copyright:"";for(var a=0;a<e.length;a++){if(e[a].name===this.name){continue;}var g=e[a].getCopyrightCollection();if(g){var c=g.getCopyrightNotice(d,f);if(c.join(",").indexOf(b)!==-1){b="";break;}}}}if(this.copyright.text!=b){this.copyright.text=b;
return true;}return false;};IndoorMapLayer.prototype.remove=function(){if(this.map.getMaxZoom()!=this.MAX_ZOOMLEVEL){this.map.indoorMaxZoom=null;Y.Event.trigger(this.map,"numlayerchanged");}if(this.layerlistchanged){this.map.unbind(this.layerlistchanged);this.layerlistchanged=null;}if(this.container){this.container.remove();this.container=null;}if(this.drawer){this.drawer=null;}this.initialized=false;
};var IndoorMapLayer=Y.IndoorMapLayer=Y.extend(ImageTileLayer,function(a){ImageTileLayer.apply(this,[this.name,this.url,a]);this.indoormaps;this.floorId=void 0;this.styles="";this.isRedraw;this.drawList;this.smartphoneOptimize=true;this.url="http://m.map.c.yimg.jp/m?r=1&mode=indoormap&";this.name="IndoorMapLayer";this.MAX_ZOOM_LEVEL=22;this.MIN_ZOOM_LEVEL=18;this.copyright=new Y.Copyright("indoor",null,null,"");
this.copyrightCollection=new Y.CopyrightCollection();this.copyrightCollection.addCopyright(this.copyright);});IndoorMapLayer.prototype.getImageSrc=function(a,e,d){if(this.MAX_ZOOM_LEVEL<d||this.MIN_ZOOM_LEVEL>d){return"";}if(!this.indoormaps||this.styles==""){return"";}var c=this.url+"x="+a+"&y="+e+"&z="+d;if(this.smartphoneOptimize){var b=Math.round(this.floatTileSize.width*Y.Util.Platform.devicePixelRatio);
if(b!==Y.DEFAULT_TILE_SIZE){c+="&size="+b;}}c=c+"&style="+this.styles;return c;};IndoorMapLayer.prototype.initialize=function(b){this.__super__.initialize.call(this,b);this.indoormaps=this.getIndoorMaps();if(this.indoormaps&&this.indoormaps.length>0){var a=this.indoormaps[0].defaultfloorid;this.createStyle(a);this.updateSlider();}var c=this;this.layerlistchanged=b.bind("layerlistchanged",function(){var e=c.indoormaps?c.indoormaps[0].indoorid:void 0;
c.indoormaps=c.getIndoorMaps();var d=c.findFloorId(e);c.setFloorId(d);c.updateSlider();if(c.updateCopyright()){c.map.currentLayerSet.copyrightDraw();}Y.Event.trigger(c,"indoormaplayerchanged");});this.copyrightCollection.getCopyrights=function(g,f){c.updateCopyright();var h=[];for(var d=0;d<this.copyrights.length;d++){var e=this.copyrights[d];if(this.isCollision(e,g,f)){if(e.text){h.push(e.text);}}}return h;
};};IndoorMapLayer.prototype.getIndoorMaps=function(){if(this.plugin){return this.plugin.yml.getIndoorMaps();}else{this.plugin=this.map.getPlugin("YahooMapLayer");if(this.plugin){return this.plugin.yml.getIndoorMaps();}}return null;};IndoorMapLayer.prototype.setFloorId=function(a){this.createStyle(a);if(this.isRedraw){this.drawLayer(true);}};IndoorMapLayer.prototype.updateSlider=function(){var b=this.map.getMaxZoom();
if(this.indoormaps&&this.indoormaps.length>0){var a=this.indoormaps[0].layers[0];a=Y.Util.scale2Level(a);this.MAX_ZOOM_LEVEL=this.map.indoorMaxZoom=a;}else{this.map.indoorMaxZoom=void 0;}if(b!=this.map.getMaxZoom()){Y.Event.trigger(this.map,"numlayerchanged");}};IndoorMapLayer.prototype.createStyle=function(k){var g=[];var e=[];var m={};if(this.indoormaps&&this.indoormaps.length>0&&k!==null){var f=this.indoormaps[0];
var l=f.indoorid;m[l]=k;e.push(l);if(f.floorconnections){for(var d=0;d<f.floorconnections.length;d++){var h=f.floorconnections[d];if(k===h.floorid){m[h.connection.indoorid]=h.connection.floorid;}}}for(var d=1;d<this.indoormaps.length;d++){var f=this.indoormaps[d];var l=f.indoorid;e.push(l);if(typeof m[l]==="undefined"){for(var b=0;b<f.floorids.length;b++){if(k===f.floorids[b]){m[l]=f.floorids[b];break;
}}}}for(var l in m){g.push("id."+l+"."+m[l]+":ids");}}this.styles=g.join("|");this.isRedraw=false;if(this.floorId!=k){this.floorId=k;this.isRedraw=true;}e.sort(function(i,c){if(i<c){return -1;}if(i>c){return 1;}return 0;});var a=e.join(",");if(!this.drawList||this.drawList!==a){this.drawList=a;this.isRedraw=true;}};IndoorMapLayer.prototype.findFloorId=function(e){var b=null;if(this.indoormaps&&this.indoormaps.length>0){var d=this.indoormaps[0];
if(d.floorconnections){for(var a=0;a<d.floorconnections.length;a++){var f=d.floorconnections[a];if(e===f.connection.indoorid&&this.floorId===f.connection.floorid){b=f.floorid;break;}}}if(b==null){for(var a=0;a<d.floorids.length;a++){if(d.floorids[a]===this.floorId){b=this.floorId;}}}if(b==null){b=d.defaultfloorid;}}return b;};IndoorMapLayer.prototype.drawLayer=function(d){if(d){this.tileArray=null;
delete this.tileArray;this.tileArray=[];this.tileCount=0;var f=this;if(this.delOldTiles){clearTimeout(this.delOldTiles);this.oldTiles.remove();}this.oldTiles=this.container.children();this.delOldTiles=setTimeout(function(){f.oldTiles.fadeTo("slow",0,function(){$(this).remove();});},1000);}var b=this.map.getProjection();this.geoCenter=this.map.getCenter();this.tileCenter=b.fromLatLngToTile(this.geoCenter,this.map.getZoom());
this.fillSize=this.getFillSize();var e=this.fillSize.c-this.tileCount;if(e>0){for(var a=0;a<e;++a){var c=new Y.DomTile(this.createTile());if(c){this.tileArray.push(c);this.container.prepend(c.dom);}}}else{if(e<0){for(var a=0;a<-e;++a){var c=this.tileArray.pop();if(c){c.dom.remove();}}}}this.tileCount=this.fillSize.c;this.drawTiles();};IndoorMapLayer.prototype.updateCopyright=function(){var d=this.map.getBounds();
var f=this.map.getZoom();var b="";var e=this.map.currentLayerSet.getLayers();if(this.MAX_ZOOM_LEVEL<f||this.MIN_ZOOM_LEVEL>f){b="";}else{b=this.indoormaps?this.indoormaps[0].copyright:"";for(var a=0;a<e.length;a++){if(e[a].name===this.name){continue;}var g=e[a].getCopyrightCollection();if(g){var c=g.getCopyrightNotice(d,f);if(c.join(",").indexOf(b)!==-1){b="";break;}}}}if(this.copyright.text!=b){this.copyright.text=b;
return true;}return false;};IndoorMapLayer.prototype.remove=function(){if(this.map.getMaxZoom()!=this.MAX_ZOOMLEVEL){this.map.indoorMaxZoom=null;Y.Event.trigger(this.map,"numlayerchanged");}if(this.layerlistchanged){this.map.unbind(this.layerlistchanged);this.layerlistchanged=null;}if(this.container){this.container.remove();this.container=null;}if(this.drawer){this.drawer=null;}this.initialized=false;
};var GeoCoder=Y.GeoCoder=function(){this.req=new Y.Request();this._serviceName="GeoCoder";};GeoCoder.prototype.execute=function(b,c,a){if(b.query){this.getLatLng(b.query,{},c,a);}else{if(b.latlng){this.getAddress(b.latlng,{},c,a);}else{if(b.content){this.getContentAddress(b.content,b.options||{},c,a);}}}};GeoCoder.prototype.getContentAddress=function(d,b,g){var a="http://contents.search.olp.yahooapis.jp/OpenLocalPlatform/V1/contentsGeoCoder";
var c=this.getApplicationId()||"2p2vjhCxg67O2GJbjLUr3qMynxw.eb..yaXy9WyErXOmBF7Dr44Ei8LH0XVY8w--";var e=b||{};e.ei="utf-8";e.datum="wgs";e.query=d;e.output="json";e.appid=c;var f=this;$.ajax({url:a,data:e,dataType:"jsonp",success:function(h){var i=new YDF(h);g(i);},error:function(h){Util.error(h);}});};GeoCoder.prototype.getAddress=function(g,b,f){var a=b.url||"http://reverse.search.olp.yahooapis.jp/OpenLocalPlatform/V1/reverseGeoCoder";
var c=this.getApplicationId()||"7OMK_9yxg65SaQov4WnfNhiD0rXc8euueABSpFmCllGhwN94EZA5l5E8BmwIlQ--";var d=b||{};d.ei="utf-8";d.datum="wgs";d.lat=g.lat();d.lon=g.lng();d.output="json";d.appid=c;var e=this;$.ajax({url:a,data:d,dataType:"jsonp",success:function(h){var i=new YDF(h);f(i);},error:function(h){Util.error(h);}});};GeoCoder.prototype.getLatLng=function(a,d,h,c){var b="http://geo.search.olp.yahooapis.jp/OpenLocalPlatform/V1/geoCoder";
var f=d||{};var e=this.getApplicationId()||".H_cbb6xg64qjt6.9Rjz6g60BzxYY_4QhrYdPx1OuyW98kvy0UQ0nblnEA0TzA--";f.ei="utf-8";f.query=a;f.datum="wgs";f.output="json";f.appid=e;var g=this;this.req.request({url:b,data:f,dataType:"jsonp",success:function(i){if(i&&i.Feature){if(i.Feature.Geometry){i.Feature=[i.Feature];}}var j=new Y.YDF(i);h(j);},error:function(i){Y.Util.error(i);}});};GeoCoder.prototype.getLocation=function(a,c,f){var b="http://"+Y.HOST_NAME+"/OpenLocalPlatform/V1/geocoder";
var d=c||{};d.ei="utf-8";d.p=a;d.datum="wgs";d.al=8;d.outputformat="ydf";d.gl=d.gl||"address";var e=this;this.req.request({url:b,data:d,dataType:"jsonp",success:function(g){if(g&&g.Feature){if(g.Feature.Geometry){g.Feature=[g.Feature];}$.each(g.Feature,function(i,j){j.Name=j.Property.Address;});}var h=new YDF(g);f(h);},error:function(g){Util.error(g);}});};GeoCoder.prototype.parseYDF=function(h,a){var g={};
g.result={total:a.count,count:a.viewcount,start:h,end:h+a.viewcount-1,status:a.status};g.features=[];var e=[];if(a&&a.poi){e=a.poi;}if(!e.length){e=[e];}for(var c in e){var f=e[c];var d={};d.id="geocoder-"+c;d.name=f.name;d.feature=b;d.property=f;var b=new Y.Marker(new Y.LatLng(f.wgslat,f.wgslon),d);g.features.push(b);}return g;};GeoCoder.prototype.setApplicationId=Y.Service.setApplicationId;GeoCoder.prototype.getApplicationId=Y.Service.getApplicationId;
var LocalSearch=Y.LocalSearch=function(){this._serviceName="LocalSearch";};LocalSearch.prototype.getCassette=function(c,a,b){this.search("",c,a,b);};LocalSearch.prototype.getPoi=function(c,a,b){this.search("",c,{uid:a,detail:"full"},b);};LocalSearch.prototype.search=function(a,g,c,f){var b="http://search.olp.yahooapis.jp/OpenLocalPlatform/V1/localSearch";var e=c||{};e.ei="utf-8";e.query=a;e.output="jsonp";
e.cid=e.cid||g;var d=this.getApplicationId();if(d){e.appid=d;}else{b="http://"+Y.HOST_NAME+"/OpenLocalPlatform/V1/yolpsearch";}$.ajax({url:b,data:e,dataType:"jsonp",success:function(h){var i=new Y.YDF(h);f(i);},error:function(){}});};LocalSearch.prototype.setApplicationId=Y.Service.setApplicationId;LocalSearch.prototype.getApplicationId=Y.Service.getApplicationId;var Plugin=Y.Plugin=function(){};Plugin.prototype.getName=function(){};Plugin.prototype.load=function(){};Plugin.prototype.unload=function(){};Plugin.prototype.disable=function(){};Plugin.prototype.enable=function(){};var YahooMapLayerPlugin=Y.YahooMapLayerPlugin=Y.extend(Y.Plugin,function(a){this.option=a||{};});YahooMapLayerPlugin.prototype.isLoaded=function(){return this.loaded;};YahooMapLayerPlugin.prototype.getName=function(){return"YahooMapLayer";};YahooMapLayerPlugin.prototype.getIcon=function(){return"http://ai.yimg.jp/images/search/y28.gif";};YahooMapLayerPlugin.prototype.load=function(a){this.map=a;this.yml=new Y.YahooMapLayer(this.map,this.option);
if(this.yml){this.loaded=true;}};YahooMapLayerPlugin.prototype.unload=function(){if(this.yml){this.yml.release();delete this.yml;this.yml=null;}this.loaded=false;};YahooMapLayerPlugin.prototype.setEnableVendorChange=function(a){this.yml.enableVendorChange=(typeof a!=="undefined")?a:true;this.yml.getYahooMapLayer();};var YahooMapLayer=Y.YahooMapLayer=function(c,b){this.map=c;this.HYBRID_ID="hybrid";
this.url=b.url||"http://layer.map.yahoo.co.jp/ml";this.config={map:{name:b.map||"NormalMap",maxJpScale:"1562498438",copyrightColor:"black"},photo:{name:b.photo||"PhotoMap",maxJpScale:"1525877",copyrightColor:"white"},hybrid:{name:b.hybrid||"PhotoMap(hybrid)",maxJpScale:"1525877",copyrightColor:"white"},"map-b1":{name:b["map-b1"]||"B1Map",maxJpScale:"5960",copyrightColor:"black"},"eq-photo":{name:b["eq-photo"]||"EarthQuakePhotoMap",maxJpScale:"1562498438",copyrightColor:"black"},stylemap:{name:b.stylemap||"StyleMapLayer",maxJpScale:"1562498438",copyrightColor:"black"}};
this.keyLayer={id:"map",scale:"381469"};this.vendor=YahooMapLayer.VENDOR.JAPAN;this.currentLayerList=null;this.timer=null;this.lastMoveEndTime=0;this.forceTime=3000;this.interval=300;var a=Y.Event;a.addListener(this.map,"moveend",this.moveEnd,this);a.addListener(this.map,"zoomend",this.layerListChanged,this);a.addListener(this.map,"layersetchanged",this.layerListChanged,this);a.addListener(this.map,"hybridphotochanged",this.layerListChanged,this);
a.addListener(this.map,"enablegwschanged",this.layerListChanged,this);this.enableVendorChange=true;this.timer=setInterval(this.bindThis(this.timerGetYahooMapLayer),this.interval);this._serviceName="Map";};YahooMapLayer.VENDOR={JAPAN:1,INC:2,NASA:3,OSM:4};YahooMapLayer.prototype.getYahooMapLayer=function(l){l=l||{};var h=YahooMapLayer.VENDOR;var k=(this.map.getCurrentLayerSetId()===Y.LayerSetId.OSM)?h.OSM:this.vendor;
var c=this.map;var k=this.vendor;if(this.hasNasaPhoto&&this.enableNasaPhotoLayer()){k=h.NASA;}else{if(c.getCurrentLayerSetId()===Y.LayerSetId.OSM){k=h.OSM;}}var f=this.map.getCurrentLayerSetId();var i=this.getApplicationId();if(l.mode){f=l.mode;i=l.appid;}var b=this.map.getBounds();var j=b.getSouthWest();var e=b.getNorthEast();var d={c:this.map.getCenter().lat()+","+this.map.getCenter().lng(),r:e.lat()+","+j.lng()+","+j.lat()+","+e.lng(),z:this.map.getZoom(),mode:f,vendor:k};
var a=this.map.getCenter();if(!this.url||(!d.c&&!d.r)){return;}if(i){d.appid=i;}var g=this;$.ajax({url:this.url,data:d,dataType:"jsonp",success:function(m){if(!m){return;}g.currentLayerList=m;var o=g.map.getCenter();if(o.lat()!=a.lat()||o.lng()!=a.lng()){return;}g.layerListChanged();var n=(typeof l.trigger==="undefined")?true:l.trigger;if(n){Y.Event.trigger(g.map,"layerlistchanged");}}});};YahooMapLayer.prototype.layerListChanged=function(){var d=this.getNearestLevel(1,Y.LayerSetId.PHOTO);
this.hasNasaPhoto=(d<10);this.autoLayerChange();var f,e;f=this.getCurrentLayerList(Y.LayerSetId.B1);if(!f){return;}var c=this.map.getLayerSets()[Y.LayerSetId.B1];if(c){e=f.length>0?true:false;c.setEnable(e);}f=this.getCurrentLayerList(Y.LayerSetId.EARTHQUAKEPHOTO);if(!f){return;}var a=this.map.getLayerSets()[Y.LayerSetId.EARTHQUAKEPHOTO];if(a){e=f.length>0?true:false;a.setEnable(e);}var b;if(!this.enableVendorChange){f=this.getCurrentLayerList(Y.LayerSetId.PHOTO);
if(!f){return;}b=this.map.getLayerSets()[Y.LayerSetId.PHOTO];if(b){e=f.length>0?true:false;b.setEnable(e);}}else{b=this.map.getLayerSets()[Y.LayerSetId.PHOTO];if(b){b.setEnable(true);}}};YahooMapLayer.prototype.autoLayerChange=function(){var c=this.map.getCurrentLayerSetId();var s=this.map.getZoom();var f=this.level2Scale(s);var j=this.map.getCurrentLayerSet();var g=j.getLayers();var a=[];var o=YahooMapLayer.VENDOR;
for(var h=0;h<g.length;h++){var k=g[h].getName();var d="";for(var r in this.config){if(!this.config.hasOwnProperty(r)){continue;}if(this.config[r].name==k){d=r;}}if(!d){continue;}if(d===Y.LayerSetId.PHOTO&&this.map.getConfigure("hybridPhoto")){d=this.HYBRID_ID;}if(d==="stylemap"){d="map";}if(!g[h].vendor){if(!this.IsEnableLayer(d,f)&&!this.getIndoorMaps()){if(!this.getLayerScaleList(d)){if(!this.map.isInfoWindowInBounds()){if(this.map.currentLayerSetId==Y.LayerSetId.EARTHQUAKEPHOTO){return;
}else{this.map.setLayerSet(Y.LayerSetId.NORMAL,true);}}return;}else{s=this.getNearestLevel(s,d);var n=null;if(this.map.operation.transitBehavior&&this.map.operation.transitBehavior.lastll){n=this.map.operation.transitBehavior.lastll;}this.map.setZoom(s,true,n);}}}else{this.vendor=this.getTargetVendor(d,s,g[h].vendor);if(this.vendor!=g[h].vendor){g[h].setVendor(this.vendor);g[h].draw(true);}if(this.vendor==o.JAPAN){if(!this.getLayerScaleList(d)){if(this.map.currentLayerSetId==Y.LayerSetId.EARTHQUAKEPHOTO){return;
}else{this.map.setLayerSet(Y.LayerSetId.NORMAL,true);}return;}else{if(!this.IsEnableLayer(d,f)&&!this.getIndoorMaps()){s=this.getNearestLevel(s-1,d);var n=null;if(this.map.operation.transitBehavior&&this.map.operation.transitBehavior.lastll){n=this.map.operation.transitBehavior.lastll;}this.map.setZoom(s,true,n);}}}else{if(d===this.HYBRID_ID){if(!this.getLayerScaleList(d)){if(!this.map.isInfoWindowInBounds()){this.map.setLayerSet(Y.LayerSetId.NORMAL,true);
}return;}else{if(!this.IsEnableLayer(d,f)){s=this.getNearestLevel(s-1,d);var n=null;if(this.map.operation.transitBehavior&&this.map.operation.transitBehavior.lastll){n=this.map.operation.transitBehavior.lastll;}this.map.setZoom(s,true,n);}}}else{if(this.vendor===o.INC&&d===Y.LayerSetId.PHOTO&&this.map.enableGWS===false){if(!this.IsEnableLayer(Y.LayerSetId.PHOTO,f)){s=this.getNearestLevel(s-1,d);var n=null;
if(this.map.operation.transitBehavior&&this.map.operation.transitBehavior.lastll){n=this.map.operation.transitBehavior.lastll;}this.map.setZoom(s,true,n);}}}}}a.push([d,this.vendor,g[h].getCopyrightCollection()]);}if(a.length>0&&j.copyrightContainer){for(var h=0;h<a.length;h++){var d=a[h][0];var q=a[h][1];var e=a[h][2];if(!e){continue;}var m=this.getCopyright(d,q,s);e.setPrefix(m);var b=j.copyrightContainer.children();
var l=this;b.each(function(){var i=$(this);if(i.attr("cr")){i.css("color",l.config[d].copyrightColor?l.config[d].copyrightColor:"black");}});}j.copyrightDraw();}};YahooMapLayer.prototype.getExistYml=function(b){var a=this.getCurrentLayerList(b);if(a){return true;}return false;};YahooMapLayer.prototype.getCurrentLayerList=function(a){if(!this.currentLayerList){return null;}if(this.currentLayerList.mappackages){return this.currentLayerList.mappackages[a];
}return this.currentLayerList[a];};YahooMapLayer.prototype.getIndoorMaps=function(){if(!this.currentLayerList.indoormaps||this.currentLayerList.indoormaps.length===0){return null;}return this.currentLayerList.indoormaps;};YahooMapLayer.prototype.IsEnableLayer=function(e,d){var c=this.getCurrentLayerList(e);if(!c){return true;}var a=c.length;for(var b=0;b<a;b++){if(c[b].scale==d){return true;}}return false;
};YahooMapLayer.prototype.getNearestLevel=function(c,f){var d=this.getCurrentLayerList(f);if(!d){return c;}if(d.length===0){return c;}var b=d[0].scale;var e=this.level2Scale(c);for(var a=0;a<d.length;a++){if(e>=d[a].scale){b=d[a].scale;}}return this.scale2Level(b);};YahooMapLayer.prototype.IsNearestJapan=function(){return this.IsEnableLayer(this.keyLayer.id,this.keyLayer.scale);};YahooMapLayer.prototype.getExistJpVendor=function(c,a){var b=this.config[c].maxJpScale;
if(!b||b>=a){return true;}return false;};YahooMapLayer.prototype.getTargetVendor=function(h,c,g){var e=YahooMapLayer.VENDOR;if(!this.enableVendorChange){return e.JAPAN;}var d=this.level2Scale(c);var f=this.getExistJpVendor(h,d);if(this.hasNasaPhoto){f=true;}var a=this.IsEnableLayer(h,d);var b=this.IsNearestJapan();if(g==e.JAPAN){if((!f||(!a&&!b))){g=e.INC;}}else{if(g==e.INC){if(f&&(a||b)){g=e.JAPAN;
}}}return g;};YahooMapLayer.prototype.getCurrentLayerListCopyright=function(g,d){var c="";var e=this.getCurrentLayerList(g);if(!e){return c;}var f=this.level2Scale(d);var a=e.length;for(var b=0;b<a;b++){if(e[b].scale==f){c=e[b].copyright;}}return c;};YahooMapLayer.prototype.getLayerScaleList=function(e){var c=[];var d=this.getCurrentLayerList(e);if(!d){return c;}var a=d.length;for(var b=0;b<a;b++){c.push(d[b].scale);
}return c.join(",");};YahooMapLayer.prototype.level2Scale=function(a){return Y.Util.level2Scale(a);};YahooMapLayer.prototype.scale2Level=function(a){return Y.Util.scale2Level(a);};YahooMapLayer.prototype.release=function(){this.map.unbind(this.moveend);this.map.unbind(this.zoomend);this.map.unbind(this.layersetchanged);Y.Event.removeListener(this.layerlistchanged);};YahooMapLayer.prototype.getCopyright=function(f,e,c){var d=YahooMapLayer.VENDOR;
var b=[];var a="";if(!e||e==d.JAPAN){b.push(this.getCurrentLayerListCopyright(f,c));}else{if(this.map.enableGWS){if(f===Y.LayerSetId.NORMAL){a=this.getCurrentLayerListCopyright("gws",c);}else{a=this.getCurrentLayerListCopyright("gws_photo",c);}}else{a=Y.OpenStreetMapLayer.COPYRIGHT;}if(f===this.HYBRID_ID){b.push(this.getCurrentLayerListCopyright(f,c));}b.push(a.replace("&#xA;","<br />"));}return b.join("<br />");
};YahooMapLayer.prototype.moveEnd=function(){if(this.timer!==null){clearTimeout(this.timer);this.timer=null;}if(this.lastMoveEndTime==new Date(1,1,1).getTime()){this.lastMoveEndTime=new Date().getTime();}var a=new Date().getTime();if((a-this.lastMoveEndTime)>this.forceTime){this.timerGetYahooMapLayer();}else{this.timer=setInterval(this.bindThis(this.timerGetYahooMapLayer),this.interval);}};YahooMapLayer.prototype.timerGetYahooMapLayer=function(){if(this.timer!==null){clearTimeout(this.timer);
this.timer=null;}this.lastMoveEndTime=new Date(1,1,1).getTime();this.getYahooMapLayer();};YahooMapLayer.prototype.bindThis=function(b){var a=this;return function(){b.apply(a,arguments);};};YahooMapLayer.prototype.enableNasaPhotoLayer=function(){var a=this.map.getCurrentLayerSetId();if(a!==Y.LayerSetId.PHOTO){return false;}var c=this.map.getZoom();var b=this.getCurrentLayerListCopyright(a,c);return b.toUpperCase().indexOf("NASA")!==-1;
};YahooMapLayer.prototype.getApplicationId=Y.Service.getApplicationId;var KeyOperationPlugin=Y.KeyOperationPlugin=Y.extend(Y.Plugin,function(a){this.configs=a||{};this.enable=true;});KeyOperationPlugin.prototype.getName=function(){return"KeyOperationPlugin";};KeyOperationPlugin.prototype.setEnable=function(a){if(!this.loaded){return;}this.enable=a;if(!this.configs.noScrollKey){this.flightScroll.setEnable(a);}if(!this.configs.noHomeKey){this.homeKeyMaping.setEnable(a);
}if(!this.configs.noZoomKey){this.zoomKeyMapping.p_in.setEnable(a);this.zoomKeyMapping.p_out.setEnable(a);this.zoomKeyMapping.a_in.setEnable(a);this.zoomKeyMapping.a_out.setEnable(a);}};KeyOperationPlugin.prototype.getEnable=function(){return this.enable;};KeyOperationPlugin.prototype.load=function(b){this.map=b;if(!this.configs.noScrollKey){var a=this.createScrollKeyMapping(this.configs.like);this.flightScroll=new Y.KeyOperationPlugin.FlightScroll(b,a);
}if(!this.configs.noHomeKey){var c=b.getCenter();this.homeKeyMaping=new Y.KeyMapping([36],function(){b.panTo(c,true);});}if(!this.configs.noZoomKey){this.zoomKeyMapping={p_out:new Y.KeyMapping([33],function(){b.zoomOut(null,false,false);}),p_in:new Y.KeyMapping([34],function(){b.zoomIn(null,false,false);}),a_out:new Y.KeyMapping([45],function(){b.zoomOut(null,false,true);}),a_in:new Y.KeyMapping([46],function(){b.zoomIn(null,false,true);
})};}this.loaded=true;};KeyOperationPlugin.prototype.unload=function(){if(this.loaded){if(!this.configs.noScrollKey){this.flightScroll.release();}if(!this.configs.noHomeKey){this.homeKeyMaping.release();}if(!this.configs.noZoomKey){this.zoomKeyMapping.p_in.release();this.zoomKeyMapping.p_out.release();this.zoomKeyMapping.a_in.release();this.zoomKeyMapping.a_out.release();}}this.loaded=false;};KeyOperationPlugin.prototype.createScrollKeyMapping=function(a){var b;
switch(a){case"vi":b={up:75,down:74,left:72,right:76};break;case"emacs":b={up:80,down:78,left:66,right:70};break;default:b={up:38,down:40,left:37,right:39};break;}return b;};var FlightScroll=Y.KeyOperationPlugin.FlightScroll=function(b,a){this.doc=$(window.document);this.enable=true;this.map=b;this.scrollKey=a||{up:38,down:40,left:37,right:39};this.downKeys={};this.velocityX=0;this.velocityY=0;this.timer=null;
this.TIMER_STEP=30;this.ACCELERATION_KEY_CODE=16;this.ACCELERATION_OF_JET_ENGINE=5000;this.COEFFICIENT_OF_AIR=10;this.OBJECT_MASS=2;this.watchEvents();};FlightScroll.prototype.watchEvents=function(){this.downKeys[this.ACCELERATION_KEY_CODE]=false;this.downKeys[this.scrollKey.up]=false;this.downKeys[this.scrollKey.down]=false;this.downKeys[this.scrollKey.left]=false;this.downKeys[this.scrollKey.right]=false;
this.keydown=this.bindThis(this.onKeyDown);this.keyup=this.bindThis(this.onKeyUp);this.doc.bind("keydown",this.keydown);this.doc.bind("keyup",this.keyup);};FlightScroll.prototype.setEnable=function(a){this.enable=a;};FlightScroll.prototype.getEnable=function(){return this.enable;};FlightScroll.prototype.onKeyDown=function(d){var c=(document.activeElement||window.getSelection().focusNode)||window;var a=c.tagName.toLowerCase()||null;
switch(a){case"input":case"select":case"textarea":case"fileupload":case"frame":return;}var b=d.keyCode;switch(b){case this.scrollKey.up:case this.scrollKey.down:case this.scrollKey.left:case this.scrollKey.right:this.downKeys[b]=true;if(this.enable){this.startScroll();}break;case this.ACCELERATION_KEY_CODE:this.downKeys[b]=true;break;}};FlightScroll.prototype.onKeyUp=function(b){var a=b.keyCode;switch(a){case this.scrollKey.up:case this.scrollKey.down:case this.scrollKey.left:case this.scrollKey.right:this.downKeys[a]=false;
break;case this.ACCELERATION_KEY_CODE:this.downKeys[a]=false;break;}};FlightScroll.prototype.startScroll=function(){if(this.timer===null){this.timer=setTimeout(this.bindThis(this.accelerateAndScroll),5);Y.Log.write("movestart fire.");Y.Event.trigger(this.map,"movestart");}};FlightScroll.prototype.accelerateAndScroll=function(){var c=0;var a=0;var b=this.ACCELERATION_OF_JET_ENGINE;if(this.downKeys[this.ACCELERATION_KEY_CODE]){b*=3;
}if(this.downKeys[this.scrollKey.left]){c+=b;}if(this.downKeys[this.scrollKey.right]){c-=b;}if(this.downKeys[this.scrollKey.up]){a+=b;}if(this.downKeys[this.scrollKey.down]){a-=b;}this.scroll(c,a,this.TIMER_STEP/1000);if(this.velocityX!==0||this.velocityY!==0){this.timer=setTimeout(this.bindThis(this.accelerateAndScroll),this.TIMER_STEP);}else{clearTimeout(this.timer);this.timer=null;this.map.updateBounds();
Y.Log.write("moveend fire.");Y.Event.trigger(this.map,"moveend");}};FlightScroll.prototype.scroll=function(n,l,c){var i=-this.COEFFICIENT_OF_AIR*this.velocityX;var g=-this.COEFFICIENT_OF_AIR*this.velocityY;var k=this.OBJECT_MASS*n+i;var j=this.OBJECT_MASS*l+g;var e=k/this.OBJECT_MASS;var d=j/this.OBJECT_MASS;var h=this.velocityX*c+0.5*e*c*c;var f=this.velocityY*c+0.5*d*c*c;if(Math.abs(h)<2&&Math.abs(f)<2){this.velocityX=0;
this.velocityY=0;}else{this.velocityX=h/c;this.velocityY=f/c;if(h!==0||f!==0){var a=this.map.checkRange(new Y.Point(h,f));var b=this.map.mapContainer;this.map.updatePosition(a.x,a.y);this.map.panUpdate();this.map.currentLayerSet.draw();this.map.systemLayer.onPan(a.x,a.y);Y.Event.trigger(this.map,"move");}}};FlightScroll.prototype.bindThis=function(b){var a=this;return function(){b.apply(a,arguments);
};};FlightScroll.prototype.release=function(){if(this.timer){clearTimeout(this.timer);this.timer=null;}this.doc.unbind("keydown",this.keydown);this.doc.unbind("keyup",this.keyup);};var PanControl=Y.PanControl=Y.extend(Control,function(a){this.nodes=[];this.options=a||{};});PanControl.prototype.initialize=function(c){var a="/OpenLocalPlatform/V1/jsapi/image/img.png";var b=$('<p class="yolp-move-up" style="cursor:pointer;position: absolute; top: 0; left: 50%; margin: 0;  padding: 0; margin-top:5px; margin-left:-36px; "></p>').append($('<img src="'+Y.CTRL_IMAGE_URL+'" alt="\u4e0a\u3078\u9032\u3080" />').loadAlphaImage());
b.click(function(d){c.panDirection(0,0.5,true);d.stopPropagation();});b.dblclick(function(d){d.stopPropagation();});c.mainContainer.append(b);this.nodes.push(b);var b=$('<p class="yolp-move-right" style="cursor:pointer;position: absolute; top: 0; right: 0; margin: 0; padding: 0;top:50%; margin-top:-36px;margin-right:5px; "></p>').append($('<img src="'+Y.CTRL_IMAGE_URL+'" />').loadAlphaImage());b.click(function(d){c.panDirection(-0.5,0,true);
d.stopPropagation();});b.dblclick(function(d){d.stopPropagation();});c.mainContainer.append(b);this.nodes.push(b);var b=$('<p class="yolp-move-down" style="cursor:pointer;position: absolute; bottom: 0; left: 50%; margin: 0; padding: 0; margin-left:-36px;margin-bottom:5px;"></p>').append($('<img src="'+Y.CTRL_IMAGE_URL+'" />').loadAlphaImage());b.click(function(d){c.panDirection(0,-0.5,true);d.stopPropagation();
});b.dblclick(function(d){d.stopPropagation();});c.mainContainer.append(b);this.nodes.push(b);var b=$('<p class="yolp-move-left" style="cursor:pointer;position: absolute; top: 0; left: 0; margin: 0; padding: 0;top:50%;margin-top:-36px;margin-left:5px;"></p>').append($('<img src="'+Y.CTRL_IMAGE_URL+'" />').loadAlphaImage());b.click(function(d){c.panDirection(0.5,0,true);d.stopPropagation();});b.dblclick(function(d){d.stopPropagation();
});c.mainContainer.append(b);this.nodes.push(b);return b;};PanControl.prototype.getDefaultPosition=function(){return null;};PanControl.prototype.hide=function(){for(var a=0;a<4;a++){this.nodes[a].hide();}};PanControl.prototype.show=function(){for(var a=0;a<4;a++){this.nodes[a].show();}};var ApiProxyLayer=Y.ApiProxyLayer=Y.extend(Y.ListingLayer,function(b,a){this.api=b.api;this.apiurl=b.apiurl;a=a||{};a.url=a.url||"http://"+Y.HOST_NAME+"/OpenLocalPlatform/V1/ydf";ListingLayer.apply(this,["ApiProxy",a]);});ApiProxyLayer.prototype.getApiRequest=function(b,a){if(this.api){a.api=this.api;}if(this.apiurl){a.apiurl=this.apiurl;}a.output="jsonp";return ListingLayer.prototype.getApiRequest.apply(this,[b,a]);
};var NavigationLayer=Y.NavigationLayer=Y.extend(Y.FeatureLayer,function(b){var b=b||{};var a=b.url||"";this.navi=new Y.Navigation(a);this.travelMode=Y.Navigation.TRAVEL_MODE_WALKING;this.autoPanMap=b.autoPanMap||false;this.maxDistance=b.maxDistance||200;this.walkingDistance=b.walkingDistance||3;FeatureLayer.apply(this,["navigation",b]);});NavigationLayer.prototype.drawRoute=function(e,d,a,c){var b=this;
a=a||{};a.gui=(this.detail)?3:1;a.relays=a.relays||this.relays||[];a.trv=0;a.def=1;a.gl=2;a.spw=4.8;a.sp="80,80,30,20,20,20,20,20,30";if(this.walkingDistance&&e.isLatLng&&d.isLatLng&&e.distance(d)>this.walkingDistance){this.travelMode=Navigation.TRAVEL_MODE_DRIVING;}else{this.travelMode=Navigation.TRAVEL_MODE_WALKING;}a.tra=this.travelMode;this.from=e;this.to=d;this.options=a;this.ydf=null;Y.Event.trigger(this,"drawstart");
this.removeRoute();this.navi.search(e,d,a,function(f){b.drawYDF(f);if(c){c(f);}});};NavigationLayer.prototype.drawYDF=function(e){e=e||this.ydf;if(!e){return;}if(e.result.totalDistance>this.maxDistance){if(e.result.status>=0){e.result.status=Navigation.ERROR_MAX_DISTANCE;}}var c=(e.result.status<0);this.clearFeatures();this.fromFeature=null;this.toFeature=null;this.routeFeature=null;this.relayFeatures=[];
this.guideFeatures=[];var b=[];for(var a in e.features){var d=e.features[a];if(d.id==="from"){this.fromFeature=d;}else{if(d.id==="to"){this.toFeature=d;}else{if(d.id==="route"){if(!c){this.routeFeature=d;}else{d=null;}}else{if(d.id.substr(0,6)==="relay-"){this.relayFeatures.push(d);}else{if(d.id.substr(0,6)==="guide-"){if(!this.detail){continue;}this.guideFeatures.push(d);}}}}}if(d){b.push(d);}}this.addFeatures(b.reverse());
this.setEditable();this.ydf=e;if(this.autoPanMap){this.fitToMap();}Y.Event.trigger(this,"drawend");};NavigationLayer.prototype.getDistance=function(){if(this.ydf&&this.ydf.result.totalDistance){return this.ydf.result.totalDistance;}return null;};NavigationLayer.prototype.getDuration=function(){if(this.ydf&&this.ydf.result.totalTime){return this.ydf.result.totalTime;}return null;};NavigationLayer.prototype.getFromFeature=function(){return this.fromFeature;
};NavigationLayer.prototype.getToFeature=function(){return this.toFeature;};NavigationLayer.prototype.getRouteFeature=function(){return this.routeFeature;};NavigationLayer.prototype.getGuideFeatures=function(){return this.guideFeatures;};NavigationLayer.prototype.getRelayFeatures=function(){return this.relayFeatures;};NavigationLayer.prototype.hasResult=function(){return this.ydf&&this.ydf.result.status>=0;
};NavigationLayer.prototype.isError=function(){return this.ydf.result.status<0;};NavigationLayer.prototype.getError=function(){if(this.ydf&&this.ydf.result.status<0){return this.ydf.result.status;}return false;};NavigationLayer.prototype.fitToMap=function(){if(this.ydf&&this.ydf.result&&!this.isError()){this.map.drawBounds(this.ydf.result.bounds.copy().extendRate(1.2));}};NavigationLayer.prototype.setEditable=function(b){var c=this;
this.editable=(b!=undefined)?b:this.editable;if(this.fromFeature){var a=this.fromFeature;a.setDraggable(this.editable);a.bind("dragend",function(){c.setFromLatLng(this.getLatLng());Y.Event.trigger(c,"fromdragend");});if(this.editable){a.setTitle("\u51fa\u767a\u5730\u70b9\u3092\u30c9\u30e9\u30c3\u30b0\u3057\u3066\u79fb\u52d5\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059 ["+a.name+"]");}}if(this.toFeature){var a=this.toFeature;a.setDraggable(this.editable);a.bind("dragend",function(){c.setToLatLng(this.getLatLng());
Y.Event.trigger(c,"todragend");});if(this.editable){a.setTitle("\u5230\u7740\u5730\u70b9\u3092\u30c9\u30e9\u30c3\u30b0\u3057\u3066\u79fb\u52d5\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059 ["+a.name+"]");}}};NavigationLayer.prototype.setDetail=function(a){if(this.detail!=a){this.detail=a;this.drawRoute(this.from,this.to,this.options);}};NavigationLayer.prototype.isDetail=function(){return this.detail;};NavigationLayer.prototype.addRelay=function(b){var a=this.relays||[];a.push(b);this.relays=a;this.options.relays=a;
this.drawRoute(this.from,this.to,this.options);};NavigationLayer.prototype.getRelays=function(){return this.relays;};NavigationLayer.prototype.setFromLatLng=function(e,b,d){var c=this;var a=false;if(!b){c.getAddress(e,function(f){c.setFromLatLng(e,f,d);});return;}if(this.fromFeature){this.fromFeature.setLatLng(e);this.fromFeature.name=b;}else{this.fromFeature=this.navi.createFromFeature(e,b);this.addFeature(this.fromFeature);
}this.options=this.options||{};this.options.from_label=b||"";this.from=e;if(this.to&&this.from){this.drawRoute(this.from,this.to,this.options);a=true;}else{this.setEditable();}if(d){d(a);}};NavigationLayer.prototype.setToLatLng=function(e,b,d){var c=this;var a=false;if(!b){this.getAddress(e,function(f){c.setToLatLng(e,f,d);});return;}if(this.toFeature){this.toFeature.setLatLng(e);this.toFeature.name=b;
}else{this.toFeature=this.navi.createToFeature(e,b);this.addFeature(this.toFeature);}this.options=this.options||{};this.options.to_label=b||"";this.to=e;if(this.to&&this.from){this.drawRoute(this.from,this.to,this.options);a=true;}else{this.setEditable();}if(d){d(a);}};NavigationLayer.prototype.removeFrom=function(){if(this.fromFeature){this.removeFeature(this.fromFeature);this.fromFeature=null;this.from=null;
}this.removeRoute();};NavigationLayer.prototype.removeTo=function(){if(this.toFeature){this.removeFeature(this.toFeature);this.toFeature=null;this.to=null;}this.removeRoute();};NavigationLayer.prototype.removeRoute=function(){if(this.routeFeature){this.removeFeature(this.routeFeature);}if(this.relayFeatures){for(var a in this.relayFeatures){this.removeFeature(this.relayFeatures[a]);}}if(this.guideFeatures){for(var a in this.guideFeatures){this.removeFeature(this.guideFeatures[a]);
}}};NavigationLayer.prototype.getAddress=function(c,b){var a=new Y.LocationInfo();a.getAddress(c,{},function(d){if(d.AddressString){b(d.AddressString.unstructuredAddressString);}else{b(" ");}});};var TunnelLayer=Y.TunnelLayer=Y.extend(Y.ListingLayer,function(b,a){this.api=b.api;this.apiurl=b.apiurl;a=a||{};a.url=a.url||"http://"+Y.HOST_NAME+"/OpenLocalPlatform/V1/ydf";this.empty_query=a.emptyQuery||false;if(a.appid){this.appid=a.appid;}ListingLayer.apply(this,["Tunnel",a]);});TunnelLayer.prototype.getApiRequest=function(b,a){a=a||{};a.opt=a.opt||{};if(this.api){a.api=this.api;}if(this.apiurl){a.apiurl=this.apiurl;
}if(this.appid){a.appid=this.appid;}a.output="jsonp";if(this.req_opt){$.each(this.req_opt,function(c,f){if(!a.opt[c]){a.opt[c]=f;}});}var d=ListingLayer.prototype.getApiRequest.apply(this,[b,a]);if((!d.query||d.query.length==0)&&!this.empty_query){Y.Log.write("\u691c\u7d22\u6587\u5b57\u5217\u304c\u6307\u5b9a\u3055\u308c\u3066\u3044\u307e\u305b\u3093\u3002");return null;}if(this.map&&!d.bbox&&!d.lat&&!d.lon){if(this.map.getBounds){d.bbox=this.map.getBounds().toUrlValue();}else{if(this.map.getCenter){var e=this.map.getCenter();
d.lat=e.lat();d.lon=e.lng();}}}return d;};TunnelLayer.prototype.enableEmptyQuery=function(a){this.empty_query=a||true;};TunnelLayer.prototype.setAppId=function(a){this.appid=a;};TunnelLayer.prototype.setOption=function(a,b){if(!this.req_opt){this.req_opt={};}this.req_opt[a]=b;};var WeatherMapLayer=Y.WeatherMapLayer=Y.extend(Y.ImageTileLayer,function(a){this.url="http://weather.map.c.yimg.jp/weather?";this.url_info="http://weather.olp.yahooapis.jp/v1/info";this.viewdate="";this.timeshift=0;this.DATA_INTERVAL=60000*5;this.timerId=null;this.nowdate=0;this.olddate=0;this.updateInterval=this.DATA_INTERVAL;this.isAutoUpdateRunning=false;this.MAX_ANIMATION_TIME=3600000;this.MIN_ANIMATION_TIME=-7200000;
this.animationTimerId=0;this.animationInterval=1000;this.animationTimeshift=this.MIN_ANIMATION_TIME;this.animationStep=30000;this.animationFinishListener=null;this.animationUpdateListener=null;this.updateListener=null;this.isAnimationStarting=false;this.MAX_ZOOM_LEVEL=15;this.MIN_ZOOM_LEVEL=1;this.onLayerSetChangedScaleChange=null;this.onLayerSetChangedLabelOff=null;this.NOW_TIME_OFFSET=-10*60*1000;
this.gettime=null;this.mtime=null;this.name="WeatherMapLayer";a=a||{};this.options=a;this.options.opacity=this.options.opacity||1;var b=new Y.LatLngBounds(new Y.LatLng(20.004167,118.00625),new Y.LatLng(47.995833,149.99375));this.options.rangeOfBounds=b;this.isDisplay=false;this.timeContainer=null;this.timePosition=null;this._serviceName="WeatherMapLayer";this.appid="KaaCzwqxg65Mjwc3DlD7Ni5JcHH6aXwO1JiL02zAnhmw7pIcSHAj3SQNeOWVD1k4";
this.viewdate=this.convTime();this.options.enableFadeIn=this.options.enableFadeIn||false;this.options.maxZoomLevel=this.MAX_ZOOM_LEVEL;this.options.minZoomLevel=this.MIN_ZOOM_LEVEL;Y.ImageTileLayer.apply(this,[this.name,this.url,this.options]);});WeatherMapLayer.prototype.initialize=function(a){this.__super__.initialize.call(this,a);this.timeContainer=$('<div class="yolp-ctrl-weathertime"></div>').hide();
a.mainContainer.append(this.timeContainer);this.setTimePosition(this.getDefaultTimePosition());this.updateWeather();var b=this;this.bind("dataupdate",function(){b.dispTime();});this.eventZoomend=a.bind("zoomend",function(){b.dispTime();});this.eventLayersetchanged=a.bind("layersetchanged",function(){b.dispTime();});this.eventLoad=a.bind("load",function(){b.logging();});this.logging();};WeatherMapLayer.prototype.startAutoUpdate=function(b){var a=this;
b=b||{};if(b.interval){this.setAutoUpdateInterval(b.interval);}this.timerId=setInterval(function(){a.updateWeather({timeupdate:true});},a.updateInterval);this.isAutoUpdateRunning=true;};WeatherMapLayer.prototype.stopAutoUpdate=function(){clearInterval(this.timerId);this.timerId=0;this.isAutoUpdateRunning=false;};WeatherMapLayer.prototype.setUpdateCallback=function(a){if(a){if(this.updateListener){this.unbind(this.updateListener);
}this.updateListener=this.bind("dataupdate",a,window);}};WeatherMapLayer.prototype.setAutoUpdateInterval=function(a){if(a>=2){this.updateInterval=a*60000;}};WeatherMapLayer.prototype.getTimeShift=function(){return this.timeshift;};WeatherMapLayer.prototype.setTimeShift=function(a){if(!isNaN(a)){this.timeshift=parseInt(a,10);this.setAnimationTimeShift(this.timeshift);}};WeatherMapLayer.prototype.updateWeather=function(b){b=b||{};
var a=(typeof b.timeupdate==="undefined")?false:b.timeupdate;var c=this;this.getDate(function(){c.redraw();},a);};WeatherMapLayer.prototype.getNowDate=function(){return this.viewdate;};WeatherMapLayer.prototype.startAnimation=function(b){if(this.animationTimerId!==0){clearTimeout(this.animationTimerId);this.animationTimerId=0;}b=b||{};if(b.onFinish){this.setAnimationFinishCallback(b.onFinish);}if(b.onUpdate){this.setAnimationUpdateCallback(b.onUpdate);
}if(b.interval){this.setAnimationInterval(b.interval);}if(b.step){this.setAnimationStep(b.step);}var a=this;if(this.timerId!==0&&this.isAutoUpdateRunning===true){clearInterval(this.timerId);this.timerId=0;}this.timeshift=this.animationTimeshift;this.isAnimationStarting=true;this.animationTimerId=setTimeout(function(){a.runAnimation();},this.animationInterval);};WeatherMapLayer.prototype.stopAnimation=function(){clearTimeout(this.animationTimerId);
this.animationTimerId=0;if(this.isAutoUpdateRunning===true){this.startAutoUpdate();}Y.Event.trigger(this,"animationstop");};WeatherMapLayer.prototype.setAnimationFinishCallback=function(a){if(a){if(this.animationFinishListener){this.unbind(this.animationFinishListener);}this.animationFinishListener=this.bind("animationstop",a,window);}};WeatherMapLayer.prototype.setAnimationUpdateCallback=function(a){if(a){if(this.animationUpdateListener){this.unbind(this.animationUpdateListener);
}this.animationUpdateListener=this.bind("animationupdate",a,window);}};WeatherMapLayer.prototype.setAnimationInterval=function(a){this.animationInterval=parseInt(a,10);};WeatherMapLayer.prototype.setAnimationStep=function(a){this.animationStep=parseInt(a,10);};WeatherMapLayer.prototype.getAnimationTimeShift=function(){return this.animationTimeshift;};WeatherMapLayer.prototype.setAnimationTimeShift=function(a){if(!isNaN(a)){this.animationTimeshift=parseInt(a,10);
}};WeatherMapLayer.prototype.setDispTime=function(a){this.isDisplay=a;this.dispTime();};WeatherMapLayer.prototype.setTimePosition=function(a){if(!this.timeContainer){return;}if(a){this.timePosition=a;}var c={position:"absolute"};var d=this.timePosition.offset;var b=this.timePosition.anchor;if(b===Y.ControlPosition.TOP_RIGHT){c.right=d.width+"px";c.top=d.height+"px";}else{if(b===Y.ControlPosition.TOP_LEFT){c.left=d.width+"px";
c.top=d.height+"px";}else{if(b===Y.ControlPosition.BOTTOM_RIGHT){c.right=d.width+"px";c.bottom=d.height+"px";}else{if(b===Y.ControlPosition.BOTTOM_LEFT){c.left=d.width+"px";c.bottom=d.height+"px";}}}}this.timeContainer.css(c);};WeatherMapLayer.prototype.getImageSrc=function(a,e,d){if(this.nowdate===0){return;}var b=this.url;this.viewdate=this.convTime(this.nowdate);var c="";if(this.MAX_ZOOM_LEVEL>=d&&this.MIN_ZOOM_LEVEL<=d){if(b instanceof Object){b=b[d]||b["0"];
this.count=b.length<=this.count?0:this.count;b=b[this.count++];}c=b+"x="+a+"&y="+e+"&z="+d;c+="&date="+this.viewdate.substring(0,12);}return c;};WeatherMapLayer.prototype.remove=function(){if(this.timerId!==0){this.stopAutoUpdate();}if(this.animationTimerId!==0){this.stopAnimation();}if(this.onLayerSetChangedScaleChange){this.map.unbind(this.onLayerSetChangedScaleChange);this.onLayerSetChangedScaleChange=null;
}if(this.onLayerSetChangedLabelOff){this.map.unbind(this.onLayerSetChangedLabelOff);this.onLayerSetChangedLabelOff=null;}if(this.animationFinishListener){this.unbind(this.animationFinishListener);this.animationFinishListener=null;}if(this.animationUpdateListener){this.unbind(this.animationUpdateListener);this.animationUpdateListener=null;}if(this.updateListener){this.unbind(this.updateListener);this.updateListener=null;
}if(this.timeContainer){this.timeContainer.remove();this.timeContainer=null;}if(this.eventZoomend){this.map.unbind(this.eventZoomend);}if(this.eventLayersetchanged){this.map.unbind(this.eventLayersetchanged);}if(this.eventLoad){this.map.unbind(this.eventLoad);}Y.Event.trigger(this.map,"dispweathermaplayer",false);Y.Layer.prototype.remove.call(this);};WeatherMapLayer.prototype.getDefaultTimePosition=function(){return new Y.ControlPosition(Y.ControlPosition.BOTTOM_LEFT,new Y.Size(1,26));
};WeatherMapLayer.prototype.dispTime=function(){if(!this.map||!this.timeContainer||!this.viewdate){return;}var b=this.map.getZoom();if(this.MAX_ZOOM_LEVEL>=b&&this.MIN_ZOOM_LEVEL<=b){var a=this.viewdate.slice(0,4)+"\u5e74"+this.viewdate.slice(4,6)+"\u6708"+this.viewdate.slice(6,8)+"\u65e5"+this.viewdate.slice(8,10)+"\u6642"+this.viewdate.slice(10,12)+"\u5206";if(this.isDisplay){this.timeContainer.html(a).show();}else{this.timeContainer.hide();
}Y.Event.trigger(this.map,"dispweathermaplayer",true);}else{this.timeContainer.hide();Y.Event.trigger(this.map,"dispweathermaplayer",false);}};WeatherMapLayer.prototype.UpdateWeather=function(){this.updateWeather();};WeatherMapLayer.prototype.getDate=function(h,b){if(!b){if(this.gettime){var f=new Date();var a=f.getTime()-this.gettime;if(this.updateInterval>a){var c=this.mtime+parseInt(this.timeshift,10);
this.nowdate=Math.floor(c/this.DATA_INTERVAL)*(this.DATA_INTERVAL);h();return;}}}var g=this;var e=this.getApplicationId();if(!e){e=this.appid;}var f=new Date();this.gettime=f.getTime();$.ajax({url:this.url_info,data:"appid="+e,dataType:"jsonp",timeout:3000,success:function(j){var l=j.Observation;if(typeof l==="string"){var k=new Date(l.slice(0,4),l.slice(4,6)-1,l.slice(6,8),l.slice(8,10),l.slice(10,12));
g.mtime=k.getTime();var i=g.mtime+parseInt(g.timeshift,10);g.nowdate=Math.floor(i/g.DATA_INTERVAL)*(g.DATA_INTERVAL);}h();},error:function(){var j=new Date();g.mtime=j.getTime()+g.NOW_TIME_OFFSET;var i=g.mtime+parseInt(g.timeshift,10);g.nowdate=Math.floor(i/g.DATA_INTERVAL)*(g.DATA_INTERVAL);h();}});};WeatherMapLayer.prototype.redraw=function(){if(this.initialized&&this.container){this.container.empty();
this.drawLayer(true);this.olddate=this.nowdate;this.dispTime();Y.Event.trigger(this,"dataupdate");}};WeatherMapLayer.prototype.runAnimation=function(){var a=this;a.updateAnimationWeather();if(a.isAnimationStarting===true){a.animationTimerId=setTimeout(function(){a.runAnimation();},a.animationInterval);}};WeatherMapLayer.prototype.AnimationWeather=function(){this.updateAnimationWeather();};WeatherMapLayer.prototype.updateAnimationWeather=function(){this.getAnimationDate();
if(this.nowdate!=this.olddate){var b=Math.floor(this.animationTimeshift/this.DATA_INTERVAL)*this.DATA_INTERVAL;if(this.timeshift!=b){this.timeshift=b;this.redraw();}}Y.Event.trigger(this,"animationupdate");var a=this.animationTimeshift+this.animationStep;if(this.MAX_ANIMATION_TIME<a){this.animationTimeshift=this.MAX_ANIMATION_TIME;this.isAnimationStarting=false;}else{if(this.MIN_ANIMATION_TIME>a){this.animationTimeshift=this.MIN_ANIMATION_TIME;
this.isAnimationStarting=false;}else{this.animationTimeshift=a;}}if(this.isAnimationStarting===false){this.stopAnimation();return;}};WeatherMapLayer.prototype.getAnimationDate=function(){var a;if(this.mtime){a=this.mtime+parseInt(this.animationTimeshift,10);}else{var b=new Date();this.mtime=b.getTime()+this.NOW_TIME_OFFSET;a=this.mtime+parseInt(this.animationTimeshift,10);}this.nowdate=Math.floor(a/this.DATA_INTERVAL)*(this.DATA_INTERVAL);
};WeatherMapLayer.prototype.convTime=function(a){var k=a;if(!k){var b=new Date();var h=b.getTime()+this.NOW_TIME_OFFSET+parseInt(this.timeshift,10);k=Math.floor(h/this.DATA_INTERVAL)*(this.DATA_INTERVAL);}var j=new Date(k);var g=j.getYear();var f=j.getMonth()+1;var i=j.getDate();var c=j.getHours();var d=j.getMinutes();var e=j.getSeconds();if(g<2000){g+=1900;}if(f<10){f="0"+f;}if(i<10){i="0"+i;}if(c<10){c="0"+c;
}if(d<10){d="0"+d;}if(e<10){e="0"+e;}return String(g)+String(f)+String(i)+String(c)+String(d)+String(e);};WeatherMapLayer.prototype.logging=function(){var b=this.map.getPlugin("YahooMapLayer");var a=this.findOwnApplicationId();if(b&&b.yml){b.yml.getYahooMapLayer({mode:"rainfall",appid:a,trigger:false});}};WeatherMapLayer.prototype.setApplicationId=Y.Service.setApplicationId;WeatherMapLayer.prototype.getApplicationId=Y.Service.getApplicationId;
WeatherMapLayer.prototype.findOwnApplicationId=Y.Service.findOwnApplicationId;var HighResoWeatherMapLayer=Y.HighResoWeatherMapLayer=Y.extend(Y.ImageTileLayer,function(a){this.url="http://weather.map.c.yimg.jp/weather250?";this.url_info="http://weather.olp.yahooapis.jp/v1/info";this.viewdate="";this.timeshift=0;this.DATA_INTERVAL=60000*5;this.timerId=null;this.nowdate=0;this.olddate=0;this.updateInterval=this.DATA_INTERVAL;this.isAutoUpdateRunning=false;this.MAX_ANIMATION_TIME=3600000;
this.MIN_ANIMATION_TIME=-7200000;this.animationTimerId=0;this.animationInterval=1000;this.animationTimeshift=this.MIN_ANIMATION_TIME;this.animationStep=30000;this.animationFinishListener=null;this.animationUpdateListener=null;this.updateListener=null;this.isAnimationStarting=false;this.MAX_ZOOM_LEVEL=15;this.MIN_ZOOM_LEVEL=1;this.onLayerSetChangedScaleChange=null;this.onLayerSetChangedLabelOff=null;
this.NOW_TIME_OFFSET=-10*60*1000;this.gettime=null;this.mtime=null;this.name="HighResoWeatherMapLayer";a=a||{};this.options=a;this.options.opacity=this.options.opacity||1;var b=new Y.LatLngBounds(new Y.LatLng(20.004167,118.00625),new Y.LatLng(47.995833,149.99375));this.options.rangeOfBounds=b;this.isDisplay=false;this.timeContainer=null;this.timePosition=null;this._serviceName="HighResoWeatherMapLayer";
this.appid="KaaCzwqxg65Mjwc3DlD7Ni5JcHH6aXwO1JiL02zAnhmw7pIcSHAj3SQNeOWVD1k4";this.viewdate=this.convTime();this.options.enableFadeIn=this.options.enableFadeIn||false;this.options.maxZoomLevel=this.MAX_ZOOM_LEVEL;this.options.minZoomLevel=this.MIN_ZOOM_LEVEL;Y.ImageTileLayer.apply(this,[this.name,this.url,this.options]);});HighResoWeatherMapLayer.prototype.initialize=function(a){this.__super__.initialize.call(this,a);
this.timeContainer=$('<div class="yolp-ctrl-weathertime"></div>').hide();a.mainContainer.append(this.timeContainer);this.setTimePosition(this.getDefaultTimePosition());this.updateWeather();var b=this;this.bind("dataupdate",function(){b.dispTime();});this.eventZoomend=a.bind("zoomend",function(){b.dispTime();});this.eventLayersetchanged=a.bind("layersetchanged",function(){b.dispTime();});this.eventLoad=a.bind("load",function(){b.logging();
});this.logging();};HighResoWeatherMapLayer.prototype.startAutoUpdate=function(b){var a=this;b=b||{};if(b.interval){this.setAutoUpdateInterval(b.interval);}this.timerId=setInterval(function(){a.updateWeather({timeupdate:true});},a.updateInterval);this.isAutoUpdateRunning=true;};HighResoWeatherMapLayer.prototype.stopAutoUpdate=function(){clearInterval(this.timerId);this.timerId=0;this.isAutoUpdateRunning=false;
};HighResoWeatherMapLayer.prototype.setUpdateCallback=function(a){if(a){if(this.updateListener){this.unbind(this.updateListener);}this.updateListener=this.bind("dataupdate",a,window);}};HighResoWeatherMapLayer.prototype.setAutoUpdateInterval=function(a){if(a>=2){this.updateInterval=a*60000;}};HighResoWeatherMapLayer.prototype.getTimeShift=function(){return this.timeshift;};HighResoWeatherMapLayer.prototype.setTimeShift=function(a){if(!isNaN(a)){this.timeshift=parseInt(a,10);
this.setAnimationTimeShift(this.timeshift);}};HighResoWeatherMapLayer.prototype.updateWeather=function(b){b=b||{};var a=(typeof b.timeupdate==="undefined")?false:b.timeupdate;var c=this;this.getDate(function(){c.redraw();},a);};HighResoWeatherMapLayer.prototype.getNowDate=function(){return this.viewdate;};HighResoWeatherMapLayer.prototype.startAnimation=function(b){if(this.animationTimerId!==0){clearTimeout(this.animationTimerId);
this.animationTimerId=0;}b=b||{};if(b.onFinish){this.setAnimationFinishCallback(b.onFinish);}if(b.onUpdate){this.setAnimationUpdateCallback(b.onUpdate);}if(b.interval){this.setAnimationInterval(b.interval);}if(b.step){this.setAnimationStep(b.step);}var a=this;if(this.timerId!==0&&this.isAutoUpdateRunning===true){clearInterval(this.timerId);this.timerId=0;}this.timeshift=this.animationTimeshift;this.isAnimationStarting=true;
this.animationTimerId=setTimeout(function(){a.runAnimation();},this.animationInterval);};HighResoWeatherMapLayer.prototype.stopAnimation=function(){clearTimeout(this.animationTimerId);this.animationTimerId=0;if(this.isAutoUpdateRunning===true){this.startAutoUpdate();}Y.Event.trigger(this,"animationstop");};HighResoWeatherMapLayer.prototype.setAnimationFinishCallback=function(a){if(a){if(this.animationFinishListener){this.unbind(this.animationFinishListener);
}this.animationFinishListener=this.bind("animationstop",a,window);}};HighResoWeatherMapLayer.prototype.setAnimationUpdateCallback=function(a){if(a){if(this.animationUpdateListener){this.unbind(this.animationUpdateListener);}this.animationUpdateListener=this.bind("animationupdate",a,window);}};HighResoWeatherMapLayer.prototype.setAnimationInterval=function(a){this.animationInterval=parseInt(a,10);};
HighResoWeatherMapLayer.prototype.setAnimationStep=function(a){this.animationStep=parseInt(a,10);};HighResoWeatherMapLayer.prototype.getAnimationTimeShift=function(){return this.animationTimeshift;};HighResoWeatherMapLayer.prototype.setAnimationTimeShift=function(a){if(!isNaN(a)){this.animationTimeshift=parseInt(a,10);}};HighResoWeatherMapLayer.prototype.setDispTime=function(a){this.isDisplay=a;this.dispTime();
};HighResoWeatherMapLayer.prototype.setTimePosition=function(a){if(!this.timeContainer){return;}if(a){this.timePosition=a;}var c={position:"absolute"};var d=this.timePosition.offset;var b=this.timePosition.anchor;if(b===Y.ControlPosition.TOP_RIGHT){c.right=d.width+"px";c.top=d.height+"px";}else{if(b===Y.ControlPosition.TOP_LEFT){c.left=d.width+"px";c.top=d.height+"px";}else{if(b===Y.ControlPosition.BOTTOM_RIGHT){c.right=d.width+"px";
c.bottom=d.height+"px";}else{if(b===Y.ControlPosition.BOTTOM_LEFT){c.left=d.width+"px";c.bottom=d.height+"px";}}}}this.timeContainer.css(c);};HighResoWeatherMapLayer.prototype.getImageSrc=function(a,e,d){if(this.nowdate===0){return;}var b=this.url;this.viewdate=this.convTime(this.nowdate);var c="";if(this.MAX_ZOOM_LEVEL>=d&&this.MIN_ZOOM_LEVEL<=d){if(b instanceof Object){b=b[d]||b["0"];this.count=b.length<=this.count?0:this.count;
b=b[this.count++];}c=b+"x="+a+"&y="+e+"&z="+d;c+="&date="+this.viewdate.substring(0,12);}return c;};HighResoWeatherMapLayer.prototype.remove=function(){if(this.timerId!==0){this.stopAutoUpdate();}if(this.animationTimerId!==0){this.stopAnimation();}if(this.onLayerSetChangedScaleChange){this.map.unbind(this.onLayerSetChangedScaleChange);this.onLayerSetChangedScaleChange=null;}if(this.onLayerSetChangedLabelOff){this.map.unbind(this.onLayerSetChangedLabelOff);
this.onLayerSetChangedLabelOff=null;}if(this.animationFinishListener){this.unbind(this.animationFinishListener);this.animationFinishListener=null;}if(this.animationUpdateListener){this.unbind(this.animationUpdateListener);this.animationUpdateListener=null;}if(this.updateListener){this.unbind(this.updateListener);this.updateListener=null;}if(this.timeContainer){this.timeContainer.remove();this.timeContainer=null;
}if(this.eventZoomend){this.map.unbind(this.eventZoomend);}if(this.eventLayersetchanged){this.map.unbind(this.eventLayersetchanged);}if(this.eventLoad){this.map.unbind(this.eventLoad);}Y.Event.trigger(this.map,"dispweathermaplayer",false);Y.Layer.prototype.remove.call(this);};HighResoWeatherMapLayer.prototype.getDefaultTimePosition=function(){return new Y.ControlPosition(Y.ControlPosition.BOTTOM_LEFT,new Y.Size(1,26));
};HighResoWeatherMapLayer.prototype.dispTime=function(){if(!this.map||!this.timeContainer||!this.viewdate){return;}var b=this.map.getZoom();if(this.MAX_ZOOM_LEVEL>=b&&this.MIN_ZOOM_LEVEL<=b){var a=this.viewdate.slice(0,4)+"\u5e74"+this.viewdate.slice(4,6)+"\u6708"+this.viewdate.slice(6,8)+"\u65e5"+this.viewdate.slice(8,10)+"\u6642"+this.viewdate.slice(10,12)+"\u5206";if(this.isDisplay){this.timeContainer.html(a).show();}else{this.timeContainer.hide();
}Y.Event.trigger(this.map,"dispweathermaplayer",true);}else{this.timeContainer.hide();Y.Event.trigger(this.map,"dispweathermaplayer",false);}};HighResoWeatherMapLayer.prototype.UpdateWeather=function(){this.updateWeather();};HighResoWeatherMapLayer.prototype.getDate=function(h,b){if(!b){if(this.gettime){var f=new Date();var a=f.getTime()-this.gettime;if(this.updateInterval>a){var c=this.mtime+parseInt(this.timeshift,10);
this.nowdate=Math.floor(c/this.DATA_INTERVAL)*(this.DATA_INTERVAL);h();return;}}}var g=this;var e=this.getApplicationId();if(!e){e=this.appid;}var f=new Date();this.gettime=f.getTime();$.ajax({url:this.url_info,data:"raintype=250&appid="+e,dataType:"jsonp",timeout:3000,success:function(j){var l=j.Observation;if(typeof l==="string"){var k=new Date(l.slice(0,4),l.slice(4,6)-1,l.slice(6,8),l.slice(8,10),l.slice(10,12));
g.mtime=k.getTime();var i=g.mtime+parseInt(g.timeshift,10);g.nowdate=Math.floor(i/g.DATA_INTERVAL)*(g.DATA_INTERVAL);}h();},error:function(){var j=new Date();g.mtime=j.getTime()+g.NOW_TIME_OFFSET;var i=g.mtime+parseInt(g.timeshift,10);g.nowdate=Math.floor(i/g.DATA_INTERVAL)*(g.DATA_INTERVAL);h();}});};HighResoWeatherMapLayer.prototype.redraw=function(){if(this.initialized&&this.container){this.container.empty();
this.drawLayer(true);this.olddate=this.nowdate;this.dispTime();Y.Event.trigger(this,"dataupdate");}};HighResoWeatherMapLayer.prototype.runAnimation=function(){var a=this;a.updateAnimationWeather();if(a.isAnimationStarting===true){a.animationTimerId=setTimeout(function(){a.runAnimation();},a.animationInterval);}};HighResoWeatherMapLayer.prototype.AnimationWeather=function(){this.updateAnimationWeather();
};HighResoWeatherMapLayer.prototype.updateAnimationWeather=function(){this.getAnimationDate();if(this.nowdate!=this.olddate){var b=Math.floor(this.animationTimeshift/this.DATA_INTERVAL)*this.DATA_INTERVAL;if(this.timeshift!=b){this.timeshift=b;this.redraw();}}Y.Event.trigger(this,"animationupdate");var a=this.animationTimeshift+this.animationStep;if(this.MAX_ANIMATION_TIME<a){this.animationTimeshift=this.MAX_ANIMATION_TIME;
this.isAnimationStarting=false;}else{if(this.MIN_ANIMATION_TIME>a){this.animationTimeshift=this.MIN_ANIMATION_TIME;this.isAnimationStarting=false;}else{this.animationTimeshift=a;}}if(this.isAnimationStarting===false){this.stopAnimation();return;}};HighResoWeatherMapLayer.prototype.getAnimationDate=function(){var a;if(this.mtime){a=this.mtime+parseInt(this.animationTimeshift,10);}else{var b=new Date();
this.mtime=b.getTime()+this.NOW_TIME_OFFSET;a=this.mtime+parseInt(this.animationTimeshift,10);}this.nowdate=Math.floor(a/this.DATA_INTERVAL)*(this.DATA_INTERVAL);};HighResoWeatherMapLayer.prototype.convTime=function(a){var k=a;if(!k){var b=new Date();var h=b.getTime()+this.NOW_TIME_OFFSET+parseInt(this.timeshift,10);k=Math.floor(h/this.DATA_INTERVAL)*(this.DATA_INTERVAL);}var j=new Date(k);var g=j.getYear();
var f=j.getMonth()+1;var i=j.getDate();var c=j.getHours();var d=j.getMinutes();var e=j.getSeconds();if(g<2000){g+=1900;}if(f<10){f="0"+f;}if(i<10){i="0"+i;}if(c<10){c="0"+c;}if(d<10){d="0"+d;}if(e<10){e="0"+e;}return String(g)+String(f)+String(i)+String(c)+String(d)+String(e);};HighResoWeatherMapLayer.prototype.logging=function(){var b=this.map.getPlugin("YahooMapLayer");var a=this.findOwnApplicationId();
if(b&&b.yml){b.yml.getYahooMapLayer({mode:"rainfall",appid:a,trigger:false});}};HighResoWeatherMapLayer.prototype.setApplicationId=Y.Service.setApplicationId;HighResoWeatherMapLayer.prototype.getApplicationId=Y.Service.getApplicationId;HighResoWeatherMapLayer.prototype.findOwnApplicationId=Y.Service.findOwnApplicationId;var TyphoonMapLayer=Y.TyphoonMapLayer=Y.extend(Y.HighResoWeatherMapLayer,function(a){a=a||{};this.options=a;Y.HighResoWeatherMapLayer.apply(this,[this.name,this.url,this.url_info,this.viewdate,this.options]);var b=new Y.LatLngBounds(new Y.LatLng(5,-180),new Y.LatLng(60,180));this.rangeOfBounds=this.options.rangeOfBounds=b;this.url="http://weather.map.c.yimg.jp/weather250?";this.url_info="http://weather.olp.yahooapis.jp/v1/info";
this.name="TyphoonMapLayer";this.period=(typeof a.period=="undefined")?Y.TyphoonMapLayer.PERIOD.THREEDAYS:a.period;this.with_rader=(typeof a.rader=="undefined")?false:a.rader;this._serviceName="TyphoonMapLayer";this.appid="KaaCzwqxg65Mjwc3DlD7Ni5JcHH6aXwO1JiL02zAnhmw7pIcSHAj3SQNeOWVD1k4";this.tdate=this.viewdate=this.convTime();});TyphoonMapLayer.prototype.initialize=function(a){this.__super__.__super__.initialize.call(this,a);
this.timeContainer=$('<div class="yolp-ctrl-weathertime"></div>').hide();a.mainContainer.append(this.timeContainer);this.setTimePosition(this.getDefaultTimePosition());this.updateWeather();var b=this;this.bind("dataupdate",function(){b.dispTime();});this.eventZoomend=a.bind("zoomend",function(){b.dispTime();});this.eventLayersetchanged=a.bind("layersetchanged",function(){b.dispTime();});this.eventLoad=a.bind("load",function(){b.logging();
});this.logging();};TyphoonMapLayer.PERIOD={THREEDAYS:3,FIVEDAYS:5};TyphoonMapLayer.prototype.getImageSrc=function(a,e,d){if(this.nowdate===0){return;}var b=this.url;this.viewdate=this.convTime(this.nowdate);var c="";if(this.MAX_ZOOM_LEVEL>=d&&this.MIN_ZOOM_LEVEL<=d){if(b instanceof Object){b=b[d]||b["0"];this.count=b.length<=this.count?0:this.count;b=b[this.count++];}c=b+"x="+a+"&y="+e+"&z="+d;c+="&date="+this.viewdate.substring(0,12);
c+="&tdate="+this.tdate;c+="&LAYERS=";if(this.with_rader){c+="rain,";}c+="typhoon"+this.period;}return c;};TyphoonMapLayer.prototype.getPeriod=function(){return this.period;};TyphoonMapLayer.prototype.setPeriod=function(a){if(this.period!==a){this.period=a;this.redraw();}};TyphoonMapLayer.prototype.getRader=function(){return this.rader;};TyphoonMapLayer.prototype.setRader=function(a){if(this.with_rader!==a){this.with_rader=a;
this.redraw();}};TyphoonMapLayer.prototype.setCondition=function(c,b){var a=false;if(this.period!==c){this.period=c;a=true;}if(this.with_rader!==b){this.with_rader=b;a=true;}if(a){this.redraw();}};TyphoonMapLayer.prototype.set_typ_info=function(j){var c=new Object();if(j.Result){c.TyphoonFlag=j.Result.TyphoonFlag=="1";var a=j.Result.RainObservation;c.RainObservation=Y.Util.yyyymmddhhmm2date(a);this.mtime=c.RainObservation.getTime();
var k=this.mtime+parseInt(this.timeshift,10);this.nowdate=Math.floor(k/this.DATA_INTERVAL)*(this.DATA_INTERVAL);if(c.TyphoonFlag){var g;var h,e;var d=new Y.LatLngBounds(new Y.LatLng(14.63,121),new Y.LatLng(45.478,149.178));c.TyphoonObservation=Y.Util.yyyymmddhhmm2date(j.Result.TyphoonObservation);c.RefTime=Y.Util.yyyymmddhhmm2date(j.Result.RefTime);this.tdate=j.Result.RefTime;c.TyphoonNumber=j.Result.TyphoonNumber.split(",");
c.EntireForecast5Days=j.Result.EntireForecast5Days=="1";c.EntireBoundingBox3Days=c.EntireBoundingBox5Days=d;if(typeof j.Result.EntireBoundingBox3Days==="string"){g=j.Result.EntireBoundingBox3Days.split(" ");if(g.length>1){h=g[0].split(",");e=g[1].split(",");c.EntireBoundingBox3Days=new Y.LatLngBounds(new Y.LatLng(h[1],h[0]),new Y.LatLng(e[1],e[0]));}}if(typeof j.Result.EntireBoundingBox5Days==="string"){g=j.Result.EntireBoundingBox5Days.split(" ");
if(g.length>1){h=g[0].split(",");e=g[1].split(",");c.EntireBoundingBox5Days=new Y.LatLngBounds(new Y.LatLng(h[1],h[0]),new Y.LatLng(e[1],e[0]));}}c.ApproachFlag=j.Result.ApproachFlag=="1";c.ApproachNumber=j.Result.ApproachNumber.split(",");c.Forecast5Days=j.Result.Forecast5Days=="1";c.BoundingBox3Days=c.BoundingBox5Days=d;if(typeof j.Result.BoundingBox3Days==="string"){g=j.Result.BoundingBox3Days.split(" ");
if(g.length>1){h=g[0].split(",");e=g[1].split(",");c.BoundingBox3Days=new Y.LatLngBounds(new Y.LatLng(h[1],h[0]),new Y.LatLng(e[1],e[0]));}}if(typeof j.Result.BoundingBox5Days==="string"){g=j.Result.BoundingBox5Days.split(" ");if(g.length>1){h=g[0].split(",");e=g[1].split(",");c.BoundingBox5Days=new Y.LatLngBounds(new Y.LatLng(h[1],h[0]),new Y.LatLng(e[1],e[0]));}}c.Typhoon=new Array();for(var f=0;
f<j.Result.Typhoon.length;f++){var b=j.Result.Typhoon[f];c.Typhoon[f]=new Object();c.Typhoon[f].ObservationTime=Y.Util.yyyymmddhhmm2date(b.ObservationTime);c.Typhoon[f].RefTime=Y.Util.yyyymmddhhmm2date(b.RefTime);c.Typhoon[f].TyphoonNumber=b.TyphoonNumber;c.Typhoon[f].Forecast5Days=b.Forecast5Days==="1";if(typeof b.BoundingBox3Days!=="string"||b.BoundingBox3Days===""){c.Typhoon[f].BoundingBox3Days=d;
}else{g=b.BoundingBox3Days.split(" ");h=g[0].split(",");e=g[1].split(",");c.Typhoon[f].BoundingBox3Days=new Y.LatLngBounds(new Y.LatLng(h[1],h[0]),new Y.LatLng(e[1],e[0]));}if(typeof b.BoundingBox5Days!=="string"||b.BoundingBox5Days===""){c.Typhoon[f].BoundingBox5Days=d;}else{g=b.BoundingBox5Days.split(" ");h=g[0].split(",");e=g[1].split(",");c.Typhoon[f].BoundingBox5Days=new Y.LatLngBounds(new Y.LatLng(h[1],h[0]),new Y.LatLng(e[1],e[0]));
}c.Typhoon[f].Name=b.Name;c.Typhoon[f].NameKana=b.NameKana;c.Typhoon[f].Scale=b.Scale;c.Typhoon[f].Intensity=b.Intensity;c.Typhoon[f].Location=b.Location;c.Typhoon[f].Coordinate=b.Coordinate;c.Typhoon[f].LatLng=new Y.LatLng(b.Lat,b.Lon);c.Typhoon[f].MovingDirection=b.MovingDirection;c.Typhoon[f].MovingSpeed=b.MovingSpeed;c.Typhoon[f].CenterPressure=b.CenterPressure;c.Typhoon[f].MaxWindSpeed=b.MaxWindSpeed;
c.Typhoon[f].InstWindSpeed=b.InstWindSpeed;c.Typhoon[f].StormArea=b.StormArea;c.Typhoon[f].GaleArea=b.GaleArea;}}}else{c.TyphoonFlag=false;c.RainObservation=new Date();this.mtime=c.RainObservation.getTime()+this.NOW_TIME_OFFSET;var k=this.mtime+parseInt(this.timeshift,10);this.nowdate=Math.floor(k/this.DATA_INTERVAL)*(this.DATA_INTERVAL);}return c;};TyphoonMapLayer.prototype.getInfo=function(g,a){var f=this;
var c=this.getApplicationId();if(!c){c=this.appid;}if(typeof a==="boolean"){var b=new Y.Request();try{b.request_force({url:this.url_info,data:"type=typhoon&appid="+c,dataType:"jsonp",success:function(e){if(g){g(f.set_typ_info(e));}},error:function(h,k,j){var i={TyphoonFlag:false};i.RainObservation=new Date();f.mtime=i.RainObservation.getTime()+f.NOW_TIME_OFFSET;var e=f.mtime+parseInt(f.timeshift,10);
f.nowdate=Math.floor(e/f.DATA_INTERVAL)*(f.DATA_INTERVAL);if(g){g(i);}}},a);}catch(d){}}else{$.ajax({url:this.url_info,data:"raintype=250&type=typhoon&appid="+c,dataType:"jsonp",timeout:3000,success:function(e){if(g){g(f.set_typ_info(e));}},error:function(){var h={TyphoonFlag:false};h.RainObservation=new Date();f.mtime=h.RainObservation.getTime()+f.NOW_TIME_OFFSET;var e=f.mtime+parseInt(f.timeshift,10);
f.nowdate=Math.floor(e/f.DATA_INTERVAL)*(f.DATA_INTERVAL);if(g){g(h);}}});}};TyphoonMapLayer.prototype.getDate=function(b,a){this.getInfo(b);};var SnowFallLayer=Y.SnowFallLayer=Y.extend(Y.ImageTileLayer,function(a){this.url="http://weather.map.c.yimg.jp/snowfall?";this.url_info="http://weather.olp.yahooapis.jp/v1/info";this.viewdate="";this.timeshift=0;this.DATA_INTERVAL=60000*5;this.timerId=null;this.nowdate=0;this.olddate=0;this.updateInterval=this.DATA_INTERVAL;this.isAutoUpdateRunning=false;this.MAX_ANIMATION_TIME=36000000;this.MIN_ANIMATION_TIME=0;
this.animationTimerId=0;this.animationInterval=1000;this.animationTimeshift=this.MIN_ANIMATION_TIME;this.animationStep=30000;this.animationFinishListener=null;this.animationUpdateListener=null;this.updateListener=null;this.isAnimationStarting=false;this.MAX_ZOOM_LEVEL=15;this.MIN_ZOOM_LEVEL=1;this.onLayerSetChangedScaleChange=null;this.onLayerSetChangedLabelOff=null;this.NOW_TIME_OFFSET=-10*60*1000;
this.gettime=null;this.mtime=null;this.name="SnowFallLayer";a=a||{};this.options=a;this.options.opacity=this.options.opacity||1;var b=new Y.LatLngBounds(new Y.LatLng(20.004167,118.00625),new Y.LatLng(47.995833,149.99375));this.options.rangeOfBounds=b;this.isDisplay=false;this.timeContainer=null;this.timePosition=null;this._serviceName="SnowFallLayer";this.appid="KaaCzwqxg65Mjwc3DlD7Ni5JcHH6aXwO1JiL02zAnhmw7pIcSHAj3SQNeOWVD1k4";
this.viewdate=this.convTime();this.timelist=new Array();this.dtimelist=new Array();this.options.enableFadeIn=this.options.enableFadeIn||false;this.options.maxZoomLevel=this.MAX_ZOOM_LEVEL;this.options.minZoomLevel=this.MIN_ZOOM_LEVEL;Y.ImageTileLayer.apply(this,[this.name,this.url,this.options]);});SnowFallLayer.prototype.initialize=function(a){this.__super__.initialize.call(this,a);this.timeContainer=$('<div class="yolp-ctrl-weathertime"></div>').hide();
a.mainContainer.append(this.timeContainer);this.setTimePosition(this.getDefaultTimePosition());this.updateWeather();var b=this;this.bind("dataupdate",function(){b.dispTime();});this.eventZoomend=a.bind("zoomend",function(){b.dispTime();});this.eventLayersetchanged=a.bind("layersetchanged",function(){b.dispTime();});this.eventLoad=a.bind("load",function(){b.logging();});this.logging();};SnowFallLayer.prototype.startAutoUpdate=function(b){var a=this;
b=b||{};if(b.interval){this.setAutoUpdateInterval(b.interval);}this.timerId=setInterval(function(){a.updateWeather({timeupdate:true});},a.updateInterval);this.isAutoUpdateRunning=true;};SnowFallLayer.prototype.stopAutoUpdate=function(){clearInterval(this.timerId);this.timerId=0;this.isAutoUpdateRunning=false;};SnowFallLayer.prototype.setUpdateCallback=function(a){if(a){if(this.updateListener){this.unbind(this.updateListener);
}this.updateListener=this.bind("dataupdate",a,window);}};SnowFallLayer.prototype.setAutoUpdateInterval=function(a){if(a>=2){this.updateInterval=a*60000;}};SnowFallLayer.prototype.getTimeShift=function(){return this.timeshift;};SnowFallLayer.prototype.setTimeShift=function(f){if(!isNaN(f)){var b=this.mtime+parseInt(f);var a=Number.MAX_VALUE;var g=0,e=0;if(this.dtimelist.length>0){for(var c=0;c<this.dtimelist.length;
c++){g=Math.abs(b-this.dtimelist[c]);if(g<a){a=g;e=c;}}this.timeshift=this.dtimelist[e]-this.mtime;}else{this.timeshift=parseInt(f,10);}this.setAnimationTimeShift(this.timeshift);}};SnowFallLayer.prototype.updateWeather=function(b){b=b||{};var a=(typeof b.timeupdate==="undefined")?false:b.timeupdate;var c=this;this.getDate(function(){c.redraw();},a);};SnowFallLayer.prototype.getNowDate=function(){return this.viewdate;
};SnowFallLayer.prototype.startAnimation=function(b){if(this.animationTimerId!==0){clearTimeout(this.animationTimerId);this.animationTimerId=0;}b=b||{};if(b.onFinish){this.setAnimationFinishCallback(b.onFinish);}if(b.onUpdate){this.setAnimationUpdateCallback(b.onUpdate);}if(b.interval){this.setAnimationInterval(b.interval);}if(b.step){this.setAnimationStep(b.step);}var a=this;if(this.timerId!==0&&this.isAutoUpdateRunning===true){clearInterval(this.timerId);
this.timerId=0;}this.timeshift=this.animationTimeshift;this.isAnimationStarting=true;this.animationTimerId=setTimeout(function(){a.runAnimation();},this.animationInterval);};SnowFallLayer.prototype.stopAnimation=function(){clearTimeout(this.animationTimerId);this.animationTimerId=0;if(this.isAutoUpdateRunning===true){this.startAutoUpdate();}Y.Event.trigger(this,"animationstop");};SnowFallLayer.prototype.setAnimationFinishCallback=function(a){if(a){if(this.animationFinishListener){this.unbind(this.animationFinishListener);
}this.animationFinishListener=this.bind("animationstop",a,window);}};SnowFallLayer.prototype.setAnimationUpdateCallback=function(a){if(a){if(this.animationUpdateListener){this.unbind(this.animationUpdateListener);}this.animationUpdateListener=this.bind("animationupdate",a,window);}};SnowFallLayer.prototype.setAnimationInterval=function(a){this.animationInterval=parseInt(a,10);};SnowFallLayer.prototype.setAnimationStep=function(a){this.animationStep=parseInt(a,10);
};SnowFallLayer.prototype.getAnimationTimeShift=function(){return this.animationTimeshift;};SnowFallLayer.prototype.setAnimationTimeShift=function(a){if(!isNaN(a)){this.animationTimeshift=parseInt(a,10);}};SnowFallLayer.prototype.setDispTime=function(a){this.isDisplay=a;this.dispTime();};SnowFallLayer.prototype.setTimePosition=function(a){if(!this.timeContainer){return;}if(a){this.timePosition=a;}var c={position:"absolute"};
var d=this.timePosition.offset;var b=this.timePosition.anchor;if(b===Y.ControlPosition.TOP_RIGHT){c.right=d.width+"px";c.top=d.height+"px";}else{if(b===Y.ControlPosition.TOP_LEFT){c.left=d.width+"px";c.top=d.height+"px";}else{if(b===Y.ControlPosition.BOTTOM_RIGHT){c.right=d.width+"px";c.bottom=d.height+"px";}else{if(b===Y.ControlPosition.BOTTOM_LEFT){c.left=d.width+"px";c.bottom=d.height+"px";}}}}this.timeContainer.css(c);
};SnowFallLayer.prototype.getImageSrc=function(a,e,d){if(this.nowdate===0){return;}var b=this.url;this.viewdate=this.convTime(this.nowdate);var c="";if(this.MAX_ZOOM_LEVEL>=d&&this.MIN_ZOOM_LEVEL<=d){if(b instanceof Object){b=b[d]||b["0"];this.count=b.length<=this.count?0:this.count;b=b[this.count++];}c=b+"x="+a+"&y="+e+"&z="+d;c+="&date="+this.viewdate.substring(0,12);}return c;};SnowFallLayer.prototype.remove=function(){if(this.timerId!==0){this.stopAutoUpdate();
}if(this.animationTimerId!==0){this.stopAnimation();}if(this.onLayerSetChangedScaleChange){this.map.unbind(this.onLayerSetChangedScaleChange);this.onLayerSetChangedScaleChange=null;}if(this.onLayerSetChangedLabelOff){this.map.unbind(this.onLayerSetChangedLabelOff);this.onLayerSetChangedLabelOff=null;}if(this.animationFinishListener){this.unbind(this.animationFinishListener);this.animationFinishListener=null;
}if(this.animationUpdateListener){this.unbind(this.animationUpdateListener);this.animationUpdateListener=null;}if(this.updateListener){this.unbind(this.updateListener);this.updateListener=null;}if(this.timeContainer){this.timeContainer.remove();this.timeContainer=null;}if(this.eventZoomend){this.map.unbind(this.eventZoomend);}if(this.eventLayersetchanged){this.map.unbind(this.eventLayersetchanged);
}if(this.eventLoad){this.map.unbind(this.eventLoad);}Y.Layer.prototype.remove.call(this);};SnowFallLayer.prototype.getDefaultTimePosition=function(){return new Y.ControlPosition(Y.ControlPosition.BOTTOM_LEFT,new Y.Size(1,26));};SnowFallLayer.prototype.dispTime=function(){if(!this.map||!this.timeContainer||!this.viewdate){return;}var b=this.map.getZoom();if(this.MAX_ZOOM_LEVEL>=b&&this.MIN_ZOOM_LEVEL<=b){var a=this.viewdate.slice(0,4)+"\u5e74"+this.viewdate.slice(4,6)+"\u6708"+this.viewdate.slice(6,8)+"\u65e5"+this.viewdate.slice(8,10)+"\u6642"+this.viewdate.slice(10,12)+"\u5206";
if(this.isDisplay){this.timeContainer.html(a).show();}else{this.timeContainer.hide();}}else{this.timeContainer.hide();}};SnowFallLayer.prototype.UpdateWeather=function(){this.updateWeather();};SnowFallLayer.prototype.getDate=function(h,b){if(!b){if(this.gettime){var f=new Date();var a=f.getTime()-this.gettime;if(this.updateInterval>a){var c=this.mtime+parseInt(this.timeshift,10);this.nowdate=Math.floor(c/this.DATA_INTERVAL)*(this.DATA_INTERVAL);
h();return;}}}var g=this;var e=this.getApplicationId();if(!e){e=this.appid;}var f=new Date();this.gettime=f.getTime();$.ajax({url:this.url_info,data:"type=snowfall&appid="+e,dataType:"jsonp",timeout:3000,success:function(l){var n=l.Observation;if(typeof n==="string"){var m=new Date(n.slice(0,4),n.slice(4,6)-1,n.slice(6,8),n.slice(8,10),n.slice(10,12));g.mtime=m.getTime();var k=g.mtime+parseInt(g.timeshift,10);
g.nowdate=Math.floor(k/g.DATA_INTERVAL)*(g.DATA_INTERVAL);}g.timelist=new Array();g.dtimelist=new Array();var j;for(j=0;j<l.Timelist.length;j++){g.timelist[j]=l.Timelist[j];}g.timelist.sort();for(j=0;j<g.timelist.length;j++){g.dtimelist[j]=Y.Util.yyyymmddhhmm2date(g.timelist[j]).getTime();}h();},error:function(){var j=new Date();g.mtime=j.getTime()+g.NOW_TIME_OFFSET;var i=g.mtime+parseInt(g.timeshift,10);
g.nowdate=Math.floor(i/g.DATA_INTERVAL)*(g.DATA_INTERVAL);g.timelist=new Array();g.dtimelist=new Array();h();}});};SnowFallLayer.prototype.redraw=function(){if(this.initialized&&this.container){this.container.empty();this.drawLayer(true);this.olddate=this.nowdate;this.dispTime();Y.Event.trigger(this,"dataupdate");}};SnowFallLayer.prototype.runAnimation=function(){var a=this;a.updateAnimationWeather();
if(a.isAnimationStarting===true){a.animationTimerId=setTimeout(function(){a.runAnimation();},a.animationInterval);}};SnowFallLayer.prototype.AnimationWeather=function(){this.updateAnimationWeather();};SnowFallLayer.prototype.updateAnimationWeather=function(){this.getAnimationDate();if(this.nowdate!=this.olddate){var b=Math.floor(this.animationTimeshift/this.DATA_INTERVAL)*this.DATA_INTERVAL;if(this.timeshift!=b){this.timeshift=b;
this.redraw();}}Y.Event.trigger(this,"animationupdate");var a=this.animationTimeshift+this.animationStep;if(this.MAX_ANIMATION_TIME<a){this.animationTimeshift=this.MAX_ANIMATION_TIME;this.isAnimationStarting=false;}else{if(this.MIN_ANIMATION_TIME>a){this.animationTimeshift=this.MIN_ANIMATION_TIME;this.isAnimationStarting=false;}else{this.animationTimeshift=a;}}if(this.isAnimationStarting===false){this.stopAnimation();
return;}};SnowFallLayer.prototype.getAnimationDate=function(){var a;if(this.mtime){a=this.mtime+parseInt(this.animationTimeshift,10);}else{var b=new Date();this.mtime=b.getTime()+this.NOW_TIME_OFFSET;a=this.mtime+parseInt(this.animationTimeshift,10);}this.nowdate=Math.floor(a/this.DATA_INTERVAL)*(this.DATA_INTERVAL);};SnowFallLayer.prototype.convTime=function(a){var k=a;if(!k){var b=new Date();var h=b.getTime()+this.NOW_TIME_OFFSET+parseInt(this.timeshift,10);
k=Math.floor(h/this.DATA_INTERVAL)*(this.DATA_INTERVAL);}var j=new Date(k);var g=j.getYear();var f=j.getMonth()+1;var i=j.getDate();var c=j.getHours();var d=j.getMinutes();var e=j.getSeconds();if(g<2000){g+=1900;}if(f<10){f="0"+f;}if(i<10){i="0"+i;}if(c<10){c="0"+c;}if(d<10){d="0"+d;}if(e<10){e="0"+e;}return String(g)+String(f)+String(i)+String(c)+String(d)+String(e);};SnowFallLayer.prototype.logging=function(){var b=this.map.getPlugin("YahooMapLayer");
var a=this.findOwnApplicationId();if(b&&b.yml){b.yml.getYahooMapLayer({mode:"snowfall",appid:a,trigger:false});}};SnowFallLayer.prototype.setApplicationId=Y.Service.setApplicationId;SnowFallLayer.prototype.getApplicationId=Y.Service.getApplicationId;SnowFallLayer.prototype.findOwnApplicationId=Y.Service.findOwnApplicationId;var SumiLayer=Y.SumiLayer=Y.extend(Y.TileLayer,function(a){this.name="SumiLayer";a=a||{};this.options=a;this.options.className="yolp-sumilayer";this.opacity=this.options.opacity||0.05;Y.TileLayer.apply(this,[this.name,this.url,this.options]);});SumiLayer.prototype.createTile=function(){var c=[];c.push("position:absolute");c.push("padding:0px");c.push("visibility:hidden");c.push("border:none");c.push("margin:0px");
c.push("width:"+this.tileSize.width+"px");c.push("height:"+this.tileSize.height+"px");c.push("z-index:0");c.push("background-color:rgb(0,0,0)");var b=this.customStyle;for(var a in b){if(!b.hasOwnProperty(a)){continue;}c.push(a+":"+b[a]);}var f=c.join(";");var d='<div style="'+f+'" ></div>';var e=$(d).disableImageSelect();e.bind("load",function(){$(this).css("visibility","visible");});e.loadAlphaImage({size:this.tileSize});
if(this.opacity&&this.opacity<1){$(e).fadeTo(0,this.opacity);}return e;};SumiLayer.prototype.drawTile=function(c,b,a,e){var d=this.getFirstEditableTile();if(d){d.enable=true;d.dom.css({visibility:"visible"});d.tx=c;d.ty=b;d.setPosition(a,e);this._newTiles.push({dom:d.dom});}};var SnowCoverLayer=Y.SnowCoverLayer=Y.extend(Y.ImageTileLayer,function(a){this.url="http://weather.map.c.yimg.jp/snowcover?";this.url_info="http://weather.olp.yahooapis.jp/v1/info";this.viewdate="";this.timeshift=0;this.DATA_INTERVAL=60000*5;this.timerId=null;this.nowdate=0;this.olddate=0;this.updateInterval=this.DATA_INTERVAL;this.isAutoUpdateRunning=false;this.MAX_ANIMATION_TIME=3600000;this.MIN_ANIMATION_TIME=-7200000;
this.animationTimerId=0;this.animationInterval=1000;this.animationTimeshift=this.MIN_ANIMATION_TIME;this.animationStep=30000;this.animationFinishListener=null;this.animationUpdateListener=null;this.updateListener=null;this.isAnimationStarting=false;this.MAX_ZOOM_LEVEL=15;this.MIN_ZOOM_LEVEL=1;this.onLayerSetChangedScaleChange=null;this.onLayerSetChangedLabelOff=null;this.NOW_TIME_OFFSET=-10*60*1000;
this.gettime=null;this.mtime=null;this.name="SnowCoverLayer";a=a||{};this.options=a;this.options.opacity=this.options.opacity||1;var b=new Y.LatLngBounds(new Y.LatLng(20.004167,118.00625),new Y.LatLng(47.995833,149.99375));this.options.rangeOfBounds=b;this.isDisplay=false;this.timeContainer=null;this.timePosition=null;this._serviceName="SnowCoverLayer";this.appid="KaaCzwqxg65Mjwc3DlD7Ni5JcHH6aXwO1JiL02zAnhmw7pIcSHAj3SQNeOWVD1k4";
this.viewdate=this.convTime();this.options.enableFadeIn=this.options.enableFadeIn||false;this.options.maxZoomLevel=this.MAX_ZOOM_LEVEL;this.options.minZoomLevel=this.MIN_ZOOM_LEVEL;Y.ImageTileLayer.apply(this,[this.name,this.url,this.options]);});SnowCoverLayer.prototype.initialize=function(a){this.__super__.initialize.call(this,a);this.timeContainer=$('<div class="yolp-ctrl-weathertime"></div>').hide();
a.mainContainer.append(this.timeContainer);this.setTimePosition(this.getDefaultTimePosition());this.updateWeather();var b=this;this.bind("dataupdate",function(){b.dispTime();});this.eventZoomend=a.bind("zoomend",function(){b.dispTime();});this.eventLayersetchanged=a.bind("layersetchanged",function(){b.dispTime();});this.eventLoad=a.bind("load",function(){b.logging();});this.logging();};SnowCoverLayer.prototype.startAutoUpdate=function(b){var a=this;
b=b||{};if(b.interval){this.setAutoUpdateInterval(b.interval);}this.timerId=setInterval(function(){a.updateWeather({timeupdate:true});},a.updateInterval);this.isAutoUpdateRunning=true;};SnowCoverLayer.prototype.stopAutoUpdate=function(){clearInterval(this.timerId);this.timerId=0;this.isAutoUpdateRunning=false;};SnowCoverLayer.prototype.setUpdateCallback=function(a){if(a){if(this.updateListener){this.unbind(this.updateListener);
}this.updateListener=this.bind("dataupdate",a,window);}};SnowCoverLayer.prototype.setAutoUpdateInterval=function(a){if(a>=2){this.updateInterval=a*60000;}};SnowCoverLayer.prototype.getTimeShift=function(){return this.timeshift;};SnowCoverLayer.prototype.setTimeShift=function(a){if(!isNaN(a)){this.timeshift=parseInt(a,10);this.setAnimationTimeShift(this.timeshift);}};SnowCoverLayer.prototype.updateWeather=function(b){b=b||{};
var a=(typeof b.timeupdate==="undefined")?false:b.timeupdate;var c=this;this.getDate(function(){c.redraw();},a);};SnowCoverLayer.prototype.getNowDate=function(){return this.viewdate;};SnowCoverLayer.prototype.startAnimation=function(b){if(this.animationTimerId!==0){clearTimeout(this.animationTimerId);this.animationTimerId=0;}b=b||{};if(b.onFinish){this.setAnimationFinishCallback(b.onFinish);}if(b.onUpdate){this.setAnimationUpdateCallback(b.onUpdate);
}if(b.interval){this.setAnimationInterval(b.interval);}if(b.step){this.setAnimationStep(b.step);}var a=this;if(this.timerId!==0&&this.isAutoUpdateRunning===true){clearInterval(this.timerId);this.timerId=0;}this.timeshift=this.animationTimeshift;this.isAnimationStarting=true;this.animationTimerId=setTimeout(function(){a.runAnimation();},this.animationInterval);};SnowCoverLayer.prototype.stopAnimation=function(){clearTimeout(this.animationTimerId);
this.animationTimerId=0;if(this.isAutoUpdateRunning===true){this.startAutoUpdate();}Y.Event.trigger(this,"animationstop");};SnowCoverLayer.prototype.setAnimationFinishCallback=function(a){if(a){if(this.animationFinishListener){this.unbind(this.animationFinishListener);}this.animationFinishListener=this.bind("animationstop",a,window);}};SnowCoverLayer.prototype.setAnimationUpdateCallback=function(a){if(a){if(this.animationUpdateListener){this.unbind(this.animationUpdateListener);
}this.animationUpdateListener=this.bind("animationupdate",a,window);}};SnowCoverLayer.prototype.setAnimationInterval=function(a){this.animationInterval=parseInt(a,10);};SnowCoverLayer.prototype.setAnimationStep=function(a){this.animationStep=parseInt(a,10);};SnowCoverLayer.prototype.getAnimationTimeShift=function(){return this.animationTimeshift;};SnowCoverLayer.prototype.setAnimationTimeShift=function(a){if(!isNaN(a)){this.animationTimeshift=parseInt(a,10);
}};SnowCoverLayer.prototype.setDispTime=function(a){this.isDisplay=a;this.dispTime();};SnowCoverLayer.prototype.setTimePosition=function(a){if(!this.timeContainer){return;}if(a){this.timePosition=a;}var c={position:"absolute"};var d=this.timePosition.offset;var b=this.timePosition.anchor;if(b===Y.ControlPosition.TOP_RIGHT){c.right=d.width+"px";c.top=d.height+"px";}else{if(b===Y.ControlPosition.TOP_LEFT){c.left=d.width+"px";
c.top=d.height+"px";}else{if(b===Y.ControlPosition.BOTTOM_RIGHT){c.right=d.width+"px";c.bottom=d.height+"px";}else{if(b===Y.ControlPosition.BOTTOM_LEFT){c.left=d.width+"px";c.bottom=d.height+"px";}}}}this.timeContainer.css(c);};SnowCoverLayer.prototype.getImageSrc=function(a,e,d){if(this.nowdate===0){return;}var b=this.url;this.viewdate=this.convTime(this.nowdate);var c="";if(this.MAX_ZOOM_LEVEL>=d&&this.MIN_ZOOM_LEVEL<=d){if(b instanceof Object){b=b[d]||b["0"];
this.count=b.length<=this.count?0:this.count;b=b[this.count++];}c=b+"x="+a+"&y="+e+"&z="+d;c+="&date="+this.viewdate.substring(0,12);}return c;};SnowCoverLayer.prototype.remove=function(){if(this.timerId!==0){this.stopAutoUpdate();}if(this.animationTimerId!==0){this.stopAnimation();}if(this.onLayerSetChangedScaleChange){this.map.unbind(this.onLayerSetChangedScaleChange);this.onLayerSetChangedScaleChange=null;
}if(this.onLayerSetChangedLabelOff){this.map.unbind(this.onLayerSetChangedLabelOff);this.onLayerSetChangedLabelOff=null;}if(this.animationFinishListener){this.unbind(this.animationFinishListener);this.animationFinishListener=null;}if(this.animationUpdateListener){this.unbind(this.animationUpdateListener);this.animationUpdateListener=null;}if(this.updateListener){this.unbind(this.updateListener);this.updateListener=null;
}if(this.timeContainer){this.timeContainer.remove();this.timeContainer=null;}if(this.eventZoomend){this.map.unbind(this.eventZoomend);}if(this.eventLayersetchanged){this.map.unbind(this.eventLayersetchanged);}if(this.eventLoad){this.map.unbind(this.eventLoad);}Y.Layer.prototype.remove.call(this);};SnowCoverLayer.prototype.getDefaultTimePosition=function(){return new Y.ControlPosition(Y.ControlPosition.BOTTOM_LEFT,new Y.Size(1,26));
};SnowCoverLayer.prototype.dispTime=function(){if(!this.map||!this.timeContainer||!this.viewdate){return;}var b=this.map.getZoom();if(this.MAX_ZOOM_LEVEL>=b&&this.MIN_ZOOM_LEVEL<=b){var a=this.viewdate.slice(0,4)+"\u5e74"+this.viewdate.slice(4,6)+"\u6708"+this.viewdate.slice(6,8)+"\u65e5"+this.viewdate.slice(8,10)+"\u6642"+this.viewdate.slice(10,12)+"\u5206";if(this.isDisplay){this.timeContainer.html(a).show();}else{this.timeContainer.hide();
}}else{this.timeContainer.hide();}};SnowCoverLayer.prototype.UpdateWeather=function(){this.updateWeather();};SnowCoverLayer.prototype.getDate=function(h,b){if(!b){if(this.gettime){var f=new Date();var a=f.getTime()-this.gettime;if(this.updateInterval>a){var c=this.mtime+parseInt(this.timeshift,10);this.nowdate=Math.floor(c/this.DATA_INTERVAL)*(this.DATA_INTERVAL);h();return;}}}var g=this;var e=this.getApplicationId();
if(!e){e=this.appid;}var f=new Date();this.gettime=f.getTime();$.ajax({url:this.url_info,data:"type=snowcover&appid="+e,dataType:"jsonp",timeout:3000,success:function(j){var l=j.Observation;if(typeof l==="string"){var k=new Date(l.slice(0,4),l.slice(4,6)-1,l.slice(6,8),l.slice(8,10),l.slice(10,12));g.mtime=k.getTime();var i=g.mtime+parseInt(g.timeshift,10);g.nowdate=Math.floor(i/g.DATA_INTERVAL)*(g.DATA_INTERVAL);
}h();},error:function(){var j=new Date();g.mtime=j.getTime()+g.NOW_TIME_OFFSET;var i=g.mtime+parseInt(g.timeshift,10);g.nowdate=Math.floor(i/g.DATA_INTERVAL)*(g.DATA_INTERVAL);h();}});};SnowCoverLayer.prototype.redraw=function(){if(this.initialized&&this.container){this.container.empty();this.drawLayer(true);this.olddate=this.nowdate;this.dispTime();Y.Event.trigger(this,"dataupdate");}};SnowCoverLayer.prototype.runAnimation=function(){var a=this;
a.updateAnimationWeather();if(a.isAnimationStarting===true){a.animationTimerId=setTimeout(function(){a.runAnimation();},a.animationInterval);}};SnowCoverLayer.prototype.AnimationWeather=function(){this.updateAnimationWeather();};SnowCoverLayer.prototype.updateAnimationWeather=function(){this.getAnimationDate();if(this.nowdate!=this.olddate){var b=Math.floor(this.animationTimeshift/this.DATA_INTERVAL)*this.DATA_INTERVAL;
if(this.timeshift!=b){this.timeshift=b;this.redraw();}}Y.Event.trigger(this,"animationupdate");var a=this.animationTimeshift+this.animationStep;if(this.MAX_ANIMATION_TIME<a){this.animationTimeshift=this.MAX_ANIMATION_TIME;this.isAnimationStarting=false;}else{if(this.MIN_ANIMATION_TIME>a){this.animationTimeshift=this.MIN_ANIMATION_TIME;this.isAnimationStarting=false;}else{this.animationTimeshift=a;}}if(this.isAnimationStarting===false){this.stopAnimation();
return;}};SnowCoverLayer.prototype.getAnimationDate=function(){var a;if(this.mtime){a=this.mtime+parseInt(this.animationTimeshift,10);}else{var b=new Date();this.mtime=b.getTime()+this.NOW_TIME_OFFSET;a=this.mtime+parseInt(this.animationTimeshift,10);}this.nowdate=Math.floor(a/this.DATA_INTERVAL)*(this.DATA_INTERVAL);};SnowCoverLayer.prototype.convTime=function(a){var k=a;if(!k){var b=new Date();var h=b.getTime()+this.NOW_TIME_OFFSET+parseInt(this.timeshift,10);
k=Math.floor(h/this.DATA_INTERVAL)*(this.DATA_INTERVAL);}var j=new Date(k);var g=j.getYear();var f=j.getMonth()+1;var i=j.getDate();var c=j.getHours();var d=j.getMinutes();var e=j.getSeconds();if(g<2000){g+=1900;}if(f<10){f="0"+f;}if(i<10){i="0"+i;}if(c<10){c="0"+c;}if(d<10){d="0"+d;}if(e<10){e="0"+e;}return String(g)+String(f)+String(i)+String(c)+String(d)+String(e);};SnowCoverLayer.prototype.logging=function(){var b=this.map.getPlugin("YahooMapLayer");
var a=this.findOwnApplicationId();if(b&&b.yml){b.yml.getYahooMapLayer({mode:"snowcover",appid:a,trigger:false});}};SnowCoverLayer.prototype.setApplicationId=Y.Service.setApplicationId;SnowCoverLayer.prototype.getApplicationId=Y.Service.getApplicationId;SnowCoverLayer.prototype.findOwnApplicationId=Y.Service.findOwnApplicationId;var TsunamiMapLayer=Y.TsunamiMapLayer=Y.extend(Y.ImageTileLayer,function(a){this.setFocus("case01");this.name="TsunamiMapLayer";this.MAX_ZOOM_LEVEL=18;this.MIN_ZOOM_LEVEL=6;a=a||{};this.options=a;this.options.opacity=this.options.opacity||1;this.options.enableFadeIn=this.options.enableFadeIn||false;this.options.maxZoomLevel=this.MAX_ZOOM_LEVEL;this.options.minZoomLevel=this.MIN_ZOOM_LEVEL;Y.ImageTileLayer.apply(this,[this.name,"",a]);
});TsunamiMapLayer.prototype.getImageSrc=function(f,e,d){if(this.MAX_ZOOM_LEVEL<d){return"";}if(this.MIN_ZOOM_LEVEL>d){return"";}var g=this.fromTileToLatLng(f,e,0,0);var b=this.fromTileToLatLng(f+1,e+1,0,0);var c=this.map.getProjection();var j=c.fromPixelToMeters(c.fromLatLngToPixel(g,d),d);var h=c.fromPixelToMeters(c.fromLatLngToPixel(b,d),d);var i=j.x+","+j.y+","+h.x+","+h.y;var k=this.focus;var a="http://wms.map.c.yimg.jp/wms/nt?VERSION=1.1.1&REQUEST=GetMap&STYLES=&SRS=EPSG:900913&BBOX="+i+"&WIDTH=256&HEIGHT=256&FORMAT=image/png&LAYERS="+k;
return a;};TsunamiMapLayer.prototype.setFocus=function(a){this.focus=a;this.redraw();};TsunamiMapLayer.prototype.redraw=function(){if(this.initialized&&this.container){this.drawLayer(true);}};TsunamiMapLayer.prototype.getFocus=function(){return this.focus;};TsunamiMapLayer.prototype.drawLayer=function(d){if(d){this.tileArray=null;delete this.tileArray;this.tileArray=[];this.tileCount=0;var f=this;if(this.delOldTiles){clearTimeout(this.delOldTiles);
this.oldTiles.remove();}this.oldTiles=this.container.children();this.delOldTiles=setTimeout(function(){f.oldTiles.fadeTo("slow",0,function(){$(this).remove();});},0);}var b=this.map.getProjection();this.geoCenter=this.map.getCenter();this.tileCenter=b.fromLatLngToTile(this.geoCenter,this.map.getZoom());this.fillSize=this.getFillSize();var e=this.fillSize.c-this.tileCount;if(e>0){for(var a=0;a<e;++a){var c=new Y.DomTile(this.createTile());
if(c){this.tileArray.push(c);this.container.prepend(c.dom);}}}else{if(e<0){for(var a=0;a<-e;++a){var c=this.tileArray.pop();if(c){c.dom.remove();}}}}this.tileCount=this.fillSize.c;this.drawTiles();};var CrowdLayer=Y.CrowdLayer=Y.extend(Y.ImageTileLayer,function(a){this.url="http://weather.map.c.yimg.jp/jam?";this.url_info="http://weather.olp.yahooapis.jp/v1/info";this.viewdate="";this.timeshift=0;this.DATA_INTERVAL=60000*5;this.timerId=null;this.nowdate=0;this.olddate=0;this.updateInterval=this.DATA_INTERVAL;this.isAutoUpdateRunning=false;this.MAX_ANIMATION_TIME=0;this.MIN_ANIMATION_TIME=-10800000;
this.animationTimerId=0;this.animationInterval=1000;this.animationTimeshift=this.MIN_ANIMATION_TIME;this.animationStep=30000;this.animationFinishListener=null;this.animationUpdateListener=null;this.updateListener=null;this.isAnimationStarting=false;this.MAX_ZOOM_LEVEL=18;this.MIN_ZOOM_LEVEL=9;this.onLayerSetChangedScaleChange=null;this.onLayerSetChangedLabelOff=null;this.NOW_TIME_OFFSET=-10*60*1000;
this.gettime=null;this.mtime=null;this.name="CrowdLayer";a=a||{};this.options=a;this.options.opacity=this.options.opacity||0.6;var b=new Y.LatLngBounds(new Y.LatLng(20.004167,118.00625),new Y.LatLng(47.995833,149.99375));this.options.rangeOfBounds=b;this.isDisplay=false;this.timeContainer=null;this.timePosition=null;this._serviceName="CrowdLayer";this.appid="KaaCzwqxg65Mjwc3DlD7Ni5JcHH6aXwO1JiL02zAnhmw7pIcSHAj3SQNeOWVD1k4";
this.viewdate=this.convTime();this.timelist=new Array();this.dtimelist=new Array();this.options.enableFadeIn=this.options.enableFadeIn||false;this.options.maxZoomLevel=this.options.maxZoomLevel||this.MAX_ZOOM_LEVEL;this.options.minZoomLevel=this.options.minZoomLevel||this.MIN_ZOOM_LEVEL;Y.ImageTileLayer.apply(this,[this.name,this.url,this.options]);});CrowdLayer.prototype.initialize=function(a){this.__super__.initialize.call(this,a);
this.timeContainer=$('<div class="yolp-ctrl-weathertime"></div>').hide();a.mainContainer.append(this.timeContainer);this.setTimePosition(this.getDefaultTimePosition());this.updateWeather();var b=this;this.bind("dataupdate",function(){b.dispTime();});this.eventZoomend=a.bind("zoomend",function(){b.dispTime();});this.eventLayersetchanged=a.bind("layersetchanged",function(){b.dispTime();});this.eventLoad=a.bind("load",function(){b.logging();
});this.logging();};CrowdLayer.prototype.startAutoUpdate=function(b){var a=this;b=b||{};if(b.interval){this.setAutoUpdateInterval(b.interval);}this.timerId=setInterval(function(){a.updateWeather({timeupdate:true});},a.updateInterval);this.isAutoUpdateRunning=true;};CrowdLayer.prototype.stopAutoUpdate=function(){clearInterval(this.timerId);this.timerId=0;this.isAutoUpdateRunning=false;};CrowdLayer.prototype.setUpdateCallback=function(a){if(a){if(this.updateListener){this.unbind(this.updateListener);
}this.updateListener=this.bind("dataupdate",a,window);}};CrowdLayer.prototype.setAutoUpdateInterval=function(a){if(a>=2){this.updateInterval=a*60000;}};CrowdLayer.prototype.getTimeShift=function(){return this.timeshift;};CrowdLayer.prototype.setTimeShift=function(f){if(!isNaN(f)){var b=this.mtime+parseInt(f);var a=Number.MAX_VALUE;var g=0,e=0;if(this.dtimelist.length>0){for(var c=0;c<this.dtimelist.length;
c++){g=Math.abs(b-this.dtimelist[c]);if(g<a){a=g;e=c;}}this.timeshift=this.dtimelist[e]-this.mtime;}else{this.timeshift=parseInt(f,10);}this.setAnimationTimeShift(this.timeshift);}};CrowdLayer.prototype.updateWeather=function(b){b=b||{};var a=(typeof b.timeupdate==="undefined")?false:b.timeupdate;var c=this;this.getDate(function(){c.redraw();},a);};CrowdLayer.prototype.getNowDate=function(){return this.viewdate;
};CrowdLayer.prototype.startAnimation=function(b){if(this.animationTimerId!==0){clearTimeout(this.animationTimerId);this.animationTimerId=0;}b=b||{};if(b.onFinish){this.setAnimationFinishCallback(b.onFinish);}if(b.onUpdate){this.setAnimationUpdateCallback(b.onUpdate);}if(b.interval){this.setAnimationInterval(b.interval);}if(b.step){this.setAnimationStep(b.step);}var a=this;if(this.timerId!==0&&this.isAutoUpdateRunning===true){clearInterval(this.timerId);
this.timerId=0;}this.timeshift=this.animationTimeshift;this.isAnimationStarting=true;this.animationTimerId=setTimeout(function(){a.runAnimation();},this.animationInterval);};CrowdLayer.prototype.stopAnimation=function(){clearTimeout(this.animationTimerId);this.animationTimerId=0;if(this.isAutoUpdateRunning===true){this.startAutoUpdate();}Y.Event.trigger(this,"animationstop");};CrowdLayer.prototype.setAnimationFinishCallback=function(a){if(a){if(this.animationFinishListener){this.unbind(this.animationFinishListener);
}this.animationFinishListener=this.bind("animationstop",a,window);}};CrowdLayer.prototype.setAnimationUpdateCallback=function(a){if(a){if(this.animationUpdateListener){this.unbind(this.animationUpdateListener);}this.animationUpdateListener=this.bind("animationupdate",a,window);}};CrowdLayer.prototype.setAnimationInterval=function(a){this.animationInterval=parseInt(a,10);};CrowdLayer.prototype.setAnimationStep=function(a){this.animationStep=parseInt(a,10);
};CrowdLayer.prototype.getAnimationTimeShift=function(){return this.animationTimeshift;};CrowdLayer.prototype.setAnimationTimeShift=function(a){if(!isNaN(a)){this.animationTimeshift=parseInt(a,10);}};CrowdLayer.prototype.setDispTime=function(a){this.isDisplay=a;this.dispTime();};CrowdLayer.prototype.setTimePosition=function(a){if(!this.timeContainer){return;}if(a){this.timePosition=a;}var c={position:"absolute"};
var d=this.timePosition.offset;var b=this.timePosition.anchor;if(b===Y.ControlPosition.TOP_RIGHT){c.right=d.width+"px";c.top=d.height+"px";}else{if(b===Y.ControlPosition.TOP_LEFT){c.left=d.width+"px";c.top=d.height+"px";}else{if(b===Y.ControlPosition.BOTTOM_RIGHT){c.right=d.width+"px";c.bottom=d.height+"px";}else{if(b===Y.ControlPosition.BOTTOM_LEFT){c.left=d.width+"px";c.bottom=d.height+"px";}}}}this.timeContainer.css(c);
};CrowdLayer.prototype.getImageSrc=function(a,e,d){if(this.nowdate===0){return;}var b=this.url;this.viewdate=this.convTime(this.nowdate);var c="";if(this.MAX_ZOOM_LEVEL>=d&&this.MIN_ZOOM_LEVEL<=d){if(b instanceof Object){b=b[d]||b["0"];this.count=b.length<=this.count?0:this.count;b=b[this.count++];}c=b+"x="+a+"&y="+e+"&z="+d;c+="&date="+this.viewdate.substring(0,12);}return c;};CrowdLayer.prototype.remove=function(){if(this.timerId!==0){this.stopAutoUpdate();
}if(this.animationTimerId!==0){this.stopAnimation();}if(this.onLayerSetChangedScaleChange){this.map.unbind(this.onLayerSetChangedScaleChange);this.onLayerSetChangedScaleChange=null;}if(this.onLayerSetChangedLabelOff){this.map.unbind(this.onLayerSetChangedLabelOff);this.onLayerSetChangedLabelOff=null;}if(this.animationFinishListener){this.unbind(this.animationFinishListener);this.animationFinishListener=null;
}if(this.animationUpdateListener){this.unbind(this.animationUpdateListener);this.animationUpdateListener=null;}if(this.updateListener){this.unbind(this.updateListener);this.updateListener=null;}if(this.timeContainer){this.timeContainer.remove();this.timeContainer=null;}if(this.eventZoomend){this.map.unbind(this.eventZoomend);}if(this.eventLayersetchanged){this.map.unbind(this.eventLayersetchanged);
}if(this.eventLoad){this.map.unbind(this.eventLoad);}Y.Layer.prototype.remove.call(this);};CrowdLayer.prototype.getDefaultTimePosition=function(){return new Y.ControlPosition(Y.ControlPosition.BOTTOM_LEFT,new Y.Size(1,26));};CrowdLayer.prototype.dispTime=function(){if(!this.map||!this.timeContainer||!this.viewdate){return;}var b=this.map.getZoom();if(this.MAX_ZOOM_LEVEL>=b&&this.MIN_ZOOM_LEVEL<=b){var a=this.viewdate.slice(0,4)+"\u5e74"+this.viewdate.slice(4,6)+"\u6708"+this.viewdate.slice(6,8)+"\u65e5"+this.viewdate.slice(8,10)+"\u6642"+this.viewdate.slice(10,12)+"\u5206";
if(this.isDisplay){this.timeContainer.html(a).show();}else{this.timeContainer.hide();}}else{this.timeContainer.hide();}};CrowdLayer.prototype.UpdateWeather=function(){this.updateWeather();};CrowdLayer.prototype.getDate=function(h,b){if(!b){if(this.gettime){var f=new Date();var a=f.getTime()-this.gettime;if(this.updateInterval>a){var c=this.mtime+parseInt(this.timeshift,10);this.nowdate=Math.floor(c/this.DATA_INTERVAL)*(this.DATA_INTERVAL);
h();return;}}}var g=this;var e=this.getApplicationId();if(!e){e=this.appid;}var f=new Date();this.gettime=f.getTime();$.ajax({url:this.url_info,data:"type=jam&appid="+e,dataType:"jsonp",timeout:3000,success:function(l){var n=l.Observation;g.Observation=n;if(typeof n==="string"){var m=new Date(n.slice(0,4),n.slice(4,6)-1,n.slice(6,8),n.slice(8,10),n.slice(10,12));g.mtime=m.getTime();var k=g.mtime+parseInt(g.timeshift,10);
g.nowdate=Math.floor(k/g.DATA_INTERVAL)*(g.DATA_INTERVAL);}g.timelist=new Array();g.dtimelist=new Array();var j;for(j=0;j<l.Timelist.length;j++){g.timelist[j]=l.Timelist[j];}g.timelist.sort();for(j=0;j<g.timelist.length;j++){g.dtimelist[j]=Y.Util.yyyymmddhhmm2date(g.timelist[j]).getTime();}h();},error:function(){var j=new Date();g.mtime=j.getTime()+g.NOW_TIME_OFFSET;var i=g.mtime+parseInt(g.timeshift,10);
g.nowdate=Math.floor(i/g.DATA_INTERVAL)*(g.DATA_INTERVAL);g.Observation=g.convTime(g.nowdate).substring(0,12);g.timelist=new Array();g.dtimelist=new Array();h();}});};CrowdLayer.prototype.getObservation=function(){return this.Observation;};CrowdLayer.prototype.redraw=function(){if(this.initialized&&this.container){this.container.empty();this.drawLayer(true);this.olddate=this.nowdate;this.dispTime();
Y.Event.trigger(this,"dataupdate");}};CrowdLayer.prototype.runAnimation=function(){var a=this;a.updateAnimationWeather();if(a.isAnimationStarting===true){a.animationTimerId=setTimeout(function(){a.runAnimation();},a.animationInterval);}};CrowdLayer.prototype.AnimationWeather=function(){this.updateAnimationWeather();};CrowdLayer.prototype.updateAnimationWeather=function(){this.getAnimationDate();if(this.nowdate!=this.olddate){var b=Math.floor(this.animationTimeshift/this.DATA_INTERVAL)*this.DATA_INTERVAL;
if(this.timeshift!=b){this.timeshift=b;this.redraw();}}Y.Event.trigger(this,"animationupdate");var a=this.animationTimeshift+this.animationStep;if(this.MAX_ANIMATION_TIME<a){this.animationTimeshift=this.MAX_ANIMATION_TIME;this.isAnimationStarting=false;}else{if(this.MIN_ANIMATION_TIME>a){this.animationTimeshift=this.MIN_ANIMATION_TIME;this.isAnimationStarting=false;}else{this.animationTimeshift=a;}}if(this.isAnimationStarting===false){this.stopAnimation();
return;}};CrowdLayer.prototype.getAnimationDate=function(){var a;if(this.mtime){a=this.mtime+parseInt(this.animationTimeshift,10);}else{var b=new Date();this.mtime=b.getTime()+this.NOW_TIME_OFFSET;a=this.mtime+parseInt(this.animationTimeshift,10);}this.nowdate=Math.floor(a/this.DATA_INTERVAL)*(this.DATA_INTERVAL);};CrowdLayer.prototype.convTime=function(a){var k=a;if(!k){var b=new Date();var h=b.getTime()+this.NOW_TIME_OFFSET+parseInt(this.timeshift,10);
k=Math.floor(h/this.DATA_INTERVAL)*(this.DATA_INTERVAL);}var j=new Date(k);var g=j.getYear();var f=j.getMonth()+1;var i=j.getDate();var c=j.getHours();var d=j.getMinutes();var e=j.getSeconds();if(g<2000){g+=1900;}if(f<10){f="0"+f;}if(i<10){i="0"+i;}if(c<10){c="0"+c;}if(d<10){d="0"+d;}if(e<10){e="0"+e;}return String(g)+String(f)+String(i)+String(c)+String(d)+String(e);};CrowdLayer.prototype.logging=function(){var b=this.map.getPlugin("YahooMapLayer");
var a=this.findOwnApplicationId();if(b&&b.yml){b.yml.getYahooMapLayer({mode:"jam",appid:a,trigger:false});}};CrowdLayer.prototype.setApplicationId=Y.Service.setApplicationId;CrowdLayer.prototype.getApplicationId=Y.Service.getApplicationId;CrowdLayer.prototype.findOwnApplicationId=Y.Service.findOwnApplicationId;var IndoorMapLayer=Y.IndoorMapLayer=Y.extend(ImageTileLayer,function(a){ImageTileLayer.apply(this,[this.name,this.url,a]);this.indoormaps;this.floorId=void 0;this.styles="";this.isRedraw;this.drawList;this.smartphoneOptimize=true;this.url="http://m.map.c.yimg.jp/m?r=1&mode=indoormap&";this.name="IndoorMapLayer";this.MAX_ZOOM_LEVEL=22;this.MIN_ZOOM_LEVEL=18;this.copyright=new Y.Copyright("indoor",null,null,"");
this.copyrightCollection=new Y.CopyrightCollection();this.copyrightCollection.addCopyright(this.copyright);});IndoorMapLayer.prototype.getImageSrc=function(a,e,d){if(this.MAX_ZOOM_LEVEL<d||this.MIN_ZOOM_LEVEL>d){return"";}if(!this.indoormaps||this.styles==""){return"";}var c=this.url+"x="+a+"&y="+e+"&z="+d;if(this.smartphoneOptimize){var b=Math.round(this.floatTileSize.width*Y.Util.Platform.devicePixelRatio);
if(b!==Y.DEFAULT_TILE_SIZE){c+="&size="+b;}}c=c+"&style="+this.styles;return c;};IndoorMapLayer.prototype.initialize=function(b){this.__super__.initialize.call(this,b);this.indoormaps=this.getIndoorMaps();if(this.indoormaps&&this.indoormaps.length>0){var a=this.indoormaps[0].defaultfloorid;this.createStyle(a);this.updateSlider();}var c=this;this.layerlistchanged=b.bind("layerlistchanged",function(){var e=c.indoormaps?c.indoormaps[0].indoorid:void 0;
c.indoormaps=c.getIndoorMaps();var d=c.findFloorId(e);c.setFloorId(d);c.updateSlider();if(c.updateCopyright()){c.map.currentLayerSet.copyrightDraw();}Y.Event.trigger(c,"indoormaplayerchanged");});this.copyrightCollection.getCopyrights=function(g,f){c.updateCopyright();var h=[];for(var d=0;d<this.copyrights.length;d++){var e=this.copyrights[d];if(this.isCollision(e,g,f)){if(e.text){h.push(e.text);}}}return h;
};};IndoorMapLayer.prototype.getIndoorMaps=function(){if(this.plugin){return this.plugin.yml.getIndoorMaps();}else{this.plugin=this.map.getPlugin("YahooMapLayer");if(this.plugin){return this.plugin.yml.getIndoorMaps();}}return null;};IndoorMapLayer.prototype.setFloorId=function(a){this.createStyle(a);if(this.isRedraw){this.drawLayer(true);}};IndoorMapLayer.prototype.updateSlider=function(){var b=this.map.getMaxZoom();
if(this.indoormaps&&this.indoormaps.length>0){var a=this.indoormaps[0].layers[0];a=Y.Util.scale2Level(a);this.MAX_ZOOM_LEVEL=this.map.indoorMaxZoom=a;}else{this.map.indoorMaxZoom=void 0;}if(b!=this.map.getMaxZoom()){Y.Event.trigger(this.map,"numlayerchanged");}};IndoorMapLayer.prototype.createStyle=function(k){var g=[];var e=[];var m={};if(this.indoormaps&&this.indoormaps.length>0&&k!==null){var f=this.indoormaps[0];
var l=f.indoorid;m[l]=k;e.push(l);if(f.floorconnections){for(var d=0;d<f.floorconnections.length;d++){var h=f.floorconnections[d];if(k===h.floorid){m[h.connection.indoorid]=h.connection.floorid;}}}for(var d=1;d<this.indoormaps.length;d++){var f=this.indoormaps[d];var l=f.indoorid;e.push(l);if(typeof m[l]==="undefined"){for(var b=0;b<f.floorids.length;b++){if(k===f.floorids[b]){m[l]=f.floorids[b];break;
}}}}for(var l in m){g.push("id."+l+"."+m[l]+":ids");}}this.styles=g.join("|");this.isRedraw=false;if(this.floorId!=k){this.floorId=k;this.isRedraw=true;}e.sort(function(i,c){if(i<c){return -1;}if(i>c){return 1;}return 0;});var a=e.join(",");if(!this.drawList||this.drawList!==a){this.drawList=a;this.isRedraw=true;}};IndoorMapLayer.prototype.findFloorId=function(e){var b=null;if(this.indoormaps&&this.indoormaps.length>0){var d=this.indoormaps[0];
if(d.floorconnections){for(var a=0;a<d.floorconnections.length;a++){var f=d.floorconnections[a];if(e===f.connection.indoorid&&this.floorId===f.connection.floorid){b=f.floorid;break;}}}if(b==null){for(var a=0;a<d.floorids.length;a++){if(d.floorids[a]===this.floorId){b=this.floorId;}}}if(b==null){b=d.defaultfloorid;}}return b;};IndoorMapLayer.prototype.drawLayer=function(d){if(d){this.tileArray=null;
delete this.tileArray;this.tileArray=[];this.tileCount=0;var f=this;if(this.delOldTiles){clearTimeout(this.delOldTiles);this.oldTiles.remove();}this.oldTiles=this.container.children();this.delOldTiles=setTimeout(function(){f.oldTiles.fadeTo("slow",0,function(){$(this).remove();});},1000);}var b=this.map.getProjection();this.geoCenter=this.map.getCenter();this.tileCenter=b.fromLatLngToTile(this.geoCenter,this.map.getZoom());
this.fillSize=this.getFillSize();var e=this.fillSize.c-this.tileCount;if(e>0){for(var a=0;a<e;++a){var c=new Y.DomTile(this.createTile());if(c){this.tileArray.push(c);this.container.prepend(c.dom);}}}else{if(e<0){for(var a=0;a<-e;++a){var c=this.tileArray.pop();if(c){c.dom.remove();}}}}this.tileCount=this.fillSize.c;this.drawTiles();};IndoorMapLayer.prototype.updateCopyright=function(){var d=this.map.getBounds();
var f=this.map.getZoom();var b="";var e=this.map.currentLayerSet.getLayers();if(this.MAX_ZOOM_LEVEL<f||this.MIN_ZOOM_LEVEL>f){b="";}else{b=this.indoormaps?this.indoormaps[0].copyright:"";for(var a=0;a<e.length;a++){if(e[a].name===this.name){continue;}var g=e[a].getCopyrightCollection();if(g){var c=g.getCopyrightNotice(d,f);if(c.join(",").indexOf(b)!==-1){b="";break;}}}}if(this.copyright.text!=b){this.copyright.text=b;
return true;}return false;};IndoorMapLayer.prototype.remove=function(){if(this.map.getMaxZoom()!=this.MAX_ZOOMLEVEL){this.map.indoorMaxZoom=null;Y.Event.trigger(this.map,"numlayerchanged");}if(this.layerlistchanged){this.map.unbind(this.layerlistchanged);this.layerlistchanged=null;}if(this.container){this.container.remove();this.container=null;}if(this.drawer){this.drawer=null;}this.initialized=false;
};var IndoorMapLayer=Y.IndoorMapLayer=Y.extend(ImageTileLayer,function(a){ImageTileLayer.apply(this,[this.name,this.url,a]);this.indoormaps;this.floorId=void 0;this.styles="";this.isRedraw;this.drawList;this.smartphoneOptimize=true;this.url="http://m.map.c.yimg.jp/m?r=1&mode=indoormap&";this.name="IndoorMapLayer";this.MAX_ZOOM_LEVEL=22;this.MIN_ZOOM_LEVEL=18;this.copyright=new Y.Copyright("indoor",null,null,"");
this.copyrightCollection=new Y.CopyrightCollection();this.copyrightCollection.addCopyright(this.copyright);});IndoorMapLayer.prototype.getImageSrc=function(a,e,d){if(this.MAX_ZOOM_LEVEL<d||this.MIN_ZOOM_LEVEL>d){return"";}if(!this.indoormaps||this.styles==""){return"";}var c=this.url+"x="+a+"&y="+e+"&z="+d;if(this.smartphoneOptimize){var b=Math.round(this.floatTileSize.width*Y.Util.Platform.devicePixelRatio);
if(b!==Y.DEFAULT_TILE_SIZE){c+="&size="+b;}}c=c+"&style="+this.styles;return c;};IndoorMapLayer.prototype.initialize=function(b){this.__super__.initialize.call(this,b);this.indoormaps=this.getIndoorMaps();if(this.indoormaps&&this.indoormaps.length>0){var a=this.indoormaps[0].defaultfloorid;this.createStyle(a);this.updateSlider();}var c=this;this.layerlistchanged=b.bind("layerlistchanged",function(){var e=c.indoormaps?c.indoormaps[0].indoorid:void 0;
c.indoormaps=c.getIndoorMaps();var d=c.findFloorId(e);c.setFloorId(d);c.updateSlider();if(c.updateCopyright()){c.map.currentLayerSet.copyrightDraw();}Y.Event.trigger(c,"indoormaplayerchanged");});this.copyrightCollection.getCopyrights=function(g,f){c.updateCopyright();var h=[];for(var d=0;d<this.copyrights.length;d++){var e=this.copyrights[d];if(this.isCollision(e,g,f)){if(e.text){h.push(e.text);}}}return h;
};};IndoorMapLayer.prototype.getIndoorMaps=function(){if(this.plugin){return this.plugin.yml.getIndoorMaps();}else{this.plugin=this.map.getPlugin("YahooMapLayer");if(this.plugin){return this.plugin.yml.getIndoorMaps();}}return null;};IndoorMapLayer.prototype.setFloorId=function(a){this.createStyle(a);if(this.isRedraw){this.drawLayer(true);}};IndoorMapLayer.prototype.updateSlider=function(){var b=this.map.getMaxZoom();
if(this.indoormaps&&this.indoormaps.length>0){var a=this.indoormaps[0].layers[0];a=Y.Util.scale2Level(a);this.MAX_ZOOM_LEVEL=this.map.indoorMaxZoom=a;}else{this.map.indoorMaxZoom=void 0;}if(b!=this.map.getMaxZoom()){Y.Event.trigger(this.map,"numlayerchanged");}};IndoorMapLayer.prototype.createStyle=function(k){var g=[];var e=[];var m={};if(this.indoormaps&&this.indoormaps.length>0&&k!==null){var f=this.indoormaps[0];
var l=f.indoorid;m[l]=k;e.push(l);if(f.floorconnections){for(var d=0;d<f.floorconnections.length;d++){var h=f.floorconnections[d];if(k===h.floorid){m[h.connection.indoorid]=h.connection.floorid;}}}for(var d=1;d<this.indoormaps.length;d++){var f=this.indoormaps[d];var l=f.indoorid;e.push(l);if(typeof m[l]==="undefined"){for(var b=0;b<f.floorids.length;b++){if(k===f.floorids[b]){m[l]=f.floorids[b];break;
}}}}for(var l in m){g.push("id."+l+"."+m[l]+":ids");}}this.styles=g.join("|");this.isRedraw=false;if(this.floorId!=k){this.floorId=k;this.isRedraw=true;}e.sort(function(i,c){if(i<c){return -1;}if(i>c){return 1;}return 0;});var a=e.join(",");if(!this.drawList||this.drawList!==a){this.drawList=a;this.isRedraw=true;}};IndoorMapLayer.prototype.findFloorId=function(e){var b=null;if(this.indoormaps&&this.indoormaps.length>0){var d=this.indoormaps[0];
if(d.floorconnections){for(var a=0;a<d.floorconnections.length;a++){var f=d.floorconnections[a];if(e===f.connection.indoorid&&this.floorId===f.connection.floorid){b=f.floorid;break;}}}if(b==null){for(var a=0;a<d.floorids.length;a++){if(d.floorids[a]===this.floorId){b=this.floorId;}}}if(b==null){b=d.defaultfloorid;}}return b;};IndoorMapLayer.prototype.drawLayer=function(d){if(d){this.tileArray=null;
delete this.tileArray;this.tileArray=[];this.tileCount=0;var f=this;if(this.delOldTiles){clearTimeout(this.delOldTiles);this.oldTiles.remove();}this.oldTiles=this.container.children();this.delOldTiles=setTimeout(function(){f.oldTiles.fadeTo("slow",0,function(){$(this).remove();});},1000);}var b=this.map.getProjection();this.geoCenter=this.map.getCenter();this.tileCenter=b.fromLatLngToTile(this.geoCenter,this.map.getZoom());
this.fillSize=this.getFillSize();var e=this.fillSize.c-this.tileCount;if(e>0){for(var a=0;a<e;++a){var c=new Y.DomTile(this.createTile());if(c){this.tileArray.push(c);this.container.prepend(c.dom);}}}else{if(e<0){for(var a=0;a<-e;++a){var c=this.tileArray.pop();if(c){c.dom.remove();}}}}this.tileCount=this.fillSize.c;this.drawTiles();};IndoorMapLayer.prototype.updateCopyright=function(){var d=this.map.getBounds();
var f=this.map.getZoom();var b="";var e=this.map.currentLayerSet.getLayers();if(this.MAX_ZOOM_LEVEL<f||this.MIN_ZOOM_LEVEL>f){b="";}else{b=this.indoormaps?this.indoormaps[0].copyright:"";for(var a=0;a<e.length;a++){if(e[a].name===this.name){continue;}var g=e[a].getCopyrightCollection();if(g){var c=g.getCopyrightNotice(d,f);if(c.join(",").indexOf(b)!==-1){b="";break;}}}}if(this.copyright.text!=b){this.copyright.text=b;
return true;}return false;};IndoorMapLayer.prototype.remove=function(){if(this.map.getMaxZoom()!=this.MAX_ZOOMLEVEL){this.map.indoorMaxZoom=null;Y.Event.trigger(this.map,"numlayerchanged");}if(this.layerlistchanged){this.map.unbind(this.layerlistchanged);this.layerlistchanged=null;}if(this.container){this.container.remove();this.container=null;}if(this.drawer){this.drawer=null;}this.initialized=false;
};var IndoorMapLayer=Y.IndoorMapLayer=Y.extend(ImageTileLayer,function(a){ImageTileLayer.apply(this,[this.name,this.url,a]);this.indoormaps;this.floorId=void 0;this.styles="";this.isRedraw;this.drawList;this.smartphoneOptimize=true;this.url="http://m.map.c.yimg.jp/m?r=1&mode=indoormap&";this.name="IndoorMapLayer";this.MAX_ZOOM_LEVEL=22;this.MIN_ZOOM_LEVEL=18;this.copyright=new Y.Copyright("indoor",null,null,"");
this.copyrightCollection=new Y.CopyrightCollection();this.copyrightCollection.addCopyright(this.copyright);});IndoorMapLayer.prototype.getImageSrc=function(a,e,d){if(this.MAX_ZOOM_LEVEL<d||this.MIN_ZOOM_LEVEL>d){return"";}if(!this.indoormaps||this.styles==""){return"";}var c=this.url+"x="+a+"&y="+e+"&z="+d;if(this.smartphoneOptimize){var b=Math.round(this.floatTileSize.width*Y.Util.Platform.devicePixelRatio);
if(b!==Y.DEFAULT_TILE_SIZE){c+="&size="+b;}}c=c+"&style="+this.styles;return c;};IndoorMapLayer.prototype.initialize=function(b){this.__super__.initialize.call(this,b);this.indoormaps=this.getIndoorMaps();if(this.indoormaps&&this.indoormaps.length>0){var a=this.indoormaps[0].defaultfloorid;this.createStyle(a);this.updateSlider();}var c=this;this.layerlistchanged=b.bind("layerlistchanged",function(){var e=c.indoormaps?c.indoormaps[0].indoorid:void 0;
c.indoormaps=c.getIndoorMaps();var d=c.findFloorId(e);c.setFloorId(d);c.updateSlider();if(c.updateCopyright()){c.map.currentLayerSet.copyrightDraw();}Y.Event.trigger(c,"indoormaplayerchanged");});this.copyrightCollection.getCopyrights=function(g,f){c.updateCopyright();var h=[];for(var d=0;d<this.copyrights.length;d++){var e=this.copyrights[d];if(this.isCollision(e,g,f)){if(e.text){h.push(e.text);}}}return h;
};};IndoorMapLayer.prototype.getIndoorMaps=function(){if(this.plugin){return this.plugin.yml.getIndoorMaps();}else{this.plugin=this.map.getPlugin("YahooMapLayer");if(this.plugin){return this.plugin.yml.getIndoorMaps();}}return null;};IndoorMapLayer.prototype.setFloorId=function(a){this.createStyle(a);if(this.isRedraw){this.drawLayer(true);}};IndoorMapLayer.prototype.updateSlider=function(){var b=this.map.getMaxZoom();
if(this.indoormaps&&this.indoormaps.length>0){var a=this.indoormaps[0].layers[0];a=Y.Util.scale2Level(a);this.MAX_ZOOM_LEVEL=this.map.indoorMaxZoom=a;}else{this.map.indoorMaxZoom=void 0;}if(b!=this.map.getMaxZoom()){Y.Event.trigger(this.map,"numlayerchanged");}};IndoorMapLayer.prototype.createStyle=function(k){var g=[];var e=[];var m={};if(this.indoormaps&&this.indoormaps.length>0&&k!==null){var f=this.indoormaps[0];
var l=f.indoorid;m[l]=k;e.push(l);if(f.floorconnections){for(var d=0;d<f.floorconnections.length;d++){var h=f.floorconnections[d];if(k===h.floorid){m[h.connection.indoorid]=h.connection.floorid;}}}for(var d=1;d<this.indoormaps.length;d++){var f=this.indoormaps[d];var l=f.indoorid;e.push(l);if(typeof m[l]==="undefined"){for(var b=0;b<f.floorids.length;b++){if(k===f.floorids[b]){m[l]=f.floorids[b];break;
}}}}for(var l in m){g.push("id."+l+"."+m[l]+":ids");}}this.styles=g.join("|");this.isRedraw=false;if(this.floorId!=k){this.floorId=k;this.isRedraw=true;}e.sort(function(i,c){if(i<c){return -1;}if(i>c){return 1;}return 0;});var a=e.join(",");if(!this.drawList||this.drawList!==a){this.drawList=a;this.isRedraw=true;}};IndoorMapLayer.prototype.findFloorId=function(e){var b=null;if(this.indoormaps&&this.indoormaps.length>0){var d=this.indoormaps[0];
if(d.floorconnections){for(var a=0;a<d.floorconnections.length;a++){var f=d.floorconnections[a];if(e===f.connection.indoorid&&this.floorId===f.connection.floorid){b=f.floorid;break;}}}if(b==null){for(var a=0;a<d.floorids.length;a++){if(d.floorids[a]===this.floorId){b=this.floorId;}}}if(b==null){b=d.defaultfloorid;}}return b;};IndoorMapLayer.prototype.drawLayer=function(d){if(d){this.tileArray=null;
delete this.tileArray;this.tileArray=[];this.tileCount=0;var f=this;if(this.delOldTiles){clearTimeout(this.delOldTiles);this.oldTiles.remove();}this.oldTiles=this.container.children();this.delOldTiles=setTimeout(function(){f.oldTiles.fadeTo("slow",0,function(){$(this).remove();});},1000);}var b=this.map.getProjection();this.geoCenter=this.map.getCenter();this.tileCenter=b.fromLatLngToTile(this.geoCenter,this.map.getZoom());
this.fillSize=this.getFillSize();var e=this.fillSize.c-this.tileCount;if(e>0){for(var a=0;a<e;++a){var c=new Y.DomTile(this.createTile());if(c){this.tileArray.push(c);this.container.prepend(c.dom);}}}else{if(e<0){for(var a=0;a<-e;++a){var c=this.tileArray.pop();if(c){c.dom.remove();}}}}this.tileCount=this.fillSize.c;this.drawTiles();};IndoorMapLayer.prototype.updateCopyright=function(){var d=this.map.getBounds();
var f=this.map.getZoom();var b="";var e=this.map.currentLayerSet.getLayers();if(this.MAX_ZOOM_LEVEL<f||this.MIN_ZOOM_LEVEL>f){b="";}else{b=this.indoormaps?this.indoormaps[0].copyright:"";for(var a=0;a<e.length;a++){if(e[a].name===this.name){continue;}var g=e[a].getCopyrightCollection();if(g){var c=g.getCopyrightNotice(d,f);if(c.join(",").indexOf(b)!==-1){b="";break;}}}}if(this.copyright.text!=b){this.copyright.text=b;
return true;}return false;};IndoorMapLayer.prototype.remove=function(){if(this.map.getMaxZoom()!=this.MAX_ZOOMLEVEL){this.map.indoorMaxZoom=null;Y.Event.trigger(this.map,"numlayerchanged");}if(this.layerlistchanged){this.map.unbind(this.layerlistchanged);this.layerlistchanged=null;}if(this.container){this.container.remove();this.container=null;}if(this.drawer){this.drawer=null;}this.initialized=false;
};var ActionTimerPlugin=Y.ActionTimerPlugin=Y.extend(Y.Plugin,function(){this.actions=[];this.waitActions=[];});ActionTimerPlugin.prototype.addAction=function(e,d,c){var b={wait:e,action:d,label:c||e+"\u79d2\u30a2\u30af\u30b7\u30e7\u30f3"};this.actions.push(b);this.setAction(b);};ActionTimerPlugin.prototype.trigger=function(){for(var a in this.actions){this.actions[a].action();}};ActionTimerPlugin.prototype.isLoaded=function(){return this.loaded;
};ActionTimerPlugin.prototype.getName=function(){var a="Action Timer - \u25cb\u79d2\u30eb\u30fc\u30eb";return a;};ActionTimerPlugin.prototype.load=function(a){this.map=a;this.loaded=true;};ActionTimerPlugin.prototype.setAction=function(b){var a=["moveend","zoomend","layersetchanged"];var c=this;b.timer=setTimeout(function(){Log.write("["+b.label+"]\u3092\u8a2d\u5b9a\u3057\u307e\u3057\u305f\u3002");var g=[];for(var d in a){var f=a[d];var e=c.map.bind(f,function(j){for(var h in g){c.map.unbind(g[h]);
}if(!c.isDisable){c.setAction(b);b.action();}else{c.waitActions.push(b);}});g.push(e);}b.eventList=g;},b.wait*1000);};ActionTimerPlugin.prototype.enable=function(){for(var a=0;a<this.waitActions.length;a++){this.setAction(this.waitActions[a]);this.waitActions[a].action();}this.waitActions=[];this.isDisable=false;};ActionTimerPlugin.prototype.disable=function(){this.isDisable=true;};ActionTimerPlugin.prototype.clear=function(){for(var b in this.actions){clearTimeout(this.actions[b].timer);
for(var a in this.actions[b].eventList){this.map.unbind(this.actions[b].eventList[a]);}}this.actions=[];};ActionTimerPlugin.prototype.removeAction=function(b){for(var c in this.actions){if(this.actions[c].label==b){clearTimeout(this.actions[c].timer);for(var a in this.actions[c].eventList){this.map.unbind(this.actions[c].eventList[a]);}delete this.actions[c];}}};ActionTimerPlugin.prototype.unload=function(){this.clear();
this.loaded=false;};var LocationInfo=Y.LocationInfo=function(){this.latlng;this.req=new Y.Request();};LocationInfo.prototype.isJapanRect=function(e){var b=[{max:{lat:21.2,lon:136.7},min:{lat:20.2,lon:135.5}},{max:{lat:29.5,lon:154.5},min:{lat:21.2,lon:122.5}},{max:{lat:33.7,lon:130},min:{lat:29.5,lon:127.3}},{max:{lat:37.2,lon:138},min:{lat:29.5,lon:130}},{max:{lat:45.75,lon:149.2},min:{lat:29.5,lon:138}},{max:{lat:34.8,lon:130},min:{lat:33.7,lon:129}},{max:{lat:39.3,lon:138},min:{lat:37.2,lon:131.35}}];
if(!e){return false;}var a=false;var c=e.lat();var d=e.lng();$.each(b,function(f,g){if(!a&&g.min.lat<c&&c<g.max.lat&&g.min.lon<d&&d<g.max.lon){a=true;}});return a;};LocationInfo.prototype.parse=function(c,e,a){var b="/OpenLocalPlatform/V1/locationInfo";var d=c||{};d.lat=this.latlng.lat();d.lon=this.latlng.lng();d.datum="wgs";d.output="jsonp";this.req.request({url:b,data:d,dataType:"jsonp",success:function(f){e(f);
},error:function(){a();}});};LocationInfo.prototype.getAddress=function(d,a,c){var b=this;this.latlng=d;this.parse(a,function(e){if(e.address){c(e.address);}},function(){Y.Log.write("location error");});};LocationInfo.prototype.getStation=function(c,a,b){this.latlng=c;this.parse(a,function(d){if(d.station==null){d.station={};}if(d.airport==null){d.airport={};}var e={station:d.station,airport:d.airport};
if(d.address&&d.address.isocode){e.isocode=d.address.isocode;}b(e);},function(){Y.Log.write("location info error");});};LocationInfo.prototype.getConvinience=function(d,a,c){this.latlng=d;var b=this;this.parse(a,function(e){if(e.conveniencelink==null){e.conveniencelink={};}if(e.address.isocode=="JP"){e.conveniencelink.city=e.address.AddressString.AddressItem[1];}if(b.isJapanRect(d)){e.conveniencelink.isJapanRect=1;
}else{e.conveniencelink.isJapanRect=0;}c(e.conveniencelink);},function(){});};LocationInfo.prototype.getWeather=function(c,a,b){this.latlng=c;this.parse(a,function(d){if(d.weather==null){d.weather={};}if(d.address&&d.address.isocode){d.weather.isocode=d.address.isocode;}b(d.weather);},function(){});};var Navigation=Y.Navigation=function(a){this.url=a||"http://"+Y.HOST_NAME+"/OpenLocalPlatform/V1/navigation";this.req=new Y.Request();};Navigation.prototype.search=function(e,f,i,g){var a=i||{};var d=this;i.from_label=i.from_label;i.to_label=i.to_label;function h(j){result={Result:j};var k=d.parseYDF(e,f,i,result);if(g){g(k);}}if(i.maxDistance&&e.isLatLng&&f.isLatLng&&e.distance(f)>i.maxDistance){h(Navigation.ERROR_MAX_DISTANCE);
}else{c(e,f);}function c(m,l){if(typeof(m)==="string"){var k=Util.parseCoordinates(m);if(k&&k.length>0){c(k[0],l);return;}var j=new Y.GeoCoder();j.getLocation(m,{},function(n){if(n.result.count>0){c(n.features[0].getLatLng(),l);}});return;}else{if(!i.from_label){b(m,function(n){i.from_label=n;c(m,l);});}}if(typeof(l)==="string"){var k=Util.parseCoordinates(l);if(k&&k.length>0){b(k[0],function(n){i.to_label=n;
c(m,k[0]);});}var j=new Y.GeoCoder();j.getLocation(l,{},function(n){if(n.result.count>0){c(m,n.features[0].getLatLng());}});return;}else{if(!i.to_label){b(l,function(n){i.to_label=n;c(m,l);});}}if(m.equals(l)){h(Navigation.ERROR_SAME_POINT);return;}a.from=m.lat()+","+m.lng();a.to=l.lat()+","+l.lng();if(a.relays&&typeof(a.relays)!="string"){a.relays=Util.encodeCoordinates(a.relays,",",true);}a.output="jsonp";
a.datum="wgs";d.req.request({url:d.url,data:a,dataType:"jsonp",success:function(n){var o=d.parseYDF(m,l,i,n);if(g){g(o);}},error:function(){onerror();}});}function b(l,k){var j=new Y.LocationInfo();j.getAddress(l,{},function(m){if(m.AddressString){k(m.AddressString.unstructuredAddressString);}else{k(" ");}});}};Navigation.prototype.parseYDF=function(q,c,d,k){var w={};w.result={status:k.Result,total:1,count:1,start:1,end:1,bounds:new Y.LatLngBounds()};
w.features=[];var h=this.createFromFeature(q,d.from_label);w.features.push(h);w.result.bounds.extend(h.getLatLng());var m=this.createToFeature(c,d.to_label);w.features.push(m);w.result.bounds.extend(m.getLatLng());if(k.Result<0){w.result.total=0;w.result.count=0;w.result.end=0;return w;}var s=k.Coordinate;var l=[];l.push(h.getLatLng());if(s.Part.Seg){s=[s.Part];}else{s=s.Part;}for(var t=0;t<s.length;
t++){var n=s[t].Seg;if(n.Point){n=[n];}for(var r=0;r<n.length;r++){var p=n[r].Point;if(p!=null){if(p.x&&p.y){var A=new Y.LatLng(p.y,p.x);l.push(A);}else{for(var g=0;g<p.length;g++){var A=new Y.LatLng(p[g].y,p[g].x);l.push(A);w.result.bounds.extend(A);}}}}}l.push(m.getLatLng());var u=new Y.Style("0000ff",6,0.65);lineFeature=new Y.Polyline(l,{id:"route",strokeStyle:u,clickable:false});w.features.push(lineFeature);
if(!k.Guide){k.Guide=[];}else{if(k.Guide.GuideToll){k.Guide=[k.Guide];}}var o=0;var b=0;var e=1;for(var t in k.Guide){var y=k.Guide[t];var f=y.GuideToll.GuideSection;for(var r in f.GuidePoint){var p=f.GuidePoint[r];if(p.name&&typeof(p.name)=="string"){var B=p.name;}else{var B="\u7d4c\u7531\u5730"+e;}o+=parseFloat(p.dist);b+=parseFloat(p.time);var a=e;if(a>30){a=0;}var x=new Y.Icon();x.iconHtml="<p class='yolp-rtlistnum"+a+"'><img src='http://i.yimg.jp/images/map/api/yolp/images/yolp_icn.png' alt='' /></p>";
guideFeature=new Y.Marker(new Y.LatLng(p.y,p.x),{id:"guide-"+e,name:B,property:{sectionName:f.Name,code:p.code,toll:p.toll,name:p.name,rosenName:p.rosenname,time:p.time,dist:p.dist,distSum:o,turn:p.turn},icon:x,size:new Y.Size(19,26)});e++;w.features.push(guideFeature);}}w.result.totalDistance=k.distance/1000;w.result.totalTime=parseInt(k.totaltime);if(w.result.totalTime<=0){w.result.totalTime=1;}var e=1;
if(d.relays){var v=Util.parseCoordinates(d.relays,",",true);for(var t in v){relayFeature=new Y.Marker(v[t],{id:"relay-"+e,name:"\u4e2d\u7d99\u70b9"+e,icon:new Y.Icon("http://i.yimg.jp/images/map/icon/pin_crimson_m/shape/icon_"+e+".png")});e++;w.features.push(relayFeature);}}return w;};Navigation.prototype.createFromFeature=function(d,a){a=a||d;var c=new Y.Icon("");c.iconHtml=$('<p class="yolp-sicn"><img alt="" src="'+Y.ICON_IMAGE_URL+'"/></p>');
c.iconSize=new Y.Size(24,35);c.iconAnchor=new Y.Point(12,35);c.labelAnchor=new Y.Point(12,-22);c.infoWindowAnchor=new Y.Point(12,0);var b=new Y.Marker(d,{id:"from",name:a,icon:c,title:a});return b;};Navigation.prototype.createToFeature=function(d,a){a=a||d;var c=new Y.Icon("");c.iconHtml=$('<p class="yolp-gicn"><img alt="" src="'+Y.ICON_IMAGE_URL+'"/></p>');c.iconSize=new Y.Size(24,35);c.iconAnchor=new Y.Point(12,35);
c.labelAnchor=new Y.Point(12,-22);c.infoWindowAnchor=new Y.Point(12,0);var b=new Y.Marker(d,{id:"to",name:a,icon:c,title:a});return b;};Navigation.TRAVEL_MODE_DRIVING=1;Navigation.TRAVEL_MODE_WALKING=2;Navigation.TRAVEL_PRIORITY_TIME=1;Navigation.TRAVEL_PRIORITY_DISTANCE=2;Navigation.TRAVEL_PRIORITY_RECOMMEND=3;Navigation.ERROR_INVALID_POINT=-2;Navigation.ERROR_MAX_DISTANCE=-10;Navigation.ERROR_SAME_POINT=-20;
var AddressCategory=Y.AddressCategory=function(b,a){this.options=a||{};this.url=b||"http://search.olp.yahooapis.jp/OpenLocalPlatform/V1/addressDirectory";this.req=new Y.Request();this.coder=new Y.GeoCoder();};AddressCategory.prototype.getCategory=function(a,d){var c=this;var b=a||this.options||{};if(a.ll&&a.ll instanceof LatLng){this.coder.execute({latlng:a.ll},function(e){if(e&&e.features&&e.features[0]&&e.features[0].property){var f=e.features[0].property;
if(f.AddressElement){if(f.AddressElement[1]&&b.level>=2){b.ac=f.AddressElement[1].Code;}else{if(f.AddressElement[0]){b.ac=f.AddressElement[0].Code;}}}}c.search(b,d);});}else{this.search(b,d);}};AddressCategory.prototype.search=function(b,g){var f=this;var d=b||this.options||{};d.output="jsonp";d.detail="full";d.appid="dj0zaiZpPXNYeE1UQ2F5bjIyWCZzPWNvbnN1bWVyc2VjcmV0Jng9NTI-";if(b.ll&&b.ll instanceof LatLng){d.lat=b.ll.lat();
d.lon=b.ll.lng();}var a={data:{ac:d.ac,az:d.az,level:d.level}};if(this.req.is_cache(a)){var e=this.req.load(a);g(this.req.load(a));return;}delete d.ll;this.req.request({url:this.url,data:d,dataType:"jsonp",success:function(c){f.req.save(a,c);g(c);},error:function(c){}});};var YDFMapping=Y.YDFMapping=function(b,a){this.cid=b||"";this.options=a||{};};YDFMapping.prototype.get=function(b,c){var a="http://"+Y.HOST_NAME+"/OpenLocalPlatform/V1/ydfmapping";var b={cid:this.cid};$.ajax({url:a,data:b,async:false,dataType:"jsonp",success:function(d){c(d);}});};var RouteSearch=Y.RouteSearch=function(b,a){this.cache=new Y.Request();this.api=b||"http://navi.olp.yahooapis.jp/OpenLocalPlatform/V1/routeSearch";this.options=a||{};this.roadType={"0":"\u9ad8\u901f\u81ea\u52d5\u8eca\u56fd\u9053","1":"\u90fd\u5e02\u9ad8\u901f\u9053\u8def","2":"\u56fd\u9053","3":"\u4e3b\u8981\u5730\u65b9\u9053","4":"\u90fd\u9053\u5e9c\u770c\u9053","5":"\u57fa\u672c\u9053","6":"\u305d\u306e\u4ed6","7":"\u30d5\u30a7\u30ea\u30fc\u822a\u8def","10":"\u6709\u6599\u9053\u8def\uff08\u9ad8\u901f\u30fb\u90fd\u5e02\u9ad8\u901f\u4ee5\u5916\uff09"};this.direction={"1":"\u76f4\u9032","2":"\u53f3\u6298","3":"\u5de6\u6298","4":"\u659c\u3081\u524d\u65b9\u53f3\u65b9\u5411","5":"\u659c\u3081\u524d\u65b9\u5de6\u65b9\u5411","6":"\u659c\u3081\u5f8c\u65b9\u53f3\u65b9\u5411","7":"\u659c\u3081\u5f8c\u65b9\u5de6\u65b9\u5411","9":"\u51fa\u767a\u5730","10":"\u76ee\u7684\u5730"};
this.tollwayType={"0":"\u306a\u3057","1":"\u30a4\u30f3\u30bf\u30fc\u30c1\u30a7\u30f3\u30b8","2":"\u30a4\u30f3\u30bf\u30fc\u30c1\u30a7\u30f3\u30b8/\u30d1\u30fc\u30ad\u30f3\u30b0\u30a8\u30ea\u30a2","3":"\u30a4\u30f3\u30bf\u30fc\u30c1\u30a7\u30f3\u30b8/\u30b5\u30fc\u30d3\u30b9\u30a8\u30ea\u30a2","4":"\u30b8\u30e3\u30f3\u30af\u30b7\u30e7\u30f3","5":"\u30d1\u30fc\u30ad\u30f3\u30b0\u30a8\u30ea\u30a2","6":"\u30b5\u30fc\u30d3\u30b9\u30a8\u30ea\u30a2"};this.tollwayRoadFigure={"0":"\u306a\u3057","1":"\u672c\u7dda\u304b\u3089\u53f3\u3078\u5206\u5c90","2":"\u672c\u7dda\u304b\u3089\u5de6\u3078\u5206\u5c90","3":"Y\u5b57\u53f3\u3078\u5206\u5c90","4":"Y\u5b57\u5de6\u3078\u5206\u5c90","5":"\u672c\u7dda\u3078\u53f3\u304b\u3089\u5408\u6d41","6":"\u672c\u7dda\u3078\u5de6\u304b\u3089\u5408\u6d41","7":"\u672c\u7dda\u53f3\u5206\u5c90\u3042\u308a","8":"\u672c\u7dda\u5de6\u5206\u5c90\u3042\u308a"};this.regulationType={"3":"\u901a\u884c\u7981\u6b62\uff08\u6761\u4ef6\u4ed8\u304d\uff09","6":"\u4e00\u65b9\u901a\u884c\uff08\u6b63\u65b9\u5411\u3001\u6761\u4ef6\u4ed8\u304d\uff09","7":"\u4e00\u65b9\u901a\u884c\uff08\u9006\u65b9\u5411\u3001\u6761\u4ef6\u4ed8\u304d\uff09","8":"\u4e00\u65b9\u901a\u884c\uff08\u6b63\u9006\u5207\u308a\u66ff\u3048\u3042\u308a\uff09"};this.regulationCar={"1":"\u8eca\u4e21","2":"\u8eca\u4e21\uff08\u30bf\u30af\u30b7\u30fc\u3092\u9664\u304f\uff09","3":"\u8eca\u4e21\uff08\u30bf\u30af\u30b7\u30fc\u30fb\u4e8c\u8f2a\u3092\u9664\u304f\uff09","4":"\u8eca\u4e21\uff08\u30bf\u30af\u30b7\u30fc\u30fb\u8ca8\u7269\u3092\u9664\u304f\uff09","5":"\u8eca\u4e21\uff08\u30d0\u30b9\u3092\u9664\u304f\uff09","6":"\u8eca\u4e21\uff08\u30d0\u30b9\u30fb\u4e8c\u8f2a\u3092\u9664\u304f\uff09","7":"\u8eca\u4e21\uff08\u30d0\u30b9\u30fb\u30bf\u30af\u30b7\u30fc\u3092\u9664\u304f\uff09","8":"\u8eca\u4e21\uff08\u30d0\u30b9\u30fb\u30bf\u30af\u30b7\u30fc\u30fb\u4e8c\u8f2a\u3092\u9664\u304f\uff09","9":"\u8eca\u4e21\uff08\u30d0\u30b9\u30fb\u30bf\u30af\u30b7\u30fc\u30fb\u81ea\u4e8c\u8f2a\u3092\u9664\u304f\uff09","10":"\u8eca\u4e21\uff08\u30de\u30a4\u30af\u30ed\u3092\u9664\u304f\uff09","11":"\u8eca\u4e21\uff08\u30de\u30a4\u30af\u30ed\u30fb\u30bf\u30af\u30b7\u30fc\u30fb\u4e8c\u8f2a\u3092\u9664\u304f\uff09","12":"\u8eca\u4e21\uff08\u81ea\u4e8c\u8f2a\u3092\u9664\u304f\uff09","13":"\u8eca\u4e21\uff08\u89b3\u5149\u30d0\u30b9\u3092\u9664\u304f\uff09","14":"\u8eca\u4e21\uff08\u9ad8\u901f\u9053\u8def\u51fa\u5165\u8eca\u4e21\u3092\u9664\u304f\uff09","15":"\u8eca\u4e21\uff08\u5927\u8ca8\u3092\u9664\u304f\uff09","16":"\u8eca\u4e21\uff08\u5927\u578b\u30fb\u5927\u7279\u3092\u9664\u304f\uff09","17":"\u8eca\u4e21\uff08\u5927\u578b\u30fb\u5927\u7279\u30fb\u30bf\u30af\u30b7\u30fc\u3092\u9664\u304f\uff09","18":"\u8eca\u4e21\uff08\u5927\u578b\u3092\u9664\u304f\uff09","19":"\u8eca\u4e21\uff08\u5927\u578b\u30d0\u30b9\u30fb\u81ea\u4e8c\u8f2a\u3092\u9664\u304f\uff09","20":"\u8eca\u4e21\uff08\u5927\u578b\u30d0\u30b9\u30fb\u30bf\u30af\u30b7\u30fc\u3092\u9664\u304f\uff09","21":"\u8eca\u4e21\uff08\u4e8c\u8f2a\u3092\u9664\u304f\uff09","22":"\u8eca\u4e21\uff08\u4e8c\u8f2a\u30fb\u30bf\u30af\u30b7\u30fc\u3092\u9664\u304f\uff09","23":"\u8eca\u4e21\uff08\u666e\u4e57\u3092\u9664\u304f\uff09","24":"\u8eca\u4e21\uff08\u5927\u578b\u30d0\u30b9\u30fb\u666e\u901a\u3092\u9664\u304f\uff09","40":"\u4e8c\u8f2a","41":"\u4e8c\u8f2a\uff08125cc\u4ee5\u4e0b\u3092\u9664\u304f\uff09","42":"\u4e8c\u8f2a\uff08700cc\u4ee5\u4e0b\u3092\u9664\u304f\uff09","43":"\u4e8c\u8f2a\uff08700cc\u4ee5\u4e0a\u3092\u9664\u304f\uff09","44":"\u81ea\u4e8c\u8f2a","45":"\u81ea\u4e8c\u8f2a\uff08125cc\u4ee5\u4e0b\uff09","46":"\u81ea\u4e8c\u8f2a\uff08125cc\u4ee5\u4e0b\u3092\u9664\u304f\uff09","47":"\u81ea\u4e8c\u8f2a\uff08250cc\u4ee5\u4e0b\u3092\u9664\u304f\uff09","50":"\u4e57\u7528","53":"\u666e\u8ca8","55":"\u666e\u901a","56":"\u666e\u901a\uff08\u30bf\u30af\u30b7\u30fc\u3092\u9664\u304f\uff09","57":"\u30bf\u30af\u30b7\u30fc","58":"\u666e\u4e57","59":"\u666e\u4e57\uff08\u30bf\u30af\u30b7\u30fc\u3092\u9664\u304f\uff09","60":"\u8ca8\u7269","61":"\u30de\u30a4\u30af\u30ed","62":"\u30d0\u30b9","63":"\u5927\u578b\u30d0\u30b9","64":"\u5927\u8ca8","66":"\u5927\u8ca8\u7b49","68":"\u5927\u7279","70":"\u5927\u578b","71":"\u5927\u578b\uff08\u30de\u30a4\u30af\u30ed\u3092\u9664\u304f\uff09","72":"\u5927\u578b\uff08\u30d0\u30b9\u3092\u9664\u304f\uff09","73":"\u5927\u578b\uff08\u5927\u578b\u30d0\u30b9\u3092\u9664\u304f\uff09","77":"\u6700\u5927\u7a4d\u8f09\u91cf2t\u4ee5\u4e0a\u306e\u8ca8\u7269","78":"\u6700\u5927\u7a4d\u8f09\u91cf2.5t\u4ee5\u4e0a\u306e\u8ca8\u7269","79":"\u6700\u5927\u7a4d\u8f09\u91cf3t\u4ee5\u4e0a\u306e\u8ca8\u7269","80":"\u6700\u5927\u7a4d\u8f09\u91cf3.5t\u4ee5\u4e0a\u306e\u8ca8\u7269","81":"\u6700\u5927\u7a4d\u8f09\u91cf4t\u4ee5\u4e0a\u306e\u8ca8\u7269","82":"\u6700\u5927\u7a4d\u8f09\u91cf4.5t\u4ee5\u4e0a\u306e\u8ca8\u7269","87":"\u7dcf\u91cd\u91cf4t\u4ee5\u4e0a","88":"\u7dcf\u91cd\u91cf5t\u4ee5\u4e0a","89":"\u7dcf\u91cd\u91cf14t\u4ee5\u4e0a","90":"\u7dcf\u91cd\u91cf16t\u4ee5\u4e0a","91":"\u7dcf\u91cd\u91cf20t\u4ee5\u4e0a","92":"\u7dcf\u91cd\u91cf8t\u4ee5\u4e0a","93":"\u7dcf\u91cd\u91cf9t\u4ee5\u4e0a","96":"\u5371\u967a\u7269\u7a4d\u8f09\u8eca\u4e21","0":"\u672a\u8abf\u67fb"};
this.regulationDay={"1":"\u65e5\u30fb\u4f11\u65e5","2":"\u65e5\u30fb\u4f11\u65e5\u3092\u9664\u304f","3":"\u4f11\u65e5","4":"\u4f11\u65e5\u3092\u9664\u304f","5":"\u5e73\u65e5\uff08\u6708\uff5e\u571f\uff09","6":"\u65e5\u66dc","7":"\u6708\u66dc","8":"\u706b\u66dc","9":"\u6c34\u66dc","10":"\u6728\u66dc","11":"\u91d1\u66dc","12":"\u571f\u66dc","13":"\u571f\u65e5\u30fb\u4f11\u65e5","14":"\u571f\u65e5\u30fb\u4f11\u65e5\u3092\u9664\u304f","15":"\u5168\u66dc\u65e5","16":"\u65e5\u66dc\u3092\u9664\u304f","17":"\u65e5\u4f11\u306e\u524d\u65e5","0":"\u672a\u8abf\u67fb"};this.errorCode={"1002":"\u30d1\u30e9\u30e1\u30fc\u30bf\u304c\u4e0d\u6b63\u3067\u3059\u3002","1003":"\u63a2\u7d22\u4e2d\u306b\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u307e\u3057\u305f\u3002","1004":"\u59cb\u70b9\u8fd1\u508d\u306b\u9053\u8def\u304c\u898b\u3064\u304b\u308a\u307e\u305b\u3093\u3067\u3057\u305f\u3002","1005":"\u7d42\u70b9\u8fd1\u508d\u306b\u9053\u8def\u304c\u898b\u3064\u304b\u308a\u307e\u305b\u3093\u3067\u3057\u305f\u3002","1006":"\u63a2\u7d22\u6761\u4ef6\u306b\u30a8\u30e9\u30fc\u304c\u3042\u308a\u307e\u3059\u3002","1007":"\u63a2\u7d22\u3092\u4e2d\u65ad\u8a2d\u5b9a\u306b\u3088\u308a\u4e2d\u65ad\u3057\u307e\u3057\u305f\u3002"};this.params=new Y.RouteSearch.Params();
this._serviceName="RouteSearch";};RouteSearch.prototype.execute=function(b,a){this.request(b,a);};RouteSearch.prototype.request=function(e,c){var b=this.params.toReqParams()||{};var a=this.getApplicationId();if(a){b.appid=a;}else{b.appid="D_KP2Maxg65ULY8iGPzdIAZ4zGseyKAu9z0DNA7xDKJX8LwkHgV3fX9p1E4Udw--";}var d=this;this.cache.request({url:this.api,data:b,dataType:"jsonp",success:function(k){if(typeof(k.Error)!="undefined"){var j=k.Error.Detail.Code;
var i=typeof(d.errorCode[j])!="undefined"?d.errorCode[j]:"\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u307e\u3057\u305f\u3002";var g={code:j,message:i};e.call(c,false,g,null);return;}var f=k.ResultInfo.Description;var h=d.parseFeature(k.Feature);e.call(c,true,f,h,k);},error:function(){Y.Log.write("error");}});};RouteSearch.prototype.parseFeature=function(h){var c=[];var b="",a=[],g=[],d;for(var f=0,e=h.length;f<e;++f){d=h[f].Id.replace("node","").split("_")[0];
if(d!==b){if(a&&a.length>0){c.push({route:{latlng:a},guide:g});}b=d;a=[];g=[];}a=a.concat(this.parseGeometry(h[f].Geometry));if(typeof(h[f].RouteInfo)!="undefined"){g.push(this.parseGuide(h[f].RouteInfo.Edge.GuideInfo.Guide));}}a=this.checkLatLngs(a);c.push({route:{latlng:a},guide:g});return c;};RouteSearch.prototype.checkLatLngs=function(a){var d=[];if(a.length>2){d[0]=a[0];for(var c=1,b=a.length-1;
c<b;++c){if(a[c].equals(d[d.length-1])){continue;}d[d.length]=a[c];}d[d.length]=a[a.length-1];}else{d.concat(a);}return d;};RouteSearch.prototype.parseGeometry=function(b){var a=[];if(b&&b.Coordinates!==null){$.each(b.Coordinates.split(" "),function(c,d){if(d!==null){a[a.length]=Y.LatLng.fromUrlValue(d);}});}return a;};RouteSearch.prototype.parseGuide=function(a){var b={latlng:null,property:[]};var c={};
var d=this;$.each(a,function(t,l){switch(t){case"Geometry":b.latlng=d.parseGeometry(l)[0];break;case"Name":b.property[t]={label:"\u5730\u70b9\u540d",value:(l?l:null)};break;case"RoadName":b.property[t]={label:"\u8def\u7dda\u540d",value:(l?l:null)};break;case"RoadType":var r=null;if(typeof(d.roadType[l])!="undefined"){r=d.roadType[l];}b.property[t]={label:"\u8def\u7dda\u7a2e\u5225",value:(r?r:null)};break;case"TollwayInfo":var k=null;if(typeof(d.tollwayType[l.Type])!="undefined"){k=d.tollwayType[l.Type];
}var j=null;if(typeof(d.tollwayRoadFigure[l.RoadFigure])!="undefined"){j=d.tollwayRoadFigure[l.RoadFigure];}b.property[t]={label:"\u6709\u6599\u9053\u8def",value:{Name:{label:"\u65bd\u8a2d\u540d",value:(l.Name?l.Name:null)},Type:{label:"\u65bd\u8a2d\u7a2e\u5225",value:k},RoadFigure:{label:"\u9053\u8def\u5f62\u72b6",value:j}}};break;case"Direction":var h=null;if(typeof(d.direction[l])!="undefined"){h=d.direction[l];}b.property[t]={label:"\u65b9\u5411",value:h};break;case"Distance":b.property[t]={label:"\u8ddd\u96e2",value:(l+"m")};
break;case"Time":var u=parseInt(l,10);var o=parseInt(u/60,10);var p=u%60;var s=Math.floor((l-u)*60);var n="";if(o>0){n+=o+"\u6642\u9593";}if(p>0){n+=p+"\u5206";}n+=s+"\u79d2";b.property[t]={label:"\u6642\u9593",value:n};break;case"PassTime":var e=(isFinite(l)?l+"\u5206":l.replace("+09:00","").split("T").join(" "));b.property[t]={label:"\u7d4c\u904e\u6642\u9593",value:e};break;case"Regulations":b.property[t]={label:"\u4ea4\u901a\u898f\u5236",value:[]};if(l){for(var q=0,g=l.Regulation.length;
q<g;++q){var m={};var f=l.Regulation[q];m.Type={label:"\u898f\u5236\u7a2e\u5225",value:(typeof(d.regulationType[f.Type])!="undefined")?d.regulationType[f.Type]:null};m.Car={label:"\u8eca\u7a2e",value:(typeof(d.regulationCar[f.Car])!="undefined")?d.regulationCar[f.Car]:null};m.Weight={label:"\u8eca\u91cd",value:f.Weight/10+"t"};m.Height={label:"\u8eca\u9ad8",value:f.Height/10+"m"};m.Width={label:"\u8eca\u5e45",value:f.Width/10+"m"};m.Date={label:"\u6708\u65e5",value:f.Date.split(",").join("\uff5e")};
m.Time={label:"\u6642\u9593",value:f.Time.split(",").join("\uff5e")};m.Day={label:"\u66dc\u65e5",value:(typeof(d.regulationDay[f.Day])!="undefined")?d.regulationDay[f.Day]:null};b.property[t].value.push(m);}}break;}});return b;};RouteSearch.prototype.setApplicationId=Y.Service.setApplicationId;RouteSearch.prototype.getApplicationId=Y.Service.getApplicationId;var Params=Y.RouteSearch.Params=function(){this.arnum=1;this.output="json";
this.coordinates="";this.options={};};Params.prototype.getDefaultParams=function(){var a={arnum:1,output:"json",coordinates:""};return a;};Params.prototype.setOption=function(a){this.options=a;};Params.prototype.setCoordinates=function(a){var c=[];if(a.length>1){for(var b=0;b<a.length;b++){c.push(a[b].toUrlValue());}this.coordinates=c.join(",");}};Params.prototype.clearCoordinates=function(){this.coordinates="";
};Params.prototype.toReqParams=function(){var b={};b.arnum=this.arnum;b.output="json";b.coordinates=this.coordinates;for(var a in this.options){if(this.options.hasOwnProperty(a)){b[a]=this.options[a];}}return b;};Params.prototype.issetCoordinates=function(){return(this.coordinates==="")?false:true;};var DatumConvert=Y.DatumConvert=function(){};DatumConvert.prototype.convertToTky=function(c,b){var a={};a.datum="wgs";this.request(this.buildCoordinates(c),a,b);};DatumConvert.prototype.convertToWgs=function(c,b){var a={};a.datum="tky";this.request(this.buildCoordinates(c),a,b);};DatumConvert.prototype.buildCoordinates=function(a){var b="";if(a.isLatLng){a=[a];}$.each(a,function(c,d){b+=d.lng()+","+d.lat()+",";
});b=b.replace(/,$/,"");return b;};DatumConvert.prototype.request=function(e,b,f){var a="http://datum.search.olp.yahooapis.jp/OpenLocalPlatform/V1/datumConvert";var c="3F9mUWuxg64HpWwgYahwMgLOLxFUdlbzaxLfOu2CncqL4.k9VczBzsuAjc5CGw--";var d=b||{};d.ei="utf-8";d.output="json";d.coordinates=e;d.appid=c;$.ajax({url:a,data:d,dataType:"jsonp",success:function(g){var h=new Y.YDF(g);f(h);},error:function(){}});
};var Gid=Y.Gid=function(){};Gid.prototype.get=function(b,d,a,c){this.request(b,d,a,c);};Gid.prototype.request=function(c,f,b,e){var a="http://"+Y.HOST_NAME+"/OpenLocalPlatform/V1/getGid";var d=b||{};d.ei="utf-8";d.output="json";d.name=c||"";d.lat=f.lat();d.lon=f.lng();$.ajax({url:a,data:d,dataType:"jsonp",success:function(g){var h=new Y.YDF(g);e(h);},error:function(){}});};var Convenience=Y.Convenience=function(){};Convenience.prototype.get=function(c,a,b){this.request(c,a,b);};Convenience.prototype.request=function(f,b,e){var a="http://"+Y.HOST_NAME+"/OpenLocalPlatform/V1/convenience";var c=b||{};c.ei="utf-8";c.datum="wgs";c.lat=f.lat();c.lon=f.lng();c.output="json";var d=this;$.ajax({url:a,data:c,dataType:"jsonp",success:function(g){var h=new YDF(g);e(h);},error:function(g){Util.error(g);
}});};var Weather=Y.Weather=function(){};Weather.prototype.get=function(c,a,b){this.request(c,a,b);};Weather.prototype.request=function(f,b,e){var a="http://"+Y.HOST_NAME+"/OpenLocalPlatform/V1/weather";var c=b||{};c.ei="utf-8";c.datum="wgs";c.lat=f.lat();c.lon=f.lng();c.output="json";var d=this;$.ajax({url:a,data:c,dataType:"jsonp",success:function(g){var h=new YDF(g);e(h);},error:function(g){Util.error(g);
}});};var NaviSearch=Y.NaviSearch=function(){this.request=new Y.Request();};NaviSearch.prototype.search=function(h,g,c,b,f){var e=b||{};e.ei="utf-8";e.from=h;e.to=g;e.via=c;e.output="jsonp";e.datum="wgs";e.results=e.results||6;e.date=e.date||this.getCurrentDate();e.appid="mYtGHwmxg6412C5A6JqgvhnCBS4705tleP6LsC6ZSsKh.yfvcXI.nIYjYibv8A--";var a="http://navi.olp.yahooapis.jp/OpenLocalPlatform/V1/naviSearch";
var d={url:a,data:e,dataType:"jsonp",success:function(i){var j=new Y.YDF(i);f(j);},error:function(){}};b.cache=(b.cache===undefined)?true:b.cache;if(!b.cache){$.ajax(d);}else{this.request.request(d);}};NaviSearch.prototype.getCurrentDate=function(){var b=new Date();var f=b.getFullYear();var e=b.getMonth()+1;var a=b.getDate();var d=b.getHours();var c=b.getMinutes();if(e<10){e="0"+e;}if(a<10){a="0"+a;
}if(d<10){d="0"+d;}if(c<10){c="0"+c;}return""+f+e+a+d+c;};var Railway=Y.Railway=function(){this.request=new Y.Request();};Railway.prototype.execute=function(e,b,d){var c=b||{};c.ei="utf-8";c.output="json";c.datum="wgs";c.stations=e;var a="http://"+Y.HOST_NAME+"/OpenLocalPlatform/V1/railway";this.request.request({url:a,data:c,dataType:"jsonp",success:function(f){var g=new Y.YDF(f);d(g);},error:function(){}});};var WeatherPlace=Y.WeatherPlace=function(){this._serviceName="WeatherPlace";this.appid="5QoH8q2xg65PJGPBf.UdNo5ii_28zlFttWPHI6bbbBPPD.uRqc4iUCIPHeR6OvFv";};WeatherPlace.prototype.execute=function(e,b,f){var a="http://weather.olp.yahooapis.jp/v1/place";var d=b||{};d.coordinates=e;d.output="json";var c=this.getApplicationId();if(c){d.appid=c;}else{d.appid=this.appid;}$.ajax({url:a,data:d,dataType:"jsonp",success:function(g){var h=new Y.YDF(g);
f(h);},error:function(){}});};WeatherPlace.prototype.setApplicationId=Y.Service.setApplicationId;WeatherPlace.prototype.getApplicationId=Y.Service.getApplicationId;var Mx={};var MxPoint=Mx.Point=function(a,b){this.x=a?a:0;this.y=b?b:0;};var MapMixer=Mx.MapMixer=function(){this.src=[];this.cmp_pix=[];this.cmp_llp=[];this.polygons=[];};MapMixer.MJ_VERSION="1";MapMixer.MN_VERSION="0";MapMixer.RV_VERSION="0";MapMixer.prototype.clear=function(){delete this.src;delete this.cmp_pix;delete this.cmp_llp;delete this.polygons;this.src=[];this.cmp_pix=[];this.cmp_llp=[];
this.polygons=[];};MapMixer.prototype.addParam=function(e,c){var b,a,d;b=new Mx.Polygon(e);a=new Mx.Polygon(c);d=this.addPolygon(b,a);return d;};MapMixer.prototype.replaceParam=function(a,e,d){var c,b;c=new Mx.Polygon(e);b=new Mx.Polygon(d);this.replacePolygon(a,c,b);};MapMixer.prototype.addPolygon=function(b,a){this.polygons.push({pix:b,llp:a});return this.polygons.length-1;};MapMixer.prototype.replacePolygon=function(a,c,b){if((this.polygons.length-1)<a){return false;
}if(c){this.polygons[a].pix=c;}if(b){this.polygons[a].llp=b;}return true;};MapMixer.prototype.createMxPointInstance=function(a){var c=this.src[a];var b={pix:new Mx.Point(c.pix.x,c.pix.y),llp:new Mx.Point(c.llp.x,c.pix.y)};return b;};MapMixer.prototype.pixToLatLng=function(a,f){var d,e;var b={};if(this.polygons.length<=0){return b;}var c=this.getMatrixByPix(a,f);d=c.llp;e=c.pix;b=this.transfer(d,e,a,f);
return b;};MapMixer.prototype.latlngToPix=function(a,f){var b={};var d,e;if(this.polygons.length<=0){return b;}var c=this.getMatrixByLLp(a,f);d=c.llp;e=c.pix;b=this.transfer(e,d,a,f);return b;};MapMixer.prototype.containsPolygon=function(f,h){var b=this.polygons;var e;var a=b.length;var c=[];var g;if(f!="pix"&&f!="llp"){return c;}for(var d=0;d<a;d++){e=b[d][f];if(e.containsPoint(h)===true){c.push(b[d]);
}}return c;};MapMixer.prototype.nearestPolygon=function(h,a){var e=this.polygons.length;var d=9999999999,g=0;var j,k,c,f={};if(e==1){return this.polygons[0];}if(h!="pix"&&h!="llp"){return f;}for(var b=0;b<e;b++){j=this.polygons[b][h];g=j.sumDistance(a);if(g<d){d=g;k=b;}}c=this.polygons[k];return c;};MapMixer.prototype.getMatrixByPix=function(g,e){var d;var a=new Mx.Point(g,e);var f;d=this.containsPolygon("pix",a);
if(d.length>0){f=d[0];}else{f=this.nearestPolygon("pix",a);}var c=f.pix;var b=f.llp;var i=c.toMatrix();var h=b.toMatrix();return{pix:i,llp:h};};MapMixer.prototype.getMatrixByLLp=function(e,f){var d,c,b,i,h,g;var a=new Mx.Point(e,f);d=this.containsPolygon("llp",a);if(d.length>0){g=d[0];}else{g=this.nearestPolygon("llp",a);}c=g.pix;b=g.llp;i=c.toMatrix();h=b.toMatrix();return{pix:i,llp:h};};MapMixer.prototype.transfer=function(d,e,i,g){var f,h,j,c,b;
j=[i,g,1];f=e.inverse();h=d.multiply(f);c=h.multiplyVector(j);b=new Mx.Point(c[0],c[1]);return b;};var MxMatrix=Mx.Matrix=function(a){this.ary=a;this.ary.copy=function(b){var d=[];if(!b){b=this;}for(var c=0;c<b.length;c++){if(b[c] instanceof Array){d[c]=this.copy(b[c]);}else{d[c]=b[c];}}return d;};};MxMatrix.prototype.identityMatrix=function(e){var a=e.length;var d=[];for(var c=0;c<a;c++){d[c]=[];for(var b=0;
b<a;b++){d[c][b]=(c==b)?1:0;}}return d;};MxMatrix.prototype.inverse=function(){var d=this.ary.copy();var f,l;var h=d.length;var a=0,g;f=this.identityMatrix(d);for(var b=0;b<h;b++){l=d[b][b];for(var e=0;e<h;e++){d[e][b]/=l;f[e][b]/=l;}for(var c=0;c<h;c++){if(c==b){continue;}l=d[b][c]/d[b][b];for(e=0;e<h;e++){d[e][c]-=d[e][b]*l;f[e][c]-=f[e][b]*l;}}}g=new Mx.Matrix(f);return g;};MxMatrix.prototype.multiply=function(a){var l=this.ary;
var h=a.ary;var g=[];var e=l.length;var d,c,b,f;for(d=0;d<e;d++){for(c=0;c<e;c++){if(typeof(g[c])=="undefined"){g[c]=[];}for(b=0;b<e;b++){if(typeof(g[c][d])=="undefined"){g[c][d]=0;}g[c][d]+=l[c][b]*h[b][d];}}}f=new Mx.Matrix(g);return f;};MxMatrix.prototype.multiplyVector=function(g){var f=this.ary;var b=f.length;var a=[];var e,c,d;for(e=0;e<b;e++){d=0;a[e]=0;for(c=0;c<b;c++){d+=f[e][c]*g[c];}a[e]=d;
}return a;};var MxLine=Mx.Line=function(b,a){this.p1=b;this.p2=a;this.dist=0;};MxLine.RADIUS=6370300;MxLine.RAD=180;MxLine.util={};MxLine.util.distance=function(p,n){var h=MxLine.RADIUS;var k=MxLine.RAD;var c=p.x;var m=p.y;var a=n.x;var l=n.y;var j=0;var g=Math.PI;var q,i,e,o,f,d,b;q=Math.cos(m*g/k)*Math.cos(c*g/k);i=Math.sin(m*g/k)*Math.cos(c*g/k);e=Math.sin(c*g/k);o=Math.cos(l*g/k)*Math.cos(a*g/k);
f=Math.sin(l*g/k)*Math.cos(a*g/k);d=Math.sin(a*g/k);b=q*o+i*f+e*d;if(b<-1){b=-1;}if(b>1){b=1;}j=h*Math.acos(b);return j;};MxLine.util.intersection=function(d,c,b,a){if(((d.x-c.x)*(b.y-d.y)+(d.y-c.y)*(d.x-b.x))*((d.x-c.x)*(a.y-d.y)+(d.y-c.y)*(d.x-a.x))<0){if(((b.x-a.x)*(d.y-b.y)+(b.y-a.y)*(b.x-d.x))*((b.x-a.x)*(c.y-b.y)+(b.y-a.y)*(b.x-c.x))<0){return true;}}return false;};MxLine.prototype.distance=function(){var a=Mx.Line.util;
var c=this.p1;var b=this.p2;if(!this.dist){this.dist=a.distance(c,b);}return this.dist;};MxLine.prototype.inter=function(b){var g,f,e,d,c;var a=Mx.Line.util;g=this.p1;f=this.p2;e=b.p1;d=b.p2;c=a.intersection(g,f,e,d);return c;};var MxPolygon=Mx.Polygon=function(a){this.vertex=this.checkParams(a);};MxPolygon.prototype.checkParams=function(d){var b=[];var c,e;if(!d){return[];}for(var a=0;a<d.length;a++){c=d[a];
if(c instanceof Mx.Point){e=c;}else{e=new Mx.Point(c.x,c.y);}b.push(e);}return b;};MxPolygon.contain=function(a,j,g){var f=a.length;for(var d=0;d<f;d++){var l=(d===0)?f-1:d-1;var c=a[d].x-a[l].x;var k=a[d].y-a[l].y;var b=j-a[l].x;var h=g-a[l].y;var e=c*h-b*k;if(e<=0){return false;}}return true;};MxPolygon.prototype.xPoints=function(){var a=this.vertex.length;var b=[];for(var c=0;c<a;c++){b.push(this.vertex[c].x);
}return b;};MxPolygon.prototype.yPoints=function(){var a=this.vertex.length;var b=[];for(var c=0;c<a;c++){b.push(this.vertex[c].y);}return b;};MxPolygon.prototype.sumDistance=function(g){var d=this.vertex;var a=d.length;var e,f=0;var b=Mx.Line.util;for(var c=0;c<a;c++){e=d[c];f+=b.distance(g,e);}return f;};MxPolygon.prototype.containsPoint=function(c){var a=c.x;var d=c.y;var b=this.vertex;return MxPolygon.contain(b,a,d);
};MxPolygon.prototype.rectContainsPoint=function(d,c,a){var b=d.x<=a.x&&d.y<=a.y&&c.x>=a.x&&c.y>=a.y;return b;};MxPolygon.prototype.intersect=function(e){var r=e.vertex;var q=this.vertex;var h=r.length;var f=q.length;var l=Mx.Line.util;for(var j=0;j<h;j++){for(var g=0;g<f;g++){var p=q[g];var o=q[g+1==q.length?0:g+1];var n=r[j];var m=r[j+1==r.length?0:j+1];if(l.intersection(p,o,n,m)===true){return true;
}}}return false;};MxPolygon.prototype.toMatrix=function(){var d=[[],[],[]];var b=this.vertex.length;var e=null;var a=null;if(b<3){return[];}for(var c=0;c<3;c++){e=this.vertex[c];d[0][c]=e.x;d[1][c]=e.y;d[2][c]=1;}a=new MxMatrix(d);return a;};var GeoCoderControl=Y.GeoCoderControl=Y.extend(Y.Control,function(a){this.options=a;this.geocoder=new Y.GeoCoder();});GeoCoderControl.prototype.initialize=function(b){this.map=b;var a=$('<div class="yolp-mapsearch"></div>');this.inputNode=$('<input type="text" value="">');a.append(this.inputNode);this.submitNode=$('<input type="button" value="\u691c\u7d22">');a.append(this.submitNode);var c=this;this.submitNode.click(function(){c.search(c.inputNode.val());
});return a;};GeoCoderControl.prototype.setQuery=function(b,a){this.inputNode.val(b);if(a){this.search(b);}};GeoCoderControl.prototype.search=function(a){var b=this;this.geocoder.getLocation(a,this.options,function(d){if(d.result.count>0){var c=d.features[0];b.map.panTo(c.getLatLng());Y.Event.trigger(b,"searchend",d);}else{Y.Event.trigger(b,"searcnerror");}},function(c){Y.Event.trigger(b,"searcnerror");
});};GeoCoderControl.prototype.getDefaultPosition=function(){return new Y.ControlPosition(Y.ControlPosition.BOTTOM_LEFT,new Y.Size(2,18));};GeoCoderControl.prototype.remove=function(){this.submitnode.unbind("click",this.search);Control.prototype.remove.apply(this);};var AddressCategoryControl=Y.AddressCategoryControl=Y.extend(Y.Control,function(a,b){if(b){this.node=$("#"+b);}this.options=a||{};this.options.draggable=true;this.maximize=(this.options.maximize===undefined)?true:this.options.maximize;this.marker=(this.options.marker===undefined)?false:this.options.marker;this.addrctg=new Y.AddressCategory();this.addresslevel={world:{zoom:7,level:0},pref:{zoom:10,level:1},city:{zoom:13,level:2},oaza:{zoom:15,level:3},aza:{zoom:18,level:4},detail1:{zoom:19,level:5},detail2:{zoom:20,level:6}};
});AddressCategoryControl.prototype.initialize=function(c){var d=this;this.map=c;this.marking=false;var b=$("<div class='yolp-addresscategory'></div>").css({opacity:0.9});function a(){d.create(b,true);}this.showAddress=a;this.moveend=c.bind("moveendlazy",a);a();if(this.node){this.node.append(b);}else{if(this.options.draggable){new Y.DraggableObject(b);}return b;}};AddressCategoryControl.prototype.create=function(d,e){var g=this;
var f=this.levelChoose();var a=this.map.getCenter();var c="";var b="";if(this.marking&&f>2){c=this.ac||"";b=this.az||"";}this.addrctg.getCategory({ac:c,az:b,ll:a,level:f},function(h){if(g.marking){if(g.addrmarker){g.map.removeFeature(g.addrmarker);}if(h.Feature&&h.Feature[0]&&h.Feature[0].Name){if(g.marker){g.addrmarker=marker=new Y.Marker(a,{title:h.Feature[0].Name});g.map.addFeature(marker);}}g.marking=false;
}if(h.Error){d.html("");d.append(g.createPath("",0));if(g.maximize){d.append(g.createList(null));}}else{if(f>0){if(h.Feature&&h.Feature[0]){d.html("");d.append(g.createPath(h.Feature[0],0));if(g.maximize){d.append(g.createList(h.Feature[0].Property));}}}else{d.html("");d.append(g.createPath("",0));if(g.maximize){d.append(g.createList(""));}}}});};AddressCategoryControl.prototype.createPath=function(b,c){var e=this;
var d=$("<div class='yolp-addresscategory-header'></div>");d.append($("<p class='yolp-addrssctgry-cls'></p>").append("<img alt='' src='http://i.yimg.jp/images/map/api/yolp/images/yolp_ctrl.png'>").click(function(){if(e.maximize){e.maximize=false;$(this).removeClass("yolp-addrssctgry-cls");$(this).addClass("yolp-addrssctgry-opn");$("#yolp-addresslist").hide();}else{e.maximize=true;$(this).removeClass("yolp-addrssctgry-opn");
$(this).addClass("yolp-addrssctgry-cls");if(!$("#yolp-addresslist").html()){e.show();}else{$("#yolp-addresslist").show();}}}).css({cursor:"pointer"}));var a=$("<p class='yolp-addrssctgry-path'></p>");if(!b||!b.Property||!b.Property.AddressElement||b.Property.AddressElement.length==0){a.append($("<a class='select'>\u65e5\u672c</a>"));d.append(a);return d;}else{a.append($("<a href='javascript:void(0);'>\u65e5\u672c</a>").click(function(){e.map.setZoom(e.chooseZoom(0));
}));}if(!b.Property.AddressElement[0]){b.Property.AddressElement=[b.Property.AddressElement];}c=c||b.Property.AddressElement.length;$.each(b.Property.AddressElement,function(f,g){if(f<b.Property.AddressElement.length){a.append($("<span>",{text:" > "}));}if(f==(c-1)){a.append($("<a class='select'>"+g.Name+"</a>"));}else{a.append($("<a href='javascript:void(0);' title=''>"+g.Name+"</a>").click((function(h){return function(i){e.marking=true;
e.map.setZoom(e.chooseZoom(h+1));i.stopPropagation();};})(f)));}});d.append(a);return d;};AddressCategoryControl.prototype.createTopAddressList=function(){var a={};a.items=[{name:"\u5317\u6d77\u9053\u30fb\u6771\u5317",item:[{name:"\u5317\u6d77\u9053",ruby:"\u307b\u3063\u304b\u3044\u3069\u3046",wgslat:43.064291652547,wgslon:141.34685873425},{name:"\u9752\u68ee\u770c",ruby:"\u3042\u304a\u3082\u308a\u3051\u3093",wgslat:40.824286954341,wgslon:140.74007617389},{name:"\u5ca9\u624b\u770c",ruby:"\u3044\u308f\u3066\u3051\u3093",wgslat:39.703673839864,wgslon:141.15225914322},{name:"\u5bae\u57ce\u770c",ruby:"\u3042\u304d\u305f\u3051\u3093",wgslat:38.268888926568,wgslon:140.87184058367},{name:"\u79cb\u7530\u770c",ruby:"\u3042\u304d\u305f\u3051\u3093",wgslat:39.718611889844,wgslon:140.10239344986},{name:"\u5c71\u5f62\u770c",ruby:"\u3084\u307e\u304c\u305f\u3051\u3093",wgslat:38.240434399724,wgslon:140.36327898967},{name:"\u798f\u5cf6\u770c",ruby:"\u3075\u304f\u3057\u307e\u3051\u3093",wgslat:37.750026029135,wgslon:140.46768326621}]},{name:"\u95a2\u6771",item:[{name:"\u6771\u4eac\u90fd",ruby:"\u3068\u3046\u304d\u3087\u3046\u3068",wgslat:35.689875642551,wgslon:139.69165634866},{name:"\u795e\u5948\u5ddd\u770c",ruby:"\u304b\u306a\u304c\u308f\u3051\u3093",wgslat:35.447680274526,wgslon:139.64243606788},{name:"\u57fc\u7389\u770c",ruby:"\u3055\u3044\u305f\u307e\u3051\u3093",wgslat:35.857239405694,wgslon:139.64900232778},{name:"\u5343\u8449\u770c",ruby:"\u3061\u3070\u3051\u3093",wgslat:35.604578242004,wgslon:140.12319578145},{name:"\u8328\u57ce\u770c",ruby:"\u3044\u3070\u3089\u304d\u3051\u3093",wgslat:36.341828371401,wgslon:140.44678049139},{name:"\u6803\u6728\u770c",ruby:"\u3068\u3061\u304e\u3051\u3093",wgslat:36.565558992874,wgslon:139.88348987428},{name:"\u7fa4\u99ac\u770c",ruby:"\u3050\u3093\u307e\u3051\u3093",wgslat:36.391199481952,wgslon:139.06087027999},{name:"\u5c71\u68a8\u770c",ruby:"\u3084\u307e\u306a\u3057\u3051\u3093",wgslat:35.664159337171,wgslon:138.56844771417}]},{name:"\u4fe1\u8d8a\u30fb\u5317\u9678",item:[{name:"\u65b0\u6f5f\u770c",ruby:"\u306b\u3044\u304c\u305f\u3051\u3093",wgslat:37.902473987365,wgslon:139.02321198742},{name:"\u9577\u91ce\u770c",ruby:"\u306a\u304c\u306e\u3051\u3093",wgslat:36.651276002273,wgslon:138.18090320487},{name:"\u5bcc\u5c71\u770c",ruby:"\u3068\u3084\u307e\u3051\u3093",wgslat:36.695113165438,wgslon:137.21134462382},{name:"\u77f3\u5ddd\u770c",ruby:"\u3044\u3057\u304b\u308f\u3051\u3093",wgslat:36.594528400221,wgslon:136.62570137249},{name:"\u798f\u4e95\u770c",ruby:"\u3075\u304f\u3044\u3051\u3093",wgslat:36.065151484988,wgslon:136.22173322653}]},{name:"\u6771\u6d77",item:[{name:"\u611b\u77e5\u770c",ruby:"\u3042\u3044\u3061\u3051\u3093",wgslat:35.180389261451,wgslon:136.906549812},{name:"\u5c90\u961c\u770c",ruby:"\u304e\u3075\u3051\u3093",wgslat:35.39123763717,wgslon:136.72214884793},{name:"\u9759\u5ca1\u770c",ruby:"\u3057\u305a\u304a\u304b\u3051\u3093",wgslat:34.976857046568,wgslon:138.38302088965},{name:"\u4e09\u91cd\u770c",ruby:"\u307f\u3048\u3051\u3093",wgslat:34.730257093228,wgslon:136.50865046731}]},{name:"\u8fd1\u757f",item:[{name:"\u5927\u962a\u5e9c",ruby:"\u304a\u304a\u3055\u304b\u3075",wgslat:34.686299116135,wgslon:135.51973711939},{name:"\u5175\u5eab\u770c",ruby:"\u3072\u3087\u3046\u3054\u3051\u3093",wgslat:34.691563904291,wgslon:135.18335244209},{name:"\u4eac\u90fd\u5e9c",ruby:"\u304d\u3087\u3046\u3068\u3075",wgslat:35.021772777987,wgslon:135.75571213347},{name:"\u6ecb\u8cc0\u770c",ruby:"\u3057\u304c\u3051\u3093",wgslat:35.004313621354,wgslon:135.86849007947},{name:"\u5948\u826f\u770c",ruby:"\u306a\u3089\u3051\u3093",wgslat:34.685276219236,wgslon:135.83282944882},{name:"\u548c\u6b4c\u5c71\u770c",ruby:"\u308f\u304b\u3084\u307e\u3051\u3093",wgslat:34.226031920712,wgslon:135.16718637803}]},{name:"\u4e2d\u56fd",item:[{name:"\u9ce5\u53d6\u770c",ruby:"\u3068\u3063\u3068\u308a\u3051\u3093",wgslat:35.50388129034,wgslon:134.23769748703},{name:"\u5cf6\u6839\u770c",ruby:"\u3057\u307e\u306d\u3051\u3093",wgslat:35.472343249176,wgslon:133.05055267763},{name:"\u5ca1\u5c71\u770c",ruby:"\u304a\u304b\u3084\u307e\u3051\u3093",wgslat:34.66167127311,wgslon:133.93438698943},{name:"\u5e83\u5cf6\u770c",ruby:"\u3072\u308d\u3057\u307e\u3051\u3093",wgslat:34.396423053517,wgslon:132.45941340878},{name:"\u5c71\u53e3\u770c",ruby:"\u3084\u307e\u3050\u3061\u3051\u3093",wgslat:34.185709480219,wgslon:131.47090125076}]},{name:"\u56db\u56fd",item:[{name:"\u5fb3\u5cf6\u770c",ruby:"\u3068\u304f\u3057\u307e\u3051\u3093",wgslat:34.065935538613,wgslon:134.55910696838},{name:"\u9999\u5ddd\u770c",ruby:"\u304b\u304c\u308f\u3051\u3093",wgslat:34.340135954008,wgslon:134.04325095817},{name:"\u611b\u5a9b\u770c",ruby:"\u3048\u3072\u3081\u3051\u3093",wgslat:33.841717232432,wgslon:132.76615977013},{name:"\u9ad8\u77e5\u770c",ruby:"\u3053\u3046\u3061\u3051\u3093",wgslat:33.559689312268,wgslon:133.53106379811}]},{name:"\u4e5d\u5dde\u30fb\u6c96\u7e04",item:[{name:"\u798f\u5ca1\u770c",ruby:"\u3075\u304f\u304a\u304b\u3051\u3093",wgslat:33.606452164248,wgslon:130.41807746193},{name:"\u4f50\u8cc0\u770c",ruby:"\u3055\u304c\u3051\u3093",wgslat:33.249413559961,wgslon:130.29962134295},{name:"\u9577\u5d0e\u770c",ruby:"\u306a\u304c\u3055\u304d\u3051\u3093",wgslat:32.744939549738,wgslon:129.87347044365},{name:"\u718a\u672c\u770c",ruby:"\u304f\u307e\u3082\u3068\u3051\u3093",wgslat:32.790175599651,wgslon:130.74168636089},{name:"\u5927\u5206\u770c",ruby:"\u304a\u304a\u3044\u305f\u3051\u3093",wgslat:33.238135907521,wgslon:131.61251909756},{name:"\u5bae\u5d0e\u770c",ruby:"\u307f\u3084\u3056\u304d\u3051\u3093",wgslat:31.911012021043,wgslon:131.42385980611},{name:"\u9e7f\u5150\u5cf6\u770c",ruby:"\u304b\u3054\u3057\u307e\u3051\u3093",wgslat:31.560178558132,wgslon:130.55799640849},{name:"\u6c96\u7e04\u770c",ruby:"\u304a\u304d\u306a\u308f\u3051\u3093",wgslat:26.212400630994,wgslon:127.68091204058}]}];
return a;};AddressCategoryControl.prototype.createAddressList=function(d){var c={items:[]};if(!d.AddressDirectory){return c;}var a="";var b=null;$.each(d.AddressDirectory,function(e,g){if(a!=g.Label){a=g.Label;b={name:a,item:[]};c.items.push(b);}var f=g.Geometry.Coordinates.split(",");b.item.push({areacode:g.AreaCode,azacode:g.AzaCode,name:g.Name,ruby:g.Kana,wgslat:parseFloat(f[1].trim()),wgslon:parseFloat(f[0].trim())});
});return c;};AddressCategoryControl.prototype.createList=function(g){var f=this;var c=$("<div id='yolp-addresslist' class='yolp-addresscategory-body'></div>");var l=$("<div class='yolp-addresscategory-contents'></div>");var b=$("<p class='yolp-addresscategory-tab'></p>");var d=$("<ul class='yolp-addresscategory-list'></ul>");var j=$("<p class='yolp-addresscategory-footer'></p>");var h={};this.sublist=d;
this.foot=j;l.append(b);l.append(d);c.append(l);c.append(j);if(!g){h=this.createTopAddressList();}else{h=this.createAddressList(g);}if(h.items.length==1){var e=20;var k=6;var a=Math.floor((h.items[0].item.length-1)/e)+1;var i=function(n,q,s){b.hide();f.sublist.removeClass("yolp-addresscategory-list");f.sublist.addClass("yolp-addresscategory-list-num");$.each(h.items[0].item,function(w,x){if(w>=n&&w<(n+q)){f.sublist.append($("<li></li>").append($("<a href='javascript:void(0);'>"+x.name+"</a>").click(function(){f.marking=true;
f.ac=x.areacode;f.az=x.azacode;f.map.panTo(new Y.LatLng(x.wgslat,x.wgslon));f.map.setZoom(f.chooseZoom(f.levelChoose()+1));})));}});j.hide();if(h.items[0].item.length>e){var m=0;var t=a;if(a>k){if(s<=Math.floor(k/2)){t=k;}else{if(s>=a-Math.floor(k/2)){m=a-k;t=a;}else{m=s-Math.floor(k/2);t=s+Math.floor(k/2);}}}var u=function(w){f.foot.html("");f.sublist.html("");i(w*e,e,w);};if(s>=1){var o=$("<a class='yolp-addrssctgry-prev'></a>").append($("<img alt='\u524d\u3078' src='http://i.yimg.jp/images/clear.gif'>")).append($("<span>\u524d\u3078</span>").click(function(){u(s-1);
}).css({cursor:"pointer"}));f.foot.append(o);}for(var p=m;p<t;p++){var r=$("<a href='javascript:void(0);'>"+(p+1)+"</a>").click((function(w){return function(){u(w);};})(p));if(p==n/e){r.addClass("select");}f.foot.append(r);}if(s<a-1){var v=$("<a class='yolp-addrssctgry-next'></a>").append($("<span>\u6b21\u3078</span>").click(function(){u(s+1);}).css({cursor:"pointer"})).append($("<img alt='\u6b21\u3078' src='http://i.yimg.jp/images/clear.gif'>"));
f.foot.append(v);}j.show();}};i(0,e,0);}else{if(h.items){$.each(h.items,function(m,o){var p=function(q){return function(){f.foot.html("");$(this).parent().find("a").removeClass("select");$(this).addClass("select");f.createSubList(h.items[q]);};};var n=$("<a href='javascript:void(0);' title=''>"+o.name+"</a>").click(p(m));if(m==0){n.addClass("select");}b.append(n);if(m<h.items.length-1){b.append($("<span>|</span>"));
}});if(h.items[0]){this.createSubList(h.items[0]);}else{l.hide();j.hide();}}}return c;};AddressCategoryControl.prototype.createSubList=function(e){var g=this;var d=this.sublist;d.html("");if(!e){return d;}if(e.item.name){e.item=[e.item];}var c=20;var f=10;var a=Math.floor((e.item.length-1)/c)+1;var b=function(j,m,o){$.each(e.item,function(i,s){if(i>=j&&i<(j+m)){d.append($("<li></li>").append($("<a href='javascript:void(0);'>"+s.name+"</a>").click(function(){g.marking=true;
g.ac=s.areacode;g.az=s.azacode;g.map.panTo(new Y.LatLng(s.wgslat,s.wgslon));g.map.setZoom(g.chooseZoom(g.levelChoose()+1));}).attr("title",s.ruby)));}});g.foot.hide();if(e.item.length>c){var h=0;var p=a;if(a>f){if(o<=Math.floor(f/2)){p=f;}else{if(o>=a-Math.floor(f/2)){h=a-f;p=a;}else{h=o-Math.floor(f/2);p=o+Math.floor(f/2);}}}var q=function(s){g.foot.html("");d.html("");b(s*c,c,s);};if(o>=1){var k=$("<a class='yolp-addrssctgry-prev'></a>").append($("<img alt='\u524d\u3078' src='http://i.yimg.jp/images/clear.gif'>")).append($("<span>\u524d\u3078</span>").click(function(){q(o-1);
}).css({cursor:"pointer"}));g.foot.append(k);}for(var l=h;l<p;l++){var n=$("<a href='javascript:void(0);'>"+(l+1)+"</a>").click((function(s){return function(){q(s);};})(l));if(l==j/c){n.addClass("select");}g.foot.append(n);}if(o<a-1){var r=$("<a class='yolp-addrssctgry-next'></a>").append($("<span>\u6b21\u3078</span>").click(function(){q(o+1);}).css({cursor:"pointer"})).append($("<img alt='\u6b21\u3078' src='http://i.yimg.jp/images/clear.gif'>"));
g.foot.append(r);}g.foot.show();}};b(0,c,0);};AddressCategoryControl.prototype.levelChoose=function(){var a=this.map.getZoom();var b=0;if(a<=this.addresslevel.world.zoom){b=this.addresslevel.world.level;}else{if(a<=this.addresslevel.pref.zoom){b=this.addresslevel.pref.level;}else{if(a<=this.addresslevel.city.zoom){b=this.addresslevel.city.level;}else{if(a<=this.addresslevel.oaza.zoom){b=this.addresslevel.oaza.level;
}else{if(a<=this.addresslevel.aza.zoom){b=this.addresslevel.aza.level;}else{if(a<=this.addresslevel.detail1.zoom){b=this.addresslevel.detail1.level;}else{b=this.addresslevel.detail2.level;}}}}}}return b;};AddressCategoryControl.prototype.chooseZoom=function(b){var a=this.map.getZoom();$.each(this.addresslevel,function(c,d){if(d.level==b){a=d.zoom;}});return a;};AddressCategoryControl.prototype.getDefaultPosition=function(){return new Y.ControlPosition(Y.ControlPosition.TOP_LEFT,new Y.Size(2,25));
};AddressCategoryControl.prototype.remove=function(){this.node.remove();this.map.unbind(this.moveend);};var GeoXmlHeatSwitchControl=Y.GeoXmlHeatSwitchControl=Y.extend(Y.Control,function(a){this.options=a||{};this.iconlayer=a.icon;this.heatlayer=a.heat;});GeoXmlHeatSwitchControl.prototype.initialize=function(b){var c=this;var a={icon:this.iconlayer,heat:this.heatlayer};if(this.heatlayer.initialized){this.mode="heat";this.modename="\u30a2\u30a4\u30b3\u30f3";}else{this.mode="icon";this.modename="\u30d2\u30fc\u30c8\u30de\u30c3\u30d7";}this.node=$('<p title="'+this.modename+'\u8868\u793a\u3078\u5909\u66f4\u3059\u308b"></p>').addClass("yolp-"+this.mode+"-on").append($("<img src='http://i.yimg.jp/images/map/api/yolp/images/yolp_ctrl.png' alt='"+this.modename+"'>")).click(function(){var d="";
if(c.mode=="icon"){d="heat";$(this).attr({title:"\u30a2\u30a4\u30b3\u30f3\u8868\u793a\u3078\u5909\u66f4\u3059\u308b",alt:"\u30a2\u30a4\u30b3\u30f3\u8868\u793a\u3078\u5909\u66f4\u3059\u308b"});}else{d="icon";$(this).attr({title:"\u30d2\u30fc\u30c8\u30de\u30c3\u30d7\u8868\u793a\u3078\u5909\u66f4\u3059\u308b",alt:"\u30d2\u30fc\u30c8\u30de\u30c3\u30d7\u8868\u793a\u3078\u5909\u66f4\u3059\u308b"});}$(this).removeClass("yolp-"+c.mode+"-on");$(this).addClass("yolp-"+d+"-on");b.removeLayer(a[c.mode]);b.addLayer(a[d]);if(d=="icon"){a[d].execute();}a[d].draw(true);c.mode=d;}).css({cursor:"pointer",margin:0});return this.node;};GeoXmlHeatSwitchControl.prototype.remove=function(){this.node.remove();
};GeoXmlHeatSwitchControl.prototype.getDefaultPosition=function(){var b=this.options.position||ControlPosition.TOP_RIGHT;var a=this.options.size||new Size(212,3);return new ControlPosition(b,a);};var SearchControl=Y.SearchControl=Y.extend(Y.Control,function(a){this.options=a;this.url="http://map.yahooapis.jp/LocalSearchService/V1/LocalSearch";this.ls_url="http://search.olp.yahooapis.jp/OpenLocalPlatform/V1/localSearch";this.geoc_url="http://geo.search.olp.yahooapis.jp/OpenLocalPlatform/V1/geoCoder";this.zip_url="http://search.olp.yahooapis.jp/OpenLocalPlatform/V1/zipCodeSearch";this.container=null;
this.appid="dj0zaiZpPU55MUZ5a2FZZ2x6SyZzPWNvbnN1bWVyc2VjcmV0Jng9NGI-";this.query;this.start=1;this.category="";this.categoryList={station:"0",landmark:"1",address:"2",zipcode:"3"};this.dialog;this.result={};this.searchlink;this.bDefaultQuery=true;this.cid="4f20d833838a6e5eb70e55811ae36a2f";this.conv={address:{title:"\u4f4f\u6240",search:"address",table:""},zipcode:{title:"\u90f5\u4fbf\u756a\u53f7",search:"zipcode",table:"\u90f5\u4fbf\u756a\u53f7"},landmark:{title:"\u30e9\u30f3\u30c9\u30de\u30fc\u30af",search:"landmark",table:"\u540d\u79f0"},station:{title:"\u90fd\u9053\u5e9c\u770c\u65bd\u8a2d\u307e\u305f\u306f\u99c5",search:"station",table:"\u540d\u79f0"}};
this.keydown;this.busy=0;this.marker;this.obj=window;if($.browser.msie){this.obj=document.body;}});SearchControl.prototype.initialize=function(b){this.map=b;if($.browser.msie){try{document.execCommand("BackgroundImageCache",false,true);}catch(a){}}this.container=$('<div class="yolp-address-search" style="z-index: 3;"></div>');this.drag=new Y.DraggableObject(this.container,{handle:this.container});this.keydown=this.bind(function(c){if(c.keyCode==27){this.busy=0;
}},this);$(this.obj).bind("keydown",this.keydown);this.createSearchBox();this.dialog=new SearchDialog(this.map,this.container);return this.container;};SearchControl.prototype.getDefaultPosition=function(){return new Y.ControlPosition(Y.ControlPosition.TOP_LEFT,new Y.Size(3,28));};SearchControl.prototype.createSearchBox=function(){var b=this;this.searchbox=$('<div class="yolp-address-search-header" style="background-color: white;"></div>');
this.query=$('<input type="text" class="yolp-address-search-txtbx" size="55" value="\u4f8b\uff1a\u6771\u4eac\u90fd\u6e2f\u533a\u8d64\u57429-7-1">');this.query.css("color","rgb(153, 153, 153)");this.query.one("focus",function(){b.bDefaultQuery=false;b.query.val("");b.query.css("color","");});this.query.keydown(function(c){if(c.keyCode==13){b.search(true);}});var a=$('<input type="button" style="cursor: pointer;" class="yolp-address-search-btn" value="\u691c\u7d22">');
a.click(function(){b.search(true);});this.query.mousedown(function(c){c.stopPropagation();});a.click(function(c){c.stopPropagation();});this.searchbox.append(this.query);this.searchbox.append(a);this.container.append(this.searchbox);};SearchControl.prototype.exec_srch=function(f,a,d,e,c,b){var g=this;$.ajax({url:c,data:b,dataType:"jsonp",success:function(h){var k=new Y.YDF(h);if(k.result.total>0){var i=g.categoryList[e];
f[i]=(g.createList(k,e));if(!d){a.count=k.result.total;var j=k.features[0].getLatLng();a.lat=j.lat();a.lon=j.lng();a.title=k.features[0].name;}}},complete:function(i,l){g.busy--;if(g.busy<=0){g.dialog.clearDialog();var k=g.createTitle();g.dialog.setTitle(k);if(f.length>0){for(var h=0;h<f.length;h++){g.dialog.setContents(f[h]);}}else{g.dialog.setContents(g.createZero());}if(!d&&a.count>0){g.dialog.close();
g.move(a.lat,a.lon,{title:a.title});}else{g.dialog.open();}}}});};SearchControl.prototype.search=function(c,g){if(this.busy>0){return;}if(this.bDefaultQuery){this.bDefaultQuery=false;this.query.val("");this.query.css("color","");}var g=g||{};g.appid=g.appid||this.appid;g.cid=g.cid||this.cid;g.query=g.query||this.escape(this.query.val());g.category=g.category||this.category;g.results=10;g.start=g.start||1;
g.output="json";g.datum="wgs";if(!g.query){delete g.query;var f=this.map.getCenter();g.lat=g.lat||f.lat();g.lon=g.lon||f.lng();g.dist=g.dist||100;}if(g.start==1){g.results=5;g.category=["station","landmark","address","zipcode"];}if(!c){g.n=1;g.category=[""];}this.start=g.start;this.category=g.category;delete this.result;this.result={};var a={};var e=[];this.busy=this.category.length;for(var b=0;b<this.category.length;
b++){var d=this.category[b];var h=this;options=$.extend(true,{},g);delete options.category;if((options.start+options.results)>101){options.results=101-options.start;}switch(d){case"station":options.cid="4f20d833838a6e5eb70e55811ae36a2f";options.gc="0422002,0306006";options.detail="full";options.sort="hybrid";this.exec_srch(e,a,c,d,this.ls_url,options);break;case"address":delete options.cid;delete options.gc;
delete options.detail;options.al="6";options.ar="le";options.sort="address2";options.exclude_prefecture="false";options.exclude_seireishi="false";this.exec_srch(e,a,c,d,this.geoc_url,options);break;case"landmark":default:delete options.gc;delete options.detail;options.cid="4f20d833838a6e5eb70e55811ae36a2f";options.sort="hybrid";options.loco_mode="false";this.exec_srch(e,a,c,d,this.ls_url,options);break;
case"zipcode":options.sort="zip_code";options.cid="3ee7f7f5fe1ef2267e319b15168e37d3";options.zkind="0,2";options.detail="full";this.exec_srch(e,a,c,d,this.zip_url,options);break;}}};SearchControl.prototype.more=function(a){this.category=[a];this.search(true,{start:6});};SearchControl.prototype.next=function(){this.search(true,{start:this.start+10});};SearchControl.prototype.prev=function(){var a=this.start-10;
if(a<=0){a=1;}this.search(true,{start:a});};SearchControl.prototype.move=function(b,c,a){this.map.setCenter(new Y.LatLng(b,c),18);if(this.marker){this.map.removeFeature(this.marker);this.marker=null;}if(a){a.icon=this.createIcon();}this.marker=new Y.Marker(new Y.LatLng(b,c),a);this.map.addFeature(this.marker);};SearchControl.prototype.createIcon=function(){var a=new Y.Icon("");a.iconHtml='<p class="yolp-onematch"><img src="http://i.yimg.jp/images/map/api/yolp/images/yolp_icn.png" alt="star"></p>';
a.iconSize=new Y.Size(24,35);a.iconAnchor=new Y.Point(12,35);a.labelAnchor=new Y.Point(12,-35);return a;};SearchControl.prototype.createList=function(b,l){var h=this;var e=$('<dl class="rthrlst"></dl>');var c=l;var r=this.conv[c]["search"];var n=this.conv[c]["title"];var q=this.conv[c]["table"];this.result[c]=b;var g=100>b.result.total?b.result.total:100;var d=null;if(c!=="station"){d=$("<dt>"+n+"\u3068\u306e\u4e00\u81f4("+this.createListHead(g,b.result.count)+")</dt>");
}else{d=$("<dt>"+n+"\u3068\u306e\u4e00\u81f4("+this.createListHeadStation(g,b.result.count)+")</dt>");}var p=$('<table class="addrndlst" style="font-size:12px;" width="100%" cellspacing="0" cellpadding="0" border="0"></table>');var k=$("<tr></tr>");k.append('<th class="ttl" scope="col">\u4f4f\u6240</th>');if(c!=="address"){k.prepend('<th class="ttl" scope="col">'+q+"</th>");}p.append(k);for(var f=0;f<b.result.count;f++){var m=$('<a href="javascript:void(0);" name="'+f+'">'+b.features[f].name+"</a>");
m.click(function(){var a=$(this).attr("name");var i=h.result[c].features[a].getLatLng();h.move(i.lat(),i.lng(),{title:h.result[c].features[a].name});h.dialog.close();$(this).closest(".yolp-address-search").find(".yolp-address-search-txtbx").focus();});var k=$("<tr></tr>");k.append($("<td></td>").append(m));if(c!=="address"){switch(c){case"station":k.append($("<td></td>").append($("<span>"+this.createAddress(b.features[f])+"</span>")));
break;default:k.append($("<td></td>").append($("<span>"+b.features[f].property.Address+"</span>")));break;}}p.append(k);}var j=$("<p class='more'></p>");if(g>5&&this.start==1){var m=$("<a href='javascript:void(0);'>\u3082\u3063\u3068\u898b\u308b</a>");m.click(function(){h.more(r);});j.append("<img class='mrkarrw' src='http://i.yimg.jp/images/clear.gif'>").append(m);}else{j.append(this.createPageNavi(g,b.result.count));}var o=$("<dd></dd>");
o.append(p);o.append(j);e.append(d);e.append(o);return e;};SearchControl.prototype.createAddress=function(c){var a="";for(var b=0;b<c.property.AddressElement.length;b++){a+=c.property.AddressElement[b].Name;}return a;};SearchControl.prototype.createTitle=function(){var a=this.escape(this.query.val());if(!a){return"\u5468\u8fba\u691c\u7d22";}return'<span style="white-space: nowrap;">\u30ad\u30fc\u30ef\u30fc\u30c9\u691c\u7d22\uff1a</span><strong unselectable=on style="-moz-user-select:none; -khtml-user-select:none;">'+a+"</strong>\u3068\u306e\u4e00\u81f4";
};SearchControl.prototype.createListHead=function(c,a){var b=this.start*1+a*1-1;var d="";if(this.start==b){d=c+"\u4ef6\u4e2d"+this.start+" \u4ef6\u76ee";}else{d=c+"\u4ef6\u4e2d"+this.start+"&#xFF5E;"+b+" \u4ef6\u76ee";}return d;};SearchControl.prototype.createListHeadStation=function(c,a){var b=this.start*1+a*1-1;var d="";if(this.start==b){d=this.start+" \u4ef6\u76ee";}else{d=this.start+"&#xFF5E;"+b+" \u4ef6\u76ee";}return d;};SearchControl.prototype.createPageNavi=function(f,a){var h=this;
var c=f-(this.start*1+a*1-1);var b=this.start-1;var d="";if(c>0){if(c>10){c=10;}d=$('<a href="javascript:void(0);">\u6b21\u306e'+c+"\u4ef6</a>");d.click(function(){h.next();});}var e="";if(b>0){if(b>10){b=10;}e=$('<a href="javascript:void(0);">\u524d\u306e'+b+"\u4ef6</a>");e.click(function(){h.prev();});}var g=$("<div></div>");if(e){g.append(e);}g.append("&nbsp;&nbsp;");if(d){g.append(d);}return g;};SearchControl.prototype.createZero=function(){var a=$('<dl class="rthrlst"></dl>');
a.append('<p class="errtxt">\u30ad\u30fc\u30ef\u30fc\u30c9\u306b\u4e00\u81f4\u3059\u308b\u60c5\u5831\u306f\u898b\u3064\u304b\u308a\u307e\u305b\u3093\u3067\u3057\u305f\u3002</p>');a.append('<p class="hntttl"><img src="http://i.yimg.jp/images/search/hint.gif" width="23" height="19" alt="\u30d2\u30f3\u30c8">\u4ee5\u4e0b\u306e\u30d2\u30f3\u30c8\u3092\u53c2\u8003\u306b\u5165\u529b\u3057\u3066\u304f\u3060\u3055\u3044\u3002</p>');a.append('<ul class="hntlst">');a.append("<li>\u30ad\u30fc\u30ef\u30fc\u30c9\u304c\u6b63\u3057\u304f\u5165\u529b\u3067\u304d\u3066\u3044\u308b\u304b\u3001\u8aa4\u5b57\u304c\u306a\u3044\u304b\u78ba\u8a8d\u3057\u3066\u307f\u3066\u304f\u3060\u3055\u3044\u3002</li>");a.append("<li>\u90f5\u4fbf\u756a\u53f7\u3084\u5730\u56f3\u4e0a\u306b\u5b58\u5728\u3059\u308b\u5168\u56fd\u306e\u4e3b\u8981\u306a\u5730\u540d\u3001\u4f4f\u6240\u3001\u99c5\u540d\u3001\u4ea4\u5dee\u70b9\u540d\u3001\u65bd\u8a2d\u540d\u306a\u3069\u304b\u3089\u5730\u56f3\u3092\u691c\u7d22\u3067\u304d\u307e\u3059\u3002</li>");a.append("</ul>");return a;};SearchControl.prototype.bind=function(a,b){return function(){a.apply(b,arguments);
};};SearchControl.prototype.unload=function(){this.dialog.unload();if(this.marker){this.map.removeFeature(this.marker);this.marker=null;}this.container.css({overflow:"",background:""});if(this.keydown){$(this.obj).unbind("keydown",this.keydown);this.keydown=null;}this.container.empty();};SearchControl.prototype.escape=function(a){if(a.match(/^[ \u3000\t]+$/)){return"";}return a.replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/'/g,"&#039;").replace(/</g,"&lt;").replace(/>/g,"&gt;");
};var SearchDialog=Y.SearchDialog=function(a,b){this.map=a;this.parentContainer=b;this.container;this.is_open=false;this.keyword="";this.modal_title;this.modal_scroll;this.modal_close;this.drag=false;this.prev=null;this.keydown;this.mousemove;this.mouseup;this.obj=window;if($.browser.msie){this.obj=document.body;}this.load();};SearchDialog.prototype.load=function(a){this.container=$("<div style='background-color: white;' class='yolp-address-search-body'></div>").css({display:"none"});
$(this.map.getContainer()).append(this.container);this.createDialog();this.keydown=this.bind(function(b){if(b.keyCode==27){this.close();}},this);$(this.obj).bind("keydown",this.keydown);};SearchDialog.prototype.createDialog=function(){var c=this;this.modal_title=$('<p style="width:280px; word-wrap: break-word;" class="othrkywrd" unselectable=on></p>');var b=$("<img src='http://i.yimg.jp/images/clear.gif' class='close'>").click(function(){c.close();
});var a=$('<a class="close_txt" href="javascript:void(0);">\u9589\u3058\u308b</a>').click(function(){c.close();});this.modal_close=$("<p class='clsbtn'></p>").append(b).append(a);this.modal_scroll=$('<div class="yolp-address-searchscrll"></div>');if(Y.Util.Platform.isIOS||Y.Util.Platform.isAndroid){this.modal_scroll.css({"-webkit-overflow-scrolling":"touch"});this.modal_scroll.bind("touchstart",function(d){if(!d.stopPropagation){d=d.touches[0];
}d.stopPropagation();});this.modal_scroll.bind("touchmove",function(d){if(!d.stopPropagation){d=d.touches[0];}d.stopPropagation();});this.modal_scroll.bind("touchend",function(d){if(!d.stopPropagation){d=d.touches[0];}d.stopPropagation();});this.modal_scroll.bind("gesturestart",function(d){if(!d.stopPropagation){d=d.touches[0];}d.stopPropagation();});this.modal_scroll.bind("gesturechange",function(d){if(!d.stopPropagation){d=d.touches[0];
}d.stopPropagation();});this.modal_scroll.bind("gestureend",function(d){if(!d.stopPropagation){d=d.touches[0];}d.stopPropagation();});}else{this.modal_scroll.mousedown(function(d){d.stopPropagation();}).click(function(d){d.stopPropagation();}).dblclick(function(d){d.stopPropagation();}).mousewheel(function(d){d.stopPropagation();});}this.container.append(this.modal_title);this.container.append(this.modal_scroll);
this.container.append(this.modal_close);this.parentContainer.append(this.container);};SearchDialog.prototype.open=function(){this.is_open=true;this.container.slideDown();this.modal_scroll.scrollTop(0);};SearchDialog.prototype.close=function(){this.is_open=false;if($.browser.msie){this.container.hide();}else{this.container.slideUp();}};SearchDialog.prototype.setTitle=function(a){this.modal_title.html(a);
};SearchDialog.prototype.setContents=function(a){this.modal_scroll.append(a);};SearchDialog.prototype.clearDialog=function(){this.modal_title.html("");this.modal_scroll.html("");};SearchDialog.prototype.unload=function(){if(this.keydown){$(this.obj).unbind("keydown",this.keydown);this.keydown=null;}if(this.mousemove){$(this.obj).unbind("mousemove",this.mousemove);this.mousemove=null;}if(this.mouseup){$(this.obj).unbind("mouseup",this.mouseup);
this.mouseup=null;}this.modal_title.empty();this.modal_scroll.empty();this.modal_close.empty();this.container.empty();};SearchDialog.prototype.bind=function(a,b){return function(){a.apply(b,arguments);};};var ConvenienceControl=Y.ConvenienceControl=Y.extend(Y.Control,function(a){this.options=a||{};this.conv=new Y.Convenience();this.geocoder=new Y.GeoCoder();this.weather=new Y.Weather();this.infoopen=false;});ConvenienceControl.prototype.initialize=function(b){var c=this;this.node=$("<div class='yolp-mapinfo'></div>");this.areanode=$("<dt></dt>");this.infonode=$("<dd></dd>");this.closebtn=$("<img class='cls' alt='\u9589\u3058\u308b' src='http://i.yimg.jp/images/clear.gif'>");
this.openbtn=$("<p class='infoopn'></p>").append($("<img class='opn' alt='\u60c5\u5831\u3092\u958b\u304f' src='http://i.yimg.jp/images/clear.gif'>"));this.btnnode=$("<dd></dd>");var a=$("<dl style='height:100%'></dl>");a.append(this.areanode);a.append(this.infonode);a.append(this.btnnode.append(this.openbtn).click(function(){c.toggle();}));this.node.append(a);this.moveend=b.bind("moveendlazy",function(){c.update();});if(!this.infoopen){this.infonode.hide();
this.btnnode.html(this.openbtn);}else{this.infonode.show();this.btnnode.html(this.closebtn);}this.update(true);return this.node;};ConvenienceControl.prototype.toggle=function(){var a=this;if(this.infoopen){this.infonode.hide("fast");this.btnnode.html(this.openbtn);}else{if(this.changed){this.update();this.changed=false;}this.infonode.show("fast");this.btnnode.html(this.closebtn);}this.infoopen=!this.infoopen;
};ConvenienceControl.prototype.update=function(a){var b=this;this.code=this.code||"";this.geocoder.getAddress(this.map.getCenter(),{},function(c){var d="\u4ed8\u8fd1";var i=false;var h="";if(c&&c.features&&c.features[0]){var f=c.features[0];var g="";if(f.property&&f.property.AddressElement){var e=f.property.AddressElement;if(e[1]&&e[1].Name){d=e[1].Name;}if(e[1]&&e[1].Code){g=e[1].Code;}}if(f.property&&f.property.Country){if(f.property.Country.Code=="JP"){i=true;
}else{i=false;g=f.property.Country.Code;}h=f.property.Country;}}b.areanode.html("");if(i){b.areanode.append($("<a href='javascript:void(0);'></a>").append("<strong>"+d+"</strong>\u306e\u60c5\u5831").click(function(){b.toggle();}));}else{b.areanode.append($("<a href='javascript:void(0);'></a>").append("<strong>"+h.Name+"</strong>\u306e\u60c5\u5831").click(function(){b.toggle();}));}b.isjapan=i;b.country=h;if(b.infoopen||a){b.conv.get(b.map.getCenter(),{},function(j){b.show(j);
});b.code=g;}else{b.changed=true;}if(h==""){b.node.hide();}else{b.node.show();}});};ConvenienceControl.prototype.show=function(a){var c=this;this.infonode.html("");if(this.isjapan){this.weatherlink=$("<a href='javascript:void(0);'>\u5929\u6c17\u60c5\u5831</a>").click(function(){c.weather.get(c.map.getCenter(),{},function(d){if(d&&d.features&&d.features[0]){var e=d.features[0];if(e.property&&e.property.Detail&&e.property.Detail.PcUrl1){window.open(e.property.Detail.PcUrl1);
}}});});}else{this.weatherlink=$("<a href='http://weather.yahoo.co.jp/weather/world/' target='_ymdtl'>\u4e16\u754c\u306e\u5929\u6c17\u60c5\u5831</a>");}this.weathernode=$("<li></li>").append($("<img src='http://i.yimg.jp/images/sicons/weather16.gif'>")).append(this.weatherlink);var b=$("<ul class='usfllnk'></ul>");b.append(this.weathernode);if(a&&a.features){$.each(a.features,function(d,e){var f=$("<li></li>");f.append($("<img src='"+e.property.Detail.ItemImage1+"'>")).append($("<a href='"+e.property.Detail.PcUrl1+"' target='_ymdtl'>"+e.title+"</a>"));
b.append(f);});}this.infonode.append(b);};ConvenienceControl.prototype.remove=function(){this.node.remove();this.map.unbind(this.moveend);};ConvenienceControl.prototype.getDefaultPosition=function(){var b=this.options.position||ControlPosition.BOTTOM_LEFT;var a=this.options.size||new Size(5,20);return new ControlPosition(b,a);};var IndoorMapControl=Y.IndoorMapControl=Y.extend(Y.Control,function(a,b){this.options=b||{};this.indoorMapLayer=a;});IndoorMapControl.prototype.initialize=function(a){this.indoormaps=this.indoorMapLayer.indoormaps;this.buttonHeight=44;this.drumHeight=this.buttonHeight*6;this.listlength=0;this.minTop=0;this.maxTop=0;this.listTop;this.prevY;this.diffY;this.mosuedown=false;this.dragging=false;this.setFloorIdTime;
this.node=$('<div id="yolp-ctrl-floor-drum"></div>');this.scaler=$('<div id="scaler"></div>');this.list;this.node.css({width:"60px",height:this.drumHeight+"px",align:"center",padding:"0px",overflow:"hidden","background-color":"#ddd","border-radius":"8px",border:"solid 1px #aaa",opacity:".8",filter:"alpha(opacity=80)"}).bind("selectstart",function(){return false;});if(Y.Util.Platform.isSupportTouchScroll){this.node.css({"-webkit-user-select":"none","-webkit-tap-highlight-color":"rgba(0,0,0,0)"});
}this.scaler.css({position:"absolute",top:(this.drumHeight/2-this.buttonHeight/2)+"px",left:"2px",width:"54px",height:this.buttonHeight+"px","background-color":"#a55",border:"solid 1px #d22",opacity:".8",filter:"alpha(opacity=80)"});this.node.append(this.scaler);a.mainContainer.append(this.node);var b=this;this._mousedown=function(c){b.mosuedown=true;b.prevY=c.pageY?c.pageY:c.originalEvent.touches[0].pageY;
b.diffY=0;};this._mousemove=function(d){if(b.mosuedown){b.dragging=true;var c=d.pageY?d.pageY:d.originalEvent.touches[0].pageY;b.diffY=c-b.prevY;var f=b.listTop+b.diffY;f=b._range(f);b.list.css("top",f+"px");}};this._mouseup=function(g){if(b.dragging){var j=b.listTop+b.diffY;j=b._range(j);var f=b._ddjust(j);b.list.css("top",f+"px");b.listTop=f;var i=b._createFloorId(f);b.setFloorId(i);}else{if(b.mosuedown){var c=b.prevY;
var h=c-b.node.offset().top;var d=h-b.drumHeight/2;var j=b.listTop-d;j=b._range(j);var f=b._ddjust(j);b.list.css("top",f+"px");b.listTop=f;var i=b._createFloorId(f);b.setFloorId(i);}}b.mosuedown=false;b.dragging=false;};this._mousewheel=function(d,g){b.diffY=(g>0)?b.buttonHeight:-b.buttonHeight;var f=b.listTop+b.diffY;f=b._range(f);var c=b._ddjust(f);b.list.css("top",c+"px");b.listTop=c;if(b.setFloorIdTime){clearTimeout(b.setFloorIdTime);
}b.setFloorIdTime=setTimeout(function(){var e=b._createFloorId(c);b.setFloorId(e);},300);d.stopPropagation();d.preventDefault();};if(a.configure.touchSupport&&Y.Util.IS_TOUCH_SCREEN){this.node.bind("touchstart",this._mousedown);$(window).bind("touchmove",this._mousemove);$(window).bind("touchend",this._mouseup);}else{this.node.bind("mousedown",this._mousedown);this.node.bind("mousewheel",this._mousewheel);
if($.browser.msie){this.map.mainContainer.bind("mousemove",this._mousemove);this.map.mainContainer.bind("mouseup",this._mouseup);}else{$(window).bind("mousemove",this._mousemove);$(window).bind("mouseup",this._mouseup);}}this.createList();this._indoormaplayerchanged=this.indoorMapLayer.bind("indoormaplayerchanged",function(){b.indoormaps=b.indoorMapLayer.indoormaps;b.createList();});this._zoomend=this.map.bind("zoomend",function(){b.createList();
});return this.node;};IndoorMapControl.prototype.isDisplay=function(){if(this.indoormaps&&this.indoormaps.length>0){if(this.indoormaps[0].layers&&this.indoormaps[0].layers.length){var b=this.indoormaps[0].layers[this.indoormaps[0].layers.length-1];var a=this.indoormaps[0].layers[0];b=Y.Util.scale2Level(b);a=Y.Util.scale2Level(a);var c=this.map.getZoom();if(b<=c&&c<=a){return true;}}}return false;};
IndoorMapControl.prototype.createList=function(){if(this.isDisplay()){this.floorCount=this.indoormaps[0].floorlevels.length;this.listlength=this.floorCount*this.buttonHeight;this.minTop=this.drumHeight/2+(this.buttonHeight/2)-this.listlength;this.maxTop=this.drumHeight/2;var j=this.indoorMapLayer.floorId;var a=this.indoormaps[0].floorids.length-1;var e=this.indoormaps[0].floorlevels;var f=0;for(var b=0;
b<this.indoormaps[0].floorids.length;b++){if(j===this.indoormaps[0].floorids[b]){f=b;}}this.listTop=((this.drumHeight/2)-((a-f)*this.buttonHeight))-(this.buttonHeight/2);this.listTop=this._ddjust(this.listTop);if(this.list){this.list.remove();}this.list=$('<div id="drum-list" style="display:block;"></div>');this.list.css({position:"absolute",top:this.listTop+"px",left:"0px",width:this.buttonHeight+"px",height:this.listlength+"px",dispaly:"block"}).bind("selectstart",function(){return false;
});var d=e.length-1;var h=0;for(var b=d;b>=0;b--){var g=$("<div>"+e[b]+"</div>");g.css({position:"absolute",top:h*this.buttonHeight+"px",width:"60px",height:this.buttonHeight+"px","text-align":"center"});this.list.append(g);h++;}this.node.append(this.list);this.show();}else{this.hide();}};IndoorMapControl.prototype.remove=function(){if(this.map.configure.touchSupport&&Y.Util.IS_TOUCH_SCREEN){$(window).unbind("touchmove",this._mousemove);
$(window).unbind("touchend",this._mouseup);}else{if($.browser.msie){this.map.mainContainer.unbind("mousemove",this._mousemove);this.map.mainContainer.unbind("mouseup",this._mouseup);}else{$(window).unbind("mousemove",this._mousemove);$(window).unbind("mouseup",this._mouseup);}}this.map.unbind(this._zoomend);if(this.node){this.node.unbind();this.node.remove();this.node=null;}};IndoorMapControl.prototype.setFloorId=function(a){this.indoorMapLayer.setFloorId(a);
};Control.prototype.getDefaultPosition=function(){return new Y.ControlPosition(Y.ControlPosition.BOTTOM_LEFT,new Size(10,20));};IndoorMapControl.prototype._createFloorId=function(b){var c=0;if(this.indoormaps&&this.indoormaps.length>0){var a=this.indoormaps[0].floorids.length-1-Math.abs((b+8)-(this.drumHeight/2))/this.buttonHeight;c=this.indoormaps[0].floorids[a];}return c;};IndoorMapControl.prototype._ddjust=function(a){return this.buttonHeight*Math.round((a+8)/this.buttonHeight)-8;
};IndoorMapControl.prototype._range=function(a){a=(a>this.maxTop)?this.maxTop:a;a=(a<this.minTop)?this.minTop:a;return a;};var IndoorMapControl=Y.IndoorMapControl=Y.extend(Y.Control,function(a,b){this.options=b||{};this.indoorMapLayer=a;});IndoorMapControl.prototype.initialize=function(a){this.indoormaps=this.indoorMapLayer.indoormaps;this.buttonHeight=44;this.drumHeight=this.buttonHeight*6;this.listlength=0;this.minTop=0;this.maxTop=0;this.listTop;this.prevY;this.diffY;this.mosuedown=false;this.dragging=false;this.setFloorIdTime;
this.node=$('<div id="yolp-ctrl-floor-drum"></div>');this.scaler=$('<div id="scaler"></div>');this.list;this.node.css({width:"60px",height:this.drumHeight+"px",align:"center",padding:"0px",overflow:"hidden","background-color":"#ddd","border-radius":"8px",border:"solid 1px #aaa",opacity:".8",filter:"alpha(opacity=80)"}).bind("selectstart",function(){return false;});if(Y.Util.Platform.isSupportTouchScroll){this.node.css({"-webkit-user-select":"none","-webkit-tap-highlight-color":"rgba(0,0,0,0)"});
}this.scaler.css({position:"absolute",top:(this.drumHeight/2-this.buttonHeight/2)+"px",left:"2px",width:"54px",height:this.buttonHeight+"px","background-color":"#a55",border:"solid 1px #d22",opacity:".8",filter:"alpha(opacity=80)"});this.node.append(this.scaler);a.mainContainer.append(this.node);var b=this;this._mousedown=function(c){b.mosuedown=true;b.prevY=c.pageY?c.pageY:c.originalEvent.touches[0].pageY;
b.diffY=0;};this._mousemove=function(d){if(b.mosuedown){b.dragging=true;var c=d.pageY?d.pageY:d.originalEvent.touches[0].pageY;b.diffY=c-b.prevY;var f=b.listTop+b.diffY;f=b._range(f);b.list.css("top",f+"px");}};this._mouseup=function(g){if(b.dragging){var j=b.listTop+b.diffY;j=b._range(j);var f=b._ddjust(j);b.list.css("top",f+"px");b.listTop=f;var i=b._createFloorId(f);b.setFloorId(i);}else{if(b.mosuedown){var c=b.prevY;
var h=c-b.node.offset().top;var d=h-b.drumHeight/2;var j=b.listTop-d;j=b._range(j);var f=b._ddjust(j);b.list.css("top",f+"px");b.listTop=f;var i=b._createFloorId(f);b.setFloorId(i);}}b.mosuedown=false;b.dragging=false;};this._mousewheel=function(d,g){b.diffY=(g>0)?b.buttonHeight:-b.buttonHeight;var f=b.listTop+b.diffY;f=b._range(f);var c=b._ddjust(f);b.list.css("top",c+"px");b.listTop=c;if(b.setFloorIdTime){clearTimeout(b.setFloorIdTime);
}b.setFloorIdTime=setTimeout(function(){var e=b._createFloorId(c);b.setFloorId(e);},300);d.stopPropagation();d.preventDefault();};if(a.configure.touchSupport&&Y.Util.IS_TOUCH_SCREEN){this.node.bind("touchstart",this._mousedown);$(window).bind("touchmove",this._mousemove);$(window).bind("touchend",this._mouseup);}else{this.node.bind("mousedown",this._mousedown);this.node.bind("mousewheel",this._mousewheel);
if($.browser.msie){this.map.mainContainer.bind("mousemove",this._mousemove);this.map.mainContainer.bind("mouseup",this._mouseup);}else{$(window).bind("mousemove",this._mousemove);$(window).bind("mouseup",this._mouseup);}}this.createList();this._indoormaplayerchanged=this.indoorMapLayer.bind("indoormaplayerchanged",function(){b.indoormaps=b.indoorMapLayer.indoormaps;b.createList();});this._zoomend=this.map.bind("zoomend",function(){b.createList();
});return this.node;};IndoorMapControl.prototype.isDisplay=function(){if(this.indoormaps&&this.indoormaps.length>0){if(this.indoormaps[0].layers&&this.indoormaps[0].layers.length){var b=this.indoormaps[0].layers[this.indoormaps[0].layers.length-1];var a=this.indoormaps[0].layers[0];b=Y.Util.scale2Level(b);a=Y.Util.scale2Level(a);var c=this.map.getZoom();if(b<=c&&c<=a){return true;}}}return false;};
IndoorMapControl.prototype.createList=function(){if(this.isDisplay()){this.floorCount=this.indoormaps[0].floorlevels.length;this.listlength=this.floorCount*this.buttonHeight;this.minTop=this.drumHeight/2+(this.buttonHeight/2)-this.listlength;this.maxTop=this.drumHeight/2;var j=this.indoorMapLayer.floorId;var a=this.indoormaps[0].floorids.length-1;var e=this.indoormaps[0].floorlevels;var f=0;for(var b=0;
b<this.indoormaps[0].floorids.length;b++){if(j===this.indoormaps[0].floorids[b]){f=b;}}this.listTop=((this.drumHeight/2)-((a-f)*this.buttonHeight))-(this.buttonHeight/2);this.listTop=this._ddjust(this.listTop);if(this.list){this.list.remove();}this.list=$('<div id="drum-list" style="display:block;"></div>');this.list.css({position:"absolute",top:this.listTop+"px",left:"0px",width:this.buttonHeight+"px",height:this.listlength+"px",dispaly:"block"}).bind("selectstart",function(){return false;
});var d=e.length-1;var h=0;for(var b=d;b>=0;b--){var g=$("<div>"+e[b]+"</div>");g.css({position:"absolute",top:h*this.buttonHeight+"px",width:"60px",height:this.buttonHeight+"px","text-align":"center"});this.list.append(g);h++;}this.node.append(this.list);this.show();}else{this.hide();}};IndoorMapControl.prototype.remove=function(){if(this.map.configure.touchSupport&&Y.Util.IS_TOUCH_SCREEN){$(window).unbind("touchmove",this._mousemove);
$(window).unbind("touchend",this._mouseup);}else{if($.browser.msie){this.map.mainContainer.unbind("mousemove",this._mousemove);this.map.mainContainer.unbind("mouseup",this._mouseup);}else{$(window).unbind("mousemove",this._mousemove);$(window).unbind("mouseup",this._mouseup);}}this.map.unbind(this._zoomend);if(this.node){this.node.unbind();this.node.remove();this.node=null;}};IndoorMapControl.prototype.setFloorId=function(a){this.indoorMapLayer.setFloorId(a);
};Control.prototype.getDefaultPosition=function(){return new Y.ControlPosition(Y.ControlPosition.BOTTOM_LEFT,new Size(10,20));};IndoorMapControl.prototype._createFloorId=function(b){var c=0;if(this.indoormaps&&this.indoormaps.length>0){var a=this.indoormaps[0].floorids.length-1-Math.abs((b+8)-(this.drumHeight/2))/this.buttonHeight;c=this.indoormaps[0].floorids[a];}return c;};IndoorMapControl.prototype._ddjust=function(a){return this.buttonHeight*Math.round((a+8)/this.buttonHeight)-8;
};IndoorMapControl.prototype._range=function(a){a=(a>this.maxTop)?this.maxTop:a;a=(a<this.minTop)?this.minTop:a;return a;};var LayerSetGroupControl=Y.LayerSetGroupControl=Y.extend(Y.Control,function(a){this.options=a||{};this.groups=this.options.groups||{};});LayerSetGroupControl.prototype.initialize=function(c){var d=this;var b=$('<ul class="yolp-ctrl"></ul>');function a(){b.empty();var g=c.getLayerSets();var f=c.getCurrentLayerSet();if(d.groups&&d.groups.length>0){$.each(d.groups,function(r,q){var j=q.name||q[0].getFullName();
var p=$("<li>",{title:j+"\u3078\u5909\u66f4\u3059\u308b"}).append($("<p>",{"class":"dsstr-txt",text:j}));if(q.width){p.css({width:q.width});}var n=$("<ul>",{"class":"dsstr-info-list"});var o="yolp-layerset-off";var l=true;$.each(q.layersets,function(s,x){var t=g[x];if(f==t){o="yolp-layerset-on";}if(t.getEnable()){l=false;}var w="layersetsgroup"+r;var v=(f==t)?"checked":"";var u=!t.getEnable()?"disabled":"";n.append($("<li>").append($("<input type='radio' id='' name='"+w+"' "+v+" "+u+">").attr({checked:v})).append($("<label>",{"for":"",text:t.getFullName()})).click((function(y){return function(z){if(c.currentLayerSetId!=y){c.setLayerSet(y);
}};})(x))).css({display:"none",zIndex:2});});if(l){o="yolp-layerset-disable";}p.addClass(o);if(q.layersets.length==1){var m=g[q.layersets[0]];var k=q.layersets[0];if(m.getEnable()){p.bind("click",(function(s){return function(t){if(c.currentLayerSetId!=s){c.setLayerSet(s);}};})(k));}}else{if(q.layersets.length>1){p.addClass("dsstr-info");p.append($("<p>",{"class":"dsstr-infopn"}).append($("<img>",{"class":"opn",alt:"\u60c5\u5831\u3092\u958b\u304f",src:"http://i.yimg.jp/images/clear.gif"})));
p.append(n);p.click(function(){if(n.css("display")=="none"){n.show();}else{n.hide();}});}}b.append(p);});}else{for(var i in g){if(!g.hasOwnProperty(i)){continue;}var e=g[i];if(f==e){klass="yolp-layerset-on";}else{if(!e.getEnable()){klass="yolp-layerset-disable";}else{klass="yolp-layerset-off";}}klass+=" "+i;var h=$('<li class="'+klass+'" title="'+e.getFullName()+'\u3078\u5909\u66f4\u3059\u308b" >'+e.getFullName()+"</li>");
if(e.getEnable()){h.bind("click",(function(j){return function(k){if(c.currentLayerSetId!=j){c.setLayerSet(j);}};})(i));}b.append(h);}}}a();this.listeners=[];this.listeners.push(Y.Event.addListener(c,"layersetchanged",function(){a();}));this.listeners.push(Y.Event.addListener(c,"addlayerset",function(){a();}));this.listeners.push(Y.Event.addListener(c,"removelayerset",function(){a();}));this.listeners.push(Y.Event.addListener(c,"layerlistchanged",function(){a();
}));return b;};LayerSetGroupControl.prototype.getDefaultPosition=function(){return new ControlPosition(ControlPosition.TOP_RIGHT,new Size(3,3));};LayerSetGroupControl.prototype.printable=function(){return false;};var GeoSearchHeatmapLayer=Y.GeoSearchHeatmapLayer=Y.extend(Y.ImageTileLayer,function(a){a=a||{};a.opacity=a.opacity||1;a.enableFadeIn=a.enableFadeIn||false;Y.ImageTileLayer.apply(this,["\u30d2\u30fc\u30c8\u30de\u30c3\u30d7","",a]);});GeoSearchHeatmapLayer.prototype.drawHeat=function(b,a){this.query=b;a=a||{};this.draw(true);};GeoSearchHeatmapLayer.prototype.getImageSrc=function(a,c){if(!this.query){return;}var b="http://"+Y.HOST_NAME+"/OpenLocalPlatform/V1/heatmapGeosearch?";
b+="x="+a+"&y="+c+"&z="+this.map.getZoom()+"&p="+encodeURI(this.query);return b;};var GeoSearchLayer=Y.GeoSearchLayer=Y.extend(Y.ListingLayer,function(a){a=a||{};a.url=a.url||"http://"+Y.HOST_NAME+"/OpenLocalPlatform/V1/geoSearch";ListingLayer.apply(this,["GeoSearch",a]);this.dispProperties={Address:"\u4f4f\u6240",Tel:"\u96fb\u8a71\u756a\u53f7",Description:"\u6982\u8981"};this._serviceName="Map";});GeoSearchLayer.prototype.getApiRequest=function(b,a){a=a||{};a.opt=a.opt||{};a.opt.appid=this.getApplicationId();return ListingLayer.prototype.getApiRequest.apply(this,[b,a]);
};GeoSearchLayer.prototype.getApplicationId=Y.Service.getApplicationId;var YolpSearchLayer=Y.YolpSearchLayer=Y.extend(Y.ListingLayer,function(a){a=a||{};this.searchBox=a.searchBox||false;this.cid=a.cid||"";this.info=a.info||"standard";this.noImage=a.noImage||false;this.pageCount=a.pageCount||10;this.noquery="\u540d\u79f0\u30fb\u4f4f\u6240\u306a\u3069\u3092\u5165\u529b";this.fit=(a.fit===undefined)?true:a.fit;this.mixer=false;this.gc=a.gc||"";this.ebisu="132c700e0ebf5a1d386e9b725d7d1e6b";this.y_travel="8024afaf82bcaaa4c33b91deea651df1";
this.getYDFMapping();a.url=a.url||"http://"+Y.HOST_NAME+"/OpenLocalPlatform/V1/yolpsearch";ListingLayer.apply(this,["GeoSearch",a]);this.loadCss();this._serviceName="Map";});YolpSearchLayer.prototype.removeImageMapLayer=function(){if(this.imagelayer){this.imagelayer="";this.mixer=false;this.drawList(this.query,this.options);}};YolpSearchLayer.prototype.setImageMapLayer=function(a,b){var c=this;this.imagelayer=a;
this.mixer=true;if(b){this.drawList(this.query,this.options);}};YolpSearchLayer.prototype.loadCss=function(){var b="http://i.yimg.jp/images/map/yolp/storage_ui/css/preview_20110415.css";var a=$(window.document.body).find("link[href='"+b+"']");if(!a||a.length==0){YOLP.loadCSS(b);}};YolpSearchLayer.prototype.getYDFMapping=function(){var b=this;this.ydfprops=[];var a=this.cid.split(",");$.each(a,function(c,f){f=f.replace(" ","");
var e=new YDFMapping(f);var d=[];e.get({},function(g){if(g.mapping){$.each(g.mapping,function(h,i){d.push({name:i.name,prop:i.tag,path:i.path});});}b.ydfprops[f]=d;});});};YolpSearchLayer.prototype.getApiRequest=function(b,a){a=a||{};a.opt=a.opt||{};a.start=((a.page||1)-1)*this.pageCount+1;a.results=this.pageCount;a.sort=this.sort||"";a.opt.appid=this.getApplicationId();a.detail="full";a.cid=this.cid;
a.output="json";if(this.gc){a.gc=this.gc;}return ListingLayer.prototype.getApiRequest.apply(this,[b,a]);};YolpSearchLayer.prototype.initializeByListing=function(a){a.container.addClass("preview-list");ListingLayer.prototype.initializeByListing(a);};YolpSearchLayer.prototype.execute=function(b,c,a){b.query=b.query.replace(/\u3000/g," ");b.query=b.query.replace(/ +/g," ");b.query=b.query.replace(/ $/,"");
b.query=b.query.replace(/^ /,"");if(b.query==""&&b.research){b.query=this.noquery;}else{b.query=b.query;}var b=b||{};this.drawList(b.query,b,c,a);};YolpSearchLayer.prototype.initialize=function(){FeatureLayer.prototype.initialize.apply(this,arguments);if(!this.map.mainContainer.parent().hasClass("preview-image")){this.map.mainContainer.wrap("<div class='preview-image'></div>");this.map.mainContainer.parent().css({height:"auto"});
}var f=this;$(window).resize(f.adjust);this.drawfirst=true;var f=this;Y.Event.addListener(this,"firstdrawend",function(){if(f.drawfirst){f.drawfirst=false;if(f.fit){f.fitToMap();}}});var c=this.map.getInfoWindow();Y.Event.addListener(c,"close",function(){Y.Log.write("close");});var d=this.map.getLayerSets();for(var e in this.map.getLayerSets()){for(var b in d[e].getLayers()){var a=d[e].getLayers()[b];
if(a instanceof ImageMapMixerLayer){if(a.isInitialized()){this.setImageMapLayer(a);}}}}};YolpSearchLayer.prototype.fitToMap=function(){if(this.ydf&&this.ydf.result.bounds&&!this.ydf.result.bounds.isEmpty()){this.getMap().drawBounds(this.ydf.result.bounds.extendRate(2));var a=this;setTimeout(function(){Y.Event.trigger(a,"drawend");},1000);}else{Y.Event.trigger(this,"drawend");}};YolpSearchLayer.prototype.getCustomIcon=function(b,d){var f="";
if(d.icon&&d.icon.image&&d.icon.image!=Y.Icon.DEFAULT_ICONURL){f=d.icon.image;}else{f="http://i.yimg.jp/images/map/yolp/storage_ui/images/no"+(b>=9?"":"0")+(b+1)+".png";}var c=d.icon.iconSize||new Y.Size(20,20);if(c.width==19&&c.height==26){c=new Y.Size(20,20);}var a=d.icon.iconAnchor||new Y.Anchor(0,0);var e=new Y.Icon(f,{iconSize:c});return e;};YolpSearchLayer.prototype.createSearchBox=function(){var e=this;
var d=$("<div></div>");if(this.searchBox){var c=this.listContainer.width();var a=this.query||this.noquery;var b="black";if(a==this.noquery){b="#aaaaaa";}d.append($("<input type='text' value='"+a+"' class='text' >").css({width:c-150,color:b}).keypress(function(f){if(f.which==13){e.options.query=$(this).parent().find("input").val();e.options.page=1;e.options.research=true;e.execute(e.options);}}).focus(function(){if($(this).val()==e.noquery){$(this).css({color:"black"});
$(this).val("");}}).blur(function(){if($(this).val()==""){$(this).css({color:"#aaaaaa"});$(this).val(e.noquery);}}));d.append($("<input type='button' value='\u691c\u7d22' class='btn'>").click(function(){e.options.query=$(this).parent().find("input").val();e.options.page=1;e.options.research=true;e.execute(e.options);}));d.append($("<p></p>").append($("<img class='tri-red' alt='' src='http://i.yimg.jp/images/clear.gif'>")).append($("<a href='javascript:void(0);'>\u6761\u4ef6\u89e3\u9664</a>").click(function(){e.options.query="";
e.options.page=1;e.options.research=false;e.execute(e.options);})));}return d;};YolpSearchLayer.prototype.draw=function(a){if(this.mixer&&this.features&&this.features.length>0){this.features=this.imagelayer.convertFeatures(this.features,this.imagelayer.mixer,this.imagelayer.imgnode);}Y.FeatureLayer.prototype.draw.apply(this,[a]);};YolpSearchLayer.prototype.drawList=function(c,b,e,a){this.query=c;this.options=$.extend(true,{},b);
Y.Event.trigger(this,"drawstart");this.ydf=null;var d=this;this.abort();this.ajaxRequest=this.search(c,this.options,function(f){d.ydf=d.ydfFilter(f);d.drawYDFToMap(d.ydf);d.drawYDFToList(d.ydf);if(e){e(f);}if(!d.drawfirst){Y.Event.trigger(d,"drawend");Y.Log.write("drawend");}else{Y.Event.trigger(d,"drawend");Y.Event.trigger(d,"firstdrawend");Y.Log.write("firstdrawend");}},function(){if(typeof(a)=="function"){a();
}});return this.ajaxRequest;};YolpSearchLayer.prototype.createHeaderHtml=function(d){if(this.searchBox){var c=$('<div class="search-area"></div>');c.append(this.createSearchBox());}else{c="";}var b=$('<p id="yolp_search_pager" class="page"></p>');if(d.result.total>1){b.append("\u691c\u7d22\u7d50\u679c<span> "+d.result.total+" </span>\u4ef6\u4e2d<span> "+d.result.start+" </span>\uff5e<span> "+(d.result.start+d.result.count-1)+" </span>\u4ef6\u8868\u793a");
}else{if(d.result.total==1){b.append("\u691c\u7d22\u7d50\u679c<span>1</span>\u4ef6\u4e2d<span>1</span>\u4ef6\u8868\u793a");}else{if(this.query==this.noquery){b.append("\u691c\u7d22\u30ad\u30fc\u30ef\u30fc\u30c9\u304c\u5165\u529b\u3055\u308c\u3066\u3044\u307e\u305b\u3093");}else{b.append("\u6761\u4ef6\u306b\u4e00\u81f4\u3059\u308b\u60c5\u5831\u306f\u898b\u3064\u304b\u308a\u307e\u305b\u3093\u3067\u3057\u305f\u3002");}}}var a=$("<div id='yolp_search_header'></div>").append(c).append(b);return a;};YolpSearchLayer.prototype.openInfoWindow=function(a,c){var b={};if(this.isHidden()){this.infoWindow=this.map.openInfoWindow(a.getLatLng(),this.createInfoWindowHtml(a),b);
}else{this.infoWindow=a.openInfoWindow(this.createInfoWindowHtml(a),b);}this.infoWindowFeature=a;if(a.listnode){a.listnode.parent().find("li").removeClass("current");a.listnode.addClass("current");}Y.Event.trigger(this,"infowindowopen",a);};YolpSearchLayer.prototype.createFooterHtml=function(b){var e=$('<div class="pagenav"></div>');if(b.result.total==b.result.count){e.css({height:"22px"});return e;
}var g=this.chunkCount;if((g%2)==0){var k=g/2;var a=g/2-1;}else{var k=g/2-0.5;var a=g/2-0.5;}var h=this.pageCount||10;var j=this.getCurrentPage();var m=this.getTotalPageCount();var f=this;var l=$("<ul></ul>");if(j>1){l.append($("<li class='prev'></li>").append($("<a href='javascript:void(0);'>\u524d\u3078</a>").click(function(){f.drawPage(j-1);})));}else{l.append($("<li class='prev'></li>").append("\u524d\u3078"));}if(j<m){l.append($("<li class='next'></li>").append($("<a href='javascript:void(0);'>\u6b21\u3078</a>").click(function(){f.drawPage(j+1);
})));}else{l.append($("<li class='next'></li>").append("\u6b21\u3078"));}e.append(l);var c=$("<p></p>");if(this.chunk&&this.chunkCount>0){if(j<=a||m<=g){for(var d=1;d<=m&&d<=g;d++){if(j==d){c.append("<span class='select'>"+d+"</span>");}else{c.append($("<a rel='"+d+"' href='javascript:void(0);'>"+d+"</a> ").bind("click",{num:d},function(i){f.drawPage(i.data.num);}));}}}else{if(j>m-k){for(var d=m-g+1;d<=m;d++){if(j==d){c.append("<span class='select'>"+d+"</span>");
}else{c.append($("<a rel='"+d+"' href='javascript:void(0);'>"+d+"</a>").bind("click",{num:d},function(i){f.drawPage(i.data.num);}));}}}else{for(var d=j-a;d<=j+k;d++){if(j==d){c.append("<span class='select'>"+d+"</span>");}else{c.append($("<a rel='"+d+"' href='javascript:void(0);'>"+d+"</a>").bind("click",{num:d},function(i){f.drawPage(i.data.num);}));}}}}}e.append(c);return e;};YolpSearchLayer.prototype.createResultHtml=function(d,c,a){var b=$('<div class="list-area" ></div>');
b.css({height:"auto"});b.append(this.createHeaderHtml(d,c,a));b.append(this.createHeaderAdHtml(d,c,a));b.append(this.createListHtml(d,c,a));b.append(this.createFooterAdHtml(d,c,a));b.append(this.createFooterHtml(d,c,a));return b;};YolpSearchLayer.prototype.createListHtml=function(a,h,l){var d=$('<div class="list" ></div>');var b=this.listContainer.parent().css("height").replace("px","");var k=$("#yolp_search_header").height()||75;
var j=$("#yolp_search_pager").height()||22;d.css({height:(b-(k+j+1))+"px"});var g=$("<ul></ul>");for(var c=0;c<a.result.count;c++){var e=a.features[c];g.append(this.createItemHtml(c,e));if(c>this.maxListCount-2){break;}}d.append(g);return d;};YolpSearchLayer.prototype.createItemHtml=function(i,l){if(!l){return"";}if(!l.name){return"";}var g=new YolpSearchInfoBuilder(l);var d="";var h=this;var f=$("<li></li>");
if(l.property.ListDescription){f.append(Util.stripScript(l.property.ListDescription));var a=f;}else{var k="";if(l.icon&&l.icon.image&&l.icon.image!=Y.Icon.DEFAULT_ICONURL){k=l.icon.image;}else{k="http://i.yimg.jp/images/map/yolp/storage_ui/images/no"+(i>=9?"":"0")+(i+1)+".png";}var e=l.icon.iconSize;var b=$('<img alt="" src="'+k+'" />').css({width:e.x+"px"});f.append(b);var j=$("<dl></dl>");var a=$("<dt></dt>");
var c=$("<dd></dd>");a.append($("<a href='javascript:void(0);'></a>").append(l.name)).append($("<a class='btn' href='javascript:void(0);'>\u8a73\u7d30</a>").click(function(m){h.openInfoWindow(l,false);h.showDetail(l);m.stopPropagation();}));j.append(a);if(this.info!="simple"){if(this.noImage!=true){if((image=g.getImageInfo())){if(image&&image[1]&&image[1].Url){j.append($("<dd class='ph'></dd>").append($("<img>").css({width:74}).load(function(){h.resizeImage(this,74,63);
}).attr({src:image[1].Url}).click((function(m){return function(){if(m[1].LinkUrl){h.sendUrl(m[1].LinkUrl);}else{h.showImage(l.name,m[1].Title||"",m[1].Url,m[1].Caption||"");}};})(image))));}}}if((d=g.getAddressInfo())!=""){j.append($("<dd></dd>").append(d));}if((d=g.getTelInfo())!=""){j.append($("<dd></dd>").append(d));}if((d=g.getNearStationInfo())!=""){j.append($("<dd></dd>").append(d));}}j.append(c);
f.append(j);}var h=this;if(h.map){j.bind("click",function(){h.openInfoWindow(l,false);});j.bind("mouseover",function(){l.focus();});j.bind("mouseout",function(){l.blur();});j.css("cursor","pointer");}l.listnode=f;return f;};YolpSearchLayer.prototype.createInfoWindowMaxContentHtml=function(b){var a=this.createInfoWindowHtml(b);a.find(".yolplayer-detail").remove();return a;};YolpSearchLayer.prototype.createInfoWindowHtml=function(d){var f=this;
var a=new YolpSearchInfoBuilder(d);var e="";var c=$("<div class='fkdsh'></div>");var b=$("<dl></dl>");if(this.noImage==true){b.css("padding-right","0px");}c.append(b);b.append($("<dt></dt>").append(d.name));if((e=a.getAddressInfo())!=""){b.append($("<dd></dd>").append(e));}if((e=a.getTelInfo())!=""){b.append($("<dd></dd>").append(e));}if((e=a.getNearStationInfo())!=""){b.append($("<dd></dd>").append(e));
}if(this.noImage!=true){if((image=a.getImageInfo())){if(image&&image[1]&&image[1].Url){b.append($("<dd class='ph'></dd>").append($("<img>").css({width:105}).load(function(){f.resizeImage(this,105,90);}).attr({src:image[1].Url})));}}}b.append($("<dd class='lnk'></dd>").append($("<img class='tri-red' src='http://i.yimg.jp/images/clear.gif'>")).append($("<a href='javascript:void(0);'>\u8a73\u7d30\u3092\u898b\u308b</a>").click(function(){f.showDetail(d);
})));return c;};YolpSearchLayer.prototype.closeImage=function(){if(this.imagebox){this.imagebox.hide();if(this.detailshow){this.detailback.css({zIndex:10000});}else{this.detailback.hide();}}};YolpSearchLayer.prototype.createDetailBack=function(){this.detailback=$('<div style="background: none repeat scroll 0% 0% rgb(0, 0, 0); width: 100%; height: 100%; position: absolute; top: 0pt; left: 0pt; z-index: 10000;"></div>');
this.detailback.css({opacity:0.5,width:"100%",height:$(document).height()});var a=this;this.detailback.click(function(){if($(this).css("z-index")==10002){a.closeImage();}else{a.closeDetail();}});};YolpSearchLayer.prototype.showImage=function(a,i,b,f){var g=this;if(!this.imagebox){this.imagebox=$("<div class='point-photo'></div>").click(function(){g.closeImage();});$(window.document.body).prepend(this.imagebox);
}if(!this.detailback){this.createDetailBack();$(window.document.body).append(this.detailback);}var c=($(window).width()-520)/2;this.imagebox.html("");var d=$("<div class='innr'></div>").click(function(k){k.stopPropagation();}).css({marginLeft:c});this.imagebox.append(d);d.append($("<div class='ttl'></div>").append($("<h3>"+a+"</h3>")).append($("<p class='close'></p>").append($("<a href='javascript:void(0);'>\u9589\u3058\u308b</a>").click(function(){g.closeImage();
}))));var j=$("<div class='contents'></div>");d.append(j);var e=$("<dl></dl>");j.append(e);e.append($("<dt>"+i+"</dt>"));e.append($("<dd class='ph'></dd>").append($("<img src='"+b+"' width='500px'>").load(function(){g.resizeImage(this,500,500);})));e.append($("<dd class='txt'></dd>").append(f));var h=($(window).height()-420)/2;this.imagebox.css({top:$(document).scrollTop()+h,zIndex:10003});this.imagebox.show();
this.detailback.css({zIndex:10002});this.detailback.show();};YolpSearchLayer.prototype.closeDetail=function(){this.detailbox.hide();this.detailback.hide();this.detailshow=false;};YolpSearchLayer.prototype.showDetail=function(a){var e=this;if(!this.detailbox){this.detailbox=$("<div class='point-detail'></div>").click(function(){e.closeDetail();}).css({zIndex:"10001",fontSize:"smaller"});$(window.document.body).prepend(this.detailbox);
}if(!this.detailback){this.createDetailBack();$(window.document.body).append(this.detailback);}var d=($(window).width()-940)/2;var c=$("<div class='point-detail-innr'></div>").click(function(f){f.stopPropagation();}).css({marginLeft:d});c.append($("<div class='ttl'></div>").append($("<h3>"+a.name+"</h3>")).append($("<p class='close'></p>").append($("<a href='javascript:void(0);'>\u9589\u3058\u308b</a>").click(function(){e.closeDetail();
}))));var b=$("<div class='contents'></div>");b.append(this.commonInfo(a)).append(this.navigationtab(a));this.detailnode=this.getDetailNode(a,"common");b.append(this.detailnode);c.append(b);this.detailbox.html("");this.detailbox.append(c);this.detailbox.css({top:$(document).scrollTop()+50});this.detailbox.show();this.detailback.css({zIndex:10000});this.detailback.show();this.detailshow=true;this.adjust();
};YolpSearchLayer.prototype.getDetailNode=function(a,b){var c;this.detailnodes=[];if(!this.detailnodes[b]){switch(b){case"common":c=this.detailInfo(a);break;case"image":c=this.imageInfo(a);break;case"menu":c=this.menuInfo(a);break;case"room":c=this.roomInfo(a);break;case"review":c=this.reviewInfo(a);break;default:c=this.detailInfo(a);break;}this.detailnodes[b]=c;}else{c=this.detailnodes[b];}return c;
};YolpSearchLayer.prototype.navigationtab=function(d){var g=this;var e=$("<div>",{"class":"nav"});var f="common";var c={common:"\u6982\u8981"};var a=new YolpSearchInfoBuilder(d);if(a.getImageInfo()){c.image="\u753b\u50cf";}if(a.getMenuInfo()&&this.cid!=this.ebisu){c.menu="\u5546\u54c1\u3001\u30e1\u30cb\u30e5\u30fc\u3001\u30d7\u30e9\u30f3";}if(a.getRoomInfo()){c.room="\u90e8\u5c4b\u60c5\u5831";}var b=$("<ul>");$.each(c,function(i,j){var h=$("<li>");if(i==f){h.addClass("current");}if(i=="review"){h.addClass("none");
}h.append($("<a>",{text:j,href:"javascript:void(0);"}));h.click((function(k){return function(){b.find("li").removeClass("current");$(this).addClass("current");g.detailnode.html(g.getDetailNode(d,k));g.adjust();};})(i));b.append(h);});e.append(b);return e;};YolpSearchLayer.prototype.commonInfo=function(c){var a=new YolpSearchInfoBuilder(c);var g="";var e=$("<div class='box01' id='commonbox'></div>");
var h=this;if((image=a.getImageInfo())!=""){if(image[1]&&image[1].Url&&image[1].Url!=""){e.append($("<p class='ph'></p>").append($("<img>").css({width:155}).click(function(){if(image[1].LinkUrl){h.sendUrl(image[1].LinkUrl);}else{h.showImage(c.name,image[1].Title||"",image[1].Url,image[1].Caption||"");}}).load(function(){h.resizeImage(this,155,103);}).css({cursor:"pointer",width:"155"}).attr("src",image[1].Url||"")));
}else{e.append($("<p class='ph'></p>").append($("<img src='http://i.yimg.jp/images/map/yolp/storage_ui/images/noimage_103x155.png'>")));}}else{e.append($("<p class='ph'></p>").append($("<img src='http://i.yimg.jp/images/map/yolp/storage_ui/images/noimage_103x155.png'>")));}var b=$("<div></div>");e.append(b);var d="";if((g=a.getZipInfo())!=""){d="\u3012"+g+"\u3000";}if((g=a.getAddressInfo())!=""){b.append($("<p></p>").append(d+g));
}if((g=a.getTelInfo())!=""){b.append($("<p></p>").append(g));}if((g=a.getAccessInfo())!=""){b.append($("<p></p>").append(g));}else{if((g=a.getNearStationInfo())!=""){b.append($("<p></p>").append(g));}}if((g=a.getCategoryInfo())!=""){b.append($("<p class='list'></p>").append($("<span>\u30b8\u30e3\u30f3\u30eb\uff1a</span>")).append(g.replace(/"/g,"")));}var f="";if((g=a.getPropInfo("ReviewUrl"))!=""){f=$("<a href='"+g+"'>\u30af\u30c1\u30b3\u30df\u3092\u898b\u308b</a>");
}if((g=a.getRatingInfo())!=""){b.append($("<p class='list'></p>").append($("<span>\u8a55\u4fa1\uff1a</span>")).append($("<span class='rate"+g.star+"'>"+g.data+"</span>")).append($("<span class='rate'>\uff08"+g.data+"\u70b9/100\u70b9\u6e80\u70b9\u4e2d\uff09</span>")).append(f));}else{if(f!=""){b.append($("<p class='list'></p>").append(f));}}return e;};YolpSearchLayer.prototype.imageInfo=function(d){var h=this;var b=new YolpSearchInfoBuilder(d);var g="";
var f=$("<div class='box02' id='imageinfo'></div>");var a=$("<div class='innr' id='yolp_search_detail_innr'></div>");f.append(a);var e=$("<div>");if((image=b.getImageInfo())){e.append($("<h4>",{"class":"ttl",html:"\u753b\u50cf"}));var c=$("<ul>");$.each(image,function(j,k){if(!k){return;}if(k.Url&&k.Url!=""){var i=$("<li></li>").append($("<p>",{"class":"ph"}).append($("<img>").css({width:121}).load(function(){h.resizeImage(this,121,81);
}).attr({alt:k.Caption||"",src:k.Url}).click(function(){if(k.LinkUrl){h.sendUrl(k.LinkUrl);}else{h.showImage(d.name,k.Title||"",k.Url,k.Caption||"");}}).css({cursor:"pointer"})).append($("<p>",{"class":"sttl",text:k.Title})).append($("<p>",{"class":"txt",text:k.Caption})));c.append(i);}});e.append($("<div>",{"class":"photoList01"}).append(c));}a.append(e);return f;};YolpSearchLayer.prototype.menuInfo=function(h){var d=this;
var c=new YolpSearchInfoBuilder(h);var a="";var b=$("<div class='box02' id='imageinfo'></div>");var i=$("<div class='innr' id='yolp_search_detail_innr'></div>");b.append(i);var f=$("<div>");if((menu=c.getMenuInfo())){var g=$("<div>",{"class":"menuArea"});$.each(menu,function(k,n){if(!n){return;}var j=$("<dl>",{"class":"content"});var l=$("<dd>",{"class":"summary"});var m=$("<dd>",{"class":"detail"});
if(n.Item){j.append($("<dt>",{"class":"ttl",text:n.Item}));}else{if(n.ItemCatchCopy){j.append($("<dt>",{"class":"ttl",text:n.ItemCatchCopy}));}}if(n.ItemCatchCopy||n.ItemDescription){j.append(l);}if(n.ItemCatchCopy&&n.Item){l.append($("<p/>",{"class":"sttl",text:n.ItemCatchCopy}));}if(n.ItemDescription){l.append($("<p/>",{"class":"txt",html:n.ItemDescription}));}if(n.ItemPrice){m.append($("<p/>",{"class":"dl",text:n.ItemPrice}).prepend($("<span/>",{text:"\u6599\u91d1\uff1a"})));
}if(n.ItemBenefit){m.append($("<p/>",{"class":"dl",text:n.ItemBenefit}).prepend($("<span/>",{text:"\u7279\u5178\uff1a"})));}if(n.ItemPeopleNumber){m.append($("<p/>",{"class":"dl",text:n.ItemPeopleNumber}).prepend($("<span/>",{text:"\u30d7\u30e9\u30f3\u4eba\u6570\uff1a"})));}if(n.ItemStartDay){m.append($("<p/>",{"class":"dl",text:n.ItemStartDay}).prepend($("<span/>",{text:"\u30d7\u30e9\u30f3\u958b\u59cb\u65e5\uff1a"})));}if(n.ItemEndDay){m.append($("<p/>",{"class":"dl",text:n.ItemEndDay}).prepend($("<span/>",{text:"\u30d7\u30e9\u30f3\u7d42\u4e86\u65e5\uff1a"})));
}if(n.ItemUrl){m.append($("<p/>",{"class":"dl",html:"<a href='"+n.ItemUrl+"'>"+n.ItemUrl+"</a>"}).prepend($("<span/>",{text:"URL\uff1a"})));}if(m.html()!=""){j.append(m);}if(j.html()!=""){g.append(j);}});if(g.html()!=""){f.append($("<h4>",{"class":"ttl",html:"\u5546\u54c1\u3001\u30e1\u30cb\u30e5\u30fc\u3001\u30d7\u30e9\u30f3"}));f.append(g);}var e=$("<ul>");$.each(menu,function(k,l){if(!l){return;}var j=$("<li>");if(l.ItemImage){j.append($("<p/>",{"class":"ph"}).append($("<img>",{alt:"",css:{width:89,cursor:"pointer"},src:l.ItemImage,load:function(){d.resizeImage(this,89,61);
},click:function(){if(l.ItemImageUrl&&l.ItemImageUrl!=""){d.sendUrl(l.ItemImageUrl);}else{d.showImage(h.name,l.ItemImageTitle||"",l.ItemImage,l.ItemImageCaption||"");}}})));}if(l.ItemImageTitle||l.ItemImageCaption){j.append($("<div/>").append($("<p/>",{"class":"txt01",text:l.ItemImageTitle})).append($("<p/>",{"class":"txt02",text:l.ItemImageCaption})));}if(j.html()!=""){e.append(j);}});f.append($("<div>",{"class":"photoList01"}).append(e));
}i.append(f);return b;};YolpSearchLayer.prototype.roomInfo=function(h){var g=this;var f=new YolpSearchInfoBuilder(h);var b="";var e=$("<div class='box02' id='detailinfo'></div>");var i=$("<div class='innr' id='yolp_search_detail_innr'></div>");e.append(i);var c=$("<div>");if((room=f.getRoomInfo())){var d=$("<div>",{"class":"roomArea"});$.each(room,function(k,m){if(!m){return;}var j=$("<dl>",{"class":"content"});
var l=$("<dd>",{"class":"detail"});if(m.RoomName){j.append($("<dt>",{"class":"ttl",text:m.RoomName}));}if(m.RoomDescription){j.append($("<dd>",{"class":"summary"}).append($("<p>",{"class":"txt",html:m.RoomDescription})));}if(m.RoomType){l.append($("<p/>",{"class":"dl",text:m.RoomType}).prepend($("<sapn/>",{text:"\u90e8\u5c4b\u30bf\u30a4\u30d7\uff1a"})));}if(l.html()!=""){j.append(l);}if(j.html()!=""){d.append(j);}});if(d.html()!=""){c.append($("<h4>",{"class":"ttl",html:"\u5ba2\u5ba4\u60c5\u5831"}));
c.append(d);}var a=$("<ul>");$.each(room,function(k,l){if(!l){return;}var j=$("<li>");if(l.RoomImage){j.append($("<p/>",{"class":"ph"}).append($("<img>",{alt:"",css:{width:89,cursor:"pointer"},src:l.RoomImage,load:function(){g.resizeImage(this,89,61);},click:function(){if(l.RoomImageUrl&&l.RoomImageUrl!=""){g.sendUrl(l.RoomImageUrl);}else{g.showImage(h.name,l.RoomImageTitle||"",l.RoomImage,l.RoomImageCaption||"");
}}})));}if(l.RoomImageTitle||l.RoomImageCaption){j.append($("<div/>").append($("<p/>",{"class":"txt01",text:l.RoomImageTitle})).append($("<p/>",{"class":"txt02",text:l.RoomImageCaption})));}if(j.html()!=""){a.append(j);}});c.append($("<div>",{"class":"photoList01"}).append(a));}i.append(c);return e;};YolpSearchLayer.prototype.detailInfo=function(e){var k=this;var j=new YolpSearchInfoBuilder(e);var o="";
var g=$("<div class='box02' id='detailinfo'></div>");var c=$("<div class='innr' id='yolp_search_detail_innr'></div>");g.append(c);var m=$("<div>");if((o=j.getCatchCopyInfo())!=""){m.append($("<h4>",{"class":"ttl",html:o}));}if((o=j.getDescriptionInfo())!=""){m.append($("<div>",{"class":"textArea"}).append($("<p>",{html:o})));}c.append(m);var r=$("<div>");if((business=j.getBusinessInfo(this.cid!=this.ebisu?"detail":"simple"))!=""){var n="";
$.each(business,function(t,u){n+=u+"<br>";});r.append($("<h4>",{"class":"ttl",html:"\u55b6\u696d\u6642\u9593"}));r.append($("<div>",{"class":"textArea"}).append($("<p>",{html:n})));}c.append(r);var h=$("<div>");if((o=j.getHolidayInfo())!=""){h.append($("<h4>",{"class":"ttl",html:"\u5b9a\u4f11\u65e5"}));h.append($("<div>",{"class":"textArea"}).append($("<p>",{html:o})));}c.append(h);var a=$("<div>");if((o=j.getPcUrlInfo())){if(o.length>0){a.append($("<h4>",{"class":"ttl",html:"\u8a73\u7d30\u30da\u30fc\u30b8\uff08PC\uff09URL"}));
}$.each(o,function(t,u){if(!u){return;}if(u.Url){if(u.Image){a.append($("<div>",{"class":"textArea"}).append($("<p>").append($("<img src='"+u.Image+"' alt='"+u.Url+"'>").click(function(){k.sendUrl(u.Url);}).css({cursor:"pointer"}))));}else{a.append($("<div>",{"class":"textArea"}).append($("<p>").append($("<a href='javascript:void(0);'>"+u.Url+"</a>").click(function(){k.sendUrl(u.Url);}))));}}});}c.append(a);
var d=$("<div>");if((o=j.getCouponInfo())){var q=$("<div>",{"class":"roomArea"});$.each(o,function(u,w){if(!w){return;}var t=$("<dl>",{"class":"content"});var v=$("<dd>",{"class":"detail"});if(w.Name){t.append($("<dt>",{"class":"ttl",text:w.Name}));}if(w.Comment){t.append($("<dd>",{"class":"summary"}).append($("<p>",{"class":"txt",html:w.Comment})));}if(w.StartDay){v.append($("<p/>",{"class":"dl",text:w.StartDay}).prepend($("<sapn/>",{text:"\u958b\u59cb\u65e5\uff1a"})));
}if(w.EndDay){v.append($("<p/>",{"class":"dl",text:w.EndDay}).prepend($("<sapn/>",{text:"\u7d42\u4e86\u65e5\uff1a"})));}if(v.html()!=""){t.append(v);}if(t.html()!=""){q.append(t);}});if(q.html()!=""){d.append($("<h4>",{"class":"ttl",html:"\u30af\u30fc\u30dd\u30f3"}));d.append(q);}}c.append(d);var f=e.property.CassetteId;var i=this.ydfprops[f];var l="";$.each(i,function(t,v){if(v.path.match("Ppc")){v.name="\u4e88\u7d04\u5c02\u7528\u756a\u53f7";}if((o=j.getPropInfo(v.path))!=""){o=j.wrapLink(o);
if(l!=v.name){var u=$("<div>");u.append($("<h4>",{"class":"ttl",html:v.name})).append($("<div>",{"class":"textArea"}).append($("<p>").append(o)));c.append(u);prevdl=u;}else{prevdl.append($("<div>",{"class":"textArea"}).append($("<p>").append(o)));}l=v.name;}});var b=$("<dl></dl>");if((o=j.getSmokingInfo())!=""){b.append($("<h4>",{"class":"ttl",html:"\u55ab\u7159\u30fb\u7981\u7159\u30fb\u5206\u7159"}));b.append($("<div>",{"class":"textArea"}).append($("<p>").append(o)));
}c.append(b);var s=$("<dl></dl>");if((o=j.getFlagInfo(i))!=""){s.append($("<h4>",{"class":"ttl",html:"\u305d\u306e\u4ed6\u306e\u60c5\u5831"}));s.append($("<div>",{"class":"textArea"}).append($("<p>").append(o)));}c.append(s);var p=new Date();if((copyright=j.getCopyrightInfo())!=""){c.append($("<div class='copyright'></div>").append($("<div>").append($("<p>"+copyright+"</p>"))));}return g;};YolpSearchLayer.prototype.adjust=function(){var c=$(window).height();
var b=$(window).width();var d=$("#commonbox").height();var a=c-d-200;if(a<150){a=150;}$("#yolp_search_detail_innr").css({height:a+"px"});var f=(c-420)/2;$(".point-photo").css({top:$(document).scrollTop()+f});var e=(b-520)/2;$(".point-photo .innr").css({marginLeft:e});var e=(b-940)/2;$("div .point-detail-innr").css({marginLeft:e});};YolpSearchLayer.prototype.remove=function(){var a=this;$(window).unbind("resize",a.adjust);
ListingLayer.prototype.remove.apply(this);};YolpSearchLayer.prototype.getImageNaturalSize=function(e){var a=e.width,b=e.height;if(typeof e.naturalWidth!=="undefined"){a=e.naturalWidth;b=e.naturalHeight;}else{if(typeof e.runtimeStyle!=="undefined"){var d=e.runtimeStyle;var c={w:d.width,h:d.height};d.width="auto";d.height="auto";a=e.width;b=e.height;d.width=c.w;d.height=c.h;}else{var c={w:e.width,h:e.height};
e.removeAttribute("width");e.removeAttribute("height");a=e.width;b=e.height;e.width=c.w;e.height=c.h;}}return{width:a,height:b};};YolpSearchLayer.prototype.resizeImage=function(f,b,l){var a=l/b;var m=this.getImageNaturalSize(f);if(m.width<=0||m.heigth<=0){return;}var d=m.height;var c=m.width;var e=d/c;var k=l;var i=b;var j=0;var h=0;if(a>e){var g=b/c;if(g>1){g=1;}i=c*g;k=d*g;h=(l-k)/2;}else{var g=l/d;
if(g>1){g=1;}i=c*g;k=d*g;j=(b-i)/2;}$(f).css("width",i+"px");$(f).css("height",k+"px");};YolpSearchLayer.prototype.sendUrl=function(a){window.open(a,"_ydmtl");};var YolpSearchInfoBuilder=Y.YolpSearchInfoBuilder=function(b,a){this.feature=b;this.options=a;this.setForbiddenProp();this.setEbisuProp();this.setYTravelProp();this.ebisu="4e7027c0f23b6a0c9d493edf6a37f12e";this.y_travel="8024afaf82bcaaa4c33b91deea651df1";
this.mycid=b.property.CassetteId;};YolpSearchInfoBuilder.prototype.setEbisuProp=function(){this.ebisu_props=["Name","PrefName","BusinessHour","CatchCopy","CreditcardFlag","Capacity","PrivateDiningFlag","Reservation","CharterFlag","ParkingFlag","Ppc","BanquestFlag","FriendsFlag","DatingFlag","EntertainFlag","MatchmakingPartyFlag","LadysPartyFlag","FamilyFlag","YourselfFlag","SmallGroupsFlag","ChildFriendlyFlag","PetFlag","BirthdayFlag","WeddingAnniversaryFlag","BuddhistMemorialServiceFlag","MemorialDayFlag","NightSceneFlag","GoodViewFlag","EkichikaFlag","EkinakaFlag","CreditCardsAMEXFlag","CreditCardsVISAFlag","CreditCardsJCBFlag","CreditCardsDinersFlag","CreditCardsDCFlag","CreditCardsUCFlag","CreditCardsUFJFlag","CreditCardsNICOSFlag","CreditCardsMasterFlag","CreditCardsSaisonFlag","CreditCardsOtherFlag"];
};YolpSearchInfoBuilder.prototype.setYTravelProp=function(){this.ytravel_props=["Address","Tel","CatchCopy","Access","HotelType","PriceRange","ReviewUrl","PoolFlag","Parking","OnsenFlag","RotenburoFlag","CharteredBathFlag","KonyokuRotenFlag","BigCommonBathFlag","SaunaFlag","FreePickUpFlag","StationFiveMinutesFlag","Limousine","InternetConnectionFlag","DialupConnectionFlag","WirelessLanConnectionFlag","LanConnectionFlag","RentalPcFlag","InternetConnectionFree","Image","AccessUrl","ParkingComment","PickUpComment","PcUrl"];
};YolpSearchInfoBuilder.prototype.setForbiddenProp=function(){this.forbidden_props=["Id","CatchCopy","CassetteId","Copyright","Access","Address","AddressMatchingLevel","DisplayAddress","DisplayAccess","ReferenceTel","Tel","ZipCode","Yomi","NameKatakana","Coordinates","LogoImage","EnablePc","EnableMobile","LeadImage","Image","ImageTitle","ImageCaption","ItemUrl","ItemCatchCopy","ItemDescription","ItemPrice","ItemBenefit","ItemPeopleNumber","ItemImageUrl","ItemImageHeight","ItemImageWidth","ItemImage","ItemImageTitle","ItemImageCaption","Item","ItemStartDay","ItemEndDay","RoomName","RoomDescription","RoomImageTitle","RoomImage","RoomImageUrl","RoomImageCaption","RoomType","ClickRate","Score","PublishStart","PublishEnd","Licence","StorageUrl","Uid","Gid","GovermentCode","AddressElement","ZenrinCode","AddressLevel","Acl","Accuracy","ContentProviderId","ContentProviderName","ContentProviderType","CompanyCode","CategoryCode","CityId","AddressCode","PrefCode","CityCode","NameHiragana","EventNameHiragana","Quate","PrefName","PrefNameRoma","AddressItem","Altitude","MapScale","MapType","MapMeshCode","LocationId","TelPayment","CouponMobileFlag","CouponDisplayFlag","DisplayMobileFlag","DisplayMediaType","AuxiliaryServiceCode","TelTape","AliasName","Tags","PcUrlRelative","PcUrlImage","PcUrl","UpdateFlag","RatingTotal","ReviewPostFlag","Priority","PriceId","OilTypeId","PriceVerifiedTime","MakerId","TwoThumbFlag","OnlineReserveFlag","GasStopOption","ShopStatus","Item","ItemImageUrl","AdultFlag","BusinessHour","MondayBusinessHour","TuesdayBusinessHour","WednesdayBusinessHour","ThursdayBusinessHour","FridayBusinessHour","SaturdayBusinessHour","SundayBusinessHour","HolidayBusinessHour","DayBeforeHolidayBusinessHour"];
};YolpSearchInfoBuilder.prototype.wrapLink=function(b){var a=b.match("^(http|ftp)://.+$");if(typeof(b)=="string"&&a&&a[0]){b="<a href='"+b+"'>"+b+"</a>";}return b;};YolpSearchInfoBuilder.prototype.getSmokingInfo=function(){var a="";if(this.feature.property.Detail){if(this.feature.property.Detail.SmokingFlag){a+="\u55ab\u7159\u5e2d\u6709";}if(this.feature.property.Detail.NonSmokingFlag){if(a!=""){a+="\u3001";}a+="\u7981\u7159\u5e2d\u6709";}if(this.feature.property.Detail.SmokingFlag){if(a!=""){a+="\u3001";
}a+="\u5206\u7159";}}return a;};YolpSearchInfoBuilder.prototype.getFlagInfo=function(b){var d=this;var a="";if(this.feature.property.Detail&&typeof(this.feature.property.Detail)!="string"){var c=this.feature.property.Detail.CassetteId;$.each(this.feature.property.Detail,function(f,g){var e=false;if(c==d.ebisu){e=true;$.each(d.ebisu_props,function(h,i){if(i==f){e=false;}});}if(this.mycid==d.y_travel){e=true;$.each(d.ytravel_props,function(i,h){if(h==f){e=false;
}});}if(f.match(/Flag$/)&&(g==1||g=="true")&&!e){$.each(b,function(h,i){if(i.prop==f){a+=i.name+", ";}});}});}a=a.replace(/, $/,"");return a;};YolpSearchInfoBuilder.prototype.getPropInfo=function(d){var e="";d=d.replace("$.Feature.Property.","");var g=false;if(d.match("Detail.")){d=d.replace("Detail.","");g=true;}var b="";if(d.match(/([0-9]+)$/)){b=RegExp.$1;d=d.replace(/[0-9]+$/,"");}if(d.match(/\[([0-9]+)\]$/)){b=RegExp.$1;
d=d.replace(/\[[0-9]+\]$/,"");}var c=false;$.each(this.forbidden_props,function(j,k){if(k==d){c=true;}});var h=this.feature.property.Detail.CassetteId;if(h==this.ebisu){var f=false;$.each(this.ebisu_props,function(j,k){if(k==d){f=true;}});if(!f){c=true;}}if(this.mycid==this.y_travel){var a=false;$.each(this.ytravel_props,function(j,k){if(k==d){a=true;}});if(!a){c=true;}}if(d.match(/.*Flag$/)){c=true;
}if(c){return"";}var i=this.feature.property;if(g){i=this.feature.property.Detail;}if(i[d]&&typeof(i[d])=="string"){e=i[d];}else{if(b!=""&&i[d]&&i[d][b]){e=i[d][b];}else{if(i[d+b]&&typeof(i[d+b])=="string"){e=i[d+b];}else{e="";}}}if(this.mycid==this.y_travel){if(e=="false"){e="\u00d7";}else{if(e=="true"){e="\u25cb";}}}if(d=="Reservation"){switch(e){case"1":e="\u4e88\u7d04\u53ef\u80fd";break;case"2":e="\u8981\u4e88\u7d04";break;case"3":e="\u4e88\u7d04\u4e0d\u53ef";
break;}}if(d=="Smoking"){switch(e){case"0":e="\u5b8c\u5168\u7981\u7159";break;case"1":e="\u5206\u7159";break;case"2":e="\u5168\u9762\u55ab\u7159\u53ef";break;}}if(d.match(/.*Image/)&&e!=""){e="<img src='"+e+"'>";}return this.convertBr(e);};YolpSearchInfoBuilder.prototype.getCopyrightInfo=function(){if(this.feature.property.Detail&&this.feature.property.Detail.Copyright){return this.feature.property.Detail.Copyright;}return"";};YolpSearchInfoBuilder.prototype.getBusinessInfo=function(b){var a=[];
if(this.feature.property.Detail&&this.feature.property.Detail.BusinessHour){a.push(this.convertBr(this.feature.property.Detail.BusinessHour));}if(b=="detail"){if(this.feature.property.MondayBusinessHour){a.push("[\u6708]"+this.feature.property.MondayBusinessHour);}if(this.feature.property.TuesdayBusinessHour){a.push("[\u706b]"+this.feature.property.TuesdayBusinessHour);}if(this.feature.property.WednesdayBusinessHour){a.push("[\u6c34]"+this.feature.property.WednesdayBusinessHour);
}if(this.feature.property.ThursdayBusinessHour){a.push("[\u6728]"+this.feature.property.ThursdayBusinessHour);}if(this.feature.property.FridayBusinessHour){a.push("[\u91d1]"+this.feature.property.FridayBusinessHour);}if(this.feature.property.SaturdayBusinessHour){a.push("[\u571f]"+this.feature.property.SaturdayBusinessHour);}if(this.feature.property.SundayBusinessHour){a.push("[\u65e5]"+this.feature.property.SundayBusinessHour);
}if(this.feature.property.HolidayBusinessHour){a.push("[\u795d\u65e5]"+this.feature.property.HolidayBusinessHour);}if(this.feature.property.DayBeforeHolidayBusinessHour){a.push("[\u795d\u524d\u65e5]"+this.feature.property.DayBeforeHolidayBusinessHour);}}return a;};YolpSearchInfoBuilder.prototype.getRoomInfo=function(){var b=[];var a=["RoomName","RoomDescription","RoomImageTitle","RoomImage","RoomImageUrl","RoomImageCaption","RoomType"];
var c=this;if(this.feature.property.Detail&&typeof(this.feature.property.Detail)!="string"){$.each(this.feature.property.Detail,function(d,e){$.each(a,function(f,h){var i=new RegExp("^"+h+"([0-9]+)$");if(d.match(i)){var g=RegExp.$1;if(e&&e!=""){b[g]=b[g]||{};b[g][h]=c.convertBr(e);}}});});}if(b.length>0){return b;}return"";};YolpSearchInfoBuilder.prototype.getCouponInfo=function(){var b=[];var a=this;
if(this.feature.property.Coupon&&typeof(this.feature.property.Coupon)!="string"){$.each(this.feature.property.Coupon,function(c,d){a.feature.property.Coupon[c].Comment=a.convertBr(d.Comment);});return this.feature.property.Coupon;}return false;};YolpSearchInfoBuilder.prototype.getMenuInfo=function(){var b=[];var a=["Item","ItemCatchCopy","ItemDescription","ItemImageTitle","ItemImage","ItemImageUrl","ItemImageHeight","ItemImageWidth","ItemImageCaption","ItemPrice","ItemBenefit","ItemPeopleNumber","ItemUrl","ItemStartDay","ItemEndDay"];
var c=this;if(this.feature.property.Detail&&typeof(this.feature.property.Detail)!="string"){$.each(this.feature.property.Detail,function(d,e){$.each(a,function(f,h){var i=new RegExp("^"+h+"([0-9]+)$");if(d.match(i)){var g=RegExp.$1;if(e&&e!=""){b[g]=b[g]||{};b[g][h]=c.convertBr(e);}}});});}$.each(b,function(d,e){if(e&&e.ItemImage&&!e.ItemImage.match("^(http)://.+$")){e.ItemImage="http://i.yimg.jp/images/map/yolp/storage_ui/images/noimage_103x155.png";
}});if(b.length>0){return b;}return"";};YolpSearchInfoBuilder.prototype.getImageInfo=function(){var a=[];var b=[];if(this.feature.property.Detail&&typeof(this.feature.property.Detail)!="string"){$.each(this.feature.property.Detail,function(d,e){if(d.match(/^Image([0-9]+)/)){var c=RegExp.$1;a[c]=a[c]||{};a[c].Url=e;}else{if(d.match(/^ImageTitle([0-9]+)/)){var c=RegExp.$1;a[c]=a[c]||{};a[c].Title=e;}else{if(d.match(/^ImageCaption([0-9]+)/)){var c=RegExp.$1;
a[c]=a[c]||{};a[c].Caption=e;}else{if(d.match(/^ImageUrl([0-9]+)/)){var c=RegExp.$1;a[c]=a[c]||{};a[c].LinkUrl=e;}}}}if(d.match(/^LogoImage([0-9]+)/)){var c=RegExp.$1;b[c]=a["Logo"+c]||{};b[c].Url=e;}});}$.each(a,function(c,d){if(d&&d.Url&&!d.Url.match("^(http)://.+$")){if((d.Caption&&d.Caption!="")||(d.Title&&d.Title!="")){d.Url="http://i.yimg.jp/images/map/yolp/storage_ui/images/noimage_103x155.png";
}}});if(this.mycid!=this.y_travel){$.each(b,function(c,d){a.push(d);});}if(a.length>0){return a;}return"";};YolpSearchInfoBuilder.prototype.convertBr=function(a){if(a){return a.replace(/&lt;(br|BR)[ \/]*&gt;/g,"<br>");}else{return"";}};YolpSearchInfoBuilder.prototype.getDescriptionInfo=function(){if(this.feature.description){var a=this.feature.description;return this.convertBr(a);}return"";};YolpSearchInfoBuilder.prototype.getCatchCopyInfo=function(){if(this.feature.property.CatchCopy){return this.convertBr(this.feature.property.CatchCopy);
}return"";};YolpSearchInfoBuilder.prototype.getCategoryInfo=function(){var a="";if(this.feature.category){if(typeof(this.feature.category)=="string"){a=this.feature.category;}else{$.each(this.feature.category,function(b,c){a+=c;});}}if(a==""){return"";}else{return a;}};YolpSearchInfoBuilder.prototype.getZipInfo=function(){if(this.feature.property.Detail&&this.feature.property.Detail.ZipCode){return this.feature.property.Detail.ZipCode;
}return"";};YolpSearchInfoBuilder.prototype.getHolidayInfo=function(){if(this.feature.property.Holiday){return this.feature.property.Holiday;}return"";};YolpSearchInfoBuilder.prototype.getFaxInfo=function(){var a="";if(this.feature.property.Detail&&typeof(this.feature.property.Detail)!="string"){$.each(this.feature.property.Detail,function(b,c){if(b.match(/Fax[0-9]+/)){a+=c+", ";}});}a=a.replace(/, $/,"");
return a;};YolpSearchInfoBuilder.prototype.getTelInfo=function(){var a={};$.each(this.feature.property,function(d,e){if(d.match(/^Tel([0-9]+)/)){var c=RegExp.$1;a[c]=e;}});if(this.feature.property.Detail){$.each(this.feature.property.Detail,function(d,e){if(d.match(/^TelNote([0-9]+)/)){var c=RegExp.$1;a[c]+=" \u203b"+e+"";}});}var b="";$.each(a,function(c,d){if(b!=""){b+=",";}b+=d;});return b;};YolpSearchInfoBuilder.prototype.getAddressInfo=function(){var a="";
if(this.feature.property.Address){a=this.feature.property.Address;}if(this.feature.property.Detail){var b=this.feature.property.Detail;if(b.BuildingInfoName){a+=" "+b.BuildingInfoName;}if(b.BuildingInfoFloor){a+=" "+b.BuildingInfoFloor;}}return a;};YolpSearchInfoBuilder.prototype.getRatingInfo=function(){if(this.feature.property.Rating){var a={};a.data=parseInt(this.feature.property.Rating);a.star=Math.round(a.data*2);
if(a.star<1){a.star="1";}if(a.data==0){return"";}else{return a;}}return"";};YolpSearchInfoBuilder.prototype.getAccessInfo=function(){var a="";$.each(this.feature.property,function(b,c){if(b.match(/Access[0-9]+/)){a+=c+", ";}});a=a.replace(/, $/,"");return this.convertBr(a);};YolpSearchInfoBuilder.prototype.getPcUrlInfo=function(){var a=[];if(this.feature.property.Detail&&typeof(this.feature.property.Detail)!="string"){$.each(this.feature.property.Detail,function(c,d){if(c.match(/^PcUrl([0-9]+)/)){var b=RegExp.$1;
a[b]=a[b]||{};a[b].Url=d;}else{if(c.match(/^PcUrlImage([0-9]+)/)){var b=RegExp.$1;a[b]=a[b]||{};a[b].Image=d;}}});}return a;};YolpSearchInfoBuilder.prototype.getNearStationInfo=function(){if(this.feature.property.Station){var a=this.feature.property.Station[0];if(a&&a.Name&&a.Time){return a.Name+"\u99c5\u304b\u3089\u5f92\u6b69\u7d04"+a.Time+"\u5206";}}return"";};YolpSearchLayer.prototype.getApplicationId=Y.Service.getApplicationId;var RouteSearchLayer=Y.RouteSearchLayer=Y.extend(Y.FeatureLayer,function(c){Y.FeatureLayer.apply(this,["RouteSearchLayer"]);c=c||{};this.ROUTE_ICON_URL="http://i.yimg.jp/images/map/api/yolp/images/yolp_icn.png";this.enableMarker=typeof(c.enableMarker)!="undefined"?c.enableMarker:true;if(this.enableMarker){var f=this.ROUTE_ICON_URL;var b=typeof(c.startIcon)!="undefined"?c.startIcon:new Y.Icon("",{iconHtml:this.getIconHtml(f,new Y.Point(152,0),new Y.Size(24,35)),labelAnchor:new Y.Point(17,-10),iconAnchor:new Y.Point(12,35)});
var d=typeof(c.goalIcon)!="undefined"?c.goalIcon:new Y.Icon("",{iconHtml:this.getIconHtml(f,new Y.Point(152,36),new Y.Size(24,35)),labelAnchor:new Y.Point(17,-10),iconAnchor:new Y.Point(12,35)});var a=typeof(c.viaIcon)!="undefined"?c.viaIcon:new Y.Icon("",{iconHtml:this.getIconHtml(f,new Y.Point(0,191),new Y.Size(20,26)),labelAnchor:new Y.Point(10,-15),iconAnchor:new Y.Point(10,28)});this.startMarkerOption={id:"startpoint",icon:b,clickable:false,draggable:false};
this.goalMarkerOption={id:"goalpoint",icon:d,clickable:false,draggable:false};this.viaMarkerOption={id:"viapoint*",icon:a,clickable:false,draggable:false};}var e={iconSize:new Y.Size(16,16),iconAnchor:new Y.Point(0,16),labelAnchor:new Y.Point(17,-8)};this.guideNormalIcon=new Y.Icon("http://i.yimg.jp/images/map/flashapi/icon/pin_b_4.gif",e);this.guideRestrictIcon=new Y.Icon("http://i.yimg.jp/images/map/flashapi/icon/pin_b_2.gif",e);
this.enableDeform=typeof(c.enableDeform)!="undefined"?c.enableDeform:true;this.strokeStyle=c.strokeStyle||new Y.Style("ff0000",4,0.75);this.routeEvents=c.routeEvents||{};this.cache=new Y.RouteSearchLayer.Cache();this.url=typeof(c.url)!="undefined"?c.url:null;this.appid="";});RouteSearchLayer.prototype.initialize=function(a){Y.FeatureLayer.prototype.initialize.call(this,a);if(this.enableDeform){this.zooming=false;
this.drawnBounds=null;this.onzoomstart=a.bind("zoomstart",function(){this.zooming=true;this.beforeRedraw();},this);this.onzoomend=a.bind("zoomend",function(){if(!this.drawnBounds){return;}this.redrawRoute();this.drawnBounds=a.getBounds().extendRate(3);var b=this;setTimeout(function(){b.zooming=false;},100);},this);this.onmoveend=a.bind("move",function(){if(!this.zooming&&this.drawnBounds&&a.getZoom()>11){a.updateBounds();
var b=this.drawnBounds;var c=a.getBounds();if(c.left()>b.left()&&c.right()<b.right()&&c.top()<b.top()&&c.bottom()>b.bottom()){return;}this.beforeRedraw();this.redrawRoute();this.drawnBounds=c.extendRate(3);}},this);}};RouteSearchLayer.prototype.getIconHtml=function(b,g,c){var e=new Y.Point(152,0),a=new Y.Point(152,36),f=new Y.Point(0,191);if(g.equals(e)){return this.createStartIconHtml();}else{if(g.equals(a)){return this.createEndIconHtml();
}else{if(g.equals(f)){return this.createViaIconHtml();}}}var d="";d+='<div style="';d+="background-image:URL("+b+");";d+="background-position:"+(g.x*-1)+"px "+(g.y*-1)+"px;";d+="width:"+c.width+"px;";d+="height:"+c.height+"px;";d+='"></div>';return d;};RouteSearchLayer.prototype.setEnableDeform=function(a){this.enableDeform=a;};RouteSearchLayer.prototype.createStartIconHtml=function(){return'<p class="yolp-sicn"><img src="'+this.ROUTE_ICON_URL+'"></p>';
};RouteSearchLayer.prototype.createEndIconHtml=function(){return'<p class="yolp-gicn"><img src="'+this.ROUTE_ICON_URL+'"></p>';};RouteSearchLayer.prototype.createViaIconHtml=function(){return'<p class="yolp-rtlistnum0"><img src="'+this.ROUTE_ICON_URL+'"></p>';};RouteSearchLayer.prototype.execute=function(a,e){var d=new Y.RouteSearch(this.url);d.setApplicationId(this.appid);e=e||{};var c=e.params||{};
if(typeof(e.enableViaOptimize)!="undefined"){if(e.enableViaOptimize){c.order=1;}else{if(typeof(c.order)!="undefined"){delete c.order;}}}if(typeof(e.enableRestrict)!="undefined"){if(e.enableRestrict){c.restrict=1;}else{if(typeof(c.restrict)!="undefined"){delete c.restrict;}}}if(typeof(e.priority)!="undefined"){if(e.priority!="time"){c.priority=e.priority;}else{if(typeof(c.priority)!="undefined"){delete c.priority;
}}}if(typeof(e.useCar)!="undefined"){if(!e.useCar){c.traffic="walk";}else{if(typeof(c.traffic)!="undefined"){delete c.traffic;}}}if(typeof(e.useFerry)!="undefined"){if(e.useFerry){c.ferry=2;}else{if(typeof(c.ferry)!="undefined"){delete c.ferry;}}}if(typeof(e.useTollway)!="undefined"){if(!e.useTollway){c.tollway=1;}else{if(typeof(c.tollway)!="undefined"){delete c.tollway;}}}delete c.output;delete c.arnum;
delete c.coordinates;d.params.setOption(c);d.params.setCoordinates(a);Y.Event.trigger(this,"drawstart");var f=d.params.toReqParams();if(!d.params.issetCoordinates()){d=null;var b={code:1000,message:"\u51fa\u767a\u5730\u70b9\u3068\u5230\u7740\u5730\u70b9\u3092\u6307\u5b9a\u3057\u3066\u304f\u3060\u3055\u3044\u3002"};this.drawRoute(false,a,f,b,null);return;}d.request(function(i,h,g){this.drawRoute(i,a,f,h,g);},this);};RouteSearchLayer.prototype.drawMarker=function(a){var d=[];d.push(new Y.Marker(a[0],this.startMarkerOption));
if(a.length>2){var c,b;for(c=1,b=a.length-1;c<b;++c){d.push(new Y.Marker(a[c],this.viaMarkerOption));}}d.push(new Y.Marker(a[a.length-1],this.goalMarkerOption));this.addFeatures(d);};RouteSearchLayer.prototype.drawRoute=function(n,b,e,k,o){if(!n){Y.Event.trigger(this,"error",k);return;}if(k&&o){this.clearRoute();this.cache.setSummary(k);this.cache.setResult(o);this.cache.setPoints(b);this.cache.setParams(e);
var d=[],a,l,h,c,f,m,g;for(h=0,c=o.length;h<c;++h){a=o[h];l=this.createRoute(a.route.latlng,"route"+h);if(l){d.push(l);}for(f=0,m=a.guide.length;f<m;f++){g=this.createGuide(a.guide[f]);d.push(g);}}if(d.length>0){this.addFeatures(d);}if(this.enableMarker){this.drawMarker(b);}if(this.enableDeform){this.drawnBounds=this.map.getBounds().extendRate(3);}}Y.Event.trigger(this,"drawend",k);};RouteSearchLayer.prototype.restoreRoute=function(){var a=this.cache.getPoints();
if(a.length<2){return;}this.clearFeatures();this.redrawRoute();if(this.enableMarker){this.drawMarker(a);}};RouteSearchLayer.prototype.createGuide=function(b){var n=$("<table></table>");var e="";var l=false;var i;for(var k in b.property){var c=b.property[k];e+="<tr>";if(k==="TollwayInfo"){e+="<th>"+c.label+"</th>";e+="<td>";e+="<ul>";for(var j in c.value){e+="<li>"+c.value[j].label;e+="\uff1a&nbsp;"+(c.value[j].value?c.value[j].value:"--")+"</li>";
}e+="</ul>";e+="</td>";}else{if(k==="Regulations"){e+="<th>"+c.label+"</th>";e+="<td>";if(b.property[k].value.length>0){e+="<div style='height:150px;overflow-y:scroll;'>";var f=b.property[k].value;for(var d=0;d<f.length;d++){if(d!==0){e+="<hr style='width:50px;margin-left:5px;'>";}e+="<ul>";for(var a in f[d]){e+="<li>"+f[d][a].label;e+="\uff1a&nbsp;"+f[d][a].value+"</li>";}e+="</ul>";}e+="</div>";l=true;
}else{e+="--";}e+="</td>";}else{if(k==="Name"){i=c.value;}e+="<th>"+c.label+"</th><td>"+(c.value?c.value:"--")+"</td>";}}e+="</tr>";}n.html(e);n.find("th").css({"font-size":"12px","background-color":"#999",color:"#fff"});n.find("td").css({"font-size":"12px",border:"1px solid #000",width:"150px"});n.find("ul").css({cssText:"padding:0px !important; margin:0px 0px 0px 15px !important;"});var h={category:!l?"normal":"restrict",icon:!l?this.guideNormalIcon:this.guideRestrictIcon,title:i?i:""};
var g=new Y.Marker(b.latlng,h);g.bindInfoWindow(n);return g;};RouteSearchLayer.prototype.beforeRedraw=function(){var b=this.getFeatures();if(b.length===0){return;}for(var a=b.length-1;a>=0;--a){if(b[a].id.indexOf("route")>-1){this.removeFeature(b[a]);}}};RouteSearchLayer.prototype.redrawRoute=function(){var e=[];var a=this.cache.getResult();var b,d,c;for(d=0,c=a.length;d<c;++d){b=this.createRoute(a[d].route.latlng,"route"+d);
if(b){e[e.length]=b;}}if(e.length>0){this.addFeatures(e);}};RouteSearchLayer.prototype.createRoute=function(a,f){if(this.enableDeform){a=this.deformLatLngs(a);}if(a.length===0){return null;}var c={id:f,clickable:true,strokeStyle:this.strokeStyle};var b=new Y.Polyline(a,c);var e=this;for(var d in this.routeEvents){(function(h,g){b.bind(h,function(i){g.call(null,i,b);});})(d,this.routeEvents[d]);}return b;
};RouteSearchLayer.prototype.deformLatLngs=function(c){var a=new Y.RouteSearchLayer.Deformer(this.map);var b=a.execute(c);return b;};RouteSearchLayer.prototype.clearRoute=function(){var a=typeof(arguments[0])!="undefined"?arguments[0]:true;this.map.closeInfoWindow();this.clearFeatures();if(a){this.cache.clearResult();this.cache.clearSummary();}};RouteSearchLayer.prototype.remove=function(){Y.FeatureLayer.prototype.remove.call(this);
if(this.enableDeform){this.map.unbind(this.onzoomstart);this.map.unbind(this.onzoomend);this.map.unbind(this.onmoveend);}};RouteSearchLayer.prototype.setApplicationId=function(a){this.appid=a;};RouteSearchLayer.prototype.getApplicationId=function(){return this.appid;};var Cache=Y.RouteSearchLayer.Cache=function(){this.params={};this.points=[];this.result=[];this.summary={distance:0,time:0};};Cache.prototype.hasResult=function(){return this.result.length>0?true:false;
};Cache.prototype.getResult=function(){return this.result;};Cache.prototype.getParams=function(a){if(a){if(typeof(this.params[a])!="undefined"){return this.params[a];}else{return false;}}return this.params;};Cache.prototype.setParams=function(a){this.params=a;};Cache.prototype.setPoints=function(a){this.points=a;};Cache.prototype.getPoints=function(){return this.points;};Cache.prototype.clearPoints=function(){this.points=[];
};Cache.prototype.setSummary=function(a){this.summary.distance=a.TotalDistance;this.summary.time=a.TotalTime;};Cache.prototype.clearSummary=function(){this.summary={distance:0,time:0};};Cache.prototype.setResult=function(a){this.result=a;};Cache.prototype.getResult=function(){return this.result;};Cache.prototype.getResultRoute=function(c){var a=this.getResult();if(c&&c<a.length){return a[c].route;}var b=[];
$(a).each(function(){b.push(this.route);});return b;};Cache.prototype.clearResult=function(){this.result=[];};Cache.prototype.adjustPoints=function(b){if(this.points.length==b.length){for(var a=0;a<b.length;a++){if(b[a].latlng.equals(this.points[a].latlng)&&b[a].address!==this.points[a].address){this.points[a].address=b[a].address;}}}};var Deformer=Y.RouteSearchLayer.Deformer=function(f){var c=3600000;
this.toMSEC=c;this.bounds=f.getBounds();this.zoom=f.getZoom();this.center=f.getCenter();var b=f.getSize().width,d=this.bounds.right(),a=this.bounds.left(),e=(((d-a)*c)/b)*1;this.length=e*e;this.drawingRate=4;};Deformer.prototype.predeform_sieve=function(a,h){var f=this.toMSEC;var l=[];var j;j=a[0];l[0]=new Y.Point(j.lng()*f,j.lat()*f);var g=Math.floor((a.length-2)/h);var b,d,k,e,c;for(e=1,c=a.length-1;
e<c;e=e+g){b=e;d=e+g-1;if(d>a.length-1){d=a.length-1;}k=Math.ceil((b+d)/2);j=a[k];l[l.length]=new Y.Point(j.lng()*f,j.lat()*f);}j=a[a.length-1];l[l.length]=new Y.Point(j.lng()*f,j.lat()*f);return l;};Deformer.prototype.predeform_clip=function(a){var c=this.toMSEC;var q=[];var g=this.bounds.extendRate(this.drawingRate);var k=g.left(),e=g.right(),d=g.top(),m=g.bottom(),r=false,s,l,f,v;var u=false,n=this.center.lat(),h=this.center.lng(),o=null,p=100000;
for(s=0,l=a.length;s<l;++s){f=a[s].lat();v=a[s].lng();var b=n-f;var t=h-v;var j=b*b+t*t;if(p>j){p=j;o=s;}if(v<k){if(u){q[q.length]=new Y.Point(v*c,f*c);u=false;}continue;}if(v>e){if(u){q[q.length]=new Y.Point(v*c,f*c);u=false;}continue;}if(f<m){if(u){q[q.length]=new Y.Point(v*c,f*c);u=false;}continue;}if(f>d){if(u){q[q.length]=new Y.Point(v*c,f*c);u=false;}continue;}if(!u){if(a&&a[s-1]){q[q.length]=new Y.Point(a[s-1].lng()*c,a[s-1].lat()*c);
}}u=true;q[q.length]=new Y.Point(v*c,f*c);}if(q.length===0&&o){if(o>0){q.push(new Y.Point(a[o-1].lng()*c,a[o-1].lat()*c));}q.push(new Y.Point(a[o].lng()*c,a[o].lat()*c));if(o<a.length-1){q.push(new Y.Point(a[o+1].lng()*c,a[o+1].lat()*c));}}return q;};Deformer.prototype.predeform_none=function(a){var e=this.toMSEC;var d=[];var c,b,f;for(c=0,b=a.length;c<b;++c){f=a[c];d[d.length]=new Y.Point(f.lng()*e,f.lat()*e);
}return d;};Deformer.prototype.execute=function(b){var e=this.toMSEC;var g=[];if(b.length>1000){var f=this.zoom;if(f<=11){var a=(f<=8?1000:Math.floor(b.length/10));g=this.predeform_sieve(b,a);}else{g=this.predeform_clip(b);}}else{g=this.predeform_none(b);}if(g.length===0){return[];}g=this.deform(g);var h=[];var d,c;if(g.length>0){for(d=0,c=g.length;d<c;++d){h[h.length]=new Y.LatLng(g[d].y/e,g[d].x/e);
}}return h;};Deformer.prototype.deform=function(w){var z=[];var n=w.length;if(n>2){var e=w[0],c=w[n-1];var f=e.x,d=e.y,l=c.x,j=c.y;var o=f-l,m=d-j;var s=((o!==0&&m!==0)?m/o:0);var r=((s!==0)?(d-f*s):d);var q=-1,h=-1,t,g,u,v,k;for(v=1,k=n-1;v<k;++v){t=w[v];g=t.y-s*t.x-r;u=(g*g)/(1+s*s);if(u>h){q=v;h=u;}}if(h>this.length){var b=w.slice(0,q+1);var a=w.slice(q);w=null;var y=this.deform(b);b=null;y.pop();
var x=this.deform(a);a=null;z=y.concat(x);y=null;x=null;}else{z=[w[0],w[n-1]];w=null;}}else{z=w.concat([]);}return z;};var YolpHeatmapLayer=Y.YolpHeatmapLayer=Y.extend(Y.ImageTileLayer,function(a){a=a||{};this.isIE7=false;if($.browser.msie&&$.browser.version=="6.0"){a.opacity=a.opacity||0.5;}else{if($.browser.version=="7.0"){a.opacity=a.opacity||1;this.isIE7=true;}else{a.opacity=a.opacity||1;}}this.options=a;Y.ImageTileLayer.apply(this,["GeoXml\u30d2\u30fc\u30c8\u30de\u30c3\u30d7","",a]);});YolpHeatmapLayer.prototype.drawHeat=function(a){a=a||{};
this.draw(true);};YolpHeatmapLayer.prototype.buildUrl=function(){var a="http://search.olp.yahooapis.jp/OpenLocalPlatform/V1/localSearch?";var b={datum:"wgs",detail:"simple",results:100,appid:"QLLhVEWxg64qlOs5IqDZPlr2D8OnZ.isQ61FqqOgbhZozc5Fvk_PrGrkL87KJQ--"};b=$.extend(this.options,b);$.each(b,function(c,d){a+=c+"="+encodeURIComponent(d)+"&";});return a;};YolpHeatmapLayer.prototype.getImageSrc=function(h,g){var b=this.buildUrl();
var f=this.map.getZoom();var d=this.map.getProjection();var e=new Y.LatLngBounds();e.extend(d.fromTileToLatLng(h,g,Y.DEFAULT_TILE_SIZE,Y.DEFAULT_TILE_SIZE,f));e.extend(d.fromTileToLatLng(h,g,0,0,f));if(f>=18){e.extendRate(1.5);}else{if(f>=14){e.extendRate(2);}else{if(f>=10){e.extendRate(2.5);}else{e.extendRate(3);}}}var i=e.getSouthWest();var c=e.getNorthEast();b+="&bbox="+i.lng()+","+i.lat()+","+c.lng()+","+c.lat();
var a="http://h.map.srv.yimg.jp/h?t=11&";a+="x="+h+"&y="+g+"&z="+this.map.getZoom()+"&url="+encodeURIComponent(b);if(this.isIE7){a+="&tsize="+Y.DEFAULT_TILE_SIZE+"&dot=2,72&";}return a;};var NaviSearchLayer=Y.NaviSearchLayer=Y.extend(Y.FeatureLayer,function(a){Y.FeatureLayer.apply(this,["NaviSearchLayer"]);a=a||{};this.enableMarker=typeof(a.enableMarker)!="undefined"?a.enableMarker:true;if(this.enableMarker){var c="http://i.yimg.jp/images/map/api/yolp/images/yolp_icn.png";this.startMarkerOption={id:"startpoint",icon:new Y.Icon("",{iconHtml:this.getIconHtml(c,new Y.Point(152,0),new Y.Size(24,35)),labelAnchor:new Y.Point(17,-10),iconAnchor:new Y.Point(12,35)}),clickable:true,draggable:true};
this.goalMarkerOption={id:"goalpoint",icon:new Y.Icon("",{iconHtml:this.getIconHtml(c,new Y.Point(152,36),new Y.Size(24,35)),labelAnchor:new Y.Point(17,-10),iconAnchor:new Y.Point(12,35)}),clickable:true,draggable:true};this.viaMarkerOption={id:"viapoint*",icon:new Y.Icon("",{iconHtml:this.getIconHtml(c,new Y.Point(0,191),new Y.Size(20,26)),labelAnchor:new Y.Point(10,-15),iconAnchor:new Y.Point(10,28)}),clickable:true,draggable:false};
}this.vxMarkerOption={id:"vx",icon:new Y.Icon("http://i.yimg.jp/images/map/api/yolp/images/yolp_dragging_via.png",{iconSize:new Y.Size(13,13),iconAnchor:new Y.Point(6.5,6.5)}),clickable:true,draggable:false};var b={iconSize:new Y.Size(16,16),iconAnchor:new Y.Point(0,16),labelAnchor:new Y.Point(17,-8)};this.walkStyle=a.walkStyle||new Y.Style("ff0000",4,0.75);this.trainStyle=a.trainStyle||new Y.Style("0000ff",4,0.75);
this.routeEvents=a.routeEvents||{};});NaviSearchLayer.prototype.initialize=function(a){Y.FeatureLayer.prototype.initialize.call(this,a);};NaviSearchLayer.prototype.initializeByListing=function(a){this.initialized=true;this.listing=a;};NaviSearchLayer.prototype.getIconHtml=function(a,d,b){var c="";c+='<div style="';c+="background-image:URL("+a+");";c+="background-position:"+(d.x*-1)+"px "+(d.y*-1)+"px;";
c+="width:"+b.width+"px;";c+="height:"+b.height+"px;";c+='"></div>';return c;};NaviSearchLayer.prototype.execute=function(i,d,a){try{var b=new Y.NaviSearch();a=a||{};if(!i&&!d){throw {message:"fromtonone"};}else{if(!i){throw {message:"fromnone"};}else{if(!d){throw {message:"tonone"};}}}if(i.toString()==d.toString()){throw {message:"fromtosame"};}Y.Event.trigger(this,"drawstart");this.drawing=true;this.startname=a.from||"\u51fa\u767a\u5730\u70b9";
this.goalname=a.to||"\u5230\u7740\u5730\u70b9";var h=this.startname;var g=this.goalname;if(i){h+=","+i.lng()+","+i.lat();}if(d){g+=","+d.lng()+","+d.lat();}this.no=a.no||0;var f=this;b.search(h,g,a.via,a,function(j){f.ydf=j;if(j.features&&j.features.length>0){f.drawRoute(j,a);f.drawYDFToList(j);}else{f.clearFeatures();var e=[];if(f.startmarker){e.push(f.startmarker.getLatLng());}else{if(i&&i!=undefined){e.push(i);}}if(f.goalmarker){e.push(f.goalmarker.getLatLng());
}else{if(d&&d!=undefined){e.push(d);}}if(e.length==2){f.drawMarker(e);}f.drawError();}});}catch(c){this.drawError(c.message);}};NaviSearchLayer.prototype.drawError=function(b){var c=this;if(!this.listing){return;}if(!this.listContainer){this.listContainer=$("<div></div>");this.listing.container.append(this.listContainer);}var a=this.createErrorHtml(b);this.listContainer.html(a);Y.Event.trigger(this,"drawend");
this.drawing=false;};NaviSearchLayer.prototype.createErrorHtml=function(a){return"";};NaviSearchLayer.prototype.drawYDFToList=function(b){var c=this;if(!this.listing){return;}if(!this.listContainer){this.listContainer=$("<div></div>");this.listing.container.append(this.listContainer);}var a=this.createResultHtml(b);this.listContainer.html(a);};NaviSearchLayer.prototype.createResultHtml=function(b){var c=this;
var a=$("<div>");$.each(b.features,function(d,e){a.append(c.createItemHtml(e,d));});return a;};NaviSearchLayer.prototype.createItemHtml=function(b,a){var e=this;var c=$("<div>",{css:{cursor:"pointer"}});c.append($("<div>",{css:{backgroundColor:"lightgray"}}).append($("<span>",{text:"\u7d4c\u8def"+(a+1)+" "+b.property.TimeOnBoard+"\u5206 \u7247\u9053"+b.property.TotalPrice.TotalPrice+"\u5186"})));c.mouseover(function(){$(this).css({backgroundColor:"aliceblue"});
});c.mouseout(function(){$(this).css({backgroundColor:""});});var d=this.createEdgeHtml(b);d.hide();c.append(d);c.click(function(){e.drawRoute(e.ydf,{no:a});d.toggle();});return c;};NaviSearchLayer.prototype.createEdgeHtml=function(a){var c=this;var b=$("<div>");$.each(a.route.Edge,function(d,e){var g=e.Vertex;var h=c.stations[g[0].Property.Station.Target];var f=c.stations[g[1].Property.Station.Target];
b.append($("<div>",{text:h.Name})).append($("<div>",{text:e.Property.RailName})).append($("<div>",{text:f.Name}));});return b;};NaviSearchLayer.prototype.drawRoute=function(b,a){var c=this;this.no=a.no||0;if(!b.features||b.features.length==0){Y.Event.trigger(this,"routeapierror");return;}this.stations={};this.stationmarker={};if(b.result&&b.result.dictionary&&b.result.dictionary.Station){$.each(b.result.dictionary.Station,function(d,f){if(f.Geometry){c.stations[f.Id]=f;
var e=new Y.Marker(Y.Util.parseCoordinates(f.Geometry.Coordinates)[0],c.vxMarkerOption);e.property=f;e.title=e.property.Name;c.stationmarker[f.Id]=e;}});}this.cf=b.features[a.no||0]||b.features[0];this.clearFeatures();this.drawVertexMarker(this.cf.route);this.drawMarker(this.cf.latlngs);this.drawRailway(this.cf.property,this.cf.route);Y.Event.trigger(this,"drawend");this.drawing=false;};NaviSearchLayer.prototype.drawMarker=function(a){if(!a){return;
}var c=this;var b=[];this.startmarker=new Y.Marker(a[0],this.startMarkerOption);this.goalmarker=new Y.Marker(a[a.length-1],this.goalMarkerOption);this.startmarker.title=this.startname;this.goalmarker.title=this.goalname;Y.Event.addListener(this.startmarker,"dragend",function(){if(!c.drawing){c.dragDrawRoute("start");}});Y.Event.addListener(this.goalmarker,"dragend",function(){if(!c.drawing){c.dragDrawRoute("goal");
}});b.push(this.startmarker);b.push(this.goalmarker);this.addFeatures(b);};NaviSearchLayer.prototype.dragDrawRoute=function(b){if(this.drawing){return;}var c=this.startmarker.getLatLng();var a=this.goalmarker.getLatLng();var d=this;this.execute(c,a,{station:false});};NaviSearchLayer.prototype.drawVertexMarker=function(a){var c=this;var b={};if(!a){return;}$.each(a.Edge,function(e,d){$.each(d.Vertex,function(f,g){if(g.Property&&g.Property.Station){var h=g.Property.Station.Target;
b[h]=h;}});if(d.Property.Traffic&&d.Property.Traffic==128){c.drawWalkRoute(d);}if(d.Property.Traffic&&d.Property.Traffic!=128){c.drawTrafficRoute(d);}});this.markers=[];$.each(b,function(d,f){var e=c.stationmarker[f];Y.Event.addListener(e,"click",function(){c.openInfoWindow(e);});c.markers.push(e);});this.addFeatures(this.markers);};NaviSearchLayer.prototype.drawTrafficRoute=function(b){var d=this;
var c=[];if(!b||!b.Vertex||b.Vertex.length==0){return;}this.walkline=[];$.each(b.Vertex,function(e,g){var h=g.Property.Station.Target;var f=d.stations[h];c.push(Y.Util.parseCoordinates(f.Geometry.Coordinates)[0]);});var a=new Y.Polyline(c,{strokeStyle:this.walkStyle});this.addFeature(a);};NaviSearchLayer.prototype.drawWalkRoute=function(b){var d=this;var c=[];if(!b||!b.Vertex||b.Vertex.length==0){return;
}this.walkline=[];$.each(b.Vertex,function(e,g){var h=g.Property.Station.Target;var f=d.stations[h];c.push(Y.Util.parseCoordinates(f.Geometry.Coordinates)[0]);});var a=new Y.RouteSearch();a.params.setOption({traffic:"walk"});a.params.setCoordinates(c);a.request(function(g,f,e){$.each(e,function(h,j){var i=new Y.Polyline(j.route.latlng,{strokeStyle:d.walkStyle});d.addFeature(i);d.walkline.push(i);});
});};NaviSearchLayer.prototype.drawRailway=function(c,b){var f=this;var d=new Y.Railway();var e="";var a="";if(c.PassStationList&&c.PassStationList.PassStation){a=c.PassStationList.PassStation;}$.each(a,function(g,h){if(e!=""){e+=",";}e+=h;});$.each(b.Edge,function(g,k){var l="";if(k.Property&&k.Property.RailName&&k.Property.TrainId){l=k.Property.RailName;}var i="";if(k.Vertex&&k.Vertex[0]&&k.Vertex[0].Property&&k.Vertex[0].Property.Station){var h=k.Vertex[0].Property.Station.Target;
i=f.stations[h];}if(i.StationCode&&l!=""){var j=i.StationCode;e=e.replace(j,j+"|"+l+":"+j);}});e=e.replace(/^[0-9]+\|/,"");d.execute(e,{},function(g){$.each(g.features,function(h,i){i.strokeStyle=f.trainStyle;});f.addFeatures(g.features);});};NaviSearchLayer.prototype.openInfoWindow=function(a,c){var b={};if(this.isHidden()){this.infoWindow=this.map.openInfoWindow(a.getLatLng(),this.createInfoWindowHtml(a),b);
}else{this.infoWindow=a.openInfoWindow(this.createInfoWindowHtml(a),b);}this.infoWindowFeature=a;Y.Event.trigger(this,"infowindowopen",a);};NaviSearchLayer.prototype.createInfoWindowHtml=function(b){var a=$("<div>");a.append(b.property.Name);return a;};NaviSearchLayer.prototype.remove=function(){Y.FeatureLayer.prototype.remove.call(this);if(this.enableDeform){this.map.unbind(this.onzoomstart);this.map.unbind(this.onzoomend);
this.map.unbind(this.onmoveend);}if(this.listContainer){this.listContainer.empty();this.listContainer.remove();this.listContainer=null;}};NaviSearchLayer.prototype.getDrawing=function(){return this.drawing;};var IndoorMapLayer=Y.IndoorMapLayer=Y.extend(ImageTileLayer,function(a){ImageTileLayer.apply(this,[this.name,this.url,a]);this.indoormaps;this.floorId=void 0;this.styles="";this.isRedraw;this.drawList;this.smartphoneOptimize=true;this.url="http://m.map.c.yimg.jp/m?r=1&mode=indoormap&";this.name="IndoorMapLayer";this.MAX_ZOOM_LEVEL=22;this.MIN_ZOOM_LEVEL=18;this.copyright=new Y.Copyright("indoor",null,null,"");
this.copyrightCollection=new Y.CopyrightCollection();this.copyrightCollection.addCopyright(this.copyright);});IndoorMapLayer.prototype.getImageSrc=function(a,e,d){if(this.MAX_ZOOM_LEVEL<d||this.MIN_ZOOM_LEVEL>d){return"";}if(!this.indoormaps||this.styles==""){return"";}var c=this.url+"x="+a+"&y="+e+"&z="+d;if(this.smartphoneOptimize){var b=Math.round(this.floatTileSize.width*Y.Util.Platform.devicePixelRatio);
if(b!==Y.DEFAULT_TILE_SIZE){c+="&size="+b;}}c=c+"&style="+this.styles;return c;};IndoorMapLayer.prototype.initialize=function(b){this.__super__.initialize.call(this,b);this.indoormaps=this.getIndoorMaps();if(this.indoormaps&&this.indoormaps.length>0){var a=this.indoormaps[0].defaultfloorid;this.createStyle(a);this.updateSlider();}var c=this;this.layerlistchanged=b.bind("layerlistchanged",function(){var e=c.indoormaps?c.indoormaps[0].indoorid:void 0;
c.indoormaps=c.getIndoorMaps();var d=c.findFloorId(e);c.setFloorId(d);c.updateSlider();if(c.updateCopyright()){c.map.currentLayerSet.copyrightDraw();}Y.Event.trigger(c,"indoormaplayerchanged");});this.copyrightCollection.getCopyrights=function(g,f){c.updateCopyright();var h=[];for(var d=0;d<this.copyrights.length;d++){var e=this.copyrights[d];if(this.isCollision(e,g,f)){if(e.text){h.push(e.text);}}}return h;
};};IndoorMapLayer.prototype.getIndoorMaps=function(){if(this.plugin){return this.plugin.yml.getIndoorMaps();}else{this.plugin=this.map.getPlugin("YahooMapLayer");if(this.plugin){return this.plugin.yml.getIndoorMaps();}}return null;};IndoorMapLayer.prototype.setFloorId=function(a){this.createStyle(a);if(this.isRedraw){this.drawLayer(true);}};IndoorMapLayer.prototype.updateSlider=function(){var b=this.map.getMaxZoom();
if(this.indoormaps&&this.indoormaps.length>0){var a=this.indoormaps[0].layers[0];a=Y.Util.scale2Level(a);this.MAX_ZOOM_LEVEL=this.map.indoorMaxZoom=a;}else{this.map.indoorMaxZoom=void 0;}if(b!=this.map.getMaxZoom()){Y.Event.trigger(this.map,"numlayerchanged");}};IndoorMapLayer.prototype.createStyle=function(k){var g=[];var e=[];var m={};if(this.indoormaps&&this.indoormaps.length>0&&k!==null){var f=this.indoormaps[0];
var l=f.indoorid;m[l]=k;e.push(l);if(f.floorconnections){for(var d=0;d<f.floorconnections.length;d++){var h=f.floorconnections[d];if(k===h.floorid){m[h.connection.indoorid]=h.connection.floorid;}}}for(var d=1;d<this.indoormaps.length;d++){var f=this.indoormaps[d];var l=f.indoorid;e.push(l);if(typeof m[l]==="undefined"){for(var b=0;b<f.floorids.length;b++){if(k===f.floorids[b]){m[l]=f.floorids[b];break;
}}}}for(var l in m){g.push("id."+l+"."+m[l]+":ids");}}this.styles=g.join("|");this.isRedraw=false;if(this.floorId!=k){this.floorId=k;this.isRedraw=true;}e.sort(function(i,c){if(i<c){return -1;}if(i>c){return 1;}return 0;});var a=e.join(",");if(!this.drawList||this.drawList!==a){this.drawList=a;this.isRedraw=true;}};IndoorMapLayer.prototype.findFloorId=function(e){var b=null;if(this.indoormaps&&this.indoormaps.length>0){var d=this.indoormaps[0];
if(d.floorconnections){for(var a=0;a<d.floorconnections.length;a++){var f=d.floorconnections[a];if(e===f.connection.indoorid&&this.floorId===f.connection.floorid){b=f.floorid;break;}}}if(b==null){for(var a=0;a<d.floorids.length;a++){if(d.floorids[a]===this.floorId){b=this.floorId;}}}if(b==null){b=d.defaultfloorid;}}return b;};IndoorMapLayer.prototype.drawLayer=function(d){if(d){this.tileArray=null;
delete this.tileArray;this.tileArray=[];this.tileCount=0;var f=this;if(this.delOldTiles){clearTimeout(this.delOldTiles);this.oldTiles.remove();}this.oldTiles=this.container.children();this.delOldTiles=setTimeout(function(){f.oldTiles.fadeTo("slow",0,function(){$(this).remove();});},1000);}var b=this.map.getProjection();this.geoCenter=this.map.getCenter();this.tileCenter=b.fromLatLngToTile(this.geoCenter,this.map.getZoom());
this.fillSize=this.getFillSize();var e=this.fillSize.c-this.tileCount;if(e>0){for(var a=0;a<e;++a){var c=new Y.DomTile(this.createTile());if(c){this.tileArray.push(c);this.container.prepend(c.dom);}}}else{if(e<0){for(var a=0;a<-e;++a){var c=this.tileArray.pop();if(c){c.dom.remove();}}}}this.tileCount=this.fillSize.c;this.drawTiles();};IndoorMapLayer.prototype.updateCopyright=function(){var d=this.map.getBounds();
var f=this.map.getZoom();var b="";var e=this.map.currentLayerSet.getLayers();if(this.MAX_ZOOM_LEVEL<f||this.MIN_ZOOM_LEVEL>f){b="";}else{b=this.indoormaps?this.indoormaps[0].copyright:"";for(var a=0;a<e.length;a++){if(e[a].name===this.name){continue;}var g=e[a].getCopyrightCollection();if(g){var c=g.getCopyrightNotice(d,f);if(c.join(",").indexOf(b)!==-1){b="";break;}}}}if(this.copyright.text!=b){this.copyright.text=b;
return true;}return false;};IndoorMapLayer.prototype.remove=function(){if(this.map.getMaxZoom()!=this.MAX_ZOOMLEVEL){this.map.indoorMaxZoom=null;Y.Event.trigger(this.map,"numlayerchanged");}if(this.layerlistchanged){this.map.unbind(this.layerlistchanged);this.layerlistchanged=null;}if(this.container){this.container.remove();this.container=null;}if(this.drawer){this.drawer=null;}this.initialized=false;
};var IndoorMapLayer=Y.IndoorMapLayer=Y.extend(ImageTileLayer,function(a){ImageTileLayer.apply(this,[this.name,this.url,a]);this.indoormaps;this.floorId=void 0;this.styles="";this.isRedraw;this.drawList;this.smartphoneOptimize=true;this.url="http://m.map.c.yimg.jp/m?r=1&mode=indoormap&";this.name="IndoorMapLayer";this.MAX_ZOOM_LEVEL=22;this.MIN_ZOOM_LEVEL=18;this.copyright=new Y.Copyright("indoor",null,null,"");
this.copyrightCollection=new Y.CopyrightCollection();this.copyrightCollection.addCopyright(this.copyright);});IndoorMapLayer.prototype.getImageSrc=function(a,e,d){if(this.MAX_ZOOM_LEVEL<d||this.MIN_ZOOM_LEVEL>d){return"";}if(!this.indoormaps||this.styles==""){return"";}var c=this.url+"x="+a+"&y="+e+"&z="+d;if(this.smartphoneOptimize){var b=Math.round(this.floatTileSize.width*Y.Util.Platform.devicePixelRatio);
if(b!==Y.DEFAULT_TILE_SIZE){c+="&size="+b;}}c=c+"&style="+this.styles;return c;};IndoorMapLayer.prototype.initialize=function(b){this.__super__.initialize.call(this,b);this.indoormaps=this.getIndoorMaps();if(this.indoormaps&&this.indoormaps.length>0){var a=this.indoormaps[0].defaultfloorid;this.createStyle(a);this.updateSlider();}var c=this;this.layerlistchanged=b.bind("layerlistchanged",function(){var e=c.indoormaps?c.indoormaps[0].indoorid:void 0;
c.indoormaps=c.getIndoorMaps();var d=c.findFloorId(e);c.setFloorId(d);c.updateSlider();if(c.updateCopyright()){c.map.currentLayerSet.copyrightDraw();}Y.Event.trigger(c,"indoormaplayerchanged");});this.copyrightCollection.getCopyrights=function(g,f){c.updateCopyright();var h=[];for(var d=0;d<this.copyrights.length;d++){var e=this.copyrights[d];if(this.isCollision(e,g,f)){if(e.text){h.push(e.text);}}}return h;
};};IndoorMapLayer.prototype.getIndoorMaps=function(){if(this.plugin){return this.plugin.yml.getIndoorMaps();}else{this.plugin=this.map.getPlugin("YahooMapLayer");if(this.plugin){return this.plugin.yml.getIndoorMaps();}}return null;};IndoorMapLayer.prototype.setFloorId=function(a){this.createStyle(a);if(this.isRedraw){this.drawLayer(true);}};IndoorMapLayer.prototype.updateSlider=function(){var b=this.map.getMaxZoom();
if(this.indoormaps&&this.indoormaps.length>0){var a=this.indoormaps[0].layers[0];a=Y.Util.scale2Level(a);this.MAX_ZOOM_LEVEL=this.map.indoorMaxZoom=a;}else{this.map.indoorMaxZoom=void 0;}if(b!=this.map.getMaxZoom()){Y.Event.trigger(this.map,"numlayerchanged");}};IndoorMapLayer.prototype.createStyle=function(k){var g=[];var e=[];var m={};if(this.indoormaps&&this.indoormaps.length>0&&k!==null){var f=this.indoormaps[0];
var l=f.indoorid;m[l]=k;e.push(l);if(f.floorconnections){for(var d=0;d<f.floorconnections.length;d++){var h=f.floorconnections[d];if(k===h.floorid){m[h.connection.indoorid]=h.connection.floorid;}}}for(var d=1;d<this.indoormaps.length;d++){var f=this.indoormaps[d];var l=f.indoorid;e.push(l);if(typeof m[l]==="undefined"){for(var b=0;b<f.floorids.length;b++){if(k===f.floorids[b]){m[l]=f.floorids[b];break;
}}}}for(var l in m){g.push("id."+l+"."+m[l]+":ids");}}this.styles=g.join("|");this.isRedraw=false;if(this.floorId!=k){this.floorId=k;this.isRedraw=true;}e.sort(function(i,c){if(i<c){return -1;}if(i>c){return 1;}return 0;});var a=e.join(",");if(!this.drawList||this.drawList!==a){this.drawList=a;this.isRedraw=true;}};IndoorMapLayer.prototype.findFloorId=function(e){var b=null;if(this.indoormaps&&this.indoormaps.length>0){var d=this.indoormaps[0];
if(d.floorconnections){for(var a=0;a<d.floorconnections.length;a++){var f=d.floorconnections[a];if(e===f.connection.indoorid&&this.floorId===f.connection.floorid){b=f.floorid;break;}}}if(b==null){for(var a=0;a<d.floorids.length;a++){if(d.floorids[a]===this.floorId){b=this.floorId;}}}if(b==null){b=d.defaultfloorid;}}return b;};IndoorMapLayer.prototype.drawLayer=function(d){if(d){this.tileArray=null;
delete this.tileArray;this.tileArray=[];this.tileCount=0;var f=this;if(this.delOldTiles){clearTimeout(this.delOldTiles);this.oldTiles.remove();}this.oldTiles=this.container.children();this.delOldTiles=setTimeout(function(){f.oldTiles.fadeTo("slow",0,function(){$(this).remove();});},1000);}var b=this.map.getProjection();this.geoCenter=this.map.getCenter();this.tileCenter=b.fromLatLngToTile(this.geoCenter,this.map.getZoom());
this.fillSize=this.getFillSize();var e=this.fillSize.c-this.tileCount;if(e>0){for(var a=0;a<e;++a){var c=new Y.DomTile(this.createTile());if(c){this.tileArray.push(c);this.container.prepend(c.dom);}}}else{if(e<0){for(var a=0;a<-e;++a){var c=this.tileArray.pop();if(c){c.dom.remove();}}}}this.tileCount=this.fillSize.c;this.drawTiles();};IndoorMapLayer.prototype.updateCopyright=function(){var d=this.map.getBounds();
var f=this.map.getZoom();var b="";var e=this.map.currentLayerSet.getLayers();if(this.MAX_ZOOM_LEVEL<f||this.MIN_ZOOM_LEVEL>f){b="";}else{b=this.indoormaps?this.indoormaps[0].copyright:"";for(var a=0;a<e.length;a++){if(e[a].name===this.name){continue;}var g=e[a].getCopyrightCollection();if(g){var c=g.getCopyrightNotice(d,f);if(c.join(",").indexOf(b)!==-1){b="";break;}}}}if(this.copyright.text!=b){this.copyright.text=b;
return true;}return false;};IndoorMapLayer.prototype.remove=function(){if(this.map.getMaxZoom()!=this.MAX_ZOOMLEVEL){this.map.indoorMaxZoom=null;Y.Event.trigger(this.map,"numlayerchanged");}if(this.layerlistchanged){this.map.unbind(this.layerlistchanged);this.layerlistchanged=null;}if(this.container){this.container.remove();this.container=null;}if(this.drawer){this.drawer=null;}this.initialized=false;
};var IndoorMapLayer=Y.IndoorMapLayer=Y.extend(ImageTileLayer,function(a){ImageTileLayer.apply(this,[this.name,this.url,a]);this.indoormaps;this.floorId=void 0;this.styles="";this.isRedraw;this.drawList;this.smartphoneOptimize=true;this.url="http://m.map.c.yimg.jp/m?r=1&mode=indoormap&";this.name="IndoorMapLayer";this.MAX_ZOOM_LEVEL=22;this.MIN_ZOOM_LEVEL=18;this.copyright=new Y.Copyright("indoor",null,null,"");
this.copyrightCollection=new Y.CopyrightCollection();this.copyrightCollection.addCopyright(this.copyright);});IndoorMapLayer.prototype.getImageSrc=function(a,e,d){if(this.MAX_ZOOM_LEVEL<d||this.MIN_ZOOM_LEVEL>d){return"";}if(!this.indoormaps||this.styles==""){return"";}var c=this.url+"x="+a+"&y="+e+"&z="+d;if(this.smartphoneOptimize){var b=Math.round(this.floatTileSize.width*Y.Util.Platform.devicePixelRatio);
if(b!==Y.DEFAULT_TILE_SIZE){c+="&size="+b;}}c=c+"&style="+this.styles;return c;};IndoorMapLayer.prototype.initialize=function(b){this.__super__.initialize.call(this,b);this.indoormaps=this.getIndoorMaps();if(this.indoormaps&&this.indoormaps.length>0){var a=this.indoormaps[0].defaultfloorid;this.createStyle(a);this.updateSlider();}var c=this;this.layerlistchanged=b.bind("layerlistchanged",function(){var e=c.indoormaps?c.indoormaps[0].indoorid:void 0;
c.indoormaps=c.getIndoorMaps();var d=c.findFloorId(e);c.setFloorId(d);c.updateSlider();if(c.updateCopyright()){c.map.currentLayerSet.copyrightDraw();}Y.Event.trigger(c,"indoormaplayerchanged");});this.copyrightCollection.getCopyrights=function(g,f){c.updateCopyright();var h=[];for(var d=0;d<this.copyrights.length;d++){var e=this.copyrights[d];if(this.isCollision(e,g,f)){if(e.text){h.push(e.text);}}}return h;
};};IndoorMapLayer.prototype.getIndoorMaps=function(){if(this.plugin){return this.plugin.yml.getIndoorMaps();}else{this.plugin=this.map.getPlugin("YahooMapLayer");if(this.plugin){return this.plugin.yml.getIndoorMaps();}}return null;};IndoorMapLayer.prototype.setFloorId=function(a){this.createStyle(a);if(this.isRedraw){this.drawLayer(true);}};IndoorMapLayer.prototype.updateSlider=function(){var b=this.map.getMaxZoom();
if(this.indoormaps&&this.indoormaps.length>0){var a=this.indoormaps[0].layers[0];a=Y.Util.scale2Level(a);this.MAX_ZOOM_LEVEL=this.map.indoorMaxZoom=a;}else{this.map.indoorMaxZoom=void 0;}if(b!=this.map.getMaxZoom()){Y.Event.trigger(this.map,"numlayerchanged");}};IndoorMapLayer.prototype.createStyle=function(k){var g=[];var e=[];var m={};if(this.indoormaps&&this.indoormaps.length>0&&k!==null){var f=this.indoormaps[0];
var l=f.indoorid;m[l]=k;e.push(l);if(f.floorconnections){for(var d=0;d<f.floorconnections.length;d++){var h=f.floorconnections[d];if(k===h.floorid){m[h.connection.indoorid]=h.connection.floorid;}}}for(var d=1;d<this.indoormaps.length;d++){var f=this.indoormaps[d];var l=f.indoorid;e.push(l);if(typeof m[l]==="undefined"){for(var b=0;b<f.floorids.length;b++){if(k===f.floorids[b]){m[l]=f.floorids[b];break;
}}}}for(var l in m){g.push("id."+l+"."+m[l]+":ids");}}this.styles=g.join("|");this.isRedraw=false;if(this.floorId!=k){this.floorId=k;this.isRedraw=true;}e.sort(function(i,c){if(i<c){return -1;}if(i>c){return 1;}return 0;});var a=e.join(",");if(!this.drawList||this.drawList!==a){this.drawList=a;this.isRedraw=true;}};IndoorMapLayer.prototype.findFloorId=function(e){var b=null;if(this.indoormaps&&this.indoormaps.length>0){var d=this.indoormaps[0];
if(d.floorconnections){for(var a=0;a<d.floorconnections.length;a++){var f=d.floorconnections[a];if(e===f.connection.indoorid&&this.floorId===f.connection.floorid){b=f.floorid;break;}}}if(b==null){for(var a=0;a<d.floorids.length;a++){if(d.floorids[a]===this.floorId){b=this.floorId;}}}if(b==null){b=d.defaultfloorid;}}return b;};IndoorMapLayer.prototype.drawLayer=function(d){if(d){this.tileArray=null;
delete this.tileArray;this.tileArray=[];this.tileCount=0;var f=this;if(this.delOldTiles){clearTimeout(this.delOldTiles);this.oldTiles.remove();}this.oldTiles=this.container.children();this.delOldTiles=setTimeout(function(){f.oldTiles.fadeTo("slow",0,function(){$(this).remove();});},1000);}var b=this.map.getProjection();this.geoCenter=this.map.getCenter();this.tileCenter=b.fromLatLngToTile(this.geoCenter,this.map.getZoom());
this.fillSize=this.getFillSize();var e=this.fillSize.c-this.tileCount;if(e>0){for(var a=0;a<e;++a){var c=new Y.DomTile(this.createTile());if(c){this.tileArray.push(c);this.container.prepend(c.dom);}}}else{if(e<0){for(var a=0;a<-e;++a){var c=this.tileArray.pop();if(c){c.dom.remove();}}}}this.tileCount=this.fillSize.c;this.drawTiles();};IndoorMapLayer.prototype.updateCopyright=function(){var d=this.map.getBounds();
var f=this.map.getZoom();var b="";var e=this.map.currentLayerSet.getLayers();if(this.MAX_ZOOM_LEVEL<f||this.MIN_ZOOM_LEVEL>f){b="";}else{b=this.indoormaps?this.indoormaps[0].copyright:"";for(var a=0;a<e.length;a++){if(e[a].name===this.name){continue;}var g=e[a].getCopyrightCollection();if(g){var c=g.getCopyrightNotice(d,f);if(c.join(",").indexOf(b)!==-1){b="";break;}}}}if(this.copyright.text!=b){this.copyright.text=b;
return true;}return false;};IndoorMapLayer.prototype.remove=function(){if(this.map.getMaxZoom()!=this.MAX_ZOOMLEVEL){this.map.indoorMaxZoom=null;Y.Event.trigger(this.map,"numlayerchanged");}if(this.layerlistchanged){this.map.unbind(this.layerlistchanged);this.layerlistchanged=null;}if(this.container){this.container.remove();this.container=null;}if(this.drawer){this.drawer=null;}this.initialized=false;
};var ClickableLayer=Y.ClickableLayer=Y.extend(Y.Layer,function(b,a){Y.Layer.call(this,b,a);a=this.options;this._clickableUrl=a.clickableUrl;this._layerSetIds=a.layerSetIds||[Y.LayerSetId.NORMAL];this._clickListener=null;this._clickableCache={};this._clickableRequests={};this._autoPurgeEvents=[];this._mouseHandler=null;this._hover=null;this._beforeTileKey="";this._isYjdnFormat=false;if(!this._clickableUrl){throw new Error("Undefined: clickableUrl");
}});ClickableLayer.CONTAIN_METHOD_TYPE={CLICK:0,MOUSE:1};ClickableLayer.GEOMETRY_TYPE={ICON:"point",LINE:"linestring",POLYGON:"polygon"};ClickableLayer.prototype.initialize=function(a){Y.Layer.prototype.initialize.call(this,a);if(this.isTargetLayerSetId(a.getCurrentLayerSetId())){this.activate();}this._onLayerSetChanged=a.bind("layersetchanged",function(){if(this.isTargetLayerSetId(a.getCurrentLayerSetId())){if(!this.isActivated()){this.activate();
}}else{if(this.isActivated()){this.deactivate();}}},this);};ClickableLayer.prototype.isTargetLayerSetId=function(c){var b=this._layerSetIds,d=0,a=b.length;for(d=0;d<a;++d){if(b[d]===c){return true;}}return false;};ClickableLayer.prototype.canNotifyMouseEvent=function(){return false;};ClickableLayer.prototype.draw=function(a){};ClickableLayer.prototype.remove=function(){this.container=null;this.drawer=null;
this.initialized=false;if(this.isActivated()){this.deactivate();this._autoPurgeEvents=[];}if(this.map){this.map.unbind(this._onLayerSetChanged);this._onLayerSetChanged=null;this.map=null;}};ClickableLayer.prototype.isDrawn=function(){return this.isActivated();};ClickableLayer.prototype.show=function(){};ClickableLayer.prototype.hide=function(){};ClickableLayer.prototype.isHidden=function(){return !this.isActivated();
};ClickableLayer.prototype.onClickTile=function(a){this.callContainMethod(this.getTileInformationByLatLng(a),Y.ClickableLayer.CONTAIN_METHOD_TYPE.CLICK);};ClickableLayer.prototype.getTileInformationByLatLng=function(e){var q=this.map,d=q.getProjection();var f=q.getZoom();var j=q.getProjection().fromLatLngToTile(e,f);var p=j.tx;var n=j.ty;var h=j.x;var g=j.y;var a=d.fromLatLngToMeters(e);var r=d.fromMetersToPixel(a,f);
var m=d.fromPixelToTile(r,f);var o=Math.abs(r.y);var i=d.tileSize;var l=r.x%i;var k=o%i;var c=h;var b=i-g;return{ll:e,tx:p,ty:n,z:f,rx:c,ry:b};};ClickableLayer.prototype.callContainMethod=function(h,j){var a=this.map,f=a.getZoom(),d=h.tx,c=h.ty,i=this.getCacheKeyByTileId(d,c,f),b=this._clickableCache[i],e=Y.ClickableLayer.CONTAIN_METHOD_TYPE;if(b){switch(j){case e.CLICK:this.containClickHitTest(h,b);
break;case e.MOUSE:this.containMouseHitTest(h,b);break;default:}return;}if(this._clickableRequests[i]){return;}this._clickableRequests[i]=true;var g=this.createClickableParams(h),k=this;$.ajax({type:"GET",url:this._clickableUrl,data:g,dataType:"jsonp",scriptCharset:"utf-8",success:function(l){delete k._clickableRequests[i];if(!l){Y.Event.trigger(k,"error");return;}if(k._isYjdnFormat){l=k.getYjdnResult(l);
}k._clickableCache[i]=l;switch(j){case e.CLICK:k.containClickHitTest(h,l);break;case e.MOUSE:break;}},error:function(l){delete k._clickableRequests[i];Y.Event.trigger(k,"error");}});};ClickableLayer.prototype.getYjdnResult=function(a){return a.ResultSet.Result;};ClickableLayer.prototype.createClickableParams=function(a){};ClickableLayer.prototype.containClickHitTest=function(b,a){};ClickableLayer.prototype.containMouseHitTest=function(b,a){};
ClickableLayer.prototype.clearClickableCache=function(){this._clickableCache=null;this._clickableCache={};};ClickableLayer.prototype.setAutoCachePurgeEvent=function(c,a){var b=Y.Event.addListener(c,a,this.clearClickableCache,this);this._autoPurgeEvents.push({obj:c,eventName:a,listener:b});};ClickableLayer.prototype.getCacheKeyByTileId=function(b,a,c){return"x_"+b+"_y_"+a+"_z_"+c;};ClickableLayer.prototype.activate=function(){var f=this.map;
this._clickListener=f.bind("click",this.onClickTile,this);if(this.canNotifyMouseEvent()){this._mouseHandler=$.proxy(this.onMouseMove,this);f.mainContainer.bind("mousemove",this._mouseHandler);}var b=Y.Event,c=this._autoPurgeEvents;for(var d=0,a=c.length;d<a;++d){var e=c[d];if(e.listener!==null){continue;}e.listener=b.addListener(e.obj,e.eventName,this.clearClickableCache,this);}};ClickableLayer.prototype.onMouseMove=function(g){var f=this.map,i=f.getMouseLatLng(g),h=f.getZoom(),c=this.getTileInformationByLatLng(i),b=c.tx,a=c.ty;
var d=this.getCacheKeyByTileId(b,a,h);if(this._beforeTileKey!==d){this._beforeTileKey=d;}this.callContainMethod(c,Y.ClickableLayer.CONTAIN_METHOD_TYPE.MOUSE);};ClickableLayer.prototype.isActivated=function(){return this._clickListener!==null;};ClickableLayer.prototype.deactivate=function(){var g=this.map;g.unbind(this._clickListener);this._clickListener=null;if(this.canNotifyMouseEvent()){g.mainContainer.unbind("mousemove",this._mouseHandler);
this._mouseHandler=null;}var b=Y.Event,c=this._autoPurgeEvents;for(var d=0,a=c.length;d<a;++d){var e=c[d],f=e.listener;b.removeListener(f);e.listener=null;}};ClickableLayer.prototype.isHitIconInGeometry=function(h,b,a,c,j){var f=h.length/2;for(var d=0;d<f;d++){var e=(d%f)*2;var g=h.slice(e,e+2);if(b>=g[0]&&b<g[0]+c&&a>=g[1]&&a<g[1]+j){return true;}}return false;};ClickableLayer.prototype.isHitPolylineInGeometry=function(m,c,b,d){var a=d/2;
var h=m.length/2;var l=m.slice(0,2);for(var f=1;f<h;f++){var g=(f%h)*2;var k=m.slice(g,g+2);var n=(f===1)?0:a;var j=(f===h-1)?0:a;if(this.lineInside(l,k,c,b,a,n,j)){return true;}l=k;}return false;};ClickableLayer.prototype.lineInside=function(k,j,c,b,a,l,i){var f=Math.atan2(j[0]-k[0],j[1]-k[1]);var h=this.rotate(k,f);var g=this.rotate(j,f);var d=this.rotate([c,b],f);return(d[0]>=h[0]-a&&d[0]<=g[0]+a&&d[1]>=h[1]-l&&d[1]<=g[1]+i);
};ClickableLayer.prototype.rotate=function(d,a){var c=d[0]*Math.cos(a)-d[1]*Math.sin(a);var b=d[0]*Math.sin(a)+d[1]*Math.cos(a);return[c,b];};ClickableLayer.prototype.isHitPolygonInGeometry=function(m,c,b){var j=m.length/2;var g=0;var l=m.slice(0,2);var e=(c<=l[0]);var d=(b<=l[1]);for(var f=1;f<j+1;f++){var h=(f%j)*2;var k=m.slice(h,h+2);var a=(c<=k[0]);var n=(b<=k[1]);if(d!=n){if(e==a){if(e){g+=(d?-1:1);
}}else{if(c<=(l[0]+(k[0]-l[0])*(b-l[1])/(k[1]-l[1]))){g+=(d?-1:1);}}}l=k;e=a;d=n;}return(0!==g);};var AnnotationClickableLayer=Y.AnnotationClickableLayer=Y.extend(Y.ClickableLayer,function(c,b){this._TYPE_MAP={};this._TYPE_MAP[1]="icon";this._TYPE_MAP[2]="text";var e="http://bounds.olp.yahooapis.jp/OpenLocalPlatform/V1/bounds",d="RNozzI.xg66.rqOU7cxYtOBzdKamf_YRKZclKo_zDF3WmkI.tEWRxypLru5TNA--";b=b||{};b.clickableUrl=b.clickableUrl||e+"?appid="+d;b.threshold=(typeof b.threshold==="number"&&b.threshold>0)?b.threshold:16;
b.isRaw=(typeof b.isRaw!=="undefined")?b.isRaw:false;var a=Y.ClickableLayer;a.call(this,c,b);});AnnotationClickableLayer.prototype.initialize=function(b){this.setAutoCachePurgeEvent(b,"zoomend");var a=Y.ClickableLayer.prototype;a.initialize.call(this,b);};AnnotationClickableLayer.prototype.createClickableParams=function(d){var e=this.map,g=e.getCurrentLayerSetId(),b=d.tx,a=d.ty,f=e.getZoom(),c=(e.getConfigure("mapType")===Y.Map.TYPE.SMARTPHONE&&g===Y.LayerSetId.NORMAL);
if(c){g=Y.Map.TYPE.SMARTPHONE;}return{mode:g,r:"1",x:b,y:a,z:f};};AnnotationClickableLayer.prototype.containClickHitTest=function(H,c){var L=H.tx,J=H.ty,o=H.z,m=H.rx,k=H.ry,I=H.ll;var M=this.map;var t=M.getProjection().tileSize;var f=this.options;var g=f.threshold;var C=f.isRaw;var E=this._TYPE_MAP;var v;for(var D=0,h=c.length;D<h;D++){var s=c[D];var d=s.bounds;if(d&&d.length===4){var G=[-(m-d[0]),-(d[0]+d[2]-m),-(k-d[1]),-(d[1]+d[3]-k)];
var e=0;for(var B=0,K=G.length;B<K;B++){if(e<G[B]){e=G[B];}}if(e<g){var q=d[0]+(d[2]/2);var p=t-(d[1]+(d[3]/2));var r=M.fromTileToLatLng(L,J,q,p);var A=d[0];var w=t-(d[1]+d[3]);var u=M.fromTileToLatLng(L,J,A,w);var b=d[0]+d[2];var a=t-d[1];var n=M.fromTileToLatLng(L,J,b,a);var F=new Y.LatLngBounds(u,n);s.centerLatLng=r;s.clickLatLng=I;s.latLngBounds=F;s.distance=e;s.size=new Y.Size(d[2],d[3]);if(v){if(v.distance>e){v=s;
}}else{v=s;}}}}if(v){var l;if(C===true){l=v;l.type=E[v.type];}else{l={type:E[v.type],label:v.label,name:v.name,angle:v.angle,vertical:v.vertical,size:v.size,clickLatLng:v.clickLatLng,centerLatLng:v.centerLatLng,latLngBounds:v.latLngBounds};}Y.Event.trigger(this,"match",l);return;}else{Y.Event.trigger(this,"nomatch");return;}};var ImageMapLayer=Y.ImageMapLayer=Y.extend(Y.FeatureLayer,function(b,a){Y.Layer.apply(this,[name,{}]);this.imageurl=b;this.anchors=[];this.firstview=a.firstview;this.basecenter=a.center;});ImageMapLayer.prototype.initialize=function(a){var b=this;this.basezoom=a.getZoom();this.setImage(b.imageurl);if(this.evtZoomend){a.unbind(this.evtZoomend);}this.evtZoomend=a.bind("zoomend",function(d,c){if(b.zoomTimer){clearTimeout(b.zoomTimer);
}b.zoomTimer=setTimeout(function(){var e=b.map.getZoom();if(e<=b.basezoom-4){e=b.basezoom-4;}if(e!=b.pastzoom){b.drawImage(e,b.pastzoom);}b.pastzoom=e;},100);});if(!this.baseoffset){this.baseoffset=a.mapContainer.offset();}FeatureLayer.prototype.initialize.apply(this,[a]);};ImageMapLayer.prototype.isInitialized=function(){try{var b=this.imgnode.position();}catch(a){return false;}return this.initialized;
};ImageMapLayer.prototype.setImage=function(a){var b=this;this.mapimg=new Image();this.mapimg.onload=function(){b.initImage();};if(this.firstview){this.mapimg.src=a;}};ImageMapLayer.prototype.getInitCenter=function(){return new Y.LatLng(0,0);};ImageMapLayer.prototype.initImage=function(){var d=this;var c=this.map.mapContainer.position();var b=this.map.getSize();this.basezoom=this.map.getZoom();var a=this.map.getCenter();
this.map.panTo(this.map.getCenter());this.imgnode=$("<img>",{src:this.imageurl,css:{position:"absolute",left:(-c.left+b.width/2-this.mapimg.width/2)+"px",top:(-c.top+b.height/2-this.mapimg.height/2)+"px",zIndex:-1}});if(this.container){this.container.append(this.imgnode);}this.imgnode.dblclick(function(i){var k=d.map.mapContainer.offset();var h=d.imgnode.position();var f=i.pageX-h.left-k.left;var j=i.pageY-h.top-k.top;
var g=d.map.getZoom();if(g-d.basezoom<=0){f=f*Math.pow(2,d.basezoom-g);j=j*Math.pow(2,d.basezoom-g);}else{f=f*Math.pow(0.5,g-d.basezoom);j=j*Math.pow(0.5,g-d.basezoom);}Y.Event.trigger(d,"dblclick",new Y.Point(f,j));});this.map.panTo(this.getInitCenter());Y.Event.trigger(this,"initimage");};ImageMapLayer.prototype.fromImagePointToLatLng=function(a){var g=this.map.mapContainer.offset();var f=this.imgnode.position();
var d=this.map.getZoom();var c={};if(d-this.basezoom<=0){c.x=a.x*Math.pow(0.5,this.basezoom-d);c.y=a.y*Math.pow(0.5,this.basezoom-d);}else{c.x=a.x*Math.pow(2,d-this.basezoom);c.y=a.y*Math.pow(2,d-this.basezoom);}var c=new Y.Point(c.x+f.left+g.left,c.y+f.top+g.top);var b=this.map.fromPagePixelToContainerPixel(c);var e=this.map.fromContainerPixelToLatLng(b);return e;};ImageMapLayer.prototype.fromLatLngToImagePoint=function(e){var f=this.map.mapContainer.offset();
var d=this.imgnode.position();var a=this.map.fromLatLngToDivPixel(e);var c=this.map.getZoom();a.x=a.x-d.left;a.y=a.y-d.top;var b={};if(c-this.basezoom<=0){b.x=a.x*Math.pow(2,this.basezoom-c);b.y=a.y*Math.pow(2,this.basezoom-c);}else{b.x=a.x*Math.pow(0.5,c-this.basezoom);b.y=a.y*Math.pow(0.5,c-this.basezoom);}return new Y.Point(b.x,b.y);};ImageMapLayer.prototype.drawImage=function(l,c){if(!this.imgnode){return;
}var n=this.map.getSize();var e=this.imgnode.position();var a=this.imgnode.width();var j=this.imgnode.height();var h=this.map.mapContainer.offset();var d=e.left;var g=e.top;var i=new Y.Point(e.left+h.left,e.top+h.top);var f=this.map.fromLatLngToDivPixel(this.map.getCenter(),l);var b=new Y.Point(h.left+f.x,h.top+f.y);var m=i.x-b.x;var k=i.y-b.y;if(l>c){a=a*Math.pow(2,(l-c));j=j*Math.pow(2,(l-c));d+=(m*(Math.pow(2,(l-c))-1));
g+=(k*(Math.pow(2,(l-c))-1));}else{a=a/Math.pow(2,(c-l));j=j/Math.pow(2,(c-l));d-=(m-(m/Math.pow(2,(c-l))));g-=(k-(k/Math.pow(2,(c-l))));}this.imgnode.css({width:a,height:j,left:d,top:g});};ImageMapLayer.prototype.draw=function(a){var b=this;if(this.mapimg&&!this.mapimg.src){this.mapimg.src=this.imageurl;}FeatureLayer.prototype.draw.apply(this,[a]);};ImageMapLayer.prototype.remove=function(){if(this.evtZoomend){this.map.unbind(this.evtZoomend);
}if(this.evtLayerSetChanged){this.map.unbind(this.evtLayerSetChanged);}if(this.imgnode){this.imgnode.remove();}if(this.basecenter){this.map.panTo(this.basecenter);}if(this.basezoom){this.map.setZoom(this.basezoom);}FeatureLayer.prototype.remove.apply(this);};var ImageMapMixerLayer=Y.ImageMapMixerLayer=Y.extend(Y.ImageMapLayer,function(c){var b="ImageMapMixer";Y.Layer.apply(this,[b,{}]);this.imageurl="";this.anchors=[];this.cid=c.cid;this.firstview=c.firstview;this.mixer=new MapMixer();this.basecenter="";var d=this;var a=new Y.Anchor();a.getMixer(this.cid,{},function(f,g,e){d.mixer=f;d.imageurl=g;d.basecenter=e;d.setImage(g);});});ImageMapMixerLayer.prototype.getInitCenter=function(){if(this.imgnode&&this.imgnode.position){var a=this.map.getCenter();
var c=this.mixer.latlngToPix(a.lat(),a.lng());var b=this.fromImagePointToLatLng(new Y.Point(c.x,c.y));return b;}else{return new Y.LatLng(0,0);}};ImageMapMixerLayer.prototype.initialize=function(b){var c=this;ImageMapLayer.prototype.initialize.apply(c,[b]);var a=this.map.getLayerSets();setTimeout(function(){for(var g in c.map.getLayerSets()){var f=a[g].getLayers();for(var e=0;e<f.length;e++){var d=f[e];
if(d.setImageMapLayer){d.setImageMapLayer(c);d.draw(true);}}}},200);b.closeInfoWindow();};ImageMapMixerLayer.prototype.draw=function(a){if(this.features.length>0){this.features=this.convertFeatures(this.features,this.mixer,this.imgnode);}ImageMapLayer.prototype.draw.apply(this,[a]);};ImageMapMixerLayer.prototype.fromLatLngToImageLatLng=function(g){try{if(this.imgnode&&this.imgnode.position){var f=this.map.mapContainer.offset();
var c=this.imgnode.position();}}catch(d){}var j=this.map.getZoom();var a=this.mixer.latlngToPix(g.Lat,g.Lon);var b={};if(j-this.basezoom<=0){b.x=a.x*Math.pow(0.5,this.basezoom-j);b.y=a.y*Math.pow(0.5,this.basezoom-j);}else{b.x=a.x*Math.pow(2,j-this.basezoom);b.y=a.y*Math.pow(2,j-this.basezoom);}a=b;if(f&&c){var i=new Y.Point(a.x+c.left+f.left,a.y+c.top+f.top);var h=this.map.fromPagePixelToContainerPixel(i);
var g=this.map.fromContainerPixelToLatLng(h);return g;}};ImageMapMixerLayer.prototype.convertFeatures=function(b,a,i){var h=this;var c=this.map.getZoom();try{if(i&&i.position){var g=this.map.mapContainer.offset();var f=i.position();}}catch(d){}$.each(b,function(j,m){var o=m.getLatLng();var n=a.latlngToPix(o.Lat,o.Lon);var l={};if(c-h.basezoom<=0){l.x=n.x*Math.pow(0.5,h.basezoom-c);l.y=n.y*Math.pow(0.5,h.basezoom-c);
}else{l.x=n.x*Math.pow(2,c-h.basezoom);l.y=n.y*Math.pow(2,c-h.basezoom);}n=l;if(g&&f){var e=new Y.Point(n.x+f.left+g.left,n.y+f.top+g.top);var k=h.map.fromPagePixelToContainerPixel(e);var o=h.map.fromContainerPixelToLatLng(k);if(m.isMixer!=true){m.setLatLng(o);m.isMixer=true;}}});return b;};ImageMapMixerLayer.prototype.getImageCenter=function(){var a=this.fromLatLngToImagePoint(this.map.getCenter());
var b=this.mixer.pixToLatLng(a.x,a.y);if(b&&b.x&&b.y){return new Y.LatLng(b.x,b.y);}else{return this.basecenter;}};ImageMapMixerLayer.prototype.remove=function(){var e=this;var c=this.map.getLayerSets();for(var d in this.map.getLayerSets()){for(var b in c[d].getLayers()){var a=c[d].getLayers()[b];if(a.removeImageMapLayer){a.removeImageMapLayer();}}}if(this.evtZoomend){this.map.unbind(this.evtZoomend);
}if(this.evtLayerSetChanged){this.map.unbind(this.evtLayerSetChanged);}if(this.basecenter){this.map.panTo(this.getImageCenter());}if(this.basezoom){}if(this.imgnode){this.imgnode.remove();}FeatureLayer.prototype.remove.apply(this);};var ImageMapAnchorLayer=Y.ImageMapAnchorLayer=Y.extend(Y.ImageMapLayer,function(b,a){Y.Layer.apply(this,[name,{}]);this.imageurl=b;this.anchors=[];this.basezoom=10;});ImageMapAnchorLayer.prototype.initialize=function(a){ImageMapLayer.prototype.initialize.apply(this,[a]);var b=this;if(this.evtDblClick){Y.Event.removeListener(this.evtDblClick);}this.evtDblClick=Y.Event.addListener(this,"dblclick",function(c){var d=b.addAnchor(c);
});};ImageMapAnchorLayer.prototype.initImage=function(){Y.ImageMapLayer.prototype.initImage.apply(this);this.container.css({zIndex:10});};ImageMapAnchorLayer.prototype.getCustomIcon=function(b){var a=++b;if(b<100&&b>=10){a="0"+b;}else{if(b<10){a="00"+b;}}var d="http://i.yimg.jp/images/clear.gif";var c=new Y.Icon("");c.iconHtml=$('<img src="'+d+'" class="ic_p'+a+'" alt=""/>').loadAlphaImage();c.iconSize=new Y.Size(24,35);
c.iconAnchor=new Y.Point(12,35);c.labelAnchor=new Y.Point(12,-22);c.infoWindowAnchor=new Y.Point(12,0);return c;};ImageMapAnchorLayer.prototype.addAnchor=function(a,c){var f=this.map.getCenter();var e=this.features.length;var d=this.getCustomIcon(e);if(a){f=this.fromImagePointToLatLng(a);}if(this.features.length>=100){Y.Event.trigger(this,"overflow");return;}var b=new Y.Marker(f,{draggable:true,icon:d});
b.number=e;var g=this;b.bind("rightclick",function(){g.removeAnchor(b.number);});this.addFeature(b);if(c!==true){Y.Event.trigger(this,"addanchor");}return b;};ImageMapAnchorLayer.prototype.removeAnchor=function(a,b){this.removeFeature(this.features[a]);this.drawAnchor();Y.Event.trigger(this,"removeanchor",a);};ImageMapAnchorLayer.prototype.drawAnchor=function(){var c=this;for(var a=0;a<this.features.length;
a++){var b=this.getCustomIcon(a);this.features[a].setIcon(b);this.features[a].setDraggable(true);this.features[a].number=a;}this.draw(true);};ImageMapAnchorLayer.prototype.getAnchors=function(){var b=this;var a=[];$.each(this.features,function(c,d){a.push(b.fromLatLngToImagePoint(d.getLatLng()));});return a;};ImageMapAnchorLayer.prototype.sync=function(a){var b=this;if(!this.synchronizedLayer){if(this.evtAddFeature){Y.Event.removeListener(this.evtAddFeature);
}if(this.evtRemoveFeature){Y.Event.removeListener(this.evtRemoveFeature);}this.synchronizedLayer=a;a.sync(this);this.evtAddFeature=Y.Event.addListener(this,"addanchor",function(){if(b.synchronizedLayer.features.length!=b.features.length){b.synchronizedLayer.addAnchor();}});this.evtRemoveFeature=Y.Event.addListener(this,"removeanchor",function(c){if(b.synchronizedLayer.features.length!=b.features.length){b.synchronizedLayer.removeAnchor(c,false);
}});}};var AnchorLayer=Y.AnchorLayer=Y.extend(Y.FeatureLayer,function(a){this.features=[];Layer.apply(this,[a,{}]);});AnchorLayer.prototype.initialize=function(){FeatureLayer.prototype.initialize.apply(this,arguments);var a=this;this.map.bind("dblclick",function(b){a.addAnchor(b);});};AnchorLayer.prototype.addAnchor=function(e,b){if(!e){e=this.map.getCenter();}if(this.features.length>=100){Y.Event.trigger(this,"overflow");
return;}var f=this;var d=this.features.length;var c=this.getCustomIcon(d);var a=new Y.Marker(e,{draggable:true,icon:c});a.number=d;this.addFeature(a);if(b!==true){Y.Event.trigger(this,"addanchor");}a.bind("rightclick",function(){f.removeAnchor(a.number);});};AnchorLayer.prototype.removeAnchor=function(a){this.removeFeature(this.features[a]);this.drawAnchor();Y.Event.trigger(this,"removeanchor",a);};
AnchorLayer.prototype.getCustomIcon=function(b){var a=++b;if(b<100&&b>=10){a="0"+b;}else{if(b<10){a="00"+b;}}var d="http://i.yimg.jp/images/clear.gif";var c=new Y.Icon("");c.iconHtml=$('<img src="'+d+'" class="ic_r'+a+'" alt=""/>').loadAlphaImage();c.iconSize=new Y.Size(24,35);c.iconAnchor=new Y.Point(12,35);c.labelAnchor=new Y.Point(12,-22);c.infoWindowAnchor=new Y.Point(12,0);return c;};AnchorLayer.prototype.drawAnchor=function(){var c=this;
for(var a=0;a<this.features.length;a++){var b=this.getCustomIcon(a);this.features[a].setIcon(b);this.features[a].setDraggable(true);this.features[a].number=a;}this.draw(true);};AnchorLayer.prototype.getAnchors=function(){var a=[];$.each(this.features,function(b,c){a.push(c.getLatLng());});return a;};AnchorLayer.prototype.sync=function(a){var b=this;if(!this.synchronizedLayer){if(this.evtAddFeature){Y.Event.removeListener(this.evtAddFeature);
}if(this.evtRemoveFeature){Y.Event.removeListener(this.evtRemoveFeature);}this.synchronizedLayer=a;a.sync(this);this.evtAddFeature=Y.Event.addListener(this,"addanchor",function(){if(b.synchronizedLayer.features.length!=b.features.length){b.synchronizedLayer.addAnchor();}});this.evtRemoveFeature=Y.Event.addListener(this,"removeanchor",function(c){if(b.synchronizedLayer.features.length!=b.features.length){b.synchronizedLayer.removeAnchor(c);
}});}};var Anchor=Y.Anchor=function(a){this.options=a||{};};Anchor.prototype.getMixer=function(d,a,c){var b=this;this.request(d,a,function(f,q){var h=new MapMixer();var e={lat:0,lon:0};for(var n=0;n<f.length;n++){var p=[];var s=[];if(n>=2){for(var l=n-2;l<=n;l++){var m=f[l];p.push({x:m.point.x,y:m.point.y});s.push({x:m.latlng.lat(),y:m.latlng.lng()});}h.addParam(p,s);}e.lat+=f[n].latlng.lat();e.lon+=f[n].latlng.lng();
}e.lat/=f.length;e.lon/=f.length;e=new Y.LatLng(e.lat,e.lon);if(f.length>3){var k=f[0];var g=f[f.length-1];for(var n=1;n<f.length-2;n++){var m=f[n];var p=[];var s=[];p.push({x:k.point.x,y:k.point.y});s.push({x:k.latlng.lat(),y:k.latlng.lng()});p.push({x:g.point.x,y:g.point.y});s.push({x:g.latlng.lat(),y:g.latlng.lng()});p.push({x:m.point.x,y:m.point.y});s.push({x:m.latlng.lat(),y:m.latlng.lng()});h.addParam(p,s);
}}var o=f.length-3;for(n=0;n<o;n++){var r=b.getRandom(f.length,3);var k=f[r[0]];var m=f[r[1]];var g=f[r[2]];var p=[];var s=[];p.push({x:k.point.x,y:k.point.y});s.push({x:k.latlng.lat(),y:k.latlng.lng()});p.push({x:g.point.x,y:g.point.y});s.push({x:g.latlng.lat(),y:g.latlng.lng()});p.push({x:m.point.x,y:m.point.y});s.push({x:m.latlng.lat(),y:m.latlng.lng()});h.addParam(p,s);}c(h,q,e);});};Anchor.prototype.getRandom=function(a,f){var e=new Array();
var b=new Array();for(var c=0;c<a;c++){b.push(c);}var g=0;while(g<3){var d=Math.floor(Math.random()*(a-1));if(b[d]!=-1){e.push(b[d]);g++;}b[d]=-1;}return e;};Anchor.prototype.request=function(f,c,e,b){var a="http://"+Y.HOST_NAME+"/OpenLocalPlatform/V1/anchor";var d={cid:f,method:c.method||"",points:c.points||"",latlngs:c.latlngs||"",imageurl:c.imageurl||""};$.ajax({url:a,data:d,dataType:"jsonp",success:function(h){if(h&&h.points){var k=h.points;
var g=h.latlngs;var m=h.imageurl;var l=[];for(var j=0;j<k.length;j++){if(j%2==1){l.push({point:new Y.Point(k[j-1]*1,k[j]*1),latlng:new Y.LatLng(g[j-1],g[j])});}}e(l,m);}},error:function(){b();}});};var MapAnnotationPlugin=Y.MapAnnotationPlugin=Y.extend(Y.Plugin,function(a){this.configs=a||{};if(typeof a.match!=="function"){throw new Error("callback 'match' parameter is not a function object.");}a.object=a.object||window;a.threshold=(typeof a.threshold==="number"&&a.threshold>0)?a.threshold:16;a.isRaw=(typeof a.isRaw!=="undefined")?a.isRaw:false;this.enable=true;this.loaded=false;});MapAnnotationPlugin.prototype.getName=function(){return"MapAnnotationPlugin";
};MapAnnotationPlugin.prototype.load=function(d){if(this.loaded){return;}this.map=d;var c=this.configs;var b={threshold:c.threshold,isRaw:c.isRaw};var a=this.clickableLayer=new Y.AnnotationClickableLayer("MapAnnotationPluginLayer",b);a.bind("match",c.match,c.object);if(typeof c.noMatch==="function"){a.bind("nomatch",c.noMatch,c.object);}if(typeof c.error==="function"){a.bind("error",c.error,c.object);
}a.onClickTile=this.mapClickHandler;d.addLayer(a);this.loaded=true;};MapAnnotationPlugin.prototype.setEnable=function(c){if(!this.loaded){return;}this.enable=c;var b=this.clickableLayer,a=b.isActivated();if(c&&!a){b.activate();}else{if(!c&&a){b.deactivate();}}};MapAnnotationPlugin.prototype.getEnable=function(){return this.enable;};MapAnnotationPlugin.prototype.mapClickHandler=function(b){var a=Y.AnnotationClickableLayer.prototype.onClickTile;
a.call(this,b);};MapAnnotationPlugin.prototype.search=function(a){};MapAnnotationPlugin.prototype.unload=function(){if(this.loaded){this.map.removeLayer(this.clickableLayer);}this.loaded=false;};var ListingTabPlugin=Y.ListingTabPlugin=Y.extend(Y.Plugin,function(a){this.enable=true;this.layers=a.layers||{};this.list=a.list;this.tab=$("#"+a.tab);this.params=a||{};this.loading=true;this.auto=a.auto===undefined?true:a.auto;});ListingTabPlugin.prototype.getName=function(){return"ListingTabPlugin";};ListingTabPlugin.prototype.getCurrentLayer=function(){return this.currentlayer;};ListingTabPlugin.prototype.load=function(a){this.map=a;
var b=this;if(this.layers.length==1){this.currentlayer=this.layers[0].layer;this.currentidx=0;this.changeLayer(0);}else{$.each(this.layers,function(c,d){if(d.layer==b.params.current){b.changeLayer(c);b.currentidx=c;}Y.Event.addListener(d.layer,"drawstart",function(){if(b.evtDrawendLazy){clearTimeout(b.evtDrawendLazy);}b.loading=true;});Y.Event.addListener(d.layer,"drawend",function(){b.loading=false;
});});}this.loaded=true;};ListingTabPlugin.prototype.showTab=function(){var a=this;this.tab.addClass("preview-list-menu");this.tab.html("");$.each(this.layers,function(b,c){var d=$("<li></li>");if(b==a.currentidx){d.addClass("current");d.append($("<em>"+c.name+"</em>"));}else{d.append($("<a href='javascript:void(0);'>"+a.shortName(c.name,10)+"</a>").click(function(){return(function(e){if(!a.loading){a.changeLayer(e);
Event.trigger(a,"layerchange",a.currentlayer);}})(b);}));}a.tab.append(d);});};ListingTabPlugin.prototype.shortName=function(a,b){if(a.length>b){return a.substr(0,b)+"...";}return a;};ListingTabPlugin.prototype.changeLayer=function(a){this.currentidx=a;if(this.currentlayer){this.map.removeLayer(this.currentlayer);this.list.removeLayer(this.currentlayer);}this.currentlayer=this.layers[a].layer;this.map.addLayer(this.currentlayer);
this.list.addLayer(this.currentlayer);if(this.auto){this.currentlayer.setAutoPanMap(false);this.currentlayer.setAutoUpdate(true);}this.currentlayer.execute({query:this.layers[a].default_query});if(this.layers.length>1){this.showTab();}};ListingTabPlugin.prototype.unload=function(){if(this.loaded){if(this.currentlayer){this.map.removeLayer(this.currentlayer);this.list.removeLayer(this.currentlayer);
}this.tab.html("");}this.loaded=false;};var GeoXmlPlugin=Y.GeoXmlPlugin=Y.extend(Y.Plugin,function(b,a){this.url=b;this.options=a||{};this.loading=true;});GeoXmlPlugin.prototype.getName=function(){return"GeoXmlPlugin";};GeoXmlPlugin.prototype.getCurrentLayer=function(){return this.currentlayer;};GeoXmlPlugin.prototype.load=function(a){this.map=a;var b=this;this.iconlayer=new Y.GeoXmlLayer(this.url);this.iconlayer.fitToMap=function(){};this.heatlayer=new Y.GeoXmlHeatmapLayer(this.url,this.options);
if(this.options.heat){this.currentlayer=this.heatlayer;}else{this.currentlayer=this.iconlayer;}this.map.addLayer(this.currentlayer);if(!this.options.heat){this.currentlayer.execute();}this.control=new Y.GeoXmlHeatSwitchControl({icon:this.iconlayer,heat:this.heatlayer});a.addControl(this.control);this.loaded=true;};GeoXmlPlugin.prototype.unload=function(){if(this.loaded){this.map.removeLayer(this.heatlayer);
this.map.removeLayer(this.iconlayer);this.map.removeControl(this.control);}this.loaded=false;};var RouteSearchPlugin=Y.RouteSearchPlugin=Y.extend(Y.Plugin,function(c){this.loaded=false;this.ROUTE_ICON_URL="http://i.yimg.jp/images/map/api/yolp/images/yolp_icn.png";c=c||{};this.latlngs=c.latlngs||[];this.markerDraggable=typeof(c.markerDraggable)!="undefined"?c.markerDraggable:true;this.routeEditable=typeof(c.routeEditable)!="undefined"?c.routeEditable:true;this.maxDistance=c.maxDistance||1000;
this.enableDeform=typeof(c.enableDeform)!="undefined"?c.enableDeform:true;this.strokeStyle=c.strokeStyle||new Y.Style("ff0000",4,0.75);this.enableVia=typeof(c.enableVia)!="undefined"?c.enableVia:true;this.maxVia=c.maxVia||0;this.useNowloading=typeof(c.useNowloading)!="undefined"?c.useNowloading:true;var b=typeof(c.startIcon)!="undefined"?c.startIcon:new Y.Icon("",{iconHtml:this.getIconHtml(f,new Y.Point(152,0),new Y.Size(24,35)),labelAnchor:new Y.Point(13,-17),iconAnchor:new Y.Point(12,35)});
var d=typeof(c.goalIcon)!="undefined"?c.goalIcon:new Y.Icon("",{iconHtml:this.getIconHtml(f,new Y.Point(152,36),new Y.Size(24,35)),labelAnchor:new Y.Point(13,-17),iconAnchor:new Y.Point(12,35)});var a=typeof(c.viaIcon)!="undefined"?c.viaIcon:new Y.Icon("",{iconHtml:this.getIconHtml(f,new Y.Point(0,191),new Y.Size(20,26)),labelAnchor:new Y.Point(10,-15),iconAnchor:new Y.Point(10,28)});if(Y.Util.Platform.isIOS||Y.Util.Platform.isAndroid){this.SmartDevice=true;
}else{this.SmartDevice=false;}this.current=null;this.currentMarker=null;this.markerTouchDragging=false;this.requestingCount=0;this.enable=true;this.noRequest=false;var f=this.ROUTE_ICON_URL;this.start={latlng:null,address:null,marker:null,markerOption:{id:"startpoint",icon:b,clickable:true,draggable:this.markerDraggable}};this.goal={latlng:null,address:null,marker:null,markerOption:{id:"goalpoint",icon:d,clickable:true,draggable:this.markerDraggable}};
this.via={points:[],markerOption:{id:"viapoint*",icon:a,clickable:true,draggable:this.markerDraggable}};var e={iconSize:new Y.Size(16,16),iconAnchor:new Y.Point(0,16),labelAnchor:new Y.Point(17,-8)};this.guideNormalIcon=new Y.Icon("http://i.yimg.jp/images/map/flashapi/icon/pin_b_4.gif",e);this.guideRestrictIcon=new Y.Icon("http://i.yimg.jp/images/map/flashapi/icon/pin_b_2.gif",e);this.dragViaMarker=null;
this.dragViaMarkerOption={id:"dragvia",icon:new Y.Icon("http://i.yimg.jp/images/map/api/yolp/images/yolp_dragging_via.png",{iconSize:new Y.Size(13,13),iconAnchor:new Y.Point(6.5,6.5)}),clickable:true,draggable:true};this.dragViaMarkerTimer=null;this.params={};});RouteSearchPlugin.prototype.getIconHtml=function(b,g,c){var e=new Y.Point(152,0),a=new Y.Point(152,36),f=new Y.Point(0,191);if(g.equals(e)){return this.createStartIconHtml();
}else{if(g.equals(a)){return this.createEndIconHtml();}else{if(g.equals(f)){return this.createViaIconHtml();}}}var d="";d+='<div style="';d+="background-image:URL("+b+");";d+="background-position:"+(g.x*-1)+"px "+(g.y*-1)+"px;";d+="width:"+c.width+"px;";d+="height:"+c.height+"px;";d+='"></div>';return d;};RouteSearchPlugin.prototype.createStartIconHtml=function(){return'<p class="yolp-sicn"><img src="'+this.ROUTE_ICON_URL+'"></p>';
};RouteSearchPlugin.prototype.createEndIconHtml=function(){return'<p class="yolp-gicn"><img src="'+this.ROUTE_ICON_URL+'"></p>';};RouteSearchPlugin.prototype.createViaIconHtml=function(){return'<p class="yolp-rtlistnum0"><img src="'+this.ROUTE_ICON_URL+'"></p>';};RouteSearchPlugin.prototype.load=function(t){this.map=t;this.reqlayer=new Y.FeatureLayer("routesearch_plugin_request");this.map.addLayer(this.reqlayer);
var q=this;var n={enableMarker:false,enableDeform:this.enableDeform,strokeStyle:this.strokeStyle,routeEvents:{mouseover:function(x,m){var i=q.cache.getParams("order");var w=i!==false?i:0;if(q.routeEditable&&q.enable&&w===0){q.onPolylineMouseOver(x,m);}}}};this.reslayer=new Y.RouteSearchLayer(n);this.map.addLayer(this.reslayer);this.cache=this.reslayer.cache;this.menu=$('<div class="yolp-route-cassette" id="routesearch_plugin_contextmenu"></div>');
this.menu.bind("mousedown",function(i){i.cancelBubble=true;if(i.stopPropagation){i.stopPropagation();}});var f=false;this.menu.bind("mouseover",function(){f=false;});this.menu.bind("mouseleave",function(){f=true;setTimeout(function(){if(f){q.closeMenu();f=true;}},500);});this.menu.bind("contextmenu",function(){return false;});var p="";p+="<ul>";p+='<li class="yolp-route-cassette-start"><a href="javascript:void(0);" id="routesearch_plugin_setcoord_s"><span>\u51fa\u767a</span>\u5730\u70b9\u306b\u8a2d\u5b9a</a></li>';
p+='<li class="yolp-route-cassette-arrival"><a href="javascript:void(0);" id="routesearch_plugin_setcoord_g"><span>\u5230\u7740</span>\u5730\u70b9\u306b\u8a2d\u5b9a</a></li>';if(this.enableVia){p+='<li class="yolp-route-cassette-via"><a href="javascript:void(0);" id="routesearch_plugin_setcoord_v"><span>\u7d4c\u7531</span>\u5730\u70b9\u3092\u8ffd\u52a0</a></li>';}p+="</ul>";p+="<ul>";p+='<li class="yolp-route-cassette-clear" style="display:none;"><a href="javascript:void(0);" id="routesearch_plugin_rmvcoord">\u3053\u306e\u5730\u70b9\u3092\u524a\u9664</a></li>';
p+='<li class="yolp-route-cassette-clear"><a href="javascript:void(0);" id="routesearch_plugin_clearcoord">\u5730\u70b9\u3092\u30af\u30ea\u30a2</a></li>';p+='<li class="yolp-route-cassette-clear"><a href="javascript:void(0);" id="routesearch_plugin_clearroute">\u7d4c\u8def\u3092\u30af\u30ea\u30a2</a></li>';p+='<li class="yolp-route-cassette-clear"><a href="javascript:void(0);" id="routesearch_plugin_clearall">\u3059\u3079\u3066\u30af\u30ea\u30a2</a></li>';p+="</ul>";p+='<p class="yolp-route-cassette-setting"><a href="javascript:void(0);" id="routesearch_plugin_setdetail">\u8a73\u7d30\u8a2d\u5b9a</a></p>';
this.menu.html(p);this.menu.css({position:"absolute",left:"0px",top:"0px","z-index":"2"});$("#routesearch_plugin_rmvcoord").parent().hide();this.map.mainContainer.append(this.menu);this.closeMenu(false);if(!this.SmartDevice){this.map_oncontextmenu=function(i){q.onMapRightClick(i);};this.map.mapContainer.bind("contextmenu",this.map_oncontextmenu);}else{this.map_onclick=this.map.bind("click",this.onMapClick,this);
}this.onmovestart=this.map.bind("movestart",this.closeMenu,this);if(!this.SmartDevice){$("#routesearch_plugin_setdetail").click(function(){q.openOptionMenu();q.closeMenu();return false;});}else{if(!this.map.configure.holdSupport){this.map.setConfigure("holdSupport",true);}this.map_onhold=this.map.bind("hold",this.openOptionMenu,this);}$("#routesearch_plugin_clearcoord").click(function(){q.clearPoints();
q.closeMenu();return false;});$("#routesearch_plugin_clearroute").click(function(){q.clearRoute();q.closeMenu();return false;});$("#routesearch_plugin_clearall").click(function(){q.clearPoints();q.clearRoute();q.closeMenu();return false;});$("#routesearch_plugin_setcoord_s").click(function(){q.setStartPoint();return false;});$("#routesearch_plugin_setcoord_g").click(function(){q.setGoalPoint();return false;
});$("#routesearch_plugin_setcoord_v").click(function(){q.addViaPoint();return false;});$("#routesearch_plugin_rmvcoord").click(function(){q.removePoint();return false;});this.optionMenu=$('<div class="yolp-route-cassette-detail"></div>');this.optionMenu.css({position:"absolute",left:"2px",bottom:"18px","z-index":"1"});this.optionMenu.bind("mousedown",function(i){i.cancelBubble=true;if(i.stopPropagation){i.stopPropagation();
}});this.optionMenu.bind("contextmenu",function(){return false;});this.map.mainContainer.append(this.optionMenu);this.closeOptionMenu();var l="";l+="<ul>";l+="<li>";l+='<p class="title">\u7d4c\u7531\u5730\u70b9\u3092\u56de\u308b\u9806</p>';l+='<p><label><input type="radio" checked="checked" value="0" name="order">\u6307\u5b9a\u3057\u305f\u9806</label>';l+='<label><input type="radio" class="mar" value="1" name="order">\u6700\u9069\u306a\u9806</label></p>';l+="</li>";l+="<li>";l+='<p class="title">\u4ea4\u901a\u624b\u6bb5</p>';
l+='<p><label><input type="radio" checked="checked" value="car" name="traffic">\u8eca</label>';l+='<label><input type="radio" class="mar" value="walk" name="traffic">\u5f92\u6b69</label></p>';l+="</li>";l+="<li>";l+='<p class="title">\u512a\u5148\u9805\u76ee</p>';l+='<p><label><input type="radio" checked="checked" value="time" name="priority">\u6642\u9593</label>';l+='<label><input type="radio" class="mar" value="dist" name="priority">\u8ddd\u96e2</label>';
l+="</p>";l+="</li>";l+="<li>";l+='<p class="title">\u4ea4\u901a\u898f\u5236</p>';l+='<p><label><input type="radio" checked="checked" value="0" name="restrict">\u306a\u3057</label>';l+='<label><input type="radio" class="mar" value="1" name="restrict">\u3042\u308a</label></p>';l+="</li>";l+="";l+="<li>";l+='<p class="title">\u30d5\u30a7\u30ea\u30fc</p>';l+='<p><label><input type="radio" value="0" name="ferry">\u4f7f\u7528\u3057\u306a\u3044</label>';l+='<label><input type="radio" checked="checked" class="mar" value="1" name="ferry">\u6700\u4f4e\u9650\u4f7f\u7528\u3059\u308b</label>';
l+='<label><input type="radio" class="mar" value="2" name="ferry">\u4f7f\u7528\u3059\u308b</label></p>';l+="</li>";l+="";l+="<li>";l+='<p class="title">\u6709\u6599\u9053\u8def</p>';l+='<p><label><input type="radio" value="0" name="tollway">\u4f7f\u7528\u3057\u306a\u3044</label>';l+='<label><input type="radio" class="mar" value="1" name="tollway">\u6700\u4f4e\u9650\u4f7f\u7528\u3059\u308b</label>';l+='<label><input type="radio" checked="checked" class="mar" value="2" name="tollway">\u4f7f\u7528\u3059\u308b</label></p>';
l+="</li>";l+="";l+='<li class="end">';l+='<p><input type="submit" value=" \u8a2d\u5b9a\u3057\u3066\u9589\u3058\u308b " class="set" id="routesearch_plugin_settingend">';l+='<input type="submit" value=" \u518d\u63a2\u7d22 " class="close" id="routesearch_plugin_search">';l+="</p>";l+="</li>";l+="</ul>";this.optionMenu.html(l);$("#routesearch_plugin_search").click(function(i){q.params=q.getRequestOptionByMenu();q.search();});$("#routesearch_plugin_settingend").click(function(){q.params=q.getRequestOptionByMenu();
q.closeMenu(false);q.closeOptionMenu(false);});var v=this.map.getSize();var a="http://i.yimg.jp/images/map/api/yolp/images/yolp_loading.gif";var u=new Y.Size(37,38);var k=v.width/2-u.width/2;var h=v.height/2-u.height/2;this.nowloading=$("<div></div>");this.nowloadingImg=$('<img src="'+a+'" width="'+u.width+'" height="'+u.height+'"/>');this.nowloading.css({top:h+"px",left:k+"px","z-index":"2",width:u.width,height:u.height,position:"absolute"});
this.map.mainContainer.append(this.nowloading);this.nowloadingTimer=null;this.reslayer.bind("drawend",this.onRequestEnd,this);this.reslayer.bind("error",function(i){alert(i.message);this.onRequestEnd();},this);if(this.latlngs.length>1){this.current=this.latlngs[0];this.setStartPoint();var r,j;for(r=1,j=this.latlngs.length-1;r<j;++r){this.current=this.latlngs[r];this.addViaPoint();}this.current=this.latlngs[this.latlngs.length-1];
this.setGoalPoint();var d=this.start.latlng,b=this.goal.latlng;var s,o,g,c;if(d.lat()>b.lat()){s=b.lat();g=d.lat();}else{s=d.lat();g=b.lat();}if(d.lng()>b.lng()){o=b.lng();c=d.lng();}else{o=d.lng();c=b.lng();}var e=new Y.LatLngBounds(new Y.LatLng(s,o),new Y.LatLng(g,c));t.drawBounds(e);}this.latlngs=[];this.loaded=true;Y.Event.trigger(this,"loaded");};RouteSearchPlugin.prototype.unload=function(){if(this.loaded){this.clearPoints();
this.clearRoute();this.map.unbind(this.onmovestart);if(this.map_oncontextmenu){this.map.mapContainer.unbind("contextmenu",this.map_oncontextmenu);this.map_oncontextmenu=null;}else{if(this.map_onclick){this.map.unbind(this.map_onclick);this.map_onclick=null;}}if(this.map_onhold){this.map.unbind(this.map_onhold);}if(this.menu){this.menu.remove();this.menu=null;}this.map.removeLayer(this.reqlayer);this.map.removeLayer(this.reslayer);
if(this.optionMenu){this.optionMenu.remove();this.optionMenu=null;}this.nowloading.remove();this.nowloading=null;Y.Event.trigger(this,"unloaded");}this.loaded=false;};RouteSearchPlugin.prototype.getName=function(){return"RouteSearchPlugin";};RouteSearchPlugin.prototype.setEnable=function(a){if(!this.loaded){return;}this.enable=a;if(this.start.marker){this.start.marker.setDraggable(a);}if(this.goal.marker){this.goal.marker.setDraggable(a);
}if(this.via.points.length>0){for(var c=0,b=this.via.points.length;c<b;++c){this.via.points[c].marker.setDraggable(a);}}if(!a){if(this.isVisibleMenu()){this.closeMenu();}if(this.isVisibleOptionMenu()){this.closeOptionMenu();}if(this.dragViaMarker){this.removeDragViaMarker();}}};RouteSearchPlugin.prototype.getEnable=function(){return this.enable;};RouteSearchPlugin.prototype.onMapRightClick=function(b){if(!this.enable||this.isVisibleOptionMenu()){return;
}this.closeMenu();var a=null;if(b&&b.pageX&&b.pageY){a=this.map.fromPagePixelToContainerPixel(new Y.Point(b.pageX,b.pageY));this.openMenu(a);}};RouteSearchPlugin.prototype.onMapClick=function(c){if(!this.enable||this.isVisibleOptionMenu()){return;}this.current=c;if(!this.start.latlng){this.setStartPoint();}else{if(this.goal.latlng&&this.enableVia){if(this.maxVia===0||this.via.points.length<this.maxVia){var a=this.goal.latlng;
var b=c;this.current=a;this.noRequest=true;this.addViaPoint();this.noRequest=false;this.current=b;this.setGoalPoint();}else{this.setGoalPoint();}}else{this.setGoalPoint();}}};RouteSearchPlugin.prototype.onMarkerRightClick=function(c){if(!this.enable||this.isVisibleOptionMenu()){return;}this.closeMenu();var b=null;if(c&&c.pageX&&c.pageY){b=this.map.fromPagePixelToContainerPixel(new Y.Point(c.pageX,c.pageY));
this.openMenu(b);var d=this;var a=setInterval(function(){if(d.isVisibleMenu()){clearInterval(a);$("#routesearch_plugin_rmvcoord").parent().show();}},10);}};RouteSearchPlugin.prototype.onPolylineMouseOver=function(f,b){var d=Number(b.id.replace("route",""));this.closeMenu();var c=this.map.fromPagePixelToContainerPixel(new Y.Point(f.pageX,f.pageY));var a=this.map.fromContainerPixelToLatLng(c);if(this.dragViaMarker){this.reslayer.removeFeature(this.dragViaMarker);
this.dragViaMarker=null;}this.dragViaMarker=new Y.Marker(a,this.dragViaMarkerOption);this.dragViaMarker.bind("mouseout",function(){var e=this;this.dragViaMarkerTimer=setTimeout(function(){e.removeDragViaMarker();},1500);},this);this.dragViaMarker.bind("mouseover",function(){$(this.dragViaMarker.getDOMNode()).css("cursor","pointer");if(this.dragViaMarkerTimer){clearTimeout(this.dragViaMarkerTimer);this.dragViaMarkerTimer=null;
}},this);this.dragViaMarker.bind("dragstart",function(){if(this.dragViaMarkerTimer){clearTimeout(this.dragViaMarkerTimer);this.dragViaMarkerTimer=null;}$(this.dragViaMarker.getDOMNode()).css("cursor","pointer");},this);this.dragViaMarker.bind("dragend",function(){if(this.dragViaMarker){this.current=this.dragViaMarker.getLatLng();this.reslayer.removeFeature(this.dragViaMarker);this.dragViaMarker=null;
this.insertViaPoint(d,true);}},this);this.reslayer.addFeature(this.dragViaMarker);};RouteSearchPlugin.prototype.removeDragViaMarker=function(){this.reslayer.removeFeature(this.dragViaMarker);this.dragViaMarker=null;};RouteSearchPlugin.prototype.openMenu=function(a){this.current=this.map.fromContainerPixelToLatLng(a);this.menu.css({top:a.y+"px",left:a.x+"px"});if(this.enableVia){$("#routesearch_plugin_setcoord_v").parent().show();
if(this.maxVia!==0&&(this.maxVia<=this.via.points.length)){$("#routesearch_plugin_setcoord_v").parent().hide();}}this.menu.show();};RouteSearchPlugin.prototype.closeMenu=function(a){if(this.isVisibleMenu()){$("#routesearch_plugin_rmvcoord").parent().hide();if(a){this.menu.hide("slow");}else{this.menu.hide();}}};RouteSearchPlugin.prototype.isVisibleMenu=function(){return(this.menu&&this.menu.css("display")=="block")?true:false;
};RouteSearchPlugin.prototype.openOptionMenu=function(){this.optionMenu.show();};RouteSearchPlugin.prototype.closeOptionMenu=function(){this.optionMenu.hide();};RouteSearchPlugin.prototype.isVisibleOptionMenu=function(){return(this.optionMenu&&this.optionMenu.css("display")=="block")?true:false;};RouteSearchPlugin.prototype.setRequestOption=function(a){this.params=a;};RouteSearchPlugin.prototype.getRequestOptionByMenu=function(){var a={};
if($("input[name='order']:checked").val()!="0"){a.order=$("input[name='order']:checked").val();}if($("input[name='traffic']:checked").val()!="car"){a.traffic=$("input[name='traffic']:checked").val();}if($("input[name='priority']:checked").val()!="time"){a.priority=$("input[name='priority']:checked").val();}if($("input[name='restrict']:checked").val()!="0"){a.restrict=$("input[name='restrict']:checked").val();
}if($("input[name='ferry']:checked").val()!="1"){a.ferry=$("input[name='ferry']:checked").val();}if($("input[name='tollway']:checked").val()!="2"){a.tollway=$("input[name='tollway']:checked").val();}return a;};RouteSearchPlugin.prototype.setStartPoint=function(){var a=this.current;if(this.start.marker){this.reqlayer.removeFeature(this.start.marker);}this.start.latlng=a;this.start.marker=new Y.Marker(a,this.start.markerOption);
this.reqlayer.addFeature(this.start.marker);if(this.SmartDevice){this.initMarkerTouchEventHandler(this.start.marker);}this.initPointMarkerEvent(this.start.marker,arguments.callee);this.closeMenu();this.setAddressTooltip(a,this.start,"\u51fa\u767a");this.search();};RouteSearchPlugin.prototype.setGoalPoint=function(){var a=this.current;if(this.goal.marker){this.reqlayer.removeFeature(this.goal.marker);}this.goal.latlng=a;
this.goal.marker=new Y.Marker(a,this.goal.markerOption);this.reqlayer.addFeature(this.goal.marker);if(this.SmartDevice){this.initMarkerTouchEventHandler(this.goal.marker);}this.initPointMarkerEvent(this.goal.marker,arguments.callee);this.closeMenu();this.setAddressTooltip(a,this.goal,"\u5230\u7740");this.search();};RouteSearchPlugin.prototype.addViaPoint=function(){this.insertViaPoint("last");};RouteSearchPlugin.prototype.insertViaPoint=function(a){var e=this.current;
var c=new Y.Marker(e,this.via.markerOption);var d;if(a==="last"){this.via.points.push({marker:c,latlng:e});d=this.via.points.length-1;}else{this.via.points.splice(a,0,{marker:c,latlng:e});d=a;}for(var b=0;b<this.via.points.length;b++){this.via.points[b].marker.id="viapoint"+b;}this.reqlayer.addFeature(this.via.points[d].marker);if(this.SmartDevice){this.initMarkerTouchEventHandler(c);}this.initPointMarkerEvent(c,this.onViaMarkerDragEnd);
this.closeMenu();this.setAddressTooltip(e,this.via.points[d],"\u7d4c\u7531");if(!this.noRequest){this.search();}this.noRequest=false;};RouteSearchPlugin.prototype.onViaMarkerDragEnd=function(a){var f=null;for(var c=0;c<this.via.points.length;c++){if(a.id===this.via.points[c].marker.id){f=this.via.points[c];break;}}var d=a.id;var e=a.getLatLng();this.reqlayer.removeFeature(a);var b=new Y.Marker(e,this.via.markerOption);
b.id=d;f.marker=b;f.latlng=e;this.reqlayer.addFeature(b);if(this.SmartDevice){this.initMarkerTouchEventHandler(b);}this.initPointMarkerEvent(b,arguments.callee);this.setAddressTooltip(e,f,"\u7d4c\u7531");this.search();};RouteSearchPlugin.prototype.removePoint=function(){var b=this.currentMarker;if(b.id=="startpoint"){this.reqlayer.removeFeature(this.start.marker);this.start.marker=null;this.start.latlng=null;
this.clearRoute();}else{if(b.id==="goalpoint"){this.reqlayer.removeFeature(this.goal.marker);this.goal.marker=null;this.goal.latlng=null;this.clearRoute();}else{if(b.id.indexOf("viapoint")>-1){var c=Number(b.id.substring(8));this.reqlayer.removeFeature(this.via.points[c].marker);this.via.points.splice(c,1);for(var a=0;a<this.via.points.length;a++){this.via.points[a].marker.id="viapoint"+a;}this.search();
}}}this.closeMenu();};RouteSearchPlugin.prototype.getPointsInfo=function(){var c=[];if(this.start.latlng&&this.goal.latlng){c.push({latlng:this.start.latlng,address:this.start.address});if(this.via&&this.via.points.length>0){for(var b=0,a=this.via.points.length;b<a;b++){c.push({latlng:this.via.points[b].latlng,address:this.via.points[b].address});}}c.push({latlng:this.goal.latlng,address:this.goal.address});
}return c;};RouteSearchPlugin.prototype.getCurrentPoints=function(){var a=[];$(this.getPointsInfo()).each(function(){a.push(this.latlng);});return a;};RouteSearchPlugin.prototype.getCurrentParams=function(){return this.cache.getParams();};RouteSearchPlugin.prototype.getRequestCache=function(a){if(a){if(typeof(this.cache[a])!=="undefined"){return this.cache[a];}}return this.cache;};RouteSearchPlugin.prototype.estimateDistance=function(){var c=[];
var b=0;if(this.start.latlng){c.push(this.start.latlng);}if(this.via.points.length>0){for(var a=0;a<this.via.points.length;a++){c.push(this.via.points[a].latlng);}}if(this.goal.latlng){c.push(this.goal.latlng);}for(var a=0;a<c.length-1;a++){b+=c[a].distance(c[a+1]);}b=parseInt(b*1000,10)/1000;return b;};RouteSearchPlugin.prototype.setAddressTooltip=function(c,b,a){(new Y.GeoCoder()).execute({latlng:c},function(e){if(e.features.length>0){var d=e.features[0].property.Address;
b.address=d;b.marker.setTitle("\u3010"+a+"\u3011"+d);}});};RouteSearchPlugin.prototype.clearPoints=function(){this.start.marker=null;this.start.latlng=null;this.goal.marker=null;this.goal.latlng=null;this.via.points=[];this.reqlayer.clearFeatures();this.cache.clearPoints();};RouteSearchPlugin.prototype.initMarkerTouchEventHandler=function(f){var e=f.getDOMNode();var d=null;var i=false;var b=false;var c=this.map;
var g=function(){if(d){clearTimeout(d);d=null;}};var k=function(o){var n=null;if(o&&o.touches&&o.touches.length>=1){var q=o.touches[0];var m=q.pageX;var l=q.pageY;n=c.fromPagePixelToContainerPixel(new Y.Point(m,l));}return n;};var a=function(l){g();if(i){i=false;Y.Event.trigger(f,"dragend",l);}else{if(!b){Y.Event.trigger(f,"click",l);}}};var j=function(l){i=false;b=false;d=setTimeout(function(){g();
b=true;Y.Event.trigger(f,"hold",l);a(l);},500);Y.Event.trigger(f,"touchstart",l);l.preventDefault();};var h=function(m){g();if(!i){Y.Event.trigger(f,"dragstart",m);i=true;}var l=k(m);var n=c.fromContainerPixelToLatLng(l);f.setLatLng(n);Y.Event.trigger(f,"drag",m);};e.addEventListener("touchstart",j,false);e.addEventListener("touchmove",h,false);e.addEventListener("touchend",a,false);};RouteSearchPlugin.prototype.initPointMarkerEvent=function(a,b){var e=this;
var d=a.getDOMNode();a.bind("dragend",function(){if(a.id.indexOf("via")===-1){e.current=a.getLatLng();}b.call(e,a);});if(e.SmartDevice){var c=function(){e.currentMarker=a;if(confirm("\u3053\u306e\u5730\u70b9\u3092\u524a\u9664\u3057\u307e\u3059\u304b\uff1f")){e.removePoint();}};a.bind("hold",c);a.bind("click",c);}else{$(d).bind("contextmenu",function(f){e.currentMarker=a;e.onMarkerRightClick(f);});}};RouteSearchPlugin.prototype.clearRoute=function(){this.reslayer.clearRoute();
};RouteSearchPlugin.prototype.search=function(){if(!this.start.latlng||!this.goal.latlng){return;}this.clearRoute();if(this.maxDistance>0){var d=this.estimateDistance();if(d>this.maxDistance){var c="";c+="\u3054\u6307\u5b9a\u306e\u7bc4\u56f2\u3067\u306f\u3001\u7d4c\u8def\u63a2\u7d22\u304c\u3067\u304d\u307e\u305b\u3093\u3002\n";c+=this.maxDistance+"km\u4ee5\u5185\u306e\u7bc4\u56f2\u3067\u63a2\u7d22\u3057\u3066\u304f\u3060\u3055\u3044\u3002";alert(c);return;}}var a=[this.start.latlng];for(var b=0;b<this.via.points.length;b++){a.push(this.via.points[b].latlng);}a.push(this.goal.latlng);
if(this.nowloadingTimer){clearTimeout(this.nowloadingTimer);this.nowloadingTimer=null;}this.nowloading.append(this.nowloadingImg);this.requestingCount++;var e=this;this.nowloadingTimer=setTimeout(function(){clearTimeout(e.nowloadingTimer);this.nowloadingTimer=null;e.requestingCount=0;e.nowloading.empty();},30000);this.reslayer.execute(a,{params:this.params});};RouteSearchPlugin.prototype.onRequestEnd=function(){clearTimeout(this.nowloadingTimer);
this.nowloadingTimer=null;this.requestingCount--;if(this.requestingCount<0){this.requestingCount=0;}if(this.requestingCount===0){this.nowloading.empty();}};RouteSearchPlugin.prototype.restoreRoute=function(){var c=this.reslayer.cache.getPoints();if(c.length<2){return;}this.reqlayer.clearFeatures();this.current=c[0];this.setStartPoint();for(var b=1,a=c.length-1;b<a;++b){this.current=c[b];this.addViaPoint();
}this.current=c[c.length-1];this.setGoalPoint();};RouteSearchPlugin.prototype.setApplicationId=function(a){this.reslayer.setApplicationId(a);};RouteSearchPlugin.prototype.getApplicationId=function(){return this.reslayer.getApplicationId();};})('1.8.3', 'api.olp.yahoo.co.jp');
