(function(a,b){function cy(a){return f.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}function cu(a){if(!cj[a]){var b=c.body,d=f("<"+a+">").appendTo(b),e=d.css("display");d.remove();if(e==="none"||e===""){ck||(ck=c.createElement("iframe"),ck.frameBorder=ck.width=ck.height=0),b.appendChild(ck);if(!cl||!ck.createElement)cl=(ck.contentWindow||ck.contentDocument).document,cl.write((f.support.boxSoftware?"":"")+""),cl.close();d=cl.createElement(a),cl.body.appendChild(d),e=f.css(d,"display"),b.removeChild(ck)}cj[a]=e}return cj[a]}function ct(a,b){var c={};f.each(cp.concat.apply([],cp.slice(0,b)),function(){c[this]=a});return c}function cs(){cq=b}function cr(){setTimeout(cs,0);return cq=f.now()}function ci(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}function ch(){try{return new a.XMLHttpRequest}catch(b){}}function cb(a,c){a.dataFilter&&(c=a.dataFilter(c,a.dataType));var d=a.dataTypes,e={},g,h,i=d.length,j,k=d[0],l,m,n,o,p;for(g=1;g0){if(c!=="border")for(;e=0===c})}function S(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function K(){return!0}function J(){return!1}function n(a,b,c){var d=b+"defer",e=b+"queue",g=b+"mark",h=f._data(a,d);h&&(c==="queue"||!f._data(a,e))&&(c==="mark"||!f._data(a,g))&&setTimeout(function(){!f._data(a,e)&&!f._data(a,g)&&(f.removeData(a,d,!0),h.fire())},0)}function m(a){for(var b in a){if(b==="data"&&f.isEmptyObject(a[b]))continue;if(b!=="toJSON")return!1}return!0}function l(a,c,d){if(d===b&&a.nodeType===1){var e="data-"+c.replace(k,"-$1").toLowerCase();d=a.getAttribute(e);if(typeof d=="string"){try{d=d==="true"?!0:d==="false"?!1:d==="null"?null:f.isNumeric(d)?+d:j.test(d)?f.parseJSON(d):d}catch(g){}f.data(a,c,d)}else d=b}return d}function h(a){var b=g[a]={},c,d;a=a.split(/\s+/);for(c=0,d=a.length;c)[^>]*$|#([\w\-]*)$)/,j=/\S/,k=/^\s+/,l=/\s+$/,m=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,n=/^[\],:{}\s]*$/,o=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,p=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,q=/(?:^|:|,)(?:\s*\[)+/g,r=/(webkit)[ \/]([\w.]+)/,s=/(opera)(?:.*version)?[ \/]([\w.]+)/,t=/(msie) ([\w.]+)/,u=/(mozilla)(?:.*? rv:([\w.]+))?/,v=/-([a-z]|[0-9])/ig,w=/^-ms-/,x=function(a,b){return(b+"").toUpperCase()},y=d.userAgent,z,A,B,C=Object.prototype.toString,D=Object.prototype.hasOwnProperty,E=Array.prototype.push,F=Array.prototype.slice,G=String.prototype.trim,H=Array.prototype.indexOf,I={};e.fn=e.prototype={constructor:e,init:function(a,d,f){var g,h,j,k;if(!a)return this;if(a.nodeType){this.context=this[0]=a,this.length=1;return this}if(a==="body"&&!d&&c.body){this.context=c,this[0]=c.body,this.selector=a,this.length=1;return this}if(typeof a=="string"){a.charAt(0)!=="<"||a.charAt(a.length-1)!==">"||a.length<3?g=i.exec(a):g=[null,a,null];if(g&&(g[1]||!d)){if(g[1]){d=d instanceof e?d[0]:d,k=d?d.ownerDocument||d:c,j=m.exec(a),j?e.isPlainObject(d)?(a=[c.createElement(j[1])],e.fn.attr.call(a,d,!0)):a=[k.createElement(j[1])]:(j=e.buildFragment([g[1]],[k]),a=(j.cacheable?e.clone(j.fragment):j.fragment).childNodes);return e.merge(this,a)}h=c.getElementById(g[2]);if(h&&h.parentNode){if(h.id!==g[2])return f.find(a);this.length=1,this[0]=h}this.context=c,this.selector=a;return this}return!d||d.jquery?(d||f).find(a):this.constructor(d).find(a)}if(e.isFunction(a))return f.ready(a);a.selector!==b&&(this.selector=a.selector,this.context=a.context);return e.makeArray(a,this)},selector:"",jquery:"1.7.2",length:0,size:function(){return this.length},toArray:function(){return F.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this[this.length+a]:this[a]},pushStack:function(a,b,c){var d=this.constructor();e.isArray(a)?E.apply(d,a):e.merge(d,a),d.prevObject=this,d.context=this.context,b==="find"?d.selector=this.selector+(this.selector?" ":"")+c:b&&(d.selector=this.selector+"."+b+"("+c+")");return d},each:function(a,b){return e.each(this,a,b)},ready:function(a){e.bindReady(),A.add(a);return this},eq:function(a){a=+a;return a===-1?this.slice(a):this.slice(a,a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(F.apply(this,arguments),"slice",F.call(arguments).join(","))},map:function(a){return this.pushStack(e.map(this,function(b,c){return a.call(b,c,b)}))},end:function(){return this.prevObject||this.constructor(null)},push:E,sort:[].sort,splice:[].splice},e.fn.init.prototype=e.fn,e.extend=e.fn.extend=function(){var a,c,d,f,g,h,i=arguments[0]||{},j=1,k=arguments.length,l=!1;typeof i=="boolean"&&(l=i,i=arguments[1]||{},j=2),typeof i!="object"&&!e.isFunction(i)&&(i={}),k===j&&(i=this,--j);for(;j0)return;A.fireWith(c,[e]),e.fn.trigger&&e(c).trigger("ready").off("ready")}},bindReady:function(){if(!A){A=e.Callbacks("once memory");if(c.readyState==="complete")return setTimeout(e.ready,1);if(c.addEventListener)c.addEventListener("DOMContentLoaded",B,!1),a.addEventListener("load",e.ready,!1);else if(c.attachEvent){c.attachEvent("onreadystatechange",B),a.attachEvent("onload",e.ready);var b=!1;try{b=a.frameElement==null}catch(d){}c.documentElement.doScroll&&b&&J()}}},isFunction:function(a){return e.type(a)==="function"},isArray:Array.isArray||function(a){return e.type(a)==="array"},isWindow:function(a){return a!=null&&a==a.window},isNumeric:function(a){return!isNaN(parseFloat(a))&&isFinite(a)},type:function(a){return a==null?String(a):I[C.call(a)]||"object"},isPlainObject:function(a){if(!a||e.type(a)!=="object"||a.nodeType||e.isWindow(a))return!1;try{if(a.constructor&&!D.call(a,"constructor")&&!D.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}var d;for(d in a);return d===b||D.call(a,d)},isEmptyObject:function(a){for(var b in a)return!1;return!0},error:function(a){throw new Error(a)},parseJSON:function(b){if(typeof b!="string"||!b)return null;b=e.trim(b);if(a.JSON&&a.JSON.parse)return a.JSON.parse(b);if(n.test(b.replace(o,"@").replace(p,"]").replace(q,"")))return(new Function("return "+b))();e.error("Invalid JSON: "+b)},parseXML:function(c){if(typeof c!="string"||!c)return null;var d,f;try{a.DOMParser?(f=new DOMParser,d=f.parseFromString(c,"text/xml")):(d=new ActiveXObject("Microsoft.XMLDOM"),d.async="false",d.loadXML(c))}catch(g){d=b}(!d||!d.documentElement||d.getElementsByTagName("parsererror").length)&&e.error("Invalid XML: "+c);return d},noop:function(){},globalEval:function(b){b&&j.test(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(w,"ms-").replace(v,x)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,c,d){var f,g=0,h=a.length,i=h===b||e.isFunction(a);if(d){if(i){for(f in a)if(c.apply(a[f],d)===!1)break}else for(;g0&&a[0]&&a[j-1]||j===0||e.isArray(a));if(k)for(;i1?i.call(arguments,0):b,j.notifyWith(k,e)}}function l(a){return function(c){b[a]=arguments.length>1?i.call(arguments,0):c,--g||j.resolveWith(j,b)}}var b=i.call(arguments,0),c=0,d=b.length,e=Array(d),g=d,h=d,j=d<=1&&a&&f.isFunction(a.promise)?a:f.Deferred(),k=j.promise();if(d>1){for(;c
a",d=p.getElementsByTagName("*"),e=p.getElementsByTagName("a")[0];if(!d||!d.length||!e)return{};g=c.createElement("select"),h=g.appendChild(c.createElement("option")),i=p.getElementsByTagName("input")[0],b={leadingWhitespace:p.firstChild.nodeType===3,tbody:!p.getElementsByTagName("tbody").length,htmlSerialize:!!p.getElementsByTagName("link").length,style:/top/.test(e.getAttribute("style")),hrefNormalized:e.getAttribute("href")==="/a",opacity:/^0.55/.test(e.style.opacity),cssFloat:!!e.style.cssFloat,checkOn:i.value==="on",optSelected:h.selected,getSetAttribute:p.className!=="t",enctype:!!c.createElement("form").enctype,html5Clone:c.createElement("nav").cloneNode(!0).outerHTML!=="<:nav>",submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0,pixelMargin:!0},f.boxSoftware=b.boxSoftware=c.compatMode==="CSS1Compat",i.checked=!0,b.noCloneChecked=i.cloneNode(!0).checked,g.disabled=!0,b.optDisabled=!h.disabled;try{delete p.test}catch(r){b.deleteExpando=!1}!p.addEventListener&&p.attachEvent&&p.fireEvent&&(p.attachEvent("onclick",function(){b.noCloneEvent=!1}),p.cloneNode(!0).fireEvent("onclick")),i=c.createElement("input"),i.value="t",i.setAttribute("type","radio"),b.radioValue=i.value==="t",i.setAttribute("checked","checked"),i.setAttribute("name","t"),p.appendChild(i),j=c.createDocumentFragment(),j.appendChild(p.lastChild),b.checkClone=j.cloneNode(!0).cloneNode(!0).lastChild.checked,b.appendChecked=i.checked,j.removeChild(i),j.appendChild(p);if(p.attachEvent)for(n in{submit:1,change:1,focusin:1})m="on"+n,o=m in p,o||(p.setAttribute(m,"return;"),o=typeof p[m]=="function"),b[n+"Bubbles"]=o;j.removeChild(p),j=g=h=p=i=null,f(function(){var d,e,g,h,i,j,l,m,n,q,r,s,t,u=c.getElementsByTagName("body")[0];!u||(m=1,t="padding:0;margin:0;border:",r="position:absolute;top:0;left:0;width:1px;height:1px;",s=t+"0;visibility:hidden;",n="style='"+r+t+"5px solid #000;",q="
"+""+"
",d=c.createElement("div"),d.style.cssText=s+"width:0;height:0;position:static;top:0;margin-top:"+m+"px",u.insertBefore(d,u.firstChild),p=c.createElement("div"),d.appendChild(p),p.innerHTML="
t
",k=p.getElementsByTagName("td"),o=k[0].offsetHeight===0,k[0].style.display="",k[1].style.display="none",b.reliableHiddenOffsets=o&&k[0].offsetHeight===0,a.getComputedStyle&&(p.innerHTML="",l=c.createElement("div"),l.style.width="0",l.style.marginRight="0",p.style.width="2px",p.appendChild(l),b.reliableMarginRight=(parseInt((a.getComputedStyle(l,null)||{marginRight:0}).marginRight,10)||0)===0),typeof p.style.zoom!="undefined"&&(p.innerHTML="",p.style.width=p.style.padding="1px",p.style.border=0,p.style.overflow="hidden",p.style.display="inline",p.style.zoom=1,b.inlineBlockNeedsLayout=p.offsetWidth===3,p.style.display="block",p.style.overflow="visible",p.innerHTML="
",b.shrinkWrapBlocks=p.offsetWidth!==3),p.style.cssText=r+s,p.innerHTML=q,e=p.firstChild,g=e.firstChild,i=e.nextSibling.firstChild.firstChild,j={doesNotAddBorder:g.offsetTop!==5,doesAddBorderForTableAndCells:i.offsetTop===5},g.style.position="fixed",g.style.top="20px",j.fixedPosition=g.offsetTop===20||g.offsetTop===15,g.style.position=g.style.top="",e.style.overflow="hidden",e.style.position="relative",j.subtractsBorderForOverflowNotVisible=g.offsetTop===-5,j.doesNotIncludeMarginInBodyOffset=u.offsetTop!==m,a.getComputedStyle&&(p.style.marginTop="1%",b.pixelMargin=(a.getComputedStyle(p,null)||{marginTop:0}).marginTop!=="1%"),typeof d.style.zoom!="undefined"&&(d.style.zoom=1),u.removeChild(d),l=p=d=null,f.extend(b,j))});return b}();var j=/^(?:\{.*\}|\[.*\])$/,k=/([A-Z])/g;f.extend({cache:{},uuid:0,expando:"jQuery"+(f.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(a){a=a.nodeType?f.cache[a[f.expando]]:a[f.expando];return!!a&&!m(a)},data:function(a,c,d,e){if(!!f.acceptData(a)){var g,h,i,j=f.expando,k=typeof c=="string",l=a.nodeType,m=l?f.cache:a,n=l?a[j]:a[j]&&j,o=c==="events";if((!n||!m[n]||!o&&!e&&!m[n].data)&&k&&d===b)return;n||(l?a[j]=n=++f.uuid:n=j),m[n]||(m[n]={},l||(m[n].toJSON=f.noop));if(typeof c=="object"||typeof c=="function")e?m[n]=f.extend(m[n],c):m[n].data=f.extend(m[n].data,c);g=h=m[n],e||(h.data||(h.data={}),h=h.data),d!==b&&(h[f.camelCase(c)]=d);if(o&&!h[c])return g.events;k?(i=h[c],i==null&&(i=h[f.camelCase(c)])):i=h;return i}},removeData:function(a,b,c){if(!!f.acceptData(a)){var d,e,g,h=f.expando,i=a.nodeType,j=i?f.cache:a,k=i?a[h]:h;if(!j[k])return;if(b){d=c?j[k]:j[k].data;if(d){f.isArray(b)||(b in d?b=[b]:(b=f.camelCase(b),b in d?b=[b]:b=b.split(" ")));for(e=0,g=b.length;e1,null,!1)},removeData:function(a){return this.each(function(){f.removeData(this,a)})}}),f.extend({_mark:function(a,b){a&&(b=(b||"fx")+"mark",f._data(a,b,(f._data(a,b)||0)+1))},_unmark:function(a,b,c){a!==!0&&(c=b,b=a,a=!1);if(b){c=c||"fx";var d=c+"mark",e=a?0:(f._data(b,d)||1)-1;e?f._data(b,d,e):(f.removeData(b,d,!0),n(b,c,"mark"))}},queue:function(a,b,c){var d;if(a){b=(b||"fx")+"queue",d=f._data(a,b),c&&(!d||f.isArray(c)?d=f._data(a,b,f.makeArray(c)):d.push(c));return d||[]}},dequeue:function(a,b){b=b||"fx";var c=f.queue(a,b),d=c.shift(),e={};d==="inprogress"&&(d=c.shift()),d&&(b==="fx"&&c.unshift("inprogress"),f._data(a,b+".run",e),d.call(a,function(){f.dequeue(a,b)},e)),c.length||(f.removeData(a,b+"queue "+b+".run",!0),n(a,b,"queue"))}}),f.fn.extend({queue:function(a,c){var d=2;typeof a!="string"&&(c=a,a="fx",d--);if(arguments.length1)},removeAttr:function(a){return this.each(function(){f.removeAttr(this,a)})},prop:function(a,b){return f.access(this,f.prop,a,b,arguments.length>1)},removeProp:function(a){a=f.propFix[a]||a;return this.each(function(){try{this[a]=b,delete this[a]}catch(c){}})},addClass:function(a){var b,c,d,e,g,h,i;if(f.isFunction(a))return this.each(function(b){f(this).addClass(a.call(this,b,this.className))});if(a&&typeof a=="string"){b=a.split(p);for(c=0,d=this.length;c-1)return!0;return!1},val:function(a){var c,d,e,g=this[0];{if(!!arguments.length){e=f.isFunction(a);return this.each(function(d){var g=f(this),h;if(this.nodeType===1){e?h=a.call(this,d,g.val()):h=a,h==null?h="":typeof h=="number"?h+="":f.isArray(h)&&(h=f.map(h,function(a){return a==null?"":a+""})),c=f.valHooks[this.type]||f.valHooks[this.nodeName.toLowerCase()];if(!c||!("set"in c)||c.set(this,h,"value")===b)this.value=h}})}if(g){c=f.valHooks[g.type]||f.valHooks[g.nodeName.toLowerCase()];if(c&&"get"in c&&(d=c.get(g,"value"))!==b)return d;d=g.value;return typeof d=="string"?d.replace(q,""):d==null?"":d}}}}),f.extend({valHooks:{option:{get:function(a){var b=a.attributes.value;return!b||b.specified?a.value:a.text}},select:{get:function(a){var b,c,d,e,g=a.selectedIndex,h=[],i=a.options,j=a.type==="select-one";if(g<0)return null;c=j?g:0,d=j?g+1:i.length;for(;c=0}),c.length||(a.selectedIndex=-1);return c}}},attrFn:{val:!0,css:!0,html:!0,text:!0,data:!0,width:!0,height:!0,offset:!0},attr:function(a,c,d,e){var g,h,i,j=a.nodeType;if(!!a&&j!==3&&j!==8&&j!==2){if(e&&c in f.attrFn)return f(a)[c](d);if(typeof a.getAttribute=="undefined")return f.prop(a,c,d);i=j!==1||!f.isXMLDoc(a),i&&(c=c.toLowerCase(),h=f.attrHooks[c]||(u.test(c)?x:w));if(d!==b){if(d===null){f.removeAttr(a,c);return}if(h&&"set"in h&&i&&(g=h.set(a,d,c))!==b)return g;a.setAttribute(c,""+d);return d}if(h&&"get"in h&&i&&(g=h.get(a,c))!==null)return g;g=a.getAttribute(c);return g===null?b:g}},removeAttr:function(a,b){var c,d,e,g,h,i=0;if(b&&a.nodeType===1){d=b.toLowerCase().split(p),g=d.length;for(;i=0}})});var z=/^(?:textarea|input|select)$/i,A=/^([^\.]*)?(?:\.(.+))?$/,B=/(?:^|\s)hover(\.\S+)?\b/,C=/^key/,D=/^(?:mouse|contextmenu)|click/,E=/^(?:focusinfocus|focusoutblur)$/,F=/^(\w*)(?:#([\w\-]+))?(?:\.([\w\-]+))?$/,G=function( a){var b=F.exec(a);b&&(b[1]=(b[1]||"").toLowerCase(),b[3]=b[3]&&new RegExp("(?:^|\\s)"+b[3]+"(?:\\s|$)"));return b},H=function(a,b){var c=a.attributes||{};return(!b[1]||a.nodeName.toLowerCase()===b[1])&&(!b[2]||(c.id||{}).value===b[2])&&(!b[3]||b[3].test((c["class"]||{}).value))},I=function(a){return f.event.special.hover?a:a.replace(B,"mouseenter$1 mouseleave$1")};f.event={add:function(a,c,d,e,g){var h,i,j,k,l,m,n,o,p,q,r,s;if(!(a.nodeType===3||a.nodeType===8||!c||!d||!(h=f._data(a)))){d.handler&&(p=d,d=p.handler,g=p.selector),d.guid||(d.guid=f.guid++),j=h.events,j||(h.events=j={}),i=h.handle,i||(h.handle=i=function(a){return typeof f!="undefined"&&(!a||f.event.triggered!==a.type)?f.event.dispatch.apply(i.elem,arguments):b},i.elem=a),c=f.trim(I(c)).split(" ");for(k=0;k=0&&(h=h.slice(0,-1),k=!0),h.indexOf(".")>=0&&(i=h.split("."),h=i.shift(),i.sort());if((!e||f.event.customEvent[h])&&!f.event.global[h])return;c=typeof c=="object"?c[f.expando]?c:new f.Event(h,c):new f.Event(h),c.type=h,c.isTrigger=!0,c.exclusive=k,c.namespace=i.join("."),c.namespace_re=c.namespace?new RegExp("(^|\\.)"+i.join("\\.(?:.*\\.)?")+"(\\.|$)"):null,o=h.indexOf(":")<0?"on"+h:"";if(!e){j=f.cache;for(l in j)j[l].events&&j[l].events[h]&&f.event.trigger(c,d,j[l].handle.elem,!0);return}c.result=b,c.target||(c.target=e),d=d!=null?f.makeArray(d):[],d.unshift(c),p=f.event.special[h]||{};if(p.trigger&&p.trigger.apply(e,d)===!1)return;r=[[e,p.bindType||h]];if(!g&&!p.noBubble&&!f.isWindow(e)){s=p.delegateType||h,m=E.test(s+h)?e:e.parentNode,n=null;for(;m;m=m.parentNode)r.push([m,s]),n=m;n&&n===e.ownerDocument&&r.push([n.defaultView||n.parentWindow||a,s])}for(l=0;le&&j.push({elem:this,matches:d.slice(e)});for(k=0;k0?this.on(b,null,a,c):this.trigger(b)},f.attrFn&&(f.attrFn[b]=!0),C.test(b)&&(f.event.fixHooks[b]=f.event.keyHooks),D.test(b)&&(f.event.fixHooks[b]=f.event.mouseHooks)}),function(){function x(a,b,c,e,f,g){for(var h=0,i=e.length;h0){k=j;break}}j=j[a]}e[h]=k}}}function w(a,b,c,e,f,g){for(var h=0,i=e.length;h+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,d="sizcache"+(Math.random()+"").replace(".",""),e=0,g=Object.prototype.toString,h=!1,i=!0,j=/\\/g,k=/\r\n/g,l=/\W/;[0,0].sort(function(){i=!1;return 0});var m=function(b,d,e,f){e=e||[],d=d||c;var h=d;if(d.nodeType!==1&&d.nodeType!==9)return[];if(!b||typeof b!="string")return e;var i,j,k,l,n,q,r,t,u=!0,v=m.isXML(d),w=[],x=b;do{a.exec(""),i=a.exec(x);if(i){x=i[3],w.push(i[1]);if(i[2]){l=i[3];break}}}while(i);if(w.length>1&&p.exec(b))if(w.length===2&&o.relative[w[0]])j=y(w[0]+w[1],d,f);else{j=o.relative[w[0]]?[d]:m(w.shift(),d);while(w.length)b=w.shift(),o.relative[b]&&(b+=w.shift()),j=y(b,j,f)}else{!f&&w.length>1&&d.nodeType===9&&!v&&o.match.ID.test(w[0])&&!o.match.ID.test(w[w.length-1])&&(n=m.find(w.shift(),d,v),d=n.expr?m.filter(n.expr,n.set)[0]:n.set[0]);if(d){n=f?{expr:w.pop(),set:s(f)}:m.find(w.pop(),w.length===1&&(w[0]==="~"||w[0]==="+")&&d.parentNode?d.parentNode:d,v),j=n.expr?m.filter(n.expr,n.set):n.set,w.length>0?k=s(j):u=!1;while(w.length)q=w.pop(),r=q,o.relative[q]?r=w.pop():q="",r==null&&(r=d),o.relative[q](k,r,v)}else k=w=[]}k||(k=j),k||m.error(q||b);if(g.call(k)==="[object Array]")if(!u)e.push.apply(e,k);else if(d&&d.nodeType===1)for(t=0;k[t]!=null;t++)k[t]&&(k[t]===!0||k[t].nodeType===1&&m.contains(d,k[t]))&&e.push(j[t]);else for(t=0;k[t]!=null;t++)k[t]&&k[t].nodeType===1&&e.push(j[t]);else s(k,e);l&&(m(l,h,e,f),m.uniqueSort(e));return e};m.uniqueSort=function(a){if(u){h=i,a.sort(u);if(h)for(var b=1;b0},m.find=function(a,b,c){var d,e,f,g,h,i;if(!a)return[];for(e=0,f=o.order.length;e":function(a,b){var c,d=typeof b=="string",e=0,f=a.length;if(d&&!l.test(b)){b=b.toLowerCase();for(;e=0)?c||d.push(h):c&&(b[g]=!1));return!1},ID:function(a){return a[1].replace(j,"")},TAG:function(a,b){return a[1].replace(j,"").toLowerCase()},CHILD:function(a){if(a[1]==="nth"){a[2]||m.error(a[0]),a[2]=a[2].replace(/^\+|\s*/g,"");var b=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(a[2]==="even"&&"2n"||a[2]==="odd"&&"2n+1"||!/\D/.test(a[2])&&"0n+"+a[2]||a[2]);a[2]=b[1]+(b[2]||1)-0,a[3]=b[3]-0}else a[2]&&m.error(a[0]);a[0]=e++;return a},ATTR:function(a,b,c,d,e,f){var g=a[1]=a[1].replace(j,"");!f&&o.attrMap[g]&&(a[1]=o.attrMap[g]),a[4]=(a[4]||a[5]||"").replace(j,""),a[2]==="~="&&(a[4]=" "+a[4]+" ");return a},PSEUDO:function(b,c,d,e,f){if(b[1]==="not")if((a.exec(b[3])||"").length>1||/^\w/.test(b[3]))b[3]=m(b[3],null,null,c);else{var g=m.filter(b[3],c,d,!0^f);d||e.push.apply(e,g);return!1}else if(o.match.POS.test(b[0])||o.match.CHILD.test(b[0]))return!0;return b},POS:function(a){a.unshift(!0);return a}},filters:{enabled:function(a){return a.disabled===!1&&a.type!=="hidden"},disabled:function(a){return a.disabled===!0},checked:function(a){return a.checked===!0},selected:function(a){a.parentNode&&a.parentNode.selectedIndex;return a.selected===!0},parent:function(a){return!!a.firstChild},empty:function(a){return!a.firstChild},has:function(a,b,c){return!!m(c[3],a).length},header:function(a){return/h\d/i.test(a.nodeName)},text:function(a){var b=a.getAttribute("type"),c=a.type;return a.nodeName.toLowerCase()==="input"&&"text"===c&&(b===c||b===null)},radio:function(a){return a.nodeName.toLowerCase()==="input"&&"radio"===a.type},checkbox:function(a){return a.nodeName.toLowerCase()==="input"&&"checkbox"===a.type},file:function(a){return a.nodeName.toLowerCase()==="input"&&"file"===a.type},password:function(a){return a.nodeName.toLowerCase()==="input"&&"password"===a.type},submit:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"submit"===a.type},image:function(a){return a.nodeName.toLowerCase()==="input"&&"image"===a.type},reset:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"reset"===a.type},button:function(a){var b=a.nodeName.toLowerCase();return b==="input"&&"button"===a.type||b==="button"},input:function(a){return/input|select|textarea|button/i.test(a.nodeName)},focus:function(a){return a===a.ownerDocument.activeElement}},setFilters:{first:function(a,b){return b===0},last:function(a,b,c,d){return b===d.length-1},even:function(a,b){return b%2===0},odd:function(a,b){return b%2===1},lt:function(a,b,c){return bc[3]-0},nth:function(a,b,c){return c[3]-0===b},eq:function(a,b,c){return c[3]-0===b}},filter:{PSEUDO:function(a,b,c,d){var e=b[1],f=o.filters[e];if(f)return f(a,c,b,d);if(e==="contains")return(a.textContent||a.innerText||n([a])||"").indexOf(b[3])>=0;if(e==="not"){var g=b[3];for(var h=0,i=g.length;h=0}},ID:function(a,b){return a.nodeType===1&&a.getAttribute("id")===b},TAG:function(a,b){return b==="*"&&a.nodeType===1||!!a.nodeName&&a.nodeName.toLowerCase()===b},CLASS:function(a,b){return(" "+(a.className||a.getAttribute("class"))+" ").indexOf(b)>-1},ATTR:function(a,b){var c=b[1],d=m.attr?m.attr(a,c):o.attrHandle[c]?o.attrHandle[c](a):a[c]!=null?a[c]:a.getAttribute(c),e=d+"",f=b[2],g=b[4];return d==null?f==="!=":!f&&m.attr?d!=null:f==="="?e===g:f==="*="?e.indexOf(g)>=0:f==="~="?(" "+e+" ").indexOf(g)>=0:g?f==="!="?e!==g:f==="^="?e.indexOf(g)===0:f==="$="?e.substr(e.length-g.length)===g:f==="|="?e===g||e.substr(0,g.length+1)===g+"-":!1:e&&d!==!1},POS:function(a,b,c,d){var e=b[2],f=o.setFilters[e];if(f)return f(a,c,b,d)}}},p=o.match.POS,q=function(a,b){return"\\"+(b-0+1)};for(var r in o.match)o.match[r]=new RegExp(o.match[r].source+/(?![^\[]*\])(?![^\(]*\))/.source),o.leftMatch[r]=new RegExp(/(^(?:.|\r|\n)*?)/.source+o.match[r].source.replace(/\\(\d+)/g,q));o.match.globalPOS=p;var s=function(a,b){a=Array.prototype.slice.call(a,0);if(b){b.push.apply(b,a);return b}return a};try{Array.prototype.slice.call(c.documentElement.childNodes,0)[0].nodeType}catch(t){s=function(a,b){var c=0,d=b||[];if(g.call(a)==="[object Array]")Array.prototype.push.apply(d,a);else if(typeof a.length=="number")for(var e=a.length;c",e.insertBefore(a,e.firstChild),c.getElementById(d)&&(o.find.ID=function(a,c,d){if(typeof c.getElementById!="undefined"&&!d){var e=c.getElementById(a[1]);return e?e.id===a[1]||typeof e.getAttributeNode!="undefined"&&e.getAttributeNode("id").nodeValue===a[1]?[e]:b:[]}},o.filter.ID=function(a,b){var c=typeof a.getAttributeNode!="undefined"&&a.getAttributeNode("id");return a.nodeType===1&&c&&c.nodeValue===b}),e.removeChild(a),e=a=null}(),function(){var a=c.createElement("div");a.appendChild(c.createComment("")),a.getElementsByTagName("*").length>0&&(o.find.TAG=function(a,b){var c=b.getElementsByTagName(a[1]);if(a[1]==="*"){var d=[];for(var e=0;c[e];e++)c[e].nodeType===1&&d.push(c[e]);c=d}return c}),a.innerHTML="",a.firstChild&&typeof a.firstChild.getAttribute!="undefined"&&a.firstChild.getAttribute("href")!=="#"&&(o.attrHandle.href=function(a){return a.getAttribute("href",2)}),a=null}(),c.querySelectorAll&&function(){var a=m,b=c.createElement("div"),d="__sizzle__";b.innerHTML="

";if(!b.querySelectorAll||b.querySelectorAll(".TEST").length!==0){m=function(b,e,f,g){e=e||c;if(!g&&!m.isXML(e)){var h=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(b);if(h&&(e.nodeType===1||e.nodeType===9)){if(h[1])return s(e.getElementsByTagName(b),f);if(h[2]&&o.find.CLASS&&e.getElementsByClassName)return s(e.getElementsByClassName(h[2]),f)}if(e.nodeType===9){if(b==="body"&&e.body)return s([e.body],f);if(h&&h[3]){var i=e.getElementById(h[3]);if(!i||!i.parentNode)return s([],f);if(i.id===h[3])return s([i],f)}try{return s(e.querySelectorAll(b),f)}catch(j){}}else if(e.nodeType===1&&e.nodeName.toLowerCase()!=="object"){var k=e,l=e.getAttribute("id"),n=l||d,p=e.parentNode,q=/^\s*[+~]/.test(b);l?n=n.replace(/'/g,"\\$&"):e.setAttribute("id",n),q&&p&&(e=e.parentNode);try{if(!q||p)return s(e.querySelectorAll("[id='"+n+"'] "+b),f)}catch(r){}finally{l||k.removeAttribute("id")}}}return a(b,e,f,g)};for(var e in a)m[e]=a[e];b=null}}(),function(){var a=c.documentElement,b=a.matchesSelector||a.mozMatchesSelector||a.webkitMatchesSelector||a.msMatchesSelector;if(b){var d=!b.call(c.createElement("div"),"div"),e=!1;try{b.call(c.documentElement,"[test!='']:sizzle")}catch(f){e=!0}m.matchesSelector=function(a,c){c=c.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!m.isXML(a))try{if(e||!o.match.PSEUDO.test(c)&&!/!=/.test(c)){var f=b.call(a,c);if(f||!d||a.document&&a.document.nodeType!==11)return f}}catch(g){}return m(c,null,null,[a]).length>0}}}(),function(){var a=c.createElement("div");a.innerHTML="
";if(!!a.getElementsByClassName&&a.getElementsByClassName("e").length!==0){a.lastChild.className="e";if(a.getElementsByClassName("e").length===1)return;o.order.splice(1,0,"CLASS"),o.find.CLASS=function(a,b,c){if(typeof b.getElementsByClassName!="undefined"&&!c)return b.getElementsByClassName(a[1])},a=null}}(),c.documentElement.contains?m.contains=function(a,b){return a!==b&&(a.contains?a.contains(b):!0)}:c.documentElement.compareDocumentPosition?m.contains=function(a,b){return!!(a.compareDocumentPosition(b)&16)}:m.contains=function(){return!1},m.isXML=function(a){var b=(a?a.ownerDocument||a:0).documentElement;return b?b.nodeName!=="HTML":!1};var y=function(a,b,c){var d,e=[],f="",g=b.nodeType?[b]:b;while(d=o.match.PSEUDO.exec(a))f+=d[0],a=a.replace(o.match.PSEUDO,"");a=o.relative[a]?a+"*":a;for(var h=0,i=g.length;h0)for(h=g;h=0:f.filter(a,this).length>0:this.filter(a).length>0)},closest:function(a,b){var c=[],d,e,g=this[0];if(f.isArray(a)){var h=1;while(g&&g.ownerDocument&&g!==b){for(d=0;d-1:f.find.matchesSelector(g,a)){c.push(g);break}g=g.parentNode;if(!g||!g.ownerDocument||g===b||g.nodeType===11)break}}c=c.length>1?f.unique(c):c;return this.pushStack(c,"closest",a)},index:function(a){if(!a)return this[0]&&this[0].parentNode?this.prevAll().length:-1;if(typeof a=="string")return f.inArray(this[0],f(a));return f.inArray(a.jquery?a[0]:a,this)},add:function(a,b){var c=typeof a=="string"?f(a,b):f.makeArray(a&&a.nodeType?[a]:a),d=f.merge(this.get(),c);return this.pushStack(S(c[0])||S(d[0])?d:f.unique(d))},andSelf:function(){return this.add(this.prevObject)}}),f.each({parent:function(a){var b=a.parentNode;return b&&b.nodeType!==11?b:null},parents:function(a){return f.dir(a,"parentNode")},parentsUntil:function(a,b,c){return f.dir(a,"parentNode",c)},next:function(a){return f.nth(a,2,"nextSibling")},prev:function(a){return f.nth(a,2,"previousSibling")},nextAll:function(a){return f.dir(a,"nextSibling")},prevAll:function(a){return f.dir(a,"previousSibling")},nextUntil:function(a,b,c){return f.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return f.dir(a,"previousSibling",c)},siblings:function(a){return f.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return f.sibling(a.firstChild)},contents:function(a){return f.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:f.makeArray(a.childNodes)}},function(a,b){f.fn[a]=function(c,d){var e=f.map(this,b,c);L.test(a)||(d=c),d&&typeof d=="string"&&(e=f.filter(d,e)),e=this.length>1&&!R[a]?f.unique(e):e,(this.length>1||N.test(d))&&M.test(a)&&(e=e.reverse());return this.pushStack(e,a,P.call(arguments).join(","))}}),f.extend({filter:function(a,b,c){c&&(a=":not("+a+")");return b.length===1?f.find.matchesSelector(b[0],a)?[b[0]]:[]:f.find.matches(a,b)},dir:function(a,c,d){var e=[],g=a[c];while(g&&g.nodeType!==9&&(d===b||g.nodeType!==1||!f(g).is(d)))g.nodeType===1&&e.push(g),g=g[c];return e},nth:function(a,b,c,d){b=b||1;var e=0;for(;a;a=a[c])if(a.nodeType===1&&++e===b)break;return a},sibling:function(a,b){var c=[];for(;a;a=a.nextSibling)a.nodeType===1&&a!==b&&c.push(a);return c}});var V="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",W=/ jQuery\d+="(?:\d+|null)"/g,X=/^\s+/,Y=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,Z=/<([\w:]+)/,$=/]","i"),bd=/checked\s*(?:[^=]|=\s*.checked.)/i,be=/\/(java|ecma)script/i,bf=/^\s*",""],legend:[1,"
","
"],thead:[1,"","
"],tr:[2,"","
"],td:[3,"","
"],col:[2,"","
"],area:[1,"",""],_default:[0,"",""]},bh=U(c);bg.optgroup=bg.option,bg.tbody=bg.tfoot=bg.colgroup=bg.caption=bg.thead,bg.th=bg.td,f.support.htmlSerialize||(bg._default=[1,"div
","
"]),f.fn.extend({text:function(a){return f.access(this,function(a){return a===b?f.text(this):this.empty().append((this[0]&&this[0].ownerDocument||c).createTextNode(a))},null,a,arguments.length)},wrapAll:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapAll(a.call(this,b))});if(this[0]){var b=f(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&a.firstChild.nodeType===1)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapInner(a.call(this,b))});return this.each(function(){var b=f(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=f.isFunction(a);return this.each(function(c){f(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){f.nodeName(this,"body")||f(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this)});if(arguments.length){var a=f .clean(arguments);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this.nextSibling)});if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,f.clean(arguments));return a}},remove:function(a,b){for(var c=0,d;(d=this[c])!=null;c++)if(!a||f.filter(a,[d]).length)!b&&d.nodeType===1&&(f.cleanData(d.getElementsByTagName("*")),f.cleanData([d])),d.parentNode&&d.parentNode.removeChild(d);return this},empty:function(){for(var a=0,b;(b=this[a])!=null;a++){b.nodeType===1&&f.cleanData(b.getElementsByTagName("*"));while(b.firstChild)b.removeChild(b.firstChild)}return this},clone:function(a,b){a=a==null?!1:a,b=b==null?a:b;return this.map(function(){return f.clone(this,a,b)})},html:function(a){return f.access(this,function(a){var c=this[0]||{},d=0,e=this.length;if(a===b)return c.nodeType===1?c.innerHTML.replace(W,""):null;if(typeof a=="string"&&!ba.test(a)&&(f.support.leadingWhitespace||!X.test(a))&&!bg[(Z.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Y,"<$1>");try{for(;d1&&l0?this.clone(!0):this).get();f(e[h])[b](j),d=d.concat(j)}return this.pushStack(d,a,e.selector)}}),f.extend({clone:function(a,b,c){var d,e,g,h=f.support.html5Clone||f.isXMLDoc(a)||!bc.test("<"+a.nodeName+">")?a.cloneNode(!0):bo(a);if((!f.support.noCloneEvent||!f.support.noCloneChecked)&&(a.nodeType===1||a.nodeType===11)&&!f.isXMLDoc(a)){bk(a,h),d=bl(a),e=bl(h);for(g=0;d[g];++g)e[g]&&bk(d[g],e[g])}if(b){bj(a,h);if(c){d=bl(a),e=bl(h);for(g=0;d[g];++g)bj(d[g],e[g])}}d=e=null;return h},clean:function(a,b,d,e){var g,h,i,j=[];b=b||c,typeof b.createElement=="undefined"&&(b=b.ownerDocument||b[0]&&b[0].ownerDocument||c);for(var k=0,l;(l=a[k])!=null;k++){typeof l=="number"&&(l+="");if(!l)continue;if(typeof l=="string")if(!_.test(l))l=b.createTextNode(l);else{l=l.replace(Y,"<$1>");var m=(Z.exec(l)||["",""])[1].toLowerCase(),n=bg[m]||bg._default,o=n[0],p=b.createElement("div"),q=bh.childNodes,r;b===c?bh.appendChild(p):U(b).appendChild(p),p.innerHTML=n[1]+l+n[2];while(o--)p=p.lastChild;if(!f.support.tbody){var s=$.test(l),t=m==="table"&&!s?p.firstChild&&p.firstChild.childNodes:n[1]===""&&!s?p.childNodes:[];for(i=t.length-1;i>=0;--i)f.nodeName(t[i],"tbody")&&!t[i].childNodes.length&&t[i].parentNode.removeChild(t[i])}!f.support.leadingWhitespace&&X.test(l)&&p.insertBefore(b.createTextNode(X.exec(l)[0]),p.firstChild),l=p.childNodes,p&&(p.parentNode.removeChild(p),q.length>0&&(r=q[q.length-1],r&&r.parentNode&&r.parentNode.removeChild(r)))}var u;if(!f.support.appendChecked)if(l[0]&&typeof (u=l.length)=="number")for(i=0;i1)},f.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=by(a,"opacity");return c===""?"1":c}return a.style.opacity}}},cssNumber:{fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":f.support.cssFloat?"cssFloat":"styleFloat"},style:function(a,c,d,e){if(!!a&&a.nodeType!==3&&a.nodeType!==8&&!!a.style){var g,h,i=f.camelCase(c),j=a.style,k=f.cssHooks[i];c=f.cssProps[i]||i;if(d===b){if(k&&"get"in k&&(g=k.get(a,!1,e))!==b)return g;return j[c]}h=typeof d,h==="string"&&(g=bu.exec(d))&&(d=+(g[1]+1)*+g[2]+parseFloat(f.css(a,c)),h="number");if(d==null||h==="number"&&isNaN(d))return;h==="number"&&!f.cssNumber[i]&&(d+="px");if(!k||!("set"in k)||(d=k.set(a,d))!==b)try{j[c]=d}catch(l){}}},css:function(a,c,d){var e,g;c=f.camelCase(c),g=f.cssHooks[c],c=f.cssProps[c]||c,c==="cssFloat"&&(c="float");if(g&&"get"in g&&(e=g.get(a,!0,d))!==b)return e;if(by)return by(a,c)},swap:function(a,b,c){var d={},e,f;for(f in b)d[f]=a.style[f],a.style[f]=b[f];e=c.call(a);for(f in b)a.style[f]=d[f];return e}}),f.curCSS=f.css,c.defaultView&&c.defaultView.getComputedStyle&&(bz=function(a,b){var c,d,e,g,h=a.style;b=b.replace(br,"-$1").toLowerCase(),(d=a.ownerDocument.defaultView)&&(e=d.getComputedStyle(a,null))&&(c=e.getPropertyValue(b),c===""&&!f.contains(a.ownerDocument.documentElement,a)&&(c=f.style(a,b))),!f.support.pixelMargin&&e&&bv.test(b)&&bt.test(c)&&(g=h.width,h.width=c,c=e.width,h.width=g);return c}),c.documentElement.currentStyle&&(bA=function(a,b){var c,d,e,f=a.currentStyle&&a.currentStyle[b],g=a.style;f==null&&g&&(e=g[b])&&(f=e),bt.test(f)&&(c=g.left,d=a.runtimeStyle&&a.runtimeStyle.left,d&&(a.runtimeStyle.left=a.currentStyle.left),g.left=b==="fontSize"?"1em":f,f=g.pixelLeft+"px",g.left=c,d&&(a.runtimeStyle.left=d));return f===""?"auto":f}),by=bz||bA,f.each(["height","width"],function(a,b){f.cssHooks[b]={get:function(a,c,d){if(c)return a.offsetWidth!==0?bB(a,b,d):f.swap(a,bw,function(){return bB(a,b,d)})},set:function(a,b){return bs.test(b)?b+"px":b}}}),f.support.opacity||(f.cssHooks.opacity={get:function(a,b){return bq.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=f.isNumeric(b)?"alpha(opacity="+b*100+")":"",g=d&&d.filter||c.filter||"";c.zoom=1;if(b>=1&&f.trim(g.replace(bp,""))===""){c.removeAttribute("filter");if(d&&!d.filter)return}c.filter=bp.test(g)?g.replace(bp,e):g+" "+e}}),f(function(){f.support.reliableMarginRight||(f.cssHooks.marginRight={get:function(a,b){return f.swap(a,{display:"inline-block"},function(){return b?by(a,"margin-right"):a.style.marginRight})}})}),f.expr&&f.expr.filters&&(f.expr.filters.hidden=function(a){var b=a.offsetWidth,c=a.offsetHeight;return b===0&&c===0||!f.support.reliableHiddenOffsets&&(a.style&&a.style.display||f.css(a,"display"))==="none"},f.expr.filters.visible=function(a){return!f.expr.filters.hidden(a)}),f.each({margin:"",padding:"",border:"Width"},function(a,b){f.cssHooks[a+b]={expand:function(c){var d,e=typeof c=="string"?c.split(" "):[c],f={};for(d=0;d<4;d++)f[a+bx[d]+b]=e[d]||e[d-2]||e[0];return f}}});var bC=/%20/g,bD=/\[\]$/,bE=/\r?\n/g,bF=/#.*$/,bG=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,bH=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,bI=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,bJ=/^(?:GET|HEAD)$/,bK=/^\/\//,bL=/\?/,bM=/)<[^<]*)*<\/script>/gi,bN=/^(?:select|textarea)/i,bO=/\s+/,bP=/([?&])_=[^&]*/,bQ=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,bR=f.fn.load,bS={},bT={},bU,bV,bW=["*/"]+["*"];try{bU=e.href}catch(bX){bU=c.createElement("a"),bU.href="",bU=bU.href}bV=bQ.exec(bU.toLowerCase())||[],f.fn.extend({load:function(a,c,d){if(typeof a!="string"&&bR)return bR.apply(this,arguments);if(!this.length)return this;var e=a.indexOf(" ");if(e>=0){var g=a.slice(e,a.length);a=a.slice(0,e)}var h="GET";c&&(f.isFunction(c)?(d=c,c=b):typeof c=="object"&&(c=f.param(c,f.ajaxSettings.traditional),h="POST"));var i=this;f.ajax({url:a,type:h,dataType:"html",data:c,complete:function(a,b,c){c=a.responseText,a.isResolved()&&(a.done(function(a){c=a}),i.html(g?f("
").append(c.replace(bM,"")).find(g):c)),d&&i.each(d,[c,b,a])}});return this},serialize:function(){return f.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?f.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||bN.test(this.nodeName)||bH.test(this.type))}).map(function(a,b){var c=f(this).val();return c==null?null:f.isArray(c)?f.map(c,function(a,c){return{name:b.name,value:a.replace(bE,"\r\n")}}):{name:b.name,value:c.replace(bE,"\r\n")}}).get()}}),f.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){f.fn[b]=function(a){return this.on(b,a)}}),f.each(["get","post"],function(a,c){f[c]=function(a,d,e,g){f.isFunction(d)&&(g=g||e,e=d,d=b);return f.ajax({type:c,url:a,data:d,success:e,dataType:g})}}),f.extend({getScript:function(a,c){return f.get(a,b,c,"script")},getJSON:function(a,b,c){return f.get(a,b,c,"json")},ajaxSetup:function(a,b){b?b$(a,f.ajaxSettings):(b=a,a=f.ajaxSettings),b$(a,b);return a},ajaxSettings:{url:bU,isLocal:bI.test(bV[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded; charset=UTF-8",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":bW},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":a.String,"text html":!0,"text json":f.parseJSON,"text xml":f.parseXML},flatOptions:{context:!0,url:!0}},ajaxPrefilter:bY(bS),ajaxTransport:bY(bT),ajax:function(a,c){function w(a,c,l,m){if(s!==2){s=2,q&&clearTimeout(q),p=b,n=m||"",v.readyState=a>0?4:0;var o,r,u,w=c,x=l?ca(d,v,l):b,y,z;if(a>=200&&a<300||a===304){if(d.ifModified){if(y=v.getResponseHeader("Last-Modified"))f.lastModified[k]=y;if(z=v.getResponseHeader("Etag"))f.etag[k]=z}if(a===304)w="notmodified",o=!0;else try{r=cb(d,x),w="success",o=!0}catch(A){w="parsererror",u=A}}else{u=w;if(!w||a)w="error",a<0&&(a=0)}v.status=a,v.statusText=""+(c||w),o?h.resolveWith(e,[r,w,v]):h.rejectWith(e,[v,w,u]),v.statusCode(j),j=b,t&&g.trigger("ajax"+(o?"Success":"Error"),[v,d,o?r:u]),i.fireWith(e,[v,w]),t&&(g.trigger("ajaxComplete",[v,d]),--f.active||f.event.trigger("ajaxStop"))}}typeof a=="object"&&(c=a,a=b),c=c||{};var d=f.ajaxSetup({},c),e=d.context||d,g=e!==d&&(e.nodeType||e instanceof f)?f(e):f.event,h=f.Deferred(),i=f.Callbacks("once memory"),j=d.statusCode||{},k,l={},m={},n,o,p,q,r,s=0,t,u,v={readyState:0,setRequestHeader:function(a,b){if(!s){var c=a.toLowerCase();a=m[c]=m[c]||a,l[a]=b}return this},getAllResponseHeaders:function(){return s===2?n:null},getResponseHeader:function(a){var c;if(s===2){if(!o){o={};while(c=bG.exec(n))o[c[1].toLowerCase()]=c[2]}c=o[a.toLowerCase()]}return c===b?null:c},overrideMimeType:function(a){s||(d.mimeType=a);return this},abort:function(a){a=a||"abort",p&&p.abort(a),w(0,a);return this}};h.promise(v),v.success=v.done,v.error=v.fail,v.complete=i.add,v.statusCode=function(a){if(a){var b;if(s<2)for(b in a)j[b]=[j[b],a[b]];else b=a[v.status],v.then(b,b)}return this},d.url=((a||d.url)+"").replace(bF,"").replace(bK,bV[1]+"//"),d.dataTypes=f.trim(d.dataType||"*").toLowerCase().split(bO),d.crossDomain==null&&(r=bQ.exec(d.url.toLowerCase()),d.crossDomain=!(!r||r[1]==bV[1]&&r[2]==bV[2]&&(r[3]||(r[1]==="http:"?80:443))==(bV[3]||(bV[1]==="http:"?80:443)))),d.data&&d.processData&&typeof d.data!="string"&&(d.data=f.param(d.data,d.traditional)),bZ(bS,d,c,v);if(s===2)return!1;t=d.global,d.type=d.type.toUpperCase(),d.hasContent=!bJ.test(d.type),t&&f.active++===0&&f.event.trigger("ajaxStart");if(!d.hasContent){d.data&&(d.url+=(bL.test(d.url)?"&":"?")+d.data,delete d.data),k=d.url;if(d.cache===!1){var x=f.now(),y=d.url.replace(bP,"$1_="+x);d.url=y+(y===d.url?(bL.test(d.url)?"&":"?")+"_="+x:"")}}(d.data&&d.hasContent&&d.contentType!==!1||c.contentType)&&v.setRequestHeader("Content-Type",d.contentType),d.ifModified&&(k=k||d.url,f.lastModified[k]&&v.setRequestHeader("If-Modified-Since",f.lastModified[k]),f.etag[k]&&v.setRequestHeader("If-None-Match",f.etag[k])),v.setRequestHeader("Accept",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+(d.dataTypes[0]!=="*"?", "+bW+"; q=0.01":""):d.accepts["*"]);for(u in d.headers)v.setRequestHeader(u,d.headers[u]);if(d.beforeSend&&(d.beforeSend.call(e,v,d)===!1||s===2)){v.abort();return!1}for(u in{success:1,error:1,complete:1})v[u](d[u]);p=bZ(bT,d,c,v);if(!p)w(-1,"No Transport");else{v.readyState=1,t&&g.trigger("ajaxSend",[v,d]),d.async&&d.timeout>0&&(q=setTimeout(function(){v.abort("timeout")},d.timeout));try{s=1,p.send(l,w)}catch(z){if(s<2)w(-1,z);else throw z}}return v},param:function(a,c){var d=[],e=function(a,b){b=f.isFunction(b)?b():b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};c===b&&(c=f.ajaxSettings.traditional);if(f.isArray(a)||a.jquery&&!f.isPlainObject(a))f.each(a,function(){e(this.name,this.value)});else for(var g in a)b_(g,a[g],c,e);return d.join("&").replace(bC,"+")}}),f.extend({active:0,lastModified:{},etag:{}});var cc=f.now(),cd=/(\=)\?(&|$)|\?\?/i;f.ajaxSetup({jsonp:"callback",jsonpCallback:function(){return f.expando+"_"+cc++}}),f.ajaxPrefilter("json jsonp",function(b,c,d){var e=typeof b.data=="string"&&/^application\/x\-www\-form\-urlencoded/.test(b.contentType);if(b.dataTypes[0]==="jsonp"||b.jsonp!==!1&&(cd.test(b.url)||e&&cd.test(b.data))){var g,h=b.jsonpCallback=f.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,i=a[h],j=b.url,k=b.data,l="$1"+h+"$2";b.jsonp!==!1&&(j=j.replace(cd,l),b.url===j&&(e&&(k=k.replace(cd,l)),b.data===k&&(j+=(/\?/.test(j)?"&":"?")+b.jsonp+"="+h))),b.url=j,b.data=k,a[h]=function(a){g=[a]},d.always(function(){a[h]=i,g&&f.isFunction(i)&&a[h](g[0])}),b.converters["script json"]=function(){g||f.error(h+" was not called");return g[0]},b.dataTypes[0]="json";return"script"}}),f.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(a){f.globalEval(a);return a}}}),f.ajaxPrefilter("script",function(a){a.cache===b&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),f.ajaxTransport("script",function(a){if(a.crossDomain){var d,e=c.head||c.getElementsByTagName("head")[0]||c.documentElement;return{send:function(f,g){d=c.createElement("script"),d.async="async",a.scriptCharset&&(d.charset=a.scriptCharset),d.src=a.url,d.onload=d.onreadystatechange=function(a,c){if(c||!d.readyState||/loaded|complete/.test(d.readyState))d.onload=d.onreadystatechange=null,e&&d.parentNode&&e.removeChild(d),d=b,c||g(200,"success")},e.insertBefore(d,e.firstChild)},abort:function(){d&&d.onload(0,1)}}}});var ce=a.ActiveXObject?function(){for(var a in cg)cg[a](0,1)}:!1,cf=0,cg;f.ajaxSettings.xhr=a.ActiveXObject?function(){return!this.isLocal&&ch()||ci()}:ch,function(a){f.extend(f.support,{ajax:!!a,cors:!!a&&"withCredentials"in a})}(f.ajaxSettings.xhr()),f.support.ajax&&f.ajaxTransport(function(c){if(!c.crossDomain||f.support.cors){var d;return{send:function(e,g){var h=c.xhr(),i,j;c.username?h.open(c.type,c.url,c.async,c.username,c.password):h.open(c.type,c.url,c.async);if(c.xhrFields)for(j in c.xhrFields)h[j]=c.xhrFields[j];c.mimeType&&h.overrideMimeType&&h.overrideMimeType(c.mimeType),!c.crossDomain&&!e["X-Requested-With"]&&(e["X-Requested-With"]="XMLHttpRequest");try{for(j in e)h.setRequestHeader(j,e[j])}catch(k){}h.send(c.hasContent&&c.data||null),d=function(a,e){var j,k,l,m,n;try{if(d&&(e||h.readyState===4)){d=b,i&&(h.onreadystatechange=f.noop,ce&&delete cg[i]);if(e)h.readyState!==4&&h.abort();else{j=h.status,l=h.getAllResponseHeaders(),m={},n=h.responseXML,n&&n.documentElement&&(m.xml=n);try{m.text=h.responseText}catch(a){}try{k=h.statusText}catch(o){k=""}!j&&c.isLocal&&!c.crossDomain?j=m.text?200:404:j===1223&&(j=204)}}}catch(p){e||g(-1,p)}m&&g(j,k,m,l)},!c.async||h.readyState===4?d():(i=++cf,ce&&(cg||(cg={},f(a).unload(ce)),cg[i]=d),h.onreadystatechange=d)},abort:function(){d&&d(0,1)}}}});var cj={},ck,cl,cm=/^(?:toggle|show|hide)$/,cn=/^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,co,cp=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]],cq;f.fn.extend({show:function(a,b,c){var d,e;if(a||a===0)return this.animate(ct("show",3),a,b,c);for(var g=0,h=this.length;g=i.duration+this.startTime){this.now=this.end,this.pos=this.state=1,this.update(),i.animatedProperties[this.prop]=!0;for(b in i.animatedProperties)i.animatedProperties[b]!==!0&&(g=!1);if(g){i.overflow!=null&&!f.support.shrinkWrapBlocks&&f.each(["","X","Y"],function(a,b){h.style["overflow"+b]=i.overflow[a]}),i.hide&&f(h).hide();if(i.hide||i.show)for(b in i.animatedProperties)f.style(h,b,i.orig[b]),f.removeData(h,"fxshow"+b,!0),f.removeData(h,"toggle"+b,!0);d=i.complete,d&&(i.complete=!1,d.call(h))}return!1}i.duration==Infinity?this.now=e:(c=e-this.startTime,this.state=c/i.duration,this.pos=f.easing[i.animatedProperties[this.prop]](this.state,c,0,1,i.duration),this.now=this.start+(this.end-this.start)*this.pos),this.update();return!0}},f.extend(f.fx,{tick:function(){var a,b=f.timers,c=0;for(;c-1,k={},l={},m,n;j?(l=e.position(),m=l.top,n=l.left):(m=parseFloat(h)||0,n=parseFloat(i)||0),f.isFunction(b)&&(b=b.call(a,c,g)),b.top!=null&&(k.top=b.top-g.top+m),b.left!=null&&(k.left=b.left-g.left+n),"using"in b?b.using.call(a,k):e.css(k)}},f.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),c=this.offset(),d=cx.test(b[0].nodeName)?{top:0,left:0}:b.offset();c.top-=parseFloat(f.css(a,"marginTop"))||0,c.left-=parseFloat(f.css(a,"marginLeft"))||0,d.top+=parseFloat(f.css(b[0],"borderTopWidth"))||0,d.left+=parseFloat(f.css(b[0],"borderLeftWidth"))||0;return{top:c.top-d.top,left:c.left-d.left}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||c.body;while(a&&!cx.test(a.nodeName)&&f.css(a,"position")==="static")a=a.offsetParent;return a})}}),f.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(a,c){var d=/Y/.test(c);f.fn[a]=function(e){return f.access(this,function(a,e,g){var h=cy(a);if(g===b)return h?c in h?h[c]:f.support.boxSoftware&&h.document.documentElement[e]||h.document.body[e]:a[e];h?h.scrollTo(d?f(h).scrollLeft():g,d?g:f(h).scrollTop()):a[e]=g},a,e,arguments.length,null)}}),f.each({Height:"height",Width:"width"},function(a,c){var d="client"+a,e="scroll"+a,g="offset"+a;f.fn["inner"+a]=function(){var a=this[0];return a?a.style?parseFloat(f.css(a,c,"padding")):this[c]():null},f.fn["outer"+a]=function(a){var b=this[0];return b?b.style?parseFloat(f.css(b,c,a?"margin":"border")):this[c]():null},f.fn[c]=function(a){return f.access(this,function(a,c,h){var i,j,k,l;if(f.isWindow(a)){i=a.document,j=i.documentElement[d];return f.support.boxSoftware&&j||i.body&&i.body[d]||j}if(a.nodeType===9){i=a.documentElement;if(i[d]>=i[e])return i[d];return Math.max(a.body[e],i[e],a.body[g],i[g])}if(h===b){k=f.css(a,c),l=parseFloat(k);return f.isNumeric(l)?l:k}f(a).css(c,h)},c,a,arguments.length,null)}}),a.jQuery=a.$=f,typeof define=="function"&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return f})})(window); ;window.Modernizr=function(a,b,c){function D(a,b){var c=a.charAt(0).toUpperCase()+a.substr(1),d=(a+" "+p.join(c+" ")+c).split(" ");return C(d,b)}function C(a,b){for(var d in a)if(k[a[d]]!==c)return b=="pfx"?a[d]:!0;return!1}function B(a,b){return!!~(""+a).indexOf(b)}function A(a,b){return typeof a===b}function z(a,b){return y(o.join(a+";")+(b||""))}function y(a){k.cssText=a}var d="2.0.6",e={},f=!0,g=b.documentElement,h=b.head||b.getElementsByTagName("head")[0],i="modernizr",j=b.createElement(i),k=j.style,l,m=":)",n=Object.prototype.toString,o=" -webkit- -moz- -o- -ms- -khtml- ".split(" "),p="Webkit Moz O ms Khtml".split(" "),q={},r={},s={},t=[],u=function(a,c,d,e){var f,h,j,k=b.createElement("div");if(parseInt(d,10))while(d--)j=b.createElement("div"),j.id=e?e[d]:i+(d+1),k.appendChild(j);f=["­",""].join(""),k.id=i,k.innerHTML+=f,g.appendChild(k),h=c(k,a),k.parentNode.removeChild(k);return!!h},v,w={}.hasOwnProperty,x;!A(w,c)&&!A(w.call,c)?x=function(a,b){return w.call(a,b)}:x=function(a,b){return b in a&&A(a.constructor.prototype[b],c)};var E=function(a,c){var d=a.join(""),f=c.length;u(d,function(a,c){var d=b.styleSheets[b.styleSheets.length-1],g=d.cssRules&&d.cssRules[0]?d.cssRules[0].cssText:d.cssText||"",h=a.childNodes,i={};while(f--)i[h[f].id]=h[f];e.csstransforms3d=i.csstransforms3d.offsetLeft===9,e.generatedcontent=i.generatedcontent.offsetHeight>=1,e.fontface=/src/i.test(g)&&g.indexOf(c.split(" ")[0])===0},f,c)}(['@font-face {font-family:"font";src:url("https://")}',["@media (",o.join("transform-3d),("),i,")","{#csstransforms3d{left:9px;position:absolute}}"].join(""),['#generatedcontent:after{content:"',m,'";visibility:hidden}'].join("")],["fontface","csstransforms3d","generatedcontent"]);q.flexbox=function(){function c(a,b,c,d){a.style.cssText=o.join(b+":"+c+";")+(d||"")}function a(a,b,c,d){b+=":",a.style.cssText=(b+o.join(c+";"+b)).slice(0,-b.length)+(d||"")}var d=b.createElement("div"),e=b.createElement("div");a(d,"display","box","width:42px;padding:0;"),c(e,"box-flex","1","width:10px;"),d.appendChild(e),g.appendChild(d);var f=e.offsetWidth===42;d.removeChild(e),g.removeChild(d);return f},q.rgba=function(){y("background-color:rgba(150,255,150,.5)");return B(k.backgroundColor,"rgba")},q.hsla=function(){y("background-color:hsla(120,40%,100%,.5)");return B(k.backgroundColor,"rgba")||B(k.backgroundColor,"hsla")},q.multiplebgs=function(){y("background:url(https://),url(https://),red url(https://)");return/(url\s*\(.*?){3}/.test(k.background)},q.backgroundsize=function(){return D("backgroundSize")},q.borderimage=function(){return D("borderImage")},q.borderradius=function(){return D("borderRadius")},q.boxshadow=function(){return D("boxShadow")},q.textshadow=function(){return b.createElement("div").style.textShadow===""},q.opacity=function(){z("opacity:.55");return/^0.55$/.test(k.opacity)},q.cssanimations=function(){return D("animationName")},q.csscolumns=function(){return D("columnCount")},q.cssgradients=function(){var a="background-image:",b="gradient(linear,left top,right bottom,from(#9f9),to(white));",c="linear-gradient(left top,#9f9, white);";y((a+o.join(b+a)+o.join(c+a)).slice(0,-a.length));return B(k.backgroundImage,"gradient")},q.cssreflections=function(){return D("boxReflect")},q.csstransforms=function(){return!!C(["transformProperty","WebkitTransform","MozTransform","OTransform","msTransform"])},q.csstransforms3d=function(){var a=!!C(["perspectiveProperty","WebkitPerspective","MozPerspective","OPerspective","msPerspective"]);a&&"webkitPerspective"in g.style&&(a=e.csstransforms3d);return a},q.csstransitions=function(){return D("transitionProperty")},q.fontface=function(){return e.fontface},q.generatedcontent=function(){return e.generatedcontent};for(var F in q)x(q,F)&&(v=F.toLowerCase(),e[v]=q[F](),t.push((e[v]?"":"no-")+v));y(""),j=l=null,a.attachEvent&&function(){var a=b.createElement("div");a.innerHTML="";return a.childNodes.length!==1}()&&function(a,b){function s(a){var b=-1;while(++b »'].join('')), over=function(){ var $$=$(this), menu=getMenu($$); clearTimeout(menu.sfTimer); $$.showSuperfishUl().siblings().hideSuperfishUl(); }, out=function(){ var $$=$(this), menu=getMenu($$), o=sf.op; clearTimeout(menu.sfTimer); menu.sfTimer=setTimeout(function(){ o.retainPath=($.inArray($$[0],o.$path)>-1); $$.hideSuperfishUl(); if(o.$path.length&&$$.parents(['li.',o.hoverClass].join('')).length<1){over.call(o.$path);}},o.delay); }, getMenu=function($menu){ var menu=$menu.parents(['ul.',c.menuClass,':first'].join(''))[0]; sf.op=sf.o[menu.serial]; return menu; }, addArrow=function($a){ $a.addClass(c.anchorClass).append($arrow.clone()); }; return this.each(function(){ var s=this.serial=sf.o.length; var o=$.extend({},sf.defaults,op); o.$path=$('li.'+o.pathClass,this).slice(0,o.pathLevels).each(function(){ $(this).addClass([o.hoverClass,c.bcClass].join(' ')) .filter('li:has(ul)').removeClass(o.pathClass); }); sf.o[s]=sf.op=o; $('li:has(ul)',this)[($.fn.hoverIntent&&!o.disableHI) ? 'hoverIntent':'hover'](over,out).each(function(){ if(o.autoArrows) addArrow($('>a:first-child',this)); }) .not('.'+c.bcClass) .hideSuperfishUl(); var $a=$('a',this); $a.each(function(i){ var $li=$a.eq(i).parents('li'); $a.eq(i).focus(function(){over.call($li);}).blur(function(){out.call($li);}); }); o.onInit.call(this); }).each(function(){ var menuClasses=[c.menuClass]; if(sf.op.dropShadows&&!($.browser.msie&&$.browser.version < 7)) menuClasses.push(c.shadowClass); $(this).addClass(menuClasses.join(' ')); }); }; var sf=$.fn.superfish; sf.o=[]; sf.op={}; sf.IE7fix=function(){ var o=sf.op; if($.browser.msie&&$.browser.version > 6&&o.dropShadows&&o.animation.opacity!=undefined) this.toggleClass(sf.c.shadowClass+'-off'); }; sf.c={ bcClass:'sf-breadcrumb', menuClass:'sf-js-enabled', anchorClass:'sf-with-ul', arrowClass:'sf-sub-indicator', shadowClass:'sf-shadow' }; sf.defaults={ hoverClass:'sfHover', pathClass:'overideThisToUse', pathLevels:1, delay:800, animation:{opacity:'show'}, speed:'normal', autoArrows:true, dropShadows:true, disableHI:false, onInit:function(){}, onBeforeShow: function(){}, onShow:function(){}, onHide:function(){}}; $.fn.extend({ hideSuperfishUl:function(){ var o=sf.op, not=(o.retainPath===true) ? o.$path:''; o.retainPath=false; var $ul=$(['li.',o.hoverClass].join(''),this).add(this).not(not).removeClass(o.hoverClass) .find('>ul').hide().css('visibility','hidden'); o.onHide.call($ul); return this; }, showSuperfishUl:function(){ var o=sf.op, sh=sf.c.shadowClass+'-off', $ul=this.addClass(o.hoverClass) .find('>ul:hidden').css('visibility','visible'); sf.IE7fix.call($ul); o.onBeforeShow.call($ul); $ul.animate(o.animation,o.speed,function(){ sf.IE7fix.call($ul); o.onShow.call($ul); }); return this; }}); })(jQuery); jQuery.easing['jswing']=jQuery.easing['swing']; jQuery.extend(jQuery.easing, { def: 'easeOutQuad', swing: function (x, t, b, c, d){ return jQuery.easing[jQuery.easing.def](x, t, b, c, d); }, easeInQuad: function (x, t, b, c, d){ return c*(t/=d)*t + b; }, easeOutQuad: function (x, t, b, c, d){ return -c *(t/=d)*(t-2) + b; }, easeInOutQuad: function (x, t, b, c, d){ if((t/=d/2) < 1) return c/2*t*t + b; return -c/2 * ((--t)*(t-2) - 1) + b; }, easeInCubic: function (x, t, b, c, d){ return c*(t/=d)*t*t + b; }, easeOutCubic: function (x, t, b, c, d){ return c*((t=t/d-1)*t*t + 1) + b; }, easeInOutCubic: function (x, t, b, c, d){ if((t/=d/2) < 1) return c/2*t*t*t + b; return c/2*((t-=2)*t*t + 2) + b; }, easeInQuart: function (x, t, b, c, d){ return c*(t/=d)*t*t*t + b; }, easeOutQuart: function (x, t, b, c, d){ return -c * ((t=t/d-1)*t*t*t - 1) + b; }, easeInOutQuart: function (x, t, b, c, d){ if((t/=d/2) < 1) return c/2*t*t*t*t + b; return -c/2 * ((t-=2)*t*t*t - 2) + b; }, easeInQuint: function (x, t, b, c, d){ return c*(t/=d)*t*t*t*t + b; }, easeOutQuint: function (x, t, b, c, d){ return c*((t=t/d-1)*t*t*t*t + 1) + b; }, easeInOutQuint: function (x, t, b, c, d){ if((t/=d/2) < 1) return c/2*t*t*t*t*t + b; return c/2*((t-=2)*t*t*t*t + 2) + b; }, easeInSine: function (x, t, b, c, d){ return -c * Math.cos(t/d * (Math.PI/2)) + c + b; }, easeOutSine: function (x, t, b, c, d){ return c * Math.sin(t/d * (Math.PI/2)) + b; }, easeInOutSine: function (x, t, b, c, d){ return -c/2 * (Math.cos(Math.PI*t/d) - 1) + b; }, easeInExpo: function (x, t, b, c, d){ return (t==0) ? b:c * Math.pow(2, 10 * (t/d - 1)) + b; }, easeOutExpo: function (x, t, b, c, d){ return (t==d) ? b+c:c * (-Math.pow(2, -10 * t/d) + 1) + b; }, easeInOutExpo: function (x, t, b, c, d){ if(t==0) return b; if(t==d) return b+c; if((t/=d/2) < 1) return c/2 * Math.pow(2, 10 * (t - 1)) + b; return c/2 * (-Math.pow(2, -10 * --t) + 2) + b; }, easeInCirc: function (x, t, b, c, d){ return -c * (Math.sqrt(1 - (t/=d)*t) - 1) + b; }, easeOutCirc: function (x, t, b, c, d){ return c * Math.sqrt(1 - (t=t/d-1)*t) + b; }, easeInOutCirc: function (x, t, b, c, d){ if((t/=d/2) < 1) return -c/2 * (Math.sqrt(1 - t*t) - 1) + b; return c/2 * (Math.sqrt(1 - (t-=2)*t) + 1) + b; }, easeInElastic: function (x, t, b, c, d){ var s=1.70158;var p=0;var a=c; if(t==0) return b; if((t/=d)==1) return b+c; if(!p) p=d*.3; if(a < Math.abs(c)){ a=c; var s=p/4; } else var s=p/(2*Math.PI) * Math.asin (c/a); return -(a*Math.pow(2,10*(t-=1)) * Math.sin((t*d-s)*(2*Math.PI)/p)) + b; }, easeOutElastic: function (x, t, b, c, d){ var s=1.70158;var p=0;var a=c; if(t==0) return b; if((t/=d)==1) return b+c; if(!p) p=d*.3; if(a < Math.abs(c)){ a=c; var s=p/4; } else var s=p/(2*Math.PI) * Math.asin (c/a); return a*Math.pow(2,-10*t) * Math.sin((t*d-s)*(2*Math.PI)/p) + c + b; }, easeInOutElastic: function (x, t, b, c, d){ var s=1.70158;var p=0;var a=c; if(t==0) return b; if((t/=d/2)==2) return b+c; if(!p) p=d*(.3*1.5); if(a < Math.abs(c)){ a=c; var s=p/4; } else var s=p/(2*Math.PI) * Math.asin (c/a); if(t < 1) return -.5*(a*Math.pow(2,10*(t-=1)) * Math.sin((t*d-s)*(2*Math.PI)/p)) + b; return a*Math.pow(2,-10*(t-=1)) * Math.sin((t*d-s)*(2*Math.PI)/p)*.5 + c + b; }, easeInBack: function (x, t, b, c, d, s){ if(s==undefined) s=1.70158; return c*(t/=d)*t*((s+1)*t - s) + b; }, easeOutBack: function (x, t, b, c, d, s){ if(s==undefined) s=1.70158; return c*((t=t/d-1)*t*((s+1)*t + s) + 1) + b; }, easeInOutBack: function (x, t, b, c, d, s){ if(s==undefined) s=1.70158; if((t/=d/2) < 1) return c/2*(t*t*(((s*=(1.525))+1)*t - s)) + b; return c/2*((t-=2)*t*(((s*=(1.525))+1)*t + s) + 2) + b; }, easeInBounce: function (x, t, b, c, d){ return c - jQuery.easing.easeOutBounce (x, d-t, 0, c, d) + b; }, easeOutBounce: function (x, t, b, c, d){ if((t/=d) < (1/2.75)){ return c*(7.5625*t*t) + b; }else if(t < (2/2.75)){ return c*(7.5625*(t-=(1.5/2.75))*t + .75) + b; }else if(t < (2.5/2.75)){ return c*(7.5625*(t-=(2.25/2.75))*t + .9375) + b; }else{ return c*(7.5625*(t-=(2.625/2.75))*t + .984375) + b; }}, easeInOutBounce: function (x, t, b, c, d){ if(t < d/2) return jQuery.easing.easeInBounce (x, t*2, 0, c, d) * .5 + b; return jQuery.easing.easeOutBounce (x, t*2-d, 0, c, d) * .5 + c*.5 + b; }}); (function(a){a.tools=a.tools||{version:"v1.2.6"},a.tools.tooltip={conf:{effect:"toggle",fadeOutSpeed:"fast",predelay:0,delay:30,opacity:1,tip:0,fadeIE:!1,position:["top","center"],offset:[0,0],relative:!1,cancelDefault:!0,events:{def:"mouseenter,mouseleave",input:"focus,blur",widget:"focus mouseenter,blur mouseleave",tooltip:"mouseenter,mouseleave"},layout:"
",tipClass:"tooltip"},addEffect:function(a,c,d){b[a]=[c,d]}};var b={toggle:[function(a){var b=this.getConf(),c=this.getTip(),d=b.opacity;d<1&&c.css({opacity:d}),c.show(),a.call()},function(a){this.getTip().hide(),a.call()}],fade:[function(b){var c=this.getConf();!a.browser.msie||c.fadeIE?this.getTip().fadeTo(c.fadeInSpeed,c.opacity,b):(this.getTip().show(),b())},function(b){var c=this.getConf();!a.browser.msie||c.fadeIE?this.getTip().fadeOut(c.fadeOutSpeed,b):(this.getTip().hide(),b())}]};function c(b,c,d){var e=d.relative?b.position().top:b.offset().top,f=d.relative?b.position().left:b.offset().left,g=d.position[0];e-=c.outerHeight()-d.offset[0],f+=b.outerWidth()+d.offset[1],/iPad/i.test(navigator.userAgent)&&(e-=a(window).scrollTop());var h=c.outerHeight()+b.outerHeight();g=="center"&&(e+=h/2),g=="bottom"&&(e+=h),g=d.position[1];var i=c.outerWidth()+b.outerWidth();g=="center"&&(f-=i/2),g=="left"&&(f-=i);return{top:e,left:f}}function d(d,e){var f=this,g=d.add(f),h,i=0,j=0,k=d.attr("title"),l=d.attr("data-tooltip"),m=b[e.effect],n,o=d.is(":input"),p=o&&d.is(":checkbox, :radio, select, :button, :submit"),q=d.attr("type"),r=e.events[q]||e.events[o?p?"widget":"input":"def"];if(!m)throw"Nonexistent effect \""+e.effect+"\"";r=r.split(/,\s*/);if(r.length!=2)throw"Tooltip: bad events configuration for "+q;d.bind(r[0],function(a){clearTimeout(i),e.predelay?j=setTimeout(function(){f.show(a)},e.predelay):f.show(a)}).bind(r[1],function(a){clearTimeout(j),e.delay?i=setTimeout(function(){f.hide(a)},e.delay):f.hide(a)}),k&&e.cancelDefault&&(d.removeAttr("title"),d.data("title",k)),a.extend(f,{show:function(b){if(!h){l?h=a(l):e.tip?h=a(e.tip).eq(0):k?h=a(e.layout).addClass(e.tipClass).appendTo(document.body).hide().append(k):(h=d.next(),h.length||(h=d.parent().next()));if(!h.length)throw"Cannot find tooltip for "+d}if(f.isShown())return f;h.stop(!0,!0);var o=c(d,h,e);e.tip&&h.html(d.data("title")),b=a.Event(),b.type="onBeforeShow",g.trigger(b,[o]);if(b.isDefaultPrevented())return f;o=c(d,h,e),h.css({position:"absolute",top:o.top,left:o.left}),n=!0,m[0].call(f,function(){b.type="onShow",n="full",g.trigger(b)});var p=e.events.tooltip.split(/,\s*/);h.data("__set")||(h.unbind(p[0]).bind(p[0],function(){clearTimeout(i),clearTimeout(j)}),p[1]&&!d.is("input:not(:checkbox, :radio), textarea")&&h.unbind(p[1]).bind(p[1],function(a){a.relatedTarget!=d[0]&&d.trigger(r[1].split(" ")[0])}),e.tip||h.data("__set",!0));return f},hide:function(c){if(!h||!f.isShown())return f;c=a.Event(),c.type="onBeforeHide",g.trigger(c);if(!c.isDefaultPrevented()){n=!1,b[e.effect][1].call(f,function(){c.type="onHide",g.trigger(c)});return f}},isShown:function(a){return a?n=="full":n},getConf:function(){return e},getTip:function(){return h},getTrigger:function(){return d}}),a.each("onHide,onBeforeShow,onShow,onBeforeHide".split(","),function(b,c){a.isFunction(e[c])&&a(f).bind(c,e[c]),f[c]=function(b){b&&a(f).bind(c,b);return f}})}a.fn.tooltip=function(b){var c=this.data("tooltip");if(c)return c;b=a.extend(!0,{},a.tools.tooltip.conf,b),typeof b.position=="string"&&(b.position=b.position.split(/,?\s/)),this.each(function(){c=new d(a(this),b),a(this).data("tooltip",c)});return b.api?c:this}})(jQuery); (function(a){var b=a.tools.tooltip;a.extend(b.conf,{direction:"up",bounce:!1,slideOffset:10,slideInSpeed:200,slideOutSpeed:200,slideFade:!a.browser.msie});var c={up:["-","top"],down:["+","top"],left:["-","left"],right:["+","left"]};b.addEffect("slide",function(a){var b=this.getConf(),d=this.getTip(),e=b.slideFade?{opacity:b.opacity}:{},f=c[b.direction]||c.up;e[f[1]]=f[0]+"="+b.slideOffset,b.slideFade&&d.css({opacity:0}),d.show().animate(e,b.slideInSpeed,a)},function(b){var d=this.getConf(),e=d.slideOffset,f=d.slideFade?{opacity:0}:{},g=c[d.direction]||c.up,h=""+g[0];d.bounce&&(h=h=="+"?"-":"+"),f[g[1]]=h+"="+e,this.getTip().animate(f,d.slideOutSpeed,function(){a(this).hide(),b.call()})})})(jQuery); jQuery(function(){ jQuery('#gallery .portfolio li .image-wrap img').hide(); }); jQuery(window).bind('load', function(){ var i=1; var imgs=jQuery('#gallery .portfolio li .image-wrap img').length; var int=setInterval(function(){ if(i >=imgs) clearInterval(int); jQuery('#gallery .portfolio li .image-wrap img:hidden').eq(0).fadeIn(300); i++; }, 200); }); var swfobject=function(){var D="undefined",r="object",S="Shockwave Flash",W="ShockwaveFlash.ShockwaveFlash",q="application/x-shockwave-flash",R="SWFObjectExprInst",x="onreadystatechange",O=window,j=document,t=navigator,T=false,U=[h],o=[],N=[],I=[],l,Q,E,B,J=false,a=false,n,G,m=true,M=function(){var aa=typeof j.getElementById!=D&&typeof j.getElementsByTagName!=D&&typeof j.createElement!=D,ah=t.userAgent.toLowerCase(),Y=t.platform.toLowerCase(),ae=Y?/win/.test(Y):/win/.test(ah),ac=Y?/mac/.test(Y):/mac/.test(ah),af=/webkit/.test(ah)?parseFloat(ah.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):false,X=!+"\v1",ag=[0,0,0],ab=null;if(typeof t.plugins!=D&&typeof t.plugins[S]==r){ab=t.plugins[S].description;if(ab&&!(typeof t.mimeTypes!=D&&t.mimeTypes[q]&&!t.mimeTypes[q].enabledPlugin)){T=true;X=false;ab=ab.replace(/^.*\s+(\S+\s+\S+$)/,"$1");ag[0]=parseInt(ab.replace(/^(.*)\..*$/,"$1"),10);ag[1]=parseInt(ab.replace(/^.*\.(.*)\s.*$/,"$1"),10);ag[2]=/[a-zA-Z]/.test(ab)?parseInt(ab.replace(/^.*[a-zA-Z]+(.*)$/,"$1"),10):0}}else{if(typeof O.ActiveXObject!=D){try{var ad=new ActiveXObject(W);if(ad){ab=ad.GetVariable("$version");if(ab){X=true;ab=ab.split(" ")[1].split(",");ag=[parseInt(ab[0],10),parseInt(ab[1],10),parseInt(ab[2],10)]}}}catch(Z){}}}return{w3:aa,pv:ag,wk:af,ie:X,win:ae,mac:ac}}(),k=function(){if(!M.w3){return}if((typeof j.readyState!=D&&j.readyState=="complete")||(typeof j.readyState==D&&(j.getElementsByTagName("body")[0]||j.body))){f()}if(!J){if(typeof j.addEventListener!=D){j.addEventListener("DOMContentLoaded",f,false)}if(M.ie&&M.win){j.attachEvent(x,function(){if(j.readyState=="complete"){j.detachEvent(x,arguments.callee);f()}});if(O==top){(function(){if(J){return}try{j.documentElement.doScroll("left")}catch(X){setTimeout(arguments.callee,0);return}f()})()}}if(M.wk){(function(){if(J){return}if(!/loaded|complete/.test(j.readyState)){setTimeout(arguments.callee,0);return}f()})()}s(f)}}();function f(){if(J){return}try{var Z=j.getElementsByTagName("body")[0].appendChild(C("span"));Z.parentNode.removeChild(Z)}catch(aa){return}J=true;var X=U.length;for(var Y=0;Y0){for(var af=0;af0){var ae=c(Y);if(ae){if(F(o[af].swfVersion)&&!(M.wk&&M.wk<312)){w(Y,true);if(ab){aa.success=true;aa.ref=z(Y);ab(aa)}}else{if(o[af].expressInstall&&A()){var ai={};ai.data=o[af].expressInstall;ai.width=ae.getAttribute("width")||"0";ai.height=ae.getAttribute("height")||"0";if(ae.getAttribute("class")){ai.styleclass=ae.getAttribute("class")}if(ae.getAttribute("align")){ai.align=ae.getAttribute("align")}var ah={};var X=ae.getElementsByTagName("param");var ac=X.length;for(var ad=0;ad'}}aa.outerHTML='"+af+"";N[N.length]=ai.id;X=c(ai.id)}else{var Z=C(r);Z.setAttribute("type",q);for(var ac in ai){if(ai[ac]!=Object.prototype[ac]){if(ac.toLowerCase()=="styleclass"){Z.setAttribute("class",ai[ac])}else{if(ac.toLowerCase()!="classid"){Z.setAttribute(ac,ai[ac])}}}}for(var ab in ag){if(ag[ab]!=Object.prototype[ab]&&ab.toLowerCase()!="movie"){e(Z,ab,ag[ab])}}aa.parentNode.replaceChild(Z,aa);X=Z}}return X}function e(Z,X,Y){var aa=C("param");aa.setAttribute("name",X);aa.setAttribute("value",Y);Z.appendChild(aa)}function y(Y){var X=c(Y);if(X&&X.nodeName=="OBJECT"){if(M.ie&&M.win){X.style.display="none";(function(){if(X.readyState==4){b(Y)}else{setTimeout(arguments.callee,10)}})()}else{X.parentNode.removeChild(X)}}}function b(Z){var Y=c(Z);if(Y){for(var X in Y){if(typeof Y[X]=="function"){Y[X]=null}}Y.parentNode.removeChild(Y)}}function c(Z){var X=null;try{X=j.getElementById(Z)}catch(Y){}return X}function C(X){return j.createElement(X)}function i(Z,X,Y){Z.attachEvent(X,Y);I[I.length]=[Z,X,Y]}function F(Z){var Y=M.pv,X=Z.split(".");X[0]=parseInt(X[0],10);X[1]=parseInt(X[1],10)||0;X[2]=parseInt(X[2],10)||0;return(Y[0]>X[0]||(Y[0]==X[0]&&Y[1]>X[1])||(Y[0]==X[0]&&Y[1]==X[1]&&Y[2]>=X[2]))?true:false}function v(ac,Y,ad,ab){if(M.ie&&M.mac){return}var aa=j.getElementsByTagName("head")[0];if(!aa){return}var X=(ad&&typeof ad=="string")?ad:"screen";if(ab){n=null;G=null}if(!n||G!=X){var Z=C("style");Z.setAttribute("type","text/css");Z.setAttribute("media",X);n=aa.appendChild(Z);if(M.ie&&M.win&&typeof j.styleSheets!=D&&j.styleSheets.length>0){n=j.styleSheets[j.styleSheets.length-1]}G=X}if(M.ie&&M.win){if(n&&typeof n.addRule==r){n.addRule(ac,Y)}}else{if(n&&typeof j.createTextNode!=D){n.appendChild(j.createTextNode(ac+" {"+Y+"}"))}}}function w(Z,X){if(!m){return}var Y=X?"visible":"hidden";if(J&&c(Z)){c(Z).style.visibility=Y}else{v("#"+Z,"visibility:"+Y)}}function L(Y){var Z=/[\\\"<>\.;]/;var X=Z.exec(Y)!=null;return X&&typeof encodeURIComponent!=D?encodeURIComponent(Y):Y}var d=function(){if(M.ie&&M.win){window.attachEvent("onunload",function(){var ac=I.length;for(var ab=0;ab=options.elements.length){ log('invalid slide index: ' + num); return false; } options.nextSlide=num; if(cont.cycleTimeout){ clearTimeout(cont.cycleTimeout); cont.cycleTimeout=0; } if(typeof arg2=='string') options.oneTimeFx=arg2; go(options.elements, options, 1, num >=options.currSlide); return false; } return options; function checkInstantResume(isPaused, arg2, cont){ if(!isPaused&&arg2===true){ var options=$(cont).data('cycle.opts'); if(!options){ log('options not found, can not resume'); return false; } if(cont.cycleTimeout){ clearTimeout(cont.cycleTimeout); cont.cycleTimeout=0; } go(options.elements, options, 1, !options.backwards); }} }; function removeFilter(el, opts){ if(!$.support.opacity&&opts.cleartype&&el.style.filter){ try { el.style.removeAttribute('filter'); } catch(smother){}} }; function destroy(opts){ if(opts.next) $(opts.next).unbind(opts.prevNextEvent); if(opts.prev) $(opts.prev).unbind(opts.prevNextEvent); if(opts.pager||opts.pagerAnchorBuilder) $.each(opts.pagerAnchors||[], function(){ this.unbind().remove(); }); opts.pagerAnchors=null; if(opts.destroy) opts.destroy(opts); }; function buildOptions($cont, $slides, els, options, o){ var opts=$.extend({}, $.fn.cycle.defaults, options||{}, $.metadata ? $cont.metadata():$.meta ? $cont.data():{}); if(opts.autostop) opts.countdown=opts.autostopCount||els.length; var cont=$cont[0]; $cont.data('cycle.opts', opts); opts.$cont=$cont; opts.stopCount=cont.cycleStop; opts.elements=els; opts.before=opts.before ? [opts.before]:[]; opts.after=opts.after ? [opts.after]:[]; if(!$.support.opacity&&opts.cleartype) opts.after.push(function(){ removeFilter(this, opts); }); if(opts.continuous) opts.after.push(function(){ go(els,opts,0,!opts.backwards); }); saveOriginalOpts(opts); if(!$.support.opacity&&opts.cleartype&&!opts.cleartypeNoBg) clearTypeFix($slides); if($cont.css('position')=='static') $cont.css('position', 'relative'); if(opts.width) $cont.width(opts.width); if(opts.height&&opts.height!='auto') $cont.height(opts.height); if(opts.startingSlide) opts.startingSlide=parseInt(opts.startingSlide); else if(opts.backwards) opts.startingSlide=els.length - 1; if(opts.random){ opts.randomMap=[]; for (var i=0; i < els.length; i++) opts.randomMap.push(i); opts.randomMap.sort(function(a,b){return Math.random() - 0.5;}); opts.randomIndex=1; opts.startingSlide=opts.randomMap[1]; } else if(opts.startingSlide >=els.length) opts.startingSlide=0; opts.currSlide=opts.startingSlide||0; var first=opts.startingSlide; $slides.css({position: 'absolute', top:0, left:0}).hide().each(function(i){ var z; if(opts.backwards) z=first ? i <=first ? els.length + (i-first):first-i:els.length-i; else z=first ? i >=first ? els.length - (i-first):first-i:els.length-i; $(this).css('z-index', z) }); $(els[first]).css('opacity',1).show(); removeFilter(els[first], opts); if(opts.fit&&opts.width) $slides.width(opts.width); if(opts.fit&&opts.height&&opts.height!='auto') $slides.height(opts.height); var reshape=opts.containerResize&&!$cont.innerHeight(); if(reshape){ var maxw=0, maxh=0; for(var j=0; j < els.length; j++){ var $e=$(els[j]), e=$e[0], w=$e.outerWidth(), h=$e.outerHeight(); if(!w) w=e.offsetWidth||e.width||$e.attr('width'); if(!h) h=e.offsetHeight||e.height||$e.attr('height'); maxw=w > maxw ? w:maxw; maxh=h > maxh ? h:maxh; } if(maxw > 0&&maxh > 0) $cont.css({width:maxw+'px',height:maxh+'px'}); } if(opts.pause) $cont.hover(function(){this.cyclePause++;},function(){this.cyclePause--;}); if(supportMultiTransitions(opts)===false) return false; var requeue=false; options.requeueAttempts=options.requeueAttempts||0; $slides.each(function(){ var $el=$(this); this.cycleH=(opts.fit&&opts.height) ? opts.height:($el.height()||this.offsetHeight||this.height||$el.attr('height')||0); this.cycleW=(opts.fit&&opts.width) ? opts.width:($el.width()||this.offsetWidth||this.width||$el.attr('width')||0); if($el.is('img')){ var loadingIE=($.browser.msie&&this.cycleW==28&&this.cycleH==30&&!this.complete); var loadingFF=($.browser.mozilla&&this.cycleW==34&&this.cycleH==19&&!this.complete); var loadingOp=($.browser.opera&&((this.cycleW==42&&this.cycleH==19)||(this.cycleW==37&&this.cycleH==17))&&!this.complete); var loadingOther=(this.cycleH==0&&this.cycleW==0&&!this.complete); if(loadingIE||loadingFF||loadingOp||loadingOther){ if(o.s&&opts.requeueOnImageNotLoaded&&++options.requeueAttempts < 100){ log(options.requeueAttempts,' - img slide not loaded, requeuing slideshow: ', this.src, this.cycleW, this.cycleH); setTimeout(function(){$(o.s,o.c).cycle(options)}, opts.requeueTimeout); requeue=true; return false; }else{ log('could not determine size of image: '+this.src, this.cycleW, this.cycleH); }} } return true; }); if(requeue) return false; opts.cssBefore=opts.cssBefore||{}; opts.cssAfter=opts.cssAfter||{}; opts.cssFirst=opts.cssFirst||{}; opts.animIn=opts.animIn||{}; opts.animOut=opts.animOut||{}; $slides.not(':eq('+first+')').css(opts.cssBefore); $($slides[first]).css(opts.cssFirst); if(opts.timeout){ opts.timeout=parseInt(opts.timeout); if(opts.speed.constructor==String) opts.speed=$.fx.speeds[opts.speed]||parseInt(opts.speed); if(!opts.sync) opts.speed=opts.speed / 2; var buffer=opts.fx=='none' ? 0:opts.fx=='shuffle' ? 500:250; while((opts.timeout - opts.speed) < buffer) opts.timeout +=opts.speed; } if(opts.easing) opts.easeIn=opts.easeOut=opts.easing; if(!opts.speedIn) opts.speedIn=opts.speed; if(!opts.speedOut) opts.speedOut=opts.speed; opts.slideCount=els.length; opts.currSlide=opts.lastSlide=first; if(opts.random){ if(++opts.randomIndex==els.length) opts.randomIndex=0; opts.nextSlide=opts.randomMap[opts.randomIndex]; } else if(opts.backwards) opts.nextSlide=opts.startingSlide==0 ? (els.length-1):opts.startingSlide-1; else opts.nextSlide=opts.startingSlide >=(els.length-1) ? 0:opts.startingSlide+1; if(!opts.multiFx){ var init=$.fn.cycle.transitions[opts.fx]; if($.isFunction(init)) init($cont, $slides, opts); else if(opts.fx!='custom'&&!opts.multiFx){ log('unknown transition: ' + opts.fx,'; slideshow terminating'); return false; }} var e0=$slides[first]; if(opts.before.length) opts.before[0].apply(e0, [e0, e0, opts, true]); if(opts.after.length) opts.after[0].apply(e0, [e0, e0, opts, true]); if(opts.next) $(opts.next).bind(opts.prevNextEvent,function(){return advance(opts,1)}); if(opts.prev) $(opts.prev).bind(opts.prevNextEvent,function(){return advance(opts,0)}); if(opts.pager||opts.pagerAnchorBuilder) buildPager(els,opts); exposeAddSlide(opts, els); return opts; }; function saveOriginalOpts(opts){ opts.original={ before: [], after: [] }; opts.original.cssBefore=$.extend({}, opts.cssBefore); opts.original.cssAfter=$.extend({}, opts.cssAfter); opts.original.animIn=$.extend({}, opts.animIn); opts.original.animOut=$.extend({}, opts.animOut); $.each(opts.before, function(){ opts.original.before.push(this); }); $.each(opts.after, function(){ opts.original.after.push(this); }); }; function supportMultiTransitions(opts){ var i, tx, txs=$.fn.cycle.transitions; if(opts.fx.indexOf(',') > 0){ opts.multiFx=true; opts.fxs=opts.fx.replace(/\s*/g,'').split(','); for (i=0; i < opts.fxs.length; i++){ var fx=opts.fxs[i]; tx=txs[fx]; if(!tx||!txs.hasOwnProperty(fx)||!$.isFunction(tx)){ log('discarding unknown transition: ',fx); opts.fxs.splice(i,1); i--; }} if(!opts.fxs.length){ log('No valid transitions named; slideshow terminating.'); return false; }} else if(opts.fx=='all'){ opts.multiFx=true; opts.fxs=[]; for (p in txs){ tx=txs[p]; if(txs.hasOwnProperty(p)&&$.isFunction(tx)) opts.fxs.push(p); }} if(opts.multiFx&&opts.randomizeEffects){ var r1=Math.floor(Math.random() * 20) + 30; for (i=0; i < r1; i++){ var r2=Math.floor(Math.random() * opts.fxs.length); opts.fxs.push(opts.fxs.splice(r2,1)[0]); } debug('randomized fx sequence: ',opts.fxs); } return true; }; function exposeAddSlide(opts, els){ opts.addSlide=function(newSlide, prepend){ var $s=$(newSlide), s=$s[0]; if(!opts.autostopCount) opts.countdown++; els[prepend?'unshift':'push'](s); if(opts.els) opts.els[prepend?'unshift':'push'](s); opts.slideCount=els.length; $s.css('position','absolute'); $s[prepend?'prependTo':'appendTo'](opts.$cont); if(prepend){ opts.currSlide++; opts.nextSlide++; } if(!$.support.opacity&&opts.cleartype&&!opts.cleartypeNoBg) clearTypeFix($s); if(opts.fit&&opts.width) $s.width(opts.width); if(opts.fit&&opts.height&&opts.height!='auto') $s.height(opts.height); s.cycleH=(opts.fit&&opts.height) ? opts.height:$s.height(); s.cycleW=(opts.fit&&opts.width) ? opts.width:$s.width(); $s.css(opts.cssBefore); if(opts.pager||opts.pagerAnchorBuilder) $.fn.cycle.createPagerAnchor(els.length-1, s, $(opts.pager), els, opts); if($.isFunction(opts.onAddSlide)) opts.onAddSlide($s); else $s.hide(); };} $.fn.cycle.resetState=function(opts, fx){ fx=fx||opts.fx; opts.before=[]; opts.after=[]; opts.cssBefore=$.extend({}, opts.original.cssBefore); opts.cssAfter=$.extend({}, opts.original.cssAfter); opts.animIn=$.extend({}, opts.original.animIn); opts.animOut=$.extend({}, opts.original.animOut); opts.fxFn=null; $.each(opts.original.before, function(){ opts.before.push(this); }); $.each(opts.original.after, function(){ opts.after.push(this); }); var init=$.fn.cycle.transitions[fx]; if($.isFunction(init)) init(opts.$cont, $(opts.elements), opts); }; function go(els, opts, manual, fwd){ if(manual&&opts.busy&&opts.manualTrump){ debug('manualTrump in go(), stopping active transition'); $(els).stop(true,true); opts.busy=0; } if(opts.busy){ debug('transition active, ignoring new tx request'); return; } var p=opts.$cont[0], curr=els[opts.currSlide], next=els[opts.nextSlide]; if(p.cycleStop!=opts.stopCount||p.cycleTimeout===0&&!manual) return; if(!manual&&!p.cyclePause&&!opts.bounce && ((opts.autostop&&(--opts.countdown <=0)) || (opts.nowrap&&!opts.random&&opts.nextSlide < opts.currSlide))){ if(opts.end) opts.end(opts); return; } var changed=false; if((manual||!p.cyclePause)&&(opts.nextSlide!=opts.currSlide)){ changed=true; var fx=opts.fx; curr.cycleH=curr.cycleH||$(curr).height(); curr.cycleW=curr.cycleW||$(curr).width(); next.cycleH=next.cycleH||$(next).height(); next.cycleW=next.cycleW||$(next).width(); if(opts.multiFx){ if(opts.lastFx==undefined||++opts.lastFx >=opts.fxs.length) opts.lastFx=0; fx=opts.fxs[opts.lastFx]; opts.currFx=fx; } if(opts.oneTimeFx){ fx=opts.oneTimeFx; opts.oneTimeFx=null; } $.fn.cycle.resetState(opts, fx); if(opts.before.length) $.each(opts.before, function(i,o){ if(p.cycleStop!=opts.stopCount) return; o.apply(next, [curr, next, opts, fwd]); }); var after=function(){ opts.busy=0; $.each(opts.after, function(i,o){ if(p.cycleStop!=opts.stopCount) return; o.apply(next, [curr, next, opts, fwd]); }); }; debug('tx firing('+fx+'); currSlide: ' + opts.currSlide + '; nextSlide: ' + opts.nextSlide); opts.busy=1; if(opts.fxFn) opts.fxFn(curr, next, opts, after, fwd, manual&&opts.fastOnEvent); else if($.isFunction($.fn.cycle[opts.fx])) $.fn.cycle[opts.fx](curr, next, opts, after, fwd, manual&&opts.fastOnEvent); else $.fn.cycle.custom(curr, next, opts, after, fwd, manual&&opts.fastOnEvent); } if(changed||opts.nextSlide==opts.currSlide){ opts.lastSlide=opts.currSlide; if(opts.random){ opts.currSlide=opts.nextSlide; if(++opts.randomIndex==els.length) opts.randomIndex=0; opts.nextSlide=opts.randomMap[opts.randomIndex]; if(opts.nextSlide==opts.currSlide) opts.nextSlide=(opts.currSlide==opts.slideCount - 1) ? 0:opts.currSlide + 1; } else if(opts.backwards){ var roll=(opts.nextSlide - 1) < 0; if(roll&&opts.bounce){ opts.backwards = !opts.backwards; opts.nextSlide=1; opts.currSlide=0; }else{ opts.nextSlide=roll ? (els.length-1):opts.nextSlide-1; opts.currSlide=roll ? 0:opts.nextSlide+1; }}else{ var roll=(opts.nextSlide + 1)==els.length; if(roll&&opts.bounce){ opts.backwards = !opts.backwards; opts.nextSlide=els.length-2; opts.currSlide=els.length-1; }else{ opts.nextSlide=roll ? 0:opts.nextSlide+1; opts.currSlide=roll ? els.length-1:opts.nextSlide-1; }} } if(changed&&opts.pager) opts.updateActivePagerLink(opts.pager, opts.currSlide, opts.activePagerClass); var ms=0; if(opts.timeout&&!opts.continuous) ms=getTimeout(els[opts.currSlide], els[opts.nextSlide], opts, fwd); else if(opts.continuous&&p.cyclePause) ms=10; if(ms > 0) p.cycleTimeout=setTimeout(function(){ go(els, opts, 0, !opts.backwards) }, ms); }; $.fn.cycle.updateActivePagerLink=function(pager, currSlide, clsName){ $(pager).each(function(){ $(this).children().removeClass(clsName).eq(currSlide).addClass(clsName); }); }; function getTimeout(curr, next, opts, fwd){ if(opts.timeoutFn){ var t=opts.timeoutFn.call(curr,curr,next,opts,fwd); while (opts.fx!='none'&&(t - opts.speed) < 250) t +=opts.speed; debug('calculated timeout: ' + t + '; speed: ' + opts.speed); if(t!==false) return t; } return opts.timeout; }; $.fn.cycle.next=function(opts){ advance(opts,1); }; $.fn.cycle.prev=function(opts){ advance(opts,0);}; function advance(opts, moveForward){ var val=moveForward ? 1:-1; var els=opts.elements; var p=opts.$cont[0], timeout=p.cycleTimeout; if(timeout){ clearTimeout(timeout); p.cycleTimeout=0; } if(opts.random&&val < 0){ opts.randomIndex--; if(--opts.randomIndex==-2) opts.randomIndex=els.length-2; else if(opts.randomIndex==-1) opts.randomIndex=els.length-1; opts.nextSlide=opts.randomMap[opts.randomIndex]; } else if(opts.random){ opts.nextSlide=opts.randomMap[opts.randomIndex]; }else{ opts.nextSlide=opts.currSlide + val; if(opts.nextSlide < 0){ if(opts.nowrap) return false; opts.nextSlide=els.length - 1; } else if(opts.nextSlide >=els.length){ if(opts.nowrap) return false; opts.nextSlide=0; }} var cb=opts.onPrevNextEvent||opts.prevNextClick; if($.isFunction(cb)) cb(val > 0, opts.nextSlide, els[opts.nextSlide]); go(els, opts, 1, moveForward); return false; }; function buildPager(els, opts){ var $p=$(opts.pager); $.each(els, function(i,o){ $.fn.cycle.createPagerAnchor(i,o,$p,els,opts); }); opts.updateActivePagerLink(opts.pager, opts.startingSlide, opts.activePagerClass); }; $.fn.cycle.createPagerAnchor=function(i, el, $p, els, opts){ var a; if($.isFunction(opts.pagerAnchorBuilder)){ a=opts.pagerAnchorBuilder(i,el); debug('pagerAnchorBuilder('+i+', el) returned: ' + a); } else a=''+(i+1)+''; if(!a) return; var $a=$(a); if($a.parents('body').length===0){ var arr=[]; if($p.length > 1){ $p.each(function(){ var $clone=$a.clone(true); $(this).append($clone); arr.push($clone[0]); }); $a=$(arr); }else{ $a.appendTo($p); }} opts.pagerAnchors=opts.pagerAnchors||[]; opts.pagerAnchors.push($a); $a.bind(opts.pagerEvent, function(e){ e.preventDefault(); opts.nextSlide=i; var p=opts.$cont[0], timeout=p.cycleTimeout; if(timeout){ clearTimeout(timeout); p.cycleTimeout=0; } var cb=opts.onPagerEvent||opts.pagerClick; if($.isFunction(cb)) cb(opts.nextSlide, els[opts.nextSlide]); go(els,opts,1,opts.currSlide < i); }); if(! /^click/.test(opts.pagerEvent)&&!opts.allowPagerClickBubble) $a.bind('click.cycle', function(){return false;}); if(opts.pauseOnPagerHover) $a.hover(function(){ opts.$cont[0].cyclePause++; }, function(){ opts.$cont[0].cyclePause--; }); }; $.fn.cycle.hopsFromLast=function(opts, fwd){ var hops, l=opts.lastSlide, c=opts.currSlide; if(fwd) hops=c > l ? c - l:opts.slideCount - l; else hops=c < l ? l - c:l + opts.slideCount - c; return hops; }; function clearTypeFix($slides){ debug('applying clearType background-color hack'); function hex(s){ s=parseInt(s).toString(16); return s.length < 2 ? '0'+s:s; }; function getBg(e){ for(; e&&e.nodeName.toLowerCase()!='html'; e=e.parentNode){ var v=$.css(e,'background-color'); if(v&&v.indexOf('rgb') >=0){ var rgb=v.match(/\d+/g); return '#'+ hex(rgb[0]) + hex(rgb[1]) + hex(rgb[2]); } if(v&&v!='transparent') return v; } return '#ffffff'; }; $slides.each(function(){ $(this).css('background-color', getBg(this)); }); }; $.fn.cycle.commonReset=function(curr,next,opts,w,h,rev){ $(opts.elements).not(curr).hide(); if(typeof opts.cssBefore.opacity=='undefined') opts.cssBefore.opacity=1; opts.cssBefore.display='block'; if(opts.slideResize&&w!==false&&next.cycleW > 0) opts.cssBefore.width=next.cycleW; if(opts.slideResize&&h!==false&&next.cycleH > 0) opts.cssBefore.height=next.cycleH; opts.cssAfter=opts.cssAfter||{}; opts.cssAfter.display='none'; $(curr).css('zIndex',opts.slideCount + (rev===true ? 1:0)); $(next).css('zIndex',opts.slideCount + (rev===true ? 0:1)); }; $.fn.cycle.custom=function(curr, next, opts, cb, fwd, speedOverride){ var $l=$(curr), $n=$(next); var speedIn=opts.speedIn, speedOut=opts.speedOut, easeIn=opts.easeIn, easeOut=opts.easeOut; $n.css(opts.cssBefore); if(speedOverride){ if(typeof speedOverride=='number') speedIn=speedOut=speedOverride; else speedIn=speedOut=1; easeIn=easeOut=null; } var fn=function(){ $n.animate(opts.animIn, speedIn, easeIn, function(){ cb(); }); }; $l.animate(opts.animOut, speedOut, easeOut, function(){ $l.css(opts.cssAfter); if(!opts.sync) fn(); }); if(opts.sync) fn(); }; $.fn.cycle.transitions={ fade: function($cont, $slides, opts){ $slides.not(':eq('+opts.currSlide+')').css('opacity',0); opts.before.push(function(curr,next,opts){ $.fn.cycle.commonReset(curr,next,opts); opts.cssBefore.opacity=0; }); opts.animIn={ opacity: 1 }; opts.animOut={ opacity: 0 }; opts.cssBefore={ top: 0, left: 0 };}}; $.fn.cycle.ver=function(){ return ver; }; $.fn.cycle.defaults={ activePagerClass: 'activeSlide', after: null, allowPagerClickBubble: false, animIn: null, animOut: null, autostop: 0, autostopCount: 0, backwards: false, before: null, cleartype: !$.support.opacity, cleartypeNoBg: false, containerResize: 1, continuous: 0, cssAfter: null, cssBefore: null, delay: 0, easeIn: null, easeOut: null, easing: null, end: null, fastOnEvent: 0, fit: 0, fx: 'fade', fxFn: null, height: 'auto', manualTrump: true, next: null, nowrap: 0, onPagerEvent: null, onPrevNextEvent: null, pager: null, pagerAnchorBuilder: null, pagerEvent: 'click.cycle', pause: 0, pauseOnPagerHover: 0, prev: null, prevNextEvent:'click.cycle', random: 0, randomizeEffects: 1, requeueOnImageNotLoaded: true, requeueTimeout: 250, rev: 0, shuffle: null, slideExpr: null, slideResize: 1, speed: 1000, speedIn: null, speedOut: null, startingSlide: 0, sync: 1, timeout: 4000, timeoutFn: null, updateActivePagerLink: null };})(jQuery); (function($){ $.fn.cycle.transitions.none=function($cont, $slides, opts){ opts.fxFn=function(curr,next,opts,after){ $(next).show(); $(curr).hide(); after(); };}; $.fn.cycle.transitions.fadeout=function($cont, $slides, opts){ $slides.not(':eq('+opts.currSlide+')').css({ display: 'block', 'opacity': 1 }); opts.before.push(function(curr,next,opts,w,h,rev){ $(curr).css('zIndex',opts.slideCount + (!rev===true ? 1:0)); $(next).css('zIndex',opts.slideCount + (!rev===true ? 0:1)); }); opts.animIn.opacity=1; opts.animOut.opacity=0; opts.cssBefore.opacity=1; opts.cssBefore.display='block'; opts.cssAfter.zIndex=0; }; $.fn.cycle.transitions.scrollUp=function($cont, $slides, opts){ $cont.css('overflow','hidden'); opts.before.push($.fn.cycle.commonReset); var h=$cont.height(); opts.cssBefore.top=h; opts.cssBefore.left=0; opts.cssFirst.top=0; opts.animIn.top=0; opts.animOut.top=-h; }; $.fn.cycle.transitions.scrollDown=function($cont, $slides, opts){ $cont.css('overflow','hidden'); opts.before.push($.fn.cycle.commonReset); var h=$cont.height(); opts.cssFirst.top=0; opts.cssBefore.top=-h; opts.cssBefore.left=0; opts.animIn.top=0; opts.animOut.top=h; }; $.fn.cycle.transitions.scrollLeft=function($cont, $slides, opts){ $cont.css('overflow','hidden'); opts.before.push($.fn.cycle.commonReset); var w=$cont.width(); opts.cssFirst.left=0; opts.cssBefore.left=w; opts.cssBefore.top=0; opts.animIn.left=0; opts.animOut.left=0-w; }; $.fn.cycle.transitions.scrollRight=function($cont, $slides, opts){ $cont.css('overflow','hidden'); opts.before.push($.fn.cycle.commonReset); var w=$cont.width(); opts.cssFirst.left=0; opts.cssBefore.left=-w; opts.cssBefore.top=0; opts.animIn.left=0; opts.animOut.left=w; }; $.fn.cycle.transitions.scrollHorz=function($cont, $slides, opts){ $cont.css('overflow','hidden').width(); opts.before.push(function(curr, next, opts, fwd){ if(opts.rev) fwd = !fwd; $.fn.cycle.commonReset(curr,next,opts); opts.cssBefore.left=fwd ? (next.cycleW-1):(1-next.cycleW); opts.animOut.left=fwd ? -curr.cycleW:curr.cycleW; }); opts.cssFirst.left=0; opts.cssBefore.top=0; opts.animIn.left=0; opts.animOut.top=0; }; $.fn.cycle.transitions.scrollVert=function($cont, $slides, opts){ $cont.css('overflow','hidden'); opts.before.push(function(curr, next, opts, fwd){ if(opts.rev) fwd = !fwd; $.fn.cycle.commonReset(curr,next,opts); opts.cssBefore.top=fwd ? (1-next.cycleH):(next.cycleH-1); opts.animOut.top=fwd ? curr.cycleH:-curr.cycleH; }); opts.cssFirst.top=0; opts.cssBefore.left=0; opts.animIn.top=0; opts.animOut.left=0; }; $.fn.cycle.transitions.slideX=function($cont, $slides, opts){ opts.before.push(function(curr, next, opts){ $(opts.elements).not(curr).hide(); $.fn.cycle.commonReset(curr,next,opts,false,true); opts.animIn.width=next.cycleW; }); opts.cssBefore.left=0; opts.cssBefore.top=0; opts.cssBefore.width=0; opts.animIn.width='show'; opts.animOut.width=0; }; $.fn.cycle.transitions.slideY=function($cont, $slides, opts){ opts.before.push(function(curr, next, opts){ $(opts.elements).not(curr).hide(); $.fn.cycle.commonReset(curr,next,opts,true,false); opts.animIn.height=next.cycleH; }); opts.cssBefore.left=0; opts.cssBefore.top=0; opts.cssBefore.height=0; opts.animIn.height='show'; opts.animOut.height=0; }; $.fn.cycle.transitions.shuffle=function($cont, $slides, opts){ var i, w=$cont.css('overflow', 'visible').width(); $slides.css({left: 0, top: 0}); opts.before.push(function(curr,next,opts){ $.fn.cycle.commonReset(curr,next,opts,true,true,true); }); if(!opts.speedAdjusted){ opts.speed=opts.speed / 2; opts.speedAdjusted=true; } opts.random=0; opts.shuffle=opts.shuffle||{left:-w, top:15}; opts.els=[]; for (i=0; i < $slides.length; i++) opts.els.push($slides[i]); for (i=0; i < opts.currSlide; i++) opts.els.push(opts.els.shift()); opts.fxFn=function(curr, next, opts, cb, fwd){ if(opts.rev) fwd = !fwd; var $el=fwd ? $(curr):$(next); $(next).css(opts.cssBefore); var count=opts.slideCount; $el.animate(opts.shuffle, opts.speedIn, opts.easeIn, function(){ var hops=$.fn.cycle.hopsFromLast(opts, fwd); for (var k=0; k < hops; k++) fwd ? opts.els.push(opts.els.shift()):opts.els.unshift(opts.els.pop()); if(fwd){ for (var i=0, len=opts.els.length; i < len; i++) $(opts.els[i]).css('z-index', len-i+count); }else{ var z=$(curr).css('z-index'); $el.css('z-index', parseInt(z)+1+count); } $el.animate({left:0, top:0}, opts.speedOut, opts.easeOut, function(){ $(fwd ? this:curr).hide(); if(cb) cb(); }); }); }; $.extend(opts.cssBefore, { display: 'block', opacity: 1, top: 0, left: 0 }); }; $.fn.cycle.transitions.turnUp=function($cont, $slides, opts){ opts.before.push(function(curr, next, opts){ $.fn.cycle.commonReset(curr,next,opts,true,false); opts.cssBefore.top=next.cycleH; opts.animIn.height=next.cycleH; opts.animOut.width=next.cycleW; }); opts.cssFirst.top=0; opts.cssBefore.left=0; opts.cssBefore.height=0; opts.animIn.top=0; opts.animOut.height=0; }; $.fn.cycle.transitions.turnDown=function($cont, $slides, opts){ opts.before.push(function(curr, next, opts){ $.fn.cycle.commonReset(curr,next,opts,true,false); opts.animIn.height=next.cycleH; opts.animOut.top=curr.cycleH; }); opts.cssFirst.top=0; opts.cssBefore.left=0; opts.cssBefore.top=0; opts.cssBefore.height=0; opts.animOut.height=0; }; $.fn.cycle.transitions.turnLeft=function($cont, $slides, opts){ opts.before.push(function(curr, next, opts){ $.fn.cycle.commonReset(curr,next,opts,false,true); opts.cssBefore.left=next.cycleW; opts.animIn.width=next.cycleW; }); opts.cssBefore.top=0; opts.cssBefore.width=0; opts.animIn.left=0; opts.animOut.width=0; }; $.fn.cycle.transitions.turnRight=function($cont, $slides, opts){ opts.before.push(function(curr, next, opts){ $.fn.cycle.commonReset(curr,next,opts,false,true); opts.animIn.width=next.cycleW; opts.animOut.left=curr.cycleW; }); $.extend(opts.cssBefore, { top: 0, left: 0, width: 0 }); opts.animIn.left=0; opts.animOut.width=0; }; $.fn.cycle.transitions.zoom=function($cont, $slides, opts){ opts.before.push(function(curr, next, opts){ $.fn.cycle.commonReset(curr,next,opts,false,false,true); opts.cssBefore.top=next.cycleH/2; opts.cssBefore.left=next.cycleW/2; $.extend(opts.animIn, { top: 0, left: 0, width: next.cycleW, height: next.cycleH }); $.extend(opts.animOut, { width: 0, height: 0, top: curr.cycleH/2, left: curr.cycleW/2 }); }); opts.cssFirst.top=0; opts.cssFirst.left=0; opts.cssBefore.width=0; opts.cssBefore.height=0; }; $.fn.cycle.transitions.fadeZoom=function($cont, $slides, opts){ opts.before.push(function(curr, next, opts){ $.fn.cycle.commonReset(curr,next,opts,false,false); opts.cssBefore.left=next.cycleW/2; opts.cssBefore.top=next.cycleH/2; $.extend(opts.animIn, { top: 0, left: 0, width: next.cycleW, height: next.cycleH }); }); opts.cssBefore.width=0; opts.cssBefore.height=0; opts.animOut.opacity=0; }; $.fn.cycle.transitions.blindX=function($cont, $slides, opts){ var w=$cont.css('overflow','hidden').width(); opts.before.push(function(curr, next, opts){ $.fn.cycle.commonReset(curr,next,opts); opts.animIn.width=next.cycleW; opts.animOut.left=curr.cycleW; }); opts.cssBefore.left=w; opts.cssBefore.top=0; opts.animIn.left=0; opts.animOut.left=w; }; $.fn.cycle.transitions.blindY=function($cont, $slides, opts){ var h=$cont.css('overflow','hidden').height(); opts.before.push(function(curr, next, opts){ $.fn.cycle.commonReset(curr,next,opts); opts.animIn.height=next.cycleH; opts.animOut.top=curr.cycleH; }); opts.cssBefore.top=h; opts.cssBefore.left=0; opts.animIn.top=0; opts.animOut.top=h; }; $.fn.cycle.transitions.blindZ=function($cont, $slides, opts){ var h=$cont.css('overflow','hidden').height(); var w=$cont.width(); opts.before.push(function(curr, next, opts){ $.fn.cycle.commonReset(curr,next,opts); opts.animIn.height=next.cycleH; opts.animOut.top=curr.cycleH; }); opts.cssBefore.top=h; opts.cssBefore.left=w; opts.animIn.top=0; opts.animIn.left=0; opts.animOut.top=h; opts.animOut.left=w; }; $.fn.cycle.transitions.growX=function($cont, $slides, opts){ opts.before.push(function(curr, next, opts){ $.fn.cycle.commonReset(curr,next,opts,false,true); opts.cssBefore.left=this.cycleW/2; opts.animIn.left=0; opts.animIn.width=this.cycleW; opts.animOut.left=0; }); opts.cssBefore.top=0; opts.cssBefore.width=0; }; $.fn.cycle.transitions.growY=function($cont, $slides, opts){ opts.before.push(function(curr, next, opts){ $.fn.cycle.commonReset(curr,next,opts,true,false); opts.cssBefore.top=this.cycleH/2; opts.animIn.top=0; opts.animIn.height=this.cycleH; opts.animOut.top=0; }); opts.cssBefore.height=0; opts.cssBefore.left=0; }; $.fn.cycle.transitions.curtainX=function($cont, $slides, opts){ opts.before.push(function(curr, next, opts){ $.fn.cycle.commonReset(curr,next,opts,false,true,true); opts.cssBefore.left=next.cycleW/2; opts.animIn.left=0; opts.animIn.width=this.cycleW; opts.animOut.left=curr.cycleW/2; opts.animOut.width=0; }); opts.cssBefore.top=0; opts.cssBefore.width=0; }; $.fn.cycle.transitions.curtainY=function($cont, $slides, opts){ opts.before.push(function(curr, next, opts){ $.fn.cycle.commonReset(curr,next,opts,true,false,true); opts.cssBefore.top=next.cycleH/2; opts.animIn.top=0; opts.animIn.height=next.cycleH; opts.animOut.top=curr.cycleH/2; opts.animOut.height=0; }); opts.cssBefore.height=0; opts.cssBefore.left=0; }; $.fn.cycle.transitions.cover=function($cont, $slides, opts){ var d=opts.direction||'left'; var w=$cont.css('overflow','hidden').width(); var h=$cont.height(); opts.before.push(function(curr, next, opts){ $.fn.cycle.commonReset(curr,next,opts); if(d=='right') opts.cssBefore.left=-w; else if(d=='up') opts.cssBefore.top=h; else if(d=='down') opts.cssBefore.top=-h; else opts.cssBefore.left=w; }); opts.animIn.left=0; opts.animIn.top=0; opts.cssBefore.top=0; opts.cssBefore.left=0; }; $.fn.cycle.transitions.uncover=function($cont, $slides, opts){ var d=opts.direction||'left'; var w=$cont.css('overflow','hidden').width(); var h=$cont.height(); opts.before.push(function(curr, next, opts){ $.fn.cycle.commonReset(curr,next,opts,true,true,true); if(d=='right') opts.animOut.left=w; else if(d=='up') opts.animOut.top=-h; else if(d=='down') opts.animOut.top=h; else opts.animOut.left=-w; }); opts.animIn.left=0; opts.animIn.top=0; opts.cssBefore.top=0; opts.cssBefore.left=0; }; $.fn.cycle.transitions.toss=function($cont, $slides, opts){ var w=$cont.css('overflow','visible').width(); var h=$cont.height(); opts.before.push(function(curr, next, opts){ $.fn.cycle.commonReset(curr,next,opts,true,true,true); if(!opts.animOut.left&&!opts.animOut.top) $.extend(opts.animOut, { left: w*2, top: -h/2, opacity: 0 }); else opts.animOut.opacity=0; }); opts.cssBefore.left=0; opts.cssBefore.top=0; opts.animIn.left=0; }; $.fn.cycle.transitions.wipe=function($cont, $slides, opts){ var w=$cont.css('overflow','hidden').width(); var h=$cont.height(); opts.cssBefore=opts.cssBefore||{}; var clip; if(opts.clip){ if(/l2r/.test(opts.clip)) clip='rect(0px 0px '+h+'px 0px)'; else if(/r2l/.test(opts.clip)) clip='rect(0px '+w+'px '+h+'px '+w+'px)'; else if(/t2b/.test(opts.clip)) clip='rect(0px '+w+'px 0px 0px)'; else if(/b2t/.test(opts.clip)) clip='rect('+h+'px '+w+'px '+h+'px 0px)'; else if(/zoom/.test(opts.clip)){ var top=parseInt(h/2); var left=parseInt(w/2); clip='rect('+top+'px '+left+'px '+top+'px '+left+'px)'; }} opts.cssBefore.clip=opts.cssBefore.clip||clip||'rect(0px 0px 0px 0px)'; var d=opts.cssBefore.clip.match(/(\d+)/g); var t=parseInt(d[0]), r=parseInt(d[1]), b=parseInt(d[2]), l=parseInt(d[3]); opts.before.push(function(curr, next, opts){ if(curr==next) return; var $curr=$(curr), $next=$(next); $.fn.cycle.commonReset(curr,next,opts,true,true,false); opts.cssAfter.display='block'; var step=1, count=parseInt((opts.speedIn / 13)) - 1; (function f(){ var tt=t ? t - parseInt(step * (t/count)):0; var ll=l ? l - parseInt(step * (l/count)):0; var bb=b < h ? b + parseInt(step * ((h-b)/count||1)):h; var rr=r < w ? r + parseInt(step * ((w-r)/count||1)):w; $next.css({ clip: 'rect('+tt+'px '+rr+'px '+bb+'px '+ll+'px)' }); (step++ <=count) ? setTimeout(f, 13):$curr.css('display', 'none'); })(); }); $.extend(opts.cssBefore, { display: 'block', opacity: 1, top: 0, left: 0 }); opts.animIn={ left: 0 }; opts.animOut={ left: 0 };}; })(jQuery); (function($){ $.fn.getTwitter=function(options){ var o=$.extend({}, $.fn.getTwitter.defaults, options); $(this).hide(); if(o.showHeading){ $(this).append(o.beforeHeading+o.headingText+o.afterHeading); } $(this).append(''); $("ul.twitter_update_list").hide(); var pl=$('

'+o.loaderText+'

'); $(this).append(pl); if(o.showProfileLink){ $(this).append('Follow Us'); } $(this).show(); function twitterCallback2(twitters){ var statusHTML=[]; for (var i=0; i]*[^.,;'">\:\s\<\>\)\]\!])/g, function(url){ return ''+url+''; }).replace(/\B@([_a-z0-9]+)/ig, function(reply){ return reply.charAt(0)+''+reply.substring(1)+''; }); statusHTML.push('
  • '+status+'
    '+relative_time(twitters[i].created_at)+'
  • '); } var id=''; id=o.id; $(id).find('ul').html(statusHTML.join('')); } function relative_time(time_value){ var values=time_value.split(" "); time_value=values[1] + " " + values[2] + ", " + values[5] + " " + values[3]; var parsed_date=Date.parse(time_value); var relative_to=(arguments.length > 1) ? arguments[1]:new Date(); var delta=parseInt((relative_to.getTime() - parsed_date) / 1000); delta=delta + (relative_to.getTimezoneOffset() * 60); if(delta < 60){ return 'less than a minute ago'; }else if(delta < 120){ return 'about a minute ago'; }else if(delta < (60*60)){ return (parseInt(delta / 60)).toString() + ' minutes ago'; }else if(delta < (120*60)){ return 'about an hour ago'; }else if(delta < (24*60*60)){ return 'about ' + (parseInt(delta / 3600)).toString() + ' hours ago'; }else if(delta < (48*60*60)){ return '1 day ago'; }else if(delta < (30*48*60*60)){ return (parseInt(delta / 86400)).toString() + ' days ago'; }else if(delta < (60*48*60*60)){ return '1 month ago'; }else{ return (parseInt(delta / 2592000)).toString() + ' months ago'; }} $.getJSON("https://api.twitter.com/1/statuses/user_timeline.json?screen_name="+o.userName+"&callback=?&count="+o.numTweets, function(data){twitterCallback2(data); $(pl).remove(); }) if(o.slideIn){ $("ul.twitter_update_list").slideDown(1000); }else{ $("ul.twitter_update_list").show(); } $("ul.twitter_update_list li:first").addClass("firstTweet"); $("ul.twitter_update_list li:last").addClass("lastTweet"); }; $.fn.getTwitter.defaults={ userName: null, numTweets: 5, preloaderId: "preloader", loaderText: "Loading tweets...", slideIn: false, showHeading: true, beforeHeading: "

    ", afterHeading: "

    ", headingText: "Latest Tweets", id: "", showProfileLink: true };})(jQuery); (function($){ $.fn.flickrush=function(options){ var defaults={ limit:3, random:true, id:'44499772@N06' }; var options=$.extend(defaults,options); return this.each(function(options){ var act=$(this); $.getJSON("http://api.flickr.com/services/feeds/photos_public.gne?format=json&size=s&id="+defaults.id+"&jsoncallback=?", function(data){ var num=0; var imageArray=new Array(); while(num <=defaults.limit-1){ if(defaults.random==true){ var randomiser=Math.floor(Math.random()*20); } $.each(data.items, function(i,item){ if(defaults.random==true){ var imgheigth=$(this).parents().width(); if(( i==randomiser)&&(!imageArray.in_array(randomiser))){ var newLink=$("").attr({ href: item.link, target:'_bank' }); var newImage=$("").attr({ src: (item.media.m).replace('_m','_s'), alt: item.tags, width: defaults.width, height: imgheigth }); $(act).append(newLink.append(newImage)); }}else{ if(( i <=defaults.limit-1)&&(!imageArray.in_array(defaults.limit-1))){ var newLink=$("").attr({ href: item.link, target:_bank }); var newImage=$("").attr({ src: item.media.m, alt: item.tags }); $(act).append(newLink.append(newImage)); }} }); if(defaults.random==true){ if(imageArray.in_array(randomiser)){ defaults.limit++; } imageArray.push(randomiser); }else{ imageArray.push(defaults.limit-1); } num++; }}); Array.prototype.in_array=function(p_val){ for(var i=0, l=this.length; i < l; i++){ if(this[i]==p_val){ return true; }} return false; }}); }})(jQuery); if(!window.SI){ var SI={};}; SI.Files = { htmlClass:'SI-FILES-STYLIZED', fileClass:'file', wrapClass:'cabinet', fini:false, able:false, init:function(){ this.fini=true; var ie=0 if(window.opera||(ie&&ie < 5.5)||!document.getElementsByTagName){ return; } this.able=true; var html=document.getElementsByTagName('html')[0]; html.className +=(html.className!='' ? ' ':'') + this.htmlClass; }, stylize:function(elem){ if(!this.fini){ this.init(); }; if(!this.able){ return; }; elem.parentNode.file=elem; elem.parentNode.onmousemove=function(e){ if(typeof e=='undefined') e=window.event; if(typeof e.pageY=='undefined'&&typeof e.clientX=='number'&&document.documentElement){ e.pageX=e.clientX + document.documentElement.scrollLeft; e.pageY=e.clientY + document.documentElement.scrollTop; }; var ox=oy=0; var elem=this; if(elem.offsetParent){ ox=elem.offsetLeft; oy=elem.offsetTop; while (elem=elem.offsetParent){ ox +=elem.offsetLeft; oy +=elem.offsetTop; };}; var x=e.pageX - ox; var y=e.pageY - oy; var w=this.file.offsetWidth; var h=this.file.offsetHeight; this.file.style.top=y - (h / 2) + 'px'; this.file.style.left=x - (w - 30) + 'px'; };}, stylizeById:function(id){ this.stylize(document.getElementById(id)); }, stylizeAll:function(){ if(!this.fini){ this.init(); }; if(!this.able){ return; }; var inputs=document.getElementsByTagName('input'); for (var i=0; i < inputs.length; i++){ var input=inputs[i]; if(input.type=='file'&&input.className.indexOf(this.fileClass)!=-1&&input.parentNode.className.indexOf(this.wrapClass)!=-1){ this.stylize(input); };}; }}; (function(audiojs, audiojsInstance, container){ var path=(function(){ var re=new RegExp('audio(\.min)?\.js.*'), scripts=document.getElementsByTagName('script'); for (var i=0, ii=scripts.length; i < ii; i++){ var path=scripts[i].getAttribute('src'); if(re.test(path)) return path.replace(re, ''); }})(); container[audiojs]={ instanceCount: 0, instances: {}, flashSource: '\ \ \ \ \ ', settings: { autoplay: false, loop: false, preload: true, imageLocation: path + 'player-graphics.gif', swfLocation: path + 'audiojs.swf', useFlash: (function(){ var a=document.createElement('audio'); return !(a.canPlayType&&a.canPlayType('audio/mpeg;').replace(/no/, '')); })(), hasFlash: (function(){ if(navigator.plugins&&navigator.plugins.length&&navigator.plugins['Shockwave Flash']){ return true; }else if(navigator.mimeTypes&&navigator.mimeTypes.length){ var mimeType=navigator.mimeTypes['application/x-shockwave-flash']; return mimeType&&mimeType.enabledPlugin; }else{ try { var ax=new ActiveXObject('ShockwaveFlash.ShockwaveFlash'); return true; } catch (e){}} return false; })(), createPlayer: { markup: '\
    \

    \

    \

    \

    \
    \
    \
    \
    \
    \
    \ 00:00/00:00 \
    \
    ', playPauseClass: 'play-pause', scrubberClass: 'scrubber', progressClass: 'progress', loaderClass: 'loaded', timeClass: 'time', durationClass: 'duration', playedClass: 'played', errorMessageClass: 'error-message', playingClass: 'playing', loadingClass: 'loading', errorClass: 'error' }, trackEnded: function(e){}, flashError: function(){ var player=this.settings.createPlayer, errorMessage=getByClass(player.errorMessageClass, this.wrapper), html='Missing
    flash player plugin.'; if(this.mp3) html +=' Download audio file.'; container[audiojs].helpers.removeClass(this.wrapper, player.loadingClass); container[audiojs].helpers.addClass(this.wrapper, player.errorClass); errorMessage.innerHTML=html; }, loadError: function(e){ var player=this.settings.createPlayer, errorMessage=getByClass(player.errorMessageClass, this.wrapper); container[audiojs].helpers.removeClass(this.wrapper, player.loadingClass); container[audiojs].helpers.addClass(this.wrapper, player.errorClass); errorMessage.innerHTML='Error loading: "'+this.mp3+'"'; }, init: function(){ var player=this.settings.createPlayer; container[audiojs].helpers.addClass(this.wrapper, player.loadingClass); }, loadStarted: function(){ var player=this.settings.createPlayer, duration=getByClass(player.durationClass, this.wrapper), m=Math.floor(this.duration / 60), s=Math.floor(this.duration % 60); container[audiojs].helpers.removeClass(this.wrapper, player.loadingClass); duration.innerHTML=((m<10?'0':'')+m+':'+(s<10?'0':'')+s); }, loadProgress: function(percent){ var player=this.settings.createPlayer, scrubber=getByClass(player.scrubberClass, this.wrapper), loaded=getByClass(player.loaderClass, this.wrapper); loaded.style.width=(scrubber.offsetWidth * percent) + 'px'; }, playPause: function(){ if(this.playing) this.settings.play(); else this.settings.pause(); }, play: function(){ var player=this.settings.createPlayer; container[audiojs].helpers.addClass(this.wrapper, player.playingClass); }, pause: function(){ var player=this.settings.createPlayer; container[audiojs].helpers.removeClass(this.wrapper, player.playingClass); }, updatePlayhead: function(percent){ var player=this.settings.createPlayer, scrubber=getByClass(player.scrubberClass, this.wrapper), progress=getByClass(player.progressClass, this.wrapper); progress.style.width=(scrubber.offsetWidth * percent) + 'px'; var played=getByClass(player.playedClass, this.wrapper), p=this.duration * percent, m=Math.floor(p / 60), s=Math.floor(p % 60); played.innerHTML=((m<10?'0':'')+m+':'+(s<10?'0':'')+s); }}, create: function(element, options){ var options=options||{} if(element.length){ return this.createAll(options, element); }else{ return this.newInstance(element, options); }}, createAll: function(options, elements){ var audioElements=elements||document.getElementsByTagName('audio'), instances=[] options=options||{}; for (var i=0, ii=audioElements.length; i < ii; i++){ instances.push(this.newInstance(audioElements[i], options)); } return instances; }, newInstance: function(element, options){ var element=element, s=this.helpers.clone(this.settings), id='audiojs'+this.instanceCount, wrapperId='audiojs_wrapper'+this.instanceCount, instanceCount=this.instanceCount++; if(element.getAttribute('autoplay')!=null) s.autoplay=true; if(element.getAttribute('loop')!=null) s.loop=true; if(element.getAttribute('preload')=='none') s.preload=false; if(options) this.helpers.merge(s, options); if(s.createPlayer.markup) element=this.createPlayer(element, s.createPlayer, wrapperId); else element.parentNode.setAttribute('id', wrapperId); var audio=new container[audiojsInstance](element, s); if(s.css) this.helpers.injectCss(audio, s.css); if(s.useFlash&&s.hasFlash){ this.injectFlash(audio, id); this.attachFlashEvents(audio.wrapper, audio); }else if(s.useFlash&&!s.hasFlash){ this.settings.flashError.apply(audio); } if(!s.useFlash||(s.useFlash&&s.hasFlash)) this.attachEvents(audio.wrapper, audio); this.instances[id]=audio; return audio; }, createPlayer: function(element, player, id){ var wrapper=document.createElement('div'), newElement=element.cloneNode(true); wrapper.setAttribute('class', 'audiojs'); wrapper.setAttribute('className', 'audiojs'); wrapper.setAttribute('id', id); if(newElement.outerHTML&&~newElement.outerHTML.indexOf('<:audio')){ newElement=this.helpers.cloneHtml5Node(element); wrapper.innerHTML=player.markup; wrapper.appendChild(newElement); element.outerHTML=wrapper.outerHTML; wrapper=document.getElementById(id); }else{ wrapper.appendChild(newElement); wrapper.innerHTML=wrapper.innerHTML + player.markup; element.parentNode.replaceChild(wrapper, element); } return wrapper.getElementsByTagName('audio')[0]; }, attachEvents: function(wrapper, audio){ if(!audio.settings.createPlayer) return; var player=audio.settings.createPlayer, playPause=getByClass(player.playPauseClass, wrapper), scrubber=getByClass(player.scrubberClass, wrapper), leftPos=function(elem){ var curleft=0; if(elem.offsetParent){ do { curleft +=elem.offsetLeft; } while (elem=elem.offsetParent); } return curleft; }; container[audiojs].events.addListener(playPause, 'click', function(e){ audio.playPause.apply(audio); }); container[audiojs].events.addListener(scrubber, 'click', function(e){ var relativeLeft=e.clientX - leftPos(this); audio.skipTo(relativeLeft / scrubber.offsetWidth); }); if(audio.settings.useFlash) return; container[audiojs].events.trackLoadProgress(audio); container[audiojs].events.addListener(audio.element, 'timeupdate', function(e){ audio.updatePlayhead.apply(audio); }); container[audiojs].events.addListener(audio.element, 'ended', function(e){ audio.trackEnded.apply(audio); }); container[audiojs].events.addListener(audio.source, 'error', function(e){ clearInterval(audio.readyTimer); clearInterval(audio.loadTimer); audio.settings.loadError.apply(audio); }); }, attachFlashEvents: function(element, audio){ audio['swfReady']=false; audio['load']=function(mp3){ audio.mp3=mp3; if(audio.swfReady) audio.element.load(mp3); } audio['loadProgress']=function(percent, duration){ audio.loadedPercent=percent; audio.duration=duration; audio.settings.loadStarted.apply(audio); audio.settings.loadProgress.apply(audio, [percent]); } audio['skipTo']=function(percent){ if(percent > audio.loadedPercent) return; audio.updatePlayhead.call(audio, [percent]) audio.element.skipTo(percent); } audio['updatePlayhead']=function(percent){ audio.settings.updatePlayhead.apply(audio, [percent]); } audio['play']=function(){ if(!audio.settings.preload){ audio.settings.preload=true; audio.element.init(audio.mp3); } audio.playing=true; audio.element.pplay(); audio.settings.play.apply(audio); } audio['pause']=function(){ audio.playing=false; audio.element.ppause(); audio.settings.pause.apply(audio); } audio['loadStarted']=function(){ audio.swfReady=true; if(audio.settings.preload) audio.element.init(audio.mp3); if(audio.settings.autoplay) audio.play.apply(audio); }}, injectFlash: function(audio, id){ var flashSource=this.flashSource.replace(/\$1/g, id); flashSource=flashSource.replace(/\$2/g, audio.settings.swfLocation); flashSource=flashSource.replace(/\$3/g, (+new Date + Math.random())); var html=audio.wrapper.innerHTML, div=document.createElement('div'); div.innerHTML=flashSource + html; audio.wrapper.innerHTML=div.innerHTML; audio.element=this.helpers.getSwf(id); }, helpers: { merge: function(obj1, obj2){ for (attr in obj2){ if(obj1.hasOwnProperty(attr)||obj2.hasOwnProperty(attr)){ obj1[attr]=obj2[attr]; }} }, clone: function(obj){ if(obj==null||typeof(obj)!=='object') return obj; var temp=new obj.constructor(); for (var key in obj) temp[key]=arguments.callee(obj[key]); return temp; }, addClass: function(element, className){ var re=new RegExp('(\\s|^)'+className+'(\\s|$)'); if(re.test(element.className)) return; element.className +=' ' + className; }, removeClass: function(element, className){ var re=new RegExp('(\\s|^)'+className+'(\\s|$)'); element.className=element.className.replace(re,' '); }, injectCss: function(audio, string){ var prepend='', styles=document.getElementsByTagName('style'), css=string.replace(/\$1/g, audio.settings.imageLocation); for (var i=0, ii=styles.length; i < ii; i++){ var title=styles[i].getAttribute('title'); if(title&&~title.indexOf('audiojs')){ style=styles[i]; if(style.innerHTML===css) return; prepend=style.innerHTML; break; }}; var head=document.getElementsByTagName('head')[0], firstchild=head.firstChild, style=document.createElement('style'); if(!head) return; style.setAttribute('type', 'text/css'); style.setAttribute('title', 'audiojs'); if(style.styleSheet) style.styleSheet.cssText=prepend + css; else style.appendChild(document.createTextNode(prepend + css)); if(firstchild) head.insertBefore(style, firstchild); else head.appendChild(styleElement); }, cloneHtml5Node: function(audioTag){ var fragment=document.createDocumentFragment(); fragment.createElement('audio'); var div=fragment.createElement('div'); fragment.appendChild(div); div.innerHTML=audioTag.outerHTML; return div.firstChild; }, getSwf: function(name){ var swf=document[name]||window[name]; return swf.length > 1 ? swf[swf.length - 1]:swf; }}, events: { memoryLeaking: false, listeners: [], addListener: function(element, eventName, func){ if(element.addEventListener){ element.addEventListener(eventName, func, false); }else if(element.attachEvent){ this.listeners.push(element); if(!this.memoryLeaking){ window.attachEvent('onunload', function(){ for (var i=0, ii=this.listeners; i < ii; i++){ container[audiojs].events.purge(this.listeners[i]); }}); this.memoryLeaking=true; } element.attachEvent('on' + eventName, function(){ func.call(element, window.event); }); }}, trackLoadProgress: function(audio){ if(!audio.settings.preload) return; var readyTimer, loadTimer, audio=audio, ios=(/(ipod|iphone|ipad)/i).test(navigator.userAgent); readyTimer=setInterval(function(){ if(audio.element.readyState > -1){ if(!ios) audio.init.apply(audio); } if(audio.element.readyState > 1){ if(audio.settings.autoplay) audio.play.apply(audio); clearInterval(readyTimer); loadTimer=setInterval(function(){ audio.loadProgress.apply(audio); if(audio.loadedPercent >=1) clearInterval(loadTimer); }); }}, 10); audio.readyTimer=readyTimer; audio.loadTimer=loadTimer; }, purge: function(d){ var a=d.attributes, i; if(a){ for (i=0; i < a.length; i +=1){ if(typeof d[a[i].name]==='function') d[a[i].name]=null; }} a=d.childNodes; if(a){ for (i=0; i < a.length; i +=1) purge(d.childNodes[i]); }}, ready: (function(){ return function(fn){ var win=window, done=false, top=true, doc=win.document, root=doc.documentElement, add=doc.addEventListener ? 'addEventListener':'attachEvent', rem=doc.addEventListener ? 'removeEventListener':'detachEvent', pre=doc.addEventListener ? '':'on', init=function(e){ if(e.type=='readystatechange'&&doc.readyState!='complete') return; (e.type=='load' ? win:doc)[rem](pre + e.type, init, false); if(!done&&(done=true)) fn.call(win, e.type||e); }, poll=function(){ try { root.doScroll('left'); } catch(e){ setTimeout(poll, 50); return; } init('poll'); }; if(doc.readyState=='complete') fn.call(win, 'lazy'); else { if(doc.createEventObject&&root.doScroll){ try { top = !win.frameElement; } catch(e){ } if(top) poll(); } doc[add](pre + 'DOMContentLoaded', init, false); doc[add](pre + 'readystatechange', init, false); win[add](pre + 'load', init, false); }} })() }} container[audiojsInstance]=function(element, settings){ this.element=element; this.wrapper=element.parentNode; this.source=element.getElementsByTagName('source')[0]||element; this.mp3=(function(element){ var source=element.getElementsByTagName('source')[0]; return element.getAttribute('src')||(source ? source.getAttribute('src'):null); })(element); this.settings=settings; this.loadStartedCalled=false; this.loadedPercent=0; this.duration=1; this.playing=false; } container[audiojsInstance].prototype={ updatePlayhead: function(){ var percent=this.element.currentTime / this.duration; this.settings.updatePlayhead.apply(this, [percent]); }, skipTo: function(percent){ if(percent > this.loadedPercent) return; this.element.currentTime=this.duration * percent; this.updatePlayhead(); }, load: function(mp3){ this.loadStartedCalled=false; this.source.setAttribute('src', mp3); this.element.load(); this.mp3=mp3; container[audiojs].events.trackLoadProgress(this); }, loadError: function(){ this.settings.loadError.apply(this); }, init: function(){ this.settings.init.apply(this); }, loadStarted: function(){ if(!this.element.duration) return false; this.duration=this.element.duration; this.updatePlayhead(); this.settings.loadStarted.apply(this); }, loadProgress: function(){ if(this.element.buffered!=null&&this.element.buffered.length){ if(!this.loadStartedCalled){ this.loadStartedCalled=this.loadStarted(); } var durationLoaded=this.element.buffered.end(this.element.buffered.length - 1); this.loadedPercent=durationLoaded / this.duration; this.settings.loadProgress.apply(this, [this.loadedPercent]); }}, playPause: function(){ if(this.playing) this.pause(); else this.play(); }, play: function(){ var ios=(/(ipod|iphone|ipad)/i).test(navigator.userAgent); if(ios&&this.element.readyState==0) this.init.apply(this); if(!this.settings.preload){ this.settings.preload=true; this.element.setAttribute('preload', 'auto'); container[audiojs].events.trackLoadProgress(this); } this.playing=true; this.element.play(); this.settings.play.apply(this); }, pause: function(){ this.playing=false; this.element.pause(); this.settings.pause.apply(this); }, trackEnded: function(e){ this.skipTo.apply(this, [0]); if(!this.settings.loop) this.pause.apply(this); this.settings.trackEnded.apply(this); }} var getByClass=function(searchClass, node, tag){ var matches=[]; if(document.getElementsByClassName){ matches=node.getElementsByClassName(searchClass); }else{ var node=node||document, tag=tag||'*', els=node.getElementsByTagName(tag), pattern=new RegExp("(^|\\s)"+searchClass+"(\\s|$)"); for (i=0, j=0, l=els.length; i < l; i++){ if(pattern.test(els[i].className)){ matches[j]=els[i]; j++; }} } return matches.length > 1 ? matches:matches[0]; }})('audiojs', 'audiojsInstance', this); var Flexie=(function (win, doc){ var FLX={}, FLX_DOM_ID=0, FLX_DOM_ATTR="data-flexie-id", FLX_PARENT_ATTR="data-flexie-parent", SUPPORT, ENGINE, ENGINES={ "NW":{ s:"*.Dom.select" }, "DOMAssistant":{ s:"*.$", m:"*.DOMReady" }, "Prototype":{ s:"$$", m:"document.observe", p:"dom:loaded", c:"document" }, "YAHOO":{ s:"*.util.Selector.query", m:"*.util.Event.onDOMReady", c:"*.util.Event" }, "MooTools":{ s:"$$", m:"window.addEvent", p:"domready" }, "Sizzle":{ s:"*" }, "jQuery":{ s:"*", m:"*(document).ready" }, "dojo":{ s:"*.query", m:"*.addOnLoad" }}, LIBRARY, PIXEL=/^-?\d+(?:px)?$/i, NUMBER=/^-?\d/, SIZES=/width|height|margin|padding|border/, MSIE=/(msie) ([\w.]+)/, WHITESPACE_CHARACTERS=/\t|\n|\r/g, RESTRICTIVE_PROPERTIES=/^max\-([a-z]+)/, PROTOCOL=/^https?:\/\//i, LEADINGTRIM=/^\s\s*/, TRAILINGTRIM=/\s\s*$/, ONLY_WHITESPACE=/^\s*$/, CSS_SELECTOR=/\s?(\#|\.|\[|\:(\:)?[^first\-(line|letter)|before|after]+)/g, EMPTY_STRING="", SPACE_STRING=" ", PLACEHOLDER_STRING="$1", PADDING_RIGHT="paddingRight", PADDING_BOTTOM="paddingBottom", PADDING_LEFT="paddingLeft", PADDING_TOP="paddingTop", BORDER_RIGHT="borderRightWidth", BORDER_BOTTOM="borderBottomWidth", BORDER_LEFT="borderLeftWidth", BORDER_TOP="borderTopWidth", HORIZONTAL="horizontal", VERTICAL="vertical", INLINE_AXIS="inline-axis", BLOCK_AXIS="block-axis", INHERIT="inherit", LEFT="left", END_MUSTACHE="}", PREFIXES=" -o- -moz- -ms- -webkit- -khtml- ".split(SPACE_STRING), DEFAULTS={ orient:HORIZONTAL, align:"stretch", direction:INHERIT, pack:"start" }, FLEX_BOXES=[], POSSIBLE_FLEX_CHILDREN=[], DOM_ORDERED, RESIZE_LISTENER, TRUE=true, FALSE=false, NULL=null, UNDEFINED, BROWSER={ IE:(function (){ var ie, ua=win.navigator.userAgent, match=(MSIE).exec(ua.toLowerCase()); if(match){ ie=parseInt(match[2], 10); } return ie; }()) }, selectivizrEngine; function trim (string){ if(string){ string=string.replace(LEADINGTRIM, EMPTY_STRING).replace(TRAILINGTRIM, EMPTY_STRING); } return string; } function determineSelectorMethod(){ var engines=ENGINES, method, engine, obj; for (engine in engines){ if(engines.hasOwnProperty(engine)){ obj=engines[engine]; if(win[engine]&&!method){ method=eval(obj.s.replace("*", engine)); if(method){ ENGINE=engine; break; }} }} return method; } function addEvent(type, func){ type="on" + type; var oldevent=win[type]; if(typeof win[type]!=="function"){ win[type]=func; }else{ win[type]=function (){ if(oldevent){ oldevent(); } func(); };}} function attachLoadMethod(handler){ if(!ENGINE){ LIBRARY=determineSelectorMethod(); } var engines=ENGINES, method, caller, args, engine, obj; for (engine in engines){ if(engines.hasOwnProperty(engine)){ obj=engines[engine]; if(win[engine]&&!method&&obj.m){ method=eval(obj.m.replace("*", engine)); caller=obj.c ? eval(obj.c.replace("*", engine)):win; args=[]; if(method&&caller){ if(obj.p){ args.push(obj.p); } args.push(handler); method.apply(caller, args); break; }} }} if(!method){ addEvent("load", handler); }} function buildSelector (node){ var selector=node.nodeName.toLowerCase(); if(node.id){ selector +="#" + node.id; }else if(node.FLX_DOM_ID){ selector +="[" + FLX_DOM_ATTR + "='" + node.FLX_DOM_ID + "']"; } return selector; } function setFlexieId (node){ if(!node.FLX_DOM_ID){ FLX_DOM_ID=(FLX_DOM_ID + 1); node.FLX_DOM_ID=FLX_DOM_ID; node.setAttribute(FLX_DOM_ATTR, node.FLX_DOM_ID); }} function buildSelectorTree(text){ var rules=[], ruletext, rule, match, selector, proptext, splitprop, properties, i, j, x; text=text.replace(WHITESPACE_CHARACTERS, EMPTY_STRING); text=text.replace(/\s?(\{|\:|\})\s?/g, PLACEHOLDER_STRING); ruletext=text.split(END_MUSTACHE); for (i in ruletext){ if(ruletext.hasOwnProperty(i)){ text=ruletext[i]; if(text){ rule=[text, END_MUSTACHE].join(EMPTY_STRING); match=(/(\@media[^\{]+\{)?(.*)\{(.*)\}/).exec(rule); if(match&&match[3]){ selector=match[2]; proptext=match[3].split(";"); properties=[]; for (j in proptext){ if(proptext.hasOwnProperty(j)){ x=proptext[j]; splitprop=x.split(":"); if(splitprop.length&&splitprop[1]){ properties.push({ property:splitprop[0], value:splitprop[1] }); }} } if(selector&&properties.length){ rules.push({ selector:selector, properties:properties }); }} }} } return rules; } function findFlexboxElements(rules){ var selectors, properties, property, value, shortProp, selectorSplit=/\s?,\s?/, createUniqueObject, addRules, key, uniqueChildren={}, uniqueBoxes={}, i, j, rule, k, l, selector, m, n, prop; createUniqueObject=function (selector, rules, prop, value){ var unique, i, j, rule; unique={ selector:trim(selector), properties:[] }; for (i=0, j=rules.properties.length; i < j; i++){ rule=rules.properties[i]; unique.properties.push({ property:trim(rule.property), value:trim(rule.value) }); } if(prop&&value){ unique[prop]=value; } return unique; }; addRules=function (selector, rules, prop, value){ var box=(prop&&value) ? uniqueChildren[selector]:uniqueBoxes[selector], exists, x, i, j, rule, k, l; if(box){ for (i=0, j=rules.properties.length; i < j; i++){ rule=rules.properties[i]; for (k=0, l=box.properties.length; k < l; k++){ x=box.properties[k]; if(rule.property===x.property){ exists=k; return false; }} if(exists){ box.properties[exists]=rule; }else{ box.properties.push(rule); }} if(prop&&value){ box[prop]=value; }}else{ if(prop&&value){ uniqueChildren[selector]=createUniqueObject(selector, rules, prop, value); }else{ uniqueBoxes[selector]=createUniqueObject(selector, rules, NULL, NULL); }} }; for (i=0, j=rules.length; i < j; i++){ rule=rules[i]; selectors=trim(rule.selector).replace(selectorSplit, ",").split(selectorSplit); for (k=0, l=selectors.length; k < l; k++){ selector=trim(selectors[k]); properties=rule.properties; for (m=0, n=properties.length; m < n; m++){ prop=properties[m]; property=trim(prop.property); value=trim(prop.value); if(property){ shortProp=property.replace("box-", EMPTY_STRING); switch (shortProp){ case "display" : if(value==="box"){ addRules(selector, rule, NULL, NULL); } break; case "orient" : case "align" : case "direction" : case "pack" : addRules(selector, rule, NULL, NULL); break; case "flex" : case "flex-group" : case "ordinal-group" : addRules(selector, rule, shortProp, value); break; }} }} } for (key in uniqueBoxes){ if(uniqueBoxes.hasOwnProperty(key)){ FLEX_BOXES.push(uniqueBoxes[key]); }} for (key in uniqueChildren){ if(uniqueChildren.hasOwnProperty(key)){ POSSIBLE_FLEX_CHILDREN.push(uniqueChildren[key]); }} return { boxes:FLEX_BOXES, children:POSSIBLE_FLEX_CHILDREN };} function matchFlexChildren(parent, lib, possibleChildren){ var caller, unique, matches=[], i, j, child, k, l, node, key; for (i=0, j=possibleChildren.length; i < j; i++){ child=possibleChildren[i]; if(child.selector){ caller=lib(child.selector); caller=caller[0] ? caller:[caller]; if(caller[0]){ for (k=0, l=caller.length; k < l; k++){ node=caller[k]; if(node.nodeName!==UNDEFINED){ switch (node.nodeName.toLowerCase()){ case "script" : case "style" : case "link" : break; default : if(node.parentNode===parent){ setFlexieId(node); unique={}; for (key in child){ if(child.hasOwnProperty(key)){ unique[key]=child[key]; }} unique.match=node; matches.push(unique); } break; }} }} }else{ setFlexieId(child); matches.push({ match:child, selector:buildSelector(child) }); }} return matches; } function getParams(params){ var key; for (key in params){ if(params.hasOwnProperty(key)){ params[key]=params[key]||DEFAULTS[key]; }} return params; } function buildFlexieCall(flexers){ var selector, properties, property, value, shortProp, display, orient, align, direction, pack, lib, caller, children, box, params, flexboxes={}, match, childMatch, nestedFlexboxes, flexieParentSelector="[" + FLX_PARENT_ATTR + "]", i, j, flex, k, l, prop, target, key, m, n, child, o, p, existing; if(!flexers){ return; } for (i=0, j=flexers.boxes.length; i < j; i++){ flex=flexers.boxes[i]; flex.selector=trim(flex.selector); selector=flex.selector; properties=flex.properties; display=orient=align=direction=pack=NULL; for (k=0, l=properties.length; k < l; k++){ prop=properties[k]; property=trim(prop.property); value=trim(prop.value); if(property){ shortProp=property.replace("box-", EMPTY_STRING); switch (shortProp){ case "display" : if(value==="box"){ display=value; } break; case "orient" : orient=value; break; case "align" : align=value; break; case "direction" : direction=value; break; case "pack" : pack=value; break; }} } lib=LIBRARY; caller=lib(flex.selector); caller=caller[0] ? caller:[caller]; for (k=0, l=caller.length; k < l; k++){ target=caller[k]; if(target.nodeType){ setFlexieId(target); children=matchFlexChildren(target, lib, flexers.children); nestedFlexboxes=selector + " " + flexieParentSelector; params={ target:target, selector:selector, properties:properties, children:children, display:display, orient:orient, align:align, direction: direction, pack:pack, nested:nestedFlexboxes }; match=flexboxes[target.FLX_DOM_ID]; if(match){ for (key in params){ if(params.hasOwnProperty(key)){ value=params[key]; switch (key){ case "selector" : if(value&&!(new RegExp(value).test(match[key]))){ match[key] +=", " + value; } break; case "children" : for (m=0, n=params[key].length; m < n; m++){ child=params[key][m]; childMatch=FALSE; for (o=0, p=match[key].length; o < p; o++){ existing=match[key][o]; if(child.match.FLX_DOM_ID===existing.match.FLX_DOM_ID){ childMatch=TRUE; }} if(!childMatch){ match[key].push(child); }} break; default : if(value){ match[key]=value; } break; }} }}else{ flexboxes[target.FLX_DOM_ID]=getParams(params); flexboxes[target.FLX_DOM_ID].target.setAttribute(FLX_PARENT_ATTR, TRUE); }} }} DOM_ORDERED=LIBRARY(flexieParentSelector); FLEX_BOXES={}; for (i=0, j=DOM_ORDERED.length; i < j; i++){ target=DOM_ORDERED[i]; FLEX_BOXES[target.FLX_DOM_ID]=flexboxes[target.FLX_DOM_ID]; } for (key in FLEX_BOXES){ if(FLEX_BOXES.hasOwnProperty(key)){ flex=FLEX_BOXES[key]; if(flex.display==="box"){ box=new FLX.box(flex); }} }} function calcPx(element, props, dir){ var dim=dir.replace(dir.charAt(0), dir.charAt(0).toUpperCase()), value=element["offset" + dim]||0, i, j, prop; if(value){ for (i=0, j=props.length; i < j; i++){ prop=parseFloat(element.currentStyle[props[i]]); if(!isNaN(prop)){ value -=prop; }} } return value; } function getTrueValue(element, name){ var left, rsLeft, ret=element.currentStyle&&element.currentStyle[name], style=element.style; if(!PIXEL.test(ret)&&NUMBER.test(ret)){ left=style.left; rsLeft=element.runtimeStyle.left; element.runtimeStyle.left=element.currentStyle.left; style.left=ret||0; ret=style.pixelLeft + "px"; style.left=left||0; element.runtimeStyle.left=rsLeft; } return ret; } function unAuto(element, prop, name){ var props; switch (name){ case "width" : props=[PADDING_LEFT, PADDING_RIGHT, BORDER_LEFT, BORDER_RIGHT]; prop=calcPx(element, props, name); break; case "height" : props=[PADDING_TOP, PADDING_BOTTOM, BORDER_TOP, BORDER_BOTTOM]; prop=calcPx(element, props, name); break; default : prop=getTrueValue(element, name); break; } return prop; } function getPixelValue(element, prop, name){ if(PIXEL.test(prop)){ return prop; } if(prop==="auto"||prop==="medium"){ prop=unAuto(element, prop, name); }else{ prop=getTrueValue(element, name); } return prop; } function getComputedStyle(element, property, returnAsInt){ var value; if(element===UNDEFINED){ return; } if(win.getComputedStyle){ value=win.getComputedStyle(element, NULL)[property]; }else{ if(SIZES.test(property)){ value=getPixelValue(element, (element&&element.currentStyle) ? element.currentStyle[property]:0, property); }else{ value=element.currentStyle[property]; }} if(returnAsInt){ value=parseInt(value, 10); if(isNaN(value)){ value=0; }} return value; } function clientWidth(element){ return element.innerWidth||element.clientWidth; } function clientHeight(element){ return element.innerHeight||element.clientHeight; } function appendProperty(target, prop, value, prefixName){ var cssText=[], i, j, prefix; for (i=0, j=PREFIXES.length; i < j; i++){ prefix=PREFIXES[i]; cssText.push((prefixName ? prefix:EMPTY_STRING) + prop + ":" + (!prefixName ? prefix:EMPTY_STRING) + value); } target.style.cssText +=cssText.join(";"); return target; } function appendPixelValue(target, prop, value){ var targets=target&&target[0] ? target:[target], i, j; for (i=0, j=targets.length; i < j; i++){ target=targets[i]; if(target&&target.style){ target.style[prop]=(value ? (value + "px"):EMPTY_STRING); }} } function calculateSpecificity (selector){ var selectorGrid, matrix, total, i, j, chunk; selectorGrid=selector.replace(CSS_SELECTOR, function (e, f){ return "%" + f; }).replace(/\s|\>|\+|\~/g, "%").split(/%/g); matrix={ _id:100, _class:10, _tag:1 }; total=0; for (i=0, j=selectorGrid.length; i < j; i++){ chunk=selectorGrid[i]; if((/#/).test(chunk)){ total +=matrix._id; }else if((/\.|\[|\:/).test(chunk)){ total +=matrix._class; }else if((/[a-zA-Z]+/).test(chunk)){ total +=matrix._tag; }} return total; } function filterDuplicates (matches, children, type){ var filteredMatches=[], exists, spec=(type ? "ordinal":"flex") + "Specificity", i, j, x, k, l, f; for (i=0, j=matches.length; i < j; i++){ x=matches[i]; if((!type&&x.flex)||(type&&x["ordinal-group"])){ x[spec]=x[spec]||calculateSpecificity(x.selector); exists=FALSE; for (k=0, l=filteredMatches.length; k < l; k++){ f=filteredMatches[k]; if(f.match===x.match){ if(f[spec] < x[spec]){ filteredMatches[j]=x; } exists=TRUE; return FALSE; }} if(!exists){ filteredMatches.push(x); }} } return filteredMatches; } function createMatchMatrix(matches, children, type){ var groups={}, keys=[], totalRatio=0, group, order="ordinal-group", BoxOrdinalAttr="data-" + order, i, j, kid, k, l, x, key; matches=filterDuplicates(matches, children, type); for (i=0, j=children.length; i < j; i++){ kid=children[i]; for (k=0, l=matches.length; k < l; k++){ x=matches[k]; if(type){ group=x[order]||"1"; if(x.match===kid){ x.match.setAttribute(BoxOrdinalAttr, group); groups[group]=groups[group]||[]; groups[group].push(x); }}else{ group=x.flex||"0"; if(x.match===kid&&(!x[group]||(x[group]&&parseInt(x[group], 10) <=1))){ totalRatio +=parseInt(group, 10); groups[group]=groups[group]||[]; groups[group].push(x); }} } if(type&&!kid.getAttribute(BoxOrdinalAttr)){ group="1"; kid.setAttribute(BoxOrdinalAttr, group); groups[group]=groups[group]||[]; groups[group].push({ match:kid }); }} for (key in groups){ if(groups.hasOwnProperty(key)){ keys.push(key); }} keys.sort(function (a, b){ return b - a; }); return { keys:keys, groups:groups, total:totalRatio };} function attachResizeListener(construct, params){ if(!RESIZE_LISTENER){ var storedWidth, storedHeight, currentWidth, currentHeight, docBody=doc.body, docEl=doc.documentElement, resizeTimer, innerWidth="innerWidth", innerHeight="innerHeight", clientWidth="clientWidth", clientHeight="clientHeight"; addEvent("resize", function (){ if(resizeTimer){ window.clearTimeout(resizeTimer); } resizeTimer=window.setTimeout(function (){ currentWidth=win[innerWidth]||docEl[innerWidth]||docEl[clientWidth]||docBody[clientWidth]; currentHeight=win[innerHeight]||docEl[innerHeight]||docEl[clientHeight]||docBody[clientHeight]; if(storedWidth!==currentWidth||storedHeight!==currentHeight){ FLX.updateInstance(NULL, NULL); storedWidth=currentWidth; storedHeight=currentHeight; }}, 250); }); RESIZE_LISTENER=TRUE; }} function cleanPositioningProperties (children){ var i, j, kid, w, h; for (i=0, j=children.length; i < j; i++){ kid=children[i]; w=kid.style.width; h=kid.style.height; kid.style.cssText=EMPTY_STRING; kid.style.width=w; kid.style.height=h; }} function sanitizeChildren (target, nodes){ var children=[], node, i, j; for (i=0, j=nodes.length; i < j; i++){ node=nodes[i]; if(node){ switch (node.nodeName.toLowerCase()){ case "script" : case "style" : case "link" : break; default : if(node.nodeType===1){ children.push(node); }else if((node.nodeType===3)&&(node.isElementContentWhitespace||(ONLY_WHITESPACE).test(node.data))){ target.removeChild(node); i--; } break; }} } return children; } function parentFlex (target){ var totalFlex=0, parent=target.parentNode, obj, matrix, isNested; while (parent.FLX_DOM_ID){ obj=FLEX_BOXES[parent.FLX_DOM_ID]; matrix=createMatchMatrix(obj.children, sanitizeChildren(parent, parent.childNodes), NULL); totalFlex +=matrix.total; isNested=TRUE; parent=parent.parentNode; } return { nested:isNested, flex:totalFlex };} function dimensionValues (target, prop){ var parent=target.parentNode, obj, dimension, i, j, rule; if(parent.FLX_DOM_ID){ obj=FLEX_BOXES[parent.FLX_DOM_ID]; for (i=0, j=obj.properties.length; i < j; i++){ rule=obj.properties[i]; if((new RegExp(prop)).test(rule.property)){ dimension=TRUE; return FALSE; }} } return dimension; } function updateChildValues (params){ var i, j, x; if(params.flexMatrix){ for (i=0, j=params.children.length; i < j; i++){ x=params.children[i]; x.flex=params.flexMatrix[i]; }} if(params.ordinalMatrix){ for (i=0, j=params.children.length; i < j; i++){ x=params.children[i]; x["ordinal-group"]=params.ordinalMatrix[i]; }} return params; } function ensureStructuralIntegrity (params, instance){ var target=params.target; if(!target.FLX_DOM_ID){ target.FLX_DOM_ID=target.FLX_DOM_ID||(++FLX_DOM_ID); } if(!params.nodes){ params.nodes=sanitizeChildren(target, target.childNodes); } if(!params.selector){ params.selector=buildSelector(target); target.setAttribute(FLX_PARENT_ATTR, TRUE); } if(!params.properties){ params.properties=[]; } if(!params.children){ params.children=matchFlexChildren(target, LIBRARY, sanitizeChildren(target, target.childNodes)); } if(!params.nested){ params.nested=params.selector + " [" + FLX_PARENT_ATTR + "]"; } params.target=target; params._instance=instance; return params; } selectivizrEngine=(function (){ var RE_COMMENT=/(\/\*[^*]*\*+([^\/][^*]*\*+)*\/)\s*?/g, RE_IMPORT=/@import\s*(?:(?:(?:url\(\s*(['"]?)(.*)\1)\s*\))|(?:(['"])(.*)\3))\s*([^;]*);/g, RE_ASSET_URL=/(behavior\s*?:\s*)?\burl\(\s*(["']?)(?!data:)([^"')]+)\2\s*\)/g, RE_SELECTOR_GROUP=/((?:^|(?:\s*\})+)(?:\s*@media[^\{]+\{)?)\s*([^\{]*?[\[:][^{]+)/g, RE_TIDY_TRAILING_WHITESPACE=/([(\[+~])\s+/g, RE_TIDY_LEADING_WHITESPACE=/\s+([)\]+~])/g, RE_TIDY_CONSECUTIVE_WHITESPACE=/\s+/g, RE_TIDY_TRIM_WHITESPACE=/^\s*((?:[\S\s]*\S)?)\s*$/; function trim(text){ return text.replace(RE_TIDY_TRIM_WHITESPACE, PLACEHOLDER_STRING); } function normalizeWhitespace(text){ return trim(text).replace(RE_TIDY_CONSECUTIVE_WHITESPACE, SPACE_STRING); } function normalizeSelectorWhitespace(selectorText){ return normalizeWhitespace(selectorText.replace(RE_TIDY_TRAILING_WHITESPACE, PLACEHOLDER_STRING).replace(RE_TIDY_LEADING_WHITESPACE, PLACEHOLDER_STRING)); } function patchStyleSheet(cssText){ return cssText.replace(RE_SELECTOR_GROUP, function (m, prefix, selectorText){ var selectorGroups, selector, i, j, group; selectorGroups=selectorText.split(","); for (i=0, j=selectorGroups.length; i < j; i++){ group=selectorGroups[i]; selector=normalizeSelectorWhitespace(group) + SPACE_STRING; } return prefix + selectorGroups.join(","); }); } function getXHRObject(){ if(win.XMLHttpRequest){ return new win.XMLHttpRequest(); } try { return new win.ActiveXObject("Microsoft.XMLHTTP"); } catch (e){ return NULL; }} function parseInlineStyles(text){ var reg=/]*>([^<>]*)<\/style[\s]?>/img, match=reg.exec(text), stylesheets=[], rawCSSText; while (match){ rawCSSText=match[1]; if(rawCSSText){ stylesheets.push(rawCSSText); } match=reg.exec(text); } return stylesheets.join("\n\n"); } function loadStyleSheet(url){ var xhr=getXHRObject(), responseText; xhr.open("GET", url, FALSE); xhr.send(); responseText=(xhr.status===200) ? xhr.responseText:EMPTY_STRING; if(url===window.location.href){ responseText=parseInlineStyles(responseText); } return responseText; } function resolveUrl(url, contextUrl){ if(!url){ return; } function getProtocolAndHost(url){ return url.substring(0, url.indexOf("/", 8)); } if(PROTOCOL.test(url)){ return getProtocolAndHost(contextUrl)===getProtocolAndHost(url) ? url:NULL; } if(url.charAt(0)==="/"){ return getProtocolAndHost(contextUrl) + url; } var contextUrlPath=contextUrl.split("?")[0]; if(url.charAt(0)!=="?"&&contextUrlPath.charAt(contextUrlPath.length - 1)!=="/"){ contextUrlPath=contextUrlPath.substring(0, contextUrlPath.lastIndexOf("/") + 1); } return contextUrlPath + url; } function parseStyleSheet(url){ if(url){ return loadStyleSheet(url).replace(RE_COMMENT, EMPTY_STRING). replace(RE_IMPORT, function(match, quoteChar, importUrl, quoteChar2, importUrl2, media){ var cssText=parseStyleSheet(resolveUrl(importUrl||importUrl2, url)); return (media) ? "@media " + media + " {" + cssText + "}":cssText; }). replace(RE_ASSET_URL, function(match, isBehavior, quoteChar, assetUrl){ quoteChar=quoteChar||EMPTY_STRING; return isBehavior ? match:" url(" + quoteChar + resolveUrl(assetUrl, url, true) + quoteChar + ") "; }); } return EMPTY_STRING; } return function (){ var url, stylesheets=[], stylesheet, i, j, baseTags=doc.getElementsByTagName("BASE"), baseUrl=(baseTags.length > 0) ? baseTags[0].href:doc.location.href, externalStyles=doc.styleSheets, cssText, tree, flexers; for (i=0, j=externalStyles.length; i < j; i++){ stylesheet=externalStyles[i]; if(stylesheet!=NULL){ stylesheets.push(stylesheet); }} stylesheets.push(window.location); for (i=0, j=stylesheets.length; i < j; i++){ stylesheet=stylesheets[i]; if(stylesheet){ url=resolveUrl(stylesheet.href, baseUrl); if(url){ cssText=patchStyleSheet(parseStyleSheet(url)); } if(cssText){ tree=buildSelectorTree(cssText); flexers=findFlexboxElements(tree); }} } buildFlexieCall(flexers); };}()); FLX.box=function (params){ return this.renderSoftware(params); }; FLX.box.prototype={ properties:{ boxSoftware:function (target, children, params){ var selectors, stylesheet, paddingFix, generatedRules, i, j, selector; target.style.display="block"; if(BROWSER.IE===8){ target.style.overflow="hidden"; } if(!params.cleared){ selectors=params.selector.split(/\s?,\s?/); stylesheet=doc.styleSheets; stylesheet=stylesheet[stylesheet.length - 1]; paddingFix="padding-top:" + (getComputedStyle(target, PADDING_TOP, NULL)||"0.1px;"); generatedRules=[ "content: '.'", "display: block", "height: 0", "overflow: hidden" ].join(";"); for (i=0, j=selectors.length; i < j; i++){ selector=selectors[i]; if(stylesheet.addRule){ if(BROWSER.IE < 8){ target.style.zoom="1"; if(BROWSER.IE===6){ stylesheet.addRule(selector.replace(/\>|\+|\~/g, ""), paddingFix + "zoom:1;", 0); }else if(BROWSER.IE===7){ stylesheet.addRule(selector, paddingFix + "display:inline-block;", 0); }}else{ stylesheet.addRule(selector, paddingFix, 0); stylesheet.addRule(selector + ":before", generatedRules, 0); stylesheet.addRule(selector + ":after", generatedRules + ";clear:both;", 0); }}else if(stylesheet.insertRule){ stylesheet.insertRule(selector + "{" + paddingFix + "}", 0); stylesheet.insertRule(selector + ":after{" + generatedRules + ";clear:both;}", 0); }} params.cleared=TRUE; }}, boxDirection:function (target, children, params){ var nestedSelector, nested, i, j, kid, node; if((params.direction==="reverse"&&!params.reversed)||(params.direction==="normal"&¶ms.reversed)){ children=children.reverse(); for (i=0, j=children.length; i < j; i++){ kid=children[i]; target.appendChild(kid); } nestedSelector=LIBRARY(params.nested); for (i=0, j=nestedSelector.length; i < j; i++){ node=nestedSelector[i]; nested=FLEX_BOXES[node.FLX_DOM_ID]; if(nested&&nested.direction===INHERIT){ nested.direction=params.direction; }} params.reversed = !params.reversed; }}, boxOrient:function (target, children, params){ var self=this, wide, high, i, j, kid; wide={ pos:"marginLeft", opp:"marginRight", dim:"width", out:"offsetWidth", func:clientWidth, pad:[PADDING_LEFT, PADDING_RIGHT, BORDER_LEFT, BORDER_RIGHT] }; high={ pos:"marginTop", opp:"marginBottom", dim:"height", out:"offsetHeight", func:clientHeight, pad:[PADDING_TOP, PADDING_BOTTOM, BORDER_TOP, BORDER_BOTTOM] }; if(!SUPPORT){ for (i=0, j=children.length; i < j; i++){ kid=children[i]; kid.style[(BROWSER.IE >=9) ? "cssFloat":"styleFloat"]=LEFT; if(params.orient===VERTICAL||params.orient===BLOCK_AXIS){ kid.style.clear=LEFT; } if(BROWSER.IE===6){ kid.style.display="inline"; }} } switch (params.orient){ case VERTICAL : case BLOCK_AXIS: self.props=high; self.anti=wide; break; default : self.props=wide; self.anti=high; break; }}, boxOrdinalGroup:function (target, children, params){ var organizeChildren, matrix; if(!children.length){ return; } organizeChildren=function (matrix){ var keys=matrix.keys, iterator=params.reversed ? keys:keys.reverse(), i, j, key, k, l, kid; for (i=0, j=iterator.length; i < j; i++){ key=iterator[i]; for (k=0, l=children.length; k < l; k++){ kid=children[k]; if(key===kid.getAttribute("data-ordinal-group")){ target.appendChild(kid); }} }}; matrix=createMatchMatrix(params.children, children, TRUE); if(matrix.keys.length > 1){ organizeChildren(matrix); }}, boxFlex:function (target, children, params){ var self=this, testForRestrictiveProperties, findTotalWhitespace, distributeRatio, matrix, restrict, whitespace, distro; if(!children.length){ return; } testForRestrictiveProperties=function (matrix){ var flexers=matrix.groups, keys=matrix.keys, max, i, j, key, k, l, x, m, n, rule; for (i=0, j=keys.length; i < j; i++){ key=keys[i]; for (k=0, l=flexers[key].length; k < l; k++){ x=flexers[key][k]; max=NULL; for (m=0, n=x.properties.length; m < n; m++){ rule=x.properties[m]; if((RESTRICTIVE_PROPERTIES).test(rule.property)){ max=parseFloat(rule.value); }} if(!max||x.match[self.props.out] > max){ appendPixelValue(x.match, self.props.pos, NULL); }} }}; findTotalWhitespace=function (matrix){ var groupDimension=0, whitespace, ration, i, j, kid, k, l, pad; for (i=0, j=children.length; i < j; i++){ kid=children[i]; groupDimension +=getComputedStyle(kid, self.props.dim, TRUE); for (k=0, l=self.props.pad.length; k < l; k++){ pad=self.props.pad[k]; groupDimension +=getComputedStyle(kid, pad, TRUE); } groupDimension +=getComputedStyle(kid, self.props.pos, TRUE); groupDimension +=getComputedStyle(kid, self.props.opp, TRUE); } whitespace=target[self.props.out] - groupDimension; for (i=0, j=self.props.pad.length; i < j; i++){ pad=self.props.pad[i]; whitespace -=getComputedStyle(target, pad, TRUE); } ration=(whitespace / matrix.total); return { whitespace:whitespace, ration:ration };}; distributeRatio=function (matrix, whitespace){ var flexers=matrix.groups, keys=matrix.keys, flex, specificity, ration=whitespace.ration, widthRation, trueDim, newDimension, i, j, key, k, l, x; for (i=0, j=keys.length; i < j; i++){ key=keys[i]; widthRation=(ration * key); for (k=0, l=flexers[key].length; k < l; k++){ x=flexers[key][k]; if(x.match){ flex=x.match.getAttribute("data-flex"); specificity=x.match.getAttribute("data-specificity"); if(!flex||(specificity <=x.flexSpecificity)){ x.match.setAttribute("data-flex", key); x.match.setAttribute("data-specificity", x.flexSpecificity); trueDim=getComputedStyle(x.match, self.props.dim, TRUE); newDimension=Math.max(0, (trueDim + widthRation)); appendPixelValue(x.match, self.props.dim, newDimension); }} }} }; matrix=createMatchMatrix(params.children, children, NULL); if(matrix.total){ params.hasFlex=TRUE; restrict=testForRestrictiveProperties(matrix); whitespace=findTotalWhitespace(matrix); distro=distributeRatio(matrix, whitespace); }}, boxAlign:function (target, children, params){ var self=this, targetDimension, kidDimension, flexCheck=parentFlex(target), i, j, pad, k, l, kid; if(!SUPPORT&&!flexCheck.flex&&(params.orient===VERTICAL||params.orient===BLOCK_AXIS)){ if(!dimensionValues(target, self.anti.dim)){ appendPixelValue(target, self.anti.dim, NULL); } appendPixelValue(children, self.anti.dim, NULL); } targetDimension=target[self.anti.out]; for (i=0, j=self.anti.pad.length; i < j; i++){ pad=self.anti.pad[i]; targetDimension -=getComputedStyle(target, pad, TRUE); } switch (params.align){ case "start" : break; case "end" : for (i=0, j=children.length; i < j; i++){ kid=children[i]; kidDimension=targetDimension - kid[self.anti.out]; kidDimension -=getComputedStyle(kid, self.anti.opp, TRUE); appendPixelValue(kid, self.anti.pos, kidDimension); } break; case "center" : for (i=0, j=children.length; i < j; i++){ kid=children[i]; kidDimension=(targetDimension - kid[self.anti.out]) / 2; appendPixelValue(kid, self.anti.pos, kidDimension); } break; default : for (i=0, j=children.length; i < j; i++){ kid=children[i]; switch (kid.nodeName.toLowerCase()){ case "button" : case "input" : case "select" : break; default : var subtract=0; for (k=0, l=self.anti.pad.length; k < l; k++){ pad=self.anti.pad[k]; subtract +=getComputedStyle(kid, pad, TRUE); subtract +=getComputedStyle(target, pad, TRUE); } kid.style[self.anti.dim]="100%"; kidDimension=kid[self.anti.out] - subtract; appendPixelValue(kid, self.anti.dim, NULL); kidDimension=targetDimension; kidDimension -=getComputedStyle(kid, self.anti.pos, TRUE); for (k=0, l=self.anti.pad.length; k < l; k++){ pad=self.anti.pad[k]; kidDimension -=getComputedStyle(kid, pad, TRUE); } kidDimension -=getComputedStyle(kid, self.anti.opp, TRUE); kidDimension=Math.max(0, kidDimension); appendPixelValue(kid, self.anti.dim, kidDimension); break; }} break; }}, boxPack:function (target, children, params){ var self=this, groupDimension=0, firstComputedMargin=0, targetPadding=0, totalDimension, fractionedDimension, currentDimension, remainder, length=children.length - 1, kid, i, j, value, pad; for (i=0, j=children.length; i < j; i++){ kid=children[i]; groupDimension +=kid[self.props.out]; groupDimension +=getComputedStyle(kid, self.props.pos, TRUE); groupDimension +=getComputedStyle(kid, self.props.opp, TRUE); } firstComputedMargin=getComputedStyle(children[0], self.props.pos, TRUE); totalDimension=target[self.props.out] - groupDimension; for (i=0, j=self.props.pad.length; i < j; i++){ pad=self.props.pad[i]; totalDimension -=getComputedStyle(target, pad, TRUE); } if(totalDimension < 0){ totalDimension=Math.max(0, totalDimension); } switch (params.pack){ case "end" : appendPixelValue(children[0], self.props.pos, targetPadding + firstComputedMargin + totalDimension); break; case "center" : if(targetPadding){ targetPadding /=2; } appendPixelValue(children[0], self.props.pos, targetPadding + firstComputedMargin + Math.floor(totalDimension / 2)); break; case "justify" : fractionedDimension=Math.floor((targetPadding + totalDimension) / length); remainder=(fractionedDimension * length) - totalDimension; i=children.length - 1; while (i){ kid=children[i]; currentDimension=fractionedDimension; if(remainder){ currentDimension++; remainder++; } value=getComputedStyle(kid, self.props.pos, TRUE) + currentDimension; appendPixelValue(kid, self.props.pos, value); i--; } break; } target.style.overflow=""; }}, setup:function (target, children, params){ var self=this, matrix, flexCheck, key, func; if(!target||!children||!params){ return; } if(SUPPORT&&SUPPORT.partialSupport){ matrix=createMatchMatrix(params.children, children, NULL); flexCheck=parentFlex(target); children=sanitizeChildren(target, target.childNodes); self.properties.boxOrient.call(self, target, children, params); if(!matrix.total||!LIBRARY(params.nested).length){ if((params.align==="stretch")&&!SUPPORT.boxAlignStretch&&(!flexCheck.nested||!flexCheck.flex)){ self.properties.boxAlign.call(self, target, children, params); } if((params.pack==="justify")&&!SUPPORT.boxPackJustify&&!matrix.total){ self.properties.boxPack.call(self, target, children, params); }} }else if(!SUPPORT){ for (key in self.properties){ if(self.properties.hasOwnProperty(key)){ func=self.properties[key]; func.call(self, target, sanitizeChildren(target, target.childNodes), params); }} }}, trackDOM:function (params){ attachResizeListener(this, params); }, updateSoftware:function (params){ var self=this, target=params.target, children=params.nodes; cleanPositioningProperties(children); if(params.flexMatrix||params.ordinalMatrix){ params=updateChildValues(params); } self.setup(target, children, params); self.bubbleUp(target, params); }, renderSoftware:function (params){ var self=this, target=params.target, nodes=target.childNodes; if(!target.length&&!nodes){ return false; } params=ensureStructuralIntegrity(params, this); self.updateSoftware(params); win.setTimeout(function (){ self.trackDOM(params); }, 0); return self; }, bubbleUp:function (target, params){ var self=this, flex, parent=params.target.parentNode; while (parent){ flex=FLEX_BOXES[parent.FLX_DOM_ID]; if(flex){ cleanPositioningProperties(flex.nodes); self.setup(flex.target, flex.nodes, flex); } parent=parent.parentNode; }} }; FLX.updateInstance=function (target, params){ var box, key; if(target){ box=FLEX_BOXES[target.FLX_DOM_ID]; if(box&&box._instance){ box._instance.updateSoftware(box); }else if(!box){ box=new FLX.box(params); }}else{ for (key in FLEX_BOXES){ if(FLEX_BOXES.hasOwnProperty(key)){ box=FLEX_BOXES[key]; if(box&&box._instance){ box._instance.updateSoftware(box); }} }} }; FLX.getInstance=function (target){ return FLEX_BOXES[target.FLX_DOM_ID]; }; FLX.destroyInstance=function (target){ var box, destroy, i, j, x, key; destroy=function (box){ box.target.FLX_DOM_ID=NULL; box.target.style.cssText=EMPTY_STRING; for (i=0, j=box.children.length; i < j; i++){ x=box.children[i]; x.match.style.cssText=EMPTY_STRING; }}; if(target){ box=FLEX_BOXES[target.FLX_DOM_ID]; if(box){ destroy(box); }}else{ for (key in FLEX_BOXES){ if(FLEX_BOXES.hasOwnProperty(key)){ destroy(FLEX_BOXES[key]); }} FLEX_BOXES=[]; }}; FLX.flexboxSupport=function (){ var partialSupportGrid={}, height=100, childHeight, dummy=doc.createElement("flxbox"), child='', tests, result, key, value; dummy.style.width=dummy.style.height=height + "px"; dummy.innerHTML=(child + child + child); appendProperty(dummy, "display", "box", NULL); appendProperty(dummy, "box-align", "stretch", TRUE); appendProperty(dummy, "box-pack", "justify", TRUE); doc.body.appendChild(dummy); childHeight=dummy.firstChild.offsetHeight; tests={ boxAlignStretch:function (){ return (childHeight===100); }, boxPackJustify:function (){ var totalOffset=0, i, j; for (i=0, j=dummy.childNodes.length; i < j; i++){ totalOffset +=dummy.childNodes[i].offsetLeft; } return (totalOffset===135); }}; for (key in tests){ if(tests.hasOwnProperty(key)){ value=tests[key]; result=value(); if(!result){ partialSupportGrid.partialSupport=TRUE; } partialSupportGrid[key]=result; }} doc.body.removeChild(dummy); return ~ (dummy.style.display).indexOf("box") ? partialSupportGrid:FALSE; }; FLX.init=function (){ FLX.flexboxSupported=SUPPORT=FLX.flexboxSupport(); if((!SUPPORT||SUPPORT.partialSupport)&&LIBRARY){ selectivizrEngine(); }}; FLX.version="1.0.3"; attachLoadMethod(FLX.init); return FLX; }(this, document)); (function($){ $(document).ready(function(){ $(".tabs").each(function(){ $(this).find(".tab").hide(); $(this).find(".tab-menu li:first a").addClass("active").show(); $(this).find(".tab:first").show(); }); $(".tabs").each(function(){ $(this).find(".tab-menu a").click(function(){ $(this).parent().parent().find("a").removeClass("active"); $(this).addClass("active"); $(this).parent().parent().parent().parent().find(".tab").hide(); var activeTab=$(this).attr("href"); $(activeTab).fadeIn(); return false; }); }); $(".toggle").each(function(){ $(this).find(".box").hide(); }); $(".toggle").each(function(){ $(this).find(".trigger").click(function(){ $(this).toggleClass("active").next().stop(true, true).slideToggle("normal"); return false; }); }); $(".recent-posts.team li:nth-child(3n)").addClass("nomargin"); $("a[rel^='prettyPhoto']").prettyPhoto({ animation_speed:'normal', slideshow:5000, autoplay_slideshow: false, overlay_gallery: true }); var container=$('.isotope'), filterLinks=$('#filter-by a'); filterLinks.click(function(e){ var selector=$(this).attr('data-filter'); container.isotope({ filter:'.' + selector, itemSelector:'.isotope-item', layoutMode:'fitRows', animationEngine:'best-available' }); filterLinks.removeClass('active'); $('#filter-by li').removeClass('current-cat'); $(this).addClass('active'); e.preventDefault(); }); $(function (){ $(window).scroll(function (){ if($(this).scrollTop() > 100){ $('#back-top').fadeIn(); }else{ $('#back-top').fadeOut(); }}); $('#back-top a').click(function (){ $('body,html').stop(false, false).animate({ scrollTop: 0 }, 800); return false; }); }); $('.breadcrumb li a').each(function(){ var th=$(this); if(th.text()=='Uncategorized'){ th.parent().parent().remove(); }}); $('#content article:first, #content article:first').addClass('first'); $('.single-post #content article').addClass('clearfix'); $('#topnav > li:last').addClass('last'); $('#topnav .sub-menu li').each(function(){ var temp1=$(this).find('ul'); if(temp1.length > 0) $(this).addClass('hasChildren'); }); $('#home-content div[id*="advanced-recent-posts"]').addClass('clearfix'); $('#searchform input[type="text"]').attr('placeholder', 'Keyword'); $('.single-portfolio').each(function(){ var temp1=$(this).find('.grid_gallery'); var temp2=$(this).find('.two_third'); if(temp1.length > 0) temp2.addClass('has_grid_gallery'); }); $('.search-results #content article.post-holder, .blog #content article.post-holder, .archive #content article.post-holder, .author #content article.post-holder').each(function(){ var tempImage=$(this).find('.featured-thumbnail'); if(tempImage.length==0) $(this).find('.post-content').css({paddingLeft: '0'}); }); if($('.pagination').length < 2){ $('.pagination').css({display: 'none'});} if($('.pagenavi').length>0){ $('.pagenavi').fadeIn(1000); } $('ul.count').each(function(){ var tt=$(this).find('li'); for (var i=tt.length - 1; i >=0; i--){ var tx=''+(i+1)+'.'; $(tt[i]).append(tx); };}); $('.recent-post-item').addClass('clearfix'); $("body").on('mouseover', '.wpcf7-not-valid-tip',function(){ $(this).remove(); }); $.fn.equalHeights=function(){ var heights=[]; this.each(function(){ heights.push($(this).height()); }); var maxHeight=Math.max.apply(0, heights); this.height(maxHeight); } window.onload=function(){ $('#carouselArea > div').css({opacity: '1'}); $('#carouselArea').addClass('loaded'); $('.breadcrumb').animate({opacity:'1'}, 400); } $('.wrap_content .fluid_W50:nth-child(2n+1)').after('
    '); window.onresize=res; function res(){ } }); })(jQuery);