The 5Ws of Outsourcing - O2I (2024)

If your organization is new to outsourcing, you might be confused about why should I outsource, who should I outsource to, who should outsource, when should I outsource, what should I outsource and where should I outsource. Making the right decisions about who to outsource to, when to outsource, where to outsource and what to outsource can go a long way in helping you make the most out of outsourcing. This article gives you insight on the five Ws of outsourcing, namely, who should I outsource to?, why should I outsource?, what should I outsource?, when should I outsource? and where should I outsource to?

Today, outsourcing has become the order of the day. Almost every organization is outsourcing. If you are unsure about stepping into outsourcing, analyze your organizations' needs and find out if your business really requires outsourcing. Ask yourself the following questions. Is my organization finding it difficult to meet customer needs? Does my organization want to remain small, but has a huge market presence? Does my organization have managers who are not sure about which product lines make/lose money? Is my company experiencing constant challenges based on operational issues? Does my organization lack the expertise that would grow my business? Does my organization have important nonrecurring project requirements but no resources to handle them?

If you have answered 'yes' to more than one question, then you must venture into outsourcing. Outsourcing can help you to efficiently deal with the following challenges. Outsourcing can help you to meet your customer needs on time, make a huge market presence, make the right decisions about product lines, overcome operational challenges, get access to expert services and benefit from professional resources who can competently handle your projects.

It does not matter to which industry your organization belongs to. Outsourcing can bring tremendous benefits to any type of business, be it B2B, B2C, SMEs, large diversified companies or small home offices. Make a decision to outsource today and see a transformation in your business.

Outsourcing can give you access to the several benefits of outsourcing. The following are a list of some of the benefits of outsourcing.

You can outsource almost anything today. You will be able to easily find an outsourcing provider for any service that you might want to outsource. The following are a list of services that can be outsourced to India. India has a large talent pool of skilled professionals who can efficiently provide the service that you want to outsource.

Outsource your business processes and focus on your core competencies. Tell us your needs.

The right time to outsource would be when you want your personnel to concentrate on your core competencies. While your resources focus more on business critical functions, other functions which are not critical can be done by your outsourcing provider. If you want to get access to expert services, then again it is the right time to outsource, If you want your services to be completed on time, in a faster, cheaper and better manner, then again it is the right time to outsource. If you do not want to invest in software, technology, manpower and resources, then you must consider outsourcing. Finally, if you want your organization to gain a competitive edge, then you must outsource.

There are many countries that you can outsource to, but the best country to outsource to would be India. India is the world's outsourcing hub and the most preferred outsourcing location in the world. India is the most ideal place to outsource to, because India offers many advantages. Outsource to India and benefit from cost-effective services, skilled resources, specialized services and timely deliveries. Several global organizations have set up offices in India, to tap the benefits that India offers.

Asking yourself the 5Ws of outsourcing can help you make the right outsourcing decision.

Get a FREE QUOTE!

Decide in 24 hours whether outsourcing will work for you.

