Nuffnang

Selasa, 21 Januari 2014

Bunkface - Google Blog Search

Bunkface - Google Blog Search


Rentak Laguku (The Rhythm of My Song/My Rhythm) by <b>Bunkface</b> <b>...</b>

Posted: 18 Jan 2014 01:41 AM PST

"; support.shrinkWrapBlocks = (div.offsetWidth !== 2); } div.innerHTML = ""; tds = div.getElementsByTagName("td"); // Check if table cells still have offsetWidth/Height when they are set // to display:none and there are still other visible table cells in a // table row; if so, offsetWidth/Height are not reliable for use when // determining if an element has been hidden directly using // display:none (it is still safe to use offsets if a parent element is // hidden; don safety goggles and see bug #4512 for more information). // (only IE 8 fails this test) isSupported = (tds[0].offsetHeight === 0); tds[0].style.display = ""; tds[1].style.display = "none"; // Check if empty table cells still have offsetWidth/Height // (IE
" + ""; // Reconstruct a container body = document.getElementsByTagName("body")[0]; if(!body) { // Return for frameset docs that don't have a body // These tests cannot be done return; } container = document.createElement("div"); container.style.cssText = vb + "width:0;height:0;position:static;top:0;margin-top:" + conMarginTop + "px"; body.insertBefore(container, body.firstChild); // Construct a test element testElement = document.createElement("div"); testElement.style.cssText = ptlm + vb; testElement.innerHTML = html; container.appendChild(testElement); outer = testElement.firstChild; inner = outer.firstChild; td = outer.nextSibling.firstChild.firstChild; offsetSupport = { doesNotAddBorder : (inner.offsetTop !== 5), doesAddBorderForTableAndCells : (td.offsetTop === 5) }; inner.style.position = "fixed"; inner.style.top = "20px"; // safari subtracts parent border width here which is 5px offsetSupport.fixedPosition = (inner.offsetTop === 20 || inner.offsetTop === 15); inner.style.position = inner.style.top = ""; outer.style.overflow = "hidden"; outer.style.position = "relative"; offsetSupport.subtractsBorderForOverflowNotVisible = (inner.offsetTop === -5); offsetSupport.doesNotIncludeMarginInBodyOffset = (body.offsetTop !== conMarginTop); body.removeChild(container); testElement = container = null; jQuery.extend(support, offsetSupport); }); testElement.innerHTML = ""; testElementParent.removeChild(testElement); // Null connected elements to avoid leaks in IE testElement = fragment = select = opt = body = marginDiv = div = input = null; return support; })(); // Keep track of boxModel jQuery.boxModel = jQuery.support.boxModel; var rbrace = /^(?:\{.*\}|\[.*\])$/, rmultiDash = /([A-Z])/g; jQuery.extend({ cache : {}, // Please use with caution uuid : 0, // Unique for each copy of jQuery on the page // Non-digits removed to match rinlinejQuery expando : "jQuery" + (jQuery.fn.jquery + Math.random()).replace(/\D/g, ""), // The following elements throw uncatchable exceptions if you // attempt to add expando properties to them. noData : { "embed" : true, // Ban all objects except for Flash (which handle expandos) "object" : "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000", "applet" : true }, hasData : function(elem) { elem = elem.nodeType ? jQuery.cache[elem[jQuery.expando]] : elem[jQuery.expando]; return !!elem && !isEmptyDataObject(elem); }, data : function(elem, name, data, pvt /* Internal Use Only */) { if(!jQuery.acceptData(elem)) { return; } var privateCache, thisCache, ret, internalKey = jQuery.expando, getByName = typeof name === "string", // We have to handle DOM nodes and JS objects differently because IE6-7 // can't GC object references properly across the DOM-JS boundary isNode = elem.nodeType, // Only DOM nodes need the global jQuery cache; JS object data is // attached directly to the object so GC can occur automatically cache = isNode ? jQuery.cache : elem, // Only defining an ID for JS objects if its cache already exists allows // the code to shortcut on the same path as a DOM node with no cache id = isNode ? elem[jQuery.expando] : elem[jQuery.expando] && jQuery.expando, isEvents = name === "events"; // Avoid doing any more work than we need to when trying to get data on an // object that has no data at all if((!id || !cache[id] || (!isEvents && !pvt && !cache[id].data)) && getByName && data === undefined) { return; } if(!id) { // Only DOM nodes need a new unique ID for each element since their data // ends up in the global cache if(isNode) { elem[jQuery.expando] = id = ++jQuery.uuid; } else { id = jQuery.expando; } } if(!cache[id]) { cache[id] = {}; // Avoids exposing jQuery metadata on plain JS objects when the object // is serialized using JSON.stringify if(!isNode) { cache[id].toJSON = jQuery.noop; } } // An object can be passed to jQuery.data instead of a key/value pair; this gets // shallow copied over onto the existing cache if( typeof name === "object" || typeof name === "function") { if(pvt) { cache[id] = jQuery.extend(cache[id], name); } else { cache[id].data = jQuery.extend(cache[id].data, name); } } privateCache = thisCache = cache[id]; // jQuery data() is stored in a separate object inside the object's internal data // cache in order to avoid key collisions between internal data and user-defined // data. if(!pvt) { if(!thisCache.data) { thisCache.data = {}; } thisCache = thisCache.data; } if(data !== undefined) { thisCache[jQuery.camelCase(name)] = data; } // Users should not attempt to inspect the internal events object using jQuery.data, // it is undocumented and subject to change. But does anyone listen? No. if(isEvents && !thisCache[name]) { return privateCache.events; } // Check for both converted-to-camel and non-converted data property names // If a data property was specified if(getByName) { // First Try to find as-is property data ret = thisCache[name]; // Test for null|undefined property data if(ret == null) { // Try to find the camelCased property ret = thisCache[jQuery.camelCase(name)]; } } else { ret = thisCache; } return ret; }, removeData : function(elem, name, pvt /* Internal Use Only */) { if(!jQuery.acceptData(elem)) { return; } var thisCache, i, l, // Reference to internal data cache key internalKey = jQuery.expando, isNode = elem.nodeType, // See jQuery.data for more information cache = isNode ? jQuery.cache : elem, // See jQuery.data for more information id = isNode ? elem[jQuery.expando] : jQuery.expando; // If there is already no cache entry for this object, there is no // purpose in continuing if(!cache[id]) { return; } if(name) { thisCache = pvt ? cache[id] : cache[id].data; if(thisCache) { // Support space separated names if(jQuery.isArray(name)) { name = name; } else if( name in thisCache) { name = [name]; } else { // split the camel cased version by spaces name = jQuery.camelCase(name); if( name in thisCache) { name = [name]; } else { name = name.split(" "); } } for( i = 0, l = name.length; i -1) { return true; } } return false; }, val : function(value) { var hooks, ret, isFunction, elem = this[0]; if(!arguments.length) { if(elem) { hooks = jQuery.valHooks[elem.nodeName.toLowerCase()] || jQuery.valHooks[elem.type]; if(hooks && "get" in hooks && ( ret = hooks.get(elem, "value")) !== undefined) { return ret; } ret = elem.value; return typeof ret === "string" ? // handle most common string cases ret.replace(rreturn, "") : // handle cases where value is null/undef or number ret == null ? "" : ret; } return undefined; } isFunction = jQuery.isFunction(value); return this.each(function(i) { var self = jQuery(this), val; if(this.nodeType !== 1) { return; } if(isFunction) { val = value.call(this, i, self.val()); } else { val = value; } // Treat null/undefined as ""; convert numbers to string if(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.nodeName.toLowerCase()] || jQuery.valHooks[this.type]; // If set returns undefined, fall back to normal setting if(!hooks || !("set" in hooks) || hooks.set(this, val, "value") === undefined) { this.value = val; } }); } }); jQuery.extend({ valHooks : { option : { get : function(elem) { // attributes.value is undefined in Blackberry 4.7 but // uses .value. See #6932 var val = elem.attributes.value; return !val || val.specified ? elem.value : elem.text; } }, select : { get : function(elem) { var value, i, max, option, index = elem.selectedIndex, values = [], options = elem.options, one = elem.type === "select-one"; // Nothing was selected if(index = 0; }); if(!values.length) { elem.selectedIndex = -1; } return values; } } }, attrFn : { val : true, css : true, html : true, text : true, data : true, width : true, height : true, offset : true }, attr : function(elem, name, value, pass) { var ret, hooks, notxml, nType = elem.nodeType; // don't get/set attributes on text, comment and attribute nodes if(!elem || nType === 3 || nType === 8 || nType === 2) { return undefined; } if(pass && name in jQuery.attrFn) { return jQuery(elem)[name](value); } // Fallback to prop when attributes are not supported if(!("getAttribute" in elem)) { return jQuery.prop(elem, name, value); } notxml = nType !== 1 || !jQuery.isXMLDoc(elem); // All attributes are lowercase // Grab necessary hook if one is defined if(notxml) { name = name.toLowerCase(); hooks = jQuery.attrHooks[name] || (rboolean.test(name) ? boolHook : nodeHook); } if(value !== undefined) { if(value === null) { jQuery.removeAttr(elem, name); return undefined; } else if(hooks && "set" in hooks && notxml && ( ret = hooks.set(elem, value, name)) !== undefined) { return ret; } else { elem.setAttribute(name, "" + value); return value; } } else if(hooks && "get" in hooks && notxml && ( ret = hooks.get(elem, name)) !== null) { return ret; } else { ret = elem.getAttribute(name); // Non-existent attributes return null, we normalize to undefined return ret === null ? undefined : ret; } }, removeAttr : function(elem, value) { var propName, attrNames, name, l, i = 0; if(elem.nodeType === 1) { attrNames = (value || "").split(rspace); l = attrNames.length; for(; i = 0); } } }); }); var rnamespaces = /\.(.*)$/, rformElems = /^(?:textarea|input|select)$/i, rperiod = /\./g, rspaces = / /g, rescape = /[^\w\s.|`]/g, rtypenamespace = /^([^\.]*)?(?:\.(.+))?$/, rhoverHack = /\bhover(\.\S+)?/, rkeyEvent = /^key/, rmouseEvent = /^(?:mouse|contextmenu)|click/, rquickIs = /^(\w*)(?:#([\w\-]+))?(?:\.([\w\-]+))?$/, quickParse = function(selector) { var quick = rquickIs.exec(selector); if(quick) { // 0 1 2 3 // [ _, tag, id, class ] quick[1] = (quick[1] || "").toLowerCase(); quick[3] = quick[3] && new RegExp("(?:^|\\s)" + quick[3] + "(?:\\s|$)"); } return quick; }, quickIs = function(elem, m) { return ((!m[1] || elem.nodeName.toLowerCase() === m[1]) && (!m[2] || elem.id === m[2]) && (!m[3] || m[3].test(elem.className))); }, hoverHack = function(events) { return jQuery.event.special.hover ? events : events.replace(rhoverHack, "mouseenter$1 mouseleave$1"); }; /* * Helper functions for managing events -- not part of the public interface. * Props to Dean Edwards' addEvent library for many of the ideas. */ jQuery.event = { add : function(elem, types, handler, data, selector) { var elemData, eventHandle, events, t, tns, type, namespaces, handleObj, handleObjIn, quick, handlers, special; // Don't attach events to noData or text/comment nodes (allow plain objects tho) if(elem.nodeType === 3 || elem.nodeType === 8 || !types || !handler || !( elemData = jQuery._data(elem))) { return; } // Caller can pass in an object of custom data in lieu of the handler if(handler.handler) { handleObjIn = handler; handler = handleObjIn.handler; } // Make sure that the handler has a unique ID, used to find/remove it later if(!handler.guid) { handler.guid = jQuery.guid++; } // Init the element's event structure and main handler, if this is the first events = elemData.events; if(!events) { elemData.events = events = {}; } eventHandle = elemData.handle; if(!eventHandle) { elemData.handle = eventHandle = function(e) { // Discard the second event of a jQuery.event.trigger() and // when an event is called after a page has unloaded return typeof jQuery !== "undefined" && (!e || jQuery.event.triggered !== e.type) ? jQuery.event.dispatch.apply(eventHandle.elem, arguments) : undefined; }; // Add elem as a property of the handle fn to prevent a memory leak with IE non-native events eventHandle.elem = elem; } // Handle multiple events separated by a space // jQuery(...).bind("mouseover mouseout", fn); types = hoverHack(types).split(" "); for( t = 0; t = 0) { // Exclusive events trigger only for the exact event (no namespaces) type = type.slice(0, -1); exclusive = true; } if(type.indexOf(".") >= 0) { // Namespaced trigger; create a regexp to match event type in handle() namespaces = type.split("."); type = namespaces.shift(); namespaces.sort(); } if((!elem || jQuery.event.customEvent[type]) && !jQuery.event.global[type]) { // No jQuery handlers for this event type, and it can't have inline handlers return; } // Caller can pass in an Event, Object, or just an event type string event = typeof event === "object" ? // jQuery.Event object event[jQuery.expando] ? event : // Object literal new jQuery.Event(type, event) : // Just the event type (string) new jQuery.Event(type); event.type = type; event.isTrigger = true; event.exclusive = exclusive; event.namespace = namespaces.join("."); event.namespace_re = event.namespace ? new RegExp("(^|\\.)" + namespaces.join("\\.(?:.*\\.)?") + "(\\.|$)") : null; ontype = type.indexOf(":") = 0; } else if(hit === undefined) { hit = selMatch[sel] = (handleObj.quick ? quickIs(cur, handleObj.quick) : jQuery(cur).is(sel)); } if(hit) { matches.push(handleObj); } } if(matches.length) { handlerQueue.push({ elem : cur, matches : matches }); } } } // Add the remaining (directly-bound) handlers if(handlers.length > delegateCount) { handlerQueue.push({ elem : this, matches : handlers.slice(delegateCount) }); } // Run delegates first; they may want to stop propagation beneath us for( i = 0; i 0 ? this.bind(name, data, fn) : this.trigger(name); }; if(jQuery.attrFn) { jQuery.attrFn[name] = true; } if(rkeyEvent.test(name)) { jQuery.event.fixHooks[name] = jQuery.event.keyHooks; } if(rmouseEvent.test(name)) { jQuery.event.fixHooks[name] = jQuery.event.mouseHooks; } }); /*! * Sizzle CSS Selector Engine * Copyright 2011, The Dojo Foundation * Released under the MIT, BSD, and GPL Licenses. * More information: http://sizzlejs.com/ */ (function() { var chunker = /((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g, expando = "sizcache" + (Math.random() + '').replace('.', ''), done = 0, toString = Object.prototype.toString, hasDuplicate = false, baseHasDuplicate = true, rBackslash = /\\/g, rReturn = /\r\n/g, rNonWord = /\W/; // Here we check if the JavaScript engine is using some sort of // optimization where it does not always call our comparision // function. If that is the case, discard the hasDuplicate value. // Thus far that includes Google Chrome. [0, 0].sort(function() { baseHasDuplicate = false; return 0; }); var Sizzle = function(selector, context, results, seed) { results = results || []; context = context || document; var origContext = context; if(context.nodeType !== 1 && context.nodeType !== 9) { return []; } if(!selector || typeof selector !== "string") { return results; } var m, set, checkSet, extra, ret, cur, pop, i, prune = true, contextXML = Sizzle.isXML(context), parts = [], soFar = selector; // Reset the position of the chunker regexp (start from head) do { chunker.exec(""); m = chunker.exec(soFar); if(m) { soFar = m[3]; parts.push(m[1]); if(m[2]) { extra = m[3]; break; } } } while (m); if(parts.length > 1 && origPOS.exec(selector)) { if(parts.length === 2 && Expr.relative[parts[0]]) { set = posProcess(parts[0] + parts[1], context, seed); } else { set = Expr.relative[parts[0]] ? [context] : Sizzle(parts.shift(), context); while(parts.length) { selector = parts.shift(); if(Expr.relative[selector]) { selector += parts.shift(); } set = posProcess(selector, set, seed); } } } else { // Take a shortcut and set the context if the root selector is an ID // (but not if it'll be faster if the inner selector is an ID) if(!seed && parts.length > 1 && context.nodeType === 9 && !contextXML && Expr.match.ID.test(parts[0]) && !Expr.match.ID.test(parts[parts.length - 1])) { ret = Sizzle.find(parts.shift(), context, contextXML); context = ret.expr ? Sizzle.filter(ret.expr, ret.set)[0] : ret.set[0]; } if(context) { ret = seed ? { expr : parts.pop(), set : makeArray(seed) } : Sizzle.find(parts.pop(), parts.length === 1 && (parts[0] === "~" || parts[0] === "+") && context.parentNode ? context.parentNode : context, contextXML); set = ret.expr ? Sizzle.filter(ret.expr, ret.set) : ret.set; if(parts.length > 0) { checkSet = makeArray(set); } else { prune = false; } while(parts.length) { cur = parts.pop(); pop = cur; if(!Expr.relative[cur]) { cur = ""; } else { pop = parts.pop(); } if(pop == null) { pop = context; } Expr.relative[cur](checkSet, pop, contextXML); } } else { checkSet = parts = []; } } if(!checkSet) { checkSet = set; } if(!checkSet) { Sizzle.error(cur || selector); } if(toString.call(checkSet) === "[object Array]") { if(!prune) { results.push.apply(results, checkSet); } else if(context && context.nodeType === 1) { for( i = 0; checkSet[i] != null; i++) { if(checkSet[i] && (checkSet[i] === true || checkSet[i].nodeType === 1 && Sizzle.contains(context, checkSet[i]))) { results.push(set[i]); } } } else { for( i = 0; checkSet[i] != null; i++) { if(checkSet[i] && checkSet[i].nodeType === 1) { results.push(set[i]); } } } } else { makeArray(checkSet, results); } if(extra) { Sizzle(extra, origContext, results, seed); Sizzle.uniqueSort(results); } return results; }; Sizzle.uniqueSort = function(results) { if(sortOrder) { hasDuplicate = baseHasDuplicate; results.sort(sortOrder); if(hasDuplicate) { for(var i = 1; i 0; }; Sizzle.find = function(expr, context, isXML) { var set, i, len, match, type, left; if(!expr) { return []; } for( i = 0, len = Expr.order.length; i " : function(checkSet, part) { var elem, isPartStr = typeof part === "string", i = 0, l = checkSet.length; if(isPartStr && !rNonWord.test(part)) { part = part.toLowerCase(); for(; i = 0)) { if(!inplace) { result.push(elem); } } else if(inplace) { curLoop[i] = false; } } } return false; }, ID : function(match) { return match[1].replace(rBackslash, ""); }, TAG : function(match, curLoop) { return match[1].replace(rBackslash, "").toLowerCase(); }, CHILD : function(match) { if(match[1] === "nth") { if(!match[2]) { Sizzle.error(match[0]); } match[2] = match[2].replace(/^\+|\s*/g, ''); // parse equations like 'even', 'odd', '5', '2n', '3n+2', '4n-1', '-n+6' var test = /(-?)(\d*)(?:n([+\-]?\d*))?/.exec(match[2] === "even" && "2n" || match[2] === "odd" && "2n+1" || !/\D/.test(match[2]) && "0n+" + match[2] || match[2]); // calculate the numbers (first)n+(last) including if they are negative match[2] = (test[1] + (test[2] || 1)) - 0; match[3] = test[3] - 0; } else if(match[2]) { Sizzle.error(match[0]); } // TODO: Move to normal caching system match[0] = done++; return match; }, ATTR : function(match, curLoop, inplace, result, not, isXML) { var name = match[1] = match[1].replace(rBackslash, ""); if(!isXML && Expr.attrMap[name]) { match[1] = Expr.attrMap[name]; } // Handle if an un-quoted value was used match[4] = (match[4] || match[5] || "").replace(rBackslash, ""); if(match[2] === "~=") { match[4] = " " + match[4] + " "; } return match; }, PSEUDO : function(match, curLoop, inplace, result, not) { if(match[1] === "not") { // If we're dealing with a complex expression, or a simple one if((chunker.exec(match[3]) || "").length > 1 || /^\w/.test(match[3])) { match[3] = Sizzle(match[3], null, null, curLoop); } else { var ret = Sizzle.filter(match[3], curLoop, inplace, true ^ not); if(!inplace) { result.push.apply(result, ret); } return false; } } else if(Expr.match.POS.test(match[0]) || Expr.match.CHILD.test(match[0])) { return true; } return match; }, POS : function(match) { match.unshift(true); return match; } }, filters : { enabled : function(elem) { return elem.disabled === false && elem.type !== "hidden"; }, disabled : function(elem) { return elem.disabled === true; }, checked : function(elem) { return elem.checked === true; }, selected : function(elem) { // Accessing this property makes selected-by-default // options in Safari work properly if(elem.parentNode) { elem.parentNode.selectedIndex } return elem.selected === true; }, parent : function(elem) { return !!elem.firstChild; }, empty : function(elem) { return !elem.firstChild; }, has : function(elem, i, match) { return !!Sizzle(match[3], elem).length; }, header : function(elem) { return (/h\d/i).test(elem.nodeName); }, text : function(elem) { var attr = elem.getAttribute("type"), type = elem.type; // IE6 and 7 will map elem.type to 'text' for new HTML5 types (search, etc) // use getAttribute instead to test this case return elem.nodeName.toLowerCase() === "input" && "text" === type && (attr === type || attr === null); }, radio : function(elem) { return elem.nodeName.toLowerCase() === "input" && "radio" === elem.type; }, checkbox : function(elem) { return elem.nodeName.toLowerCase() === "input" && "checkbox" === elem.type; }, file : function(elem) { return elem.nodeName.toLowerCase() === "input" && "file" === elem.type; }, password : function(elem) { return elem.nodeName.toLowerCase() === "input" && "password" === elem.type; }, submit : function(elem) { var name = elem.nodeName.toLowerCase(); return (name === "input" || name === "button") && "submit" === elem.type; }, image : function(elem) { return elem.nodeName.toLowerCase() === "input" && "image" === elem.type; }, reset : function(elem) { var name = elem.nodeName.toLowerCase(); return (name === "input" || name === "button") && "reset" === elem.type; }, button : function(elem) { var name = elem.nodeName.toLowerCase(); return name === "input" && "button" === elem.type || name === "button"; }, input : function(elem) { return (/input|select|textarea|button/i).test(elem.nodeName); }, focus : function(elem) { return elem === elem.ownerDocument.activeElement; } }, setFilters : { first : function(elem, i) { return i === 0; }, last : function(elem, i, match, array) { return i === array.length - 1; }, even : function(elem, i) { return i % 2 === 0; }, odd : function(elem, i) { return i % 2 === 1; }, lt : function(elem, i, match) { return i match[3] - 0; }, nth : function(elem, i, match) { return match[3] - 0 === i; }, eq : function(elem, i, match) { return match[3] - 0 === i; } }, filter : { PSEUDO : function(elem, match, i, array) { var name = match[1], filter = Expr.filters[name]; if(filter) { return filter(elem, i, match, array); } else if(name === "contains") { return (elem.textContent || elem.innerText || getText([elem]) || "").indexOf(match[3]) >= 0; } else if(name === "not") { var not = match[3]; for(var j = 0, l = not.length; j = 0); } } }, ID : function(elem, match) { return elem.nodeType === 1 && elem.getAttribute("id") === match; }, TAG : function(elem, match) { return (match === "*" && elem.nodeType === 1) || !!elem.nodeName && elem.nodeName.toLowerCase() === match; }, CLASS : function(elem, match) { return (" " + (elem.className || elem.getAttribute("class")) + " ").indexOf(match) > -1; }, ATTR : function(elem, match) { var name = match[1], result = Sizzle.attr ? Sizzle.attr(elem, name) : Expr.attrHandle[name] ? Expr.attrHandle[name](elem) : elem[name] != null ? elem[name] : elem.getAttribute(name), value = result + "", type = match[2], check = match[4]; return result == null ? type === "!=" : !type && Sizzle.attr ? result != null : type === "=" ? value === check : type === "*=" ? value.indexOf(check) >= 0 : type === "~=" ? (" " + value + " ").indexOf(check) >= 0 : !check ? value && result !== false : type === "!=" ? value !== check : type === "^=" ? value.indexOf(check) === 0 : type === "$=" ? value.substr(value.length - check.length) === check : type === "|=" ? value === check || value.substr(0, check.length + 1) === check + "-" : false; }, POS : function(elem, match, i, array) { var name = match[2], filter = Expr.setFilters[name]; if(filter) { return filter(elem, i, match, array); } } } }; var origPOS = Expr.match.POS, fescape = function(all, num) { return "\\" + (num - 0 + 1); }; for(var type in Expr.match) { Expr.match[type] = new RegExp(Expr.match[type].source + (/(?![^\[]*\])(?![^\(]*\))/.source)); Expr.leftMatch[type] = new RegExp(/(^(?:.|\r|\n)*?)/.source + Expr.match[type].source.replace(/\\(\d+)/g, fescape)); } var makeArray = function(array, results) { array = Array.prototype.slice.call(array, 0); if(results) { results.push.apply(results, array); return results; } return array; }; // Perform a simple check to determine if the browser is capable of // converting a NodeList to an array using builtin methods. // Also verifies that the returned array holds DOM nodes // (which is not the case in the Blackberry browser) try { Array.prototype.slice.call(document.documentElement.childNodes, 0)[0].nodeType // Provide a fallback method if it does not work } catch (e) { makeArray = function(array, results) { var i = 0, ret = results || []; if(toString.call(array) === "[object Array]") { Array.prototype.push.apply(ret, array); } else { if( typeof array.length === "number") { for(var l = array.length; i "; // Inject it into the root element, check its status, and remove it quickly root.insertBefore(form, root.firstChild); // The workaround has to do additional checks after a getElementById // Which slows things down for other browsers (hence the branching) if(document.getElementById(id)) { Expr.find.ID = function(match, context, isXML) { if( typeof context.getElementById !== "undefined" && !isXML) { var m = context.getElementById(match[1]); return m ? m.id === match[1] || typeof m.getAttributeNode !== "undefined" && m.getAttributeNode("id").nodeValue === match[1] ? [m] : undefined : []; } }; Expr.filter.ID = function(elem, match) { var node = typeof elem.getAttributeNode !== "undefined" && elem.getAttributeNode("id"); return elem.nodeType === 1 && node && node.nodeValue === match; }; } root.removeChild(form); // release memory in IE root = form = null; })(); (function() { // Check to see if the browser returns only elements // when doing getElementsByTagName("*") // Create a fake element var div = document.createElement("div"); div.appendChild(document.createComment("")); // Make sure no comments are found if(div.getElementsByTagName("*").length > 0) { Expr.find.TAG = function(match, context) { var results = context.getElementsByTagName(match[1]); // Filter out possible comments if(match[1] === "*") { var tmp = []; for(var i = 0; results[i]; i++) { if(results[i].nodeType === 1) { tmp.push(results[i]); } } results = tmp; } return results; }; } // Check to see if an attribute returns normalized href attributes div.innerHTML = ""; if(div.firstChild && typeof div.firstChild.getAttribute !== "undefined" && div.firstChild.getAttribute("href") !== "#") { Expr.attrHandle.href = function(elem) { return elem.getAttribute("href", 2); }; } // release memory in IE div = null; })(); if(document.querySelectorAll) {(function() { var oldSizzle = Sizzle, div = document.createElement("div"), id = "__sizzle__"; div.innerHTML = ""; // Safari can't handle uppercase or unicode characters when // in quirks mode. if(div.querySelectorAll && div.querySelectorAll(".TEST").length === 0) { return; } Sizzle = function(query, context, extra, seed) { context = context || document; // Only use querySelectorAll on non-XML documents // (ID selectors don't work in non-HTML documents) if(!seed && !Sizzle.isXML(context)) { // See if we find a selector to speed up var match = /^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(query); if(match && (context.nodeType === 1 || context.nodeType === 9)) { // Speed-up: Sizzle("TAG") if(match[1]) { return makeArray(context.getElementsByTagName(query), extra); // Speed-up: Sizzle(".CLASS") } else if(match[2] && Expr.find.CLASS && context.getElementsByClassName) { return makeArray(context.getElementsByClassName(match[2]), extra); } } if(context.nodeType === 9) { // Speed-up: Sizzle("body") // The body element only exists once, optimize finding it if(query === "body" && context.body) { return makeArray([context.body], extra); // Speed-up: Sizzle("#ID") } else if(match && match[3]) { var elem = context.getElementById(match[3]); // Check parentNode to catch when Blackberry 4.6 returns // nodes that are no longer in the document #6963 if(elem && elem.parentNode) { // Handle the case where IE and Opera return items // by name instead of ID if(elem.id === match[3]) { return makeArray([elem], extra); } } else { return makeArray([], extra); } } try { return makeArray(context.querySelectorAll(query), extra); } catch (qsaError) { } // qSA works strangely on Element-rooted queries // We can work around this by specifying an extra ID on the root // and working up from there (Thanks to Andrew Dupont for the technique) // IE 8 doesn't work on object elements } else if(context.nodeType === 1 && context.nodeName.toLowerCase() !== "object") { var oldContext = context, old = context.getAttribute("id"), nid = old || id, hasParent = context.parentNode, relativeHierarchySelector = /^\s*[+~]/.test(query); if(!old) { context.setAttribute("id", nid); } else { nid = nid.replace(/'/g, "\\$&"); } if(relativeHierarchySelector && hasParent) { context = context.parentNode; } try { if(!relativeHierarchySelector || hasParent) { return makeArray(context.querySelectorAll("[id='" + nid + "'] " + query), extra); } } catch (pseudoError) { } finally { if(!old) { oldContext.removeAttribute("id"); } } } } return oldSizzle(query, context, extra, seed); }; for(var prop in oldSizzle) { Sizzle[prop] = oldSizzle[prop]; } // release memory in IE div = null; })(); }(function() { var html = document.documentElement, matches = html.matchesSelector || html.mozMatchesSelector || html.webkitMatchesSelector || html.msMatchesSelector; if(matches) { // Check to see if it's possible to do matchesSelector // on a disconnected node (IE 9 fails this) var disconnectedMatch = !matches.call(document.createElement("div"), "div"), pseudoWorks = false; try { // This should fail with an exception // Gecko does not error, returns false instead matches.call(document.documentElement, "[test!='']:sizzle"); } catch (pseudoError) { pseudoWorks = true; } Sizzle.matchesSelector = function(node, expr) { // Make sure that attribute selectors are quoted expr = expr.replace(/\=\s*([^'"\]]*)\s*\]/g, "='$1']"); if(!Sizzle.isXML(node)) { try { if(pseudoWorks || !Expr.match.PSEUDO.test(expr) && !/!=/.test(expr)) { var ret = matches.call(node, expr); // IE 9's matchesSelector returns false on disconnected nodes if(ret || !disconnectedMatch || // As well, disconnected nodes are said to be in a document // fragment in IE 9, so check for that node.document && node.document.nodeType !== 11) { return ret; } } } catch (e) { } } return Sizzle(expr, null, null, [node]).length > 0; }; } })(); (function() { var div = document.createElement("div"); div.innerHTML = ""; // Opera can't find a second classname (in 9.6) // Also, make sure that getElementsByClassName actually exists if(!div.getElementsByClassName || div.getElementsByClassName("e").length === 0) { return; } // Safari caches class attributes, doesn't catch changes (in 3.2) div.lastChild.className = "e"; if(div.getElementsByClassName("e").length === 1) { return; } Expr.order.splice(1, 0, "CLASS"); Expr.find.CLASS = function(match, context, isXML) { if( typeof context.getElementsByClassName !== "undefined" && !isXML) { return context.getElementsByClassName(match[1]); } }; // release memory in IE div = null; })(); function dirNodeCheck(dir, cur, doneName, checkSet, nodeCheck, isXML) { for(var i = 0, l = checkSet.length; i 0) { match = elem; break; } } elem = elem[dir]; } checkSet[i] = match; } } } if(document.documentElement.contains) { Sizzle.contains = function(a, b) { return a !== b && (a.contains ? a.contains(b) : true); }; } else if(document.documentElement.compareDocumentPosition) { Sizzle.contains = function(a, b) { return !!(a.compareDocumentPosition(b) & 16); }; } else { Sizzle.contains = function() { return false; }; } Sizzle.isXML = function(elem) { // documentElement is verified for cases where it doesn't yet exist // (such as loading iframes in IE - #4833) var documentElement = ( elem ? elem.ownerDocument || elem : 0).documentElement; return documentElement ? documentElement.nodeName !== "HTML" : false; }; var posProcess = function(selector, context, seed) { var match, tmpSet = [], later = "", root = context.nodeType ? [context] : context; // Position selectors must be done after the filter // And so must :not(positional) so we move all PSEUDOs to the end while(( match = Expr.match.PSEUDO.exec(selector))) { later += match[0]; selector = selector.replace(Expr.match.PSEUDO, ""); } selector = Expr.relative[selector] ? selector + "*" : selector; for(var i = 0, l = root.length; i 0) { // Make sure that the results are unique for( n = length; n = 0 : jQuery.filter(selector, this).length > 0 : this.filter(selector).length > 0); }, closest : function(selectors, context) { var ret = [], i, l, cur = this[0]; // Array (deprecated as of jQuery 1.7) if(jQuery.isArray(selectors)) { var level = 1; while(cur && cur.ownerDocument && cur !== context) { for( i = 0; i -1 : jQuery.find.matchesSelector(cur, selectors)) { ret.push(cur); break; } else { cur = cur.parentNode; if(!cur || !cur.ownerDocument || cur === context || cur.nodeType === 11) { break; } } } } ret = ret.length > 1 ? jQuery.unique(ret) : ret; return this.pushStack(ret, "closest", selectors); }, // Determine the position of an element within // the matched set of elements index : function(elem) { // No argument, return index in parent if(!elem) { return (this[0] && this[0].parentNode) ? this.prevAll().length : -1; } // index in selector if( typeof elem === "string") { return jQuery.inArray(this[0], jQuery(elem)); } // Locate the position of the desired element return jQuery.inArray(// If it receives a jQuery object, the first element is used elem.jquery ? elem[0] : elem, this); }, add : function(selector, context) { var set = typeof selector === "string" ? jQuery(selector, context) : jQuery.makeArray(selector && selector.nodeType ? [selector] : selector), all = jQuery.merge(this.get(), set); return this.pushStack(isDisconnected(set[0]) || isDisconnected(all[0]) ? all : jQuery.unique(all)); }, andSelf : function() { return this.add(this.prevObject); } }); // A painfully simple check to see if an element is disconnected // from a document (should be improved, where feasible). function isDisconnected(node) { return !node || !node.parentNode || node.parentNode.nodeType === 11; } 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 jQuery.nth(elem, 2, "nextSibling"); }, prev : function(elem) { return jQuery.nth(elem, 2, "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 jQuery.nodeName(elem, "iframe") ? elem.contentDocument || elem.contentWindow.document : jQuery.makeArray(elem.childNodes); } }, function(name, fn) { jQuery.fn[name] = function(until, selector) { var ret = jQuery.map(this, fn, until), // The variable 'args' was introduced in // https://github.com/jquery/jquery/commit/52a0238 // to work around a bug in Chrome 10 (Dev) and should be removed when the bug is fixed. // http://code.google.com/p/v8/issues/detail?id=1050 args = slice.call(arguments); if(!runtil.test(name)) { selector = until; } if(selector && typeof selector === "string") { ret = jQuery.filter(selector, ret); } ret = this.length > 1 && !guaranteedUnique[name] ? jQuery.unique(ret) : ret; if((this.length > 1 || rmultiselector.test(selector)) && rparentsprev.test(name)) { ret = ret.reverse(); } return this.pushStack(ret, name, args.join(",")); }; }); jQuery.extend({ filter : function(expr, elems, not) { if(not) { expr = ":not(" + expr + ")"; } return elems.length === 1 ? jQuery.find.matchesSelector(elems[0], expr) ? [elems[0]] : [] : jQuery.find.matches(expr, elems); }, dir : function(elem, dir, until) { var matched = [], cur = elem[dir]; while(cur && cur.nodeType !== 9 && (until === undefined || cur.nodeType !== 1 || !jQuery(cur).is(until))) { if(cur.nodeType === 1) { matched.push(cur); } cur = cur[dir]; } return matched; }, nth : function(cur, result, dir, elem) { result = result || 1; var num = 0; for(; cur; cur = cur[dir]) { if(cur.nodeType === 1 && ++num === result) { break; } } return cur; }, sibling : function(n, elem) { var r = []; for(; n; n = n.nextSibling) { if(n.nodeType === 1 && n !== elem) { r.push(n); } } return r; } }); // Implement the identical functionality for filter and not function winnow(elements, qualifier, keep) { // Can't pass null or undefined to indexOf in Firefox 4 // Set to 0 to skip string check qualifier = qualifier || 0; if(jQuery.isFunction(qualifier)) { return jQuery.grep(elements, function(elem, i) { var retVal = !!qualifier.call(elem, i, elem); return retVal === keep; }); } else if(qualifier.nodeType) { return jQuery.grep(elements, function(elem, i) { return (elem === qualifier) === keep; }); } else if( typeof qualifier === "string") { var filtered = jQuery.grep(elements, function(elem) { return elem.nodeType === 1; }); if(isSimple.test(qualifier)) { return jQuery.filter(qualifier, filtered, !keep); } else { qualifier = jQuery.filter(qualifier, filtered); } } return jQuery.grep(elements, function(elem, i) { return (jQuery.inArray(elem, qualifier) >= 0) === keep; }); } function createSafeFragment(document) { var list = nodeNames.split(" "), safeFrag = document.createDocumentFragment(); if(safeFrag.createElement) { while(list.length) { safeFrag.createElement(list.pop()); } } return safeFrag; } var nodeNames = "abbr article aside audio canvas datalist details figcaption figure footer " + "header hgroup mark meter nav output progress section summary time video", rinlinejQuery = / jQuery\d+="(?:\d+|null)"/g, rleadingWhitespace = /^\s+/, rxhtmlTag = /]*)\/>/ig, rtagName = /", ""], legend : [1, "
", "
"], thead : [1, ""], tr : [2, ""], td : [3, ""], col : [2, ""], area : [1, "", ""], _default : [0, "", ""] }, safeFragment = createSafeFragment(document); wrapMap.optgroup = wrapMap.option; wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead; wrapMap.th = wrapMap.td; // IE can't serialize and

"]; } jQuery.fn.extend({ text : function(text) { if(jQuery.isFunction(text)) { return this.each(function(i) { var self = jQuery(this); self.text(text.call(this, i, self.text())); }); } if( typeof text !== "object" && text !== undefined) { return this.empty().append((this[0] && this[0].ownerDocument || document).createTextNode(text)); } return jQuery.text(this); }, wrapAll : function(html) { 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 around var wrap = 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.firstChild && elem.firstChild.nodeType === 1) { elem = elem.firstChild; } 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) { return this.each(function() { jQuery(this).wrapAll(html); }); }, unwrap : function() { return this.parent().each(function() { if(!jQuery.nodeName(this, "body")) { jQuery(this).replaceWith(this.childNodes); } }).end(); }, append : function() { return this.domManip(arguments, true, function(elem) { if(this.nodeType === 1) { this.appendChild(elem); } }); }, prepend : function() { return this.domManip(arguments, true, function(elem) { if(this.nodeType === 1) { this.insertBefore(elem, this.firstChild); } }); }, before : function() { if(this[0] && this[0].parentNode) { return this.domManip(arguments, false, function(elem) { this.parentNode.insertBefore(elem, this); }); } else if(arguments.length) { var set = jQuery(arguments[0]); set.push.apply(set, this.toArray()); return this.pushStack(set, "before", arguments); } }, after : function() { if(this[0] && this[0].parentNode) { return this.domManip(arguments, false, function(elem) { this.parentNode.insertBefore(elem, this.nextSibling); }); } else if(arguments.length) { var set = this.pushStack(this, "after", arguments); set.push.apply(set, jQuery(arguments[0]).toArray()); return set; } }, // keepData is for internal use only--do not document remove : function(selector, keepData) { for(var i = 0, elem; ( elem = this[i]) != null; i++) { if(!selector || jQuery.filter(selector, [elem]).length) { if(!keepData && elem.nodeType === 1) { jQuery.cleanData(elem.getElementsByTagName("*")); jQuery.cleanData([elem]); } if(elem.parentNode) { elem.parentNode.removeChild(elem); } } } return this; }, empty : function() { for(var i = 0, elem; ( elem = this[i]) != null; i++) { // Remove element nodes and prevent memory leaks if(elem.nodeType === 1) { jQuery.cleanData(elem.getElementsByTagName("*")); } // Remove any remaining nodes while(elem.firstChild) { elem.removeChild(elem.firstChild); } } 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) { if(value === undefined) { return this[0] && this[0].nodeType === 1 ? this[0].innerHTML.replace(rinlinejQuery, "") : null; // See if we can take a shortcut and just use innerHTML } else if( typeof value === "string" && !rnoInnerhtml.test(value) && (jQuery.support.leadingWhitespace || !rleadingWhitespace.test(value)) && !wrapMap[(rtagName.exec(value) || ["", ""])[1].toLowerCase()]) { value = value.replace(rxhtmlTag, "$2>"); try { for(var i = 0, l = this.length; i 1 && i or

Tiada ulasan:

Catat Ulasan