/*! jQuery Reloadify - v0.2.0 - 2012-08-01 * https://github.com/n8v/jquery.reloadify * Copyright (c) 2012 Nathan Vonnahme; Licensed MIT */ (function(a){a.reloadify=function(b){typeof b=="string"&&(b={url:b});var c=a.extend({poll_ms:1e3,last_data:"",verbosity:0,ajaxOpts:{ifModified:!0}},b);c.url||a.error("No URL found in params passed to reloadify()!");var d=function(a,b){typeof console!="undefined"&&console.log&&c.verbosity>=a&&console.log("jQuery.reloadify: "+b)},e=function(){a.ajax(c.url,c.ajaxOpts).done(f).fail(function(){a.error("jQuery.reloadify: Failed to GET "+c.url)})},f=function(a,b,f){var g=f?f.status:"no jqXHR WTF?!";d(2,"Success getting "+c.url+"! ("+g+", "+(a?a.length:0)+" chars)"),d(3,"DataType = "+this.dataType),this.dataType&&this.dataType==="script"&&(a=global_jqueryreloadify_data),a&&a.length&&d(3,a.substring(0,140)),g===304?d(1,"304 Not Modified"):c.last_data!==""&&c.last_data!==a?(d(1,"RELOADIFYING"),window.location.reload(!0)):d(1,"200 OK but no change or brand new content"),c.last_data=a,setTimeout(e,c.poll_ms)};return e(),this}})(jQuery);