!function(a){a.fn.extend({responsiveTables:function(){function b(){a(".rwd-table").each(function(){var b=parseInt(a(this).parent().width(),10),c=parseInt(a(this).outerWidth(),10),d=a(this).parent().find(".rt-breakpoint").html();c>b?(a(this).parent().prepend("
"+c+"
"),a(this).find("td, th, tr").addClass("rt-alt"),a(this).find("tr").addClass("rt-alt2"),a(this).find("thead").css("display","none"),a(this).find("td, th").addClass("cellResize")):b>d&&(a(this).find("td, th, tr").removeClass("rt-alt").removeClass("rt-alt2"),a(this).find("thead").css("display",""),a(this).find(".cellResize").removeClass(),a(this).parent().find(".rt-breakpoint").remove())})}a(".rwd-table").wrap('
'),a(".rwd-table").each(function(){a("thead",this).length&&a("thead th",this).each(function(){saveTitle=a(this).text(),whichPosition=a(this).index()+1,a(this).parents("table").find("tr td:nth-child("+whichPosition+")").attr("data-title",saveTitle)})}),b(),function(a,b){var c=function(a,b,c){var d;return function(){function g(){c||a.apply(e,f),d=null}var e=this,f=arguments;d?clearTimeout(d):c&&a.apply(e,f),d=setTimeout(g,b||100)}};jQuery.fn[b]=function(a){return a?this.bind("resize",c(a)):this.trigger(b)}}(jQuery,"smartresize"),a(window).smartresize(function(){b()})}})}(jQuery);