/**
 * Unobtrusive scripting adapter for jQuery
 *
 * Requires jQuery 1.4.4 or later.
 * https://github.com/rails/jquery-ujs

 * Uploading file using rails.js
 * =============================
 *
 * By default, browsers do not allow files to be uploaded via AJAX. As a result, if there are any non-blank file fields
 * in the remote form, this adapter aborts the AJAX submission and allows the form to submit through standard means.
 *
 * The `ajax:aborted:file` event allows you to bind your own handler to process the form submission however you wish.
 *
 * Ex:
 *     $('form').live('ajax:aborted:file', function(event, elements){
 *       // Implement own remote file-transfer handler here for non-blank file inputs passed in `elements`.
 *       // Returning false in this handler tells rails.js to disallow standard form submission
 *       return false;
 *     });
 *
 * The `ajax:aborted:file` event is fired when a file-type input is detected with a non-blank value.
 *
 * Third-party tools can use this hook to detect when an AJAX file upload is attempted, and then use
 * techniques like the iframe method to upload the file instead.
 *
 * Required fields in rails.js
 * ===========================
 *
 * If any blank required inputs (required="required") are detected in the remote form, the whole form submission
 * is canceled. Note that this is unlike file inputs, which still allow standard (non-AJAX) form submission.
 *
 * The `ajax:aborted:required` event allows you to bind your own handler to inform the user of blank required inputs.
 *
 * !! Note that Opera does not fire the form's submit event if there are blank required inputs, so this event may never
 *    get fired in Opera. This event is what causes other browsers to exhibit the same submit-aborting behavior.
 *
 * Ex:
 *     $('form').live('ajax:aborted:required', function(event, elements){
 *       // Returning false in this handler tells rails.js to submit the form anyway.
 *       // The blank required inputs are passed to this function in `elements`.
 *       return ! confirm("Would you like to submit the form with missing info?");
 *     });
 */