";// Support: Safari<4// Catch class over-cachingdiv.firstChild.className = "i";// Support: Opera<10// Catch gEBCN failure to find non-leading classesreturn div.getElementsByClassName("i").length === 2;});// Support: IE<10// Check if getElementById returns elements by name// The broken getElementById methods don't pick up programatically-set names,// so use a roundabout getElementsByName testsupport.getById = assert(function( div ) {docElem.appendChild( div ).id = expando;return !doc.getElementsByName || !doc.getElementsByName( expando ).length;});// ID find and filterif ( support.getById ) {Expr.find["ID"] = function( id, context ) {if ( typeof context.getElementById !== strundefined && documentIsHTML ) {var m = context.getElementById( id );// Check parentNode to catch when Blackberry 4.6 returns// nodes that are no longer in the document #6963return m && m.parentNode ? [m] : [];}};Expr.filter["ID"] = function( id ) {var attrId = id.replace( runescape, funescape );return function( elem ) {return elem.getAttribute("id") === attrId;};};} else {// Support: IE6/7// getElementById is not reliable as a find shortcutdelete Expr.find["ID"];Expr.filter["ID"] = function( id ) {var attrId = id.replace( runescape, funescape );return function( elem ) {var node = typeof elem.getAttributeNode !== strundefined && elem.getAttributeNode("id");return node && node.value === attrId;};};}// TagExpr.find["TAG"] = support.getElementsByTagName ?function( tag, context ) {if ( typeof context.getElementsByTagName !== strundefined ) {return context.getElementsByTagName( tag );}} :function( tag, context ) {var elem,tmp = [],i = 0,results = context.getElementsByTagName( tag );// Filter out possible commentsif ( tag === "*" ) {while ( (elem = results[i++]) ) {if ( elem.nodeType === 1 ) {tmp.push( elem );}}return tmp;}return results;};// ClassExpr.find["CLASS"] = support.getElementsByClassName && function( className, context ) {if ( typeof context.getElementsByClassName !== strundefined && documentIsHTML ) {return context.getElementsByClassName( className );}};/* QSA/matchesSelector---------------------------------------------------------------------- */// QSA and matchesSelector support// matchesSelector(:active) reports false when true (IE9/Opera 11.5)rbuggyMatches = [];// qSa(:focus) reports false when true (Chrome 21)// We allow this because of a bug in IE8/9 that throws an error// whenever `document.activeElement` is accessed on an iframe// So, we allow :focus to pass through QSA all the time to avoid the IE error// See http://bugs.jquery.com/ticket/13378rbuggyQSA = [];if ( (support.qsa = rnative.test( doc.querySelectorAll )) ) {// Build QSA regex// Regex strategy adopted from Diego Periniassert(function( div ) {// Select is set to empty string on purpose// This is to test IE's treatment of not explicitly// setting a boolean content attribute,// since its presence should be enough// http://bugs.jquery.com/ticket/12359div.innerHTML = "";// Support: IE8, Opera 10-12// Nothing should be selected when empty strings follow ^= or $= or *=if ( div.querySelectorAll("[t^='']").length ) {rbuggyQSA.push( "[*^$]=" + whitespace + "*(?:''|\"\")" );}// Support: IE8// Boolean attributes and "value" are not treated correctlyif ( !div.querySelectorAll("[selected]").length ) {rbuggyQSA.push( "\\[" + whitespace + "*(?:value|" + booleans + ")" );}// Webkit/Opera - :checked should return selected option elements// http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked// IE8 throws error here and will not see later testsif ( !div.querySelectorAll(":checked").length ) {rbuggyQSA.push(":checked");}});assert(function( div ) {// Support: Windows 8 Native Apps// The type and name attributes are restricted during .innerHTML assignmentvar input = doc.createElement("input");input.setAttribute( "type", "hidden" );div.appendChild( input ).setAttribute( "name", "D" );// Support: IE8// Enforce case-sensitivity of name attributeif ( div.querySelectorAll("[name=d]").length ) {rbuggyQSA.push( "name" + whitespace + "*[*^$|!~]?=" );}// FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled)// IE8 throws error here and will not see later testsif ( !div.querySelectorAll(":enabled").length ) {rbuggyQSA.push( ":enabled", ":disabled" );}// Opera 10-11 does not throw on post-comma invalid pseudosdiv.querySelectorAll("*,:x");rbuggyQSA.push(",.*:");});}if ( (support.matchesSelector = rnative.test( (matches = docElem.webkitMatchesSelector ||docElem.mozMatchesSelector ||docElem.oMatchesSelector ||docElem.msMatchesSelector) )) ) {assert(function( div ) {// Check to see if it's possible to do matchesSelector// on a disconnected node (IE 9)support.disconnectedMatch = matches.call( div, "div" );// This should fail with an exception// Gecko does not error, returns false insteadmatches.call( div, "[s!='']:x" );rbuggyMatches.push( "!=", pseudos );});}rbuggyQSA = rbuggyQSA.length && new RegExp( rbuggyQSA.join("|") );rbuggyMatches = rbuggyMatches.length && new RegExp( rbuggyMatches.join("|") );/* Contains---------------------------------------------------------------------- */hasCompare = rnative.test( docElem.compareDocumentPosition );// Element contains another// Purposefully does not implement inclusive descendent// As in, an element does not contain itselfcontains = hasCompare || rnative.test( docElem.contains ) ?function( a, b ) {var adown = a.nodeType === 9 ? a.documentElement : a,bup = b && b.parentNode;return a === bup || !!( bup && bup.nodeType === 1 && (adown.contains ?adown.contains( bup ) :a.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16));} :function( a, b ) {if ( b ) {while ( (b = b.parentNode) ) {if ( b === a ) {return true;}}}return false;};/* Sorting---------------------------------------------------------------------- */// Document order sortingsortOrder = hasCompare ?function( a, b ) {// Flag for duplicate removalif ( a === b ) {hasDuplicate = true;return 0;}// Sort on method existence if only one input has compareDocumentPositionvar compare = !a.compareDocumentPosition - !b.compareDocumentPosition;if ( compare ) {return compare;}// Calculate position if both inputs belong to the same documentcompare = ( a.ownerDocument || a ) === ( b.ownerDocument || b ) ?a.compareDocumentPosition( b ) :// Otherwise we know they are disconnected1;// Disconnected nodesif ( compare & 1 ||(!support.sortDetached && b.compareDocumentPosition( a ) === compare) ) {// Choose the first element that is related to our preferred documentif ( a === doc || a.ownerDocument === preferredDoc && contains(preferredDoc, a) ) {return -1;}if ( b === doc || b.ownerDocument === preferredDoc && contains(preferredDoc, b) ) {return 1;}// Maintain original orderreturn sortInput ?( indexOf.call( sortInput, a ) - indexOf.call( sortInput, b ) ) :0;}return compare & 4 ? -1 : 1;} :function( a, b ) {// Exit early if the nodes are identicalif ( a === b ) {hasDuplicate = true;return 0;}var cur,i = 0,aup = a.parentNode,bup = b.parentNode,ap = [ a ],bp = [ b ];// Parentless nodes are either documents or disconnectedif ( !aup || !bup ) {return a === doc ? -1 :b === doc ? 1 :aup ? -1 :bup ? 1 :sortInput ?( indexOf.call( sortInput, a ) - indexOf.call( sortInput, b ) ) :0;// If the nodes are siblings, we can do a quick check} else if ( aup === bup ) {return siblingCheck( a, b );}// Otherwise we need full lists of their ancestors for comparisoncur = a;while ( (cur = cur.parentNode) ) {ap.unshift( cur );}cur = b;while ( (cur = cur.parentNode) ) {bp.unshift( cur );}// Walk down the tree looking for a discrepancywhile ( ap[i] === bp[i] ) {i++;}return i ?// Do a sibling check if the nodes have a common ancestorsiblingCheck( ap[i], bp[i] ) :// Otherwise nodes in our document sort firstap[i] === preferredDoc ? -1 :bp[i] === preferredDoc ? 1 :0;};return doc;};Sizzle.matches = function( expr, elements ) {return Sizzle( expr, null, null, elements );};Sizzle.matchesSelector = function( elem, expr ) {// Set document vars if neededif ( ( elem.ownerDocument || elem ) !== document ) {setDocument( elem );}// Make sure that attribute selectors are quotedexpr = expr.replace( rattributeQuotes, "='$1']" );if ( support.matchesSelector && documentIsHTML &&( !rbuggyMatches || !rbuggyMatches.test( expr ) ) &&( !rbuggyQSA || !rbuggyQSA.test( expr ) ) ) {try {var ret = matches.call( elem, expr );// IE 9's matchesSelector returns false on disconnected nodesif ( ret || support.disconnectedMatch ||// As well, disconnected nodes are said to be in a document// fragment in IE 9elem.document && elem.document.nodeType !== 11 ) {return ret;}} catch(e) {}}return Sizzle( expr, document, null, [elem] ).length > 0;};Sizzle.contains = function( context, elem ) {// Set document vars if neededif ( ( context.ownerDocument || context ) !== document ) {setDocument( context );}return contains( context, elem );};Sizzle.attr = function( elem, name ) {// Set document vars if neededif ( ( elem.ownerDocument || elem ) !== document ) {setDocument( elem );}var fn = Expr.attrHandle[ name.toLowerCase() ],// Don't get fooled by Object.prototype properties (jQuery #13807)val = fn && hasOwn.call( Expr.attrHandle, name.toLowerCase() ) ?fn( elem, name, !documentIsHTML ) :undefined;return val !== undefined ?val :support.attributes || !documentIsHTML ?elem.getAttribute( name ) :(val = elem.getAttributeNode(name)) && val.specified ?val.value :null;};Sizzle.error = function( msg ) {throw new Error( "Syntax error, unrecognized expression: " + msg );};/** * Document sorting and removing duplicates * @param {ArrayLike} results */Sizzle.uniqueSort = function( results ) {var elem,duplicates = [],j = 0,i = 0;// Unless we *know* we can detect duplicates, assume their presencehasDuplicate = !support.detectDuplicates;sortInput = !support.sortStable && results.slice( 0 );results.sort( sortOrder );if ( hasDuplicate ) {while ( (elem = results[i++]) ) {if ( elem === results[ i ] ) {j = duplicates.push( i );}}while ( j-- ) {results.splice( duplicates[ j ], 1 );}}// Clear input after sorting to release objects// See https://github.com/jquery/sizzle/pull/225sortInput = null;return results;};/** * Utility function for retrieving the text value of an array of DOM nodes * @param {Array|Element} elem */getText = Sizzle.getText = function( elem ) {var node,ret = "",i = 0,nodeType = elem.nodeType;if ( !nodeType ) {// If no nodeType, this is expected to be an arraywhile ( (node = elem[i++]) ) {// Do not traverse comment nodesret += getText( node );}} else if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) {// Use textContent for elements// innerText usage removed for consistency of new lines (jQuery #11153)if ( typeof elem.textContent === "string" ) {return elem.textContent;} else {// Traverse its childrenfor ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {ret += getText( elem );}}} else if ( nodeType === 3 || nodeType === 4 ) {return elem.nodeValue;}// Do not include comment or processing instruction nodesreturn ret;};Expr = Sizzle.selectors = {// Can be adjusted by the usercacheLength: 50,createPseudo: markFunction,match: matchExpr,attrHandle: {},find: {},relative: {">": { dir: "parentNode", first: true }," ": { dir: "parentNode" },"+": { dir: "previousSibling", first: true },"~": { dir: "previousSibling" }},preFilter: {"ATTR": function( match ) {match[1] = match[1].replace( runescape, funescape );// Move the given value to match[3] whether quoted or unquotedmatch[3] = ( match[4] || match[5] || "" ).replace( runescape, funescape );if ( match[2] === "~=" ) {match[3] = " " + match[3] + " ";}return match.slice( 0, 4 );},"CHILD": function( match ) {/* matches from matchExpr["CHILD"]1 type (only|nth|...)2 what (child|of-type)3 argument (even|odd|\d*|\d*n([+-]\d+)?|...)4 xn-component of xn+y argument ([+-]?\d*n|)5 sign of xn-component6 x of xn-component7 sign of y-component8 y of y-component*/match[1] = match[1].toLowerCase();if ( match[1].slice( 0, 3 ) === "nth" ) {// nth-* requires argumentif ( !match[3] ) {Sizzle.error( match[0] );}// numeric x and y parameters for Expr.filter.CHILD// remember that false/true cast respectively to 0/1match[4] = +( match[4] ? match[5] + (match[6] || 1) : 2 * ( match[3] === "even" || match[3] === "odd" ) );match[5] = +( ( match[7] + match[8] ) || match[3] === "odd" );// other types prohibit arguments} else if ( match[3] ) {Sizzle.error( match[0] );}return match;},"PSEUDO": function( match ) {var excess,unquoted = !match[5] && match[2];if ( matchExpr["CHILD"].test( match[0] ) ) {return null;}// Accept quoted arguments as-isif ( match[3] && match[4] !== undefined ) {match[2] = match[4];// Strip excess characters from unquoted arguments} else if ( unquoted && rpseudo.test( unquoted ) &&// Get excess from tokenize (recursively)(excess = tokenize( unquoted, true )) &&// advance to the next closing parenthesis(excess = unquoted.indexOf( ")", unquoted.length - excess ) - unquoted.length) ) {// excess is a negative indexmatch[0] = match[0].slice( 0, excess );match[2] = unquoted.slice( 0, excess );}// Return only captures needed by the pseudo filter method (type and argument)return match.slice( 0, 3 );}},filter: {"TAG": function( nodeNameSelector ) {var nodeName = nodeNameSelector.replace( runescape, funescape ).toLowerCase();return nodeNameSelector === "*" ?function() { return true; } :function( elem ) {return elem.nodeName && elem.nodeName.toLowerCase() === nodeName;};},"CLASS": function( className ) {var pattern = classCache[ className + " " ];return pattern ||(pattern = new RegExp( "(^|" + whitespace + ")" + className + "(" + whitespace + "|$)" )) &&classCache( className, function( elem ) {return pattern.test( typeof elem.className === "string" && elem.className || typeof elem.getAttribute !== strundefined && elem.getAttribute("class") || "" );});},"ATTR": function( name, operator, check ) {return function( elem ) {var result = Sizzle.attr( elem, name );if ( result == null ) {return operator === "!=";}if ( !operator ) {return true;}result += "";return operator === "=" ? result === check :operator === "!=" ? result !== check :operator === "^=" ? check && result.indexOf( check ) === 0 :operator === "*=" ? check && result.indexOf( check ) > -1 :operator === "$=" ? check && result.slice( -check.length ) === check :operator === "~=" ? ( " " + result + " " ).indexOf( check ) > -1 :operator === "|=" ? result === check || result.slice( 0, check.length + 1 ) === check + "-" :false;};},"CHILD": function( type, what, argument, first, last ) {var simple = type.slice( 0, 3 ) !== "nth",forward = type.slice( -4 ) !== "last",ofType = what === "of-type";return first === 1 && last === 0 ?// Shortcut for :nth-*(n)function( elem ) {return !!elem.parentNode;} :function( elem, context, xml ) {var cache, outerCache, node, diff, nodeIndex, start,dir = simple !== forward ? "nextSibling" : "previousSibling",parent = elem.parentNode,name = ofType && elem.nodeName.toLowerCase(),useCache = !xml && !ofType;if ( parent ) {// :(first|last|only)-(child|of-type)if ( simple ) {while ( dir ) {node = elem;while ( (node = node[ dir ]) ) {if ( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) {return false;}}// Reverse direction for :only-* (if we haven't yet done so)start = dir = type === "only" && !start && "nextSibling";}return true;}start = [ forward ? parent.firstChild : parent.lastChild ];// non-xml :nth-child(...) stores cache data on `parent`if ( forward && useCache ) {// Seek `elem` from a previously-cached indexouterCache = parent[ expando ] || (parent[ expando ] = {});cache = outerCache[ type ] || [];nodeIndex = cache[0] === dirruns && cache[1];diff = cache[0] === dirruns && cache[2];node = nodeIndex && parent.childNodes[ nodeIndex ];while ( (node = ++nodeIndex && node && node[ dir ] ||// Fallback to seeking `elem` from the start(diff = nodeIndex = 0) || start.pop()) ) {// When found, cache indexes on `parent` and breakif ( node.nodeType === 1 && ++diff && node === elem ) {outerCache[ type ] = [ dirruns, nodeIndex, diff ];break;}}// Use previously-cached element index if available} else if ( useCache && (cache = (elem[ expando ] || (elem[ expando ] = {}))[ type ]) && cache[0] === dirruns ) {diff = cache[1];// xml :nth-child(...) or :nth-last-child(...) or :nth(-last)?-of-type(...)} else {// Use the same loop as above to seek `elem` from the startwhile ( (node = ++nodeIndex && node && node[ dir ] ||(diff = nodeIndex = 0) || start.pop()) ) {if ( ( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) && ++diff ) {// Cache the index of each encountered elementif ( useCache ) {(node[ expando ] || (node[ expando ] = {}))[ type ] = [ dirruns, diff ];}if ( node === elem ) {break;}}}}// Incorporate the offset, then check against cycle sizediff -= last;return diff === first || ( diff % first === 0 && diff / first >= 0 );}};},"PSEUDO": function( pseudo, argument ) {// pseudo-class names are case-insensitive// http://www.w3.org/TR/selectors/#pseudo-classes// Prioritize by case sensitivity in case custom pseudos are added with uppercase letters// Remember that setFilters inherits from pseudosvar args,fn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] ||Sizzle.error( "unsupported pseudo: " + pseudo );// The user may use createPseudo to indicate that// arguments are needed to create the filter function// just as Sizzle doesif ( fn[ expando ] ) {return fn( argument );}// But maintain support for old signaturesif ( fn.length > 1 ) {args = [ pseudo, pseudo, "", argument ];return Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ?markFunction(function( seed, matches ) {var idx,matched = fn( seed, argument ),i = matched.length;while ( i-- ) {idx = indexOf.call( seed, matched[i] );seed[ idx ] = !( matches[ idx ] = matched[i] );}}) :function( elem ) {return fn( elem, 0, args );};}return fn;}},pseudos: {// Potentially complex pseudos"not": markFunction(function( selector ) {// Trim the selector passed to compile// to avoid treating leading and trailing// spaces as combinatorsvar input = [],results = [],matcher = compile( selector.replace( rtrim, "$1" ) );return matcher[ expando ] ?markFunction(function( seed, matches, context, xml ) {var elem,unmatched = matcher( seed, null, xml, [] ),i = seed.length;// Match elements unmatched by `matcher`while ( i-- ) {if ( (elem = unmatched[i]) ) {seed[i] = !(matches[i] = elem);}}}) :function( elem, context, xml ) {input[0] = elem;matcher( input, null, xml, results );return !results.pop();};}),"has": markFunction(function( selector ) {return function( elem ) {return Sizzle( selector, elem ).length > 0;};}),"contains": markFunction(function( text ) {return function( elem ) {return ( elem.textContent || elem.innerText || getText( elem ) ).indexOf( text ) > -1;};}),// "Whether an element is represented by a :lang() selector// is based solely on the element's language value// being equal to the identifier C,// or beginning with the identifier C immediately followed by "-".// The matching of C against the element's language value is performed case-insensitively.// The identifier C does not have to be a valid language name."// http://www.w3.org/TR/selectors/#lang-pseudo"lang": markFunction( function( lang ) {// lang value must be a valid identifierif ( !ridentifier.test(lang || "") ) {Sizzle.error( "unsupported lang: " + lang );}lang = lang.replace( runescape, funescape ).toLowerCase();return function( elem ) {var elemLang;do {if ( (elemLang = documentIsHTML ?elem.lang :elem.getAttribute("xml:lang") || elem.getAttribute("lang")) ) {elemLang = elemLang.toLowerCase();return elemLang === lang || elemLang.indexOf( lang + "-" ) === 0;}} while ( (elem = elem.parentNode) && elem.nodeType === 1 );return false;};}),// Miscellaneous"target": function( elem ) {var hash = window.location && window.location.hash;return hash && hash.slice( 1 ) === elem.id;},"root": function( elem ) {return elem === docElem;},"focus": function( elem ) {return elem === document.activeElement && (!document.hasFocus || document.hasFocus()) && !!(elem.type || elem.href || ~elem.tabIndex);},// Boolean properties"enabled": function( elem ) {return elem.disabled === false;},"disabled": function( elem ) {return elem.disabled === true;},"checked": function( elem ) {// In CSS3, :checked should return both checked and selected elements// http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checkedvar nodeName = elem.nodeName.toLowerCase();return (nodeName === "input" && !!elem.checked) || (nodeName === "option" && !!elem.selected);},"selected": function( elem ) {// Accessing this property makes selected-by-default// options in Safari work properlyif ( elem.parentNode ) {elem.parentNode.selectedIndex;}return elem.selected === true;},// Contents"empty": function( elem ) {// http://www.w3.org/TR/selectors/#empty-pseudo// :empty is negated by element (1) or content nodes (text: 3; cdata: 4; entity ref: 5),// but not by others (comment: 8; processing instruction: 7; etc.)// nodeType < 6 works because attributes (2) do not appear as childrenfor ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {if ( elem.nodeType < 6 ) {return false;}}return true;},"parent": function( elem ) {return !Expr.pseudos["empty"]( elem );},// Element/input types"header": function( elem ) {return rheader.test( elem.nodeName );},"input": function( elem ) {return rinputs.test( elem.nodeName );},"button": function( elem ) {var name = elem.nodeName.toLowerCase();return name === "input" && elem.type === "button" || name === "button";},"text": function( elem ) {var attr;return elem.nodeName.toLowerCase() === "input" &&elem.type === "text" &&// Support: IE<8// New HTML5 attribute values (e.g., "search") appear with elem.type === "text"( (attr = elem.getAttribute("type")) == null || attr.toLowerCase() === "text" );},// Position-in-collection"first": createPositionalPseudo(function() {return [ 0 ];}),"last": createPositionalPseudo(function( matchIndexes, length ) {return [ length - 1 ];}),"eq": createPositionalPseudo(function( matchIndexes, length, argument ) {return [ argument < 0 ? argument + length : argument ];}),"even": createPositionalPseudo(function( matchIndexes, length ) {var i = 0;for ( ; i < length; i += 2 ) {matchIndexes.push( i );}return matchIndexes;}),"odd": createPositionalPseudo(function( matchIndexes, length ) {var i = 1;for ( ; i < length; i += 2 ) {matchIndexes.push( i );}return matchIndexes;}),"lt": createPositionalPseudo(function( matchIndexes, length, argument ) {var i = argument < 0 ? argument + length : argument;for ( ; --i >= 0; ) {matchIndexes.push( i );}return matchIndexes;}),"gt": createPositionalPseudo(function( matchIndexes, length, argument ) {var i = argument < 0 ? argument + length : argument;for ( ; ++i < length; ) {matchIndexes.push( i );}return matchIndexes;})}};Expr.pseudos["nth"] = Expr.pseudos["eq"];// Add button/input type pseudosfor ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) {Expr.pseudos[ i ] = createInputPseudo( i );}for ( i in { submit: true, reset: true } ) {Expr.pseudos[ i ] = createButtonPseudo( i );}// Easy API for creating new setFiltersfunction setFilters() {}setFilters.prototype = Expr.filters = Expr.pseudos;Expr.setFilters = new setFilters();function tokenize( selector, parseOnly ) {var matched, match, tokens, type,soFar, groups, preFilters,cached = tokenCache[ selector + " " ];if ( cached ) {return parseOnly ? 0 : cached.slice( 0 );}soFar = selector;groups = [];preFilters = Expr.preFilter;while ( soFar ) {// Comma and first runif ( !matched || (match = rcomma.exec( soFar )) ) {if ( match ) {// Don't consume trailing commas as validsoFar = soFar.slice( match[0].length ) || soFar;}groups.push( (tokens = []) );}matched = false;// Combinatorsif ( (match = rcombinators.exec( soFar )) ) {matched = match.shift();tokens.push({value: matched,// Cast descendant combinators to spacetype: match[0].replace( rtrim, " " )});soFar = soFar.slice( matched.length );}// Filtersfor ( type in Expr.filter ) {if ( (match = matchExpr[ type ].exec( soFar )) && (!preFilters[ type ] ||(match = preFilters[ type ]( match ))) ) {matched = match.shift();tokens.push({value: matched,type: type,matches: match});soFar = soFar.slice( matched.length );}}if ( !matched ) {break;}}// Return the length of the invalid excess// if we're just parsing// Otherwise, throw an error or return tokensreturn parseOnly ?soFar.length :soFar ?Sizzle.error( selector ) :// Cache the tokenstokenCache( selector, groups ).slice( 0 );}function toSelector( tokens ) {var i = 0,len = tokens.length,selector = "";for ( ; i < len; i++ ) {selector += tokens[i].value;}return selector;}function addCombinator( matcher, combinator, base ) {var dir = combinator.dir,checkNonElements = base && dir === "parentNode",doneName = done++;return combinator.first ?// Check against closest ancestor/preceding elementfunction( elem, context, xml ) {while ( (elem = elem[ dir ]) ) {if ( elem.nodeType === 1 || checkNonElements ) {return matcher( elem, context, xml );}}} :// Check against all ancestor/preceding elementsfunction( elem, context, xml ) {var oldCache, outerCache,newCache = [ dirruns, doneName ];// We can't set arbitrary data on XML nodes, so they don't benefit from dir cachingif ( xml ) {while ( (elem = elem[ dir ]) ) {if ( elem.nodeType === 1 || checkNonElements ) {if ( matcher( elem, context, xml ) ) {return true;}}}} else {while ( (elem = elem[ dir ]) ) {if ( elem.nodeType === 1 || checkNonElements ) {outerCache = elem[ expando ] || (elem[ expando ] = {});if ( (oldCache = outerCache[ dir ]) &&oldCache[ 0 ] === dirruns && oldCache[ 1 ] === doneName ) {// Assign to newCache so results back-propagate to previous elementsreturn (newCache[ 2 ] = oldCache[ 2 ]);} else {// Reuse newcache so results back-propagate to previous elementsouterCache[ dir ] = newCache;// A match means we're done; a fail means we have to keep checkingif ( (newCache[ 2 ] = matcher( elem, context, xml )) ) {return true;}}}}}};}function elementMatcher( matchers ) {return matchers.length > 1 ?function( elem, context, xml ) {var i = matchers.length;while ( i-- ) {if ( !matchers[i]( elem, context, xml ) ) {return false;}}return true;} :matchers[0];}function condense( unmatched, map, filter, context, xml ) {var elem,newUnmatched = [],i = 0,len = unmatched.length,mapped = map != null;for ( ; i < len; i++ ) {if ( (elem = unmatched[i]) ) {if ( !filter || filter( elem, context, xml ) ) {newUnmatched.push( elem );if ( mapped ) {map.push( i );}}}}return newUnmatched;}function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) {if ( postFilter && !postFilter[ expando ] ) {postFilter = setMatcher( postFilter );}if ( postFinder && !postFinder[ expando ] ) {postFinder = setMatcher( postFinder, postSelector );}return markFunction(function( seed, results, context, xml ) {var temp, i, elem,preMap = [],postMap = [],preexisting = results.length,// Get initial elements from seed or contextelems = seed || multipleContexts( selector || "*", context.nodeType ? [ context ] : context, [] ),// Prefilter to get matcher input, preserving a map for seed-results synchronizationmatcherIn = preFilter && ( seed || !selector ) ?condense( elems, preMap, preFilter, context, xml ) :elems,matcherOut = matcher ?// If we have a postFinder, or filtered seed, or non-seed postFilter or preexisting results,postFinder || ( seed ? preFilter : preexisting || postFilter ) ?// ...intermediate processing is necessary[] :// ...otherwise use results directlyresults :matcherIn;// Find primary matchesif ( matcher ) {matcher( matcherIn, matcherOut, context, xml );}// Apply postFilterif ( postFilter ) {temp = condense( matcherOut, postMap );postFilter( temp, [], context, xml );// Un-match failing elements by moving them back to matcherIni = temp.length;while ( i-- ) {if ( (elem = temp[i]) ) {matcherOut[ postMap[i] ] = !(matcherIn[ postMap[i] ] = elem);}}}if ( seed ) {if ( postFinder || preFilter ) {if ( postFinder ) {// Get the final matcherOut by condensing this intermediate into postFinder contextstemp = [];i = matcherOut.length;while ( i-- ) {if ( (elem = matcherOut[i]) ) {// Restore matcherIn since elem is not yet a final matchtemp.push( (matcherIn[i] = elem) );}}postFinder( null, (matcherOut = []), temp, xml );}// Move matched elements from seed to results to keep them synchronizedi = matcherOut.length;while ( i-- ) {if ( (elem = matcherOut[i]) &&(temp = postFinder ? indexOf.call( seed, elem ) : preMap[i]) > -1 ) {seed[temp] = !(results[temp] = elem);}}}// Add elements to results, through postFinder if defined} else {matcherOut = condense(matcherOut === results ?matcherOut.splice( preexisting, matcherOut.length ) :matcherOut);if ( postFinder ) {postFinder( null, results, matcherOut, xml );} else {push.apply( results, matcherOut );}}});}function matcherFromTokens( tokens ) {var checkContext, matcher, j,len = tokens.length,leadingRelative = Expr.relative[ tokens[0].type ],implicitRelative = leadingRelative || Expr.relative[" "],i = leadingRelative ? 1 : 0,// The foundational matcher ensures that elements are reachable from top-level context(s)matchContext = addCombinator( function( elem ) {return elem === checkContext;}, implicitRelative, true ),matchAnyContext = addCombinator( function( elem ) {return indexOf.call( checkContext, elem ) > -1;}, implicitRelative, true ),matchers = [ function( elem, context, xml ) {return ( !leadingRelative && ( xml || context !== outermostContext ) ) || ((checkContext = context).nodeType ?matchContext( elem, context, xml ) :matchAnyContext( elem, context, xml ) );} ];for ( ; i < len; i++ ) {if ( (matcher = Expr.relative[ tokens[i].type ]) ) {matchers = [ addCombinator(elementMatcher( matchers ), matcher) ];} else {matcher = Expr.filter[ tokens[i].type ].apply( null, tokens[i].matches );// Return special upon seeing a positional matcherif ( matcher[ expando ] ) {// Find the next relative operator (if any) for proper handlingj = ++i;for ( ; j < len; j++ ) {if ( Expr.relative[ tokens[j].type ] ) {break;}}return setMatcher(i > 1 && elementMatcher( matchers ),i > 1 && toSelector(// If the preceding token was a descendant combinator, insert an implicit any-element `*`tokens.slice( 0, i - 1 ).concat({ value: tokens[ i - 2 ].type === " " ? "*" : "" })).replace( rtrim, "$1" ),matcher,i < j && matcherFromTokens( tokens.slice( i, j ) ),j < len && matcherFromTokens( (tokens = tokens.slice( j )) ),j < len && toSelector( tokens ));}matchers.push( matcher );}}return elementMatcher( matchers );}function matcherFromGroupMatchers( elementMatchers, setMatchers ) {var bySet = setMatchers.length > 0,byElement = elementMatchers.length > 0,superMatcher = function( seed, context, xml, results, outermost ) {var elem, j, matcher,matchedCount = 0,i = "0",unmatched = seed && [],setMatched = [],contextBackup = outermostContext,// We must always have either seed elements or outermost contextelems = seed || byElement && Expr.find["TAG"]( "*", outermost ),// Use integer dirruns iff this is the outermost matcherdirrunsUnique = (dirruns += contextBackup == null ? 1 : Math.random() || 0.1),len = elems.length;if ( outermost ) {outermostContext = context !== document && context;}// Add elements passing elementMatchers directly to results// Keep `i` a string if there are no elements so `matchedCount` will be "00" below// Support: IE<9, Safari// Tolerate NodeList properties (IE: "length"; Safari:

) matching elements by idfor ( ; i !== len && (elem = elems[i]) != null; i++ ) {if ( byElement && elem ) {j = 0;while ( (matcher = elementMatchers[j++]) ) {if ( matcher( elem, context, xml ) ) {results.push( elem );break;}}if ( outermost ) {dirruns = dirrunsUnique;}}// Track unmatched elements for set filtersif ( bySet ) {// They will have gone through all possible matchersif ( (elem = !matcher && elem) ) {matchedCount--;}// Lengthen the array for every element, matched or notif ( seed ) {unmatched.push( elem );}}}// Apply set filters to unmatched elementsmatchedCount += i;if ( bySet && i !== matchedCount ) {j = 0;while ( (matcher = setMatchers[j++]) ) {matcher( unmatched, setMatched, context, xml );}if ( seed ) {// Reintegrate element matches to eliminate the need for sortingif ( matchedCount > 0 ) {while ( i-- ) {if ( !(unmatched[i] || setMatched[i]) ) {setMatched[i] = pop.call( results );}}}// Discard index placeholder values to get only actual matchessetMatched = condense( setMatched );}// Add matches to resultspush.apply( results, setMatched );// Seedless set matches succeeding multiple successful matchers stipulate sortingif ( outermost && !seed && setMatched.length > 0 &&( matchedCount + setMatchers.length ) > 1 ) {Sizzle.uniqueSort( results );}}// Override manipulation of globals by nested matchersif ( outermost ) {dirruns = dirrunsUnique;outermostContext = contextBackup;}return unmatched;};return bySet ?markFunction( superMatcher ) :superMatcher;}compile = Sizzle.compile = function( selector, group /* Internal Use Only */ ) {var i,setMatchers = [],elementMatchers = [],cached = compilerCache[ selector + " " ];if ( !cached ) {// Generate a function of recursive functions that can be used to check each elementif ( !group ) {group = tokenize( selector );}i = group.length;while ( i-- ) {cached = matcherFromTokens( group[i] );if ( cached[ expando ] ) {setMatchers.push( cached );} else {elementMatchers.push( cached );}}// Cache the compiled functioncached = compilerCache( selector, matcherFromGroupMatchers( elementMatchers, setMatchers ) );}return cached;};function multipleContexts( selector, contexts, results ) {var i = 0,len = contexts.length;for ( ; i < len; i++ ) {Sizzle( selector, contexts[i], results );}return results;}function select( selector, context, results, seed ) {var i, tokens, token, type, find,match = tokenize( selector );if ( !seed ) {// Try to minimize operations if there is only one groupif ( match.length === 1 ) {// Take a shortcut and set the context if the root selector is an IDtokens = match[0] = match[0].slice( 0 );if ( tokens.length > 2 && (token = tokens[0]).type === "ID" &&support.getById && context.nodeType === 9 && documentIsHTML &&Expr.relative[ tokens[1].type ] ) {context = ( Expr.find["ID"]( token.matches[0].replace(runescape, funescape), context ) || [] )[0];if ( !context ) {return results;}selector = selector.slice( tokens.shift().value.length );}// Fetch a seed set for right-to-left matchingi = matchExpr["needsContext"].test( selector ) ? 0 : tokens.length;while ( i-- ) {token = tokens[i];// Abort if we hit a combinatorif ( Expr.relative[ (type = token.type) ] ) {break;}if ( (find = Expr.find[ type ]) ) {// Search, expanding context for leading sibling combinatorsif ( (seed = find(token.matches[0].replace( runescape, funescape ),rsibling.test( tokens[0].type ) && testContext( context.parentNode ) || context)) ) {// If seed is empty or no tokens remain, we can return earlytokens.splice( i, 1 );selector = seed.length && toSelector( tokens );if ( !selector ) {push.apply( results, seed );return results;}break;}}}}}// Compile and execute a filtering function// Provide `match` to avoid retokenization if we modified the selector abovecompile( selector, match )(seed,context,!documentIsHTML,results,rsibling.test( selector ) && testContext( context.parentNode ) || context);return results;}// One-time assignments// Sort stabilitysupport.sortStable = expando.split("").sort( sortOrder ).join("") === expando;// Support: Chrome<14// Always assume duplicates if they aren't passed to the comparison functionsupport.detectDuplicates = !!hasDuplicate;// Initialize against the default documentsetDocument();// Support: Webkit<537.32 - Safari 6.0.3/Chrome 25 (fixed in Chrome 27)// Detached nodes confoundingly follow *each other*support.sortDetached = assert(function( div1 ) {// Should return 1, but returns 4 (following)return div1.compareDocumentPosition( document.createElement("div") ) & 1;});// Support: IE<8// Prevent attribute/property "interpolation"// http://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspxif ( !assert(function( div ) {div.innerHTML = "";return div.firstChild.getAttribute("href") === "#" ;}) ) {addHandle( "type|href|height|width", function( elem, name, isXML ) {if ( !isXML ) {return elem.getAttribute( name, name.toLowerCase() === "type" ? 1 : 2 );}});}// Support: IE<9// Use defaultValue in place of getAttribute("value")if ( !support.attributes || !assert(function( div ) {div.innerHTML = "";div.firstChild.setAttribute( "value", "" );return div.firstChild.getAttribute( "value" ) === "";}) ) {addHandle( "value", function( elem, name, isXML ) {if ( !isXML && elem.nodeName.toLowerCase() === "input" ) {return elem.defaultValue;}});}// Support: IE<9// Use getAttributeNode to fetch booleans when getAttribute liesif ( !assert(function( div ) {return div.getAttribute("disabled") == null;}) ) {addHandle( booleans, function( elem, name, isXML ) {var val;if ( !isXML ) {return elem[ name ] === true ? name.toLowerCase() :(val = elem.getAttributeNode( name )) && val.specified ?val.value :null;}});}return Sizzle;})( window );jQuery.find = Sizzle;jQuery.expr = Sizzle.selectors;jQuery.expr[":"] = jQuery.expr.pseudos;jQuery.unique = Sizzle.uniqueSort;jQuery.text = Sizzle.getText;jQuery.isXMLDoc = Sizzle.isXML;jQuery.contains = Sizzle.contains;var rneedsContext = jQuery.expr.match.needsContext;var rsingleTag = (/^<(\w+)\s*\/?>(?:<\/\1>|)$/);var risSimple = /^.[^:#\[\.,]*$/;// Implement the identical functionality for filter and notfunction winnow( elements, qualifier, not ) {if ( jQuery.isFunction( qualifier ) ) {return jQuery.grep( elements, function( elem, i ) {/* jshint -W018 */return !!qualifier.call( elem, i, elem ) !== not;});}if ( qualifier.nodeType ) {return jQuery.grep( elements, function( elem ) {return ( elem === qualifier ) !== not;});}if ( typeof qualifier === "string" ) {if ( risSimple.test( qualifier ) ) {return jQuery.filter( qualifier, elements, not );}qualifier = jQuery.filter( qualifier, elements );}return jQuery.grep( elements, function( elem ) {return ( indexOf.call( qualifier, elem ) >= 0 ) !== not;});}jQuery.filter = function( expr, elems, not ) {var elem = elems[ 0 ];if ( not ) {expr = ":not(" + expr + ")";}return elems.length === 1 && elem.nodeType === 1 ?jQuery.find.matchesSelector( elem, expr ) ? [ elem ] : [] :jQuery.find.matches( expr, jQuery.grep( elems, function( elem ) {return elem.nodeType === 1;}));};jQuery.fn.extend({find: function( selector ) {var i,len = this.length,ret = [],self = this;if ( typeof selector !== "string" ) {return this.pushStack( jQuery( selector ).filter(function() {for ( i = 0; i < len; i++ ) {if ( jQuery.contains( self[ i ], this ) ) {return true;}}}) );}for ( i = 0; i < len; i++ ) {jQuery.find( selector, self[ i ], ret );}// Needed because $( selector, context ) becomes $( context ).find( selector )ret = this.pushStack( len > 1 ? jQuery.unique( ret ) : ret );ret.selector = this.selector ? this.selector + " " + selector : selector;return ret;},filter: function( selector ) {return this.pushStack( winnow(this, selector || [], false) );},not: function( selector ) {return this.pushStack( winnow(this, selector || [], true) );},is: function( selector ) {return !!winnow(this,// If this is a positional/relative selector, check membership in the returned set// so $("p:first").is("p:last") won't return true for a doc with two "p".typeof selector === "string" && rneedsContext.test( selector ) ?jQuery( selector ) :selector || [],false).length;}});// Initialize a jQuery object// A central reference to the root jQuery(document)var rootjQuery,// A simple way to check for HTML strings// Prioritize #id over to avoid XSS via location.hash (#9521)// Strict HTML recognition (#11290: must start with <)rquickExpr = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,init = jQuery.fn.init = function( selector, context ) {var match, elem;// HANDLE: $(""), $(null), $(undefined), $(false)if ( !selector ) {return this;}// Handle HTML stringsif ( typeof selector === "string" ) {if ( selector[0] === "<" && selector[ selector.length - 1 ] === ">" && selector.length >= 3 ) {// Assume that strings that start and end with <> are HTML and skip the regex checkmatch = [ null, selector, null ];} else {match = rquickExpr.exec( selector );}// Match html or make sure no context is specified for #idif ( match && (match[1] || !context) ) {// HANDLE: $(html) -> $(array)if ( match[1] ) {context = context instanceof jQuery ? context[0] : context;// scripts is true for back-compat// Intentionally let the error be thrown if parseHTML is not presentjQuery.merge( this, jQuery.parseHTML(match[1],context && context.nodeType ? context.ownerDocument || context : document,true) );// HANDLE: $(html, props)if ( rsingleTag.test( match[1] ) && jQuery.isPlainObject( context ) ) {for ( match in context ) {// Properties of context are called as methods if possibleif ( jQuery.isFunction( this[ match ] ) ) {this[ match ]( context[ match ] );// ...and otherwise set as attributes} else {this.attr( match, context[ match ] );}}}return this;// HANDLE: $(#id)} else {elem = document.getElementById( match[2] );// Check parentNode to catch when Blackberry 4.6 returns// nodes that are no longer in the document #6963if ( elem && elem.parentNode ) {// Inject the element directly into the jQuery objectthis.length = 1;this[0] = elem;}this.context = document;this.selector = selector;return this;}// HANDLE: $(expr, $(...))} else if ( !context || context.jquery ) {return ( context || rootjQuery ).find( selector );// HANDLE: $(expr, context)// (which is just equivalent to: $(context).find(expr)} else {return this.constructor( context ).find( selector );}// HANDLE: $(DOMElement)} else if ( selector.nodeType ) {this.context = this[0] = selector;this.length = 1;return this;// HANDLE: $(function)// Shortcut for document ready} else if ( jQuery.isFunction( selector ) ) {return typeof rootjQuery.ready !== "undefined" ?rootjQuery.ready( selector ) :// Execute immediately if ready is not presentselector( jQuery );}if ( selector.selector !== undefined ) {this.selector = selector.selector;this.context = selector.context;}return jQuery.makeArray( selector, this );};// Give the init function the jQuery prototype for later instantiationinit.prototype = jQuery.fn;// Initialize central referencerootjQuery = jQuery( document );var rparentsprev = /^(?:parents|prev(?:Until|All))/,// methods guaranteed to produce a unique set when starting from a unique setguaranteedUnique = {children: true,contents: true,next: true,prev: true};jQuery.extend({dir: function( elem, dir, until ) {var matched = [],truncate = until !== undefined;while ( (elem = elem[ dir ]) && elem.nodeType !== 9 ) {if ( elem.nodeType === 1 ) {if ( truncate && jQuery( elem ).is( until ) ) {break;}matched.push( elem );}}return matched;},sibling: function( n, elem ) {var matched = [];for ( ; n; n = n.nextSibling ) {if ( n.nodeType === 1 && n !== elem ) {matched.push( n );}}return matched;}});jQuery.fn.extend({has: function( target ) {var targets = jQuery( target, this ),l = targets.length;return this.filter(function() {var i = 0;for ( ; i < l; i++ ) {if ( jQuery.contains( this, targets[i] ) ) {return true;}}});},closest: function( selectors, context ) {var cur,i = 0,l = this.length,matched = [],pos = rneedsContext.test( selectors ) || typeof selectors !== "string" ?jQuery( selectors, context || this.context ) :0;for ( ; i < l; i++ ) {for ( cur = this[i]; cur && cur !== context; cur = cur.parentNode ) {// Always skip document fragmentsif ( cur.nodeType < 11 && (pos ?pos.index(cur) > -1 :// Don't pass non-elements to Sizzlecur.nodeType === 1 &&jQuery.find.matchesSelector(cur, selectors)) ) {matched.push( cur );break;}}}return this.pushStack( matched.length > 1 ? jQuery.unique( matched ) : matched );},// Determine the position of an element within// the matched set of elementsindex: function( elem ) {// No argument, return index in parentif ( !elem ) {return ( this[ 0 ] && this[ 0 ].parentNode ) ? this.first().prevAll().length : -1;}// index in selectorif ( typeof elem === "string" ) {return indexOf.call( jQuery( elem ), this[ 0 ] );}// Locate the position of the desired elementreturn indexOf.call( this,// If it receives a jQuery object, the first element is usedelem.jquery ? elem[ 0 ] : elem);},add: function( selector, context ) {return this.pushStack(jQuery.unique(jQuery.merge( this.get(), jQuery( selector, context ) )));},addBack: function( selector ) {return this.add( selector == null ?this.prevObject : this.prevObject.filter(selector));}});function sibling( cur, dir ) {while ( (cur = cur[dir]) && cur.nodeType !== 1 ) {}return cur;}jQuery.each({parent: function( elem ) {var parent = elem.parentNode;return parent && parent.nodeType !== 11 ? parent : null;},parents: function( elem ) {return jQuery.dir( elem, "parentNode" );},parentsUntil: function( elem, i, until ) {return jQuery.dir( elem, "parentNode", until );},next: function( elem ) {return sibling( elem, "nextSibling" );},prev: function( elem ) {return sibling( elem, "previousSibling" );},nextAll: function( elem ) {return jQuery.dir( elem, "nextSibling" );},prevAll: function( elem ) {return jQuery.dir( elem, "previousSibling" );},nextUntil: function( elem, i, until ) {return jQuery.dir( elem, "nextSibling", until );},prevUntil: function( elem, i, until ) {return jQuery.dir( elem, "previousSibling", until );},siblings: function( elem ) {return jQuery.sibling( ( elem.parentNode || {} ).firstChild, elem );},children: function( elem ) {return jQuery.sibling( elem.firstChild );},contents: function( elem ) {return elem.contentDocument || jQuery.merge( [], elem.childNodes );}}, function( name, fn ) {jQuery.fn[ name ] = function( until, selector ) {var matched = jQuery.map( this, fn, until );if ( name.slice( -5 ) !== "Until" ) {selector = until;}if ( selector && typeof selector === "string" ) {matched = jQuery.filter( selector, matched );}if ( this.length > 1 ) {// Remove duplicatesif ( !guaranteedUnique[ name ] ) {jQuery.unique( matched );}// Reverse order for parents* and prev-derivativesif ( rparentsprev.test( name ) ) {matched.reverse();}}return this.pushStack( matched );};});var rnotwhite = (/\S+/g);// String to Object options format cachevar optionsCache = {};// Convert String-formatted options into Object-formatted ones and store in cachefunction createOptions( options ) {var object = optionsCache[ options ] = {};jQuery.each( options.match( rnotwhite ) || [], function( _, flag ) {object[ flag ] = true;});return object;}/* * Create a callback list using the following parameters: * *options: an optional list of space-separated options that will change how *the callback list behaves or a more traditional option object * * By default a callback list will act like an event callback list and can be * "fired" multiple times. * * Possible options: * *once:will ensure the callback list can only be fired once (like a Deferred) * *memory:will keep track of previous values and will call any callback added *after the list has been fired right away with the latest "memorized" *values (like a Deferred) * *unique:will ensure a callback can only be added once (no duplicate in the list) * *stopOnFalse:interrupt callings when a callback returns false * */jQuery.Callbacks = function( options ) {// Convert options from String-formatted to Object-formatted if needed// (we check in cache first)options = typeof options === "string" ?( optionsCache[ options ] || createOptions( options ) ) :jQuery.extend( {}, options );var // Last fire value (for non-forgettable lists)memory,// Flag to know if list was already firedfired,// Flag to know if list is currently firingfiring,// First callback to fire (used internally by add and fireWith)firingStart,// End of the loop when firingfiringLength,// Index of currently firing callback (modified by remove if needed)firingIndex,// Actual callback listlist = [],// Stack of fire calls for repeatable listsstack = !options.once && [],// Fire callbacksfire = function( data ) {memory = options.memory && data;fired = true;firingIndex = firingStart || 0;firingStart = 0;firingLength = list.length;firing = true;for ( ; list && firingIndex < firingLength; firingIndex++ ) {if ( list[ firingIndex ].apply( data[ 0 ], data[ 1 ] ) === false && options.stopOnFalse ) {memory = false; // To prevent further calls using addbreak;}}firing = false;if ( list ) {if ( stack ) {if ( stack.length ) {fire( stack.shift() );}} else if ( memory ) {list = [];} else {self.disable();}}},// Actual Callbacks objectself = {// Add a callback or a collection of callbacks to the listadd: function() {if ( list ) {// First, we save the current lengthvar start = list.length;(function add( args ) {jQuery.each( args, function( _, arg ) {var type = jQuery.type( arg );if ( type === "function" ) {if ( !options.unique || !self.has( arg ) ) {list.push( arg );}} else if ( arg && arg.length && type !== "string" ) {// Inspect recursivelyadd( arg );}});})( arguments );// Do we need to add the callbacks to the// current firing batch?if ( firing ) {firingLength = list.length;// With memory, if we're not firing then// we should call right away} else if ( memory ) {firingStart = start;fire( memory );}}return this;},// Remove a callback from the listremove: function() {if ( list ) {jQuery.each( arguments, function( _, arg ) {var index;while ( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) {list.splice( index, 1 );// Handle firing indexesif ( firing ) {if ( index <= firingLength ) {firingLength--;}if ( index <= firingIndex ) {firingIndex--;}}}});}return this;},// Check if a given callback is in the list.// If no argument is given, return whether or not list has callbacks attached.has: function( fn ) {return fn ? jQuery.inArray( fn, list ) > -1 : !!( list && list.length );},// Remove all callbacks from the listempty: function() {list = [];firingLength = 0;return this;},// Have the list do nothing anymoredisable: function() {list = stack = memory = undefined;return this;},// Is it disabled?disabled: function() {return !list;},// Lock the list in its current statelock: function() {stack = undefined;if ( !memory ) {self.disable();}return this;},// Is it locked?locked: function() {return !stack;},// Call all callbacks with the given context and argumentsfireWith: function( context, args ) {if ( list && ( !fired || stack ) ) {args = args || [];args = [ context, args.slice ? args.slice() : args ];if ( firing ) {stack.push( args );} else {fire( args );}}return this;},// Call all the callbacks with the given argumentsfire: function() {self.fireWith( this, arguments );return this;},// To know if the callbacks have already been called at least oncefired: function() {return !!fired;}};return self;};jQuery.extend({Deferred: function( func ) {var tuples = [// action, add listener, listener list, final state[ "resolve", "done", jQuery.Callbacks("once memory"), "resolved" ],[ "reject", "fail", jQuery.Callbacks("once memory"), "rejected" ],[ "notify", "progress", jQuery.Callbacks("memory") ]],state = "pending",promise = {state: function() {return state;},always: function() {deferred.done( arguments ).fail( arguments );return this;},then: function( /* fnDone, fnFail, fnProgress */ ) {var fns = arguments;return jQuery.Deferred(function( newDefer ) {jQuery.each( tuples, function( i, tuple ) {var fn = jQuery.isFunction( fns[ i ] ) && fns[ i ];// deferred[ done | fail | progress ] for forwarding actions to newDeferdeferred[ tuple[1] ](function() {var returned = fn && fn.apply( this, arguments );if ( returned && jQuery.isFunction( returned.promise ) ) {returned.promise().done( newDefer.resolve ).fail( newDefer.reject ).progress( newDefer.notify );} else {newDefer[ tuple[ 0 ] + "With" ]( this === promise ? newDefer.promise() : this, fn ? [ returned ] : arguments );}});});fns = null;}).promise();},// Get a promise for this deferred// If obj is provided, the promise aspect is added to the objectpromise: function( obj ) {return obj != null ? jQuery.extend( obj, promise ) : promise;}},deferred = {};// Keep pipe for back-compatpromise.pipe = promise.then;// Add list-specific methodsjQuery.each( tuples, function( i, tuple ) {var list = tuple[ 2 ],stateString = tuple[ 3 ];// promise[ done | fail | progress ] = list.addpromise[ tuple[1] ] = list.add;// Handle stateif ( stateString ) {list.add(function() {// state = [ resolved | rejected ]state = stateString;// [ reject_list | resolve_list ].disable; progress_list.lock}, tuples[ i ^ 1 ][ 2 ].disable, tuples[ 2 ][ 2 ].lock );}// deferred[ resolve | reject | notify ]deferred[ tuple[0] ] = function() {deferred[ tuple[0] + "With" ]( this === deferred ? promise : this, arguments );return this;};deferred[ tuple[0] + "With" ] = list.fireWith;});// Make the deferred a promisepromise.promise( deferred );// Call given func if anyif ( func ) {func.call( deferred, deferred );}// All done!return deferred;},// Deferred helperwhen: function( subordinate /* , ..., subordinateN */ ) {var i = 0,resolveValues = slice.call( arguments ),length = resolveValues.length,// the count of uncompleted subordinatesremaining = length !== 1 || ( subordinate && jQuery.isFunction( subordinate.promise ) ) ? length : 0,// the master Deferred. If resolveValues consist of only a single Deferred, just use that.deferred = remaining === 1 ? subordinate : jQuery.Deferred(),// Update function for both resolve and progress valuesupdateFunc = function( i, contexts, values ) {return function( value ) {contexts[ i ] = this;values[ i ] = arguments.length > 1 ? slice.call( arguments ) : value;if ( values === progressValues ) {deferred.notifyWith( contexts, values );} else if ( !( --remaining ) ) {deferred.resolveWith( contexts, values );}};},progressValues, progressContexts, resolveContexts;// add listeners to Deferred subordinates; treat others as resolvedif ( length > 1 ) {progressValues = new Array( length );progressContexts = new Array( length );resolveContexts = new Array( length );for ( ; i < length; i++ ) {if ( resolveValues[ i ] && jQuery.isFunction( resolveValues[ i ].promise ) ) {resolveValues[ i ].promise().done( updateFunc( i, resolveContexts, resolveValues ) ).fail( deferred.reject ).progress( updateFunc( i, progressContexts, progressValues ) );} else {--remaining;}}}// if we're not waiting on anything, resolve the masterif ( !remaining ) {deferred.resolveWith( resolveContexts, resolveValues );}return deferred.promise();}});// The deferred used on DOM readyvar readyList;jQuery.fn.ready = function( fn ) {// Add the callbackjQuery.ready.promise().done( fn );return this;};jQuery.extend({// Is the DOM ready to be used? Set to true once it occurs.isReady: false,// A counter to track how many items to wait for before// the ready event fires. See #6781readyWait: 1,// Hold (or release) the ready eventholdReady: function( hold ) {if ( hold ) {jQuery.readyWait++;} else {jQuery.ready( true );}},// Handle when the DOM is readyready: function( wait ) {// Abort if there are pending holds or we're already readyif ( wait === true ? --jQuery.readyWait : jQuery.isReady ) {return;}// Remember that the DOM is readyjQuery.isReady = true;// If a normal DOM Ready event fired, decrement, and wait if need beif ( wait !== true && --jQuery.readyWait > 0 ) {return;}// If there are functions bound, to executereadyList.resolveWith( document, [ jQuery ] );// Trigger any bound ready eventsif ( jQuery.fn.trigger ) {jQuery( document ).trigger("ready").off("ready");}}});/** * The ready event handler and self cleanup method */function completed() {document.removeEventListener( "DOMContentLoaded", completed, false );window.removeEventListener( "load", completed, false );jQuery.ready();}jQuery.ready.promise = function( obj ) {if ( !readyList ) {readyList = jQuery.Deferred();// Catch cases where $(document).ready() is called after the browser event has already occurred.// we once tried to use readyState "interactive" here, but it caused issues like the one// discovered by ChrisS here: http://bugs.jquery.com/ticket/12282#comment:15if ( document.readyState === "complete" ) {// Handle it asynchronously to allow scripts the opportunity to delay readysetTimeout( jQuery.ready );} else {// Use the handy event callbackdocument.addEventListener( "DOMContentLoaded", completed, false );// A fallback to window.onload, that will always workwindow.addEventListener( "load", completed, false );}}return readyList.promise( obj );};// Kick off the DOM ready check even if the user does notjQuery.ready.promise();// Multifunctional method to get and set values of a collection// The value/s can optionally be executed if it's a functionvar access = jQuery.access = function( elems, fn, key, value, chainable, emptyGet, raw ) {var i = 0,len = elems.length,bulk = key == null;// Sets many valuesif ( jQuery.type( key ) === "object" ) {chainable = true;for ( i in key ) {jQuery.access( elems, fn, i, key[i], true, emptyGet, raw );}// Sets one value} else if ( value !== undefined ) {chainable = true;if ( !jQuery.isFunction( value ) ) {raw = true;}if ( bulk ) {// Bulk operations run against the entire setif ( raw ) {fn.call( elems, value );fn = null;// ...except when executing function values} else {bulk = fn;fn = function( elem, key, value ) {return bulk.call( jQuery( elem ), value );};}}if ( fn ) {for ( ; i < len; i++ ) {fn( elems[i], key, raw ? value : value.call( elems[i], i, fn( elems[i], key ) ) );}}}return chainable ?elems :// Getsbulk ?fn.call( elems ) :len ? fn( elems[0], key ) : emptyGet;};/** * Determines whether an object can have data */jQuery.acceptData = function( owner ) {// Accepts only:// - Node// - Node.ELEMENT_NODE// - Node.DOCUMENT_NODE// - Object// - Any/* jshint -W018 */return owner.nodeType === 1 || owner.nodeType === 9 || !( +owner.nodeType );};function Data() {// Support: Android < 4,// Old WebKit does not have Object.preventExtensions/freeze method,// return new empty object instead with no [[set]] accessorObject.defineProperty( this.cache = {}, 0, {get: function() {return {};}});this.expando = jQuery.expando + Math.random();}Data.uid = 1;Data.accepts = jQuery.acceptData;Data.prototype = {key: function( owner ) {// We can accept data for non-element nodes in modern browsers,// but we should not, see #8335.// Always return the key for a frozen object.if ( !Data.accepts( owner ) ) {return 0;}var descriptor = {},// Check if the owner object already has a cache keyunlock = owner[ this.expando ];// If not, create oneif ( !unlock ) {unlock = Data.uid++;// Secure it in a non-enumerable, non-writable propertytry {descriptor[ this.expando ] = { value: unlock };Object.defineProperties( owner, descriptor );// Support: Android < 4// Fallback to a less secure definition} catch ( e ) {descriptor[ this.expando ] = unlock;jQuery.extend( owner, descriptor );}}// Ensure the cache objectif ( !this.cache[ unlock ] ) {this.cache[ unlock ] = {};}return unlock;},set: function( owner, data, value ) {var prop,// There may be an unlock assigned to this node,// if there is no entry for this "owner", create one inline// and set the unlock as though an owner entry had always existedunlock = this.key( owner ),cache = this.cache[ unlock ];// Handle: [ owner, key, value ] argsif ( typeof data === "string" ) {cache[ data ] = value;// Handle: [ owner, { properties } ] args} else {// Fresh assignments by object are shallow copiedif ( jQuery.isEmptyObject( cache ) ) {jQuery.extend( this.cache[ unlock ], data );// Otherwise, copy the properties one-by-one to the cache object} else {for ( prop in data ) {cache[ prop ] = data[ prop ];}}}return cache;},get: function( owner, key ) {// Either a valid cache is found, or will be created.// New caches will be created and the unlock returned,// allowing direct access to the newly created// empty data object. A valid owner object must be provided.var cache = this.cache[ this.key( owner ) ];return key === undefined ?cache : cache[ key ];},access: function( owner, key, value ) {var stored;// In cases where either://// 1. No key was specified// 2. A string key was specified, but no value provided//// Take the "read" path and allow the get method to determine// which value to return, respectively either://// 1. The entire cache object// 2. The data stored at the key//if ( key === undefined ||((key && typeof key === "string") && value === undefined) ) {stored = this.get( owner, key );return stored !== undefined ?stored : this.get( owner, jQuery.camelCase(key) );}// [*]When the key is not a string, or both a key and value// are specified, set or extend (existing objects) with either://// 1. An object of properties// 2. A key and value//this.set( owner, key, value );// Since the "set" path can have two possible entry points// return the expected data based on which path was taken[*]return value !== undefined ? value : key;},remove: function( owner, key ) {var i, name, camel,unlock = this.key( owner ),cache = this.cache[ unlock ];if ( key === undefined ) {this.cache[ unlock ] = {};} else {// Support array or space separated string of keysif ( jQuery.isArray( key ) ) {// If "name" is an array of keys...// When data is initially created, via ("key", "val") signature,// keys will be converted to camelCase.// Since there is no way to tell _how_ a key was added, remove// both plain key and camelCase key. #12786// This will only penalize the array argument path.name = key.concat( key.map( jQuery.camelCase ) );} else {camel = jQuery.camelCase( key );// Try the string as a key before any manipulationif ( key in cache ) {name = [ key, camel ];} else {// If a key with the spaces exists, use it.// Otherwise, create an array by matching non-whitespacename = camel;name = name in cache ?[ name ] : ( name.match( rnotwhite ) || [] );}}i = name.length;while ( i-- ) {delete cache[ name[ i ] ];}}},hasData: function( owner ) {return !jQuery.isEmptyObject(this.cache[ owner[ this.expando ] ] || {});},discard: function( owner ) {if ( owner[ this.expando ] ) {delete this.cache[ owner[ this.expando ] ];}}};var data_priv = new Data();var data_user = new Data();/*Implementation Summary1. Enforce API surface and semantic compatibility with 1.9.x branch2. Improve the module's maintainability by reducing the storagepaths to a single mechanism.3. Use the same single mechanism to support "private" and "user" data.4. _Never_ expose "private" data to user code (TODO: Drop _data, _removeData)5. Avoid exposing implementation details on user objects (eg. expando properties)6. Provide a clear path for implementation upgrade to WeakMap in 2014*/var rbrace = /^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,rmultiDash = /([A-Z])/g;function dataAttr( elem, key, data ) {var name;// If nothing was found internally, try to fetch any// data from the HTML5 data-* attributeif ( data === undefined && elem.nodeType === 1 ) {name = "data-" + key.replace( rmultiDash, "-$1" ).toLowerCase();data = elem.getAttribute( name );if ( typeof data === "string" ) {try {data = data === "true" ? true :data === "false" ? false :data === "null" ? null :// Only convert to a number if it doesn't change the string+data + "" === data ? +data :rbrace.test( data ) ? jQuery.parseJSON( data ) :data;} catch( e ) {}// Make sure we set the data so it isn't changed laterdata_user.set( elem, key, data );} else {data = undefined;}}return data;}jQuery.extend({hasData: function( elem ) {return data_user.hasData( elem ) || data_priv.hasData( elem );},data: function( elem, name, data ) {return data_user.access( elem, name, data );},removeData: function( elem, name ) {data_user.remove( elem, name );},// TODO: Now that all calls to _data and _removeData have been replaced// with direct calls to data_priv methods, these can be deprecated._data: function( elem, name, data ) {return data_priv.access( elem, name, data );},_removeData: function( elem, name ) {data_priv.remove( elem, name );}});jQuery.fn.extend({data: function( key, value ) {var i, name, data,elem = this[ 0 ],attrs = elem && elem.attributes;// Gets all valuesif ( key === undefined ) {if ( this.length ) {data = data_user.get( elem );if ( elem.nodeType === 1 && !data_priv.get( elem, "hasDataAttrs" ) ) {i = attrs.length;while ( i-- ) {name = attrs[ i ].name;if ( name.indexOf( "data-" ) === 0 ) {name = jQuery.camelCase( name.slice(5) );dataAttr( elem, name, data[ name ] );}}data_priv.set( elem, "hasDataAttrs", true );}}return data;}// Sets multiple valuesif ( typeof key === "object" ) {return this.each(function() {data_user.set( this, key );});}return access( this, function( value ) {var data,camelKey = jQuery.camelCase( key );// The calling jQuery object (element matches) is not empty// (and therefore has an element appears at this[ 0 ]) and the// `value` parameter was not undefined. An empty jQuery object// will result in `undefined` for elem = this[ 0 ] which will// throw an exception if an attempt to read a data cache is made.if ( elem && value === undefined ) {// Attempt to get data from the cache// with the key as-isdata = data_user.get( elem, key );if ( data !== undefined ) {return data;}// Attempt to get data from the cache// with the key camelizeddata = data_user.get( elem, camelKey );if ( data !== undefined ) {return data;}// Attempt to "discover" the data in// HTML5 custom data-* attrsdata = dataAttr( elem, camelKey, undefined );if ( data !== undefined ) {return data;}// We tried really hard, but the data doesn't exist.return;}// Set the data...this.each(function() {// First, attempt to store a copy or reference of any// data that might've been store with a camelCased key.var data = data_user.get( this, camelKey );// For HTML5 data-* attribute interop, we have to// store property names with dashes in a camelCase form.// This might not apply to all properties...*data_user.set( this, camelKey, value );// *... In the case of properties that might _actually_// have dashes, we need to also store a copy of that// unchanged property.if ( key.indexOf("-") !== -1 && data !== undefined ) {data_user.set( this, key, value );}});}, null, value, arguments.length > 1, null, true );},removeData: function( key ) {return this.each(function() {data_user.remove( this, key );});}});jQuery.extend({queue: function( elem, type, data ) {var queue;if ( elem ) {type = ( type || "fx" ) + "queue";queue = data_priv.get( elem, type );// Speed up dequeue by getting out quickly if this is just a lookupif ( data ) {if ( !queue || jQuery.isArray( data ) ) {queue = data_priv.access( elem, type, jQuery.makeArray(data) );} else {queue.push( data );}}return queue || [];}},dequeue: function( elem, type ) {type = type || "fx";var queue = jQuery.queue( elem, type ),startLength = queue.length,fn = queue.shift(),hooks = jQuery._queueHooks( elem, type ),next = function() {jQuery.dequeue( elem, type );};// If the fx queue is dequeued, always remove the progress sentinelif ( fn === "inprogress" ) {fn = queue.shift();startLength--;}if ( fn ) {// Add a progress sentinel to prevent the fx queue from being// automatically dequeuedif ( type === "fx" ) {queue.unshift( "inprogress" );}// clear up the last queue stop functiondelete hooks.stop;fn.call( elem, next, hooks );}if ( !startLength && hooks ) {hooks.empty.fire();}},// not intended for public consumption - generates a queueHooks object, or returns the current one_queueHooks: function( elem, type ) {var key = type + "queueHooks";return data_priv.get( elem, key ) || data_priv.access( elem, key, {empty: jQuery.Callbacks("once memory").add(function() {data_priv.remove( elem, [ type + "queue", key ] );})});}});jQuery.fn.extend({queue: function( type, data ) {var setter = 2;if ( typeof type !== "string" ) {data = type;type = "fx";setter--;}if ( arguments.length < setter ) {return jQuery.queue( this[0], type );}return data === undefined ?this :this.each(function() {var queue = jQuery.queue( this, type, data );// ensure a hooks for this queuejQuery._queueHooks( this, type );if ( type === "fx" && queue[0] !== "inprogress" ) {jQuery.dequeue( this, type );}});},dequeue: function( type ) {return this.each(function() {jQuery.dequeue( this, type );});},clearQueue: function( type ) {return this.queue( type || "fx", [] );},// Get a promise resolved when queues of a certain type// are emptied (fx is the type by default)promise: function( type, obj ) {var tmp,count = 1,defer = jQuery.Deferred(),elements = this,i = this.length,resolve = function() {if ( !( --count ) ) {defer.resolveWith( elements, [ elements ] );}};if ( typeof type !== "string" ) {obj = type;type = undefined;}type = type || "fx";while ( i-- ) {tmp = data_priv.get( elements[ i ], type + "queueHooks" );if ( tmp && tmp.empty ) {count++;tmp.empty.add( resolve );}}resolve();return defer.promise( obj );}});var pnum = (/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/).source;var cssExpand = [ "Top", "Right", "Bottom", "Left" ];var isHidden = function( elem, el ) {// isHidden might be called from jQuery#filter function;// in that case, element will be second argumentelem = el || elem;return jQuery.css( elem, "display" ) === "none" || !jQuery.contains( elem.ownerDocument, elem );};var rcheckableType = (/^(?:checkbox|radio)$/i);(function() {var fragment = document.createDocumentFragment(),div = fragment.appendChild( document.createElement( "div" ) );// #11217 - WebKit loses check when the name is after the checked attributediv.innerHTML = "";// Support: Safari 5.1, iOS 5.1, Android 4.x, Android 2.3// old WebKit doesn't clone checked state correctly in fragmentssupport.checkClone = div.cloneNode( true ).cloneNode( true ).lastChild.checked;// Make sure textarea (and checkbox) defaultValue is properly cloned// Support: IE9-IE11+div.innerHTML = "";support.noCloneChecked = !!div.cloneNode( true ).lastChild.defaultValue;})();var strundefined = typeof undefined;support.focusinBubbles = "onfocusin" in window;varrkeyEvent = /^key/,rmouseEvent = /^(?:mouse|contextmenu)|click/,rfocusMorph = /^(?:focusinfocus|focusoutblur)$/,rtypenamespace = /^([^.]*)(?:\.(.+)|)$/;function returnTrue() {return true;}function returnFalse() {return false;}function safeActiveElement() {try {return document.activeElement;} catch ( err ) { }}/* * Helper functions for managing events -- not part of the public interface. * Props to Dean Edwards' addEvent library for many of the ideas. */jQuery.event = {global: {},add: function( elem, types, handler, data, selector ) {var handleObjIn, eventHandle, tmp,events, t, handleObj,special, handlers, type, namespaces, origType,elemData = data_priv.get( elem );// Don't attach events to noData or text/comment nodes (but allow plain objects)if ( !elemData ) {return;}// Caller can pass in an object of custom data in lieu of the handlerif ( handler.handler ) {handleObjIn = handler;handler = handleObjIn.handler;selector = handleObjIn.selector;}// Make sure that the handler has a unique ID, used to find/remove it laterif ( !handler.guid ) {handler.guid = jQuery.guid++;}// Init the element's event structure and main handler, if this is the firstif ( !(events = elemData.events) ) {events = elemData.events = {};}if ( !(eventHandle = elemData.handle) ) {eventHandle = elemData.handle = function( e ) {// Discard the second event of a jQuery.event.trigger() and// when an event is called after a page has unloadedreturn typeof jQuery !== strundefined && jQuery.event.triggered !== e.type ?jQuery.event.dispatch.apply( elem, arguments ) : undefined;};}// Handle multiple events separated by a spacetypes = ( types || "" ).match( rnotwhite ) || [ "" ];t = types.length;while ( t-- ) {tmp = rtypenamespace.exec( types[t] ) || [];type = origType = tmp[1];namespaces = ( tmp[2] || "" ).split( "." ).sort();// There *must* be a type, no attaching namespace-only handlersif ( !type ) {continue;}// If event changes its type, use the special event handlers for the changed typespecial = jQuery.event.special[ type ] || {};// If selector defined, determine special event api type, otherwise given typetype = ( selector ? special.delegateType : special.bindType ) || type;// Update special based on newly reset typespecial = jQuery.event.special[ type ] || {};// handleObj is passed to all event handlershandleObj = jQuery.extend({type: type,origType: origType,data: data,handler: handler,guid: handler.guid,selector: selector,needsContext: selector && jQuery.expr.match.needsContext.test( selector ),namespace: namespaces.join(".")}, handleObjIn );// Init the event handler queue if we're the firstif ( !(handlers = events[ type ]) ) {handlers = events[ type ] = [];handlers.delegateCount = 0;// Only use addEventListener if the special events handler returns falseif ( !special.setup || special.setup.call( elem, data, namespaces, eventHandle ) === false ) {if ( elem.addEventListener ) {elem.addEventListener( type, eventHandle, false );}}}if ( special.add ) {special.add.call( elem, handleObj );if ( !handleObj.handler.guid ) {handleObj.handler.guid = handler.guid;}}// Add to the element's handler list, delegates in frontif ( selector ) {handlers.splice( handlers.delegateCount++, 0, handleObj );} else {handlers.push( handleObj );}// Keep track of which events have ever been used, for event optimizationjQuery.event.global[ type ] = true;}},// Detach an event or set of events from an elementremove: function( elem, types, handler, selector, mappedTypes ) {var j, origCount, tmp,events, t, handleObj,special, handlers, type, namespaces, origType,elemData = data_priv.hasData( elem ) && data_priv.get( elem );if ( !elemData || !(events = elemData.events) ) {return;}// Once for each type.namespace in types; type may be omittedtypes = ( types || "" ).match( rnotwhite ) || [ "" ];t = types.length;while ( t-- ) {tmp = rtypenamespace.exec( types[t] ) || [];type = origType = tmp[1];namespaces = ( tmp[2] || "" ).split( "." ).sort();// Unbind all events (on this namespace, if provided) for the elementif ( !type ) {for ( type in events ) {jQuery.event.remove( elem, type + types[ t ], handler, selector, true );}continue;}special = jQuery.event.special[ type ] || {};type = ( selector ? special.delegateType : special.bindType ) || type;handlers = events[ type ] || [];tmp = tmp[2] && new RegExp( "(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)" );// Remove matching eventsorigCount = j = handlers.length;while ( j-- ) {handleObj = handlers[ j ];if ( ( mappedTypes || origType === handleObj.origType ) &&( !handler || handler.guid === handleObj.guid ) &&( !tmp || tmp.test( handleObj.namespace ) ) &&( !selector || selector === handleObj.selector || selector === "**" && handleObj.selector ) ) {handlers.splice( j, 1 );if ( handleObj.selector ) {handlers.delegateCount--;}if ( special.remove ) {special.remove.call( elem, handleObj );}}}// Remove generic event handler if we removed something and no more handlers exist// (avoids potential for endless recursion during removal of special event handlers)if ( origCount && !handlers.length ) {if ( !special.teardown || special.teardown.call( elem, namespaces, elemData.handle ) === false ) {jQuery.removeEvent( elem, type, elemData.handle );}delete events[ type ];}}// Remove the expando if it's no longer usedif ( jQuery.isEmptyObject( events ) ) {delete elemData.handle;data_priv.remove( elem, "events" );}},trigger: function( event, data, elem, onlyHandlers ) {var i, cur, tmp, bubbleType, ontype, handle, special,eventPath = [ elem || document ],type = hasOwn.call( event, "type" ) ? event.type : event,namespaces = hasOwn.call( event, "namespace" ) ? event.namespace.split(".") : [];cur = tmp = elem = elem || document;// Don't do events on text and comment nodesif ( elem.nodeType === 3 || elem.nodeType === 8 ) {return;}// focus/blur morphs to focusin/out; ensure we're not firing them right nowif ( rfocusMorph.test( type + jQuery.event.triggered ) ) {return;}if ( type.indexOf(".") >= 0 ) {// Namespaced trigger; create a regexp to match event type in handle()namespaces = type.split(".");type = namespaces.shift();namespaces.sort();}ontype = type.indexOf(":") < 0 && "on" + type;// Caller can pass in a jQuery.Event object, Object, or just an event type stringevent = event[ jQuery.expando ] ?event :new jQuery.Event( type, typeof event === "object" && event );// Trigger bitmask: & 1 for native handlers; & 2 for jQuery (always true)event.isTrigger = onlyHandlers ? 2 : 3;event.namespace = namespaces.join(".");event.namespace_re = event.namespace ?new RegExp( "(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)" ) :null;// Clean up the event in case it is being reusedevent.result = undefined;if ( !event.target ) {event.target = elem;}// Clone any incoming data and prepend the event, creating the handler arg listdata = data == null ?[ event ] :jQuery.makeArray( data, [ event ] );// Allow special events to draw outside the linesspecial = jQuery.event.special[ type ] || {};if ( !onlyHandlers && special.trigger && special.trigger.apply( elem, data ) === false ) {return;}// Determine event propagation path in advance, per W3C events spec (#9951)// Bubble up to document, then to window; watch for a global ownerDocument var (#9724)if ( !onlyHandlers && !special.noBubble && !jQuery.isWindow( elem ) ) {bubbleType = special.delegateType || type;if ( !rfocusMorph.test( bubbleType + type ) ) {cur = cur.parentNode;}for ( ; cur; cur = cur.parentNode ) {eventPath.push( cur );tmp = cur;}// Only add window if we got to document (e.g., not plain obj or detached DOM)if ( tmp === (elem.ownerDocument || document) ) {eventPath.push( tmp.defaultView || tmp.parentWindow || window );}}// Fire handlers on the event pathi = 0;while ( (cur = eventPath[i++]) && !event.isPropagationStopped() ) {event.type = i > 1 ?bubbleType :special.bindType || type;// jQuery handlerhandle = ( data_priv.get( cur, "events" ) || {} )[ event.type ] && data_priv.get( cur, "handle" );if ( handle ) {handle.apply( cur, data );}// Native handlerhandle = ontype && cur[ ontype ];if ( handle && handle.apply && jQuery.acceptData( cur ) ) {event.result = handle.apply( cur, data );if ( event.result === false ) {event.preventDefault();}}}event.type = type;// If nobody prevented the default action, do it nowif ( !onlyHandlers && !event.isDefaultPrevented() ) {if ( (!special._default || special._default.apply( eventPath.pop(), data ) === false) &&jQuery.acceptData( elem ) ) {// Call a native DOM method on the target with the same name name as the event.// Don't do default actions on window, that's where global variables be (#6170)if ( ontype && jQuery.isFunction( elem[ type ] ) && !jQuery.isWindow( elem ) ) {// Don't re-trigger an onFOO event when we call its FOO() methodtmp = elem[ ontype ];if ( tmp ) {elem[ ontype ] = null;}// Prevent re-triggering of the same event, since we already bubbled it abovejQuery.event.triggered = type;elem[ type ]();jQuery.event.triggered = undefined;if ( tmp ) {elem[ ontype ] = tmp;}}}}return event.result;},dispatch: function( event ) {// Make a writable jQuery.Event from the native event objectevent = jQuery.event.fix( event );var i, j, ret, matched, handleObj,handlerQueue = [],args = slice.call( arguments ),handlers = ( data_priv.get( this, "events" ) || {} )[ event.type ] || [],special = jQuery.event.special[ event.type ] || {};// Use the fix-ed jQuery.Event rather than the (read-only) native eventargs[0] = event;event.delegateTarget = this;// Call the preDispatch hook for the mapped type, and let it bail if desiredif ( special.preDispatch && special.preDispatch.call( this, event ) === false ) {return;}// Determine handlershandlerQueue = jQuery.event.handlers.call( this, event, handlers );// Run delegates first; they may want to stop propagation beneath usi = 0;while ( (matched = handlerQueue[ i++ ]) && !event.isPropagationStopped() ) {event.currentTarget = matched.elem;j = 0;while ( (handleObj = matched.handlers[ j++ ]) && !event.isImmediatePropagationStopped() ) {// Triggered event must either 1) have no namespace, or// 2) have namespace(s) a subset or equal to those in the bound event (both can have no namespace).if ( !event.namespace_re || event.namespace_re.test( handleObj.namespace ) ) {event.handleObj = handleObj;event.data = handleObj.data;ret = ( (jQuery.event.special[ handleObj.origType ] || {}).handle || handleObj.handler ).apply( matched.elem, args );if ( ret !== undefined ) {if ( (event.result = ret) === false ) {event.preventDefault();event.stopPropagation();}}}}}// Call the postDispatch hook for the mapped typeif ( special.postDispatch ) {special.postDispatch.call( this, event );}return event.result;},handlers: function( event, handlers ) {var i, matches, sel, handleObj,handlerQueue = [],delegateCount = handlers.delegateCount,cur = event.target;// Find delegate handlers// Black-hole SVG instance trees (#13180)// Avoid non-left-click bubbling in Firefox (#3861)if ( delegateCount && cur.nodeType && (!event.button || event.type !== "click") ) {for ( ; cur !== this; cur = cur.parentNode || this ) {// Don't process clicks on disabled elements (#6911, #8165, #11382, #11764)if ( cur.disabled !== true || event.type !== "click" ) {matches = [];for ( i = 0; i < delegateCount; i++ ) {handleObj = handlers[ i ];// Don't conflict with Object.prototype properties (#13203)sel = handleObj.selector + " ";if ( matches[ sel ] === undefined ) {matches[ sel ] = handleObj.needsContext ?jQuery( sel, this ).index( cur ) >= 0 :jQuery.find( sel, this, null, [ cur ] ).length;}if ( matches[ sel ] ) {matches.push( handleObj );}}if ( matches.length ) {handlerQueue.push({ elem: cur, handlers: matches });}}}}// Add the remaining (directly-bound) handlersif ( delegateCount < handlers.length ) {handlerQueue.push({ elem: this, handlers: handlers.slice( delegateCount ) });}return handlerQueue;},// Includes some event props shared by KeyEvent and MouseEventprops: "altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks: {},keyHooks: {props: "char charCode key keyCode".split(" "),filter: function( event, original ) {// Add which for key eventsif ( event.which == null ) {event.which = original.charCode != null ? original.charCode : original.keyCode;}return event;}},mouseHooks: {props: "button buttons clientX clientY offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter: function( event, original ) {var eventDoc, doc, body,button = original.button;// Calculate pageX/Y if missing and clientX/Y availableif ( event.pageX == null && original.clientX != null ) {eventDoc = event.target.ownerDocument || document;doc = eventDoc.documentElement;body = eventDoc.body;event.pageX = original.clientX + ( doc && doc.scrollLeft || body && body.scrollLeft || 0 ) - ( doc && doc.clientLeft || body && body.clientLeft || 0 );event.pageY = original.clientY + ( doc && doc.scrollTop || body && body.scrollTop || 0 ) - ( doc && doc.clientTop || body && body.clientTop || 0 );}// Add which for click: 1 === left; 2 === middle; 3 === right// Note: button is not normalized, so don't use itif ( !event.which && button !== undefined ) {event.which = ( button & 1 ? 1 : ( button & 2 ? 3 : ( button & 4 ? 2 : 0 ) ) );}return event;}},fix: function( event ) {if ( event[ jQuery.expando ] ) {return event;}// Create a writable copy of the event object and normalize some propertiesvar i, prop, copy,type = event.type,originalEvent = event,fixHook = this.fixHooks[ type ];if ( !fixHook ) {this.fixHooks[ type ] = fixHook =rmouseEvent.test( type ) ? this.mouseHooks :rkeyEvent.test( type ) ? this.keyHooks :{};}copy = fixHook.props ? this.props.concat( fixHook.props ) : this.props;event = new jQuery.Event( originalEvent );i = copy.length;while ( i-- ) {prop = copy[ i ];event[ prop ] = originalEvent[ prop ];}// Support: Cordova 2.5 (WebKit) (#13255)// All events should have a target; Cordova deviceready doesn'tif ( !event.target ) {event.target = document;}// Support: Safari 6.0+, Chrome < 28// Target should not be a text node (#504, #13143)if ( event.target.nodeType === 3 ) {event.target = event.target.parentNode;}return fixHook.filter ? fixHook.filter( event, originalEvent ) : event;},special: {load: {// Prevent triggered image.load events from bubbling to window.loadnoBubble: true},focus: {// Fire native event if possible so blur/focus sequence is correcttrigger: function() {if ( this !== safeActiveElement() && this.focus ) {this.focus();return false;}},delegateType: "focusin"},blur: {trigger: function() {if ( this === safeActiveElement() && this.blur ) {this.blur();return false;}},delegateType: "focusout"},click: {// For checkbox, fire native event so checked state will be righttrigger: function() {if ( this.type === "checkbox" && this.click && jQuery.nodeName( this, "input" ) ) {this.click();return false;}},// For cross-browser consistency, don't fire native .click() on links_default: function( event ) {return jQuery.nodeName( event.target, "a" );}},beforeunload: {postDispatch: function( event ) {// Support: Firefox 20+// Firefox doesn't alert if the returnValue field is not set.if ( event.result !== undefined ) {event.originalEvent.returnValue = event.result;}}}},simulate: function( type, elem, event, bubble ) {// Piggyback on a donor event to simulate a different one.// Fake originalEvent to avoid donor's stopPropagation, but if the// simulated event prevents default then we do the same on the donor.var e = jQuery.extend(new jQuery.Event(),event,{type: type,isSimulated: true,originalEvent: {}});if ( bubble ) {jQuery.event.trigger( e, null, elem );} else {jQuery.event.dispatch.call( elem, e );}if ( e.isDefaultPrevented() ) {event.preventDefault();}}};jQuery.removeEvent = function( elem, type, handle ) {if ( elem.removeEventListener ) {elem.removeEventListener( type, handle, false );}};jQuery.Event = function( src, props ) {// Allow instantiation without the 'new' keywordif ( !(this instanceof jQuery.Event) ) {return new jQuery.Event( src, props );}// Event objectif ( src && src.type ) {this.originalEvent = src;this.type = src.type;// Events bubbling up the document may have been marked as prevented// by a handler lower down the tree; reflect the correct value.this.isDefaultPrevented = src.defaultPrevented ||// Support: Android < 4.0src.defaultPrevented === undefined &&src.getPreventDefault && src.getPreventDefault() ?returnTrue :returnFalse;// Event type} else {this.type = src;}// Put explicitly provided properties onto the event objectif ( props ) {jQuery.extend( this, props );}// Create a timestamp if incoming event doesn't have onethis.timeStamp = src && src.timeStamp || jQuery.now();// Mark it as fixedthis[ jQuery.expando ] = true;};// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding// http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.htmljQuery.Event.prototype = {isDefaultPrevented: returnFalse,isPropagationStopped: returnFalse,isImmediatePropagationStopped: returnFalse,preventDefault: function() {var e = this.originalEvent;this.isDefaultPrevented = returnTrue;if ( e && e.preventDefault ) {e.preventDefault();}},stopPropagation: function() {var e = this.originalEvent;this.isPropagationStopped = returnTrue;if ( e && e.stopPropagation ) {e.stopPropagation();}},stopImmediatePropagation: function() {this.isImmediatePropagationStopped = returnTrue;this.stopPropagation();}};// Create mouseenter/leave events using mouseover/out and event-time checks// Support: Chrome 15+jQuery.each({mouseenter: "mouseover",mouseleave: "mouseout"}, function( orig, fix ) {jQuery.event.special[ orig ] = {delegateType: fix,bindType: fix,handle: function( event ) {var ret,target = this,related = event.relatedTarget,handleObj = event.handleObj;// For mousenter/leave call the handler if related is outside the target.// NB: No relatedTarget if the mouse left/entered the browser windowif ( !related || (related !== target && !jQuery.contains( target, related )) ) {event.type = handleObj.origType;ret = handleObj.handler.apply( this, arguments );event.type = fix;}return ret;}};});// Create "bubbling" focus and blur events// Support: Firefox, Chrome, Safariif ( !support.focusinBubbles ) {jQuery.each({ focus: "focusin", blur: "focusout" }, function( orig, fix ) {// Attach a single capturing handler on the document while someone wants focusin/focusoutvar handler = function( event ) {jQuery.event.simulate( fix, event.target, jQuery.event.fix( event ), true );};jQuery.event.special[ fix ] = {setup: function() {var doc = this.ownerDocument || this,attaches = data_priv.access( doc, fix );if ( !attaches ) {doc.addEventListener( orig, handler, true );}data_priv.access( doc, fix, ( attaches || 0 ) + 1 );},teardown: function() {var doc = this.ownerDocument || this,attaches = data_priv.access( doc, fix ) - 1;if ( !attaches ) {doc.removeEventListener( orig, handler, true );data_priv.remove( doc, fix );} else {data_priv.access( doc, fix, attaches );}}};});}jQuery.fn.extend({on: function( types, selector, data, fn, /*INTERNAL*/ one ) {var origFn, type;// Types can be a map of types/handlersif ( typeof types === "object" ) {// ( types-Object, selector, data )if ( typeof selector !== "string" ) {// ( types-Object, data )data = data || selector;selector = undefined;}for ( type in types ) {this.on( type, selector, data, types[ type ], one );}return this;}if ( data == null && fn == null ) {// ( types, fn )fn = selector;data = selector = undefined;} else if ( fn == null ) {if ( typeof selector === "string" ) {// ( types, selector, fn )fn = data;data = undefined;} else {// ( types, data, fn )fn = data;data = selector;selector = undefined;}}if ( fn === false ) {fn = returnFalse;} else if ( !fn ) {return this;}if ( one === 1 ) {origFn = fn;fn = function( event ) {// Can use an empty set, since event contains the infojQuery().off( event );return origFn.apply( this, arguments );};// Use same guid so caller can remove using origFnfn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ );}return this.each( function() {jQuery.event.add( this, types, fn, data, selector );});},one: function( types, selector, data, fn ) {return this.on( types, selector, data, fn, 1 );},off: function( types, selector, fn ) {var handleObj, type;if ( types && types.preventDefault && types.handleObj ) {// ( event ) dispatched jQuery.EventhandleObj = types.handleObj;jQuery( types.delegateTarget ).off(handleObj.namespace ? handleObj.origType + "." + handleObj.namespace : handleObj.origType,handleObj.selector,handleObj.handler);return this;}if ( typeof types === "object" ) {// ( types-object [, selector] )for ( type in types ) {this.off( type, selector, types[ type ] );}return this;}if ( selector === false || typeof selector === "function" ) {// ( types [, fn] )fn = selector;selector = undefined;}if ( fn === false ) {fn = returnFalse;}return this.each(function() {jQuery.event.remove( this, types, fn, selector );});},trigger: function( type, data ) {return this.each(function() {jQuery.event.trigger( type, data, this );});},triggerHandler: function( type, data ) {var elem = this[0];if ( elem ) {return jQuery.event.trigger( type, data, elem, true );}}});varrxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,rtagName = /<([\w:]+)/,rhtml = /<|?\w+;/,rnoInnerhtml = /<(?:script|style|link)/i,// checked="checked" or checkedrchecked = /checked\s*(?:[^=]|=\s*.checked.)/i,rscriptType = /^$|\/(?:java|ecma)script/i,rscriptTypeMasked = /^true\/(.*)/,rcleanScript = /^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,// We have to close these tags to support XHTML (#13200)wrapMap = {// Support: IE 9option: [ 1, "" ],thead: [ 1, "", "
" ],col: [ 2, "", "
" ],tr: [ 2, "", "
" ],td: [ 3, "", "
" ],_default: [ 0, "", "" ]};// Support: IE 9wrapMap.optgroup = wrapMap.option;wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead;wrapMap.th = wrapMap.td;// Support: 1.x compatibility// Manipulating tables requires a tbodyfunction manipulationTarget( elem, content ) {return jQuery.nodeName( elem, "table" ) &&jQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, "tr" ) ?elem.getElementsByTagName("tbody")[0] ||elem.appendChild( elem.ownerDocument.createElement("tbody") ) :elem;}// Replace/restore the type attribute of script elements for safe DOM manipulationfunction disableScript( elem ) {elem.type = (elem.getAttribute("type") !== null) + "/" + elem.type;return elem;}function restoreScript( elem ) {var match = rscriptTypeMasked.exec( elem.type );if ( match ) {elem.type = match[ 1 ];} else {elem.removeAttribute("type");}return elem;}// Mark scripts as having already been evaluatedfunction setGlobalEval( elems, refElements ) {var i = 0,l = elems.length;for ( ; i < l; i++ ) {data_priv.set(elems[ i ], "globalEval", !refElements || data_priv.get( refElements[ i ], "globalEval" ));}}function cloneCopyEvent( src, dest ) {var i, l, type, pdataOld, pdataCur, udataOld, udataCur, events;if ( dest.nodeType !== 1 ) {return;}// 1. Copy private data: events, handlers, etc.if ( data_priv.hasData( src ) ) {pdataOld = data_priv.access( src );pdataCur = data_priv.set( dest, pdataOld );events = pdataOld.events;if ( events ) {delete pdataCur.handle;pdataCur.events = {};for ( type in events ) {for ( i = 0, l = events[ type ].length; i < l; i++ ) {jQuery.event.add( dest, type, events[ type ][ i ] );}}}}// 2. Copy user dataif ( data_user.hasData( src ) ) {udataOld = data_user.access( src );udataCur = jQuery.extend( {}, udataOld );data_user.set( dest, udataCur );}}function getAll( context, tag ) {var ret = context.getElementsByTagName ? context.getElementsByTagName( tag || "*" ) :context.querySelectorAll ? context.querySelectorAll( tag || "*" ) :[];return tag === undefined || tag && jQuery.nodeName( context, tag ) ?jQuery.merge( [ context ], ret ) :ret;}// Support: IE >= 9function fixInput( src, dest ) {var nodeName = dest.nodeName.toLowerCase();// Fails to persist the checked state of a cloned checkbox or radio button.if ( nodeName === "input" && rcheckableType.test( src.type ) ) {dest.checked = src.checked;// Fails to return the selected option to the default selected state when cloning options} else if ( nodeName === "input" || nodeName === "textarea" ) {dest.defaultValue = src.defaultValue;}}jQuery.extend({clone: function( elem, dataAndEvents, deepDataAndEvents ) {var i, l, srcElements, destElements,clone = elem.cloneNode( true ),inPage = jQuery.contains( elem.ownerDocument, elem );// Support: IE >= 9// Fix Cloning issuesif ( !support.noCloneChecked && ( elem.nodeType === 1 || elem.nodeType === 11 ) &&!jQuery.isXMLDoc( elem ) ) {// We eschew Sizzle here for performance reasons: http://jsperf.com/getall-vs-sizzle/2destElements = getAll( clone );srcElements = getAll( elem );for ( i = 0, l = srcElements.length; i < l; i++ ) {fixInput( srcElements[ i ], destElements[ i ] );}}// Copy the events from the original to the cloneif ( dataAndEvents ) {if ( deepDataAndEvents ) {srcElements = srcElements || getAll( elem );destElements = destElements || getAll( clone );for ( i = 0, l = srcElements.length; i < l; i++ ) {cloneCopyEvent( srcElements[ i ], destElements[ i ] );}} else {cloneCopyEvent( elem, clone );}}// Preserve script evaluation historydestElements = getAll( clone, "script" );if ( destElements.length > 0 ) {setGlobalEval( destElements, !inPage && getAll( elem, "script" ) );}// Return the cloned setreturn clone;},buildFragment: function( elems, context, scripts, selection ) {var elem, tmp, tag, wrap, contains, j,fragment = context.createDocumentFragment(),nodes = [],i = 0,l = elems.length;for ( ; i < l; i++ ) {elem = elems[ i ];if ( elem || elem === 0 ) {// Add nodes directlyif ( jQuery.type( elem ) === "object" ) {// Support: QtWebKit// jQuery.merge because push.apply(_, arraylike) throwsjQuery.merge( nodes, elem.nodeType ? [ elem ] : elem );// Convert non-html into a text node} else if ( !rhtml.test( elem ) ) {nodes.push( context.createTextNode( elem ) );// Convert html into DOM nodes} else {tmp = tmp || fragment.appendChild( context.createElement("div") );// Deserialize a standard representationtag = ( rtagName.exec( elem ) || [ "", "" ] )[ 1 ].toLowerCase();wrap = wrapMap[ tag ] || wrapMap._default;tmp.innerHTML = wrap[ 1 ] + elem.replace( rxhtmlTag, "<$1>$2>" ) + wrap[ 2 ];// Descend through wrappers to the right contentj = wrap[ 0 ];while ( j-- ) {tmp = tmp.lastChild;}// Support: QtWebKit// jQuery.merge because push.apply(_, arraylike) throwsjQuery.merge( nodes, tmp.childNodes );// Remember the top-level containertmp = fragment.firstChild;// Fixes #12346// Support: Webkit, IEtmp.textContent = "";}}}// Remove wrapper from fragmentfragment.textContent = "";i = 0;while ( (elem = nodes[ i++ ]) ) {// #4087 - If origin and destination elements are the same, and this is// that element, do not do anythingif ( selection && jQuery.inArray( elem, selection ) !== -1 ) {continue;}contains = jQuery.contains( elem.ownerDocument, elem );// Append to fragmenttmp = getAll( fragment.appendChild( elem ), "script" );// Preserve script evaluation historyif ( contains ) {setGlobalEval( tmp );}// Capture executablesif ( scripts ) {j = 0;while ( (elem = tmp[ j++ ]) ) {if ( rscriptType.test( elem.type || "" ) ) {scripts.push( elem );}}}}return fragment;},cleanData: function( elems ) {var data, elem, events, type, key, j,special = jQuery.event.special,i = 0;for ( ; (elem = elems[ i ]) !== undefined; i++ ) {if ( jQuery.acceptData( elem ) ) {key = elem[ data_priv.expando ];if ( key && (data = data_priv.cache[ key ]) ) {events = Object.keys( data.events || {} );if ( events.length ) {for ( j = 0; (type = events[j]) !== undefined; j++ ) {if ( special[ type ] ) {jQuery.event.remove( elem, type );// This is a shortcut to avoid jQuery.event.remove's overhead} else {jQuery.removeEvent( elem, type, data.handle );}}}if ( data_priv.cache[ key ] ) {// Discard any remaining `private` datadelete data_priv.cache[ key ];}}}// Discard any remaining `user` datadelete data_user.cache[ elem[ data_user.expando ] ];}}});jQuery.fn.extend({text: function( value ) {return access( this, function( value ) {return value === undefined ?jQuery.text( this ) :this.empty().each(function() {if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {this.textContent = value;}});}, null, value, arguments.length );},append: function() {return this.domManip( arguments, function( elem ) {if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {var target = manipulationTarget( this, elem );target.appendChild( elem );}});},prepend: function() {return this.domManip( arguments, function( elem ) {if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {var target = manipulationTarget( this, elem );target.insertBefore( elem, target.firstChild );}});},before: function() {return this.domManip( arguments, function( elem ) {if ( this.parentNode ) {this.parentNode.insertBefore( elem, this );}});},after: function() {return this.domManip( arguments, function( elem ) {if ( this.parentNode ) {this.parentNode.insertBefore( elem, this.nextSibling );}});},remove: function( selector, keepData /* Internal Use Only */ ) {var elem,elems = selector ? jQuery.filter( selector, this ) : this,i = 0;for ( ; (elem = elems[i]) != null; i++ ) {if ( !keepData && elem.nodeType === 1 ) {jQuery.cleanData( getAll( elem ) );}if ( elem.parentNode ) {if ( keepData && jQuery.contains( elem.ownerDocument, elem ) ) {setGlobalEval( getAll( elem, "script" ) );}elem.parentNode.removeChild( elem );}}return this;},empty: function() {var elem,i = 0;for ( ; (elem = this[i]) != null; i++ ) {if ( elem.nodeType === 1 ) {// Prevent memory leaksjQuery.cleanData( getAll( elem, false ) );// Remove any remaining nodeselem.textContent = "";}}return this;},clone: function( dataAndEvents, deepDataAndEvents ) {dataAndEvents = dataAndEvents == null ? false : dataAndEvents;deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents;return this.map(function() {return jQuery.clone( this, dataAndEvents, deepDataAndEvents );});},html: function( value ) {return access( this, function( value ) {var elem = this[ 0 ] || {},i = 0,l = this.length;if ( value === undefined && elem.nodeType === 1 ) {return elem.innerHTML;}// See if we can take a shortcut and just use innerHTMLif ( typeof value === "string" && !rnoInnerhtml.test( value ) &&!wrapMap[ ( rtagName.exec( value ) || [ "", "" ] )[ 1 ].toLowerCase() ] ) {value = value.replace( rxhtmlTag, "<$1>$2>" );try {for ( ; i < l; i++ ) {elem = this[ i ] || {};// Remove element nodes and prevent memory leaksif ( elem.nodeType === 1 ) {jQuery.cleanData( getAll( elem, false ) );elem.innerHTML = value;}}elem = 0;// If using innerHTML throws an exception, use the fallback method} catch( e ) {}}if ( elem ) {this.empty().append( value );}}, null, value, arguments.length );},replaceWith: function() {var arg = arguments[ 0 ];// Make the changes, replacing each context element with the new contentthis.domManip( arguments, function( elem ) {arg = this.parentNode;jQuery.cleanData( getAll( this ) );if ( arg ) {arg.replaceChild( elem, this );}});// Force removal if there was no new content (e.g., from empty arguments)return arg && (arg.length || arg.nodeType) ? this : this.remove();},detach: function( selector ) {return this.remove( selector, true );},domManip: function( args, callback ) {// Flatten any nested arraysargs = concat.apply( [], args );var fragment, first, scripts, hasScripts, node, doc,i = 0,l = this.length,set = this,iNoClone = l - 1,value = args[ 0 ],isFunction = jQuery.isFunction( value );// We can't cloneNode fragments that contain checked, in WebKitif ( isFunction ||( l > 1 && typeof value === "string" &&!support.checkClone && rchecked.test( value ) ) ) {return this.each(function( index ) {var self = set.eq( index );if ( isFunction ) {args[ 0 ] = value.call( this, index, self.html() );}self.domManip( args, callback );});}if ( l ) {fragment = jQuery.buildFragment( args, this[ 0 ].ownerDocument, false, this );first = fragment.firstChild;if ( fragment.childNodes.length === 1 ) {fragment = first;}if ( first ) {scripts = jQuery.map( getAll( fragment, "script" ), disableScript );hasScripts = scripts.length;// Use the original fragment for the last item instead of the first because it can end up// being emptied incorrectly in certain situations (#8070).for ( ; i < l; i++ ) {node = fragment;if ( i !== iNoClone ) {node = jQuery.clone( node, true, true );// Keep references to cloned scripts for later restorationif ( hasScripts ) {// Support: QtWebKit// jQuery.merge because push.apply(_, arraylike) throwsjQuery.merge( scripts, getAll( node, "script" ) );}}callback.call( this[ i ], node, i );}if ( hasScripts ) {doc = scripts[ scripts.length - 1 ].ownerDocument;// Reenable scriptsjQuery.map( scripts, restoreScript );// Evaluate executable scripts on first document insertionfor ( i = 0; i < hasScripts; i++ ) {node = scripts[ i ];if ( rscriptType.test( node.type || "" ) &&!data_priv.access( node, "globalEval" ) && jQuery.contains( doc, node ) ) {if ( node.src ) {// Optional AJAX dependency, but won't run scripts if not presentif ( jQuery._evalUrl ) {jQuery._evalUrl( node.src );}} else {jQuery.globalEval( node.textContent.replace( rcleanScript, "" ) );}}}}}}return this;}});jQuery.each({appendTo: "append",prependTo: "prepend",insertBefore: "before",insertAfter: "after",replaceAll: "replaceWith"}, function( name, original ) {jQuery.fn[ name ] = function( selector ) {var elems,ret = [],insert = jQuery( selector ),last = insert.length - 1,i = 0;for ( ; i <= last; i++ ) {elems = i === last ? this : this.clone( true );jQuery( insert[ i ] )[ original ]( elems );// Support: QtWebKit// .get() because push.apply(_, arraylike) throwspush.apply( ret, elems.get() );}return this.pushStack( ret );};});var iframe,elemdisplay = {};/** * Retrieve the actual display of a element * @param {String} name nodeName of the element * @param {Object} doc Document object */// Called only from within defaultDisplayfunction actualDisplay( name, doc ) {var elem = jQuery( doc.createElement( name ) ).appendTo( doc.body ),// getDefaultComputedStyle might be reliably used only on attached elementdisplay = window.getDefaultComputedStyle ?// Use of this method is a temporary fix (more like optmization) until something better comes along,// since it was removed from specification and supported only in FFwindow.getDefaultComputedStyle( elem[ 0 ] ).display : jQuery.css( elem[ 0 ], "display" );// We don't have any data stored on the element,// so use "detach" method as fast way to get rid of the elementelem.detach();return display;}/** * Try to determine the default display value of an element * @param {String} nodeName */function defaultDisplay( nodeName ) {var doc = document,display = elemdisplay[ nodeName ];if ( !display ) {display = actualDisplay( nodeName, doc );// If the simple way fails, read from inside an iframeif ( display === "none" || !display ) {// Use the already-created iframe if possibleiframe = (iframe || jQuery( "" )).appendTo( doc.documentElement );// Always write a new HTML skeleton so Webkit and Firefox don't choke on reusedoc = iframe[ 0 ].contentDocument;// Support: IEdoc.write();doc.close();display = actualDisplay( nodeName, doc );iframe.detach();}// Store the correct default displayelemdisplay[ nodeName ] = display;}return display;}var rmargin = (/^margin/);var rnumnonpx = new RegExp( "^(" + pnum + ")(?!px)[a-z%]+$", "i" );var getStyles = function( elem ) {return elem.ownerDocument.defaultView.getComputedStyle( elem, null );};function curCSS( elem, name, computed ) {var width, minWidth, maxWidth, ret,style = elem.style;computed = computed || getStyles( elem );// Support: IE9// getPropertyValue is only needed for .css('filter') in IE9, see #12537if ( computed ) {ret = computed.getPropertyValue( name ) || computed[ name ];}if ( computed ) {if ( ret === "" && !jQuery.contains( elem.ownerDocument, elem ) ) {ret = jQuery.style( elem, name );}// Support: iOS < 6// A tribute to the "awesome hack by Dean Edwards"// iOS < 6 (at least) returns percentage for a larger set of values, but width seems to be reliably pixels// this is against the CSSOM draft spec: http://dev.w3.org/csswg/cssom/#resolved-valuesif ( rnumnonpx.test( ret ) && rmargin.test( name ) ) {// Remember the original valueswidth = style.width;minWidth = style.minWidth;maxWidth = style.maxWidth;// Put in the new values to get a computed value outstyle.minWidth = style.maxWidth = style.width = ret;ret = computed.width;// Revert the changed valuesstyle.width = width;style.minWidth = minWidth;style.maxWidth = maxWidth;}}return ret !== undefined ?// Support: IE// IE returns zIndex value as an integer.ret + "" :ret;}function addGetHookIf( conditionFn, hookFn ) {// Define the hook, we'll check on the first run if it's really needed.return {get: function() {if ( conditionFn() ) {// Hook not needed (or it's not possible to use it due to missing dependency),// remove it.// Since there are no other hooks for marginRight, remove the whole object.delete this.get;return;}// Hook needed; redefine it so that the support test is not executed again.return (this.get = hookFn).apply( this, arguments );}};}(function() {var pixelPositionVal, boxSizingReliableVal,// Support: Firefox, Android 2.3 (Prefixed box-sizing versions).divReset = "padding:0;margin:0;border:0;display:block;-webkit-box-sizing:content-box;" +"-moz-box-sizing:content-box;box-sizing:content-box",docElem = document.documentElement,container = document.createElement( "div" ),div = document.createElement( "div" );div.style.backgroundClip = "content-box";div.cloneNode( true ).style.backgroundClip = "";support.clearCloneStyle = div.style.backgroundClip === "content-box";container.style.cssText = "border:0;width:0;height:0;position:absolute;top:0;left:-9999px;" +"margin-top:1px";container.appendChild( div );// Executing both pixelPosition & boxSizingReliable tests require only one layout// so they're executed at the same time to save the second computation.function computePixelPositionAndBoxSizingReliable() {// Support: Firefox, Android 2.3 (Prefixed box-sizing versions).div.style.cssText = "-webkit-box-sizing:border-box;-moz-box-sizing:border-box;" +"box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;" +"position:absolute;top:1%";docElem.appendChild( container );var divStyle = window.getComputedStyle( div, null );pixelPositionVal = divStyle.top !== "1%";boxSizingReliableVal = divStyle.width === "4px";docElem.removeChild( container );}// Use window.getComputedStyle because jsdom on node.js will break without it.if ( window.getComputedStyle ) {jQuery.extend(support, {pixelPosition: function() {// This test is executed only once but we still do memoizing// since we can use the boxSizingReliable pre-computing.// No need to check if the test was already performed, though.computePixelPositionAndBoxSizingReliable();return pixelPositionVal;},boxSizingReliable: function() {if ( boxSizingReliableVal == null ) {computePixelPositionAndBoxSizingReliable();}return boxSizingReliableVal;},reliableMarginRight: function() {// Support: Android 2.3// Check if div with explicit width and no margin-right incorrectly// gets computed margin-right based on width of container. (#3333)// WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right// This support function is only executed once so no memoizing is needed.var ret,marginDiv = div.appendChild( document.createElement( "div" ) );marginDiv.style.cssText = div.style.cssText = divReset;marginDiv.style.marginRight = marginDiv.style.width = "0";div.style.width = "1px";docElem.appendChild( container );ret = !parseFloat( window.getComputedStyle( marginDiv, null ).marginRight );docElem.removeChild( container );// Clean up the div for other support tests.div.innerHTML = "";return ret;}});}})();// A method for quickly swapping in/out CSS properties to get correct calculations.jQuery.swap = function( elem, options, callback, args ) {var ret, name,old = {};// Remember the old values, and insert the new onesfor ( name in options ) {old[ name ] = elem.style[ name ];elem.style[ name ] = options[ name ];}ret = callback.apply( elem, args || [] );// Revert the old valuesfor ( name in options ) {elem.style[ name ] = old[ name ];}return ret;};var// swappable if display is none or starts with table except "table", "table-cell", or "table-caption"// see here for display values: https://developer.mozilla.org/en-US/docs/CSS/displayrdisplayswap = /^(none|table(?!-c[ea]).+)/,rnumsplit = new RegExp( "^(" + pnum + ")(.*)$", "i" ),rrelNum = new RegExp( "^([+-])=(" + pnum + ")", "i" ),cssShow = { position: "absolute", visibility: "hidden", display: "block" },cssNormalTransform = {letterSpacing: 0,fontWeight: 400},cssPrefixes = [ "Webkit", "O", "Moz", "ms" ];// return a css property mapped to a potentially vendor prefixed propertyfunction vendorPropName( style, name ) {// shortcut for names that are not vendor prefixedif ( name in style ) {return name;}// check for vendor prefixed namesvar capName = name[0].toUpperCase() + name.slice(1),origName = name,i = cssPrefixes.length;while ( i-- ) {name = cssPrefixes[ i ] + capName;if ( name in style ) {return name;}}return origName;}function setPositiveNumber( elem, value, subtract ) {var matches = rnumsplit.exec( value );return matches ?// Guard against undefined "subtract", e.g., when used as in cssHooksMath.max( 0, matches[ 1 ] - ( subtract || 0 ) ) + ( matches[ 2 ] || "px" ) :value;}function augmentWidthOrHeight( elem, name, extra, isBorderBox, styles ) {var i = extra === ( isBorderBox ? "border" : "content" ) ?// If we already have the right measurement, avoid augmentation4 :// Otherwise initialize for horizontal or vertical propertiesname === "width" ? 1 : 0,val = 0;for ( ; i < 4; i += 2 ) {// both box models exclude margin, so add it if we want itif ( extra === "margin" ) {val += jQuery.css( elem, extra + cssExpand[ i ], true, styles );}if ( isBorderBox ) {// border-box includes padding, so remove it if we want contentif ( extra === "content" ) {val -= jQuery.css( elem, "padding" + cssExpand[ i ], true, styles );}// at this point, extra isn't border nor margin, so remove borderif ( extra !== "margin" ) {val -= jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles );}} else {// at this point, extra isn't content, so add paddingval += jQuery.css( elem, "padding" + cssExpand[ i ], true, styles );// at this point, extra isn't content nor padding, so add borderif ( extra !== "padding" ) {val += jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles );}}}return val;}function getWidthOrHeight( elem, name, extra ) {// Start with offset property, which is equivalent to the border-box valuevar valueIsBorderBox = true,val = name === "width" ? elem.offsetWidth : elem.offsetHeight,styles = getStyles( elem ),isBorderBox = jQuery.css( elem, "boxSizing", false, styles ) === "border-box";// some non-html elements return undefined for offsetWidth, so check for null/undefined// svg - https://bugzilla.mozilla.org/show_bug.cgi?id=649285// MathML - https://bugzilla.mozilla.org/show_bug.cgi?id=491668if ( val <= 0 || val == null ) {// Fall back to computed then uncomputed css if necessaryval = curCSS( elem, name, styles );if ( val < 0 || val == null ) {val = elem.style[ name ];}// Computed unit is not pixels. Stop here and return.if ( rnumnonpx.test(val) ) {return val;}// we need the check for style in case a browser which returns unreliable values// for getComputedStyle silently falls back to the reliable elem.stylevalueIsBorderBox = isBorderBox &&( support.boxSizingReliable() || val === elem.style[ name ] );// Normalize "", auto, and prepare for extraval = parseFloat( val ) || 0;}// use the active box-sizing model to add/subtract irrelevant stylesreturn ( val +augmentWidthOrHeight(elem,name,extra || ( isBorderBox ? "border" : "content" ),valueIsBorderBox,styles)) + "px";}function showHide( elements, show ) {var display, elem, hidden,values = [],index = 0,length = elements.length;for ( ; index < length; index++ ) {elem = elements[ index ];if ( !elem.style ) {continue;}values[ index ] = data_priv.get( elem, "olddisplay" );display = elem.style.display;if ( show ) {// Reset the inline display of this element to learn if it is// being hidden by cascaded rules or notif ( !values[ index ] && display === "none" ) {elem.style.display = "";}// Set elements which have been overridden with display: none// in a stylesheet to whatever the default browser style is// for such an elementif ( elem.style.display === "" && isHidden( elem ) ) {values[ index ] = data_priv.access( elem, "olddisplay", defaultDisplay(elem.nodeName) );}} else {if ( !values[ index ] ) {hidden = isHidden( elem );if ( display && display !== "none" || !hidden ) {data_priv.set( elem, "olddisplay", hidden ? display : jQuery.css(elem, "display") );}}}}// Set the display of most of the elements in a second loop// to avoid the constant reflowfor ( index = 0; index < length; index++ ) {elem = elements[ index ];if ( !elem.style ) {continue;}if ( !show || elem.style.display === "none" || elem.style.display === "" ) {elem.style.display = show ? values[ index ] || "" : "none";}}return elements;}jQuery.extend({// Add in style property hooks for overriding the default// behavior of getting and setting a style propertycssHooks: {opacity: {get: function( elem, computed ) {if ( computed ) {// We should always get a number back from opacityvar ret = curCSS( elem, "opacity" );return ret === "" ? "1" : ret;}}}},// Don't automatically add "px" to these possibly-unitless propertiescssNumber: {"columnCount": true,"fillOpacity": true,"fontWeight": true,"lineHeight": true,"opacity": true,"order": true,"orphans": true,"widows": true,"zIndex": true,"zoom": true},// Add in properties whose names you wish to fix before// setting or getting the valuecssProps: {// normalize float css property"float": "cssFloat"},// Get and set the style property on a DOM Nodestyle: function( elem, name, value, extra ) {// Don't set styles on text and comment nodesif ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) {return;}// Make sure that we're working with the right namevar ret, type, hooks,origName = jQuery.camelCase( name ),style = elem.style;name = jQuery.cssProps[ origName ] || ( jQuery.cssProps[ origName ] = vendorPropName( style, origName ) );// gets hook for the prefixed version// followed by the unprefixed versionhooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];// Check if we're setting a valueif ( value !== undefined ) {type = typeof value;// convert relative number strings (+= or -=) to relative numbers. #7345if ( type === "string" && (ret = rrelNum.exec( value )) ) {value = ( ret[1] + 1 ) * ret[2] + parseFloat( jQuery.css( elem, name ) );// Fixes bug #9237type = "number";}// Make sure that null and NaN values aren't set. See: #7116if ( value == null || value !== value ) {return;}// If a number was passed in, add 'px' to the (except for certain CSS properties)if ( type === "number" && !jQuery.cssNumber[ origName ] ) {value += "px";}// Fixes #8908, it can be done more correctly by specifying setters in cssHooks,// but it would mean to define eight (for every problematic property) identical functionsif ( !support.clearCloneStyle && value === "" && name.indexOf( "background" ) === 0 ) {style[ name ] = "inherit";}// If a hook was provided, use that value, otherwise just set the specified valueif ( !hooks || !("set" in hooks) || (value = hooks.set( elem, value, extra )) !== undefined ) {// Support: Chrome, Safari// Setting style to blank string required to delete "style: x !important;"style[ name ] = "";style[ name ] = value;}} else {// If a hook was provided get the non-computed value from thereif ( hooks && "get" in hooks && (ret = hooks.get( elem, false, extra )) !== undefined ) {return ret;}// Otherwise just get the value from the style objectreturn style[ name ];}},css: function( elem, name, extra, styles ) {var val, num, hooks,origName = jQuery.camelCase( name );// Make sure that we're working with the right namename = jQuery.cssProps[ origName ] || ( jQuery.cssProps[ origName ] = vendorPropName( elem.style, origName ) );// gets hook for the prefixed version// followed by the unprefixed versionhooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];// If a hook was provided get the computed value from thereif ( hooks && "get" in hooks ) {val = hooks.get( elem, true, extra );}// Otherwise, if a way to get the computed value exists, use thatif ( val === undefined ) {val = curCSS( elem, name, styles );}//convert "normal" to computed valueif ( val === "normal" && name in cssNormalTransform ) {val = cssNormalTransform[ name ];}// Return, converting to number if forced or a qualifier was provided and val looks numericif ( extra === "" || extra ) {num = parseFloat( val );return extra === true || jQuery.isNumeric( num ) ? num || 0 : val;}return val;}});jQuery.each([ "height", "width" ], function( i, name ) {jQuery.cssHooks[ name ] = {get: function( elem, computed, extra ) {if ( computed ) {// certain elements can have dimension info if we invisibly show them// however, it must have a current display style that would benefit from thisreturn elem.offsetWidth === 0 && rdisplayswap.test( jQuery.css( elem, "display" ) ) ?jQuery.swap( elem, cssShow, function() {return getWidthOrHeight( elem, name, extra );}) :getWidthOrHeight( elem, name, extra );}},set: function( elem, value, extra ) {var styles = extra && getStyles( elem );return setPositiveNumber( elem, value, extra ?augmentWidthOrHeight(elem,name,extra,jQuery.css( elem, "boxSizing", false, styles ) === "border-box",styles) : 0);}};});// Support: Android 2.3jQuery.cssHooks.marginRight = addGetHookIf( support.reliableMarginRight,function( elem, computed ) {if ( computed ) {// WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right// Work around by temporarily setting element display to inline-blockreturn jQuery.swap( elem, { "display": "inline-block" },curCSS, [ elem, "marginRight" ] );}});// These hooks are used by animate to expand propertiesjQuery.each({margin: "",padding: "",border: "Width"}, function( prefix, suffix ) {jQuery.cssHooks[ prefix + suffix ] = {expand: function( value ) {var i = 0,expanded = {},// assumes a single number if not a stringparts = typeof value === "string" ? value.split(" ") : [ value ];for ( ; i < 4; i++ ) {expanded[ prefix + cssExpand[ i ] + suffix ] =parts[ i ] || parts[ i - 2 ] || parts[ 0 ];}return expanded;}};if ( !rmargin.test( prefix ) ) {jQuery.cssHooks[ prefix + suffix ].set = setPositiveNumber;}});jQuery.fn.extend({css: function( name, value ) {return access( this, function( elem, name, value ) {var styles, len,map = {},i = 0;if ( jQuery.isArray( name ) ) {styles = getStyles( elem );len = name.length;for ( ; i < len; i++ ) {map[ name[ i ] ] = jQuery.css( elem, name[ i ], false, styles );}return map;}return value !== undefined ?jQuery.style( elem, name, value ) :jQuery.css( elem, name );}, name, value, arguments.length > 1 );},show: function() {return showHide( this, true );},hide: function() {return showHide( this );},toggle: function( state ) {if ( typeof state === "boolean" ) {return state ? this.show() : this.hide();}return this.each(function() {if ( isHidden( this ) ) {jQuery( this ).show();} else {jQuery( this ).hide();}});}});function Tween( elem, options, prop, end, easing ) {return new Tween.prototype.init( elem, options, prop, end, easing );}jQuery.Tween = Tween;Tween.prototype = {constructor: Tween,init: function( elem, options, prop, end, easing, unit ) {this.elem = elem;this.prop = prop;this.easing = easing || "swing";this.options = options;this.start = this.now = this.cur();this.end = end;this.unit = unit || ( jQuery.cssNumber[ prop ] ? "" : "px" );},cur: function() {var hooks = Tween.propHooks[ this.prop ];return hooks && hooks.get ?hooks.get( this ) :Tween.propHooks._default.get( this );},run: function( percent ) {var eased,hooks = Tween.propHooks[ this.prop ];if ( this.options.duration ) {this.pos = eased = jQuery.easing[ this.easing ](percent, this.options.duration * percent, 0, 1, this.options.duration);} else {this.pos = eased = percent;}this.now = ( this.end - this.start ) * eased + this.start;if ( this.options.step ) {this.options.step.call( this.elem, this.now, this );}if ( hooks && hooks.set ) {hooks.set( this );} else {Tween.propHooks._default.set( this );}return this;}};Tween.prototype.init.prototype = Tween.prototype;Tween.propHooks = {_default: {get: function( tween ) {var result;if ( tween.elem[ tween.prop ] != null &&(!tween.elem.style || tween.elem.style[ tween.prop ] == null) ) {return tween.elem[ tween.prop ];}// passing an empty string as a 3rd parameter to .css will automatically// attempt a parseFloat and fallback to a string if the parse fails// so, simple values such as "10px" are parsed to Float.// complex values such as "rotate(1rad)" are returned as is.result = jQuery.css( tween.elem, tween.prop, "" );// Empty strings, null, undefined and "auto" are converted to 0.return !result || result === "auto" ? 0 : result;},set: function( tween ) {// use step hook for back compat - use cssHook if its there - use .style if its// available and use plain properties where availableif ( jQuery.fx.step[ tween.prop ] ) {jQuery.fx.step[ tween.prop ]( tween );} else if ( tween.elem.style && ( tween.elem.style[ jQuery.cssProps[ tween.prop ] ] != null || jQuery.cssHooks[ tween.prop ] ) ) {jQuery.style( tween.elem, tween.prop, tween.now + tween.unit );} else {tween.elem[ tween.prop ] = tween.now;}}}};// Support: IE9// Panic based approach to setting things on disconnected nodesTween.propHooks.scrollTop = Tween.propHooks.scrollLeft = {set: function( tween ) {if ( tween.elem.nodeType && tween.elem.parentNode ) {tween.elem[ tween.prop ] = tween.now;}}};jQuery.easing = {linear: function( p ) {return p;},swing: function( p ) {return 0.5 - Math.cos( p * Math.PI ) / 2;}};jQuery.fx = Tween.prototype.init;// Back Compat <1.8 extension pointjQuery.fx.step = {};varfxNow, timerId,rfxtypes = /^(?:toggle|show|hide)$/,rfxnum = new RegExp( "^(?:([+-])=|)(" + pnum + ")([a-z%]*)$", "i" ),rrun = /queueHooks$/,animationPrefilters = [ defaultPrefilter ],tweeners = {"*": [ function( prop, value ) {var tween = this.createTween( prop, value ),target = tween.cur(),parts = rfxnum.exec( value ),unit = parts && parts[ 3 ] || ( jQuery.cssNumber[ prop ] ? "" : "px" ),// Starting value computation is required for potential unit mismatchesstart = ( jQuery.cssNumber[ prop ] || unit !== "px" && +target ) &&rfxnum.exec( jQuery.css( tween.elem, prop ) ),scale = 1,maxIterations = 20;if ( start && start[ 3 ] !== unit ) {// Trust units reported by jQuery.cssunit = unit || start[ 3 ];// Make sure we update the tween properties later onparts = parts || [];// Iteratively approximate from a nonzero starting pointstart = +target || 1;do {// If previous iteration zeroed out, double until we get *something*// Use a string for doubling factor so we don't accidentally see scale as unchanged belowscale = scale || ".5";// Adjust and applystart = start / scale;jQuery.style( tween.elem, prop, start + unit );// Update scale, tolerating zero or NaN from tween.cur()// And breaking the loop if scale is unchanged or perfect, or if we've just had enough} while ( scale !== (scale = tween.cur() / target) && scale !== 1 && --maxIterations );}// Update tween propertiesif ( parts ) {start = tween.start = +start || +target || 0;tween.unit = unit;// If a +=/-= token was provided, we're doing a relative animationtween.end = parts[ 1 ] ?start + ( parts[ 1 ] + 1 ) * parts[ 2 ] :+parts[ 2 ];}return tween;} ]};// Animations created synchronously will run synchronouslyfunction createFxNow() {setTimeout(function() {fxNow = undefined;});return ( fxNow = jQuery.now() );}// Generate parameters to create a standard animationfunction genFx( type, includeWidth ) {var which,i = 0,attrs = { height: type };// if we include width, step value is 1 to do all cssExpand values,// if we don't include width, step value is 2 to skip over Left and RightincludeWidth = includeWidth ? 1 : 0;for ( ; i < 4 ; i += 2 - includeWidth ) {which = cssExpand[ i ];attrs[ "margin" + which ] = attrs[ "padding" + which ] = type;}if ( includeWidth ) {attrs.opacity = attrs.width = type;}return attrs;}function createTween( value, prop, animation ) {var tween,collection = ( tweeners[ prop ] || [] ).concat( tweeners[ "*" ] ),index = 0,length = collection.length;for ( ; index < length; index++ ) {if ( (tween = collection[ index ].call( animation, prop, value )) ) {// we're done with this propertyreturn tween;}}}function defaultPrefilter( elem, props, opts ) {/* jshint validthis: true */var prop, value, toggle, tween, hooks, oldfire, display,anim = this,orig = {},style = elem.style,hidden = elem.nodeType && isHidden( elem ),dataShow = data_priv.get( elem, "fxshow" );// handle queue: false promisesif ( !opts.queue ) {hooks = jQuery._queueHooks( elem, "fx" );if ( hooks.unqueued == null ) {hooks.unqueued = 0;oldfire = hooks.empty.fire;hooks.empty.fire = function() {if ( !hooks.unqueued ) {oldfire();}};}hooks.unqueued++;anim.always(function() {// doing this makes sure that the complete handler will be called// before this completesanim.always(function() {hooks.unqueued--;if ( !jQuery.queue( elem, "fx" ).length ) {hooks.empty.fire();}});});}// height/width overflow passif ( elem.nodeType === 1 && ( "height" in props || "width" in props ) ) {// Make sure that nothing sneaks out// Record all 3 overflow attributes because IE9-10 do not// change the overflow attribute when overflowX and// overflowY are set to the same valueopts.overflow = [ style.overflow, style.overflowX, style.overflowY ];// Set display property to inline-block for height/width// animations on inline elements that are having width/height animateddisplay = jQuery.css( elem, "display" );// Get default display if display is currently "none"if ( display === "none" ) {display = defaultDisplay( elem.nodeName );}if ( display === "inline" &&jQuery.css( elem, "float" ) === "none" ) {style.display = "inline-block";}}if ( opts.overflow ) {style.overflow = "hidden";anim.always(function() {style.overflow = opts.overflow[ 0 ];style.overflowX = opts.overflow[ 1 ];style.overflowY = opts.overflow[ 2 ];});}// show/hide passfor ( prop in props ) {value = props[ prop ];if ( rfxtypes.exec( value ) ) {delete props[ prop ];toggle = toggle || value === "toggle";if ( value === ( hidden ? "hide" : "show" ) ) {// If there is dataShow left over from a stopped hide or show and we are going to proceed with show, we should pretend to be hiddenif ( value === "show" && dataShow && dataShow[ prop ] !== undefined ) {hidden = true;} else {continue;}}orig[ prop ] = dataShow && dataShow[ prop ] || jQuery.style( elem, prop );}}if ( !jQuery.isEmptyObject( orig ) ) {if ( dataShow ) {if ( "hidden" in dataShow ) {hidden = dataShow.hidden;}} else {dataShow = data_priv.access( elem, "fxshow", {} );}// store state if its toggle - enables .stop().toggle() to "reverse"if ( toggle ) {dataShow.hidden = !hidden;}if ( hidden ) {jQuery( elem ).show();} else {anim.done(function() {jQuery( elem ).hide();});}anim.done(function() {var prop;data_priv.remove( elem, "fxshow" );for ( prop in orig ) {jQuery.style( elem, prop, orig[ prop ] );}});for ( prop in orig ) {tween = createTween( hidden ? dataShow[ prop ] : 0, prop, anim );if ( !( prop in dataShow ) ) {dataShow[ prop ] = tween.start;if ( hidden ) {tween.end = tween.start;tween.start = prop === "width" || prop === "height" ? 1 : 0;}}}}}function propFilter( props, specialEasing ) {var index, name, easing, value, hooks;// camelCase, specialEasing and expand cssHook passfor ( index in props ) {name = jQuery.camelCase( index );easing = specialEasing[ name ];value = props[ index ];if ( jQuery.isArray( value ) ) {easing = value[ 1 ];value = props[ index ] = value[ 0 ];}if ( index !== name ) {props[ name ] = value;delete props[ index ];}hooks = jQuery.cssHooks[ name ];if ( hooks && "expand" in hooks ) {value = hooks.expand( value );delete props[ name ];// not quite $.extend, this wont overwrite keys already present.// also - reusing 'index' from above because we have the correct "name"for ( index in value ) {if ( !( index in props ) ) {props[ index ] = value[ index ];specialEasing[ index ] = easing;}}} else {specialEasing[ name ] = easing;}}}function Animation( elem, properties, options ) {var result,stopped,index = 0,length = animationPrefilters.length,deferred = jQuery.Deferred().always( function() {// don't match elem in the :animated selectordelete tick.elem;}),tick = function() {if ( stopped ) {return false;}var currentTime = fxNow || createFxNow(),remaining = Math.max( 0, animation.startTime + animation.duration - currentTime ),// archaic crash bug won't allow us to use 1 - ( 0.5 || 0 ) (#12497)temp = remaining / animation.duration || 0,percent = 1 - temp,index = 0,length = animation.tweens.length;for ( ; index < length ; index++ ) {animation.tweens[ index ].run( percent );}deferred.notifyWith( elem, [ animation, percent, remaining ]);if ( percent < 1 && length ) {return remaining;} else {deferred.resolveWith( elem, [ animation ] );return false;}},animation = deferred.promise({elem: elem,props: jQuery.extend( {}, properties ),opts: jQuery.extend( true, { specialEasing: {} }, options ),originalProperties: properties,originalOptions: options,startTime: fxNow || createFxNow(),duration: options.duration,tweens: [],createTween: function( prop, end ) {var tween = jQuery.Tween( elem, animation.opts, prop, end,animation.opts.specialEasing[ prop ] || animation.opts.easing );animation.tweens.push( tween );return tween;},stop: function( gotoEnd ) {var index = 0,// if we are going to the end, we want to run all the tweens// otherwise we skip this partlength = gotoEnd ? animation.tweens.length : 0;if ( stopped ) {return this;}stopped = true;for ( ; index < length ; index++ ) {animation.tweens[ index ].run( 1 );}// resolve when we played the last frame// otherwise, rejectif ( gotoEnd ) {deferred.resolveWith( elem, [ animation, gotoEnd ] );} else {deferred.rejectWith( elem, [ animation, gotoEnd ] );}return this;}}),props = animation.props;propFilter( props, animation.opts.specialEasing );for ( ; index < length ; index++ ) {result = animationPrefilters[ index ].call( animation, elem, props, animation.opts );if ( result ) {return result;}}jQuery.map( props, createTween, animation );if ( jQuery.isFunction( animation.opts.start ) ) {animation.opts.start.call( elem, animation );}jQuery.fx.timer(jQuery.extend( tick, {elem: elem,anim: animation,queue: animation.opts.queue}));// attach callbacks from optionsreturn animation.progress( animation.opts.progress ).done( animation.opts.done, animation.opts.complete ).fail( animation.opts.fail ).always( animation.opts.always );}jQuery.Animation = jQuery.extend( Animation, {tweener: function( props, callback ) {if ( jQuery.isFunction( props ) ) {callback = props;props = [ "*" ];} else {props = props.split(" ");}var prop,index = 0,length = props.length;for ( ; index < length ; index++ ) {prop = props[ index ];tweeners[ prop ] = tweeners[ prop ] || [];tweeners[ prop ].unshift( callback );}},prefilter: function( callback, prepend ) {if ( prepend ) {animationPrefilters.unshift( callback );} else {animationPrefilters.push( callback );}}});jQuery.speed = function( speed, easing, fn ) {var opt = speed && typeof speed === "object" ? jQuery.extend( {}, speed ) : {complete: fn || !fn && easing ||jQuery.isFunction( speed ) && speed,duration: speed,easing: fn && easing || easing && !jQuery.isFunction( easing ) && easing};opt.duration = jQuery.fx.off ? 0 : typeof opt.duration === "number" ? opt.duration :opt.duration in jQuery.fx.speeds ? jQuery.fx.speeds[ opt.duration ] : jQuery.fx.speeds._default;// normalize opt.queue - true/undefined/null -> "fx"if ( opt.queue == null || opt.queue === true ) {opt.queue = "fx";}// Queueingopt.old = opt.complete;opt.complete = function() {if ( jQuery.isFunction( opt.old ) ) {opt.old.call( this );}if ( opt.queue ) {jQuery.dequeue( this, opt.queue );}};return opt;};jQuery.fn.extend({fadeTo: function( speed, to, easing, callback ) {// show any hidden elements after setting opacity to 0return this.filter( isHidden ).css( "opacity", 0 ).show()// animate to the value specified.end().animate({ opacity: to }, speed, easing, callback );},animate: function( prop, speed, easing, callback ) {var empty = jQuery.isEmptyObject( prop ),optall = jQuery.speed( speed, easing, callback ),doAnimation = function() {// Operate on a copy of prop so per-property easing won't be lostvar anim = Animation( this, jQuery.extend( {}, prop ), optall );// Empty animations, or finishing resolves immediatelyif ( empty || data_priv.get( this, "finish" ) ) {anim.stop( true );}};doAnimation.finish = doAnimation;return empty || optall.queue === false ?this.each( doAnimation ) :this.queue( optall.queue, doAnimation );},stop: function( type, clearQueue, gotoEnd ) {var stopQueue = function( hooks ) {var stop = hooks.stop;delete hooks.stop;stop( gotoEnd );};if ( typeof type !== "string" ) {gotoEnd = clearQueue;clearQueue = type;type = undefined;}if ( clearQueue && type !== false ) {this.queue( type || "fx", [] );}return this.each(function() {var dequeue = true,index = type != null && type + "queueHooks",timers = jQuery.timers,data = data_priv.get( this );if ( index ) {if ( data[ index ] && data[ index ].stop ) {stopQueue( data[ index ] );}} else {for ( index in data ) {if ( data[ index ] && data[ index ].stop && rrun.test( index ) ) {stopQueue( data[ index ] );}}}for ( index = timers.length; index--; ) {if ( timers[ index ].elem === this && (type == null || timers[ index ].queue === type) ) {timers[ index ].anim.stop( gotoEnd );dequeue = false;timers.splice( index, 1 );}}// start the next in the queue if the last step wasn't forced// timers currently will call their complete callbacks, which will dequeue// but only if they were gotoEndif ( dequeue || !gotoEnd ) {jQuery.dequeue( this, type );}});},finish: function( type ) {if ( type !== false ) {type = type || "fx";}return this.each(function() {var index,data = data_priv.get( this ),queue = data[ type + "queue" ],hooks = data[ type + "queueHooks" ],timers = jQuery.timers,length = queue ? queue.length : 0;// enable finishing flag on private datadata.finish = true;// empty the queue firstjQuery.queue( this, type, [] );if ( hooks && hooks.stop ) {hooks.stop.call( this, true );}// look for any active animations, and finish themfor ( index = timers.length; index--; ) {if ( timers[ index ].elem === this && timers[ index ].queue === type ) {timers[ index ].anim.stop( true );timers.splice( index, 1 );}}// look for any animations in the old queue and finish themfor ( index = 0; index < length; index++ ) {if ( queue[ index ] && queue[ index ].finish ) {queue[ index ].finish.call( this );}}// turn off finishing flagdelete data.finish;});}});jQuery.each([ "toggle", "show", "hide" ], function( i, name ) {var cssFn = jQuery.fn[ name ];jQuery.fn[ name ] = function( speed, easing, callback ) {return speed == null || typeof speed === "boolean" ?cssFn.apply( this, arguments ) :this.animate( genFx( name, true ), speed, easing, callback );};});// Generate shortcuts for custom animationsjQuery.each({slideDown: genFx("show"),slideUp: genFx("hide"),slideToggle: genFx("toggle"),fadeIn: { opacity: "show" },fadeOut: { opacity: "hide" },fadeToggle: { opacity: "toggle" }}, function( name, props ) {jQuery.fn[ name ] = function( speed, easing, callback ) {return this.animate( props, speed, easing, callback );};});jQuery.timers = [];jQuery.fx.tick = function() {var timer,i = 0,timers = jQuery.timers;fxNow = jQuery.now();for ( ; i < timers.length; i++ ) {timer = timers[ i ];// Checks the timer has not already been removedif ( !timer() && timers[ i ] === timer ) {timers.splice( i--, 1 );}}if ( !timers.length ) {jQuery.fx.stop();}fxNow = undefined;};jQuery.fx.timer = function( timer ) {jQuery.timers.push( timer );if ( timer() ) {jQuery.fx.start();} else {jQuery.timers.pop();}};jQuery.fx.interval = 13;jQuery.fx.start = function() {if ( !timerId ) {timerId = setInterval( jQuery.fx.tick, jQuery.fx.interval );}};jQuery.fx.stop = function() {clearInterval( timerId );timerId = null;};jQuery.fx.speeds = {slow: 600,fast: 200,// Default speed_default: 400};// Based off of the plugin by Clint Helfers, with permission.// http://blindsignals.com/index.php/2009/07/jquery-delay/jQuery.fn.delay = function( time, type ) {time = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time;type = type || "fx";return this.queue( type, function( next, hooks ) {var timeout = setTimeout( next, time );hooks.stop = function() {clearTimeout( timeout );};});};(function() {var input = document.createElement( "input" ),select = document.createElement( "select" ),opt = select.appendChild( document.createElement( "option" ) );input.type = "checkbox";// Support: iOS 5.1, Android 4.x, Android 2.3// Check the default checkbox/radio value ("" on old WebKit; "on" elsewhere)support.checkOn = input.value !== "";// Must access the parent to make an option select properly// Support: IE9, IE10support.optSelected = opt.selected;// Make sure that the options inside disabled selects aren't marked as disabled// (WebKit marks them as disabled)select.disabled = true;support.optDisabled = !opt.disabled;// Check if an input maintains its value after becoming a radio// Support: IE9, IE10input = document.createElement( "input" );input.value = "t";input.type = "radio";support.radioValue = input.value === "t";})();var nodeHook, boolHook,attrHandle = jQuery.expr.attrHandle;jQuery.fn.extend({attr: function( name, value ) {return access( this, jQuery.attr, name, value, arguments.length > 1 );},removeAttr: function( name ) {return this.each(function() {jQuery.removeAttr( this, name );});}});jQuery.extend({attr: function( elem, name, value ) {var hooks, ret,nType = elem.nodeType;// don't get/set attributes on text, comment and attribute nodesif ( !elem || nType === 3 || nType === 8 || nType === 2 ) {return;}// Fallback to prop when attributes are not supportedif ( typeof elem.getAttribute === strundefined ) {return jQuery.prop( elem, name, value );}// All attributes are lowercase// Grab necessary hook if one is definedif ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) {name = name.toLowerCase();hooks = jQuery.attrHooks[ name ] ||( jQuery.expr.match.bool.test( name ) ? boolHook : nodeHook );}if ( value !== undefined ) {if ( value === null ) {jQuery.removeAttr( elem, name );} else if ( hooks && "set" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ) {return ret;} else {elem.setAttribute( name, value + "" );return value;}} else if ( hooks && "get" in hooks && (ret = hooks.get( elem, name )) !== null ) {return ret;} else {ret = jQuery.find.attr( elem, name );// Non-existent attributes return null, we normalize to undefinedreturn ret == null ?undefined :ret;}},removeAttr: function( elem, value ) {var name, propName,i = 0,attrNames = value && value.match( rnotwhite );if ( attrNames && elem.nodeType === 1 ) {while ( (name = attrNames[i++]) ) {propName = jQuery.propFix[ name ] || name;// Boolean attributes get special treatment (#10870)if ( jQuery.expr.match.bool.test( name ) ) {// Set corresponding property to falseelem[ propName ] = false;}elem.removeAttribute( name );}}},attrHooks: {type: {set: function( elem, value ) {if ( !support.radioValue && value === "radio" &&jQuery.nodeName( elem, "input" ) ) {// Setting the type on a radio button after the value resets the value in IE6-9// Reset value to default in case type is set after value during creationvar val = elem.value;elem.setAttribute( "type", value );if ( val ) {elem.value = val;}return value;}}}}});// Hooks for boolean attributesboolHook = {set: function( elem, value, name ) {if ( value === false ) {// Remove boolean attributes when set to falsejQuery.removeAttr( elem, name );} else {elem.setAttribute( name, name );}return name;}};jQuery.each( jQuery.expr.match.bool.source.match( /\w+/g ), function( i, name ) {var getter = attrHandle[ name ] || jQuery.find.attr;attrHandle[ name ] = function( elem, name, isXML ) {var ret, handle;if ( !isXML ) {// Avoid an infinite loop by temporarily removing this function from the getterhandle = attrHandle[ name ];attrHandle[ name ] = ret;ret = getter( elem, name, isXML ) != null ?name.toLowerCase() :null;attrHandle[ name ] = handle;}return ret;};});var rfocusable = /^(?:input|select|textarea|button)$/i;jQuery.fn.extend({prop: function( name, value ) {return access( this, jQuery.prop, name, value, arguments.length > 1 );},removeProp: function( name ) {return this.each(function() {delete this[ jQuery.propFix[ name ] || name ];});}});jQuery.extend({propFix: {"for": "htmlFor","class": "className"},prop: function( elem, name, value ) {var ret, hooks, notxml,nType = elem.nodeType;// don't get/set properties on text, comment and attribute nodesif ( !elem || nType === 3 || nType === 8 || nType === 2 ) {return;}notxml = nType !== 1 || !jQuery.isXMLDoc( elem );if ( notxml ) {// Fix name and attach hooksname = jQuery.propFix[ name ] || name;hooks = jQuery.propHooks[ name ];}if ( value !== undefined ) {return hooks && "set" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ?ret :( elem[ name ] = value );} else {return hooks && "get" in hooks && (ret = hooks.get( elem, name )) !== null ?ret :elem[ name ];}},propHooks: {tabIndex: {get: function( elem ) {return elem.hasAttribute( "tabindex" ) || rfocusable.test( elem.nodeName ) || elem.href ?elem.tabIndex :-1;}}}});// Support: IE9+// Selectedness for an option in an optgroup can be inaccurateif ( !support.optSelected ) {jQuery.propHooks.selected = {get: function( elem ) {var parent = elem.parentNode;if ( parent && parent.parentNode ) {parent.parentNode.selectedIndex;}return null;}};}jQuery.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"], function() {jQuery.propFix[ this.toLowerCase() ] = this;});var rclass = /[\t\r\n\f]/g;jQuery.fn.extend({addClass: function( value ) {var classes, elem, cur, clazz, j, finalValue,proceed = typeof value === "string" && value,i = 0,len = this.length;if ( jQuery.isFunction( value ) ) {return this.each(function( j ) {jQuery( this ).addClass( value.call( this, j, this.className ) );});}if ( proceed ) {// The disjunction here is for better compressibility (see removeClass)classes = ( value || "" ).match( rnotwhite ) || [];for ( ; i < len; i++ ) {elem = this[ i ];cur = elem.nodeType === 1 && ( elem.className ?( " " + elem.className + " " ).replace( rclass, " " ) :" ");if ( cur ) {j = 0;while ( (clazz = classes[j++]) ) {if ( cur.indexOf( " " + clazz + " " ) < 0 ) {cur += clazz + " ";}}// only assign if different to avoid unneeded rendering.finalValue = jQuery.trim( cur );if ( elem.className !== finalValue ) {elem.className = finalValue;}}}}return this;},removeClass: function( value ) {var classes, elem, cur, clazz, j, finalValue,proceed = arguments.length === 0 || typeof value === "string" && value,i = 0,len = this.length;if ( jQuery.isFunction( value ) ) {return this.each(function( j ) {jQuery( this ).removeClass( value.call( this, j, this.className ) );});}if ( proceed ) {classes = ( value || "" ).match( rnotwhite ) || [];for ( ; i < len; i++ ) {elem = this[ i ];// This expression is here for better compressibility (see addClass)cur = elem.nodeType === 1 && ( elem.className ?( " " + elem.className + " " ).replace( rclass, " " ) :"");if ( cur ) {j = 0;while ( (clazz = classes[j++]) ) {// Remove *all* instanceswhile ( cur.indexOf( " " + clazz + " " ) >= 0 ) {cur = cur.replace( " " + clazz + " ", " " );}}// only assign if different to avoid unneeded rendering.finalValue = value ? jQuery.trim( cur ) : "";if ( elem.className !== finalValue ) {elem.className = finalValue;}}}}return this;},toggleClass: function( value, stateVal ) {var type = typeof value;if ( typeof stateVal === "boolean" && type === "string" ) {return stateVal ? this.addClass( value ) : this.removeClass( value );}if ( jQuery.isFunction( value ) ) {return this.each(function( i ) {jQuery( this ).toggleClass( value.call(this, i, this.className, stateVal), stateVal );});}return this.each(function() {if ( type === "string" ) {// toggle individual class namesvar className,i = 0,self = jQuery( this ),classNames = value.match( rnotwhite ) || [];while ( (className = classNames[ i++ ]) ) {// check each className given, space separated listif ( self.hasClass( className ) ) {self.removeClass( className );} else {self.addClass( className );}}// Toggle whole class name} else if ( type === strundefined || type === "boolean" ) {if ( this.className ) {// store className if setdata_priv.set( this, "__className__", this.className );}// If the element has a class name or if we're passed "false",// then remove the whole classname (if there was one, the above saved it).// Otherwise bring back whatever was previously saved (if anything),// falling back to the empty string if nothing was stored.this.className = this.className || value === false ? "" : data_priv.get( this, "__className__" ) || "";}});},hasClass: function( selector ) {var className = " " + selector + " ",i = 0,l = this.length;for ( ; i < l; i++ ) {if ( this[i].nodeType === 1 && (" " + this[i].className + " ").replace(rclass, " ").indexOf( className ) >= 0 ) {return true;}}return false;}});var rreturn = /\r/g;jQuery.fn.extend({val: function( value ) {var hooks, ret, isFunction,elem = this[0];if ( !arguments.length ) {if ( elem ) {hooks = jQuery.valHooks[ elem.type ] || jQuery.valHooks[ elem.nodeName.toLowerCase() ];if ( hooks && "get" in hooks && (ret = hooks.get( elem, "value" )) !== undefined ) {return ret;}ret = elem.value;return typeof ret === "string" ?// handle most common string casesret.replace(rreturn, "") :// handle cases where value is null/undef or numberret == null ? "" : ret;}return;}isFunction = jQuery.isFunction( value );return this.each(function( i ) {var val;if ( this.nodeType !== 1 ) {return;}if ( isFunction ) {val = value.call( this, i, jQuery( this ).val() );} else {val = value;}// Treat null/undefined as ""; convert numbers to stringif ( val == null ) {val = "";} else if ( typeof val === "number" ) {val += "";} else if ( jQuery.isArray( val ) ) {val = jQuery.map( val, function( value ) {return value == null ? "" : value + "";});}hooks = jQuery.valHooks[ this.type ] || jQuery.valHooks[ this.nodeName.toLowerCase() ];// If set returns undefined, fall back to normal settingif ( !hooks || !("set" in hooks) || hooks.set( this, val, "value" ) === undefined ) {this.value = val;}});}});jQuery.extend({valHooks: {select: {get: function( elem ) {var value, option,options = elem.options,index = elem.selectedIndex,one = elem.type === "select-one" || index < 0,values = one ? null : [],max = one ? index + 1 : options.length,i = index < 0 ?max :one ? index : 0;// Loop through all the selected optionsfor ( ; i < max; i++ ) {option = options[ i ];// IE6-9 doesn't update selected after form reset (#2551)if ( ( option.selected || i === index ) &&// Don't return options that are disabled or in a disabled optgroup( support.optDisabled ? !option.disabled : option.getAttribute( "disabled" ) === null ) &&( !option.parentNode.disabled || !jQuery.nodeName( option.parentNode, "optgroup" ) ) ) {// Get the specific value for the optionvalue = jQuery( option ).val();// We don't need an array for one selectsif ( one ) {return value;}// Multi-Selects return an arrayvalues.push( value );}}return values;},set: function( elem, value ) {var optionSet, option,options = elem.options,values = jQuery.makeArray( value ),i = options.length;while ( i-- ) {option = options[ i ];if ( (option.selected = jQuery.inArray( jQuery(option).val(), values ) >= 0) ) {optionSet = true;}}// force browsers to behave consistently when non-matching value is setif ( !optionSet ) {elem.selectedIndex = -1;}return values;}}}});// Radios and checkboxes getter/setterjQuery.each([ "radio", "checkbox" ], function() {jQuery.valHooks[ this ] = {set: function( elem, value ) {if ( jQuery.isArray( value ) ) {return ( elem.checked = jQuery.inArray( jQuery(elem).val(), value ) >= 0 );}}};if ( !support.checkOn ) {jQuery.valHooks[ this ].get = function( elem ) {// Support: Webkit// "" is returned instead of "on" if a value isn't specifiedreturn elem.getAttribute("value") === null ? "on" : elem.value;};}});// Return jQuery for attributes-only inclusionjQuery.each( ("blur focus focusin focusout load resize scroll unload click dblclick " +"mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " +"change select submit keydown keypress keyup error contextmenu").split(" "), function( i, name ) {// Handle event bindingjQuery.fn[ name ] = function( data, fn ) {return arguments.length > 0 ?this.on( name, null, data, fn ) :this.trigger( name );};});jQuery.fn.extend({hover: function( fnOver, fnOut ) {return this.mouseenter( fnOver ).mouseleave( fnOut || fnOver );},bind: function( types, data, fn ) {return this.on( types, null, data, fn );},unbind: function( types, fn ) {return this.off( types, null, fn );},delegate: function( selector, types, data, fn ) {return this.on( types, selector, data, fn );},undelegate: function( selector, types, fn ) {// ( namespace ) or ( selector, types [, fn] )return arguments.length === 1 ? this.off( selector, "**" ) : this.off( types, selector || "**", fn );}});var nonce = jQuery.now();var rquery = (/\?/);// Support: Android 2.3// Workaround failure to string-cast null inputjQuery.parseJSON = function( data ) {return JSON.parse( data + "" );};// Cross-browser xml parsingjQuery.parseXML = function( data ) {var xml, tmp;if ( !data || typeof data !== "string" ) {return null;}// Support: IE9try {tmp = new DOMParser();xml = tmp.parseFromString( data, "text/xml" );} catch ( e ) {xml = undefined;}if ( !xml || xml.getElementsByTagName( "parsererror" ).length ) {jQuery.error( "Invalid XML: " + data );}return xml;};var// Document locationajaxLocParts,ajaxLocation,rhash = /#.*$/,rts = /([?&])_=[^&]*/,rheaders = /^(.*?):[ \t]*([^\r\n]*)$/mg,// #7653, #8125, #8152: local protocol detectionrlocalProtocol = /^(?:about|app|app-storage|.+-extension|file|res|widget):$/,rnoContent = /^(?:GET|HEAD)$/,rprotocol = /^\/\//,rurl = /^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,/* Prefilters * 1) They are useful to introduce custom dataTypes (see ajax/jsonp.js for an example) * 2) These are called: * - BEFORE asking for a transport * - AFTER param serialization (s.data is a string if s.processData is true) * 3) key is the dataType * 4) the catchall symbol "*" can be used * 5) execution will start with transport dataType and THEN continue down to "*" if needed */prefilters = {},/* Transports bindings * 1) key is the dataType * 2) the catchall symbol "*" can be used * 3) selection will start with transport dataType and THEN go to "*" if needed */transports = {},// Avoid comment-prolog char sequence (#10098); must appease lint and evade compressionallTypes = "*/".concat("*");// #8138, IE may throw an exception when accessing// a field from window.location if document.domain has been settry {ajaxLocation = location.href;} catch( e ) {// Use the href attribute of an A element// since IE will modify it given document.locationajaxLocation = document.createElement( "a" );ajaxLocation.href = "";ajaxLocation = ajaxLocation.href;}// Segment location into partsajaxLocParts = rurl.exec( ajaxLocation.toLowerCase() ) || [];// Base "constructor" for jQuery.ajaxPrefilter and jQuery.ajaxTransportfunction addToPrefiltersOrTransports( structure ) {// dataTypeExpression is optional and defaults to "*"return function( dataTypeExpression, func ) {if ( typeof dataTypeExpression !== "string" ) {func = dataTypeExpression;dataTypeExpression = "*";}var dataType,i = 0,dataTypes = dataTypeExpression.toLowerCase().match( rnotwhite ) || [];if ( jQuery.isFunction( func ) ) {// For each dataType in the dataTypeExpressionwhile ( (dataType = dataTypes[i++]) ) {// Prepend if requestedif ( dataType[0] === "+" ) {dataType = dataType.slice( 1 ) || "*";(structure[ dataType ] = structure[ dataType ] || []).unshift( func );// Otherwise append} else {(structure[ dataType ] = structure[ dataType ] || []).push( func );}}}};}// Base inspection function for prefilters and transportsfunction inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {var inspected = {},seekingTransport = ( structure === transports );function inspect( dataType ) {var selected;inspected[ dataType ] = true;jQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {var dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );if ( typeof dataTypeOrTransport === "string" && !seekingTransport && !inspected[ dataTypeOrTransport ] ) {options.dataTypes.unshift( dataTypeOrTransport );inspect( dataTypeOrTransport );return false;} else if ( seekingTransport ) {return !( selected = dataTypeOrTransport );}});return selected;}return inspect( options.dataTypes[ 0 ] ) || !inspected[ "*" ] && inspect( "*" );}// A special extend for ajax options// that takes "flat" options (not to be deep extended)// Fixes #9887function ajaxExtend( target, src ) {var key, deep,flatOptions = jQuery.ajaxSettings.flatOptions || {};for ( key in src ) {if ( src[ key ] !== undefined ) {( flatOptions[ key ] ? target : ( deep || (deep = {}) ) )[ key ] = src[ key ];}}if ( deep ) {jQuery.extend( true, target, deep );}return target;}/* Handles responses to an ajax request: * - finds the right dataType (mediates between content-type and expected dataType) * - returns the corresponding response */function ajaxHandleResponses( s, jqXHR, responses ) {var ct, type, finalDataType, firstDataType,contents = s.contents,dataTypes = s.dataTypes;// Remove auto dataType and get content-type in the processwhile ( dataTypes[ 0 ] === "*" ) {dataTypes.shift();if ( ct === undefined ) {ct = s.mimeType || jqXHR.getResponseHeader("Content-Type");}}// Check if we're dealing with a known content-typeif ( ct ) {for ( type in contents ) {if ( contents[ type ] && contents[ type ].test( ct ) ) {dataTypes.unshift( type );break;}}}// Check to see if we have a response for the expected dataTypeif ( dataTypes[ 0 ] in responses ) {finalDataType = dataTypes[ 0 ];} else {// Try convertible dataTypesfor ( type in responses ) {if ( !dataTypes[ 0 ] || s.converters[ type + " " + dataTypes[0] ] ) {finalDataType = type;break;}if ( !firstDataType ) {firstDataType = type;}}// Or just use first onefinalDataType = finalDataType || firstDataType;}// If we found a dataType// We add the dataType to the list if needed// and return the corresponding responseif ( finalDataType ) {if ( finalDataType !== dataTypes[ 0 ] ) {dataTypes.unshift( finalDataType );}return responses[ finalDataType ];}}/* Chain conversions given the request and the original response * Also sets the responseXXX fields on the jqXHR instance */function ajaxConvert( s, response, jqXHR, isSuccess ) {var conv2, current, conv, tmp, prev,converters = {},// Work with a copy of dataTypes in case we need to modify it for conversiondataTypes = s.dataTypes.slice();// Create converters map with lowercased keysif ( dataTypes[ 1 ] ) {for ( conv in s.converters ) {converters[ conv.toLowerCase() ] = s.converters[ conv ];}}current = dataTypes.shift();// Convert to each sequential dataTypewhile ( current ) {if ( s.responseFields[ current ] ) {jqXHR[ s.responseFields[ current ] ] = response;}// Apply the dataFilter if providedif ( !prev && isSuccess && s.dataFilter ) {response = s.dataFilter( response, s.dataType );}prev = current;current = dataTypes.shift();if ( current ) {// There's only work to do if current dataType is non-autoif ( current === "*" ) {current = prev;// Convert response if prev dataType is non-auto and differs from current} else if ( prev !== "*" && prev !== current ) {// Seek a direct converterconv = converters[ prev + " " + current ] || converters[ "* " + current ];// If none found, seek a pairif ( !conv ) {for ( conv2 in converters ) {// If conv2 outputs currenttmp = conv2.split( " " );if ( tmp[ 1 ] === current ) {// If prev can be converted to accepted inputconv = converters[ prev + " " + tmp[ 0 ] ] ||converters[ "* " + tmp[ 0 ] ];if ( conv ) {// Condense equivalence convertersif ( conv === true ) {conv = converters[ conv2 ];// Otherwise, insert the intermediate dataType} else if ( converters[ conv2 ] !== true ) {current = tmp[ 0 ];dataTypes.unshift( tmp[ 1 ] );}break;}}}}// Apply converter (if not an equivalence)if ( conv !== true ) {// Unless errors are allowed to bubble, catch and return themif ( conv && s[ "throws" ] ) {response = conv( response );} else {try {response = conv( response );} catch ( e ) {return { state: "parsererror", error: conv ? e : "No conversion from " + prev + " to " + current };}}}}}}return { state: "success", data: response };}jQuery.extend({// Counter for holding the number of active queriesactive: 0,// Last-Modified header cache for next requestlastModified: {},etag: {},ajaxSettings: {url: ajaxLocation,type: "GET",isLocal: rlocalProtocol.test( ajaxLocParts[ 1 ] ),global: true,processData: true,async: true,contentType: "application/x-www-form-urlencoded; charset=UTF-8",/*timeout: 0,data: null,dataType: null,username: null,password: null,cache: null,throws: false,traditional: false,headers: {},*/accepts: {"*": allTypes,text: "text/plain",html: "text/html",xml: "application/xml, text/xml",json: "application/json, text/javascript"},contents: {xml: /xml/,html: /html/,json: /json/},responseFields: {xml: "responseXML",text: "responseText",json: "responseJSON"},// Data converters// Keys separate source (or catchall "*") and destination types with a single spaceconverters: {// Convert anything to text"* text": String,// Text to html (true = no transformation)"text html": true,// Evaluate text as a json expression"text json": jQuery.parseJSON,// Parse text as xml"text xml": jQuery.parseXML},// For options that shouldn't be deep extended:// you can add your own custom options here if// and when you create one that shouldn't be// deep extended (see ajaxExtend)flatOptions: {url: true,context: true}},// Creates a full fledged settings object into target// with both ajaxSettings and settings fields.// If target is omitted, writes into ajaxSettings.ajaxSetup: function( target, settings ) {return settings ?// Building a settings objectajaxExtend( ajaxExtend( target, jQuery.ajaxSettings ), settings ) :// Extending ajaxSettingsajaxExtend( jQuery.ajaxSettings, target );},ajaxPrefilter: addToPrefiltersOrTransports( prefilters ),ajaxTransport: addToPrefiltersOrTransports( transports ),// Main methodajax: function( url, options ) {// If url is an object, simulate pre-1.5 signatureif ( typeof url === "object" ) {options = url;url = undefined;}// Force options to be an objectoptions = options || {};var transport,// URL without anti-cache paramcacheURL,// Response headersresponseHeadersString,responseHeaders,// timeout handletimeoutTimer,// Cross-domain detection varsparts,// To know if global events are to be dispatchedfireGlobals,// Loop variablei,// Create the final options objects = jQuery.ajaxSetup( {}, options ),// Callbacks contextcallbackContext = s.context || s,// Context for global events is callbackContext if it is a DOM node or jQuery collectionglobalEventContext = s.context && ( callbackContext.nodeType || callbackContext.jquery ) ?jQuery( callbackContext ) :jQuery.event,// Deferredsdeferred = jQuery.Deferred(),completeDeferred = jQuery.Callbacks("once memory"),// Status-dependent callbacksstatusCode = s.statusCode || {},// Headers (they are sent all at once)requestHeaders = {},requestHeadersNames = {},// The jqXHR statestate = 0,// Default abort messagestrAbort = "canceled",// Fake xhrjqXHR = {readyState: 0,// Builds headers hashtable if neededgetResponseHeader: function( key ) {var match;if ( state === 2 ) {if ( !responseHeaders ) {responseHeaders = {};while ( (match = rheaders.exec( responseHeadersString )) ) {responseHeaders[ match[1].toLowerCase() ] = match[ 2 ];}}match = responseHeaders[ key.toLowerCase() ];}return match == null ? null : match;},// Raw stringgetAllResponseHeaders: function() {return state === 2 ? responseHeadersString : null;},// Caches the headersetRequestHeader: function( name, value ) {var lname = name.toLowerCase();if ( !state ) {name = requestHeadersNames[ lname ] = requestHeadersNames[ lname ] || name;requestHeaders[ name ] = value;}return this;},// Overrides response content-type headeroverrideMimeType: function( type ) {if ( !state ) {s.mimeType = type;}return this;},// Status-dependent callbacksstatusCode: function( map ) {var code;if ( map ) {if ( state < 2 ) {for ( code in map ) {// Lazy-add the new callback in a way that preserves old onesstatusCode[ code ] = [ statusCode[ code ], map[ code ] ];}} else {// Execute the appropriate callbacksjqXHR.always( map[ jqXHR.status ] );}}return this;},// Cancel the requestabort: function( statusText ) {var finalText = statusText || strAbort;if ( transport ) {transport.abort( finalText );}done( 0, finalText );return this;}};// Attach deferredsdeferred.promise( jqXHR ).complete = completeDeferred.add;jqXHR.success = jqXHR.done;jqXHR.error = jqXHR.fail;// Remove hash character (#7531: and string promotion)// Add protocol if not provided (prefilters might expect it)// Handle falsy url in the settings object (#10093: consistency with old signature)// We also use the url parameter if availables.url = ( ( url || s.url || ajaxLocation ) + "" ).replace( rhash, "" ).replace( rprotocol, ajaxLocParts[ 1 ] + "//" );// Alias method option to type as per ticket #12004s.type = options.method || options.type || s.method || s.type;// Extract dataTypes lists.dataTypes = jQuery.trim( s.dataType || "*" ).toLowerCase().match( rnotwhite ) || [ "" ];// A cross-domain request is in order when we have a protocol:host:port mismatchif ( s.crossDomain == null ) {parts = rurl.exec( s.url.toLowerCase() );s.crossDomain = !!( parts &&( parts[ 1 ] !== ajaxLocParts[ 1 ] || parts[ 2 ] !== ajaxLocParts[ 2 ] ||( parts[ 3 ] || ( parts[ 1 ] === "http:" ? "80" : "443" ) ) !==( ajaxLocParts[ 3 ] || ( ajaxLocParts[ 1 ] === "http:" ? "80" : "443" ) ) ));}// Convert data if not already a stringif ( s.data && s.processData && typeof s.data !== "string" ) {s.data = jQuery.param( s.data, s.traditional );}// Apply prefiltersinspectPrefiltersOrTransports( prefilters, s, options, jqXHR );// If request was aborted inside a prefilter, stop thereif ( state === 2 ) {return jqXHR;}// We can fire global events as of now if asked tofireGlobals = s.global;// Watch for a new set of requestsif ( fireGlobals && jQuery.active++ === 0 ) {jQuery.event.trigger("ajaxStart");}// Uppercase the types.type = s.type.toUpperCase();// Determine if request has contents.hasContent = !rnoContent.test( s.type );// Save the URL in case we're toying with the If-Modified-Since// and/or If-None-Match header later oncacheURL = s.url;// More options handling for requests with no contentif ( !s.hasContent ) {// If data is available, append data to urlif ( s.data ) {cacheURL = ( s.url += ( rquery.test( cacheURL ) ? "&" : "?" ) + s.data );// #9682: remove data so that it's not used in an eventual retrydelete s.data;}// Add anti-cache in url if neededif ( s.cache === false ) {s.url = rts.test( cacheURL ) ?// If there is already a '_' parameter, set its valuecacheURL.replace( rts, "$1_=" + nonce++ ) :// Otherwise add one to the endcacheURL + ( rquery.test( cacheURL ) ? "&" : "?" ) + "_=" + nonce++;}}// Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.if ( s.ifModified ) {if ( jQuery.lastModified[ cacheURL ] ) {jqXHR.setRequestHeader( "If-Modified-Since", jQuery.lastModified[ cacheURL ] );}if ( jQuery.etag[ cacheURL ] ) {jqXHR.setRequestHeader( "If-None-Match", jQuery.etag[ cacheURL ] );}}// Set the correct header, if data is being sentif ( s.data && s.hasContent && s.contentType !== false || options.contentType ) {jqXHR.setRequestHeader( "Content-Type", s.contentType );}// Set the Accepts header for the server, depending on the dataTypejqXHR.setRequestHeader("Accept",s.dataTypes[ 0 ] && s.accepts[ s.dataTypes[0] ] ?s.accepts[ s.dataTypes[0] ] + ( s.dataTypes[ 0 ] !== "*" ? ", " + allTypes + "; q=0.01" : "" ) :s.accepts[ "*" ]);// Check for headers optionfor ( i in s.headers ) {jqXHR.setRequestHeader( i, s.headers[ i ] );}// Allow custom headers/mimetypes and early abortif ( s.beforeSend && ( s.beforeSend.call( callbackContext, jqXHR, s ) === false || state === 2 ) ) {// Abort if not done already and returnreturn jqXHR.abort();}// aborting is no longer a cancellationstrAbort = "abort";// Install callbacks on deferredsfor ( i in { success: 1, error: 1, complete: 1 } ) {jqXHR[ i ]( s[ i ] );}// Get transporttransport = inspectPrefiltersOrTransports( transports, s, options, jqXHR );// If no transport, we auto-abortif ( !transport ) {done( -1, "No Transport" );} else {jqXHR.readyState = 1;// Send global eventif ( fireGlobals ) {globalEventContext.trigger( "ajaxSend", [ jqXHR, s ] );}// Timeoutif ( s.async && s.timeout > 0 ) {timeoutTimer = setTimeout(function() {jqXHR.abort("timeout");}, s.timeout );}try {state = 1;transport.send( requestHeaders, done );} catch ( e ) {// Propagate exception as error if not doneif ( state < 2 ) {done( -1, e );// Simply rethrow otherwise} else {throw e;}}}// Callback for when everything is donefunction done( status, nativeStatusText, responses, headers ) {var isSuccess, success, error, response, modified,statusText = nativeStatusText;// Called onceif ( state === 2 ) {return;}// State is "done" nowstate = 2;// Clear timeout if it existsif ( timeoutTimer ) {clearTimeout( timeoutTimer );}// Dereference transport for early garbage collection// (no matter how long the jqXHR object will be used)transport = undefined;// Cache response headersresponseHeadersString = headers || "";// Set readyStatejqXHR.readyState = status > 0 ? 4 : 0;// Determine if successfulisSuccess = status >= 200 && status < 300 || status === 304;// Get response dataif ( responses ) {response = ajaxHandleResponses( s, jqXHR, responses );}// Convert no matter what (that way responseXXX fields are always set)response = ajaxConvert( s, response, jqXHR, isSuccess );// If successful, handle type chainingif ( isSuccess ) {// Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.if ( s.ifModified ) {modified = jqXHR.getResponseHeader("Last-Modified");if ( modified ) {jQuery.lastModified[ cacheURL ] = modified;}modified = jqXHR.getResponseHeader("etag");if ( modified ) {jQuery.etag[ cacheURL ] = modified;}}// if no contentif ( status === 204 || s.type === "HEAD" ) {statusText = "nocontent";// if not modified} else if ( status === 304 ) {statusText = "notmodified";// If we have data, let's convert it} else {statusText = response.state;success = response.data;error = response.error;isSuccess = !error;}} else {// We extract error from statusText// then normalize statusText and status for non-abortserror = statusText;if ( status || !statusText ) {statusText = "error";if ( status < 0 ) {status = 0;}}}// Set data for the fake xhr objectjqXHR.status = status;jqXHR.statusText = ( nativeStatusText || statusText ) + "";// Success/Errorif ( isSuccess ) {deferred.resolveWith( callbackContext, [ success, statusText, jqXHR ] );} else {deferred.rejectWith( callbackContext, [ jqXHR, statusText, error ] );}// Status-dependent callbacksjqXHR.statusCode( statusCode );statusCode = undefined;if ( fireGlobals ) {globalEventContext.trigger( isSuccess ? "ajaxSuccess" : "ajaxError",[ jqXHR, s, isSuccess ? success : error ] );}// CompletecompleteDeferred.fireWith( callbackContext, [ jqXHR, statusText ] );if ( fireGlobals ) {globalEventContext.trigger( "ajaxComplete", [ jqXHR, s ] );// Handle the global AJAX counterif ( !( --jQuery.active ) ) {jQuery.event.trigger("ajaxStop");}}}return jqXHR;},getJSON: function( url, data, callback ) {return jQuery.get( url, data, callback, "json" );},getScript: function( url, callback ) {return jQuery.get( url, undefined, callback, "script" );}});jQuery.each( [ "get", "post" ], function( i, method ) {jQuery[ method ] = function( url, data, callback, type ) {// shift arguments if data argument was omittedif ( jQuery.isFunction( data ) ) {type = type || callback;callback = data;data = undefined;}return jQuery.ajax({url: url,type: method,dataType: type,data: data,success: callback});};});// Attach a bunch of functions for handling common AJAX eventsjQuery.each( [ "ajaxStart", "ajaxStop", "ajaxComplete", "ajaxError", "ajaxSuccess", "ajaxSend" ], function( i, type ) {jQuery.fn[ type ] = function( fn ) {return this.on( type, fn );};});jQuery._evalUrl = function( url ) {return jQuery.ajax({url: url,type: "GET",dataType: "script",async: false,global: false,"throws": true});};jQuery.fn.extend({wrapAll: function( html ) {var wrap;if ( jQuery.isFunction( html ) ) {return this.each(function( i ) {jQuery( this ).wrapAll( html.call(this, i) );});}if ( this[ 0 ] ) {// The elements to wrap the target aroundwrap = jQuery( html, this[ 0 ].ownerDocument ).eq( 0 ).clone( true );if ( this[ 0 ].parentNode ) {wrap.insertBefore( this[ 0 ] );}wrap.map(function() {var elem = this;while ( elem.firstElementChild ) {elem = elem.firstElementChild;}return elem;}).append( this );}return this;},wrapInner: function( html ) {if ( jQuery.isFunction( html ) ) {return this.each(function( i ) {jQuery( this ).wrapInner( html.call(this, i) );});}return this.each(function() {var self = jQuery( this ),contents = self.contents();if ( contents.length ) {contents.wrapAll( html );} else {self.append( html );}});},wrap: function( html ) {var isFunction = jQuery.isFunction( html );return this.each(function( i ) {jQuery( this ).wrapAll( isFunction ? html.call(this, i) : html );});},unwrap: function() {return this.parent().each(function() {if ( !jQuery.nodeName( this, "body" ) ) {jQuery( this ).replaceWith( this.childNodes );}}).end();}});jQuery.expr.filters.hidden = function( elem ) {// Support: Opera <= 12.12// Opera reports offsetWidths and offsetHeights less than zero on some elementsreturn elem.offsetWidth <= 0 && elem.offsetHeight <= 0;};jQuery.expr.filters.visible = function( elem ) {return !jQuery.expr.filters.hidden( elem );};var r20 = /%20/g,rbracket = /\[\]$/,rCRLF = /\r?\n/g,rsubmitterTypes = /^(?:submit|button|image|reset|file)$/i,rsubmittable = /^(?:input|select|textarea|keygen)/i;function buildParams( prefix, obj, traditional, add ) {var name;if ( jQuery.isArray( obj ) ) {// Serialize array item.jQuery.each( obj, function( i, v ) {if ( traditional || rbracket.test( prefix ) ) {// Treat each array item as a scalar.add( prefix, v );} else {// Item is non-scalar (array or object), encode its numeric index.buildParams( prefix + "[" + ( typeof v === "object" ? i : "" ) + "]", v, traditional, add );}});} else if ( !traditional && jQuery.type( obj ) === "object" ) {// Serialize object item.for ( name in obj ) {buildParams( prefix + "[" + name + "]", obj[ name ], traditional, add );}} else {// Serialize scalar item.add( prefix, obj );}}// Serialize an array of form elements or a set of// key/values into a query stringjQuery.param = function( a, traditional ) {var prefix,s = [],add = function( key, value ) {// If value is a function, invoke it and return its valuevalue = jQuery.isFunction( value ) ? value() : ( value == null ? "" : value );s[ s.length ] = encodeURIComponent( key ) + "=" + encodeURIComponent( value );};// Set traditional to true for jQuery <= 1.3.2 behavior.if ( traditional === undefined ) {traditional = jQuery.ajaxSettings && jQuery.ajaxSettings.traditional;}// If an array was passed in, assume that it is an array of form elements.if ( jQuery.isArray( a ) || ( a.jquery && !jQuery.isPlainObject( a ) ) ) {// Serialize the form elementsjQuery.each( a, function() {add( this.name, this.value );});} else {// If traditional, encode the "old" way (the way 1.3.2 or older// did it), otherwise encode params recursively.for ( prefix in a ) {buildParams( prefix, a[ prefix ], traditional, add );}}// Return the resulting serializationreturn s.join( "&" ).replace( r20, "+" );};jQuery.fn.extend({serialize: function() {return jQuery.param( this.serializeArray() );},serializeArray: function() {return this.map(function() {// Can add propHook for "elements" to filter or add form elementsvar elements = jQuery.prop( this, "elements" );return elements ? jQuery.makeArray( elements ) : this;}).filter(function() {var type = this.type;// Use .is( ":disabled" ) so that fieldset[disabled] worksreturn this.name && !jQuery( this ).is( ":disabled" ) &&rsubmittable.test( this.nodeName ) && !rsubmitterTypes.test( type ) &&( this.checked || !rcheckableType.test( type ) );}).map(function( i, elem ) {var val = jQuery( this ).val();return val == null ?null :jQuery.isArray( val ) ?jQuery.map( val, function( val ) {return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) };}) :{ name: elem.name, value: val.replace( rCRLF, "\r\n" ) };}).get();}});jQuery.ajaxSettings.xhr = function() {try {return new XMLHttpRequest();} catch( e ) {}};var xhrId = 0,xhrCallbacks = {},xhrSuccessStatus = {// file protocol always yields status code 0, assume 2000: 200,// Support: IE9// #1450: sometimes IE returns 1223 when it should be 2041223: 204},xhrSupported = jQuery.ajaxSettings.xhr();// Support: IE9// Open requests must be manually aborted on unload (#5280)if ( window.ActiveXObject ) {jQuery( window ).on( "unload", function() {for ( var key in xhrCallbacks ) {xhrCallbacks[ key ]();}});}support.cors = !!xhrSupported && ( "withCredentials" in xhrSupported );support.ajax = xhrSupported = !!xhrSupported;jQuery.ajaxTransport(function( options ) {var callback;// Cross domain only allowed if supported through XMLHttpRequestif ( support.cors || xhrSupported && !options.crossDomain ) {return {send: function( headers, complete ) {var i,xhr = options.xhr(),id = ++xhrId;xhr.open( options.type, options.url, options.async, options.username, options.password );// Apply custom fields if providedif ( options.xhrFields ) {for ( i in options.xhrFields ) {xhr[ i ] = options.xhrFields[ i ];}}// Override mime type if neededif ( options.mimeType && xhr.overrideMimeType ) {xhr.overrideMimeType( options.mimeType );}// X-Requested-With header// For cross-domain requests, seeing as conditions for a preflight are// akin to a jigsaw puzzle, we simply never set it to be sure.// (it can always be set on a per-request basis or even using ajaxSetup)// For same-domain requests, won't change header if already provided.if ( !options.crossDomain && !headers["X-Requested-With"] ) {headers["X-Requested-With"] = "XMLHttpRequest";}// Set headersfor ( i in headers ) {xhr.setRequestHeader( i, headers[ i ] );}// Callbackcallback = function( type ) {return function() {if ( callback ) {delete xhrCallbacks[ id ];callback = xhr.onload = xhr.onerror = null;if ( type === "abort" ) {xhr.abort();} else if ( type === "error" ) {complete(// file: protocol always yields status 0; see #8605, #14207xhr.status,xhr.statusText);} else {complete(xhrSuccessStatus[ xhr.status ] || xhr.status,xhr.statusText,// Support: IE9// Accessing binary-data responseText throws an exception// (#11426)typeof xhr.responseText === "string" ? {text: xhr.responseText} : undefined,xhr.getAllResponseHeaders());}}};};// Listen to eventsxhr.onload = callback();xhr.onerror = callback("error");// Create the abort callbackcallback = xhrCallbacks[ id ] = callback("abort");// Do send the request// This may raise an exception which is actually// handled in jQuery.ajax (so no try/catch here)xhr.send( options.hasContent && options.data || null );},abort: function() {if ( callback ) {callback();}}};}});// Install script dataTypejQuery.ajaxSetup({accepts: {script: "text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents: {script: /(?:java|ecma)script/},converters: {"text script": function( text ) {jQuery.globalEval( text );return text;}}});// Handle cache's special case and crossDomainjQuery.ajaxPrefilter( "script", function( s ) {if ( s.cache === undefined ) {s.cache = false;}if ( s.crossDomain ) {s.type = "GET";}});// Bind script tag hack transportjQuery.ajaxTransport( "script", function( s ) {// This transport only deals with cross domain requestsif ( s.crossDomain ) {var script, callback;return {send: function( _, complete ) {script = jQuery("

Have specific requirements? Email us at: The 5Ws of Outsourcing - O2I (2)

The 5Ws of Outsourcing - O2I (2024)

FAQs

What is outsourcing answers? ›

Outsourcing is the business practice of hiring a party outside a company to perform services or create goods that were traditionally performed in-house by the company's own employees and staff. Outsourcing is a practice usually undertaken by companies as a cost-cutting measure.

What are 2 arguments against outsourcing? ›

Some Disadvantages of Outsourcing:
  • Lack of control: Although you can provide direction in regard to what you need to accomplish, you give up some control when you outsource. ...
  • Communication issues: This doesn't always come into play, but it's one of the biggest potential drawbacks.

What are the 4 factors to consider before outsourcing? ›

What are the factors influencing outsourcing decision?
  • 1) Cost Savings. ...
  • 2) Pricing. ...
  • 3) The Resources and Technology. ...
  • 4) The Ability To Meet Deadlines. ...
  • 5) Minimal Supervision. ...
  • 7) Trustworthiness. ...
  • 9) The Service Level Agreement. ...
  • 10) Communication.

