/* Arquivo: date.js */ /* * Date prototype extensions. Doesn't depend on any * other code. Doens't overwrite existing methods. * * Adds dayNames, abbrDayNames, monthNames and abbrMonthNames static properties and isLeapYear, * isWeekend, isWeekDay, getDaysInMonth, getDayName, getMonthName, getDayOfYear, getWeekOfYear, * setDayOfYear, addYears, addMonths, addDays, addHours, addMinutes, addSeconds methods * * Copyright (c) 2006 Jörn Zaefferer and Brandon Aaron (brandon.aaron@gmail.com || http://brandonaaron.net) * * Additional methods and properties added by Kelvin Luck: firstDayOfWeek, dateFormat, zeroTime, asString, fromString - * I've added my name to these methods so you know who to blame if they are broken! * * Dual licensed under the MIT and GPL licenses: * http://www.opensource.org/licenses/mit-license.php * http://www.gnu.org/licenses/gpl.html * */ /** * An Array of day names starting with Sunday. * * @example dayNames[0] * @result 'Sunday' * * @name dayNames * @type Array * @cat Plugins/Methods/Date */ Date.dayNames = ['Domingo', 'Segunda', 'Terça', 'Quarta', 'Quinta', 'Sexta', 'Sábado']; /** * An Array of abbreviated day names starting with Sun. * * @example abbrDayNames[0] * @result 'Sun' * * @name abbrDayNames * @type Array * @cat Plugins/Methods/Date */ Date.abbrDayNames = ['Dom', 'Seg', 'Ter', 'Qua', 'Qui', 'Sex', 'Sab']; /** * An Array of month names starting with Janurary. * * @example monthNames[0] * @result 'January' * * @name monthNames * @type Array * @cat Plugins/Methods/Date */ Date.monthNames = ['Janeiro', 'Fevereiro', 'Março', 'Abril', 'Maio', 'Junho', 'Julho', 'Agosto', 'Setembro', 'Outubro', 'Novembro', 'Dezembro']; /** * An Array of abbreviated month names starting with Jan. * * @example abbrMonthNames[0] * @result 'Jan' * * @name monthNames * @type Array * @cat Plugins/Methods/Date */ Date.abbrMonthNames = ['Jan', 'Fev', 'Mar', 'Abr', 'Mai', 'Jun', 'Jul', 'Ago', 'Set', 'Out', 'Nov', 'Dez']; /** * The first day of the week for this locale. * * @name firstDayOfWeek * @type Number * @cat Plugins/Methods/Date * @author Kelvin Luck */ Date.firstDayOfWeek = 1; /** * The format that string dates should be represented as (e.g. 'dd/mm/yyyy' for UK, 'mm/dd/yyyy' for US, 'yyyy-mm-dd' for Unicode etc). * * @name format * @type String * @cat Plugins/Methods/Date * @author Kelvin Luck */ Date.format = 'dd/mm/yyyy'; //Date.format = 'mm/dd/yyyy'; //Date.format = 'yyyy-mm-dd'; //Date.format = 'dd mmm yy'; /** * The first two numbers in the century to be used when decoding a two digit year. Since a two digit year is ambiguous (and date.setYear * only works with numbers < 99 and so doesn't allow you to set years after 2000) we need to use this to disambiguate the two digit year codes. * * @name format * @type String * @cat Plugins/Methods/Date * @author Kelvin Luck */ Date.fullYearStart = '20'; (function() { /** * Adds a given method under the given name * to the Date prototype if it doesn't * currently exist. * * @private */ function add(name, method) { if( !Date.prototype[name] ) { Date.prototype[name] = method; } }; /** * Checks if the year is a leap year. * * @example var dtm = new Date("01/12/2008"); * dtm.isLeapYear(); * @result true * * @name isLeapYear * @type Boolean * @cat Plugins/Methods/Date */ add("isLeapYear", function() { var y = this.getFullYear(); return (y%4==0 && y%100!=0) || y%400==0; }); /** * Checks if the day is a weekend day (Sat or Sun). * * @example var dtm = new Date("01/12/2008"); * dtm.isWeekend(); * @result false * * @name isWeekend * @type Boolean * @cat Plugins/Methods/Date */ add("isWeekend", function() { return this.getDay()==0 || this.getDay()==6; }); /** * Check if the day is a day of the week (Mon-Fri) * * @example var dtm = new Date("01/12/2008"); * dtm.isWeekDay(); * @result false * * @name isWeekDay * @type Boolean * @cat Plugins/Methods/Date */ add("isWeekDay", function() { return !this.isWeekend(); }); /** * Gets the number of days in the month. * * @example var dtm = new Date("01/12/2008"); * dtm.getDaysInMonth(); * @result 31 * * @name getDaysInMonth * @type Number * @cat Plugins/Methods/Date */ add("getDaysInMonth", function() { return [31,(this.isLeapYear() ? 29:28),31,30,31,30,31,31,30,31,30,31][this.getMonth()]; }); /** * Gets the name of the day. * * @example var dtm = new Date("01/12/2008"); * dtm.getDayName(); * @result 'Saturday' * * @example var dtm = new Date("01/12/2008"); * dtm.getDayName(true); * @result 'Sat' * * @param abbreviated Boolean When set to true the name will be abbreviated. * @name getDayName * @type String * @cat Plugins/Methods/Date */ add("getDayName", function(abbreviated) { return abbreviated ? Date.abbrDayNames[this.getDay()] : Date.dayNames[this.getDay()]; }); /** * Gets the name of the month. * * @example var dtm = new Date("01/12/2008"); * dtm.getMonthName(); * @result 'Janurary' * * @example var dtm = new Date("01/12/2008"); * dtm.getMonthName(true); * @result 'Jan' * * @param abbreviated Boolean When set to true the name will be abbreviated. * @name getDayName * @type String * @cat Plugins/Methods/Date */ add("getMonthName", function(abbreviated) { return abbreviated ? Date.abbrMonthNames[this.getMonth()] : Date.monthNames[this.getMonth()]; }); /** * Get the number of the day of the year. * * @example var dtm = new Date("01/12/2008"); * dtm.getDayOfYear(); * @result 11 * * @name getDayOfYear * @type Number * @cat Plugins/Methods/Date */ add("getDayOfYear", function() { var tmpdtm = new Date("1/1/" + this.getFullYear()); return Math.floor((this.getTime() - tmpdtm.getTime()) / 86400000); }); /** * Get the number of the week of the year. * * @example var dtm = new Date("01/12/2008"); * dtm.getWeekOfYear(); * @result 2 * * @name getWeekOfYear * @type Number * @cat Plugins/Methods/Date */ add("getWeekOfYear", function() { return Math.ceil(this.getDayOfYear() / 7); }); /** * Set the day of the year. * * @example var dtm = new Date("01/12/2008"); * dtm.setDayOfYear(1); * dtm.toString(); * @result 'Tue Jan 01 2008 00:00:00' * * @name setDayOfYear * @type Date * @cat Plugins/Methods/Date */ add("setDayOfYear", function(day) { this.setMonth(0); this.setDate(day); return this; }); /** * Add a number of years to the date object. * * @example var dtm = new Date("01/12/2008"); * dtm.addYears(1); * dtm.toString(); * @result 'Mon Jan 12 2009 00:00:00' * * @name addYears * @type Date * @cat Plugins/Methods/Date */ add("addYears", function(num) { this.setFullYear(this.getFullYear() + num); return this; }); /** * Add a number of months to the date object. * * @example var dtm = new Date("01/12/2008"); * dtm.addMonths(1); * dtm.toString(); * @result 'Tue Feb 12 2008 00:00:00' * * @name addMonths * @type Date * @cat Plugins/Methods/Date */ add("addMonths", function(num) { var tmpdtm = this.getDate(); this.setMonth(this.getMonth() + num); if (tmpdtm > this.getDate()) this.addDays(-this.getDate()); return this; }); /** * Add a number of days to the date object. * * @example var dtm = new Date("01/12/2008"); * dtm.addDays(1); * dtm.toString(); * @result 'Sun Jan 13 2008 00:00:00' * * @name addDays * @type Date * @cat Plugins/Methods/Date */ add("addDays", function(num) { //this.setDate(this.getDate() + num); this.setTime(this.getTime() + (num*86400000) ); return this; }); /** * Add a number of hours to the date object. * * @example var dtm = new Date("01/12/2008"); * dtm.addHours(24); * dtm.toString(); * @result 'Sun Jan 13 2008 00:00:00' * * @name addHours * @type Date * @cat Plugins/Methods/Date */ add("addHours", function(num) { this.setHours(this.getHours() + num); return this; }); /** * Add a number of minutes to the date object. * * @example var dtm = new Date("01/12/2008"); * dtm.addMinutes(60); * dtm.toString(); * @result 'Sat Jan 12 2008 01:00:00' * * @name addMinutes * @type Date * @cat Plugins/Methods/Date */ add("addMinutes", function(num) { this.setMinutes(this.getMinutes() + num); return this; }); /** * Add a number of seconds to the date object. * * @example var dtm = new Date("01/12/2008"); * dtm.addSeconds(60); * dtm.toString(); * @result 'Sat Jan 12 2008 00:01:00' * * @name addSeconds * @type Date * @cat Plugins/Methods/Date */ add("addSeconds", function(num) { this.setSeconds(this.getSeconds() + num); return this; }); /** * Sets the time component of this Date to zero for cleaner, easier comparison of dates where time is not relevant. * * @example var dtm = new Date(); * dtm.zeroTime(); * dtm.toString(); * @result 'Sat Jan 12 2008 00:01:00' * * @name zeroTime * @type Date * @cat Plugins/Methods/Date * @author Kelvin Luck */ add("zeroTime", function() { this.setMilliseconds(0); this.setSeconds(0); this.setMinutes(0); this.setHours(0); return this; }); /** * Returns a string representation of the date object according to Date.format. * (Date.toString may be used in other places so I purposefully didn't overwrite it) * * @example var dtm = new Date("01/12/2008"); * dtm.asString(); * @result '12/01/2008' // (where Date.format == 'dd/mm/yyyy' * * @name asString * @type Date * @cat Plugins/Methods/Date * @author Kelvin Luck */ add("asString", function(format) { var r = format || Date.format; return r .split('yyyy').join(this.getFullYear()) .split('yy').join((this.getFullYear() + '').substring(2)) .split('mmmm').join(this.getMonthName(false)) .split('mmm').join(this.getMonthName(true)) .split('mm').join(_zeroPad(this.getMonth()+1)) .split('dd').join(_zeroPad(this.getDate())); }); /** * Returns a new date object created from the passed String according to Date.format or false if the attempt to do this results in an invalid date object * (We can't simple use Date.parse as it's not aware of locale and I chose not to overwrite it incase it's functionality is being relied on elsewhere) * * @example var dtm = Date.fromString("12/01/2008"); * dtm.toString(); * @result 'Sat Jan 12 2008 00:00:00' // (where Date.format == 'dd/mm/yyyy' * * @name fromString * @type Date * @cat Plugins/Methods/Date * @author Kelvin Luck */ Date.fromString = function(s) { var f = Date.format; var d = new Date('01/01/1977'); var mLength = 0; var iM = f.indexOf('mmmm'); if (iM > -1) { for (var i=0; i -1) { var mStr = s.substr(iM, 3); for (var i=0; i -1) { if (iM < iY) { iY += mLength; } d.setFullYear(Number(s.substr(iY, 4))); } else { if (iM < iY) { iY += mLength; } // TODO - this doesn't work very well - are there any rules for what is meant by a two digit year? d.setFullYear(Number(Date.fullYearStart + s.substr(f.indexOf('yy'), 2))); } var iD = f.indexOf('dd'); if (iM < iD) { iD += mLength; } d.setDate(Number(s.substr(iD, 2))); if (isNaN(d.getTime())) { return false; } return d; }; // utility method var _zeroPad = function(num) { var s = '0'+num; return s.substring(s.length-2) //return ('0'+num).substring(-2); // doesn't work on IE :( }; })(); /* Arquivo: jquery-1.8.0.min.js */ /*! jQuery v@1.8.0 jquery.com | jquery.org/license */ (function(a,b){function G(a){var b=F[a]={};return p.each(a.split(s),function(a,c){b[c]=!0}),b}function J(a,c,d){if(d===b&&a.nodeType===1){var e="data-"+c.replace(I,"-$1").toLowerCase();d=a.getAttribute(e);if(typeof d=="string"){try{d=d==="true"?!0:d==="false"?!1:d==="null"?null:+d+""===d?+d:H.test(d)?p.parseJSON(d):d}catch(f){}p.data(a,c,d)}else d=b}return d}function K(a){var b;for(b in a){if(b==="data"&&p.isEmptyObject(a[b]))continue;if(b!=="toJSON")return!1}return!0}function ba(){return!1}function bb(){return!0}function bh(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function bi(a,b){do a=a[b];while(a&&a.nodeType!==1);return a}function bj(a,b,c){b=b||0;if(p.isFunction(b))return p.grep(a,function(a,d){var e=!!b.call(a,d,a);return e===c});if(b.nodeType)return p.grep(a,function(a,d){return a===b===c});if(typeof b=="string"){var d=p.grep(a,function(a){return a.nodeType===1});if(be.test(b))return p.filter(b,d,!c);b=p.filter(b,d)}return p.grep(a,function(a,d){return p.inArray(a,b)>=0===c})}function bk(a){var b=bl.split("|"),c=a.createDocumentFragment();if(c.createElement)while(b.length)c.createElement(b.pop());return c}function bC(a,b){return a.getElementsByTagName(b)[0]||a.appendChild(a.ownerDocument.createElement(b))}function bD(a,b){if(b.nodeType!==1||!p.hasData(a))return;var c,d,e,f=p._data(a),g=p._data(b,f),h=f.events;if(h){delete g.handle,g.events={};for(c in h)for(d=0,e=h[c].length;d").appendTo(e.body),c=b.css("display");b.remove();if(c==="none"||c===""){bI=e.body.appendChild(bI||p.extend(e.createElement("iframe"),{frameBorder:0,width:0,height:0}));if(!bJ||!bI.createElement)bJ=(bI.contentWindow||bI.contentDocument).document,bJ.write(""),bJ.close();b=bJ.body.appendChild(bJ.createElement(a)),c=bH(b,"display"),e.body.removeChild(bI)}return bR[a]=c,c}function ch(a,b,c,d){var e;if(p.isArray(b))p.each(b,function(b,e){c||cd.test(a)?d(a,e):ch(a+"["+(typeof e=="object"?b:"")+"]",e,c,d)});else if(!c&&p.type(b)==="object")for(e in b)ch(a+"["+e+"]",b[e],c,d);else d(a,b)}function cy(a){return function(b,c){typeof b!="string"&&(c=b,b="*");var d,e,f,g=b.toLowerCase().split(s),h=0,i=g.length;if(p.isFunction(c))for(;h)[^>]*$|#([\w\-]*)$)/,v=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,w=/^[\],:{}\s]*$/,x=/(?:^|:|,)(?:\s*\[)+/g,y=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,z=/"[^"\\\r\n]*"|true|false|null|-?(?:\d\d*\.|)\d+(?:[eE][\-+]?\d+|)/g,A=/^-ms-/,B=/-([\da-z])/gi,C=function(a,b){return(b+"").toUpperCase()},D=function(){e.addEventListener?(e.removeEventListener("DOMContentLoaded",D,!1),p.ready()):e.readyState==="complete"&&(e.detachEvent("onreadystatechange",D),p.ready())},E={};p.fn=p.prototype={constructor:p,init:function(a,c,d){var f,g,h,i;if(!a)return this;if(a.nodeType)return this.context=this[0]=a,this.length=1,this;if(typeof a=="string"){a.charAt(0)==="<"&&a.charAt(a.length-1)===">"&&a.length>=3?f=[null,a,null]:f=u.exec(a);if(f&&(f[1]||!c)){if(f[1])return c=c instanceof p?c[0]:c,i=c&&c.nodeType?c.ownerDocument||c:e,a=p.parseHTML(f[1],i,!0),v.test(f[1])&&p.isPlainObject(c)&&this.attr.call(a,c,!0),p.merge(this,a);g=e.getElementById(f[2]);if(g&&g.parentNode){if(g.id!==f[2])return d.find(a);this.length=1,this[0]=g}return this.context=e,this.selector=a,this}return!c||c.jquery?(c||d).find(a):this.constructor(c).find(a)}return p.isFunction(a)?d.ready(a):(a.selector!==b&&(this.selector=a.selector,this.context=a.context),p.makeArray(a,this))},selector:"",jquery:"1.8.0",length:0,size:function(){return this.length},toArray:function(){return k.call(this)},get:function(a){return a==null?this.toArray():a<0?this[this.length+a]:this[a]},pushStack:function(a,b,c){var d=p.merge(this.constructor(),a);return d.prevObject=this,d.context=this.context,b==="find"?d.selector=this.selector+(this.selector?" ":"")+c:b&&(d.selector=this.selector+"."+b+"("+c+")"),d},each:function(a,b){return p.each(this,a,b)},ready:function(a){return p.ready.promise().done(a),this},eq:function(a){return a=+a,a===-1?this.slice(a):this.slice(a,a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(k.apply(this,arguments),"slice",k.call(arguments).join(","))},map:function(a){return this.pushStack(p.map(this,function(b,c){return a.call(b,c,b)}))},end:function(){return this.prevObject||this.constructor(null)},push:j,sort:[].sort,splice:[].splice},p.fn.init.prototype=p.fn,p.extend=p.fn.extend=function(){var a,c,d,e,f,g,h=arguments[0]||{},i=1,j=arguments.length,k=!1;typeof h=="boolean"&&(k=h,h=arguments[1]||{},i=2),typeof h!="object"&&!p.isFunction(h)&&(h={}),j===i&&(h=this,--i);for(;i0)return;d.resolveWith(e,[p]),p.fn.trigger&&p(e).trigger("ready").off("ready")},isFunction:function(a){return p.type(a)==="function"},isArray:Array.isArray||function(a){return p.type(a)==="array"},isWindow:function(a){return a!=null&&a==a.window},isNumeric:function(a){return!isNaN(parseFloat(a))&&isFinite(a)},type:function(a){return a==null?String(a):E[m.call(a)]||"object"},isPlainObject:function(a){if(!a||p.type(a)!=="object"||a.nodeType||p.isWindow(a))return!1;try{if(a.constructor&&!n.call(a,"constructor")&&!n.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}var d;for(d in a);return d===b||n.call(a,d)},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},error:function(a){throw new Error(a)},parseHTML:function(a,b,c){var d;return!a||typeof a!="string"?null:(typeof b=="boolean"&&(c=b,b=0),b=b||e,(d=v.exec(a))?[b.createElement(d[1])]:(d=p.buildFragment([a],b,c?null:[]),p.merge([],(d.cacheable?p.clone(d.fragment):d.fragment).childNodes)))},parseJSON:function(b){if(!b||typeof b!="string")return null;b=p.trim(b);if(a.JSON&&a.JSON.parse)return a.JSON.parse(b);if(w.test(b.replace(y,"@").replace(z,"]").replace(x,"")))return(new Function("return "+b))();p.error("Invalid JSON: "+b)},parseXML:function(c){var d,e;if(!c||typeof c!="string")return null;try{a.DOMParser?(e=new DOMParser,d=e.parseFromString(c,"text/xml")):(d=new ActiveXObject("Microsoft.XMLDOM"),d.async="false",d.loadXML(c))}catch(f){d=b}return(!d||!d.documentElement||d.getElementsByTagName("parsererror").length)&&p.error("Invalid XML: "+c),d},noop:function(){},globalEval:function(b){b&&r.test(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(A,"ms-").replace(B,C)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,c,d){var e,f=0,g=a.length,h=g===b||p.isFunction(a);if(d){if(h){for(e in a)if(c.apply(a[e],d)===!1)break}else for(;f0&&a[0]&&a[i-1]||i===0||p.isArray(a));if(j)for(;h-1)i.splice(c,1),e&&(c<=g&&g--,c<=h&&h--)}),this},has:function(a){return p.inArray(a,i)>-1},empty:function(){return i=[],this},disable:function(){return i=j=c=b,this},disabled:function(){return!i},lock:function(){return j=b,c||l.disable(),this},locked:function(){return!j},fireWith:function(a,b){return b=b||[],b=[a,b.slice?b.slice():b],i&&(!d||j)&&(e?j.push(b):k(b)),this},fire:function(){return l.fireWith(this,arguments),this},fired:function(){return!!d}};return l},p.extend({Deferred:function(a){var b=[["resolve","done",p.Callbacks("once memory"),"resolved"],["reject","fail",p.Callbacks("once memory"),"rejected"],["notify","progress",p.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return p.Deferred(function(c){p.each(b,function(b,d){var f=d[0],g=a[b];e[d[1]](p.isFunction(g)?function(){var a=g.apply(this,arguments);a&&p.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[f+"With"](this===e?c:this,[a])}:c[f])}),a=null}).promise()},promise:function(a){return typeof a=="object"?p.extend(a,d):d}},e={};return d.pipe=d.then,p.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[a^1][2].disable,b[2][2].lock),e[f[0]]=g.fire,e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=k.call(arguments),d=c.length,e=d!==1||a&&p.isFunction(a.promise)?d:0,f=e===1?a:p.Deferred(),g=function(a,b,c){return function(d){b[a]=this,c[a]=arguments.length>1?k.call(arguments):d,c===h?f.notifyWith(b,c):--e||f.resolveWith(b,c)}},h,i,j;if(d>1){h=new Array(d),i=new Array(d),j=new Array(d);for(;b
a",c=n.getElementsByTagName("*"),d=n.getElementsByTagName("a")[0],d.style.cssText="top:1px;float:left;opacity:.5";if(!c||!c.length||!d)return{};f=e.createElement("select"),g=f.appendChild(e.createElement("option")),h=n.getElementsByTagName("input")[0],b={leadingWhitespace:n.firstChild.nodeType===3,tbody:!n.getElementsByTagName("tbody").length,htmlSerialize:!!n.getElementsByTagName("link").length,style:/top/.test(d.getAttribute("style")),hrefNormalized:d.getAttribute("href")==="/a",opacity:/^0.5/.test(d.style.opacity),cssFloat:!!d.style.cssFloat,checkOn:h.value==="on",optSelected:g.selected,getSetAttribute:n.className!=="t",enctype:!!e.createElement("form").enctype,html5Clone:e.createElement("nav").cloneNode(!0).outerHTML!=="<:nav>",boxModel:e.compatMode==="CSS1Compat",submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0,boxSizingReliable:!0,pixelPosition:!1},h.checked=!0,b.noCloneChecked=h.cloneNode(!0).checked,f.disabled=!0,b.optDisabled=!g.disabled;try{delete n.test}catch(o){b.deleteExpando=!1}!n.addEventListener&&n.attachEvent&&n.fireEvent&&(n.attachEvent("onclick",m=function(){b.noCloneEvent=!1}),n.cloneNode(!0).fireEvent("onclick"),n.detachEvent("onclick",m)),h=e.createElement("input"),h.value="t",h.setAttribute("type","radio"),b.radioValue=h.value==="t",h.setAttribute("checked","checked"),h.setAttribute("name","t"),n.appendChild(h),i=e.createDocumentFragment(),i.appendChild(n.lastChild),b.checkClone=i.cloneNode(!0).cloneNode(!0).lastChild.checked,b.appendChecked=h.checked,i.removeChild(h),i.appendChild(n);if(n.attachEvent)for(k in{submit:!0,change:!0,focusin:!0})j="on"+k,l=j in n,l||(n.setAttribute(j,"return;"),l=typeof n[j]=="function"),b[k+"Bubbles"]=l;return p(function(){var c,d,f,g,h="padding:0;margin:0;border:0;display:block;overflow:hidden;",i=e.getElementsByTagName("body")[0];if(!i)return;c=e.createElement("div"),c.style.cssText="visibility:hidden;border:0;width:0;height:0;position:static;top:0;margin-top:1px",i.insertBefore(c,i.firstChild),d=e.createElement("div"),c.appendChild(d),d.innerHTML="
t
",f=d.getElementsByTagName("td"),f[0].style.cssText="padding:0;margin:0;border:0;display:none",l=f[0].offsetHeight===0,f[0].style.display="",f[1].style.display="none",b.reliableHiddenOffsets=l&&f[0].offsetHeight===0,d.innerHTML="",d.style.cssText="box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;",b.boxSizing=d.offsetWidth===4,b.doesNotIncludeMarginInBodyOffset=i.offsetTop!==1,a.getComputedStyle&&(b.pixelPosition=(a.getComputedStyle(d,null)||{}).top!=="1%",b.boxSizingReliable=(a.getComputedStyle(d,null)||{width:"4px"}).width==="4px",g=e.createElement("div"),g.style.cssText=d.style.cssText=h,g.style.marginRight=g.style.width="0",d.style.width="1px",d.appendChild(g),b.reliableMarginRight=!parseFloat((a.getComputedStyle(g,null)||{}).marginRight)),typeof d.style.zoom!="undefined"&&(d.innerHTML="",d.style.cssText=h+"width:1px;padding:1px;display:inline;zoom:1",b.inlineBlockNeedsLayout=d.offsetWidth===3,d.style.display="block",d.style.overflow="visible",d.innerHTML="
",d.firstChild.style.width="5px",b.shrinkWrapBlocks=d.offsetWidth!==3,c.style.zoom=1),i.removeChild(c),c=d=f=g=null}),i.removeChild(n),c=d=f=g=h=i=n=null,b}();var H=/^(?:\{.*\}|\[.*\])$/,I=/([A-Z])/g;p.extend({cache:{},deletedIds:[],uuid:0,expando:"jQuery"+(p.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(a){return a=a.nodeType?p.cache[a[p.expando]]:a[p.expando],!!a&&!K(a)},data:function(a,c,d,e){if(!p.acceptData(a))return;var f,g,h=p.expando,i=typeof c=="string",j=a.nodeType,k=j?p.cache:a,l=j?a[h]:a[h]&&h;if((!l||!k[l]||!e&&!k[l].data)&&i&&d===b)return;l||(j?a[h]=l=p.deletedIds.pop()||++p.uuid:l=h),k[l]||(k[l]={},j||(k[l].toJSON=p.noop));if(typeof c=="object"||typeof c=="function")e?k[l]=p.extend(k[l],c):k[l].data=p.extend(k[l].data,c);return f=k[l],e||(f.data||(f.data={}),f=f.data),d!==b&&(f[p.camelCase(c)]=d),i?(g=f[c],g==null&&(g=f[p.camelCase(c)])):g=f,g},removeData:function(a,b,c){if(!p.acceptData(a))return;var d,e,f,g=a.nodeType,h=g?p.cache:a,i=g?a[p.expando]:p.expando;if(!h[i])return;if(b){d=c?h[i]:h[i].data;if(d){p.isArray(b)||(b in d?b=[b]:(b=p.camelCase(b),b in d?b=[b]:b=b.split(" ")));for(e=0,f=b.length;e1,null,!1))},removeData:function(a){return this.each(function(){p.removeData(this,a)})}}),p.extend({queue:function(a,b,c){var d;if(a)return b=(b||"fx")+"queue",d=p._data(a,b),c&&(!d||p.isArray(c)?d=p._data(a,b,p.makeArray(c)):d.push(c)),d||[]},dequeue:function(a,b){b=b||"fx";var c=p.queue(a,b),d=c.shift(),e=p._queueHooks(a,b),f=function(){p.dequeue(a,b)};d==="inprogress"&&(d=c.shift()),d&&(b==="fx"&&c.unshift("inprogress"),delete e.stop,d.call(a,f,e)),!c.length&&e&&e.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return p._data(a,c)||p._data(a,c,{empty:p.Callbacks("once memory").add(function(){p.removeData(a,b+"queue",!0),p.removeData(a,c,!0)})})}}),p.fn.extend({queue:function(a,c){var d=2;return typeof a!="string"&&(c=a,a="fx",d--),arguments.length1)},removeAttr:function(a){return this.each(function(){p.removeAttr(this,a)})},prop:function(a,b){return p.access(this,p.prop,a,b,arguments.length>1)},removeProp:function(a){return a=p.propFix[a]||a,this.each(function(){try{this[a]=b,delete this[a]}catch(c){}})},addClass:function(a){var b,c,d,e,f,g,h;if(p.isFunction(a))return this.each(function(b){p(this).addClass(a.call(this,b,this.className))});if(a&&typeof a=="string"){b=a.split(s);for(c=0,d=this.length;c-1)d=d.replace(" "+c[f]+" "," ");e.className=a?p.trim(d):""}}}return this},toggleClass:function(a,b){var c=typeof a,d=typeof b=="boolean";return p.isFunction(a)?this.each(function(c){p(this).toggleClass(a.call(this,c,this.className,b),b)}):this.each(function(){if(c==="string"){var e,f=0,g=p(this),h=b,i=a.split(s);while(e=i[f++])h=d?h:!g.hasClass(e),g[h?"addClass":"removeClass"](e)}else if(c==="undefined"||c==="boolean")this.className&&p._data(this,"__className__",this.className),this.className=this.className||a===!1?"":p._data(this,"__className__")||""})},hasClass:function(a){var b=" "+a+" ",c=0,d=this.length;for(;c-1)return!0;return!1},val:function(a){var c,d,e,f=this[0];if(!arguments.length){if(f)return c=p.valHooks[f.type]||p.valHooks[f.nodeName.toLowerCase()],c&&"get"in c&&(d=c.get(f,"value"))!==b?d:(d=f.value,typeof d=="string"?d.replace(P,""):d==null?"":d);return}return e=p.isFunction(a),this.each(function(d){var f,g=p(this);if(this.nodeType!==1)return;e?f=a.call(this,d,g.val()):f=a,f==null?f="":typeof f=="number"?f+="":p.isArray(f)&&(f=p.map(f,function(a){return a==null?"":a+""})),c=p.valHooks[this.type]||p.valHooks[this.nodeName.toLowerCase()];if(!c||!("set"in c)||c.set(this,f,"value")===b)this.value=f})}}),p.extend({valHooks:{option:{get:function(a){var b=a.attributes.value;return!b||b.specified?a.value:a.text}},select:{get:function(a){var b,c,d,e,f=a.selectedIndex,g=[],h=a.options,i=a.type==="select-one";if(f<0)return null;c=i?f:0,d=i?f+1:h.length;for(;c=0}),c.length||(a.selectedIndex=-1),c}}},attrFn:{},attr:function(a,c,d,e){var f,g,h,i=a.nodeType;if(!a||i===3||i===8||i===2)return;if(e&&p.isFunction(p.fn[c]))return p(a)[c](d);if(typeof a.getAttribute=="undefined")return p.prop(a,c,d);h=i!==1||!p.isXMLDoc(a),h&&(c=c.toLowerCase(),g=p.attrHooks[c]||(T.test(c)?M:L));if(d!==b){if(d===null){p.removeAttr(a,c);return}return g&&"set"in g&&h&&(f=g.set(a,d,c))!==b?f:(a.setAttribute(c,""+d),d)}return g&&"get"in g&&h&&(f=g.get(a,c))!==null?f:(f=a.getAttribute(c),f===null?b:f)},removeAttr:function(a,b){var c,d,e,f,g=0;if(b&&a.nodeType===1){d=b.split(s);for(;g=0}})});var V=/^(?:textarea|input|select)$/i,W=/^([^\.]*|)(?:\.(.+)|)$/,X=/(?:^|\s)hover(\.\S+|)\b/,Y=/^key/,Z=/^(?:mouse|contextmenu)|click/,$=/^(?:focusinfocus|focusoutblur)$/,_=function(a){return p.event.special.hover?a:a.replace(X,"mouseenter$1 mouseleave$1")};p.event={add:function(a,c,d,e,f){var g,h,i,j,k,l,m,n,o,q,r;if(a.nodeType===3||a.nodeType===8||!c||!d||!(g=p._data(a)))return;d.handler&&(o=d,d=o.handler,f=o.selector),d.guid||(d.guid=p.guid++),i=g.events,i||(g.events=i={}),h=g.handle,h||(g.handle=h=function(a){return typeof p!="undefined"&&(!a||p.event.triggered!==a.type)?p.event.dispatch.apply(h.elem,arguments):b},h.elem=a),c=p.trim(_(c)).split(" ");for(j=0;j=0&&(s=s.slice(0,-1),i=!0),s.indexOf(".")>=0&&(t=s.split("."),s=t.shift(),t.sort());if((!f||p.event.customEvent[s])&&!p.event.global[s])return;c=typeof c=="object"?c[p.expando]?c:new p.Event(s,c):new p.Event(s),c.type=s,c.isTrigger=!0,c.exclusive=i,c.namespace=t.join("."),c.namespace_re=c.namespace?new RegExp("(^|\\.)"+t.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,m=s.indexOf(":")<0?"on"+s:"";if(!f){h=p.cache;for(j in h)h[j].events&&h[j].events[s]&&p.event.trigger(c,d,h[j].handle.elem,!0);return}c.result=b,c.target||(c.target=f),d=d!=null?p.makeArray(d):[],d.unshift(c),n=p.event.special[s]||{};if(n.trigger&&n.trigger.apply(f,d)===!1)return;q=[[f,n.bindType||s]];if(!g&&!n.noBubble&&!p.isWindow(f)){r=n.delegateType||s,k=$.test(r+s)?f:f.parentNode;for(l=f;k;k=k.parentNode)q.push([k,r]),l=k;l===(f.ownerDocument||e)&&q.push([l.defaultView||l.parentWindow||a,r])}for(j=0;jq&&u.push({elem:this,matches:o.slice(q)});for(d=0;d0?this.on(b,null,a,c):this.trigger(b)},Y.test(b)&&(p.event.fixHooks[b]=p.event.keyHooks),Z.test(b)&&(p.event.fixHooks[b]=p.event.mouseHooks)}),function(a,b){function bd(a,b,c,d){var e=0,f=b.length;for(;e0?h(g,c,f):[]}function bf(a,c,d,e,f){var g,h,i,j,k,l,m,n,p=0,q=f.length,s=L.POS,t=new RegExp("^"+s.source+"(?!"+r+")","i"),u=function(){var a=1,c=arguments.length-2;for(;ai){m=a.slice(i,g.index),i=n,l=[c],B.test(m)&&(k&&(l=k),k=e);if(h=H.test(m))m=m.slice(0,-5).replace(B,"$&*");g.length>1&&g[0].replace(t,u),k=be(m,g[1],g[2],l,k,h)}}k?(j=j.concat(k),(m=a.slice(i))&&m!==")"?B.test(m)?bd(m,j,d,e):Z(m,c,d,e?e.concat(k):k):o.apply(d,j)):Z(a,c,d,e)}return q===1?d:Z.uniqueSort(d)}function bg(a,b,c){var d,e,f,g=[],i=0,j=D.exec(a),k=!j.pop()&&!j.pop(),l=k&&a.match(C)||[""],m=$.preFilter,n=$.filter,o=!c&&b!==h;for(;(e=l[i])!=null&&k;i++){g.push(d=[]),o&&(e=" "+e);while(e){k=!1;if(j=B.exec(e))e=e.slice(j[0].length),k=d.push({part:j.pop().replace(A," "),captures:j});for(f in n)(j=L[f].exec(e))&&(!m[f]||(j=m[f](j,b,c)))&&(e=e.slice(j.shift().length),k=d.push({part:f,captures:j}));if(!k)break}}return k||Z.error(a),g}function bh(a,b,e){var f=b.dir,g=m++;return a||(a=function(a){return a===e}),b.first?function(b,c){while(b=b[f])if(b.nodeType===1)return a(b,c)&&b}:function(b,e){var h,i=g+"."+d,j=i+"."+c;while(b=b[f])if(b.nodeType===1){if((h=b[q])===j)return b.sizset;if(typeof h=="string"&&h.indexOf(i)===0){if(b.sizset)return b}else{b[q]=j;if(a(b,e))return b.sizset=!0,b;b.sizset=!1}}}}function bi(a,b){return a?function(c,d){var e=b(c,d);return e&&a(e===!0?c:e,d)}:b}function bj(a,b,c){var d,e,f=0;for(;d=a[f];f++)$.relative[d.part]?e=bh(e,$.relative[d.part],b):(d.captures.push(b,c),e=bi(e,$.filter[d.part].apply(null,d.captures)));return e}function bk(a){return function(b,c){var d,e=0;for(;d=a[e];e++)if(d(b,c))return!0;return!1}}var c,d,e,f,g,h=a.document,i=h.documentElement,j="undefined",k=!1,l=!0,m=0,n=[].slice,o=[].push,q=("sizcache"+Math.random()).replace(".",""),r="[\\x20\\t\\r\\n\\f]",s="(?:\\\\.|[-\\w]|[^\\x00-\\xa0])+",t=s.replace("w","w#"),u="([*^$|!~]?=)",v="\\["+r+"*("+s+")"+r+"*(?:"+u+r+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+t+")|)|)"+r+"*\\]",w=":("+s+")(?:\\((?:(['\"])((?:\\\\.|[^\\\\])*?)\\2|((?:[^,]|\\\\,|(?:,(?=[^\\[]*\\]))|(?:,(?=[^\\(]*\\))))*))\\)|)",x=":(nth|eq|gt|lt|first|last|even|odd)(?:\\((\\d*)\\)|)(?=[^-]|$)",y=r+"*([\\x20\\t\\r\\n\\f>+~])"+r+"*",z="(?=[^\\x20\\t\\r\\n\\f])(?:\\\\.|"+v+"|"+w.replace(2,7)+"|[^\\\\(),])+",A=new RegExp("^"+r+"+|((?:^|[^\\\\])(?:\\\\.)*)"+r+"+$","g"),B=new RegExp("^"+y),C=new RegExp(z+"?(?="+r+"*,|$)","g"),D=new RegExp("^(?:(?!,)(?:(?:^|,)"+r+"*"+z+")*?|"+r+"*(.*?))(\\)|$)"),E=new RegExp(z.slice(19,-6)+"\\x20\\t\\r\\n\\f>+~])+|"+y,"g"),F=/^(?:#([\w\-]+)|(\w+)|\.([\w\-]+))$/,G=/[\x20\t\r\n\f]*[+~]/,H=/:not\($/,I=/h\d/i,J=/input|select|textarea|button/i,K=/\\(?!\\)/g,L={ID:new RegExp("^#("+s+")"),CLASS:new RegExp("^\\.("+s+")"),NAME:new RegExp("^\\[name=['\"]?("+s+")['\"]?\\]"),TAG:new RegExp("^("+s.replace("[-","[-\\*")+")"),ATTR:new RegExp("^"+v),PSEUDO:new RegExp("^"+w),CHILD:new RegExp("^:(only|nth|last|first)-child(?:\\("+r+"*(even|odd|(([+-]|)(\\d*)n|)"+r+"*(?:([+-]|)"+r+"*(\\d+)|))"+r+"*\\)|)","i"),POS:new RegExp(x,"ig"),needsContext:new RegExp("^"+r+"*[>+~]|"+x,"i")},M={},N=[],O={},P=[],Q=function(a){return a.sizzleFilter=!0,a},R=function(a){return function(b){return b.nodeName.toLowerCase()==="input"&&b.type===a}},S=function(a){return function(b){var c=b.nodeName.toLowerCase();return(c==="input"||c==="button")&&b.type===a}},T=function(a){var b=!1,c=h.createElement("div");try{b=a(c)}catch(d){}return c=null,b},U=T(function(a){a.innerHTML="";var b=typeof a.lastChild.getAttribute("multiple");return b!=="boolean"&&b!=="string"}),V=T(function(a){a.id=q+0,a.innerHTML="
",i.insertBefore(a,i.firstChild);var b=h.getElementsByName&&h.getElementsByName(q).length===2+h.getElementsByName(q+0).length;return g=!h.getElementById(q),i.removeChild(a),b}),W=T(function(a){return a.appendChild(h.createComment("")),a.getElementsByTagName("*").length===0}),X=T(function(a){return a.innerHTML="",a.firstChild&&typeof a.firstChild.getAttribute!==j&&a.firstChild.getAttribute("href")==="#"}),Y=T(function(a){return a.innerHTML="",!a.getElementsByClassName||a.getElementsByClassName("e").length===0?!1:(a.lastChild.className="e",a.getElementsByClassName("e").length!==1)}),Z=function(a,b,c,d){c=c||[],b=b||h;var e,f,g,i,j=b.nodeType;if(j!==1&&j!==9)return[];if(!a||typeof a!="string")return c;g=ba(b);if(!g&&!d)if(e=F.exec(a))if(i=e[1]){if(j===9){f=b.getElementById(i);if(!f||!f.parentNode)return c;if(f.id===i)return c.push(f),c}else if(b.ownerDocument&&(f=b.ownerDocument.getElementById(i))&&bb(b,f)&&f.id===i)return c.push(f),c}else{if(e[2])return o.apply(c,n.call(b.getElementsByTagName(a),0)),c;if((i=e[3])&&Y&&b.getElementsByClassName)return o.apply(c,n.call(b.getElementsByClassName(i),0)),c}return bm(a,b,c,d,g)},$=Z.selectors={cacheLength:50,match:L,order:["ID","TAG"],attrHandle:{},createPseudo:Q,find:{ID:g?function(a,b,c){if(typeof b.getElementById!==j&&!c){var d=b.getElementById(a);return d&&d.parentNode?[d]:[]}}:function(a,c,d){if(typeof c.getElementById!==j&&!d){var e=c.getElementById(a);return e?e.id===a||typeof e.getAttributeNode!==j&&e.getAttributeNode("id").value===a?[e]:b:[]}},TAG:W?function(a,b){if(typeof b.getElementsByTagName!==j)return b.getElementsByTagName(a)}:function(a,b){var c=b.getElementsByTagName(a);if(a==="*"){var d,e=[],f=0;for(;d=c[f];f++)d.nodeType===1&&e.push(d);return e}return c}},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(K,""),a[3]=(a[4]||a[5]||"").replace(K,""),a[2]==="~="&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),a[1]==="nth"?(a[2]||Z.error(a[0]),a[3]=+(a[3]?a[4]+(a[5]||1):2*(a[2]==="even"||a[2]==="odd")),a[4]=+(a[6]+a[7]||a[2]==="odd")):a[2]&&Z.error(a[0]),a},PSEUDO:function(a){var b,c=a[4];return L.CHILD.test(a[0])?null:(c&&(b=D.exec(c))&&b.pop()&&(a[0]=a[0].slice(0,b[0].length-c.length-1),c=b[0].slice(0,-1)),a.splice(2,3,c||a[3]),a)}},filter:{ID:g?function(a){return a=a.replace(K,""),function(b){return b.getAttribute("id")===a}}:function(a){return a=a.replace(K,""),function(b){var c=typeof b.getAttributeNode!==j&&b.getAttributeNode("id");return c&&c.value===a}},TAG:function(a){return a==="*"?function(){return!0}:(a=a.replace(K,"").toLowerCase(),function(b){return b.nodeName&&b.nodeName.toLowerCase()===a})},CLASS:function(a){var b=M[a];return b||(b=M[a]=new RegExp("(^|"+r+")"+a+"("+r+"|$)"),N.push(a),N.length>$.cacheLength&&delete M[N.shift()]),function(a){return b.test(a.className||typeof a.getAttribute!==j&&a.getAttribute("class")||"")}},ATTR:function(a,b,c){return b?function(d){var e=Z.attr(d,a),f=e+"";if(e==null)return b==="!=";switch(b){case"=":return f===c;case"!=":return f!==c;case"^=":return c&&f.indexOf(c)===0;case"*=":return c&&f.indexOf(c)>-1;case"$=":return c&&f.substr(f.length-c.length)===c;case"~=":return(" "+f+" ").indexOf(c)>-1;case"|=":return f===c||f.substr(0,c.length+1)===c+"-"}}:function(b){return Z.attr(b,a)!=null}},CHILD:function(a,b,c,d){if(a==="nth"){var e=m++;return function(a){var b,f,g=0,h=a;if(c===1&&d===0)return!0;b=a.parentNode;if(b&&(b[q]!==e||!a.sizset)){for(h=b.firstChild;h;h=h.nextSibling)if(h.nodeType===1){h.sizset=++g;if(h===a)break}b[q]=e}return f=a.sizset-d,c===0?f===0:f%c===0&&f/c>=0}}return function(b){var c=b;switch(a){case"only":case"first":while(c=c.previousSibling)if(c.nodeType===1)return!1;if(a==="first")return!0;c=b;case"last":while(c=c.nextSibling)if(c.nodeType===1)return!1;return!0}}},PSEUDO:function(a,b,c,d){var e=$.pseudos[a]||$.pseudos[a.toLowerCase()];return e||Z.error("unsupported pseudo: "+a),e.sizzleFilter?e(b,c,d):e}},pseudos:{not:Q(function(a,b,c){var d=bl(a.replace(A,"$1"),b,c);return function(a){return!d(a)}}),enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return b==="input"&&!!a.checked||b==="option"&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},parent:function(a){return!$.pseudos.empty(a)},empty:function(a){var b;a=a.firstChild;while(a){if(a.nodeName>"@"||(b=a.nodeType)===3||b===4)return!1;a=a.nextSibling}return!0},contains:Q(function(a){return function(b){return(b.textContent||b.innerText||bc(b)).indexOf(a)>-1}}),has:Q(function(a){return function(b){return Z(a,b).length>0}}),header:function(a){return I.test(a.nodeName)},text:function(a){var b,c;return a.nodeName.toLowerCase()==="input"&&(b=a.type)==="text"&&((c=a.getAttribute("type"))==null||c.toLowerCase()===b)},radio:R("radio"),checkbox:R("checkbox"),file:R("file"),password:R("password"),image:R("image"),submit:S("submit"),reset:S("reset"),button:function(a){var b=a.nodeName.toLowerCase();return b==="input"&&a.type==="button"||b==="button"},input:function(a){return J.test(a.nodeName)},focus:function(a){var b=a.ownerDocument;return a===b.activeElement&&(!b.hasFocus||b.hasFocus())&&(!!a.type||!!a.href)},active:function(a){return a===a.ownerDocument.activeElement}},setFilters:{first:function(a,b,c){return c?a.slice(1):[a[0]]},last:function(a,b,c){var d=a.pop();return c?a:[d]},even:function(a,b,c){var d=[],e=c?1:0,f=a.length;for(;e$.cacheLength&&delete O[P.shift()],g};Z.matches=function(a,b){return Z(a,null,null,b)},Z.matchesSelector=function(a,b){return Z(b,null,null,[a]).length>0};var bm=function(a,b,e,f,g){a=a.replace(A,"$1");var h,i,j,k,l,m,p,q,r,s=a.match(C),t=a.match(E),u=b.nodeType;if(L.POS.test(a))return bf(a,b,e,f,s);if(f)h=n.call(f,0);else if(s&&s.length===1){if(t.length>1&&u===9&&!g&&(s=L.ID.exec(t[0]))){b=$.find.ID(s[1],b,g)[0];if(!b)return e;a=a.slice(t.shift().length)}q=(s=G.exec(t[0]))&&!s.index&&b.parentNode||b,r=t.pop(),m=r.split(":not")[0];for(j=0,k=$.order.length;j",a.querySelectorAll("[selected]").length||e.push("\\["+r+"*(?:checked|disabled|ismap|multiple|readonly|selected|value)"),a.querySelectorAll(":checked").length||e.push(":checked")}),T(function(a){a.innerHTML="

