ACMS.Dispatch.Postinclude.ready=function(elm){(function(method,effect,effectSpeed,delay){$(elm).each(function(){if(this.onsubmit){this.returnValue=this.onsubmit.apply(this,arguments)}var form=this;var $form=$(this);if($form.data("geo")){ACMS.Library.geolocation(function(latitude,longitude){$form.append($("<input/>",{type:"hidden",name:"lat",value:latitude}));$form.append($("<input/>",{type:"hidden",name:"lng",value:longitude}));$form.append($("<input/>",{type:"hidden",name:"query[]",value:"lat"}));$form.append($("<input/>",{type:"hidden",name:"query[]",value:"lng"}));setTimeout(function(){ACMS.Dispatch.Postinclude._postinclude(form,method,effect,effectSpeed)},delay)},function(message){window.alert(message)})}else{setTimeout(function(){ACMS.Dispatch.Postinclude._postinclude(form,method,effect,effectSpeed)},delay)}})})(ACMS.Config.postIncludeMethod,ACMS.Config.postIncludeEffect,ACMS.Config.postIncludeEffectSpeed,ACMS.Config.postIncludeReadyDelay)};ACMS.Dispatch.Postinclude.submit=function(elm){(function(method,effect,effectSpeed){$(elm).each(function(){if(this.onsubmit){var func=this.onsubmit;this.onsubmit=new Function;$(this).submit(function(){this.returnValue=func.apply(this,arguments);return this.returnValue})}$(this).submit(function(event){event.preventDefault();var form=this;var $form=$(this);if($form.data("geo")){ACMS.Library.geolocation(function(latitude,longitude){$form.append($("<input/>",{type:"hidden",name:"lat",value:latitude}));$form.append($("<input/>",{type:"hidden",name:"lng",value:longitude}));$form.append($("<input/>",{type:"hidden",name:"query[]",value:"lat"}));$form.append($("<input/>",{type:"hidden",name:"query[]",value:"lng"}));ACMS.Dispatch.Postinclude._postinclude(form,method,effect,effectSpeed)},function(message){window.alert(message)})}else{ACMS.Dispatch.Postinclude._postinclude(form,method,effect,effectSpeed)}})})})(ACMS.Config.postIncludeMethod,ACMS.Config.postIncludeEffect,ACMS.Config.postIncludeEffectSpeed)};ACMS.Dispatch.Postinclude.bottom=function(elm){(function(method,effect,effectSpeed,offset){var scrollHeight=$(document).height();$(elm).each(function(){if(this.onsubmit){this.returnValue=this.onsubmit.apply(this,arguments)}var obj=$(window);var form=this;form.execute=false;obj.bind("scroll",function(){var scrollHeight=$(document).height();var scrollPosition=obj.height()+obj.scrollTop();if(scrollHeight-scrollPosition<=offset){if(!form.execute){ACMS.Dispatch.Postinclude._postinclude(form,method,effect,effectSpeed)}obj.unbind("scroll");form.execute=true}})})})(ACMS.Config.postIncludeMethod,ACMS.Config.postIncludeEffect,ACMS.Config.postIncludeEffectSpeed,ACMS.Config.postIncludeOffset)};ACMS.Dispatch.Postinclude.interval=function(elm){(function(method,effect,effectSpeed,interval){$(elm).each(function(){if(this.onsubmit){this.returnValue=this.onsubmit.apply(this,arguments)}var form=this;setInterval(function(){ACMS.Dispatch.Postinclude._postinclude(form,method,effect,effectSpeed)},interval)})})(ACMS.Config.postIncludeMethod,ACMS.Config.postIncludeEffect,ACMS.Config.postIncludeEffectSpeed,ACMS.Config.postIncludeIntervalTime)};