What is the main point of outsourcing? ›

The primary purpose of outsourcing is to leverage specialized expertise, reduce costs, and focus on core business functions. According to a report by Deloitte, 59% of companies outsource to minimize expenses, while 57% do it to focus on core business functions.

What is outsourcing Quizlet? ›

Taking internal company functions and paying an outside firm to handle them.

What is outsourcing and examples? ›

Outsourcing can involve using a large third-party provider, such as a company like IBM to manage IT services or FedEx Supply Chain for third-party logistics services. But it can also involve hiring individual independent contractors, temporary office workers and freelancers.

What is bad about outsourcing? ›

There are some disadvantages in outsourcing, too, such as: Loss of control. Negative impact on staff. Data protection and confidentiality risks.

What are 3 disadvantages of outsourcing? ›

Disadvantages of outsourcing
  • service delivery - which may fall behind time or below expectation.
  • confidentiality and security - which may be at risk.
  • lack of flexibility - contract could prove too rigid to accommodate change.
  • management difficulties - changes at the outsourcing company could lead to friction.

Why is outsourcing not good? ›

Outsourcing also has a number of unintended consequences such as lowering barriers to entry and increasing the level of competition a company has. It also has effects on brand loyalty and satisfaction; both for a company's employees and its customers.

What are the 5 steps for success in business process outsourcing? ›

