var $m={timer:(new Date).getTime(),timer_ajax:!1,wand:{},trick:{},h:{},t:{},lang:{},vd:{},ready:!1,ajax_init:!1,data_att:"data-mjf",document:document,head_tag:document.getElementsByTagName("head")[0],body_id:"magic_body",ga:!1,debugger_css_version:"12.4.19",xhttp:!1,ajax_ids:{},html_singletons:["area","base","br","col","command","embed","hr","img","iframe","input","link","meta","param","source"],app_cache:{available:!!window.applicationCache},error_wrapper:{open:'', close:""},ajax:function(){this.config={callback:"simple_content_update",element_id:!1,ga_track:!0,method:"get",password:"",query:"",timeout:$m.config.ajax.timeout,update_id:!1,update_id_action:"overwrite",update_id_scroll_top:!1,update_id_scroll_to:!1,url:!1,username:""};this.json_queue=[];this.request={response_text:!1,update_id_action:!1,errord:!1,timeout:{did:!1,id:!1},rs_msg:["0. UNSENT - Open hasn't been called","1. OPENED - Send hasn't been called","2. HEADERS RECEIVED - Send has been called", "3. LOADING - Server responded; Downloading response data","4. DONE - Operation complete"],error_codes:{e0:"Your request wasn't sent. Something on your computer is blocking it.",e400:"400 Bad Request",e401:"401 Unauthorized",e403:"403 Forbidden",e404:"404 Not Found",e405:"405 Method Not Allowed",e408:"408 Request Timeout",e500:"500 Internal Server Error",e501:"501 Not Implemented",e502:"502 Bad Gateway",e503:"503 Service Unavailable",e504:"504 Gateway Timeout",e505:"505 HTTP Version Not Supported"}}; this.xhttp=$m.init_xml();$m.is.alive(this.xhttp)===!1&&$m.de.throw_browser_error("$m.ajax() unable to initialize AJAX");this.init=function(a){if($m.is.alive(a)===!1)return $m.de.throw_browser_error("Missing IN_VAR argument for $m.ajax.init()"),!1;if($m.is.string(a)===!0){var b={};b.callback=$m.attr.get(a,"data-mjf_ajax_call_on_success");b.element_id=a;b.ga_track=$m.attr.get(a,"data-mjf_ga_track");b.method=$m.attr.get(a,"data-mjf_ajax_method");b.password=$m.attr.get(a,"data-mjf_ajax_password");b.query= $m.attr.get(a,"data-mjf_ajax_query");b.timeout=$m.attr.get(a,"data-mjf_ajax_timeout");b.update_id=$m.attr.get(a,"data-mjf_ajax_update_id");b.update_id_action=$m.attr.get(a,"data-mjf_ajax_update_id_action");b.update_id_scroll_top=$m.attr.get(a,"data-mjf_ajax_update_id_scroll_top")=="true";b.update_id_scroll_to=$m.attr.get(a,"data-mjf_ajax_update_id_scroll_to");b.url=$m.attr.get(a,"data-mjf_ajax_url");b.username=$m.attr.get(a,"data-mjf_ajax_username")}else b=a;$m.tag.get_name(a)=="form"?b.query=$m.query_string.create(a): b.query===null?b.query="":(a=$m.query_string.parse(b.query),b.query=$m.query_string.create(a));for(var c in b)$m.is.alive(b[c])===!1||c=="interval"||(this.config[c]=b[c]);if(this.config.callback==="magic_json")this.config.callback="parse_returned_json";if(this.config.ga_track==="false")this.config.ga_track=!1;this.config.timeout=parseInt(this.config.timeout);if(this.config.update_id_scroll_top==="true")this.config.update_id_scroll_top=!0;if(this.config.update_id_scroll_to==="true")this.config.update_id_scroll_to= !0};this.just_html_update=function(a){if($m.is.alive(a)===!1)return $m.de.throw_browser_error("$m.ajax.just_html_update()===in_this `' + in_this + '` does not exist."),!1;var b=$m.is.good_id(a.config.update_id),c=$m.ev.script(a.request.response_text);if(b===!1)return $m.de.throw_browser_error("$m.ajax.just_html_update()===update_id `' + this_object.config.update_id + '` does not exist."),!1;$m.config.ajax.debug===!0&&$m.de.add_item("$m.ajax.just_html_update() --- this_object.config.update_id="+ a.config.update_id+" \n this_object.request.response_text="+a.request.response_text);a.request.errord===!1&&(a.config.update_id_action==="append"?$m.tag.html(b,c,"append"):a.config.update_id_action==="prepend"?$m.tag.html(b,c,"prepend"):$m.tag.html(b,c,"replace"));a.config.update_id_scroll_top===!0&&$m.smooth_scroll_overflow.construct(a.config.update_id,"up");a.config.update_id_scroll_to===!0&&$m.smooth_scroll.construct(a.config.update_id)};this.parse_returned_json=function(a){if($m.is.alive(a)===!1)return $m.de.throw_browser_error("$m.ajax.parse_returned_json()===in_this `' + in_this + '` does not exist."),!1;var b=$m.try_json_unpack(a.request.response_text),c="",d="",e="";$m.config.ajax.debug===!0&&($m.de.add_item("++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ \n Executing >>> $m.ajax.parse_returned_json()"),$m.de.add_item("this_object.request.response_text="+a.request.response_text));if($m.is.alive(b)===!0){for(var f in b)c=b[f],e="replace",$m.config.ajax.debug===!0&&(a="$m.ajax.parse_returned_json_update() --- current_json properties \n",a+=$m.is.alive(c.update_id)===!0?".update_id="+c.update_id+"\n":".update_id doesn't exist \n",a+=$m.is.alive(c.update_html)===!0?".update_html="+c.update_html+"\n":".update_html doesn't exist \n",a+=$m.is.alive(c.update_method)===!0?".update_method="+c.update_method+"\n":".update_method doesn't exist \n",a+=$m.is.alive(c.update_callback)===!0?".update_callback="+c.update_callback+"\n":".update_callback doesn't exist \n", $m.de.add_item("current_json="+a)),$m.config.ajax.visual===!0&&$m.css_class.add(c.update_id,"ajax_visual_content"),d=$m.is.good_id(c.update_id),$m.is.alive(c.update_method)===!0&&(c.update_method=="append"?e="append":c.update_method=="prepend"&&(e="prepend")),d!==!1&&$m.is.string(c.update_html)===!0&&$m.tag.html(d,c.update_html,e),$m.config.ajax.visual===!0&&setTimeout(function(a){return function(){$m.css_class.remove(a,"ajax_visual_content")}}(c.update_id),1500),$m.is.alive(c.update_callback)===!0&&$m.ev.all(c.update_callback);$m.timer_ajax=(new Date).getTime();setTimeout(function(){$m.init_children(!0)},500)}else $m.de.throw_browser_error($m.lang.core.ajax.failed_msg)};this.exec=function(){var a=this;setTimeout(function(){a.send(a)},0)};this.send=function(a){$m.config.ajax.debug===!0&&$m.de.add_item("++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ \n Executing >>> $m.ajax.send()");if($m.config.ajax.debug===!0){var b=" Configuration:\n",c;for(c in a.config)b+=c+"='"+a.config[c]+ "' \n";$m.de.add_item("$m.ajax.send() --- "+b)}$m.tag.get_name(a.config.element_id)=="a"&&$m.id(a.config.element_id).blur();$m.tag.get_name(a.config.element_id)=="form"&&(b=$m.attr.get(a.config.element_id,"data-mjf_ajax_form_reset"),b!==null&&b=="true"&&$m.id(a.config.element_id).reset());$m.config.ajax.visual===!0&&($m.is.good_id(a.config.element_id)&&($m.tag.get_name(a.config.element_id)=="form"?$m.css_class.add(a.config.element_id,"ajax_visual_form"):$m.css_class.add(a.config.element_id,"ajax_visual")), $m.is.good_id(a.config.update_id)&&($m.css_class.add(a.config.update_id,"mjf_atrans"),$m.css_class.add(a.config.update_id,"ajax_visual_content")));b=($m.is.alive(a.config.query)===!0?a.config.query:"")+"&ajax_call="+(new Date).getTime();if(a.xhttp){a.xhttp.onreadystatechange=function(){switch(a.xhttp.readyState){case 0:$m.config.ajax.debug===!0&&$m.de.add_item("this_object.xhttp.onreadystatechange() --- xhttp.readyState="+a.request.rs_msg[0]+" for '"+a.config.element_id+"'");break;case 1:$m.config.ajax.debug===!0&&$m.de.add_item("this_object.xhttp.onreadystatechange() --- xhttp.readyState="+a.request.rs_msg[1]+" for '"+a.config.element_id+"'");break;case 2:$m.config.ajax.debug===!0&&$m.de.add_item("this_object.xhttp.onreadystatechange() --- xhttp.readyState="+a.request.rs_msg[2]+" for '"+a.config.element_id+"'");break;case 3:$m.config.ajax.debug===!0&&$m.de.add_item("this_object.xhttp.onreadystatechange() --- xhttp.readyState="+a.request.rs_msg[3]+" for '"+a.config.element_id+"'");break;case 4:$m.config.ajax.debug===!0&&($m.de.add_item("this_object.xhttp.onreadystatechange() --- xhttp.readyState="+a.request.rs_msg[4]+" for '"+a.config.element_id+"'"),$m.de.add_item("this_object.xhttp.onreadystatechange()--- this_object.xhttp.status="+a.xhttp.status));if(a.request.timeout.did===!0)a.request.response_text=$m.error_wrapper.open+$m.lang.core.ajax.timeout_msg+$m.error_wrapper.close,a.request.timeout.did=!1,a.request.errord=!0;else{var b="e"+a.xhttp.status;$m.is.alive(a.request.error_codes[b])===!0?(a.request.response_text= ''+a.request.error_codes[b]+"",a.request.errord=!0):a.xhttp.status==200?a.request.response_text=a.xhttp.responseText==0?$m.error_wrapper.open+$m.lang.core.ajax.waiting_msg+$m.error_wrapper.close:a.xhttp.responseText:a.request.errord=!0}clearTimeout(a.request.timeout.id);if($m.is.alive(a[a.config.callback])===!0)a[a.config.callback](a);else if($m.is.alive(window[a.config.callback])===!0)window[a.config.callback](a);else $m.de.throw_browser_error("this_object.xhttp.onreadystatechange()===this_object.config.callback `' + this_object.config.callback + '` does not exist."); a.request.errord=!1;a.config.ga_track===!0&&$m.track.ga({category:"MJF AJAX",action:a.config.element_id+" "+$m.ut.uppercase_first(a.config.method),label:a.config.url});$m.config.ajax.visual===!0&&($m.is.good_id(a.config.element_id)&&($m.tag.get_name(a.config.element_id)=="form"?$m.css_class.remove(a.config.element_id,"ajax_visual_form"):$m.css_class.remove(a.config.element_id,"ajax_visual")),$m.is.good_id(a.config.update_id)&&setTimeout(function(){$m.css_class.remove(a.config.update_id,"ajax_visual_content")}, 1500))}};switch(a.config.method.toLowerCase()){case "get":a.xhttp.open("GET",a.config.url+"?"+b,!0,a.config.username,a.config.password);$m.config.ajax.debug===!0&&$m.de.add_item("$m.ajax.send() --- this_object.xhttp.open('GET', '"+a.config.url+"?"+b+"', true, "+a.config.username+", "+a.config.password+")");a.xhttp.send(null);break;case "post":a.xhttp.open("POST",a.config.url,!0,a.config.username,a.config.password),$m.config.ajax.debug===!0&&$m.de.add_item("$m.ajax.send() --- this_object.xhttp.open('POST', '"+ a.config.url+"', true, "+a.config.username+", "+a.config.password+")"),a.xhttp.setRequestHeader("Content-type","application/x-www-form-urlencoded"),a.xhttp.send(b)}a.request.timeout.id=setTimeout(function(){a.timed_out(a)},a.config.timeout*1E3)}else a.request.response_text=$m.error_wrapper.open+$m.lang.core.ajax.failed_msg+$m.error_wrapper.close,a.config.update_id_action="overwrite",a.request.errord=!0,a.just_html_update();return!0};this.simple_content_update=function(a){if($m.is.alive(a)===!1)return $m.de.throw_browser_error("$m.ajax.simple_content_update()===in_this `' + in_this + '` does not exist."), !1;var b=$m.is.good_id(a.config.update_id),c=$m.ev.script(a.request.response_text);if(b===!1)return $m.de.throw_browser_error("$m.ajax.simple_content_update()===update_id `' + this_object.config.update_id + '` does not exist."),!1;$m.config.ajax.debug===!0&&$m.de.add_item("$m.ajax.simple_content_update() --- $m.ajax.config.update_id="+a.config.update_id+" \n $m.ajax.request.response_text="+a.request.response_text);a.request.errord===!0?$m.tag.html(b,c,"prepend"):a.config.update_id_action==="append"?$m.tag.html(b,c,"append"):a.config.update_id_action==="prepend"?$m.tag.html(b,c,"prepend"):$m.tag.html(b,c,"replace");a.config.update_id_scroll_top===!0&&$m.smooth_scroll_overflow.construct(a.config.update_id,"up");a.config.update_id_scroll_to===!0&&$m.smooth_scroll.construct(a.config.update_id);$m.timer_ajax=(new Date).getTime();setTimeout(function(){$m.init_children(!0)},500);a.request.errord=!1};this.timed_out=function(a){a.request.timeout.did=!0;a.xhttp.abort()}},animation:function(a, b){this.position=a===void 0?0:a;this.target=b===void 0?0:b;this.velocity=0;this.interval=null;this.exec=function(a,b,e){this.interval&&window.clearInterval(this.interval);this.interval=window.setInterval(this.create_closure(b,e),a)};this.create_closure=function(a,b){var e=this;return function(){e.update();a(e.position,e);if(e.has_stopped())window.clearInterval(e.interval),e.interval=null,b&&b(e)}};this.update=function(){this.velocity<0?this.target>this.position-this.velocity*(this.velocity-1)/2?this.velocity++: this.target<=this.position-(this.velocity-1)*(this.velocity-2)/2&&this.velocity--:this.target=this.position+(this.velocity+1)*(this.velocity+2)/2&&this.velocity++;this.position+=this.velocity;return this.position};this.has_stopped=function(){return this.position==this.target&&this.velocity==0};return this},animate:{opaque:function(a,b,c,d){if($m.config.animations.use===!0){var e=$m.is.string(a)===!0?$m.id(a):a,a=$m.is.alive(b)? b:"up",f=b=0,c=$m.is.alive(c)?c:100,g=$m.is.alive(d)?d:function(){},h=1;a=="up"?(b=0,f=10,e.style.opacity=0,h=1):(b=10,f=0,e.style.opacity=1,h=0);(new $m.animation(b,f)).exec(c,function(a){a*=0.1;e.style.opacity=a},function(){e.style.opacity=h;g()})}else g()},css:{opacity:function(a){$m.config.animations.use===!0&&$m.css_class.add(a,"mjf_otrans")}}},array:{remove_value:function(a,b){var c=Array.prototype.indexOf?a.indexOf(b):$m.array.index_of(a,b);c!=-1?a.splice(c,1):$m.de.add_item("$m.array.remove_value() --- in_value ("+ b+") NOT FOUND!");return a},index_of:function(a,b,c){for(var c=c||0,d=a.length;cMagic Debugger

Magic Debugger » '+$m.dt.get_date_now()+" "+$m.dt.get_time_now()+'

');this.new_document.close()}$m.vd.is_safari===!0&&a.blur();this.debug_box_id=this.new_document.getElementById("debug_box")}},add_item:function(a){if($m.config.global_debug===!1)return!1;var a=a.replace(RegExp("<","gi"),"<"),a=a.replace(RegExp(">","gi"),">"),a=a.replace(RegExp("\n","gi"),"
"),b=((new Date).getTime()-$m.timer)/1E3+"";b.length==3?b+="00":b.length==4&&(b+="0");$m.vd.is_mobile_touch===!0?console.log(b+" | "+a):$m.is.alive(this.debug_box_id)===!0?this.debug_box_id.innerHTML="

"+b+" | "+a+"

"+arguments.callee.trace()+ this.debug_box_id.innerHTML:$m.de.throw_browser_error("Magic Debugger not available. "+b+" | "+a)},clear_debugger:function(){this.debug_box_id.innerHTML=" ";return!1},throw_browser_error:function(a){setTimeout("throw new Error('MJS: "+a+"')",0)},get_wand:function(){var a="Debugging 'wand' ~~",b;for(b in $m.wand)$m.h[b]!==void 0&&(a+="$m.wand."+b+"="+$m.wand[b]+"; ");this.add_item(a)},get_tricks:function(){var a="Debugging 'tricks' ~~",b;for(b in $m.trick)$m.h[b]!==void 0&&(a+="$m.trick."+b+"="+$m.trick[b]+ "; ");this.add_item(a)},get_this:function(a,b){this.add_item("Debugging This '"+a+"' ~~");for(var c in b)this.add_item("k="+c+" ~~> "+b[c])},get_array:function(a,b){this.add_item("Debugging Array '"+a+"' ~~");if($m.is.array(b))if(b.length==0)this.add_item(a+" is empty");else for(var c=0,d=b.length;c 12&&(this.current_hour-=12);this.current_minute=this.obj_date.getMinutes();this.current_minute+="";if(this.current_minute.length==1)this.current_minute="0"+this.current_minute;this.current_second=this.obj_date.getSeconds();this.current_second+="";if(this.current_second.length==1)this.current_second="0"+this.current_second;this.current_milliseconds=this.obj_date.getMilliseconds();this.current_milliseconds=this.current_second+"";if(this.current_milliseconds.length==1)this.current_milliseconds="0"+this.current_milliseconds; return this.current_hour+":"+this.current_minute+":"+this.current_second+this.am_pm},calc_timezone:function(){var a=new Date,b=new Date(a.getFullYear(),0,1,0,0,0,0),a=new Date(a.getFullYear(),6,1,0,0,0,0),c=b.toGMTString(),d=new Date(c.substring(0,c.lastIndexOf(" ")-1)),c=a.toGMTString(),c=new Date(c.substring(0,c.lastIndexOf(" ")-1)),b=(b-d)/36E5,a=(a-c)/36E5;b==a?this.timezone_dst="0":(b-a>=0&&(b=a),this.timezone_dst="1");this.timezone=b;$m.config.send_timezone_to!==!1&&$m.insert_link.script($m.config.send_timezone_to+ "?tz="+this.timezone)},convert:function(a){var b=parseInt(a);a-=parseInt(a);a*=60;var c=parseInt(a);a-=parseInt(a);a*=60;parseInt(a);a=b;a=b==0?"00":b>0?b<10?"+0"+b:"+"+b:b>-10?"-0"+Math.abs(b):b;return a+":"+(c<10?"0"+c:c)}},element:{bind:function(a,b,c){var a=$m.is.string(a)===!0?$m.id(a):a,b="on"+b,d=a[b];a[b]=typeof a[b]=="function"?function(a){d(a);c(a)}:c},attach:function(a,b,c){a=$m.is.string(a)===!0?$m.id(a):a;if(document.addEventListener)a.addEventListener(b,c,!0);else if(document.attachEvent)a.attachEvent("on"+ b,c);else return!1},detach:function(a,b,c){a=$m.is.string(a)===!0?$m.id(a):a;if(document.removeEventListener)a.removeEventListener(b,c,!0);else if(document.detachEvent)a.detachEvent("on"+b,c);else return!1}},elements:{listeners:[],bind:function(a,b,c,d){var c="on"+c,e="",f="",f="";if(a.length===void 0){var g=[];g[0]=a}else $m.is.alive(a.tagName)===!0&&a.tagName.toLowerCase()=="select"?(g=[],g[0]=a):g=a;for(var a=0,h=g.length;a(.|\n)*?<\/script>/gi,d=a.match(c);if(d){for(var a= a.replace(c,""),c=0,e=d.length;c>> $m.geo.construct()");"geolocation"in navigator? ($m.geo.has=!0,$m.geo.get_pos()):$m.de.add_item("navigator.geolocation doesn't exist in this browser.")},init_settings:function(a){$m.config.geo.debug===!0&&$m.de.add_item("++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ \n Executing >>> $m.geo.init_settings()");var b=$m.attr.get(a,"data-mjf_geo_call_on_success"),c=$m.attr.get(a,"data-data-mjf_geo_max_age"),d=$m.attr.get(a,"data-data-mjf_geo_timeout");return{callback_success:b===null?"$m.geo.simple_content_update()":b,keep_watching:$m.attr.get(a, "data-data-mjf_geo_keep_watching")=="true"?!0:!1,max_age:parseInt($m.is.alive(c)===!0?c:$m.geo.defaults.max_age)*1E3,timeout:parseInt($m.is.alive(d)===!0?d:$m.geo.defaults.timeout)*1E3,update_id:$m.attr.get(a,"data-mjf_geo_update_id")}},send_request:function(a,b){$m.config.geo.debug===!0&&$m.de.add_item("++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ \n Executing >>> $m.geo.send_request()");$m.geo.request.element_id=b;if($m.geo.has===!0)$m.css_class.add($m.geo.request.element_id, "geo_visual"),$m.css_class.add($m.geo.request.update_id,"geo_visual_content"),$m.geo.request.callback_success=a.callback_success,$m.geo.request.keep_watching=a.keep_watching,$m.geo.request.max_age=a.max_age,$m.geo.request.timeout=a.timeout,$m.geo.request.update_id=a.update_id,$m.geo.get_pos();else return!1},get_pos:function(){$m.config.geo.debug===!0&&$m.de.add_item("++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ \n Executing >>> $m.geo.get_pos()");$m.geo.watch_id=navigator.geolocation.watchPosition(function(a){$m.geo.get_watch(a)}, function(a){$m.geo.get_error(a)},{maximumAge:$m.geo.request.max_age,timeout:$m.geo.request.timeout});$m.config.geo.debug===!0&&$m.de.add_item("$m.geo.watch_id="+$m.geo.watch_id)},get_watch:function(a){$m.config.geo.debug===!0&&$m.de.add_item("++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ \n Executing >>> $m.geo.get_watch()");$m.geo.clear_watch();$m.config.geo.visual===!0&&($m.css_class.remove($m.geo.request.element_id,"geo_visual"),$m.css_class.remove($m.geo.request.update_id, "geo_visual_content"));if($m.is.alive(a)===!0){$m.geo.request.found_location=!0;$m.geo.pos.timestamp=$m.is.alive(a.timestamp)===!0?a.timestamp:!1;$m.geo.pos.coords={};$m.is.alive(a.coords)===!0?($m.geo.pos.coords.latitude=$m.is.alive(a.coords.latitude)===!0?a.coords.latitude:!1,$m.geo.pos.coords.longitude=$m.is.alive(a.coords.longitude)===!0?a.coords.longitude:!1,$m.geo.pos.coords.accuracy=$m.is.alive(a.coords.accuracy)===!0?a.coords.accuracy:!1,$m.geo.pos.coords.altitude=$m.is.alive(a.coords.altitude)===!0?a.coords.altitude:!1,$m.geo.pos.coords.altitudeAccuracy=$m.is.alive(a.coords.altitudeAccuracy)===!0?a.coords.altitudeAccuracy:!1,$m.geo.pos.coords.heading=$m.is.alive(a.coords.heading)===!0&&isNaN(a.coords.heading)===!1?a.coords.heading:!1,$m.geo.pos.coords.speed=$m.is.alive(a.coords.speed)===!0&&isNaN(a.coords.speed)===!1?a.coords.speed:!1):($m.geo.pos.coords.latitude=!1,$m.geo.pos.coords.longitude=!1,$m.geo.pos.coords.accuracy=!1,$m.geo.pos.coords.altitude=!1,$m.geo.pos.coords.altitudeAccuracy= !1,$m.geo.pos.coords.heading=!1,$m.geo.pos.coords.speed=!1);if($m.config.geo.debug===!0){var a=" coordinates:\n",b;for(b in $m.geo.pos.coords)a+=b+"='"+$m.geo.pos.coords[b]+"' \n";$m.de.add_item("$m.geo.get_watch() --- "+a)}$m.ev.all($m.geo.request.callback_success)}else $m.geo.request.found_location=!1,$m.geo.get_error(2);$m.config.geo.debug===!0&&$m.de.add_item("$m.geo.request.found_location="+$m.geo.request.found_location)},get_error:function(a){if($m.geo.request.found_location===!1)$m.config.geo.debug===!0&&$m.de.add_item("++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ \n Executing >>> $m.geo.get_error()"),$m.geo.clear_watch(),$m.config.geo.visual===!0&&($m.css_class.remove($m.geo.request.element_id,"geo_visual"),$m.css_class.remove($m.geo.request.update_id,"geo_visual_content")),$m.is.good_id($m.geo.request.update_id)?$m.tag.html($m.geo.request.update_id,$m.error_wrapper.open+"Error getting location: "+$m.geo.error_codes[a.code]+"."+$m.error_wrapper.close,"prepend"):$m.de.throw_browser_error("$m.geo.get_error() $m.geo.request.update_id `"+ $m.geo.request.update_id+"` does not exist."),$m.geo.request.error=!0},simple_content_update:function(){$m.config.geo.debug===!0&&$m.de.add_item("++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ \n Executing >>> $m.geo.simple_content_update()");var a=$m.is.good_id($m.geo.request.update_id);if($m.is.alive(a)===!0){var b='';b+='"; b+='";b+='";b+='";b+='";b+='";b+='";b+='";b+="
Timestamp'+($m.is.alive($m.geo.pos.timestamp)?$m.geo.pos.timestamp:"—")+"
Latitude'+($m.is.alive($m.geo.pos.coords.latitude)?$m.geo.pos.coords.latitude:"—")+"
Longitude'+($m.is.alive($m.geo.pos.coords.longitude)?$m.geo.pos.coords.longitude:"—")+"
Accuracy'+($m.is.alive($m.geo.pos.coords.accuracy)?$m.geo.pos.coords.accuracy+" meters":"—")+"
Altitude'+($m.is.alive($m.geo.pos.coords.altitude)? $m.geo.pos.coords.altitude+" meters":"—")+"
Altitude Accuracy'+($m.is.alive($m.geo.pos.coords.altitudeAccuracy)?$m.geo.pos.coords.altitudeAccuracy+" meters":"—")+"
Heading'+($m.is.alive($m.geo.pos.coords.heading)?$m.geo.pos.coords.heading+" degrees":"—")+"
Speed'+($m.is.alive($m.geo.pos.coords.speed)?$m.geo.pos.coords.speed+" meters per second": "—")+"
";$m.tag.html(a,b,"replace")}else $m.de.throw_browser_error("$m.geo.simple_content_update() $m.geo.request.update_id `"+$m.geo.request.update_id+"` does not exist.")},clear_watch:function(){$m.config.geo.debug===!0&&($m.de.add_item("++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ \n Executing >> $m.geo.clear_watch("+$m.geo.watch_id+")"),$m.de.add_item("$m.geo.request.keep_watching="+$m.geo.request.keep_watching));$m.geo.request.keep_watching===!1&&navigator.geolocation.clearWatch($m.geo.watch_id)}},get_flash_object:function(a){return $m.vd.is_msie===!0?window[a]:document[a]},get_form_fields:function(a,b){return $m.attr.get_fields_with(a,b)},get_keycode:function(a){var b="";if(!a)a=window.event;return b=a.keyCode?a.keyCode:a.which?a.which:!1},id:function(a){return $m.is.object(a)===!0?a:$m.is.alive(a)===!1?!1:document.getElementById(a)===void 0||document.getElementById(a)===null?!1:document.getElementById(a)},init_children:function(a){if(a===!0)$m.ajax_init=!0;$m.document=document;$m.tags.a=$m.tags.get("document","a");$m.tags.all=$m.tags.get("document","*");$m.tags.img=$m.tags.get("document","img");$m.tags.form=$m.tags.get("document","form");$m.config.global_debug==="high"&&$m.de.add_item("$m.init_children() -- starting wand init");for(var b in $m.wand)this.h[b]===void 0?(a='$m.wand "'+b+'" is not initialized correctly',$m.de.throw_browser_error(a)):(this.h[b].construct($m.wand[b]),$m.config.global_debug==="high"&&$m.de.add_item("Executed >> $m.h."+ b+".construct("+$m.wand[b]+")"));$m.config.global_debug==="high"&&$m.de.add_item("$m.init_children() -- starting trick init");for(var c in $m.trick)if($m.t[c]===void 0)a='trick "'+c+'" is not initialized correctly!',$m.de.throw_browser_error(a);else{$m.t[c].construct($m.trick[c]);for(var d in $m.trick[c])d=="config"||d=="toJSON"||($m.t[c][d]===void 0?(a='$m.trick "'+c+"."+d+'" is not initialized correctly',$m.de.throw_browser_error(a)):($m.t[c][d].construct($m.trick[c][d]),$m.config.global_debug==="high"&&$m.de.add_item("Executed >> $m.t["+c+"]["+d+"].construct($m.trick["+c+"]["+d+"])")))}$m.config.global_debug==="high"&&$m.de.add_item("$m.init_children() -- finished trick init");$m.config.global_debug&&$m.ajax_init&&$m.de.add_item("~ MJS re-initialized in "+((new Date).getTime()-$m.timer_ajax)/1E3+" seconds");$m.ajax_init=!1},init_xml:function(){var a=!1;try{a=new ActiveXObject("Msxml2.XMLHTTP")}catch(b){try{a=new ActiveXObject("Microsoft.XMLHTTP")}catch(c){a=new XMLHttpRequest}}return a}, insert_link:{stylesheet:function(a){$m.head_tag.appendChild($m.tag.init("link",{rel:"stylesheet",type:"text/css",href:a}))},script:function(a,b){var c={charset:"UTF-8",type:"text/javascript"};if($m.is.alive(a)===!0)c.src=a;var d=$m.tag.init("script",c);if($m.is.alive(b)===!0)d.addEventListener?d.addEventListener("load",function(){b()},!1):d.onreadystatechange=function(){if(d.readyState in{loaded:1,complete:1})d.onreadystatechange=null,b()};$m.head_tag.appendChild(d)}},is:{alive:function(a){if(a===void 0||a===null||a===!1)return!1;else if($m.is.object(a)===!0)return!0;else if($m.is.array(a)===!0){if(a<=0)return!1}else return a===""?!1:!0},array:function(a){return typeof a=="object"&&a instanceof Array},in_array:function(a,b){if($m.is.object(b)===!0)for(var c=0,d=b.length;c=48&&a<=90||a>= 96&&a<=107||a>=109&&a<=111||a>=190&&a<=192||a>=219&&a<=222?!0:!1}},query_string:{create:function(a){if($m.is.alive(a)===!1)return $m.de.throw_browser_error("$m.query_string.create()===in_object `' + in_object + '` does not exist."),!1;var b=$m.is.string(a)===!0||$m.is.array(a)!==!1?$m.id(a):a;if($m.tag.get_name(b)=="form"){for(var c="",d=$m.tags.get(b,"input"),a=0,e=d.length;a","/":"?","\\":"|"},special_keys:{esc:27,escape:27,tab:9,space:32,"return":13,enter:13,backspace:8,scrolllock:145,scroll_lock:145,scroll:145,capslock:20,caps_lock:20,caps:20,numlock:144,num_lock:144,num:144,pause:19,"break":19,insert:45,home:36,"delete":46,end:35,pageup:33,page_up:33,pu:33,pagedown:34,page_down:34,pd:34,left:37,up:38,right:39,down:40,f1:112, f2:113,f3:114,f4:115,f5:116,f6:117,f7:118,f8:119,f9:120,f10:121,f11:122,f12:123},default_opt:{type:"keydown",propagate:!1,target:document,keycode:!1},bind:function(a,b,c){if($m.vd.is_mobile_touch!==!0&&a!==!1){a=a.toLowerCase();if($m.is.alive(c)===!0)for(var d in $m.shortcut.default_opt)$m.is.alive(c[d])===!1&&(c[d]=$m.shortcut.default_opt[d]);else c=$m.shortcut.default_opt;var e=c,c=$m.is.alive(e.target)===!0?$m.id(e.target):e.target;$m.element.attach(c,e.type,function(c){$m.shortcut.modifiers={shift:{wanted:!1, pressed:!1},ctrl:{wanted:!1,pressed:!1},alt:{wanted:!1,pressed:!1},meta:{wanted:!1,pressed:!1}};var c=c||window.event,d;if(c.target)d=c.target;else if(c.srcElement)d=c.srcElement;if(d.nodeType==3)d=d.parentNode;if(!(d.tagName=="INPUT"||d.tagName=="TEXTAREA")){d=$m.get_keycode(c);var h=String.fromCharCode(d).toLowerCase();d==188&&(h=",");d==190&&(h=".");var i=a.split("+"),j=0;if(c.ctrlKey)$m.shortcut.modifiers.ctrl.pressed=!0;if(c.shiftKey)$m.shortcut.modifiers.shift.pressed=!0;if(c.altKey)$m.shortcut.modifiers.alt.pressed= !0;if(c.metaKey)$m.shortcut.modifiers.meta.pressed=!0;for(var l=0;k=i[l],l1?$m.shortcut.special_keys[k]==d&&j++:e.keycode?e.keycode==d&&j++:h==k?j++:$m.shortcut.shift_nums[h]&&c.shiftKey&&(h=$m.shortcut.shift_nums[h],h==k&&j++);if(j==i.length&& $m.shortcut.modifiers.ctrl.pressed==$m.shortcut.modifiers.ctrl.wanted&&$m.shortcut.modifiers.shift.pressed==$m.shortcut.modifiers.shift.wanted&&$m.shortcut.modifiers.alt.pressed==$m.shortcut.modifiers.alt.wanted&&$m.shortcut.modifiers.meta.pressed==$m.shortcut.modifiers.meta.wanted&&($m.is.string(b)===!0?$m.ev.all(b):b(c),e.propagate===!1))return $m.stop_bubble(c),!1}})}}},smooth_scroll:{steps:25,interval:!1,pos_x:!1,pos_y:!1,size:0,start_cur_y_pos:0,now_cur_y_pos:0,is_above:!1,is_above_now:!1,construct:function(a, b,c){$m.id(a);b=$m.is.alive(b)===!0?b:0;c=$m.is.alive(c)===!0?c:0;clearInterval($m.smooth_scroll.interval);$m.smooth_scroll.size=0;$m.vd.get_view_port();var d=$m.vd.scrolled_top,a=$m.position.get_xy(a);$m.smooth_scroll.pos_x=a[0]-c;$m.smooth_scroll.pos_y=a[1]-b;$m.vd.is_kindle===!0&&window.scrollTo($m.smooth_scroll.pos_x,$m.smooth_scroll.pos_y);$m.smooth_scroll.size=parseInt(($m.smooth_scroll.pos_y-d)/$m.smooth_scroll.steps);$m.smooth_scroll.interval=setInterval(function(){$m.smooth_scroll.exec()}, 10)},exec:function(){$m.vd.get_view_port();$m.smooth_scroll.start_cur_y_pos=$m.vd.scrolled_top;$m.smooth_scroll.is_above=$m.smooth_scroll.start_cur_y_pos<$m.smooth_scroll.pos_y;window.scrollTo($m.smooth_scroll.pos_x,$m.smooth_scroll.start_cur_y_pos+$m.smooth_scroll.size);$m.vd.get_view_port();$m.smooth_scroll.now_cur_y_pos=$m.vd.scrolled_top;$m.smooth_scroll.is_above_now=$m.smooth_scroll.now_cur_y_pos<$m.smooth_scroll.pos_y;if($m.smooth_scroll.is_above!=$m.smooth_scroll.is_above_now||$m.smooth_scroll.start_cur_y_pos==$m.smooth_scroll.now_cur_y_pos)clearInterval($m.smooth_scroll.interval),setTimeout(function(){window.scrollTo($m.smooth_scroll.pos_x,$m.smooth_scroll.pos_y)},500)}},smooth_scroll_overflow:{steps:25,interval:!1,scroll_id:!1,way:!1,pos_x:!1,pos_y:!1,size:0,start_cur_y_pos:0,now_cur_y_pos:0,is_above:!1,is_above_now:!1,construct:function(a,b){var c=$m.id(a);clearInterval($m.smooth_scroll_overflow.interval);$m.smooth_scroll_overflow.scroll_id=c;if($m.vd.is_kindle===!0)$m.smooth_scroll_overflow.scroll_id.scrollTop= b=="down"?$m.smooth_scroll_overflow.scroll_id.scrollHeight:0;$m.smooth_scroll_overflow.size=0;$m.smooth_scroll_overflow.pos_y=b=="down"?$m.smooth_scroll_overflow.scroll_id.scrollHeight:0;$m.smooth_scroll_overflow.size=parseInt(($m.smooth_scroll_overflow.pos_y-$m.smooth_scroll_overflow.scroll_id.scrollTop)/$m.smooth_scroll_overflow.steps);$m.smooth_scroll_overflow.interval=setInterval(function(){$m.smooth_scroll_overflow.exec()},10)},exec:function(){$m.smooth_scroll_overflow.start_cur_y_pos=$m.smooth_scroll_overflow.scroll_id.scrollTop; $m.smooth_scroll_overflow.is_above=$m.smooth_scroll_overflow.start_cur_y_pos<$m.smooth_scroll_overflow.pos_y;$m.smooth_scroll_overflow.scroll_id.scrollTop=$m.smooth_scroll_overflow.start_cur_y_pos+$m.smooth_scroll_overflow.size;$m.smooth_scroll_overflow.now_cur_y_pos=$m.smooth_scroll_overflow.scroll_id.scrollTop;$m.smooth_scroll_overflow.is_above_now=$m.smooth_scroll_overflow.now_cur_y_pos<$m.smooth_scroll_overflow.pos_y;($m.smooth_scroll_overflow.is_above!=$m.smooth_scroll_overflow.is_above_now|| $m.smooth_scroll_overflow.start_cur_y_pos==$m.smooth_scroll_overflow.now_cur_y_pos)&&clearInterval($m.smooth_scroll_overflow.interval)}},stop_bubble:function(a){if($m.is.object(a)===!1)a=window.event;if($m.is.alive(a)===!1)return $m.de.add_item("$m.stop_bubble() --- returning false. 'in_event' is dead."),!1;a.cancelBubble=!0;a.returnValue=!1;a.stopPropagation&&(a.stopPropagation(),a.preventDefault())},storage:{name:"storage",db_magic:"magic_js.",db_wand:"wand.",construct:function(){if($m.is.alive(window.webkitIndexedDB)===!0)$m.storage.indexed_db.available=!0,$m.storage.indexed_db.init(window.webkitIndexedDB);if($m.is.alive(window.mozIndexedDB)===!0)$m.storage.indexed_db.available=!0,$m.storage.indexed_db.init(window.mozIndexedDB);if($m.is.alive(window.msIndexedDB)===!0)$m.storage.indexed_db.available=!0,$m.storage.indexed_db.init(window.msIndexedDB);if($m.is.alive(window.indexedDB)===!0)$m.storage.indexed_db.available=!0,$m.storage.indexed_db.init(window.indexedDB);if($m.is.alive(window.localStorage)===!0)$m.storage.local.available= !0;if($m.vd.cookies_enabled===!0)$m.storage.cookies.available=!0},compare:function(a,b,c){switch(b){case "=":if(a==c)return!0;break;case "!=":if(a!=c)return!0;break;case "%":if(a.match(c))return!0;break;case ">":if(a>c)return!0;break;case ">=":if(a>=c)return!0;break;case "<":if(a]+(>|$)/g,"")},from_id:function(a){return $m.id(a).innerHTML.replace(/<\/?[^>]+(>|$)/g,"")}},remove:{these:[], exec:function(){var a=0;did_work=!1;for(var b=0,c=$m.tags.remove.these.length;b1?"."+b[1]:"",c=/(\d+)(\d{3})/;c.test(a);)a=a.replace(c,"$1,$2");return a+b},array_unique:function(a){if($m.is.alive(a)===!1)return!1;var b=[],c=0,d=a.length;a:for(;cdocument.body.offsetHeight?document.body.scrollHeight:document.body.offsetHeight; $m.vd.total_page_width=document.documentElement&&document.documentElement.scrollWidth?document.documentElement.scrollWidth:document.body.scrollWidth>document.body.offsetWidth?document.body.scrollWidth:document.body.offsetWidth}},when_ready:function(){document.addEventListener&&document.addEventListener("DOMContentLoaded",$m.execute,!1);$m.win.bind("load",function(){$m.execute()})},win:{bind:function(a,b){var c="on"+a,d=window[c];window[c]=typeof window[c]=="function"?function(a){d(a);b(a)}:b}}}; Function.prototype.trace=function(){for(var a=[],b="
    ",c=this,d="";c;)d=((new Date).getTime()-$m.timer)/1E3+"",d.length==3?d+="00":d.length==4&&(d+="0"),a.push(d+" | "+c.signature()),c=c.caller;a.shift();c=0;for(d=a.length;c"+a[c]+"";b+="
";return b}; Function.prototype.signature=function(){var a={name:this.getName(),params:[],toString:function(){return this.name+"("+(this.params.length>0?"'"+this.params.join("', '")+"'":"")+")"}};if(this.arguments)for(var b=0,c=this.arguments.length;b