/* * Yahoo! Open Local Platform JavaScript API * http://www.yahoo.co.jp * * Copyright (c) 2014 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)[^>]*$|#([\w\-]*)$)/,bJ=/\S/,bF=/^\s+/,bA=/\s+$/,bE=/\d/,bw=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,bK=/^[\],:{}\s]*$/,bT=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,bM=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,bG=/(?:^|:|,)(?:\s*\[)+/g,bu=/(webkit)[ \/]([\w.]+)/,bO=/(opera)(?:.*version)?[ \/]([\w.]+)/,bN=/(msie) ([\w.]+)/,bP=/(mozilla)(?:.*? rv:([\w.]+))?/,bx=/-([a-z]|[0-9])/ig,bW=/^-ms-/,bQ=function(bX,bY){return(bY+"").toUpperCase(); },bU=bq.userAgent,bS,by,e,bI=Object.prototype.toString,bC=Object.prototype.hasOwnProperty,bv=Array.prototype.push,bH=Array.prototype.slice,bL=String.prototype.trim,br=Array.prototype.indexOf,bt={};bB.fn=bB.prototype={constructor:bB,init:function(bX,b1,b0){var bZ,b2,bY,b3;if(!bX){return this;}if(bX.nodeType){this.context=this[0]=bX;this.length=1;return this;}if(bX==="body"&&!b1&&ap.body){this.context=ap; this[0]=ap.body;this.selector=bX;this.length=1;return this;}if(typeof bX==="string"){if(bX.charAt(0)==="<"&&bX.charAt(bX.length-1)===">"&&bX.length>=3){bZ=[null,bX,null];}else{bZ=bV.exec(bX);}if(bZ&&(bZ[1]||!b1)){if(bZ[1]){b1=b1 instanceof bB?b1[0]:b1;b3=(b1?b1.ownerDocument||b1:ap);bY=bw.exec(bX);if(bY){if(bB.isPlainObject(b1)){bX=[ap.createElement(bY[1])];bB.fn.attr.call(bX,b1,true);}else{bX=[b3.createElement(bY[1])]; }}else{bY=bB.buildFragment([bZ[1]],[b3]);bX=(bY.cacheable?bB.clone(bY.fragment):bY.fragment).childNodes;}return bB.merge(this,bX);}else{b2=ap.getElementById(bZ[2]);if(b2&&b2.parentNode){if(b2.id!==bZ[2]){return b0.find(bX);}this.length=1;this[0]=b2;}this.context=ap;this.selector=bX;return this;}}else{if(!b1||b1.jquery){return(b1||b0).find(bX);}else{return this.constructor(b1).find(bX);}}}else{if(bB.isFunction(bX)){return b0.ready(bX); }}if(bX.selector!==K){this.selector=bX.selector;this.context=bX.context;}return bB.makeArray(bX,this);},selector:"",jquery:"1.6.4",length:0,size:function(){return this.length;},toArray:function(){return bH.call(this,0);},get:function(bX){return bX==null?this.toArray():(bX<0?this[this.length+bX]:this[bX]);},pushStack:function(bY,b0,bX){var bZ=this.constructor();if(bB.isArray(bY)){bv.apply(bZ,bY);}else{bB.merge(bZ,bY); }bZ.prevObject=this;bZ.context=this.context;if(b0==="find"){bZ.selector=this.selector+(this.selector?" ":"")+bX;}else{if(b0){bZ.selector=this.selector+"."+b0+"("+bX+")";}}return bZ;},each:function(bY,bX){return bB.each(this,bY,bX);},ready:function(bX){bB.bindReady();by.done(bX);return this;},eq:function(bX){return bX===-1?this.slice(bX):this.slice(bX,+bX+1);},first:function(){return this.eq(0);},last:function(){return this.eq(-1); },slice:function(){return this.pushStack(bH.apply(this,arguments),"slice",bH.call(arguments).join(","));},map:function(bX){return this.pushStack(bB.map(this,function(bZ,bY){return bX.call(bZ,bY,bZ);}));},end:function(){return this.prevObject||this.constructor(null);},push:bv,sort:[].sort,splice:[].splice};bB.fn.init.prototype=bB.fn;bB.extend=bB.fn.extend=function(){var b6,bZ,bX,bY,b3,b4,b2=arguments[0]||{},b1=1,b0=arguments.length,b5=false; if(typeof b2==="boolean"){b5=b2;b2=arguments[1]||{};b1=2;}if(typeof b2!=="object"&&!bB.isFunction(b2)){b2={};}if(b0===b1){b2=this;--b1;}for(;b10){return; }by.resolveWith(ap,[bB]);if(bB.fn.trigger){bB(ap).trigger("ready").unbind("ready");}}},bindReady:function(){if(by){return;}by=bB._Deferred();if(ap.readyState==="complete"){return setTimeout(bB.ready,1);}if(ap.addEventListener){ap.addEventListener("DOMContentLoaded",e,false);a7.addEventListener("load",bB.ready,false);}else{if(ap.attachEvent){ap.attachEvent("onreadystatechange",e);a7.attachEvent("onload",bB.ready); var bX=false;try{bX=a7.frameElement==null;}catch(bY){}if(ap.documentElement.doScroll&&bX){bs();}}}},isFunction:function(bX){return bB.type(bX)==="function";},isArray:Array.isArray||function(bX){return bB.type(bX)==="array";},isWindow:function(bX){return bX&&typeof bX==="object"&&"setInterval" in bX;},isNaN:function(bX){return bX==null||!bE.test(bX)||isNaN(bX);},type:function(bX){return bX==null?String(bX):bt[bI.call(bX)]||"object"; },isPlainObject:function(bZ){if(!bZ||bB.type(bZ)!=="object"||bZ.nodeType||bB.isWindow(bZ)){return false;}try{if(bZ.constructor&&!bC.call(bZ,"constructor")&&!bC.call(bZ.constructor.prototype,"isPrototypeOf")){return false;}}catch(bY){return false;}var bX;for(bX in bZ){}return bX===K||bC.call(bZ,bX);},isEmptyObject:function(bY){for(var bX in bY){return false;}return true;},error:function(bX){throw bX; },parseJSON:function(bX){if(typeof bX!=="string"||!bX){return null;}bX=bB.trim(bX);if(a7.JSON&&a7.JSON.parse){return a7.JSON.parse(bX);}if(bK.test(bX.replace(bT,"@").replace(bM,"]").replace(bG,""))){return(new Function("return "+bX))();}bB.error("Invalid JSON: "+bX);},parseXML:function(bZ){var bX,bY;try{if(a7.DOMParser){bY=new DOMParser();bX=bY.parseFromString(bZ,"text/xml");}else{bX=new ActiveXObject("Microsoft.XMLDOM"); bX.async="false";bX.loadXML(bZ);}}catch(b0){bX=K;}if(!bX||!bX.documentElement||bX.getElementsByTagName("parsererror").length){bB.error("Invalid XML: "+bZ);}return bX;},noop:function(){},globalEval:function(bX){if(bX&&bJ.test(bX)){(a7.execScript||function(bY){a7["eval"].call(a7,bY);})(bX);}},camelCase:function(bX){return bX.replace(bW,"ms-").replace(bx,bQ);},nodeName:function(bY,bX){return bY.nodeName&&bY.nodeName.toUpperCase()===bX.toUpperCase(); },each:function(b0,b3,bZ){var bY,b1=0,b2=b0.length,bX=b2===K||bB.isFunction(b0);if(bZ){if(bX){for(bY in b0){if(b3.apply(b0[bY],bZ)===false){break;}}}else{for(;b10&&bX[0]&&bX[bY-1])||bY===0||bB.isArray(bX)); if(b0){for(;bZ1?aE.call(arguments,0):by;if(!(--bu)){e.resolveWith(e,aE.call(br,0));}};}if(bv>1){for(;bs
a";bu=bB.getElementsByTagName("*");bJ=bB.getElementsByTagName("a")[0]; if(!bu||!bu.length||!bJ){return{};}bC=ap.createElement("select");bs=bC.appendChild(ap.createElement("option"));bA=bB.getElementsByTagName("input")[0];by={leadingWhitespace:(bB.firstChild.nodeType===3),tbody:!bB.getElementsByTagName("tbody").length,htmlSerialize:!!bB.getElementsByTagName("link").length,style:/top/.test(bJ.getAttribute("style")),hrefNormalized:(bJ.getAttribute("href")==="/a"),opacity:/^0.55$/.test(bJ.style.opacity),cssFloat:!!bJ.style.cssFloat,checkOn:(bA.value==="on"),optSelected:bs.selected,getSetAttribute:bB.className!=="t",submitBubbles:true,changeBubbles:true,focusinBubbles:false,deleteExpando:true,noCloneEvent:true,inlineBlockNeedsLayout:false,shrinkWrapBlocks:false,reliableMarginRight:true}; bA.checked=true;by.noCloneChecked=bA.cloneNode(true).checked;bC.disabled=true;by.optDisabled=!bs.disabled;try{delete bB.test;}catch(bG){by.deleteExpando=false;}if(!bB.addEventListener&&bB.attachEvent&&bB.fireEvent){bB.attachEvent("onclick",function(){by.noCloneEvent=false;});bB.cloneNode(true).fireEvent("onclick");}bA=ap.createElement("input");bA.value="t";bA.setAttribute("type","radio");by.radioValue=bA.value==="t"; bA.setAttribute("checked","checked");bB.appendChild(bA);br=ap.createDocumentFragment();br.appendChild(bB.firstChild);by.checkClone=br.cloneNode(true).cloneNode(true).lastChild.checked;bB.innerHTML="";bB.style.width=bB.style.paddingLeft="1px";bz=ap.getElementsByTagName("body")[0];bx=ap.createElement(bz?"div":"body");bH={visibility:"hidden",width:0,height:0,border:0,margin:0,background:"none"};if(bz){b.extend(bH,{position:"absolute",left:"-1000px",top:"-1000px"}); }for(bE in bH){bx.style[bE]=bH[bE];}bx.appendChild(bB);bD=bz||bI;bD.insertBefore(bx,bD.firstChild);by.appendChecked=bA.checked;by.boxModel=bB.offsetWidth===2;if("zoom" in bB.style){bB.style.display="inline";bB.style.zoom=1;by.inlineBlockNeedsLayout=(bB.offsetWidth===2);bB.style.display="";bB.innerHTML="
";by.shrinkWrapBlocks=(bB.offsetWidth!==2);}bB.innerHTML="
t
"; bF=bB.getElementsByTagName("td");bK=(bF[0].offsetHeight===0);bF[0].style.display="";bF[1].style.display="none";by.reliableHiddenOffsets=bK&&(bF[0].offsetHeight===0);bB.innerHTML="";if(ap.defaultView&&ap.defaultView.getComputedStyle){bv=ap.createElement("div");bv.style.width="0";bv.style.marginRight="0";bB.appendChild(bv);by.reliableMarginRight=(parseInt((ap.defaultView.getComputedStyle(bv,null)||{marginRight:0}).marginRight,10)||0)===0; }bx.innerHTML="";bD.removeChild(bx);if(bB.attachEvent){for(bE in {submit:1,change:1,focusin:1}){bw="on"+bE;bK=(bw in bB);if(!bK){bB.setAttribute(bw,"return;");bK=(typeof bB[bw]==="function");}by[bE+"Bubbles"]=bK;}}bx=br=bC=bs=bz=bv=bB=bA=null;return by;})();b.boxModel=b.support.boxModel;var aL=/^(?:\{.*\}|\[.*\])$/,av=/([A-Z])/g;b.extend({cache:{},uuid:0,expando:"jQuery"+(b.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:true,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:true},hasData:function(e){e=e.nodeType?b.cache[e[b.expando]]:e[b.expando]; return !!e&&!S(e);},data:function(bt,br,bv,bu){if(!b.acceptData(bt)){return;}var bw,by,bz=b.expando,bx=typeof br==="string",bA=bt.nodeType,e=bA?b.cache:bt,bs=bA?bt[b.expando]:bt[b.expando]&&b.expando;if((!bs||(bu&&bs&&(e[bs]&&!e[bs][bz])))&&bx&&bv===K){return;}if(!bs){if(bA){bt[b.expando]=bs=++b.uuid;}else{bs=b.expando;}}if(!e[bs]){e[bs]={};if(!bA){e[bs].toJSON=b.noop;}}if(typeof br==="object"||typeof br==="function"){if(bu){e[bs][bz]=b.extend(e[bs][bz],br); }else{e[bs]=b.extend(e[bs],br);}}bw=e[bs];if(bu){if(!bw[bz]){bw[bz]={};}bw=bw[bz];}if(bv!==K){bw[b.camelCase(br)]=bv;}if(br==="events"&&!bw[br]){return bw[bz]&&bw[bz].events;}if(bx){by=bw[br];if(by==null){by=bw[b.camelCase(br)];}}else{by=bw;}return by;},removeData:function(bu,bs,bv){if(!b.acceptData(bu)){return;}var bw,bx=b.expando,by=bu.nodeType,br=by?b.cache:bu,bt=by?bu[b.expando]:b.expando;if(!br[bt]){return; }if(bs){bw=bv?br[bt][bx]:br[bt];if(bw){if(!bw[bs]){bs=b.camelCase(bs);}delete bw[bs];if(!S(bw)){return;}}}if(bv){delete br[bt][bx];if(!S(br[bt])){return;}}var e=br[bt][bx];if(b.support.deleteExpando||!br.setInterval){delete br[bt];}else{br[bt]=null;}if(e){br[bt]={};if(!by){br[bt].toJSON=b.noop;}br[bt][bx]=e;}else{if(by){if(b.support.deleteExpando){delete bu[b.expando];}else{if(bu.removeAttribute){bu.removeAttribute(b.expando); }else{bu[b.expando]=null;}}}}},_data:function(br,e,bs){return b.data(br,e,bs,true);},acceptData:function(br){if(br.nodeName){var e=b.noData[br.nodeName.toLowerCase()];if(e){return !(e===true||br.getAttribute("classid")!==e);}}return true;}});b.fn.extend({data:function(bu,bw){var bv=null;if(typeof bu==="undefined"){if(this.length){bv=b.data(this[0]);if(this[0].nodeType===1){var e=this[0].attributes,bs; for(var bt=0,br=e.length;bt-1){return true;}}return false;},val:function(bt){var e,br,bs=this[0];if(!arguments.length){if(bs){e=b.valHooks[bs.nodeName.toLowerCase()]||b.valHooks[bs.type];if(e&&"get" in e&&(br=e.get(bs,"value"))!==K){return br;}br=bs.value;return typeof br==="string"?br.replace(aN,""):br==null?"":br; }return K;}var bu=b.isFunction(bt);return this.each(function(bw){var bv=b(this),bx;if(this.nodeType!==1){return;}if(bu){bx=bt.call(this,bw,bv.val());}else{bx=bt;}if(bx==null){bx="";}else{if(typeof bx==="number"){bx+="";}else{if(b.isArray(bx)){bx=b.map(bx,function(by){return by==null?"":by+"";});}}}e=b.valHooks[this.nodeName.toLowerCase()]||b.valHooks[this.type];if(!e||!("set" in e)||e.set(this,bx,"value")===K){this.value=bx; }});}});b.extend({valHooks:{option:{get:function(e){var br=e.attributes.value;return !br||br.specified?e.value:e.text;}},select:{get:function(e){var bw,bu=e.selectedIndex,bx=[],by=e.options,bt=e.type==="select-one";if(bu<0){return null;}for(var br=bt?bu:0,bv=bt?bu+1:by.length;br=0;});if(!e.length){br.selectedIndex=-1;}return e;}}},attrFn:{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true},attrFix:{tabindex:"tabIndex"},attr:function(bw,bt,bx,bv){var br=bw.nodeType; if(!bw||br===3||br===8||br===2){return K;}if(bv&&bt in b.attrFn){return b(bw)[bt](bx);}if(!("getAttribute" in bw)){return b.prop(bw,bt,bx);}var bs,e,bu=br!==1||!b.isXMLDoc(bw);if(bu){bt=b.attrFix[bt]||bt;e=b.attrHooks[bt];if(!e){if(aj.test(bt)){e=aU;}else{if(ba){e=ba;}}}}if(bx!==K){if(bx===null){b.removeAttr(bw,bt);return K;}else{if(e&&"set" in e&&bu&&(bs=e.set(bw,bx,bt))!==K){return bs;}else{bw.setAttribute(bt,""+bx); return bx;}}}else{if(e&&"get" in e&&bu&&(bs=e.get(bw,bt))!==null){return bs;}else{bs=bw.getAttribute(bt);return bs===null?K:bs;}}},removeAttr:function(br,e){var bs;if(br.nodeType===1){e=b.attrFix[e]||e;b.attr(br,e,"");br.removeAttribute(e);if(aj.test(e)&&(bs=b.propFix[e]||e) in br){br[bs]=false;}}},attrHooks:{type:{set:function(e,br){if(g.test(e.nodeName)&&e.parentNode){b.error("type property can't be changed"); }else{if(!b.support.radioValue&&br==="radio"&&b.nodeName(e,"input")){var bs=e.value;e.setAttribute("type",br);if(bs){e.value=bs;}return br;}}}},value:{get:function(br,e){if(ba&&b.nodeName(br,"button")){return ba.get(br,e);}return e in br?br.value:null;},set:function(br,bs,e){if(ba&&b.nodeName(br,"button")){return ba.set(br,bs,e);}br.value=bs;}}},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(bv,bt,bw){var br=bv.nodeType; if(!bv||br===3||br===8||br===2){return K;}var bs,e,bu=br!==1||!b.isXMLDoc(bv);if(bu){bt=b.propFix[bt]||bt;e=b.propHooks[bt];}if(bw!==K){if(e&&"set" in e&&(bs=e.set(bv,bw,bt))!==K){return bs;}else{return(bv[bt]=bw);}}else{if(e&&"get" in e&&(bs=e.get(bv,bt))!==null){return bs;}else{return bv[bt];}}},propHooks:{tabIndex:{get:function(br){var e=br.getAttributeNode("tabindex");return e&&e.specified?parseInt(e.value,10):D.test(br.nodeName)||l.test(br.nodeName)&&br.href?0:K; }}}});b.attrHooks.tabIndex=b.propHooks.tabIndex;aU={get:function(br,e){var bs;return b.prop(br,e)===true||(bs=br.getAttributeNode(e))&&bs.nodeValue!==false?e.toLowerCase():K;},set:function(br,bt,e){var bs;if(bt===false){b.removeAttr(br,e);}else{bs=b.propFix[e]||e;if(bs in br){br[bs]=true;}br.setAttribute(e,e.toLowerCase());}return e;}};if(!b.support.getSetAttribute){ba=b.valHooks.button={get:function(bs,br){var e; e=bs.getAttributeNode(br);return e&&e.nodeValue!==""?e.nodeValue:K;},set:function(bs,bt,br){var e=bs.getAttributeNode(br);if(!e){e=ap.createAttribute(br);bs.setAttributeNode(e);}return(e.nodeValue=bt+"");}};b.each(["width","height"],function(br,e){b.attrHooks[e]=b.extend(b.attrHooks[e],{set:function(bs,bt){if(bt===""){bs.setAttribute(e,"auto");return bt;}}});});}if(!b.support.hrefNormalized){b.each(["href","src","width","height"],function(br,e){b.attrHooks[e]=b.extend(b.attrHooks[e],{get:function(bt){var bs=bt.getAttribute(e,2); return bs===null?K:bs;}});});}if(!b.support.style){b.attrHooks.style={get:function(e){return e.style.cssText.toLowerCase()||K;},set:function(e,br){return(e.style.cssText=""+br);}};}if(!b.support.optSelected){b.propHooks.selected=b.extend(b.propHooks.selected,{get:function(br){var e=br.parentNode;if(e){e.selectedIndex;if(e.parentNode){e.parentNode.selectedIndex;}}return null;}});}if(!b.support.checkOn){b.each(["radio","checkbox"],function(){b.valHooks[this]={get:function(e){return e.getAttribute("value")===null?"on":e.value; }};});}b.each(["radio","checkbox"],function(){b.valHooks[this]=b.extend(b.valHooks[this],{set:function(e,br){if(b.isArray(br)){return(e.checked=b.inArray(b(e).val(),br)>=0);}}});});var aW=/\.(.*)$/,a9=/^(?:textarea|input|select)$/i,N=/\./g,be=/ /g,aB=/[^\w\s.|`]/g,G=function(e){return e.replace(aB,"\\$&");};b.event={add:function(bt,bx,bC,bv){if(bt.nodeType===3||bt.nodeType===8){return;}if(bC===false){bC=bg; }else{if(!bC){return;}}var br,bB;if(bC.handler){br=bC;bC=br.handler;}if(!bC.guid){bC.guid=b.guid++;}var by=b._data(bt);if(!by){return;}var bD=by.events,bw=by.handle;if(!bD){by.events=bD={};}if(!bw){by.handle=bw=function(bE){return typeof b!=="undefined"&&(!bE||b.event.triggered!==bE.type)?b.event.handle.apply(bw.elem,arguments):K;};}bw.elem=bt;bx=bx.split(" ");var bA,bu=0,e;while((bA=bx[bu++])){bB=br?b.extend({},br):{handler:bC,data:bv}; if(bA.indexOf(".")>-1){e=bA.split(".");bA=e.shift();bB.namespace=e.slice(0).sort().join(".");}else{e=[];bB.namespace="";}bB.type=bA;if(!bB.guid){bB.guid=bC.guid;}var bs=bD[bA],bz=b.event.special[bA]||{};if(!bs){bs=bD[bA]=[];if(!bz.setup||bz.setup.call(bt,bv,e,bw)===false){if(bt.addEventListener){bt.addEventListener(bA,bw,false);}else{if(bt.attachEvent){bt.attachEvent("on"+bA,bw);}}}}if(bz.add){bz.add.call(bt,bB); if(!bB.handler.guid){bB.handler.guid=bC.guid;}}bs.push(bB);b.event.global[bA]=true;}bt=null;},global:{},remove:function(bF,bA,bs,bw){if(bF.nodeType===3||bF.nodeType===8){return;}if(bs===false){bs=bg;}var bI,bv,bx,bC,bD=0,bt,by,bB,bu,bz,e,bH,bE=b.hasData(bF)&&b._data(bF),br=bE&&bE.events;if(!bE||!br){return;}if(bA&&bA.type){bs=bA.handler;bA=bA.type;}if(!bA||typeof bA==="string"&&bA.charAt(0)==="."){bA=bA||""; for(bv in br){b.event.remove(bF,bv+bA);}return;}bA=bA.split(" ");while((bv=bA[bD++])){bH=bv;e=null;bt=bv.indexOf(".")<0;by=[];if(!bt){by=bv.split(".");bv=by.shift();bB=new RegExp("(^|\\.)"+b.map(by.slice(0).sort(),G).join("\\.(?:.*\\.)?")+"(\\.|$)");}bz=br[bv];if(!bz){continue;}if(!bs){for(bC=0;bC=0){bA=bA.slice(0,-1);br=true;}if(bA.indexOf(".")>=0){bs=bA.split(".");bA=bs.shift();bs.sort();}if((!bv||b.event.customEvent[bA])&&!b.event.global[bA]){return;}e=typeof e==="object"?e[b.expando]?e:new b.Event(bA,e):new b.Event(bA); e.type=bA;e.exclusive=br;e.namespace=bs.join(".");e.namespace_re=new RegExp("(^|\\.)"+bs.join("\\.(?:.*\\.)?")+"(\\.|$)");if(bC||!bv){e.preventDefault();e.stopPropagation();}if(!bv){b.each(b.cache,function(){var bE=b.expando,bD=this[bE];if(bD&&bD.events&&bD.events[bA]){b.event.trigger(e,bx,bD.handle.elem);}});return;}if(bv.nodeType===3||bv.nodeType===8){return;}e.result=K;e.target=bv;bx=bx!=null?b.makeArray(bx):[]; bx.unshift(e);var bB=bv,bt=bA.indexOf(":")<0?"on"+bA:"";do{var by=b._data(bB,"handle");e.currentTarget=bB;if(by){by.apply(bB,bx);}if(bt&&b.acceptData(bB)&&bB[bt]&&bB[bt].apply(bB,bx)===false){e.result=false;e.preventDefault();}bB=bB.parentNode||bB.ownerDocument||bB===e.target.ownerDocument&&a7;}while(bB&&!e.isPropagationStopped());if(!e.isDefaultPrevented()){var bu,bz=b.event.special[bA]||{};if((!bz._default||bz._default.call(bv.ownerDocument,e)===false)&&!(bA==="click"&&b.nodeName(bv,"a"))&&b.acceptData(bv)){try{if(bt&&bv[bA]){bu=bv[bt]; if(bu){bv[bt]=null;}b.event.triggered=bA;bv[bA]();}}catch(bw){}if(bu){bv[bt]=bu;}b.event.triggered=K;}}return e.result;},handle:function(bx){bx=b.event.fix(bx||a7.event);var br=((b._data(this,"events")||{})[bx.type]||[]).slice(0),bw=!bx.exclusive&&!bx.namespace,bu=Array.prototype.slice.call(arguments,0);bu[0]=bx;bx.currentTarget=this;for(var bt=0,e=br.length;bt-1?b.map(br.options,function(bt){return bt.selected;}).join("-"):"";}else{if(b.nodeName(br,"select")){bs=br.selectedIndex;}}}return bs;},Y=function Y(bt){var br=bt.target,bs,bu;if(!a9.test(br.nodeName)||br.readOnly){return; }bs=b._data(br,"_change_data");bu=k(br);if(bt.type!=="focusout"||br.type!=="radio"){b._data(br,"_change_data",bu);}if(bs===K||bu===bs){return;}if(bs!=null||bu){bt.type="change";bt.liveFired=K;b.event.trigger(bt,arguments[1],br);}};b.event.special.change={filters:{focusout:Y,beforedeactivate:Y,click:function(bt){var bs=bt.target,br=b.nodeName(bs,"input")?bs.type:"";if(br==="radio"||br==="checkbox"||b.nodeName(bs,"select")){Y.call(this,bt); }},keydown:function(bt){var bs=bt.target,br=b.nodeName(bs,"input")?bs.type:"";if((bt.keyCode===13&&!b.nodeName(bs,"textarea"))||(bt.keyCode===32&&(br==="checkbox"||br==="radio"))||br==="select-multiple"){Y.call(this,bt);}},beforeactivate:function(bs){var br=bs.target;b._data(br,"_change_data",k(br));}},setup:function(bs,br){if(this.type==="file"){return false;}for(var e in bj){b.event.add(this,e+".specialChange",bj[e]); }return a9.test(this.nodeName);},teardown:function(e){b.event.remove(this,".specialChange");return a9.test(this.nodeName);}};bj=b.event.special.change.filters;bj.focus=bj.beforeactivate;}function aT(br,bt,e){var bs=b.extend({},e[0]);bs.type=br;bs.originalEvent={};bs.liveFired=K;b.event.handle.call(bt,bs);if(bs.isDefaultPrevented()){e[0].preventDefault();}}if(!b.support.focusinBubbles){b.each({focus:"focusin",blur:"focusout"},function(bt,e){var br=0; b.event.special[e]={setup:function(){if(br++===0){ap.addEventListener(bt,bs,true);}},teardown:function(){if(--br===0){ap.removeEventListener(bt,bs,true);}}};function bs(bu){var bv=b.event.fix(bu);bv.type=e;bv.originalEvent={};b.event.trigger(bv,null,bv.target);if(bv.isDefaultPrevented()){bu.preventDefault();}}});}b.each(["bind","one"],function(br,e){b.fn[e]=function(bx,by,bw){var bv;if(typeof bx==="object"){for(var bu in bx){this[e](bu,by,bx[bu],bw); }return this;}if(arguments.length===2||by===false){bw=by;by=K;}if(e==="one"){bv=function(bz){b(this).unbind(bz,bv);return bw.apply(this,arguments);};bv.guid=bw.guid||b.guid++;}else{bv=bw;}if(bx==="unload"&&e!=="one"){this.one(bx,by,bw);}else{for(var bt=0,bs=this.length;btbt){break;}bB.currentTarget=bv.elem;bB.data=bv.handleObj.data;bB.handleObj=bv.handleObj;bF=bv.handleObj.origHandler.apply(bv.elem,arguments);if(bF===false||bB.isPropagationStopped()){bt=bv.level;if(bF===false){by=false;}if(bB.isImmediatePropagationStopped()){break;}}}return by;}function p(br,e){return(br&&br!=="*"?br+".":"")+e.replace(N,"`").replace(be,"&"); }b.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").split(" "),function(br,e){b.fn[e]=function(bt,bs){if(bs==null){bs=bt;bt=null;}return arguments.length>0?this.bind(e,bt,bs):this.trigger(e);};if(b.attrFn){b.attrFn[e]=true;}}); /* * Sizzle CSS Selector Engine * Copyright 2011, The Dojo Foundation * Released under the MIT, BSD, and GPL Licenses. * More information: http://sizzlejs.com/ */ (function(){var bB=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,bC=0,bF=Object.prototype.toString,bw=false,bv=true,bD=/\\/g,bJ=/\W/; [0,0].sort(function(){bv=false;return 0;});var bt=function(bO,e,bR,bS){bR=bR||[];e=e||ap;var bU=e;if(e.nodeType!==1&&e.nodeType!==9){return[];}if(!bO||typeof bO!=="string"){return bR;}var bL,bW,bZ,bK,bV,bY,bX,bQ,bN=true,bM=bt.isXML(e),bP=[],bT=bO;do{bB.exec("");bL=bB.exec(bT);if(bL){bT=bL[3];bP.push(bL[1]);if(bL[2]){bK=bL[3];break;}}}while(bL);if(bP.length>1&&bx.exec(bO)){if(bP.length===2&&by.relative[bP[0]]){bW=bG(bP[0]+bP[1],e); }else{bW=by.relative[bP[0]]?[e]:bt(bP.shift(),e);while(bP.length){bO=bP.shift();if(by.relative[bO]){bO+=bP.shift();}bW=bG(bO,bW);}}}else{if(!bS&&bP.length>1&&e.nodeType===9&&!bM&&by.match.ID.test(bP[0])&&!by.match.ID.test(bP[bP.length-1])){bV=bt.find(bP.shift(),e,bM);e=bV.expr?bt.filter(bV.expr,bV.set)[0]:bV.set[0];}if(e){bV=bS?{expr:bP.pop(),set:bz(bS)}:bt.find(bP.pop(),bP.length===1&&(bP[0]==="~"||bP[0]==="+")&&e.parentNode?e.parentNode:e,bM); bW=bV.expr?bt.filter(bV.expr,bV.set):bV.set;if(bP.length>0){bZ=bz(bW);}else{bN=false;}while(bP.length){bY=bP.pop();bX=bY;if(!by.relative[bY]){bY="";}else{bX=bP.pop();}if(bX==null){bX=e;}by.relative[bY](bZ,bX,bM);}}else{bZ=bP=[];}}if(!bZ){bZ=bW;}if(!bZ){bt.error(bY||bO);}if(bF.call(bZ)==="[object Array]"){if(!bN){bR.push.apply(bR,bZ);}else{if(e&&e.nodeType===1){for(bQ=0;bZ[bQ]!=null;bQ++){if(bZ[bQ]&&(bZ[bQ]===true||bZ[bQ].nodeType===1&&bt.contains(e,bZ[bQ]))){bR.push(bW[bQ]); }}}else{for(bQ=0;bZ[bQ]!=null;bQ++){if(bZ[bQ]&&bZ[bQ].nodeType===1){bR.push(bW[bQ]);}}}}}else{bz(bZ,bR);}if(bK){bt(bK,bU,bR,bS);bt.uniqueSort(bR);}return bR;};bt.uniqueSort=function(bK){if(bE){bw=bv;bK.sort(bE);if(bw){for(var e=1;e0; };bt.find=function(bQ,e,bR){var bP;if(!bQ){return[];}for(var bM=0,bL=by.order.length;bM":function(bP,bK){var bO,bN=typeof bK==="string",bL=0,e=bP.length; if(bN&&!bJ.test(bK)){bK=bK.toLowerCase();for(;bL=0)){if(!bL){e.push(bO); }}else{if(bL){bK[bN]=false;}}}}return false;},ID:function(e){return e[1].replace(bD,"");},TAG:function(bK,e){return bK[1].replace(bD,"").toLowerCase();},CHILD:function(e){if(e[1]==="nth"){if(!e[2]){bt.error(e[0]);}e[2]=e[2].replace(/^\+|\s*/g,"");var bK=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(e[2]==="even"&&"2n"||e[2]==="odd"&&"2n+1"||!/\D/.test(e[2])&&"0n+"+e[2]||e[2]);e[2]=(bK[1]+(bK[2]||1))-0;e[3]=bK[3]-0; }else{if(e[2]){bt.error(e[0]);}}e[0]=bC++;return e;},ATTR:function(bN,bK,bL,e,bO,bP){var bM=bN[1]=bN[1].replace(bD,"");if(!bP&&by.attrMap[bM]){bN[1]=by.attrMap[bM];}bN[4]=(bN[4]||bN[5]||"").replace(bD,"");if(bN[2]==="~="){bN[4]=" "+bN[4]+" ";}return bN;},PSEUDO:function(bN,bK,bL,e,bO){if(bN[1]==="not"){if((bB.exec(bN[3])||"").length>1||/^\w/.test(bN[3])){bN[3]=bt(bN[3],null,null,bK);}else{var bM=bt.filter(bN[3],bK,bL,true^bO); if(!bL){e.push.apply(e,bM);}return false;}}else{if(by.match.POS.test(bN[0])||by.match.CHILD.test(bN[0])){return true;}}return bN;},POS:function(e){e.unshift(true);return e;}},filters:{enabled:function(e){return e.disabled===false&&e.type!=="hidden";},disabled:function(e){return e.disabled===true;},checked:function(e){return e.checked===true;},selected:function(e){if(e.parentNode){e.parentNode.selectedIndex; }return e.selected===true;},parent:function(e){return !!e.firstChild;},empty:function(e){return !e.firstChild;},has:function(bL,bK,e){return !!bt(e[3],bL).length;},header:function(e){return(/h\d/i).test(e.nodeName);},text:function(bL){var e=bL.getAttribute("type"),bK=bL.type;return bL.nodeName.toLowerCase()==="input"&&"text"===bK&&(e===bK||e===null);},radio:function(e){return e.nodeName.toLowerCase()==="input"&&"radio"===e.type; },checkbox:function(e){return e.nodeName.toLowerCase()==="input"&&"checkbox"===e.type;},file:function(e){return e.nodeName.toLowerCase()==="input"&&"file"===e.type;},password:function(e){return e.nodeName.toLowerCase()==="input"&&"password"===e.type;},submit:function(bK){var e=bK.nodeName.toLowerCase();return(e==="input"||e==="button")&&"submit"===bK.type;},image:function(e){return e.nodeName.toLowerCase()==="input"&&"image"===e.type; },reset:function(bK){var e=bK.nodeName.toLowerCase();return(e==="input"||e==="button")&&"reset"===bK.type;},button:function(bK){var e=bK.nodeName.toLowerCase();return e==="input"&&"button"===bK.type||e==="button";},input:function(e){return(/input|select|textarea|button/i).test(e.nodeName);},focus:function(e){return e===e.ownerDocument.activeElement;}},setFilters:{first:function(bK,e){return e===0;},last:function(bL,bK,e,bM){return bK===bM.length-1; },even:function(bK,e){return e%2===0;},odd:function(bK,e){return e%2===1;},lt:function(bL,bK,e){return bKe[3]-0;},nth:function(bL,bK,e){return e[3]-0===bK;},eq:function(bL,bK,e){return e[3]-0===bK;}},filter:{PSEUDO:function(bL,bQ,bP,bR){var e=bQ[1],bK=by.filters[e];if(bK){return bK(bL,bP,bQ,bR);}else{if(e==="contains"){return(bL.textContent||bL.innerText||bt.getText([bL])||"").indexOf(bQ[3])>=0; }else{if(e==="not"){var bM=bQ[3];for(var bO=0,bN=bM.length;bO=0);}}},ID:function(bK,e){return bK.nodeType===1&&bK.getAttribute("id")===e;},TAG:function(bK,e){return(e==="*"&&bK.nodeType===1)||bK.nodeName.toLowerCase()===e; },CLASS:function(bK,e){return(" "+(bK.className||bK.getAttribute("class"))+" ").indexOf(e)>-1;},ATTR:function(bO,bM){var bL=bM[1],e=by.attrHandle[bL]?by.attrHandle[bL](bO):bO[bL]!=null?bO[bL]:bO.getAttribute(bL),bP=e+"",bN=bM[2],bK=bM[4];return e==null?bN==="!=":bN==="="?bP===bK:bN==="*="?bP.indexOf(bK)>=0:bN==="~="?(" "+bP+" ").indexOf(bK)>=0:!bK?bP&&e!==false:bN==="!="?bP!==bK:bN==="^="?bP.indexOf(bK)===0:bN==="$="?bP.substr(bP.length-bK.length)===bK:bN==="|="?bP===bK||bP.substr(0,bK.length+1)===bK+"-":false; },POS:function(bN,bK,bL,bO){var e=bK[2],bM=by.setFilters[e];if(bM){return bM(bN,bL,bK,bO);}}}};var bx=by.match.POS,bs=function(bK,e){return"\\"+(e-0+1);};for(var bu in by.match){by.match[bu]=new RegExp(by.match[bu].source+(/(?![^\[]*\])(?![^\(]*\))/.source));by.leftMatch[bu]=new RegExp(/(^(?:.|\r|\n)*?)/.source+by.match[bu].source.replace(/\\(\d+)/g,bs));}var bz=function(bK,e){bK=Array.prototype.slice.call(bK,0); if(e){e.push.apply(e,bK);return e;}return bK;};try{Array.prototype.slice.call(ap.documentElement.childNodes,0)[0].nodeType;}catch(bI){bz=function(bN,bM){var bL=0,bK=bM||[];if(bF.call(bN)==="[object Array]"){Array.prototype.push.apply(bK,bN);}else{if(typeof bN.length==="number"){for(var e=bN.length;bL";e.insertBefore(bK,e.firstChild);if(ap.getElementById(bL)){by.find.ID=function(bN,bO,bP){if(typeof bO.getElementById!=="undefined"&&!bP){var bM=bO.getElementById(bN[1]); return bM?bM.id===bN[1]||typeof bM.getAttributeNode!=="undefined"&&bM.getAttributeNode("id").nodeValue===bN[1]?[bM]:K:[];}};by.filter.ID=function(bO,bM){var bN=typeof bO.getAttributeNode!=="undefined"&&bO.getAttributeNode("id");return bO.nodeType===1&&bN&&bN.nodeValue===bM;};}e.removeChild(bK);e=bK=null;})();(function(){var e=ap.createElement("div");e.appendChild(ap.createComment(""));if(e.getElementsByTagName("*").length>0){by.find.TAG=function(bK,bO){var bN=bO.getElementsByTagName(bK[1]); if(bK[1]==="*"){var bM=[];for(var bL=0;bN[bL];bL++){if(bN[bL].nodeType===1){bM.push(bN[bL]);}}bN=bM;}return bN;};}e.innerHTML="";if(e.firstChild&&typeof e.firstChild.getAttribute!=="undefined"&&e.firstChild.getAttribute("href")!=="#"){by.attrHandle.href=function(bK){return bK.getAttribute("href",2);};}e=null;})();if(ap.querySelectorAll){(function(){var e=bt,bM=ap.createElement("div"),bL="__sizzle__"; bM.innerHTML="

";if(bM.querySelectorAll&&bM.querySelectorAll(".TEST").length===0){return;}bt=function(bX,bO,bS,bW){bO=bO||ap;if(!bW&&!bt.isXML(bO)){var bV=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(bX);if(bV&&(bO.nodeType===1||bO.nodeType===9)){if(bV[1]){return bz(bO.getElementsByTagName(bX),bS);}else{if(bV[2]&&by.find.CLASS&&bO.getElementsByClassName){return bz(bO.getElementsByClassName(bV[2]),bS); }}}if(bO.nodeType===9){if(bX==="body"&&bO.body){return bz([bO.body],bS);}else{if(bV&&bV[3]){var bR=bO.getElementById(bV[3]);if(bR&&bR.parentNode){if(bR.id===bV[3]){return bz([bR],bS);}}else{return bz([],bS);}}}try{return bz(bO.querySelectorAll(bX),bS);}catch(bT){}}else{if(bO.nodeType===1&&bO.nodeName.toLowerCase()!=="object"){var bP=bO,bQ=bO.getAttribute("id"),bN=bQ||bL,bZ=bO.parentNode,bY=/^\s*[+~]/.test(bX); if(!bQ){bO.setAttribute("id",bN);}else{bN=bN.replace(/'/g,"\\$&");}if(bY&&bZ){bO=bO.parentNode;}try{if(!bY||bZ){return bz(bO.querySelectorAll("[id='"+bN+"'] "+bX),bS);}}catch(bU){}finally{if(!bQ){bP.removeAttribute("id");}}}}}return e(bX,bO,bS,bW);};for(var bK in e){bt[bK]=e[bK];}bM=null;})();}(function(){var e=ap.documentElement,bL=e.matchesSelector||e.mozMatchesSelector||e.webkitMatchesSelector||e.msMatchesSelector; if(bL){var bN=!bL.call(ap.createElement("div"),"div"),bK=false;try{bL.call(ap.documentElement,"[test!='']:sizzle");}catch(bM){bK=true;}bt.matchesSelector=function(bP,bR){bR=bR.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!bt.isXML(bP)){try{if(bK||!by.match.PSEUDO.test(bR)&&!/!=/.test(bR)){var bO=bL.call(bP,bR);if(bO||!bN||bP.document&&bP.document.nodeType!==11){return bO;}}}catch(bQ){}}return bt(bR,null,null,[bP]).length>0; };}})();(function(){var e=ap.createElement("div");e.innerHTML="
";if(!e.getElementsByClassName||e.getElementsByClassName("e").length===0){return;}e.lastChild.className="e";if(e.getElementsByClassName("e").length===1){return;}by.order.splice(1,0,"CLASS");by.find.CLASS=function(bK,bL,bM){if(typeof bL.getElementsByClassName!=="undefined"&&!bM){return bL.getElementsByClassName(bK[1]); }};e=null;})();function br(bK,bP,bO,bS,bQ,bR){for(var bM=0,bL=bS.length;bM0){bN=e;break;}}}e=e[bK];}bS[bM]=bN;}}}if(ap.documentElement.contains){bt.contains=function(bK,e){return bK!==e&&(bK.contains?bK.contains(e):true);};}else{if(ap.documentElement.compareDocumentPosition){bt.contains=function(bK,e){return !!(bK.compareDocumentPosition(e)&16); };}else{bt.contains=function(){return false;};}}bt.isXML=function(e){var bK=(e?e.ownerDocument||e:0).documentElement;return bK?bK.nodeName!=="HTML":false;};var bG=function(e,bQ){var bO,bM=[],bN="",bL=bQ.nodeType?[bQ]:bQ;while((bO=by.match.PSEUDO.exec(e))){bN+=bO[0];e=e.replace(by.match.PSEUDO,"");}e=by.relative[e]?e+"*":e;for(var bP=0,bK=bL.length;bP0){for(bx=bw;bx0:this.filter(e).length>0);},closest:function(bA,br){var bx=[],bu,bs,bz=this[0];if(b.isArray(bA)){var bw,bt,bv={},e=1;if(bz&&bA.length){for(bu=0,bs=bA.length;bu-1:b(bz).is(bw)){bx.push({selector:bt,elem:bz,level:e});}}bz=bz.parentNode;e++;}}return bx;}var by=H.test(bA)||typeof bA!=="string"?b(bA,br||this.context):0;for(bu=0,bs=this.length;bu-1:b.find.matchesSelector(bz,bA)){bx.push(bz);break;}else{bz=bz.parentNode;if(!bz||!bz.ownerDocument||bz===br||bz.nodeType===11){break; }}}}bx=bx.length>1?b.unique(bx):bx;return this.pushStack(bx,"closest",bA);},index:function(e){if(!e){return(this[0]&&this[0].parentNode)?this.prevAll().length:-1;}if(typeof e==="string"){return b.inArray(this[0],b(e));}return b.inArray(e.jquery?e[0]:e,this);},add:function(e,br){var bt=typeof e==="string"?b(e,br):b.makeArray(e&&e.nodeType?[e]:e),bs=b.merge(this.get(),bt);return this.pushStack(C(bt[0])||C(bs[0])?bs:b.unique(bs)); },andSelf:function(){return this.add(this.prevObject);}});function C(e){return !e||!e.parentNode||e.parentNode.nodeType===11;}b.each({parent:function(br){var e=br.parentNode;return e&&e.nodeType!==11?e:null;},parents:function(e){return b.dir(e,"parentNode");},parentsUntil:function(br,e,bs){return b.dir(br,"parentNode",bs);},next:function(e){return b.nth(e,2,"nextSibling");},prev:function(e){return b.nth(e,2,"previousSibling"); },nextAll:function(e){return b.dir(e,"nextSibling");},prevAll:function(e){return b.dir(e,"previousSibling");},nextUntil:function(br,e,bs){return b.dir(br,"nextSibling",bs);},prevUntil:function(br,e,bs){return b.dir(br,"previousSibling",bs);},siblings:function(e){return b.sibling(e.parentNode.firstChild,e);},children:function(e){return b.sibling(e.firstChild);},contents:function(e){return b.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:b.makeArray(e.childNodes); }},function(e,br){b.fn[e]=function(bv,bs){var bu=b.map(this,br,bv),bt=P.call(arguments);if(!X.test(e)){bs=bv;}if(bs&&typeof bs==="string"){bu=b.filter(bs,bu);}bu=this.length>1&&!at[e]?b.unique(bu):bu;if((this.length>1||a5.test(bs))&&al.test(e)){bu=bu.reverse();}return this.pushStack(bu,e,bt.join(","));};});b.extend({filter:function(bs,e,br){if(br){bs=":not("+bs+")";}return e.length===1?b.find.matchesSelector(e[0],bs)?[e[0]]:[]:b.find.matches(bs,e); },dir:function(bs,br,bu){var e=[],bt=bs[br];while(bt&&bt.nodeType!==9&&(bu===K||bt.nodeType!==1||!b(bt).is(bu))){if(bt.nodeType===1){e.push(bt);}bt=bt[br];}return e;},nth:function(bu,e,bs,bt){e=e||1;var br=0;for(;bu;bu=bu[bs]){if(bu.nodeType===1&&++br===e){break;}}return bu;},sibling:function(bs,br){var e=[];for(;bs;bs=bs.nextSibling){if(bs.nodeType===1&&bs!==br){e.push(bs);}}return e;}});function aA(bt,bs,e){bs=bs||0; if(b.isFunction(bs)){return b.grep(bt,function(bv,bu){var bw=!!bs.call(bv,bu,bv);return bw===e;});}else{if(bs.nodeType){return b.grep(bt,function(bv,bu){return(bv===bs)===e;});}else{if(typeof bs==="string"){var br=b.grep(bt,function(bu){return bu.nodeType===1;});if(bm.test(bs)){return b.filter(bs,br,!e);}else{bs=b.filter(bs,br);}}}}return b.grep(bt,function(bv,bu){return(b.inArray(bv,bs)>=0)===e;}); }var ac=/ jQuery\d+="(?:\d+|null)"/g,am=/^\s+/,R=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,d=/<([\w:]+)/,w=/",""],legend:[1,"
","
"],thead:[1,"","
"],tr:[2,"","
"],td:[3,"","
"],col:[2,"","
"],area:[1,"",""],_default:[0,"",""]}; ar.optgroup=ar.option;ar.tbody=ar.tfoot=ar.colgroup=ar.caption=ar.thead;ar.th=ar.td;if(!b.support.htmlSerialize){ar._default=[1,"div
","
"];}b.fn.extend({text:function(e){if(b.isFunction(e)){return this.each(function(bs){var br=b(this);br.text(e.call(this,bs,br.text()));});}if(typeof e!=="object"&&e!==K){return this.empty().append((this[0]&&this[0].ownerDocument||ap).createTextNode(e));}return b.text(this); },wrapAll:function(e){if(b.isFunction(e)){return this.each(function(bs){b(this).wrapAll(e.call(this,bs));});}if(this[0]){var br=b(e,this[0].ownerDocument).eq(0).clone(true);if(this[0].parentNode){br.insertBefore(this[0]);}br.map(function(){var bs=this;while(bs.firstChild&&bs.firstChild.nodeType===1){bs=bs.firstChild;}return bs;}).append(this);}return this;},wrapInner:function(e){if(b.isFunction(e)){return this.each(function(br){b(this).wrapInner(e.call(this,br)); });}return this.each(function(){var br=b(this),bs=br.contents();if(bs.length){bs.wrapAll(e);}else{br.append(e);}});},wrap:function(e){return this.each(function(){b(this).wrapAll(e);});},unwrap:function(){return this.parent().each(function(){if(!b.nodeName(this,"body")){b(this).replaceWith(this.childNodes);}}).end();},append:function(){return this.domManip(arguments,true,function(e){if(this.nodeType===1){this.appendChild(e); }});},prepend:function(){return this.domManip(arguments,true,function(e){if(this.nodeType===1){this.insertBefore(e,this.firstChild);}});},before:function(){if(this[0]&&this[0].parentNode){return this.domManip(arguments,false,function(br){this.parentNode.insertBefore(br,this);});}else{if(arguments.length){var e=b(arguments[0]);e.push.apply(e,this.toArray());return this.pushStack(e,"before",arguments); }}},after:function(){if(this[0]&&this[0].parentNode){return this.domManip(arguments,false,function(br){this.parentNode.insertBefore(br,this.nextSibling);});}else{if(arguments.length){var e=this.pushStack(this,"after",arguments);e.push.apply(e,b(arguments[0]).toArray());return e;}}},remove:function(e,bt){for(var br=0,bs;(bs=this[br])!=null;br++){if(!e||b.filter(e,[bs]).length){if(!bt&&bs.nodeType===1){b.cleanData(bs.getElementsByTagName("*")); b.cleanData([bs]);}if(bs.parentNode){bs.parentNode.removeChild(bs);}}}return this;},empty:function(){for(var e=0,br;(br=this[e])!=null;e++){if(br.nodeType===1){b.cleanData(br.getElementsByTagName("*"));}while(br.firstChild){br.removeChild(br.firstChild);}}return this;},clone:function(br,e){br=br==null?false:br;e=e==null?br:e;return this.map(function(){return b.clone(this,br,e);});},html:function(bt){if(bt===K){return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(ac,""):null; }else{if(typeof bt==="string"&&!O.test(bt)&&(b.support.leadingWhitespace||!am.test(bt))&&!ar[(d.exec(bt)||["",""])[1].toLowerCase()]){bt=bt.replace(R,"<$1>");try{for(var bs=0,br=this.length;bs1&&bs0?this.clone(true):this).get();b(by[bw])[br](bu);bv=bv.concat(bu);}return this.pushStack(bv,e,by.selector);}};});function bb(e){if("getElementsByTagName" in e){return e.getElementsByTagName("*");}else{if("querySelectorAll" in e){return e.querySelectorAll("*");}else{return[];}}}function au(e){if(e.type==="checkbox"||e.type==="radio"){e.defaultChecked=e.checked; }}function E(e){if(b.nodeName(e,"input")){au(e);}else{if("getElementsByTagName" in e){b.grep(e.getElementsByTagName("input"),au);}}}b.extend({clone:function(bu,bw,bs){var bv=bu.cloneNode(true),e,br,bt;if((!b.support.noCloneEvent||!b.support.noCloneChecked)&&(bu.nodeType===1||bu.nodeType===11)&&!b.isXMLDoc(bu)){ad(bu,bv);e=bb(bu);br=bb(bv);for(bt=0;e[bt];++bt){if(br[bt]){ad(e[bt],br[bt]);}}}if(bw){t(bu,bv); if(bs){e=bb(bu);br=bb(bv);for(bt=0;e[bt];++bt){t(e[bt],br[bt]);}}}e=br=null;return bv;},clean:function(bs,bu,bD,bw){var bB;bu=bu||ap;if(typeof bu.createElement==="undefined"){bu=bu.ownerDocument||bu[0]&&bu[0].ownerDocument||ap;}var bE=[],bx;for(var bA=0,bv;(bv=bs[bA])!=null;bA++){if(typeof bv==="number"){bv+="";}if(!bv){continue;}if(typeof bv==="string"){if(!U.test(bv)){bv=bu.createTextNode(bv);}else{bv=bv.replace(R,"<$1>"); var bG=(d.exec(bv)||["",""])[1].toLowerCase(),bt=ar[bG]||ar._default,bz=bt[0],br=bu.createElement("div");br.innerHTML=bt[1]+bv+bt[2];while(bz--){br=br.lastChild;}if(!b.support.tbody){var e=w.test(bv),by=bG==="table"&&!e?br.firstChild&&br.firstChild.childNodes:bt[1]===""&&!e?br.childNodes:[];for(bx=by.length-1;bx>=0;--bx){if(b.nodeName(by[bx],"tbody")&&!by[bx].childNodes.length){by[bx].parentNode.removeChild(by[bx]); }}}if(!b.support.leadingWhitespace&&am.test(bv)){br.insertBefore(bu.createTextNode(am.exec(bv)[0]),br.firstChild);}bv=br.childNodes;}}var bC;if(!b.support.appendChecked){if(bv[0]&&typeof(bC=bv.length)==="number"){for(bx=0;bx=0){return bt+"px";}}else{return bt;}}};});if(!b.support.opacity){b.cssHooks.opacity={get:function(br,e){return ao.test((e&&br.currentStyle?br.currentStyle.filter:br.style.filter)||"")?(parseFloat(RegExp.$1)/100)+"":e?"1":"";},set:function(bu,bv){var bt=bu.style,br=bu.currentStyle,e=b.isNaN(bv)?"":"alpha(opacity="+bv*100+")",bs=br&&br.filter||bt.filter||""; bt.zoom=1;if(bv>=1&&b.trim(bs.replace(af,""))===""){bt.removeAttribute("filter");if(br&&!br.filter){return;}}bt.filter=af.test(bs)?bs.replace(af,e):bs+" "+e;}};}b(function(){if(!b.support.reliableMarginRight){b.cssHooks.marginRight={get:function(bs,br){var e;b.swap(bs,{display:"inline-block"},function(){if(br){e=V(bs,"margin-right","marginRight");}else{e=bs.style.marginRight;}});return e;}};}});if(ap.defaultView&&ap.defaultView.getComputedStyle){aD=function(bu,bs){var br,bt,e; bs=bs.replace(z,"-$1").toLowerCase();if(!(bt=bu.ownerDocument.defaultView)){return K;}if((e=bt.getComputedStyle(bu,null))){br=e.getPropertyValue(bs);if(br===""&&!b.contains(bu.ownerDocument.documentElement,bu)){br=b.style(bu,bs);}}return br;};}if(ap.documentElement.currentStyle){aS=function(bu,bs){var bv,br=bu.currentStyle&&bu.currentStyle[bs],e=bu.runtimeStyle&&bu.runtimeStyle[bs],bt=bu.style;if(!a8.test(br)&&bk.test(br)){bv=bt.left; if(e){bu.runtimeStyle.left=bu.currentStyle.left;}bt.left=bs==="fontSize"?"1em":(br||0);br=bt.pixelLeft+"px";bt.left=bv;if(e){bu.runtimeStyle.left=e;}}return br===""?"auto":br;};}V=aD||aS;function o(bs,br,e){var bu=br==="width"?bs.offsetWidth:bs.offsetHeight,bt=br==="width"?ai:aY;if(bu>0){if(e!=="border"){b.each(bt,function(){if(!e){bu-=parseFloat(b.css(bs,"padding"+this))||0;}if(e==="margin"){bu+=parseFloat(b.css(bs,e+this))||0; }else{bu-=parseFloat(b.css(bs,"border"+this+"Width"))||0;}});}return bu+"px";}bu=V(bs,br,br);if(bu<0||bu==null){bu=bs.style[br]||0;}bu=parseFloat(bu)||0;if(e){b.each(bt,function(){bu+=parseFloat(b.css(bs,"padding"+this))||0;if(e!=="padding"){bu+=parseFloat(b.css(bs,"border"+this+"Width"))||0;}if(e==="margin"){bu+=parseFloat(b.css(bs,e+this))||0;}});}return bu+"px";}if(b.expr&&b.expr.filters){b.expr.filters.hidden=function(bs){var br=bs.offsetWidth,e=bs.offsetHeight; return(br===0&&e===0)||(!b.support.reliableHiddenOffsets&&(bs.style.display||b.css(bs,"display"))==="none");};b.expr.filters.visible=function(e){return !b.expr.filters.hidden(e);};}var j=/%20/g,ak=/\[\]$/,bp=/\r?\n/g,bn=/#.*$/,ay=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,aV=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,aH=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,aK=/^(?:GET|HEAD)$/,c=/^\/\//,L=/\?/,a2=/)<[^<]*)*<\/script>/gi,q=/^(?:select|textarea)/i,h=/\s+/,bo=/([?&])_=[^&]*/,J=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,A=b.fn.load,W={},r={},az,s,aO=["*/"]+["*"]; try{az=bh.href;}catch(aq){az=ap.createElement("a");az.href="";az=az.href;}s=J.exec(az.toLowerCase())||[];function f(e){return function(bu,bw){if(typeof bu!=="string"){bw=bu;bu="*";}if(b.isFunction(bw)){var bt=bu.toLowerCase().split(h),bs=0,bv=bt.length,br,bx,by;for(;bs=0){var e=bs.slice(bu,bs.length);bs=bs.slice(0,bu);}var bt="GET";if(bv){if(b.isFunction(bv)){bw=bv;bv=K;}else{if(typeof bv==="object"){bv=b.param(bv,b.ajaxSettings.traditional);bt="POST";}}}var br=this;b.ajax({url:bs,type:bt,dataType:"html",data:bv,complete:function(by,bx,bz){bz=by.responseText; if(by.isResolved()){by.done(function(bA){bz=bA;});br.html(e?b("
").append(bz.replace(a2,"")).find(e):bz);}if(bw){br.each(bw,[bz,bx,by]);}}});return this;},serialize:function(){return b.param(this.serializeArray());},serializeArray:function(){return this.map(function(){return this.elements?b.makeArray(this.elements):this;}).filter(function(){return this.name&&!this.disabled&&(this.checked||q.test(this.nodeName)||aV.test(this.type)); }).map(function(e,br){var bs=b(this).val();return bs==null?null:b.isArray(bs)?b.map(bs,function(bu,bt){return{name:br.name,value:bu.replace(bp,"\r\n")};}):{name:br.name,value:bs.replace(bp,"\r\n")};}).get();}});b.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(e,br){b.fn[br]=function(bs){return this.bind(br,bs);};});b.each(["get","post"],function(e,br){b[br]=function(bs,bu,bv,bt){if(b.isFunction(bu)){bt=bt||bv; bv=bu;bu=K;}return b.ajax({type:br,url:bs,data:bu,success:bv,dataType:bt});};});b.extend({getScript:function(e,br){return b.get(e,K,br,"script");},getJSON:function(e,br,bs){return b.get(e,br,bs,"json");},ajaxSetup:function(br,e){if(e){ah(br,b.ajaxSettings);}else{e=br;br=b.ajaxSettings;}ah(br,e);return br;},ajaxSettings:{url:az,isLocal:aH.test(s[1]),global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":aO},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":a7.String,"text html":true,"text json":b.parseJSON,"text xml":b.parseXML},flatOptions:{context:true,url:true}},ajaxPrefilter:f(W),ajaxTransport:f(r),ajax:function(bv,bt){if(typeof bv==="object"){bt=bv; bv=K;}bt=bt||{};var bz=b.ajaxSetup({},bt),bO=bz.context||bz,bC=bO!==bz&&(bO.nodeType||bO instanceof b)?b(bO):b.event,bN=b.Deferred(),bJ=b._Deferred(),bx=bz.statusCode||{},by,bD={},bK={},bM,bu,bH,bA,bE,bw=0,bs,bG,bF={readyState:0,setRequestHeader:function(bP,bQ){if(!bw){var e=bP.toLowerCase();bP=bK[e]=bK[e]||bP;bD[bP]=bQ;}return this;},getAllResponseHeaders:function(){return bw===2?bM:null;},getResponseHeader:function(bP){var e; if(bw===2){if(!bu){bu={};while((e=ay.exec(bM))){bu[e[1].toLowerCase()]=e[2];}}e=bu[bP.toLowerCase()];}return e===K?null:e;},overrideMimeType:function(e){if(!bw){bz.mimeType=e;}return this;},abort:function(e){e=e||"abort";if(bH){bH.abort(e);}bB(0,e);return this;}};function bB(bV,bQ,bW,bS){if(bw===2){return;}bw=2;if(bA){clearTimeout(bA);}bH=K;bM=bS||"";bF.readyState=bV>0?4:0;var bP,b0,bZ,bT=bQ,bU=bW?bf(bz,bF,bW):K,bR,bY; if(bV>=200&&bV<300||bV===304){if(bz.ifModified){if((bR=bF.getResponseHeader("Last-Modified"))){b.lastModified[by]=bR;}if((bY=bF.getResponseHeader("Etag"))){b.etag[by]=bY;}}if(bV===304){bT="notmodified";bP=true;}else{try{b0=F(bz,bU);bT="success";bP=true;}catch(bX){bT="parsererror";bZ=bX;}}}else{bZ=bT;if(!bT||bV){bT="error";if(bV<0){bV=0;}}}bF.status=bV;bF.statusText=""+(bQ||bT);if(bP){bN.resolveWith(bO,[b0,bT,bF]); }else{bN.rejectWith(bO,[bF,bT,bZ]);}bF.statusCode(bx);bx=K;if(bs){bC.trigger("ajax"+(bP?"Success":"Error"),[bF,bz,bP?b0:bZ]);}bJ.resolveWith(bO,[bF,bT]);if(bs){bC.trigger("ajaxComplete",[bF,bz]);if(!(--b.active)){b.event.trigger("ajaxStop");}}}bN.promise(bF);bF.success=bF.done;bF.error=bF.fail;bF.complete=bJ.done;bF.statusCode=function(bP){if(bP){var e;if(bw<2){for(e in bP){bx[e]=[bx[e],bP[e]];}}else{e=bP[bF.status]; bF.then(e,e);}}return this;};bz.url=((bv||bz.url)+"").replace(bn,"").replace(c,s[1]+"//");bz.dataTypes=b.trim(bz.dataType||"*").toLowerCase().split(h);if(bz.crossDomain==null){bE=J.exec(bz.url.toLowerCase());bz.crossDomain=!!(bE&&(bE[1]!=s[1]||bE[2]!=s[2]||(bE[3]||(bE[1]==="http:"?80:443))!=(s[3]||(s[1]==="http:"?80:443))));}if(bz.data&&bz.processData&&typeof bz.data!=="string"){bz.data=b.param(bz.data,bz.traditional); }aQ(W,bz,bt,bF);if(bw===2){return false;}bs=bz.global;bz.type=bz.type.toUpperCase();bz.hasContent=!aK.test(bz.type);if(bs&&b.active++===0){b.event.trigger("ajaxStart");}if(!bz.hasContent){if(bz.data){bz.url+=(L.test(bz.url)?"&":"?")+bz.data;delete bz.data;}by=bz.url;if(bz.cache===false){var br=b.now(),bL=bz.url.replace(bo,"$1_="+br);bz.url=bL+((bL===bz.url)?(L.test(bz.url)?"&":"?")+"_="+br:"");}}if(bz.data&&bz.hasContent&&bz.contentType!==false||bt.contentType){bF.setRequestHeader("Content-Type",bz.contentType); }if(bz.ifModified){by=by||bz.url;if(b.lastModified[by]){bF.setRequestHeader("If-Modified-Since",b.lastModified[by]);}if(b.etag[by]){bF.setRequestHeader("If-None-Match",b.etag[by]);}}bF.setRequestHeader("Accept",bz.dataTypes[0]&&bz.accepts[bz.dataTypes[0]]?bz.accepts[bz.dataTypes[0]]+(bz.dataTypes[0]!=="*"?", "+aO+"; q=0.01":""):bz.accepts["*"]);for(bG in bz.headers){bF.setRequestHeader(bG,bz.headers[bG]); }if(bz.beforeSend&&(bz.beforeSend.call(bO,bF,bz)===false||bw===2)){bF.abort();return false;}for(bG in {success:1,error:1,complete:1}){bF[bG](bz[bG]);}bH=aQ(r,bz,bt,bF);if(!bH){bB(-1,"No Transport");}else{bF.readyState=1;if(bs){bC.trigger("ajaxSend",[bF,bz]);}if(bz.async&&bz.timeout>0){bA=setTimeout(function(){bF.abort("timeout");},bz.timeout);}try{bw=1;bH.send(bD,bB);}catch(bI){if(bw<2){bB(-1,bI);}else{b.error(bI); }}}return bF;},param:function(e,bs){var br=[],bu=function(bv,bw){bw=b.isFunction(bw)?bw():bw;br[br.length]=encodeURIComponent(bv)+"="+encodeURIComponent(bw);};if(bs===K){bs=b.ajaxSettings.traditional;}if(b.isArray(e)||(e.jquery&&!b.isPlainObject(e))){b.each(e,function(){bu(this.name,this.value);});}else{for(var bt in e){v(bt,e[bt],bs,bu);}}return br.join("&").replace(j,"+");}});function v(bs,bu,br,bt){if(b.isArray(bu)){b.each(bu,function(bw,bv){if(br||ak.test(bs)){bt(bs,bv); }else{v(bs+"["+(typeof bv==="object"||b.isArray(bv)?bw:"")+"]",bv,br,bt);}});}else{if(!br&&bu!=null&&typeof bu==="object"){for(var e in bu){v(bs+"["+e+"]",bu[e],br,bt);}}else{bt(bs,bu);}}}b.extend({active:0,lastModified:{},etag:{}});function bf(bz,by,bv){var br=bz.contents,bx=bz.dataTypes,bs=bz.responseFields,bu,bw,bt,e;for(bw in bs){if(bw in bv){by[bs[bw]]=bv[bw];}}while(bx[0]==="*"){bx.shift();if(bu===K){bu=bz.mimeType||by.getResponseHeader("content-type"); }}if(bu){for(bw in br){if(br[bw]&&br[bw].test(bu)){bx.unshift(bw);break;}}}if(bx[0] in bv){bt=bx[0];}else{for(bw in bv){if(!bx[0]||bz.converters[bw+" "+bx[0]]){bt=bw;break;}if(!e){e=bw;}}bt=bt||e;}if(bt){if(bt!==bx[0]){bx.unshift(bt);}return bv[bt];}}function F(bD,bv){if(bD.dataFilter){bv=bD.dataFilter(bv,bD.dataType);}var bz=bD.dataTypes,bC={},bw,bA,bs=bz.length,bx,by=bz[0],bt,bu,bB,br,e;for(bw=1; bw=br.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update(); br.animatedProperties[this.prop]=true;for(bs in br.animatedProperties){if(br.animatedProperties[bs]!==true){e=false;}}if(e){if(br.overflow!=null&&!b.support.shrinkWrapBlocks){b.each(["","X","Y"],function(by,bz){bv.style["overflow"+bz]=br.overflow[by];});}if(br.hide){b(bv).hide();}if(br.hide||br.show){for(var bw in br.animatedProperties){b.style(bv,bw,br.orig[bw]);}}br.complete.call(bv);}return false; }else{if(br.duration==Infinity){this.now=bt;}else{bx=bt-this.startTime;this.state=bx/br.duration;this.pos=b.easing[br.animatedProperties[this.prop]](this.state,bx,0,1,br.duration);this.now=this.start+((this.end-this.start)*this.pos);}this.update();}return true;}};b.extend(b.fx,{tick:function(){for(var br=b.timers,e=0;e").appendTo(e),bs=br.css("display");br.remove();if(bs==="none"||bs===""){if(!a4){a4=ap.createElement("iframe");a4.frameBorder=a4.width=a4.height=0;}e.appendChild(a4);if(!m||!a4.createElement){m=(a4.contentWindow||a4.contentDocument).document;m.write((ap.compatMode==="CSS1Compat"?"":"")+"");m.close();}br=m.createElement(bt); m.body.appendChild(br);bs=b.css(br,"display");e.removeChild(a4);}Q[bt]=bs;}return Q[bt];}var T=/^t(?:able|d|h)$/i,Z=/^(?:body|html)$/i;if("getBoundingClientRect" in ap.documentElement){b.fn.offset=function(bE){var bu=this[0],bx;if(bE){return this.each(function(e){b.offset.setOffset(this,bE,e);});}if(!bu||!bu.ownerDocument){return null;}if(bu===bu.ownerDocument.body){return b.offset.bodyOffset(bu);}try{bx=bu.getBoundingClientRect(); }catch(bB){}var bD=bu.ownerDocument,bs=bD.documentElement;if(!bx||!b.contains(bs,bu)){return bx?{top:bx.top,left:bx.left}:{top:0,left:0};}var by=bD.body,bz=aF(bD),bw=bs.clientTop||by.clientTop||0,bA=bs.clientLeft||by.clientLeft||0,br=bz.pageYOffset||b.support.boxModel&&bs.scrollTop||by.scrollTop,bv=bz.pageXOffset||b.support.boxModel&&bs.scrollLeft||by.scrollLeft,bC=bx.top+br-bw,bt=bx.left+bv-bA;return{top:bC,left:bt}; };}else{b.fn.offset=function(bB){var bv=this[0];if(bB){return this.each(function(bC){b.offset.setOffset(this,bB,bC);});}if(!bv||!bv.ownerDocument){return null;}if(bv===bv.ownerDocument.body){return b.offset.bodyOffset(bv);}b.offset.initialize();var by,bs=bv.offsetParent,br=bv,bA=bv.ownerDocument,bt=bA.documentElement,bw=bA.body,bx=bA.defaultView,e=bx?bx.getComputedStyle(bv,null):bv.currentStyle,bz=bv.offsetTop,bu=bv.offsetLeft; while((bv=bv.parentNode)&&bv!==bw&&bv!==bt){if(b.offset.supportsFixedPosition&&e.position==="fixed"){break;}by=bx?bx.getComputedStyle(bv,null):bv.currentStyle;bz-=bv.scrollTop;bu-=bv.scrollLeft;if(bv===bs){bz+=bv.offsetTop;bu+=bv.offsetLeft;if(b.offset.doesNotAddBorder&&!(b.offset.doesAddBorderForTableAndCells&&T.test(bv.nodeName))){bz+=parseFloat(by.borderTopWidth)||0;bu+=parseFloat(by.borderLeftWidth)||0; }br=bs;bs=bv.offsetParent;}if(b.offset.subtractsBorderForOverflowNotVisible&&by.overflow!=="visible"){bz+=parseFloat(by.borderTopWidth)||0;bu+=parseFloat(by.borderLeftWidth)||0;}e=by;}if(e.position==="relative"||e.position==="static"){bz+=bw.offsetTop;bu+=bw.offsetLeft;}if(b.offset.supportsFixedPosition&&e.position==="fixed"){bz+=Math.max(bt.scrollTop,bw.scrollTop);bu+=Math.max(bt.scrollLeft,bw.scrollLeft); }return{top:bz,left:bu};};}b.offset={initialize:function(){var e=ap.body,br=ap.createElement("div"),bu,bw,bv,bx,bs=parseFloat(b.css(e,"marginTop"))||0,bt="
"; b.extend(br.style,{position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"});br.innerHTML=bt;e.insertBefore(br,e.firstChild);bu=br.firstChild;bw=bu.firstChild;bx=bu.nextSibling.firstChild.firstChild;this.doesNotAddBorder=(bw.offsetTop!==5);this.doesAddBorderForTableAndCells=(bx.offsetTop===5);bw.style.position="fixed";bw.style.top="20px";this.supportsFixedPosition=(bw.offsetTop===20||bw.offsetTop===15); bw.style.position=bw.style.top="";bu.style.overflow="hidden";bu.style.position="relative";this.subtractsBorderForOverflowNotVisible=(bw.offsetTop===-5);this.doesNotIncludeMarginInBodyOffset=(e.offsetTop!==bs);e.removeChild(br);b.offset.initialize=b.noop;},bodyOffset:function(e){var bs=e.offsetTop,br=e.offsetLeft;b.offset.initialize();if(b.offset.doesNotIncludeMarginInBodyOffset){bs+=parseFloat(b.css(e,"marginTop"))||0; br+=parseFloat(b.css(e,"marginLeft"))||0;}return{top:bs,left:br};},setOffset:function(bt,bC,bw){var bx=b.css(bt,"position");if(bx==="static"){bt.style.position="relative";}var bv=b(bt),br=bv.offset(),e=b.css(bt,"top"),bA=b.css(bt,"left"),bB=(bx==="absolute"||bx==="fixed")&&b.inArray("auto",[e,bA])>-1,bz={},by={},bs,bu;if(bB){by=bv.position();bs=by.top;bu=by.left;}else{bs=parseFloat(e)||0;bu=parseFloat(bA)||0; }if(b.isFunction(bC)){bC=bC.call(bt,bw,br);}if(bC.top!=null){bz.top=(bC.top-br.top)+bs;}if(bC.left!=null){bz.left=(bC.left-br.left)+bu;}if("using" in bC){bC.using.call(bt,bz);}else{bv.css(bz);}}};b.fn.extend({position:function(){if(!this[0]){return null;}var bs=this[0],br=this.offsetParent(),bt=this.offset(),e=Z.test(br[0].nodeName)?{top:0,left:0}:br.offset();bt.top-=parseFloat(b.css(bs,"marginTop"))||0; bt.left-=parseFloat(b.css(bs,"marginLeft"))||0;e.top+=parseFloat(b.css(br[0],"borderTopWidth"))||0;e.left+=parseFloat(b.css(br[0],"borderLeftWidth"))||0;return{top:bt.top-e.top,left:bt.left-e.left};},offsetParent:function(){return this.map(function(){var e=this.offsetParent||ap.body;while(e&&(!Z.test(e.nodeName)&&b.css(e,"position")==="static")){e=e.offsetParent;}return e;});}});b.each(["Left","Top"],function(br,e){var bs="scroll"+e; b.fn[bs]=function(bv){var bt,bu;if(bv===K){bt=this[0];if(!bt){return null;}bu=aF(bt);return bu?("pageXOffset" in bu)?bu[br?"pageYOffset":"pageXOffset"]:b.support.boxModel&&bu.document.documentElement[bs]||bu.document.body[bs]:bt[bs];}return this.each(function(){bu=aF(this);if(bu){bu.scrollTo(!br?bv:b(bu).scrollLeft(),br?bv:b(bu).scrollTop());}else{this[bs]=bv;}});};});function aF(e){return b.isWindow(e)?e:e.nodeType===9?e.defaultView||e.parentWindow:false; }b.each(["Height","Width"],function(br,e){var bs=e.toLowerCase();b.fn["inner"+e]=function(){var bt=this[0];return bt&&bt.style?parseFloat(b.css(bt,bs,"padding")):null;};b.fn["outer"+e]=function(bu){var bt=this[0];return bt&&bt.style?parseFloat(b.css(bt,bs,bu?"margin":"border")):null;};b.fn[bs]=function(bv){var bw=this[0];if(!bw){return bv==null?null:this;}if(b.isFunction(bv)){return this.each(function(bA){var bz=b(this); bz[bs](bv.call(this,bA,bz[bs]()));});}if(b.isWindow(bw)){var bx=bw.document.documentElement["client"+e],bt=bw.document.body;return bw.document.compatMode==="CSS1Compat"&&bx||bt&&bt["client"+e]||bx;}else{if(bw.nodeType===9){return Math.max(bw.documentElement["client"+e],bw.body["scroll"+e],bw.documentElement["scroll"+e],bw.body["offset"+e],bw.documentElement["offset"+e]);}else{if(bv===K){var by=b.css(bw,bs),bu=parseFloat(by); return b.isNaN(bu)?by:bu;}else{return this.css(bs,typeof bv==="string"?bv:bv+"px");}}}};});a7.jQuery=a7.$=b;})(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("").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);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"};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=$('');$(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.appendChild(linkCss); }else{document.write('');}}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=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=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=0;--f){a=b[f].getAttribute("src")||"";c=g(a);p=c.split("&");for(var e=0;e');this.updatePosition=this._createFunctionForScroll({debugTransforms:m.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.currentContainerPosition=new Point(0,0);this.checkResize();this.initEvents();for(var e in a){if(!a.hasOwnProperty(e)){continue;}var g=a[e];this.addLayerSet(e,g); }if(this.configure.enableOpenStreetMap){this.toggleOpenStreetMap(true);}this.setHybridPhoto(this.configure.hybridPhoto);this.setWeatherOverlay(this.configure.weatherOverlay);this.setTsunamiOverlay(this.configure.tsunamiOverlay);this.indoorControl=null;this.indoorMaxZoom=null;this.setIndoorOverlay(this.configure.indoorOverlay);this.toggleMapType(this.configure.mapType);var h=(typeof Service.Options["seamless"]==="undefined")?"":Service.Options["seamless"]; if(h==="gws"){this.enableGWS=true;}else{this.enableGWS=false;}this.infoWindowMargin={left:10,right:10,top:30,bottom:30};this.infoWindowImage=m.infoWindowImage||"";m.logoControl=(m.logoControl==undefined)?true:m.logoControl;m.logoControlOptions=m.logoControlOptions||{};if(m.logoControl){this._logoControl=new Y.LogoControl(m.logoControlOptions);this.addControl(this._logoControl);}this._serviceName="Map"; };Map.TYPE={STANDARD:"normal",SMARTPHONE:"smartphone",WEATHER_RADAR:"weather-radar"};Map.prototype.setConfigures=function(a){for(var b in a){if(!a.hasOwnProperty(b)){continue;}this.setConfigure(b,a[b]);}};Map.prototype.setConfigure=function(b,d){if(b!=="mapType"){d=(typeof d!=="boolean")?false:d;}var c=(this.configure[b]!==d);this.configure[b]=d;if(b==="touchSupport"){var a;if(d&&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(b==="hybridPhoto"){this.setHybridPhoto(d);if(c){Y.Event.trigger(this,"hybridphotochanged",d);}}if(b==="enableOpenStreetMap"){this.toggleOpenStreetMap(d);}if(b==="mapType"){this.toggleMapType(d);if(c){Y.Event.trigger(this,"maptypechanged",d); this.redraw(true);}}if(b==="weatherOverlay"){this.setWeatherOverlay(d);if(c){Y.Event.trigger(this,"weatheroverlaychanged",d);}}if(b==="indoorOverlay"){this.setIndoorOverlay(d);if(c){Y.Event.trigger(this,"indooroverlaychanged",d);}}if(b==="tsunamiOverlay"){this.setTsunamiOverlay(d);if(c){Y.Event.trigger(this,"tsunamioverlaychanged",d);}}};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;cthis.currentLayerSet.getMaxZoom()){this.zoom=this.currentLayerSet.getMaxZoom(); }else{if(this.zoomthis.getMinZoom();f--){var b=e.fromLatLngToPixel(k,f);var c=e.fromLatLngToPixel(d,f);var j=c.x-b.x;var g=c.y-b.y;if(j*0.98this.getMaxZoom()){l=this.getMaxZoom();}else{if(lthis.getMaxZoom()||d0){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)0&&Math.abs(h)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.bottomh){h=f.top;}if(f.bottomf.right){if(bf.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.bottomh){h=f.top;}if(f.bottoma){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()-k0){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()-ok){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()-o100)?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.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)"});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.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"){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)"});};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+")"}); };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()&&aa){a=this.map.getMinZoom(); s=a-j;}var n=Y.Util.level2Scale(j);var l=Y.Util.level2Scale(a);f=n/l;this.canvas=$('');$(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;var b;if(B){b=new Y.Point(((e.width/2)-((e.width*f)/2)),((e.height/2)-((e.height*f)/2)));}else{b=new Y.Point((D.x-(D.x*f)),(D.y-(D.y*f)));}if(f<1){this.canvas.css({position:"relative",width:e.width*f,height:e.height*f,top:b.y+"px",left:b.x+"px"});var q=Math.round(o);for(var w=0;w0){$("#mapCanvas",c.map.getContainer()).remove();}i=null;},1000);};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.isKeepZoomer;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(x){var w=$("#mapCanvas",d.getContainer()).get();if(w.length>0){$("#mapCanvas",d.getContainer()).remove();}if((x.touches.length>1)&&h.scrollPinchZoom){l=true;}if(x.touches.length>1){q=m.getScreenPoint(x,l);m._dblpoidbltap(x);}else{if(!m.enableTouchScroll){return; }q=m.getScreenPoint(x,l);m._dbltap(x);if(h.holdSupport){if(i){clearTimeout(i);}i=setTimeout(function(){Event.trigger(d,"hold",ll);m._touchend(x);},v);}}o=s();c=q;x.preventDefault();b=x.touches.length;};this._touchmove=function(B){if(!m.enableTouchScroll){return;}if(g){return;}g=true;B.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 A=m.getScreenPoint(B,l);var x=A.x-c.x;var w=A.y-c.y;var z=d.checkRange(new Point(x,w));if((B.scale>1)&&(u)){}else{if(B.scale>0.9){d.updatePosition(z.x,z.y);d.panUpdate();d.currentLayerSet.onPan(z.x,z.y);}else{if(!u){d.updatePosition(z.x,z.y);d.panUpdate();}}}c=A;e=A;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()-ov){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=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 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 e=this.map;var g=false;var w=true;var t=function(){return new Date().getTime(); };this.enableTouchScroll=this.map.configure.dragging;if(this.enableTouchScroll){w=this.map.configure.PinchZoomCenter;g=this.map.configure.enableFlickScroll;}var u=false;var q;var s;var d;var h;var i;var n=false;var j=e.configure;var f;var x=500;var k=null;var r=1;var v;var c=0;var b=false;var o=$(e.getMapContainer());var m=300;var l=0;var a;this._touchstart=function(C){if((C.touches.length>1)&&j.scrollPinchZoom){n=true; var A=$("#mapCanvas",e.getContainer()).get();if(A.length>0){$("#mapCanvas",e.getContainer()).remove();}}if(C.touches.length>1){this.enableTouchScroll=false;s=p.getScreenPoint(C,n);v=p.pythagorean(C.touches[0].pageX,C.touches[1].pageX,C.touches[0].pageY,C.touches[1].pageY);var z=$(".yolp-layer",o);z.css({display:"none"});p._dblpoidbltap(C);h=s;i=null;}else{s=p.getScreenPoint(C,n);p._dbltap(C);if(j.holdSupport){if(k){clearTimeout(k); }var B=e.fromContainerPixelToLatLng(s);k=setTimeout(function(){Event.trigger(e,"hold",B);p._touchend(C);},x);}i=s;}q=t();d=s;C.preventDefault();c=C.touches.length;};this._touchmove=function(F){F.preventDefault();if(F.touches.length>1){var E=10;var D=2;var B=p.pythagorean(F.touches[0].pageX,F.touches[1].pageX,F.touches[0].pageY,F.touches[1].pageY);if((Math.abs(B-v)>1)&&!b){if(j.scrollPinchZoom){b=true; n=true;var z=$(".yolp-tilelayer",o);var A=e.getSize();var H=p.pythagorean(A.width,0,A.height,0);if(B>v){r=r+(((B-v)/H)*D);}else{if(B1)){}else{if(r>0.9){e.updatePosition(G.x,G.y);e.panUpdate();e.currentLayerSet.onPan(G.x,G.y);}else{if(!w){e.updatePosition(G.x,G.y);e.panUpdate();}}}d=C;Event.trigger(e,"move");Event.trigger(e,"drag");}};this._touchend=function(C){if(C.touches.length==1&&j.scrollPinchZoom){this.isKeepZoomer=p._changeZoom(r); if(this.isKeepZoomer){var z=$(".yolp-layer",o);z.css({display:"block"});}var B=$(".yolp-tilelayer",o);p._makeCanvasMap(r,f,w,this.isKeepZoomer);p._fixscale(C,r,B,f,w,this.enableTouchScroll,this.isKeepZoomer);r=1;if(t()-q>Y.Behavior.TWEEN_RANGE){n=false;}}if(u&&C.touches.length===0){e.panUpdate();e.updateBounds();if(g&&t()-qx){return;}else{if(k){clearTimeout(k);k=null;}}}if((p.pythagorean(d.x,s.x,d.y,s.y)<4)&&c==1){p._sgltap(C);Event.trigger(e,"click",e.fromContainerPixelToLatLng(s));}}s=null;};this._sgltap=function(z){if(a){clearTimeout(a); }a=setTimeout(function(){Event.trigger(e,"sgltap");},300);};this._dbltap=function(A){var z=e.fromContainerPixelToLatLng(s);if(i&&s.distance(i)<20){if(t()-q=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 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(++f3||C){c();return; }var w=1;if(!A){w=k;}var u;var B;var e;if(D.transform){x.css(D.origin,h.x+"px "+h.y+"px");}else{e=a.getProjection().getTilePixel();B=[];u=a.mapContainer.find(".yolp-tilelayer").children();var s=0;u.each(function(){var i=$(this).position();B[s++]=new Y.Point(i.left,i.top);});}function g(){if(w<=k){var z;if(D.transform){if(j>1){z=((j-1)/k*w)+1;}else{if(j<1){z=1-((1-j)/k*w);}}x.css(D.transform,D.gpu+" scale("+z+")"); }else{var i=0;if(j>1){z=j-1;u.each(function(){var t;if((t=B[i++])){$(this).css({left:Math.round(t.x+(t.x-h.x)/k*w*z)+"px",top:Math.round(t.y+(t.y-h.y)/k*w*z)+"px",width:Math.ceil(e+e/k*w*z),height:Math.ceil(e+e/k*w*z)});}});}else{if(j<1){z=1-j;u.each(function(){var t;if((t=B[i++])){$(this).css({left:Math.round(t.x-(t.x-h.x)/k*w*z)+"px",top:Math.round(t.y-(t.y-h.y)/k*w*z)+"px",width:Math.ceil(e-e/k*w*z),height:Math.ceil(e-e/k*w*z)}); }});}}}w++;}else{clearInterval(v.zoomAnimation);v.zoomAnimation=null;c();}}function c(){var i=h.x+a.currentContainerPosition.x;var G=h.y+a.currentContainerPosition.y;var F=a.getSize();var z=(F.width/2)-i;var t=(F.height/2)-G;if(j<1){z=-z*j;t=-t*j;}var E=a.checkRange(new Point(z,t));if(v.enableGuideLayer){if(v.guide){v.guide.remove();v.guide=null;}v.guide=a.mapContainer.children(".yolp-tilelayer").clone(); v.guide.css({left:(v.guide.position().left-E.x)+"px",top:(v.guide.position().top-E.y)+"px"});a.mapContainer.prepend(v.guide);}if(C){a.pan(E.x,E.y,false,true,o);}else{a.pan(E.x,E.y,false,true);}a.redraw(true);delete v.zoomAnimation;if(v.enableGuideLayer){setTimeout(function(){if(v.guide){v.guide.remove();v.guide=null;}},1000);}if(D.transform){x.css(D.transform,"");x.css(D.origin,"");}b.css({display:"block"}); v.is_zooming=false;if(n){Event.trigger(a,"moveend");}Event.trigger(a,"zoomend",d,l);}v.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 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(++fe){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=$("");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 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.widththis.bottom())&&(d.bottom()d.bottom())&&(this.bottom()this.bottom())&&(d.top()d.bottom())&&(this.top()this.left())&&(d.right()d.left())&&(this.right()this.left())&&(d.left()d.left())&&(this.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.bottom())&&(e.top()this.left())&&(e.right()this.bottom())&&(e.bottom()=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())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;h360){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()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.bottom())&&(c.lat()=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.bottom())&&(e.top()this.left())&&(e.right()this.bottom())&&(e.bottom()this.bottom())&&(d.bottom()d.bottom())&&(this.bottom()this.bottom())&&(d.top()d.bottom())&&(this.top()this.left())&&(d.right()d.left())&&(this.right()this.left())&&(d.left()d.left())&&(this.left()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.lat1;var o=("ontouchstart" in window);var i=("ongesturestart" in window);var n=(f||q)&&o;var k=(f||q)&&i;if(f&&/; CPU.*OS (?:3_2|4_0)/i.test(m)){$.fn.Oldoffset=$.fn.offset;$.fn.offset=function(){var s=$(this).Oldoffset();s.top-=window.scrollY;s.left-=window.scrollX;return s;};}var a=true; if(q&&d.indexOf("4.2")==0&&!c){a=false;}var b=location.protocol==="https:";return{osVersion:d,isIOS:f,isIPhone:p,isAndroid:q,isMac:g,isWin:h,isRetinaDisplay:j,isSupportAlphaChanel:l,isSupportTouchScroll:n,isSupportPinchZoom:k,isEnableFadeIn:a,isSecure:b,devicePixelRatio:(window.devicePixelRatio||1)};})(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.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=$('
'+h+"
"),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(ch.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=$('
'); }var b=this.node;var k=$('
');b.append(k);var h=$("").disableImageSelect();k.append(h);var c=$('');h.append(c);if(g){this.anchor=$('
').append($('').loadAlphaImage()); }else{this.anchor=$('
').append($('').loadAlphaImage());}c.append(this.anchor.disableImageSelect());if(a){c.append($('\u8a73\u7d30\u3092\u898b\u308b').bind("click",function(m){e.maximize(); m.stopPropagation();}));}if(g){c.append($('\u5143\u306e\u30b5\u30a4\u30ba\u306b\u623b\u3059').bind("click",function(m){e.restore();m.stopPropagation();}));}c.append($('\u9589\u3058\u308b').bind("click",function(m){e.close(); m.stopPropagation();}));h.append($(''));h.append($(''));k.append(h);k.append($('').append($('')).append($('').append(f)).append($('').disableImageSelect())); k.append($('').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');}if(!this.iconSize){this.iconSize=Y.Cache.get("iconsize:"+this.image); if(!this.iconSize){a.hide();var b=this;a.bind("load",function(){b.iconSize=new Size(a.width(),a.height());Y.Cache.set("iconsize:"+b.image,b.iconSize);b.setIconStyle(a);a.show();});return a;}}this.setIconStyle(a);return a;};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)"); }};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.EndLine,a.StartLine);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='
';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=$('
Log
');var c=this;d.append($(' clear').bind("click",function(){c.clear();}));d.append($(' close').bind("click",function(){c.hide(); }));this.node.append(d);this.body=$("
");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("
"+(++this.count)+":"+a+"
");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=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;ij;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;j0;a--){b+="0";}five_poi[j]=b.concat(five_poi[j]);}merge="";for(j=0;j=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)};};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=$("

",{"class":this.className,html:c});var a=$("",{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=$("

",{"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=$("

",{"class":this.className,html:c}).append($("",{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=$("

");this.node.append(this.label); this.node.css({zIndex:0,position:"absolute",left:l+"px",top:k+"px"});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({zIndex:0,position:"absolute",left:j+"px",top:i+"px"});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;bc/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);}};Polyline.prototype.clipRect=function(h,a){var d=function(n,m,l,i){if(n.x>=m.x){if((n.xl.x&&m.x>i.x)){return false;}}else{if((m.xl.x&&n.x>i.x)){return false;}}if(n.y>=m.y){if((n.yl.y&m.y>i.y)){return false;}}else{if((m.yl.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;nf.x){f.x=j.x;}if(j.y>f.y){f.y=j.y;}if(j.x=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=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='
';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'; 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);}};Polygon.prototype.clipRect=function(h,a){var d=function(n,m,l,i){if(n.x>=m.x){if((n.xl.x&&m.x>i.x)){return false; }}else{if((m.xl.x&&n.x>i.x)){return false;}}if(n.y>=m.y){if((n.yl.y&m.y>i.y)){return false;}}else{if((m.yl.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;nf.x){f.x=j.x;}if(j.y>f.y){f.y=j.y;}if(j.x=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);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-eg.y&&j.y-f

').append($('').loadAlphaImage());e.mainContainer.append(this.centerMark);if(!this.options.visible){this.centerMark.hide(); }var b=Y.Util.Platform.scrollType==="CSS3";if(b){this.centerMark.css("-webkit-transform","translate3d(0, 0, 0)");}this.button=$('
').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('\u4e2d\u5fc3\u70b9\u3092\u975e\u8868\u793a\u306b\u3059\u308b'); 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('\u4e2d\u5fc3\u70b9\u3092\u8868\u793a\u3059\u308b');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(d){var c=$('
    ');this.btn=$('
    ');this.list=$("
    ").hide();this.overlays;var e=this;function a(){e.btn.empty();e.list.empty();c.empty();e.setEnableOverlayButton(e.options.enableOverlayButton);var i=$('
  • '); if(e.options.offsetOverlayButton.x!==0||e.options.offsetOverlayButton.y!==0){i.css({position:"relative",left:e.options.offsetOverlayButton.x+"px",top:e.options.offsetOverlayButton.y+"px"});}if(Y.Util.IS_TOUCH_SCREEN){e.btn.bind("touchstart",function(){if(e.list.css("display")==="block"){e.setBtn();e.list.hide();}else{var o=20;if(!e.isUpper()){o=-e.list.height()-3;}e.setBtn(true);e.list.css({"margin-top":o+"px",color:"black"}).show(); }});}else{i.bind("mouseover",function(){var o=20;if(!e.isUpper()){o=-e.list.height()-3;}e.setBtn(true);e.list.css({"margin-top":o+"px",color:"black"}).show();});i.bind("mouseout",function(){e.setBtn();e.list.hide();});}e.overlays={};var h={};h.id="weatherOverlay";h.minZoom=1;h.maxZoom=15;h.name="\u96e8\u96f2\u30ec\u30fc\u30c0\u30fc";h.item=e.createOverlay(h);e.list.append(h.item);e.overlays[h.id]=h;if(e.map.enableIndoorMapLayer){var g={}; g.id="indoorOverlay";g.minZoom=18;g.maxZoom=22;g.name="\u5c4b\u5185\u5730\u56f3";g.item=e.createOverlay(g);e.list.append(g.item);e.overlays[g.id]=g;}i.append(e.btn);i.append(e.list);c.append(i);var n=d.getLayerSets();var k=d.getCurrentLayerSet();for(var f in n){if(!n.hasOwnProperty(f)){continue;}var j=n[f],l;if(k==j){l="yolp-layerset-on";}else{if(!j.getEnable()){l="yolp-layerset-disable";}else{l="yolp-layerset-off";}}l+=" "+f; var m=$('
  • '+j.getFullName()+"
  • ");if(e.map.configure.touchSupport&&Y.Util.IS_TOUCH_SCREEN){m.bind("touchstart",(function(o){return function(q){var p=e.map.getLayerSet(o);if(p.getEnable()&&d.currentLayerSetId!=o){d.setLayerSet(o);}};})(f));}else{m.bind("click",(function(o){return function(q){var p=e.map.getLayerSet(o);if(p.getEnable()&&d.currentLayerSetId!=o){d.setLayerSet(o); }};})(f));}c.append(m);}}function b(h){var g=e.map.getConfigure(h);var f=e.node.find("#"+h).children("input:checkbox");if(g){f.attr("checked","checked");}else{f.removeAttr("checked");}}a();this.listeners=[];this.listeners.push(Event.addListener(d,"layersetchanged",function(){a();}));this.listeners.push(Event.addListener(d,"addlayerset",function(){a();}));this.listeners.push(Event.addListener(d,"removelayerset",function(){a(); }));this.listeners.push(Event.addListener(d,"layerlistchanged",function(){var j=d.getLayerSets();var i=d.getCurrentLayerSet();for(var l in j){if(!j.hasOwnProperty(l)){continue;}var g=j[l],f;if(i==g){f="yolp-layerset-on "+l;var k=$("."+l);var h=k.attr("class");if(f==h){}else{k.removeClass(h).addClass(f);}}else{if(!g.getEnable()){f="yolp-layerset-disable "+l;var k=$("."+l);var h=k.attr("class");if(f==h){}else{k.removeClass(h).addClass(f); }}else{f="yolp-layerset-off "+l;var k=$("."+l);var h=k.attr("class");if(f==h){}else{k.removeClass(h).addClass(f);}}}}e.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(e.map,"zoomend",function(){e.setEnableWeatherOverlay(); e.setEnableIndoorOverlay();}));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.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.name+"
    ");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||bc.maxZoom||b").css({width:"206px",height:"10px",bottom:"1px",right:"1px",font:"normal 9px verdana",position:"absolute"}).attr({align:"left","class":"scalebar"}); var b=$("
    ").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=$("
    ").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=$("
    ").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=$("").css({position:"absolute",top:"1px",right:"0px"}).attr("unitsPanel",true); e.append(h);return e;};ScaleControl.prototype.getScaleImg=function(b,c){var a=$('');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');var a=$('
    ').bind("click",function(){c.zoomOut(); });var d=$('
    ').bind("click",function(){c.zoomIn();});b.append(a);b.append(d);return b;};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=$('').append($('').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){$('