5 Tips for Effective Business Process Outsourcing
  • Freeing Up Resources Shifts Core Focus. ...
  • Benefits versus Risks of Business Process Outsourcing. ...
  • Outsourcing IT Project Management. ...
  • Don't focus on cost. ...
  • Incorporate outsourcing interview techniques. ...
  • Find ideal candidates for specific project categories.

What is the first step in managing outsourcing? ›

Assessment: The first stage of outsourcing, during which the buying company conducts a thorough assessment of their sourcing needs. Since this stage involves developing a project plan, identifying a leadership team and reorganizing training resources, it is often the most difficult.

What are the three most important factors for successful outsourcing? ›

Businesses looking to successfully outsource will need to be diligent in their research of the location, their prospective service provider, reviews, and reputation.

What is the biggest benefit of outsourcing? ›

Today, they share the main benefits of outsourcing:
  • Reduce labour costs. ...
  • Pre-trained, experienced, qualified staff members. ...
  • Choose your own team members. ...
  • Increase efficiency. ...
  • No internal team to manage. ...
  • Reduced business risk. ...
  • Countless skills and practices are available. ...
  • Leverage advantageous exchange rates.

What is the key advantage of outsourcing? ›

1) Reduce your labor costs

Infrastructure, technology, and equipment costs can also impact your bottom line. However, outsourcing can significantly reduce or eliminate many of these expenses. Contractors don't require a desk or office space; they generally do not receive additional employee benefits.