",a.querySelectorAll("[test^='']").length&&e.push("[*^$]="+r+"*(?:\"\"|'')"),a.innerHTML="",a.querySelectorAll(":enabled").length||e.push(":enabled",":disabled")}),e=e.length&&new RegExp(e.join("|")),bm=function(a,d,f,g,h){if(!g&&!h&&(!e||!e.test(a)))if(d.nodeType===9)try{return o.apply(f,n.call(d.querySelectorAll(a),0)),f}catch(i){}else if(d.nodeType===1&&d.nodeName.toLowerCase()!=="object"){var j=d.getAttribute("id"),k=j||q,l=G.test(a)&&d.parentNode||d;j?k=k.replace(c,"\\$&"):d.setAttribute("id",k);try{return o.apply(f,n.call(l.querySelectorAll(a.replace(C,"[id='"+k+"'] $&")),0)),f}catch(i){}finally{j||d.removeAttribute("id")}}return b(a,d,f,g,h)},g&&(T(function(b){a=g.call(b,"div");try{g.call(b,"[test!='']:sizzle"),f.push($.match.PSEUDO)}catch(c){}}),f=new RegExp(f.join("|")),Z.matchesSelector=function(b,c){c=c.replace(d,"='$1']");if(!ba(b)&&!f.test(c)&&(!e||!e.test(c)))try{var h=g.call(b,c);if(h||a||b.document&&b.document.nodeType!==11)return h}catch(i){}return Z(c,null,null,[b]).length>0})}(),Z.attr=p.attr,p.find=Z,p.expr=Z.selectors,p.expr[":"]=p.expr.pseudos,p.unique=Z.uniqueSort,p.text=Z.getText,p.isXMLDoc=Z.isXML,p.contains=Z.contains}(a);var bc=/Until$/,bd=/^(?:parents|prev(?:Until|All))/,be=/^.[^:#\[\.,]*$/,bf=p.expr.match.needsContext,bg={children:!0,contents:!0,next:!0,prev:!0};p.fn.extend({find:function(a){var b,c,d,e,f,g,h=this;if(typeof a!="string")return p(a).filter(function(){for(b=0,c=h.length;b0)for(e=d;e=0:p.filter(a,this).length>0:this.filter(a).length>0)},closest:function(a,b){var c,d=0,e=this.length,f=[],g=bf.test(a)||typeof a!="string"?p(a,b||this.context):0;for(;d-1:p.find.matchesSelector(c,a)){f.push(c);break}c=c.parentNode}}return f=f.length>1?p.unique(f):f,this.pushStack(f,"closest",a)},index:function(a){return a?typeof a=="string"?p.inArray(this[0],p(a)):p.inArray(a.jquery?a[0]:a,this):this[0]&&this[0].parentNode?this.prevAll().length:-1},add:function(a,b){var c=typeof a=="string"?p(a,b):p.makeArray(a&&a.nodeType?[a]:a),d=p.merge(this.get(),c);return this.pushStack(bh(c[0])||bh(d[0])?d:p.unique(d))},addBack:function(a){return this.add(a==null?this.prevObject:this.prevObject.filter(a))}}),p.fn.andSelf=p.fn.addBack,p.each({parent:function(a){var b=a.parentNode;return b&&b.nodeType!==11?b:null},parents:function(a){return p.dir(a,"parentNode")},parentsUntil:function(a,b,c){return p.dir(a,"parentNode",c)},next:function(a){return bi(a,"nextSibling")},prev:function(a){return bi(a,"previousSibling")},nextAll:function(a){return p.dir(a,"nextSibling")},prevAll:function(a){return p.dir(a,"previousSibling")},nextUntil:function(a,b,c){return p.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return p.dir(a,"previousSibling",c)},siblings:function(a){return p.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return p.sibling(a.firstChild)},contents:function(a){return p.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:p.merge([],a.childNodes)}},function(a,b){p.fn[a]=function(c,d){var e=p.map(this,b,c);return bc.test(a)||(d=c),d&&typeof d=="string"&&(e=p.filter(d,e)),e=this.length>1&&!bg[a]?p.unique(e):e,this.length>1&&bd.test(a)&&(e=e.reverse()),this.pushStack(e,a,k.call(arguments).join(","))}}),p.extend({filter:function(a,b,c){return c&&(a=":not("+a+")"),b.length===1?p.find.matchesSelector(b[0],a)?[b[0]]:[]:p.find.matches(a,b)},dir:function(a,c,d){var e=[],f=a[c];while(f&&f.nodeType!==9&&(d===b||f.nodeType!==1||!p(f).is(d)))f.nodeType===1&&e.push(f),f=f[c];return e},sibling:function(a,b){var c=[];for(;a;a=a.nextSibling)a.nodeType===1&&a!==b&&c.push(a);return c}});var bl="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",bm=/ jQuery\d+="(?:null|\d+)"/g,bn=/^\s+/,bo=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,bp=/<([\w:]+)/,bq=/]","i"),bv=/^(?:checkbox|radio)$/,bw=/checked\s*(?:[^=]|=\s*.checked.)/i,bx=/\/(java|ecma)script/i,by=/^\s*\s*$/g,bz={option:[1,""],legend:[1,"
","
"],thead:[1,"","
"],tr:[2,"","
"],td:[3,"","
"],col:[2,"","
"],area:[1,"",""],_default:[0,"",""]},bA=bk(e),bB=bA.appendChild(e.createElement("div"));bz.optgroup=bz.option,bz.tbody=bz.tfoot=bz.colgroup=bz.caption=bz.thead,bz.th=bz.td,p.support.htmlSerialize||(bz._default=[1,"X
","
"]),p.fn.extend({text:function(a){return p.access(this,function(a){return a===b?p.text(this):this.empty().append((this[0]&&this[0].ownerDocument||e).createTextNode(a))},null,a,arguments.length)},wrapAll:function(a){if(p.isFunction(a))return this.each(function(b){p(this).wrapAll(a.call(this,b))});if(this[0]){var b=p(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&a.firstChild.nodeType===1)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){return p.isFunction(a)?this.each(function(b){p(this).wrapInner(a.call(this,b))}):this.each(function(){var b=p(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=p.isFunction(a);return this.each(function(c){p(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){p.nodeName(this,"body")||p(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(a){(this.nodeType===1||this.nodeType===11)&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,!0,function(a){(this.nodeType===1||this.nodeType===11)&&this.insertBefore(a,this.firstChild)})},before:function(){if(!bh(this[0]))return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this)});if(arguments.length){var a=p.clean(arguments);return this.pushStack(p.merge(a,this),"before",this.selector)}},after:function(){if(!bh(this[0]))return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this.nextSibling)});if(arguments.length){var a=p.clean(arguments);return this.pushStack(p.merge(this,a),"after",this.selector)}},remove:function(a,b){var c,d=0;for(;(c=this[d])!=null;d++)if(!a||p.filter(a,[c]).length)!b&&c.nodeType===1&&(p.cleanData(c.getElementsByTagName("*")),p.cleanData([c])),c.parentNode&&c.parentNode.removeChild(c);return this},empty:function(){var a,b=0;for(;(a=this[b])!=null;b++){a.nodeType===1&&p.cleanData(a.getElementsByTagName("*"));while(a.firstChild)a.removeChild(a.firstChild)}return this},clone:function(a,b){return a=a==null?!1:a,b=b==null?a:b,this.map(function(){return p.clone(this,a,b)})},html:function(a){return p.access(this,function(a){var c=this[0]||{},d=0,e=this.length;if(a===b)return c.nodeType===1?c.innerHTML.replace(bm,""):b;if(typeof a=="string"&&!bs.test(a)&&(p.support.htmlSerialize||!bu.test(a))&&(p.support.leadingWhitespace||!bn.test(a))&&!bz[(bp.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(bo,"<$1>");try{for(;d1&&typeof j=="string"&&bw.test(j))return this.each(function(){p(this).domManip(a,c,d)});if(p.isFunction(j))return this.each(function(e){var f=p(this);a[0]=j.call(this,e,c?f.html():b),f.domManip(a,c,d)});if(this[0]){e=p.buildFragment(a,this,k),g=e.fragment,f=g.firstChild,g.childNodes.length===1&&(g=f);if(f){c=c&&p.nodeName(f,"tr");for(h=e.cacheable||l-1;i0?this.clone(!0):this).get(),p(g[e])[b](d),f=f.concat(d);return this.pushStack(f,a,g.selector)}}),p.extend({clone:function(a,b,c){var d,e,f,g;p.support.html5Clone||p.isXMLDoc(a)||!bu.test("<"+a.nodeName+">")?g=a.cloneNode(!0):(bB.innerHTML=a.outerHTML,bB.removeChild(g=bB.firstChild));if((!p.support.noCloneEvent||!p.support.noCloneChecked)&&(a.nodeType===1||a.nodeType===11)&&!p.isXMLDoc(a)){bE(a,g),d=bF(a),e=bF(g);for(f=0;d[f];++f)e[f]&&bE(d[f],e[f])}if(b){bD(a,g);if(c){d=bF(a),e=bF(g);for(f=0;d[f];++f)bD(d[f],e[f])}}return d=e=null,g},clean:function(a,b,c,d){var f,g,h,i,j,k,l,m,n,o,q,r,s=0,t=[];if(!b||typeof b.createDocumentFragment=="undefined")b=e;for(g=b===e&&bA;(h=a[s])!=null;s++){typeof h=="number"&&(h+="");if(!h)continue;if(typeof h=="string")if(!br.test(h))h=b.createTextNode(h);else{g=g||bk(b),l=l||g.appendChild(b.createElement("div")),h=h.replace(bo,"<$1>"),i=(bp.exec(h)||["",""])[1].toLowerCase(),j=bz[i]||bz._default,k=j[0],l.innerHTML=j[1]+h+j[2];while(k--)l=l.lastChild;if(!p.support.tbody){m=bq.test(h),n=i==="table"&&!m?l.firstChild&&l.firstChild.childNodes:j[1]===""&&!m?l.childNodes:[];for(f=n.length-1;f>=0;--f)p.nodeName(n[f],"tbody")&&!n[f].childNodes.length&&n[f].parentNode.removeChild(n[f])}!p.support.leadingWhitespace&&bn.test(h)&&l.insertBefore(b.createTextNode(bn.exec(h)[0]),l.firstChild),h=l.childNodes,l=g.lastChild}h.nodeType?t.push(h):t=p.merge(t,h)}l&&(g.removeChild(l),h=l=g=null);if(!p.support.appendChecked)for(s=0;(h=t[s])!=null;s++)p.nodeName(h,"input")?bG(h):typeof h.getElementsByTagName!="undefined"&&p.grep(h.getElementsByTagName("input"),bG);if(c){q=function(a){if(!a.type||bx.test(a.type))return d?d.push(a.parentNode?a.parentNode.removeChild(a):a):c.appendChild(a)};for(s=0;(h=t[s])!=null;s++)if(!p.nodeName(h,"script")||!q(h))c.appendChild(h),typeof h.getElementsByTagName!="undefined"&&(r=p.grep(p.merge([],h.getElementsByTagName("script")),q),t.splice.apply(t,[s+1,0].concat(r)),s+=r.length)}return t},cleanData:function(a,b){var c,d,e,f,g=0,h=p.expando,i=p.cache,j=p.support.deleteExpando,k=p.event.special;for(;(e=a[g])!=null;g++)if(b||p.acceptData(e)){d=e[h],c=d&&i[d];if(c){if(c.events)for(f in c.events)k[f]?p.event.remove(e,f):p.removeEvent(e,f,c.handle);i[d]&&(delete i[d],j?delete e[h]:e.removeAttribute?e.removeAttribute(h):e[h]=null,p.deletedIds.push(d))}}}}),function(){var a,b;p.uaMatch=function(a){a=a.toLowerCase();var b=/(chrome)[ \/]([\w.]+)/.exec(a)||/(webkit)[ \/]([\w.]+)/.exec(a)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(a)||/(msie) ([\w.]+)/.exec(a)||a.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(a)||[];return{browser:b[1]||"",version:b[2]||"0"}},a=p.uaMatch(g.userAgent),b={},a.browser&&(b[a.browser]=!0,b.version=a.version),b.webkit&&(b.safari=!0),p.browser=b,p.sub=function(){function a(b,c){return new a.fn.init(b,c)}p.extend(!0,a,this),a.superclass=this,a.fn=a.prototype=this(),a.fn.constructor=a,a.sub=this.sub,a.fn.init=function c(c,d){return d&&d instanceof p&&!(d instanceof a)&&(d=a(d)),p.fn.init.call(this,c,d,b)},a.fn.init.prototype=a.fn;var b=a(e);return a}}();var bH,bI,bJ,bK=/alpha\([^)]*\)/i,bL=/opacity=([^)]*)/,bM=/^(top|right|bottom|left)$/,bN=/^margin/,bO=new RegExp("^("+q+")(.*)$","i"),bP=new RegExp("^("+q+")(?!px)[a-z%]+$","i"),bQ=new RegExp("^([-+])=("+q+")","i"),bR={},bS={position:"absolute",visibility:"hidden",display:"block"},bT={letterSpacing:0,fontWeight:400,lineHeight:1},bU=["Top","Right","Bottom","Left"],bV=["Webkit","O","Moz","ms"],bW=p.fn.toggle;p.fn.extend({css:function(a,c){return p.access(this,function(a,c,d){return d!==b?p.style(a,c,d):p.css(a,c)},a,c,arguments.length>1)},show:function(){return bZ(this,!0)},hide:function(){return bZ(this)},toggle:function(a,b){var c=typeof a=="boolean";return p.isFunction(a)&&p.isFunction(b)?bW.apply(this,arguments):this.each(function(){(c?a:bY(this))?p(this).show():p(this).hide()})}}),p.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=bH(a,"opacity");return c===""?"1":c}}}},cssNumber:{fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":p.support.cssFloat?"cssFloat":"styleFloat"},style:function(a,c,d,e){if(!a||a.nodeType===3||a.nodeType===8||!a.style)return;var f,g,h,i=p.camelCase(c),j=a.style;c=p.cssProps[i]||(p.cssProps[i]=bX(j,i)),h=p.cssHooks[c]||p.cssHooks[i];if(d===b)return h&&"get"in h&&(f=h.get(a,!1,e))!==b?f:j[c];g=typeof d,g==="string"&&(f=bQ.exec(d))&&(d=(f[1]+1)*f[2]+parseFloat(p.css(a,c)),g="number");if(d==null||g==="number"&&isNaN(d))return;g==="number"&&!p.cssNumber[i]&&(d+="px");if(!h||!("set"in h)||(d=h.set(a,d,e))!==b)try{j[c]=d}catch(k){}},css:function(a,c,d,e){var f,g,h,i=p.camelCase(c);return c=p.cssProps[i]||(p.cssProps[i]=bX(a.style,i)),h=p.cssHooks[c]||p.cssHooks[i],h&&"get"in h&&(f=h.get(a,!0,e)),f===b&&(f=bH(a,c)),f==="normal"&&c in bT&&(f=bT[c]),d||e!==b?(g=parseFloat(f),d||p.isNumeric(g)?g||0:f):f},swap:function(a,b,c){var d,e,f={};for(e in b)f[e]=a.style[e],a.style[e]=b[e];d=c.call(a);for(e in b)a.style[e]=f[e];return d}}),a.getComputedStyle?bH=function(a,b){var c,d,e,f,g=getComputedStyle(a,null),h=a.style;return g&&(c=g[b],c===""&&!p.contains(a.ownerDocument.documentElement,a)&&(c=p.style(a,b)),bP.test(c)&&bN.test(b)&&(d=h.width,e=h.minWidth,f=h.maxWidth,h.minWidth=h.maxWidth=h.width=c,c=g.width,h.width=d,h.minWidth=e,h.maxWidth=f)),c}:e.documentElement.currentStyle&&(bH=function(a,b){var c,d,e=a.currentStyle&&a.currentStyle[b],f=a.style;return e==null&&f&&f[b]&&(e=f[b]),bP.test(e)&&!bM.test(b)&&(c=f.left,d=a.runtimeStyle&&a.runtimeStyle.left,d&&(a.runtimeStyle.left=a.currentStyle.left),f.left=b==="fontSize"?"1em":e,e=f.pixelLeft+"px",f.left=c,d&&(a.runtimeStyle.left=d)),e===""?"auto":e}),p.each(["height","width"],function(a,b){p.cssHooks[b]={get:function(a,c,d){if(c)return a.offsetWidth!==0||bH(a,"display")!=="none"?ca(a,b,d):p.swap(a,bS,function(){return ca(a,b,d)})},set:function(a,c,d){return b$(a,c,d?b_(a,b,d,p.support.boxSizing&&p.css(a,"boxSizing")==="border-box"):0)}}}),p.support.opacity||(p.cssHooks.opacity={get:function(a,b){return bL.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=p.isNumeric(b)?"alpha(opacity="+b*100+")":"",f=d&&d.filter||c.filter||"";c.zoom=1;if(b>=1&&p.trim(f.replace(bK,""))===""&&c.removeAttribute){c.removeAttribute("filter");if(d&&!d.filter)return}c.filter=bK.test(f)?f.replace(bK,e):f+" "+e}}),p(function(){p.support.reliableMarginRight||(p.cssHooks.marginRight={get:function(a,b){return p.swap(a,{display:"inline-block"},function(){if(b)return bH(a,"marginRight")})}}),!p.support.pixelPosition&&p.fn.position&&p.each(["top","left"],function(a,b){p.cssHooks[b]={get:function(a,c){if(c){var d=bH(a,b);return bP.test(d)?p(a).position()[b]+"px":d}}}})}),p.expr&&p.expr.filters&&(p.expr.filters.hidden=function(a){return a.offsetWidth===0&&a.offsetHeight===0||!p.support.reliableHiddenOffsets&&(a.style&&a.style.display||bH(a,"display"))==="none"},p.expr.filters.visible=function(a){return!p.expr.filters.hidden(a)}),p.each({margin:"",padding:"",border:"Width"},function(a,b){p.cssHooks[a+b]={expand:function(c){var d,e=typeof c=="string"?c.split(" "):[c],f={};for(d=0;d<4;d++)f[a+bU[d]+b]=e[d]||e[d-2]||e[0];return f}},bN.test(a)||(p.cssHooks[a+b].set=b$)});var cc=/%20/g,cd=/\[\]$/,ce=/\r?\n/g,cf=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,cg=/^(?:select|textarea)/i;p.fn.extend({serialize:function(){return p.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?p.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||cg.test(this.nodeName)||cf.test(this.type))}).map(function(a,b){var c=p(this).val();return c==null?null:p.isArray(c)?p.map(c,function(a,c){return{name:b.name,value:a.replace(ce,"\r\n")}}):{name:b.name,value:c.replace(ce,"\r\n")}}).get()}}),p.param=function(a,c){var d,e=[],f=function(a,b){b=p.isFunction(b)?b():b==null?"":b,e[e.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};c===b&&(c=p.ajaxSettings&&p.ajaxSettings.traditional);if(p.isArray(a)||a.jquery&&!p.isPlainObject(a))p.each(a,function(){f(this.name,this.value)});else for(d in a)ch(d,a[d],c,f);return e.join("&").replace(cc,"+")};var ci,cj,ck=/#.*$/,cl=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,cm=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,cn=/^(?:GET|HEAD)$/,co=/^\/\//,cp=/\?/,cq=/)<[^<]*)*<\/script>/gi,cr=/([?&])_=[^&]*/,cs=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,ct=p.fn.load,cu={},cv={},cw=["*/"]+["*"];try{ci=f.href}catch(cx){ci=e.createElement("a"),ci.href="",ci=ci.href}cj=cs.exec(ci.toLowerCase())||[],p.fn.load=function(a,c,d){if(typeof a!="string"&&ct)return ct.apply(this,arguments);if(!this.length)return this;var e,f,g,h=this,i=a.indexOf(" ");return i>=0&&(e=a.slice(i,a.length),a=a.slice(0,i)),p.isFunction(c)?(d=c,c=b):typeof c=="object"&&(f="POST"),p.ajax({url:a,type:f,dataType:"html",data:c,complete:function(a,b){d&&h.each(d,g||[a.responseText,b,a])}}).done(function(a){g=arguments,h.html(e?p("
").append(a.replace(cq,"")).find(e):a)}),this},p.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){p.fn[b]=function(a){return this.on(b,a)}}),p.each(["get","post"],function(a,c){p[c]=function(a,d,e,f){return p.isFunction(d)&&(f=f||e,e=d,d=b),p.ajax({type:c,url:a,data:d,success:e,dataType:f})}}),p.extend({getScript:function(a,c){return p.get(a,b,c,"script")},getJSON:function(a,b,c){return p.get(a,b,c,"json")},ajaxSetup:function(a,b){return b?cA(a,p.ajaxSettings):(b=a,a=p.ajaxSettings),cA(a,b),a},ajaxSettings:{url:ci,isLocal:cm.test(cj[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded; charset=UTF-8",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":cw},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":a.String,"text html":!0,"text json":p.parseJSON,"text xml":p.parseXML},flatOptions:{context:!0,url:!0}},ajaxPrefilter:cy(cu),ajaxTransport:cy(cv),ajax:function(a,c){function y(a,c,f,i){var k,s,t,u,w,y=c;if(v===2)return;v=2,h&&clearTimeout(h),g=b,e=i||"",x.readyState=a>0?4:0,f&&(u=cB(l,x,f));if(a>=200&&a<300||a===304)l.ifModified&&(w=x.getResponseHeader("Last-Modified"),w&&(p.lastModified[d]=w),w=x.getResponseHeader("Etag"),w&&(p.etag[d]=w)),a===304?(y="notmodified",k=!0):(k=cC(l,u),y=k.state,s=k.data,t=k.error,k=!t);else{t=y;if(!y||a)y="error",a<0&&(a=0)}x.status=a,x.statusText=""+(c||y),k?o.resolveWith(m,[s,y,x]):o.rejectWith(m,[x,y,t]),x.statusCode(r),r=b,j&&n.trigger("ajax"+(k?"Success":"Error"),[x,l,k?s:t]),q.fireWith(m,[x,y]),j&&(n.trigger("ajaxComplete",[x,l]),--p.active||p.event.trigger("ajaxStop"))}typeof a=="object"&&(c=a,a=b),c=c||{};var d,e,f,g,h,i,j,k,l=p.ajaxSetup({},c),m=l.context||l,n=m!==l&&(m.nodeType||m instanceof p)?p(m):p.event,o=p.Deferred(),q=p.Callbacks("once memory"),r=l.statusCode||{},t={},u={},v=0,w="canceled",x={readyState:0,setRequestHeader:function(a,b){if(!v){var c=a.toLowerCase();a=u[c]=u[c]||a,t[a]=b}return this},getAllResponseHeaders:function(){return v===2?e:null},getResponseHeader:function(a){var c;if(v===2){if(!f){f={};while(c=cl.exec(e))f[c[1].toLowerCase()]=c[2]}c=f[a.toLowerCase()]}return c===b?null:c},overrideMimeType:function(a){return v||(l.mimeType=a),this},abort:function(a){return a=a||w,g&&g.abort(a),y(0,a),this}};o.promise(x),x.success=x.done,x.error=x.fail,x.complete=q.add,x.statusCode=function(a){if(a){var b;if(v<2)for(b in a)r[b]=[r[b],a[b]];else b=a[x.status],x.always(b)}return this},l.url=((a||l.url)+"").replace(ck,"").replace(co,cj[1]+"//"),l.dataTypes=p.trim(l.dataType||"*").toLowerCase().split(s),l.crossDomain==null&&(i=cs.exec(l.url.toLowerCase()),l.crossDomain=!(!i||i[1]==cj[1]&&i[2]==cj[2]&&(i[3]||(i[1]==="http:"?80:443))==(cj[3]||(cj[1]==="http:"?80:443)))),l.data&&l.processData&&typeof l.data!="string"&&(l.data=p.param(l.data,l.traditional)),cz(cu,l,c,x);if(v===2)return x;j=l.global,l.type=l.type.toUpperCase(),l.hasContent=!cn.test(l.type),j&&p.active++===0&&p.event.trigger("ajaxStart");if(!l.hasContent){l.data&&(l.url+=(cp.test(l.url)?"&":"?")+l.data,delete l.data),d=l.url;if(l.cache===!1){var z=p.now(),A=l.url.replace(cr,"$1_="+z);l.url=A+(A===l.url?(cp.test(l.url)?"&":"?")+"_="+z:"")}}(l.data&&l.hasContent&&l.contentType!==!1||c.contentType)&&x.setRequestHeader("Content-Type",l.contentType),l.ifModified&&(d=d||l.url,p.lastModified[d]&&x.setRequestHeader("If-Modified-Since",p.lastModified[d]),p.etag[d]&&x.setRequestHeader("If-None-Match",p.etag[d])),x.setRequestHeader("Accept",l.dataTypes[0]&&l.accepts[l.dataTypes[0]]?l.accepts[l.dataTypes[0]]+(l.dataTypes[0]!=="*"?", "+cw+"; q=0.01":""):l.accepts["*"]);for(k in l.headers)x.setRequestHeader(k,l.headers[k]);if(!l.beforeSend||l.beforeSend.call(m,x,l)!==!1&&v!==2){w="abort";for(k in{success:1,error:1,complete:1})x[k](l[k]);g=cz(cv,l,c,x);if(!g)y(-1,"No Transport");else{x.readyState=1,j&&n.trigger("ajaxSend",[x,l]),l.async&&l.timeout>0&&(h=setTimeout(function(){x.abort("timeout")},l.timeout));try{v=1,g.send(t,y)}catch(B){if(v<2)y(-1,B);else throw B}}return x}return x.abort()},active:0,lastModified:{},etag:{}});var cD=[],cE=/\?/,cF=/(=)\?(?=&|$)|\?\?/,cG=p.now();p.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var a=cD.pop()||p.expando+"_"+cG++;return this[a]=!0,a}}),p.ajaxPrefilter("json jsonp",function(c,d,e){var f,g,h,i=c.data,j=c.url,k=c.jsonp!==!1,l=k&&cF.test(j),m=k&&!l&&typeof i=="string"&&!(c.contentType||"").indexOf("application/x-www-form-urlencoded")&&cF.test(i);if(c.dataTypes[0]==="jsonp"||l||m)return f=c.jsonpCallback=p.isFunction(c.jsonpCallback)?c.jsonpCallback():c.jsonpCallback,g=a[f],l?c.url=j.replace(cF,"$1"+f):m?c.data=i.replace(cF,"$1"+f):k&&(c.url+=(cE.test(j)?"&":"?")+c.jsonp+"="+f),c.converters["script json"]=function(){return h||p.error(f+" was not called"),h[0]},c.dataTypes[0]="json",a[f]=function(){h=arguments},e.always(function(){a[f]=g,c[f]&&(c.jsonpCallback=d.jsonpCallback,cD.push(f)),h&&p.isFunction(g)&&g(h[0]),h=g=b}),"script"}),p.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(a){return p.globalEval(a),a}}}),p.ajaxPrefilter("script",function(a){a.cache===b&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),p.ajaxTransport("script",function(a){if(a.crossDomain){var c,d=e.head||e.getElementsByTagName("head")[0]||e.documentElement;return{send:function(f,g){c=e.createElement("script"),c.async="async",a.scriptCharset&&(c.charset=a.scriptCharset),c.src=a.url,c.onload=c.onreadystatechange=function(a,e){if(e||!c.readyState||/loaded|complete/.test(c.readyState))c.onload=c.onreadystatechange=null,d&&c.parentNode&&d.removeChild(c),c=b,e||g(200,"success")},d.insertBefore(c,d.firstChild)},abort:function(){c&&c.onload(0,1)}}}});var cH,cI=a.ActiveXObject?function(){for(var a in cH)cH[a](0,1)}:!1,cJ=0;p.ajaxSettings.xhr=a.ActiveXObject?function(){return!this.isLocal&&cK()||cL()}:cK,function(a){p.extend(p.support,{ajax:!!a,cors:!!a&&"withCredentials"in a})}(p.ajaxSettings.xhr()),p.support.ajax&&p.ajaxTransport(function(c){if(!c.crossDomain||p.support.cors){var d;return{send:function(e,f){var g,h,i=c.xhr();c.username?i.open(c.type,c.url,c.async,c.username,c.password):i.open(c.type,c.url,c.async);if(c.xhrFields)for(h in c.xhrFields)i[h]=c.xhrFields[h];c.mimeType&&i.overrideMimeType&&i.overrideMimeType(c.mimeType),!c.crossDomain&&!e["X-Requested-With"]&&(e["X-Requested-With"]="XMLHttpRequest");try{for(h in e)i.setRequestHeader(h,e[h])}catch(j){}i.send(c.hasContent&&c.data||null),d=function(a,e){var h,j,k,l,m;try{if(d&&(e||i.readyState===4)){d=b,g&&(i.onreadystatechange=p.noop,cI&&delete cH[g]);if(e)i.readyState!==4&&i.abort();else{h=i.status,k=i.getAllResponseHeaders(),l={},m=i.responseXML,m&&m.documentElement&&(l.xml=m);try{l.text=i.responseText}catch(a){}try{j=i.statusText}catch(n){j=""}!h&&c.isLocal&&!c.crossDomain?h=l.text?200:404:h===1223&&(h=204)}}}catch(o){e||f(-1,o)}l&&f(h,j,l,k)},c.async?i.readyState===4?setTimeout(d,0):(g=++cJ,cI&&(cH||(cH={},p(a).unload(cI)),cH[g]=d),i.onreadystatechange=d):d()},abort:function(){d&&d(0,1)}}}});var cM,cN,cO=/^(?:toggle|show|hide)$/,cP=new RegExp("^(?:([-+])=|)("+q+")([a-z%]*)$","i"),cQ=/queueHooks$/,cR=[cX],cS={"*":[function(a,b){var c,d,e,f=this.createTween(a,b),g=cP.exec(b),h=f.cur(),i=+h||0,j=1;if(g){c=+g[2],d=g[3]||(p.cssNumber[a]?"":"px");if(d!=="px"&&i){i=p.css(f.elem,a,!0)||c||1;do e=j=j||".5",i=i/j,p.style(f.elem,a,i+d),j=f.cur()/h;while(j!==1&&j!==e)}f.unit=d,f.start=i,f.end=g[1]?i+(g[1]+1)*c:c}return f}]};p.Animation=p.extend(cV,{tweener:function(a,b){p.isFunction(a)?(b=a,a=["*"]):a=a.split(" ");var c,d=0,e=a.length;for(;d-1,j={},k={},l,m;i?(k=e.position(),l=k.top,m=k.left):(l=parseFloat(g)||0,m=parseFloat(h)||0),p.isFunction(b)&&(b=b.call(a,c,f)),b.top!=null&&(j.top=b.top-f.top+l),b.left!=null&&(j.left=b.left-f.left+m),"using"in b?b.using.call(a,j):e.css(j)}},p.fn.extend({position:function(){if(!this[0])return;var a=this[0],b=this.offsetParent(),c=this.offset(),d=c$.test(b[0].nodeName)?{top:0,left:0}:b.offset();return c.top-=parseFloat(p.css(a,"marginTop"))||0,c.left-=parseFloat(p.css(a,"marginLeft"))||0,d.top+=parseFloat(p.css(b[0],"borderTopWidth"))||0,d.left+=parseFloat(p.css(b[0],"borderLeftWidth"))||0,{top:c.top-d.top,left:c.left-d.left}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||e.body;while(a&&!c$.test(a.nodeName)&&p.css(a,"position")==="static")a=a.offsetParent;return a||e.body})}}),p.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(a,c){var d=/Y/.test(c);p.fn[a]=function(e){return p.access(this,function(a,e,f){var g=c_(a);if(f===b)return g?c in g?g[c]:g.document.documentElement[e]:a[e];g?g.scrollTo(d?p(g).scrollLeft():f,d?f:p(g).scrollTop()):a[e]=f},a,e,arguments.length,null)}}),p.each({Height:"height",Width:"width"},function(a,c){p.each({padding:"inner"+a,content:c,"":"outer"+a},function(d,e){p.fn[e]=function(e,f){var g=arguments.length&&(d||typeof e!="boolean"),h=d||(e===!0||f===!0?"margin":"border");return p.access(this,function(c,d,e){var f;return p.isWindow(c)?c.document.documentElement["client"+a]:c.nodeType===9?(f=c.documentElement,Math.max(c.body["scroll"+a],f["scroll"+a],c.body["offset"+a],f["offset"+a],f["client"+a])):e===b?p.css(c,d,e,h):p.style(c,d,e,h)},c,g?e:b,g)}})}),a.jQuery=a.$=p,typeof define=="function"&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return p})})(window); /* Arquivo: jquery.autocomplete.js */ /* * Autocomplete - jQuery plugin 1.1pre * * Copyright (c) 2007 Dylan Verheul, Dan G. Switzer, Anjesh Tuladhar, Jörn Zaefferer * * Dual licensed under the MIT and GPL licenses: * http://www.opensource.org/licenses/mit-license.php * http://www.gnu.org/licenses/gpl.html * * Revision: $Id: jquery.autocomplete.js 5785 2008-07-12 10:37:33Z joern.zaefferer $ * */ ;(function($) { $.fn.extend({ autocomplete: function(urlOrData, options) { var isUrl = typeof urlOrData == "string"; options = $.extend({}, $.Autocompleter.defaults, { url: isUrl ? urlOrData : null, data: isUrl ? null : urlOrData, delay: isUrl ? $.Autocompleter.defaults.delay : 100, max: options && !options.scroll ? 10 : 150 }, options); // if highlight is set to false, replace it with a do-nothing function options.highlight = options.highlight || function(value) { return value; }; // if the formatMatch option is not specified, then use formatItem for backwards compatibility options.formatMatch = options.formatMatch || options.formatItem; return this.each(function() { new $.Autocompleter(this, options); }); }, result: function(handler) { return this.bind("result", handler); }, search: function(handler) { return this.trigger("search", [handler]); }, flushCache: function() { return this.trigger("flushCache"); }, setOptions: function(options){ return this.trigger("setOptions", [options]); }, unautocomplete: function() { return this.trigger("unautocomplete"); } }); $.Autocompleter = function(input, options) { var KEY = { UP: 38, DOWN: 40, DEL: 46, TAB: 9, RETURN: 13, ESC: 27, COMMA: 188, PAGEUP: 33, PAGEDOWN: 34, BACKSPACE: 8 }; // Create $ object for input element var $input = $(input).attr("autocomplete", "off").addClass(options.inputClass); var timeout; var previousValue = ""; var cache = $.Autocompleter.Cache(options); var hasFocus = 0; var lastKeyPressCode; var config = { mouseDownOnSelect: false }; var select = $.Autocompleter.Select(options, input, selectCurrent, config); var blockSubmit; // prevent form submit in opera when selecting with return key $.browser.opera && $(input.form).bind("submit.autocomplete", function() { if (blockSubmit) { blockSubmit = false; return false; } }); // only opera doesn't trigger keydown multiple times while pressed, others don't work with keypress at all $input.bind(($.browser.opera ? "keypress" : "keydown") + ".autocomplete", function(event) { // track last key pressed lastKeyPressCode = event.keyCode; switch(event.keyCode) { case KEY.UP: event.preventDefault(); if ( select.visible() ) { select.prev(); } else { onChange(0, true); } break; case KEY.DOWN: event.preventDefault(); if ( select.visible() ) { select.next(); } else { onChange(0, true); } break; case KEY.PAGEUP: event.preventDefault(); if ( select.visible() ) { select.pageUp(); } else { onChange(0, true); } break; case KEY.PAGEDOWN: event.preventDefault(); if ( select.visible() ) { select.pageDown(); } else { onChange(0, true); } break; // matches also semicolon case options.multiple && $.trim(options.multipleSeparator) == "," && KEY.COMMA: case KEY.TAB: case KEY.RETURN: if( selectCurrent() ) { // stop default to prevent a form submit, Opera needs special handling event.preventDefault(); blockSubmit = true; return false; } break; case KEY.ESC: select.hide(); break; default: clearTimeout(timeout); timeout = setTimeout(onChange, options.delay); break; } }).focus(function(){ // track whether the field has focus, we shouldn't process any // results if the field no longer has focus hasFocus++; }).blur(function() { hasFocus = 0; if (!config.mouseDownOnSelect) { hideResults(); } }).click(function() { // show select when clicking in a focused field if ( hasFocus++ > 1 && !select.visible() ) { onChange(0, true); } }).bind("search", function() { // TODO why not just specifying both arguments? var fn = (arguments.length > 1) ? arguments[1] : null; function findValueCallback(q, data) { var result; if( data && data.length ) { for (var i=0; i < data.length; i++) { if( data[i].result.toLowerCase() == q.toLowerCase() ) { result = data[i]; break; } } } if( typeof fn == "function" ) fn(result); else $input.trigger("result", result && [result.data, result.value]); } $.each(trimWords($input.val()), function(i, value) { request(value, findValueCallback, findValueCallback); }); }).bind("flushCache", function() { cache.flush(); }).bind("setOptions", function() { $.extend(options, arguments[1]); // if we've updated the data, repopulate if ( "data" in arguments[1] ) cache.populate(); }).bind("unautocomplete", function() { select.unbind(); $input.unbind(); $(input.form).unbind(".autocomplete"); }); function selectCurrent() { var selected = select.selected(); if( !selected ) return false; var v = selected.result; previousValue = v; if ( options.multiple ) { var words = trimWords($input.val()); if ( words.length > 1 ) { v = words.slice(0, words.length - 1).join( options.multipleSeparator ) + options.multipleSeparator + v; } v += options.multipleSeparator; } $input.val(v); hideResultsNow(); $input.trigger("result", [selected.data, selected.value]); return true; } function onChange(crap, skipPrevCheck) { if( lastKeyPressCode == KEY.DEL ) { select.hide(); return; } var currentValue = $input.val(); if ( !skipPrevCheck && currentValue == previousValue ) return; previousValue = currentValue; currentValue = lastWord(currentValue); if ( currentValue.length >= options.minChars) { $input.addClass(options.loadingClass); if (!options.matchCase) currentValue = currentValue.toLowerCase(); request(currentValue, receiveData, hideResultsNow); } else { stopLoading(); select.hide(); } }; function trimWords(value) { if ( !value ) { return [""]; } var words = value.split( options.multipleSeparator ); var result = []; $.each(words, function(i, value) { if ( $.trim(value) ) result[i] = $.trim(value); }); return result; } function lastWord(value) { if ( !options.multiple ) return value; var words = trimWords(value); return words[words.length - 1]; } // fills in the input box w/the first match (assumed to be the best match) // q: the term entered // sValue: the first matching result function autoFill(q, sValue){ // autofill in the complete box w/the first match as long as the user hasn't entered in more data // if the last user key pressed was backspace, don't autofill if( options.autoFill && (lastWord($input.val()).toLowerCase() == q.toLowerCase()) && lastKeyPressCode != KEY.BACKSPACE ) { // fill in the value (keep the case the user has typed) $input.val($input.val() + sValue.substring(lastWord(previousValue).length)); // select the portion of the value not typed by the user (so the next character will erase) $.Autocompleter.Selection(input, previousValue.length, previousValue.length + sValue.length); } }; function hideResults() { clearTimeout(timeout); timeout = setTimeout(hideResultsNow, 200); }; function hideResultsNow() { var wasVisible = select.visible(); select.hide(); clearTimeout(timeout); stopLoading(); if (options.mustMatch) { // call search and run callback $input.search( function (result){ // if no value found, clear the input box if( !result ) { if (options.multiple) { var words = trimWords($input.val()).slice(0, -1); $input.val( words.join(options.multipleSeparator) + (words.length ? options.multipleSeparator : "") ); } else $input.val( "" ); } } ); } if (wasVisible) // position cursor at end of input field $.Autocompleter.Selection(input, input.value.length, input.value.length); }; function receiveData(q, data) { if ( data && data.length && hasFocus ) { stopLoading(); select.display(data, q); autoFill(q, data[0].value); select.show(); } else { hideResultsNow(); } }; function request(term, success, failure) { if (!options.matchCase) term = term.toLowerCase(); var data = cache.load(term); // recieve the cached data if (data && data.length) { success(term, data); // if an AJAX url has been supplied, try loading the data now } else if( (typeof options.url == "string") && (options.url.length > 0) ){ var extraParams = { timestamp: +new Date() }; $.each(options.extraParams, function(key, param) { extraParams[key] = typeof param == "function" ? param() : param; }); $.ajax({ // try to leverage ajaxQueue plugin to abort previous requests mode: "abort", // limit abortion to this input port: "autocomplete" + input.name, dataType: options.dataType, url: options.url, data: $.extend({ q: lastWord(term), limit: options.max }, extraParams), success: function(data) { var parsed = options.parse && options.parse(data) || parse(data); cache.add(term, parsed); success(term, parsed); } }); } else { // if we have a failure, we need to empty the list -- this prevents the the [TAB] key from selecting the last successful match select.emptyList(); failure(term); } }; function parse(data) { var parsed = []; var rows = data.split("\n"); for (var i=0; i < rows.length; i++) { var row = $.trim(rows[i]); if (row) { row = row.split("|"); parsed[parsed.length] = { data: row, value: row[0], result: options.formatResult && options.formatResult(row, row[0]) || row[0] }; } } return parsed; }; function stopLoading() { $input.removeClass(options.loadingClass); }; }; $.Autocompleter.defaults = { inputClass: "ac_input", resultsClass: "ac_results", loadingClass: "ac_loading", minChars: 1, delay: 400, matchCase: false, matchSubset: true, matchContains: false, cacheLength: 10, max: 100, mustMatch: false, extraParams: {}, selectFirst: true, formatItem: function(row) { return row[0]; }, formatMatch: null, autoFill: false, width: 0, multiple: false, multipleSeparator: ", ", highlight: function(value, term) { return value.replace(new RegExp("(?![^&;]+;)(?!<[^<>]*)(" + term.replace(/([\^\$\(\)\[\]\{\}\*\.\+\?\|\\])/gi, "\\$1") + ")(?![^<>]*>)(?![^&;]+;)", "gi"), "$1"); }, scroll: true, scrollHeight: 180 }; $.Autocompleter.Cache = function(options) { var data = {}; var length = 0; function matchSubset(s, sub) { if (!options.matchCase) s = s.toLowerCase(); var i = s.indexOf(sub); if (options.matchContains == "word"){ i = s.toLowerCase().search("\\b" + sub.toLowerCase()); } if (i == -1) return false; return i == 0 || options.matchContains; }; function add(q, value) { if (length > options.cacheLength){ flush(); } if (!data[q]){ length++; } data[q] = value; } function populate(){ if( !options.data ) return false; // track the matches var stMatchSets = {}, nullData = 0; // no url was specified, we need to adjust the cache length to make sure it fits the local data store if( !options.url ) options.cacheLength = 1; // track all options for minChars = 0 stMatchSets[""] = []; // loop through the array and create a lookup structure for ( var i = 0, ol = options.data.length; i < ol; i++ ) { var rawValue = options.data[i]; // if rawValue is a string, make an array otherwise just reference the array rawValue = (typeof rawValue == "string") ? [rawValue] : rawValue; var value = options.formatMatch(rawValue, i+1, options.data.length); if ( value === false ) continue; var firstChar = value.charAt(0).toLowerCase(); // if no lookup array for this character exists, look it up now if( !stMatchSets[firstChar] ) stMatchSets[firstChar] = []; // if the match is a string var row = { value: value, data: rawValue, result: options.formatResult && options.formatResult(rawValue) || value }; // push the current match into the set list stMatchSets[firstChar].push(row); // keep track of minChars zero items if ( nullData++ < options.max ) { stMatchSets[""].push(row); } }; // add the data items to the cache $.each(stMatchSets, function(i, value) { // increase the cache size options.cacheLength++; // add to the cache add(i, value); }); } // populate any existing data setTimeout(populate, 25); function flush(){ data = {}; length = 0; } return { flush: flush, add: add, populate: populate, load: function(q) { if (!options.cacheLength || !length) return null; /* * if dealing w/local data and matchContains than we must make sure * to loop through all the data collections looking for matches */ if( !options.url && options.matchContains ){ // track all matches var csub = []; // loop through all the data grids for matches for( var k in data ){ // don't search through the stMatchSets[""] (minChars: 0) cache // this prevents duplicates if( k.length > 0 ){ var c = data[k]; $.each(c, function(i, x) { // if we've got a match, add it to the array if (matchSubset(x.value, q)) { csub.push(x); } }); } } return csub; } else // if the exact item exists, use it if (data[q]){ return data[q]; } else if (options.matchSubset) { for (var i = q.length - 1; i >= options.minChars; i--) { var c = data[q.substr(0, i)]; if (c) { var csub = []; $.each(c, function(i, x) { if (matchSubset(x.value, q)) { csub[csub.length] = x; } }); return csub; } } } return null; } }; }; $.Autocompleter.Select = function (options, input, select, config) { var CLASSES = { ACTIVE: "ac_over" }; var listItems, active = -1, data, term = "", needsInit = true, element, list; // Create results function init() { if (!needsInit) return; element = $("
") .hide() .addClass(options.resultsClass) .css("position", "absolute") .appendTo(document.body); list = $("
    ").appendTo(element).mouseover( function(event) { if(target(event).nodeName && target(event).nodeName.toUpperCase() == 'LI') { active = $("li", list).removeClass(CLASSES.ACTIVE).index(target(event)); $(target(event)).addClass(CLASSES.ACTIVE); } }).click(function(event) { $(target(event)).addClass(CLASSES.ACTIVE); select(); // TODO provide option to avoid setting focus again after selection? useful for cleanup-on-focus input.focus(); return false; }).mousedown(function() { config.mouseDownOnSelect = true; }).mouseup(function() { config.mouseDownOnSelect = false; }); if( options.width > 0 ) element.css("width", options.width); needsInit = false; } function target(event) { var element = event.target; while(element && element.tagName != "LI") element = element.parentNode; // more fun with IE, sometimes event.target is empty, just ignore it then if(!element) return []; return element; } function moveSelect(step) { listItems.slice(active, active + 1).removeClass(CLASSES.ACTIVE); movePosition(step); var activeItem = listItems.slice(active, active + 1).addClass(CLASSES.ACTIVE); if(options.scroll) { var offset = 0; listItems.slice(0, active).each(function() { offset += this.offsetHeight; }); if((offset + activeItem[0].offsetHeight - list.scrollTop()) > list[0].clientHeight) { list.scrollTop(offset + activeItem[0].offsetHeight - list.innerHeight()); } else if(offset < list.scrollTop()) { list.scrollTop(offset); } } }; function movePosition(step) { active += step; if (active < 0) { active = listItems.size() - 1; } else if (active >= listItems.size()) { active = 0; } } function limitNumberOfItems(available) { return options.max && options.max < available ? options.max : available; } function fillList() { list.empty(); var max = limitNumberOfItems(data.length); for (var i=0; i < max; i++) { if (!data[i]) continue; var formatted = options.formatItem(data[i].data, i+1, max, data[i].value, term); if ( formatted === false ) continue; var li = $("
  • ").html( options.highlight(formatted, term) ).addClass(i%2 == 0 ? "ac_even" : "ac_odd").appendTo(list)[0]; $.data(li, "ac_data", data[i]); } listItems = list.find("li"); if ( options.selectFirst ) { listItems.slice(0, 1).addClass(CLASSES.ACTIVE); active = 0; } // apply bgiframe if available if ( $.fn.bgiframe ) list.bgiframe(); } return { display: function(d, q) { init(); data = d; term = q; fillList(); }, next: function() { moveSelect(1); }, prev: function() { moveSelect(-1); }, pageUp: function() { if (active != 0 && active - 8 < 0) { moveSelect( -active ); } else { moveSelect(-8); } }, pageDown: function() { if (active != listItems.size() - 1 && active + 8 > listItems.size()) { moveSelect( listItems.size() - 1 - active ); } else { moveSelect(8); } }, hide: function() { element && element.hide(); listItems && listItems.removeClass(CLASSES.ACTIVE); active = -1; }, visible : function() { return element && element.is(":visible"); }, current: function() { return this.visible() && (listItems.filter("." + CLASSES.ACTIVE)[0] || options.selectFirst && listItems[0]); }, show: function() { var offset = $(input).offset(); element.css({ width: typeof options.width == "string" || options.width > 0 ? options.width : $(input).width(), top: offset.top + input.offsetHeight, left: offset.left }).show(); if(options.scroll) { list.scrollTop(0); list.css({ maxHeight: options.scrollHeight, overflow: 'auto' }); if($.browser.msie && typeof document.body.style.maxHeight === "undefined") { var listHeight = 0; listItems.each(function() { listHeight += this.offsetHeight; }); var scrollbarsVisible = listHeight > options.scrollHeight; list.css('height', scrollbarsVisible ? options.scrollHeight : listHeight ); if (!scrollbarsVisible) { // IE doesn't recalculate width when scrollbar disappears listItems.width( list.width() - parseInt(listItems.css("padding-left")) - parseInt(listItems.css("padding-right")) ); } } } }, selected: function() { var selected = listItems && listItems.filter("." + CLASSES.ACTIVE).removeClass(CLASSES.ACTIVE); return selected && selected.length && $.data(selected[0], "ac_data"); }, emptyList: function (){ list && list.empty(); }, unbind: function() { element && element.remove(); } }; }; $.Autocompleter.Selection = function(field, start, end) { if( field.createTextRange ){ var selRange = field.createTextRange(); selRange.collapse(true); selRange.moveStart("character", start); selRange.moveEnd("character", end); selRange.select(); } else if( field.setSelectionRange ){ field.setSelectionRange(start, end); } else { if( field.selectionStart ){ field.selectionStart = start; field.selectionEnd = end; } } field.focus(); }; })(jQuery); /* Arquivo: jquery.carouFredSel-4.5.2-packed.js */ /* * jQuery carouFredSel 4.5.2 * Demo's and documentation: * caroufredsel.frebsite.nl * * Copyright (c) 2011 Fred Heusschen * www.frebsite.nl * * Dual licensed under the MIT and GPL licenses. * http://en.wikipedia.org/wiki/MIT_License * http://en.wikipedia.org/wiki/GNU_General_Public_License */ eval(function(p,a,c,k,e,r){e=function(c){return(c35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('(y($){7($.1y.1t)B;$.1y.1t=y(o){7(11.Y==0){K(C,\'4q 5r 5s 1u "\'+11.5t+\'".\');B 11}7(11.Y>1){B 11.1N(y(){$(11).1t(o)})}9 r=11,$13=11[0];r.3K=y(o,b,c){9 e=[\'8\',\'14\',\'L\',\'S\',\'T\',\'Z\'];o=34($13,o);1u(9 a=0,l=e.Y;az.8.J){6.8.D=z.8.J}}7(A 6.X==\'1o\'){6.X=0}7(A 6.1g==\'1o\'){6.1g=(6[6.d[\'G\']]==\'18\')?I:\'2G\'}6.8.1E=6.8.D;6.15=I;6.X=4t(6.X);7(6.1g==\'2b\')6.1g=\'19\';7(6.1g==\'3S\')6.1g=\'2c\';1h(6.1g){F\'2G\':F\'19\':F\'2c\':7(6[6.d[\'G\']]!=\'18\'){9 p=3h(2p(h,6),6);6.15=C;6.X[6.d[1]]=p[1];6.X[6.d[3]]=p[0]}V;2d:6.1g=I;6.15=(6.X[0]==0&&6.X[1]==0&&6.X[2]==0&&6.X[3]==0)?I:C;V}7(A 6.8.2q!=\'U\')6.8.2q=6.8.D;7(A 6.14.8!=\'U\')6.14.8=(6.1C)?\'18\':6.8.D;7(A 6.14.1d!=\'U\')6.14.1d=5x;6.L=2K($13,6.L,I,C);6.S=2K($13,6.S);6.T=2K($13,6.T);6.Z=2K($13,6.Z,C);6.L=$.1U(C,{},6.14,6.L);6.S=$.1U(C,{},6.14,6.S);6.T=$.1U(C,{},6.14,6.T);6.Z=$.1U(C,{},6.14,6.Z);7(A 6.Z.3i!=\'1a\')6.Z.3i=I;7(A 6.Z.3T!=\'y\')6.Z.3T=$.1y.1t.4u;7(A 6.L.1i!=\'1a\')6.L.1i=C;7(A 6.L.3U!=\'U\')6.L.3U=0;7(A 6.L.2e!=\'U\')6.L.2e=(6.L.1d<10)?5y:6.L.1d*5;7(6.L.4v){K(C,\'4w.4v-5z 1D 5A 5B 5C.\')}7(6.1F){6.1F=3V(6.1F)}7(6.K){K(C,\'3j G: \'+6.G);K(C,\'3j 17: \'+6.17);7(6[6.d[\'G\']]==\'18\')K(C,\'5D \'+6.d[\'G\']+\': \'+6.3g);K(C,\'4x 5E: \'+6.8.G);K(C,\'4x 5F: \'+6.8.17);K(C,\'3k 2I 8 D: \'+6.8.D);7(6.L.1i)K(C,\'3k 2I 8 3W 5G: \'+6.L.8);7(6.S.12)K(C,\'3k 2I 8 3W 4y: \'+6.S.8);7(6.T.12)K(C,\'3k 2I 8 3W 4z: \'+6.T.8)}};r.4A=y(){7(r.O(\'1W\')==\'3l\'||r.O(\'1W\')==\'5H\'){K(6.K,\'5I 5J-5K "1W" 5L 5M "5N" 4B "4C".\')}9 a={\'3X\':r.O(\'3X\'),\'1W\':r.O(\'1W\'),\'2b\':r.O(\'2b\'),\'2c\':r.O(\'2c\'),\'3S\':r.O(\'3S\'),\'19\':r.O(\'19\'),\'G\':r.O(\'G\'),\'17\':r.O(\'17\'),\'3Y\':r.O(\'3Y\'),\'1f\':r.O(\'1f\'),\'3a\':r.O(\'3a\'),\'3Z\':r.O(\'3Z\')};w.O(a).O({\'5O\':\'41\',\'1W\':(a.1W==\'3l\')?\'3l\':\'4C\'});r.1j(\'4D\',a).O({\'3X\':\'42\',\'1W\':\'3l\',\'2b\':0,\'19\':0,\'3Y\':0,\'1f\':0,\'3a\':0,\'3Z\':0});7(6.15){r.M().1N(y(){9 m=1X($(11).O(6.d[\'1f\']));7(2f(m))m=0;$(11).1j(\'1v\',m)})}};r.4E=y(){r.43();r.W(\'1G.Q\'+N,y(e){e.1k();r.H(\'1Y\');6.L.1i=I;z.1Z=\'44\'});r.W(\'5P.Q\'+N,y(e){});r.W(\'1Y.Q\'+N,y(e,g){e.1k();7(A g==\'1a\'){K(C,\'5Q a 4F 5R 1D 2n, 2o 2L "1G" 2M 1H.\');r.H(\'1G\');B}z.1Z=C;7(1q.3m.L!=1A)5S(1q.3m.L);7(1q.2g.L!=1A)4G(1q.2g.L);7(1q.2g.3n!=1A)4G(1q.2g.3n);9 a=6.L.2e-1q.2r,2h=3o-1z.2s(a*3o/6.L.2e);7(2h!=0){7(6.L.4H)6.L.4H.1b($13,2h,a)}});r.W(\'1i.Q\'+N,y(e,b,c,d){e.1k();r.H(\'1Y\');9 v=[b,c,d],t=[\'1e\',\'U\',\'1a\'],a=2t(v,t);9 b=a[0],c=a[1],d=a[2];7(b!=\'S\'&&b!=\'T\')b=z.1O;7(A c!=\'U\')c=0;7(d)6.L.1i=C;7(!6.L.1i){B e.1Q()}z.1Z=I;9 f=6.L.2e-1q.2r,4I=f+c;2h=3o-1z.2s(f*3o/6.L.2e);1q.3m.L=3p(y(){7(z.20){r.H(\'1i\',b)}E{1q.2r=0;r.H(b,6.L)}},4I);7(6.L.2u===\'5T\'){1q.2g.L=5U(y(){1q.2r+=50},50)}7(6.L.4J&&2h==0){6.L.4J.1b($13,2h,f)}7(6.L.4K){1q.2g.3n=3p(y(){6.L.4K.1b($13,2h,f)},c)}});r.W(\'S.Q\'+N+\' T.Q\'+N,y(e,b,f,g){e.1k();7(z.1Z==\'44\'||r.1D(\':41\')){e.1Q();B K(6.K,\'3j 44 4B 41: 1P 2N.\')}9 v=[b,f,g],t=[\'1l\',\'U/1e\',\'y\'],a=2t(v,t);9 b=a[0],f=a[1],g=a[2];7(A b!=\'1l\'||b==1A)b=6[e.2i];7(A g==\'y\')b.2O=g;7(A f!=\'U\'){7(f==\'D\'){7(!6.1C)f=6.8.D}E{7(A b.8==\'U\')f=b.8;E 7(A 6[e.2i].8==\'U\')f=6[e.2i].8;E 7(6.1C)f=\'D\';E f=6.8.D}}7(b.1d>0){7(z.20){7(b.1m)r.H(\'1m\',[e.2i,[b,f,g]]);e.1Q();B K(6.K,\'3j 5V 2N.\')}7(6.8.2q>=z.8.J){e.1Q();B K(6.K,\'1P 4L 8 (\'+z.8.J+\', \'+6.8.2q+\' 4M): 1P 2N.\')}}1q.2r=0;7(b.45&&!b.45.1b($13)){e.1Q();B K(6.K,\'5W "45" 5X I.\')}r.H(\'4N\'+e.2i,[b,f]);7(6.1F){9 s=6.1F,c=[b,f];1u(9 j=0,l=s.Y;j=z.8.J)z.8.P-=z.8.J;7(!6.1B){7(z.8.P==0&&d.3q)d.3q.1b($13);7(!6.2w)21(6,z.8.P)}r.M().16(z.8.J-f).5Z(r);7(z.8.J<6.8.D+f){r.M().16(0,(6.8.D+f)-z.8.J).3r(C).2R(r)}9 g=r.M(),1R=4P(g,6,f),1w=4Q(g,6),2j=g.1I(f-1),22=1R.2k(),2l=1w.2k();7(6.15)1r(g,6);7(6.1g)9 p=3h(1w,6);7(d.1p==\'4R\'&&6.8.1E0){r.M().16(z.8.J).1s();1R=r.M().16(z.8.J-(o-a)).4S().60(r.M().16(0,a).4S())}7(i)i.3x();7(6.15){9 b=r.M().1I(6.8.D+o-1);b.O(6.d[\'1f\'],b.1j(\'1v\'))}9 c=y(){7(d.2O){d.2O.1b($13,1R,1w,1J)}1h(d.1p){F\'25\':F\'1K\':r.O(\'4T\',\'\');V}7(1m.Y){3p(y(){r.H(1m[0][0],1m[0][1]);1m.4U()},1)}};1h(d.1p){F\'25\':F\'1L\':1S(d,r,1,3w,c);V;2d:c();V}}});r.H(\'2m\',[I,1J]).H(\'1i\',R)});r.W(\'61.Q\'+N,y(e,f,g){e.1k();9 h=r.M();7(!6.1B){7(z.8.P==6.8.D){7(6.2w){r.H(\'S\',z.8.J-1)}B e.1Q()}}7(6.15)1r(h,6);7(6.1C){7(A g!=\'U\'){g=6.8.D}}9 i=(z.8.P==0)?z.8.J:z.8.P;7(!6.1B){7(6.1C){9 j=2J(h,6,g),4b=46(h,6,i-1)}E{9 j=6.8.D,4b=6.8.D}7(g+j>i){g=i-4b}}7(6.1C){9 j=4c(h,6,g,i);2Q(6.8.D-g>=j&&g0){r.M().16(z.8.J).1s()}9 b=r.M().16(0,q).2R(r).2k();7(a>0){1w=2p(h,6)}7(k)k.3x();7(6.15){7(z.8.J<6.8.D+q){9 c=r.M().1I(6.8.D-1);c.O(6.d[\'1f\'],c.1j(\'1v\')+6.X[6.d[3]])}b.O(6.d[\'1f\'],b.1j(\'1v\'))}9 d=y(){7(f.2O){f.2O.1b($13,1R,1w,1J)}1h(f.1p){F\'25\':F\'1K\':r.O(\'4T\',\'\');V}7(1m.Y){3p(y(){r.H(1m[0][0],1m[0][1]);1m.4U()},1)}};1h(f.1p){F\'25\':F\'1L\':1S(f,r,1,3w,d);V;2d:d();V}}});r.H(\'2m\',[I,1J]).H(\'1i\',R)});r.W(\'2A.Q\'+N,y(e,b,c,d,f,g){e.1k();9 v=[b,c,d,f,g],t=[\'1e/U/1l\',\'U\',\'1a\',\'1l\',\'1e\'],a=2t(v,t);9 f=a[3],g=a[4];b=2U(a[0],a[1],a[2],z.8,r);7(b==0)B;7(A f!=\'1l\')f=I;7(z.20){7(A f!=\'1l\'||f.1d>0)B}7(g!=\'S\'&&g!=\'T\'){7(6.1B){7(b<=z.8.J/2)g=\'T\';E g=\'S\'}E{7(z.8.P==0||z.8.P>b)g=\'T\';E g=\'S\'}}7(g==\'S\')r.H(\'S\',[f,z.8.J-b]);E r.H(\'T\',[f,b])});r.W(\'4W.Q\'+N,y(e){7(z.8.P>0){r.62(r.M().16(z.8.P))}});r.W(\'1F.Q\'+N,y(e,s){7(s)s=3V(s);E 7(6.1F)s=6.1F;E B K(6.K,\'4q 4F 3e 1F.\');9 n=r.2P(\'2V\');1u(9 j=0,l=s.Y;j=z.8.J)z.8.P-=z.8.J;9 h=r.M().1I(c);7(h.Y){h[2Y](b)}E{r.4Y(b)}z.8.J=r.M().Y;r.H(\'2Z\');9 i=31(r,6);2B(6,z.8.J);21(6,z.8.P);r.H(\'2m\',[C,i])});r.W(\'65.Q\'+N,y(e,b,c,d){e.1k();9 v=[b,c,d],t=[\'1e/U/1l\',\'1a\',\'U\'],a=2t(v,t);9 b=a[0],c=a[1],d=a[2];7(A b==\'1o\'||b==\'3y\'){r.M().2k().1s()}E{b=2U(b,d,c,z.8,r);9 f=r.M().1I(b);7(f.Y){7(bb)c=b;7(A a==\'y\')a.1b($13,c);B c});r.W(\'67.Q\'+N,y(e,a){e.1k();$i=2p(r.M(),6);7(A a==\'y\')a.1b($13,$i);B $i});r.W(\'1Z.Q\'+N,y(e,a){e.1k();7(A a==\'y\')a.1b($13,z.1Z);B z.1Z});r.W(\'2v.Q\'+N,y(e,a,b,c){e.1k();9 d=I;7(A a==\'y\'){a.1b($13,6)}E 7(A a==\'1l\'){29=$.1U(C,{},29,a);7(b!==I)d=C;E 6=$.1U(C,{},6,a)}E 7(A a!=\'1o\'){7(A b==\'y\'){9 f=3z(\'6.\'+a);7(A f==\'1o\')f=\'\';b.1b($13,f)}E 7(A b!=\'1o\'){7(A c!==\'1a\')c=C;3z(\'29.\'+a+\' = b\');7(c!==I)d=C;E 3z(\'6.\'+a+\' = b\')}E{B 3z(\'6.\'+a)}}7(d){1r(r.M(),6);r.3K(29);9 g=31(r,6);2B(6,z.8.J);21(6,z.8.P);r.H(\'2m\',[C,g])}B 6});r.W(\'2Z.Q\'+N,y(e,a,b){e.1k();7(A a==\'1o\'||a.Y==0)a=$(\'68\');E 7(A a==\'1e\')a=$(a);7(A a!=\'1l\')B K(6.K,\'1P a 3R 1l.\');7(A b!=\'1e\'||b.Y==0)b=\'a.51\';a.69(b).1N(y(){9 h=11.52||\'\';7(h.Y>0&&r.M().53($(h))!=-1){$(11).26(\'4f\').4f(y(e){e.1T();r.H(\'2A\',h)})}})});r.W(\'2m.Q\'+N,y(e,b,c){e.1k();7(!6.Z.1c)B;7(A b==\'1a\'&&b){6.Z.1c.M().1s();1u(9 a=0,l=1z.2s(z.8.J/6.8.D);a0){e.1T();3D=(A 6.S.1M==\'U\')?6.S.1M:1A;r.H(\'S\',3D)}})}7(6.T.1M){w.1M(y(e,a){7(a<0){e.1T();3D=(A 6.T.1M==\'U\')?6.T.1M:1A;r.H(\'T\',3D)}})}}7($.1y.56){9 b=(6.S.4h)?y(){r.H(\'S\')}:1A,33=(6.T.4h)?y(){r.H(\'T\')}:1A;7(33||33){9 c={\'6b\':30,\'6c\':30,\'6d\':C};1h(6.1O){F\'3M\':F\'57\':c.6e=33;c.6f=b;V;2d:c.6g=33;c.6h=b}w.56(c)}}7(6.Z.1c){7(6.Z.2u){6.Z.1c.W(\'3B.Q\'+N,y(){r.H(\'1Y\')}).W(\'3C.Q\'+N,y(){r.H(\'1i\')})}}7(6.S.27||6.T.27){$(4i).W(\'59.Q\'+N,y(e){9 k=e.5a;7(k==6.T.27){e.1T();r.H(\'T\')}7(k==6.S.27){e.1T();r.H(\'S\')}})}7(6.Z.3i){$(4i).W(\'59.Q\'+N,y(e){9 k=e.5a;7(k>=49&&k<58){k=(k-49)*6.8.D;7(k<=z.8.J){e.1T();r.H(\'2A\',[k,0,C,6.Z])}}})}7(6.L.1i){r.H(\'1i\',6.L.3U)}};r.4g=y(){$(4i).26(\'.Q\'+N);w.26(\'.Q\'+N);7(6.S.12)6.S.12.26(\'.Q\'+N);7(6.T.12)6.T.12.26(\'.Q\'+N);7(6.Z.1c)6.Z.1c.26(\'.Q\'+N);2B(6,\'2S\');21(6,\'32\');7(6.Z.1c){6.Z.1c.M().1s()}};r.2v=y(a,b){K(C,\'2F "2v" 3E 3F 1D 2n, 2o 2L "2v" 2M 1H.\');9 c=I;9 d=y(a){c=a};7(!a)a=d;7(!b)b=d;r.H(\'2v\',[a,b]);B c};r.5b=y(){K(C,\'2F "5b" 3E 3F 1D 2n, 2o 2L "2V" 2M 1H.\');B r.2P(\'2V\')};r.2C=y(){K(C,\'2F "2C" 3E 3F 1D 2n, 2o 2L "2C" 2M 1H.\');r.H(\'2C\');B r};r.5c=y(a,b){K(C,\'2F "5c" 3E 3F 1D 2n, 2o 2L "2Z" 2M 1H.\');r.H(\'2Z\',[a,b]);B r};7(r.2H().1D(\'.5d\')){9 u=r.2P(\'2V\');r.H(\'2C\',C)}E{9 u=I}9 w=r.6i(\'<6j 6k="5d" />\').2H(),z={\'1O\':\'T\',\'1Z\':C,\'20\':I,\'8\':{\'J\':r.M().Y,\'P\':0}},1q={\'2r\':0,\'2g\':{\'L\':1A,\'3n\':1A},\'3m\':{\'L\':1A}},6={},29=o,1m=[],N=$.1y.1t.N++;r.3K(29,C,u);r.4A();r.4E();r.55();7(6.8.2E!=0){9 s=6.8.2E;7(s===C){s=3G.6l.52;7(!s.Y)s=0}E 7(s===\'5e\'){s=1z.3d(1z.5e()*z.8.J)}r.H(\'2A\',[s,0,C,{1d:0},\'T\'])}9 x=31(r,6,I),5f=2p(r.M(),6);7(6.5g){6.5g.1b($13,5f,x)}r.H(\'2m\',[C,x]);r.H(\'2Z\');B 11};$.1y.1t.N=0;$.1y.1t.3L={\'K\':I,\'1F\':I,\'2w\':C,\'1B\':C,\'1O\':\'19\',\'8\':{\'2E\':0},\'14\':{\'1n\':\'6m\',\'2u\':I,\'1M\':I,\'4h\':I,\'1H\':\'4f\',\'1m\':I}};$.1y.1t.4u=y(a,b){B\'<5h>\'+a+\'\'};y 1S(a,c,x,d,f){9 o={\'1d\':d,\'1n\':a.1n};7(A f==\'y\')o.2T=f;c.1x({3v:x},o)}y 48(a,b,c,o,d,e){9 f=23(4d(b.M(),o),o,C)[0],4j=23(c.M(),o,C)[0],3H=(e)?-4j:f,28={},2D={};28[o.d[\'G\']]=4j;28[o.d[\'19\']]=3H;2D[o.d[\'19\']]=0;b.1x({3v:\'+=0\'},d);c.O(28).1x(2D,{1d:d,1n:a.1n,2T:y(){$(11).1s()}})}y 4a(a,b,c,o,d,e,n){9 f=23(4e(b.M(),o,n),o,C)[0],4k=23(c.M(),o,C)[0],3H=(e)?-4k:f,28={},2D={};28[o.d[\'G\']]=4k;28[o.d[\'19\']]=0;2D[o.d[\'19\']]=3H;c.O(28).1x(2D,{1d:d,1n:a.1n,2T:y(){$(11).1s()}})}y 2B(o,t){7(t==\'3x\'||t==\'2S\'){9 f=t}E 7(o.8.2q>=t){K(o.K,\'1P 4L 8: 6o 6p (\'+t+\' 8, \'+o.8.2q+\' 4M).\');9 f=\'2S\'}E{9 f=\'3x\'}7(o.S.12)o.S.12[f]();7(o.T.12)o.T.12[f]();7(o.Z.1c)o.Z.1c[f]()}y 21(o,f){7(o.1B||o.2w)B;9 a=(f==\'32\'||f==\'3A\')?f:I;7(o.T.12){9 b=a||(f==o.8.D)?\'3A\':\'32\';o.T.12[b](\'5i\')}7(o.S.12){9 b=a||(f==0)?\'3A\':\'32\';o.S.12[b](\'5i\')}}y 2t(c,d){9 e=[];1u(9 a=0,5j=c.Y;a<5j;a++){1u(9 b=0,5k=d.Y;b<5k;b++){7(d[b].3I(A c[a])>-1&&!e[b]){e[b]=c[a];V}}}B e}y 3V(s){7(!2W(s))s=[[s]];7(!2W(s[0]))s=[s];1u(9 j=0,l=s.Y;j0){2Q(a>=d.J){a-=d.J}2Q(a<0){a+=d.J}}B a}y 2p(i,o){B i.16(0,o.8.D)}y 4P(i,o,n){B i.16(n,o.8.1E+n)}y 4Q(i,o){B i.16(0,o.8.D)}y 4d(i,o){B i.16(0,o.8.1E)}y 4e(i,o,n){B i.16(n,o.8.D+n)}y 46(i,o,s){9 t=0,x=0;1u(9 a=s;a>=0;a--){t+=i.1I(a)[o.d[\'1V\']](C);7(t>o.3g)B x;7(a==0)a=i.Y;x++}}y 2J(i,o,s){9 t=0,x=0;1u(9 a=s,l=i.Y-1;a<=l;a++){t+=i.1I(a)[o.d[\'1V\']](C);7(t>o.3g)B x;7(a==l)a=-1;x++}}y 4c(i,o,s,l){9 v=2J(i,o,s);7(!o.1B){7(s+v>l)v=l-s}B v}y 1r(i,o,m){9 x=(A m==\'1a\')?m:I;7(A m!=\'U\')m=0;i.1N(y(){9 t=1X($(11).O(o.d[\'1f\']));7(2f(t))t=0;$(11).1j(\'5l\',t);$(11).O(o.d[\'1f\'],((x)?$(11).1j(\'5l\'):m+$(11).1j(\'1v\')))})}y 23(i,o,a){5m=2x(i,o,\'G\',a);5n=4m(i,o,\'17\',a);B[5m,5n]}y 4m(i,o,a,b){7(A b!=\'1a\')b=I;7(A o[o.d[a]]==\'U\'&&b)B o[o.d[a]];7(A o.8[o.d[a]]==\'U\')B o.8[o.d[a]];9 c=(a.4n().3I(\'G\')>-1)?\'1V\':\'2a\';B 3O(i,o,c)}y 3O(i,o,a){9 s=0;i.1N(y(){9 m=$(11)[o.d[a]](C);7(s-1)?[\'6q\',\'6r\']:[\'6s\',\'6t\'];1u(a=0,l=4o.Y;a-1)?\'1V\':\'2a\',s=0;i.1N(y(){9 j=$(11);7(j.1D(\':D\')){s+=j[o.d[d]](C)}});B s}y 3P(i,o,a){9 s=I,v=I;i.1N(y(){c=$(11)[o.d[a]](C);7(s===I)s=c;E 7(s!=c)v=C;7(s==0)v=C});B v}y 3t(a,o,p){7(A p!=\'1a\')p=C;9 b=(o.15&&p)?o.X:[0,0,0,0];9 c={};c[o.d[\'G\']]=a[0]+b[1]+b[3];c[o.d[\'17\']]=a[1]+b[0]+b[2];B c}y 31(a,o,p){9 b=a.2H(),$i=a.M(),$v=2p($i,o),3J=3t(23($v,o,C),o,p);b.O(3J);7(o.15){9 c=$v.2k();c.O(o.d[\'1f\'],c.1j(\'1v\')+o.X[o.d[1]]);a.O(o.d[\'2b\'],o.X[o.d[0]]);a.O(o.d[\'19\'],o.X[o.d[3]])}a.O(o.d[\'G\'],3J[o.d[\'G\']]+(2x($i,o,\'G\')*2));a.O(o.d[\'17\'],4m($i,o,\'17\'));B 3J}y 4t(p){7(A p==\'1o\')B[0,0,0,0];7(A p==\'U\')B[p,p,p,p];E 7(A p==\'1e\')p=p.5o(\'6u\').6v(\'\').5o(\' \');7(!2W(p)){B[0,0,0,0]}1u(9 i=0;i<4;i++){p[i]=1X(p[i])}1h(p.Y){F 0:B[0,0,0,0];F 1:B[p[0],p[0],p[0],p[0]];F 2:B[p[0],p[1],p[0],p[1]];F 3:B[p[0],p[1],p[2],p[1]];2d:B[p[0],p[1],p[2],p[3]]}}y 3h(a,o){9 x=(A o[o.d[\'G\']]==\'U\')?1z.2s(o[o.d[\'G\']]-2x(a,o,\'G\')):0;1h(o.1g){F\'19\':B[0,x];V;F\'2c\':B[x,0];V;F\'2G\':2d:9 b=1z.2s(x/2),5p=1z.3d(x/2);B[b,5p];V}}y 3f(x,o){1h(o.35){F\'+1\':B x+1;V;F\'-1\':B x-1;V;F\'3b\':7(x%2==0)B x-1;V;F\'3b+\':7(x%2==0)B x+1;V;F\'3c\':7(x%2==1)B x-1;V;F\'3c+\':7(x%2==1)B x+1;V;2d:B x;V}}y 2W(a){B A(a)==\'1l\'&&(a 6w 6x)}y K(d,m){7(!d)B I;7(A m==\'1e\')m=\'1t: \'+m;E m=[\'1t:\',m];7(3G.4p&&3G.4p.5q)3G.4p.5q(m);B I}$.1y.51=y(o){B 11.1t(o)}})(4w);',62,406,'||||||opts|if|items|var|||||||||||||||||||||||||function|conf|typeof|return|true|visible|else|case|width|trigger|false|total|debug|auto|children|serial|css|first|cfs|a_dur|prev|next|number|break|bind|padding|length|pagination||this|button|tt0|scroll|usePadding|slice|height|variable|left|boolean|call|container|duration|string|marginRight|align|switch|play|data|stopPropagation|object|queue|easing|undefined|fx|tmrs|resetMargin|remove|carouFredSel|for|cfs_origCssMargin|c_new|animate|fn|Math|null|circular|variableVisible|is|oldVisible|synchronise|stop|event|eq|w_siz|crossfade|uncover|mousewheel|each|direction|Not|stopImmediatePropagation|c_old|fx_fade|preventDefault|extend|outerWidth|position|parseInt|pause|isPaused|isAnimated|nv_enableNavi|l_old|ms_getSizes|cover|fade|unbind|key|css_o|opts_orig|outerHeight|top|right|default|pauseDuration|isNaN|intervals|perc|type|l_cur|last|l_new|updatePageStatus|deprecated|use|getCurrentItems|minimum|pausePassed|ceil|sortParams|pauseOnHover|configuration|infinite|ms_getTotalSize|a_cur|a_old|slideTo|nv_showNavi|destroy|ani_o|start|The|center|parent|of|getVisibleItemsNext|getNaviObject|the|custom|scrolling|onAfter|triggerHandler|while|appendTo|hide|complete|getItemIndex|currentPosition|is_array|jquery|before|linkAnchors||setSizes|removeClass|wN|getObject|visibleAdjust|innerWidth||||marginBottom|odd|even|floor|to|cf_getVisibleItemsAdjust|maxDimention|cf_getAlignPadding|keys|Carousel|Number|absolute|timeouts|timer|100|setTimeout|onEnd|clone|orgW|mapWrapperSizes|onBefore|opacity|f_dur|show|end|eval|addClass|mouseenter|mouseleave|num|public|method|window|cur_l|indexOf|sz|init|defaults|up|lrgst_b|ms_getTrueLargestSize|ms_hasVariableSizes|ms_getTrueInnerSize|valid|bottom|anchorBuilder|delay|getSynchArr|scrolled|float|marginTop|marginLeft||hidden|none|unbind_events|stopped|conditions|getVisibleItemsPrev|a_new|fx_cover||fx_uncover|xI|getVisibleItemsNextTestCircular|getOldItemsNext|getNewItemsNext|click|unbind_buttons|wipe|document|new_w|old_w|getKeyCode|ms_getLargestSize|toLowerCase|arr|console|No|innerHeight|dx|cf_getPadding|pageAnchorBuilder|nap|jQuery|Item|backward|forward|build|or|relative|cfs_origCss|bind_events|carousel|clearInterval|onPausePause|dur2|onPauseEnd|onPauseStart|enough|needed|slide_|Scrolling|getOldItemsPrev|getNewItemsPrev|directscroll|get|filter|shift|new_m|jumpToStart|after|append|currentPage||caroufredsel|hash|index|selected|bind_buttons|touchwipe|down||keyup|keyCode|current_position|link_anchors|caroufredsel_wrapper|random|itm|onCreate|span|disabled|l1|l2|cfs_tempCssMargin|s1|s2|split|x2|log|element|found|selector|option|Infinity|Set|500|2500|plugin|no|longer|supported|Available|widths|heights|automatically|fixed|Carousels|CSS|attribute|should|be|static|overflow|finish|Pause|globally|clearTimeout|resume|setInterval|currently|Callback|returned|slide_prev|prependTo|concat|slide_next|prepend|push|insertItem|removeItem|round|currentVisible|body|find|replaceWith|min_move_x|min_move_y|preventDefaultEvents|wipeUp|wipeDown|wipeLeft|wipeRight|wrap|div|class|location|swing|href|hiding|navigation|paddingLeft|paddingRight|paddingTop|paddingBottom|px|join|instanceof|Array'.split('|'),0,{})) /* Arquivo: jquery.cookie.js */ /** * Cookie plugin * * Copyright (c) 2006 Klaus Hartl (stilbuero.de) * Dual licensed under the MIT and GPL licenses: * http://www.opensource.org/licenses/mit-license.php * http://www.gnu.org/licenses/gpl.html * */ /** * Create a cookie with the given name and value and other optional parameters. * * @example $.cookie('the_cookie', 'the_value'); * @desc Set the value of a cookie. * @example $.cookie('the_cookie', 'the_value', { expires: 7, path: '/', domain: 'jquery.com', secure: true }); * @desc Create a cookie with all available options. * @example $.cookie('the_cookie', 'the_value'); * @desc Create a session cookie. * @example $.cookie('the_cookie', null); * @desc Delete a cookie by passing null as value. Keep in mind that you have to use the same path and domain * used when the cookie was set. * * @param String name The name of the cookie. * @param String value The value of the cookie. * @param Object options An object literal containing key/value pairs to provide optional cookie attributes. * @option Number|Date expires Either an integer specifying the expiration date from now on in days or a Date object. * If a negative value is specified (e.g. a date in the past), the cookie will be deleted. * If set to null or omitted, the cookie will be a session cookie and will not be retained * when the the browser exits. * @option String path The value of the path atribute of the cookie (default: path of page that created the cookie). * @option String domain The value of the domain attribute of the cookie (default: domain of page that created the cookie). * @option Boolean secure If true, the secure attribute of the cookie will be set and the cookie transmission will * require a secure protocol (like HTTPS). * @type undefined * * @name $.cookie * @cat Plugins/Cookie * @author Klaus Hartl/klaus.hartl@stilbuero.de */ /** * Get the value of a cookie with the given name. * * @example $.cookie('the_cookie'); * @desc Get the value of a cookie. * * @param String name The name of the cookie. * @return The value of the cookie. * @type String * * @name $.cookie * @cat Plugins/Cookie * @author Klaus Hartl/klaus.hartl@stilbuero.de */ jQuery.cookie = function(name, value, options) { if (typeof value != 'undefined') { // name and value given, set cookie options = options || {}; if (value === null) { value = ''; options.expires = -1; } var expires = ''; if (options.expires && (typeof options.expires == 'number' || options.expires.toUTCString)) { var date; if (typeof options.expires == 'number') { date = new Date(); date.setTime(date.getTime() + (options.expires * 24 * 60 * 60 * 1000)); } else { date = options.expires; } expires = '; expires=' + date.toUTCString(); // use expires attribute, max-age is not supported by IE } // CAUTION: Needed to parenthesize options.path and options.domain // in the following expressions, otherwise they evaluate to undefined // in the packed version for some reason... var path = options.path ? '; path=' + (options.path) : ''; var domain = options.domain ? '; domain=' + (options.domain) : ''; var secure = options.secure ? '; secure' : ''; document.cookie = [name, '=', encodeURIComponent(value), expires, path, domain, secure].join(''); } else { // only name given, get cookie var cookieValue = null; if (document.cookie && document.cookie != '') { var cookies = document.cookie.split(';'); for (var i = 0; i < cookies.length; i++) { var cookie = jQuery.trim(cookies[i]); // Does this cookie string begin with the name we want? if (cookie.substring(0, name.length + 1) == (name + '=')) { cookieValue = decodeURIComponent(cookie.substring(name.length + 1)); break; } } } return cookieValue; } }; /* Arquivo: jquery.datePicker.min-2.1.2.js */ (function(D){D.fn.extend({renderCalendar:function(P){var X=function(Y){return document.createElement(Y)};P=D.extend({},D.fn.datePicker.defaults,P);if(P.showHeader!=D.dpConst.SHOW_HEADER_NONE){var M=D(X("tr"));for(var S=Date.firstDayOfWeek;S1){J-=7}var O=Math.ceil(((-1*J+1)+K.getDaysInMonth())/7);K.addDays(J-1);var V=function(){if(P.hoverClass){D(this).addClass(P.hoverClass)}};var G=function(){if(P.hoverClass){D(this).removeClass(P.hoverClass)}};var L=0;while(L++'+D.dpText.TEXT_CHOOSE_DATE+"").bind("click",function(){G.dpDisplay(this);this.blur();return false});G.after(F.button)}if(!I&&G.is(":text")){G.bind("dateSelected",function(K,J,L){this.value=J.asString()}).bind("change",function(){if(this.value!=""){var J=Date.fromString(this.value);if(J){F.setSelected(J,true,true)}}});if(E.clickInput){G.bind("click",function(){G.dpDisplay()})}var H=Date.fromString(this.value);if(this.value!=""&&H){F.setSelected(H,true,true)}}G.addClass("dp-applied")})},dpSetDisabled:function(E){return B.call(this,"setDisabled",E)},dpSetStartDate:function(E){return B.call(this,"setStartDate",E)},dpSetEndDate:function(E){return B.call(this,"setEndDate",E)},dpGetSelected:function(){var E=C(this[0]);if(E){return E.getSelected()}return null},dpSetSelected:function(G,F,E){if(F==undefined){F=true}if(E==undefined){E=true}return B.call(this,"setSelected",Date.fromString(G),F,E,true)},dpSetDisplayedMonth:function(E,F){return B.call(this,"setDisplayedMonth",Number(E),Number(F),true)},dpDisplay:function(E){return B.call(this,"display",E)},dpSetRenderCallback:function(E){return B.call(this,"setRenderCallback",E)},dpSetPosition:function(E,F){return B.call(this,"setPosition",E,F)},dpSetOffset:function(E,F){return B.call(this,"setOffset",E,F)},dpClose:function(){return B.call(this,"_closeCalendar",false,this[0])},_dpDestroy:function(){}});var B=function(G,F,E,I,H){return this.each(function(){var J=C(this);if(J){J[G](F,E,I,H)}})};function A(E){this.ele=E;this.displayedMonth=null;this.displayedYear=null;this.startDate=null;this.endDate=null;this.showYearNavigation=null;this.closeOnSelect=null;this.displayClose=null;this.selectMultiple=null;this.verticalPosition=null;this.horizontalPosition=null;this.verticalOffset=null;this.horizontalOffset=null;this.button=null;this.renderCallback=[];this.selectedDates={};this.inline=null;this.context="#dp-popup"}D.extend(A.prototype,{init:function(E){this.setStartDate(E.startDate);this.setEndDate(E.endDate);this.setDisplayedMonth(Number(E.month),Number(E.year));this.setRenderCallback(E.renderCallback);this.showYearNavigation=E.showYearNavigation;this.closeOnSelect=E.closeOnSelect;this.displayClose=E.displayClose;this.selectMultiple=E.selectMultiple;this.verticalPosition=E.verticalPosition;this.horizontalPosition=E.horizontalPosition;this.hoverClass=E.hoverClass;this.setOffset(E.verticalOffset,E.horizontalOffset);this.inline=E.inline;if(this.inline){this.context=this.ele;this.display()}},setStartDate:function(E){if(E){this.startDate=Date.fromString(E)}if(!this.startDate){this.startDate=(new Date()).zeroTime()}this.setDisplayedMonth(this.displayedMonth,this.displayedYear)},setEndDate:function(E){if(E){this.endDate=Date.fromString(E)}if(!this.endDate){this.endDate=(new Date("12/31/2999"))}if(this.endDate.getTime()K.getTime()){G=K}}var F=this.displayedMonth;var J=this.displayedYear;this.displayedMonth=G.getMonth();this.displayedYear=G.getFullYear();if(I&&(this.displayedMonth!=F||this.displayedYear!=J)){this._rerenderCalendar();D(this.ele).trigger("dpMonthChanged",[this.displayedMonth,this.displayedYear])}},setSelected:function(K,E,F,H){if(E==this.isSelected(K)){return}if(this.selectMultiple==false){this.selectedDates={};D("td.selected",this.context).removeClass("selected")}if(F&&this.displayedMonth!=K.getMonth()){this.setDisplayedMonth(K.getMonth(),K.getFullYear(),true)}this.selectedDates[K.toString()]=E;var I="td.";I+=K.getMonth()==this.displayedMonth?"current-month":"other-month";I+=':contains("'+K.getDate()+'")';var J;D(I,this.ele).each(function(){if(D(this).text()==K.getDate()){J=D(this);J[E?"addClass":"removeClass"]("selected")}});if(H){var G=this.isSelected(K);$e=D(this.ele);$e.trigger("dateSelected",[K,J,G]);$e.trigger("change")}},isSelected:function(E){return this.selectedDates[E.toString()]},getSelected:function(){var E=[];for(s in this.selectedDates){if(this.selectedDates[s]==true){E.push(Date.parse(s))}}return E},display:function(E){if(D(this.ele).is(".dp-disabled")){return}E=E||this.ele;var L=this;var H=D(E);var K=H.offset();var M;var N;var G;var I;if(L.inline){M=D(this.ele);N={id:"calendar-"+this.ele._dpId,className:"dp-popup dp-popup-inline"};I={}}else{M=D("body");N={id:"dp-popup",className:"dp-popup"};I={top:K.top+L.verticalOffset,left:K.left+L.horizontalOffset};var J=function(Q){var O=Q.target;var P=D("#dp-popup")[0];while(true){if(O==P){return true}else{if(O==document){L._closeCalendar();return false}else{O=D(O).parent()[0]}}}};this._checkMouse=J;this._closeCalendar(true)}M.append(D("
    ").attr(N).css(I).append(D("

    "),D('
    ').append(D('«').bind("click",function(){return L._displayNewMonth.call(L,this,0,-1)}),D('').bind("click",function(){return L._displayNewMonth.call(L,this,-1,0)})),D('
    ').append(D('»').bind("click",function(){return L._displayNewMonth.call(L,this,0,1)}),D('').bind("click",function(){return L._displayNewMonth.call(L,this,1,0)})),D("
    ").attr("className","dp-calendar")).bgIframe());var F=this.inline?D(".dp-popup",this.context):D("#dp-popup");if(this.showYearNavigation==false){D(".dp-nav-prev-year, .dp-nav-next-year",L.context).css("display","none")}if(this.displayClose){F.append(D(''+D.dpText.TEXT_CLOSE+"").bind("click",function(){L._closeCalendar();return false}))}L._renderCalendar();D(this.ele).trigger("dpDisplayed",F);if(!L.inline){if(this.verticalPosition==D.dpConst.POS_BOTTOM){F.css("top",K.top+H.height()-F.height()+L.verticalOffset)}if(this.horizontalPosition==D.dpConst.POS_RIGHT){F.css("left",K.left+H.width()-F.width()+L.horizontalOffset)}D(document).bind("mousedown",this._checkMouse)}},setRenderCallback:function(E){if(E==null){return}if(E&&typeof(E)=="function"){E=[E]}this.renderCallback=this.renderCallback.concat(E)},cellRender:function(J,E,H,G){var K=this.dpController;var I=new Date(E.getTime());J.bind("click",function(){var L=D(this);if(!L.is(".disabled")){K.setSelected(I,!L.is(".selected")||!K.selectMultiple,false,true);if(K.closeOnSelect){K._closeCalendar()}}});if(K.isSelected(I)){J.addClass("selected")}for(var F=0;F20){H.addClass("disabled")}});var G=this.startDate.getDate();D(".dp-calendar td.current-month",this.context).each(function(){var H=D(this);if(Number(H.text())20){var F=new Date(this.startDate.getTime());F.addMonths(1);if(this.displayedYear==F.getFullYear()&&this.displayedMonth==F.getMonth()){D("dp-calendar td.other-month",this.context).each(function(){var H=D(this);if(Number(H.text())G){H.addClass("disabled")}})}else{D(".dp-nav-next-year",this.context).removeClass("disabled");D(".dp-nav-next-month",this.context).removeClass("disabled");var G=this.endDate.getDate();if(G<13){var E=new Date(this.endDate.getTime());E.addMonths(-1);if(this.displayedYear==E.getFullYear()&&this.displayedMonth==E.getMonth()){D(".dp-calendar td.other-month",this.context).each(function(){var H=D(this);if(Number(H.text())>G){H.addClass("disabled")}})}}}},_closeCalendar:function(E,F){if(!F||F==this.ele){D(document).unbind("mousedown",this._checkMouse);this._clearCalendar();D("#dp-popup a").unbind();D("#dp-popup").empty().remove();if(!E){D(this.ele).trigger("dpClosed",[this.getSelected()])}}},_clearCalendar:function(){D(".dp-calendar td",this.context).unbind();D(".dp-calendar",this.context).empty()}});D.dpConst={SHOW_HEADER_NONE:0,SHOW_HEADER_SHORT:1,SHOW_HEADER_LONG:2,POS_TOP:0,POS_BOTTOM:1,POS_LEFT:0,POS_RIGHT:1};D.dpText={TEXT_PREV_YEAR:"Ano anterior",TEXT_PREV_MONTH:"Mês anterior",TEXT_NEXT_YEAR:"Próximo ano",TEXT_NEXT_MONTH:"Próximo mês",TEXT_CLOSE:"Close",TEXT_CHOOSE_DATE:"Escolha a data"};D.dpVersion="$Id: jquery.datePicker.js 15 2008-12-17 04:40:18Z kelvin.luck $";D.fn.datePicker.defaults={month:undefined,year:undefined,showHeader:D.dpConst.SHOW_HEADER_SHORT,startDate:undefined,endDate:undefined,inline:false,renderCallback:null,createButton:true,showYearNavigation:true,closeOnSelect:true,displayClose:false,selectMultiple:false,clickInput:false,verticalPosition:D.dpConst.POS_TOP,horizontalPosition:D.dpConst.POS_LEFT,verticalOffset:0,horizontalOffset:0,hoverClass:"dp-hover"};function C(E){if(E._dpId){return D.event._dpCache[E._dpId]}return false}if(D.fn.bgIframe==undefined){D.fn.bgIframe=function(){return this}}D(window).bind("unload",function(){var F=D.event._dpCache||[];for(var E in F){D(F[E].ele)._dpDestroy()}})})(jQuery); /* Arquivo: jquery.equalizecolslite.js */ (function($) { $.fn.equalizeColsLite = function() { var maiorHeight = 0; var atualHeight = 0; $(this).each(function(){ atualHeight = $(this).height(); if(atualHeight > maiorHeight){maiorHeight = $(this).height();} }); $(this).each(function(){ $(this).height(maiorHeight+10); }); }; $.equalizeClear = function() { $("div[class*=equalize]").each(function () { $(this).height(""); }); }; $.equalizeAll = function() { var equalize = new Array(); $("div[class*=equalize]").each(function () { var classes = $(this).attr("class").split(" "); for (i=0; i<=classes.length; i++) { if (classes[i].substr(0,8)=="equalize") { if (equalize[classes[i]]==undefined) { $("."+classes[i]).equalizeColsLite(); equalize[classes[i]] = true; } break; } } }); }; })(jQuery); /* Arquivo: jquery.example.js */ (function($) { $.fn.example = function(text, args) { var options = $.extend({}, $.fn.example.defaults, args); var callback = $.isFunction(text); if (!$.fn.example.bound_class_names[options.class_name]) { $(window).unload(function() { $('.' + options.class_name).val(''); }); $('form').submit(function() { $(this).find('.' + options.class_name).val(''); }); $.fn.example.bound_class_names[options.class_name] = true; } return this.each(function() { /* Reduce method calls by saving the current jQuery object. */ var $this = $(this); if ($.browser.msie && !$this.attr('defaultValue') && (callback ? $this.val() != '' : $this.val() == text)) { $this.val(''); } if ($this.val() == '') { $this.addClass(options.class_name); $this.val(callback ? text.call(this) : text); } if (options.hide_label) { var label = $('label[@for=' + $this.attr('id') + ']'); label.next('br').hide(); label.hide(); } $this.focus(function() { if ($(this).is('.' + options.class_name)) { $(this).val(''); $(this).removeClass(options.class_name); } }); $this.blur(function() { if ($(this).val() == '') { $(this).addClass(options.class_name); $(this).val(callback ? text.call(this) : text); } }); }); }; $.fn.example.defaults = { class_name: 'example', hide_label: false }; $.fn.example.bound_class_names = []; })(jQuery); /* Arquivo: jquery.form.js */ /*! * jQuery Form Plugin * version: 2.87 (20-OCT-2011) * @requires jQuery v1.3.2 or later * * Examples and documentation at: http://malsup.com/jquery/form/ * Dual licensed under the MIT and GPL licenses: * http://www.opensource.org/licenses/mit-license.php * http://www.gnu.org/licenses/gpl.html */ ;(function($) { /* Usage Note: ----------- Do not use both ajaxSubmit and ajaxForm on the same form. These functions are intended to be exclusive. Use ajaxSubmit if you want to bind your own submit handler to the form. For example, $(document).ready(function() { $('#myForm').bind('submit', function(e) { e.preventDefault(); // <-- important $(this).ajaxSubmit({ target: '#output' }); }); }); Use ajaxForm when you want the plugin to manage all the event binding for you. For example, $(document).ready(function() { $('#myForm').ajaxForm({ target: '#output' }); }); When using ajaxForm, the ajaxSubmit function will be invoked for you at the appropriate time. */ /** * ajaxSubmit() provides a mechanism for immediately submitting * an HTML form using AJAX. */ $.fn.ajaxSubmit = function(options) { // fast fail if nothing selected (http://dev.jquery.com/ticket/2752) if (!this.length) { log('ajaxSubmit: skipping submit process - no element selected'); return this; } var method, action, url, $form = this; if (typeof options == 'function') { options = { success: options }; } method = this.attr('method'); action = this.attr('action'); url = (typeof action === 'string') ? $.trim(action) : ''; url = url || window.location.href || ''; if (url) { // clean url (don't include hash vaue) url = (url.match(/^([^#]+)/)||[])[1]; } options = $.extend(true, { url: url, success: $.ajaxSettings.success, type: method || 'GET', iframeSrc: /^https/i.test(window.location.href || '') ? 'javascript:false' : 'about:blank' }, options); // hook for manipulating the form data before it is extracted; // convenient for use with rich editors like tinyMCE or FCKEditor var veto = {}; this.trigger('form-pre-serialize', [this, options, veto]); if (veto.veto) { log('ajaxSubmit: submit vetoed via form-pre-serialize trigger'); return this; } // provide opportunity to alter form data before it is serialized if (options.beforeSerialize && options.beforeSerialize(this, options) === false) { log('ajaxSubmit: submit aborted via beforeSerialize callback'); return this; } var traditional = options.traditional; if ( traditional === undefined ) { traditional = $.ajaxSettings.traditional; } var qx,n,v,a = this.formToArray(options.semantic); if (options.data) { options.extraData = options.data; qx = $.param(options.data, traditional); } // give pre-submit callback an opportunity to abort the submit if (options.beforeSubmit && options.beforeSubmit(a, this, options) === false) { log('ajaxSubmit: submit aborted via beforeSubmit callback'); return this; } // fire vetoable 'validate' event this.trigger('form-submit-validate', [a, this, options, veto]); if (veto.veto) { log('ajaxSubmit: submit vetoed via form-submit-validate trigger'); return this; } var q = $.param(a, traditional); if (qx) q = ( q ? (q + '&' + qx) : qx ); if (options.type.toUpperCase() == 'GET') { options.url += (options.url.indexOf('?') >= 0 ? '&' : '?') + q; options.data = null; // data is null for 'get' } else { options.data = q; // data is the query string for 'post' } var callbacks = []; if (options.resetForm) { callbacks.push(function() { $form.resetForm(); }); } if (options.clearForm) { callbacks.push(function() { $form.clearForm(options.includeHidden); }); } // perform a load on the target only if dataType is not provided if (!options.dataType && options.target) { var oldSuccess = options.success || function(){}; callbacks.push(function(data) { var fn = options.replaceTarget ? 'replaceWith' : 'html'; $(options.target)[fn](data).each(oldSuccess, arguments); }); } else if (options.success) { callbacks.push(options.success); } options.success = function(data, status, xhr) { // jQuery 1.4+ passes xhr as 3rd arg var context = options.context || options; // jQuery 1.4+ supports scope context for (var i=0, max=callbacks.length; i < max; i++) { callbacks[i].apply(context, [data, status, xhr || $form, $form]); } }; // are there files to upload? var fileInputs = $('input:file', this).length > 0; var mp = 'multipart/form-data'; var multipart = ($form.attr('enctype') == mp || $form.attr('encoding') == mp); // options.iframe allows user to force iframe mode // 06-NOV-09: now defaulting to iframe mode if file input is detected if (options.iframe !== false && (fileInputs || options.iframe || multipart)) { // hack to fix Safari hang (thanks to Tim Molendijk for this) // see: http://groups.google.com/group/jquery-dev/browse_thread/thread/36395b7ab510dd5d if (options.closeKeepAlive) { $.get(options.closeKeepAlive, function() { fileUpload(a); }); } else { fileUpload(a); } } else { // IE7 massage (see issue 57) if ($.browser.msie && method == 'get' && typeof options.type === "undefined") { var ieMeth = $form[0].getAttribute('method'); if (typeof ieMeth === 'string') options.type = ieMeth; } $.ajax(options); } // fire 'notify' event this.trigger('form-submit-notify', [this, options]); return this; // private function for handling file uploads (hat tip to YAHOO!) function fileUpload(a) { var form = $form[0], el, i, s, g, id, $io, io, xhr, sub, n, timedOut, timeoutHandle; var useProp = !!$.fn.prop; if (a) { if ( useProp ) { // ensure that every serialized input is still enabled for (i=0; i < a.length; i++) { el = $(form[a[i].name]); el.prop('disabled', false); } } else { for (i=0; i < a.length; i++) { el = $(form[a[i].name]); el.removeAttr('disabled'); } }; } if ($(':input[name=submit],:input[id=submit]', form).length) { // if there is an input with a name or id of 'submit' then we won't be // able to invoke the submit fn on the form (at least not x-browser) alert('Error: Form elements must not have name or id of "submit".'); return; } s = $.extend(true, {}, $.ajaxSettings, options); s.context = s.context || s; id = 'jqFormIO' + (new Date().getTime()); if (s.iframeTarget) { $io = $(s.iframeTarget); n = $io.attr('name'); if (n == null) $io.attr('name', id); else id = n; } else { $io = $('
    "); $("#TB_overlay").click(tb_remove); } }else{//all others if(document.getElementById("TB_overlay") === null){ $("body").append("
    "); $("#TB_overlay").click(tb_remove); } } if(tb_detectMacXFF()){ $("#TB_overlay").addClass("TB_overlayMacFFBGHack");//use png overlay so hide flash }else{ $("#TB_overlay").addClass("TB_overlayBG");//use background and opacity } if(caption===null){caption="";} $("body").append("
    ");//add loader to the page $('#TB_load').show();//show loader var baseURL; if(url.indexOf("?")!==-1){ //ff there is a query string involved baseURL = url.substr(0, url.indexOf("?")); }else{ baseURL = url; } var urlString = /\.jpg$|\.jpeg$|\.png$|\.gif$|\.bmp$/; var urlType = baseURL.toLowerCase().match(urlString); if(urlType == '.jpg' || urlType == '.jpeg' || urlType == '.png' || urlType == '.gif' || urlType == '.bmp'){//code to show images TB_PrevCaption = ""; TB_PrevURL = ""; TB_PrevHTML = ""; TB_NextCaption = ""; TB_NextURL = ""; TB_NextHTML = ""; TB_imageCount = ""; TB_FoundURL = false; if(imageGroup){ TB_TempArray = $("a[@rel="+imageGroup+"]").get(); for (TB_Counter = 0; ((TB_Counter < TB_TempArray.length) && (TB_NextHTML === "")); TB_Counter++) { var urlTypeTemp = TB_TempArray[TB_Counter].href.toLowerCase().match(urlString); if (!(TB_TempArray[TB_Counter].href == url)) { if (TB_FoundURL) { TB_NextCaption = TB_TempArray[TB_Counter].title; TB_NextURL = TB_TempArray[TB_Counter].href; TB_NextHTML = "  Next >"; } else { TB_PrevCaption = TB_TempArray[TB_Counter].title; TB_PrevURL = TB_TempArray[TB_Counter].href; TB_PrevHTML = "  < Prev"; } } else { TB_FoundURL = true; TB_imageCount = "Image " + (TB_Counter + 1) +" of "+ (TB_TempArray.length); } } } imgPreloader = new Image(); imgPreloader.onload = function(){ imgPreloader.onload = null; // Resizing large images - orginal by Christian Montoya edited by me. var pagesize = tb_getPageSize(); var x = pagesize[0] - 150; var y = pagesize[1] - 150; var imageWidth = imgPreloader.width; var imageHeight = imgPreloader.height; if (imageWidth > x) { imageHeight = imageHeight * (x / imageWidth); imageWidth = x; if (imageHeight > y) { imageWidth = imageWidth * (y / imageHeight); imageHeight = y; } } else if (imageHeight > y) { imageWidth = imageWidth * (y / imageHeight); imageHeight = y; if (imageWidth > x) { imageHeight = imageHeight * (x / imageWidth); imageWidth = x; } } // End Resizing TB_WIDTH = imageWidth + 30; TB_HEIGHT = imageHeight + 60; $("#TB_window").append(""+caption+"" + "
    "+caption+"
    " + TB_imageCount + TB_PrevHTML + TB_NextHTML + "
    close or Esc Key
    "); $("#TB_closeWindowButton").click(tb_remove); if (!(TB_PrevHTML === "")) { function goPrev(){ if($(document).unbind("click",goPrev)){$(document).unbind("click",goPrev);} $("#TB_window").remove(); $("body").append("
    "); tb_show(TB_PrevCaption, TB_PrevURL, imageGroup); return false; } $("#TB_prev").click(goPrev); } if (!(TB_NextHTML === "")) { function goNext(){ $("#TB_window").remove(); $("body").append("
    "); tb_show(TB_NextCaption, TB_NextURL, imageGroup); return false; } $("#TB_next").click(goNext); } document.onkeydown = function(e){ if (e == null) { // ie keycode = event.keyCode; } else { // mozilla keycode = e.which; } if(keycode == 27){ // close tb_remove(); } else if(keycode == 190){ // display previous image if(!(TB_NextHTML == "")){ document.onkeydown = ""; goNext(); } } else if(keycode == 188){ // display next image if(!(TB_PrevHTML == "")){ document.onkeydown = ""; goPrev(); } } }; tb_position(); $("#TB_load").remove(); $("#TB_ImageOff").click(tb_remove); $("#TB_window").css({display:"block"}); //for safari using css instead of show }; imgPreloader.src = url; }else{//code to show html var queryString = url.replace(/^[^\?]+\??/,''); var params = tb_parseQuery( queryString ); TB_WIDTH = (params['width']*1) + 5 || 630; //defaults to 630 if no paramaters were added to URL TB_HEIGHT = (params['height']*1) + 30 || 440; //defaults to 440 if no paramaters were added to URL ajaxContentW = TB_WIDTH - 30; ajaxContentH = TB_HEIGHT - 45; if(url.indexOf('TB_iframe') != -1){// either iframe or ajax window urlNoQuery = url.split('TB_'); $("#TB_iframeContent").remove(); if(params['modal'] != "true"){//iframe no modal $("#TB_window").append("
    "+caption+"
    close or Esc Key
    "); }else{//iframe modal $("#TB_overlay").unbind(); $("#TB_window").append(""); } }else{// not an iframe, ajax if($("#TB_window").css("display") != "block"){ if(params['modal'] != "true"){//ajax no modal $("#TB_window").append("
    "+caption+"
    close or Esc Key
    "); }else{//ajax modal $("#TB_overlay").unbind(); $("#TB_window").append("
    "); } }else{//this means the window is already up, we are just loading new content via ajax $("#TB_ajaxContent")[0].style.width = ajaxContentW +"px"; $("#TB_ajaxContent")[0].style.height = ajaxContentH +"px"; $("#TB_ajaxContent")[0].scrollTop = 0; $("#TB_ajaxWindowTitle").html(caption); } } $("#TB_closeWindowButton").click(tb_remove); if(url.indexOf('TB_inline') != -1){ $("#TB_ajaxContent").append($('#' + params['inlineId']).children()); $("#TB_window").unload(function () { $('#' + params['inlineId']).append( $("#TB_ajaxContent").children() ); // move elements back when you're finished }); tb_position(); $("#TB_load").remove(); $("#TB_window").css({display:"block"}); }else if(url.indexOf('TB_iframe') != -1){ tb_position(); if($.browser.safari){//safari needs help because it will not fire iframe onload $("#TB_load").remove(); $("#TB_window").css({display:"block"}); } }else{ if(addUrlRandom) { url += "&random=" + (new Date().getTime()); } $("#TB_ajaxContent").load(url, function() {//to do a post change this load method tb_position(); $("#TB_load").remove(); tb_init("#TB_ajaxContent a.thickbox"); $("#TB_window").css({display:"block"}); }); } } if(!params['modal']){ document.onkeyup = function(e){ if (e == null) { // ie keycode = event.keyCode; } else { // mozilla keycode = e.which; } if(keycode == 27){ // close tb_remove(); } }; } } catch(e) { //nothing here } } //helper functions below function tb_showIframe(){ $("#TB_load").remove(); $("#TB_window").css({display:"block"}); } function tb_remove() { $("#TB_imageOff").unbind("click"); $("#TB_closeWindowButton").unbind("click"); $("#TB_window").fadeOut("fast",function(){$('#TB_window,#TB_overlay,#TB_HideSelect').trigger("unload").unbind().remove();}); $("#TB_load").remove(); if (typeof document.body.style.maxHeight == "undefined") {//if IE 6 $("body","html").css({height: "auto", width: "auto"}); $("html").css("overflow",""); } document.onkeydown = ""; document.onkeyup = ""; return false; } function tb_position() { $("#TB_window").css({marginLeft: '-' + parseInt((TB_WIDTH / 2),10) + 'px', width: TB_WIDTH + 'px'}); if ( !(jQuery.browser.msie && jQuery.browser.version < 7)) { // take away IE6 // $("#TB_window").css({marginTop: '-' + parseInt((TB_HEIGHT / 2),10) + 'px'}); } } function tb_parseQuery ( query ) { var Params = {}; if ( ! query ) {return Params;}// return empty object var Pairs = query.split(/[;&]/); for ( var i = 0; i < Pairs.length; i++ ) { var KeyVal = Pairs[i].split('='); if ( ! KeyVal || KeyVal.length != 2 ) {continue;} var key = unescape( KeyVal[0] ); var val = unescape( KeyVal[1] ); val = val.replace(/\+/g, ' '); Params[key] = val; } return Params; } function tb_getPageSize(){ var de = document.documentElement; var w = window.innerWidth || self.innerWidth || (de&&de.clientWidth) || document.body.clientWidth; var h = window.innerHeight || self.innerHeight || (de&&de.clientHeight) || document.body.clientHeight; arrayPageSize = [w,h]; return arrayPageSize; } function tb_detectMacXFF() { var userAgent = navigator.userAgent.toLowerCase(); if (userAgent.indexOf('mac') != -1 && userAgent.indexOf('firefox')!=-1) { return true; } } /* Arquivo: swfobject */ /* Arquivo: functions.js */ // usado para ver mais comentários var offset_comentario = 2; var formReceberProcessando = false; function strPad(input, length, pad, type) { if(!(input instanceof String)) { input = new String(input); } if(pad === null) { pad = ' '; } if(!type) { type = 'right'; } var init = ""; var limit = Math.max(length - input.length, 0); for(var i = 0; i < limit; i++) { init += pad; } if(type == 'left') { return init + input; } return input + init; }; function flash(src,w,h,string_values,div) { var htmlObject = ''; htmlObject += ''; htmlObject += ''; htmlObject += ''; htmlObject += ''; htmlObject += ''; htmlObject += ''; if (string_values!=undefined) { htmlObject += ''; } htmlObject += ''; htmlObject += ''; if (div==undefined) { document.write(htmlObject); } else { $("#"+div).html(htmlObject); } } Date.prototype.setISO8601 = function (string) { var regexp = "([0-9]{4})(-([0-9]{2})(-([0-9]{2})" + "(T([0-9]{2}):([0-9]{2})(:([0-9]{2})(\.([0-9]+))?)?" + "(Z|(([-+])([0-9]{2}):([0-9]{2})))?)?)?)?"; var d = string.match(new RegExp(regexp)); var offset = 0; var date = new Date(d[1], 0, 1); if (d[3]) { date.setMonth(d[3] - 1); } if (d[5]) { date.setDate(d[5]); } if (d[7]) { date.setHours(d[7]); } if (d[8]) { date.setMinutes(d[8]); } if (d[10]) { date.setSeconds(d[10]); } if (d[12]) { date.setMilliseconds(Number("0." + d[12]) * 1000); } if (d[14]) { offset = (Number(d[16]) * 60) + Number(d[17]); offset *= ((d[15] == '-') ? 1 : -1); } offset -= date.getTimezoneOffset(); time = (Number(date) + (offset * 60 * 1000)); this.setTime(Number(time)); } // EQUALIZA ALTURA DOS BOX function eqBox(seletor) { var maiorHeight = 0; var atualHeight = 0; $(seletor).height("auto"); $(seletor).each(function(){ atualHeight = $(this).height(); if(atualHeight > maiorHeight){maiorHeight = $(this).height();} }); $(seletor).each(function(){ $(this).height($.browser.safari ? maiorHeight+34 : maiorHeight+5); }); } $.fn.clearForm = function() { return this.each(function() { var type = this.type, tag = this.tagName.toLowerCase(); if (tag == 'form') return $(':input',this).clearForm(); if (type == 'text' || type == 'password' || tag == 'textarea') this.value = ''; else if (type == 'checkbox' || type == 'radio') this.checked = false; else if (tag == 'select') this.selectedIndex = -1; }); }; // COMBO CIDADES function mostraCidades(id_estado) { $("#id_cidade").html(''); $.get($live_site+"index.php", {option: "ajax", task: "cidade", id_estado: id_estado, notpl: 1}, function(data){ $("#id_cidade").html(data); }); } function glossarioResultado(busca) { $("#palavra").html('
    Carregando...

    '); $.get($live_site+"index.php", {option: "ajax", task: "glossario", letra_dicionario: busca, notpl: 1}, function(data){ $("#palavra").html(data); glossarioDescricao($('#palavra > li:first').attr('id')); $("#palavra li").removeClass('txt-bold'); $('#palavra > li:first').addClass('txt-bold'); }); } function glossarioAbre() { $(".sugestao-sucesso").slideUp(); $(".dicionario-abre").removeClass('abre'); $(".dicionario-abre").addClass('fecha'); $(".dicionario-conteudo").slideDown(); $(".dicionario-abre").attr("title","Recolher Dicionário"); } function glossarioFecha() { $(".sugestao-sucesso").slideUp(); $(".dicionario-abre").removeClass('fecha'); $(".dicionario-abre").addClass('abre'); $("#glossario-sugerir").slideUp(); $(".dicionario-conteudo").slideUp(); $(".dicionario-abre").attr("title","Expandir Dicionário"); } function glossarioDescricao(id_glossario){ if (id_glossario != undefined) { $("#glossario-sem-resultado").hide(); $("#glossario-com-resultado").show(); $("#descricao-palavra").html('
    Carregando...

    '); $.get($live_site + "index.php", { option: "ajax", task: "glossario_descricao", id: id_glossario, notpl: 1 }, function(data){ $("#descricao-palavra").html(data); }); } else { $("#descricao-palavra").html(""); $("#glossario-com-resultado").hide(); $("#glossario-sem-resultado").show(); } } function criaLoader() { return '
    '; } //MEDIA function embedMedia(seletor) { if(!seletor) seletor = $('.media'); seletor.each(function () { if( !( $(this).children().is("object") || $(this).children().is("embed") ) ) { $(this).media($(this).metadata()); } }); } //TABELAS function tabelaPadraoEmbed(pai) { $( (pai ? pai : "") + " .tabela-padrao TR" ).each(function() { if( !$(this).parent().parent().hasClass('ignore-first') ) { $(this).children('TH:first, TD:first').addClass("first"); } if($(this).hasClass("linha-pai")){ $(this).children('TD:last').addClass("last"); } }); } var indice = ""; function linhaPaiClick() { indice = $(this).attr("id"); $(this).parents(".tabela-padrao").find(".linha-filho").each(function(){ if($(this).hasClass("linha-"+indice+"")){ if($(this).css("display") == "none"){ $(this).show(); } else{ $(this).hide(); } } }); $(this).find('.table-toggle').toggleClass('menos'); } function linhaPaiEmbed(content) { if(content) { content.find(".tabela-padrao .linha-pai").click(linhaPaiClick); }else { $(".tabela-padrao .linha-pai").click(linhaPaiClick); } } //TOOLTIP var selTooltip = ".tooltip"; var heightTooltip = ""; function tooltipPadraoClick() { heightTooltip = ($(this).children(".box-tooltip-padrao").outerHeight()) + 3; widthTooltip = $(this).children(".box-tooltip-padrao").width(); $(this).children(".box-tooltip-padrao").css({"top":"-"+ heightTooltip +"px", "width":widthTooltip}); $(this).children(".box-tooltip-padrao").toggle(); } function fecharTooltipClick() { $(this).parents(".box-tooltip-padrao").toggle(); } function boxTooltipPadraoClick() { return false; } function tooltipPadraoEmbed(content) { //tooltip padrão if(content) { content.find(".tooltip-padrao").click(tooltipPadraoClick); content.find(".fechar-tooltip").click(fecharTooltipClick); content.find(".box-tooltip-padrao").click(boxTooltipPadraoClick); }else { $(".tooltip-padrao").click(tooltipPadraoClick); $(".fechar-tooltip").click(fecharTooltipClick); $(".box-tooltip-padrao").click(boxTooltipPadraoClick); } } function tooltipEmbed() { $(".menu-principal A").mouseover(function() { var oLI = $(this).parent(); var wLI = oLI.width(); var wTO = 152; $(selTooltip).children("DIV").html(oLI.children("SPAN").html()); $(selTooltip).css("left", oLI.position().left + 20 + ((wLI - wTO) / 2)); $(selTooltip).css("top",$(this).parent().position().top - 40); $(selTooltip).show(); }); $(".menu-principal A").mouseout(function() { $(selTooltip).hide(); }); } function jCarouselInitCallback(jc, state) { if (state == 'init') { jc.startAutoOrig = jc.startAuto; jc.paused = true; jc.startAuto = function() { if (!jc.paused) { jc.startAutoOrig(); } } jc.playPause = function() { jc.paused = !jc.paused; if(jc.paused) { jc.stopAuto(); }else { jc.startAuto(); } }; $('#jcarousel-play-pause').click(function() { jc.playPause(); if(jc.paused) { $(this).attr('class', 'jcarousel-pause-disabled-horizontal'); }else { $(this).attr('class', 'jcarousel-pause-horizontal'); } }); $('#jcarousel-play-pause').click(); } } $(document).ready(function() { //MEDIA embedMedia(); //hover states on the static widgets $('#dialog_link, ul#icons li').hover( function() { $(this).addClass('ui-state-hover'); }, function() { $(this).removeClass('ui-state-hover'); } ); //CARROSSEL $('#carrossel-patrocinadores').jcarousel({wrap:'circular',visible:1,scroll:1,auto:2}); $('#carrossel-educacao-brasil').jcarousel({visible:1,scroll:1,auto:false}); $('#carousel-comunicacao').jcarousel({ scroll: 1, auto: 6, visible: 1, wrap: 'circular', buttonPauseHTML: '
    ', initCallback: jCarouselInitCallback }); $('#carousel-destaques').jcarousel({ scroll: 1, auto: 6, visible: 1, wrap: 'circular', buttonPauseHTML: '
    ', initCallback: jCarouselInitCallback }); //ABAS $('.content-tab').hide(); $('.content-tab:first').show(); $('.tab').click(function(){ $('.tab').parent().removeClass('on'); $(this).parent().addClass('on'); $('.content-tab').hide(); $('#content-'+$(this).attr('id')).show(); }); //BANNER MOBILIZAÇÃO $('.bt-banner:first').addClass('on'); $('.banner-mobilizacao').hide(); $('.banner-mobilizacao:first').show(); $('.bt-banner').click(function(){ $('.bt-banner').removeClass('on'); $(this).addClass('on'); }); $('.bt1').click(function(){ clearTimeout(timeoutcrl); $('.banner-mobilizacao').hide(); $('.banner1').show(); }); $('.bt2').click(function(){ clearTimeout(timeoutcrl); $('.banner-mobilizacao').hide(); $('.banner2').show(); }); $('.bt3').click(function(){ clearTimeout(timeoutcrl); $('.banner-mobilizacao').hide(); $('.banner3').show(); }); var bannerMob = 0; var timeoutcrl; trocarBanner(); function trocarBanner() { bannerMob++; if(bannerMob > 3) bannerMob = 1; var bt = $('.bt'+bannerMob); var banner = $('.banner'+bannerMob); if(!bt.length){ if(bannerMob != 1){ trocarBanner(); } }else{ bt.click(); timeoutcrl = setTimeout(trocarBanner, banner.metadata().duration); } } //EXAMPLE $('#busca-geral').example('O que você procura?'); $('#boletim').example('Digite seu email'); //AUMENTAR E DIMINUIR FONTE var pc = 100; if (($.cookie("font-modify")) != undefined) { pc = ($.cookie("font-modify")) * 1; setFontSize(pc); } else { $.cookie('font-modify', '100', {expires: 7, path: '/', secure: true}); } $(".fonte-menos").click(function(){ if (pc > 90) {pc -= 5;} else {pc = 90;} setFontSize(pc); return false; }); //decrease font size $(".fonte-mais").click(function(){ if (pc < 120) {pc += 5;} else {pc = 120;} setFontSize(pc); return false; }); function setFontSize(porc) { $(".box-tooltip-padrao").hide();//fecha os tooltips $('.layout-mg').css('font-size', pc+"%"); $.cookie("font-modify",pc); eqBox('.eq-box');//calcula e equaliza novamente os box da função eqBox eqBox('.eq-col'); eqBox('.eq-col2'); } // CONTRASTE var cookieContraste = "css-contraste"; var cssContraste = "contraste"; if ((($.cookie(cookieContraste)) != undefined) && (($.cookie(cookieContraste)) == "true")) { $("head").append(''); $("body").addClass('contraste'); } else { $.cookie(cookieContraste, 'false', {expires: 7, path: '/', secure: true}); } $(".set-contraste").click(function() {toggleContraste();}); function toggleContraste() { if($.cookie(cookieContraste)=='true'){ $("#contraste-style").remove(); $("body").removeClass('contraste'); $.cookie(cookieContraste, "false"); } else{ //$("#default-style").remove(); $("head").append(''); $("body").addClass('contraste'); $.cookie(cookieContraste, "true"); } } // TOOLTIP tooltipEmbed(); tooltipPadraoEmbed(); // TABELAS tabelaPadraoEmbed(); linhaPaiEmbed(); // SANFONA $(".click-sanfona").click(function() { var sanfona = $(this).parents(".sanfona"); if (!(sanfona.hasClass("fechada"))) { sanfona.find("[class^=sanfona-conteudo]").slideUp(function() { $(this).prev().children('.ico').removeClass("menos").addClass("mais"); sanfona.toggleClass("fechada"); }); } else { sanfona.find("[class^=sanfona-conteudo]").slideDown(function() { $(this).prev().children('.ico').removeClass("mais").addClass("menos"); sanfona.toggleClass("fechada"); }); } }); //LIGHTBOX $('.lightbox').each(function(){ $(this).lightBox(); }); //EXTERNAL $(".external").live("click", function(){ window.open($(this).attr("href")); return false; }); $(".mask").each(function () { var metadata = $(this).metadata(); $(this).mask(metadata.format); }); $(".ajax-form").each(function () { $(this).find("form").ajaxForm({ beforeSubmit: function(arr, $form, options) { if(formReceberProcessando) { alert('Por favor, aguarde a finalização do envio.'); return false; } formReceberProcessando = true; var element = $form.find(".form-loading"); if(element.length) { element.show(); } return true; }, success: function(responseText, statusText, xhr, $form) { formReceberProcessando = false; var element = $form.find(".form-loading"); if(element.length) { element.hide(); } if(responseText == 1) { $form.hide(); $form.parent().find('.sucesso').show(); $form.clearForm(); } else { alert(responseText); } } }); }); $(".ajax-form-boletim").each(function () { $(this).find("form").ajaxForm({ beforeSubmit: function(arr, $form, options) { if(formReceberProcessando) { alert('Por favor, aguarde sua inscrição terminar de ser processada.'); return false; } formReceberProcessando = true; $form.find(".carregando-form-receber").show(); return true; }, success: function(responseText, statusText, xhr, $form) { formReceberProcessando = false; $form.find(".carregando-form-receber").hide(); if (responseText == 1) { $form.parent().children('.sucesso-boletim').show(); $form.empty(); } else { alert(responseText); } } }); }); // JUMP $(".jump-menu").change(function () { if ($(this).val()) { window.open($(this).val(),"_self"); } }); //Equaliza altura das colunas de Educação no Brasil eqBox('.eq-col'); eqBox('.eq-col2'); // ESTADO - CIDADE $("#id_estado").change(function(){ mostraCidades($(this).val()); }); $("#form-busca").submit(function (){ if ($("#busca-geral").val()=='') { alert('Preencha o campo para realizar a busca.'); return false; } }); //DATE PICKER $('.datepicker').datePicker({startDate:'01/01/1900'}); // DICIONÁRIO //$('#busca-glossario').example('Busca no Glossário'); $(".dicionario-abre").click(function(){ if ($(this).hasClass('abre')) { glossarioAbre(); } else { glossarioFecha(); } }); $("li[class^=letra-dicionario]").click(function(){ if (!$(this).hasClass("off")) { $("#glossario-sugerir").slideUp(); glossarioResultado($(this).attr('id')); if (showBox) { glossarioAbre(); } } }); $("#palavra li").live('click', function(){ $("#palavra li").removeClass('txt-bold'); $(this).addClass('txt-bold'); glossarioDescricao($(this).attr('id')); }); $("#glossario-busca").submit(function (){ if ($("#busca-glossario").val()=='') { alert('Preencha o campo para realizar a busca.'); return false; } var tamanho = $("#busca-glossario").val().length; if(tamanho >=1 && tamanho < 3){ alert("Digite no mínimo 3 caracteres para pesquisar."); return false; } $(".sugestao-sucesso").slideUp(); $("#glossario-sugerir").slideUp(); glossarioResultado($("#busca-glossario").val()); glossarioAbre(); return false; }); $("#bt-glossario-nao-encontrei").click(function(){ $(".sucesso").hide(); if ($("#glossario-sugerir").css("display") == "none") { $("#glossario-sugerir").slideDown(); $(".dicionario-abre").removeClass('abre'); $(".dicionario-abre").addClass('fecha'); } else { $("#glossario-sugerir").slideUp(); $(".dicionario-abre").removeClass('fecha'); $(".dicionario-abre").addClass('abre'); } $(".dicionario-conteudo").slideUp(); }); var showBox = false; $("li[class^=letra-dicionario]:first").click(); showBox = true; $("#comentar").click(function(){ $("#box-comentar").fadeIn(800); return false; }); // ver mais comentários $(".ver-mais-comentario").click(function(){ $('.loader-comentario').show(); $.get($(this).attr('href') + '&offset=' + offset_comentario, function(data){ $(".lista-comentario").append(data); $('.loader-comentario').hide(); }); offset_comentario += 2; if(offset_comentario >= $('input[name=qnt_comentario]').val()){ $(this).parent().addClass('d-none'); } return false; }); // paginação ajax $('.pagnav-tag-ajax .paginacao').find('a').live('click', function(){ var pag = $(this).attr('rel').substr(4); var campo = $('input[name=tag_campo]').val(); var id = $('input[name=tag_id]').val(); $('.loader-tag-pagnav').show(); $.get($live_site + 'index.php', {option: 'ajax', task: 'paginacao', notpl: '1', pag: pag, campo: campo, id: id}, function(data){ $('.pagnav-tag-ajax').html(data); }); $('.loader-tag-pagnav').hide(); return false; }); /* ENQUETE - VOTAR */ $("#enquete-votar").click(function (){ var id_opcao = $("input[name=resposta]:checked").val(); var old = $(this).attr("href"); $(this).attr("href",old+"&id_enquete_opcao="+id_opcao); tb_show('', $(this).attr("href")); return false; }); /* SUB-MENU */ $('.menu-reduzido').mouseover(function(){ if($(this).find('li').length > 0) $(this).children('.sub-menu').show(); }); $('.menu-reduzido').mouseout(function(){ $(this).children('.sub-menu').hide(); }); /*CARROUSSEL MOBILIZACAO*/ var mobilizacaoFlashOn = $.flash.hasVersion(10); var mobilizacaoSeletor = $(".mobilizacao"); if(mobilizacaoFlashOn) { embedMedia(mobilizacaoSeletor); }else { $(".banner-mobilizacao").each(function() { if(!$(this).find('img').length) { var matches = /banner(\d+)/.exec($(this).attr('class')); $(".bt" + matches[1]).remove(); $(this).remove(); } }); if(!$(".banner-mobilizacao").length) { $("#banner-mobilizacao-container").remove(); } } /*MAPAS MOBILIZACAO*/ var mapaFlashOn = $.flash.hasVersion(10); var mapaSeletor = $(".f-mapa"); if(mapaFlashOn) { mapaSeletor.html(''); embedMedia(mapaSeletor); } /* CARROUSSEL CONCEITUAL TOPO */ var carouselConceitualInterval = 0; var carouselConceitualFlashOn = $.flash.hasVersion(10); var carouselConceitualContainer = $("#carrossel-conceitual-topo-imagens ul"); if(!carouselConceitualFlashOn) { carouselConceitualContainer.children('.alternativo-off').each(function() { $(this).remove(); }); } function carouselConceitualAuto(oldItems, newItems) { clearInterval(carouselConceitualInterval); var current = newItems.first(); var metadata = current.metadata(); if(carouselConceitualFlashOn && metadata.type == 'swf') { current.html('
    ').children('div').media(metadata); } carouselConceitualInterval = setTimeout(carouselConceitualProximo, metadata.duration * 1); } function carouselConceitualProximo() { carouselConceitualContainer.trigger("next", 1); } if(carouselConceitualContainer.children('li').length) { var element = $("#carrossel-conceitual-topo-imagens"); element.css('visibility', 'hidden').show(); carouselConceitualContainer.carouFredSel({ scroll: { fx: "fade", duration: 500, onBefore: carouselConceitualAuto }, direction: "down", next:".carrossel-conceitual-topo-navegacao-proximo", prev:".carrossel-conceitual-topo-navegacao-anterior", items: 1, auto: {play: false} }); element.css('visibility', 'visible'); carouselConceitualAuto(null, carouselConceitualContainer.children('li')); }else { $("#carrossel-conceitual-topo-navegacao").hide(); } /* EQUALIZA BLOCOS DO ACONTECE */ eqBox('.eq-acontece1'); //Youtube var feedYoutubeLength = 2; $.ajax({ url: $live_site+'index.php', data: 'option=ajax&task=youtube¬pl=1', cache: false, dataType: 'json', type: 'get', success: function(data) { var items = data.feed.entry; for(var i in items) { /* Previne exibição de tweet mais antigo se forem retornados pelo serviço do Twitter mais tweets que o requisitado. */ if(i == feedYoutubeLength) { break; } var feedCurrent = $('.youtube-feed:last'); if(i < feedYoutubeLength - 1) { feedCurrent.clone(true).insertAfter(feedCurrent); } feedCurrent.find('a').attr('href', items[i].link[0].href); feedCurrent.find('.link-normal').html(items[i].title.$t); var date = new Date(); date.setISO8601(items[i].published.$t); feedCurrent.find('.youtube-feed-data').html( strPad(date.getHours(), 2, 0, 'left') + ':' + strPad(date.getMinutes(), 2, 0, 'left') + ' | ' + strPad(date.getDate(), 2, 0, 'left') + '.' + strPad(date.getMonth() + 1, 2, 0, 'left') + '.' + date.getFullYear() ); feedCurrent.show(); } } }); }); function feedTwitterCallback(items) { $(document).ready(function() { var feedTwitterLength = 2; for(var i = 0; i < items.length; i++) { /* Previne exibição de tweet mais antigo se forem retornados pelo serviço do Twitter mais tweets que o requisitado. Atenção: inclusive no requisição do JS do Twitter são requisitados 3 em vez de diretamente 2, porque quando estava sendo requisitado diretamente um count de 2, estava retornando apenas 1 tweet. */ if(i == feedTwitterLength) { break; } var feedCurrent = $('.twitter-feed:last'); if(i < feedTwitterLength - 1) { feedCurrent.clone(true).insertAfter(feedCurrent); } feedCurrent.find('a').attr('href', 'http://twitter.com/TodosEducacao/statuses/' + items[i].id_str); feedCurrent.find('.link-normal').html(items[i].text); var tmpDate = items[i].created_at.split(' '); var date = new Date(Date.parse(tmpDate[1]+' '+tmpDate[2]+', '+tmpDate[5]+' '+tmpDate[3]+' UTC')); var mes = date.getMonth() + 1; feedCurrent.find('.twitter-feed-data').html( strPad(date.getHours(), 2, 0, 'left') + ':' + strPad(date.getMinutes(), 2, 0, 'left') + ' | ' + strPad(date.getDate(), 2, 0, 'left') + '.' + strPad(date.getMonth() + 1, 2, 0, 'left') + '.' + date.getFullYear() ); feedCurrent.show(); } }); } //Deixar iframe tamanho total da tela function iFrameHeight(element) { var id = element.id; var h = 0; if (!document.all) { h = document.getElementById(id).contentDocument.height; document.getElementById(id).style.height = h + 60 + 'px'; } else if (document.all) { h = document.frames(id).document.body.scrollHeight; document.all.id.style.height = h + 20 + 'px'; } } $(document).ready(function(){ $('.tabela-padrao').each(function(itabela,vtabela){ var tbody = $(this).children('tbody'); tbody.each(function(){ var tr = $(this).children('tr'); tr.each(function(){ var td = $(this).children('td:visible'); td.each(function(i,v){ var $this = $(this); if($(this).html() == ' -- '){ var tabelaPro = $('.tabela-padrao').eq(itabela); tabelaPro.find('thead tr th').eq(i).parents('table') .find('tr *:nth-child(' + ( $this.index() + 1 ) + ')') .hide(); //$(this).hide(); } }) }) }) }) /* */ $.fn.ocultar = function() { var $this = $(this); $this .parents('table') .find('tr *:nth-child(' + ( $this.index() + 1 ) + ')') .hide(); } }); /* Arquivo: home.js */ $(document).ready(function(){ eqBox('.eq-box'); if($.flash.hasVersion(10)) { $(".carousel-estados-tabela, .carousel-estados-mapa").toggleClass('d-none'); embedMedia($(".carousel-estados-mapa")); } });