function activeTab(){var a=$(".views .ui-state-active a").html(),b=$(".views .ui-state-active").width();$("#main-selected").html("<span>"+a+"</span>").width(b),b+=37,$(".jcarousel-container-horizontal").css({"padding-left":b})}function add_notification(a,b,c,d){var e=b||d(),f='<div id="'+c+'" class="notification '+a+'">'+'<a class="remove" href="#" onclick="remove_notification(this); return false;">Remove</a>'+'<div class="content">'+e+'</div><div class="clear"></div>'+"</div>";$(f).hide().appendTo("#notifications").fadeIn()}function remove_notification(a){$(a).closest(".notification").fadeOut(300,function(){$(this).remove()})}function gatherAndPostErrors(a,b){var c;c="There were errors with the submission: \n<ul>";for(var d in b){var e=d.replace("_"," ");c+="<li>"+e+": "+b[d]+"</li> "}c+="</ul>",$("#ajax-errors").remove(),add_notification("error",c,"ajax-errors")}function addForm(a,b,c){a.hide(),c?b.prepend(a):b.append(a),a.slideDown()}(function(a,b){var c;a.rails=c={linkClickSelector:"a[data-confirm], a[data-method], a[data-remote]",formSubmitSelector:"form",formInputClickSelector:"form input[type=submit], form input[type=image], form button[type=submit], form button:not([type])",disableSelector:"input[data-disable-with], button[data-disable-with], textarea[data-disable-with]",enableSelector:"input[data-disable-with]:disabled, button[data-disable-with]:disabled, textarea[data-disable-with]:disabled",requiredInputSelector:"input[name][required]:not([disabled]),textarea[name][required]:not([disabled])",fileInputSelector:"input:file",CSRFProtection:function(b){var c=a('meta[name="csrf-token"]').attr("content");c&&b.setRequestHeader("X-CSRF-Token",c)},fire:function(b,c,d){var e=a.Event(c);return b.trigger(e,d),e.result!==!1},confirm:function(a){return confirm(a)},ajax:function(b){return a.ajax(b)},handleRemote:function(d){var e,f,g,h=d.data("cross-domain")||null,i=d.data("type")||a.ajaxSettings&&a.ajaxSettings.dataType;if(c.fire(d,"ajax:before")){if(d.is("form")){e=d.attr("method"),f=d.attr("action"),g=d.serializeArray();var j=d.data("ujs:submit-button");j&&(g.push(j),d.data("ujs:submit-button",null))}else e=d.data("method"),f=d.attr("href"),g=d.data("params")||null;c.ajax({url:f,type:e||"GET",data:g,dataType:i,crossDomain:h,beforeSend:function(a,e){return e.dataType===b&&a.setRequestHeader("accept","*/*;q=0.5, "+e.accepts.script),c.fire(d,"ajax:beforeSend",[a,e])},success:function(a,b,c){d.trigger("ajax:success",[a,b,c])},complete:function(a,b){d.trigger("ajax:complete",[a,b])},error:function(a,b,c){d.trigger("ajax:error",[a,b,c])}})}},handleMethod:function(c){var d=c.attr("href"),e=c.data("method"),f=a("meta[name=csrf-token]").attr("content"),g=a("meta[name=csrf-param]").attr("content"),h=a('<form method="post" action="'+d+'"></form>'),i='<input name="_method" value="'+e+'" type="hidden" />';g!==b&&f!==b&&(i+='<input name="'+g+'" value="'+f+'" type="hidden" />'),h.hide().append(i).appendTo("body"),h.submit()},disableFormElements:function(b){b.find(c.disableSelector).each(function(){var b=a(this),c=b.is("button")?"html":"val";b.data("ujs:enable-with",b[c]()),b[c](b.data("disable-with")),b.attr("disabled","disabled")})},enableFormElements:function(b){b.find(c.enableSelector).each(function(){var b=a(this),c=b.is("button")?"html":"val";b.data("ujs:enable-with")&&b[c](b.data("ujs:enable-with")),b.removeAttr("disabled")})},allowAction:function(a){var b=a.data("confirm"),d=!1,e;return b?(c.fire(a,"confirm")&&(d=c.confirm(b),e=c.fire(a,"confirm:complete",[d])),d&&e):!0},blankInputs:function(b,c,d){var e=a(),f,g=c||"input,textarea";return b.find(g).each(function(){f=a(this);if(d?f.val():!f.val())e=e.add(f)}),e.length?e:!1},nonBlankInputs:function(a,b){return c.blankInputs(a,b,!0)},stopEverything:function(b){return a(b.target).trigger("ujs:everythingStopped"),b.stopImmediatePropagation(),!1},callFormSubmitBindings:function(c){var d=c.data("events"),e=!0;return d!==b&&d.submit!==b&&a.each(d.submit,function(a,b){if(typeof b.handler=="function")return e=b.handler(b.data)}),e}},"ajaxPrefilter"in a?a.ajaxPrefilter(function(a,b,d){a.crossDomain||c.CSRFProtection(d)}):a(document).ajaxSend(function(a,b,d){d.crossDomain||c.CSRFProtection(b)}),a(c.linkClickSelector).live("click.rails",function(d){var e=a(this);if(!c.allowAction(e))return c.stopEverything(d);if(e.data("remote")!==b)return c.handleRemote(e),!1;if(e.data("method"))return c.handleMethod(e),!1}),a(c.formSubmitSelector).live("submit.rails",function(d){var e=a(this),f=e.data("remote")!==b,g=c.blankInputs(e,c.requiredInputSelector),h=c.nonBlankInputs(e,c.fileInputSelector);if(!c.allowAction(e))return c.stopEverything(d);if(g&&c.fire(e,"ajax:aborted:required",[g]))return c.stopEverything(d);if(f)return h?c.fire(e,"ajax:aborted:file",[h]):!a.support.submitBubbles&&c.callFormSubmitBindings(e)===!1?c.stopEverything(d):(c.handleRemote(e),!1);setTimeout(function(){c.disableFormElements(e)},13)}),a(c.formInputClickSelector).live("click.rails",function(b){var d=a(this);if(!c.allowAction(d))return c.stopEverything(b);var e=d.attr("name"),f=e?{name:e,value:d.val()}:null;d.closest("form").data("ujs:submit-button",f)}),a(c.formSubmitSelector).live("ajax:beforeSend.rails",function(b){this==b.target&&c.disableFormElements(a(this))}),a(c.formSubmitSelector).live("ajax:complete.rails",function(b){this==b.target&&c.enableFormElements(a(this))})})(jQuery),function(a){var b={vertical:!1,rtl:!1,start:1,offset:1,size:null,scroll:3,visible:null,animation:"normal",easing:"swing",auto:0,wrap:null,initCallback:null,reloadCallback:null,itemLoadCallback:null,itemFirstInCallback:null,itemFirstOutCallback:null,itemLastInCallback:null,itemLastOutCallback:null,itemVisibleInCallback:null,itemVisibleOutCallback:null,buttonNextHTML:"<div></div>",buttonPrevHTML:"<div></div>",buttonNextEvent:"click",buttonPrevEvent:"click",buttonNextCallback:null,buttonPrevCallback:null,itemFallbackDimension:null},c=!1;a(window).bind("load.jcarousel",function(){c=!0}),a.jcarousel=function(d,e){this.options=a.extend({},b,e||{}),this.autoStopped=this.locked=!1,this.buttonPrevState=this.buttonNextState=this.buttonPrev=this.buttonNext=this.list=this.clip=this.container=null;if(!e||e.rtl===undefined)this.options.rtl=(a(d).attr("dir")||a("html").attr("dir")||"").toLowerCase()=="rtl";this.wh=this.options.vertical?"height":"width",this.lt=this.options.vertical?"top":this.options.rtl?"right":"left";for(var f="",g=d.className.split(" "),h=0;h<g.length;h++)if(g[h].indexOf("jcarousel-skin")!=-1){a(d).removeClass(g[h]),f=g[h];break}d.nodeName.toUpperCase()=="UL"||d.nodeName.toUpperCase()=="OL"?(this.list=a(d),this.container=this.list.parent(),this.container.hasClass("jcarousel-clip")?(this.container.parent().hasClass("jcarousel-container")||(this.container=this.container.wrap("<div></div>")),this.container=this.container.parent()):this.container.hasClass("jcarousel-container")||(this.container=this.list.wrap("<div></div>").parent())):(this.container=a(d),this.list=this.container.find("ul,ol").eq(0)),f!==""&&this.container.parent()[0].className.indexOf("jcarousel-skin")==-1&&this.container.wrap('<div class=" '+f+'"></div>'),this.clip=this.list.parent();if(!this.clip.length||!this.clip.hasClass("jcarousel-clip"))this.clip=this.list.wrap("<div></div>").parent();this.buttonNext=a(".jcarousel-next",this.container),this.buttonNext.size()===0&&this.options.buttonNextHTML!==null&&(this.buttonNext=this.clip.after(this.options.buttonNextHTML).next()),this.buttonNext.addClass(this.className("jcarousel-next")),this.buttonPrev=a(".jcarousel-prev",this.container),this.buttonPrev.size()===0&&this.options.buttonPrevHTML!==null&&(this.buttonPrev=this.clip.after(this.options.buttonPrevHTML).next()),this.buttonPrev.addClass(this.className("jcarousel-prev")),this.clip.addClass(this.className("jcarousel-clip")).css({overflow:"hidden",position:"relative"}),this.list.addClass(this.className("jcarousel-list")).css({overflow:"hidden",position:"relative",top:0,margin:0,padding:0}).css(this.options.rtl?"right":"left",0),this.container.addClass(this.className("jcarousel-container")).css({position:"relative"}),!this.options.vertical&&this.options.rtl&&this.container.addClass("jcarousel-direction-rtl").attr("dir","rtl");var j=this.options.visible!==null?Math.ceil(this.clipping()/this.options.visible):null;f=this.list.children("li");var k=this;if(f.size()>0){var l=0,m=this.options.offset;f.each(function(){k.format(this,m++),l+=k.dimension(this,j)}),this.list.css(this.wh,l+100+"px");if(!e||e.size===undefined)this.options.size=f.size()}this.container.css("display","block"),this.buttonNext.css("display","block"),this.buttonPrev.css("display","block"),this.funcNext=function(){k.next()},this.funcPrev=function(){k.prev()},this.funcResize=function(){k.reload()},this.options.initCallback!==null&&this.options.initCallback(this,"init"),!c&&a.browser.safari?(this.buttons(!1,!1),a(window).bind("load.jcarousel",function(){k.setup()})):this.setup()};var d=a.jcarousel;d.fn=d.prototype={jcarousel:"0.2.7"},d.fn.extend=d.extend=a.extend,d.fn.extend({setup:function(){this.prevLast=this.prevFirst=this.last=this.first=null,this.animating=!1,this.tail=this.timer=null,this.inTail=!1;if(!this.locked){this.list.css(this.lt,this.pos(this.options.offset)+"px");var b=this.pos(this.options.start,!0);this.prevFirst=this.prevLast=null,this.animate(b,!1),a(window).unbind("resize.jcarousel",this.funcResize).bind("resize.jcarousel",this.funcResize)}},reset:function(){this.list.empty(),this.list.css(this.lt,"0px"),this.list.css(this.wh,"10px"),this.options.initCallback!==null&&this.options.initCallback(this,"reset"),this.setup()},reload:function(){this.tail!==null&&this.inTail&&this.list.css(this.lt,d.intval(this.list.css(this.lt))+this.tail),this.tail=null,this.inTail=!1,this.options.reloadCallback!==null&&this.options.reloadCallback(this);if(this.options.visible!==null){var a=this,b=Math.ceil(this.clipping()/this.options.visible),c=0,e=0;this.list.children("li").each(function(d){c+=a.dimension(this,b),d+1<a.first&&(e=c)}),this.list.css(this.wh,c+"px"),this.list.css(this.lt,-e+"px")}this.scroll(this.first,!1)},lock:function(){this.locked=!0,this.buttons()},unlock:function(){this.locked=!1,this.buttons()},size:function(a){return a!==undefined&&(this.options.size=a,this.locked||this.buttons()),this.options.size},has:function(a,b){if(b===undefined||!b)b=a;this.options.size!==null&&b>this.options.size&&(b=this.options.size);for(var c=a;c<=b;c++){var d=this.get(c);if(!d.length||d.hasClass("jcarousel-item-placeholder"))return!1}return!0},get:function(b){return a(".jcarousel-item-"+b,this.list)},add:function(b,c){var e=this.get(b),f=0,g=a(c);if(e.length===0){var j,k=d.intval(b);for(e=this.create(b);;){j=this.get(--k);if(k<=0||j.length){k<=0?this.list.prepend(e):j.after(e);break}}}else f=this.dimension(e);return g.get(0).nodeName.toUpperCase()=="LI"?(e.replaceWith(g),e=g):e.empty().append(c),this.format(e.removeClass(this.className("jcarousel-item-placeholder")),b),g=this.options.visible!==null?Math.ceil(this.clipping()/this.options.visible):null,f=this.dimension(e,g)-f,b>0&&b<this.first&&this.list.css(this.lt,d.intval(this.list.css(this.lt))-f+"px"),this.list.css(this.wh,d.intval(this.list.css(this.wh))+f+"px"),e},remove:function(a){var b=this.get(a);if(!(!b.length||a>=this.first&&a<=this.last)){var c=this.dimension(b);a<this.first&&this.list.css(this.lt,d.intval(this.list.css(this.lt))+c+"px"),b.remove(),this.list.css(this.wh,d.intval(this.list.css(this.wh))-c+"px")}},next:function(){this.tail!==null&&!this.inTail?this.scrollTail(!1):this.scroll(this.options.wrap!="both"&&this.options.wrap!="last"||this.options.size===null||this.last!=this.options.size?this.first+this.options.scroll:1)},prev:function(){this.tail!==null&&this.inTail?this.scrollTail(!0):this.scroll(this.options.wrap!="both"&&this.options.wrap!="first"||this.options.size===null||this.first!=1?this.first-this.options.scroll:this.options.size)},scrollTail:function(a){if(!(this.locked||this.animating||!this.tail)){this.pauseAuto();var b=d.intval(this.list.css(this.lt));b=a?b+this.tail:b-this.tail,this.inTail=!a,this.prevFirst=this.first,this.prevLast=this.last,this.animate(b)}},scroll:function(a,b){!this.locked&&!this.animating&&(this.pauseAuto(),this.animate(this.pos(a),b))},pos:function(a,b){var c=d.intval(this.list.css(this.lt));if(this.locked||this.animating)return c;this.options.wrap!="circular"&&(a=a<1?1:this.options.size&&a>this.options.size?this.options.size:a);for(var e=this.first>a,f=this.options.wrap!="circular"&&this.first<=1?1:this.first,g=e?this.get(f):this.get(this.last),i=e?f:f-1,j=null,k=0,l=!1,m=0;e?--i>=a:++i<a;)j=this.get(i),l=!j.length,j.length===0&&(j=this.create(i).addClass(this.className("jcarousel-item-placeholder")),g[e?"before":"after"](j),this.first!==null&&this.options.wrap=="circular"&&this.options.size!==null&&(i<=0||i>this.options.size)&&(g=this.get(this.index(i)),g.length&&(j=this.add(i,g.clone(!0))))),g=j,m=this.dimension(j),l&&(k+=m),this.first!==null&&(this.options.wrap=="circular"||i>=1&&(this.options.size===null||i<=this.options.size))&&(c=e?c+m:c-m);f=this.clipping();var n=[],o=0,p=0;g=this.get(a-1);for(i=a;++o;){j=this.get(i),l=!j.length,j.length===0&&(j=this.create(i).addClass(this.className("jcarousel-item-placeholder")),g.length===0?this.list.prepend(j):g[e?"before":"after"](j),this.first!==null&&this.options.wrap=="circular"&&this.options.size!==null&&(i<=0||i>this.options.size)&&(g=this.get(this.index(i)),g.length&&(j=this.add(i,g.clone(!0))))),g=j,m=this.dimension(j);if(m===0)throw Error("jCarousel: No width/height set for items. This will cause an infinite loop. Aborting...");this.options.wrap!="circular"&&this.options.size!==null&&i>this.options.size?n.push(j):l&&(k+=m),p+=m;if(p>=f)break;i++}for(j=0;j<n.length;j++)n[j].remove();k>0&&(this.list.css(this.wh,this.dimension(this.list)+k+"px"),e&&(c-=k,this.list.css(this.lt,d.intval(this.list.css(this.lt))-k+"px"))),k=a+o-1,this.options.wrap!="circular"&&this.options.size&&k>this.options.size&&(k=this.options.size);if(i>k){o=0,i=k;for(p=0;++o;){j=this.get(i--);if(!j.length)break;p+=this.dimension(j);if(p>=f)break}}i=k-o+1,this.options.wrap!="circular"&&i<1&&(i=1),this.inTail&&e&&(c+=this.tail,this.inTail=!1),this.tail=null,this.options.wrap!="circular"&&k==this.options.size&&k-o+1>=1&&(e=d.margin(this.get(k),this.options.vertical?"marginBottom":"marginRight"),p-e>f&&(this.tail=p-f-e)),b&&a===this.options.size&&this.tail&&(c-=this.tail,this.inTail=!0);for(;a-->i;)c+=this.dimension(this.get(a));return this.prevFirst=this.first,this.prevLast=this.last,this.first=i,this.last=k,c},animate:function(a,b){if(!this.locked&&!this.animating){this.animating=!0;var c=this,d=function(){c.animating=!1,a===0&&c.list.css(c.lt,0),!c.autoStopped&&(c.options.wrap=="circular"||c.options.wrap=="both"||c.options.wrap=="last"||c.options.size===null||c.last<c.options.size||c.last==c.options.size&&c.tail!==null&&!c.inTail)&&c.startAuto(),c.buttons(),c.notify("onAfterAnimation");if(c.options.wrap=="circular"&&c.options.size!==null)for(var b=c.prevFirst;b<=c.prevLast;b++)b!==null&&!(b>=c.first&&b<=c.last)&&(b<1||b>c.options.size)&&c.remove(b)};this.notify("onBeforeAnimation"),!this.options.animation||b===!1?(this.list.css(this.lt,a+"px"),d()):this.list.animate(this.options.vertical?{top:a}:this.options.rtl?{right:a}:{left:a},this.options.animation,this.options.easing,d)}},startAuto:function(a){a!==undefined&&(this.options.auto=a);if(this.options.auto===0)return this.stopAuto();if(this.timer===null){this.autoStopped=!1;var b=this;this.timer=window.setTimeout(function(){b.next()},this.options.auto*1e3)}},stopAuto:function(){this.pauseAuto(),this.autoStopped=!0},pauseAuto:function(){this.timer!==null&&(window.clearTimeout(this.timer),this.timer=null)},buttons:function(a,b){a==null&&(a=!this.locked&&this.options.size!==0&&(this.options.wrap&&this.options.wrap!="first"||this.options.size===null||this.last<this.options.size),!this.locked&&(!this.options.wrap||this.options.wrap=="first")&&this.options.size!==null&&this.last>=this.options.size&&(a=this.tail!==null&&!this.inTail)),b==null&&(b=!this.locked&&this.options.size!==0&&(this.options.wrap&&this.options.wrap!="last"||this.first>1),!this.locked&&(!this.options.wrap||this.options.wrap=="last")&&this.options.size!==null&&this.first==1&&(b=this.tail!==null&&this.inTail));var c=this;this.buttonNext.size()>0?(this.buttonNext.unbind(this.options.buttonNextEvent+".jcarousel",this.funcNext),a&&this.buttonNext.bind(this.options.buttonNextEvent+".jcarousel",this.funcNext),this.buttonNext[a?"removeClass":"addClass"](this.className("jcarousel-next-disabled")).attr("disabled",a?!1:!0),this.options.buttonNextCallback!==null&&this.buttonNext.data("jcarouselstate")!=a&&this.buttonNext.each(function(){c.options.buttonNextCallback(c,this,a)}).data("jcarouselstate",a)):this.options.buttonNextCallback!==null&&this.buttonNextState!=a&&this.options.buttonNextCallback(c,null,a),this.buttonPrev.size()>0?(this.buttonPrev.unbind(this.options.buttonPrevEvent+".jcarousel",this.funcPrev),b&&this.buttonPrev.bind(this.options.buttonPrevEvent+".jcarousel",this.funcPrev),this.buttonPrev[b?"removeClass":"addClass"](this.className("jcarousel-prev-disabled")).attr("disabled",b?!1:!0),this.options.buttonPrevCallback!==null&&this.buttonPrev.data("jcarouselstate")!=b&&this.buttonPrev.each(function(){c.options.buttonPrevCallback(c,this,b)}).data("jcarouselstate",b)):this.options.buttonPrevCallback!==null&&this.buttonPrevState!=b&&this.options.buttonPrevCallback(c,null,b),this.buttonNextState=a,this.buttonPrevState=b},notify:function(a){var b=this.prevFirst===null?"init":this.prevFirst<this.first?"next":"prev";this.callback("itemLoadCallback",a,b),this.prevFirst!==this.first&&(this.callback("itemFirstInCallback",a,b,this.first),this.callback("itemFirstOutCallback",a,b,this.prevFirst)),this.prevLast!==this.last&&(this.callback("itemLastInCallback",a,b,this.last),this.callback("itemLastOutCallback",a,b,this.prevLast)),this.callback("itemVisibleInCallback",a,b,this.first,this.last,this.prevFirst,this.prevLast),this.callback("itemVisibleOutCallback",a,b,this.prevFirst,this.prevLast,this.first,this.last)},callback:function(b,c,d,e,f,g,h){if(this.options[b]!=null&&(typeof this.options[b]=="object"||c=="onAfterAnimation")){var j=typeof this.options[b]=="object"?this.options[b][c]:this.options[b];if(a.isFunction(j)){var k=this;if(e===undefined)j(k,d,c);else if(f===undefined)this.get(e).each(function(){j(k,this,e,d,c)});else{b=function(a){k.get(a).each(function(){j(k,this,a,d,c)})};for(var l=e;l<=f;l++)l!==null&&!(l>=g&&l<=h)&&b(l)}}}},create:function(a){return this.format("<li></li>",a)},format:function(b,c){b=a(b);for(var d=b.get(0).className.split(" "),e=0;e<d.length;e++)d[e].indexOf("jcarousel-")!=-1&&b.removeClass(d[e]);return b.addClass(this.className("jcarousel-item")).addClass(this.className("jcarousel-item-"+c)).css({"float":this.options.rtl?"right":"left","list-style":"none"}).attr("jcarouselindex",c),b},className:function(a){return a+" "+a+(this.options.vertical?"-vertical":"-horizontal")},dimension:function(b,c){var e=b.jquery!==undefined?b[0]:b,f=this.options.vertical?(e.offsetHeight||d.intval(this.options.itemFallbackDimension))+d.margin(e,"marginTop")+d.margin(e,"marginBottom"):(e.offsetWidth||d.intval(this.options.itemFallbackDimension))+d.margin(e,"marginLeft")+d.margin(e,"marginRight");return c==null||f==c?f:(f=this.options.vertical?c-d.margin(e,"marginTop")-d.margin(e,"marginBottom"):c-d.margin(e,"marginLeft")-d.margin(e,"marginRight"),a(e).css(this.wh,f+"px"),this.dimension(e))},clipping:function(){return this.options.vertical?this.clip[0].offsetHeight-d.intval(this.clip.css("borderTopWidth"))-d.intval(this.clip.css("borderBottomWidth")):this.clip[0].offsetWidth-d.intval(this.clip.css("borderLeftWidth"))-d.intval(this.clip.css("borderRightWidth"))},index:function(a,b){return b==null&&(b=this.options.size),Math.round(((a-1)/b-Math.floor((a-1)/b))*b)+1}}),d.extend({defaults:function(c){return a.extend(b,c||{})},margin:function(b,c){if(!b)return 0;var e=b.jquery!==undefined?b[0]:b;if(c=="marginRight"&&a.browser.safari){var f={display:"block","float":"none",width:"auto"},g,j;return a.swap(e,f,function(){g=e.offsetWidth}),f.marginRight=0,a.swap(e,f,function(){j=e.offsetWidth}),j-g}return d.intval(a.css(e,c))},intval:function(a){return a=parseInt(a,10),isNaN(a)?0:a}}),a.fn.jcarousel=function(b){if(typeof b=="string"){var c=a(this).data("jcarousel"),e=Array.prototype.slice.call(arguments,1);return c[b].apply(c,e)}return this.each(function(){a(this).data("jcarousel",new d(this,b))})}}(jQuery),function(){var a,b,c,d,e=function(a,b){return function(){return a.apply(b,arguments)}};d=this,a=jQuery,a.fn.extend({chosen:function(c,d){return a(this).each(function(e){var f,g;return g=a(this),f=g.data("chosen"),f||(f=new b(this,c,d),g.data("chosen",f)),f})},unchosen:function(){return a(this).each(function(b){var c,d;return d=a(this),c=d.data("chosen"),c&&(c.remove(),d.data("chosen",null)),d})}}),b=function(){function b(b){this.set_default_values(),this.form_field=b,this.form_field_jq=a(this.form_field),this.is_multiple=this.form_field.multiple,this.is_rtl=this.form_field_jq.hasClass("chzn-rtl"),this.default_text_default=this.form_field.multiple?"Select Some Options":"Select an Option",this.set_up_html(),this.register_observers()}return b.prototype.set_default_values=function(){return this.click_test_action=e(function(a){return this.test_active_click(a)},this),this.active_field=!1,this.mouse_on_container=!1,this.results_showing=!1,this.result_highlighted=null,this.result_single_selected=null,this.choices=0},b.prototype.set_up_html=function(){return this.container_id=this.form_field.id.length?this.form_field.id.replace(/(:|\.)/g,"_"):this.generate_field_id(),this.container_id+="_chzn",this.default_text=this.form_field_jq.data("placeholder")?this.form_field_jq.data("placeholder"):this.default_text_default,this.container=a("<div />",{id:this.container_id,"class":"chzn-container "+(this.is_rtl?"chzn-rtl":"")}),this.is_multiple?this.container.html('<ul class="chzn-choices"><li class="search-field"><input type="text" value="'+this.default_text+'" class="default" autocomplete="off" /></li></ul><div class="chzn-drop" style="left:-9000px;"><ul class="chzn-results"></ul></div>'):this.container.html('<a href="javascript:void(0)" class="chzn-single"><span>'+this.default_text+'</span><div><b></b></div></a><div class="chzn-drop" style="left:-9000px;"><div class="chzn-search"><input type="text" autocomplete="off" /></div><ul class="chzn-results"></ul></div>'),this.form_field_jq.hide().after(this.container),this.container.addClass("chzn-container-"+(this.is_multiple?"multi":"single")),this.dropdown=this.container.find("div.chzn-drop").first(),this.search_field=this.container.find("input").first(),this.search_results=this.container.find("ul.chzn-results").first(),this.search_field_scale(),this.search_no_results=this.container.find("li.no-results").first(),this.is_multiple?(this.search_choices=this.container.find("ul.chzn-choices").first(),this.search_container=this.container.find("li.search-field").first()):(this.search_container=this.container.find("div.chzn-search").first(),this.selected_item=this.container.find(".chzn-single").first()),this.results_build(),this.set_tab_index()},b.prototype.register_observers=function(){return this.container.click(e(function(a){return this.container_click(a)},this)),this.container.mouseenter(e(function(a){return this.mouse_enter(a)},this)),this.container.mouseleave(e(function(a){return this.mouse_leave(a)},this)),this.search_results.click(e(function(a){return this.search_results_click(a)},this)),this.search_results.mouseover(e(function(a){return this.search_results_mouseover(a)},this)),this.search_results.mouseout(e(function(a){return this.search_results_mouseout(a)},this)),this.form_field_jq.bind("liszt:updated",e(function(a){return this.results_update_field(a)},this)),this.search_field.blur(e(function(a){return this.input_blur(a)},this)),this.search_field.keyup(e(function(a){return this.keyup_checker(a)},this)),this.search_field.keydown(e(function(a){return this.keydown_checker(a)},this)),this.is_multiple?(this.search_choices.click(e(function(a){return this.choices_click(a)},this)),this.search_field.focus(e(function(a){return this.input_focus(a)},this))):this.selected_item.focus(e(function(a){return this.activate_field(a)},this))},b.prototype.unregister_observers=function(){return this.form_field_jq.unbind("liszt:updated")},b.prototype.remove_html=function(){return this.form_field_jq.show(),this.container.remove()},b.prototype.container_click=function(b){return b&&b.type==="click"&&b.stopPropagation(),this.pending_destroy_click?this.pending_destroy_click=!1:(this.active_field?!this.is_multiple&&b&&(a(b.target)===this.selected_item||a(b.target).parents("a.chzn-single").length)&&(b.preventDefault(),this.results_toggle()):(this.is_multiple&&this.search_field.val(""),a(document).click(this.click_test_action),this.results_show()),this.activate_field())},b.prototype.mouse_enter=function(){return this.mouse_on_container=!0},b.prototype.mouse_leave=function(){return this.mouse_on_container=!1},b.prototype.input_focus=function(a){if(!this.active_field)return setTimeout(e(function(){return this.container_click()},this),50)},b.prototype.input_blur=function(a){if(!this.mouse_on_container)return this.active_field=!1,setTimeout(e(function(){return this.blur_test()},this),100)},b.prototype.blur_test=function(a){if(!this.active_field&&this.container.hasClass("chzn-container-active"))return this.close_field()},b.prototype.close_field=function(){return a(document).unbind("click",this.click_test_action),this.is_multiple||(this.selected_item.attr("tabindex",this.search_field.attr("tabindex")),this.search_field.attr("tabindex",-1)),this.active_field=!1,this.results_hide(),this.container.removeClass("chzn-container-active"),this.winnow_results_clear(),this.clear_backstroke(),this.show_search_field_default(),this.search_field_scale()},b.prototype.activate_field=function(){return!this.is_multiple&&!this.active_field&&(this.search_field.attr("tabindex",this.selected_item.attr("tabindex")),this.selected_item.attr("tabindex",-1)),this.container.addClass("chzn-container-active"),this.active_field=!0,this.search_field.val(this.search_field.val()),this.search_field.focus()},b.prototype.test_active_click=function(b){return a(b.target).parents("#"+this.container_id).length?this.active_field=!0:this.close_field()},b.prototype.results_build=function(){var a,b,c,e,f,g;c=new Date,this.parsing=!0,this.results_data=d.SelectParser.select_to_array(this.form_field),this.is_multiple&&this.choices>0?(this.search_choices.find("li.search-choice").remove(),this.choices=0):this.is_multiple||this.selected_item.find("span").text(this.default_text),a="",g=this.results_data;for(e=0,f=g.length;e<f;e++)b=g[e],b.group?a+=this.result_add_group(b):b.empty||(a+=this.result_add_option(b),b.selected&&this.is_multiple?this.choice_build(b):b.selected&&!this.is_multiple&&this.selected_item.find("span").text(b.text));return this.show_search_field_default(),this.search_field_scale(),this.search_results.html(a),this.parsing=!1},b.prototype.result_add_group=function(b){return b.disabled?"":(b.dom_id=this.container_id+"_g_"+b.array_index,'<li id="'+b.dom_id+'" class="group-result">'+a("<div />").text(b.label).html()+"</li>")},b.prototype.result_add_option=function(a){var b;return a.disabled?"":(a.dom_id=this.container_id+"_o_"+a.array_index,b=a.selected&&this.is_multiple?[]:["active-result"],a.selected&&b.push("result-selected"),a.group_array_index!=null&&b.push("group-option"),'<li id="'+a.dom_id+'" class="'+b.join(" ")+'">'+a.html+"</li>")},b.prototype.results_update_field=function(){return this.result_clear_highlight(),this.result_single_selected=null,this.results_build()},b.prototype.result_do_highlight=function(a){var b,c,d,e,f;if(a.length){this.result_clear_highlight(),this.result_highlight=a,this.result_highlight.addClass("highlighted"),d=parseInt(this.search_results.css("maxHeight"),10),f=this.search_results.scrollTop(),e=d+f,c=this.result_highlight.position().top+this.search_results.scrollTop(),b=c+this.result_highlight.outerHeight();if(b>=e)return this.search_results.scrollTop(b-d>0?b-d:0);if(c<f)return this.search_results.scrollTop(c)}},b.prototype.result_clear_highlight=function(){return this.result_highlight&&this.result_highlight.removeClass("highlighted"),this.result_highlight=null},b.prototype.results_toggle=function(){return this.results_showing?this.results_hide():this.results_show()},b.prototype.results_show=function(){var a,b,d;return this.is_multiple||(this.selected_item.addClass("chzn-single-with-drop"),this.result_single_selected&&this.result_do_highlight(this.result_single_selected)),a=this.is_multiple?this.container.height():this.container.height()-1,b=this.container.outerWidth()-c(this.dropdown),this.dropdown.css({width:b+"px",top:a,left:0}),d=b-c(this.search_container),this.results_showing=!0,this.search_field.focus(),this.search_field.val(this.search_field.val()),this.winnow_results()},b.prototype.results_hide=function(){return this.is_multiple||this.selected_item.removeClass("chzn-single-with-drop"),this.result_clear_highlight(),this.dropdown.css({left:"-9000px"}),this.results_showing=!1},b.prototype.set_tab_index=function(a){var b;if(this.form_field_jq.attr("tabindex"))return b=this.form_field_jq.attr("tabindex"),this.form_field_jq.attr("tabindex",-1),this.is_multiple?this.search_field.attr("tabindex",b):(this.selected_item.attr("tabindex",b),this.search_field.attr("tabindex",-1))},b.prototype.reset_tab_index=function(){if(this.search_field.tabIndex)return this.form_field_jq.tabIndex=this.search_field.tabIndex,this.search_field.tabIndex=-1},b.prototype.show_search_field_default=function(){return this.is_multiple&&this.choices<1&&!this.active_field?(this.search_field.val(this.default_text),this.search_field.addClass("default")):(this.search_field.val(""),this.search_field.removeClass("default"))},b.prototype.search_results_click=function(b){var c;c=a(b.target).hasClass("active-result")?a(b.target):a(b.target).parents(".active-result").first();if(c.length)return this.result_highlight=c,this.result_select()},b.prototype.search_results_mouseover=function(b){var c;c=a(b.target).hasClass("active-result")?a(b.target):a(b.target).parents(".active-result").first();if(c)return this.result_do_highlight(c)},b.prototype.search_results_mouseout=function(b){if(a(b.target).hasClass("active-result"))return this.result_clear_highlight(
)},b.prototype.choices_click=function(b){b.preventDefault();if(this.active_field&&!a(b.target).hasClass("search-choice")&&!this.results_showing)return this.results_show()},b.prototype.choice_build=function(b){var c,d;return c=this.container_id+"_c_"+b.array_index,this.choices+=1,this.search_container.before('<li class="search-choice" id="'+c+'"><span>'+b.html+'</span><a href="javascript:void(0)" class="search-choice-close" rel="'+b.array_index+'"></a></li>'),d=a("#"+c).find("a").first(),d.click(e(function(a){return this.choice_destroy_link_click(a)},this))},b.prototype.choice_destroy_link_click=function(b){return b.preventDefault(),this.pending_destroy_click=!0,this.choice_destroy(a(b.target))},b.prototype.choice_destroy=function(a){return this.choices-=1,this.show_search_field_default(),this.is_multiple&&this.choices>0&&this.search_field.val().length<1&&this.results_hide(),this.result_deselect(a.attr("rel")),a.parents("li").first().remove()},b.prototype.result_select=function(){var a,b,c,d;if(this.result_highlight)return a=this.result_highlight,b=a.attr("id"),this.result_clear_highlight(),a.addClass("result-selected"),this.is_multiple?this.result_deactivate(a):this.result_single_selected=a,d=b.substr(b.lastIndexOf("_")+1),c=this.results_data[d],c.selected=!0,this.form_field.options[c.options_index].selected=!0,this.is_multiple?this.choice_build(c):this.selected_item.find("span").first().text(c.text),this.results_hide(),this.search_field.val(""),this.form_field_jq.trigger("change"),this.search_field_scale()},b.prototype.result_activate=function(a){return a.addClass("active-result").show()},b.prototype.result_deactivate=function(a){return a.removeClass("active-result").hide()},b.prototype.result_deselect=function(b){var c,d;return d=this.results_data[b],d.selected=!1,this.form_field.options[d.options_index].selected=!1,c=a("#"+this.container_id+"_o_"+b),c.removeClass("result-selected").addClass("active-result").show(),this.result_clear_highlight(),this.winnow_results(),this.form_field_jq.trigger("change"),this.search_field_scale()},b.prototype.results_search=function(a){return this.results_showing?this.winnow_results():this.results_show()},b.prototype.winnow_results=function(){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r;j=new Date,this.no_results_clear(),h=0,i=this.search_field.val()===this.default_text?"":a("<div/>").text(a.trim(this.search_field.val())).html(),f=new RegExp("^"+i.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),"i"),m=new RegExp(i.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),"i"),r=this.results_data;for(n=0,p=r.length;n<p;n++){c=r[n];if(!c.disabled&&!c.empty)if(c.group)a("#"+c.dom_id).hide();else if(!this.is_multiple||!c.selected){b=!1,g=c.dom_id;if(f.test(c.html))b=!0,h+=1;else if(c.html.indexOf(" ")>=0||c.html.indexOf("[")===0){e=c.html.replace(/\[|\]/g,"").split(" ");if(e.length)for(o=0,q=e.length;o<q;o++)d=e[o],f.test(d)&&(b=!0,h+=1)}b?(i.length?(k=c.html.search(m),l=c.html.substr(0,k+i.length)+"</em>"+c.html.substr(k+i.length),l=l.substr(0,k)+"<em>"+l.substr(k)):l=c.html,a("#"+g).html!==l&&a("#"+g).html(l),this.result_activate(a("#"+g)),c.group_array_index!=null&&a("#"+this.results_data[c.group_array_index].dom_id).show()):(this.result_highlight&&g===this.result_highlight.attr("id")&&this.result_clear_highlight(),this.result_deactivate(a("#"+g)))}}return h<1&&i.length?this.no_results(i):this.winnow_results_set_highlight()},b.prototype.winnow_results_clear=function(){var b,c,d,e,f;this.search_field.val(""),c=this.search_results.find("li"),f=[];for(d=0,e=c.length;d<e;d++)b=c[d],b=a(b),f.push(b.hasClass("group-result")?b.show():!this.is_multiple||!b.hasClass("result-selected")?this.result_activate(b):void 0);return f},b.prototype.winnow_results_set_highlight=function(){var a,b;if(!this.result_highlight){b=this.is_multiple?[]:this.search_results.find(".result-selected"),a=b.length?b.first():this.search_results.find(".active-result").first();if(a!=null)return this.result_do_highlight(a)}},b.prototype.no_results=function(b){var c;return c=a('<li class="no-results">No results match "<span></span>"</li>'),c.find("span").first().html(b),this.search_results.append(c)},b.prototype.no_results_clear=function(){return this.search_results.find(".no-results").remove()},b.prototype.remove=function(){return this.reset_tab_index(),this.unregister_observers(),this.remove_html()},b.prototype.keydown_arrow=function(){var b,c;this.result_highlight?this.results_showing&&(c=this.result_highlight.nextAll("li.active-result").first(),c&&this.result_do_highlight(c)):(b=this.search_results.find("li.active-result").first(),b&&this.result_do_highlight(a(b)));if(!this.results_showing)return this.results_show()},b.prototype.keyup_arrow=function(){var a;if(!this.results_showing&&!this.is_multiple)return this.results_show();if(this.result_highlight)return a=this.result_highlight.prevAll("li.active-result"),a.length?this.result_do_highlight(a.first()):(this.choices>0&&this.results_hide(),this.result_clear_highlight())},b.prototype.keydown_backstroke=function(){return this.pending_backstroke?(this.choice_destroy(this.pending_backstroke.find("a").first()),this.clear_backstroke()):(this.pending_backstroke=this.search_container.siblings("li.search-choice").last(),this.pending_backstroke.addClass("search-choice-focus"))},b.prototype.clear_backstroke=function(){return this.pending_backstroke&&this.pending_backstroke.removeClass("search-choice-focus"),this.pending_backstroke=null},b.prototype.keyup_checker=function(a){var b,c;b=(c=a.which)!=null?c:a.keyCode,this.search_field_scale();switch(b){case 8:if(this.is_multiple&&this.backstroke_length<1&&this.choices>0)return this.keydown_backstroke();if(!this.pending_backstroke)return this.result_clear_highlight(),this.results_search();break;case 13:a.preventDefault();if(this.results_showing)return this.result_select();break;case 27:if(this.results_showing)return this.results_hide();break;case 9:case 38:case 40:case 16:break;default:return this.results_search()}},b.prototype.keydown_checker=function(a){var b,c;b=(c=a.which)!=null?c:a.keyCode,this.search_field_scale(),b!==8&&this.pending_backstroke&&this.clear_backstroke();switch(b){case 8:this.backstroke_length=this.search_field.val().length;break;case 9:this.mouse_on_container=!1;break;case 13:a.preventDefault();break;case 38:a.preventDefault(),this.keyup_arrow();break;case 40:this.keydown_arrow()}},b.prototype.search_field_scale=function(){var b,c,d,e,f,g,h,i,j;if(this.is_multiple){d=0,h=0,f="position:absolute; left: -1000px; top: -1000px; display:none;",g=["font-size","font-style","font-weight","font-family","line-height","text-transform","letter-spacing"];for(i=0,j=g.length;i<j;i++)e=g[i],f+=e+":"+this.search_field.css(e)+";";return c=a("<div />",{style:f}),c.text(this.search_field.val()),a("body").append(c),h=c.width()+25,c.remove(),h>this.f_width-10&&(h=this.f_width-10),this.search_field.css({width:h+"px"}),b=this.container.height(),this.dropdown.css({top:b+"px"})}},b.prototype.generate_field_id=function(){var a;return a=this.generate_random_id(),this.form_field.id=a,a},b.prototype.generate_random_id=function(){var b;b="sel"+this.generate_random_char()+this.generate_random_char()+this.generate_random_char();while(a("#"+b).length>0)b+=this.generate_random_char();return b},b.prototype.generate_random_char=function(){var a,b,c;return a="0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZ",c=Math.floor(Math.random()*a.length),b=a.substring(c,c+1)},b}(),c=function(a){var b;return b=a.outerWidth()-a.width()},d.get_side_border_padding=c}.call(this),function(){var a;a=function(){function a(){this.options_index=0,this.parsed=[]}return a.prototype.add_node=function(a){return a.nodeName==="OPTGROUP"?this.add_group(a):this.add_option(a)},a.prototype.add_group=function(a){var b,c,d,e,f,g;b=this.parsed.length,this.parsed.push({array_index:b,group:!0,label:a.label,children:0,disabled:a.disabled}),f=a.childNodes,g=[];for(d=0,e=f.length;d<e;d++)c=f[d],g.push(this.add_option(c,b,a.disabled));return g},a.prototype.add_option=function(a,b,c){if(a.nodeName==="OPTION")return a.text!==""?(b!=null&&(this.parsed[b].children+=1),this.parsed.push({array_index:this.parsed.length,options_index:this.options_index,value:a.value,text:a.text,html:a.innerHTML,selected:a.selected,disabled:c===!0?c:a.disabled,group_array_index:b})):this.parsed.push({array_index:this.parsed.length,options_index:this.options_index,empty:!0}),this.options_index+=1},a}(),a.select_to_array=function(b){var c,d,e,f,g;d=new a,g=b.childNodes;for(e=0,f=g.length;e<f;e++)c=g[e],d.add_node(c);return d.parsed},this.SelectParser=a}.call(this),function(a,b){a.ajaxPrefilter(function(a,b,c){if(a.iframe)return"iframe"}),a.ajaxTransport("iframe",function(b,c,d){function m(){a(j).each(function(){this.remove()}),a(k).each(function(){this.disabled=!1}),e.attr("action",g||"").attr("target",h||"").attr("enctype",i||""),f.attr("src","javascript:false;").remove()}var e=null,f=null,g=null,h=null,i=null,j=[],k=[],l=a(b.files).filter(":file:enabled");b.dataTypes.shift();if(l.length)return l.each(function(){e!==null&&this.form!==e&&jQuery.error("All file fields must belong to the same form"),e=this.form}),e=a(e),g=e.attr("action"),h=e.attr("target"),i=e.attr("enctype"),e.find(":input:not(:submit)").each(function(){!this.disabled&&(this.type!="file"||l.index(this)<0)&&(this.disabled=!0,k.push(this))}),typeof b.data=="string"&&b.data.length>0&&jQuery.error("data must not be serialized"),a.each(b.data||{},function(b,c){a.isPlainObject(c)&&(b=c.name,c=c.value),j.push(a("<input type='hidden'>").attr("name",b).attr("value",c).appendTo(e))}),j.push(a("<input type='hidden' name='X-Requested-With'>").attr("value","IFrame").appendTo(e)),accepts=b.dataTypes[0]&&b.accepts[b.dataTypes[0]]?b.accepts[b.dataTypes[0]]+(b.dataTypes[0]!=="*"?", */*; q=0.01":""):b.accepts["*"],j.push(a("<input type='hidden' name='X-Http-Accept'>").attr("value",accepts).appendTo(e)),{send:function(c,d){f=a("<iframe src='javascript:false;' name='iframe-"+a.now()+"' style='display:none'></iframe>"),f.bind("load",function(){f.unbind("load").bind("load",function(){var a=this.contentWindow?this.contentWindow.document:this.contentDocument?this.contentDocument:this.document,b=a.documentElement?a.documentElement:a.body,c=b.getElementsByTagName("textarea")[0],e=c?c.getAttribute("data-type"):null,f=c?parseInt(c.getAttribute("response-code")):200,g="OK",h={text:e?c.value:b?b.innerHTML:null},i="Content-Type: "+(e||"text/html");d(f,g,h,i),setTimeout(m,50)}),e.attr("action",b.url).attr("target",f.attr("name")).attr("enctype","multipart/form-data").get(0).submit()}),f.insertAfter(e)},abort:function(){f!==null&&(f.unbind("load").attr("src","javascript:false;"),m())}}})}(jQuery),function(a){var b;a.remotipart=b={setup:function(c){c.one("ajax:beforeSend.remotipart",function(d,e,f){return delete f.beforeSend,f.iframe=!0,f.files=a(a.rails.fileInputSelector,c),f.data=c.serializeArray(),f.processData=!1,f.dataType===undefined&&(f.dataType="script *"),f.data.push({name:"remotipart_submitted",value:!0}),a.rails.fire(c,"ajax:remotipartSubmit",[e,f])&&a.rails.ajax(f),b.teardown(c),!1}).data("remotipartSubmitted",!0)},teardown:function(a){a.unbind("ajax:beforeSend.remotipart").removeData("remotipartSubmitted")}},a("form").live("ajax:aborted:file",function(){var c=a(this);return b.setup(c),!a.support.submitBubbles&&a().jquery<"1.7"&&a.rails.callFormSubmitBindings(c)===!1?a.rails.stopEverything(e):(a.rails.handleRemote(c),!1)})}(jQuery),function(i,za,p){i.fn.dataTableSettings=[];var D=i.fn.dataTableSettings;i.fn.dataTableExt={};var n=i.fn.dataTableExt;n.sVersion="1.8.2",n.sErrMode="alert",n.iApiIndex=0,n.oApi={},n.afnFiltering=[],n.aoFeatures=[],n.ofnSearch={},n.afnSortData=[],n.oStdClasses={sPagePrevEnabled:"paginate_enabled_previous",sPagePrevDisabled:"paginate_disabled_previous",sPageNextEnabled:"paginate_enabled_next",sPageNextDisabled:"paginate_disabled_next",sPageJUINext:"",sPageJUIPrev:"",sPageButton:"paginate_button",sPageButtonActive:"paginate_active",sPageButtonStaticDisabled:"paginate_button paginate_button_disabled",sPageFirst:"first",sPagePrevious:"previous",sPageNext:"next",sPageLast:"last",sStripeOdd:"odd",sStripeEven:"even",sRowEmpty:"dataTables_empty",sWrapper:"dataTables_wrapper",sFilter:"dataTables_filter",sInfo:"dataTables_info",sPaging:"dataTables_paginate paging_",sLength:"dataTables_length",sProcessing:"dataTables_processing",sSortAsc:"sorting_asc",sSortDesc:"sorting_desc",sSortable:"sorting",sSortableAsc:"sorting_asc_disabled",sSortableDesc:"sorting_desc_disabled",sSortableNone:"sorting_disabled",sSortColumn:"sorting_",sSortJUIAsc:"",sSortJUIDesc:"",sSortJUI:"",sSortJUIAscAllowed:"",sSortJUIDescAllowed:"",sSortJUIWrapper:"",sSortIcon:"",sScrollWrapper:"dataTables_scroll",sScrollHead:"dataTables_scrollHead",sScrollHeadInner:"dataTables_scrollHeadInner",sScrollBody:"dataTables_scrollBody",sScrollFoot:"dataTables_scrollFoot",sScrollFootInner:"dataTables_scrollFootInner",sFooterTH:""},n.oJUIClasses={sPagePrevEnabled:"fg-button ui-button ui-state-default ui-corner-left",sPagePrevDisabled:"fg-button ui-button ui-state-default ui-corner-left ui-state-disabled",sPageNextEnabled:"fg-button ui-button ui-state-default ui-corner-right",sPageNextDisabled:"fg-button ui-button ui-state-default ui-corner-right ui-state-disabled",sPageJUINext:"ui-icon ui-icon-circle-arrow-e",sPageJUIPrev:"ui-icon ui-icon-circle-arrow-w",sPageButton:"fg-button ui-button ui-state-default",sPageButtonActive:"fg-button ui-button ui-state-default ui-state-disabled",sPageButtonStaticDisabled:"fg-button ui-button ui-state-default ui-state-disabled",sPageFirst:"first ui-corner-tl ui-corner-bl",sPagePrevious:"previous",sPageNext:"next",sPageLast:"last ui-corner-tr ui-corner-br",sStripeOdd:"odd",sStripeEven:"even",sRowEmpty:"dataTables_empty",sWrapper:"dataTables_wrapper",sFilter:"dataTables_filter",sInfo:"dataTables_info",sPaging:"dataTables_paginate fg-buttonset ui-buttonset fg-buttonset-multi ui-buttonset-multi paging_",sLength:"dataTables_length",sProcessing:"dataTables_processing",sSortAsc:"ui-state-default",sSortDesc:"ui-state-default",sSortable:"ui-state-default",sSortableAsc:"ui-state-default",sSortableDesc:"ui-state-default",sSortableNone:"ui-state-default",sSortColumn:"sorting_",sSortJUIAsc:"css_right ui-icon ui-icon-triangle-1-n",sSortJUIDesc:"css_right ui-icon ui-icon-triangle-1-s",sSortJUI:"css_right ui-icon ui-icon-carat-2-n-s",sSortJUIAscAllowed:"css_right ui-icon ui-icon-carat-1-n",sSortJUIDescAllowed:"css_right ui-icon ui-icon-carat-1-s",sSortJUIWrapper:"DataTables_sort_wrapper",sSortIcon:"DataTables_sort_icon",sScrollWrapper:"dataTables_scroll",sScrollHead:"dataTables_scrollHead ui-state-default",sScrollHeadInner:"dataTables_scrollHeadInner",sScrollBody:"dataTables_scrollBody",sScrollFoot:"dataTables_scrollFoot ui-state-default",sScrollFootInner:"dataTables_scrollFootInner",sFooterTH:"ui-state-default"},n.oPagination={two_button:{fnInit:function(a,b,c){var d,e,f;a.bJUI?(d=p.createElement("a"),e=p.createElement("a"),f=p.createElement("span"),f.className=a.oClasses.sPageJUINext,e.appendChild(f),f=p.createElement("span"),f.className=a.oClasses.sPageJUIPrev,d.appendChild(f)):(d=p.createElement("div"),e=p.createElement("div")),d.className=a.oClasses.sPagePrevDisabled,e.className=a.oClasses.sPageNextDisabled,d.title=a.oLanguage.oPaginate.sPrevious,e.title=a.oLanguage.oPaginate.sNext,b.appendChild(d),b.appendChild(e),i(d).bind("click.DT",function(){a.oApi._fnPageChange(a,"previous")&&c(a)}),i(e).bind("click.DT",function(){a.oApi._fnPageChange(a,"next")&&c(a)}),i(d).bind("selectstart.DT",function(){return!1}),i(e).bind("selectstart.DT",function(){return!1}),a.sTableId!==""&&typeof a.aanFeatures.p=="undefined"&&(b.setAttribute("id",a.sTableId+"_paginate"),d.setAttribute("id",a.sTableId+"_previous"),e.setAttribute("id",a.sTableId+"_next"))},fnUpdate:function(a){if(a.aanFeatures.p)for(var b=a.aanFeatures.p,c=0,d=b.length;c<d;c++)b[c].childNodes.length!==0&&(b[c].childNodes[0].className=a._iDisplayStart===0?a.oClasses.sPagePrevDisabled:a.oClasses.sPagePrevEnabled,b[c].childNodes[1].className=a.fnDisplayEnd()==a.fnRecordsDisplay()?a.oClasses.sPageNextDisabled:a.oClasses.sPageNextEnabled)}},iFullNumbersShowPages:5,full_numbers:{fnInit:function(a,b,c){var d=p.createElement("span"),e=p.createElement("span"),f=p.createElement("span"),g=p.createElement("span"),h=p.createElement("span");d.innerHTML=a.oLanguage.oPaginate.sFirst,e.innerHTML=a.oLanguage.oPaginate.sPrevious,g.innerHTML=a.oLanguage.oPaginate.sNext,h.innerHTML=a.oLanguage.oPaginate.sLast;var j=a.oClasses;d.className=j.sPageButton+" "+j.sPageFirst,e.className=j.sPageButton+" "+j.sPagePrevious,g.className=j.sPageButton+" "+j.sPageNext,h.className=j.sPageButton+" "+j.sPageLast,b.appendChild(d),b.appendChild(e),b.appendChild(f),b.appendChild(g),b.appendChild(h),i(d).bind("click.DT",function(){a.oApi._fnPageChange(a,"first")&&c(a)}),i(e).bind("click.DT",function(){a.oApi._fnPageChange(a,"previous")&&c(a)}),i(g).bind("click.DT",function(){a.oApi._fnPageChange(a,"next")&&c(a)}),i(h).bind("click.DT",function(){a.oApi._fnPageChange(a,"last")&&c(a)}),i("span",b).bind("mousedown.DT",function(){return!1}).bind("selectstart.DT",function(){return!1}),a.sTableId!==""&&typeof a.aanFeatures.p=="undefined"&&(b.setAttribute("id",a.sTableId+"_paginate"),d.setAttribute("id",a.sTableId+"_first"),e.setAttribute("id",a.sTableId+"_previous"),g.setAttribute("id",a.sTableId+"_next"),h.setAttribute("id",a.sTableId+"_last"))},fnUpdate:function(a,b){if(a.aanFeatures.p){var c=n.oPagination.iFullNumbersShowPages,d=Math.floor(c/2),e=Math.ceil(a.fnRecordsDisplay()/a._iDisplayLength),f=Math.ceil(a._iDisplayStart/a._iDisplayLength)+1,g="",h,j=a.oClasses;e<c?(d=1,h=e):f<=d?(d=1,h=c):f>=e-d?(d=e-c+1,h=e):(d=f-Math.ceil(c/2)+1,h=d+c-1);for(c=d;c<=h;c++)g+=f!=c?'<span class="'+j.sPageButton+'">'+c+"</span>":'<span class="'+j.sPageButtonActive+'">'+c+"</span>";h=a.aanFeatures.p;var k,l=function(c){a._iDisplayStart=(this.innerHTML*1-1)*a._iDisplayLength,b(a),c.preventDefault()},m=function(){return!1};c=0;for(d=h.length;c<d;c++)h[c].childNodes.length!==0&&(k=i("span:eq(2)",h[c]),k.html(g),i("span",k).bind("click.DT",l).bind("mousedown.DT",m).bind("selectstart.DT",m),k=h[c].getElementsByTagName("span"),k=[k[0],k[1],k[k.length-2],k[k.length-1]],i(k).removeClass(j.sPageButton+" "+j.sPageButtonActive+" "+j.sPageButtonStaticDisabled),f==1?(k[0].className+=" "+j.sPageButtonStaticDisabled,k[1].className+=" "+j.sPageButtonStaticDisabled):(k[0].className+=" "+j.sPageButton,k[1].className+=" "+j.sPageButton),e===0||f==e||a._iDisplayLength==-1?(k[2].className+=" "+j.sPageButtonStaticDisabled,k[3].className+=" "+j.sPageButtonStaticDisabled):(k[2].className+=" "+j.sPageButton,k[3].className+=" "+j.sPageButton))}}}},n.oSort={"string-asc":function(a,b){return typeof a!="string"&&(a=""),typeof b!="string"&&(b=""),a=a.toLowerCase(),b=b.toLowerCase(),a<b?-1:a>b?1:0},"string-desc":function(a,b){return typeof a!="string"&&(a=""),typeof b!="string"&&(b=""),a=a.toLowerCase(),b=b.toLowerCase(),a<b?1:a>b?-1:0},"html-asc":function(a,b){return a=a.replace(/<.*?>/g,"").toLowerCase(),b=b.replace(/<.*?>/g,"").toLowerCase(),a<b?-1:a>b?1:0},"html-desc":function(a,b){return a=a.replace(/<.*?>/g,"").toLowerCase(),b=b.replace(/<.*?>/g,"").toLowerCase(),a<b?1:a>b?-1:0},"date-asc":function(a,b){a=Date.parse(a),b=Date.parse(b);if(isNaN(a)||a==="")a=Date.parse("01/01/1970 00:00:00");if(isNaN(b)||b==="")b=Date.parse("01/01/1970 00:00:00");return a-b},"date-desc":function(a,b){a=Date.parse(a),b=Date.parse(b);if(isNaN(a)||a==="")a=Date.parse("01/01/1970 00:00:00");if(isNaN(b)||b==="")b=Date.parse("01/01/1970 00:00:00");return b-a},"numeric-asc":function(a,b){return(a=="-"||a===""?0:a*1)-(b=="-"||b===""?0:b*1)},"numeric-desc":function(a,b){return(b=="-"||b===""?0:b*1)-(a=="-"||a===""?0:a*1)}},n.aTypes=[function(a){if(typeof a=="number")return"numeric";if(typeof a!="string")return null;var b,c=!1;b=a.charAt(0);if("0123456789-".indexOf(b)==-1)return null;for(var d=1;d<a.length;d++){b=a.charAt(d);if("0123456789.".indexOf(b)==-1)return null;if(b=="."){if(c)return null;c=!0}}return"numeric"},function(a){var b=Date.parse(a);return b!==null&&!isNaN(b)||typeof a=="string"&&a.length===0?"date":null},function(a){return typeof a=="string"&&a.indexOf("<")!=-1&&a.indexOf(">")!=-1?"html":null}],n.fnVersionCheck=function(a){var b=function(a,b){for(;a.length<b;)a+="0";return a},c=n.sVersion.split(".");a=a.split(".");for(var d="",e="",f=0,g=a.length;f<g;f++)d+=b(c[f],3),e+=b(a[f],3);return parseInt(d,10)>=parseInt(e,10)},n._oExternConfig={iNextUnique:0},i.fn.dataTable=function(g){function l(){this.fnRecordsTotal=function(){return this.oFeatures.bServerSide?parseInt(this._iRecordsTotal,10):this.aiDisplayMaster.length},this.fnRecordsDisplay=function(){return this.oFeatures.bServerSide?parseInt(this._iRecordsDisplay,10):this.aiDisplay.length},this.fnDisplayEnd=function(){return this.oFeatures.bServerSide?this.oFeatures.bPaginate===!1||this._iDisplayLength==-1?this._iDisplayStart+this.aiDisplay.length:Math.min(this._iDisplayStart+this._iDisplayLength,this._iRecordsDisplay):this._iDisplayEnd},this.sInstance=this.oInstance=null,this.oFeatures={bPaginate:!0,bLengthChange:!0,bFilter:!0,bSort:!0,bInfo:!0,bAutoWidth:!0,bProcessing:!1,bSortClasses:!0,bStateSave:!1,bServerSide:!1,bDeferRender:!1},this.oScroll={sX:"",sXInner:"",sY:"",bCollapse:!1,bInfinite:!1,iLoadGap:100,iBarWidth:0,bAutoCss:!0},this.aanFeatures=[],this.oLanguage={sProcessing:"Processing...",sLengthMenu:"Show _MENU_ entries",sZeroRecords:"No matching records found",sEmptyTable:"No data available in table",sLoadingRecords:"Loading...",sInfo:"Showing _START_ to _END_ of _TOTAL_ entries",sInfoEmpty:"Showing 0 to 0 of 0 entries",sInfoFiltered:"(filtered from _MAX_ total entries)",sInfoPostFix:"",sInfoThousands:",",sSearch:"Search:",sUrl:"",oPaginate:{sFirst:"First",sPrevious:"Previous",sNext:"Next",sLast:"Last"},fnInfoCallback:null},this.aoData=[],this.aiDisplay=[],this.aiDisplayMaster=[],this.aoColumns=[],this.aoHeader=[],this.aoFooter=[],this.iNextId=0,this.asDataSearch=[],this.oPreviousSearch={sSearch:"",bRegex:!1,bSmart:!0},this.aoPreSearchCols=[],this.aaSorting=[[0,"asc",0]],this.aaSortingFixed=null,this.asStripeClasses=[],this.asDestroyStripes=[],this.sDestroyWidth=0,this.fnFooterCallback=this.fnHeaderCallback=this.fnRowCallback=null,this.aoDrawCallback=[],this.fnInitComplete=this.fnPreDrawCallback=null,this.sTableId="",this.nTableWrapper=this.nTBody=this.nTFoot=this.nTHead=this.nTable=null,this.bInitialised=this.bDeferLoading=!1,this.aoOpenRows=[],this.sDom="lfrtip",this.sPaginationType="two_button",this.iCookieDuration=7200,this.sCookiePrefix="SpryMedia_DataTables_",this.fnCookieCallback=null,this.aoStateSave=[],this.aoStateLoad=[],this.sAjaxSource=this.oLoadedState=null,this.sAjaxDataProp="aaData",this.bAjaxDataGet=!0,this.jqXHR=null,this.fnServerData=function(a,b,c,d){d.jqXHR=i.ajax({url:a,data:b,success:function(a){i(d.oInstance).trigger("xhr",d),c(a)},dataType:"json",cache:!1,error:function(a,b){b=="parsererror"&&alert("DataTables warning: JSON data from server could not be parsed. This is caused by a JSON formatting error.")}})},this.aoServerParams=[],this.fnFormatNumber=function(a){if(a<1e3)return a;var b=a+"";a=b.split("");var c="";b=b.length;for(var d=0;d<b;d++)d%3===0&&d!==0&&(c=this.oLanguage.sInfoThousands+c),c=a[b-d-1]+c;return c},this.aLengthMenu=[10,25,50,100],this.bDrawing=this.iDraw=0,this.iDrawError=-1,this._iDisplayLength=10,this._iDisplayStart=0,this._iDisplayEnd=10,this._iRecordsDisplay=this._iRecordsTotal=0,this.bJUI=!1,this.oClasses=n.oStdClasses,this.bSortCellsTop=this.bSorted=this.bFiltered=!1,this.oInit=null,this.aoDestroyCallback=[]}function s(a){return function(){var b=[A(this[n.iApiIndex])].concat(Array.prototype.slice.call(arguments));return n.oApi[a].apply(this,b)}}function t(a){var b,c,d=a.iInitDisplayStart;if(a.bInitialised===!1)setTimeout(function(){t(a)},200);else{Aa(a),X(a),M(a,a.aoHeader),a.nTFoot&&M(a,a.aoFooter),K(a,!0),a.oFeatures.bAutoWidth&&ga(a),b=0;for(c=a.aoColumns.length;b<c;b++)a.aoColumns[b].sWidth!==null&&(a.aoColumns[b].nTh.style.width=q(a.aoColumns[b].sWidth));a.oFeatures.bSort?R(a):a.oFeatures.bFilter?N(a,a.oPreviousSearch):(a.aiDisplay=a.aiDisplayMaster.slice(),E(a),C(a)),a.sAjaxSource!==null&&!a.oFeatures.bServerSide?(c=[],ha(a,c),a.fnServerData.call(a.oInstance,a.sAjaxSource,c,function(c){var e=c;a.sAjaxDataProp!==""&&(e=aa(a.sAjaxDataProp)(c));for(b=0;b<e.length;b++)v(a,e[b]);a.iInitDisplayStart=d,a.oFeatures.bSort?R(a):(a.aiDisplay=a.aiDisplayMaster.slice(),E(a),C(a)),K(a,!1),w(a,c)},a)):a.oFeatures.bServerSide||(K(a,!1),w(a))}}function w(a,b){a._bInitComplete=!0,typeof a.fnInitComplete=="function"&&(typeof b!="undefined"?a.fnInitComplete.call(a.oInstance,a,b):a.fnInitComplete.call(a.oInstance,a))}function y(a,b,c){a.oLanguage=i.extend(!0,a.oLanguage,b),typeof b.sEmptyTable=="undefined"&&typeof b.sZeroRecords!="undefined"&&o(a.oLanguage,b,"sZeroRecords","sEmptyTable"),typeof b.sLoadingRecords=="undefined"&&typeof b.sZeroRecords!="undefined"&&o(a.oLanguage,b,"sZeroRecords","sLoadingRecords"),c&&t(a)}function F(a,b){var c=a.aoColumns.length;b={sType:null,_bAutoType:!0,bVisible:!0,bSearchable:!0,bSortable:!0,asSorting:["asc","desc"],sSortingClass:a.oClasses.sSortable,sSortingClassJUI:a.oClasses.sSortJUI,sTitle:b?b.innerHTML:"",sName:"",sWidth:null,sWidthOrig:null,sClass:null,fnRender:null,bUseRendered:!0,iDataSort:c,mDataProp:c,fnGetData:null,fnSetData:null,sSortDataType:"std",sDefaultContent:null,sContentPadding:"",nTh:b?b:p.createElement("th"),nTf:null},a.aoColumns.push(b),typeof a.aoPreSearchCols[c]=="undefined"||a.aoPreSearchCols[c]===null?a.aoPreSearchCols[c]={sSearch:"",bRegex:!1,bSmart:!0}:(typeof a.aoPreSearchCols[c].bRegex=="undefined"&&(a.aoPreSearchCols[c].bRegex=!0),typeof a.aoPreSearchCols[c].bSmart=="undefined"&&(a.aoPreSearchCols[c].bSmart=!0)),x(a,c,null)}function x(a,b,c){b=a.aoColumns[b],typeof c!="undefined"&&c!==null&&(typeof c.sType!="undefined"&&(b.sType=c.sType,b._bAutoType=!1),o(b,c,"bVisible"),o(b,c,"bSearchable"),o(b,c,"bSortable"),o(b,c,"sTitle"),o(b,c,"sName"),o(b,c,"sWidth"),o(b,c,"sWidth","sWidthOrig"),o(b,c,"sClass"),o(b,c,"fnRender"),o(b,c,"bUseRendered"),o(b,c,"iDataSort"),o(b,c,"mDataProp"),o(b,c,"asSorting"),o(b,c,"sSortDataType"),o(b,c,"sDefaultContent"),o(b,c,"sContentPadding")),b.fnGetData=aa(b.mDataProp),b.fnSetData=Ba(b.mDataProp),a.oFeatures.bSort||(b.bSortable=!1),!b.bSortable||i.inArray("asc",b.asSorting)==-1&&i.inArray("desc",b.asSorting)==-1?(b.sSortingClass=a.oClasses.sSortableNone,b.sSortingClassJUI=""):b.bSortable||i.inArray("asc",b.asSorting)==-1&&i.inArray("desc",b.asSorting)==-1?(b.sSortingClass=a.oClasses.sSortable,b.sSortingClassJUI=a.oClasses.sSortJUI):i.inArray("asc",b.asSorting)!=-1&&i.inArray("desc",b.asSorting)==-1?(b.sSortingClass=a.oClasses.sSortableAsc,b.sSortingClassJUI=a.oClasses.sSortJUIAscAllowed):i.inArray("asc",b.asSorting)==-1&&i.inArray("desc",b.asSorting)!=-1&&(b.sSortingClass=a.oClasses.sSortableDesc,b.sSortingClassJUI=a.oClasses.sSortJUIDescAllowed)}function v(a,b){var c;c=i.isArray(b)?b.slice():i.extend(!0,{},b),b=a.aoData.length;var d={nTr:null,_iId:a.iNextId++,_aData:c,_anHidden:[],_sRowStripe:""};a.aoData.push(d);for(var e,f=0,g=a.aoColumns.length;f<g;f++)c=a.aoColumns[f],typeof c.fnRender=="function"&&c.bUseRendered&&c.mDataProp!==null&&O(a,b,f,c.fnRender({iDataRow:b,iDataColumn:f,aData:d._aData,oSettings:a})),c._bAutoType&&c.sType!="string"&&(e=G(a,b,f,"type"),e!==null&&e!==""&&(e=ia(e),c.sType===null?c.sType=e:c.sType!=e&&c.sType!="html"&&(c.sType="string")));return a.aiDisplayMaster.push(b),a.oFeatures.bDeferRender||z(a,b),b}function z(a,b){var c=a.aoData[b],d;if(c.nTr===null){c.nTr=p.createElement("tr"),typeof c._aData.DT_RowId!="undefined"&&c.nTr.setAttribute("id",c._aData.DT_RowId),typeof c._aData.DT_RowClass!="undefined"&&i(c.nTr).addClass(c._aData.DT_RowClass);for(var e=0,f=a.aoColumns.length;e<f;e++){var g=a.aoColumns[e];d=p.createElement("td"),d.innerHTML=typeof g.fnRender!="function"||!!g.bUseRendered&&g.mDataProp!==null?G(a,b,e,"display"):g.fnRender({iDataRow:b,iDataColumn:e,aData:c._aData,oSettings:a}),g.sClass!==null&&(d.className=g.sClass),g.bVisible?(c.nTr.appendChild(d),c._anHidden[e]=null):c._anHidden[e]=d}}}function $(a){var b,c,d,e,f,g,h,j,k;if(a.bDeferLoading||a.sAjaxSource===null){h=a.nTBody.childNodes,b=0;for(c=h.length;b<c;b++)if(h[b].nodeName.toUpperCase()=="TR"){j=a.aoData.length,a.aoData.push({nTr:h[b],_iId:a.iNextId++,_aData:[],_anHidden:[],_sRowStripe:""}),a.aiDisplayMaster.push(j),g=h[b].childNodes,d=f=0;for(e=g.length;d<e;d++){k=g[d].nodeName.toUpperCase();if(k=="TD"||k=="TH")O(a,j,f,i.trim(g[d].innerHTML)),f++}}}h=ba(a),g=[],b=0;for(c=h.length;b<c;b++){d=0;for(e=h[b].childNodes.length;d<e;d++)f=h[b].childNodes[d],k=f.nodeName.toUpperCase(),(k=="TD"||k=="TH")&&g.push(f)}g.length!=h.length*a.aoColumns.length&&J(a,1,"Unexpected number of TD elements. Expected "+h.length*a.aoColumns.length+" and got "+g.length+". DataTables does not support rowspan / colspan in the table body, and there must be one cell for each row/column combination."),d=0;for(e=a.aoColumns.length;d<e;d++){a.aoColumns[d].sTitle===null&&(a.aoColumns[d].sTitle=a.aoColumns[d].nTh.innerHTML),h=a.aoColumns[d]._bAutoType,k=typeof a.aoColumns[d].fnRender=="function",f=a.aoColumns[d].sClass!==null,j=a.aoColumns[d].bVisible;var l,m;if(h||k||f||!j){b=0;for(c=a.aoData.length;b<c;b++)l=g[b*e+d],h&&a.aoColumns[d].sType!="string"&&(m=G(a,b,d,"type"),m!==""&&(m=ia(m),a.aoColumns[d].sType===null?a.aoColumns[d].sType=m:a.aoColumns[d].sType!=m&&a.aoColumns[d].sType!="html"&&(a.aoColumns[d].sType="string"))),k&&(m=a.aoColumns[d].fnRender({iDataRow:b,iDataColumn:d,aData:a.aoData[b]._aData,oSettings:a}),l.innerHTML=m,a.aoColumns[d].bUseRendered&&O(a,b,d,m)),f&&(l.className+=" "+a.aoColumns[d].sClass),j?a.aoData[b]._anHidden[d]=null:(a.aoData[b]._anHidden[d]=l,l.parentNode.removeChild(l))}}}function X(a){var b,c,d;a.nTHead.getElementsByTagName("tr");if(a.nTHead.getElementsByTagName("th").length!==0){b=0;for(d=a.aoColumns.length;b<d;b++)c=a.aoColumns[b].nTh,a.aoColumns[b].sClass!==null&&i(c).addClass(a.aoColumns[b].sClass),a.aoColumns[b].sTitle!=c.innerHTML&&(c.innerHTML=a.aoColumns[b].sTitle)}else{var e=p.createElement("tr");b=0;for(d=a.aoColumns.length;b<d;b++)c=a.aoColumns[b].nTh,c.innerHTML=a.aoColumns[b].sTitle,a.aoColumns[b].sClass!==null&&i(c).addClass(a.aoColumns[b].sClass),e.appendChild(c);i(a.nTHead).html("")[0].appendChild(e),Y(a.aoHeader,a.nTHead)}if(a.bJUI){b=0;for(d=a.aoColumns.length;b<d;b++){c=a.aoColumns[b].nTh,e=p.createElement("div"),e.className=a.oClasses.sSortJUIWrapper,i(c).contents().appendTo(e);var f=p.createElement("span");f.className=a.oClasses.sSortIcon,e.appendChild(f),c.appendChild(e)}}d=function(){return this.onselectstart=function(){return!1},!1};if(a.oFeatures.bSort)for(b=0;b<a.aoColumns.length;b++)a.aoColumns[b].bSortable!==!1?(ja(a,a.aoColumns[b].nTh,b),i(a.aoColumns[b].nTh).bind("mousedown.DT",d)):i(a.aoColumns[b].nTh).addClass(a.oClasses.sSortableNone);a.oClasses.sFooterTH!==""&&i(a.nTFoot).children("tr").children("th").addClass(a.oClasses.sFooterTH);if(a.nTFoot!==null){c=S(a,null,a.aoFooter),b=0;for(d=a.aoColumns.length;b<d;b++)typeof c[b]!="undefined"&&(a.aoColumns[b].nTf=c[b])}}function M(a,b,c){var d,e,f,g=[],h=[],i=a.aoColumns.length;typeof c=="undefined"&&(c=!1),d=0;for(e=b.length;d<e;d++){g[d]=b[d].slice(),g[d].nTr=b[d].nTr;for(f=i-1;f>=0;f--)!a.aoColumns[f].bVisible&&!c&&g[d].splice(f,1);h.push([])}d=0;for(e=g.length;d<e;d++){if(g[d].nTr){a=0;for(f=g[d].nTr.childNodes.length;a<f;a++)g[d].nTr.removeChild(g[d].nTr.childNodes[0])}f=0;for(b=g[d].length;f<b;f++){i=c=1;if(typeof h[d][f]=="undefined"){g[d].nTr.appendChild(g[d][f].cell);for(h[d][f]=1;typeof g[d+c]!="undefined"&&g[d][f].cell==g[d+c][f].cell;)h[d+c][f]=1,c++;for(;typeof g[d][f+i]!="undefined"&&g[d][f].cell==g[d][f+i].cell;){for(a=0;a<c;a++)h[d+a][f+i]=1;i++}g[d][f].cell.rowSpan=c,g[d][f].cell.colSpan=i}}}}function C(a){var b,c,d=[],e=0,f=!1;b=a.asStripeClasses.length,c=a.aoOpenRows.length;if(a.fnPreDrawCallback===null||a.fnPreDrawCallback.call(a.oInstance,a)!==!1){a.bDrawing=!0,typeof a.iInitDisplayStart!="undefined"&&a.iInitDisplayStart!=-1&&(a._iDisplayStart=a.oFeatures.bServerSide?a.iInitDisplayStart:a.iInitDisplayStart>=a.fnRecordsDisplay()?0:a.iInitDisplayStart,a.iInitDisplayStart=-1,E(a));if(a.bDeferLoading)a.bDeferLoading=!1,a.iDraw++;else if(a.oFeatures.bServerSide){if(!a.bDestroying&&!Ca(a))return}else a.iDraw++;if(a.aiDisplay.length!==0){var g=a._iDisplayStart,h=a._iDisplayEnd;a.oFeatures.bServerSide&&(g=0,h=a.aoData.length);for(g=g;g<h;g++){var j=a.aoData[a.aiDisplay[g]];j.nTr===null&&z(a,a.aiDisplay[g]);var k=j.nTr;if(b!==0
){var l=a.asStripeClasses[e%b];j._sRowStripe!=l&&(i(k).removeClass(j._sRowStripe).addClass(l),j._sRowStripe=l)}typeof a.fnRowCallback=="function"&&(k=a.fnRowCallback.call(a.oInstance,k,a.aoData[a.aiDisplay[g]]._aData,e,g),!k&&!f&&(J(a,0,"A node was not returned by fnRowCallback"),f=!0)),d.push(k),e++;if(c!==0)for(j=0;j<c;j++)k==a.aoOpenRows[j].nParent&&d.push(a.aoOpenRows[j].nTr)}}else d[0]=p.createElement("tr"),typeof a.asStripeClasses[0]!="undefined"&&(d[0].className=a.asStripeClasses[0]),f=a.oLanguage.sZeroRecords.replace("_MAX_",a.fnFormatNumber(a.fnRecordsTotal())),a.iDraw==1&&a.sAjaxSource!==null&&!a.oFeatures.bServerSide?f=a.oLanguage.sLoadingRecords:typeof a.oLanguage.sEmptyTable!="undefined"&&a.fnRecordsTotal()===0&&(f=a.oLanguage.sEmptyTable),b=p.createElement("td"),b.setAttribute("valign","top"),b.colSpan=Z(a),b.className=a.oClasses.sRowEmpty,b.innerHTML=f,d[e].appendChild(b);typeof a.fnHeaderCallback=="function"&&a.fnHeaderCallback.call(a.oInstance,i(a.nTHead).children("tr")[0],ca(a),a._iDisplayStart,a.fnDisplayEnd(),a.aiDisplay),typeof a.fnFooterCallback=="function"&&a.fnFooterCallback.call(a.oInstance,i(a.nTFoot).children("tr")[0],ca(a),a._iDisplayStart,a.fnDisplayEnd(),a.aiDisplay),e=p.createDocumentFragment(),b=p.createDocumentFragment();if(a.nTBody){f=a.nTBody.parentNode,b.appendChild(a.nTBody);if(!a.oScroll.bInfinite||!a._bInitComplete||a.bSorted||a.bFiltered){c=a.nTBody.childNodes;for(b=c.length-1;b>=0;b--)c[b].parentNode.removeChild(c[b])}b=0;for(c=d.length;b<c;b++)e.appendChild(d[b]);a.nTBody.appendChild(e),f!==null&&f.appendChild(a.nTBody)}for(b=a.aoDrawCallback.length-1;b>=0;b--)a.aoDrawCallback[b].fn.call(a.oInstance,a);i(a.oInstance).trigger("draw",a),a.bSorted=!1,a.bFiltered=!1,a.bDrawing=!1,a.oFeatures.bServerSide&&(K(a,!1),typeof a._bInitComplete=="undefined"&&w(a))}}function da(a){a.oFeatures.bSort?R(a,a.oPreviousSearch):a.oFeatures.bFilter?N(a,a.oPreviousSearch):(E(a),C(a))}function Ca(a){if(a.bAjaxDataGet){a.iDraw++,K(a,!0);var b=Da(a);return ha(a,b),a.fnServerData.call(a.oInstance,a.sAjaxSource,b,function(b){Ea(a,b)},a),!1}return!0}function Da(a){var b=a.aoColumns.length,c=[],d,e;c.push({name:"sEcho",value:a.iDraw}),c.push({name:"iColumns",value:b}),c.push({name:"sColumns",value:ka(a)}),c.push({name:"iDisplayStart",value:a._iDisplayStart}),c.push({name:"iDisplayLength",value:a.oFeatures.bPaginate!==!1?a._iDisplayLength:-1});for(e=0;e<b;e++)d=a.aoColumns[e].mDataProp,c.push({name:"mDataProp_"+e,value:typeof d=="function"?"function":d});if(a.oFeatures.bFilter!==!1){c.push({name:"sSearch",value:a.oPreviousSearch.sSearch}),c.push({name:"bRegex",value:a.oPreviousSearch.bRegex});for(e=0;e<b;e++)c.push({name:"sSearch_"+e,value:a.aoPreSearchCols[e].sSearch}),c.push({name:"bRegex_"+e,value:a.aoPreSearchCols[e].bRegex}),c.push({name:"bSearchable_"+e,value:a.aoColumns[e].bSearchable})}if(a.oFeatures.bSort!==!1){d=a.aaSortingFixed!==null?a.aaSortingFixed.length:0;var f=a.aaSorting.length;c.push({name:"iSortingCols",value:d+f});for(e=0;e<d;e++)c.push({name:"iSortCol_"+e,value:a.aaSortingFixed[e][0]}),c.push({name:"sSortDir_"+e,value:a.aaSortingFixed[e][1]});for(e=0;e<f;e++)c.push({name:"iSortCol_"+(e+d),value:a.aaSorting[e][0]}),c.push({name:"sSortDir_"+(e+d),value:a.aaSorting[e][1]});for(e=0;e<b;e++)c.push({name:"bSortable_"+e,value:a.aoColumns[e].bSortable})}return c}function ha(a,b){for(var c=0,d=a.aoServerParams.length;c<d;c++)a.aoServerParams[c].fn.call(a.oInstance,b)}function Ea(a,b){if(typeof b.sEcho!="undefined"){if(b.sEcho*1<a.iDraw)return;a.iDraw=b.sEcho*1}(!a.oScroll.bInfinite||a.oScroll.bInfinite&&(a.bSorted||a.bFiltered))&&la(a),a._iRecordsTotal=b.iTotalRecords,a._iRecordsDisplay=b.iTotalDisplayRecords;var c=ka(a);if(c=typeof b.sColumns!="undefined"&&c!==""&&b.sColumns!=c)var d=Fa(a,b.sColumns);b=aa(a.sAjaxDataProp)(b);for(var e=0,f=b.length;e<f;e++)if(c){for(var g=[],h=0,i=a.aoColumns.length;h<i;h++)g.push(b[e][d[h]]);v(a,g)}else v(a,b[e]);a.aiDisplay=a.aiDisplayMaster.slice(),a.bAjaxDataGet=!1,C(a),a.bAjaxDataGet=!0,K(a,!1)}function Aa(a){var b=p.createElement("div");a.nTable.parentNode.insertBefore(b,a.nTable),a.nTableWrapper=p.createElement("div"),a.nTableWrapper.className=a.oClasses.sWrapper,a.sTableId!==""&&a.nTableWrapper.setAttribute("id",a.sTableId+"_wrapper"),a.nTableReinsertBefore=a.nTable.nextSibling;for(var c=a.nTableWrapper,d=a.sDom.split(""),e,f,g,h,i,j,k,l=0;l<d.length;l++){f=0,g=d[l];if(g=="<"){h=p.createElement("div"),i=d[l+1];if(i=="'"||i=='"'){j="";for(k=2;d[l+k]!=i;)j+=d[l+k],k++;j=="H"?j="fg-toolbar ui-toolbar ui-widget-header ui-corner-tl ui-corner-tr ui-helper-clearfix":j=="F"&&(j="fg-toolbar ui-toolbar ui-widget-header ui-corner-bl ui-corner-br ui-helper-clearfix"),j.indexOf(".")!=-1?(i=j.split("."),h.setAttribute("id",i[0].substr(1,i[0].length-1)),h.className=i[1]):j.charAt(0)=="#"?h.setAttribute("id",j.substr(1,j.length-1)):h.className=j,l+=k}c.appendChild(h),c=h}else if(g==">")c=c.parentNode;else if(g=="l"&&a.oFeatures.bPaginate&&a.oFeatures.bLengthChange)e=Ga(a),f=1;else if(g=="f"&&a.oFeatures.bFilter)e=Ha(a),f=1;else if(g=="r"&&a.oFeatures.bProcessing)e=Ia(a),f=1;else if(g=="t")e=Ja(a),f=1;else if(g=="i"&&a.oFeatures.bInfo)e=Ka(a),f=1;else if(g=="p"&&a.oFeatures.bPaginate)e=La(a),f=1;else if(n.aoFeatures.length!==0){h=n.aoFeatures,k=0;for(i=h.length;k<i;k++)if(g==h[k].cFeature){if(e=h[k].fnInit(a))f=1;break}}f==1&&e!==null&&(typeof a.aanFeatures[g]!="object"&&(a.aanFeatures[g]=[]),a.aanFeatures[g].push(e),c.appendChild(e))}b.parentNode.replaceChild(a.nTableWrapper,b)}function Ja(a){if(a.oScroll.sX===""&&a.oScroll.sY==="")return a.nTable;var b=p.createElement("div"),c=p.createElement("div"),d=p.createElement("div"),e=p.createElement("div"),f=p.createElement("div"),h=p.createElement("div"),j=a.nTable.cloneNode(!1),k=a.nTable.cloneNode(!1),l=a.nTable.getElementsByTagName("thead")[0],m=a.nTable.getElementsByTagName("tfoot").length===0?null:a.nTable.getElementsByTagName("tfoot")[0],o=typeof g.bJQueryUI!="undefined"&&g.bJQueryUI?n.oJUIClasses:n.oStdClasses;c.appendChild(d),f.appendChild(h),e.appendChild(a.nTable),b.appendChild(c),b.appendChild(e),d.appendChild(j),j.appendChild(l),m!==null&&(b.appendChild(f),h.appendChild(k),k.appendChild(m)),b.className=o.sScrollWrapper,c.className=o.sScrollHead,d.className=o.sScrollHeadInner,e.className=o.sScrollBody,f.className=o.sScrollFoot,h.className=o.sScrollFootInner,a.oScroll.bAutoCss&&(c.style.overflow="hidden",c.style.position="relative",f.style.overflow="hidden",e.style.overflow="auto"),c.style.border="0",c.style.width="100%",f.style.border="0",d.style.width="150%",j.removeAttribute("id"),j.style.marginLeft="0",a.nTable.style.marginLeft="0",m!==null&&(k.removeAttribute("id"),k.style.marginLeft="0"),d=i(a.nTable).children("caption"),h=0;for(k=d.length;h<k;h++)j.appendChild(d[h]);return a.oScroll.sX!==""&&(c.style.width=q(a.oScroll.sX),e.style.width=q(a.oScroll.sX),m!==null&&(f.style.width=q(a.oScroll.sX)),i(e).scroll(function(){c.scrollLeft=this.scrollLeft,m!==null&&(f.scrollLeft=this.scrollLeft)})),a.oScroll.sY!==""&&(e.style.height=q(a.oScroll.sY)),a.aoDrawCallback.push({fn:Ma,sName:"scrolling"}),a.oScroll.bInfinite&&i(e).scroll(function(){a.bDrawing||i(this).scrollTop()+i(this).height()>i(a.nTable).height()-a.oScroll.iLoadGap&&a.fnDisplayEnd()<a.fnRecordsDisplay()&&(ma(a,"next"),E(a),C(a))}),a.nScrollHead=c,a.nScrollFoot=f,b}function Ma(a){var b=a.nScrollHead.getElementsByTagName("div")[0],c=b.getElementsByTagName("table")[0],d=a.nTable.parentNode,e,f,g,h,j,k,l,m,n=[],o=a.nTFoot!==null?a.nScrollFoot.getElementsByTagName("div")[0]:null,p=a.nTFoot!==null?o.getElementsByTagName("table")[0]:null,r=i.browser.msie&&i.browser.version<=7;g=a.nTable.getElementsByTagName("thead"),g.length>0&&a.nTable.removeChild(g[0]),a.nTFoot!==null&&(j=a.nTable.getElementsByTagName("tfoot"),j.length>0&&a.nTable.removeChild(j[0])),g=a.nTHead.cloneNode(!0),a.nTable.insertBefore(g,a.nTable.childNodes[0]),a.nTFoot!==null&&(j=a.nTFoot.cloneNode(!0),a.nTable.insertBefore(j,a.nTable.childNodes[1])),a.oScroll.sX===""&&(d.style.width="100%",b.parentNode.style.width="100%");var s=S(a,g);e=0;for(f=s.length;e<f;e++)l=Na(a,e),s[e].style.width=a.aoColumns[l].sWidth;a.nTFoot!==null&&P(function(a){a.style.width=""},j.getElementsByTagName("tr")),e=i(a.nTable).outerWidth(),a.oScroll.sX===""?(a.nTable.style.width="100%",r&&(d.scrollHeight>d.offsetHeight||i(d).css("overflow-y")=="scroll")&&(a.nTable.style.width=q(i(a.nTable).outerWidth()-a.oScroll.iBarWidth))):a.oScroll.sXInner!==""?a.nTable.style.width=q(a.oScroll.sXInner):e==i(d).width()&&i(d).height()<i(a.nTable).height()?(a.nTable.style.width=q(e-a.oScroll.iBarWidth),i(a.nTable).outerWidth()>e-a.oScroll.iBarWidth&&(a.nTable.style.width=q(e))):a.nTable.style.width=q(e),e=i(a.nTable).outerWidth(),f=a.nTHead.getElementsByTagName("tr"),g=g.getElementsByTagName("tr"),P(function(a,b){k=a.style,k.paddingTop="0",k.paddingBottom="0",k.borderTopWidth="0",k.borderBottomWidth="0",k.height=0,m=i(a).width(),b.style.width=q(m),n.push(m)},g,f),i(g).height(0),a.nTFoot!==null&&(h=j.getElementsByTagName("tr"),j=a.nTFoot.getElementsByTagName("tr"),P(function(a,b){k=a.style,k.paddingTop="0",k.paddingBottom="0",k.borderTopWidth="0",k.borderBottomWidth="0",k.height=0,m=i(a).width(),b.style.width=q(m),n.push(m)},h,j),i(h).height(0)),P(function(a){a.innerHTML="",a.style.width=q(n.shift())},g),a.nTFoot!==null&&P(function(a){a.innerHTML="",a.style.width=q(n.shift())},h),i(a.nTable).outerWidth()<e?(h=d.scrollHeight>d.offsetHeight||i(d).css("overflow-y")=="scroll"?e+a.oScroll.iBarWidth:e,r&&(d.scrollHeight>d.offsetHeight||i(d).css("overflow-y")=="scroll")&&(a.nTable.style.width=q(h-a.oScroll.iBarWidth)),d.style.width=q(h),b.parentNode.style.width=q(h),a.nTFoot!==null&&(o.parentNode.style.width=q(h)),a.oScroll.sX===""?J(a,1,"The table cannot fit into the current element which will cause column misalignment. The table has been drawn at its minimum possible width."):a.oScroll.sXInner!==""&&J(a,1,"The table cannot fit into the current element which will cause column misalignment. Increase the sScrollXInner value or remove it to allow automatic calculation")):(d.style.width=q("100%"),b.parentNode.style.width=q("100%"),a.nTFoot!==null&&(o.parentNode.style.width=q("100%"))),a.oScroll.sY===""&&r&&(d.style.height=q(a.nTable.offsetHeight+a.oScroll.iBarWidth)),a.oScroll.sY!==""&&a.oScroll.bCollapse&&(d.style.height=q(a.oScroll.sY),r=a.oScroll.sX!==""&&a.nTable.offsetWidth>d.offsetWidth?a.oScroll.iBarWidth:0,a.nTable.offsetHeight<d.offsetHeight&&(d.style.height=q(i(a.nTable).height()+r))),r=i(a.nTable).outerWidth(),c.style.width=q(r),b.style.width=q(r+a.oScroll.iBarWidth),a.nTFoot!==null&&(o.style.width=q(a.nTable.offsetWidth+a.oScroll.iBarWidth),p.style.width=q(a.nTable.offsetWidth));if(a.bSorted||a.bFiltered)d.scrollTop=0}function ea(a){if(a.oFeatures.bAutoWidth===!1)return!1;ga(a);for(var b=0,c=a.aoColumns.length;b<c;b++)a.aoColumns[b].nTh.style.width=a.aoColumns[b].sWidth}function Ha(a){var b=a.oLanguage.sSearch;b=b.indexOf("_INPUT_")!==-1?b.replace("_INPUT_",'<input type="text" />'):b===""?'<input type="text" />':b+' <input type="text" />';var c=p.createElement("div");return c.className=a.oClasses.sFilter,c.innerHTML="<label>"+b+"</label>",a.sTableId!==""&&typeof a.aanFeatures.f=="undefined"&&c.setAttribute("id",a.sTableId+"_filter"),b=i("input",c),b.val(a.oPreviousSearch.sSearch.replace('"',"&quot;")),b.bind("keyup.DT",function(){for(var b=a.aanFeatures.f,c=0,d=b.length;c<d;c++)b[c]!=i(this).parents("div.dataTables_filter")[0]&&i("input",b[c]).val(this.value);this.value!=a.oPreviousSearch.sSearch&&N(a,{sSearch:this.value,bRegex:a.oPreviousSearch.bRegex,bSmart:a.oPreviousSearch.bSmart})}),b.bind("keypress.DT",function(a){if(a.keyCode==13)return!1}),c}function N(a,b,c){Oa(a,b.sSearch,c,b.bRegex,b.bSmart);for(b=0;b<a.aoPreSearchCols.length;b++)Pa(a,a.aoPreSearchCols[b].sSearch,b,a.aoPreSearchCols[b].bRegex,a.aoPreSearchCols[b].bSmart);n.afnFiltering.length!==0&&Qa(a),a.bFiltered=!0,i(a.oInstance).trigger("filter",a),a._iDisplayStart=0,E(a),C(a),oa(a,0)}function Qa(a){for(var b=n.afnFiltering,c=0,d=b.length;c<d;c++)for(var e=0,f=0,g=a.aiDisplay.length;f<g;f++){var h=a.aiDisplay[f-e];b[c](a,fa(a,h,"filter"),h)||(a.aiDisplay.splice(f-e,1),e++)}}function Pa(a,b,c,d,e){if(b!==""){var f=0;b=pa(b,d,e);for(d=a.aiDisplay.length-1;d>=0;d--)e=qa(G(a,a.aiDisplay[d],c,"filter"),a.aoColumns[c].sType),b.test(e)||(a.aiDisplay.splice(d,1),f++)}}function Oa(a,b,c,d,e){var f=pa(b,d,e);if(typeof c=="undefined"||c===null)c=0;n.afnFiltering.length!==0&&(c=1);if(b.length<=0)a.aiDisplay.splice(0,a.aiDisplay.length),a.aiDisplay=a.aiDisplayMaster.slice();else if(a.aiDisplay.length==a.aiDisplayMaster.length||a.oPreviousSearch.sSearch.length>b.length||c==1||b.indexOf(a.oPreviousSearch.sSearch)!==0){a.aiDisplay.splice(0,a.aiDisplay.length),oa(a,1);for(c=0;c<a.aiDisplayMaster.length;c++)f.test(a.asDataSearch[c])&&a.aiDisplay.push(a.aiDisplayMaster[c])}else{var g=0;for(c=0;c<a.asDataSearch.length;c++)f.test(a.asDataSearch[c])||(a.aiDisplay.splice(c-g,1),g++)}a.oPreviousSearch.sSearch=b,a.oPreviousSearch.bRegex=d,a.oPreviousSearch.bSmart=e}function oa(a,b){if(!a.oFeatures.bServerSide){a.asDataSearch.splice(0,a.asDataSearch.length),b=typeof b!="undefined"&&b==1?a.aiDisplayMaster:a.aiDisplay;for(var c=0,d=b.length;c<d;c++)a.asDataSearch[c]=ra(a,fa(a,b[c],"filter"))}}function ra(a,b){var c="";typeof a.__nTmpFilter=="undefined"&&(a.__nTmpFilter=p.createElement("div"));for(var d=a.__nTmpFilter,e=0,f=a.aoColumns.length;e<f;e++)a.aoColumns[e].bSearchable&&(c+=qa(b[e],a.aoColumns[e].sType)+"  ");return c.indexOf("&")!==-1&&(d.innerHTML=c,c=d.textContent?d.textContent:d.innerText,c=c.replace(/\n/g," ").replace(/\r/g,"")),c}function pa(a,b,c){return c?(a=b?a.split(" "):sa(a).split(" "),a="^(?=.*?"+a.join(")(?=.*?")+").*$",new RegExp(a,"i")):(a=b?a:sa(a),new RegExp(a,"i"))}function qa(a,b){return typeof n.ofnSearch[b]=="function"?n.ofnSearch[b](a):b=="html"?a.replace(/\n/g," ").replace(/<.*?>/g,""):typeof a=="string"?a.replace(/\n/g," "):a===null?"":a}function R(a,b){var c,d,e,f,g=[],h=[],j=n.oSort;d=a.aoData;var k=a.aoColumns;if(!a.oFeatures.bServerSide&&(a.aaSorting.length!==0||a.aaSortingFixed!==null)){g=a.aaSortingFixed!==null?a.aaSortingFixed.concat(a.aaSorting):a.aaSorting.slice();for(c=0;c<g.length;c++){var l=g[c][0];e=ta(a,l),f=a.aoColumns[l].sSortDataType;if(typeof n.afnSortData[f]!="undefined"){var m=n.afnSortData[f](a,l,e);e=0;for(f=d.length;e<f;e++)O(a,e,l,m[e])}}c=0;for(d=a.aiDisplayMaster.length;c<d;c++)h[a.aiDisplayMaster[c]]=c;var o=g.length;a.aiDisplayMaster.sort(function(b,d){var e,f;for(c=0;c<o;c++){e=k[g[c][0]].iDataSort,f=k[e].sType,e=j[(f?f:"string")+"-"+g[c][1]](G(a,b,e,"sort"),G(a,d,e,"sort"));if(e!==0)return e}return j["numeric-asc"](h[b],h[d])})}(typeof b=="undefined"||b)&&!a.oFeatures.bDeferRender&&V(a),a.bSorted=!0,i(a.oInstance).trigger("sort",a),a.oFeatures.bFilter?N(a,a.oPreviousSearch,1):(a.aiDisplay=a.aiDisplayMaster.slice(),a._iDisplayStart=0,E(a),C(a))}function ja(a,b,c,d){i(b).bind("click.DT",function(b){if(a.aoColumns[c].bSortable!==!1){var e=function(){var d,e;if(b.shiftKey){for(var g=!1,h=0;h<a.aaSorting.length;h++)if(a.aaSorting[h][0]==c){g=!0,d=a.aaSorting[h][0],e=a.aaSorting[h][2]+1,typeof a.aoColumns[d].asSorting[e]=="undefined"?a.aaSorting.splice(h,1):(a.aaSorting[h][1]=a.aoColumns[d].asSorting[e],a.aaSorting[h][2]=e);break}g===!1&&a.aaSorting.push([c,a.aoColumns[c].asSorting[0],0])}else a.aaSorting.length==1&&a.aaSorting[0][0]==c?(d=a.aaSorting[0][0],e=a.aaSorting[0][2]+1,typeof a.aoColumns[d].asSorting[e]=="undefined"&&(e=0),a.aaSorting[0][1]=a.aoColumns[d].asSorting[e],a.aaSorting[0][2]=e):(a.aaSorting.splice(0,a.aaSorting.length),a.aaSorting.push([c,a.aoColumns[c].asSorting[0],0]));R(a)};a.oFeatures.bProcessing?(K(a,!0),setTimeout(function(){e(),a.oFeatures.bServerSide||K(a,!1)},0)):e(),typeof d=="function"&&d(a)}})}function V(a){var b,c,d,e,f,g=a.aoColumns.length,h=a.oClasses;for(b=0;b<g;b++)a.aoColumns[b].bSortable&&i(a.aoColumns[b].nTh).removeClass(h.sSortAsc+" "+h.sSortDesc+" "+a.aoColumns[b].sSortingClass);e=a.aaSortingFixed!==null?a.aaSortingFixed.concat(a.aaSorting):a.aaSorting.slice();for(b=0;b<a.aoColumns.length;b++)if(a.aoColumns[b].bSortable){f=a.aoColumns[b].sSortingClass,d=-1;for(c=0;c<e.length;c++)if(e[c][0]==b){f=e[c][1]=="asc"?h.sSortAsc:h.sSortDesc,d=c;break}i(a.aoColumns[b].nTh).addClass(f),a.bJUI&&(c=i("span",a.aoColumns[b].nTh),c.removeClass(h.sSortJUIAsc+" "+h.sSortJUIDesc+" "+h.sSortJUI+" "+h.sSortJUIAscAllowed+" "+h.sSortJUIDescAllowed),c.addClass(d==-1?a.aoColumns[b].sSortingClassJUI:e[d][1]=="asc"?h.sSortJUIAsc:h.sSortJUIDesc))}else i(a.aoColumns[b].nTh).addClass(a.aoColumns[b].sSortingClass);f=h.sSortColumn;if(a.oFeatures.bSort&&a.oFeatures.bSortClasses){d=Q(a);if(a.oFeatures.bDeferRender)i(d).removeClass(f+"1 "+f+"2 "+f+"3");else if(d.length>=g)for(b=0;b<g;b++)if(d[b].className.indexOf(f+"1")!=-1){c=0;for(a=d.length/g;c<a;c++)d[g*c+b].className=i.trim(d[g*c+b].className.replace(f+"1",""))}else if(d[b].className.indexOf(f+"2")!=-1){c=0;for(a=d.length/g;c<a;c++)d[g*c+b].className=i.trim(d[g*c+b].className.replace(f+"2",""))}else if(d[b].className.indexOf(f+"3")!=-1){c=0;for(a=d.length/g;c<a;c++)d[g*c+b].className=i.trim(d[g*c+b].className.replace(" "+f+"3",""))}h=1;var j;for(b=0;b<e.length;b++){j=parseInt(e[b][0],10),c=0;for(a=d.length/g;c<a;c++)d[g*c+j].className+=" "+f+h;h<3&&h++}}}function La(a){if(a.oScroll.bInfinite)return null;var b=p.createElement("div");return b.className=a.oClasses.sPaging+a.sPaginationType,n.oPagination[a.sPaginationType].fnInit(a,b,function(a){E(a),C(a)}),typeof a.aanFeatures.p=="undefined"&&a.aoDrawCallback.push({fn:function(a){n.oPagination[a.sPaginationType].fnUpdate(a,function(a){E(a),C(a)})},sName:"pagination"}),b}function ma(a,b){var c=a._iDisplayStart;return b=="first"?a._iDisplayStart=0:b=="previous"?(a._iDisplayStart=a._iDisplayLength>=0?a._iDisplayStart-a._iDisplayLength:0,a._iDisplayStart<0&&(a._iDisplayStart=0)):b=="next"?a._iDisplayLength>=0?a._iDisplayStart+a._iDisplayLength<a.fnRecordsDisplay()&&(a._iDisplayStart+=a._iDisplayLength):a._iDisplayStart=0:b=="last"?a._iDisplayLength>=0?(b=parseInt((a.fnRecordsDisplay()-1)/a._iDisplayLength,10)+1,a._iDisplayStart=(b-1)*a._iDisplayLength):a._iDisplayStart=0:J(a,0,"Unknown paging action: "+b),i(a.oInstance).trigger("page",a),c!=a._iDisplayStart}function Ka(a){var b=p.createElement("div");return b.className=a.oClasses.sInfo,typeof a.aanFeatures.i=="undefined"&&(a.aoDrawCallback.push({fn:Ra,sName:"information"}),a.sTableId!==""&&b.setAttribute("id",a.sTableId+"_info")),b}function Ra(a){if(!!a.oFeatures.bInfo&&a.aanFeatures.i.length!==0){var b=a._iDisplayStart+1,c=a.fnDisplayEnd(),d=a.fnRecordsTotal(),e=a.fnRecordsDisplay(),f=a.fnFormatNumber(b),g=a.fnFormatNumber(c),h=a.fnFormatNumber(d),j=a.fnFormatNumber(e);a.oScroll.bInfinite&&(f=a.fnFormatNumber(1)),f=a.fnRecordsDisplay()===0&&a.fnRecordsDisplay()==a.fnRecordsTotal()?a.oLanguage.sInfoEmpty+a.oLanguage.sInfoPostFix:a.fnRecordsDisplay()===0?a.oLanguage.sInfoEmpty+" "+a.oLanguage.sInfoFiltered.replace("_MAX_",h)+a.oLanguage.sInfoPostFix:a.fnRecordsDisplay()==a.fnRecordsTotal()?a.oLanguage.sInfo.replace("_START_",f).replace("_END_",g).replace("_TOTAL_",j)+a.oLanguage.sInfoPostFix:a.oLanguage.sInfo.replace("_START_",f).replace("_END_",g).replace("_TOTAL_",j)+" "+a.oLanguage.sInfoFiltered.replace("_MAX_",a.fnFormatNumber(a.fnRecordsTotal()))+a.oLanguage.sInfoPostFix,a.oLanguage.fnInfoCallback!==null&&(f=a.oLanguage.fnInfoCallback(a,b,c,d,e,f)),a=a.aanFeatures.i,b=0;for(c=a.length;b<c;b++)i(a[b]).html(f)}}function Ga(a){if(a.oScroll.bInfinite)return null;var b='<select size="1" '+(a.sTableId===""?"":'name="'+a.sTableId+'_length"')+">",c,d;if(a.aLengthMenu.length==2&&typeof a.aLengthMenu[0]=="object"&&typeof a.aLengthMenu[1]=="object"){c=0;for(d=a.aLengthMenu[0].length;c<d;c++)b+='<option value="'+a.aLengthMenu[0][c]+'">'+a.aLengthMenu[1][c]+"</option>"}else{c=0;for(d=a.aLengthMenu.length;c<d;c++)b+='<option value="'+a.aLengthMenu[c]+'">'+a.aLengthMenu[c]+"</option>"}b+="</select>";var e=p.createElement("div");return a.sTableId!==""&&typeof a.aanFeatures.l=="undefined"&&e.setAttribute("id",a.sTableId+"_length"),e.className=a.oClasses.sLength,e.innerHTML="<label>"+a.oLanguage.sLengthMenu.replace("_MENU_",b)+"</label>",i('select option[value="'+a._iDisplayLength+'"]',e).attr("selected",!0),i("select",e).bind("change.DT",function(){var b=i(this).val(),e=a.aanFeatures.l;c=0;for(d=e.length;c<d;c++)e[c]!=this.parentNode&&i("select",e[c]).val(b);a._iDisplayLength=parseInt(b,10),E(a),a.fnDisplayEnd()==a.fnRecordsDisplay()&&(a._iDisplayStart=a.fnDisplayEnd()-a._iDisplayLength,a._iDisplayStart<0&&(a._iDisplayStart=0)),a._iDisplayLength==-1&&(a._iDisplayStart=0),C(a)}),e}function Ia(a){var b=p.createElement("div");return a.sTableId!==""&&typeof a.aanFeatures.r=="undefined"&&b.setAttribute("id",a.sTableId+"_processing"),b.innerHTML=a.oLanguage.sProcessing,b.className=a.oClasses.sProcessing,a.nTable.parentNode.insertBefore(b,a.nTable),b}function K(a,b){if(a.oFeatures.bProcessing){a=a.aanFeatures.r;for(var c=0,d=a.length;c<d;c++)a[c].style.visibility=b?"visible":"hidden"}}function Na(a,b){for(var c=-1,d=0;d<a.aoColumns.length;d++){a.aoColumns[d].bVisible===!0&&c++;if(c==b)return d}return null}function ta(a,b){for(var c=-1,d=0;d<a.aoColumns.length;d++){a.aoColumns[d].bVisible===!0&&c++;if(d==b)return a.aoColumns[d].bVisible===!0?c:null}return null}function W(a,b){var c,d;c=a._iDisplayStart;for(d=a._iDisplayEnd;c<d;c++)if(a.aoData[a.aiDisplay[c]].nTr==b)return a.aiDisplay[c];c=0;for(d=a.aoData.length;c<d;c++)if(a.aoData[c].nTr==b)return c;return null}function Z(a){for(var b=0,c=0;c<a.aoColumns.length;c++)a.aoColumns[c].bVisible===!0&&b++;return b}function E(a){a._iDisplayEnd=a.oFeatures.bPaginate===!1?a.aiDisplay.length:a._iDisplayStart+a._iDisplayLength>a.aiDisplay.length||a._iDisplayLength==-1?a.aiDisplay.length:a._iDisplayStart+a._iDisplayLength}function Sa(a,b){if(!a||a===null||a==="")return 0;typeof b=="undefined"&&(b=p.getElementsByTagName("body")[0]);var c=p.createElement("div");return c.style.width=q(a),b.appendChild(c),a=c.offsetWidth,b.removeChild(c),a}function ga(a){var b=0,c,d=0,e=a.aoColumns.length,f,g=i("th",a.nTHead);for(f=0;f<e;f++)a.aoColumns[f].bVisible&&(d++,a.aoColumns[f].sWidth!==null&&(c=Sa(a.aoColumns[f].sWidthOrig,a.nTable.parentNode),c!==null&&(a.aoColumns[f].sWidth=q(c)),b++));if(e==g.length&&b===0&&d==e&&a.oScroll.sX===""&&a.oScroll.sY==="")for(f=0;f<a.aoColumns.length;f++)c=i(g[f]).width(),c!==null&&(a.aoColumns[f].sWidth=q(c));else{b=a.nTable.cloneNode(!1),f=a.nTHead.cloneNode(!0),d=p.createElement("tbody"),c=p.createElement("tr"),b.removeAttribute("id"),b.appendChild(f),a.nTFoot!==null&&(b.appendChild(a.nTFoot.cloneNode(!0)),P(function(a){a.style.width=""},b.getElementsByTagName("tr"))),b.appendChild(d),d.appendChild(c),d=i("thead th",b),d.length===0&&(d=i("tbody tr:eq(0)>td",b)),g=S(a,f);for(f=d=0;f<e;f++){var h=a.aoColumns[f];h.bVisible&&h.sWidthOrig!==null&&h.sWidthOrig!==""?g[f-d].style.width=q(h.sWidthOrig):h.bVisible?g[f-d].style.width="":d++}for(f=0;f<e;f++)a.aoColumns[f].bVisible&&(d=Ta(a,f),d!==null&&(d=d.cloneNode(!0),a.aoColumns[f].sContentPadding!==""&&(d.innerHTML+=a.aoColumns[f].sContentPadding),c.appendChild(d)));e=a.nTable.parentNode,e.appendChild(b),a.oScroll.sX!==""&&a.oScroll.sXInner!==""?b.style.width=q(a.oScroll.sXInner):a.oScroll.sX!==""?(b.style.width="",i(b).width()<e.offsetWidth&&(b.style.width=q(e.offsetWidth))):a.oScroll.sY!==""&&(b.style.width=q(e.offsetWidth)),b.style.visibility="hidden",Ua(a,b),e=i("tbody tr:eq(0)",b).children(),e.length===0&&(e=S(a,i("thead",b)[0]));if(a.oScroll.sX!==""){for(f=d=c=0;f<a.aoColumns.length;f++)a.aoColumns[f].bVisible&&(c+=a.aoColumns[f].sWidthOrig===null?i(e[d]).outerWidth():parseInt(a.aoColumns[f].sWidth.replace("px",""),10)+(i(e[d]).outerWidth()-i(e[d]).width()),d++);b.style.width=q(c),a.nTable.style.width=q(c)}for(f=d=0;f<a.aoColumns.length;f++)a.aoColumns[f].bVisible&&(c=i(e[d]).width(),c!==null&&c>0&&(a.aoColumns[f].sWidth=q(c)),d++);a.nTable.style.width=q(i(b).outerWidth()),b.parentNode.removeChild(b)}}function Ua(a,b){a.oScroll.sX===""&&a.oScroll.sY!==""?(i(b).width(),b.style.width=q(i(b).outerWidth()-a.oScroll.iBarWidth)):a.oScroll.sX!==""&&(b.style.width=q(i(b).outerWidth()))}function Ta(a,b){var c=Va(a,b);if(c<0)return null;if(a.aoData[c].nTr===null){var d=p.createElement("td");return d.innerHTML=G(a,c,b,""),d}return Q(a,c)[b]}function Va(a,b){for(var c=-1,d=-1,e=0;e<a.aoData.length;e++){var f=G(a,e,b,"display")+"";f=f.replace(/<.*?>/g,""),f.length>c&&(c=f.length,d=e)}return d}function q(a){if(a===null)return"0px";if(typeof a=="number")return a<0?"0px":a+"px";var b=a.charCodeAt(a.length-1);return b<48||b>57?a:a+"px"}function Za(a,b){if(a.length!=b.length)return 1;for(var c=0;c<a.length;c++)if(a[c]!=b[c])return 2;return 0}function ia(a){for(var b=n.aTypes,c=b.length,d=0;d<c;d++){var e=b[d](a);if(e!==null)return e}return"string"}function A(a){for(var b=0;b<D.length;b++)if(D[b].nTable==a)return D[b];return null}function ca(a){for(var b=[],c=a.aoData.length,d=0;d<c;d++)b.push(a.aoData[d]._aData);return b}function ba(a){for(var b=[],c=0,d=a.aoData.length;c<d;c++)a.aoData[c].nTr!==null&&b.push(a.aoData[c].nTr);return b}function Q(a,b){var c=[],d,e,f,g,h;e=0;var i=a.aoData.length;typeof b!="undefined"&&(e=b,i=b+1);for(e=e;e<i;e++){h=a.aoData[e];if(h.nTr!==null){b=[],f=0;for(g=h.nTr.childNodes.length;f<g;f++)d=h.nTr.childNodes[f].nodeName.toLowerCase(),(d=="td"||d=="th")&&b.push(h.nTr.childNodes[f]);f=d=0;for(g=a.aoColumns.length;f<g;f++)a.aoColumns[f].bVisible?c.push(b[f-d]):(c.push(h._anHidden[f]),d++)}}return c}function sa(a){return a.replace(new RegExp("(\\/|\\.|\\*|\\+|\\?|\\||\\(|\\)|\\[|\\]|\\{|\\}|\\\\|\\$|\\^)","g"),"\\$1")}function ua(a,b){for(var c=-1,d=0,e=a.length;d<e;d++)a[d]==b?c=d:a[d]>b&&a[d]--;c!=-1&&a.splice(c,1)}function Fa(a,b){b=b.split(",");for(var c=[],d=0,e=a.aoColumns.length;d<e;d++)for(var f=0;f<e;f++)if(a.aoColumns[d].sName==b[f]){c.push(f);break}return c}function ka(a){for(var b="",c=0,d=a.aoColumns.length;c<d;c++)b+=a.aoColumns[c].sName+",";return b.length==d?"":b.slice(0,-1)}function J(a,b,c){a=a.sTableId===""?"DataTables warning: "+c:"DataTables warning (table id = '"+a.sTableId+"'): "+c;if(b===0)if(n.sErrMode=="alert")alert(a);else throw a;else typeof console!="undefined"&&typeof console.log!="undefined"&&console.log(a)}function la(a){a.aoData.splice(0,a.aoData.length),a.aiDisplayMaster.splice(0,a.aiDisplayMaster.length),a.aiDisplay.splice(0,a.aiDisplay.length),E(a)}function va(a){if(!!a.oFeatures.bStateSave&&typeof a.bDestroying=="undefined"){var b,c,d,e="{";e+='"iCreate":'+(new Date).getTime()+",",e+='"iStart":'+(a.oScroll.bInfinite?0:a._iDisplayStart)+",",e+='"iEnd":'+(a.oScroll.bInfinite?a._iDisplayLength:a._iDisplayEnd)+",",e+='"iLength":'+a._iDisplayLength+",",e+='"sFilter":"'+encodeURIComponent(a.oPreviousSearch.sSearch)+'",',e+='"sFilterEsc":'+!a.oPreviousSearch.bRegex+",",e+='"aaSorting":[ ';for(b=0;b<a.aaSorting.length;b++)e+="["+a.aaSorting[b][0]+',"'+a.aaSorting[b][1]+'"],';e=e.substring(0,e.length-1),e+="],",e+='"aaSearchCols":[ ';for(b=0;b<a.aoPreSearchCols.length;b++)e+='["'+encodeURIComponent(a.aoPreSearchCols[b].sSearch)+'",'+!a.aoPreSearchCols[b].bRegex+"],";e=e.substring(0,e.length-1),e+="],",e+='"abVisCols":[ ';for(b=0;b<a.aoColumns.length;b++)e+=a.aoColumns[b].bVisible+",";e=e.substring(0,e.length-1),e+="]",b=0;for(c=a.aoStateSave.length;b<c;b++)d=a.aoStateSave[b].fn(a,e),d!==""&&(e=d);e+="}",Wa(a.sCookiePrefix+a.sInstance,e,a.iCookieDuration,a.sCookiePrefix,a.fnCookieCallback)}}function Xa(a,b){if(a.oFeatures.bStateSave){var c,d,f;d=wa(a.sCookiePrefix+a.sInstance);if(d!==null&&d!==""){try{c=typeof i.parseJSON=="function"?i.parseJSON(d.replace(/'/g,'"')):eval("("+d+")")}catch(e){return}d=0;for(f=a.aoStateLoad.length;d<f;d++)if(!a.aoStateLoad[d].fn(a,c))return;a.oLoadedState=i.extend(!0,{},c),a._iDisplayStart=c.iStart,a.iInitDisplayStart=c.iStart,a._iDisplayEnd=c.iEnd,a._iDisplayLength=c.iLength,a.oPreviousSearch.sSearch=decodeURIComponent(c.sFilter),a.aaSorting=c.aaSorting.slice(),a.saved_aaSorting=c.aaSorting.slice(),typeof c.sFilterEsc!="undefined"&&(a.oPreviousSearch.bRegex=!c.sFilterEsc);if(typeof c.aaSearchCols!="undefined")for(d=0;d<c.aaSearchCols.length;d++)a.aoPreSearchCols[d]={sSearch:decodeURIComponent(c.aaSearchCols[d][0]),bRegex:!c.aaSearchCols[d][1]};if(typeof c.abVisCols!="undefined"){b.saved_aoColumns=[];for(d=0;d<c.abVisCols.length;d++)b.saved_aoColumns[d]={},b.saved_aoColumns[d].bVisible=c.abVisCols[d]}}}}function Wa(a,b,c,d,f){var e=new Date;e.setTime(e.getTime()+c*1e3),c=za.location.pathname.split("/"),a=a+"_"+c.pop().replace(/[\/:]/g,"").toLowerCase();var h;f!==null?(h=typeof i.parseJSON=="function"?i.parseJSON(b):eval("("+b+")"),b=f(a,h,e.toGMTString(),c.join("/")+"/")):b=a+"="+encodeURIComponent(b)+"; expires="+e.toGMTString()+"; path="+c.join("/")+"/",f="",e=9999999999999;if((wa(a)!==null?p.cookie.length:b.length+p.cookie.length)+10>4096){a=p.cookie.split(";");for(var j=0,k=a.length;j<k;j++)if(a[j].indexOf(d)!=-1){var m=a[j].split("=");try{h=eval("("+decodeURIComponent(m[1])+")")}catch(u){continue}typeof h.iCreate!="undefined"&&h.iCreate<e&&(f=m[0],e=h.iCreate)}f!==""&&(p.cookie=f+"=; expires=Thu, 01-Jan-1970 00:00:01 GMT; path="+c.join("/")+"/")}p.cookie=b}function wa(a){var b=za.location.pathname.split("/");a=a+"_"+b[b.length-1].replace(/[\/:]/g,"").toLowerCase()+"=",b=p.cookie.split(";");for(var c=0;c<b.length;c++){for(var d=b[c];d.charAt(0)==" ";)d=d.substring(1,d.length);if(d.indexOf(a)===0)return decodeURIComponent(d.substring(a.length,d.length))}return null}function Y(a,b){b=i(b).children("tr");var c,d,e,f,g,h,j,k,l=function(a,b,c){for(;typeof a[b][c]!="undefined";)c++;return c};a.splice(0,a.length),d=0;for(h=b.length;d<h;d++)a.push([]);d=0;for(h=b.length;d<h;d++){e=0;for(j=b[d].childNodes.length;e<j;e++){c=b[d].childNodes[e];if(c.nodeName.toUpperCase()=="TD"||c.nodeName.toUpperCase()=="TH"){var m=c.getAttribute("colspan")*1,n=c.getAttribute("rowspan")*1;m=!m||m===0||m===1?1:m,n=!n||n===0||n===1?1:n,k=l(a,d,0);for(g=0;g<m;g++)for(f=0;f<n;f++)a[d+f][k+g]={cell:c,unique:m==1?!0:!1},a[d+f].nTr=b[d]}}}}function S(a,b,c){var d=[];typeof c=="undefined"&&(c=a.aoHeader,typeof b!="undefined"&&(c=[],Y(c,b))),b=0;for(var e=c.length;b<e;b++)for(var f=0,g=c[b].length;f<g;f++)c[b][f].unique&&(typeof d[f]=="undefined"||!a.bSortCellsTop)&&(d[f]=c[b][f].cell);return d}function Ya(){var a=p.createElement("p"),b=a.style;b.width="100%",b.height="200px",b.padding="0px";var c=p.createElement("div");return b=c.style,b.position="absolute",b.top="0px",b.left="0px",b.visibility="hidden",b.width="200px",b.height="150px",b.padding="0px",b.overflow="hidden",c.appendChild(a),p.body.appendChild(c),b=a.offsetWidth,c.style.overflow="scroll",a=a.offsetWidth,b==a&&(a=c.clientWidth),p.body.removeChild(c),b-a}function P(a,b,c){for(var d=0,e=b.length;d<e;d++)for(var f=0,g=b[d].childNodes.length;f<g;f++)b[d].childNodes[f].nodeType==1&&(typeof c!="undefined"?a(b[d].childNodes[f],c[d].childNodes[f]):a(b[d].childNodes[f]))}function o(a,b,c,d){typeof d=="undefined"&&(d=c),typeof b[c]!="undefined"&&(a[d]=b[c])}function fa(a,b,c){for(var d=[],e=0,f=a.aoColumns.length;e<f;e++)d.push(G(a,b,e,c));return d}function G(a,b,c,d){var e=a.aoColumns[c];if((c=e.fnGetData(a.aoData[b]._aData))===undefined)return a.iDrawError!=a.iDraw&&e.sDefaultContent===null&&(J(a,0,"Requested unknown parameter '"+e.mDataProp+"' from the data source for row "+b),a.iDrawError=a.iDraw),e.sDefaultContent;if(c===null&&e.sDefaultContent!==null)c=e.sDefaultContent;else if(typeof c=="function")return c();return d=="display"&&c===null?"":c}function O(a,b,c,d){a.aoColumns[c].fnSetData(a.aoData[b]._aData,d)}function aa(a){if(a===null)return function(){return null};if(typeof a=="function")return function(b){return a(b)};if(typeof a=="string"&&a.indexOf(".")!=-1){var b=a.split(".");return b.length==2?function(a){return a[b[0]][b[1]]}:b.length==3?function(a){return a[b[0]][b[1]][b[2]]}:function(a){for(var c=0,d=b.length;c<d;c++)a=a[b[c]];return a}}return function(b){return b[a]}}function Ba(a){if(a===null)return function(){};if(typeof a=="function")return function(b,c){return a(b,c)};if(typeof a=="string"&&a.indexOf(".")!=-1){var b=a.split(".");return b.length==2?function(a,c){a[b[0]][b[1]]=c}:b.length==3?function(a,c){a[b[0]][b[1]][b[2]]=c}:function(a,c){for(var d=0,e=b.length-1;d<e;d++)a=a[b[d]];a[b[b.length-1]]=c}}return function(b,c){b[a]=c}}this.oApi={},this.fnDraw=function(a){var b=A(this[n.iApiIndex]);typeof a!="undefined"&&a===!1?(E(b),C(b)):da(b)},this.fnFilter=function(a,b,c,d,e){var f=A(this[n.iApiIndex]);if(f.oFeatures
.bFilter){typeof c=="undefined"&&(c=!1),typeof d=="undefined"&&(d=!0),typeof e=="undefined"&&(e=!0);if(typeof b=="undefined"||b===null){N(f,{sSearch:a,bRegex:c,bSmart:d},1);if(e&&typeof f.aanFeatures.f!="undefined"){b=f.aanFeatures.f,c=0;for(d=b.length;c<d;c++)i("input",b[c]).val(a)}}else f.aoPreSearchCols[b].sSearch=a,f.aoPreSearchCols[b].bRegex=c,f.aoPreSearchCols[b].bSmart=d,N(f,f.oPreviousSearch,1)}},this.fnSettings=function(){return A(this[n.iApiIndex])},this.fnVersionCheck=n.fnVersionCheck,this.fnSort=function(a){var b=A(this[n.iApiIndex]);b.aaSorting=a,R(b)},this.fnSortListener=function(a,b,c){ja(A(this[n.iApiIndex]),a,b,c)},this.fnAddData=function(a,b){if(a.length===0)return[];var c=[],d,e=A(this[n.iApiIndex]);if(typeof a[0]=="object")for(var f=0;f<a.length;f++){d=v(e,a[f]);if(d==-1)return c;c.push(d)}else{d=v(e,a);if(d==-1)return c;c.push(d)}return e.aiDisplay=e.aiDisplayMaster.slice(),(typeof b=="undefined"||b)&&da(e),c},this.fnDeleteRow=function(a,b,c){var d=A(this[n.iApiIndex]);a=typeof a=="object"?W(d,a):a;var e=d.aoData.splice(a,1),f=i.inArray(a,d.aiDisplay);d.asDataSearch.splice(f,1),ua(d.aiDisplayMaster,a),ua(d.aiDisplay,a),typeof b=="function"&&b.call(this,d,e),d._iDisplayStart>=d.aiDisplay.length&&(d._iDisplayStart-=d._iDisplayLength,d._iDisplayStart<0&&(d._iDisplayStart=0));if(typeof c=="undefined"||c)E(d),C(d);return e},this.fnClearTable=function(a){var b=A(this[n.iApiIndex]);la(b),(typeof a=="undefined"||a)&&C(b)},this.fnOpen=function(a,b,c){var d=A(this[n.iApiIndex]);this.fnClose(a);var e=p.createElement("tr"),f=p.createElement("td");return e.appendChild(f),f.className=c,f.colSpan=Z(d),typeof b.jquery!="undefined"||typeof b=="object"?f.appendChild(b):f.innerHTML=b,b=i("tr",d.nTBody),i.inArray(a,b)!=-1&&i(e).insertAfter(a),d.aoOpenRows.push({nTr:e,nParent:a}),e},this.fnClose=function(a){for(var b=A(this[n.iApiIndex]),c=0;c<b.aoOpenRows.length;c++)if(b.aoOpenRows[c].nParent==a)return(a=b.aoOpenRows[c].nTr.parentNode)&&a.removeChild(b.aoOpenRows[c].nTr),b.aoOpenRows.splice(c,1),0;return 1},this.fnGetData=function(a,b){var c=A(this[n.iApiIndex]);return typeof a!="undefined"?(a=typeof a=="object"?W(c,a):a,typeof b!="undefined"?G(c,a,b,""):typeof c.aoData[a]!="undefined"?c.aoData[a]._aData:null):ca(c)},this.fnGetNodes=function(a){var b=A(this[n.iApiIndex]);return typeof a!="undefined"?typeof b.aoData[a]!="undefined"?b.aoData[a].nTr:null:ba(b)},this.fnGetPosition=function(a){var b=A(this[n.iApiIndex]),c=a.nodeName.toUpperCase();if(c=="TR")return W(b,a);if(c=="TD"||c=="TH"){c=W(b,a.parentNode);for(var d=Q(b,c),e=0;e<b.aoColumns.length;e++)if(d[e]==a)return[c,ta(b,e),e]}return null},this.fnUpdate=function(a,b,c,d,e){var f=A(this[n.iApiIndex]);b=typeof b=="object"?W(f,b):b;if(i.isArray(a)&&typeof a=="object"){f.aoData[b]._aData=a.slice();for(c=0;c<f.aoColumns.length;c++)this.fnUpdate(G(f,b,c),b,c,!1,!1)}else if(a!==null&&typeof a=="object"){f.aoData[b]._aData=i.extend(!0,{},a);for(c=0;c<f.aoColumns.length;c++)this.fnUpdate(G(f,b,c),b,c,!1,!1)}else a=a,O(f,b,c,a),f.aoColumns[c].fnRender!==null&&(a=f.aoColumns[c].fnRender({iDataRow:b,iDataColumn:c,aData:f.aoData[b]._aData,oSettings:f}),f.aoColumns[c].bUseRendered&&O(f,b,c,a)),f.aoData[b].nTr!==null&&(Q(f,b)[c].innerHTML=a);return c=i.inArray(b,f.aiDisplay),f.asDataSearch[c]=ra(f,fa(f,b,"filter")),(typeof e=="undefined"||e)&&ea(f),(typeof d=="undefined"||d)&&da(f),0},this.fnSetColumnVis=function(a,b,c){var d=A(this[n.iApiIndex]),e,f;f=d.aoColumns.length;var g,h;if(d.aoColumns[a].bVisible!=b){if(b){for(e=h=0;e<a;e++)d.aoColumns[e].bVisible&&h++;h=h>=Z(d);if(!h)for(e=a;e<f;e++)if(d.aoColumns[e].bVisible){g=e;break}e=0;for(f=d.aoData.length;e<f;e++)d.aoData[e].nTr!==null&&(h?d.aoData[e].nTr.appendChild(d.aoData[e]._anHidden[a]):d.aoData[e].nTr.insertBefore(d.aoData[e]._anHidden[a],Q(d,e)[g]))}else{e=0;for(f=d.aoData.length;e<f;e++)d.aoData[e].nTr!==null&&(g=Q(d,e)[a],d.aoData[e]._anHidden[a]=g,g.parentNode.removeChild(g))}d.aoColumns[a].bVisible=b,M(d,d.aoHeader),d.nTFoot&&M(d,d.aoFooter),e=0;for(f=d.aoOpenRows.length;e<f;e++)d.aoOpenRows[e].nTr.colSpan=Z(d);if(typeof c=="undefined"||c)ea(d),C(d);va(d)}},this.fnPageChange=function(a,b){var c=A(this[n.iApiIndex]);ma(c,a),E(c),(typeof b=="undefined"||b)&&C(c)},this.fnDestroy=function(){var a=A(this[n.iApiIndex]),b=a.nTableWrapper.parentNode,c=a.nTBody,d,e;a.bDestroying=!0,d=0;for(e=a.aoDestroyCallback.length;d<e;d++)a.aoDestroyCallback[d].fn();d=0;for(e=a.aoColumns.length;d<e;d++)a.aoColumns[d].bVisible===!1&&this.fnSetColumnVis(d,!0);i(a.nTableWrapper).find("*").andSelf().unbind(".DT"),i("tbody>tr>td."+a.oClasses.sRowEmpty,a.nTable).parent().remove(),a.nTable!=a.nTHead.parentNode&&(i(a.nTable).children("thead").remove(),a.nTable.appendChild(a.nTHead)),a.nTFoot&&a.nTable!=a.nTFoot.parentNode&&(i(a.nTable).children("tfoot").remove(),a.nTable.appendChild(a.nTFoot)),a.nTable.parentNode.removeChild(a.nTable),i(a.nTableWrapper).remove(),a.aaSorting=[],a.aaSortingFixed=[],V(a),i(ba(a)).removeClass(a.asStripeClasses.join(" ")),a.bJUI?(i("th",a.nTHead).removeClass([n.oStdClasses.sSortable,n.oJUIClasses.sSortableAsc,n.oJUIClasses.sSortableDesc,n.oJUIClasses.sSortableNone].join(" ")),i("th span."+n.oJUIClasses.sSortIcon,a.nTHead).remove(),i("th",a.nTHead).each(function(){var a=i("div."+n.oJUIClasses.sSortJUIWrapper,this),b=a.contents();i(this).append(b),a.remove()})):i("th",a.nTHead).removeClass([n.oStdClasses.sSortable,n.oStdClasses.sSortableAsc,n.oStdClasses.sSortableDesc,n.oStdClasses.sSortableNone].join(" ")),a.nTableReinsertBefore?b.insertBefore(a.nTable,a.nTableReinsertBefore):b.appendChild(a.nTable),d=0;for(e=a.aoData.length;d<e;d++)a.aoData[d].nTr!==null&&c.appendChild(a.aoData[d].nTr);a.oFeatures.bAutoWidth===!0&&(a.nTable.style.width=q(a.sDestroyWidth)),i(c).children("tr:even").addClass(a.asDestroyStripes[0]),i(c).children("tr:odd").addClass(a.asDestroyStripes[1]),d=0;for(e=D.length;d<e;d++)D[d]==a&&D.splice(d,1);a=null},this.fnAdjustColumnSizing=function(a){var b=A(this[n.iApiIndex]);ea(b),typeof a=="undefined"||a?this.fnDraw(!1):(b.oScroll.sX!==""||b.oScroll.sY!=="")&&this.oApi._fnScrollDraw(b)};for(var xa in n.oApi)xa&&(this[xa]=s(xa));this.oApi._fnExternApiFunc=s,this.oApi._fnInitialise=t,this.oApi._fnInitComplete=w,this.oApi._fnLanguageProcess=y,this.oApi._fnAddColumn=F,this.oApi._fnColumnOptions=x,this.oApi._fnAddData=v,this.oApi._fnCreateTr=z,this.oApi._fnGatherData=$,this.oApi._fnBuildHead=X,this.oApi._fnDrawHead=M,this.oApi._fnDraw=C,this.oApi._fnReDraw=da,this.oApi._fnAjaxUpdate=Ca,this.oApi._fnAjaxParameters=Da,this.oApi._fnAjaxUpdateDraw=Ea,this.oApi._fnServerParams=ha,this.oApi._fnAddOptionsHtml=Aa,this.oApi._fnFeatureHtmlTable=Ja,this.oApi._fnScrollDraw=Ma,this.oApi._fnAdjustColumnSizing=ea,this.oApi._fnFeatureHtmlFilter=Ha,this.oApi._fnFilterComplete=N,this.oApi._fnFilterCustom=Qa,this.oApi._fnFilterColumn=Pa,this.oApi._fnFilter=Oa,this.oApi._fnBuildSearchArray=oa,this.oApi._fnBuildSearchRow=ra,this.oApi._fnFilterCreateSearch=pa,this.oApi._fnDataToSearch=qa,this.oApi._fnSort=R,this.oApi._fnSortAttachListener=ja,this.oApi._fnSortingClasses=V,this.oApi._fnFeatureHtmlPaginate=La,this.oApi._fnPageChange=ma,this.oApi._fnFeatureHtmlInfo=Ka,this.oApi._fnUpdateInfo=Ra,this.oApi._fnFeatureHtmlLength=Ga,this.oApi._fnFeatureHtmlProcessing=Ia,this.oApi._fnProcessingDisplay=K,this.oApi._fnVisibleToColumnIndex=Na,this.oApi._fnColumnIndexToVisible=ta,this.oApi._fnNodeToDataIndex=W,this.oApi._fnVisbleColumns=Z,this.oApi._fnCalculateEnd=E,this.oApi._fnConvertToWidth=Sa,this.oApi._fnCalculateColumnWidths=ga,this.oApi._fnScrollingWidthAdjust=Ua,this.oApi._fnGetWidestNode=Ta,this.oApi._fnGetMaxLenString=Va,this.oApi._fnStringToCss=q,this.oApi._fnArrayCmp=Za,this.oApi._fnDetectType=ia,this.oApi._fnSettingsFromNode=A,this.oApi._fnGetDataMaster=ca,this.oApi._fnGetTrNodes=ba,this.oApi._fnGetTdNodes=Q,this.oApi._fnEscapeRegex=sa,this.oApi._fnDeleteIndex=ua,this.oApi._fnReOrderIndex=Fa,this.oApi._fnColumnOrdering=ka,this.oApi._fnLog=J,this.oApi._fnClearTable=la,this.oApi._fnSaveState=va,this.oApi._fnLoadState=Xa,this.oApi._fnCreateCookie=Wa,this.oApi._fnReadCookie=wa,this.oApi._fnDetectHeader=Y,this.oApi._fnGetUniqueThs=S,this.oApi._fnScrollBarWidth=Ya,this.oApi._fnApplyToChildren=P,this.oApi._fnMap=o,this.oApi._fnGetRowData=fa,this.oApi._fnGetCellData=G,this.oApi._fnSetCellData=O,this.oApi._fnGetObjectDataFn=aa,this.oApi._fnSetObjectDataFn=Ba;var ya=this;return this.each(function(){var a=0,b,c,d,e;a=0;for(b=D.length;a<b;a++){if(D[a].nTable==this){if(typeof g=="undefined"||typeof g.bRetrieve!="undefined"&&g.bRetrieve===!0)return D[a].oInstance;if(typeof g.bDestroy!="undefined"&&g.bDestroy===!0){D[a].oInstance.fnDestroy();break}J(D[a],0,"Cannot reinitialise DataTable.\n\nTo retrieve the DataTables object for this table, please pass either no arguments to the dataTable() function, or set bRetrieve to true. Alternatively, to destory the old table and create a new one, set bDestroy to true (note that a lot of changes to the configuration can be made through the API which is usually much faster).");return}if(D[a].sTableId!==""&&D[a].sTableId==this.getAttribute("id")){D.splice(a,1);break}}var f=new l;D.push(f);var h=!1,j=!1;a=this.getAttribute("id"),a!==null?(f.sTableId=a,f.sInstance=a):f.sInstance=n._oExternConfig.iNextUnique++;if(this.nodeName.toLowerCase()!="table")J(f,0,"Attempted to initialise DataTables on a node which is not a table: "+this.nodeName);else{f.nTable=this,f.oInstance=ya.length==1?ya:i(this).dataTable(),f.oApi=ya.oApi,f.sDestroyWidth=i(this).width();if(typeof g!="undefined"&&g!==null){f.oInit=g,o(f.oFeatures,g,"bPaginate"),o(f.oFeatures,g,"bLengthChange"),o(f.oFeatures,g,"bFilter"),o(f.oFeatures,g,"bSort"),o(f.oFeatures,g,"bInfo"),o(f.oFeatures,g,"bProcessing"),o(f.oFeatures,g,"bAutoWidth"),o(f.oFeatures,g,"bSortClasses"),o(f.oFeatures,g,"bServerSide"),o(f.oFeatures,g,"bDeferRender"),o(f.oScroll,g,"sScrollX","sX"),o(f.oScroll,g,"sScrollXInner","sXInner"),o(f.oScroll,g,"sScrollY","sY"),o(f.oScroll,g,"bScrollCollapse","bCollapse"),o(f.oScroll,g,"bScrollInfinite","bInfinite"),o(f.oScroll,g,"iScrollLoadGap","iLoadGap"),o(f.oScroll,g,"bScrollAutoCss","bAutoCss"),o(f,g,"asStripClasses","asStripeClasses"),o(f,g,"asStripeClasses"),o(f,g,"fnPreDrawCallback"),o(f,g,"fnRowCallback"),o(f,g,"fnHeaderCallback"),o(f,g,"fnFooterCallback"),o(f,g,"fnCookieCallback"),o(f,g,"fnInitComplete"),o(f,g,"fnServerData"),o(f,g,"fnFormatNumber"),o(f,g,"aaSorting"),o(f,g,"aaSortingFixed"),o(f,g,"aLengthMenu"),o(f,g,"sPaginationType"),o(f,g,"sAjaxSource"),o(f,g,"sAjaxDataProp"),o(f,g,"iCookieDuration"),o(f,g,"sCookiePrefix"),o(f,g,"sDom"),o(f,g,"bSortCellsTop"),o(f,g,"oSearch","oPreviousSearch"),o(f,g,"aoSearchCols","aoPreSearchCols"),o(f,g,"iDisplayLength","_iDisplayLength"),o(f,g,"bJQueryUI","bJUI"),o(f.oLanguage,g,"fnInfoCallback"),typeof g.fnDrawCallback=="function"&&f.aoDrawCallback.push({fn:g.fnDrawCallback,sName:"user"}),typeof g.fnServerParams=="function"&&f.aoServerParams.push({fn:g.fnServerParams,sName:"user"}),typeof g.fnStateSaveCallback=="function"&&f.aoStateSave.push({fn:g.fnStateSaveCallback,sName:"user"}),typeof g.fnStateLoadCallback=="function"&&f.aoStateLoad.push({fn:g.fnStateLoadCallback,sName:"user"}),f.oFeatures.bServerSide&&f.oFeatures.bSort&&f.oFeatures.bSortClasses?f.aoDrawCallback.push({fn:V,sName:"server_side_sort_classes"}):f.oFeatures.bDeferRender&&f.aoDrawCallback.push({fn:V,sName:"defer_sort_classes"}),typeof g.bJQueryUI!="undefined"&&g.bJQueryUI&&(f.oClasses=n.oJUIClasses,typeof g.sDom=="undefined"&&(f.sDom='<"H"lfr>t<"F"ip>'));if(f.oScroll.sX!==""||f.oScroll.sY!=="")f.oScroll.iBarWidth=Ya();typeof g.iDisplayStart!="undefined"&&typeof f.iInitDisplayStart=="undefined"&&(f.iInitDisplayStart=g.iDisplayStart,f._iDisplayStart=g.iDisplayStart),typeof g.bStateSave!="undefined"&&(f.oFeatures.bStateSave=g.bStateSave,Xa(f,g),f.aoDrawCallback.push({fn:va,sName:"state_save"})),typeof g.iDeferLoading!="undefined"&&(f.bDeferLoading=!0,f._iRecordsTotal=g.iDeferLoading,f._iRecordsDisplay=g.iDeferLoading),typeof g.aaData!="undefined"&&(j=!0),typeof g!="undefined"&&typeof g.aoData!="undefined"&&(g.aoColumns=g.aoData),typeof g.oLanguage!="undefined"&&(typeof g.oLanguage.sUrl!="undefined"&&g.oLanguage.sUrl!==""?(f.oLanguage.sUrl=g.oLanguage.sUrl,i.getJSON(f.oLanguage.sUrl,null,function(a){y(f,a,!0)}),h=!0):y(f,g.oLanguage,!1))}else g={};typeof g.asStripClasses=="undefined"&&typeof g.asStripeClasses=="undefined"&&(f.asStripeClasses.push(f.oClasses.sStripeOdd),f.asStripeClasses.push(f.oClasses.sStripeEven)),c=!1,d=i(this).children("tbody").children("tr"),a=0;for(b=f.asStripeClasses.length;a<b;a++)if(d.filter(":lt(2)").hasClass(f.asStripeClasses[a])){c=!0;break}c&&(f.asDestroyStripes=["",""],i(d[0]).hasClass(f.oClasses.sStripeOdd)&&(f.asDestroyStripes[0]+=f.oClasses.sStripeOdd+" "),i(d[0]).hasClass(f.oClasses.sStripeEven)&&(f.asDestroyStripes[0]+=f.oClasses.sStripeEven),i(d[1]).hasClass(f.oClasses.sStripeOdd)&&(f.asDestroyStripes[1]+=f.oClasses.sStripeOdd+" "),i(d[1]).hasClass(f.oClasses.sStripeEven)&&(f.asDestroyStripes[1]+=f.oClasses.sStripeEven),d.removeClass(f.asStripeClasses.join(" "))),c=[];var k;a=this.getElementsByTagName("thead"),a.length!==0&&(Y(f.aoHeader,a[0]),c=S(f));if(typeof g.aoColumns=="undefined"){k=[],a=0;for(b=c.length;a<b;a++)k.push(null)}else k=g.aoColumns;a=0;for(b=k.length;a<b;a++)typeof g.saved_aoColumns!="undefined"&&g.saved_aoColumns.length==b&&(k[a]===null&&(k[a]={}),k[a].bVisible=g.saved_aoColumns[a].bVisible),F(f,c?c[a]:null);if(typeof g.aoColumnDefs!="undefined")for(a=g.aoColumnDefs.length-1;a>=0;a--){var m=g.aoColumnDefs[a].aTargets;i.isArray(m)||J(f,1,"aTargets must be an array of targets, not a "+typeof m),c=0;for(d=m.length;c<d;c++)if(typeof m[c]=="number"&&m[c]>=0){for(;f.aoColumns.length<=m[c];)F(f);x(f,m[c],g.aoColumnDefs[a])}else if(typeof m[c]=="number"&&m[c]<0)x(f,f.aoColumns.length+m[c],g.aoColumnDefs[a]);else if(typeof m[c]=="string"){b=0;for(e=f.aoColumns.length;b<e;b++)(m[c]=="_all"||i(f.aoColumns[b].nTh).hasClass(m[c]))&&x(f,b,g.aoColumnDefs[a])}}if(typeof k!="undefined"){a=0;for(b=k.length;a<b;a++)x(f,a,k[a])}a=0;for(b=f.aaSorting.length;a<b;a++){f.aaSorting[a][0]>=f.aoColumns.length&&(f.aaSorting[a][0]=0),k=f.aoColumns[f.aaSorting[a][0]],typeof f.aaSorting[a][2]=="undefined"&&(f.aaSorting[a][2]=0),typeof g.aaSorting=="undefined"&&typeof f.saved_aaSorting=="undefined"&&(f.aaSorting[a][1]=k.asSorting[0]),c=0;for(d=k.asSorting.length;c<d;c++)if(f.aaSorting[a][1]==k.asSorting[c]){f.aaSorting[a][2]=c;break}}V(f),a=i(this).children("thead"),a.length===0&&(a=[p.createElement("thead")],this.appendChild(a[0])),f.nTHead=a[0],a=i(this).children("tbody"),a.length===0&&(a=[p.createElement("tbody")],this.appendChild(a[0])),f.nTBody=a[0],a=i(this).children("tfoot"),a.length>0&&(f.nTFoot=a[0],Y(f.aoFooter,f.nTFoot));if(j)for(a=0;a<g.aaData.length;a++)v(f,g.aaData[a]);else $(f);f.aiDisplay=f.aiDisplayMaster.slice(),f.bInitialised=!0,h===!1&&t(f)}})}}(jQuery,window,document),$(document).ready(function(){$(".detail-tabs").tabs(),$("input.date").live("click",function(){$(this).datepicker({showOn:"focus",dateFormat:"mm/dd/yy"}).focus()}),activeTab(),$("#help").click(function(){var a=$(this).hasClass("help-button-open");a==0?($(this).addClass("help-button-open"),$("#help-drop").slideDown("normal")):$("#help-drop").slideUp("normal",function(){$("#help").removeClass("help-button-open")})}),$(".chzn-select").chosen()}),$(function(){$("#detail-tabs").tabs(),$("#view-tabs").tabs({show:function(a,b){activeTab()}}),$("#view-carousel").jcarousel()})