What is word outsourcing? ›

Meaning of outsourcing in English

the process of paying to have part of a company's work done by another company: The management guaranteed that outsourcing wouldn't mean job losses.

What is outsourcing in it? ›

IT outsourcing is the use of external service providers to effectively deliver IT-enabled business process, application service and infrastructure solutions for business outcomes.

What is outsourcing also known as? ›

Outsourcing is also known as Business Process Outsourcing (BPO). This is the process of hiring another individual or company, either domestically or internationally, to handle business activities for you.

What is outsourcing brainly? ›

Explanation: Outsourcing is the practice of hiring a third-party company or individual to perform certain tasks or services for a business. This is often done to reduce costs, improve efficiency, and access specialized skills or resources that may not be available in-house.

Top Articles
Latest Posts
Article information

Author: Gov. Deandrea McKenzie

Last Updated:

Views: 6722

Rating: 4.6 / 5 (66 voted)

Reviews: 89% of readers found this page helpful

Author information

Name: Gov. Deandrea McKenzie

Birthday: 2001-01-17

Address: Suite 769 2454 Marsha Coves, Debbieton, MS 95002

Phone: +813077629322

Job: Real-Estate Executive

Hobby: Archery, Metal detecting, Kitesurfing, Genealogy, Kitesurfing, Calligraphy, Roller skating

Introduction: My name is Gov. Deandrea McKenzie, I am a spotless, clean, glamorous, sparkling, adventurous, nice, brainy person who loves writing and wants to share my knowledge and understanding with you.