// STARTS OF /share/jquery.min.js /*! jQuery v1-10-2 | (c) 2005, 2013 jQuery Foundation, Inc. | jquery.org/license //@ sourceMappingURL=jquery-1-10-2.min.map */ (function(e,t){var n,r,i=typeof t,o=e.location,a=e.document,s=a.documentElement,l=e.jQuery,u=e.$,c={},p=[],f="1-10-2",d=p.concat,h=p.push,g=p.slice,m=p.indexOf,y=c.toString,v=c.hasOwnProperty,b=f.trim,x=function(e,t){return new x.fn.init(e,t,r)},w=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,T=/\S+/g,C=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,N=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,k=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,E=/^[\],:{}\s]*$/,S=/(?:^|:|,)(?:\s*\[)+/g,A=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,j=/"[^"\\\r\n]*"|true|false|null|-?(?:\d+\.|)\d+(?:[eE][+-]?\d+|)/g,D=/^-ms-/,L=/-([\da-z])/gi,H=function(e,t){return t.toUpperCase()},q=function(e){(a.addEventListener||"load"===e.type||"complete"===a.readyState)&&(_(),x.ready())},_=function(){a.addEventListener?(a.removeEventListener("DOMContentLoaded",q,!1),e.removeEventListener("load",q,!1)):(a.detachEvent("onreadystatechange",q),e.detachEvent("onload",q))};x.fn=x.prototype={jquery:f,constructor:x,init:function(e,n,r){var i,o;if(!e)return this;if("string"==typeof e){if(i="<"===e.charAt(0)&&">"===e.charAt(e.length-1)&&e.length>=3?[null,e,null]:N.exec(e),!i||!i[1]&&n)return!n||n.jquery?(n||r).find(e):this.constructor(n).find(e);if(i[1]){if(n=n instanceof x?n[0]:n,x.merge(this,x.parseHTML(i[1],n&&n.nodeType?n.ownerDocument||n:a,!0)),k.test(i[1])&&x.isPlainObject(n))for(i in n)x.isFunction(this[i])?this[i](n[i]):this.attr(i,n[i]);return this}if(o=a.getElementById(i[2]),o&&o.parentNode){if(o.id!==i[2])return r.find(e);this.length=1,this[0]=o}return this.context=a,this.selector=e,this}return e.nodeType?(this.context=this[0]=e,this.length=1,this):x.isFunction(e)?r.ready(e):(e.selector!==t&&(this.selector=e.selector,this.context=e.context),x.makeArray(e,this))},selector:"",length:0,toArray:function(){return g.call(this)},get:function(e){return null==e?this.toArray():0>e?this[this.length+e]:this[e]},pushStack:function(e){var t=x.merge(this.constructor(),e);return t.prevObject=this,t.context=this.context,t},each:function(e,t){return x.each(this,e,t)},ready:function(e){return x.ready.promise().done(e),this},slice:function(){return this.pushStack(g.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(0>e?t:0);return this.pushStack(n>=0&&t>n?[this[n]]:[])},map:function(e){return this.pushStack(x.map(this,function(t,n){return e.call(t,n,t)}))},end:function(){return this.prevObject||this.constructor(null)},push:h,sort:[].sort,splice:[].splice},x.fn.init.prototype=x.fn,x.extend=x.fn.extend=function(){var e,n,r,i,o,a,s=arguments[0]||{},l=1,u=arguments.length,c=!1;for("boolean"==typeof s&&(c=s,s=arguments[1]||{},l=2),"object"==typeof s||x.isFunction(s)||(s={}),u===l&&(s=this,--l);u>l;l++)if(null!=(o=arguments[l]))for(i in o)e=s[i],r=o[i],s!==r&&(c&&r&&(x.isPlainObject(r)||(n=x.isArray(r)))?(n?(n=!1,a=e&&x.isArray(e)?e:[]):a=e&&x.isPlainObject(e)?e:{},s[i]=x.extend(c,a,r)):r!==t&&(s[i]=r));return s},x.extend({expando:"jQuery"+(f+Math.random()).replace(/\D/g,""),noConflict:function(t){return e.$===x&&(e.$=u),t&&e.jQuery===x&&(e.jQuery=l),x},isReady:!1,readyWait:1,holdReady:function(e){e?x.readyWait++:x.ready(!0)},ready:function(e){if(e===!0?!--x.readyWait:!x.isReady){if(!a.body)return setTimeout(x.ready);x.isReady=!0,e!==!0&&--x.readyWait>0||(n.resolveWith(a,[x]),x.fn.trigger&&x(a).trigger("ready").off("ready"))}},isFunction:function(e){return"function"===x.type(e)},isArray:Array.isArray||function(e){return"array"===x.type(e)},isWindow:function(e){return null!=e&&e==e.window},isNumeric:function(e){return!isNaN(parseFloat(e))&&isFinite(e)},type:function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?c[y.call(e)]||"object":typeof e},isPlainObject:function(e){var n;if(!e||"object"!==x.type(e)||e.nodeType||x.isWindow(e))return!1;try{if(e.constructor&&!v.call(e,"constructor")&&!v.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(r){return!1}if(x.support.ownLast)for(n in e)return v.call(e,n);for(n in e);return n===t||v.call(e,n)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},error:function(e){throw Error(e)},parseHTML:function(e,t,n){if(!e||"string"!=typeof e)return null;"boolean"==typeof t&&(n=t,t=!1),t=t||a;var r=k.exec(e),i=!n&&[];return r?[t.createElement(r[1])]:(r=x.buildFragment([e],t,i),i&&x(i).remove(),x.merge([],r.childNodes))},parseJSON:function(n){return e.JSON&&e.JSON.parse?e.JSON.parse(n):null===n?n:"string"==typeof n&&(n=x.trim(n),n&&E.test(n.replace(A,"@").replace(j,"]").replace(S,"")))?Function("return "+n)():(x.error("Invalid JSON: "+n),t)},parseXML:function(n){var r,i;if(!n||"string"!=typeof n)return null;try{e.DOMParser?(i=new DOMParser,r=i.parseFromString(n,"text/xml")):(r=new ActiveXObject("Microsoft.XMLDOM"),r.async="false",r.loadXML(n))}catch(o){r=t}return r&&r.documentElement&&!r.getElementsByTagName("parsererror").length||x.error("Invalid XML: "+n),r},noop:function(){},globalEval:function(t){t&&x.trim(t)&&(e.execScript||function(t){e.eval.call(e,t)})(t)},camelCase:function(e){return e.replace(D,"ms-").replace(L,H)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,t,n){var r,i=0,o=e.length,a=M(e);if(n){if(a){for(;o>i;i++)if(r=t.apply(e[i],n),r===!1)break}else for(i in e)if(r=t.apply(e[i],n),r===!1)break}else if(a){for(;o>i;i++)if(r=t.call(e[i],i,e[i]),r===!1)break}else for(i in e)if(r=t.call(e[i],i,e[i]),r===!1)break;return e},trim:b&&!b.call("\ufeff\u00a0")?function(e){return null==e?"":b.call(e)}:function(e){return null==e?"":(e+"").replace(C,"")},makeArray:function(e,t){var n=t||[];return null!=e&&(M(Object(e))?x.merge(n,"string"==typeof e?[e]:e):h.call(n,e)),n},inArray:function(e,t,n){var r;if(t){if(m)return m.call(t,e,n);for(r=t.length,n=n?0>n?Math.max(0,r+n):n:0;r>n;n++)if(n in t&&t[n]===e)return n}return-1},merge:function(e,n){var r=n.length,i=e.length,o=0;if("number"==typeof r)for(;r>o;o++)e[i++]=n[o];else while(n[o]!==t)e[i++]=n[o++];return e.length=i,e},grep:function(e,t,n){var r,i=[],o=0,a=e.length;for(n=!!n;a>o;o++)r=!!t(e[o],o),n!==r&&i.push(e[o]);return i},map:function(e,t,n){var r,i=0,o=e.length,a=M(e),s=[];if(a)for(;o>i;i++)r=t(e[i],i,n),null!=r&&(s[s.length]=r);else for(i in e)r=t(e[i],i,n),null!=r&&(s[s.length]=r);return d.apply([],s)},guid:1,proxy:function(e,n){var r,i,o;return"string"==typeof n&&(o=e[n],n=e,e=o),x.isFunction(e)?(r=g.call(arguments,2),i=function(){return e.apply(n||this,r.concat(g.call(arguments)))},i.guid=e.guid=e.guid||x.guid++,i):t},access:function(e,n,r,i,o,a,s){var l=0,u=e.length,c=null==r;if("object"===x.type(r)){o=!0;for(l in r)x.access(e,n,l,r[l],!0,a,s)}else if(i!==t&&(o=!0,x.isFunction(i)||(s=!0),c&&(s?(n.call(e,i),n=null):(c=n,n=function(e,t,n){return c.call(x(e),n)})),n))for(;u>l;l++)n(e[l],r,s?i:i.call(e[l],l,n(e[l],r)));return o?e:c?n.call(e):u?n(e[0],r):a},now:function(){return(new Date).getTime()},swap:function(e,t,n,r){var i,o,a={};for(o in t)a[o]=e.style[o],e.style[o]=t[o];i=n.apply(e,r||[]);for(o in t)e.style[o]=a[o];return i}}),x.ready.promise=function(t){if(!n)if(n=x.Deferred(),"complete"===a.readyState)setTimeout(x.ready);else if(a.addEventListener)a.addEventListener("DOMContentLoaded",q,!1),e.addEventListener("load",q,!1);else{a.attachEvent("onreadystatechange",q),e.attachEvent("onload",q);var r=!1;try{r=null==e.frameElement&&a.documentElement}catch(i){}r&&r.doScroll&&function o(){if(!x.isReady){try{r.doScroll("left")}catch(e){return setTimeout(o,50)}_(),x.ready()}}()}return n.promise(t)},x.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(e,t){c["[object "+t+"]"]=t.toLowerCase()});function M(e){var t=e.length,n=x.type(e);return x.isWindow(e)?!1:1===e.nodeType&&t?!0:"array"===n||"function"!==n&&(0===t||"number"==typeof t&&t>0&&t-1 in e)}r=x(a),function(e,t){var n,r,i,o,a,s,l,u,c,p,f,d,h,g,m,y,v,b="sizzle"+-new Date,w=e.document,T=0,C=0,N=st(),k=st(),E=st(),S=!1,A=function(e,t){return e===t?(S=!0,0):0},j=typeof t,D=1<<31,L={}.hasOwnProperty,H=[],q=H.pop,_=H.push,M=H.push,O=H.slice,F=H.indexOf||function(e){var t=0,n=this.length;for(;n>t;t++)if(this[t]===e)return t;return-1},B="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",P="[\\x20\\t\\r\\n\\f]",R="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",W=R.replace("w","w#"),$="\\["+P+"*("+R+")"+P+"*(?:([*^$|!~]?=)"+P+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+W+")|)|)"+P+"*\\]",I=":("+R+")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|"+$.replace(3,8)+")*)|.*)\\)|)",z=RegExp("^"+P+"+|((?:^|[^\\\\])(?:\\\\.)*)"+P+"+$","g"),X=RegExp("^"+P+"*,"+P+"*"),U=RegExp("^"+P+"*([>+~]|"+P+")"+P+"*"),V=RegExp(P+"*[+~]"),Y=RegExp("="+P+"*([^\\]'\"]*)"+P+"*\\]","g"),J=RegExp(I),G=RegExp("^"+W+"$"),Q={ID:RegExp("^#("+R+")"),CLASS:RegExp("^\\.("+R+")"),TAG:RegExp("^("+R.replace("w","w*")+")"),ATTR:RegExp("^"+$),PSEUDO:RegExp("^"+I),CHILD:RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+P+"*(even|odd|(([+-]|)(\\d*)n|)"+P+"*(?:([+-]|)"+P+"*(\\d+)|))"+P+"*\\)|)","i"),bool:RegExp("^(?:"+B+")$","i"),needsContext:RegExp("^"+P+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+P+"*((?:-\\d)?\\d*)"+P+"*\\)|)(?=[^-]|$)","i")},K=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,et=/^(?:input|select|textarea|button)$/i,tt=/^h\d$/i,nt=/'|\\/g,rt=RegExp("\\\\([\\da-f]{1,6}"+P+"?|("+P+")|.)","ig"),it=function(e,t,n){var r="0x"+t-65536;return r!==r||n?t:0>r?String.fromCharCode(r+65536):String.fromCharCode(55296|r>>10,56320|1023&r)};try{M.apply(H=O.call(w.childNodes),w.childNodes),H[w.childNodes.length].nodeType}catch(ot){M={apply:H.length?function(e,t){_.apply(e,O.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function at(e,t,n,i){var o,a,s,l,u,c,d,m,y,x;if((t?t.ownerDocument||t:w)!==f&&p(t),t=t||f,n=n||[],!e||"string"!=typeof e)return n;if(1!==(l=t.nodeType)&&9!==l)return[];if(h&&!i){if(o=Z.exec(e))if(s=o[1]){if(9===l){if(a=t.getElementById(s),!a||!a.parentNode)return n;if(a.id===s)return n.push(a),n}else if(t.ownerDocument&&(a=t.ownerDocument.getElementById(s))&&v(t,a)&&a.id===s)return n.push(a),n}else{if(o[2])return M.apply(n,t.getElementsByTagName(e)),n;if((s=o[3])&&r.getElementsByClassName&&t.getElementsByClassName)return M.apply(n,t.getElementsByClassName(s)),n}if(r.qsa&&(!g||!g.test(e))){if(m=d=b,y=t,x=9===l&&e,1===l&&"object"!==t.nodeName.toLowerCase()){c=mt(e),(d=t.getAttribute("id"))?m=d.replace(nt,"\\$&"):t.setAttribute("id",m),m="[id='"+m+"'] ",u=c.length;while(u--)c[u]=m+yt(c[u]);y=V.test(e)&&t.parentNode||t,x=c.join(",")}if(x)try{return M.apply(n,y.querySelectorAll(x)),n}catch(T){}finally{d||t.removeAttribute("id")}}}return kt(e.replace(z,"$1"),t,n,i)}function st(){var e=[];function t(n,r){return e.push(n+=" ")>o.cacheLength&&delete t[e.shift()],t[n]=r}return t}function lt(e){return e[b]=!0,e}function ut(e){var t=f.createElement("div");try{return!!e(t)}catch(n){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function ct(e,t){var n=e.split("|"),r=e.length;while(r--)o.attrHandle[n[r]]=t}function pt(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&(~t.sourceIndex||D)-(~e.sourceIndex||D);if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function ft(e){return function(t){var n=t.nodeName.toLowerCase();return"input"===n&&t.type===e}}function dt(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function ht(e){return lt(function(t){return t=+t,lt(function(n,r){var i,o=e([],n.length,t),a=o.length;while(a--)n[i=o[a]]&&(n[i]=!(r[i]=n[i]))})})}s=at.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return t?"HTML"!==t.nodeName:!1},r=at.support={},p=at.setDocument=function(e){var n=e?e.ownerDocument||e:w,i=n.defaultView;return n!==f&&9===n.nodeType&&n.documentElement?(f=n,d=n.documentElement,h=!s(n),i&&i.attachEvent&&i!==i.top&&i.attachEvent("onbeforeunload",function(){p()}),r.attributes=ut(function(e){return e.className="i",!e.getAttribute("className")}),r.getElementsByTagName=ut(function(e){return e.appendChild(n.createComment("")),!e.getElementsByTagName("*").length}),r.getElementsByClassName=ut(function(e){return e.innerHTML="
",e.firstChild.className="i",2===e.getElementsByClassName("i").length}),r.getById=ut(function(e){return d.appendChild(e).id=b,!n.getElementsByName||!n.getElementsByName(b).length}),r.getById?(o.find.ID=function(e,t){if(typeof t.getElementById!==j&&h){var n=t.getElementById(e);return n&&n.parentNode?[n]:[]}},o.filter.ID=function(e){var t=e.replace(rt,it);return function(e){return e.getAttribute("id")===t}}):(delete o.find.ID,o.filter.ID=function(e){var t=e.replace(rt,it);return function(e){var n=typeof e.getAttributeNode!==j&&e.getAttributeNode("id");return n&&n.value===t}}),o.find.TAG=r.getElementsByTagName?function(e,n){return typeof n.getElementsByTagName!==j?n.getElementsByTagName(e):t}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},o.find.CLASS=r.getElementsByClassName&&function(e,n){return typeof n.getElementsByClassName!==j&&h?n.getElementsByClassName(e):t},m=[],g=[],(r.qsa=K.test(n.querySelectorAll))&&(ut(function(e){e.innerHTML="",e.querySelectorAll("[selected]").length||g.push("\\["+P+"*(?:value|"+B+")"),e.querySelectorAll(":checked").length||g.push(":checked")}),ut(function(e){var t=n.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("t",""),e.querySelectorAll("[t^='']").length&&g.push("[*^$]="+P+"*(?:''|\"\")"),e.querySelectorAll(":enabled").length||g.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),g.push(",.*:")})),(r.matchesSelector=K.test(y=d.webkitMatchesSelector||d.mozMatchesSelector||d.oMatchesSelector||d.msMatchesSelector))&&ut(function(e){r.disconnectedMatch=y.call(e,"div"),y.call(e,"[s!='']:x"),m.push("!=",I)}),g=g.length&&RegExp(g.join("|")),m=m.length&&RegExp(m.join("|")),v=K.test(d.contains)||d.compareDocumentPosition?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},A=d.compareDocumentPosition?function(e,t){if(e===t)return S=!0,0;var i=t.compareDocumentPosition&&e.compareDocumentPosition&&e.compareDocumentPosition(t);return i?1&i||!r.sortDetached&&t.compareDocumentPosition(e)===i?e===n||v(w,e)?-1:t===n||v(w,t)?1:c?F.call(c,e)-F.call(c,t):0:4&i?-1:1:e.compareDocumentPosition?-1:1}:function(e,t){var r,i=0,o=e.parentNode,a=t.parentNode,s=[e],l=[t];if(e===t)return S=!0,0;if(!o||!a)return e===n?-1:t===n?1:o?-1:a?1:c?F.call(c,e)-F.call(c,t):0;if(o===a)return pt(e,t);r=e;while(r=r.parentNode)s.unshift(r);r=t;while(r=r.parentNode)l.unshift(r);while(s[i]===l[i])i++;return i?pt(s[i],l[i]):s[i]===w?-1:l[i]===w?1:0},n):f},at.matches=function(e,t){return at(e,null,null,t)},at.matchesSelector=function(e,t){if((e.ownerDocument||e)!==f&&p(e),t=t.replace(Y,"='$1']"),!(!r.matchesSelector||!h||m&&m.test(t)||g&&g.test(t)))try{var n=y.call(e,t);if(n||r.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(i){}return at(t,f,null,[e]).length>0},at.contains=function(e,t){return(e.ownerDocument||e)!==f&&p(e),v(e,t)},at.attr=function(e,n){(e.ownerDocument||e)!==f&&p(e);var i=o.attrHandle[n.toLowerCase()],a=i&&L.call(o.attrHandle,n.toLowerCase())?i(e,n,!h):t;return a===t?r.attributes||!h?e.getAttribute(n):(a=e.getAttributeNode(n))&&a.specified?a.value:null:a},at.error=function(e){throw Error("Syntax error, unrecognized expression: "+e)},at.uniqueSort=function(e){var t,n=[],i=0,o=0;if(S=!r.detectDuplicates,c=!r.sortStable&&e.slice(0),e.sort(A),S){while(t=e[o++])t===e[o]&&(i=n.push(o));while(i--)e.splice(n[i],1)}return e},a=at.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=a(e)}else if(3===i||4===i)return e.nodeValue}else for(;t=e[r];r++)n+=a(t);return n},o=at.selectors={cacheLength:50,createPseudo:lt,match:Q,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(rt,it),e[3]=(e[4]||e[5]||"").replace(rt,it),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||at.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&at.error(e[0]),e},PSEUDO:function(e){var n,r=!e[5]&&e[2];return Q.CHILD.test(e[0])?null:(e[3]&&e[4]!==t?e[2]=e[4]:r&&J.test(r)&&(n=mt(r,!0))&&(n=r.indexOf(")",r.length-n)-r.length)&&(e[0]=e[0].slice(0,n),e[2]=r.slice(0,n)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(rt,it).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=N[e+" "];return t||(t=RegExp("(^|"+P+")"+e+"("+P+"|$)"))&&N(e,function(e){return t.test("string"==typeof e.className&&e.className||typeof e.getAttribute!==j&&e.getAttribute("class")||"")})},ATTR:function(e,t,n){return function(r){var i=at.attr(r,e);return null==i?"!="===t:t?(i+="","="===t?i===n:"!="===t?i!==n:"^="===t?n&&0===i.indexOf(n):"*="===t?n&&i.indexOf(n)>-1:"$="===t?n&&i.slice(-n.length)===n:"~="===t?(" "+i+" ").indexOf(n)>-1:"|="===t?i===n||i.slice(0,n.length+1)===n+"-":!1):!0}},CHILD:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,l){var u,c,p,f,d,h,g=o!==a?"nextSibling":"previousSibling",m=t.parentNode,y=s&&t.nodeName.toLowerCase(),v=!l&&!s;if(m){if(o){while(g){p=t;while(p=p[g])if(s?p.nodeName.toLowerCase()===y:1===p.nodeType)return!1;h=g="only"===e&&!h&&"nextSibling"}return!0}if(h=[a?m.firstChild:m.lastChild],a&&v){c=m[b]||(m[b]={}),u=c[e]||[],d=u[0]===T&&u[1],f=u[0]===T&&u[2],p=d&&m.childNodes[d];while(p=++d&&p&&p[g]||(f=d=0)||h.pop())if(1===p.nodeType&&++f&&p===t){c[e]=[T,d,f];break}}else if(v&&(u=(t[b]||(t[b]={}))[e])&&u[0]===T)f=u[1];else while(p=++d&&p&&p[g]||(f=d=0)||h.pop())if((s?p.nodeName.toLowerCase()===y:1===p.nodeType)&&++f&&(v&&((p[b]||(p[b]={}))[e]=[T,f]),p===t))break;return f-=i,f===r||0===f%r&&f/r>=0}}},PSEUDO:function(e,t){var n,r=o.pseudos[e]||o.setFilters[e.toLowerCase()]||at.error("unsupported pseudo: "+e);return r[b]?r(t):r.length>1?(n=[e,e,"",t],o.setFilters.hasOwnProperty(e.toLowerCase())?lt(function(e,n){var i,o=r(e,t),a=o.length;while(a--)i=F.call(e,o[a]),e[i]=!(n[i]=o[a])}):function(e){return r(e,0,n)}):r}},pseudos:{not:lt(function(e){var t=[],n=[],r=l(e.replace(z,"$1"));return r[b]?lt(function(e,t,n,i){var o,a=r(e,null,i,[]),s=e.length;while(s--)(o=a[s])&&(e[s]=!(t[s]=o))}):function(e,i,o){return t[0]=e,r(t,null,o,n),!n.pop()}}),has:lt(function(e){return function(t){return at(e,t).length>0}}),contains:lt(function(e){return function(t){return(t.textContent||t.innerText||a(t)).indexOf(e)>-1}}),lang:lt(function(e){return G.test(e||"")||at.error("unsupported lang: "+e),e=e.replace(rt,it).toLowerCase(),function(t){var n;do if(n=h?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return n=n.toLowerCase(),n===e||0===n.indexOf(e+"-");while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===d},focus:function(e){return e===f.activeElement&&(!f.hasFocus||f.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return e.disabled===!1},disabled:function(e){return e.disabled===!0},checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeName>"@"||3===e.nodeType||4===e.nodeType)return!1;return!0},parent:function(e){return!o.pseudos.empty(e)},header:function(e){return tt.test(e.nodeName)},input:function(e){return et.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||t.toLowerCase()===e.type)},first:ht(function(){return[0]}),last:ht(function(e,t){return[t-1]}),eq:ht(function(e,t,n){return[0>n?n+t:n]}),even:ht(function(e,t){var n=0;for(;t>n;n+=2)e.push(n);return e}),odd:ht(function(e,t){var n=1;for(;t>n;n+=2)e.push(n);return e}),lt:ht(function(e,t,n){var r=0>n?n+t:n;for(;--r>=0;)e.push(r);return e}),gt:ht(function(e,t,n){var r=0>n?n+t:n;for(;t>++r;)e.push(r);return e})}},o.pseudos.nth=o.pseudos.eq;for(n in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})o.pseudos[n]=ft(n);for(n in{submit:!0,reset:!0})o.pseudos[n]=dt(n);function gt(){}gt.prototype=o.filters=o.pseudos,o.setFilters=new gt;function mt(e,t){var n,r,i,a,s,l,u,c=k[e+" "];if(c)return t?0:c.slice(0);s=e,l=[],u=o.preFilter;while(s){(!n||(r=X.exec(s)))&&(r&&(s=s.slice(r[0].length)||s),l.push(i=[])),n=!1,(r=U.exec(s))&&(n=r.shift(),i.push({value:n,type:r[0].replace(z," ")}),s=s.slice(n.length));for(a in o.filter)!(r=Q[a].exec(s))||u[a]&&!(r=u[a](r))||(n=r.shift(),i.push({value:n,type:a,matches:r}),s=s.slice(n.length));if(!n)break}return t?s.length:s?at.error(e):k(e,l).slice(0)}function yt(e){var t=0,n=e.length,r="";for(;n>t;t++)r+=e[t].value;return r}function vt(e,t,n){var r=t.dir,o=n&&"parentNode"===r,a=C++;return t.first?function(t,n,i){while(t=t[r])if(1===t.nodeType||o)return e(t,n,i)}:function(t,n,s){var l,u,c,p=T+" "+a;if(s){while(t=t[r])if((1===t.nodeType||o)&&e(t,n,s))return!0}else while(t=t[r])if(1===t.nodeType||o)if(c=t[b]||(t[b]={}),(u=c[r])&&u[0]===p){if((l=u[1])===!0||l===i)return l===!0}else if(u=c[r]=[p],u[1]=e(t,n,s)||i,u[1]===!0)return!0}}function bt(e){return e.length>1?function(t,n,r){var i=e.length;while(i--)if(!e[i](t,n,r))return!1;return!0}:e[0]}function xt(e,t,n,r,i){var o,a=[],s=0,l=e.length,u=null!=t;for(;l>s;s++)(o=e[s])&&(!n||n(o,r,i))&&(a.push(o),u&&t.push(s));return a}function wt(e,t,n,r,i,o){return r&&!r[b]&&(r=wt(r)),i&&!i[b]&&(i=wt(i,o)),lt(function(o,a,s,l){var u,c,p,f=[],d=[],h=a.length,g=o||Nt(t||"*",s.nodeType?[s]:s,[]),m=!e||!o&&t?g:xt(g,f,e,s,l),y=n?i||(o?e:h||r)?[]:a:m;if(n&&n(m,y,s,l),r){u=xt(y,d),r(u,[],s,l),c=u.length;while(c--)(p=u[c])&&(y[d[c]]=!(m[d[c]]=p))}if(o){if(i||e){if(i){u=[],c=y.length;while(c--)(p=y[c])&&u.push(m[c]=p);i(null,y=[],u,l)}c=y.length;while(c--)(p=y[c])&&(u=i?F.call(o,p):f[c])>-1&&(o[u]=!(a[u]=p))}}else y=xt(y===a?y.splice(h,y.length):y),i?i(null,a,y,l):M.apply(a,y)})}function Tt(e){var t,n,r,i=e.length,a=o.relative[e[0].type],s=a||o.relative[" "],l=a?1:0,c=vt(function(e){return e===t},s,!0),p=vt(function(e){return F.call(t,e)>-1},s,!0),f=[function(e,n,r){return!a&&(r||n!==u)||((t=n).nodeType?c(e,n,r):p(e,n,r))}];for(;i>l;l++)if(n=o.relative[e[l].type])f=[vt(bt(f),n)];else{if(n=o.filter[e[l].type].apply(null,e[l].matches),n[b]){for(r=++l;i>r;r++)if(o.relative[e[r].type])break;return wt(l>1&&bt(f),l>1&&yt(e.slice(0,l-1).concat({value:" "===e[l-2].type?"*":""})).replace(z,"$1"),n,r>l&&Tt(e.slice(l,r)),i>r&&Tt(e=e.slice(r)),i>r&&yt(e))}f.push(n)}return bt(f)}function Ct(e,t){var n=0,r=t.length>0,a=e.length>0,s=function(s,l,c,p,d){var h,g,m,y=[],v=0,b="0",x=s&&[],w=null!=d,C=u,N=s||a&&o.find.TAG("*",d&&l.parentNode||l),k=T+=null==C?1:Math.random()||.1;for(w&&(u=l!==f&&l,i=n);null!=(h=N[b]);b++){if(a&&h){g=0;while(m=e[g++])if(m(h,l,c)){p.push(h);break}w&&(T=k,i=++n)}r&&((h=!m&&h)&&v--,s&&x.push(h))}if(v+=b,r&&b!==v){g=0;while(m=t[g++])m(x,y,l,c);if(s){if(v>0)while(b--)x[b]||y[b]||(y[b]=q.call(p));y=xt(y)}M.apply(p,y),w&&!s&&y.length>0&&v+t.length>1&&at.uniqueSort(p)}return w&&(T=k,u=C),x};return r?lt(s):s}l=at.compile=function(e,t){var n,r=[],i=[],o=E[e+" "];if(!o){t||(t=mt(e)),n=t.length;while(n--)o=Tt(t[n]),o[b]?r.push(o):i.push(o);o=E(e,Ct(i,r))}return o};function Nt(e,t,n){var r=0,i=t.length;for(;i>r;r++)at(e,t[r],n);return n}function kt(e,t,n,i){var a,s,u,c,p,f=mt(e);if(!i&&1===f.length){if(s=f[0]=f[0].slice(0),s.length>2&&"ID"===(u=s[0]).type&&r.getById&&9===t.nodeType&&h&&o.relative[s[1].type]){if(t=(o.find.ID(u.matches[0].replace(rt,it),t)||[])[0],!t)return n;e=e.slice(s.shift().value.length)}a=Q.needsContext.test(e)?0:s.length;while(a--){if(u=s[a],o.relative[c=u.type])break;if((p=o.find[c])&&(i=p(u.matches[0].replace(rt,it),V.test(s[0].type)&&t.parentNode||t))){if(s.splice(a,1),e=i.length&&yt(s),!e)return M.apply(n,i),n;break}}}return l(e,f)(i,t,!h,n,V.test(e)),n}r.sortStable=b.split("").sort(A).join("")===b,r.detectDuplicates=S,p(),r.sortDetached=ut(function(e){return 1&e.compareDocumentPosition(f.createElement("div"))}),ut(function(e){return e.innerHTML="","#"===e.firstChild.getAttribute("href")})||ct("type|href|height|width",function(e,n,r){return r?t:e.getAttribute(n,"type"===n.toLowerCase()?1:2)}),r.attributes&&ut(function(e){return e.innerHTML="",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||ct("value",function(e,n,r){return r||"input"!==e.nodeName.toLowerCase()?t:e.defaultValue}),ut(function(e){return null==e.getAttribute("disabled")})||ct(B,function(e,n,r){var i;return r?t:(i=e.getAttributeNode(n))&&i.specified?i.value:e[n]===!0?n.toLowerCase():null}),x.find=at,x.expr=at.selectors,x.expr[":"]=x.expr.pseudos,x.unique=at.uniqueSort,x.text=at.getText,x.isXMLDoc=at.isXML,x.contains=at.contains}(e);var O={};function F(e){var t=O[e]={};return x.each(e.match(T)||[],function(e,n){t[n]=!0}),t}x.Callbacks=function(e){e="string"==typeof e?O[e]||F(e):x.extend({},e);var n,r,i,o,a,s,l=[],u=!e.once&&[],c=function(t){for(r=e.memory&&t,i=!0,a=s||0,s=0,o=l.length,n=!0;l&&o>a;a++)if(l[a].apply(t[0],t[1])===!1&&e.stopOnFalse){r=!1;break}n=!1,l&&(u?u.length&&c(u.shift()):r?l=[]:p.disable())},p={add:function(){if(l){var t=l.length;(function i(t){x.each(t,function(t,n){var r=x.type(n);"function"===r?e.unique&&p.has(n)||l.push(n):n&&n.length&&"string"!==r&&i(n)})})(arguments),n?o=l.length:r&&(s=t,c(r))}return this},remove:function(){return l&&x.each(arguments,function(e,t){var r;while((r=x.inArray(t,l,r))>-1)l.splice(r,1),n&&(o>=r&&o--,a>=r&&a--)}),this},has:function(e){return e?x.inArray(e,l)>-1:!(!l||!l.length)},empty:function(){return l=[],o=0,this},disable:function(){return l=u=r=t,this},disabled:function(){return!l},lock:function(){return u=t,r||p.disable(),this},locked:function(){return!u},fireWith:function(e,t){return!l||i&&!u||(t=t||[],t=[e,t.slice?t.slice():t],n?u.push(t):c(t)),this},fire:function(){return p.fireWith(this,arguments),this},fired:function(){return!!i}};return p},x.extend({Deferred:function(e){var t=[["resolve","done",x.Callbacks("once memory"),"resolved"],["reject","fail",x.Callbacks("once memory"),"rejected"],["notify","progress",x.Callbacks("memory")]],n="pending",r={state:function(){return n},always:function(){return i.done(arguments).fail(arguments),this},then:function(){var e=arguments;return x.Deferred(function(n){x.each(t,function(t,o){var a=o[0],s=x.isFunction(e[t])&&e[t];i[o[1]](function(){var e=s&&s.apply(this,arguments);e&&x.isFunction(e.promise)?e.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[a+"With"](this===r?n.promise():this,s?[e]:arguments)})}),e=null}).promise()},promise:function(e){return null!=e?x.extend(e,r):r}},i={};return r.pipe=r.then,x.each(t,function(e,o){var a=o[2],s=o[3];r[o[1]]=a.add,s&&a.add(function(){n=s},t[1^e][2].disable,t[2][2].lock),i[o[0]]=function(){return i[o[0]+"With"](this===i?r:this,arguments),this},i[o[0]+"With"]=a.fireWith}),r.promise(i),e&&e.call(i,i),i},when:function(e){var t=0,n=g.call(arguments),r=n.length,i=1!==r||e&&x.isFunction(e.promise)?r:0,o=1===i?e:x.Deferred(),a=function(e,t,n){return function(r){t[e]=this,n[e]=arguments.length>1?g.call(arguments):r,n===s?o.notifyWith(t,n):--i||o.resolveWith(t,n)}},s,l,u;if(r>1)for(s=Array(r),l=Array(r),u=Array(r);r>t;t++)n[t]&&x.isFunction(n[t].promise)?n[t].promise().done(a(t,u,n)).fail(o.reject).progress(a(t,l,s)):--i;return i||o.resolveWith(u,n),o.promise()}}),x.support=function(t){var n,r,o,s,l,u,c,p,f,d=a.createElement("div");if(d.setAttribute("className","t"),d.innerHTML="
a",n=d.getElementsByTagName("*")||[],r=d.getElementsByTagName("a")[0],!r||!r.style||!n.length)return t;s=a.createElement("select"),u=s.appendChild(a.createElement("option")),o=d.getElementsByTagName("input")[0],r.style.cssText="top:1px;float:left;opacity:.5",t.getSetAttribute="t"!==d.className,t.leadingWhitespace=3===d.firstChild.nodeType,t.tbody=!d.getElementsByTagName("tbody").length,t.htmlSerialize=!!d.getElementsByTagName("link").length,t.style=/top/.test(r.getAttribute("style")),t.hrefNormalized="/a"===r.getAttribute("href"),t.opacity=/^0.5/.test(r.style.opacity),t.cssFloat=!!r.style.cssFloat,t.checkOn=!!o.value,t.optSelected=u.selected,t.enctype=!!a.createElement("form").enctype,t.html5Clone="<:nav>"!==a.createElement("nav").cloneNode(!0).outerHTML,t.inlineBlockNeedsLayout=!1,t.shrinkWrapBlocks=!1,t.pixelPosition=!1,t.deleteExpando=!0,t.noCloneEvent=!0,t.reliableMarginRight=!0,t.boxSizingReliable=!0,o.checked=!0,t.noCloneChecked=o.cloneNode(!0).checked,s.disabled=!0,t.optDisabled=!u.disabled;try{delete d.test}catch(h){t.deleteExpando=!1}o=a.createElement("input"),o.setAttribute("value",""),t.input=""===o.getAttribute("value"),o.value="t",o.setAttribute("type","radio"),t.radioValue="t"===o.value,o.setAttribute("checked","t"),o.setAttribute("name","t"),l=a.createDocumentFragment(),l.appendChild(o),t.appendChecked=o.checked,t.checkClone=l.cloneNode(!0).cloneNode(!0).lastChild.checked,d.attachEvent&&(d.attachEvent("onclick",function(){t.noCloneEvent=!1}),d.cloneNode(!0).click());for(f in{submit:!0,change:!0,focusin:!0})d.setAttribute(c="on"+f,"t"),t[f+"Bubbles"]=c in e||d.attributes[c].expando===!1;d.style.backgroundClip="content-box",d.cloneNode(!0).style.backgroundClip="",t.clearCloneStyle="content-box"===d.style.backgroundClip;for(f in x(t))break;return t.ownLast="0"!==f,x(function(){var n,r,o,s="padding:0;margin:0;border:0;display:block;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;",l=a.getElementsByTagName("body")[0];l&&(n=a.createElement("div"),n.style.cssText="border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px",l.appendChild(n).appendChild(d),d.innerHTML="
t
",o=d.getElementsByTagName("td"),o[0].style.cssText="padding:0;margin:0;border:0;display:none",p=0===o[0].offsetHeight,o[0].style.display="",o[1].style.display="none",t.reliableHiddenOffsets=p&&0===o[0].offsetHeight,d.innerHTML="",d.style.cssText="box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;",x.swap(l,null!=l.style.zoom?{zoom:1}:{},function(){t.boxSizing=4===d.offsetWidth}),e.getComputedStyle&&(t.pixelPosition="1%"!==(e.getComputedStyle(d,null)||{}).top,t.boxSizingReliable="4px"===(e.getComputedStyle(d,null)||{width:"4px"}).width,r=d.appendChild(a.createElement("div")),r.style.cssText=d.style.cssText=s,r.style.marginRight=r.style.width="0",d.style.width="1px",t.reliableMarginRight=!parseFloat((e.getComputedStyle(r,null)||{}).marginRight)),typeof d.style.zoom!==i&&(d.innerHTML="",d.style.cssText=s+"width:1px;padding:1px;display:inline;zoom:1",t.inlineBlockNeedsLayout=3===d.offsetWidth,d.style.display="block",d.innerHTML="
",d.firstChild.style.width="5px",t.shrinkWrapBlocks=3!==d.offsetWidth,t.inlineBlockNeedsLayout&&(l.style.zoom=1)),l.removeChild(n),n=d=o=r=null)}),n=s=l=u=r=o=null,t }({});var B=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,P=/([A-Z])/g;function R(e,n,r,i){if(x.acceptData(e)){var o,a,s=x.expando,l=e.nodeType,u=l?x.cache:e,c=l?e[s]:e[s]&&s;if(c&&u[c]&&(i||u[c].data)||r!==t||"string"!=typeof n)return c||(c=l?e[s]=p.pop()||x.guid++:s),u[c]||(u[c]=l?{}:{toJSON:x.noop}),("object"==typeof n||"function"==typeof n)&&(i?u[c]=x.extend(u[c],n):u[c].data=x.extend(u[c].data,n)),a=u[c],i||(a.data||(a.data={}),a=a.data),r!==t&&(a[x.camelCase(n)]=r),"string"==typeof n?(o=a[n],null==o&&(o=a[x.camelCase(n)])):o=a,o}}function W(e,t,n){if(x.acceptData(e)){var r,i,o=e.nodeType,a=o?x.cache:e,s=o?e[x.expando]:x.expando;if(a[s]){if(t&&(r=n?a[s]:a[s].data)){x.isArray(t)?t=t.concat(x.map(t,x.camelCase)):t in r?t=[t]:(t=x.camelCase(t),t=t in r?[t]:t.split(" ")),i=t.length;while(i--)delete r[t[i]];if(n?!I(r):!x.isEmptyObject(r))return}(n||(delete a[s].data,I(a[s])))&&(o?x.cleanData([e],!0):x.support.deleteExpando||a!=a.window?delete a[s]:a[s]=null)}}}x.extend({cache:{},noData:{applet:!0,embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(e){return e=e.nodeType?x.cache[e[x.expando]]:e[x.expando],!!e&&!I(e)},data:function(e,t,n){return R(e,t,n)},removeData:function(e,t){return W(e,t)},_data:function(e,t,n){return R(e,t,n,!0)},_removeData:function(e,t){return W(e,t,!0)},acceptData:function(e){if(e.nodeType&&1!==e.nodeType&&9!==e.nodeType)return!1;var t=e.nodeName&&x.noData[e.nodeName.toLowerCase()];return!t||t!==!0&&e.getAttribute("classid")===t}}),x.fn.extend({data:function(e,n){var r,i,o=null,a=0,s=this[0];if(e===t){if(this.length&&(o=x.data(s),1===s.nodeType&&!x._data(s,"parsedAttrs"))){for(r=s.attributes;r.length>a;a++)i=r[a].name,0===i.indexOf("data-")&&(i=x.camelCase(i.slice(5)),$(s,i,o[i]));x._data(s,"parsedAttrs",!0)}return o}return"object"==typeof e?this.each(function(){x.data(this,e)}):arguments.length>1?this.each(function(){x.data(this,e,n)}):s?$(s,e,x.data(s,e)):null},removeData:function(e){return this.each(function(){x.removeData(this,e)})}});function $(e,n,r){if(r===t&&1===e.nodeType){var i="data-"+n.replace(P,"-$1").toLowerCase();if(r=e.getAttribute(i),"string"==typeof r){try{r="true"===r?!0:"false"===r?!1:"null"===r?null:+r+""===r?+r:B.test(r)?x.parseJSON(r):r}catch(o){}x.data(e,n,r)}else r=t}return r}function I(e){var t;for(t in e)if(("data"!==t||!x.isEmptyObject(e[t]))&&"toJSON"!==t)return!1;return!0}x.extend({queue:function(e,n,r){var i;return e?(n=(n||"fx")+"queue",i=x._data(e,n),r&&(!i||x.isArray(r)?i=x._data(e,n,x.makeArray(r)):i.push(r)),i||[]):t},dequeue:function(e,t){t=t||"fx";var n=x.queue(e,t),r=n.length,i=n.shift(),o=x._queueHooks(e,t),a=function(){x.dequeue(e,t)};"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,a,o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return x._data(e,n)||x._data(e,n,{empty:x.Callbacks("once memory").add(function(){x._removeData(e,t+"queue"),x._removeData(e,n)})})}}),x.fn.extend({queue:function(e,n){var r=2;return"string"!=typeof e&&(n=e,e="fx",r--),r>arguments.length?x.queue(this[0],e):n===t?this:this.each(function(){var t=x.queue(this,e,n);x._queueHooks(this,e),"fx"===e&&"inprogress"!==t[0]&&x.dequeue(this,e)})},dequeue:function(e){return this.each(function(){x.dequeue(this,e)})},delay:function(e,t){return e=x.fx?x.fx.speeds[e]||e:e,t=t||"fx",this.queue(t,function(t,n){var r=setTimeout(t,e);n.stop=function(){clearTimeout(r)}})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,n){var r,i=1,o=x.Deferred(),a=this,s=this.length,l=function(){--i||o.resolveWith(a,[a])};"string"!=typeof e&&(n=e,e=t),e=e||"fx";while(s--)r=x._data(a[s],e+"queueHooks"),r&&r.empty&&(i++,r.empty.add(l));return l(),o.promise(n)}});var z,X,U=/[\t\r\n\f]/g,V=/\r/g,Y=/^(?:input|select|textarea|button|object)$/i,J=/^(?:a|area)$/i,G=/^(?:checked|selected)$/i,Q=x.support.getSetAttribute,K=x.support.input;x.fn.extend({attr:function(e,t){return x.access(this,x.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){x.removeAttr(this,e)})},prop:function(e,t){return x.access(this,x.prop,e,t,arguments.length>1)},removeProp:function(e){return e=x.propFix[e]||e,this.each(function(){try{this[e]=t,delete this[e]}catch(n){}})},addClass:function(e){var t,n,r,i,o,a=0,s=this.length,l="string"==typeof e&&e;if(x.isFunction(e))return this.each(function(t){x(this).addClass(e.call(this,t,this.className))});if(l)for(t=(e||"").match(T)||[];s>a;a++)if(n=this[a],r=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(U," "):" ")){o=0;while(i=t[o++])0>r.indexOf(" "+i+" ")&&(r+=i+" ");n.className=x.trim(r)}return this},removeClass:function(e){var t,n,r,i,o,a=0,s=this.length,l=0===arguments.length||"string"==typeof e&&e;if(x.isFunction(e))return this.each(function(t){x(this).removeClass(e.call(this,t,this.className))});if(l)for(t=(e||"").match(T)||[];s>a;a++)if(n=this[a],r=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(U," "):"")){o=0;while(i=t[o++])while(r.indexOf(" "+i+" ")>=0)r=r.replace(" "+i+" "," ");n.className=e?x.trim(r):""}return this},toggleClass:function(e,t){var n=typeof e;return"boolean"==typeof t&&"string"===n?t?this.addClass(e):this.removeClass(e):x.isFunction(e)?this.each(function(n){x(this).toggleClass(e.call(this,n,this.className,t),t)}):this.each(function(){if("string"===n){var t,r=0,o=x(this),a=e.match(T)||[];while(t=a[r++])o.hasClass(t)?o.removeClass(t):o.addClass(t)}else(n===i||"boolean"===n)&&(this.className&&x._data(this,"__className__",this.className),this.className=this.className||e===!1?"":x._data(this,"__className__")||"")})},hasClass:function(e){var t=" "+e+" ",n=0,r=this.length;for(;r>n;n++)if(1===this[n].nodeType&&(" "+this[n].className+" ").replace(U," ").indexOf(t)>=0)return!0;return!1},val:function(e){var n,r,i,o=this[0];{if(arguments.length)return i=x.isFunction(e),this.each(function(n){var o;1===this.nodeType&&(o=i?e.call(this,n,x(this).val()):e,null==o?o="":"number"==typeof o?o+="":x.isArray(o)&&(o=x.map(o,function(e){return null==e?"":e+""})),r=x.valHooks[this.type]||x.valHooks[this.nodeName.toLowerCase()],r&&"set"in r&&r.set(this,o,"value")!==t||(this.value=o))});if(o)return r=x.valHooks[o.type]||x.valHooks[o.nodeName.toLowerCase()],r&&"get"in r&&(n=r.get(o,"value"))!==t?n:(n=o.value,"string"==typeof n?n.replace(V,""):null==n?"":n)}}}),x.extend({valHooks:{option:{get:function(e){var t=x.find.attr(e,"value");return null!=t?t:e.text}},select:{get:function(e){var t,n,r=e.options,i=e.selectedIndex,o="select-one"===e.type||0>i,a=o?null:[],s=o?i+1:r.length,l=0>i?s:o?i:0;for(;s>l;l++)if(n=r[l],!(!n.selected&&l!==i||(x.support.optDisabled?n.disabled:null!==n.getAttribute("disabled"))||n.parentNode.disabled&&x.nodeName(n.parentNode,"optgroup"))){if(t=x(n).val(),o)return t;a.push(t)}return a},set:function(e,t){var n,r,i=e.options,o=x.makeArray(t),a=i.length;while(a--)r=i[a],(r.selected=x.inArray(x(r).val(),o)>=0)&&(n=!0);return n||(e.selectedIndex=-1),o}}},attr:function(e,n,r){var o,a,s=e.nodeType;if(e&&3!==s&&8!==s&&2!==s)return typeof e.getAttribute===i?x.prop(e,n,r):(1===s&&x.isXMLDoc(e)||(n=n.toLowerCase(),o=x.attrHooks[n]||(x.expr.match.bool.test(n)?X:z)),r===t?o&&"get"in o&&null!==(a=o.get(e,n))?a:(a=x.find.attr(e,n),null==a?t:a):null!==r?o&&"set"in o&&(a=o.set(e,r,n))!==t?a:(e.setAttribute(n,r+""),r):(x.removeAttr(e,n),t))},removeAttr:function(e,t){var n,r,i=0,o=t&&t.match(T);if(o&&1===e.nodeType)while(n=o[i++])r=x.propFix[n]||n,x.expr.match.bool.test(n)?K&&Q||!G.test(n)?e[r]=!1:e[x.camelCase("default-"+n)]=e[r]=!1:x.attr(e,n,""),e.removeAttribute(Q?n:r)},attrHooks:{type:{set:function(e,t){if(!x.support.radioValue&&"radio"===t&&x.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},propFix:{"for":"htmlFor","class":"className"},prop:function(e,n,r){var i,o,a,s=e.nodeType;if(e&&3!==s&&8!==s&&2!==s)return a=1!==s||!x.isXMLDoc(e),a&&(n=x.propFix[n]||n,o=x.propHooks[n]),r!==t?o&&"set"in o&&(i=o.set(e,r,n))!==t?i:e[n]=r:o&&"get"in o&&null!==(i=o.get(e,n))?i:e[n]},propHooks:{tabIndex:{get:function(e){var t=x.find.attr(e,"tabindex");return t?parseInt(t,10):Y.test(e.nodeName)||J.test(e.nodeName)&&e.href?0:-1}}}}),X={set:function(e,t,n){return t===!1?x.removeAttr(e,n):K&&Q||!G.test(n)?e.setAttribute(!Q&&x.propFix[n]||n,n):e[x.camelCase("default-"+n)]=e[n]=!0,n}},x.each(x.expr.match.bool.source.match(/\w+/g),function(e,n){var r=x.expr.attrHandle[n]||x.find.attr;x.expr.attrHandle[n]=K&&Q||!G.test(n)?function(e,n,i){var o=x.expr.attrHandle[n],a=i?t:(x.expr.attrHandle[n]=t)!=r(e,n,i)?n.toLowerCase():null;return x.expr.attrHandle[n]=o,a}:function(e,n,r){return r?t:e[x.camelCase("default-"+n)]?n.toLowerCase():null}}),K&&Q||(x.attrHooks.value={set:function(e,n,r){return x.nodeName(e,"input")?(e.defaultValue=n,t):z&&z.set(e,n,r)}}),Q||(z={set:function(e,n,r){var i=e.getAttributeNode(r);return i||e.setAttributeNode(i=e.ownerDocument.createAttribute(r)),i.value=n+="","value"===r||n===e.getAttribute(r)?n:t}},x.expr.attrHandle.id=x.expr.attrHandle.name=x.expr.attrHandle.coords=function(e,n,r){var i;return r?t:(i=e.getAttributeNode(n))&&""!==i.value?i.value:null},x.valHooks.button={get:function(e,n){var r=e.getAttributeNode(n);return r&&r.specified?r.value:t},set:z.set},x.attrHooks.contenteditable={set:function(e,t,n){z.set(e,""===t?!1:t,n)}},x.each(["width","height"],function(e,n){x.attrHooks[n]={set:function(e,r){return""===r?(e.setAttribute(n,"auto"),r):t}}})),x.support.hrefNormalized||x.each(["href","src"],function(e,t){x.propHooks[t]={get:function(e){return e.getAttribute(t,4)}}}),x.support.style||(x.attrHooks.style={get:function(e){return e.style.cssText||t},set:function(e,t){return e.style.cssText=t+""}}),x.support.optSelected||(x.propHooks.selected={get:function(e){var t=e.parentNode;return t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex),null}}),x.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){x.propFix[this.toLowerCase()]=this}),x.support.enctype||(x.propFix.enctype="encoding"),x.each(["radio","checkbox"],function(){x.valHooks[this]={set:function(e,n){return x.isArray(n)?e.checked=x.inArray(x(e).val(),n)>=0:t}},x.support.checkOn||(x.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})});var Z=/^(?:input|select|textarea)$/i,et=/^key/,tt=/^(?:mouse|contextmenu)|click/,nt=/^(?:focusinfocus|focusoutblur)$/,rt=/^([^.]*)(?:\.(.+)|)$/;function it(){return!0}function ot(){return!1}function at(){try{return a.activeElement}catch(e){}}x.event={global:{},add:function(e,n,r,o,a){var s,l,u,c,p,f,d,h,g,m,y,v=x._data(e);if(v){r.handler&&(c=r,r=c.handler,a=c.selector),r.guid||(r.guid=x.guid++),(l=v.events)||(l=v.events={}),(f=v.handle)||(f=v.handle=function(e){return typeof x===i||e&&x.event.triggered===e.type?t:x.event.dispatch.apply(f.elem,arguments)},f.elem=e),n=(n||"").match(T)||[""],u=n.length;while(u--)s=rt.exec(n[u])||[],g=y=s[1],m=(s[2]||"").split(".").sort(),g&&(p=x.event.special[g]||{},g=(a?p.delegateType:p.bindType)||g,p=x.event.special[g]||{},d=x.extend({type:g,origType:y,data:o,handler:r,guid:r.guid,selector:a,needsContext:a&&x.expr.match.needsContext.test(a),namespace:m.join(".")},c),(h=l[g])||(h=l[g]=[],h.delegateCount=0,p.setup&&p.setup.call(e,o,m,f)!==!1||(e.addEventListener?e.addEventListener(g,f,!1):e.attachEvent&&e.attachEvent("on"+g,f))),p.add&&(p.add.call(e,d),d.handler.guid||(d.handler.guid=r.guid)),a?h.splice(h.delegateCount++,0,d):h.push(d),x.event.global[g]=!0);e=null}},remove:function(e,t,n,r,i){var o,a,s,l,u,c,p,f,d,h,g,m=x.hasData(e)&&x._data(e);if(m&&(c=m.events)){t=(t||"").match(T)||[""],u=t.length;while(u--)if(s=rt.exec(t[u])||[],d=g=s[1],h=(s[2]||"").split(".").sort(),d){p=x.event.special[d]||{},d=(r?p.delegateType:p.bindType)||d,f=c[d]||[],s=s[2]&&RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),l=o=f.length;while(o--)a=f[o],!i&&g!==a.origType||n&&n.guid!==a.guid||s&&!s.test(a.namespace)||r&&r!==a.selector&&("**"!==r||!a.selector)||(f.splice(o,1),a.selector&&f.delegateCount--,p.remove&&p.remove.call(e,a));l&&!f.length&&(p.teardown&&p.teardown.call(e,h,m.handle)!==!1||x.removeEvent(e,d,m.handle),delete c[d])}else for(d in c)x.event.remove(e,d+t[u],n,r,!0);x.isEmptyObject(c)&&(delete m.handle,x._removeData(e,"events"))}},trigger:function(n,r,i,o){var s,l,u,c,p,f,d,h=[i||a],g=v.call(n,"type")?n.type:n,m=v.call(n,"namespace")?n.namespace.split("."):[];if(u=f=i=i||a,3!==i.nodeType&&8!==i.nodeType&&!nt.test(g+x.event.triggered)&&(g.indexOf(".")>=0&&(m=g.split("."),g=m.shift(),m.sort()),l=0>g.indexOf(":")&&"on"+g,n=n[x.expando]?n:new x.Event(g,"object"==typeof n&&n),n.isTrigger=o?2:3,n.namespace=m.join("."),n.namespace_re=n.namespace?RegExp("(^|\\.)"+m.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,n.result=t,n.target||(n.target=i),r=null==r?[n]:x.makeArray(r,[n]),p=x.event.special[g]||{},o||!p.trigger||p.trigger.apply(i,r)!==!1)){if(!o&&!p.noBubble&&!x.isWindow(i)){for(c=p.delegateType||g,nt.test(c+g)||(u=u.parentNode);u;u=u.parentNode)h.push(u),f=u;f===(i.ownerDocument||a)&&h.push(f.defaultView||f.parentWindow||e)}d=0;while((u=h[d++])&&!n.isPropagationStopped())n.type=d>1?c:p.bindType||g,s=(x._data(u,"events")||{})[n.type]&&x._data(u,"handle"),s&&s.apply(u,r),s=l&&u[l],s&&x.acceptData(u)&&s.apply&&s.apply(u,r)===!1&&n.preventDefault();if(n.type=g,!o&&!n.isDefaultPrevented()&&(!p._default||p._default.apply(h.pop(),r)===!1)&&x.acceptData(i)&&l&&i[g]&&!x.isWindow(i)){f=i[l],f&&(i[l]=null),x.event.triggered=g;try{i[g]()}catch(y){}x.event.triggered=t,f&&(i[l]=f)}return n.result}},dispatch:function(e){e=x.event.fix(e);var n,r,i,o,a,s=[],l=g.call(arguments),u=(x._data(this,"events")||{})[e.type]||[],c=x.event.special[e.type]||{};if(l[0]=e,e.delegateTarget=this,!c.preDispatch||c.preDispatch.call(this,e)!==!1){s=x.event.handlers.call(this,e,u),n=0;while((o=s[n++])&&!e.isPropagationStopped()){e.currentTarget=o.elem,a=0;while((i=o.handlers[a++])&&!e.isImmediatePropagationStopped())(!e.namespace_re||e.namespace_re.test(i.namespace))&&(e.handleObj=i,e.data=i.data,r=((x.event.special[i.origType]||{}).handle||i.handler).apply(o.elem,l),r!==t&&(e.result=r)===!1&&(e.preventDefault(),e.stopPropagation()))}return c.postDispatch&&c.postDispatch.call(this,e),e.result}},handlers:function(e,n){var r,i,o,a,s=[],l=n.delegateCount,u=e.target;if(l&&u.nodeType&&(!e.button||"click"!==e.type))for(;u!=this;u=u.parentNode||this)if(1===u.nodeType&&(u.disabled!==!0||"click"!==e.type)){for(o=[],a=0;l>a;a++)i=n[a],r=i.selector+" ",o[r]===t&&(o[r]=i.needsContext?x(r,this).index(u)>=0:x.find(r,this,null,[u]).length),o[r]&&o.push(i);o.length&&s.push({elem:u,handlers:o})}return n.length>l&&s.push({elem:this,handlers:n.slice(l)}),s},fix:function(e){if(e[x.expando])return e;var t,n,r,i=e.type,o=e,s=this.fixHooks[i];s||(this.fixHooks[i]=s=tt.test(i)?this.mouseHooks:et.test(i)?this.keyHooks:{}),r=s.props?this.props.concat(s.props):this.props,e=new x.Event(o),t=r.length;while(t--)n=r[t],e[n]=o[n];return e.target||(e.target=o.srcElement||a),3===e.target.nodeType&&(e.target=e.target.parentNode),e.metaKey=!!e.metaKey,s.filter?s.filter(e,o):e},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(e,t){return null==e.which&&(e.which=null!=t.charCode?t.charCode:t.keyCode),e}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(e,n){var r,i,o,s=n.button,l=n.fromElement;return null==e.pageX&&null!=n.clientX&&(i=e.target.ownerDocument||a,o=i.documentElement,r=i.body,e.pageX=n.clientX+(o&&o.scrollLeft||r&&r.scrollLeft||0)-(o&&o.clientLeft||r&&r.clientLeft||0),e.pageY=n.clientY+(o&&o.scrollTop||r&&r.scrollTop||0)-(o&&o.clientTop||r&&r.clientTop||0)),!e.relatedTarget&&l&&(e.relatedTarget=l===e.target?n.toElement:l),e.which||s===t||(e.which=1&s?1:2&s?3:4&s?2:0),e}},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==at()&&this.focus)try{return this.focus(),!1}catch(e){}},delegateType:"focusin"},blur:{trigger:function(){return this===at()&&this.blur?(this.blur(),!1):t},delegateType:"focusout"},click:{trigger:function(){return x.nodeName(this,"input")&&"checkbox"===this.type&&this.click?(this.click(),!1):t},_default:function(e){return x.nodeName(e.target,"a")}},beforeunload:{postDispatch:function(e){e.result!==t&&(e.originalEvent.returnValue=e.result)}}},simulate:function(e,t,n,r){var i=x.extend(new x.Event,n,{type:e,isSimulated:!0,originalEvent:{}});r?x.event.trigger(i,null,t):x.event.dispatch.call(t,i),i.isDefaultPrevented()&&n.preventDefault()}},x.removeEvent=a.removeEventListener?function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n,!1)}:function(e,t,n){var r="on"+t;e.detachEvent&&(typeof e[r]===i&&(e[r]=null),e.detachEvent(r,n))},x.Event=function(e,n){return this instanceof x.Event?(e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||e.returnValue===!1||e.getPreventDefault&&e.getPreventDefault()?it:ot):this.type=e,n&&x.extend(this,n),this.timeStamp=e&&e.timeStamp||x.now(),this[x.expando]=!0,t):new x.Event(e,n)},x.Event.prototype={isDefaultPrevented:ot,isPropagationStopped:ot,isImmediatePropagationStopped:ot,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=it,e&&(e.preventDefault?e.preventDefault():e.returnValue=!1)},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=it,e&&(e.stopPropagation&&e.stopPropagation(),e.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=it,this.stopPropagation()}},x.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(e,t){x.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,r=this,i=e.relatedTarget,o=e.handleObj;return(!i||i!==r&&!x.contains(r,i))&&(e.type=o.origType,n=o.handler.apply(this,arguments),e.type=t),n}}}),x.support.submitBubbles||(x.event.special.submit={setup:function(){return x.nodeName(this,"form")?!1:(x.event.add(this,"click._submit keypress._submit",function(e){var n=e.target,r=x.nodeName(n,"input")||x.nodeName(n,"button")?n.form:t;r&&!x._data(r,"submitBubbles")&&(x.event.add(r,"submit._submit",function(e){e._submit_bubble=!0}),x._data(r,"submitBubbles",!0))}),t)},postDispatch:function(e){e._submit_bubble&&(delete e._submit_bubble,this.parentNode&&!e.isTrigger&&x.event.simulate("submit",this.parentNode,e,!0))},teardown:function(){return x.nodeName(this,"form")?!1:(x.event.remove(this,"._submit"),t)}}),x.support.changeBubbles||(x.event.special.change={setup:function(){return Z.test(this.nodeName)?(("checkbox"===this.type||"radio"===this.type)&&(x.event.add(this,"propertychange._change",function(e){"checked"===e.originalEvent.propertyName&&(this._just_changed=!0)}),x.event.add(this,"click._change",function(e){this._just_changed&&!e.isTrigger&&(this._just_changed=!1),x.event.simulate("change",this,e,!0)})),!1):(x.event.add(this,"beforeactivate._change",function(e){var t=e.target;Z.test(t.nodeName)&&!x._data(t,"changeBubbles")&&(x.event.add(t,"change._change",function(e){!this.parentNode||e.isSimulated||e.isTrigger||x.event.simulate("change",this.parentNode,e,!0)}),x._data(t,"changeBubbles",!0))}),t)},handle:function(e){var n=e.target;return this!==n||e.isSimulated||e.isTrigger||"radio"!==n.type&&"checkbox"!==n.type?e.handleObj.handler.apply(this,arguments):t},teardown:function(){return x.event.remove(this,"._change"),!Z.test(this.nodeName)}}),x.support.focusinBubbles||x.each({focus:"focusin",blur:"focusout"},function(e,t){var n=0,r=function(e){x.event.simulate(t,e.target,x.event.fix(e),!0)};x.event.special[t]={setup:function(){0===n++&&a.addEventListener(e,r,!0)},teardown:function(){0===--n&&a.removeEventListener(e,r,!0)}}}),x.fn.extend({on:function(e,n,r,i,o){var a,s;if("object"==typeof e){"string"!=typeof n&&(r=r||n,n=t);for(a in e)this.on(a,n,r,e[a],o);return this}if(null==r&&null==i?(i=n,r=n=t):null==i&&("string"==typeof n?(i=r,r=t):(i=r,r=n,n=t)),i===!1)i=ot;else if(!i)return this;return 1===o&&(s=i,i=function(e){return x().off(e),s.apply(this,arguments)},i.guid=s.guid||(s.guid=x.guid++)),this.each(function(){x.event.add(this,e,i,r,n)})},one:function(e,t,n,r){return this.on(e,t,n,r,1)},off:function(e,n,r){var i,o;if(e&&e.preventDefault&&e.handleObj)return i=e.handleObj,x(e.delegateTarget).off(i.namespace?i.origType+"."+i.namespace:i.origType,i.selector,i.handler),this;if("object"==typeof e){for(o in e)this.off(o,n,e[o]);return this}return(n===!1||"function"==typeof n)&&(r=n,n=t),r===!1&&(r=ot),this.each(function(){x.event.remove(this,e,r,n)})},trigger:function(e,t){return this.each(function(){x.event.trigger(e,t,this)})},triggerHandler:function(e,n){var r=this[0];return r?x.event.trigger(e,n,r,!0):t}});var st=/^.[^:#\[\.,]*$/,lt=/^(?:parents|prev(?:Until|All))/,ut=x.expr.match.needsContext,ct={children:!0,contents:!0,next:!0,prev:!0};x.fn.extend({find:function(e){var t,n=[],r=this,i=r.length;if("string"!=typeof e)return this.pushStack(x(e).filter(function(){for(t=0;i>t;t++)if(x.contains(r[t],this))return!0}));for(t=0;i>t;t++)x.find(e,r[t],n);return n=this.pushStack(i>1?x.unique(n):n),n.selector=this.selector?this.selector+" "+e:e,n},has:function(e){var t,n=x(e,this),r=n.length;return this.filter(function(){for(t=0;r>t;t++)if(x.contains(this,n[t]))return!0})},not:function(e){return this.pushStack(ft(this,e||[],!0))},filter:function(e){return this.pushStack(ft(this,e||[],!1))},is:function(e){return!!ft(this,"string"==typeof e&&ut.test(e)?x(e):e||[],!1).length},closest:function(e,t){var n,r=0,i=this.length,o=[],a=ut.test(e)||"string"!=typeof e?x(e,t||this.context):0;for(;i>r;r++)for(n=this[r];n&&n!==t;n=n.parentNode)if(11>n.nodeType&&(a?a.index(n)>-1:1===n.nodeType&&x.find.matchesSelector(n,e))){n=o.push(n);break}return this.pushStack(o.length>1?x.unique(o):o)},index:function(e){return e?"string"==typeof e?x.inArray(this[0],x(e)):x.inArray(e.jquery?e[0]:e,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){var n="string"==typeof e?x(e,t):x.makeArray(e&&e.nodeType?[e]:e),r=x.merge(this.get(),n);return this.pushStack(x.unique(r))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}});function pt(e,t){do e=e[t];while(e&&1!==e.nodeType);return e}x.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return x.dir(e,"parentNode")},parentsUntil:function(e,t,n){return x.dir(e,"parentNode",n)},next:function(e){return pt(e,"nextSibling")},prev:function(e){return pt(e,"previousSibling")},nextAll:function(e){return x.dir(e,"nextSibling")},prevAll:function(e){return x.dir(e,"previousSibling")},nextUntil:function(e,t,n){return x.dir(e,"nextSibling",n)},prevUntil:function(e,t,n){return x.dir(e,"previousSibling",n)},siblings:function(e){return x.sibling((e.parentNode||{}).firstChild,e)},children:function(e){return x.sibling(e.firstChild)},contents:function(e){return x.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:x.merge([],e.childNodes)}},function(e,t){x.fn[e]=function(n,r){var i=x.map(this,t,n);return"Until"!==e.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=x.filter(r,i)),this.length>1&&(ct[e]||(i=x.unique(i)),lt.test(e)&&(i=i.reverse())),this.pushStack(i)}}),x.extend({filter:function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?x.find.matchesSelector(r,e)?[r]:[]:x.find.matches(e,x.grep(t,function(e){return 1===e.nodeType}))},dir:function(e,n,r){var i=[],o=e[n];while(o&&9!==o.nodeType&&(r===t||1!==o.nodeType||!x(o).is(r)))1===o.nodeType&&i.push(o),o=o[n];return i},sibling:function(e,t){var n=[];for(;e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n}});function ft(e,t,n){if(x.isFunction(t))return x.grep(e,function(e,r){return!!t.call(e,r,e)!==n});if(t.nodeType)return x.grep(e,function(e){return e===t!==n});if("string"==typeof t){if(st.test(t))return x.filter(t,e,n);t=x.filter(t,e)}return x.grep(e,function(e){return x.inArray(e,t)>=0!==n})}function dt(e){var t=ht.split("|"),n=e.createDocumentFragment();if(n.createElement)while(t.length)n.createElement(t.pop());return n}var ht="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",gt=/ jQuery\d+="(?:null|\d+)"/g,mt=RegExp("<(?:"+ht+")[\\s/>]","i"),yt=/^\s+/,vt=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,bt=/<([\w:]+)/,xt=/\s*$/g,At={option:[1,""],legend:[1,"
","
"],area:[1,"",""],param:[1,"",""],thead:[1,"","
"],tr:[2,"","
"],col:[2,"","
"],td:[3,"","
"],_default:x.support.htmlSerialize?[0,"",""]:[1,"X
","
"]},jt=dt(a),Dt=jt.appendChild(a.createElement("div"));At.optgroup=At.option,At.tbody=At.tfoot=At.colgroup=At.caption=At.thead,At.th=At.td,x.fn.extend({text:function(e){return x.access(this,function(e){return e===t?x.text(this):this.empty().append((this[0]&&this[0].ownerDocument||a).createTextNode(e))},null,e,arguments.length)},append:function(){return this.domManip(arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=Lt(this,e);t.appendChild(e)}})},prepend:function(){return this.domManip(arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=Lt(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return this.domManip(arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return this.domManip(arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},remove:function(e,t){var n,r=e?x.filter(e,this):this,i=0;for(;null!=(n=r[i]);i++)t||1!==n.nodeType||x.cleanData(Ft(n)),n.parentNode&&(t&&x.contains(n.ownerDocument,n)&&_t(Ft(n,"script")),n.parentNode.removeChild(n));return this},empty:function(){var e,t=0;for(;null!=(e=this[t]);t++){1===e.nodeType&&x.cleanData(Ft(e,!1));while(e.firstChild)e.removeChild(e.firstChild);e.options&&x.nodeName(e,"select")&&(e.options.length=0)}return this},clone:function(e,t){return e=null==e?!1:e,t=null==t?e:t,this.map(function(){return x.clone(this,e,t)})},html:function(e){return x.access(this,function(e){var n=this[0]||{},r=0,i=this.length;if(e===t)return 1===n.nodeType?n.innerHTML.replace(gt,""):t;if(!("string"!=typeof e||Tt.test(e)||!x.support.htmlSerialize&&mt.test(e)||!x.support.leadingWhitespace&&yt.test(e)||At[(bt.exec(e)||["",""])[1].toLowerCase()])){e=e.replace(vt,"<$1>");try{for(;i>r;r++)n=this[r]||{},1===n.nodeType&&(x.cleanData(Ft(n,!1)),n.innerHTML=e);n=0}catch(o){}}n&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var e=x.map(this,function(e){return[e.nextSibling,e.parentNode]}),t=0;return this.domManip(arguments,function(n){var r=e[t++],i=e[t++];i&&(r&&r.parentNode!==i&&(r=this.nextSibling),x(this).remove(),i.insertBefore(n,r))},!0),t?this:this.remove()},detach:function(e){return this.remove(e,!0)},domManip:function(e,t,n){e=d.apply([],e);var r,i,o,a,s,l,u=0,c=this.length,p=this,f=c-1,h=e[0],g=x.isFunction(h);if(g||!(1>=c||"string"!=typeof h||x.support.checkClone)&&Nt.test(h))return this.each(function(r){var i=p.eq(r);g&&(e[0]=h.call(this,r,i.html())),i.domManip(e,t,n)});if(c&&(l=x.buildFragment(e,this[0].ownerDocument,!1,!n&&this),r=l.firstChild,1===l.childNodes.length&&(l=r),r)){for(a=x.map(Ft(l,"script"),Ht),o=a.length;c>u;u++)i=l,u!==f&&(i=x.clone(i,!0,!0),o&&x.merge(a,Ft(i,"script"))),t.call(this[u],i,u);if(o)for(s=a[a.length-1].ownerDocument,x.map(a,qt),u=0;o>u;u++)i=a[u],kt.test(i.type||"")&&!x._data(i,"globalEval")&&x.contains(s,i)&&(i.src?x._evalUrl(i.src):x.globalEval((i.text||i.textContent||i.innerHTML||"").replace(St,"")));l=r=null}return this}});function Lt(e,t){return x.nodeName(e,"table")&&x.nodeName(1===t.nodeType?t:t.firstChild,"tr")?e.getElementsByTagName("tbody")[0]||e.appendChild(e.ownerDocument.createElement("tbody")):e}function Ht(e){return e.type=(null!==x.find.attr(e,"type"))+"/"+e.type,e}function qt(e){var t=Et.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function _t(e,t){var n,r=0;for(;null!=(n=e[r]);r++)x._data(n,"globalEval",!t||x._data(t[r],"globalEval"))}function Mt(e,t){if(1===t.nodeType&&x.hasData(e)){var n,r,i,o=x._data(e),a=x._data(t,o),s=o.events;if(s){delete a.handle,a.events={};for(n in s)for(r=0,i=s[n].length;i>r;r++)x.event.add(t,n,s[n][r])}a.data&&(a.data=x.extend({},a.data))}}function Ot(e,t){var n,r,i;if(1===t.nodeType){if(n=t.nodeName.toLowerCase(),!x.support.noCloneEvent&&t[x.expando]){i=x._data(t);for(r in i.events)x.removeEvent(t,r,i.handle);t.removeAttribute(x.expando)}"script"===n&&t.text!==e.text?(Ht(t).text=e.text,qt(t)):"object"===n?(t.parentNode&&(t.outerHTML=e.outerHTML),x.support.html5Clone&&e.innerHTML&&!x.trim(t.innerHTML)&&(t.innerHTML=e.innerHTML)):"input"===n&&Ct.test(e.type)?(t.defaultChecked=t.checked=e.checked,t.value!==e.value&&(t.value=e.value)):"option"===n?t.defaultSelected=t.selected=e.defaultSelected:("input"===n||"textarea"===n)&&(t.defaultValue=e.defaultValue)}}x.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){x.fn[e]=function(e){var n,r=0,i=[],o=x(e),a=o.length-1;for(;a>=r;r++)n=r===a?this:this.clone(!0),x(o[r])[t](n),h.apply(i,n.get());return this.pushStack(i)}});function Ft(e,n){var r,o,a=0,s=typeof e.getElementsByTagName!==i?e.getElementsByTagName(n||"*"):typeof e.querySelectorAll!==i?e.querySelectorAll(n||"*"):t;if(!s)for(s=[],r=e.childNodes||e;null!=(o=r[a]);a++)!n||x.nodeName(o,n)?s.push(o):x.merge(s,Ft(o,n));return n===t||n&&x.nodeName(e,n)?x.merge([e],s):s}function Bt(e){Ct.test(e.type)&&(e.defaultChecked=e.checked)}x.extend({clone:function(e,t,n){var r,i,o,a,s,l=x.contains(e.ownerDocument,e);if(x.support.html5Clone||x.isXMLDoc(e)||!mt.test("<"+e.nodeName+">")?o=e.cloneNode(!0):(Dt.innerHTML=e.outerHTML,Dt.removeChild(o=Dt.firstChild)),!(x.support.noCloneEvent&&x.support.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||x.isXMLDoc(e)))for(r=Ft(o),s=Ft(e),a=0;null!=(i=s[a]);++a)r[a]&&Ot(i,r[a]);if(t)if(n)for(s=s||Ft(e),r=r||Ft(o),a=0;null!=(i=s[a]);a++)Mt(i,r[a]);else Mt(e,o);return r=Ft(o,"script"),r.length>0&&_t(r,!l&&Ft(e,"script")),r=s=i=null,o},buildFragment:function(e,t,n,r){var i,o,a,s,l,u,c,p=e.length,f=dt(t),d=[],h=0;for(;p>h;h++)if(o=e[h],o||0===o)if("object"===x.type(o))x.merge(d,o.nodeType?[o]:o);else if(wt.test(o)){s=s||f.appendChild(t.createElement("div")),l=(bt.exec(o)||["",""])[1].toLowerCase(),c=At[l]||At._default,s.innerHTML=c[1]+o.replace(vt,"<$1>")+c[2],i=c[0];while(i--)s=s.lastChild;if(!x.support.leadingWhitespace&&yt.test(o)&&d.push(t.createTextNode(yt.exec(o)[0])),!x.support.tbody){o="table"!==l||xt.test(o)?""!==c[1]||xt.test(o)?0:s:s.firstChild,i=o&&o.childNodes.length;while(i--)x.nodeName(u=o.childNodes[i],"tbody")&&!u.childNodes.length&&o.removeChild(u)}x.merge(d,s.childNodes),s.textContent="";while(s.firstChild)s.removeChild(s.firstChild);s=f.lastChild}else d.push(t.createTextNode(o));s&&f.removeChild(s),x.support.appendChecked||x.grep(Ft(d,"input"),Bt),h=0;while(o=d[h++])if((!r||-1===x.inArray(o,r))&&(a=x.contains(o.ownerDocument,o),s=Ft(f.appendChild(o),"script"),a&&_t(s),n)){i=0;while(o=s[i++])kt.test(o.type||"")&&n.push(o)}return s=null,f},cleanData:function(e,t){var n,r,o,a,s=0,l=x.expando,u=x.cache,c=x.support.deleteExpando,f=x.event.special;for(;null!=(n=e[s]);s++)if((t||x.acceptData(n))&&(o=n[l],a=o&&u[o])){if(a.events)for(r in a.events)f[r]?x.event.remove(n,r):x.removeEvent(n,r,a.handle); u[o]&&(delete u[o],c?delete n[l]:typeof n.removeAttribute!==i?n.removeAttribute(l):n[l]=null,p.push(o))}},_evalUrl:function(e){return x.ajax({url:e,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})}}),x.fn.extend({wrapAll:function(e){if(x.isFunction(e))return this.each(function(t){x(this).wrapAll(e.call(this,t))});if(this[0]){var t=x(e,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){var e=this;while(e.firstChild&&1===e.firstChild.nodeType)e=e.firstChild;return e}).append(this)}return this},wrapInner:function(e){return x.isFunction(e)?this.each(function(t){x(this).wrapInner(e.call(this,t))}):this.each(function(){var t=x(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=x.isFunction(e);return this.each(function(n){x(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){x.nodeName(this,"body")||x(this).replaceWith(this.childNodes)}).end()}});var Pt,Rt,Wt,$t=/alpha\([^)]*\)/i,It=/opacity\s*=\s*([^)]*)/,zt=/^(top|right|bottom|left)$/,Xt=/^(none|table(?!-c[ea]).+)/,Ut=/^margin/,Vt=RegExp("^("+w+")(.*)$","i"),Yt=RegExp("^("+w+")(?!px)[a-z%]+$","i"),Jt=RegExp("^([+-])=("+w+")","i"),Gt={BODY:"block"},Qt={position:"absolute",visibility:"hidden",display:"block"},Kt={letterSpacing:0,fontWeight:400},Zt=["Top","Right","Bottom","Left"],en=["Webkit","O","Moz","ms"];function tn(e,t){if(t in e)return t;var n=t.charAt(0).toUpperCase()+t.slice(1),r=t,i=en.length;while(i--)if(t=en[i]+n,t in e)return t;return r}function nn(e,t){return e=t||e,"none"===x.css(e,"display")||!x.contains(e.ownerDocument,e)}function rn(e,t){var n,r,i,o=[],a=0,s=e.length;for(;s>a;a++)r=e[a],r.style&&(o[a]=x._data(r,"olddisplay"),n=r.style.display,t?(o[a]||"none"!==n||(r.style.display=""),""===r.style.display&&nn(r)&&(o[a]=x._data(r,"olddisplay",ln(r.nodeName)))):o[a]||(i=nn(r),(n&&"none"!==n||!i)&&x._data(r,"olddisplay",i?n:x.css(r,"display"))));for(a=0;s>a;a++)r=e[a],r.style&&(t&&"none"!==r.style.display&&""!==r.style.display||(r.style.display=t?o[a]||"":"none"));return e}x.fn.extend({css:function(e,n){return x.access(this,function(e,n,r){var i,o,a={},s=0;if(x.isArray(n)){for(o=Rt(e),i=n.length;i>s;s++)a[n[s]]=x.css(e,n[s],!1,o);return a}return r!==t?x.style(e,n,r):x.css(e,n)},e,n,arguments.length>1)},show:function(){return rn(this,!0)},hide:function(){return rn(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){nn(this)?x(this).show():x(this).hide()})}}),x.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Wt(e,"opacity");return""===n?"1":n}}}},cssNumber:{columnCount:!0,fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":x.support.cssFloat?"cssFloat":"styleFloat"},style:function(e,n,r,i){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var o,a,s,l=x.camelCase(n),u=e.style;if(n=x.cssProps[l]||(x.cssProps[l]=tn(u,l)),s=x.cssHooks[n]||x.cssHooks[l],r===t)return s&&"get"in s&&(o=s.get(e,!1,i))!==t?o:u[n];if(a=typeof r,"string"===a&&(o=Jt.exec(r))&&(r=(o[1]+1)*o[2]+parseFloat(x.css(e,n)),a="number"),!(null==r||"number"===a&&isNaN(r)||("number"!==a||x.cssNumber[l]||(r+="px"),x.support.clearCloneStyle||""!==r||0!==n.indexOf("background")||(u[n]="inherit"),s&&"set"in s&&(r=s.set(e,r,i))===t)))try{u[n]=r}catch(c){}}},css:function(e,n,r,i){var o,a,s,l=x.camelCase(n);return n=x.cssProps[l]||(x.cssProps[l]=tn(e.style,l)),s=x.cssHooks[n]||x.cssHooks[l],s&&"get"in s&&(a=s.get(e,!0,r)),a===t&&(a=Wt(e,n,i)),"normal"===a&&n in Kt&&(a=Kt[n]),""===r||r?(o=parseFloat(a),r===!0||x.isNumeric(o)?o||0:a):a}}),e.getComputedStyle?(Rt=function(t){return e.getComputedStyle(t,null)},Wt=function(e,n,r){var i,o,a,s=r||Rt(e),l=s?s.getPropertyValue(n)||s[n]:t,u=e.style;return s&&(""!==l||x.contains(e.ownerDocument,e)||(l=x.style(e,n)),Yt.test(l)&&Ut.test(n)&&(i=u.width,o=u.minWidth,a=u.maxWidth,u.minWidth=u.maxWidth=u.width=l,l=s.width,u.width=i,u.minWidth=o,u.maxWidth=a)),l}):a.documentElement.currentStyle&&(Rt=function(e){return e.currentStyle},Wt=function(e,n,r){var i,o,a,s=r||Rt(e),l=s?s[n]:t,u=e.style;return null==l&&u&&u[n]&&(l=u[n]),Yt.test(l)&&!zt.test(n)&&(i=u.left,o=e.runtimeStyle,a=o&&o.left,a&&(o.left=e.currentStyle.left),u.left="fontSize"===n?"1em":l,l=u.pixelLeft+"px",u.left=i,a&&(o.left=a)),""===l?"auto":l});function on(e,t,n){var r=Vt.exec(t);return r?Math.max(0,r[1]-(n||0))+(r[2]||"px"):t}function an(e,t,n,r,i){var o=n===(r?"border":"content")?4:"width"===t?1:0,a=0;for(;4>o;o+=2)"margin"===n&&(a+=x.css(e,n+Zt[o],!0,i)),r?("content"===n&&(a-=x.css(e,"padding"+Zt[o],!0,i)),"margin"!==n&&(a-=x.css(e,"border"+Zt[o]+"Width",!0,i))):(a+=x.css(e,"padding"+Zt[o],!0,i),"padding"!==n&&(a+=x.css(e,"border"+Zt[o]+"Width",!0,i)));return a}function sn(e,t,n){var r=!0,i="width"===t?e.offsetWidth:e.offsetHeight,o=Rt(e),a=x.support.boxSizing&&"border-box"===x.css(e,"boxSizing",!1,o);if(0>=i||null==i){if(i=Wt(e,t,o),(0>i||null==i)&&(i=e.style[t]),Yt.test(i))return i;r=a&&(x.support.boxSizingReliable||i===e.style[t]),i=parseFloat(i)||0}return i+an(e,t,n||(a?"border":"content"),r,o)+"px"}function ln(e){var t=a,n=Gt[e];return n||(n=un(e,t),"none"!==n&&n||(Pt=(Pt||x(""); l.$elem.show(); l.showData() }) }; l.showPDF = function(a) {}; l.showMP3 = function(a) {}; l.showWeb = function(a) { var b = (a[ELEM_WIDTH]) ? a[ELEM_WIDTH] : $(window).width(); var c = (a[ELEM_HEIGHT]) ? a[ELEM_HEIGHT] : $(window).height(); var d = l.calcElemSize({ w: b, h: c }); b = d.w; c = d.h; l.resizeLightbox(b, c, true, function() { l.$text.css({ width: l.calcTextWidth(b) }); l.$text.html(a[ELEM_TITLE]); l.$image.html("
").show(); $("#html5lightbox-web").html(""); l.$elem.show(); l.showData() }) }; l.scrollBox = function() { if (!l.options.supportCSSPositionFixed) l.$lightbox.css("top", $(window).scrollTop()) }; l.resizeWindow = function() { var a = Math.round($(window).height() / 2 - (l.$lightboxBox.height() + l.options.barheight) / 2); l.$lightboxBox.animate({ "margin-top": a }, l.options.resizespeed) }; l.calcElemSize = function(a) { var b = $(window).height() - l.options.barheight - 2 * l.options.bordersize; if (a.h > b) { a.w = Math.round(a.w * b / a.h); a.h = b } var c = $(window).width() - 2 * l.options.bordersize; if (a.w > c) { a.h = Math.round(a.h * c / a.w); a.w = c } return a }; l.showData = function() { l.$elemData.show(); l.$lightboxBox.animate({ height: l.$lightboxBox.height() + l.options.barheight }, { queue: true, duration: l.options.resizespeed }) }; l.resizeLightbox = function(a, b, c, d) { var e = (c) ? l.options.resizespeed: 0; var f = a + 2 * l.options.bordersize; var g = b + 2 * l.options.bordersize; var h = Math.round($(window).height() / 2 - (g + l.options.barheight) / 2); if ((f == l.$elemWrap.width()) && (g == l.$elemWrap.height())) e = 0; l.$loading.hide(); l.$watermark.hide(); l.$lightboxBox.animate({ "margin-top": h }, e, function() { l.$lightboxBox.css({ "width": f, "height": g }); l.$elemWrap.animate({ width: f }, e).animate({ height: g }, e, function() { l.$loading.show(); l.$watermark.show(); l.$elem.bind("mouseenter mousemove", function() { if ((l.options.prevElem >= 0) || (l.options.nextElem >= 0)) { l.$next.fadeIn(); l.$prev.fadeIn() } }); l.$elem.bind("mouseleave", function() { l.$next.fadeOut(); l.$prev.fadeOut() }); d() }) }) }; l.reset = function() { if (l.options.stamp) l.$watermark.hide(); l.showing = false; l.$image.empty(); l.$text.empty(); l.$error.hide(); l.$loading.hide(); l.$image.hide(); l.$elemData.hide() }; l.finish = function() { l.reset(); l.$lightbox.hide(); l.showObjects() }; l.pauseSlide = function() {}; l.playSlide = function() {}; l.gotoSlide = function(a) { if (a == -1) { if (l.options.nextElem < 0) return; l.options.curElem = l.options.nextElem } else if (a == -2) { if (l.options.prevElem < 0) return; l.options.curElem = l.options.prevElem } l.calcNextPrevElem(); l.reset(); l.loadCurElem() }; l.supportKeyboard = function() { $(document).keyup(function(e) { if (!l.showing) return; if (l.options.supportesckey && e.keyCode == 27) { l.finish() } else if (l.options.supportarrowkeys) { if (e.keyCode == 39) l.gotoSlide( - 1); else if (e.keyCode == 37) l.gotoSlide( - 2) } }) }; l.enableSwipe = function() {}; l.hideObjects = function() { $('select, embed, object').css({ 'visibility': 'hidden' }) }; l.showObjects = function() { $('select, embed, object').css({ 'visibility': 'visible' }) }; l.embedHTML5Video = function(a, w, h, b, c) { a.html("
"); if (l.options.isAndroid) { var d = $("
").appendTo(a); d.unbind('click').click(function() { $("video", $(this).parent())[0].play() }) } }; l.embedFlash = function(a, w, h, b, c, d) { if (l.options.flashInstalled) { var e = { pluginspage: "http://www.adobe.com/go/getflashplayer", quality: "high", allowFullScreen: "true", allowScriptAccess: "always", type: "application/x-shockwave-flash" }; e.width = w; e.height = h; e.src = b; e.flashVars = $.param(d); e.wmode = c; var f = ""; for (var g in e) f += g + "=" + e[g] + " "; a.html("") } else { a.html("
The required Adobe Flash Player plugin is not installed

Get Adobe Flash player
") } }; l.checkType = function(a) { if (!a) return - 1; if (a.match(/\.(jpg|gif|png|bmp|jpeg)(.*)?$/i)) return 0; if (a.match(/[^\.]\.(swf)\s*$/i)) return 1; if (a.match(/\.(flv|mp4|m4v|ogv|ogg|webm)(.*)?$/i)) return 2; if ((a.match(/\:\/\/.*(youku\.com)/i)) || (a.match(/\:\/\/.*(youtu\.be)/i))) return 3; if (a.match(/\:\/\/.*(vimeo\.com)/i)) return 4; if (a.match(/[^\.]\.(pdf)\s*$/i)) return 5; if (a.match(/[^\.]\.(mp3)\s*$/i)) return 6; return 7 }; l.showLightbox = function(a, b, c, d, e, f, g) { l.$next.hide(); l.$prev.hide(); l.reset(); l.$lightbox.show(); if (!l.options.supportCSSPositionFixed) l.$lightbox.css("top", $(window).scrollTop()); var h = l.options.loadingwidth + 2 * l.options.bordersize; var i = l.options.loadingheight + 2 * l.options.bordersize; var j = Math.round($(window).height() / 2 - (i + l.options.barheight) / 2); l.$lightboxBox.css({ "margin-top": j, "width": h, "height": i }); l.$elemWrap.css({ "width": h, "height": i }); l.loadElem(new Array(a, b, c, null, d, e, f, g)) }; l.addItem = function(a, b, c, d, e, f, g) { type = l.checkType(a); l.elemArray.push(new Array(type, a, b, c, d, e, f, g)) }; l.showItem = function(a) { if (l.elemArray.length <= 0) return true; l.hideObjects(); for (var i = 0; i < l.elemArray.length; i++) { if (l.elemArray[i][ELEM_HREF] == a) break } if (i == l.elemArray.length) return true; l.options.curElem = i; l.options.nextElem = -1; l.options.prevElem = -1; l.calcNextPrevElem(); l.$next.hide(); l.$prev.hide(); l.reset(); l.$lightbox.show(); if (!l.options.supportCSSPositionFixed) l.$lightbox.css("top", $(window).scrollTop()); var b = l.options.loadingwidth + 2 * l.options.bordersize; var c = l.options.loadingheight + 2 * l.options.bordersize; var d = Math.round($(window).height() / 2 - (c + l.options.barheight) / 2); l.$lightboxBox.css({ "margin-top": d, "width": b, "height": c }); l.$elemWrap.css({ "width": b, "height": c }); l.loadCurElem(); return false }; l.init(); return l.unbind('click').click(l.clickHandler) } })(jQuery); function ASTimer(a, b, c) { var d = 50; var e = null; var f = 0; var g = false; var h = false; this.pause = function() { if (h) { g = true; clearInterval(e) } }; this.resume = function() { if (h && g) { g = false; e = setInterval(function() { f += d; if (f > a) { clearInterval(e); if (b) b() } if (c) c(f / a) }, d) } }; this.stop = function() { clearInterval(e); if (c) c( - 1); f = 0; g = false; h = false }; this.start = function() { f = 0; g = false; h = true; e = setInterval(function() { f += d; if (f > a) { clearInterval(e); if (b) b() } if (c) c(f / a) }, d) } } var ASPlatforms = { flashInstalled: function() { var a = false; try { if (new ActiveXObject('ShockwaveFlash.ShockwaveFlash')) a = true } catch(e) { if (navigator.mimeTypes["application/x-shockwave-flash"]) a = true } return a }, html5VideoSupported: function() { return ( !! document.createElement('video').canPlayType) }, isChrome: function() { return (navigator.userAgent.match(/Chrome/i) != null) }, isFirefox: function() { return (navigator.userAgent.match(/Firefox/i) != null) }, isOpera: function() { return (navigator.userAgent.match(/Opera/i) != null) }, isSafari: function() { return (navigator.userAgent.match(/Safari/i) != null) }, isAndroid: function() { return (navigator.userAgent.match(/Android/i) != null) }, isIPad: function() { return (navigator.userAgent.match(/iPad/i) != null) }, isIPhone: function() { return ((navigator.userAgent.match(/iPod/i) != null) || (navigator.userAgent.match(/iPhone/i) != null)) }, isIOS: function() { return this.isIPad() || this.isIPhone() }, isIE9: function() { return (navigator.userAgent.match(/MSIE/i) != null) && this.html5VideoSupported() && !this.isOpera() }, isIE8: function() { return (navigator.userAgent.match(/MSIE 8/i) != null) && !this.isOpera() }, isIE7: function() { return (navigator.userAgent.match(/MSIE 7/i) != null) && !this.isOpera() }, isIE6: function() { return (navigator.userAgent.match(/MSIE 6/i) != null) && !this.isOpera() }, isIE678: function() { return this.isIE6() || this.isIE7() || this.isIE8() }, css33dTransformSupported: function() { return ! this.isIE6() && !this.isIE7() && !this.isIE8() && !this.isIE9() && !this.isOpera() }, applyBrowserStyles: function(a, b) { var c = {}; for (var d in a) { c[d] = a[d]; c['-webkit-' + d] = (b) ? '-webkit-' + a[d] : a[d]; c['-moz-' + d] = (b) ? '-moz-' + a[d] : a[d]; c['-ms-' + d] = (b) ? '-ms-' + a[d] : a[d]; c['-o-' + d] = (b) ? '-o-' + a[d] : a[d] } return c } }; (function($) { $.fn.html5zoo = function(G) { var H = 0, ELEM_SRC = 1, ELEM_TITLE = 2, ELEM_DESCRIPTION = 3, ELEM_LINK = 4, ELEM_TARGET = 5, ELEM_VIDEO = 6, ELEM_THUMBNAIL = 7, ELEM_LIGHTBOX = 8, ELEM_LIGHTBOXWIDTH = 9, ELEM_LIGHTBOXHEIGHT = 10; var I = 1, TYPE_SWF = 2, TYPE_MP3 = 3, TYPE_PDF = 4, TYPE_VIDEO_FLASH = 5, TYPE_VIDEO_MP4 = 6, TYPE_VIDEO_OGG = 7, TYPE_VIDEO_WEBM = 8, TYPE_VIDEO_youku = 9, TYPE_VIDEO_VIMEO = 10; var J = function(a, b, c) { this.container = a; this.options = b; this.id = c; this.transitionTimeout = null; this.arrowTimeout = null; this.lightboxArray = []; this.elemArray = []; this.container.children().hide(); this.container.css({ "display": "block", "position": "relative" }); this.initData(this.init) }; J.prototype = { initData: function(a) { this.readTags(); a(this) }, readTags: function() { var m = this; $('.html5zoo-slides', this.container).find('li').each(function() { var a = $('img', $(this)); if (a.length > 0) { var b = (a.data("src") && (a.data("src").length > 0)) ? a.data("src") : ''; var c = (a.attr("src") && (a.attr("src").length > 0)) ? a.attr("src") : b; var d = (a.attr("alt") && (a.attr("alt").length > 0)) ? a.attr("alt") : ''; var e = (a.data("description") && (a.data("description").length > 0)) ? a.data("description") : ''; var f = (a.parent() && a.parent().is("a")) ? a.parent().attr("href") : ''; var g = (a.parent() && a.parent().is("a")) ? a.parent().attr("target") : ''; var h = (a.parent() && a.parent().is("a")) ? a.parent().hasClass("html5lightbox") : false; var i = (a.parent() && h) ? a.parent().data("width") : 0; var j = (a.parent() && h) ? a.parent().data("height") : 0; var k = []; if ($('video', $(this)).length > 0) { $('video', $(this)).each(function() { k.push({ href: $(this).attr('src'), type: m.checkVideoType($(this).attr('src')) }) }) } var l = new Array(m.elemArray.length, c, d, e, f, g, k, "", h, i, j); m.elemArray.push(l); if (h) m.lightboxArray.push(l) } }); $('.html5zoo-thumbnails', this.container).find('li').each(function(a) { var b = $('img', $(this)); if ((b.length > 0) && (m.elemArray.length > a)) { var c = (b.data("src") && (b.data("src").length > 0)) ? b.data("src") : ''; var d = (b.attr("src") && (b.attr("src").length > 0)) ? b.attr("src") : c; m.elemArray[a][ELEM_THUMBNAIL] = d } }); if (this.options.shownumbering) { for (var i = 0; i < this.elemArray.length; i++) { var n = this.options.numberingformat.replace("%NUM", i + 1).replace("%TOTAL", this.elemArray.length); this.elemArray[i][ELEM_TITLE] = n + this.elemArray[i][ELEM_TITLE] } } }, init: function(a) { if (a.elemArray.length <= 0) return; a.isAnimating = false; a.isPaused = !a.options.autoplay; a.tempPaused = false; a.initVideoApi(); a.createMarkup(); a.createStyle(); a.createNav(); a.createArrows(); a.createBottomShadow(); a.createBackgroundImage(); a.createText(); a.createSliderTimeout(); a.createWatermark(); a.createRibbon(); a.createGoogleFonts(); a.initHtml5Lightbox(); a.curElem = -1; a.prevElem = -1; a.nextElem = -1; a.firstslide = true; a.loopCount = 0; a.pauseCarousel = false; var b = 0; var c = a.getParams(); var d = parseInt(c["firstslideid"]); if (!isNaN(d) && (d >= 1) && (d <= a.elemArray.length)) b = d - 1; else if (a.options.randomplay) b = Math.floor(Math.random() * a.elemArray.length); a.slideRun(b) }, getParams: function() { var a = {}; var b = window.location.search.substring(1).split("&"); for (var i = 0; i < b.length; i++) { var c = b[i].split("="); if (c && (c.length == 2)) a[c[0].toLowerCase()] = unescape(c[1]) } return a }, initHtml5Lightbox: function() { var i; if (this.lightboxArray.length > 0) { var a = (this.options.skinsfoldername.length > 0) ? (this.options.skinsfoldername + '/') : ''; this.html5Lightbox = $([]).html5lightbox({ jsfolder: this.options.jsfolder, skinfolder: a }); for (i = 0; i < this.lightboxArray.length; i++) { this.html5Lightbox.addItem(this.lightboxArray[i][ELEM_LINK], this.lightboxArray[i][ELEM_TITLE], 'html5zoo' + this.id, this.lightboxArray[i][ELEM_LIGHTBOXWIDTH], this.lightboxArray[i][ELEM_LIGHTBOXHEIGHT], null, null) } } }, createGoogleFonts: function() { if (this.options.previewmode) return; if (this.options.addfonts && this.options.fonts && this.options.fonts.length > 0) {} }, createRibbon: function() { if (!this.options.showribbon || (this.options.ribbonimage.length <= 0)) return; $(".html5zoo-ribbon-" + this.id, this.container).html("") }, createWatermark: function() { if (!this.options.showwatermark) return; if ((this.options.watermarkstyle == 'text') && (this.options.watermarktext.length <= 0)) return; if ((this.options.watermarkstyle == 'image') && (this.options.watermarkimage.length <= 0)) return; var a = ''; if (this.options.watermarklink) { a += "" } if (this.options.watermarklink) a += ""; $(".html5zoo-watermark-" + this.id, this.container).html(a) }, initVideoApi: function() { var i, j, videos; var a = false, initVimeo = false; for (i = 0; i < this.elemArray.length; i++) { videos = this.elemArray[i][ELEM_VIDEO]; for (j = 0; j < videos.length; j++) { if (videos[j].type == TYPE_VIDEO_youku) a = true; else if (videos[j].type == TYPE_VIDEO_VIMEO) initVimeo = true } } if (a) { var b = document.createElement('script'); b.src = ('https:' == document.location.protocol ? 'https': 'http') + "://www.youku.com/iframe_api"; var c = document.getElementsByTagName('script')[0]; c.parentNode.insertBefore(b, c) } if (initVimeo) { var b = document.createElement('script'); b.src = this.options.jsfolder + "froogaloop2.min.js"; var c = document.getElementsByTagName('script')[0]; c.parentNode.insertBefore(b, c) } }, createSliderTimeout: function() { var b = this; this.sliderTimeout = new ASTimer(this.options.slideinterval, function() { b.slideRun( - 1) }, ((this.options.showtimer) ? (function(a) { b.updateTimer(a) }) : null)); if (b.options.pauseonmouseover) { $(".html5zoo-slider-" + this.id, this.container).hover(function() { if (!b.isPaused) b.sliderTimeout.pause() }, function() { if (!b.isPaused) b.sliderTimeout.resume() }) } if (b.options.showtimer) $(".html5zoo-timer-" + b.id, b.container).css({ display: 'block', position: 'absolute', left: '0px', top: ((b.options.timerposition == 'bottom') ? '': '0px'), bottom: ((b.options.timerposition == 'bottom') ? '0px': ''), width: '0%', height: b.options.timerheight + 'px', 'background-color': b.options.timercolor, opacity: b.options.timeropacity, filter: 'alpha(opacity=' + Math.round(100 * b.options.timeropacity) + ')' }) }, updateTimer: function(a) { w = Math.round(a * 100) + 1; if (w > 100) w = 100; if (w < 0) w = 0; $(".html5zoo-timer-" + this.id, this.container).css({ width: w + '%' }) }, createMarkup: function() { this.$wrapper = jQuery("
"); this.$wrapper.appendTo(this.container); var a = this; if (this.options.enabletouchswipe) { $(".html5zoo-swipe-box-" + this.id, this.container).touchSwipe({ swipeLeft: function() { a.slideRun( - 1) }, swipeRight: function() { a.slideRun( - 2) } }) } $(".html5zoo-play-" + this.id, this.container).click(function() { a.playVideo(true) }) }, playVideo: function(a) { var b = this.elemArray[this.curElem][ELEM_VIDEO]; if (b.length <= 0) return; this.sliderTimeout.stop(); this.tempPaused = true; var c = b[0].href; var d = b[0].type; if (d == TYPE_VIDEO_youku) this.playyoukuVideo(c, a); else if (d == TYPE_VIDEO_VIMEO) this.playVimeoVideo(c, a) }, playVimeoVideo: function(b, c) { var d = $(".html5zoo-video-wrapper-" + this.id, this.container); d.css({ display: 'block', width: '100%', height: '100%' }); if (this.options.previewmode) { d.html("
To view Vimeo video, publish the slider then open it in your web browser
"); return } else { var e = b + ((b.indexOf("?") < 0) ? '?': '&') + 'autoplay=' + (c ? '1': '0') + '&api=1&player_id=html5zoo_vimeo_' + this.id; d.html(""); var f = $('#html5zoo_vimeo_' + this.id)[0]; var g = $f(f); var h = this; g.addEvent('ready', function() { g.addEvent('finish', function(a) { h.tempPaused = false; if (!h.isPaused) h.slideRun( - 1) }) }) } }, playyoukuVideo: function(b, c) { var d = $(".html5zoo-video-wrapper-" + this.id, this.container); d.css({ display: 'block', width: '100%', height: '100%' }); if (this.options.previewmode) { d.html("
To view youku video, publish the slider then open it in your web browser
"); return } var e = this; if (!ASyoukuIframeAPIReady) { ASyoukuTimeout += 100; if (ASyoukuTimeout < 3000) { setTimeout(function() { e.playyoukuVideo(b, c) }, 100); return } } if (ASyoukuIframeAPIReady && !ASPlatforms.isIE6() && !ASPlatforms.isIE7() && !ASPlatforms.isIOS()) { d.html("
"); var f = b.match(/(\?v=|\/\d\/|\/embed\/|\/v\/|\.be\/)([a-zA-Z0-9\-\_]+)/)[2]; new YT.Player('html5zoo-video-' + this.id, { width: e.options.width, height: e.options.height, videoId: f, playerVars: { 'autoplay': 1, 'rel': 0, 'autohide': 1, 'wmode': 'transparent' }, events: { 'onReady': function(a) { a.target.playVideo() }, 'onStateChange': function(a) { if (a.data == YT.PlayerState.ENDED) { e.tempPaused = false; if (!e.isPaused) e.slideRun( - 1) } } } }) } else { var g = b + ((b.indexOf("?") < 0) ? '?': '&') + "autoplay=1&wmode=transparent&rel=0&autohide=1"; d.html("") } }, checkVideoType: function(a) { if (!a) return - 1; if (a.match(/\.(flv)(.*)?$/i)) return TYPE_VIDEO_FLASH; if (a.match(/\.(mp4|m4v)(.*)?$/i)) return TYPE_VIDEO_MP4; if (a.match(/\.(ogv|ogg)(.*)?$/i)) return TYPE_VIDEO_OGG; if (a.match(/\.(webm)(.*)?$/i)) return TYPE_VIDEO_WEBM; if ((a.match(/\:\/\/.*(youku\.com)/i)) || (a.match(/\:\/\/.*(youtu\.be)/i))) return TYPE_VIDEO_youku; if (a.match(/\:\/\/.*(vimeo\.com)/i)) return TYPE_VIDEO_VIMEO; return 0 }, createText: function() { if (this.options.textstyle == 'none') return; var m = this; var n = $(".html5zoo-text-wrapper-" + this.id, this.container); if (this.options.textstyle == 'static') { n.html("
"); n.css({ display: ((this.options.textautohide) ? 'none': 'block'), overflow: 'hidden', width: '100%', height: 'auto', position: 'absolute' }); if (this.options.textautohide) { $(".html5zoo-slider-" + this.id, this.container).hover(function() { $(".html5zoo-text-wrapper-" + m.id, m.container).fadeIn() }, function() { $(".html5zoo-text-wrapper-" + m.id, m.container).fadeOut() }) } switch (this.options.textpositionstatic) { case 'top': n.css({ left: '0px', top: '0px', 'margin-top': this.options.textpositionmarginstatic + 'px' }); break; case 'bottom': n.css({ left: '0px', bottom: '0px', 'margin-bottom': this.options.textpositionmarginstatic + 'px' }); break; case 'topoutside': n.css({ left: '0px', bottom: '100%', 'margin-bottom': this.options.textpositionmarginstatic + 'px' }); break; case 'bottomoutside': n.css({ left: '0px', top: '100%', 'margin-top': this.options.textpositionmarginstatic + 'px' }); break } } else { n.html("
"); n.css({ display: 'none', overflow: 'hidden', position: 'absolute' }) } $("head").append(""); this.container.bind('html5zoo.switchtext', function(f, g, h) { var i = $(".html5zoo-text-wrapper-" + m.id, m.container); var j = $(".html5zoo-text-bg-" + m.id, m.container); var k = $(".html5zoo-title-" + m.id, m.container); var l = $(".html5zoo-description-" + m.id, m.container); if (m.options.textstyle == 'static') { k.html(m.elemArray[h][ELEM_TITLE]); l.html(m.elemArray[h][ELEM_DESCRIPTION]); if (!m.elemArray[h][ELEM_TITLE] && !m.elemArray[h][ELEM_DESCRIPTION]) j.hide(); else j.show() } else if (m.options.textstyle == 'dynamic') { if (!m.elemArray[h][ELEM_TITLE] && !m.elemArray[h][ELEM_DESCRIPTION]) i.fadeOut(); else { i.fadeOut(function() { var a = 'bottomleft'; var b = m.options.textpositiondynamic; if (b) { b = b.split(","); a = b[Math.floor(Math.random() * b.length)]; a = $.trim(a.toLowerCase()) } switch (a) { case 'topleft': i.css({ left: '0px', right: '', top: '0px', bottom: '' }); i.css({ margin: m.options.textpositionmargintop + 'px ' + m.options.textpositionmarginleft + 'px' }); break; case 'topright': i.css({ left: '', right: '0px', top: '0px', bottom: '' }); i.css({ margin: m.options.textpositionmargintop + 'px ' + m.options.textpositionmarginright + 'px' }); break; case 'bottomleft': i.css({ left: '0px', right: '', top: '', bottom: '0px' }); i.css({ margin: m.options.textpositionmarginbottom + 'px ' + m.options.textpositionmarginleft + 'px' }); break; case 'bottomright': i.css({ left: '', right: '0px', top: '', bottom: '0px' }); i.css({ margin: m.options.textpositionmarginbottom + 'px ' + m.options.textpositionmarginright + 'px' }); break } k.html(m.elemArray[h][ELEM_TITLE]); l.html(m.elemArray[h][ELEM_DESCRIPTION]); var c = null; var d = m.options.texteffect; if (d) { d = d.split(","); c = d[Math.floor(Math.random() * d.length)]; c = $.trim(c.toLowerCase()) } var e = $(".html5zoo-text-" + m.id, m.container); switch (c) { case 'fade': e.hide(); i.show(); e.delay(500).fadeIn(m.options.texteffectduration); break; case 'slide': e.css({ left: '-100%', opacity: 0, display: 'block' }); i.show(); e.delay(500).animate({ left: '0%', opacity: 1 }, m.options.texteffectduration, m.options.texteffecteasing); break; default: e.delay(500).show() } }) } } }) }, createStyle: function () { // 加height:" + this.options.height + "px',是为了描述文字,不论模块高度怎么变,永远在底部 $(".html5zoo-space-" + this.id, this.container).html(""); if (this.options.isresponsive) this.container.css({ "max-width": this.options.width, "max-height": this.options.height }); else this.container.css({ "width": this.options.width, "height": this.options.height }); var a = ".html5zoo-wrapper-" + this.id + " {display:block;position:relative;width:100%;height:auto;}"; a += ".html5zoo-slider-" + this.id + " {display:block;position:relative;left:0px;top:0px;width:100%;height:auto;"; if (this.options.border > 0) a += "margin-left:-" + this.options.border + "px;border-width:" + this.options.border + "px;border-style:solid;border-color:" + this.options.bordercolor + ";"; if (this.options.borderradius > 0) a += "border-radius:" + this.options.borderradius + "px;-moz-border-radius:" + this.options.borderradius + "px;-webkit-border-radius:" + this.options.borderradius + "px;"; if (this.options.showshadow) { var b = "0px 0px " + this.options.shadowsize + "px " + this.options.shadowcolor; a += "box-shadow:" + b + ";-moz-box-shadow:" + b + ";-webkit-box-shadow:" + b + ";"; if (ASPlatforms.isIE678() || ASPlatforms.isIE9) { a += "filter:progid:DXImageTransform.Microsoft.Shadow(color=" + this.options.shadowcolor + ",direction=135,strength=" + this.options.shadowsize + ");" } } a += "}"; a += ".html5zoo-box-" + this.id + " {display:block;position:relative;left:0px;top:0px;width:100%;height:auto;}"; a += ".html5zoo-swipe-box-" + this.id + " {display:block;position:relative;left:0px;top:0px;width:100%;height:auto;}"; a += ".html5zoo-space-" + this.id + " {display:block;position:relative;left:0px;top:0px;width:100%;height:auto;visibility:hidden;line-height:0px;font-size:0px;}"; a += ".html5zoo-img-box-" + this.id + " {display:block;position:absolute;left:0px;top:0px;width:100%;height:100%;}"; a += ".html5zoo-play-" + this.id + " {display:none;position:absolute;left:50%;top:50%;cursor:pointer;width:" + this.options.playvideoimagewidth + "px;height:" + this.options.playvideoimageheight + "px;margin-top:-" + Math.round(this.options.playvideoimageheight / 2) + "px;margin-left:" + '-' + Math.round(this.options.playvideoimagewidth / 2) + "px; background:url('" + this.options.skinsfolder + this.options.playvideoimage + "') no-repeat left top;}"; a += ".html5zoo-video-wrapper-" + this.id + " {display:none;position:absolute;left:0px;top:0px;background-color:#000;text-align:center;}"; a += ".html5zoo-error-" + this.id + " {display:block;position:relative;margin:0 auto;width:80%;top:50%;color:#fff;font:16px Arial,Tahoma,Helvetica,sans-serif;}"; if (this.options.showwatermark) { if (((this.options.watermarkstyle == 'text') && (this.options.watermarktext.length > 0)) || ((this.options.watermarkstyle == 'image') && (this.options.watermarkimage.length > 0))) { a += ".html5zoo-watermark-" + this.id + " {" + this.options.watermarkpositioncss; if ((this.options.watermarkstyle == 'text') && (this.options.watermarktext.length > 0)) a += this.options.watermarktextcss; if (this.options.watermarklink) a += "cursor:pointer;"; a += "}" } } if (this.options.showribbon) { a += ".html5zoo-ribbon-" + this.id + " {display:block;position:absolute;"; switch (this.options.ribbonposition) { case 'topleft': a += "left:" + this.options.ribbonimagex + "px;top:" + this.options.ribbonimagey + "px;"; break; case 'topright': a += "right:" + this.options.ribbonimagex + "px;top:" + this.options.ribbonimagey + "px;"; break; case 'bottomleft': a += "left:" + this.options.ribbonimagex + "px;bottom:" + this.options.ribbonimagey + "px;"; break; case 'bottomright': a += "right:" + this.options.ribbonimagex + "px;bottom:" + this.options.ribbonimagey + "px;"; break; case 'top': a += "width:100%;height:auto;margin:0 auto;top:" + this.options.ribbonimagey + "px;"; case 'bottom': a += "width:100%;height:auto;text-align:center;bottom:" + this.options.ribbonimagey + "px;" } a += "}" } a += ".html5zoo-video-wrapper-" + this.id + " video {max-width:100%;height:auto;}"; a += ".html5zoo-video-wrapper-" + this.id + " iframe, .html5zoo-video-wrapper-" + this.id + " object, .html5zoo-video-wrapper-" + this.id + " embed {position:absolute;top:0;left:0;width:100%;height:100%;}"; if ((this.options.navstyle == "thumbnails") && (this.options.navthumbstyle != 'imageonly')) { a += ".html5zoo-nav-thumbnail-tite-" + this.id + " {" + this.options.navthumbtitlecss + "}"; a += ".html5zoo-nav-thumbnail-tite-" + this.id + ":hover {" + this.options.navthumbtitlehovercss + "}"; if (this.options.navthumbstyle == 'imageandtitledescription') a += ".html5zoo-nav-thumbnail-description-" + this.id + " {" + this.options.navthumbdescriptioncss + "}" } $("head").append("") }, createBottomShadow: function() { if (!this.options.showbottomshadow) return; var a = $(".html5zoo-bottom-shadow-" + this.id, this.container); var l = (100 - this.options.bottomshadowimagewidth) / 2; a.css({ display: 'block', position: 'absolute', left: l + '%', top: this.options.bottomshadowimagetop + '%', width: this.options.bottomshadowimagewidth + '%', height: 'auto' }); a.html("") }, createBackgroundImage: function() { if (!this.options.showbackgroundimage || !this.options.backgroundimage) return; var a = $(".html5zoo-background-image-" + this.id, this.container); var l = (100 - this.options.backgroundimagewidth) / 2; a.css({ display: 'block', position: 'absolute', left: l + '%', top: this.options.backgroundimagetop + '%', width: this.options.backgroundimagewidth + '%', height: 'auto' }); a.html("") }, createArrows: function() { if (this.options.arrowstyle == 'none') return; var a = this; var b = $(".html5zoo-arrow-left-" + this.id, this.container); var c = $(".html5zoo-arrow-right-" + this.id, this.container); b.css({ overflow: 'hidden', position: 'absolute', cursor: 'pointer', width: this.options.arrowwidth + 'px', height: this.options.arrowheight + 'px', left: this.options.arrowmargin + 'px', top: this.options.arrowtop + '%', 'margin-top': '-' + this.options.arrowheight / 2 + 'px', background: "url('" + this.options.skinsfolder + this.options.arrowimage + "') no-repeat left top" }); if (ASPlatforms.isIE678()) b.css({ opacity: 'inherit', filter: 'inherit' }); b.hover(function() { $(this).css({ 'background-position': 'left bottom' }) }, function() { $(this).css({ 'background-position': 'left top' }) }); b.click(function() { a.slideRun( - 2) }); c.css({ overflow: 'hidden', position: 'absolute', cursor: 'pointer', width: this.options.arrowwidth + 'px', height: this.options.arrowheight + 'px', right: this.options.arrowmargin + 'px', top: this.options.arrowtop + '%', 'margin-top': '-' + this.options.arrowheight / 2 + 'px', background: "url('" + this.options.skinsfolder + this.options.arrowimage + "') no-repeat right top" }); if (ASPlatforms.isIE678()) c.css({ opacity: 'inherit', filter: 'inherit' }); c.hover(function() { $(this).css({ 'background-position': 'right bottom' }) }, function() { $(this).css({ 'background-position': 'right top' }) }); c.click(function() { a.slideRun( - 1) }); if (this.options.arrowstyle == 'always') { b.css({ display: 'block' }); c.css({ display: 'block' }) } else { b.css({ display: 'none' }); c.css({ display: 'none' }); $(".html5zoo-slider-" + this.id, this.container).hover(function() { clearTimeout(a.arrowTimeout); if (ASPlatforms.isIE678()) { $(".html5zoo-arrow-left-" + a.id, a.container).show(); $(".html5zoo-arrow-right-" + a.id, a.container).show() } else { $(".html5zoo-arrow-left-" + a.id, a.container).fadeIn(); $(".html5zoo-arrow-right-" + a.id, a.container).fadeIn() } }, function() { a.arrowTimeout = setTimeout(function() { if (ASPlatforms.isIE678()) { $(".html5zoo-arrow-left-" + a.id, a.container).hide(); $(".html5zoo-arrow-right-" + a.id, a.container).hide() } else { $(".html5zoo-arrow-left-" + a.id, a.container).fadeOut(); $(".html5zoo-arrow-right-" + a.id, a.container).fadeOut() } }, a.options.arrowhideonmouseleave) }) } }, carMoveLeft: function() { var a = $(".html5zoo-nav-container-" + this.id, this.container); var b = $(".html5zoo-bullet-wrapper-" + this.id, this.container); if (a.width() >= b.width()) return; if (this.options.navshowpreview) $(".html5zoo-nav-preview-" + this.id, this.container).hide(); var c = a.width() + this.options.navspacing; var l = (isNaN(parseInt(b.css("margin-left"))) ? 0 : parseInt(b.css("margin-left"))) - c; if (l <= (a.width() - b.width())) l = (a.width() - b.width()); if (l >= 0) l = 0; b.animate({ "margin-left": l }, { queue: false, duration: 500, easing: "easeOutCirc" }); if (this.options.navthumbnavigationstyle != 'auto') this.updateCarouselLeftRightArrow(l) }, carMoveRight: function() { var a = $(".html5zoo-nav-container-" + this.id, this.container); var b = $(".html5zoo-bullet-wrapper-" + this.id, this.container); if (a.width() >= b.width()) return; if (this.options.navshowpreview) $(".html5zoo-nav-preview-" + this.id, this.container).hide(); var c = a.width() + this.options.navspacing; var l = (isNaN(parseInt(b.css("margin-left"))) ? 0 : parseInt(b.css("margin-left"))) + c; if (l <= (a.width() - b.width())) l = (a.width() - b.width()); if (l >= 0) l = 0; b.animate({ "margin-left": l }, { queue: false, duration: 500, easing: "easeOutCirc" }); if (this.options.navthumbnavigationstyle != 'auto') this.updateCarouselLeftRightArrow(l) }, carMoveBottom: function() { var a = $(".html5zoo-nav-container-" + this.id, this.container); var b = $(".html5zoo-bullet-wrapper-" + this.id, this.container); if (a.height() >= b.height()) return; if (this.options.navshowpreview) $(".html5zoo-nav-preview-" + this.id, this.container).hide(); var c = a.height() + this.options.navspacing; var l = (isNaN(parseInt(b.css("margin-top"))) ? 0 : parseInt(b.css("margin-top"))) + c; if (l <= (a.height() - b.height())) l = (a.height() - b.height()); if (l >= 0) l = 0; b.animate({ "margin-top": l }, { queue: false, duration: 500, easing: "easeOutCirc" }); if (this.options.navthumbnavigationstyle != 'auto') this.updateCarouselLeftRightArrow(l) }, carMoveTop: function() { var a = $(".html5zoo-nav-container-" + this.id, this.container); var b = $(".html5zoo-bullet-wrapper-" + this.id, this.container); if (a.height() >= b.height()) return; if (this.options.navshowpreview) $(".html5zoo-nav-preview-" + this.id, this.container).hide(); var c = a.height() + this.options.navspacing; var l = (isNaN(parseInt(b.css("margin-top"))) ? 0 : parseInt(b.css("margin-top"))) - c; if (l <= (a.height() - b.height())) l = (a.height() - b.height()); if (l >= 0) l = 0; b.animate({ "margin-top": l }, { queue: false, duration: 500, easing: "easeOutCirc" }); if (this.options.navthumbnavigationstyle != 'auto') this.updateCarouselLeftRightArrow(l) }, updateCarouselLeftRightArrow: function(l) { var a = $(".html5zoo-nav-container-" + this.id, this.container); var b = $(".html5zoo-bullet-wrapper-" + this.id, this.container); if (this.options.navdirection == 'vertical') { if (l == 0) { $(".html5zoo-car-left-arrow-" + this.id, this.container).css({ 'background-position': 'left bottom', cursor: '' }); $(".html5zoo-car-left-arrow-" + this.id, this.container).data('disabled', true) } else { $(".html5zoo-car-left-arrow-" + this.id, this.container).css({ 'background-position': 'left top', cursor: 'pointer' }); $(".html5zoo-car-left-arrow-" + this.id, this.container).data('disabled', false) } if ((l == (a.height() - b.height()))) { $(".html5zoo-car-right-arrow-" + this.id, this.container).css({ 'background-position': 'right bottom', cursor: '' }); $(".html5zoo-car-right-arrow-" + this.id, this.container).data('disabled', true) } else { $(".html5zoo-car-right-arrow-" + this.id, this.container).css({ 'background-position': 'right top', cursor: 'pointer' }); $(".html5zoo-car-right-arrow-" + this.id, this.container).data('disabled', false) } } else { if (l == 0) { $(".html5zoo-car-left-arrow-" + this.id, this.container).css({ 'background-position': 'left bottom', cursor: '' }); $(".html5zoo-car-left-arrow-" + this.id, this.container).data('disabled', true) } else { $(".html5zoo-car-left-arrow-" + this.id, this.container).css({ 'background-position': 'left top', cursor: 'pointer' }); $(".html5zoo-car-left-arrow-" + this.id, this.container).data('disabled', false) } if ((l == (a.width() - b.width()))) { $(".html5zoo-car-right-arrow-" + this.id, this.container).css({ 'background-position': 'right bottom', cursor: '' }); $(".html5zoo-car-right-arrow-" + this.id, this.container).data('disabled', true) } else { $(".html5zoo-car-right-arrow-" + this.id, this.container).css({ 'background-position': 'right top', cursor: 'pointer' }); $(".html5zoo-car-right-arrow-" + this.id, this.container).data('disabled', false) } } }, createNav: function() { if ((this.options.navstyle == 'none') && (!this.options.navshowbuttons)) return; var f = this; var i; var g = $(".html5zoo-nav-" + this.id, this.container); var h = $(".html5zoo-nav-container-" + this.id, this.container); var j = $("
"); if (this.options.navstyle == 'thumbnails') { this.options.navimagewidth = this.options.navwidth - this.options.navborder * 2; this.options.navimageheight = this.options.navheight - this.options.navborder * 2; if (this.options.navthumbstyle == 'imageandtitle') this.options.navheight += this.options.navthumbtitleheight; else if (this.options.navthumbstyle == 'imageandtitledescription') this.options.navwidth += this.options.navthumbtitlewidth } if (this.options.navdirection == 'vertical') { var k = (this.options.navstyle == 'none') ? 0 : this.elemArray.length * this.options.navheight + (this.elemArray.length - 1) * this.options.navspacing; if (this.options.navshowbuttons) { if (this.options.navshowarrow) { k += (k > 0) ? this.options.navspacing: 0; k += 2 * this.options.navheight + this.options.navspacing } if (this.options.navshowplaypause && !this.options.navshowplaypausestandalone) { k += (k > 0) ? this.options.navspacing: 0; k += this.options.navheight } } j.css({ height: k + "px", width: "auto" }) } else { var k = (this.options.navstyle == 'none') ? 0 : this.elemArray.length * this.options.navwidth + (this.elemArray.length - 1) * this.options.navspacing; if (this.options.navshowbuttons) { if (this.options.navshowarrow) { k += (k > 0) ? this.options.navspacing: 0; k += 2 * this.options.navwidth + this.options.navspacing } if (this.options.navshowplaypause && !this.options.navshowplaypausestandalone) { k += (k > 0) ? this.options.navspacing: 0; k += this.options.navwidth } } j.css({ width: k + "px", height: "auto" }) } h.append(j); var o = 0; var q = (this.options.navdirection == 'vertical') ? this.options.navwidth: this.options.navheight; if ((this.options.navstyle == 'thumbnails') && this.options.navshowfeaturedarrow) { q += (this.options.navdirection == 'vertical') ? this.options.navfeaturedarrowimagewidth: this.options.navfeaturedarrowimageheight; o = (this.options.navdirection == 'vertical') ? this.options.navfeaturedarrowimagewidth: this.options.navfeaturedarrowimageheight } var s = ('navmarginx' in this.options) ? this.options.navmarginx: this.options.navmargin; var t = ('navmarginy' in this.options) ? this.options.navmarginy: this.options.navmargin; g.css({ display: 'block', position: 'absolute', height: 'auto' }); switch (this.options.navposition) { case 'top': j.css({ "margin-left": 'auto', "margin-right": 'auto', 'height': q + 'px' }); g.css({ overflow: 'hidden', 'width': '100%', top: '0%', left: '0px', 'margin-top': t + 'px' }); break; case 'topleft': j.css({ 'height': q + 'px' }); g.css({ overflow: 'hidden', 'max-width': '100%', top: '0px', left: '0px', 'margin-top': t + 'px', 'margin-left': s + 'px' }); break; case 'topright': j.css({ 'height': q + 'px' }); g.css({ overflow: 'hidden', 'max-width': '100%', top: '0px', right: '0px', 'margin-top': t + 'px', 'margin-right': s + 'px' }); break; case 'bottom': j.css({ "margin-left": 'auto', "margin-right": 'auto', 'margin-top': o + 'px' }); g.css({ overflow: 'hidden', 'width': '100%', top: '100%', left: '0px', 'margin-top': String(t - o) + 'px' }); break; case 'bottomleft': j.css({ 'margin-top': o + 'px' }); g.css({ overflow: 'hidden', 'max-width': '100%', bottom: '0px', left: '0px', 'margin-bottom': t + 'px', 'margin-top': String(t - o) + 'px', 'margin-left': s + 'px' }); break; case 'bottomright': j.css({ 'margin-top': o + 'px' }); g.css({ overflow: 'hidden', 'max-width': '100%', bottom: '0px', right: '0px', 'margin-bottom': t + 'px', 'margin-top': String(t - o) + 'px', 'margin-right': s + 'px' }); break; case 'left': j.css({ 'width': q + 'px' }); g.css({ overflow: 'hidden', 'height': '100%', width: q + 'px', top: '0%', left: '0%', 'margin-left': s + 'px' }); h.css({ display: 'block', position: 'absolute', top: '0px', bottom: '0px', left: '0px', right: '0px', height: 'auto' }); break; case 'right': j.css({ 'margin-left': o + 'px' }); g.css({ overflow: 'hidden', 'height': '100%', width: q + 'px', top: '0%', left: '100%', 'margin-left': String(s - o) + 'px' }); h.css({ display: 'block', position: 'absolute', top: '0px', bottom: '0px', left: '0px', right: '0px', height: 'auto' }); break } if (this.options.navstyle != 'none') { var u; for (i = 0; i < this.elemArray.length; i++) { u = this.createNavBullet(i); j.append(u) } g.mouseenter(function() { f.pauseCarousel = true }); g.mouseleave(function() { f.pauseCarousel = false }); if (f.options.navthumbnavigationstyle == 'auto') { g.mousemove(function(e) { if (f.options.navdirection == 'vertical') { if (g.height() >= j.height()) return; var d = e.pageY - g.offset().top; if (d < 10) d = 0; if (d > g.height() - 10) d = g.height(); var r = d / g.height(); var l = (g.height() - j.height()) * r; j.animate({ "margin-top": l }, { queue: false, duration: 20, easing: "easeOutCubic" }) } else { if (g.width() >= j.width()) return; var d = e.pageX - g.offset().left; if (d < 10) d = 0; if (d > g.width() - 10) d = g.width(); var r = d / g.width(); var l = (g.width() - j.width()) * r; j.animate({ "margin-left": l }, { queue: false, duration: 20, easing: "easeOutCubic" }) } }) } else { if (((f.options.navdirection == 'vertical') && (j.height() > h.height())) || ((f.options.navdirection == 'horizontal') && (j.width() > h.width()))) { var m = f.options.navthumbnavigationarrowimagewidth + f.options.navspacing; if (f.options.navdirection == "horizontal") { var n = Math.floor(((g.width() - 2 * m) + f.options.navspacing) / (f.options.navwidth + f.options.navspacing)); m = Math.floor((g.width() - n * f.options.navwidth - (n - 1) * f.options.navspacing) / 2) } if (f.options.navdirection == 'vertical') h.css({ 'margin-top': m + 'px', 'margin-bottom': m + 'px', overflow: 'hidden' }); else h.css({ 'margin-left': m + 'px', 'margin-right': m + 'px', overflow: 'hidden' }); var v = $(""); var w = $(""); g.append(v); g.append(w); v.css({ overflow: 'hidden', position: 'absolute', cursor: 'pointer', width: f.options.navthumbnavigationarrowimagewidth + 'px', height: f.options.navthumbnavigationarrowimageheight + 'px', background: "url('" + f.options.skinsfolder + f.options.navthumbnavigationarrowimage + "') no-repeat left top" }); w.css({ overflow: 'hidden', position: 'absolute', cursor: 'pointer', width: f.options.navthumbnavigationarrowimagewidth + 'px', height: f.options.navthumbnavigationarrowimageheight + 'px', background: "url('" + f.options.skinsfolder + f.options.navthumbnavigationarrowimage + "') no-repeat right top" }); var p = (f.options.navdirection == 'vertical') ? (f.options.navwidth / 2 - f.options.navthumbnavigationarrowimagewidth / 2) : (f.options.navheight / 2 - f.options.navthumbnavigationarrowimageheight / 2); if ((f.options.navposition == 'bottomleft') || (f.options.navposition == 'bottomright') || (f.options.navposition == 'bottom') || (f.options.navposition == 'right')) p += o; if (f.options.navdirection == 'vertical') { v.css({ top: '0px', left: '0px', 'margin-left': p + 'px' }); w.css({ bottom: '0px', left: '0px', 'margin-left': p + 'px' }) } else { v.css({ left: '0px', top: '0px', 'margin-top': p + 'px' }); w.css({ right: '0px', top: '0px', 'margin-top': p + 'px' }) } if (ASPlatforms.isIE678()) v.css({ opacity: 'inherit', filter: 'inherit' }); v.hover(function() { if (!$(this).data('disabled')) $(this).css({ 'background-position': 'left center' }) }, function() { if (!$(this).data('disabled')) $(this).css({ 'background-position': 'left top' }) }); v.click(function() { if (f.options.navdirection == 'vertical') f.carMoveBottom(); else f.carMoveRight() }); if (ASPlatforms.isIE678()) w.css({ opacity: 'inherit', filter: 'inherit' }); w.hover(function() { if (!$(this).data('disabled')) $(this).css({ 'background-position': 'right center' }) }, function() { if (!$(this).data('disabled')) $(this).css({ 'background-position': 'right top' }) }); w.click(function() { if (f.options.navdirection == 'vertical') f.carMoveTop(); else f.carMoveLeft() }); v.css({ display: 'block', 'background-position': 'left bottom', cursor: '' }); v.data('disabled', true); w.css({ display: 'block' }) } } if (f.options.navdirection == 'vertical') { g.touchSwipe({ swipeTop: function(a) { f.carMoveTop() }, swipeBottom: function() { f.carMoveBottom() } }) } else { g.touchSwipe({ swipeLeft: function(a) { f.carMoveLeft() }, swipeRight: function() { f.carMoveRight() } }) } this.container.bind('html5zoo.switch', function(a, b, c) { $(".html5zoo-bullet-" + f.id + "-" + b, f.container)["bulletNormal" + f.id](); $(".html5zoo-bullet-" + f.id + "-" + c, f.container)["bulletSelected" + f.id]() }); if (this.options.navshowpreview) { var x = $(""); var y = $("
"); switch (this.options.navpreviewposition) { case 'bottom': y.css({ left: '50%', bottom: '100%', 'margin-left': '-' + Math.round(this.options.navpreviewarrowwidth / 2) + 'px' }); break; case 'top': y.css({ left: '50%', top: '100%', 'margin-left': '-' + Math.round(this.options.navpreviewarrowwidth / 2) + 'px' }); break; case 'left': y.css({ top: '50%', left: '100%', 'margin-top': '-' + Math.round(this.options.navpreviewarrowheight / 2) + 'px' }); break; case 'right': y.css({ top: '50%', right: '100%', 'margin-top': '-' + Math.round(this.options.navpreviewarrowheight / 2) + 'px' }); break } var z = $("
"); x.append(y); x.append(z); if (this.options.navshowplayvideo) { var A = $(""); x.append(A) } $(".html5zoo-wrapper-" + this.id, this.container).append(x) } if (this.options.navshowfeaturedarrow) { j.append("") } } if (this.options.navshowbuttons) { var B = (this.options.navdirection == 'vertical') ? 'top': 'left'; var C = (this.options.navstyle == 'none') ? 0 : this.options.navspacing; if (this.options.navshowarrow) { var D = $("
"); j.append(D); if (this.options.navbuttonradius) D.css(ASPlatforms.applyBrowserStyles({ 'border-radius': this.options.navbuttonradius + 'px' })); if (this.options.navbuttoncolor) D.css({ 'background-color': this.options.navbuttoncolor }); if (this.options.navarrowimage) D.css({ 'background-image': "url('" + this.options.skinsfolder + this.options.navarrowimage + "')", 'background-repeat': 'no-repeat', 'background-position': 'left top' }); D.hover(function() { if (f.options.navbuttonhighlightcolor) $(this).css({ 'background-color': f.options.navbuttonhighlightcolor }); if (f.options.navarrowimage) $(this).css({ 'background-position': 'left bottom' }) }, function() { if (f.options.navbuttoncolor) $(this).css({ 'background-color': f.options.navbuttoncolor }); if (f.options.navarrowimage) $(this).css({ 'background-position': 'left top' }) }); D.click(function() { f.slideRun( - 2) }); C = this.options.navspacing } if (this.options.navshowplaypause) { var E, $navPause; if (this.options.navshowplaypausestandalone) { E = $("
"); this.$wrapper.append(E); $navPause = $("
"); this.$wrapper.append($navPause); switch (this.options.navshowplaypausestandaloneposition) { case 'topleft': E.css({ top: 0, left: 0, 'margin-left': this.options.navshowplaypausestandalonemarginx + 'px', 'margin-top': this.options.navshowplaypausestandalonemarginy + 'px' }); $navPause.css({ top: 0, left: 0, 'margin-left': this.options.navshowplaypausestandalonemarginx + 'px', 'margin-top': this.options.navshowplaypausestandalonemarginy + 'px' }); break; case 'topright': E.css({ top: 0, right: 0, 'margin-right': this.options.navshowplaypausestandalonemarginx + 'px', 'margin-top': this.options.navshowplaypausestandalonemarginy + 'px' }); $navPause.css({ top: 0, right: 0, 'margin-right': this.options.navshowplaypausestandalonemarginx + 'px', 'margin-top': this.options.navshowplaypausestandalonemarginy + 'px' }); break; case 'bottomleft': E.css({ bottom: 0, left: 0, 'margin-left': this.options.navshowplaypausestandalonemarginx + 'px', 'margin-bottom': this.options.navshowplaypausestandalonemarginy + 'px' }); $navPause.css({ bottom: 0, left: 0, 'margin-left': this.options.navshowplaypausestandalonemarginx + 'px', 'margin-bottom': this.options.navshowplaypausestandalonemarginy + 'px' }); break; case 'bottomright': E.css({ bottom: 0, right: 0, 'margin-right': this.options.navshowplaypausestandalonemarginx + 'px', 'margin-bottom': this.options.navshowplaypausestandalonemarginy + 'px' }); $navPause.css({ bottom: 0, right: 0, 'margin-right': this.options.navshowplaypausestandalonemarginx + 'px', 'margin-bottom': this.options.navshowplaypausestandalonemarginy + 'px' }); break; case 'center': E.css({ top: '50%', left: '50%', 'margin-left': '-' + Math.round(this.options.navshowplaypausestandalonewidth / 2) + 'px', 'margin-top': '-' + Math.round(this.options.navshowplaypausestandaloneheight / 2) + 'px' }); $navPause.css({ top: '50%', left: '50%', 'margin-left': '-' + Math.round(this.options.navshowplaypausestandalonewidth / 2) + 'px', 'margin-top': '-' + Math.round(this.options.navshowplaypausestandaloneheight / 2) + 'px' }); break } } else { E = $("
"); j.append(E); $navPause = $("
"); j.append($navPause) } if (this.options.navbuttonradius) E.css(ASPlatforms.applyBrowserStyles({ 'border-radius': this.options.navbuttonradius + 'px' })); if (this.options.navbuttoncolor) E.css({ 'background-color': this.options.navbuttoncolor }); if (this.options.navarrowimage) E.css({ 'background-image': "url('" + this.options.skinsfolder + this.options.navplaypauseimage + "')", 'background-repeat': 'no-repeat', 'background-position': 'left top' }); E.hover(function() { if (f.options.navbuttonhighlightcolor) $(this).css({ 'background-color': f.options.navbuttonhighlightcolor }); if (f.options.navarrowimage) $(this).css({ 'background-position': 'left bottom' }) }, function() { if (f.options.navbuttoncolor) $(this).css({ 'background-color': f.options.navbuttoncolor }); if (f.options.navarrowimage) $(this).css({ 'background-position': 'left top' }) }); E.click(function() { f.isPaused = false; f.loopCount = 0; if (!f.tempPaused) f.sliderTimeout.start(); $(this).css({ display: 'none' }); $(".html5zoo-nav-pause-" + f.id, f.container).css({ display: 'block' }) }); if (this.options.navbuttonradius) $navPause.css(ASPlatforms.applyBrowserStyles({ 'border-radius': this.options.navbuttonradius + 'px' })); if (this.options.navbuttoncolor) $navPause.css({ 'background-color': this.options.navbuttoncolor }); if (this.options.navarrowimage) $navPause.css({ 'background-image': "url('" + this.options.skinsfolder + this.options.navplaypauseimage + "')", 'background-repeat': 'no-repeat', 'background-position': 'right top' }); $navPause.hover(function() { if (f.options.navbuttonhighlightcolor) $(this).css({ 'background-color': f.options.navbuttonhighlightcolor }); if (f.options.navarrowimage) $(this).css({ 'background-position': 'right bottom' }) }, function() { if (f.options.navbuttoncolor) $(this).css({ 'background-color': f.options.navbuttoncolor }); if (f.options.navarrowimage) $(this).css({ 'background-position': 'right top' }) }); $navPause.click(function() { f.isPaused = true; f.sliderTimeout.stop(); $(this).css({ display: 'none' }); $(".html5zoo-nav-play-" + f.id, f.container).css({ display: 'block' }) }); if (this.options.navshowplaypausestandalone && this.options.navshowplaypausestandaloneautohide) { E.css({ display: 'none' }); $navPause.css({ display: 'none' }); this.$wrapper.hover(function() { if (f.isPaused) { E.fadeIn(); $navPause.css({ display: 'none' }) } else { E.css({ display: 'none' }); $navPause.fadeIn() } }, function() { E.fadeOut(); $navPause.fadeOut() }) } else { E.css({ display: ((f.isPaused) ? 'block': 'none') }); $navPause.css({ display: ((f.isPaused) ? 'none': 'block') }) } } if (this.options.navshowarrow) { var F = $("
"); j.append(F); if (this.options.navbuttonradius) F.css(ASPlatforms.applyBrowserStyles({ 'border-radius': this.options.navbuttonradius + 'px' })); if (this.options.navbuttoncolor) F.css({ 'background-color': this.options.navbuttoncolor }); if (this.options.navarrowimage) F.css({ 'background-image': "url('" + this.options.skinsfolder + this.options.navarrowimage + "')", 'background-repeat': 'no-repeat', 'background-position': 'right top' }); F.hover(function() { if (f.options.navbuttonhighlightcolor) $(this).css({ 'background-color': f.options.navbuttonhighlightcolor }); if (f.options.navarrowimage) $(this).css({ 'background-position': 'right bottom' }) }, function() { if (f.options.navbuttoncolor) $(this).css({ 'background-color': f.options.navbuttoncolor }); if (f.options.navarrowimage) $(this).css({ 'background-position': 'right top' }) }); F.click(function() { f.slideRun( - 1) }) } } }, createNavBullet: function(r) { var s = this; var f = (this.options.navdirection == 'vertical') ? 'top': 'left'; var u = (this.options.navdirection == 'vertical') ? 'bottom': 'right'; var v = (r == this.elemArray.length - 1) ? 0 : this.options.navspacing; var w = (this.options.navstyle == 'thumbnails') ? this.options.navwidth - this.options.navborder * 2 : this.options.navwidth; var h = (this.options.navstyle == 'thumbnails') ? this.options.navheight - this.options.navborder * 2 : this.options.navheight; var x = $("
"); x.data('index', r); x.hover(function() { if ($(this).data('index') != s.curElem) $(this)["bulletHighlight" + s.id](); var d = $(this).data('index'); if (s.options.navswitchonmouseover) { if (d != s.curElem) s.slideRun(d) } if (s.options.navshowpreview) { var e = $(".html5zoo-nav-preview-" + s.id, s.container); var f = $(".html5zoo-nav-preview-images-" + s.id, e); if (s.options.navshowplayvideo) { var g = $(".html5zoo-nav-preview-play-" + s.id, e); if (s.elemArray[d][ELEM_VIDEO].length > 0) g.show(); else g.hide() } var h = $(".html5zoo-nav-" + s.id, s.container); var i = $(".html5zoo-bullet-wrapper-" + s.id, s.container); var j = $(this).position(); var k = h.position(); var m = i.position(); j.left += k.left + m.left; j.left += (isNaN(parseInt(i.css('margin-left'))) ? 0 : parseInt(i.css('margin-left'))); j.left += (isNaN(parseInt(h.css('margin-left'))) ? 0 : parseInt(h.css('margin-left'))); j.top += k.top + m.top; j.top += (isNaN(parseInt(i.css('margin-top'))) ? 0 : parseInt(i.css('margin-top'))); j.top += (isNaN(parseInt(h.css('margin-top'))) ? 0 : parseInt(h.css('margin-top'))); if (s.options.navdirection == 'vertical') { var n = $(".html5zoo-nav-container-" + s.id, s.container); j.top += (isNaN(parseInt(n.css('margin-top'))) ? 0 : parseInt(n.css('margin-top'))) } var t, l = j.left + s.options.navwidth / 2 - s.options.navpreviewwidth / 2 - s.options.navpreviewborder; var o, tv = j.top + s.options.navheight / 2 - s.options.navpreviewheight / 2 - s.options.navpreviewborder; var p = {}; switch (s.options.navpreviewposition) { case 'bottom': t = j.top + s.options.navheight + s.options.navpreviewarrowheight; p = { left: l + 'px', top: t + 'px' }; break; case 'top': t = j.top - s.options.navpreviewheight - 2 * s.options.navpreviewborder - s.options.navpreviewarrowheight; p = { left: l + 'px', top: t + 'px' }; break; case 'left': o = j.left - s.options.navpreviewwidth - 2 * s.options.navpreviewborder - s.options.navpreviewarrowwidth; p = { left: o + 'px', top: tv + 'px' }; break; case 'right': o = j.left + s.options.navwidth + s.options.navpreviewarrowwidth; p = { left: o + 'px', top: tv + 'px' }; break } var q = new Image(); $(q).load(function() { var a; if (this.width / this.height <= s.options.navpreviewwidth / s.options.navpreviewheight) a = "width:" + s.options.navpreviewwidth + "px;height:auto;margin-top:-" + Math.floor((this.height / this.width) * s.options.navpreviewwidth / 2 - s.options.navpreviewheight / 2) + "px"; else a = "width:auto;height:" + s.options.navpreviewheight + "px;margin-left:-" + Math.floor((this.width / this.height) * s.options.navpreviewheight / 2 - s.options.navpreviewwidth / 2) + "px"; var b = $(".html5zoo-nav-preview-img-" + s.id, f); if (s.options.navdirection == 'vertical') { var c = $("
"); f.append(c); if (b.length > 0) { b.animate({ top: '-' + s.options.navpreviewheight + 'px' }, function() { b.remove() }) } if (e.is(":visible")) { c.animate({ top: '0px' }); e.stop(true, true).animate(p) } else { c.css({ top: '0px' }); e.stop(true, true).css(p).fadeIn() } } else { var c = $("
"); f.append(c); if (b.length > 0) { b.animate({ left: '-' + s.options.navpreviewwidth + 'px' }, function() { b.remove() }) } if (e.is(":visible")) { c.animate({ left: '0px' }); e.stop(true, true).animate(p) } else { c.css({ left: '0px' }); e.stop(true, true).css(p).fadeIn() } } }); q.src = s.elemArray[d][ELEM_THUMBNAIL] } }, function() { if ($(this).data('index') != s.curElem) $(this)["bulletNormal" + s.id](); if (s.options.navshowpreview) { var a = $(".html5zoo-nav-preview-" + s.id, s.container); a.delay(500).fadeOut() } }); x.click(function() { s.slideRun($(this).data('index')) }); if (this.options.navstyle == 'bullets') { x.css({ background: "url('" + this.options.skinsfolder + this.options.navimage + "') no-repeat left top" }); $.fn["bulletNormal" + this.id] = function() { $(this).css({ 'background-position': 'left top' }) }; $.fn["bulletHighlight" + this.id] = $.fn["bulletSelected" + this.id] = function() { $(this).css({ 'background-position': 'left bottom' }) } } else if (this.options.navstyle == 'numbering') { x.text(r + 1); x.css({ 'background-color': this.options.navcolor, color: this.options.navfontcolor, 'font-size': this.options.navfontsize, 'font-family': this.options.navfont, 'text-align': 'center', 'line-height': this.options.navheight + 'px' }); x.css(ASPlatforms.applyBrowserStyles({ 'border-radius': this.options.navradius + 'px' })); if (this.options.navbuttonshowbgimage && this.options.navbuttonbgimage) { x.css({ background: "url('" + this.options.skinsfolder + this.options.navbuttonbgimage + "') no-repeat center top" }) } $.fn["bulletNormal" + this.id] = function() { $(this).css({ 'background-color': s.options.navcolor, 'color': s.options.navfontcolor }); if (s.options.navbuttonshowbgimage && s.options.navbuttonbgimage) $(this).css({ 'background-position': 'center top' }) }; $.fn["bulletHighlight" + this.id] = $.fn["bulletSelected" + this.id] = function() { $(this).css({ 'background-color': s.options.navhighlightcolor, 'color': s.options.navfonthighlightcolor }); if (s.options.navbuttonshowbgimage && s.options.navbuttonbgimage) $(this).css({ 'background-position': 'center bottom' }) } } else if (this.options.navstyle == 'thumbnails') { x.css({ padding: this.options.navborder + 'px', 'background-color': this.options.navbordercolor }); x.css({ opacity: this.options.navopacity, filter: "alpha(opacity=" + Math.round(100 * this.options.navopacity) + ")" }); var y = new Image(); var s = this; $(y).load(function() { var a; if (this.width / this.height <= s.options.navimagewidth / s.options.navimageheight) a = "max-width:none !important;width:100%;height:auto;margin-top:-" + Math.floor((this.height / this.width) * s.options.navimagewidth / 2 - s.options.navimageheight / 2) + "px"; else a = "max-width:none !important;width:auto;height:100%;margin-left:-" + Math.floor((this.width / this.height) * s.options.navimageheight / 2 - s.options.navimagewidth / 2) + "px"; x.append("
"); if ((s.options.navshowplayvideo) && (s.elemArray[r][ELEM_VIDEO].length > 0)) { x.append("
") } if (s.options.navthumbstyle != 'imageonly') { var b = "
" + s.elemArray[r][ELEM_TITLE] + "
"; if (s.options.navthumbstyle == 'imageandtitledescription') b += "
" + s.elemArray[r][ELEM_DESCRIPTION] + "
"; b += "
"; x.append(b) } }); y.src = this.elemArray[r][ELEM_THUMBNAIL]; $.fn["bulletNormal" + this.id] = function() { $(this).css({ opacity: s.options.navopacity, filter: "alpha(opacity=" + Math.round(100 * s.options.navopacity) + ")" }) }; $.fn["bulletHighlight" + this.id] = function() { $(this).css({ opacity: 1, filter: "alpha(opacity=100)" }) }; $.fn["bulletSelected" + this.id] = function() { $(this).css({ opacity: 1, filter: "alpha(opacity=100)" }); if (s.options.navshowfeaturedarrow) { var a = $(".html5zoo-nav-featuredarrow-" + s.id, s.container); var b = $(this).position(); var c = $(".html5zoo-nav-container-" + s.id, s.container); var d = $(".html5zoo-bullet-wrapper-" + s.id, s.container); if (s.options.navdirection == 'horizontal') { var t, l = b.left + s.options.navwidth / 2 - s.options.navfeaturedarrowimagewidth / 2; if ((s.options.navposition == 'top') || (s.options.navposition == 'topleft') || (s.options.navposition == 'topright')) t = b.top + s.options.navheight; else t = b.top - s.options.navfeaturedarrowimageheight; a.css({ top: t + 'px' }); if (a.is(":visible")) { a.stop(true, true).animate({ left: l + 'px' }) } else { a.css({ display: 'block', left: l + 'px' }) } if ((c.width() < d.width()) && !s.pauseCarousel) { var m = Math.abs(isNaN(parseInt(d.css("margin-left"))) ? 0 : parseInt(d.css("margin-left"))); if ((b.left < m) || ((b.left + s.options.navwidth) > m + c.width())) { var e = -b.left; if (e <= (c.width() - d.width())) e = (c.width() - d.width()); if (e >= 0) e = 0; d.animate({ "margin-left": e + 'px' }, { queue: false, duration: 500, easing: "easeOutCirc" }); s.updateCarouselLeftRightArrow(e) } } } else { var l, t = b.top + s.options.navheight / 2 - s.options.navfeaturedarrowimageheight / 2; if (s.options.navposition == 'left') l = b.left + s.options.navwidth; else l = b.left - s.options.navfeaturedarrowimagewidth; a.css({ left: l + 'px' }); if (a.is(":visible")) { a.stop(true, true).animate({ top: t + 'px' }) } else { a.css({ display: 'block', top: t + 'px' }) } if ((c.height() < d.height()) && !s.pauseCarousel) { var m = Math.abs(isNaN(parseInt(d.css("margin-top"))) ? 0 : parseInt(d.css("margin-top"))); if ((b.top < m) || ((b.top + s.options.navheight) > m + c.height())) { var e = -b.top; if (e <= (c.height() - d.height())) e = (c.height() - d.height()); if (e >= 0) e = 0; d.animate({ "margin-top": e + 'px' }, { queue: false, duration: 500, easing: "easeOutCirc" }); s.updateCarouselLeftRightArrow(e) } } } } } } return x }, slideRun: function(a) { savedCur = this.curElem; this.calcIndex(a); if (savedCur == this.curElem) return; if (this.isAnimating) { if (this.transitionTimeout) clearTimeout(this.transitionTimeout); var c = $(".html5zoo-img-box-" + this.id, this.container).css({ height: this.options.height }); var d = $(".html5zoo-img-" + this.id, this.container); $(".html5zoo-img-box-" + this.id, this.container).unbind('transitionFinished').html("
"); this.isAnimating = false } this.sliderTimeout.stop(); this.tempPaused = false; this.container.trigger('html5zoo.switch', [savedCur, this.curElem]); $(".html5zoo-video-wrapper-" + this.id, this.container).find("iframe").each(function() { $(this).attr('src', '') }); if (this.options.autoplayvideo && (this.elemArray[this.curElem][ELEM_VIDEO].length > 0)) { this.playVideo(true) } else { $(".html5zoo-video-wrapper-" + this.id, this.container).css({ display: 'none' }).empty(); this.container.trigger('html5zoo.switchtext', [savedCur, this.curElem]); var b = true; if (a == -2) b = false; else if (a == 1) b = true; else if (a >= 0) b = (this.curElem > savedCur) ? true: false; this.showImage(b) } (new Image()).src = this.elemArray[this.prevElem][ELEM_SRC]; (new Image()).src = this.elemArray[this.nextElem][ELEM_SRC]; if (!this.options.randomplay && (this.options.loop > 0)) { if (this.curElem == this.elemArray.length - 1) { this.loopCount++; if (this.options.loop <= this.loopCount) this.isPaused = true } } if ((!this.isPaused) && (!this.tempPaused) && (this.elemArray.length > 1)) { this.sliderTimeout.start() } }, showImage: function(g) { var h = this; var i = new Image(); $(i).load(function() { var b = 100; var c = $(".html5zoo-img-box-" + h.id, h.container); var d = $(".html5zoo-img-" + h.id, h.container); var e = $("
"); c.css({ height: h.options.height }); d.css({ height: h.options.height }); if(h.options.imgshowtype == 'fullscreen') e.find('img').css({ width: c.innerWidth(), height: h.options.height }); else e.find('img').css({ height: h.options.height }); /* // 现在图片是高度按模块高度,宽度是文档宽度 // TODO 图片从正中局部放大 // 高度为模块高度,图片从正中局部放大 c.css({ height: h.options.height }); var winWidth = Math.max($(window).width(), $('body').width()); if (this.width < winWidth) { e.find('img').css({ width: winWidth, height: h.options.height }); } else { var left = -(this.width - winWidth) / 2; console.log('left:' + left); c.width(c.width() - left); c.css({ left: left }); e.find('img').css({ width: this.width, height: h.options.height }); } */ if (d.length > 0) d.before(e); else c.append(e); if(h.options.imgshowtype == 'center'){ var left = (c.width() - e.find('img').width()) / 2; e.find('img').css('left',(left / c.width() * 100) + '%'); } e.find('img').css('visibility','visible'); var f = (h.firstslide && !h.options.transitiononfirstslide) ? '': h.options.transition; h.firstslide = false; h.isAnimating = true; c.html5zooTransition(h.id, d, e, { effect: f, direction: g, duration: h.options.transitionduration, easing: h.options.transitioneasing, crossfade: h.options.crossfade, fade: h.options.fade, slide: h.options.slide, slice: h.options.slice, blinds: h.options.blinds, threed: h.options.threed, threedhorizontal: h.options.threedhorizontal, blocks: h.options.blocks, shuffle: h.options.shuffle }, function() { h.isAnimating = false }, function(a) { h.transitionTimeout = a }); if (h.elemArray[h.curElem][ELEM_LINK]) { c.css({ cursor: 'pointer' }); c.unbind('click').bind('click', function() { if (h.elemArray[h.curElem][ELEM_LIGHTBOX]) { h.html5Lightbox.showItem(h.elemArray[h.curElem][ELEM_LINK]) } else { var a = (h.elemArray[h.curElem][ELEM_TARGET]) ? h.elemArray[h.curElem][ELEM_TARGET] : '_self'; window.open(h.elemArray[h.curElem][ELEM_LINK], a) } }) } else { c.css({ cursor: '' }); c.unbind('click') } $(".html5zoo-play-" + h.id, h.container).css({ display: ((h.elemArray[h.curElem][ELEM_VIDEO].length > 0) ? 'block': 'none') }) }); i.src = this.elemArray[this.curElem][ELEM_SRC] }, calcIndex: function(a) { var r; if (a == -2) { this.nextElem = this.curElem; this.curElem = this.prevElem; this.prevElem = ((this.curElem - 1) < 0) ? (this.elemArray.length - 1) : (this.curElem - 1); if (this.options.randomplay) { r = Math.floor(Math.random() * this.elemArray.length); if (r != this.curElem) this.prevElem = r } } else if (a == -1) { this.prevElem = this.curElem; this.curElem = this.nextElem; this.nextElem = ((this.curElem + 1) >= this.elemArray.length) ? 0 : (this.curElem + 1); if (this.options.randomplay) { r = Math.floor(Math.random() * this.elemArray.length); if (r != this.curElem) this.nextElem = r } } else if (a >= 0) { this.curElem = a; this.prevElem = ((this.curElem - 1) < 0) ? (this.elemArray.length - 1) : (this.curElem - 1); this.nextElem = ((this.curElem + 1) >= this.elemArray.length) ? 0 : (this.curElem + 1); if (this.options.randomplay) { r = Math.floor(Math.random() * this.elemArray.length); if (r != this.curElem) this.prevElem = r; r = Math.floor(Math.random() * this.elemArray.length); if (r != this.curElem) this.nextElem = r } } } }; G = G || {}; for (var K in G) { if (K.toLowerCase() !== K) { G[K.toLowerCase()] = G[K]; delete G[K] } } this.each(function() { this.options = $.extend({}, G); var c = this; $.each($(this).data(), function(a, b) { c.options[a.toLowerCase()] = b }); var d = {}; var e = window.location.search.substring(1).split("&"); for (var i = 0; i < e.length; i++) { var f = e[i].split("="); if (f && (f.length == 2)) { var g = f[0].toLowerCase(); var h = unescape(f[1]).toLowerCase(); if (h == "true") d[g] = true; else if (h == "false") d[g] = false; else d[g] = h } } this.options = $.extend(this.options, d); var j = { previewmode: false, isresponsive: true, autoplay: false, pauseonmouseover: true, slideinterval: 5000, randomplay: false, loop: 0, skinsfoldername: 'skins', showtimer: true, timerposition: 'bottom', timercolor: '#ffffff', timeropacity: 0.6, timerheight: 2, autoplayvideo: false, playvideoimage: 'play-video.png', playvideoimagewidth: 64, playvideoimageheight: 64, enabletouchswipe: true, border: 6, bordercolor: '#ffffff', borderradius: 0, showshadow: true, shadowsize: 5, shadowcolor: '#aaaaaa', showbottomshadow: false, bottomshadowimage: 'bottom-shadow.png', bottomshadowimagewidth: 140, bottomshadowimagetop: 90, showbackgroundimage: false, backgroundimage: 'background.png', backgroundimagewidth: 120, backgroundimagetop: -10, arrowstyle: 'mouseover', arrowimage: 'arrows.png', arrowwidth: 32, arrowheight: 32, arrowmargin: 0, arrowhideonmouseleave: 1000, arrowtop: 50, showribbon: false, ribbonimage: 'ribbon_topleft-0.png', ribbonposition: 'topleft', ribbonimagex: -11, ribbonimagey: -11, textstyle: 'static', textpositionstatic: 'bottom', textautohide: false, textpositionmarginstatic: 0, textpositiondynamic: 'topleft,topright,bottomleft,bottomright', textpositionmarginleft: 24, textpositionmarginright: 24, textpositionmargintop: 24, textpositionmarginbottom: 24, texteffect: 'slide', texteffecteasing: 'easeOutCubic', texteffectduration: 600, addfonts: true, fonts: "Inder", textcss: 'display:block; padding:12px; text-align:left;', textbgcss: 'display:block; position:absolute; top:0px; left:0px; width:100%; height:100%; background-color:#333333; opacity:0.6; filter:alpha(opacity=60);', titlecss: 'display:block; position:relative; font:bold 14px Inder,Arial,Tahoma,Helvetica,sans-serif; color:#fff;', descriptioncss: 'display:block; position:relative; font:12px Anaheim,Arial,Tahoma,Helvetica,sans-serif; color:#fff;', shownumbering: false, numberingformat: "%NUM/%TOTAL ", navstyle: 'thumbnails', navswitchonmouseover: false, navdirection: 'horizontal', navposition: 'bottom', navmargin: 24, navwidth: 64, navheight: 60, navspacing: 8, navshowpreview: true, navpreviewposition: 'top', navpreviewarrowimage: 'preview-arrow.png', navpreviewarrowwidth: 20, navpreviewarrowheight: 10, navpreviewwidth: 120, navpreviewheight: 60, navpreviewborder: 8, navpreviewbordercolor: '#ffff00', navimage: 'bullets.png', navradius: 0, navcolor: '', navhighlightcolor: '', navfont: 'Lucida Console, Arial', navfontcolor: '#666666', navfonthighlightcolor: '#666666', navfontsize: 12, navbuttonshowbgimage: true, navbuttonbgimage: 'navbuttonbgimage.png', navshowbuttons: false, navbuttonradius: 2, navbuttoncolor: '#999999', navbuttonhighlightcolor: '#333333', navshowplaypause: true, navshowarrow: true, navplaypauseimage: 'nav-play-pause.png', navarrowimage: 'nav-arrows.png', navshowplaypausestandalone: false, navshowplaypausestandaloneautohide: false, navshowplaypausestandaloneposition: 'bottomright', navshowplaypausestandalonemarginx: 24, navshowplaypausestandalonemarginy: 24, navshowplaypausestandalonewidth: 32, navshowplaypausestandaloneheight: 32, navopacity: 0.8, navborder: 2, navbordercolor: '#ff6600', navshowfeaturedarrow: true, navfeaturedarrowimage: 'featured-arrow.png', navfeaturedarrowimagewidth: 20, navfeaturedarrowimageheight: 10, navthumbstyle: 'imageonly', navthumbtitleheight: 20, navthumbtitlewidth: 120, navthumbtitlecss: 'display:block;position:relative;padding:2px 4px;text-align:left;font:bold 14px Arial,Helvetica,sans-serif;color:#333;', navthumbtitlehovercss: 'text-decoration:underline;', navthumbdescriptioncss: 'display:block;position:relative;padding:2px 4px;text-align:left;font:normal 12px Arial,Helvetica,sans-serif;color:#333;', navthumbnavigationstyle: 'arrow', navthumbnavigationarrowimage: 'carousel-arrows-32-32-0.png', navthumbnavigationarrowimagewidth: 32, navthumbnavigationarrowimageheight: 32, navshowplayvideo: true, navplayvideoimage: 'play-32-32-0.png', transitiononfirstslide: false, transition: 'slide', transitionduration: 1000, transitioneasing: 'easeOutQuad', fade: { duration: 1000, easing: 'easeOutQuad' }, crossfade: { duration: 1000, easing: 'easeOutQuad' }, slide: { duration: 1000, easing: 'easeOutElastic' }, slice: { duration: 1500, easing: 'easeOutQuad', effects: "up,down,updown", slicecount: 8 }, blinds: { duration: 1500, easing: 'easeOutQuad', slicecount: 4 }, threed: { duration: 1500, easing: 'easeOutQuad', slicecount: 4, fallback: 'slice', bgcolor: '#222222', perspective: 1000, perspectiveorigin: 'right', scatter: 5 }, threedhorizontal: { duration: 1500, easing: 'easeOutQuad', slicecount: 3, fallback: 'slice', bgcolor: '#222222', perspective: 1000, perspectiveorigin: 'bottom', scatter: 5 }, blocks: { duration: 1500, easing: 'easeOutQuad', effects: 'topleft, bottomright, top, bottom, random', rowcount: 4, columncount: 3 }, shuffle: { duration: 1500, easing: 'easeOutQuad', rowcount: 4, columncount: 3 }, versionmark: 'AMFree', showwatermarkdefault: true, watermarkstyledefault: 'text', watermarktextdefault: '', watermarkimagedefault: '', watermarklinkdefault: 'http://childcloud.cn', watermarktargetdefault: '_blank', watermarkpositioncssdefault: 'display:block;position:absolute;bottom:6px;right:6px;', watermarktextcssdefault: 'font:12px Arial,Tahoma,Helvetica,sans-serif;color:#666;padding:2px 4px;-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px;background-color:#fff;opacity:0.9;filter:alpha(opacity=90);', watermarklinkcssdefault: 'text-decoration:none;font:12px Arial,Tahoma,Helvetica,sans-serif;color:#333;', imgshowtype : 'fullscreen' }; this.options = $.extend(j, this.options); if (this.options.versionmark != ('AMCom')) { this.options.showwatermark = (window.location.href.indexOf('://amazingslider.com') >= 0) ? false: this.options.showwatermarkdefault; this.options.watermarkstyle = this.options.watermarkstyledefault; this.options.watermarktext = this.options.watermarktextdefault; this.options.watermarkimage = this.options.watermarkimagedefault; this.options.watermarklink = this.options.watermarklinkdefault; this.options.watermarktarget = this.options.watermarktargetdefault; this.options.watermarkpositioncss = this.options.watermarkpositioncssdefault; this.options.watermarktextcss = this.options.watermarktextcssdefault; this.options.watermarklinkcss = this.options.watermarklinkcssdefault } if (typeof html5zoo_previewmode != 'undefined') this.options.previewmode = html5zoo_previewmode; this.options.htmlfolder = window.location.href.substr(0, window.location.href.lastIndexOf("/") + 1); if (this.options.skinsfoldername.length > 0) this.options.skinsfolder = this.options.jsfolder + this.options.skinsfoldername + '/'; else this.options.skinsfolder = this.options.jsfolder; new J($(this), this.options, html5zooId++) }) } })(jQuery); (function($) { $.fn.html5zooTransition = function(a, b, c, d, e, f) { var g = this; var h = d.effect; var i = d.duration; var j = d.easing; var k = d.direction; var l = null; if (h) { h = h.split(","); l = h[Math.floor(Math.random() * h.length)]; l = $.trim(l.toLowerCase()) } if (((l == 'threed') || (l == 'threedhorizontal')) && (!ASPlatforms.css33dTransformSupported())) { l = d[l].fallback } if (l && d[l]) { if (d[l].duration) i = d[l].duration; if (d[l].easing) j = d[l].easing } if (l == "fade") { g.css({ overflow: 'hidden' }); c.show(); b.fadeOut(i, j, function() { b.remove(); e() }) } else if (l == "crossfade") { g.css({ overflow: 'hidden' }); c.hide(); b.fadeOut(i / 2, j, function() { c.fadeIn(i / 2, j, function() { b.remove(); e() }) }) } else if (l == 'slide') { g.css({ overflow: 'hidden' }); if (k) { c.css({ left: '100%' }); c.animate({ left: '0%' }, i, j); b.animate({ left: '-100%' }, i, j, function() { b.remove(); e() }) } else { c.css({ left: '-100%' }); c.animate({ left: '0%' }, i, j); b.animate({ left: '100%' }, i, j, function() { b.remove(); e() }) } } else if (l == 'slice') { g.css({ overflow: 'hidden' }); g.sliceTransition(a, b, c, $.extend({ duration: i, easing: j, direction: k }, d['slice']), e, f) } else if (l == 'blinds') { g.css({ overflow: 'hidden' }); g.blindsTransition(a, b, c, $.extend({ duration: i, easing: j, direction: k }, d['blinds']), e, f) } else if (l == 'threed') { g.css({ overflow: 'visible' }); g.threedTransition(a, b, c, $.extend({ duration: i, easing: j, direction: k }, d['threed']), e, f) } else if (l == 'threedhorizontal') { g.css({ overflow: 'visible' }); g.threedHorizontalTransition(a, b, c, $.extend({ duration: i, easing: j, direction: k }, d['threedhorizontal']), e, f) } else if (l == 'blocks') { g.css({ overflow: 'hidden' }); g.blocksTransition(a, b, c, $.extend({ duration: i, easing: j, direction: k }, d['blocks']), e, f) } else if (l == 'shuffle') { g.css({ overflow: 'visible' }); g.shuffleTransition(a, b, c, $.extend({ duration: i, easing: j, direction: k }, d['shuffle']), e, f) } else { c.show(); b.remove(); e() } }; $.fn.sliceTransition = function(b, c, d, e, f, g) { var i, index; var h = this; var w = h.width(); var j = Math.ceil(w / e.slicecount); d.hide(); for (i = 0; i < e.slicecount; i++) { var k = $("
"); var l = $('img', d).clone().css({ 'max-width': '', left: '-' + j * i + 'px' }); l.attr('style', l.attr('style') + '; max-width:' + w + 'px !important;'); k.append(l); h.append(k) } var m = $('.html5zoo-img-slice-' + b, h); if (!e.direction) m = $($.makeArray(m).reverse()); var n = e.effects.split(","); var o = n[Math.floor(Math.random() * n.length)]; o = $.trim(o.toLowerCase()); h.unbind('transitionFinished').bind('transitionFinished', function() { h.unbind('transitionFinished'); c.remove(); d.show(); m.remove(); f() }); var p = e.duration / 2; var q = e.duration / 2 / e.slicecount; index = 0; m.each(function() { var a = $(this); switch (o) { case 'up': a.css({ top: '', bottom: '0%', height: '0%' }); break; case 'down': a.css({ top: '0%', height: '0%' }); break; case 'updown': if (index % 2 == 0) a.css({ top: '0%', height: '0%' }); else a.css({ top: '', bottom: '0%', height: '0%' }); break } setTimeout(function() { a.animate({ height: '100%' }, p, e.easing) }, q * index); index++ }); var r = setTimeout(function() { h.trigger('transitionFinished') }, e.duration); g(r) }; $.fn.blindsTransition = function(c, d, e, f, g, h) { var i, index; var j = this; var w = j.width(); var k = Math.ceil(w / f.slicecount); e.hide(); for (i = 0; i < f.slicecount; i++) { var l = $("
"); var m = $("
"); var n = $('img', e).clone().css({ 'max-width': '', left: '-' + k * i + 'px' }); n.attr('style', n.attr('style') + '; max-width:' + w + 'px !important;'); m.append(n); l.append(m); j.append(l) } var o = $('.html5zoo-img-slice-' + c, j); if (!f.direction) o = $($.makeArray(o).reverse()); j.unbind('transitionFinished').bind('transitionFinished', function() { j.unbind('transitionFinished'); d.remove(); e.show(); $('.html5zoo-img-slice-wrapper-' + c, j).remove(); g() }); index = 0; o.each(function() { var a = $(this); var b; if (!f.direction) { a.css({ left: '', right: '-100%' }); b = { right: '0%' } } else { a.css({ left: '-100%' }); b = { left: '0%' } } a.animate(b, f.duration * (index + 1) / f.slicecount, f.easing); index++ }); var p = setTimeout(function() { j.trigger('transitionFinished') }, f.duration); h(p) }; $.fn.threedTransition = function(d, e, f, g, j, k) { var i, index; var l = this; var w = l.width(), h = l.height(), dist = h / 2; var m = Math.ceil(w / g.slicecount); var n = $("
"); l.append(n); n.css(ASPlatforms.applyBrowserStyles({ 'transform-style': 'preserve-3d', 'perspective': g.perspective, 'perspective-origin': g.perspectiveorigin + ' center' })); f.hide(); for (i = 0; i < g.slicecount; i++) { var o = $('img', f).clone().css({ 'max-width': '', left: '-' + m * i + 'px' }); o.attr('style', o.attr('style') + '; max-width:' + w + 'px !important;'); var p = $("
"); p.append(o); var q = $('img', e).clone().css({ 'max-width': '', left: '-' + m * i + 'px' }); q.attr('style', q.attr('style') + '; max-width:' + w + 'px !important;'); var r = $("
"); r.append(q); var s = $("
"); var t = $("
"); var u = $("
"); u.append(s); u.append(t); u.append(p); u.append(r); n.append(u); s.css(ASPlatforms.applyBrowserStyles({ 'transform-style': 'preserve-3d', 'backface-visibility': 'hidden', 'transform': 'rotateY(-90deg) translateZ(' + dist + 'px)' })); t.css(ASPlatforms.applyBrowserStyles({ 'transform-style': 'preserve-3d', 'backface-visibility': 'hidden', 'transform': 'rotateY(90deg) translateZ(' + (m - dist) + 'px)' })); r.css(ASPlatforms.applyBrowserStyles({ 'transform-style': 'preserve-3d', 'backface-visibility': 'hidden', 'transform': 'translateZ(' + dist + 'px)' })); p.css(ASPlatforms.applyBrowserStyles({ 'transform-style': 'preserve-3d', 'backface-visibility': 'hidden', 'transform': 'rotateX(' + ((g.direction) ? '90': '-90') + 'deg) translateZ(' + dist + 'px)' })) } var v = $('.html5zoo-img-cube-' + d, l); l.unbind('transitionFinished').bind('transitionFinished', function() { l.unbind('transitionFinished'); e.remove(); f.show(); setTimeout(function() { n.remove() }, 100); j() }); var x = g.duration / 2 / g.slicecount; var y = g.duration / 2; v.each(function() { $(this).css(ASPlatforms.applyBrowserStyles({ 'transform-style': 'preserve-3d', 'backface-visibility': 'hidden' })); $(this).css(ASPlatforms.applyBrowserStyles({ 'transition-property': 'transform' }, true)); $(this).css(ASPlatforms.applyBrowserStyles({ 'transform': 'translateZ(-' + dist + 'px)' })) }); e.hide(); index = 0; v.each(function() { var a = $(this); var b = (g.slicecount - 1) / 2; var c = Math.round((index - b) * g.scatter * w / 100); setTimeout(function() { a.css(ASPlatforms.applyBrowserStyles({ 'transform-style': 'preserve-3d', 'backface-visibility': 'hidden' })); a.css(ASPlatforms.applyBrowserStyles({ 'transition-property': 'transform' }, true)); a.css(ASPlatforms.applyBrowserStyles({ 'transition-duration': y + 'ms', 'transform': 'translateZ(-' + dist + 'px) rotateX(' + ((g.direction) ? '-89.99': '89.99') + 'deg)' })); a.animate({ left: '+=' + c + 'px' }, y / 2 - 50, function() { a.animate({ left: '-=' + c + 'px' }, y / 2 - 50) }) }, x * index + 100); index++ }); var z = setTimeout(function() { l.trigger('transitionFinished') }, g.duration); k(z) }; $.fn.threedHorizontalTransition = function(d, e, f, g, j, k) { var i, index; var l = this; var w = l.width(), h = l.height(), dist = w / 2; var m = Math.ceil(h / g.slicecount); var n = $("
"); l.append(n); n.css(ASPlatforms.applyBrowserStyles({ 'transform-style': 'preserve-3d', 'perspective': g.perspective, 'perspective-origin': 'center ' + g.perspectiveorigin })); f.hide(); for (i = 0; i < g.slicecount; i++) { var o = $('img', f).clone().css({ 'max-height': '', top: '-' + m * i + 'px' }); o.attr('style', o.attr('style') + '; max-height:' + h + 'px !important;'); var p = $("
"); p.append(o); var q = $('img', e).clone().css({ 'max-height': '', top: '-' + m * i + 'px' }); q.attr('style', q.attr('style') + '; max-height:' + h + 'px !important;'); var r = $("
"); r.append(q); var s = $("
"); var t = $("
"); var u = $("
"); u.append(s); u.append(t); u.append(p); u.append(r); n.append(u); s.css(ASPlatforms.applyBrowserStyles({ 'transform-style': 'preserve-3d', 'backface-visibility': 'hidden', 'transform': 'rotateX(90deg) translateZ(' + dist + 'px)' })); t.css(ASPlatforms.applyBrowserStyles({ 'transform-style': 'preserve-3d', 'backface-visibility': 'hidden', 'transform': 'rotateX(-90deg) translateZ(' + (m - dist) + 'px)' })); r.css(ASPlatforms.applyBrowserStyles({ 'transform-style': 'preserve-3d', 'backface-visibility': 'hidden', 'transform': 'translateZ(' + dist + 'px)' })); p.css(ASPlatforms.applyBrowserStyles({ 'transform-style': 'preserve-3d', 'backface-visibility': 'hidden', 'transform': 'rotateY(' + ((g.direction) ? '-90': '90') + 'deg) translateZ(' + dist + 'px)' })) } var v = $('.html5zoo-img-cube-' + d, l); l.unbind('transitionFinished').bind('transitionFinished', function() { l.unbind('transitionFinished'); e.remove(); f.show(); setTimeout(function() { n.remove() }, 100); j() }); var x = g.duration / 2 / g.slicecount; var y = g.duration / 2; v.each(function() { $(this).css(ASPlatforms.applyBrowserStyles({ 'transform-style': 'preserve-3d', 'backface-visibility': 'hidden' })); $(this).css(ASPlatforms.applyBrowserStyles({ 'transition-property': 'transform' }, true)); $(this).css(ASPlatforms.applyBrowserStyles({ 'transform': 'translateZ(-' + dist + 'px)' })) }); e.hide(); index = 0; v.each(function() { var a = $(this); var b = (g.slicecount - 1) / 2; var c = Math.round((index - b) * g.scatter * h / 100); setTimeout(function() { a.css(ASPlatforms.applyBrowserStyles({ 'transform-style': 'preserve-3d', 'backface-visibility': 'hidden' })); a.css(ASPlatforms.applyBrowserStyles({ 'transition-property': 'transform' }, true)); a.css(ASPlatforms.applyBrowserStyles({ 'transition-duration': y + 'ms', 'transform': 'translateZ(-' + dist + 'px) rotateY(' + ((g.direction) ? '89.99': '-89.99') + 'deg)' })); a.animate({ top: '+=' + c + 'px' }, y / 2 - 50, function() { a.animate({ top: '-=' + c + 'px' }, y / 2 - 50) }) }, x * index + 100); index++ }); var z = setTimeout(function() { l.trigger('transitionFinished') }, g.duration); k(z) }; $.fn.blocksTransition = function(c, d, e, f, g, k) { var i, j, index; var l = this; var w = l.width(), h = l.height(); var m = Math.ceil(w / f.columncount); var n = Math.ceil(h / f.rowcount); var o = f.effects.split(","); var p = o[Math.floor(Math.random() * o.length)]; p = $.trim(p.toLowerCase()); e.hide(); for (i = 0; i < f.rowcount; i++) { for (j = 0; j < f.columncount; j++) { var q = $("
"); var r = $("
"); var s = $('img', e).clone().css({ 'max-width': '', 'max-height': '', left: '-' + m * j + 'px', top: '-' + n * i + 'px' }); s.attr('style', s.attr('style') + '; max-width:' + w + 'px !important;max-height:' + h + 'px !important;'); r.append(s); q.append(r); l.append(q) } } var t = $('.html5zoo-img-block-' + c, l); l.unbind('transitionFinished').bind('transitionFinished', function() { l.unbind('transitionFinished'); d.remove(); e.show(); $('.html5zoo-img-block-wrapper-' + c, l).remove(); g() }); if ((p == 'bottomright') || (p == 'bottom')) t = $($.makeArray(t).reverse()); else if (p == 'random') t = $($.makeArray(t).sort(function() { return 0.5 - Math.random() })); index = 0; t.each(function() { var a = $(this); var b, col; b = Math.floor(index / f.columncount); col = index % f.columncount; a.hide(); switch (p) { case 'topleft': case 'bottomright': a.delay(f.duration * (b + col) / (f.rowcount + f.columncount)).fadeIn(); break; case 'top': case 'bottom': case 'random': a.delay(f.duration * index / (f.rowcount * f.columncount)).fadeIn(); break } index++ }); var u = setTimeout(function() { l.trigger('transitionFinished') }, f.duration); k(u) }; $.fn.shuffleTransition = function(f, g, k, l, m, n) { var i, j, index; var o = this; var w = o.width(), h = o.height(); var p = Math.ceil(w / l.columncount); var q = Math.ceil(h / l.rowcount); for (i = 0; i < l.rowcount; i++) { for (j = 0; j < l.columncount; j++) { var r = $("
"); var s = $("
"); var t = $('img', k).clone().css({ 'max-width': '', 'max-height': '', left: '-' + p * j + 'px', top: '-' + q * i + 'px' }); t.attr('style', t.attr('style') + '; max-width:' + w + 'px !important;max-height:' + h + 'px !important;'); s.append(t); r.append(s); o.append(r); var u = $("
"); var v = $("
"); var x = $('img', g).clone().css({ 'max-width': '', 'max-height': '', left: '-' + p * j + 'px', top: '-' + q * i + 'px' }); x.attr('style', x.attr('style') + '; max-width:' + w + 'px !important;max-height:' + h + 'px !important;'); v.append(x); u.append(v); o.append(u) } } k.hide(); g.hide(); var y = $('.html5zoo-img-block-wrapper-next-' + f, o); var z = $('.html5zoo-img-block-wrapper-prev-' + f, o); o.unbind('transitionFinished').bind('transitionFinished', function() { o.unbind('transitionFinished'); g.remove(); k.show(); $('.html5zoo-img-block-wrapper-next-' + f, o).remove(); $('.html5zoo-img-block-wrapper-prev-' + f, o).remove(); m() }); var A = o.offset(); var B = -A.left; var C = $(window).width() - A.left - o.width() / l.columncount; var D = -A.top * 100 / o.height(); var E = $(window).height() - A.top - o.height() / l.rowcount; index = 0; z.each(function() { var a = $(this); var b = Math.random() * (C - B) + B; var c = Math.random() * (E - D) + D; a.animate({ left: b + 'px', top: c + 'px', opacity: 0 }, l.duration, l.easing); index++ }); index = 0; y.each(function() { var a = $(this); var b = Math.floor(index / l.columncount); var c = index % l.columncount; var d = Math.random() * (C - B) + B; var e = Math.random() * (E - D) + D; a.css({ left: d + 'px', top: e + 'px', opacity: 0 }, l.duration, l.easing); a.animate({ left: c * p + 'px', top: b * q + 'px', opacity: 1 }, l.duration, l.easing); index++ }); var F = setTimeout(function() { o.trigger('transitionFinished') }, l.duration); n(F) } })(jQuery); (function($) { $.fn.touchSwipe = function(d) { var f = { swipeLeft: null, swipeRight: null, swipeTop: null, swipeBottom: null }; if (d) $.extend(f, d); return this.each(function() { var b = -1, startY = -1; var c = -1, curY = -1; function touchStart(a) { var e = a.originalEvent; if (e.targetTouches.length >= 1) { b = e.targetTouches[0].pageX; startY = e.targetTouches[0].pageY } else { touchCancel(a) } }; function touchMove(a) { var e = a.originalEvent; if (e.targetTouches.length >= 1) { c = e.targetTouches[0].pageX; curY = e.targetTouches[0].pageY } else { touchCancel(a) } }; function touchEnd(a) { if ((c > 0) || (curY > 0)) { triggerHandler(); touchCancel(a) } else { touchCancel(a) } }; function touchCancel(a) { b = -1; startY = -1; c = -1; curY = -1 }; function triggerHandler() { if (c > b) { if (f.swipeRight) f.swipeRight.call() } else { if (f.swipeLeft) f.swipeLeft.call() } if (curY > startY) { if (f.swipeBottom) f.swipeBottom.call() } else { if (f.swipeTop) f.swipeTop.call() } }; try { $(this).bind('touchstart', touchStart); $(this).bind('touchmove', touchMove); $(this).bind('touchend', touchEnd); $(this).bind('touchcancel', touchCancel) } catch(e) {} }) } })(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 } }); if (typeof ASyoukuIframeAPIReady === 'undefined') { var ASyoukuIframeAPIReady = false; var ASyoukuTimeout = 0; function onyoukuIframeAPIReady() { ASyoukuIframeAPIReady = true } } if (typeof html5zooId === 'undefined') { var html5zooId = 0 };// END OF /scripts/jQPlugins/html5zoo.js // STARTS OF /scripts/jQPlugins/lovelygallery.js function CoolSlide(obj, height, effect,time,imgshowtype) { var scripts = document.getElementsByTagName("script"); var jsFolder = ""; for (var i= 0; i< scripts.length; i++) { if( scripts[i].src && scripts[i].src.match(/lovelygallery\.js/i)) jsFolder = scripts[i].src.substr(0, scripts[i].src.lastIndexOf("/") + 1); } var params = { height: height, effect: effect, time: time, imgshowtype:imgshowtype }; $(obj).data('params', params); //height = "auto"; var win_width = $(window).width()>$(document).width()? $(window).width():$(document).width(); //$(window).width(); if(!imgshowtype && imgshowtype == '') imgshowtype = 'fullscreen'; jQuery(obj).html5zoo({ imgshowtype: imgshowtype, //图片显示方式, fullscreen = 平铺, center = 居中 jsfolder:jsFolder, width:win_width, height: height, skinsfoldername:"", loadimageondemand:false, isresponsive:false, autoplayvideo:false, pauseonmouseover:true, addmargin:true, randomplay:false, slideinterval: time, // 控制时间 enabletouchswipe:true, transitiononfirstslide:false, loop:0, autoplay:true, navplayvideoimage: "../../images/play-32-32-0.png", navpreviewheight:60, timerheight:2, shownumbering:false, skin:"Frontpage", navshowplaypause:true, navshowplayvideo:true, navshowplaypausestandalonemarginx:8, navshowplaypausestandalonemarginy:8, navbuttonradius:0, navthumbnavigationarrowimageheight:32, navmarginy:-20, showshadow:false, navfeaturedarrowimagewidth:16, navpreviewwidth:120, textpositionmarginright:24, bordercolor:"#ffffff", navthumbnavigationarrowimagewidth:32, navthumbtitlehovercss:"text-decoration:underline;", navcolor:"#999999", arrowwidth:48, texteffecteasing:"easeOutCubic", texteffect:"fade", navspacing:12, playvideoimage: "../../images/arrows-48-48-3.png", ribbonimage: "../../images/ribbon_topleft-0.png", navwidth:10, showribbon:false, arrowimage: "../../images/arrows-48-48-3.png", timeropacity:0.6, navthumbnavigationarrowimage: "../../images/carouselarrows-32-32-0.png", navshowplaypausestandalone:false, navpreviewbordercolor:"#ffffff", ribbonposition:"topleft", navthumbdescriptioncss:"display:block;position:relative;padding:2px 4px;text-align:left;font:normal 12px Arial,Helvetica,sans-serif;color:#333;", arrowstyle:"mouseover", navthumbtitleheight:20, textpositionmargintop:24, navswitchonmouseover:false, navarrowimage: "../../images/navarrows-28-28-0.png", arrowtop:50, textstyle:"static", playvideoimageheight:64, navfonthighlightcolor:"#666666", showbackgroundimage:false, navpreviewborder:4, navopacity:0.8, shadowcolor:"#aaaaaa", navbuttonshowbgimage:true, navbuttonbgimage: "../../images/navbuttonbgimage-28-28-0.png", textbgcss:"display:block; position:absolute; top:0px; left:0px; width:100%; height:100%; background-color:#333333; opacity:0.6; filter:alpha(opacity=60);", navdirection:"horizontal", navborder:4, bottomshadowimagewidth:110, showtimer:false, navradius:0, navshowpreview:true, navpreviewarrowheight:8, navmarginx:16, navfeaturedarrowimage: "../../images/featuredarrow-16-8-0.png", navfeaturedarrowimageheight:8, navstyle:"bullets", textpositionmarginleft:24, descriptioncss:"display:block; position:relative; margin-top:4px; font:14px Inder,Arial,Tahoma,Helvetica,sans-serif; color:#fff;", navplaypauseimage: "../../images/navplaypause-28-28-0.png", backgroundimagetop:-10, timercolor:"#ffffff", numberingformat:"%NUM/%TOTAL ", navfontsize:12, navhighlightcolor:"#333333", navimage: "../../images/bullet-24-24-4.png", navheight:10, navshowplaypausestandaloneautohide:false, navbuttoncolor:"#999999", navshowarrow:true, navshowfeaturedarrow:false, titlecss:"display:block; position:relative; font:16px Inder,Arial,Tahoma,Helvetica,sans-serif; color:#fff;", ribbonimagey:0, ribbonimagex:0, navshowplaypausestandaloneposition:"bottomright", shadowsize:5, arrowhideonmouseleave:win_width, navshowplaypausestandalonewidth:28, navshowplaypausestandaloneheight:28, backgroundimagewidth:120, textautohide:true, navthumbtitlewidth:120, navpreviewposition:"top", playvideoimagewidth:64, arrowheight:48, arrowmargin:0, texteffectduration:win_width, bottomshadowimage: "../../images/bottomshadow-110-100-5.png", border:0, timerposition:"bottom", navfontcolor:"#333333", navthumbnavigationstyle:"arrow", borderradius:0, navbuttonhighlightcolor:"#333333", textpositionstatic:"bottom", navthumbstyle:"imageonly", textcss:"display:block; padding:12px; text-align:left;", navbordercolor:"#ffffff", navpreviewarrowimage:"../../images/previewarrow-16-8-0.png", showbottomshadow:false, textpositionmarginstatic:0, backgroundimage:"", navposition:"bottom", navpreviewarrowwidth:16, bottomshadowimagetop:100, textpositiondynamic:"bottomleft", navshowbuttons:false, navthumbtitlecss:"display:block;position:relative;padding:2px 4px;text-align:left;font:bold 14px Arial,Helvetica,sans-serif;color:#333;", textpositionmarginbottom:24, ribbonmarginy:0, ribbonmarginx:0, slide: { duration:win_width, easing:"easeOutCubic", checked:true }, crossfade: { duration:win_width, easing:"easeOutCubic", checked:true }, threedhorizontal: { checked:true, bgcolor:"", perspective:win_width, slicecount:1, duration:1500, easing:"easeOutCubic", fallback:"slice", scatter:5, perspectiveorigin:"bottom" }, slice: { duration:1500, easing:"easeOutCubic", checked:true, effects:"up,down,updown", slicecount:10 }, fade: { duration:win_width, easing:"easeOutCubic", checked:true }, blocks: { columncount:5, checked:true, rowcount:5, effects:"topleft,bottomright,top,bottom,random", duration:1500, easing:"easeOutCubic" }, blinds: { duration:2000, easing:"easeOutCubic", checked:true, slicecount:3 }, shuffle: { duration:1500, easing:"easeOutCubic", columncount:5, checked:true, rowcount:5 }, threed: { checked:true, bgcolor:"#222222", perspective:win_width, slicecount:5, duration:1500, easing:"easeOutCubic", fallback:"slice", scatter:5, perspectiveorigin:"right" }, transition:effect//"slide,crossfade,threedhorizontal,slice,fade,blocks,blinds,shuffle,threed" }); };// END OF /scripts/jQPlugins/lovelygallery.js // STARTS OF /scripts/jQuery/jquery.validate.min.js /*! jQuery Validation Plugin - v1.11.1 - 3/22/2013\n* https://github.com/jzaefferer/jquery-validation * Copyright (c) 2013 Jörn Zaefferer; Licensed MIT */(function(t){t.extend(t.fn,{validate:function(e){if(!this.length)return e&&e.debug&&window.console&&console.warn("Nothing selected, can't validate, returning nothing."),void 0;var i=t.data(this[0],"validator");return i?i:(this.attr("novalidate","novalidate"),i=new t.validator(e,this[0]),t.data(this[0],"validator",i),i.settings.onsubmit&&(this.validateDelegate(":submit","click",function(e){i.settings.submitHandler&&(i.submitButton=e.target),t(e.target).hasClass("cancel")&&(i.cancelSubmit=!0),void 0!==t(e.target).attr("formnovalidate")&&(i.cancelSubmit=!0)}),this.submit(function(e){function s(){var s;return i.settings.submitHandler?(i.submitButton&&(s=t("").attr("name",i.submitButton.name).val(t(i.submitButton).val()).appendTo(i.currentForm)),i.settings.submitHandler.call(i,i.currentForm,e),i.submitButton&&s.remove(),!1):!0}return i.settings.debug&&e.preventDefault(),i.cancelSubmit?(i.cancelSubmit=!1,s()):i.form()?i.pendingRequest?(i.formSubmitted=!0,!1):s():(i.focusInvalid(),!1)})),i)},valid:function(){if(t(this[0]).is("form"))return this.validate().form();var e=!0,i=t(this[0].form).validate();return this.each(function(){e=e&&i.element(this)}),e},removeAttrs:function(e){var i={},s=this;return t.each(e.split(/\s/),function(t,e){i[e]=s.attr(e),s.removeAttr(e)}),i},rules:function(e,i){var s=this[0];if(e){var r=t.data(s.form,"validator").settings,n=r.rules,a=t.validator.staticRules(s);switch(e){case"add":t.extend(a,t.validator.normalizeRule(i)),delete a.messages,n[s.name]=a,i.messages&&(r.messages[s.name]=t.extend(r.messages[s.name],i.messages));break;case"remove":if(!i)return delete n[s.name],a;var u={};return t.each(i.split(/\s/),function(t,e){u[e]=a[e],delete a[e]}),u}}var o=t.validator.normalizeRules(t.extend({},t.validator.classRules(s),t.validator.attributeRules(s),t.validator.dataRules(s),t.validator.staticRules(s)),s);if(o.required){var l=o.required;delete o.required,o=t.extend({required:l},o)}return o}}),t.extend(t.expr[":"],{blank:function(e){return!t.trim(""+t(e).val())},filled:function(e){return!!t.trim(""+t(e).val())},unchecked:function(e){return!t(e).prop("checked")}}),t.validator=function(e,i){this.settings=t.extend(!0,{},t.validator.defaults,e),this.currentForm=i,this.init()},t.validator.format=function(e,i){return 1===arguments.length?function(){var i=t.makeArray(arguments);return i.unshift(e),t.validator.format.apply(this,i)}:(arguments.length>2&&i.constructor!==Array&&(i=t.makeArray(arguments).slice(1)),i.constructor!==Array&&(i=[i]),t.each(i,function(t,i){e=e.replace(RegExp("\\{"+t+"\\}","g"),function(){return i})}),e)},t.extend(t.validator,{defaults:{messages:{},groups:{},rules:{},errorClass:"error",validClass:"valid",errorElement:"label",focusInvalid:!0,errorContainer:t([]),errorLabelContainer:t([]),onsubmit:!0,ignore:":hidden",ignoreTitle:!1,onfocusin:function(t){this.lastActive=t,this.settings.focusCleanup&&!this.blockFocusCleanup&&(this.settings.unhighlight&&this.settings.unhighlight.call(this,t,this.settings.errorClass,this.settings.validClass),this.addWrapper(this.errorsFor(t)).hide())},onfocusout:function(t){this.checkable(t)||!(t.name in this.submitted)&&this.optional(t)||this.element(t)},onkeyup:function(t,e){(9!==e.which||""!==this.elementValue(t))&&(t.name in this.submitted||t===this.lastElement)&&this.element(t)},onclick:function(t){t.name in this.submitted?this.element(t):t.parentNode.name in this.submitted&&this.element(t.parentNode)},highlight:function(e,i,s){"radio"===e.type?this.findByName(e.name).addClass(i).removeClass(s):t(e).addClass(i).removeClass(s)},unhighlight:function(e,i,s){"radio"===e.type?this.findByName(e.name).removeClass(i).addClass(s):t(e).removeClass(i).addClass(s)}},setDefaults:function(e){t.extend(t.validator.defaults,e)},messages:{required:"This field is required.",remote:"Please fix this field.",email:"Please enter a valid email address.",url:"Please enter a valid URL.",date:"Please enter a valid date.",dateISO:"Please enter a valid date (ISO).",number:"Please enter a valid number.",digits:"Please enter only digits.",creditcard:"Please enter a valid credit card number.",equalTo:"Please enter the same value again.",maxlength:t.validator.format("Please enter no more than {0} characters."),minlength:t.validator.format("Please enter at least {0} characters."),rangelength:t.validator.format("Please enter a value between {0} and {1} characters long."),range:t.validator.format("Please enter a value between {0} and {1}."),max:t.validator.format("Please enter a value less than or equal to {0}."),min:t.validator.format("Please enter a value greater than or equal to {0}.")},autoCreateRanges:!1,prototype:{init:function(){function e(e){var i=t.data(this[0].form,"validator"),s="on"+e.type.replace(/^validate/,"");i.settings[s]&&i.settings[s].call(i,this[0],e)}this.labelContainer=t(this.settings.errorLabelContainer),this.errorContext=this.labelContainer.length&&this.labelContainer||t(this.currentForm),this.containers=t(this.settings.errorContainer).add(this.settings.errorLabelContainer),this.submitted={},this.valueCache={},this.pendingRequest=0,this.pending={},this.invalid={},this.reset();var i=this.groups={};t.each(this.settings.groups,function(e,s){"string"==typeof s&&(s=s.split(/\s/)),t.each(s,function(t,s){i[s]=e})});var s=this.settings.rules;t.each(s,function(e,i){s[e]=t.validator.normalizeRule(i)}),t(this.currentForm).validateDelegate(":text, [type='password'], [type='file'], select, textarea, [type='number'], [type='search'] ,[type='tel'], [type='url'], [type='email'], [type='datetime'], [type='date'], [type='month'], [type='week'], [type='time'], [type='datetime-local'], [type='range'], [type='color'] ","focusin focusout keyup",e).validateDelegate("[type='radio'], [type='checkbox'], select, option","click",e),this.settings.invalidHandler&&t(this.currentForm).bind("invalid-form.validate",this.settings.invalidHandler)},form:function(){return this.checkForm(),t.extend(this.submitted,this.errorMap),this.invalid=t.extend({},this.errorMap),this.valid()||t(this.currentForm).triggerHandler("invalid-form",[this]),this.showErrors(),this.valid()},checkForm:function(){this.prepareForm();for(var t=0,e=this.currentElements=this.elements();e[t];t++)this.check(e[t]);return this.valid()},element:function(e){e=this.validationTargetFor(this.clean(e)),this.lastElement=e,this.prepareElement(e),this.currentElements=t(e);var i=this.check(e)!==!1;return i?delete this.invalid[e.name]:this.invalid[e.name]=!0,this.numberOfInvalids()||(this.toHide=this.toHide.add(this.containers)),this.showErrors(),i},showErrors:function(e){if(e){t.extend(this.errorMap,e),this.errorList=[];for(var i in e)this.errorList.push({message:e[i],element:this.findByName(i)[0]});this.successList=t.grep(this.successList,function(t){return!(t.name in e)})}this.settings.showErrors?this.settings.showErrors.call(this,this.errorMap,this.errorList):this.defaultShowErrors()},resetForm:function(){t.fn.resetForm&&t(this.currentForm).resetForm(),this.submitted={},this.lastElement=null,this.prepareForm(),this.hideErrors(),this.elements().removeClass(this.settings.errorClass).removeData("previousValue")},numberOfInvalids:function(){return this.objectLength(this.invalid)},objectLength:function(t){var e=0;for(var i in t)e++;return e},hideErrors:function(){this.addWrapper(this.toHide).hide()},valid:function(){return 0===this.size()},size:function(){return this.errorList.length},focusInvalid:function(){if(this.settings.focusInvalid)try{t(this.findLastActive()||this.errorList.length&&this.errorList[0].element||[]).filter(":visible").focus().trigger("focusin")}catch(e){}},findLastActive:function(){var e=this.lastActive;return e&&1===t.grep(this.errorList,function(t){return t.element.name===e.name}).length&&e},elements:function(){var e=this,i={};return t(this.currentForm).find("input, select, textarea").not(":submit, :reset, :image, [disabled]").not(this.settings.ignore).filter(function(){return!this.name&&e.settings.debug&&window.console&&console.error("%o has no name assigned",this),this.name in i||!e.objectLength(t(this).rules())?!1:(i[this.name]=!0,!0)})},clean:function(e){return t(e)[0]},errors:function(){var e=this.settings.errorClass.replace(" ",".");return t(this.settings.errorElement+"."+e,this.errorContext)},reset:function(){this.successList=[],this.errorList=[],this.errorMap={},this.toShow=t([]),this.toHide=t([]),this.currentElements=t([])},prepareForm:function(){this.reset(),this.toHide=this.errors().add(this.containers)},prepareElement:function(t){this.reset(),this.toHide=this.errorsFor(t)},elementValue:function(e){var i=t(e).attr("type"),s=t(e).val();return"radio"===i||"checkbox"===i?t("input[name='"+t(e).attr("name")+"']:checked").val():"string"==typeof s?s.replace(/\r/g,""):s},check:function(e){e=this.validationTargetFor(this.clean(e));var i,s=t(e).rules(),r=!1,n=this.elementValue(e);for(var a in s){var u={method:a,parameters:s[a]};try{if(i=t.validator.methods[a].call(this,n,e,u.parameters),"dependency-mismatch"===i){r=!0;continue}if(r=!1,"pending"===i)return this.toHide=this.toHide.not(this.errorsFor(e)),void 0;if(!i)return this.formatAndAdd(e,u),!1}catch(o){throw this.settings.debug&&window.console&&console.log("Exception occurred when checking element "+e.id+", check the '"+u.method+"' method.",o),o}}return r?void 0:(this.objectLength(s)&&this.successList.push(e),!0)},customDataMessage:function(e,i){return t(e).data("msg-"+i.toLowerCase())||e.attributes&&t(e).attr("data-msg-"+i.toLowerCase())},customMessage:function(t,e){var i=this.settings.messages[t];return i&&(i.constructor===String?i:i[e])},findDefined:function(){for(var t=0;arguments.length>t;t++)if(void 0!==arguments[t])return arguments[t];return void 0},defaultMessage:function(e,i){return this.findDefined(this.customMessage(e.name,i),this.customDataMessage(e,i),!this.settings.ignoreTitle&&e.title||void 0,t.validator.messages[i],"Warning: No message defined for "+e.name+"")},formatAndAdd:function(e,i){var s=this.defaultMessage(e,i.method),r=/\$?\{(\d+)\}/g;"function"==typeof s?s=s.call(this,i.parameters,e):r.test(s)&&(s=t.validator.format(s.replace(r,"{$1}"),i.parameters)),this.errorList.push({message:s,element:e}),this.errorMap[e.name]=s,this.submitted[e.name]=s},addWrapper:function(t){return this.settings.wrapper&&(t=t.add(t.parent(this.settings.wrapper))),t},defaultShowErrors:function(){var t,e;for(t=0;this.errorList[t];t++){var i=this.errorList[t];this.settings.highlight&&this.settings.highlight.call(this,i.element,this.settings.errorClass,this.settings.validClass),this.showLabel(i.element,i.message)}if(this.errorList.length&&(this.toShow=this.toShow.add(this.containers)),this.settings.success)for(t=0;this.successList[t];t++)this.showLabel(this.successList[t]);if(this.settings.unhighlight)for(t=0,e=this.validElements();e[t];t++)this.settings.unhighlight.call(this,e[t],this.settings.errorClass,this.settings.validClass);this.toHide=this.toHide.not(this.toShow),this.hideErrors(),this.addWrapper(this.toShow).show()},validElements:function(){return this.currentElements.not(this.invalidElements())},invalidElements:function(){return t(this.errorList).map(function(){return this.element})},showLabel:function(e,i){var s=this.errorsFor(e);s.length?(s.removeClass(this.settings.validClass).addClass(this.settings.errorClass),s.html(i)):(s=t("<"+this.settings.errorElement+">").attr("for",this.idOrName(e)).addClass(this.settings.errorClass).html(i||""),this.settings.wrapper&&(s=s.hide().show().wrap("<"+this.settings.wrapper+"/>").parent()),this.labelContainer.append(s).length||(this.settings.errorPlacement?this.settings.errorPlacement(s,t(e)):s.insertAfter(e))),!i&&this.settings.success&&(s.text(""),"string"==typeof this.settings.success?s.addClass(this.settings.success):this.settings.success(s,e)),this.toShow=this.toShow.add(s)},errorsFor:function(e){var i=this.idOrName(e);return this.errors().filter(function(){return t(this).attr("for")===i})},idOrName:function(t){return this.groups[t.name]||(this.checkable(t)?t.name:t.id||t.name)},validationTargetFor:function(t){return this.checkable(t)&&(t=this.findByName(t.name).not(this.settings.ignore)[0]),t},checkable:function(t){return/radio|checkbox/i.test(t.type)},findByName:function(e){return t(this.currentForm).find("[name='"+e+"']")},getLength:function(e,i){switch(i.nodeName.toLowerCase()){case"select":return t("option:selected",i).length;case"input":if(this.checkable(i))return this.findByName(i.name).filter(":checked").length}return e.length},depend:function(t,e){return this.dependTypes[typeof t]?this.dependTypes[typeof t](t,e):!0},dependTypes:{"boolean":function(t){return t},string:function(e,i){return!!t(e,i.form).length},"function":function(t,e){return t(e)}},optional:function(e){var i=this.elementValue(e);return!t.validator.methods.required.call(this,i,e)&&"dependency-mismatch"},startRequest:function(t){this.pending[t.name]||(this.pendingRequest++,this.pending[t.name]=!0)},stopRequest:function(e,i){this.pendingRequest--,0>this.pendingRequest&&(this.pendingRequest=0),delete this.pending[e.name],i&&0===this.pendingRequest&&this.formSubmitted&&this.form()?(t(this.currentForm).submit(),this.formSubmitted=!1):!i&&0===this.pendingRequest&&this.formSubmitted&&(t(this.currentForm).triggerHandler("invalid-form",[this]),this.formSubmitted=!1)},previousValue:function(e){return t.data(e,"previousValue")||t.data(e,"previousValue",{old:null,valid:!0,message:this.defaultMessage(e,"remote")})}},classRuleSettings:{required:{required:!0},email:{email:!0},url:{url:!0},date:{date:!0},dateISO:{dateISO:!0},number:{number:!0},digits:{digits:!0},creditcard:{creditcard:!0}},addClassRules:function(e,i){e.constructor===String?this.classRuleSettings[e]=i:t.extend(this.classRuleSettings,e)},classRules:function(e){var i={},s=t(e).attr("class");return s&&t.each(s.split(" "),function(){this in t.validator.classRuleSettings&&t.extend(i,t.validator.classRuleSettings[this])}),i},attributeRules:function(e){var i={},s=t(e),r=s[0].getAttribute("type");for(var n in t.validator.methods){var a;"required"===n?(a=s.get(0).getAttribute(n),""===a&&(a=!0),a=!!a):a=s.attr(n),/min|max/.test(n)&&(null===r||/number|range|text/.test(r))&&(a=Number(a)),a?i[n]=a:r===n&&"range"!==r&&(i[n]=!0)}return i.maxlength&&/-1|2147483647|524288/.test(i.maxlength)&&delete i.maxlength,i},dataRules:function(e){var i,s,r={},n=t(e);for(i in t.validator.methods)s=n.data("rule-"+i.toLowerCase()),void 0!==s&&(r[i]=s);return r},staticRules:function(e){var i={},s=t.data(e.form,"validator");return s.settings.rules&&(i=t.validator.normalizeRule(s.settings.rules[e.name])||{}),i},normalizeRules:function(e,i){return t.each(e,function(s,r){if(r===!1)return delete e[s],void 0;if(r.param||r.depends){var n=!0;switch(typeof r.depends){case"string":n=!!t(r.depends,i.form).length;break;case"function":n=r.depends.call(i,i)}n?e[s]=void 0!==r.param?r.param:!0:delete e[s]}}),t.each(e,function(s,r){e[s]=t.isFunction(r)?r(i):r}),t.each(["minlength","maxlength"],function(){e[this]&&(e[this]=Number(e[this]))}),t.each(["rangelength","range"],function(){var i;e[this]&&(t.isArray(e[this])?e[this]=[Number(e[this][0]),Number(e[this][1])]:"string"==typeof e[this]&&(i=e[this].split(/[\s,]+/),e[this]=[Number(i[0]),Number(i[1])]))}),t.validator.autoCreateRanges&&(e.min&&e.max&&(e.range=[e.min,e.max],delete e.min,delete e.max),e.minlength&&e.maxlength&&(e.rangelength=[e.minlength,e.maxlength],delete e.minlength,delete e.maxlength)),e},normalizeRule:function(e){if("string"==typeof e){var i={};t.each(e.split(/\s/),function(){i[this]=!0}),e=i}return e},addMethod:function(e,i,s){t.validator.methods[e]=i,t.validator.messages[e]=void 0!==s?s:t.validator.messages[e],3>i.length&&t.validator.addClassRules(e,t.validator.normalizeRule(e))},methods:{required:function(e,i,s){if(!this.depend(s,i))return"dependency-mismatch";if("select"===i.nodeName.toLowerCase()){var r=t(i).val();return r&&r.length>0}return this.checkable(i)?this.getLength(e,i)>0:t.trim(e).length>0},email:function(t,e){return this.optional(e)||/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))$/i.test(t)},url:function(t,e){return this.optional(e)||/^(https?|s?ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test(t)},date:function(t,e){return this.optional(e)||!/Invalid|NaN/.test(""+new Date(t))},dateISO:function(t,e){return this.optional(e)||/^\d{4}[\/\-]\d{1,2}[\/\-]\d{1,2}$/.test(t)},number:function(t,e){return this.optional(e)||/^-?(?:\d+|\d{1,3}(?:,\d{3})+)?(?:\.\d+)?$/.test(t)},digits:function(t,e){return this.optional(e)||/^\d+$/.test(t)},creditcard:function(t,e){if(this.optional(e))return"dependency-mismatch";if(/[^0-9 \-]+/.test(t))return!1;var i=0,s=0,r=!1;t=t.replace(/\D/g,"");for(var n=t.length-1;n>=0;n--){var a=t.charAt(n);s=parseInt(a,10),r&&(s*=2)>9&&(s-=9),i+=s,r=!r}return 0===i%10},minlength:function(e,i,s){var r=t.isArray(e)?e.length:this.getLength(t.trim(e),i);return this.optional(i)||r>=s},maxlength:function(e,i,s){var r=t.isArray(e)?e.length:this.getLength(t.trim(e),i);return this.optional(i)||s>=r},rangelength:function(e,i,s){var r=t.isArray(e)?e.length:this.getLength(t.trim(e),i);return this.optional(i)||r>=s[0]&&s[1]>=r},min:function(t,e,i){return this.optional(e)||t>=i},max:function(t,e,i){return this.optional(e)||i>=t},range:function(t,e,i){return this.optional(e)||t>=i[0]&&i[1]>=t},equalTo:function(e,i,s){var r=t(s);return this.settings.onfocusout&&r.unbind(".validate-equalTo").bind("blur.validate-equalTo",function(){t(i).valid()}),e===r.val()},remote:function(e,i,s){if(this.optional(i))return"dependency-mismatch";var r=this.previousValue(i);if(this.settings.messages[i.name]||(this.settings.messages[i.name]={}),r.originalMessage=this.settings.messages[i.name].remote,this.settings.messages[i.name].remote=r.message,s="string"==typeof s&&{url:s}||s,r.old===e)return r.valid;r.old=e;var n=this;this.startRequest(i);var a={};return a[i.name]=e,t.ajax(t.extend(!0,{url:s,mode:"abort",port:"validate"+i.name,dataType:"json",data:a,success:function(s){n.settings.messages[i.name].remote=r.originalMessage;var a=s===!0||"true"===s;if(a){var u=n.formSubmitted;n.prepareElement(i),n.formSubmitted=u,n.successList.push(i),delete n.invalid[i.name],n.showErrors()}else{var o={},l=s||n.defaultMessage(i,"remote");o[i.name]=r.message=t.isFunction(l)?l(e):l,n.invalid[i.name]=!0,n.showErrors(o)}r.valid=a,n.stopRequest(i,a)}},s)),"pending"}}}),t.format=t.validator.format})(jQuery),function(t){var e={};if(t.ajaxPrefilter)t.ajaxPrefilter(function(t,i,s){var r=t.port;"abort"===t.mode&&(e[r]&&e[r].abort(),e[r]=s)});else{var i=t.ajax;t.ajax=function(s){var r=("mode"in s?s:t.ajaxSettings).mode,n=("port"in s?s:t.ajaxSettings).port;return"abort"===r?(e[n]&&e[n].abort(),e[n]=i.apply(this,arguments),e[n]):i.apply(this,arguments)}}}(jQuery),function(t){t.extend(t.fn,{validateDelegate:function(e,i,s){return this.bind(i,function(i){var r=t(i.target);return r.is(e)?s.apply(r,arguments):void 0})}})}(jQuery); ;jQuery.validator.addMethod("CellPhone", function (value, element, params) { var reg = /^[1][358]\d{9}$/; return this.optional(element) || reg.test(value.replace(/\s/ig,"")); }, "例13800138000"); jQuery.validator.addMethod("isTel", function (value) { var tel = /((\d{11})|^((\d{7,8})|(\d{4}|\d{3})-(\d{7,8})|(\d{4}|\d{3})-(\d{7,8})-(\d{4}|\d{3}|\d{2}|\d{1})|(\d{7,8})-(\d{4}|\d{3}|\d{2}|\d{1}))$)/; return value ? tel.test(value) : true; }, "例0757-82345678"); jQuery.validator.addMethod("CkDN", function (value) { var reg = /^([a-zA-Z0-9\u4e00-\u9fa5][-a-zA-Z0-9\u4e00-\u9fa5]{0,62}(\.[a-zA-Z0-9\u4e00-\u9fa5][-a-zA-Z0-9\u4e00-\u9fa5]{0,62})+\.?)/; return value ? reg.test(value) : true; }, "输入域名的域名不正确!");;// END OF /scripts/jQuery/jquery.validate.min.js // STARTS OF /share/jquery.vticker-min.js /* * vertical news ticker * Tadas Juozapaitis ( kasp3rito@gmail.com ) * http://plugins.jquery.com/project/vTicker */ (function (a) { a.fn.vTicker = function (b) { var c = { speed: 700, pause: 4000, showItems: 3, animation: "", mousePause: true, isPaused: false, direction: "up", height: 0 }; var b = a.extend(c, b); moveUp = function (g, d, e) { if (e.isPaused) { return } var f = g.children("ul"); var h = f.children("li:first").clone(true); if (e.height > 0) { d = f.children("li:first").height() } f.animate({ top: "-=" + d + "px" }, e.speed, function () { a(this).children("li:first").remove(); a(this).css("top", "0px") }); if (e.animation == "fade") { f.children("li:first").fadeOut(e.speed); if (e.height == 0) { f.children("li:eq(" + e.showItems + ")").hide().fadeIn(e.speed) } } h.appendTo(f) }; moveDown = function (g, d, e) { if (e.isPaused) { return } var f = g.children("ul"); var h = f.children("li:last").clone(true); if (e.height > 0) { d = f.children("li:first").height() } f.css("top", "-" + d + "px").prepend(h); f.animate({ top: 0 }, e.speed, function () { a(this).children("li:last").remove() }); if (e.animation == "fade") { if (e.height == 0) { f.children("li:eq(" + e.showItems + ")").fadeOut(e.speed) } f.children("li:first").hide().fadeIn(e.speed) } }; return this.each(function () { var f = a(this); var e = 0; f.css({ overflow: "hidden", position: "relative" }).children("ul").css({ position: "absolute", margin: 0, padding: 0 }).children("li").css({ margin: 0, padding: 0 }); if (b.height == 0) { f.children("ul").children("li").each(function () { if (a(this).height() > e) { e = a(this).height() } }); f.children("ul").children("li").each(function () { a(this).height(e) }); f.height(e * b.showItems) } else { f.height(b.height) } var d = setInterval(function () { if (b.direction == "up") { moveUp(f, e, b) } else { moveDown(f, e, b) } }, b.pause); if (b.mousePause) { f.bind("mouseenter", function () { b.isPaused = true }).bind("mouseleave", function () { b.isPaused = false }) } }) } })(jQuery);;// END OF /share/jquery.vticker-min.js // STARTS OF /share/jquery.easyslider-min.js /* * Easy Slider 1.7 - jQuery plugin * written by Alen Grakalic * http://cssglobe.com/post/4004/easy-slider-15-the-easiest-jquery-plugin-for-sliding * * Copyright (c) 2009 Alen Grakalic (http://cssglobe.com) * Dual licensed under the MIT (MIT-LICENSE.txt) * and GPL (GPL-LICENSE.txt) licenses. * * Built for jQuery library * http://jquery.com * */ /* * markup example for $("#slider").easySlider(); * *
* *
* */ (function($) { $.fn.easySlider = function(options){ // default configuration properties var defaults = { prevId: 'prevBtn', prevText: 'Previous', nextId: 'nextBtn', nextText: 'Next', controlsShow: true, controlsBefore: '', controlsAfter: '', controlsFade: true, firstId: 'firstBtn', firstText: 'First', firstShow: false, lastId: 'lastBtn', lastText: 'Last', lastShow: false, vertical: false, speed: 800, auto: false, pause: 2000, continuous: false, numeric: false, numericId: 'controls' }; var options = $.extend(defaults, options); this.each(function() { var obj = $(this); var s = $("li", obj).length; var w = $("li", obj).width(); var h = $("li", obj).height(); var clickable = true; obj.width(w); obj.height(h); obj.css("overflow","hidden"); var ts = s-1; var t = 0; $("ul", obj).css('width',s*w); $("li", obj).css('width',w); if(options.continuous){ $("ul", obj).prepend($("ul li:last-child", obj).clone().css("margin-left","-"+ w +"px")); $("ul", obj).append($("ul li:nth-child(2)", obj).clone()); $("ul", obj).css('width',(s+1)*w); }; if(!options.vertical) $("li", obj).css('float','left'); if(options.controlsShow){ var html = options.controlsBefore; if(options.numeric){ html += '
    '; } else { if(options.firstShow) html += ''+ options.firstText +''; html += ' '+ options.prevText +''; html += ' '+ options.nextText +''; if(options.lastShow) html += ' '+ options.lastText +''; }; html += options.controlsAfter; $(obj).after(html); }; if(options.numeric){ for(var i=0;i'+ (i+1) +'') .appendTo($("#"+ options.numericId)) .click(function(){ animate($("a",$(this)).attr('rel'),true); }); }; } else { $("a","#"+options.nextId).click(function(){ animate("next",true); }); $("a","#"+options.prevId).click(function(){ animate("prev",true); }); $("a","#"+options.firstId).click(function(){ animate("first",true); }); $("a","#"+options.lastId).click(function(){ animate("last",true); }); }; function setCurrent(i){ i = parseInt(i)+1; $("li", "#" + options.numericId).removeClass("current"); $("li#" + options.numericId + i).addClass("current"); }; function adjust(){ if(t>ts) t=0; if(t<0) t=ts; if(!options.vertical) { $("ul",obj).css("margin-left",(t*w*-1)); } else { $("ul",obj).css("margin-left",(t*h*-1)); } clickable = true; if(options.numeric) setCurrent(t); }; function animate(dir,clicked){ if (clickable){ clickable = false; var ot = t; switch(dir){ case "next": t = (ot>=ts) ? (options.continuous ? t+1 : ts) : t+1; break; case "prev": t = (t<=0) ? (options.continuous ? t-1 : 0) : t-1; break; case "first": t = 0; break; case "last": t = ts; break; default: t = dir; break; }; var diff = Math.abs(ot-t); var speed = diff*options.speed; if(!options.vertical) { p = (t*w*-1); $("ul",obj).animate( { marginLeft: p }, { queue:false, duration:speed, complete:adjust } ); } else { p = (t*h*-1); $("ul",obj).animate( { marginTop: p }, { queue:false, duration:speed, complete:adjust } ); }; if(!options.continuous && options.controlsFade){ if(t==ts){ $("a","#"+options.nextId).hide(); $("a","#"+options.lastId).hide(); } else { $("a","#"+options.nextId).show(); $("a","#"+options.lastId).show(); }; if(t==0){ $("a","#"+options.prevId).hide(); $("a","#"+options.firstId).hide(); } else { $("a","#"+options.prevId).show(); $("a","#"+options.firstId).show(); }; }; if(clicked) clearTimeout(timeout); if(options.auto && dir=="next" && !clicked){; timeout = setTimeout(function(){ animate("next",false); },diff*options.speed+options.pause); }; }; }; // init var timeout; if(options.auto){; timeout = setTimeout(function(){ animate("next",false); },options.pause); }; if(options.numeric) setCurrent(0); if(!options.continuous && options.controlsFade){ $("a","#"+options.prevId).hide(); $("a","#"+options.firstId).hide(); }; }); }; })(jQuery); ;// END OF /share/jquery.easyslider-min.js // STARTS OF /scripts/swiper2/js/idangerous.swiper.min.js /* * Swiper 2.7.0 * Mobile touch slider and framework with hardware accelerated transitions * * http://www.idangero.us/sliders/swiper/ * * Copyright 2010-2014, Vladimir Kharlampidi * The iDangero.us * http://www.idangero.us/ * * Licensed under GPL & MIT * * Released on: August 30, 2014 */ var Swiper=function(a,b){"use strict";function c(a,b){return document.querySelectorAll?(b||document).querySelectorAll(a):jQuery(a,b)}function d(a){return"[object Array]"===Object.prototype.toString.apply(a)?!0:!1}function e(){var a=F-I;return b.freeMode&&(a=F-I),b.slidesPerView>C.slides.length&&!b.centeredSlides&&(a=0),0>a&&(a=0),a}function f(){function a(a){var c=new Image;c.onload=function(){"undefined"!=typeof C&&null!==C&&(void 0!==C.imagesLoaded&&C.imagesLoaded++,C.imagesLoaded===C.imagesToLoad.length&&(C.reInit(),b.onImagesReady&&C.fireCallback(b.onImagesReady,C)))},c.src=a}var d=C.h.addEventListener,e="wrapper"===b.eventTarget?C.wrapper:C.container;if(C.browser.ie10||C.browser.ie11?(d(e,C.touchEvents.touchStart,p),d(document,C.touchEvents.touchMove,q),d(document,C.touchEvents.touchEnd,r)):(C.support.touch&&(d(e,"touchstart",p),d(e,"touchmove",q),d(e,"touchend",r)),b.simulateTouch&&(d(e,"mousedown",p),d(document,"mousemove",q),d(document,"mouseup",r))),b.autoResize&&d(window,"resize",C.resizeFix),g(),C._wheelEvent=!1,b.mousewheelControl){if(void 0!==document.onmousewheel&&(C._wheelEvent="mousewheel"),!C._wheelEvent)try{new WheelEvent("wheel"),C._wheelEvent="wheel"}catch(f){}C._wheelEvent||(C._wheelEvent="DOMMouseScroll"),C._wheelEvent&&d(C.container,C._wheelEvent,j)}if(b.keyboardControl&&d(document,"keydown",i),b.updateOnImagesReady){C.imagesToLoad=c("img",C.container);for(var h=0;h=e&&k[0]<=e+g&&k[1]>=f&&k[1]<=f+h&&(c=!0)}if(!c)return}M?((37===b||39===b)&&(a.preventDefault?a.preventDefault():a.returnValue=!1),39===b&&C.swipeNext(),37===b&&C.swipePrev()):((38===b||40===b)&&(a.preventDefault?a.preventDefault():a.returnValue=!1),40===b&&C.swipeNext(),38===b&&C.swipePrev())}}function j(a){var c=C._wheelEvent,d=0;if(a.detail)d=-a.detail;else if("mousewheel"===c)if(b.mousewheelControlForceToAxis)if(M){if(!(Math.abs(a.wheelDeltaX)>Math.abs(a.wheelDeltaY)))return;d=a.wheelDeltaX}else{if(!(Math.abs(a.wheelDeltaY)>Math.abs(a.wheelDeltaX)))return;d=a.wheelDeltaY}else d=a.wheelDelta;else if("DOMMouseScroll"===c)d=-a.detail;else if("wheel"===c)if(b.mousewheelControlForceToAxis)if(M){if(!(Math.abs(a.deltaX)>Math.abs(a.deltaY)))return;d=-a.deltaX}else{if(!(Math.abs(a.deltaY)>Math.abs(a.deltaX)))return;d=-a.deltaY}else d=Math.abs(a.deltaX)>Math.abs(a.deltaY)?-a.deltaX:-a.deltaY;if(b.freeMode){var f=C.getWrapperTranslate()+d;if(f>0&&(f=0),f<-e()&&(f=-e()),C.setWrapperTransition(0),C.setWrapperTranslate(f),C.updateActiveSlide(f),0===f||f===-e())return}else(new Date).getTime()-U>60&&(0>d?C.swipeNext():C.swipePrev()),U=(new Date).getTime();return b.autoplay&&C.stopAutoplay(!0),a.preventDefault?a.preventDefault():a.returnValue=!1,!1}function k(a){C.allowSlideClick&&(m(a),C.fireCallback(b.onSlideClick,C,a))}function l(a){m(a),C.fireCallback(b.onSlideTouch,C,a)}function m(a){if(a.currentTarget)C.clickedSlide=a.currentTarget;else{var c=a.srcElement;do{if(c.className.indexOf(b.slideClass)>-1)break;c=c.parentNode}while(c);C.clickedSlide=c}C.clickedSlideIndex=C.slides.indexOf(C.clickedSlide),C.clickedSlideLoopIndex=C.clickedSlideIndex-(C.loopedSlides||0)}function n(a){return C.allowLinks?void 0:(a.preventDefault?a.preventDefault():a.returnValue=!1,b.preventLinksPropagation&&"stopPropagation"in a&&a.stopPropagation(),!1)}function o(a){return a.stopPropagation?a.stopPropagation():a.returnValue=!1,!1}function p(a){if(b.preventLinks&&(C.allowLinks=!0),C.isTouched||b.onlyExternal)return!1;var c=a.target||a.srcElement;document.activeElement&&document.activeElement!==c&&document.activeElement.blur();var d="input select textarea".split(" ");if(b.noSwiping&&c&&s(c))return!1;if($=!1,C.isTouched=!0,Z="touchstart"===a.type,!Z&&"which"in a&&3===a.which)return!1;if(!Z||1===a.targetTouches.length){C.callPlugins("onTouchStartBegin"),!Z&&!C.isAndroid&&d.indexOf(c.tagName.toLowerCase())<0&&(a.preventDefault?a.preventDefault():a.returnValue=!1);var e=Z?a.targetTouches[0].pageX:a.pageX||a.clientX,f=Z?a.targetTouches[0].pageY:a.pageY||a.clientY;C.touches.startX=C.touches.currentX=e,C.touches.startY=C.touches.currentY=f,C.touches.start=C.touches.current=M?e:f,C.setWrapperTransition(0),C.positions.start=C.positions.current=C.getWrapperTranslate(),C.setWrapperTranslate(C.positions.start),C.times.start=(new Date).getTime(),H=void 0,b.moveStartThreshold>0&&(W=!1),b.onTouchStart&&C.fireCallback(b.onTouchStart,C,a),C.callPlugins("onTouchStartEnd")}}function q(a){if(C.isTouched&&!b.onlyExternal&&(!Z||"mousemove"!==a.type)){var c=Z?a.targetTouches[0].pageX:a.pageX||a.clientX,d=Z?a.targetTouches[0].pageY:a.pageY||a.clientY;if("undefined"==typeof H&&M&&(H=!!(H||Math.abs(d-C.touches.startY)>Math.abs(c-C.touches.startX))),"undefined"!=typeof H||M||(H=!!(H||Math.abs(d-C.touches.startY)C.touches.startX)return}else if(!b.swipeToNext&&dC.touches.startY)return;if(a.assignedToSwiper)return void(C.isTouched=!1);if(a.assignedToSwiper=!0,b.preventLinks&&(C.allowLinks=!1),b.onSlideClick&&(C.allowSlideClick=!1),b.autoplay&&C.stopAutoplay(!0),!Z||1===a.touches.length){if(C.isMoved||(C.callPlugins("onTouchMoveStart"),b.loop&&(C.fixLoop(),C.positions.start=C.getWrapperTranslate()),b.onTouchMoveStart&&C.fireCallback(b.onTouchMoveStart,C)),C.isMoved=!0,a.preventDefault?a.preventDefault():a.returnValue=!1,C.touches.current=M?c:d,C.positions.current=(C.touches.current-C.touches.start)*b.touchRatio+C.positions.start,C.positions.current>0&&b.onResistanceBefore&&C.fireCallback(b.onResistanceBefore,C,C.positions.current),C.positions.current<-e()&&b.onResistanceAfter&&C.fireCallback(b.onResistanceAfter,C,Math.abs(C.positions.current+e())),b.resistance&&"100%"!==b.resistance){var f;if(C.positions.current>0&&(f=1-C.positions.current/I/2,C.positions.current=.5>f?I/2:C.positions.current*f),C.positions.current<-e()){var g=(C.touches.current-C.touches.start)*b.touchRatio+(e()+C.positions.start);f=(I+g)/I;var h=C.positions.current-g*(1-f)/2,i=-e()-I/2;C.positions.current=i>h||0>=f?i:h}}if(b.resistance&&"100%"===b.resistance&&(C.positions.current>0&&(!b.freeMode||b.freeModeFluid)&&(C.positions.current=0),C.positions.current<-e()&&(!b.freeMode||b.freeModeFluid)&&(C.positions.current=-e())),!b.followFinger)return;if(b.moveStartThreshold)if(Math.abs(C.touches.current-C.touches.start)>b.moveStartThreshold||W){if(!W)return W=!0,void(C.touches.start=C.touches.current);C.setWrapperTranslate(C.positions.current)}else C.positions.current=C.positions.start;else C.setWrapperTranslate(C.positions.current);return(b.freeMode||b.watchActiveIndex)&&C.updateActiveSlide(C.positions.current),b.grabCursor&&(C.container.style.cursor="move",C.container.style.cursor="grabbing",C.container.style.cursor="-moz-grabbin",C.container.style.cursor="-webkit-grabbing"),X||(X=C.touches.current),Y||(Y=(new Date).getTime()),C.velocity=(C.touches.current-X)/((new Date).getTime()-Y)/2,Math.abs(C.touches.current-X)<2&&(C.velocity=0),X=C.touches.current,Y=(new Date).getTime(),C.callPlugins("onTouchMoveEnd"),b.onTouchMove&&C.fireCallback(b.onTouchMove,C,a),!1}}}function r(a){if(H&&C.swipeReset(),!b.onlyExternal&&C.isTouched){C.isTouched=!1,b.grabCursor&&(C.container.style.cursor="move",C.container.style.cursor="grab",C.container.style.cursor="-moz-grab",C.container.style.cursor="-webkit-grab"),C.positions.current||0===C.positions.current||(C.positions.current=C.positions.start),b.followFinger&&C.setWrapperTranslate(C.positions.current),C.times.end=(new Date).getTime(),C.touches.diff=C.touches.current-C.touches.start,C.touches.abs=Math.abs(C.touches.diff),C.positions.diff=C.positions.current-C.positions.start,C.positions.abs=Math.abs(C.positions.diff);var c=C.positions.diff,d=C.positions.abs,f=C.times.end-C.times.start;5>d&&300>f&&C.allowLinks===!1&&(b.freeMode||0===d||C.swipeReset(),b.preventLinks&&(C.allowLinks=!0),b.onSlideClick&&(C.allowSlideClick=!0)),setTimeout(function(){"undefined"!=typeof C&&null!==C&&(b.preventLinks&&(C.allowLinks=!0),b.onSlideClick&&(C.allowSlideClick=!0))},100);var g=e();if(!C.isMoved&&b.freeMode)return C.isMoved=!1,b.onTouchEnd&&C.fireCallback(b.onTouchEnd,C,a),void C.callPlugins("onTouchEnd");if(!C.isMoved||C.positions.current>0||C.positions.current<-g)return C.swipeReset(),b.onTouchEnd&&C.fireCallback(b.onTouchEnd,C,a),void C.callPlugins("onTouchEnd");if(C.isMoved=!1,b.freeMode){if(b.freeModeFluid){var h,i=1e3*b.momentumRatio,j=C.velocity*i,k=C.positions.current+j,l=!1,m=20*Math.abs(C.velocity)*b.momentumBounceRatio;-g>k&&(b.momentumBounce&&C.support.transitions?(-m>k+g&&(k=-g-m),h=-g,l=!0,$=!0):k=-g),k>0&&(b.momentumBounce&&C.support.transitions?(k>m&&(k=m),h=0,l=!0,$=!0):k=0),0!==C.velocity&&(i=Math.abs((k-C.positions.current)/C.velocity)),C.setWrapperTranslate(k),C.setWrapperTransition(i),b.momentumBounce&&l&&C.wrapperTransitionEnd(function(){$&&(b.onMomentumBounce&&C.fireCallback(b.onMomentumBounce,C),C.callPlugins("onMomentumBounce"),C.setWrapperTranslate(h),C.setWrapperTransition(300))}),C.updateActiveSlide(k)}return(!b.freeModeFluid||f>=300)&&C.updateActiveSlide(C.positions.current),b.onTouchEnd&&C.fireCallback(b.onTouchEnd,C,a),void C.callPlugins("onTouchEnd")}G=0>c?"toNext":"toPrev","toNext"===G&&300>=f&&(30>d||!b.shortSwipes?C.swipeReset():C.swipeNext(!0)),"toPrev"===G&&300>=f&&(30>d||!b.shortSwipes?C.swipeReset():C.swipePrev(!0));var n=0;if("auto"===b.slidesPerView){for(var o,p=Math.abs(C.getWrapperTranslate()),q=0,r=0;rp){n=o;break}n>I&&(n=I)}else n=E*b.slidesPerView;"toNext"===G&&f>300&&(d>=n*b.longSwipesRatio?C.swipeNext(!0):C.swipeReset()),"toPrev"===G&&f>300&&(d>=n*b.longSwipesRatio?C.swipePrev(!0):C.swipeReset()),b.onTouchEnd&&C.fireCallback(b.onTouchEnd,C,a),C.callPlugins("onTouchEnd")}}function s(a){var c=!1;do a.className.indexOf(b.noSwipingClass)>-1&&(c=!0),a=a.parentElement;while(!c&&a.parentElement&&-1===a.className.indexOf(b.wrapperClass));return!c&&a.className.indexOf(b.wrapperClass)>-1&&a.className.indexOf(b.noSwipingClass)>-1&&(c=!0),c}function t(a,b){var c,d=document.createElement("div");return d.innerHTML=b,c=d.firstChild,c.className+=" "+a,c.outerHTML}function u(a,c,d){function e(){var f=+new Date,l=f-g;h+=i*l/(1e3/60),k="toNext"===j?h>a:a>h,k?(C.setWrapperTranslate(Math.ceil(h)),C._DOMAnimating=!0,window.setTimeout(function(){e()},1e3/60)):(b.onSlideChangeEnd&&("to"===c?d.runCallbacks===!0&&C.fireCallback(b.onSlideChangeEnd,C,j):C.fireCallback(b.onSlideChangeEnd,C,j)),C.setWrapperTranslate(a),C._DOMAnimating=!1)}var f="to"===c&&d.speed>=0?d.speed:b.speed,g=+new Date;if(C.support.transitions||!b.DOMAnimation)C.setWrapperTranslate(a),C.setWrapperTransition(f);else{var h=C.getWrapperTranslate(),i=Math.ceil((a-h)/f*(1e3/60)),j=h>a?"toNext":"toPrev",k="toNext"===j?h>a:a>h;if(C._DOMAnimating)return;e()}C.updateActiveSlide(a),b.onSlideNext&&"next"===c&&C.fireCallback(b.onSlideNext,C,a),b.onSlidePrev&&"prev"===c&&C.fireCallback(b.onSlidePrev,C,a),b.onSlideReset&&"reset"===c&&C.fireCallback(b.onSlideReset,C,a),("next"===c||"prev"===c||"to"===c&&d.runCallbacks===!0)&&v(c)}function v(a){if(C.callPlugins("onSlideChangeStart"),b.onSlideChangeStart)if(b.queueStartCallbacks&&C.support.transitions){if(C._queueStartCallbacks)return;C._queueStartCallbacks=!0,C.fireCallback(b.onSlideChangeStart,C,a),C.wrapperTransitionEnd(function(){C._queueStartCallbacks=!1})}else C.fireCallback(b.onSlideChangeStart,C,a);if(b.onSlideChangeEnd)if(C.support.transitions)if(b.queueEndCallbacks){if(C._queueEndCallbacks)return;C._queueEndCallbacks=!0,C.wrapperTransitionEnd(function(c){C.fireCallback(b.onSlideChangeEnd,c,a)})}else C.wrapperTransitionEnd(function(c){C.fireCallback(b.onSlideChangeEnd,c,a)});else b.DOMAnimation||setTimeout(function(){C.fireCallback(b.onSlideChangeEnd,C,a)},10)}function w(){var a=C.paginationButtons;if(a)for(var b=0;b0&&0===C.slides.length&&C.loadSlides(),b.loop&&C.createLoop(),C.init(),f(),b.pagination&&C.createPagination(!0),b.loop||b.initialSlide>0?C.swipeTo(b.initialSlide,0,!1):C.updateActiveSlide(0),b.autoplay&&C.startAutoplay(),C.centerIndex=C.activeIndex,b.onSwiperCreated&&C.fireCallback(b.onSwiperCreated,C),C.callPlugins("onSwiperCreated")}if(!document.body.outerHTML&&document.body.__defineGetter__&&HTMLElement){var B=HTMLElement.prototype;B.__defineGetter__&&B.__defineGetter__("outerHTML",function(){return(new XMLSerializer).serializeToString(this)})}if(window.getComputedStyle||(window.getComputedStyle=function(a){return this.el=a,this.getPropertyValue=function(b){var c=/(\-([a-z]){1})/g;return"float"===b&&(b="styleFloat"),c.test(b)&&(b=b.replace(c,function(){return arguments[2].toUpperCase()})),a.currentStyle[b]?a.currentStyle[b]:null},this}),Array.prototype.indexOf||(Array.prototype.indexOf=function(a,b){for(var c=b||0,d=this.length;d>c;c++)if(this[c]===a)return c;return-1}),(document.querySelectorAll||window.jQuery)&&"undefined"!=typeof a&&(a.nodeType||0!==c(a).length)){var C=this;C.touches={start:0,startX:0,startY:0,current:0,currentX:0,currentY:0,diff:0,abs:0},C.positions={start:0,abs:0,diff:0,current:0},C.times={start:0,end:0},C.id=(new Date).getTime(),C.container=a.nodeType?a:c(a)[0],C.isTouched=!1,C.isMoved=!1,C.activeIndex=0,C.centerIndex=0,C.activeLoaderIndex=0,C.activeLoopIndex=0,C.previousIndex=null,C.velocity=0,C.snapGrid=[],C.slidesGrid=[],C.imagesToLoad=[],C.imagesLoaded=0,C.wrapperLeft=0,C.wrapperRight=0,C.wrapperTop=0,C.wrapperBottom=0,C.isAndroid=navigator.userAgent.toLowerCase().indexOf("android")>=0;var D,E,F,G,H,I,J={eventTarget:"wrapper",mode:"horizontal",touchRatio:1,speed:300,freeMode:!1,freeModeFluid:!1,momentumRatio:1,momentumBounce:!0,momentumBounceRatio:1,slidesPerView:1,slidesPerGroup:1,slidesPerViewFit:!0,simulateTouch:!0,followFinger:!0,shortSwipes:!0,longSwipesRatio:.5,moveStartThreshold:!1,onlyExternal:!1,createPagination:!0,pagination:!1,paginationElement:"span",paginationClickable:!1,paginationAsRange:!0,resistance:!0,scrollContainer:!1,preventLinks:!0,preventLinksPropagation:!1,noSwiping:!1,noSwipingClass:"swiper-no-swiping",initialSlide:0,keyboardControl:!1,mousewheelControl:!1,mousewheelControlForceToAxis:!1,useCSS3Transforms:!0,autoplay:!1,autoplayDisableOnInteraction:!0,autoplayStopOnLast:!1,loop:!1,loopAdditionalSlides:0,roundLengths:!1,calculateHeight:!1,cssWidthAndHeight:!1,updateOnImagesReady:!0,releaseFormElements:!0,watchActiveIndex:!1,visibilityFullFit:!1,offsetPxBefore:0,offsetPxAfter:0,offsetSlidesBefore:0,offsetSlidesAfter:0,centeredSlides:!1,queueStartCallbacks:!1,queueEndCallbacks:!1,autoResize:!0,resizeReInit:!1,DOMAnimation:!0,loader:{slides:[],slidesHTMLType:"inner",surroundGroups:1,logic:"reload",loadAllSlides:!1},swipeToPrev:!0,swipeToNext:!0,slideElement:"div",slideClass:"swiper-slide",slideActiveClass:"swiper-slide-active",slideVisibleClass:"swiper-slide-visible",slideDuplicateClass:"swiper-slide-duplicate",wrapperClass:"swiper-wrapper",paginationElementClass:"swiper-pagination-switch",paginationActiveClass:"swiper-active-switch",paginationVisibleClass:"swiper-visible-switch"};b=b||{};for(var K in J)if(K in b&&"object"==typeof b[K])for(var L in J[K])L in b[K]||(b[K][L]=J[K][L]);else K in b||(b[K]=J[K]);C.params=b,b.scrollContainer&&(b.freeMode=!0,b.freeModeFluid=!0),b.loop&&(b.resistance="100%");var M="horizontal"===b.mode,N=["mousedown","mousemove","mouseup"];C.browser.ie10&&(N=["MSPointerDown","MSPointerMove","MSPointerUp"]),C.browser.ie11&&(N=["pointerdown","pointermove","pointerup"]),C.touchEvents={touchStart:C.support.touch||!b.simulateTouch?"touchstart":N[0],touchMove:C.support.touch||!b.simulateTouch?"touchmove":N[1],touchEnd:C.support.touch||!b.simulateTouch?"touchend":N[2]};for(var O=C.container.childNodes.length-1;O>=0;O--)if(C.container.childNodes[O].className)for(var P=C.container.childNodes[O].className.split(/\s+/),Q=0;Q=0;c--)a===C.slides[c]&&(b=c);return b},a.isActive=function(){return a.index()===C.activeIndex?!0:!1},a.swiperSlideDataStorage||(a.swiperSlideDataStorage={}),a.getData=function(b){return a.swiperSlideDataStorage[b]},a.setData=function(b,c){return a.swiperSlideDataStorage[b]=c,a},a.data=function(b,c){return"undefined"==typeof c?a.getAttribute("data-"+b):(a.setAttribute("data-"+b,c),a)},a.getWidth=function(b,c){return C.h.getWidth(a,b,c)},a.getHeight=function(b,c){return C.h.getHeight(a,b,c)},a.getOffset=function(){return C.h.getOffset(a)},a},C.calcSlides=function(a){var c=C.slides?C.slides.length:!1;C.slides=[],C.displaySlides=[];for(var d=0;d=0;d--)C._extendSwiperSlide(C.slides[d]);c!==!1&&(c!==C.slides.length||a)&&(h(),g(),C.updateActiveSlide(),C.params.pagination&&C.createPagination(),C.callPlugins("numberOfSlidesChanged"))},C.createSlide=function(a,c,d){c=c||C.params.slideClass,d=d||b.slideElement;var e=document.createElement(d);return e.innerHTML=a||"",e.className=c,C._extendSwiperSlide(e)},C.appendSlide=function(a,b,c){return a?a.nodeType?C._extendSwiperSlide(a).append():C.createSlide(a,b,c).append():void 0},C.prependSlide=function(a,b,c){return a?a.nodeType?C._extendSwiperSlide(a).prepend():C.createSlide(a,b,c).prepend():void 0},C.insertSlideAfter=function(a,b,c,d){return"undefined"==typeof a?!1:b.nodeType?C._extendSwiperSlide(b).insertAfter(a):C.createSlide(b,c,d).insertAfter(a)},C.removeSlide=function(a){if(C.slides[a]){if(b.loop){if(!C.slides[a+C.loopedSlides])return!1;C.slides[a+C.loopedSlides].remove(),C.removeLoopedSlides(),C.calcSlides(),C.createLoop()}else C.slides[a].remove();return!0}return!1},C.removeLastSlide=function(){return C.slides.length>0?(b.loop?(C.slides[C.slides.length-1-C.loopedSlides].remove(),C.removeLoopedSlides(),C.calcSlides(),C.createLoop()):C.slides[C.slides.length-1].remove(),!0):!1},C.removeAllSlides=function(){for(var a=C.slides.length-1;a>=0;a--)C.slides[a].remove()},C.getSlide=function(a){return C.slides[a]},C.getLastSlide=function(){return C.slides[C.slides.length-1]},C.getFirstSlide=function(){return C.slides[0]},C.activeSlide=function(){return C.slides[C.activeIndex]},C.fireCallback=function(){var a=arguments[0];if("[object Array]"===Object.prototype.toString.call(a))for(var c=0;c0&&(m.style.paddingLeft="",m.style.paddingRight="",m.style.paddingTop="",m.style.paddingBottom=""),m.style.width="",m.style.height="",b.offsetPxBefore>0&&(M?C.wrapperLeft=b.offsetPxBefore:C.wrapperTop=b.offsetPxBefore),b.offsetPxAfter>0&&(M?C.wrapperRight=b.offsetPxAfter:C.wrapperBottom=b.offsetPxAfter),b.centeredSlides&&(M?(C.wrapperLeft=(I-this.slides[0].getWidth(!0,b.roundLengths))/2,C.wrapperRight=(I-C.slides[C.slides.length-1].getWidth(!0,b.roundLengths))/2):(C.wrapperTop=(I-C.slides[0].getHeight(!0,b.roundLengths))/2,C.wrapperBottom=(I-C.slides[C.slides.length-1].getHeight(!0,b.roundLengths))/2)),M?(C.wrapperLeft>=0&&(m.style.paddingLeft=C.wrapperLeft+"px"),C.wrapperRight>=0&&(m.style.paddingRight=C.wrapperRight+"px")):(C.wrapperTop>=0&&(m.style.paddingTop=C.wrapperTop+"px"),C.wrapperBottom>=0&&(m.style.paddingBottom=C.wrapperBottom+"px")),k=0;var p=0;for(C.snapGrid=[],C.slidesGrid=[],h=0,l=0;lI){if(b.slidesPerViewFit)C.snapGrid.push(k+C.wrapperLeft),C.snapGrid.push(k+q-I+C.wrapperLeft);else for(var u=0;u<=Math.floor(q/(I+C.wrapperLeft));u++)C.snapGrid.push(0===u?k+C.wrapperLeft:k+C.wrapperLeft+I*u);C.slidesGrid.push(k+C.wrapperLeft)}else C.snapGrid.push(p),C.slidesGrid.push(p);p+=q/2+t/2}else{if(q>I)if(b.slidesPerViewFit)C.snapGrid.push(k),C.snapGrid.push(k+q-I);else if(0!==I)for(var v=0;v<=Math.floor(q/I);v++)C.snapGrid.push(k+I*v);else C.snapGrid.push(k);else C.snapGrid.push(k);C.slidesGrid.push(k)}k+=q,n+=f,o+=g}b.calculateHeight&&(C.height=h),M?(F=n+C.wrapperRight+C.wrapperLeft,m.style.width=n+"px",m.style.height=C.height+"px"):(F=o+C.wrapperTop+C.wrapperBottom,m.style.width=C.width+"px",m.style.height=o+"px")}else if(b.scrollContainer)m.style.width="",m.style.height="",i=C.slides[0].getWidth(!0,b.roundLengths),j=C.slides[0].getHeight(!0,b.roundLengths),F=M?i:j,m.style.width=i+"px",m.style.height=j+"px",E=M?i:j;else{if(b.calculateHeight){for(h=0,j=0,M||(C.container.style.height=""),m.style.height="",l=0;l0&&(M?C.wrapperLeft=E*b.offsetSlidesBefore:C.wrapperTop=E*b.offsetSlidesBefore),b.offsetSlidesAfter>0&&(M?C.wrapperRight=E*b.offsetSlidesAfter:C.wrapperBottom=E*b.offsetSlidesAfter),b.offsetPxBefore>0&&(M?C.wrapperLeft=b.offsetPxBefore:C.wrapperTop=b.offsetPxBefore),b.offsetPxAfter>0&&(M?C.wrapperRight=b.offsetPxAfter:C.wrapperBottom=b.offsetPxAfter),b.centeredSlides&&(M?(C.wrapperLeft=(I-E)/2,C.wrapperRight=(I-E)/2):(C.wrapperTop=(I-E)/2,C.wrapperBottom=(I-E)/2)),M?(C.wrapperLeft>0&&(m.style.paddingLeft=C.wrapperLeft+"px"),C.wrapperRight>0&&(m.style.paddingRight=C.wrapperRight+"px")):(C.wrapperTop>0&&(m.style.paddingTop=C.wrapperTop+"px"),C.wrapperBottom>0&&(m.style.paddingBottom=C.wrapperBottom+"px")),F=M?i+C.wrapperRight+C.wrapperLeft:j+C.wrapperTop+C.wrapperBottom,parseFloat(i)>0&&(!b.cssWidthAndHeight||"height"===b.cssWidthAndHeight)&&(m.style.width=i+"px"),parseFloat(j)>0&&(!b.cssWidthAndHeight||"width"===b.cssWidthAndHeight)&&(m.style.height=j+"px"),k=0,C.snapGrid=[],C.slidesGrid=[],l=0;l0&&(!b.cssWidthAndHeight||"height"===b.cssWidthAndHeight)&&(C.slides[l].style.width=f+"px"),parseFloat(g)>0&&(!b.cssWidthAndHeight||"width"===b.cssWidthAndHeight)&&(C.slides[l].style.height=g+"px")}C.initialized?(C.callPlugins("onInit"),b.onInit&&C.fireCallback(b.onInit,C)):(C.callPlugins("onFirstInit"),b.onFirstInit&&C.fireCallback(b.onFirstInit,C)),C.initialized=!0}},C.reInit=function(a){C.init(!0,a)},C.resizeFix=function(a){C.callPlugins("beforeResizeFix"),C.init(b.resizeReInit||a),b.freeMode?C.getWrapperTranslate()<-e()&&(C.setWrapperTransition(0),C.setWrapperTranslate(-e())):(C.swipeTo(b.loop?C.activeLoopIndex:C.activeIndex,0,!1),b.autoplay&&(C.support.transitions&&"undefined"!=typeof _?"undefined"!=typeof _&&(clearTimeout(_),_=void 0,C.startAutoplay()):"undefined"!=typeof ab&&(clearInterval(ab),ab=void 0,C.startAutoplay()))),C.callPlugins("afterResizeFix")},C.destroy=function(){var a=C.h.removeEventListener,c="wrapper"===b.eventTarget?C.wrapper:C.container;C.browser.ie10||C.browser.ie11?(a(c,C.touchEvents.touchStart,p),a(document,C.touchEvents.touchMove,q),a(document,C.touchEvents.touchEnd,r)):(C.support.touch&&(a(c,"touchstart",p),a(c,"touchmove",q),a(c,"touchend",r)),b.simulateTouch&&(a(c,"mousedown",p),a(document,"mousemove",q),a(document,"mouseup",r))),b.autoResize&&a(window,"resize",C.resizeFix),h(),b.paginationClickable&&w(),b.mousewheelControl&&C._wheelEvent&&a(C.container,C._wheelEvent,j),b.keyboardControl&&a(document,"keydown",i),b.autoplay&&C.stopAutoplay(),C.callPlugins("onDestroy"),C=null},C.disableKeyboardControl=function(){b.keyboardControl=!1,C.h.removeEventListener(document,"keydown",i)},C.enableKeyboardControl=function(){b.keyboardControl=!0,C.h.addEventListener(document,"keydown",i)};var U=(new Date).getTime();if(C.disableMousewheelControl=function(){return C._wheelEvent?(b.mousewheelControl=!1,C.h.removeEventListener(C.container,C._wheelEvent,j),!0):!1},C.enableMousewheelControl=function(){return C._wheelEvent?(b.mousewheelControl=!0,C.h.addEventListener(C.container,C._wheelEvent,j),!0):!1},b.grabCursor){var V=C.container.style;V.cursor="move",V.cursor="grab",V.cursor="-moz-grab",V.cursor="-webkit-grab"}C.allowSlideClick=!0,C.allowLinks=!0;var W,X,Y,Z=!1,$=!0;C.swipeNext=function(a){!a&&b.loop&&C.fixLoop(),!a&&b.autoplay&&C.stopAutoplay(!0),C.callPlugins("onSwipeNext");var c=C.getWrapperTranslate(),d=c;if("auto"===b.slidesPerView){for(var f=0;f=C.snapGrid[f]&&-cC.snapGrid[e]&&-d0&&(c=0),c===d?!1:(u(c,"prev"),!0)},C.swipeReset=function(){C.callPlugins("onSwipeReset");{var a,c=C.getWrapperTranslate(),d=E*b.slidesPerGroup;-e()}if("auto"===b.slidesPerView){a=0;for(var f=0;f=C.snapGrid[f]&&-c0?-C.snapGrid[f+1]:-C.snapGrid[f];break}}-c>=C.snapGrid[C.snapGrid.length-1]&&(a=-C.snapGrid[C.snapGrid.length-1]),c<=-e()&&(a=-e())}else a=0>c?Math.round(c/d)*d:0,c<=-e()&&(a=-e());return b.scrollContainer&&(a=0>c?c:0),a<-e()&&(a=-e()),b.scrollContainer&&I>E&&(a=0),a===c?!1:(u(a,"reset"),!0)},C.swipeTo=function(a,c,d){a=parseInt(a,10),C.callPlugins("onSwipeTo",{index:a,speed:c}),b.loop&&(a+=C.loopedSlides);var f=C.getWrapperTranslate();if(!(a>C.slides.length-1||0>a)){var g;return g="auto"===b.slidesPerView?-C.slidesGrid[a]:-a*E,g<-e()&&(g=-e()),g===f?!1:(d=d===!1?!1:!0,u(g,"to",{index:a,speed:c,runCallbacks:d}),!0)}},C._queueStartCallbacks=!1,C._queueEndCallbacks=!1,C.updateActiveSlide=function(a){if(C.initialized&&0!==C.slides.length){C.previousIndex=C.activeIndex,"undefined"==typeof a&&(a=C.getWrapperTranslate()),a>0&&(a=0);var c;if("auto"===b.slidesPerView){if(C.activeIndex=C.slidesGrid.indexOf(-a),C.activeIndex<0){for(c=0;cC.slidesGrid[c]&&-a=d?c:c+1}}else C.activeIndex=Math[b.visibilityFullFit?"ceil":"round"](-a/E);if(C.activeIndex===C.slides.length&&(C.activeIndex=C.slides.length-1),C.activeIndex<0&&(C.activeIndex=0),C.slides[C.activeIndex]){if(C.calcVisibleSlides(a),C.support.classList){var f;for(c=0;c=0?f.classList.add(b.slideVisibleClass):f.classList.remove(b.slideVisibleClass);C.slides[C.activeIndex].classList.add(b.slideActiveClass)}else{var g=new RegExp("\\s*"+b.slideActiveClass),h=new RegExp("\\s*"+b.slideVisibleClass);for(c=0;c=0&&(C.slides[c].className+=" "+b.slideVisibleClass);C.slides[C.activeIndex].className+=" "+b.slideActiveClass}if(b.loop){var i=C.loopedSlides;C.activeLoopIndex=C.activeIndex-i,C.activeLoopIndex>=C.slides.length-2*i&&(C.activeLoopIndex=C.slides.length-2*i-C.activeLoopIndex),C.activeLoopIndex<0&&(C.activeLoopIndex=C.slides.length-2*i+C.activeLoopIndex),C.activeLoopIndex<0&&(C.activeLoopIndex=0) }else C.activeLoopIndex=C.activeIndex;b.pagination&&C.updatePagination(a)}}},C.createPagination=function(a){if(b.paginationClickable&&C.paginationButtons&&w(),C.paginationContainer=b.pagination.nodeType?b.pagination:c(b.pagination)[0],b.createPagination){var d="",e=C.slides.length,f=e;b.loop&&(f-=2*C.loopedSlides);for(var g=0;f>g;g++)d+="<"+b.paginationElement+' class="'+b.paginationElementClass+'">";C.paginationContainer.innerHTML=d}C.paginationButtons=c("."+b.paginationElementClass,C.paginationContainer),a||C.updatePagination(),C.callPlugins("onCreatePagination"),b.paginationClickable&&x()},C.updatePagination=function(a){if(b.pagination&&!(C.slides.length<1)){var d=c("."+b.paginationActiveClass,C.paginationContainer);if(d){var e=C.paginationButtons;if(0!==e.length){for(var f=0;fj&&(j=C.slides.length-2*C.loopedSlides+j),b.loop&&j>=C.slides.length-2*C.loopedSlides&&(j=C.slides.length-2*C.loopedSlides-j,j=Math.abs(j)),i.push(j)}for(h=0;h0&&(a+=C.wrapperLeft),!M&&C.wrapperTop>0&&(a+=C.wrapperTop);for(var g=0;g=-a&&-a+I>=f&&(h=!0),-a>=d&&f>=-a+I&&(h=!0)):(f>-a&&-a+I>=f&&(h=!0),d>=-a&&-a+I>d&&(h=!0),-a>d&&f>-a+I&&(h=!0)),h&&c.push(C.slides[g])}0===c.length&&(c=[C.slides[C.activeIndex]]),C.visibleSlides=c};var _,ab;C.startAutoplay=function(){if(C.support.transitions){if("undefined"!=typeof _)return!1;if(!b.autoplay)return;C.callPlugins("onAutoplayStart"),b.onAutoplayStart&&C.fireCallback(b.onAutoplayStart,C),z()}else{if("undefined"!=typeof ab)return!1;if(!b.autoplay)return;C.callPlugins("onAutoplayStart"),b.onAutoplayStart&&C.fireCallback(b.onAutoplayStart,C),ab=setInterval(function(){b.loop?(C.fixLoop(),C.swipeNext(!0)):C.swipeNext(!0)||(b.autoplayStopOnLast?(clearInterval(ab),ab=void 0):C.swipeTo(0))},b.autoplay)}},C.stopAutoplay=function(a){if(C.support.transitions){if(!_)return;_&&clearTimeout(_),_=void 0,a&&!b.autoplayDisableOnInteraction&&C.wrapperTransitionEnd(function(){z()}),C.callPlugins("onAutoplayStop"),b.onAutoplayStop&&C.fireCallback(b.onAutoplayStop,C)}else ab&&clearInterval(ab),ab=void 0,C.callPlugins("onAutoplayStop"),b.onAutoplayStop&&C.fireCallback(b.onAutoplayStop,C)},C.loopCreated=!1,C.removeLoopedSlides=function(){if(C.loopCreated)for(var a=0;aC.slides.length&&(C.loopedSlides=C.slides.length);var a,c="",d="",e="",f=C.slides.length,g=Math.floor(C.loopedSlides/f),h=C.loopedSlides%f;for(a=0;g*f>a;a++){var i=a;if(a>=f){var j=Math.floor(a/f);i=a-f*j}e+=C.slides[i].outerHTML}for(a=0;h>a;a++)d+=t(b.slideDuplicateClass,C.slides[a].outerHTML);for(a=f-h;f>a;a++)c+=t(b.slideDuplicateClass,C.slides[a].outerHTML);var k=c+e+D.innerHTML+e+d;for(D.innerHTML=k,C.loopCreated=!0,C.calcSlides(),a=0;a=C.slides.length-C.loopedSlides)&&C.slides[a].setData("looped",!0);C.callPlugins("onCreateLoop")}},C.fixLoop=function(){var a;C.activeIndex=2*C.loopedSlides||C.activeIndex>C.slides.length-2*b.slidesPerView)&&(a=-C.slides.length+C.activeIndex+C.loopedSlides,C.swipeTo(a,0,!1))},C.loadSlides=function(){var a="";C.activeLoaderIndex=0;for(var c=b.loader.slides,d=b.loader.loadAllSlides?c.length:b.slidesPerView*(1+b.loader.surroundGroups),e=0;d>e;e++)a+="outer"===b.loader.slidesHTMLType?c[e]:"<"+b.slideElement+' class="'+b.slideClass+'" data-swiperindex="'+e+'">'+c[e]+"";C.wrapper.innerHTML=a,C.calcSlides(!0),b.loader.loadAllSlides||C.wrapperTransitionEnd(C.reloadSlides,!0)},C.reloadSlides=function(){var a=b.loader.slides,c=parseInt(C.activeSlide().data("swiperindex"),10);if(!(0>c||c>a.length-1)){C.activeLoaderIndex=c;var d=Math.max(0,c-b.slidesPerView*b.loader.surroundGroups),e=Math.min(c+b.slidesPerView*(1+b.loader.surroundGroups)-1,a.length-1);if(c>0){var f=-E*(c-d);C.setWrapperTranslate(f),C.setWrapperTransition(0)}var g;if("reload"===b.loader.logic){C.wrapper.innerHTML="";var h="";for(g=d;e>=g;g++)h+="outer"===b.loader.slidesHTMLType?a[g]:"<"+b.slideElement+' class="'+b.slideClass+'" data-swiperindex="'+g+'">'+a[g]+"";C.wrapper.innerHTML=h}else{var i=1e3,j=0;for(g=0;gk||k>e?C.wrapper.removeChild(C.slides[g]):(i=Math.min(k,i),j=Math.max(k,j))}for(g=d;e>=g;g++){var l;i>g&&(l=document.createElement(b.slideElement),l.className=b.slideClass,l.setAttribute("data-swiperindex",g),l.innerHTML=a[g],C.wrapper.insertBefore(l,C.wrapper.firstChild)),g>j&&(l=document.createElement(b.slideElement),l.className=b.slideClass,l.setAttribute("data-swiperindex",g),l.innerHTML=a[g],C.wrapper.appendChild(l))}}C.reInit(!0)}},A()}};Swiper.prototype={plugins:{},wrapperTransitionEnd:function(a,b){"use strict";function c(h){if(h.target===f&&(a(e),e.params.queueEndCallbacks&&(e._queueEndCallbacks=!1),!b))for(d=0;d0||0>e)&&(e=a.offsetWidth-parseFloat(window.getComputedStyle(a,null).getPropertyValue("padding-left"))-parseFloat(window.getComputedStyle(a,null).getPropertyValue("padding-right"))),b&&(e+=parseFloat(window.getComputedStyle(a,null).getPropertyValue("padding-left"))+parseFloat(window.getComputedStyle(a,null).getPropertyValue("padding-right"))),c?Math.ceil(e):e},getHeight:function(a,b,c){"use strict";if(b)return a.offsetHeight;var d=window.getComputedStyle(a,null).getPropertyValue("height"),e=parseFloat(d);return(isNaN(e)||d.indexOf("%")>0||0>e)&&(e=a.offsetHeight-parseFloat(window.getComputedStyle(a,null).getPropertyValue("padding-top"))-parseFloat(window.getComputedStyle(a,null).getPropertyValue("padding-bottom"))),b&&(e+=parseFloat(window.getComputedStyle(a,null).getPropertyValue("padding-top"))+parseFloat(window.getComputedStyle(a,null).getPropertyValue("padding-bottom"))),c?Math.ceil(e):e},getOffset:function(a){"use strict";var b=a.getBoundingClientRect(),c=document.body,d=a.clientTop||c.clientTop||0,e=a.clientLeft||c.clientLeft||0,f=window.pageYOffset||a.scrollTop,g=window.pageXOffset||a.scrollLeft;return document.documentElement&&!window.pageYOffset&&(f=document.documentElement.scrollTop,g=document.documentElement.scrollLeft),{top:b.top+f-d,left:b.left+g-e}},windowWidth:function(){"use strict";return window.innerWidth?window.innerWidth:document.documentElement&&document.documentElement.clientWidth?document.documentElement.clientWidth:void 0},windowHeight:function(){"use strict";return window.innerHeight?window.innerHeight:document.documentElement&&document.documentElement.clientHeight?document.documentElement.clientHeight:void 0},windowScroll:function(){"use strict";return"undefined"!=typeof pageYOffset?{left:window.pageXOffset,top:window.pageYOffset}:document.documentElement?{left:document.documentElement.scrollLeft,top:document.documentElement.scrollTop}:void 0},addEventListener:function(a,b,c,d){"use strict";"undefined"==typeof d&&(d=!1),a.addEventListener?a.addEventListener(b,c,d):a.attachEvent&&a.attachEvent("on"+b,c)},removeEventListener:function(a,b,c,d){"use strict";"undefined"==typeof d&&(d=!1),a.removeEventListener?a.removeEventListener(b,c,d):a.detachEvent&&a.detachEvent("on"+b,c)}},setTransform:function(a,b){"use strict";var c=a.style;c.webkitTransform=c.MsTransform=c.msTransform=c.MozTransform=c.OTransform=c.transform=b},setTranslate:function(a,b){"use strict";var c=a.style,d={x:b.x||0,y:b.y||0,z:b.z||0},e=this.support.transforms3d?"translate3d("+d.x+"px,"+d.y+"px,"+d.z+"px)":"translate("+d.x+"px,"+d.y+"px)";c.webkitTransform=c.MsTransform=c.msTransform=c.MozTransform=c.OTransform=c.transform=e,this.support.transforms||(c.left=d.x+"px",c.top=d.y+"px")},setTransition:function(a,b){"use strict";var c=a.style;c.webkitTransitionDuration=c.MsTransitionDuration=c.msTransitionDuration=c.MozTransitionDuration=c.OTransitionDuration=c.transitionDuration=b+"ms"},support:{touch:window.Modernizr&&Modernizr.touch===!0||function(){"use strict";return!!("ontouchstart"in window||window.DocumentTouch&&document instanceof DocumentTouch)}(),transforms3d:window.Modernizr&&Modernizr.csstransforms3d===!0||function(){"use strict";var a=document.createElement("div").style;return"webkitPerspective"in a||"MozPerspective"in a||"OPerspective"in a||"MsPerspective"in a||"perspective"in a}(),transforms:window.Modernizr&&Modernizr.csstransforms===!0||function(){"use strict";var a=document.createElement("div").style;return"transform"in a||"WebkitTransform"in a||"MozTransform"in a||"msTransform"in a||"MsTransform"in a||"OTransform"in a}(),transitions:window.Modernizr&&Modernizr.csstransitions===!0||function(){"use strict";var a=document.createElement("div").style;return"transition"in a||"WebkitTransition"in a||"MozTransition"in a||"msTransition"in a||"MsTransition"in a||"OTransition"in a}(),classList:function(){"use strict";var a=document.createElement("div");return"classList"in a}()},browser:{ie8:function(){"use strict";var a=-1;if("Microsoft Internet Explorer"===navigator.appName){var b=navigator.userAgent,c=new RegExp(/MSIE ([0-9]{1,}[\.0-9]{0,})/);null!==c.exec(b)&&(a=parseFloat(RegExp.$1))}return-1!==a&&9>a}(),ie10:window.navigator.msPointerEnabled,ie11:window.navigator.pointerEnabled}},(window.jQuery||window.Zepto)&&!function(a){"use strict";a.fn.swiper=function(b){var c;return this.each(function(d){var e=a(this);if(!e.data("swiper")){var f=new Swiper(e[0],b);d||(c=f),e.data("swiper",f)}}),c}}(window.jQuery||window.Zepto),"undefined"!=typeof module&&(module.exports=Swiper),"function"==typeof define&&define.amd&&define([],function(){"use strict";return Swiper});;// END OF /scripts/swiper2/js/idangerous.swiper.min.js // STARTS OF /scripts/swiper.animate/swiper.animate1.0.2.min.js //本插件由www.swiper.com.cn提供 function swiperAnimateCache(){for(allBoxes=window.document.documentElement.querySelectorAll(".ani"),i=0;i]+>/gi, ''); } function numberCeil(num, digit) { digit = parseInt(digit); if (isNaN(digit)) { digit = 0; } if (digit < 0) throw Exception('digit must be greater or equal than 0'); var scale = 1; for (var i = 0; i < digit; i++) { scale *= 10; } return Math.ceil(num * scale) / scale; } //重载 setTimeout var _st = window.setTimeout; window.setTimeoutEx = function(fRef, mDelay) { if(typeof(fRef) == 'function') { var argu = Array.prototype.slice.call(arguments,2); var f = (function(){ fRef.apply(null, argu);}); return _st(f, mDelay); } return _st(fRef,mDelay); } // end of 重载 setTimeout //重载 setInterval var _setInterval = window.setInterval; window.setIntervalEx = function(fRef, mDelay) { if(typeof(fRef) == 'function') { var argu = Array.prototype.slice.call(arguments,2); var f = (function(){ fRef.apply(null, argu);}); return _setInterval(f, mDelay); } return _setInterval(fRef,mDelay); } // end of 重载 setInterval /* Cookie 相关函数 */ function getCookieVal(offset) { var endstr = document.cookie.indexOf (";", offset); if (endstr == -1) endstr = document.cookie.length; return unescape(document.cookie.substring(offset, endstr)); } function getCookie(name) { var arg = name + "="; var alen = arg.length; var clen = document.cookie.length; var i = 0; while (i < clen) { var j = i + alen; if (document.cookie.substring(i, j) == arg) return getCookieVal (j); i = document.cookie.indexOf(" ", i) + 1; if (i == 0) break; } return null; } function SetCookie(name, value) { var argv = SetCookie.arguments; var argc = SetCookie.arguments.length; var expires = (2 < argc) ? argv[2] : null; var path = (3 < argc) ? argv[3] : null; var domain = (4 < argc) ? argv[4] : null; var secure = (5 < argc) ? argv[5] : false; document.cookie = name + "=" + escape(value) + ((expires == null) ? "" : (typeof expires === "number" ? "; max-age=" + expires : "; expires=" + expires.toGMTString())) + ((path == null) ? "" : ("; path=" + path)) + ((domain == null) ? "" : ("; domain=" + domain)) + ((secure == true) ? "; secure" : ""); } if(typeof setCookie == 'undefined') setCookie = SetCookie; /* var expdate = new Date(); expdate.setTime(expdate.getTime() + (24 * 60 * 60 * 1000 * 365)); //一年后过期 SetCookie("WebTongCid", WebTongCid, expdate ,"/"); */ //** end of Cookie 相关函数 if(typeof(formatColorHex) == 'undefined'){ function formatColorHex(color) { var reg = /^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/; /*RGB颜色转换为16进制*/ if (/^(rgb)/i.test(color)) { var aColor = color.replace(/(?:\(|\)|rgb)*/gi, "").split(","); var strHex = "#"; for (var i = 0; i < aColor.length; i++) { var hex = Number(aColor[i]).toString(16); if (hex.length == 1) { hex = "0" + hex; } //问题出在这里 if (hex === "0") { hex += hex; } strHex += hex; } if (strHex.length !== 7) { strHex = color; } return strHex; } else if (reg.test(color)) { var aNum = color.replace(/#/, "").split(""); if (aNum.length === 6) { return color; } else if (aNum.length === 3) { var numHex = "#"; for (var i = 0; i < aNum.length; i += 1) { numHex += (aNum[i] + aNum[i]); } return numHex; } } else { return color; } } } //动态加载 jscript window.addedScript = {}; function addScript(path,callback,afterPageLoaded) { if(window.addedScript[path]){ if(window.addedScript[path]== -1 && typeof callback == 'function'){ setTimeout(function(){addScript(path,callback,afterPageLoaded)},50); return; } if(window.addedScript[path] == 1){ console.log(path + " have already loaded "); if (typeof callback == 'function') callback(); return; } } window.addedScript[path] = -1; var addfun = function(){ var fileref = document.createElement("script") fileref.type = "text/javascript"; fileref.src = path; if (typeof fileref.onload != 'undefined') { fileref.onload = function(){ window.addedScript[path] = 1; if (typeof callback == 'function') callback(); }; } else { fileref.onreadystatechange = function () { if (this.readyState == "loaded" || this.readyState == "complete") { window.addedScript[path] = 1; if (typeof callback == 'function') callback(); } }; } var headobj = document.getElementsByTagName('head')[0]; headobj.appendChild(fileref); }; if(afterPageLoaded){ if(window.addEventListener) window.addEventListener('load', function(){ addfun(); }, false); else window.attachEvent('onload', function(){ addfun(); }); }else addfun(); } //动态加载一大波 jscript,保证按顺序加载 function addScripts(paths, callback, afterPageLoaded) { paths = paths || []; var lastCb = callback; for (var i = 0; i < paths.length; i++) { lastCb = (function () { var path = paths[paths.length - 1 - i]; var cb = lastCb; var afterPageLoaded1 = afterPageLoaded; return function () { addScript(path, cb, afterPageLoaded1); } })(i); } lastCb(); } window.addedCss = {}; function loadStyleSheet(path,afterPageLoaded){ if(window.addedCss[path]){ console.log(path + " have already loaded "); return; } if(afterPageLoaded) $(window).load(function(){ $('').appendTo('head'); }); else $('').appendTo('head'); window.addedCss[path] = true; } (function ($) { $.fn.extend({ "addrSelector":function(options){ var defaults = { loadDefaultAddr: null, selectAddr: $.noop, createNewAddr: $.noop, selectedAddrID: 0, isShowIdCardNo: false, isManagePage:false//是不是地址管理页面 by hui }; var opts = $.extend({}, defaults, options); return this.each(function () { if (typeof opts.loadDefaultAddr == 'function') { $.getJSON('/index.php?c=front/Useraddr&a=GetDefaultAddr', {}, function (json) { if (!json.success) { alert(json.msg); return; } opts.loadDefaultAddr(json.addr); if (json && json.addr && !isNaN(Number(json.addr.ID)) && parseInt(json.addr.ID) > 0) { opts.selectedAddrID = parseInt(json.addr.ID); } }); } if(opts.isManagePage){ getUserAddrList(opts); }else{ $(this).off('click.showAddrSelector').on('click.showAddrSelector', function () { getUserAddrList(opts); }) } }); } }); var getUserAddrList = function(opts){ if ($('#userAddrContent').length == 0) { $.extend({ selectAddr: function (addr) { if (typeof opts.selectAddr == 'function') opts.selectAddr(addr); }, createNewAddr: function (addr) { if (typeof opts.createNewAddr == 'function') opts.createNewAddr(addr); }, selectedAddrID: opts.selectedAddrID, isShowIdCardNo: opts.isShowIdCardNo, isManagePage:opts.isManagePage }); $.ajax({ type: 'get', url: '/index.php?c=front/Useraddr', dataType: 'html', success: function (msg) { $(msg).hide().appendTo('body'); $('#userAddrContent').stop().fadeIn(); }, error: function (XMLHttpRequest, textStatus, errorThrown) { alert(XMLHttpRequest.responseText); } }) } else { // $('#userAddrContent .addrList .addr .selectbtn').css('display','none'); // $('#userAddrContent .addrList .addr[addrID=' + $.selectedAddrID + '] .selectbtn').css('display','inline-block'); $('#userAddrContent .addrList .addr .select-status').hide(); $('#userAddrContent .addrList .addr[addrID=' + $.selectedAddrID + '] .select-status').show(); $('#userAddrContent').stop().fadeIn(); } }; })(window.jQuery); (function ($) { $.fn.extend({ "districtSeletor": function (options) { if (options == 'setValue') { dataBind(arguments[1] || {}, this); return this; } else { return this.each(function () { var opts = $.extend({}, defaults, options); var $this = $(this); var sHtml = ''; sHtml = '' sHtml += ''; sHtml += ''; sHtml += ''; sHtml += ''; $this.html(sHtml).addClass('districtSelector')//.attr('relid=' + relid); if (opts.showCountry) { $this.find('.level1').show(); } else { $this.find('.level1').hide(); } $this.find('.level1').on('change', function () { if ($(this).val() == 1) { $(this).nextAll('select').show(); getNextLevelList(this); } else { $(this).nextAll('select').hide(); } }) $this.find('.level2, .level3').on('change', function () { getNextLevelList(this); }); dataBind(opts, $this); }); } } }); var defaults = { countryID: 1, provinceID: null, cityID: null, districtID: null, showCountry: 1 }; var getNextLevelList = function (selectElem) { selectElem = $(selectElem); var id = parseInt(selectElem.val()); if (isNaN(id)) return; var level = parseInt(selectElem.attr('level')); selectElem.nextAll('select').html(''); if (id <= 0) return; $.ajax({ type: 'get', url: '/index.php?c=front/district&a=getChildrenList', data: { act: 'getChildrenList', id: id }, async: false, dataType: 'json', success: function (json) { if (!json.success) { alert(json.msg); return; } var targetSelectElem = selectElem.nextAll('.level' + (level + 1)); var list = json.list || []; for (var i = 0; i < list.length; i++) { targetSelectElem.append(''); } if (list.length == 0) { targetSelectElem.hide(); targetSelectElem.nextAll('.level' + (level + 2)).hide(); targetSelectElem.nextAll('.level' + (level + 3)).hide(); } else { targetSelectElem.show(); targetSelectElem.nextAll('.level' + (level + 2)).show(); targetSelectElem.nextAll('.level' + (level + 3)).show(); } }, error: function (XMLHttpRequest, textStatus, errorThrown) { alert(XMLHttpRequest.responseText); } }) }; var dataBind = function (opts, $this) { if (opts.countryID && parseInt(opts.countryID) > 0) { $this.find('.level1').val(opts.countryID).change(); } else { $this.find('.level1').val(-1).change(); } if (opts.provinceID && parseInt(opts.provinceID) > 0) { $this.find('.level2').val(opts.provinceID).change(); } if (opts.cityID && parseInt(opts.cityID) > 0) { $this.find('.level3').val(opts.cityID).change(); } if (opts.districtID && parseInt(opts.districtID) > 0) { $this.find('.level4').val(opts.districtID).change(); } }; $.fn.districtSeletor.setValue = function (opts) { dataBind(opts); } })(window.jQuery); // 获取当前页面url参数 if (!window.location.getQueryString) window.location.getQueryString = function (name) { var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i"); var r = window.location.search.substr(1).match(reg); if (r != null) return (r[2]); return null; };// END OF /share/global.js // STARTS OF /share/floaters.js var floaters_delta = 0.15 var floaters_collection; var floaters_timer = null; var floaters_timer2 = null; if(typeof(floaters) == 'undefined'){ function floaters() { this.items = []; this.addItem = function(id,x,y,content) { if($('#'+id).length > 0){ m = $('#'+id);m.css({'position':'absolute','z-index':'4001','left':(typeof(x)=='string'?eval(x):x)+'px','top':(typeof(y)=='string'?eval(y):y)+'px'}); this.replace(m[0]); } else $("body").append('
    '+content+'
    '); var found = false; for(var i in this.items){ if($(this.items[i].object).attr('id') == id){ this.items[i].x = x; this.items[i].y = y; found = true;break; } } if(!found){ var newItem = {}; newItem.object = document.getElementById(id); newItem.x = x; newItem.y = y; this.items[this.items.length] = newItem; } } this.play = function() { if(this.floaters_timer2 != null){ alert('floaters play2 与 play 冲突');return;} floaters_collection = this.items; if(this.floaters_timer == null) this.floaters_timer = setInterval('floaters_play()',20); } this.remove = function(id){ var newitems = []; for(var i in this.items){ if($(this.items[i].object).attr('id') != id){ newitems.push(this.items[i]); } } this.items = newitems; floaters_collection = this.items; } this.replace = function(obj){ for(var i in this.items){ if($(this.items[i].object).attr('id') == $(obj).attr('id')){ this.items[i].object = obj; } } } // 新的用这个 this.addItem2 = function(options,action) { if(action == 'remove'){ this.remove(options.floaterID); return; } if($('#'+options.floaterID).length > 0){ m = $('#'+options.floaterID);m.css({'position':'absolute','z-index':'4001','left':options.distance_from_page_x+'px','top':options.distance_from_page_y+'px'}); this.replace(m[0]); } else $("body").append('
    '+options.content+'
    '); var found = false; for(var i in this.items){ if($(this.items[i].object).attr('id') == options.floaterID){ for(var key in options){ this.items[i][key] = options[key]; } found = true;break; } } if(!found){ var newItem = options || {}; newItem.object = document.getElementById(options.floaterID); this.items[this.items.length] = newItem } return $('#' + options.floaterID); } this.play2 = function() { if(this.floaters_timer != null){ alert('floaters play 与 play2 冲突');return;} floaters_collection = this.items if(this.floaters_timer2 == null) this.floaters_timer2 = setInterval('floaters_play2()',20); } this.stop = function(){ clearInterval(floaters_timer); clearInterval(floaters_timer2); } } function floaters_play() { for(var i = 0;i < floaters_collection.length;i++) { var followObj = floaters_collection[i].object; if($(followObj).attr("float-disabled") == "true") continue; var followObj_x = (typeof(floaters_collection[i].x) == 'string' ? eval(floaters_collection[i].x):floaters_collection[i].x); var followObj_y = (typeof(floaters_collection[i].y) == 'string' ? eval(floaters_collection[i].y):floaters_collection[i].y); // 用了某些DOCTYPE 后 ie document.body.scrollTop,document.body.scrollLeft 始终为0,所以这里兼容一下 var scrollLeft = document.body.scrollLeft; if (scrollLeft == 0 && document.documentElement.scrollLeft > 0) { scrollLeft = document.documentElement.scrollLeft; } var scrollTop = document.body.scrollTop; if (scrollTop == 0 && document.documentElement.scrollTop > 0) { scrollTop = document.documentElement.scrollTop; } if (followObj.offsetLeft != (scrollLeft + followObj_x)) { var dx = (scrollLeft + followObj_x - followObj.offsetLeft) * floaters_delta; dx = (dx > 0 ? 1 : -1) * Math.ceil(Math.abs(dx)); followObj.style.left = followObj.offsetLeft + dx + "px"; } if (followObj.offsetTop != (scrollTop + followObj_y)) { var dy = (scrollTop + followObj_y - followObj.offsetTop) * floaters_delta; dy = (dy > 0 ? 1 : -1) * Math.ceil(Math.abs(dy)); followObj.style.top = followObj.offsetTop + dy + "px"; } //followObj.style.display = ''; } } // 浮动层滚动效果增强版,浮动框必须为绝对定位,并且是body必须是子级 function floaters_play2(){ //处理在线客服的 for(var i = 0;i < floaters_collection.length;i++) { if($(floaters_collection[i].object).attr('id') == 'IMPanel'){ if((SiteType == 1 && $(window).width() < 993) || typeof frames['pageframe'] != 'undefined'){ floaters_collection[i].object.style.display = 'none'; return; }else floaters_collection[i].object.style.display = 'block'; } } var defaults = { floaterID: 0, content: '', xFloat: 'left', // left, right, null, 表示选择距视窗左还是距右计算,null表示不计算 yFloat: 'top', // top, bottom, null, 表示选择距视窗上还是距下计算,null表示不计算 // 下面这四个值大于等于0,根据xFloat和yFloat来选择性传 distanceFromPageTop: 0, distanceFromPageBottom: 0, distanceFromPageLeft: 0, distanceFromPageRight: 0 }; for(var i = 0;i < floaters_collection.length;i++) { options = $.extend(true, defaults, floaters_collection[i]); var followObj = floaters_collection[i].object; if($(followObj).attr("float-disabled") == "true") continue; //float-disabled是在拖动浮动模块(/scripts/jQPlugins/YouDraggable.js)的地方设置的,是为了避免在拖动中模块浮动 var curLeft = $(followObj).offset().left; var targetLeft = 0; if(options.xFloat == 'left'){ targetLeft = $(window).scrollLeft() + options.distanceFromPageLeft; }else if(options.xFloat == 'right'){ targetLeft = $(window).scrollLeft() + $(window).width() - $(followObj).outerWidth() - options.distanceFromPageRight; }else{ targetLeft = curLeft; } var scrollDistanceX = (targetLeft - curLeft) * floaters_delta; var curTop = $(followObj).offset().top; var targetTop = 0; if(options.yFloat == 'top'){ targetTop = $(window).scrollTop() + options.distanceFromPageTop; }else if(options.yFloat == 'bottom'){ targetTop = $(window).scrollTop() + $(window).height() - $(followObj).outerHeight() - options.distanceFromPageBottom; }else{ targetTop = curTop; } var scrollDistanceY = (targetTop - curTop) * floaters_delta; $(followObj).css({ 'left': curLeft + scrollDistanceX, 'top': curTop + scrollDistanceY }); } } } // 创建在线客服浮动框 function createOnlineService(options){ var onlineim = new floaters(); $('head').append(''); var floaterID = 'IMPanel'; if(options.style == 20){ var floaterElem = null; if(options.location == "1") { // 靠右浮动 floaterElem = onlineim.addItem2({ floaterID: floaterID, content: options.content, xFloat: 'right', yFloat: 'top', distanceFromPageTop: 100, 'distanceFromPageRight':0 }); floaterElem.children().addClass('right'); floaterElem.css({'left': $(window).width() - 228, 'top': 100}); } else{ // 靠左浮动 floaterElem = onlineim.addItem2({ floaterID: floaterID, content: options.content, xFloat: 'left', yFloat: 'top', distanceFromPageTop: 100, 'distanceFromPageLeft':0 }); floaterElem.children().addClass('left'); floaterElem.css({'left': 0,'top': 100}); } floaterElem.find('.online-service-toggle-btn').off().on('click', function(){ var state = $(this).attr('state') || 0; // 0: 显示主体 , 1:隐藏主体 var location = floaterElem.children().hasClass('left') ? 'left' : 'right'; if(location == 'left'){ if(state == 1){ $(this).attr('state', 0); var self = this; floaterElem.children().removeClass('out'); floaterElem.find('.online-service-header').show(); floaterElem.find('.online-service-content').show(); $(self).css("left","209px"); floaterElem.stop().animate({'left': 0}, function(){ $(self).removeClass('right').addClass('left'); floaterElem.attr("float-disabled",'false'); }); }else{ $(this).attr('state', 1); var self = this; floaterElem.find('.online-service-toggle-btn').css('top', floaterElem.outerHeight() / 2); floaterElem.attr("float-disabled",'true'); floaterElem.stop().animate({'left': -floaterElem.outerWidth()}, function(){ floaterElem.children().addClass('out'); $(self).removeClass('left').addClass('right'); floaterElem.find('.online-service-header').hide(); floaterElem.find('.online-service-content').hide(); $(self).css("left","0px"); floaterElem.attr("float-disabled",'false'); }); } }else{ if(state == 1){ $(this).attr('state', 0); var self = this; floaterElem.children().removeClass('out'); floaterElem.stop().animate({'left': $(window).width() - floaterElem.outerWidth()}, function(){ $(self).removeClass('left').addClass('right'); }); }else{ $(this).attr('state', 1); var self = this; floaterElem.find('.online-service-toggle-btn').css('top', floaterElem.outerHeight() / 2); floaterElem.stop().animate({'left': $(window).width() - (parseFloat($(self).css('border-left-width')) || 0)}, function(){ floaterElem.children().addClass('out'); $(self).removeClass('right').addClass('left'); }); } } }); floaterElem.find('.online-service-header-close').off().on('click', function(){ floaterElem.find('.online-service-toggle-btn').click(); }); onlineim.play2(); } else if(options.style == 21){ var floaterElem = null; if(options.location == "1") { // 靠右浮动 floaterElem = onlineim.addItem2({ floaterID: floaterID, content: options.content, xFloat: 'right', yFloat: 'top', distanceFromPageTop: 100, distanceFromPageRight: 20 }); floaterElem.children().addClass('right'); floaterElem.css({'left': $(window).width() - 228 - 50, 'top': 100}); } else{ // 靠左浮动 floaterElem = onlineim.addItem2({ floaterID: floaterID, content: options.content, xFloat: 'left', yFloat: 'top', distanceFromPageTop: 100, distanceFromPageLeft: 20 }); floaterElem.children().addClass('left'); floaterElem.css({'left': 20,'top': 100}); } floaterElem.find('.online-service-header-close').off().on('click', function(){ floaterElem.remove(); }); onlineim.play2(); } else if(options.style == 22 || options.style == 23){ var floaterElem = $(options.content).attr('id', floaterID).appendTo('body'); var location = options.location; if(location == '1'){ floaterElem.addClass('right'); }else{ floaterElem.addClass('left'); } floaterElem.find('.online-service-btn').off('mouseenter').on('mouseenter', function(){ if(typeof onlineService2Timeout != 'undefined'){ clearTimeout(onlineService2Timeout); } var targetPanel = $(this).attr('target'); floaterElem.find('.online-service-content').show(); floaterElem.find('.online-service-content').children().not('[about=' + targetPanel + ']').hide(); floaterElem.find('.online-service-content').children('[about=' + targetPanel + ']').show(); }); floaterElem.find('.online-service-content').off('mouseenter').on('mouseenter', function(){ if(typeof onlineService2Timeout != 'undefined'){ clearTimeout(onlineService2Timeout); } }); floaterElem.find('.online-service-btn, .online-service-content').off('mouseleave').on('mouseleave', function(){ onlineService2Timeout = setTimeout(function(){ floaterElem.find('.online-service-content').hide(); }, 300); }); if(SiteType == "1" && $(window).width() < 993) floaterElem.css('display','none'); $(window).resize(function(){ if(SiteType == "1" && $(window).width() < 993) floaterElem.css('display','none'); else floaterElem.css('display','block'); }); setInterval(function(){ if(typeof frames['pageframe'] != 'undefined') floaterElem.css('display','none'); //保证编辑框架下不显示 },5); } };// END OF /share/floaters.js // STARTS OF /share/JScript.js $(function () { if(getCookie("SiteType") == "1"){ $(window).resize(function(e){ if(e.target === window){ showhideNav(); setTimeout(function(){moduleImageTextHide();},20); computeFreeModulePosition(); computeJiuGondHeight(); } }); $(window).load(function(){showhideNav();computeFreeModulePosition();}); setTimeout(function(){moduleImageTextHide();},20); } $(window).load(function(){initHoverAnimate();}); doSomeWhanPreview(); keepFullScreenModules100Width(); //广告 if($("#ChargeTips").height()){ $("body > .ModuleItem").each(function(i,item){ $(item).css("top",parseInt($(item).css("top")) + $("#ChargeTips").height()); }); } setMobileNav(); matchNavAndFootNavBgColor(); setModuleCls(); NewsList(); TopNewLoad(); BindPagerAction(); //接管模块的分页链接,用ajax请求 SetImageWidth(); setZonePadding(); var $container = $('.masonry-container'); if ($container.length > 0) { $container.imagesLoaded(function () { $container.masonry({ columnWidth: '.productItem', itemSelector: '.productItem' }); }); } }); function isMobileBroswer() { var sUserAgent = navigator.userAgent.toLowerCase(); var bIsIpad = sUserAgent.match(/ipad/i) == "ipad"; var bIsIphoneOs = sUserAgent.match(/iphone os/i) == "iphone os"; var bIsMidp = sUserAgent.match(/midp/i) == "midp"; var bIsUc7 = sUserAgent.match(/rv:1.2.3.4/i) == "rv:1.2.3.4"; var bIsUc = sUserAgent.match(/ucweb/i) == "ucweb"; var bIsAndroid = sUserAgent.match(/android/i) == "android"; var bIsCE = sUserAgent.match(/windows ce/i) == "windows ce"; var bIsWM = sUserAgent.match(/windows mobile/i) == "windows mobile"; var bIsWeixin = sUserAgent.match(/micromessenger/i) == "micromessenger"; if (bIsIpad || bIsIphoneOs || bIsMidp || bIsUc7 || bIsUc || bIsAndroid || bIsCE || bIsWM || bIsWeixin) { return true; } else { return false; } } function setZonePadding(){ if($("#BodyLeftZone").length > 0 && $("#BodyLeftZone").css("display") != "none") $("#BodyMain1Zone,#BodyMain2Zone,#BodyMain3Zone,#BodyMain4Zone").css({"padding-left":"3px"}); else $("#BodyMain1Zone,#BodyMain2Zone,#BodyMain3Zone,#BodyMain4Zone").css({"padding-left":"0px"}); if($("#BodyRightZone").length > 0 && $("#BodyRightZone").css("display") != "none") $("#BodyMain1Zone,#BodyMain2Zone,#BodyMain3Zone,#BodyMain4Zone").css({"padding-right":"3px"}); else $("#BodyMain1Zone,#BodyMain2Zone,#BodyMain3Zone,#BodyMain4Zone").css({"padding-right":"0px"}); if(typeof CanDesign != 'undefined' && CanDesign == "True" && SiteType == "0") setTimeout(setZonePadding,300); } function hasAbsoluteObj(){ var flag = false; if(SiteType == "1"){ $("#BodyHeaderZone,#BodyMain1Zone,#BodyFooterZone").find(".ModuleItem:visible").each(function(i,item){ if($(item).css("position") == "absolute"){ flag = true; } }); } return flag; } // 详情页面重新计算区域高度 function computeZoneHeight(zoneElem) { var oZone = $(zoneElem); resizeZone(oZone); if (oZone.find(".ModuleProductDetail, .ModuleNewsDetail, .ModuleDownDetail").length > 0) { $(zoneElem).find('img').each(function () { this.onload = function () { resizeZone(oZone); } }); } if (!oZone.hasClass('ModuleTabsContent')){ setTimeout(function () { resizeZone(zoneElem) }, 500); setTimeout(function () { resizeZone(zoneElem) }, 1000); setTimeout(function () { resizeZone(zoneElem) }, 2000); setTimeout(function () { resizeZone(zoneElem) }, 4000); } } //h5 计算自由模块的横坐标 function zoneHasAbsoluteObj(zone){ var hasAbsolute = false; $(zone).find(".ModuleItem:visible").each(function(i,item){ if($(item).css("position") == "absolute"){ hasAbsolute = true; } }); return hasAbsolute; } function computeFreeModulePosition(module){ if(SiteType != "1") return; window.nodelayimg = true; //H5站混合静态和自由模块时,不能使用图片延时加载,因为图片延时加载会改变页面的高度 if(module){ var m = null; if(typeof module == 'object') m = $(module); else m = $('#' + module); var parent = m.closest("#HeaderZone,#FooterZone,#BodyMain1Zone"); if($(window).width() > 993){ if(m.attr('float') == 'free'){ var helperid = 'freemodulehelper'; var helper = $("#"+helperid); var left = helper.offset().left + parseInt(m.attr('floatx')); m.css({'visibility':'visible','display':'block','left':left+"px"}); } m.parent().find('.ModuleGridContainer').each(function(i,grid){ $(grid).css('min-width',$(grid).css('max-width')); }); //处理产品列表模块的响应横版PAD的功能 m.parent().find('.productsBox').each(function(i,prolist){ for(var k=1;k<11;k++){$(prolist).removeClass('col-md-'+k);$(prolist).removeClass('col-sm-'+k);$(prolist).removeClass('col-xs-'+k);} $(prolist).addClass('col-xs-'+$(prolist).attr('pc-col')); }); computeZoneHeight(parent); }else{ m.css({'visibility':'hidden','display':'none'}); if(!zoneHasAbsoluteObj(parent)) parent.css("height","auto"); m.parent().find('.ModuleGridContainer').each(function(i,grid){ $(grid).css('min-width','0'); }); } }else{ var modules = $(".ModuleItem[float=free]"); $.each(modules,function(i,item){ computeFreeModulePosition(item); }); } } function resizeZone(oZone) { var iZoneHeight = 0; //var padscale = isPad(); oZone.children('.ModuleItem:visible').each(function () { iZoneHeight = Math.max(iZoneHeight, $(this).outerHeight(false) + $(this).position().top); }); oZone.css('height',iZoneHeight); if(getCookie("SiteType") == "1" && !zoneHasAbsoluteObj(oZone)){ $(oZone).css('height', 'auto'); } } //让图片根据上级容器的尺寸自动适应大小 function resizeImage(imgo){ var img = new Image(); img.src = $(imgo).prop('src'); // 按比例缩放,原图小于外框不操作 var bw = $(imgo).parent().width(); var bh = $(imgo).parent().height(); var ow = img.width; var oh = img.height; var nw, nh; if(ow > bw || oh > bh){ if(ow / oh >= bw / bh){ nw = bw; nh = nw * oh / ow; }else if(ow / oh < bw / bh){ nh = bh; nw = nh * ow / oh; } }else{ nw = ow; nh = oh; } $(imgo).width(nw); $(imgo).height(nh); $(imgo).css({'margin-top': (bh - $(imgo).outerHeight(false)) / 2 + 'px' }); } function SetImageWidth() { if (SiteType == "1") { $("img").each(function () { if ($(this).closest('.ModuleNewsDetail').length > 0 || $(this).closest('.ModuleJiuGong,.ModuleJiuGongV2').length > 0) return true; // $(this).css('max-width', '100%'); }); $('.goods-detail-content table').each(function () { if ($(this).width() > $("#pagebody").width()) { $(this).css('width', '100%'); } }); } $("img").each(function () { if ($(this).closest('.ModuleNewsDetail').length > 0 || $(this).hasClass('vCodeImg')) return true; if ($(this).width() > $("#pagebody").width() && $("#pagebody").length > 0) { var oldh = $(this).height(); var oldw = $(this).width(); try { var offsetp = $(this).closest(".ModuleItem").offset().left; var offset = $(this).offset().left; var offsetx = offset - offsetp; if (offsetx < 0) offsetx = 0; } catch (e) { } var w = parseInt($("#pagebody").width() * 0.95) - offsetx; var h = parseInt(oldh / (oldw / w)); if(SiteType == 0) $(this).css({ "width": w, "height": h }); } if ($(this).closest('.PIMG').length == 0) { $(this).prop("src", $(this).attr("src")); $(this).on('load', function () { if ($(this).width > $("#pagebody").width()) { var oldh = $(this).height(); var oldw = $(this).width(); try { var offsetp = $(this).closest(".ModuleItem").offset().left; var offset = $(this).offset().left; var offsetx = offset - offsetp; if (offsetx < 0) offsetx = 0; } catch (e) { } var w = parseInt($("#pagebody").width() * 0.95) - offsetx; var h = parseInt(oldh / (oldw / w)); $(this).css({ "width": w, "height": h }); } }); } }); } function showhideNav(){ if($("#MobileFootNav").attr("enable") == 1 && $("#pagebody").width() >= 1200 || $("#MobileFootNav").attr("enable") == 1 && ($("#pagebody").width() >= 975 && $("#pagebody").width() < 1200)){ $('#MobileFootNav,#MobileFootNavRenderElem').hide(); }else if($("#MobileFootNav").attr("enable") == 1 && ($("#pagebody").width() >= 751 && $("#pagebody").width() < 975) || $("#MobileFootNav").attr("enable") == 1 && $("#pagebody").width() < 751){ $('#MobileFootNav,#MobileFootNavRenderElem').show(); }else if($("#MobileFootNav").attr("enable") == 0 && $("#pagebody").width() >= 1200 || $("#MobileFootNav").attr("enable") == 0 && ($("#pagebody").width() >= 975 && $("#pagebody").width() < 1200) || $("#MobileFootNav").attr("enable") == 0 && ($("#pagebody").width() >= 751 && $("#pagebody").width() < 975) || $("#MobileFootNav").attr("enable") == 0 && $("#pagebody").width() < 751){ $('#MobileFootNav,#MobileFootNavRenderElem').hide(); } if ($("#MobileNav").attr("enable") == 1 && $("#pagebody").width() >= 1200 || $("#MobileNav").attr("enable") == 1 && ($("#pagebody").width() >= 975 && $("#pagebody").width() < 1200)) { $('#MobileNav,#MobileNavRenderElem,#MobileNavFloatLayer,#MobileNavMask').hide(); $('#pagebody').css("left", "0rem"); $("#MobileFootNav").removeClass("showFloatNav"); } else if($("#MobileNav").attr("enable") == 1 && ($("#pagebody").width() >= 751 && $("#pagebody").width() < 975) || $("#MobileNav").attr("enable") == 1 && $("#pagebody").width() < 740){ $('#MobileNav,#MobileNavRenderElem,#MobileNavFloatLayer,#MobileNavMask').show(); if($("#MobileNav").attr("navnum") == 4 || $("#MobileNav").attr("navnum") == 6 || $("#MobileNav").attr("navnum") == 7){ $('#MobileNavRenderElem').hide(); }else{ $('#MobileNavRenderElem').show(); } if($("#MobileNavFloatLayer").hasClass("showFloatNav") == false){ $('#pagebody').css("left", "0rem"); $("#MobileFootNav").removeClass("showFloatNav"); }else{ if($("#MobileNav").attr("navnum") == 5){ $('#pagebody').css("left", "6.25rem"); $("#MobileFootNav").addClass("showFloatNav"); }else if($("#MobileNav").attr("navnum") == 1){ $('#pagebody').css("left", "10rem"); $("#MobileFootNav").addClass("showFloatNav"); } } } else if($("#MobileNav").attr("enable") == 0 && $("#pagebody").width() > 1200 || $("#MobileNav").attr("enable") == 0 && ($("#pagebody").width() >= 975 && $("#pagebody").width() < 1200) || $("#MobileNav").attr("enable") == 0 && ($("#pagebody").width() >= 751 && $("#pagebody").width() < 975) || $("#MobileNav").attr("enable") == 0 && $("#pagebody").width() < 740){ $('#MobileNav,#MobileNavRenderElem,#MobileNavFloatLayer,#MobileNavMask').hide(); } if($('#MobileNav').attr('navnum') == 4){ if($("#pagebody").width() < 740){ $('#MobileNavFloatLayer').css("left","18.9%") }else if($("#pagebody").width() > 500 && $("#pagebody").width() <= 751){ $('#MobileNavFloatLayer').css("left","13%") }else if($("#pagebody").width() > 751 && $("#pagebody").width() <= 975){ $('#MobileNavFloatLayer').css("left","11.5%") }else{ $('#MobileNavFloatLayer').css("left","8%") } } if($("#pagebody").width() > 768){ $(".FootNavMask,.FootNavQRCodeImg,.QQList").hide(); $(".goods-btn").show(); }else{ $(".FootNavMask,.FootNavQRCodeImg,.QQList").show(); $(".goods-btn").hide(); } if($("#MobileFootNav").length > 0){ if($("#MobileFootNav").is(":hidden")){ $('#pagebody').css('padding-bottom',"0") }else{ $('#pagebody').css('padding-bottom',$("#MobileFootNav").height()); } } $(".FootNavQRCodeImg").css({ "width": "192px", "height": "192px", "top": "initial", "bottom": $('#MobileFootNav').innerHeight(), "left": ($('body').outerWidth() / 2 - $(".FootNavQRCodeImg").outerWidth() / 2) }); } function TopNewLoad() { $(".TopNews").each(function () { var repNum = Number($(this).attr("lang")); var iWidth = ($(this).width() / repNum) - (repNum * 10); //($(this).find("li").width() / repNum) - (repNum * 10); $(this).find("li>span").css({ "width": iWidth + "px", "margin-right": "8px" }); $(this).find("li").each(function () { if ($(this).children("span").toArray().length > 1) { $(this).children("span").last().css({ "margin-right": "0px", "float": "right" }); } }); }); } function NewsList() { $(".BodyCenterNews").each(function () { var repNum = parseInt($(this).attr("RepeatNum")) > 0 ? parseInt($(this).attr("RepeatNum")) : 1; var iWidth = ($(this).find("li").width() / repNum) - (repNum * 9); $(this).find("i").css({ /*"width": iWidth + "px",*/"margin-right": "5px", "overflow": "hidden" }); $(this).find("li").each(function () { if ($(this).children("i").length > 1) { $(this).children("i").last().css({ "margin-right": "0px", "float": "right" }); } }); if ($(this).attr("value") !== "") { var itemHeight = $(this).find(".vTicker").find("li").height(); var iHeight = $(this).find(".vTicker>ul").height(); var showItems = parseInt(iHeight / itemHeight); $(this).find(".vTicker").vTicker({ speed: 500, pause: 3000, direction: $(this).attr("value"), mousePause: true, showItems: showItems }).css({ "height": iHeight + "px" }).find("li").css({ "padding": "0 5px" }); } }); } function ProductList() { $(".ModuleProductList").each(function () { if ($(this).find(".myslider").attr("value") !== "") { $(this).find(".myslider").easySlider({ auto: true, continuous: true, vertical: false, controlsShow: false }); } }); } function SetProductListImage(module,sitetype) { if(typeof(module) != "object") module = $('#module_' + module); module.find('.PIMG>img').each(function () { var src = $(this).attr("src"); $(this).attr("src", ''); $(this).on('load', function () { resizeProductListImageSize(this); }); $(this).attr("src", src); }); initProductListEffect(module, sitetype); } function resizeProductListImageSize(img) { $(img).css({'width':'auto','height':'auto'}); //先清除图片的高宽 var picWrapper = $(img).closest('.PicWrapper'); var imgParent = $(img).parent(); var imgp_pl = parseFloat(imgParent.css('padding-left') ? imgParent.css('padding-left') : 0); var imgp_pr = parseFloat(imgParent.css('padding-right') ? imgParent.css('padding-right') : 0); var imgp_pt = parseFloat(imgParent.css('padding-top') ? imgParent.css('padding-top') : 0); var imgp_pb = parseFloat(imgParent.css('padding-bottom') ? imgParent.css('padding-bottom') : 0); var imgp_bl = parseFloat(imgParent.css('border-left') ? imgParent.css('border-left') : 0); var imgp_br = parseFloat(imgParent.css('border-right') ? imgParent.css('border-right') : 0); var imgp_bt = parseFloat(imgParent.css('border-top') ? imgParent.css('border-top') : 0); var imgp_bb = parseFloat(imgParent.css('border-bottom') ? imgParent.css('border-bottom') : 0); var bw = picWrapper.innerWidth() - imgp_pl - imgp_pr - imgp_bl - imgp_br; var bh = picWrapper.innerHeight() - imgp_pt - imgp_pb - imgp_bt - imgp_bb; var ow = img.width; var oh = img.height; var nw, nh; if (ow > bw || oh > bh) { if (ow / oh >= bw / bh) { nw = bw; nh = nw * oh / ow; } else if (ow / oh < bw / bh) { nh = bh; nw = nh * ow / oh; } } else { nw = ow; nh = oh; } $(img).css({ width: nw + 'px', height: nh + 'px' }); $(img).css({ 'margin-top': (bh - $(img).outerHeight(false)) / 2 + 'px' }); if ($(img).parent().css('text-align').toLowerCase() != 'center') { $(img).css({ 'margin-left': (bw - $(img).outerWidth(false)) / 2 + 'px' }); } } function initProductListEffect(module, sitetype) { if(typeof(module) != "object") module = $('#module_' + module); var oProductList = $(module).find('.ProductList'); var showstyle = oProductList.attr('showstyle'); var direction = oProductList.attr('direction'); var countPerGroup = oProductList.attr('repeatnum'); if(CanDesign == "True" && showstyle > 0){ module.resize(function(){ if(module.css("position") != 'absolute') oProductList.parent().css({'position': 'relative',overflow: 'hidden','width':module.width()+"px"});}); } if (sitetype == 1) { // 修复手机下,描述文字不确定导致".PDetail"高度不齐的的bug if(!module.attr("haschangedetail")){ iRepeatnum = parseFloat(oProductList.attr('repeatnum')); if (iRepeatnum == 0 || showstyle == 1 || showstyle == 2) { var iMaxHeight = 0; module.find('.PDetail').each(function () { iMaxHeight = Math.max(iMaxHeight, $(this).height()); }) module.find('.PDetail').css('height', iMaxHeight); } else { var iTotalLine = Math.ceil(module.find('.PDetail').length / iRepeatnum); var oPDetails = module.find('.PDetail'); for (var i = 0; i < iTotalLine; i++) { var iMaxHeight = 0; oPDetails.each(function (j) { if (i * iRepeatnum <= j && j < (i + 1) * iRepeatnum) { iMaxHeight = Math.max(iMaxHeight, $(this).height()); } }) oPDetails.slice(i * iRepeatnum, (i + 1) * iRepeatnum).css('height', iMaxHeight); } } module.attr("haschangedetail","1"); } } if (window['effectInterval_' + module.attr('id')]) { clearInterval(window['effectInterval_' + module.attr('id')]); } if (module.length > 0) { if (showstyle == 1) { // 连续滚动 var oProductBoxes = oProductList.children('.ProductBox').css({ float: 'left' }); if (sitetype == 1) { oProductList.find('center').css('display', 'inline-block'); // 手机实际width通常是带小数的,但jquery所有方法返回宽度都是向下取的整数,所以为了计算准确,+1px oProductBoxes.css({ width: 'auto' }).css({ width: oProductBoxes.width() + 1 }); } var listWidth = module.width(); oProductList.parent().css({'position': 'relative',overflow: 'hidden','width':module.width()+"px"}); var iWidth = oProductBoxes.outerWidth(true) * oProductBoxes.length * 2; var iHeight = oProductBoxes.outerHeight(true); oProductList.css({ position: 'relative', left: '0px', width: iWidth + 'px', height: iHeight + 'px', overflow: 'hidden' }); if (module.width() > iWidth) return; if(module.attr('hasinit')!=1){ oProductList.append(oProductList.clone(true).children()); module.attr('hasinit',1); }; var iRefreshInterval = 40; var iStep = 1; if(window['effectInterval_' + module.attr('id')]){ clearInterval(window['effectInterval_' + module.attr('id')]) } window['effectInterval_' + module.attr('id')] = setInterval(function () { if (oProductList.attr('ishovering') == 1 && oProductList.attr('hoverstop') == 1) { return; } if (direction == 'left') { if (oProductList.position().left <= -oProductList.innerWidth() / 2) { oProductList.css('left', (oProductList.position().left + oProductList.innerWidth() / 2) + 'px'); } oProductList.css('left', (oProductList.position().left - parseInt(oProductList.parent().css('padding-left')) - iStep) + 'px'); } else { if (oProductList.position().left >= 0) { oProductList.css('left', (-oProductList.innerWidth() / 2) + 'px'); } oProductList.css('left', (oProductList.position().left - parseInt(oProductList.parent().css('padding-left')) + iStep) + 'px'); } }, iRefreshInterval); } else if (showstyle == 2) { // 一屏屏滚动 var oProductBoxes = module.find('.ProductBox'); var iGroupCount = Math.ceil(oProductBoxes.length / countPerGroup); for (var i = 0; i < iGroupCount; i++) { $(oProductBoxes.slice(i * countPerGroup, i * countPerGroup + countPerGroup)).wrapAll('
    '); } if (sitetype == 1) { oProductBoxes.css({ width: 'auto', height: 'auto', padding: '2px' }); } oProductList.parent().css({'position': 'relative',overflow: 'hidden','width':module.width()+"px"}); var oProductGroups = module.find('.ProductGroup'); if(!oProductGroups.parent().is('.ProductGroupList')){ oProductGroups.wrapAll('
    '); } var oProductGroupList = module.find('.ProductGroupList'); if(module.css("position") != "absolute"){ iHeight = $(oProductBoxes[0]).height();} oProductGroupList.css({ position: 'relative', top: '0px', width: module.innerWidth() * iGroupCount + 'px', overflow: 'hidden' }); oProductGroups.css({ float: 'left', width: module.innerWidth() + 'px', height: module.innerHeight() + 'px' }); if (iGroupCount <= 1) { return; } if (direction == 'left') { oProductGroupList.css({ left: '0px', right: 'auto' }); } else { for (var i = 0 ; i < iGroupCount; i++) { oProductGroups = module.find('.ProductGroup'); oProductGroups.eq(-1).insertBefore(oProductGroups.eq(i)); } oProductGroupList.css({ left: 'auto', right: module.innerWidth() * (iGroupCount - 1) + 'px' }); } module.find('.PDetail').css('width', module.find('.PicWrapper').width()); window['effectInterval_' + module.attr('id')] = setInterval(function () { if (module.find('.ProductList').attr('ishovering') == 1 && module.find('.ProductList').attr('hoverstop') == 1) { return; } var oProductGroupList = module.find('.ProductGroupList'); var oProductGroups = module.find('.ProductGroup'); if (direction == 'left') { oProductGroupList.animate({ left: '-=' + oProductGroups.outerWidth(true) + 'px' }, 1000, function () { oProductGroups.eq(0).insertAfter(oProductGroups.eq(-1)); oProductGroupList.css('left', 0); }); } else { oProductGroupList.animate({ right: '-=' + oProductGroups.outerWidth(true) + 'px' }, 1000, function () { oProductGroups.eq(-1).insertBefore(oProductGroups.eq(0)); oProductGroupList.css('right', oProductGroups.outerWidth(true) * (iGroupCount - 1) + 'px'); }); } }, 6000); } } } function showShopModal(productid, e, productShowType){ e = e || window.event; e.stopPropagation && e.stopPropagation(); e.preventDefault && e.preventDefault(); e.cancelBubble = true; if (!productid){ return false; } if(typeof productShowType == 'undefined'){ productShowType = 0; } var productSkus = []; $.ajax({ url: '/index.php?c=Front/ProductData', type: 'get', data: { id: productid, productShowType: productShowType }, dataType: 'json', async: false, cache: false, success: function (json) { if (!json) { alert('无此商品'); return; } var lg = json.lg;//多语言 var windowWidth = $(window).width(); productShowType = json.productShowType; productSkus = json.productSkus || []; var html = ''; html += '
    '; html += '
      '; html += '
    • '; html += '
    • '; html += '
      ' + json.name + '
      '; var priceStr = ''; priceStr += '' + (json.isSingleNorm ? (productShowType == 1 ? json.jf_convert : '¥' + parseFloat(json.price).toFixed(2)) : '') + ''; priceStr += ' '+lg.pay_extra+'¥' + json.surplus + ''; html += '
      ' + priceStr + '
      '; if(!productShowType == 1){ html += '
      ¥' + (parseFloat(json.marketPrice) || 0).toFixed(2) + '
      '; } if (json.productQuantity >= 0) { html += '
      ' + json.productQuantity + ' '+lg.unit_jian+'
      '; } if (!json.isSingleNorm) { var productAttrs = json.productAttrs || []; for (var i = 0; i < productAttrs.length; i++) { html += '
      '; html += ''; html += ''; html += '
      '; } } html += '
      '; html += ''; html += '
      '; html += '-'; html += ''; html += ''; html += ''; html += '+'; html += '
      '; html += '
      '; html += '
      '; html += ''; html += ''; html += ''; html += '
      '; html += '
    • '; html += '
    '; html += ''; html += ''; html += ''; html += ''; html += ''; html += ''; var dialog = bootbox.dialog({ title: lg.quick_purchase, message: html, show: false, className: 'shopCartModal', buttons: {} }).on('shown.bs.modal', function (){ $('.pro_appeal').height($('.pro_appeal').width()); }).on('hidden.bs.modal',function(){ $('.swiper-container').each(function(){ $(this)[0].swiper.startAutoplay(); }); }).modal('show'); var surplus = parseInt(json.surplus); if(isNaN(surplus) || surplus == 0){ $('.shopCartModal .Shtml').hide(); }else{ $('.shopCartModal .Shtml').show(); } function checkValid() { if (!/^\d+$/.test($('#ShopModalProNum').val() + '')) { alert(lg.file_in_quantity); return; } var enableInventory = $('.shopCartModal [name=enableInventory]').val(); if (enableInventory) { var productQuantity = parseInt($('.shopCartModal .productQuantity').attr('productQuantity')); if (!isNaN(productQuantity) && parseInt($('#ShopModalProNum').val()) > productQuantity) { alert(lg.not_exceed_stock); return false; } } if(productSkus.length > 0 && !$('.shopCartModal [name="skuid"]').val()){ alert(lg.select_spec); return false; } return true; } $('.shopCartModal .pro_amount').disableSelection(); $('.shopCartModal .sys_spec_text>li').off().on('click', function () { if($(this).hasClass('outOfStock')){ return; } if($(this).hasClass('selected')){ $(this).removeClass('selected'); }else{ var attrkeyid = $(this).attr('attrkeyid'); $('[attrkeyid=' + attrkeyid +']').not(this).removeClass('selected'); $(this).addClass('selected'); } var attrkeycount = $('.shopCartModal .sys_spec_text').length; var attrvalselectedcount = $('.shopCartModal .sys_spec_text>li.selected').length; if(attrkeycount - attrvalselectedcount == 1 || attrkeycount == attrvalselectedcount){ $('.shopCartModal .sys_spec_text>li').removeClass('outOfStock'); var elemAttrVals = $('.shopCartModal .sys_spec_text>li').not('.selected'); elemAttrVals.each(function(){ var path = ''; var elemAttrValInOtherKeys = $('.shopCartModal .sys_spec_text').not($(this).closest('.shopCartModal .sys_spec_text')).find('li.selected'); elemAttrValInOtherKeys.each(function(){ path += $(this).attr('attrvalid') + ','; }); path += $(this).attr('attrvalid'); path = path.split(',').sort().join(','); for(var i = 0; i < productSkus.length; i++){ var sku = productSkus[i]; var skuPath = (sku.Path || '').split(',').sort().join(','); if(skuPath == path){ if(sku.ProductQuantity <= 0){ $(this).addClass('outOfStock'); }else{ $(this).removeClass('outOfStock'); } break; } } }); }else{ $('.shopCartModal .sys_spec_text>li').removeClass('outOfStock'); } if(attrkeycount == attrvalselectedcount){ var attrkeyid = $(this).attr('attrkeyid'); $('[attrkeyid=' + attrkeyid +']').not(this).removeClass('selected'); $(this).addClass('selected'); var path = ''; $('.shopCartModal .sys_spec_text>li.selected').each(function(){ path += $(this).attr('attrvalid') + ','; }); path = path.replace(/(^,)|(,$)/g, ''); path = path.split(',').sort().join(','); var price = 0; var point =0; var skuid = 0; var surplus=0; var productQuantity = 0; for(var i = 0; i < productSkus.length; i++){ if(path == productSkus[i].Path.split(',').sort().join(',')){ point = productSkus[i].Jf_convert; price = productSkus[i].Price; skuid = productSkus[i].SkuID; surplus = productSkus[i].surplus; productQuantity = productSkus[i].ProductQuantity; break; } } var priceHtml = ''; if(productShowType == 1){ point = parseFloat(point).toFixed(2); surplus = parseFloat(surplus).toFixed(2); $('.shopCartModal .price').text(point).data('singlePrice', price); $(".shopCartModal .Shtml").attr('surplus', surplus).html(lg.pay_extra+'¥'+surplus); var surplus = parseInt(json.surplus); if(isNaN(surplus) || surplus == 0){ $('.shopCartModal .Shtml').hide(); }else{ $('.shopCartModal .Shtml').show(); } priceHtml = point; }else{ price = parseFloat(price).toFixed(2); $('.shopCartModal .price').text('¥' + price).data('singlePrice', price); } $(".shopCartModal input[name=skuid]").val(skuid); $('.shopCartModal .productQuantity').text(productQuantity).attr('productQuantity', productQuantity); }else{ var minVal = -1, maxVal = 0, productQuantity = 0; for(var i = 0; i < productSkus.length; i++){ var val = 0; if(productShowType == 1){ val = parseFloat(productSkus[i].Jf_convert); }else{ val = parseFloat(productSkus[i].Price); } minVal = minVal == -1 ? val : Math.min(minVal, val); maxVal = maxVal == -1 ? val : Math.max(maxVal, val); productQuantity += parseInt(productSkus[i].ProductQuantity); } var pHtml = minVal.toFixed(2); if(minVal != maxVal){ pHtml = minVal.toFixed(2) + ' - ' + maxVal.toFixed(2); } if(productShowType != 1){ pHtml = '¥' + pHtml; } $(".shopCartModal .Shtml").hide(); $('.shopCartModal .price').text(pHtml);//.data('singlePrice', price); $(".shopCartModal input[name=skuid]").val(skuid); $('.shopCartModal .productQuantity').text(productQuantity).attr('productQuantity', productQuantity); } }); $('.shopCartModal .sys_spec_text>li:nth-child(1)').each(function () { $(this).click(); }); $(".shopCartModal .reduce").off().on('click', function () { var num = parseInt($("#ShopModalProNum").val()); if (num == 1) return; else $("#ShopModalProNum").val(num - 1); var price = $('.shopCartModal .price').data('singlePrice'); //$('.shopCartModal .price').text('¥' + ((parseFloat(price) * (num - 1))).toFixed(2)); }); $(".shopCartModal .add").off().on('click', function () { var num = parseInt($("#ShopModalProNum").val()); $("#ShopModalProNum").val(num + 1); var price = $('.shopCartModal .price').data('singlePrice'); //$('.shopCartModal .price').text('¥' + ((parseFloat(price) * (num + 1))).toFixed(2)); }); $(".shopCartModal #ShopModalProNum").off().on('change', function () { var num = parseInt($("#ShopModalProNum").val()); var price = $('.shopCartModal .price').data('singlePrice'); //$('.shopCartModal .price').text('¥' + ((parseFloat(price) * num)).toFixed(2)); }); if (json.isSingleNorm) { $('.shopCartModal .price').data('singlePrice', json.price); } /* $('.shopCartModal .Buy').off().on('click',function(){ if (!checkValid()) return false; $("form[name=ShopModalForm]").submit(); bootbox.hideAll(); }); */ $('.shopCartModal .ShopCart,.shopCartModal .Buy').off().on('click',function(){ var islocation = $(this).attr('islocation'); var skuid = $("form[name=ShopModalForm]").find("input[name=skuid]").val(); var num = $("form[name=ShopModalForm]").find("input[name=Num]").val(); if (!checkValid()) return false; $('.add-cart-result').remove(); var hintHtml = ''; $(hintHtml).appendTo('body'); $(".add-cart-result").find(".close").unbind('click').click(function () { $(".add-cart-result").hide(); return false; }); var url = '/index.php?c=front/Productorder&a=AddToCart&Action=Add&ProductID=' + productid + '&skuid=' + skuid + '&Num=' + num; var backurl = '/index.php?c=front/Productorder&Action=Add&ProductID=' + productid + '&skuid=' + skuid + '&Num=' + num; $.get(url, null, function (data, textStatus, jqXHR) { if(data.redirectUrl){ location.href = data.redirectUrl; return; } if (data.success) { bootbox.hideAll(); //立即购买会跳转 if(islocation == 1){ location.href = backurl; return; } $(".add-cart-result").css({ opacity: 1, top: ($(window).height() - $(".add-cart-result").outerHeight()) / 2 + $(window).scrollTop() + 'px', left: ($(window).width() - $(".add-cart-result").outerWidth()) / 2 + 'px', position: 'absolute', width: 'auto', height: 'auto' }); $("#cartnum").html("(" + data.productnum + ")"); $(".add-cart-result").slideToggle(300); setTimeout(function () { $(".add-cart-result").find(".close").click(); }, 2000); if($('.footNavShopCartNum').length > 0){ getShopCartNum(function(num){ $('.footNavShopCartNum').text(num); }); } } else { //没有登录的话直接跳到登录页面 if(data.isLogin == '0'){ location.href = '/index.php?c=front/Userlogin&a=GoLogin&BackUrl=' + escape(backurl); return; } if(data.redirectUrl){ location.href = data.redirectUrl; return; }else{ alert(data.msg); } } }, "json"); }); $('.shopCartModal .ViewCart').off().on('click',function(){ location = '/productorder'; }); }, error: function () { alert('error'); } }); } function sortProductList(obj,moduleID,pageLink){ if($(obj).hasClass('selected') && !$(obj).hasClass('sort')) return; var url = pageLink.replace("{PageNo}", 1); var orderBy = $(obj).attr('value') || ''; var orderByStr = '&orderby=' + orderBy; var sortByStr = ""; if($.inArray(orderBy, ['price','lastest']) > -1){ sortByStr = '&sortby=' + ($(obj).hasClass('descent') ? 0 : 1); } var newUrl = '/index.php?c=front/LoadModulePageData&' + url.substring(url.indexOf("?") + 1) + orderByStr + sortByStr; $.ajax({ url: newUrl, async: true, dataType: "text/html", complete: function (request, status, error) { $("#module_" + moduleID).replaceWith(request.responseText); BindPagerAction(); } }); } function checkBowerTip(){ var $checkbower = $('
    '+ '当前浏览器版本过低,影响整体的访问体验.建议升级到IE9以上版本,或者下载360浏览器谷歌浏览器'+ ''+ '
    '); $('body').prepend($checkbower); $checkbower.width(window.innerWidth); $checkbower.find('img').eq(0).click(function() {$checkbower.addClass('hidden');}); if($checkbower.width() < 400)$checkbower.css({'font-size':'12px','padding':'5px 0','text-align':'left'}).find('span').eq(0).css('padding-right','10px') } function filterProductList_Pc(obj1,obj2,moduleID,pageLink){ var url = pageLink.replace("{PageNo}", 1); var params = ''; var filterid2 = $(obj2).attr('filterid'); var valueid2 = $(obj2).attr('valueid'); $(obj1).find('li').each(function(index,element){ var valueid = $(element).attr('valueid'); var filterid = $(element).attr('filterid'); if(filterid2 != filterid) params += valueid + ','; }); if($(obj2).hasClass('selected-light')){ params += valueid2 + ','; } var match = url.match(/filtervalue=([,]?\d+[,]?)+/); if (match && match.length > 1){ url = url.replace(/filtervalue=([,]?\d+[,]?)+/,'filtervalue='+params); }else{ url += '&filtervalue='+params; } var newUrl = '/index.php?c=front/LoadModulePageData&' + url.substring(url.indexOf("?") + 1); $.ajax({ url: newUrl, async: true, dataType: "text/html", complete: function (request, status, error) { //if(window.innerWidth > 992){ // //debugger // //$("#module_" + moduleID +" .productListOrderCtrlTab").hide(); // //$("#module_" + moduleID +" .pro-container").replaceWith(request.responseText); // $("#module_" + moduleID +" .pro-container").replaceWith(request.responseText); // //$("#module_" + moduleID).replaceWith(request.responseText); //} //else{ // //} // $("#module_" + moduleID +" .pro-container").replaceWith(request.responseText); $("#module_" + moduleID).replaceWith(request.responseText); BindPagerAction(); } }); } function filterProductList_Mobile(obj,moduleID,pageLink){ var url = pageLink.replace("{PageNo}", 1); var params = ''; $(obj).find('li.items-active').each(function(index,element){ var valueid = $(element).attr('valueid'); var filterid = $(element).attr('filterid'); params += valueid + ','; }); var match = url.match(/filtervalue=([,]?\d+[,]?)+/); if (match && match.length > 1){ url = url.replace(/filtervalue=([,]?\d+[,]?)+/,'filtervalue='+params); }else{ url += '&filtervalue='+params; } loadingText = getLang('loading') + '...'; var pageLoadingHtml = '
    '; pageLoadingHtml += '
    '; pageLoadingHtml += ''; //pageLoadingHtml += '' + loadingText + ''; pageLoadingHtml += '
    '; pageLoadingHtml += '
    '; $("#module_" + moduleID).children().append(pageLoadingHtml); //debugger var newUrl = '/index.php?c=front/LoadModulePageData&' + url.substring(url.indexOf("?") + 1); $.ajax({ url: newUrl, async: true, dataType: "text/html", complete: function (request, status, error) { $("#module_" + moduleID).replaceWith(request.responseText); $("#module_" + moduleID).find('.PageLoading').remove(); BindPagerAction(); } }); } // 初始化产品展示的瀑布流 function initProductListMasonry(moduleid){ var $container = $('#module_' + moduleid + ' .masonry-container'); if ($container.length > 0) { $container.imagesLoaded(function () { $container.masonry({ columnWidth: '.productItem', itemSelector: '.productItem' }); }); } } // 初始化产品展示 function initProductList(options){ if(typeof options.ModuleID == 'undefined' || typeof options.ShowStyle == 'undefined') return; var moduleid = parseInt(options.ModuleID); var showStyle = parseInt(options.ShowStyle); $(window).off('resize.productlistImgSizeType' + moduleid); $(window).off('resize.initProductListSlide' + moduleid); // 初始化瀑布流 if(showStyle == 13){ initProductListMasonry(moduleid); } // 设置产品展示图片,确保比例 var imgSizeType = options.ImgSizeType; setProductListImg(moduleid, showStyle, imgSizeType); // 是否显示滚动 var isScroll = options.IsScroll; if(options.IsScroll == 1 && showStyle != 13){ var direction = options.Direction; $('#module_' + moduleid + ' .ModuleProductList .proMore').remove(); $('#module_' + moduleid + ' .ModuleProductList').addClass('swiper-container'); if(direction == 'right'){ $('#module_' + moduleid + ' .ModuleProductList').attr('dir',"rtl"); } $('#module_' + moduleid + ' .ModuleProductList .ProductList').addClass('swiper-wrapper').css('overflow','visible'); $('#module_' + moduleid + ' .ModuleProductList .ProductList .productsBox').addClass('swiper-slide'); var btnPrevNext = '
    '; $('#module_' + moduleid + ' .ModuleProductList').after(btnPrevNext); var slidePerGroup = calProductListSlidePerGroup(moduleid); var mySwiper = new Swiper('#module_' + moduleid + ' .swiper-container', { autoplay: 5000, speed: 1000, slidesPerView:slidePerGroup, slidesPerGroup:slidePerGroup, // loopedSlides:slidePerGroup, loopAdditionalSlides:slidePerGroup, spaceBetween:0, autoplayDisableOnInteraction:false, // prevButton: '#module_' + moduleid + (direction == 'left' ? ' .btnNext' : ' .btnPrev'), // nextButton: '#module_' + moduleid + (direction == 'left' ? ' .btnPrev' : ' .btnNext'), loop:true }); $(window).off('resize.initProductListSlide' + moduleid).on('resize.initProductListSlide' + moduleid, function(){ var slidePerGroup = calProductListSlidePerGroup(moduleid); mySwiper.params.slidesPerGroup = slidePerGroup; mySwiper.params.slidesPerView = slidePerGroup; mySwiper.params.loopedSlides = slidePerGroup; mySwiper.updateSlidesSize(); mySwiper.updateContainerSize(); setProductListImg(moduleid, showStyle, imgSizeType); }); $('#module_' + moduleid + ' .btnPrev').off().on('click', function(){ mySwiper.animating = false; direction == 'left' ? mySwiper.slideNext() : mySwiper.slidePrev(); }).disableSelection(); $('#module_' + moduleid + ' .btnNext').off().on('click', function(){ mySwiper.animating = false; direction == 'left' ? mySwiper.slidePrev() : mySwiper.slideNext(); }).disableSelection(); }else{ $(window).off('resize.initProductListSlide' + moduleid); } if($.inArray(showStyle,[11,12,13,14,15,16]) > -1){ var productShowType = options.ProductShowType; // 购买按钮点击,弹出框 var event = 'touchend.pro_join' + moduleid +' click.pro_join' + moduleid; $(document).off(event).on(event, '#module_' + moduleid + ' .pro_join, #module_' + moduleid + ' .proBuyBtn', function (evt) { if(mySwiper){ if(mySwiper.animating) return false; mySwiper.stopAutoplay(); } showShopModal($(this).attr('productid'), evt, productShowType); return false; }); // 排序标签点击 $('#module_' + moduleid + ' .orderCtrlPanel>li').off('touchend.orderCtrl click.orderCtrl').on('touchend.orderCtrl click.orderCtrl', function (e) { sortProductList(this, moduleid, options.PageLink); }); } // 绑定更多点击事件 var pcount = 2; var pagecount = options.PageCount; $('#module_' + moduleid +' .ProductListMore').off("click").on("click", function (e) { if (pcount <= pagecount) { var url = options.PageLink.replace('{PageNo}', pcount); var self = this; $.ajax({ type: "GET", url: '/index.php?c=front/LoadModulePageData&' + url.substring(url.indexOf("?") + 1), dataType: "html", success: function (response) { $resultlist = $(response).find(".ProductList"); var newitems = $resultlist.find(".productsBox").clone(); $('#module_' + moduleid + ' .ProductList').append(newitems); setProductListImg(moduleid, showStyle, imgSizeType); if($(self).closest('.ModuleItem').find('.masonry-container').length > 0){ $('#module_' + moduleid + ' .ProductList').imagesLoaded(function () { $('#module_' + moduleid + ' .ProductList').masonry('appended', newitems); }); } if (pcount == pagecount) $('#module_' + moduleid + ' .ProductListMore').removeClass('moreLoad').removeAttr('onclick').text(options.NoMoreProductText); pcount++; } }); } }); // 电脑访问点击产品,新开一个页面打开,移动设备在同一个页面跳转 $('#module_' + moduleid + ' .proCont').attr('target', isMobileBroswer() || parent != window ? '_self' : '_blank'); } // 设置产品展示图片,确保比例 function setProductListImg(moduleid, showStyle, imgSizeType){ if($.inArray(showStyle,[12,15,16]) > -1 && imgSizeType == 3){ $('#module_' + moduleid + ' .proImg').height($('#module_' + moduleid + ' .proImg').width()); $(window).off('resize.productlistImgSizeType' + moduleid).on('resize.productlistImgSizeType' + moduleid, function(evt){ $('#module_' + moduleid + ' .proImg').height($('#module_' + moduleid + ' .proImg').width()); }); }else{ $(window).off('resize.productlistImgSizeType' + moduleid); } } // 获取购物车数量 function getShopCartNum(callback){ $.ajax({ type:'get', url: '/index.php?c=front/productorder&a=GetShopCartNum', async: true, dataType: "json", success:function (json) { if(json.success){ if(typeof callback == 'function'){ callback(json.num); } } }, error:function () { } }); } function calProductListSlidePerGroup(moduleid){ var itemCountPerGroup = 0; var classText = $('#module_' + moduleid).find('.productsBox').prop('class'); var winWidth = window.innerWidth; if(winWidth >= 1200){ itemCountPerGroup = 12 / parseInt(classText.match(/col-lg-(\d+)/)[1]); }else if(winWidth >= 992){ itemCountPerGroup = 12 / parseInt(classText.match(/col-md-(\d+)/)[1]); }else if(winWidth >= 768){ itemCountPerGroup = 12 / parseInt(classText.match(/col-sm-(\d+)/)[1]); }else{ itemCountPerGroup = 12 / parseInt(classText.match(/col-xs-(\d+)/)[1]); } return itemCountPerGroup; } function productListMouseOver(elem) { $(elem).attr('ishovering', 1); } function productListMouseOut(elem) { $(elem).attr('ishovering', 0); } function BindPagerAction(){ $(".ModuleItem").off('click.pager_num_click').on('click.pager_num_click', '.PageNavigate a,.page-nav a,.page-more a' , function(evt){ // $(".PageNavigate a,.page-nav a,.page-more a").off('click').on('click', function(evt){ evt = evt || window.event; evt.preventDefault && evt.preventDefault(); evt.stopPropagation && evt.stopPropagation(); pagerSubmit(this, $(this).attr("href")); return false; }); $(".ModuleItem").off('click.pager_submit').on('click.pager_submit', '.pagerGiant .submit' , function(evt){ // $('.pagerGiant .submit').off().on('click', function(){ var pageNo = $(this).closest('.pagerGiant').find('.inputer').val() || ''; var url = $(this).closest('.pagerGiant').find('[name=pagerUrl]').val() || ''; url = url.replace('{pageNo}', pageNo); if(/^\d+$/.test(pageNo) && parseInt(pageNo) > 0){ var pagerCount = parseInt($(this).closest('.pagerGiant').find('[name=pagerCount]').val() || -1); if(pagerCount > -1 && parseInt(pageNo) > pagerCount){ return false; } pagerSubmit(this, url); } return false; }); $(".ModuleItem").off('keypress.pager_inputer').on('keypress.pager_inputer', '.pagerGiant .inputer' , function(evt){ // $('.pagerGiant .inputer').off().on('keypress', function(evt){ evt = evt || window.event; var keyCode = evt.keyCode; if((evt.keyCode < 48 || evt.keyCode > 57) && evt.keyCode != 13){ evt.preventDefault && evt.preventDefault(); evt.stopPropagation && evt.stopPropagation(); return false; } if(keyCode == 13){ var pageNo = $(this).closest('.pagerGiant').find('.inputer').val() || ''; var url = $(this).closest('.pagerGiant').find('[name=pagerUrl]').val() || ''; url = url.replace('{pageNo}', pageNo); if(/^\d+$/.test(pageNo) && parseInt(pageNo) > 0){ var pagerCount = parseInt($(this).closest('.pagerGiant').find('[name=pagerCount]').val() || -1); if(pagerCount > -1 && parseInt(pageNo) > pagerCount){ return false; } pagerSubmit(this, url); } } }); } /** * js获取多语言 * @param string lang 要获取多语言的key * @return string 多语言 */ function getLang(lang){ if(window.AllLang){ return window.AllLang[lang]; } else { var site_lang = (getCookie && getCookie('Lang')) ? getCookie('Lang') : 'en'; var lang_url = '/share/lang/lang_' + site_lang + '.json?v=' + Math.random(1,9999); $.ajax({ url: lang_url, type: 'GET', dataType: 'json', async: false, success: function(json){ window.AllLang = json; } }); return window.AllLang[lang]; } } function pagerSubmit(item, url){ if(url && url.indexOf("PageNo=") > -1){ var path = url.split("?")[0]; var params = url.split("?")[1]; var classid = null; if(params){ var match = params.match(/classid=(\d*)/i); if (match && match.length > 1) classid = match[1]; } var newUrl = "/index.php?c=Front/LoadModulePageData&" + params; /responseModuleId=(\d+)/.test(newUrl); var moduleId = parseInt(RegExp.$1); if(moduleId > 0){ var ispagemore = $(item).is(".page-more") || $(item).parent().is(".page-more"); if(ispagemore){ if($(item).attr("pagecount") == $(item).attr("curpage")){ alert(getLang('last_page')); return false; } } // $("#module_" + moduleId).append("
    正在加载,请稍候...
    "); var top = $("#module_" + moduleId).outerHeight() / 2; loadingText = ispagemore ? getLang('loading_wait') : getLang('loading') + '...'; // var loadingText = 'Loading...'; // if(getCookie && getCookie('Lang') == 'cn'){ // loadingText = ispagemore ? '正在加载,请稍后' : '正在加载'; // } if(ispagemore){ $("#module_" + moduleId).find('.page-more').hide(); var pageLoadingHtml = '
    '; pageLoadingHtml += '
    '; pageLoadingHtml += ''; pageLoadingHtml += '' + loadingText + ''; pageLoadingHtml += '
    '; pageLoadingHtml += '
    '; $("#module_" + moduleId).find('.page-more').after(pageLoadingHtml); }else{ $("#module_" + moduleId).find('.BodyCenter').css({'opacity':'0','visibility':'hidden'}); var pageLoadingHtml = '
    '; pageLoadingHtml += '
    '; pageLoadingHtml += ''; pageLoadingHtml += '' + loadingText + ''; pageLoadingHtml += '
    '; pageLoadingHtml += '
    '; $("#module_" + moduleId).children().append(pageLoadingHtml); } $("#module_" + moduleId).children().css('position', 'relative'); $.ajax({ url: newUrl, async: true, dataType: "text/html", complete: function (request, status, error) { if(ispagemore){ $("#module_" + moduleId).find('.PageLoading').remove(); $("#module_" + moduleId).find('.page-more-loading').remove(); $("#module_" + moduleId).find('.page-more').show(); var newitems = $(request.responseText).find(".news-container,.pro-container,.download-container,.guestbooklist-container,.gallery-container").children(); $("#module_" + moduleId).find(".news-container,.pro-container,.download-container,.guestbooklist-container,.gallery-container").append(newitems); var initFunc = window['initFunc' + moduleId]; if(typeof initFunc == 'function'){ initFunc({ newitems:newitems }); } //同步分页的状态 var page_more = $(request.responseText).find(".page-more"); if(page_more.length == 0){ page_more = $('
    ' + getLang('all_loaded') + '!
    '); } $(item).closest(".page-more").replaceWith(page_more); $("#module_" + moduleId).find(".PageNavigate,.page-nav").replaceWith($(request.responseText).find(".PageNavigate,.page-nav")); }else{ $("#module_" + moduleId).replaceWith(request.responseText); } BindPagerAction(); if (typeof CanDesign != 'undefined' && CanDesign != "True") { var bodyClientHeight = document.documentElement.clientHeight // 因为有DOCTYPE if (bodyClientHeight == 0) bodyClientHeight = window.innerHeight; var bodySrollTop = $('body').scrollTop(); if (bodySrollTop == 0) bodySrollTop = $(window).scrollTop(); var relModule = $("#module_" + moduleId).eq(0); var originModuleHeight = relModule.height(); if (relModule.length > 0) { if(!ispagemore){ if (SiteType == 0) { if (originModuleHeight > bodyClientHeight || getElementTop(relModule[0]) < bodySrollTop) { $('body,html').animate({ scrollTop: getElementTop(relModule[0]) }, 1000); } } else { window.location.href = "#module_" + moduleId; } } } } //加载完成后 重新调用一下该模块的init方法 if(window["initFunc" + moduleId]){ window["initFunc" + moduleId](); } } }); return false; } } } function getElementTop(obj) { var i = obj.offsetTop; if (obj.offsetParent != null) i += getElementTop(obj.offsetParent); return i; } function getElementLeft(obj) { var i = obj.offsetLeft; if (obj.offsetParent != null) i += getElementLeft(obj.offsetParent); return i; } function getElementTopWithBorder(obj) { var i = obj.offsetTop + parseFloat($(obj).css('border-top-width')); if (obj.offsetParent != null) i += getElementTopWithBorder(obj.offsetParent); return i; } function getElementLeftWithBorder(obj) { var i = obj.offsetLeft + parseFloat($(obj).css('border-left-width')); if (obj.offsetParent != null) i += getElementLeftWithBorder(obj.offsetParent); return i; } function AddFavorite(sURL, sTitle) { if (!sURL) sURL = location.href; if (!sTitle) sTitle = document.title; try { window.external.addFavorite(sURL, sTitle); }catch (e) { try { window.sidebar.addPanel(sTitle, sURL, ""); }catch (e) { alert("加入收藏失败,请使用Ctrl+D进行添加"); } } } function SetHome() { if (document.all){ document.body.style.behavior='url(#default#homepage)'; document.body.setHomePage(window.location.href); }else if (window.sidebar){ if(window.netscape){ try{ netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect"); }catch (e){ alert( "该操作被浏览器拒绝,如果想启用该功能,请在地址栏内输入 about:config,然后将项 signed.applets.codebase_principal_support 值改为true" ); } } var prefs = Components.classes['@mozilla.org/preferences-service;1'].getService(Components. interfaces.nsIPrefBranch); prefs.setCharPref('browser.startup.homepage',window.location.href); }else{ alert('您的浏览器不支持自动自动设置首页, 请使用浏览器菜单手动设置!'); } } /************ 2015年3月24日14:21:59 创建人:郑江 主要针对模块的高级功能的js ************/ //图片的半透明效果 function ShowTransparent(obj) { $(obj).animate({ opacity: 0.7 }, 300, function () { }); } //图片不透明 function HideTransparent(obj) { $(obj).animate({ opacity: 1 }, 300, function () { }); } //浮影 var oSetTimeout = null; function ImgShade(obj, type) { var oDiv = $(obj).parent().find("div[name='shade']"); $(obj).parent().css("position","relative"); if($(obj).parent().is("a")) $(obj).parent().css("display","block"); if (oDiv.length == 0) { oDiv = $("
    " + $(obj).attr('alt') + "
    ").appendTo($(obj).parent()).css('height', 0); } var bc = $(obj);//.closest('.BodyCenter'); var module = $(obj).closest('.ModuleItem'); var top = bc.position().top; var left = bc.offset().left - $(obj).closest('.BodyCenter').offset().left; var w = bc.width(); var h = bc.height(); if (type == 'ShadeTop'){ $(oDiv).attr("class", "showShadeTop").css({'width':w,'left':left,'top':0}).show(); }else if(type == 'ShadeBottom'){ $(oDiv).attr("class", "showShadeBottom").css({'width':w,'left':left,'bottom':0}).show(); }else{ $(oDiv).attr("class", "showShadeTop").css({'width':w,'left':left,'top':0}).show(); } var isShadeAll = type == 'Shade'; if(isShadeAll) $(oDiv).css({'line-height':h +'px','font-size':'18px'}); $(oDiv).stop().animate({ height: (isShadeAll ? h +'px' :"50px") }, (isShadeAll ? 100:200), function () { }); //2015年6月1日17:44:45 郑江 当鼠标进入div(浮影)的时候关掉定时器 $(oDiv).mouseenter(function () { clearTimeout(oSetTimeout); }); $(oDiv).mouseleave(function () { divZoom(oDiv,type); }); } function unImgShade(obj, type) { if ($(obj).parent().find("div[name='shade']").length == 0) $(obj).parent().append("
    " + $(obj).attr('alt') + "
    "); var oDiv = $(obj).parent().find("div[name='shade']"); oSetTimeout = setTimeout(function () { divZoom(oDiv,type); }, 200); } //2015年6月2日14:19:10 郑江 隐藏div动画 function divZoom(obj,type) { $(obj).stop().animate({ height: "0px" }, 200, function () { if (type == 'ShadeTop') $(obj).attr("class", "hideShadeTop").hide(); else $(obj).attr("class", "hideShadeBottom").hide(); }); } function moduleImageHover(obj) { var width = $(obj).width(); $(obj).stop().animate({ opacity: 0 }, 250, function () { $(this).css('visibility', 'hidden'); }); $(obj).parent().css('position','relative'); if(!$(obj).parent().is('.BodyCenter')){ $(obj).parent().css('display', 'block'); } var left = ($(obj).parent().width() - $(obj).width()) / 2; $(obj).siblings('img').stop().show().css({'visibility':'visible', 'box-sizing': 'border-box', 'top':'0', 'left': left + 'px', 'padding-top': $(obj).parent().css('padding-top') || 0, 'padding-left': $(obj).parent().css('padding-left') || 0, 'padding-bottom': $(obj).parent().css('padding-bottom') || 0, 'padding-right': $(obj).parent().css('padding-right') || 0 }).animate({ opacity: 1 }, 250); } function moduleImageUnHover(obj) { // $('.ModuleImage img:eq(1)').stop().animate({ opacity: 0 }, 250, function () { $(obj).stop().animate({ opacity: 0 }, 250, function () { $(this).css('visibility', 'hidden'); }); $(obj).siblings('img').stop().show().css('visibility', 'visible').animate({ opacity: 1 }, 250); } function ImgZoom(obj){ var scale = $(obj).width() > 500 ? 1.02 : 1.10; var step = $(obj).width() > 500 ? 0.001 : 0.005; var curscale = 1; $(obj).attr('zoom-step',step); $(obj).parent().attr('zoom-overflow',$(obj).parent().css('overflow')); $(obj).parent().css({'overflow':'hidden'}); if($(obj).parent().is('a')) $(obj).parent().css({'display':'block'}); var f = function(){ $(obj).attr('zoom-scale',curscale); $(obj).css({'-webkit-transform':'scale('+curscale+')','-ms-transform':'scale('+curscale+')','-moz-transform':'scale('+curscale+')','-o-transform':'scale('+curscale+')','transform':'scale('+curscale+')' }); curscale += step; if(curscale < scale) setTimeout(f,10); } f(); } function unImgZoom(obj){ var scale = 1; var curscale = parseFloat($(obj).attr('zoom-scale')); var step = parseFloat($(obj).attr('zoom-step')); var f = function(){ $(obj).css({'-webkit-transform':'scale('+curscale+')','-ms-transform':'scale('+curscale+')','-moz-transform':'scale('+curscale+')','-o-transform':'scale('+curscale+')','transform':'scale('+curscale+')' }); curscale -= step; if(curscale > scale) setTimeout(f,10); else $(obj).parent().css('overflow',$(obj).parent().attr('zoom-overflow')); } f(); } /* start of 图文自动隐藏 */ function moduleImageTextHide(option) { //多语言处理 if(!window.lang && typeof option != 'undefined'){ window.lang = {}; window.lang.show_more = option.lang.show_more; } var show_more = '显示更多'; if(typeof option != 'undefined'){ show_more = option.lang.show_more; }else if(window.lang) { show_more = window.lang.show_more; } //如果有绝对定位的模块,那自动隐藏就会有问题 if(SiteType == "1"){ $(".ModuleImageText,.ModuleImageTextV2,.ModuleImageTextGiant").each(function(i,item){ var m = $(item).closest(".ModuleItem"); var textcontainer = $(item).find(".imageTextContainer"); var id = m.attr('id'); var referwidth = $('#pagebody').width(); //m.width(); var hidew = 800; if(textcontainer.attr('hidewidth')) hidew = parseInt(textcontainer.attr('hidewidth')); var hideh = 150; if(textcontainer.attr('hideheight')) hideh = parseInt(textcontainer.attr('hideheight')); if((m.css("position") == 'static' || m.css("position") == '')){ if(referwidth < hidew && textcontainer.attr('autohide') == '1' && textcontainer.attr('hasResponsive') == '1' && textcontainer.attr('hasshow') != '1'){ if(m.find('.showHandle').length == 0){ $bodyc = m.find(".BodyCenter"); $bodyc.css({'height':hideh + 'px','overflow':'hidden'}); $bodyc.parent().append("
    "); } } else if(/*window.isDesignMode &&*/ referwidth > hidew){//添加到分栏时 编辑状态下 显示有问题 换为pagebody的宽度做比较 //else if(/*window.isDesignMode &&*/ m.width() > hidew){ moduleImageTextShow(id); } } }); } } function moduleImageTextShow(id){ var m = $("#"+id); m.find(".showHandle").remove(); m.find(".BodyCenter").css({'height':'auto','overflow':'visible'}); // if(CanDesign != "True") m.find(".imageTextContainer").attr("hasshow","1"); } /* end of 图文自动隐藏 */ function showSubMenu(obj,direction,subItemLocation) { var oModuleNav = $(obj).closest('.ModuleNav,.ModuleNavGiant'); var oModuleItem = $(obj).closest('.ModuleItem'); var oContent = $(obj).closest('.main-nav-content'); var oNavSubMenu = $(obj).children('.NavSubMenu,.sub-nav-item-group'); var subAlign = $(obj).closest('.pre_nav').attr('SubAlign'); //left:左对齐,right:右对齐, auto: 根据主菜单的在屏幕中的相对位置对齐 var subHolder = $(obj).closest('.pre_nav').attr('SubHolder'); var timeoutId = "moduleNavTimeout"; if(typeof direction == 'undefined') direction = $(obj).closest('.pre_nav').attr('data-direction'); if(typeof subItemLocation == 'undefined') subItemLocation = $(obj).closest('.pre_nav').attr('data-subitem-location'); if (window[timeoutId]) { clearTimeout(window[timeoutId]); } oModuleNav.find('.NavSubMenu,.sub-nav-item-group').not(oNavSubMenu).hide(); oModuleNav.find('.navMainItem,.main-nav-item').not($(obj).children('.navMainItem,.main-nav-item')).removeClass('navMainItemHover'); $(obj).children('.navMainItem,.main-nav-item').addClass('navMainItemHover'); if ($('.moduleNavFloatSubMenu').attr('submenuid') != $(obj).attr('id')) { $('.moduleNavFloatSubMenu').remove(); } if (oNavSubMenu.children().length == 0) return; if (oModuleNav.is(".ModuleNavGiant") && oNavSubMenu.find(".sub-nav-item").length == 0) return; var navSubMenuClone = $(obj).clone(true).attr('onmouseover', null); var classes = oModuleItem.find(">div").attr('class'); $(".moduleNavFloatSubMenu").remove();$(".sub-nav-holder").hide(); var html = '
    '; html += '
    '; html += '
    '; html += ''; html += '
    '; html += '
    '; html += '
    '; var floatSubMenu = $(html); if(window.isDesignMode == true){ floatSubMenu.appendTo('#pagebody'); } else { floatSubMenu.appendTo('body'); } var originOpacity = oModuleItem.css('opacity'); floatSubMenu.css('opacity', '1'); // 透明度不为1,会有bug。。。 navSubMenuClone.find('.NavSubMenu,.sub-nav-item-group').css('opacity', originOpacity); floatSubMenu.find('dl').append(navSubMenuClone); floatSubMenu.find('.pre_nav').addClass($(obj).closest('.pre_nav').attr('class')); floatSubMenu.find('.navMainItem,.main-nav-item').remove(); floatSubMenu.css({ position: 'static', height:0, overflow: 'hidden' }); floatSubMenu.on('mouseenter', function () { //debugger if (window[timeoutId]) { clearTimeout(window[timeoutId]); } }); $(subHolder).mouseenter(function(){ if (window[timeoutId])clearTimeout(window[timeoutId]); }).mouseleave(function(){hideSubMenu(obj)}); var iSubMenuMarginLeft = (floatSubMenu.find('.NavSubMenu,.sub-nav-item-group').outerWidth() - $(obj).find('.navMainItem,.main-nav-item').outerWidth()) / 2; var isAlignRight = false; if(subAlign == 'left') iSubMenuMarginLeft = 0; if(subAlign == 'auto'){ if($(obj).offset().left < (oModuleNav.offset().left + oModuleNav.width() / 2)) iSubMenuMarginLeft = 0; else isAlignRight = true; } floatSubMenu.find('.NavSubMenu,.sub-nav-item-group').css({ position: 'absolute', display: 'block', zIndex: '999999' }); floatSubMenu.find('.main-nav-content').css('position', 'static'); //全屏的子菜单背景(layout-109 专用 ) //$(subHolder).css({"top":($(obj).offset().top + $(obj).height()) + "px","position":"absolute","left":"0","width":"100%"}).show(); if (direction == '1' && subItemLocation == '0') { floatSubMenu.find('.NavSubMenu,.sub-nav-item-group').css({ left: $(obj).offset().left - floatSubMenu.find('.NavSubMenu,.sub-nav-item-group').outerWidth(), top: $(obj).offset().top, marginTop: $(obj).find('.navMainItem,.main-nav-item').css('margin-top') }); } else if (direction == '1' && subItemLocation == '1') { floatSubMenu.find('.NavSubMenu,.sub-nav-item-group').css({ position: 'absolute', display: 'block', left: $(obj).offset().left + $(obj).outerWidth(), top: $(obj).offset().top, marginTop: $(obj).find('.navMainItem,.main-nav-item').css('margin-top') }); } else if (direction == '0' && subItemLocation == '0') { floatSubMenu.find('.NavSubMenu,.sub-nav-item-group').css({ top: $(obj).offset().top - floatSubMenu.find('.NavSubMenu,.sub-nav-item-group').outerHeight(), left: $(obj).offset().left + (parseInt($(obj).css('padding-left')) || 0), marginLeft: -iSubMenuMarginLeft }); } else { if (getCookie("SiteType") == "1") { if (false && window.isDesignMode == true) { var top = 0; var left = 0; var elem = $(obj)[0]; while (elem != null && $(elem).closest('#pagebody').length > 0 && !$(elem).is('#pagebody')) { top += elem.offsetTop; left += elem.offsetLeft; elem = $(elem)[0].offsetParent; } floatSubMenu.find('.NavSubMenu,.sub-nav-item-group').css({ top: top + $(obj).outerHeight(), left: left, marginLeft: -iSubMenuMarginLeft }); } else { // debugger floatSubMenu.find('.NavSubMenu,.sub-nav-item-group').css({ top: $(obj).offset().top + $(obj).outerHeight(), left: $(obj).find('.sub-nav-side-group').children().length>0?$(obj).find('.OneRow').offset().left:$(obj).find('.sub-nav-side-group').hasClass('nav-giant-layout-112')?$(obj).offset().left-20:$(obj).offset().left, marginLeft: $(obj).find('.sub-nav-side-group').hasClass('nav-giant-layout-112')?0:-iSubMenuMarginLeft, maxWidth:window.innerWidth }); } floatSubMenu.find('.nav').show().css({ height: 0 }); } else { floatSubMenu.find('.NavSubMenu,.sub-nav-item-group').css({ top: $(obj).offset().top + $(obj).outerHeight(), left: $(obj).offset().left + (parseInt($(obj).css('padding-left')) || 0), marginLeft: -iSubMenuMarginLeft }); } } if(isAlignRight && !floatSubMenu.find('.sub-nav-item-group').hasClass('nav-giant-layout-112')){ floatSubMenu.find('.NavSubMenu,.sub-nav-item-group').css({"left":$(obj).offset().left + $(obj).width() - floatSubMenu.find('.NavSubMenu,.sub-nav-item-group').outerWidth(true)}); } //解决子菜单背景根据二级导航换行而自适应高度 by Kong 2017/8/1 var diffHeight = 0; var subItemHeight = 40; var treeNavHeight = 13; if(floatSubMenu.find('.sub-nav-item').length > 0){ //2级菜单的高度 diffHeight = floatSubMenu.find('.sub-nav-item:last').offset().top - floatSubMenu.find('.sub-nav-item:first').offset().top; subItemHeight = floatSubMenu.find('.sub-nav-item:first').outerHeight(); //如果存在三级菜单 if(floatSubMenu.find('.sub-nav-side-group.nav-giant-layout-112').children().length>0){ var objs = floatSubMenu.find('.sub-nav-side-group'); treeNavHeight += objs.eq(0).outerHeight(); $.each(objs, function(idx, obj) { //当前这个ui的高度是否大于上一次ul的高度 if(idx>0){ if($(obj).outerHeight()>objs.eq(idx-1).outerHeight()){ treeNavHeight += $(obj).outerHeight(); } } }); }else{ treeNavHeight = 0; } $(obj).addClass('on').siblings().removeClass('on'); } // layout-111 if (floatSubMenu.find('.sub-nav-item-group').hasClass('nav-giant-layout-111') ) { // 当前菜单距右的偏移 var navGiantOffsetRight = Math.abs($(window).width() - $(obj).offset().left); // 当前菜单的二级菜单的总宽度 var navGiantWidth = floatSubMenu.find('.sub-nav-item-group.nav-giant-layout-111').children('.sub-menu-box').length * parseInt(floatSubMenu.find('.sub-nav-item-group.nav-giant-layout-111').children('.sub-menu-box').eq(0).css('width')) + parseInt(floatSubMenu.find('.sub-nav-item-group.nav-giant-layout-111').children('.sub-menu-box').eq(0).css('padding-right')); // 判断对齐方向 if (oContent.css('text-align')) { var navGiantStyleObj = ''; // 子菜单面板可能的最大宽度 var navGiantContentWidth = navGiantOffsetRight; switch (oContent.css('text-align')) { // left 对齐 case 'left': // 如果右边已经满了,但是左边还有空隙 var navGiantContentStyleLeft = $(obj).offset().left if (navGiantContentWidth < navGiantWidth) { if (navGiantWidth < window.innerWidth) { navGiantContentStyleLeft = window.innerWidth - navGiantWidth } else { navGiantContentStyleLeft = parseInt(floatSubMenu.find('.sub-nav-item-group.nav-giant-layout-111').children('.sub-menu-box').eq(0).css('width')) / 4 } } navGiantContentWidth += (navGiantContentStyleLeft * 6) navGiantStyleObj = { left: navGiantContentStyleLeft } break; // center 对齐 case 'center': navGiantContentWidth += (navGiantContentStyleLeft * 6) navGiantStyleObj = { marginLeft: 0 } break; // right 对齐 case 'right': navGiantStyleObj = { left: '', right: navGiantOffsetRight - $(obj).width(), marginLeft: 0 } navGiantContentWidth = $(obj).offset().left break; } } // 当前二级菜单个数 var subMenuBoxItem = floatSubMenu.find('.sub-nav-item-group>.sub-menu-box').length; // 用于储存每个二级列表下的三级列表个数 var threeItem = []; // 查找每个二级列表下的三级列表个数 floatSubMenu.find('.sub-nav-item-group>.sub-menu-box').each(function () { threeItem.push($(this).find('.three-nav-item-group>p').length) }); // 判断个数 if (threeItem.length > 1) { // 获取三级列表数组的个数最大值 var threeItemMAX = Math.max.apply(null, threeItem); // 用子菜单面板可能的最大宽度跟当前菜单的二级菜单的总宽度来判断是否满足换行 if (navGiantContentWidth < navGiantWidth) { // 重置圆角 floatSubMenu.find('.sub-nav-item-group>.sub-menu-box').eq(0).css('border-radius', '0px') // 循环判断是从第几个开始换行 for (var i = 0, len = subMenuBoxItem; i < len; i++) { if (navGiantContentWidth < (i * floatSubMenu.find('.sub-nav-item-group.nav-giant-layout-111').children('.sub-menu-box').eq(0).width() + 25)) { break; } } // 重新设置换行后的圆角 floatSubMenu.find('.sub-nav-item-group>.sub-menu-box').eq(i).css('border-radius', '0px 0px 0px 16px') // 判断是否需要补齐换行的宽度 if ((subMenuBoxItem / 2) < i) { // 补全缺失的宽度 for (var j = 0, len = (i - (subMenuBoxItem - i)); j < len; j++) { floatSubMenu.find('.sub-nav-item-group').append('') } } } } floatSubMenu.find('.sub-nav-item-group').css(navGiantStyleObj) } if(floatSubMenu.find('.sub-nav-item-group').hasClass('nav-giant-layout-112')){ //已经放满 // debugger if(window.innerWidth-(floatSubMenu.find('.sub-nav-item-group.nav-giant-layout-112').offset().left+floatSubMenu.find('.sub-nav-item-group.nav-giant-layout-112').outerWidth()) < 168){ if(window.innerWidth - (floatSubMenu.find('.nav-list').length+1) * 168>0){ floatSubMenu.find('.sub-nav-item-group.sub-nav-item-group').css('left',window.innerWidth - (floatSubMenu.find('.nav-list').length+1) * 168) }else{ floatSubMenu.find('.sub-nav-item-group.sub-nav-item-group').css('left',0) } }else{ floatSubMenu.find('.sub-nav-item-group').css('left',$(obj).offset().left+'px'); } diffHeight = floatSubMenu.find('.sub-nav-item:last').offset().top - floatSubMenu.find('.sub-nav-item:first').offset().top; } $(subHolder).css({"top":($(obj).offset().top + $(obj).height()) + "px","position":"absolute","left":"0","width":"100%","height":+ (subItemHeight+diffHeight+treeNavHeight) + "px"}).show(); } function hideSubMenu(obj, evt) { var oModuleNav = $(obj).closest('.ModuleNav,.ModuleNavGiant'); var oModuleItem = $(obj).closest('.ModuleItem'); var subHolder = $(obj).closest('.pre_nav').attr('SubHolder'); var timeoutId = "moduleNavTimeout"; evt = evt || window.event; var relatedTarget = evt.relatedTarget || evt.toElement; if ($(relatedTarget).is('.moduleNavFloatSubMenu') || $(relatedTarget).closest('.moduleNavFloatSubMenu').length > 0) { return false; } if (window[timeoutId]) { clearTimeout(window[timeoutId]); } window[timeoutId] = setTimeout(function () { $('.moduleNavFloatSubMenu').remove(); oModuleNav.find('.navMainItem').removeClass('navMainItemHover'); //全屏的子菜单背景(layout-109 专用 ) $(subHolder).hide(); $('.main-nav-item-group').removeClass('on').siblings().removeClass('on'); }, 100); } function isHorizontalPad() { if (CanDesign != "True" && window.CanEditFront == "True") return false; var padscale = false; if (SiteType == "1" && CanDesign != "True") { if(navigator.userAgent.toLowerCase().indexOf("pad") > -1 || window.location.toString().indexOf("testpad") > -1 || ($(window).height() > 768 && $(window).width() > 768 && $(window).height() <= 1024 && $(window).width() <= 1024) ){ //横向pad的分辨率一般都在7以上 padscale = true; } } return padscale; } function showMobileNavFloatLayer(elem) { var iCurNum = $('#MobileNav').attr('navnum') || 1; if (iCurNum == 1 || iCurNum == 5) { $("#pagebody").css({"-ms-transition": "0.5s","-webkit-transition": "0.5s","-khtml-transition": "0.5","-o-transition": "0.5s","-moz-transition": "0.5s","transition": "0.5s"}); var iTranslateX = 0; // if (!$('#pagebody').hasClass('showFloatNav')) { // if (iCurNum == 1) iTranslateX = 17 + 'rem'; // if (iCurNum == 5) iTranslateX = 6 + 'rem'; // } $('#pagebody').css('left', iTranslateX); } else { $("#pagebody").css({"-ms-transition": "","-webkit-transition": "","-khtml-transition": "","-o-transition": "","-moz-transition": "","transition": ""}); } $('#MobileNav').toggleClass('showFloatNav'); $('#MobileNavRenderElem').toggleClass('showFloatNav'); $('#MobileNavFloatLayer').toggleClass('showFloatNav'); $('#pagebody').toggleClass('showFloatNav'); $('#MobileFootNav').toggleClass('showFloatNav'); $('#MobileNavMask').toggleClass('showFloatNav'); } function setMobileNav() { if ($('#MobileNav').length > 0) { var iCurNum = $('#MobileNav').attr('navnum') || 1; var iCurColor = $('#MobileNav').attr('navcolor') || 'black'; var iItemType = $('#MobileNav').attr('navitemtype') || 0; var iEnable = $('#MobileNav').attr('enable') || 0; $('#MobileNav').attr('class', 'mobileNav mobileNav_' + iCurNum + ' ' + iCurColor); $('#MobileNavRenderElem').attr('class', 'mobileNavRenderElem mobileNavRenderElem_' + iCurNum + ' ' + iCurColor); $('#MobileNavFloatLayer').attr('class', 'mobileNavFloatLayer mobileNavFloatLayer_' + iCurNum + ' ' + iCurColor + ' itemType' + iItemType); $('#pagebody').attr('class', $('#pagebody').attr('class').replace(/(pagebody_nav(_\d+)?)|(showFloatNav)/ig, '') + ' pagebody_nav pagebody_nav_' + iCurNum); if ($('#MobileFootNav').length > 0) { $('#MobileFootNav').attr('class', $('#MobileFootNav').attr('class').replace(/(mobileFootNav(_\d+)?)|(showFloatNav)/ig, '') + ' mobileFootNav_' + iCurNum); } $('#MobileNavMask').attr('class', 'mobileNavMask mobileNavMask_' + iCurNum).off('click').on('click', function () { showMobileNavFloatLayer(); }).off('touchstart').on('touchstart', function () { evt = window.event || evt; evt.preventDefault(); showMobileNavFloatLayer(); return false; }) $('#MobileNavFloatLayer').off('click'); $('#MobileNavFloatLayer').off('touchstart'); $('#MobileNavFloatLayer').off('touchmove'); // 分开写是因为pagebody scale后,会影响pagebody同级的100%高度的元素的高度 if ($.inArray(iCurNum, ["1", "2", "5", "8"]) > -1) { $('#MobileNavFloatLayer').off().on('touchstart', function (evt) { evt = window.event || evt; iStartPosY = evt.targetTouches[0].pageY; var top = $(this).children('.itemList').css('top'); if(top == 'auto' || top == '') top = 0; iMobileNavItemListStartTop = parseInt(top); }).on('touchmove', function (evt) { if ($(window).height() > $(this).children('.itemList').outerHeight()) { evt.preventDefault(); return false; } evt = window.event || evt; evt.preventDefault(); iEndPosY = evt.targetTouches[0].pageY; iSlideDistance = iEndPosY - iStartPosY; var iTop = iMobileNavItemListStartTop + iSlideDistance; if (iTop > 0) iTop = 0; var iHiddenHeight = $(window).height() - $(this).children('.itemList').outerHeight() - $('#MobileNavFloatLayer').position().top - parseInt($(this).children('.itemList').css('margin-top')); if (iTop < iHiddenHeight) iTop = iHiddenHeight; if(typeof(window.top.frames['pageframe']) == 'undefined') $('#MobileNavFloatLayer .itemList').css('top', iTop + "px"); return false; }); } if($.inArray(iCurNum, ["2", "3", "8"]) > -1){ $('#MobileNavFloatLayer').css("top",$(".mobileNav").height()) } if($.inArray(iCurNum, ["1", "5"]) > -1){ try{ if(typeof(window.top.frames['pageframe']) != 'undefined') $('#MobileNavFloatLayer').css("top",'0'); }catch(ex){ } } if(iEnable != 1 || $.inArray(iCurNum, ["4", "6", "7"]) > -1){ $('#MobileNavRenderElem').hide(); }else{ //$('#MobileNavRenderElem').show(); } if ($.inArray(iCurNum, ["4"]) > -1) { $('#MobileNavFloatLayer').off().on('touchstart', function (evt) { evt = window.event || evt; iStartPosY = evt.targetTouches[0].pageY; iMobileNavItemListStartTop = parseInt($(this).children('.itemList').css('top')); }).on('touchmove', function (evt) { if ($(this).height() > $(this).children('.itemList').outerHeight()) { evt.preventDefault(); return false; } evt = window.event || evt; evt.preventDefault(); iEndPosY = evt.targetTouches[0].pageY; iSlideDistance = iEndPosY - iStartPosY; var iTop = iMobileNavItemListStartTop + iSlideDistance; if (iTop > 0) iTop = 0; var iHiddenHeight = $(this).height() - $(this).children('.itemList').outerHeight(); if (iTop < iHiddenHeight) iTop = iHiddenHeight; $('#MobileNavFloatLayer .itemList').css('top', iTop + "px"); return false; }); } if (iCurNum == 6) { if (typeof isDesignMode != 'undefined' && isDesignMode === true) { $('#MobileNavFloatLayer').on('click', function () { showMobileNavFloatLayer(); }) } $('#MobileNavFloatLayer').on('touchstart', function (evt) { evt = window.event || evt; var curTarget = $(evt.targetTouches[0].target); if (curTarget.is('.itemLink') || curTarget.is('.icon') || curTarget.is('.menuName')) { return true; } evt.preventDefault(); showMobileNavFloatLayer(); return false; }); } if (iCurNum == 7) { $('#MobileNavFloatLayer').on('touchstart', function (evt) { evt = window.event || evt; iStartPosX = evt.targetTouches[0].pageX; iMobileNavFloatLayerItemListStartPosX = parseInt($(this).children('.itemList').css('left')); }); $('#MobileNavFloatLayer').on('touchmove', function (evt) { evt = window.event || evt; if ($(this).width() > $(this).children('.itemList').outerWidth()) { evt.preventDefault(); return false; } evt.preventDefault(); iEndPosX = evt.targetTouches[0].pageX; iSlideDistance = iEndPosX - iStartPosX; var iItemListLeft = iMobileNavFloatLayerItemListStartPosX + iSlideDistance; if (iItemListLeft > 0) iItemListLeft = 0; var iHiddenWidth = $(this).width() - $(this).children('.itemList').outerWidth(); if (iItemListLeft < iHiddenWidth) iItemListLeft = iHiddenWidth; $('#MobileNavFloatLayer .itemList').css('left', iItemListLeft + "px"); return false; }); } else { $('#MobileNavFloatLayer .itemList').css({ width: '' }); } } } function matchNavAndFootNavBgColor() { setInterval(function () { if ($('#MobileFootNav').attr('bgcolorrelatedtomobilenav') == 0) { var bgcolor = $('.ModuleMobileNavGiant #header').length > 0?$('.ModuleMobileNavGiant #header').css('background-color'):$('#MobileNav').css('background-color'); // console.log(bgcolor,'aaaa'); if($('#MobileFootNav .foot-nav-list').css('background-color') != bgcolor) $('#MobileFootNav .foot-nav-list').css('background-color', bgcolor); } }, 50); } function doSomeWhanPreview() { if (window.location.getQueryString('view') == '1') { $("body").find('a').each(function (i, elm) { if (/^(javascript|#)/i.test($(this).attr('href'))) { return true; } if ($(this).prop('href').indexOf(location.protocol + "//" + location.hostname) == 0) { var url = $(this).attr('href'); if (url) { if($(this).hasClass("ui-tabs-anchor") == false){ // url = url.replace("#", ""); // url = url.indexOf("?") > -1 ? url + "&view=1" : url + "?view=1"; url = url.replace(/^([^\?#]*)(\??)([^#]*)(#?)/, '$1\?$3&view=1$4'); } } $(this).attr('href', url); $(this).attr('target', '_self'); } }); $('.ModuleUserLogin [registerurl]').off().on('click', function (evt) { var url = $(this).attr('registerUrl'); window.location = url.indexOf("?") > -1 ? url + "&view=1" : url + "?view=1"; evt.preventDefault(); return false; }); } } function doLoginWithUserNamePassword(obj) { obj = $(obj); var url = $(obj).attr('action'); if ($.trim($(obj).find('[name=BackUrl]').val()) == '') { //$.trim($(obj).find('[name=BackUrl]').val(location.pathname)); } var data = $(obj).serializeArray(); if (obj.length > 0) { $.ajax({ type: "post", url: url, cache: false, data: data, dataType: "json", success: function (data) { if (!data.success) { alert(data.msg); return; } if (data.msg) { window.location.href = decodeURIComponent(data.msg); } }, error: function (req) { alert(req.responseText); } }); } } function AjaxResetPassword(obj) { if (obj) { var data=$(obj).serialize()+'&act=resetpassword' $.ajax({ type: "POST", url: $(obj).attr('action'), cache: false, beforeSend: function (XMLHttpRequest) { $('input[type="submit"]', $(obj)).hide(); $('.Loading', $(obj)).show(); }, dataType: "json", data: data, success: function (data) { console.log(data); if (data) { if (!data.success){ $('input[type="submit"]', $(obj)).show(); } $('.Loading', $(obj)).hide(); $(".container", $(obj)).show(); $(".errorMsg", $(obj)).html(data.msg); } }, complete: function (XMLHttpRequest, textStatus) { $('input[type="submit"]', $(obj)).show(); $('.Loading', $(obj)).hide(); }, error: function (XMLHttpRequest, textStatus, errorThrown) { $('input[type="submit"]', $(obj)).show(); $('.Loading', $(obj)).hide(); } }); } }; //弹出微信扫码支付的对话框 function WxScanPay(orderid) { if (!-[1, ]) { // ie7,8不允许 alert('很抱歉,当前浏览器不支持微信扫码支付,请升级或更换其他浏览器重试。'); return; } $("#WxScanPayDiv").remove(); var WxScanPayDiv = $('
    '); $("body").append(WxScanPayDiv); $(WxScanPayDiv).dialog({ title: '微信支付 - Pay', modal: true, width: 500, position: 'center', resizable: false, buttons: { "取消": function () { $(this).dialog("close"); } }, close: function () { $("#WxScanPayDiv").remove(); } }); } // 全屏模块绝对定位100%宽度取的是屏幕的可视宽度,当设置的站点宽度超过屏幕可视宽度时候,全屏模块右侧留白,所以定时器设它门一个固定宽度 function keepFullScreenModules100Width() { setInterval(function () { $('body>.ModuleItem').each(function(i,item){ if(!$(this).attr('float')) $(this).css('width', $('#pagebody').width()); //非浮动模块保持全屏 }); }, 200); } function runSlide(id,pattern,time,imageready){ var module = $("#module_" + id); var mm = module.clone(); var text = $('#txt_'+ id); if(text.length == 0){ var text = $(""); } $("body").append(text); var obj = $("#myFocus" + id); // 以下特殊字符必须处理,防止myfocus解析错误 obj.find('img').each(function(){ $(this).attr('alt', ($(this).attr('alt') || '').replace(/[<>&"]/g,function(c){return {'<':'<','>':'>','&':'&','"':'"'}[c];})); $(this).attr('text', ($(this).attr('text') || '').replace(/[<>&"]/g,function(c){return {'<':'<','>':'>','&':'&','"':'"'}[c];})); }); var readyCallback = function(){ // 修复mF_ladyQ风格下,标题文字在第一次循环不显示的bug if(pattern == "mF_ladyQ"){ module.find('.txt li').css({ '-webkit-transition': 'none', '-moz-transition': 'none', '-o-transition': 'none' }); } } if(module.css("position") != "absolute"){ var width = module.parent().width() - parseInt(module.parent().css("padding-left")) - parseInt(module.parent().css("padding-right")); if(!obj.attr("hasreload")){ obj.find("*[name=slideImg]").each(function(i,item){ var src = $(item).attr("src"); $(item).src = ''; $(item).on("load",function(){ if(obj.attr("hasreload")) return; if($(item).height() == 0) return; obj.height($(item).height()); module.height($(item).height()); obj.width(width); module.width(width); obj.attr("hasreload","1"); myFocus.set({ id: "myFocus" + id, pattern: pattern, loadIMGTimeout: 0, time: time}, readyCallback); }); $(item).src = src; }); } }else{ myFocus.set({ id: "myFocus" + id, pattern: pattern, loadIMGTimeout: 0, time: time}, readyCallback); var $Img = module.find('img[name=slideImg]'); if(pattern == 'mF_slide3D'){ $Img.attr({'style':null,'width':null}); setTimeout(function(){ $('.mF_slide3D_wrap').css({'padding':0}); console.log($('.mF_slide3D_wrap'))},150) }else if(pattern == 'mF_YSlider'){ var imgHeight = module.height(); $Img.attr({'style':'height:'+imgHeight+'px'}); }else if(pattern == 'mF_shutters'){ var imgHeight = module.height(); var imgWidth = module.width(); console.log(imgHeight,imgWidth); $Img.attr({'style':'height:'+imgHeight+'px','width':imgWidth}); } } module.attr({"mid":id,"pattern":pattern,"time":time}); } function runMobileSlide(moduleid){ $(window).load(function(){ $('#swiper' + moduleid).width($('#module_' + moduleid).parent().width()); $('#module_' + moduleid).resize(function(){ $('#swiper' + moduleid).width($('#module_' + moduleid).parent().width()); window['swiper' + moduleid].destroy(false); window['swiper' + moduleid] = new Swiper('#swiper' + moduleid,{ autoplay:3000,loop : true,pagination : '.SNum' + moduleid }); }); window['swiper' + moduleid] = new Swiper('#swiper' + moduleid,{ autoplay:3000,loop : true,pagination : '.SNum' + moduleid }); }); } // 调整幻灯片模块显示样式 function adjustModuleSlide(obj) { if (!obj) { var moduleSlides = $('.ModuleSlide').parent(); for (var i = 0; i < moduleSlides.length; i++) { adjustModuleSlide(moduleSlides[i]); } } obj = $(obj); if (obj.children().is('.ModuleSlide') && SiteType == 0) { var moduleid = obj.attr('id').replace(/module_/i, ''); var aa = $("#txt_" + moduleid); var mm = $(aa.val().replace("runSlide","")); mm.css({"position":obj.css("position"),"left":obj.css("left"),"top":obj.css("top"),"width":obj.width() + "px", "height":obj.height() + "px"}); var myfocusObj = mm.find('#myFocus' + moduleid); var moduleHead = mm.find('.ModuleHead').get(0); var moduleHeadHeight = moduleHead ? mm.find('.ModuleHead').get(0).offsetHeight : 0; myfocusObj.height(mm.height() - moduleHeadHeight); myfocusObj.width(mm.width()); $(obj).replaceWith(mm); var id = obj.attr("mid"); var pattern = obj.attr("pattern"); var time = obj.attr("time"); runSlide(id,pattern,time); } } //显示产品、文章等子分类 function setModuleCls(obj) { var strCls = ".ModuleProductCls,.ModuleNewsCls,.ModuleDownCls,.ModuleNewsClsV2,.ModuleProductClsV2"; if (!obj) { var moduleCls = $(strCls); for (var i = 0; i < moduleCls.length; i++) { setModuleCls(moduleCls[i]); } } obj = $(obj); var showStyle = obj.find("[class*=ModuleClsShowStyle]").attr('showstyle'); if (showStyle == 0) { var hidesubTimer = new Object(); obj.find(".SHOWSUB>li").mouseover(function () { var moduleid = $(this).closest('.ModuleItem').attr("id").replace('module_', ''); var id = 'subclass' + $(this).children("ul").attr("id"); var obj = $(this).get(0); var type = ''; var moduleClasses = $(this).closest(strCls).attr('class').split(/\s+/); var clsClasses = strCls.split(','); for(var i = 0; i < moduleClasses.length; i++){ for(var j = 0; j < clsClasses.length; j++){ if(clsClasses[j].replace(/\s|\./g, '') == moduleClasses[i]){ type = moduleClasses[i]; break; } } if(type) break; } $(obj).removeClass("SubMaskColor"); $(obj).removeClass("SubMaskBorder1"); $("#mask" + id).remove(); $("#" + id).remove(); if (!$(this).children("ul").html()) return; var obj = $(this).get(0); var p = $(""); p.append($(this).children("ul").clone()); p.children("ul").css("display", "block"); p.off().mouseenter(function () { clearTimeout(hidesubTimer[id]); }).mouseleave(function () { $("#" + id).remove(); $("#mask" + id).remove(); $(obj).removeClass("SubMaskColor"); $(obj).removeClass("SubMaskBorder1"); }); $("body").append(p); var zindex = parseInt($(this).css("z-index")); if (isNaN(zindex)) zindex = 0; $("body").append("
    "); $(this).addClass("SubMaskColor"); $(this).addClass("SubMaskBorder1"); var borderwidth = parseInt($("#" + id).css("border-top-width")); if (isNaN(borderwidth)) borderwidth = 0; var func = function () { $("#" + id).css({ "display": "block", "top": $(obj).offset().top, "left": ($(obj).offset().left + $(obj).width()) }); $("#mask" + id).css({ "top": $(obj).offset().top + borderwidth, "left": ($(obj).offset().left + $(obj).width() - 3) }); }; func(); setTimeout(func, 50); //因为如果从一个分类快速切换到另一个分类,原分类会延时50ms才会消失,这时如果原分类有border,会占了几个像素的高度,会导致后面的分类位置计算不准,这里延时50ms重新计算一下解决了这个问题 }).mouseleave(function () { $(this).children("ul").hide(); var id = 'subclass' + $(this).children("ul").attr("id"); var obj = $(this).get(0); hidesubTimer[id] = setTimeout(function () { $(obj).removeClass("SubMaskColor"); $(obj).removeClass("SubMaskBorder1"); $("#mask" + id).remove(); $("#" + id).remove(); }, 50); }); } else if (showStyle == 3) { obj.find('.MainClassItem:last-child').css({ borderBottom: '0px' }); } else if (showStyle == 7) { obj.find('.clsAllList > .clsItem').off().on('mouseenter', function () { var moduleItem = $(this).closest('.ModuleItem'); var moduleid = moduleItem.attr('id'); moduleid = moduleid.replace('module_', ''); var floatElem = $('
    ').append('
    '); floatElem.children('.clsAllList').append($(this).find('.clsItemList').clone()); $('body').append(floatElem); $('body').append('
    '); var moduleZIndex = parseFloat(moduleItem.css('z-index')); if (isNaN(moduleZIndex)) moduleZIndex = 0; moduleZIndex++; moduleZIndex = 9999; var floatElemMinHeight = moduleItem.find('.clsAllList').height(); moduleItem.find('.clsAllList > .clsItem').removeClass('hover'); $(this).addClass('hover'); floatElem.css({ position: 'absolute', top: getElementTopWithBorder(moduleItem[0]), left: getElementLeftWithBorder(moduleItem[0]) + moduleItem.outerWidth(false), zIndex: moduleZIndex }); floatElem.find('.clsItemList').css({ position: 'static', minHeight: floatElemMinHeight }).show(); $('.ModuleProductClsStyle7_Mask').css({ position: 'absolute', left: Math.ceil((getElementLeftWithBorder(this) + $(this).width()).toFixed(2)) * 100 / 100 - 1, top: getElementTopWithBorder(this), zIndex: moduleZIndex, width: parseFloat(moduleItem.find('.clsAllList').css('border-right-width')) + parseFloat(moduleItem.css('border-right-width')) + parseFloat(floatElem.find('.clsAllList').css('border-left-width')) + 1, height: parseFloat(moduleItem.find('.clsItem').height()) }); $('.ModuleClsShowStyle7_floatElem').off().on('mouseleave', function (evt) { $('.ModuleClsShowStyle7_floatElem').remove(); $('.ModuleProductClsStyle7_Mask').remove(); $('#module_' + $(this).attr('relatedmoduleid')).find('.clsAllList > .clsItem').removeClass('hover'); }); $('.ModuleProductClsStyle7_Mask').off().on('mouseleave', function (evt) { var relatedTarget = evt.toElement || evt.relatedTarget; if (!$(relatedTarget).closest('.ModuleClsShowStyle7').hasClass('ModuleClsShowStyle7_floatElem') && !$(relatedTarget).hasClass('ModuleProductClsStyle7_Mask')) { $('.ModuleClsShowStyle7_floatElem').remove(); $('.ModuleProductClsStyle7_Mask').remove(); $('#module_' + $(this).attr('relatedmoduleid')).find('.clsAllList > .clsItem').removeClass('hover'); } }); }).on('mouseleave', function (evt) { var relatedTarget = evt.toElement || evt.relatedTarget; if (!$(relatedTarget).closest('.ModuleClsShowStyle7').hasClass('ModuleClsShowStyle7_floatElem') && !$(relatedTarget).hasClass('ModuleProductClsStyle7_Mask')) { $('.ModuleClsShowStyle7_floatElem').remove(); $('.ModuleProductClsStyle7_Mask').remove(); $(this).removeClass('hover'); } }); } } /** * 克隆元素样式 * @author tang bin * @version 0.1 * @see http://www.planeart.cn/?p=1499 * @param {HTMLElement} 被克隆的元素 * @param {Boolean} 是否启用缓存(默认true) * @return {String} css类名 */ var cloneStyle = (function (doc) { var rstyle = /^(number|string)$/, cloneName = '${cloneName}', sData = {}, addHeadStyle = function (content) { var style = sData[doc]; if (!style) { style = sData[doc] = doc.createElement('style'); doc.getElementsByTagName('head')[0].appendChild(style); }; style.styleSheet && (style.styleSheet.cssText += content) || style.appendChild(doc.createTextNode(content)); }, getStyle = 'getComputedStyle' in window ? function (elem, name) { return getComputedStyle(elem, null)[name]; } : function (elem, name) { return elem.currentStyle[name]; }; return function (source, cache) { if (!cache && source[cloneName]) return source[cloneName]; var className, name, cssText = [], sStyle = source.style; for (name in sStyle) { val = getStyle(source, name); if (val !== '' && rstyle.test(typeof val)) { name = name.replace(/([A-Z])/g, "-$1").toLowerCase(); cssText.push(name); cssText.push(':'); cssText.push(val); cssText.push(';'); }; }; cssText = cssText.join(''); source[cloneName] = className = 'clone' + (new Date).getTime(); addHeadStyle('.' + className + '{' + cssText + '}'); return className; }; }(document)); function runAllAnimate(list){ if(!list) list = $(".ModuleItem"); $(list).each(function(i,item){ var html = $(item)[0].outerHTML; var animatename = $(item).attr("animate"); if(!animatename){ var match = html.match(/wow\s+([a-z]+)/gi); if(match){ animatename = match[0].replace(/wow\s+/,''); } } if(animatename){ if(html.indexOf("ModuleFullSwitch") > -1) return; $(item).removeClass(animatename); var duration = $(item).attr("data-wow-duration"); var delay = $(item).attr("data-wow-delay"); var animate = {"animation-name":animatename}; if(duration) animate["animation-duration"] = duration; if(delay) animate["animation-delay"] = delay; $(item).css({"animation-name":'aaa'}); setTimeout(function(){ $(item).css({"animation-name":animatename,"animation-duration":duration,"animation-delay":delay}); },10); $(item).attr("animate",animatename); } }); } // pc相册 function adjustModuleSiteGallery(moduleID) { // TODO box-sizing: content-box 计算margin var iSingleItemWidth = $("#module_" + moduleID + " .imgItem").outerWidth(); var iModuleWidth = $("#module_" + moduleID).width(); var iModuleHeight = $("#module_" + moduleID).height(); var iColCount = Math.floor(iModuleWidth / iSingleItemWidth); var iTotalCount = $("#module_" + moduleID + " .imgItem").length; $("#module_" + moduleID + " .imgItem").each(function (i) { if (i % iColCount == 0) { $(this).css({ marginLeft: 0 }); } else if (i % iColCount == iColCount - 1) { $(this).css({ marginRight: 0 }); } if (i < iColCount) { $(this).css({ marginTop: 0 }); } else if (i > iTotalCount - iColCount) { $(this).css({ marginBottom: 0 }); } }); } // 初始化pc相册 function setModuleSiteGallery(obj) { var defaults = { padding: 0, prevEffect: 'fade', nextEffect: 'fade', viewDetails: '查看详情', closeBtn: true, openOpacity: true, helpers: { overlay: { css: { 'background': 'rgba(0,0,0, 0.9)' }, closeClick: false }, title: { type: 'outside' }, //buttons: {}, thumbs: { width: 50, height: 50, position: 'bottom' } }, modal: false, tpl: { next: '', prev: '' }, beforeLoad: function () { if (this.element) { var oImg = $(this.element).children('img'); var sLink = ''; if (oImg.attr('redirectUrl') + '' != '') { sLink = ''+obj.viewDetails+''; } this.title = oImg.attr('alt') + sLink; } else { var sLink = ''; if (this.url) { sLink = ''+obj.viewDetails+''; } this.title = this.title + sLink; } }, afterShow: function () { if ($('.fancybox-overlay>.fancybox-prev').length == 0) { $('.fancybox-outer>.fancybox-prev').appendTo('.fancybox-overlay'); } else { $('.fancybox-outer>.fancybox-prev').remove(); } if ($('.fancybox-overlay>.fancybox-next').length == 0) { $('.fancybox-outer>.fancybox-next').appendTo('.fancybox-overlay'); } else { $('.fancybox-outer>.fancybox-next').remove(); } if ($('.fancybox-overlay>.fancybox-close').length == 0) { $('.fancybox-skin>.fancybox-close').appendTo('.fancybox-overlay').css({ right: "0px", top: "0px" }); } else { $('.fancybox-skin>.fancybox-close').remove(); } //更新前一张和下一张的遮盖高度,不遮住下面的超链接 var fancyboxInner = $(".fancybox-inner").eq(0); var fancyboxWrap = $(".fancybox-wrap").eq(0); if(fancyboxInner && fancyboxWrap) { var top = parseInt(fancyboxWrap.css("top").replace("px", "")); var height = fancyboxInner.height(); $(".fancybox-next").css("height", height + top); $(".fancybox-prev").css("height", height + top); } } } if (obj.effectID != 0) delete defaults.helpers.thumbs; $("#module_" + obj.moduleID + " .imgBox img").css('position', 'relative'); if (obj.isExpandDir == 0) { $("#module_" + obj.moduleID + " .imgBox").off().click(function () { $.fancybox.open(obj.galleryItems[$("#module_" + obj.moduleID + " .imgBox").index(this) + 1], defaults); return false; }); } else { $("#module_" + obj.moduleID + " .imgBox").off().click(function () { var items = obj.galleryItems[1] || []; for (var i = 0; i < items.length; i++) { if (($(this).prop('href') + '').replace(/\?.*$/, '').indexOf((items[i].href + '').replace(/\?.*$/, '')) > -1) { break; } } var opts = $.extend({}, defaults); opts.index = i; $.fancybox.open(obj.galleryItems[1], opts); return false; }); } $("#module_" + obj.moduleID + " .imgBox img").each(function () { var sSrc = $(this).attr('src'); $(this).attr('src', ''); $(this).off('load').on('load', function () { $(this).attr('originWidth', $(this).parent().width()); $(this).attr('originHeight', $(this).parent().height()); }); $(this).attr('src', sSrc); }); $("#module_" + obj.moduleID + " .imgBox img").off('mouseover').on('mouseover', function () { var oZoomImage = $(this); var iOriginWidth = oZoomImage.attr('originWidth') || $(this).parent().width(); var iOriginHeight = oZoomImage.attr('originHeight') || $(this).parent().height(); var iZoomPx = 50; oZoomImage.stop().animate({ left: -iZoomPx / 2 + 'px', top: -iZoomPx / 2 + 'px', width: parseInt(iOriginWidth) + iZoomPx + 'px', height: parseInt(iOriginHeight) + iZoomPx + 'px' }, 600); $('.imgMask').remove(); var iLeft = parseFloat($(this).closest('.imgItem').css('padding-left')); var iTop = parseFloat($(this).closest('.imgItem').css('padding-top')); $('
    ').css({ left: iLeft + 'px', top: iTop + 'px', width: iOriginWidth + 'px', height: iOriginHeight + 'px' }).insertAfter(this).off().on('mouseleave', function () { var oZoomImage = $(this).closest('.imgItem').find('.imgBox img'); var iOriginWidth = oZoomImage.attr('originWidth'); var iOriginHeight = oZoomImage.attr('originHeight'); oZoomImage.stop().animate({ left: '0', top: '0', width: iOriginWidth + 'px', height: iOriginHeight + 'px' }, 600); $('.imgMask').remove(); }).on('click', function () { }) }); } function setMobileModuleSiteGallery(obj){ if (obj.isExpandDir == 0) { $("#module_" + obj.moduleID + " .grid-cont").off().click(function () { $(this).lightGallery({ dynamic: true, thumbnail: true, dynamicEl:obj.galleryItems[$("#module_" + obj.moduleID + " .grid-cont").index(this) + 1] }); return false; }); } } // 初始化音乐模块 function initModuleMusic(opts) { var bgMusicFilePath = opts.bgMusicFilePath; var moduleid = opts.moduleid; var siteType = opts.siteType; var isAutoPlay = opts.isAutoPlay; var isLoop = opts.isLoop; var canPlay = opts.canPlay; if (canPlay) { var ua = navigator.userAgent.toLowerCase(); var elem = $('#module_' + moduleid); if (siteType == 0) { if (ua.match(/msie ([\d.]+)/)) { $(elem).find('#music' + moduleid).html(''); } else if (ua.match(/firefox\/([\d.]+)/)) { $(elem).find('#music' + moduleid).html(''); } else if (ua.match(/chrome\/([\d.]+)/)) { $(elem).find('#music' + moduleid).html(''); } else if (ua.match(/opera.([\d.]+)/)) { $(elem).find('#music' + moduleid).html('<bgsounds src="' + bgMusicFilePath + '">'); } else if (ua.match(/version\/([\d.]+).*safari/)) { $(elem).find('#music' + moduleid).html(''); } else { $(elem).find('#music' + moduleid).html(''); } } else { $(elem).find('#music' + moduleid).html(''); } if (/(iphone)|(ipad)/i.test(ua)) { function forceSafariPlayAudio() { audioEl.load(); // iOS 9 还需要额外的 load 一下, 否则直接 play 无效 audioEl.play(); // iOS 7/8 仅需要 play 一下 } var audioEl = $('#music' + moduleid).find('audio')[0]; audioEl.addEventListener('play', function () { // 当 audio 能够播放后, 移除这个事件 window.removeEventListener('touchstart', forceSafariPlayAudio, false); }, false); // 由于 iOS Safari 限制不允许 audio autoplay, 必须用户主动交互(例如 click)后才能播放 audio, // 因此我们通过一个用户交互事件来主动 play 一下 audio. window.addEventListener('touchstart', forceSafariPlayAudio, false); audioEl.src = bgMusicFilePath; } } function setMusicImg(moduleid, isPlaying) { var musicImg = $('#musicPic' + moduleid).find('img'); if (isPlaying) { musicImg.attr('src', musicImg.attr('playing_src')).addClass('playing'); } else { musicImg.attr('src', musicImg.attr('_src')).removeClass('playing'); } } setMusicImg(moduleid, isAutoPlay); $('#musicPic' + moduleid).off().on('click', function () { var audioEl = $('#music' + moduleid).find('audio')[0]; if (audioEl) { if (audioEl.paused) { audioEl.play(); setMusicImg(moduleid, true); } else { audioEl.pause(); setMusicImg(moduleid, false); } } audioEl = $('#music' + moduleid).find('embed')[0]; if (audioEl) { if (audioEl.playState == 2) { audioEl.pause(); setMusicImg(moduleid, false); } else { audioEl.play(); setMusicImg(moduleid, true); } } audioEl = $('#music' + moduleid).find('object')[0]; if (audioEl) { if (audioEl.PlayState == 2) { audioEl.Pause(); setMusicImg(moduleid, false); } else { audioEl.Play(); setMusicImg(moduleid, true); } } }); } // 初始化标签页模块 function initModuleTabContainer(moduleID, showStyle){ //有swiper组件的都要在初始化模块的时候讲模块名称增加"Swiper",以下为例子 //其余正常例子只需要initFunc //*注:因为swper轮播组件初始化的时候回判断元素是否被隐藏,如果被隐藏泽不会被初始化成功 //swper模块必须注册该事件 //如果有swiper隐藏的模块,记得注册该事件 $("#module_"+moduleID+" .Nav-Container").on({ "click":function(){solveSwiperEvent()}, "mouseover":function(){solveSwiperEvent()} }); var solveSwiperEvent = function(){ for (var key in window) { if (key.substr(0, 14) == 'initSwiperFunc') { var mid = key.substr(14); if($("#module_"+moduleID+" #module_"+mid).length > 0){ window[key](); } } } } if(showStyle == 0){ var module = $('#module_' + moduleID); if(module.length == 0) return; $('.btnScrollRight', module).on('click', function(){ var panelBtnScrollLeft = $(this).parent().position().left; var targetElem = null; var oldscrollLeft = ('.nav', module).scrollLeft(); $('.nav', module).children('li').each(function(i){ var leftEdgeLeft = $(this).position().left; var rightEdgeLeft = $(this).position().left + $(this).outerWidth(true); if(oldscrollLeft <= leftEdgeLeft){ targetElem = $(this); return false; } }); if(targetElem){ var scrollLeft = $('.nav', module).scrollLeft() + targetElem.position().left + targetElem.outerWidth(true) - panelBtnScrollLeft; var scrollLeft2 = $('.nav', module).scrollLeft() + targetElem.outerWidth(true); var marginRight = 0; if(targetElem.is($('.nav>li:last', module))){ marginRight = $('.panelBtnScroll', module).outerWidth(true) + 10; scrollLeft = getNavRealWidth(); } $('.nav', module).stop().animate({'scrollLeft': scrollLeft2, 'margin-right': marginRight}, 300, function(){ setButtonDisabled(); }); } }); $('.btnScrollLeft', module).on('click', function(){ var targetElem = null; $('.nav', module).children('li').each(function(i){ if($(this).position().left + $(this).outerWidth(true) >= 0){ targetElem = $(this); return false; } }); if(targetElem){ var scrollLeft = $('.nav', module).scrollLeft() + targetElem.position().left; $('.nav', module).stop().animate({'scrollLeft': scrollLeft, 'margin-right': 0}, 300, function(){ setButtonDisabled(); }); } }); function getNavRealWidth(){ var width = 0; $('.nav>li', module).each(function(){ width += $(this).outerWidth(true); }); return width; } function setButtonDisabled(){ if($('.nav', module).scrollLeft() == 0){ $('.btnScrollLeft', module).css('color', '#ccc'); }else{ $('.btnScrollLeft', module).css('color', ''); } var navRealWidth = getNavRealWidth(); if($('.nav', module).scrollLeft() + $('.nav', module).outerWidth(true) >= navRealWidth && parseFloat($('.nav', module).css('margin-right') || 0) > 0){ $('.btnScrollRight', module).css('color', '#ccc'); }else{ $('.btnScrollRight', module).css('color', ''); } } function setPanelBtnScroll(){ var navRealWidth = getNavRealWidth(); if(isMobileBroswer()){ $('.nav', module).css('overflow', 'auto'); }else{ $('.nav', module).css('overflow', 'hidden'); } if(!isMobileBroswer() && navRealWidth > $('.nav', module).width()){ $('.panelBtnScroll', module).show(); }else{ $('.panelBtnScroll', module).hide(); } $('.panelBtnScroll').css({ 'height': $('.nav', module).outerHeight(), 'padding-top': ($('.nav', module).outerHeight() - $('.panelBtnScroll>:first-child', module).outerHeight()) / 2 }); /*如果是新的标签模块;左右的按钮重新定位(基于按钮居中)*/ if(module.find('.ModuleTabContainerGiant').length>0){ var pdtp = Number($('.Nav-Container li', module).css('margin-top').replace(/px/,''))+$('.Nav-Container li', module).outerHeight()/2-11; module.find('.panelBtnScroll').css({ 'padding-top':pdtp }) } setButtonDisabled(); } setPanelBtnScroll(); $(window).off('resize.tabContainer' + moduleID).on('resize.tabContainer' + moduleID, function(){ setPanelBtnScroll(); }); $('.panelBtnScroll, .nav', module).disableSelection(); } } // 重调全屏幻灯片模块 function adjustModuleFullSlide(moduleid){ moduleid = (moduleid + '').replace(/^module_/i, ''); var data = $('#module_' + moduleid).find('#Full' + moduleid).data('params'); if(data){ var height = $('#module_' + moduleid).height(); CoolSlide('#Full' + moduleid, height, data.effect, data.time, data.imgshowtype); } } // 产品详情二维码控制 function initProductDetailQrcode(qrcodeText){ var moduleProductDetailQrcodeTimeoutId = "moduleProductDetailQrcode"; $(".icon-qrcode").on("mouseenter click",function(){ if (window[moduleProductDetailQrcodeTimeoutId]) { clearTimeout(window[moduleProductDetailQrcodeTimeoutId]); } $("#divQrcode").remove(); var html = "
    "; html += "
    " + qrcodeText + "
    "; html += "
    "; $("body").append(html); $('#pro-qrcode').qrcode({text:location.href.replace(/(\?|#).*$/,''),width:140,height:140}); $("#divQrcode").css({top:$(this).offset().top + 30,left:$(this).offset().left - $('#divQrcode').width() + 30}); $('#divQrcode').off('mouseenter').on('mouseenter', function(){ if (window[moduleProductDetailQrcodeTimeoutId]) { clearTimeout(window[moduleProductDetailQrcodeTimeoutId]); } }); $(".icon-qrcode, #divQrcode").off("mouseleave").on("mouseleave",function(evt){ evt = evt || window.event; var relatedTarget = evt.relatedTarget || evt.toElement; if ($(relatedTarget).is('.icon-qrcode, #divQrcode') || $(relatedTarget).closest('.icon-qrcode, #divQrcode').length > 0) { return false; } if (window[moduleProductDetailQrcodeTimeoutId]) { clearTimeout(window[moduleProductDetailQrcodeTimeoutId]); } window[moduleProductDetailQrcodeTimeoutId] = setTimeout(function() { $("#divQrcode").remove(); }, 300); }); }); } //点击发送短信验证码 var InterValObj; //timer变量,控制时间 var count = 60; //间隔函数,1秒执行 var curCount;//当前剩余秒数 function sendMessage(ModuleID) { var mobile = $('#resetMobile'+ModuleID).val(); var mobilereg = /^1[3|4|5|7|8]\d{9}$/; if(!mobilereg.test(mobile)){ alert('请输入有效的手机号码!'); return false; }  curCount = count; //设置button效果,开始计时 $("#btnSendCode"+ModuleID).attr("disabled", "true"); $("#btnSendCode"+ModuleID).text("请在" + curCount + "秒内输入验证码"); InterValObj = window.setInterval(function(){SetRemainTime(ModuleID);}, 1000); //启动计时器,1秒执行一次 //向后台发送处理数据 $.ajax({   type: "POST", //用POST方式传输   dataType: "JSON", //数据格式:JSON   url: '/index.php?c=Front/Userlogin&a=getcode', //目标地址    data: {mobile:mobile},    error: function (XMLHttpRequest, textStatus, errorThrown) { },   success: function (data){ if(data.success){ alert(data.msg); } if(!data.success){ alert(data.msg); }   } }); } //timer处理函数 function SetRemainTime(ModuleID) { if (curCount == 0) { window.clearInterval(InterValObj);//停止计时器 $("#btnSendCode"+ModuleID).removeAttr("disabled");//启用按钮 $("#btnSendCode"+ModuleID).text("重新发送验证码"); } else { curCount--; $("#btnSendCode"+ModuleID).text("请在" + curCount + "秒内输入验证码"); } } //将url中的querystring转为对象 function getQueryParam(){ if(!document.location.search) return null; var URLParams = new Object(); var aParams = document.location.search.substr(1).split('&'); for (i = 0 ; i < aParams.length ; i++) { var aParam = aParams[i].split('='); var value = aParam[1]; if(value && value.indexOf("#") > -1) value = value.substring(0,value.indexOf("#")); URLParams[aParam[0]] = decodeURIComponent(value); } return URLParams; } //替换指定的模块 window.replaceModules = {}; function replaceModule(moduleid){ if(window.replaceModules['moduleid'] || moduleid == 0 || moduleid == 'module_0') return; var params = getQueryParam(); var str = ''; for(key in params){ if(key != 'c' && key != 'moduleId') str += "&"+key+"="+escape(params[key]); } $.get("/index.php?c=front/LoadModule&moduleId=" + moduleid + str,null,function(data){ window.replaceModules['moduleid'] = true; $('#' + moduleid).replaceWith(data); $('#' + moduleid).find('.ModuleUserLogin,.ModuleUserLoginV2').find('.userLoginContent').show().css('visibility','visible'); }); } // 获取当前页面url参数 if (!window.location.getQueryString) window.location.getQueryString = function (name) { var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i"); var r = window.location.search.substr(1).match(reg); if (r != null) return (r[2]); return null; } // jquery resize事件 if (!jQuery.resize) { (function ($, h, c) { var a = $([]), e = $.resize = $.extend($.resize, {}), i, k = "setTimeout", j = "resize", d = j + "-special-event", b = "delay", f = "throttleWindow"; e[b] = 250; e[f] = true; $.event.special[j] = { setup: function () { if (!e[f] && this[k]) { return false } var l = $(this); a = a.add(l); $.data(this, d, { w: l.width(), h: l.height() }); if (a.length === 1) { g() } }, teardown: function () { if (!e[f] && this[k]) { return false } var l = $(this); a = a.not(l); l.removeData(d); if (!a.length) { clearTimeout(i) } }, add: function (l) { if (!e[f] && this[k]) { return false } var n; function m(s, o, p) { var q = $(this), r = $.data(this, d); r.w = o !== c ? o : q.width(); r.h = p !== c ? p : q.height(); n.apply(this, arguments) } if ($.isFunction(l)) { n = l; return m } else { n = l.handler; l.handler = m } } }; function g() { i = h[k](function () { a.each(function () { var n = $(this), m = n.width(), l = n.height(), o = $.data(this, d); if (m !== o.w || l !== o.h) { n.trigger(j, [o.w = m, o.h = l]) } }); g() }, e[b]) } })(jQuery, this); } // *** 分享推广代码 // 如果原来没有设置推广来源 //$(window).load(function(){ var match = window.location.href.match(/#invite(\d+)/i); if(match){ if(window.location.toString().indexOf("debug") > -1) alert(document.cookie); $.get("/index.php?c=SetCookie&name=invite&value=" + match[1]); //用js设置cookie会令.net取不到正确的值,要改为用aspnet的程序来设置 } //}); // 生成当前用户的推广链接 var match = document.cookie.match(/WebUserID=(\d+)/i); if(match){ var WebUserID = match[1]; var um = navigator.userAgent.match(/MicroMessenger/gi); if(um || true){ if(window.location.toString().indexOf("#invite") == -1 && window.location.toString().indexOf("?invite=" + WebUserID) == -1){ window.location.href = window.location + "#invite" + WebUserID; } } } // *** END OF 分享推广代码 //*** start of 自动转换字体大小 var rootfont = parseFloat($("html").css('font-size')); function torem(px){ if(px > 22) px = 22; if(px < 12) px = 12; return parseFloat(px / rootfont)+'rem'; } function changeFontSize(parentObj){ if(SiteType != "1") return; var modules = null; var selector = ".ModuleNewsDetail,.ModuleNewsDetailV2,.ModuleProductDetail,.ModuleProductDetailV2,.ModuleImageTextV2,.ModuleImageText,.ModuleNewsDetailGiant,.ModuleProductDetailGiant,.ModuleImageTextGiant"; if(parentObj) modules = $(parentObj).find(selector); else modules = $(selector); modules.each(function(i,module){ var mp = $(module).closest(".ModuleItem"); if(mp.css("position") == "absolute") return; var texts = null; if(mp.is(".ModuleProductDetail") || mp.is(".ModuleProductDetailV2")) texts = $(module).find(".goods-detail-content,.pro-detail-content").find("div,span,td,p,li,a,font"); else if(mp.is(".ModuleNewsDetail") || mp.is(".ModuleNewsDetailV2")) texts = $(module).find(".NewsContent").find("div,span,td,p,li,a,font"); else texts = $(module).find("div,span,td,p,li,a,font"); texts.each(function(j,item){ if($(item).is(".goods-attrval-name"))return; // clone后,就算没加到body,clone元素里面的图片资源也会真的去请求 // 这个特性会导致验证码失效,所以会另外一种方法 // var tmp = $(item).clone(); var tmp = $(item).children().length == 0 ? $(item).clone() : $("
    "+$(item).html().replace(/]+c=validatecode[^>]+>/ig, '')+"
    "); tmp.find(':nth-child(n)').remove(); if(tmp.text().trim().length <= 8) return; if($(window).width() > 900){ if($(item).attr('ori-font-size')){ $(item).css('font-size',$(item).attr('ori-font-size')); $(item).attr('ori-font-size',null); } if($(item).attr('ori-line-height')){ $(item).css('line-height',$(item).attr('ori-line-height')); $(item).attr('ori-line-height',null); } return; } var oldfontsize = $(item).css('font-size'); var lineheightScal = parseFloat($(item).css('line-height'))/parseFloat(oldfontsize); if(/(px)$/.test(oldfontsize)){ var fontsize = parseFloat(oldfontsize); var newsize = torem(fontsize); $(item).css('font-size',newsize); if(!$(item).attr('ori-font-size')) $(item).attr('ori-font-size',oldfontsize); if(lineheightScal > 1){ $(item).css('line-height',(lineheightScal*100)+"%"); //保持比例 if(!$(item).attr('ori-line-height')) $(item).attr('ori-line-height',(lineheightScal*100)+"%"); } } }); }); } $(window).load(function(){ console.log('JScsipt 自动转换字体大小'); initSubtreeFont=function(){};changeFontSize()}); $(window).resize(function(){changeFontSize()}); //*** end of 自动转换字体大小 //** start of 模块浮动 if(typeof(floaters) != 'undefined'){ //一些独立的页面(比如店掌柜的)要加载JScript,但又不需要模块浮动的功能,就不必初始化了 var floatplayer = new floaters(); var floatElems = new Array(); function runFloaters(module,action) { if(typeof(module) == 'string') module = $('#'+module); if(action == 'remove'){ module.css("overflow-y",'auto'); module.css("display","block"); floatplayer.remove(module.attr('id')); return; } if(/^(float\-)/i.test(module.attr('float'))){ module.css("overflow-y",'hidden'); module.appendTo("body"); module.show(); var top = parseInt(module.attr('floaty')); if(isNaN(top)) top = parseInt(module.css('top')); var id = module.attr('id'); if(/^(float\-left)/i.test(module.attr('float'))){ var left = parseInt(module.attr('floatx')); if(isNaN(left)) left = parseInt(module.css('left')); var options = {'floaterID':id,'distanceFromPageLeft':left,'distanceFromPageTop':top,width:module.css('width'),'xFloat':'left'}; var floatElem = floatplayer.addItem2(options,action); floatElems.push(floatElem); }else if(/^(float\-right)/i.test(module.attr('float'))){ var right = parseInt(module.attr('floatx')); if(isNaN(right)) right = parseInt(module.css('right')); var options = {'floaterID':id,'distanceFromPageRight':right,'distanceFromPageTop':top,'xFloat':'right'}; var floatElem = floatplayer.addItem2(options,action); floatElems.push(floatElem); } floatplayer.play2(); } } setInterval(function(){ for(var k=0;k 110) height = 110; if((st == "2" || st == "4") && height > 80) height = 80; $(item).height(height); }); var hasText = false; m.find(".JiuGongItemText").each(function(i,item){ if(st == 4) $(item).css('line-height',$(item).height()+'px'); hasText = true; }); //只有图标没有标题时,不限制图标的大小 if(hasText == false){ m.find(".JiuGongItemImg").each(function(i,item){ $(item).css({"width":"auto","height":"auto"}); }); m.find(".JiuGongItem").each(function(i,item){ $(item).css({"width":"auto","height":"auto"}); }); return; } var cc = parseInt(m.find('.JiuGongTab').attr("CellCount")); if(st == "0"){ //上下结构 m.find(".JiuGongItemImg").each(function(i,item){ var w = 50,h = 50; if(cc >=5 && m.width() < 700) w = 40,h = 40; $(item).css({"max-width":w,"max-height":h}); }); } if(st == "2"){ //左右结构 m.find(".JiuGongItemImg,.JiuGongItemImg2").each(function(i,item){ var w = 30,h = 30; if(cc <=2) w = 40,h = 40; if(m.width() > 700) w = 50,h = 50; $(item).css({"min-width":w,"min-height":h}); }); } }else{ var modules = $(".ModuleJiuGongV2").closest(".ModuleItem"); $.each(modules,function(i,item){ computeJiuGondHeight(item); }); } } //地图模块初始化 var citylocation, map, marker, infoWin = null; function moduleMap(latitude, longitude, title) { var center = new qq.maps.LatLng(latitude, longitude); var map = new qq.maps.Map(document.getElementById('mapContainer{{ModuleID}}'), { center: center, zoom: 13 }); infoWin = new qq.maps.InfoWindow({ map: map }); infoWin.open(); infoWin.setContent(title); infoWin.setPosition(map.getCenter()); marker = new qq.maps.Marker({ position: center, draggable: true, map: map }); } // swiper animation 效果 function runAnimate(jqobj,animate,duration,delay) { $(jqobj).css({ "animation-name": animate, "animation-duration": duration, "animation-delay": delay }).one( 'webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend', function(){ $(jqobj).css({ "animation-name": "none", "animation-duration": "none", "animation-delay": "none" }); } ); } //模块悬停动画 function initHoverAnimate(){ $(document).on("mouseenter",".ModuleItem",function(){ if(typeof CanDesign != 'undefined' && CanDesign == 'False'){ var jqobj = $(this); if($(jqobj).attr('hover-effect')){ runAnimate($(jqobj),$(jqobj).attr('hover-effect'),$(jqobj).attr('hover-duration'),$(jqobj).attr('hover-delay')); } } }); $(document).on("mouseenter",".image-animation,img",function(){ if(typeof CanDesign != 'undefined' && CanDesign == 'False'){ var jqobj = $(this).closest(".ModuleItem"); var imgobj = $(this).closest(".image-animation"); if(imgobj.length == 0) imgobj = $(this); if($(jqobj).attr('image-hover-effect')){ if($(jqobj).attr('image-hover-effect') == 'zoom'){ ImgZoom(imgobj); imgobj.on("mouseleave",function(){ unImgZoom(imgobj) });} else runAnimate($(imgobj),$(jqobj).attr('image-hover-effect'),$(jqobj).attr('image-hover-duration'),$(jqobj).attr('image-hover-delay')); } } }); } ;// END OF /share/JScript.js // STARTS OF /scripts/fancyBox/lib/jquery.mousewheel-3.0.6.pack.js /*! Copyright (c) 2011 Brandon Aaron (http://brandonaaron.net) * Licensed under the MIT License (LICENSE.txt). * * Thanks to: http://adomas.org/javascript-mouse-wheel/ for some pointers. * Thanks to: Mathias Bank(http://www.mathias-bank.de) for a scope bug fix. * Thanks to: Seamus Leahy for adding deltaX and deltaY * * Version: 3.0.6 * * Requires: 1.2.2+ */ (function(d){function e(a){var b=a||window.event,c=[].slice.call(arguments,1),f=0,e=0,g=0,a=d.event.fix(b);a.type="mousewheel";b.wheelDelta&&(f=b.wheelDelta/120);b.detail&&(f=-b.detail/3);g=f;b.axis!==void 0&&b.axis===b.HORIZONTAL_AXIS&&(g=0,e=-1*f);b.wheelDeltaY!==void 0&&(g=b.wheelDeltaY/120);b.wheelDeltaX!==void 0&&(e=-1*b.wheelDeltaX/120);c.unshift(a,f,e,g);return(d.event.dispatch||d.event.handle).apply(this,c)}var c=["DOMMouseScroll","mousewheel"];if(d.event.fixHooks)for(var h=c.length;h;)d.event.fixHooks[c[--h]]= d.event.mouseHooks;d.event.special.mousewheel={setup:function(){if(this.addEventListener)for(var a=c.length;a;)this.addEventListener(c[--a],e,false);else this.onmousewheel=e},teardown:function(){if(this.removeEventListener)for(var a=c.length;a;)this.removeEventListener(c[--a],e,false);else this.onmousewheel=null}};d.fn.extend({mousewheel:function(a){return a?this.bind("mousewheel",a):this.trigger("mousewheel")},unmousewheel:function(a){return this.unbind("mousewheel",a)}})})(jQuery);;// END OF /scripts/fancyBox/lib/jquery.mousewheel-3.0.6.pack.js // STARTS OF /scripts/fancyBox/source/jquery.fancybox.js /*! * fancyBox - jQuery Plugin * version: 2.1.5 (Fri, 14 Jun 2013) * @requires jQuery v1.6 or later * * Examples at http://fancyapps.com/fancybox/ * License: www.fancyapps.com/fancybox/#license * * Copyright 2012 Janis Skarnelis - janis@fancyapps.com * */ (function (window, document, $, undefined) { "use strict"; var H = $("html"), W = $(window), D = $(document), F = $.fancybox = function () { F.open.apply( this, arguments ); }, IE = navigator.userAgent.match(/msie/i), didUpdate = null, isTouch = document.createTouch !== undefined, isQuery = function(obj) { return obj && obj.hasOwnProperty && obj instanceof $; }, isString = function(str) { return str && $.type(str) === "string"; }, isPercentage = function(str) { return isString(str) && str.indexOf('%') > 0; }, isScrollable = function(el) { return (el && !(el.style.overflow && el.style.overflow === 'hidden') && ((el.clientWidth && el.scrollWidth > el.clientWidth) || (el.clientHeight && el.scrollHeight > el.clientHeight))); }, getScalar = function(orig, dim) { var value = parseInt(orig, 10) || 0; if (dim && isPercentage(orig)) { value = F.getViewport()[ dim ] / 100 * value; } return Math.ceil(value); }, getValue = function(value, dim) { return getScalar(value, dim) + 'px'; }; $.extend(F, { // The current version of fancyBox version: '2.1.5', defaults: { padding : 15, margin : 20, width : 800, height : 600, minWidth : 100, minHeight : 100, maxWidth : 9999, maxHeight : 9999, pixelRatio: 1, // Set to 2 for retina display support autoSize : true, autoHeight : false, autoWidth : false, autoResize : true, autoCenter : !isTouch, fitToView : true, aspectRatio : false, topRatio : 0.5, leftRatio : 0.5, scrolling : 'auto', // 'auto', 'yes' or 'no' wrapCSS : '', arrows : true, closeBtn : true, closeClick : false, nextClick : false, mouseWheel : true, autoPlay : false, playSpeed : 3000, preload : 3, modal : false, loop : true, ajax : { dataType : 'html', headers : { 'X-fancyBox': true } }, iframe : { scrolling : 'auto', preload : true }, swf : { wmode: 'transparent', allowfullscreen : 'true', allowscriptaccess : 'always' }, keys : { next : { 13 : 'left', // enter 34 : 'up', // page down 39 : 'left', // right arrow 40 : 'up' // down arrow }, prev : { 8 : 'right', // backspace 33 : 'down', // page up 37 : 'right', // left arrow 38 : 'down' // up arrow }, close : [27], // escape key play : [32], // space - start/stop slideshow toggle : [70] // letter "f" - toggle fullscreen }, direction : { next : 'left', prev : 'right' }, scrollOutside : true, // Override some properties index : 0, type : null, href : null, content : null, title : null, // HTML templates tpl: { wrap : '
    ', image : '', iframe : '', error : '

    The requested content cannot be loaded.
    Please try again later.

    ', closeBtn : '', next : '', prev : '' }, // Properties for each animation type // Opening fancyBox openEffect : 'fade', // 'elastic', 'fade' or 'none' openSpeed : 250, openEasing : 'swing', openOpacity : true, openMethod : 'zoomIn', // Closing fancyBox closeEffect : 'fade', // 'elastic', 'fade' or 'none' closeSpeed : 250, closeEasing : 'swing', closeOpacity : true, closeMethod : 'zoomOut', // Changing next gallery item nextEffect : 'elastic', // 'elastic', 'fade' or 'none' nextSpeed : 250, nextEasing : 'swing', nextMethod : 'changeIn', // Changing previous gallery item prevEffect : 'elastic', // 'elastic', 'fade' or 'none' prevSpeed : 250, prevEasing : 'swing', prevMethod : 'changeOut', // Enable default helpers helpers : { overlay : true, title : true }, // Callbacks onCancel : $.noop, // If canceling beforeLoad : $.noop, // Before loading afterLoad : $.noop, // After loading beforeShow : $.noop, // Before changing in current item afterShow : $.noop, // After opening beforeChange : $.noop, // Before changing gallery item beforeClose : $.noop, // Before closing afterClose : $.noop // After closing }, //Current state group : {}, // Selected group opts : {}, // Group options previous : null, // Previous element coming : null, // Element being loaded current : null, // Currently loaded element isActive : false, // Is activated isOpen : false, // Is currently open isOpened : false, // Have been fully opened at least once wrap : null, skin : null, outer : null, inner : null, player : { timer : null, isActive : false }, // Loaders ajaxLoad : null, imgPreload : null, // Some collections transitions : {}, helpers : {}, /* * Static methods */ open: function (group, opts) { if (!group) { return; } if (!$.isPlainObject(opts)) { opts = {}; } // Close if already active if (false === F.close(true)) { return; } // Normalize group if (!$.isArray(group)) { group = isQuery(group) ? $(group).get() : [group]; } // Recheck if the type of each element is `object` and set content type (image, ajax, etc) $.each(group, function(i, element) { var obj = {}, href, title, content, type, rez, hrefParts, selector; if ($.type(element) === "object") { // Check if is DOM element if (element.nodeType) { element = $(element); } if (isQuery(element)) { obj = { href : element.data('fancybox-href') || element.attr('href'), title : element.data('fancybox-title') || element.attr('title'), isDom : true, element : element }; if ($.metadata) { $.extend(true, obj, element.metadata()); } } else { obj = element; } } href = opts.href || obj.href || (isString(element) ? element : null); title = opts.title !== undefined ? opts.title : obj.title || ''; content = opts.content || obj.content; type = content ? 'html' : (opts.type || obj.type); if (!type && obj.isDom) { type = element.data('fancybox-type'); if (!type) { rez = element.prop('class').match(/fancybox\.(\w+)/); type = rez ? rez[1] : null; } } if (isString(href)) { // Try to guess the content type if (!type) { if (F.isImage(href)) { type = 'image'; } else if (F.isSWF(href)) { type = 'swf'; } else if (href.charAt(0) === '#') { type = 'inline'; } else if (isString(element)) { type = 'html'; content = element; } } // Split url into two pieces with source url and content selector, e.g, // "/mypage.html #my_id" will load "/mypage.html" and display element having id "my_id" if (type === 'ajax') { hrefParts = href.split(/\s+/, 2); href = hrefParts.shift(); selector = hrefParts.shift(); } } if (!content) { if (type === 'inline') { if (href) { content = $( isString(href) ? href.replace(/.*(?=#[^\s]+$)/, '') : href ); //strip for ie7 } else if (obj.isDom) { content = element; } } else if (type === 'html') { content = href; } else if (!type && !href && obj.isDom) { type = 'inline'; content = element; } } $.extend(obj, { href : href, type : type, content : content, title : title, selector : selector }); group[ i ] = obj; }); // Extend the defaults F.opts = $.extend(true, {}, F.defaults, opts); // All options are merged recursive except keys if (opts.keys !== undefined) { F.opts.keys = opts.keys ? $.extend({}, F.defaults.keys, opts.keys) : false; } F.group = group; return F._start(F.opts.index); }, // Cancel image loading or abort ajax request cancel: function () { var coming = F.coming; if (!coming || false === F.trigger('onCancel')) { return; } F.hideLoading(); if (F.ajaxLoad) { F.ajaxLoad.abort(); } F.ajaxLoad = null; if (F.imgPreload) { F.imgPreload.onload = F.imgPreload.onerror = null; } if (coming.wrap) { coming.wrap.stop(true, true).trigger('onReset').remove(); } F.coming = null; // If the first item has been canceled, then clear everything if (!F.current) { F._afterZoomOut( coming ); } }, // Start closing animation if is open; remove immediately if opening/closing close: function (event) { F.cancel(); if (false === F.trigger('beforeClose')) { return; } F.unbindEvents(); if (!F.isActive) { return; } if (!F.isOpen || event === true) { $('.fancybox-wrap').stop(true).trigger('onReset').remove(); F._afterZoomOut(); } else { F.isOpen = F.isOpened = false; F.isClosing = true; $('.fancybox-item, .fancybox-nav').remove(); F.wrap.stop(true, true).removeClass('fancybox-opened'); F.transitions[ F.current.closeMethod ](); } }, // Manage slideshow: // $.fancybox.play(); - toggle slideshow // $.fancybox.play( true ); - start // $.fancybox.play( false ); - stop play: function ( action ) { var clear = function () { clearTimeout(F.player.timer); }, set = function () { clear(); if (F.current && F.player.isActive) { F.player.timer = setTimeout(F.next, F.current.playSpeed); } }, stop = function () { clear(); D.unbind('.player'); F.player.isActive = false; F.trigger('onPlayEnd'); }, start = function () { if (F.current && (F.current.loop || F.current.index < F.group.length - 1)) { F.player.isActive = true; D.bind({ 'onCancel.player beforeClose.player' : stop, 'onUpdate.player' : set, 'beforeLoad.player' : clear }); set(); F.trigger('onPlayStart'); } }; if (action === true || (!F.player.isActive && action !== false)) { start(); } else { stop(); } }, // Navigate to next gallery item next: function ( direction ) { var current = F.current; if (current) { if (!isString(direction)) { direction = current.direction.next; } F.jumpto(current.index + 1, direction, 'next'); } }, // Navigate to previous gallery item prev: function ( direction ) { var current = F.current; if (current) { if (!isString(direction)) { direction = current.direction.prev; } F.jumpto(current.index - 1, direction, 'prev'); } }, // Navigate to gallery item by index jumpto: function ( index, direction, router ) { var current = F.current; if (!current) { return; } index = getScalar(index); F.direction = direction || current.direction[ (index >= current.index ? 'next' : 'prev') ]; F.router = router || 'jumpto'; if (current.loop) { if (index < 0) { index = current.group.length + (index % current.group.length); } index = index % current.group.length; } if (current.group[ index ] !== undefined) { F.cancel(); F._start(index); } }, // Center inside viewport and toggle position type to fixed or absolute if needed reposition: function (e, onlyAbsolute) { var current = F.current, wrap = current ? current.wrap : null, pos; if (wrap) { pos = F._getPosition(onlyAbsolute); if (e && e.type === 'scroll') { delete pos.position; wrap.stop(true, true).animate(pos, 200); } else { wrap.css(pos); current.pos = $.extend({}, current.dim, pos); } } }, update: function (e) { var type = (e && e.type), anyway = !type || type === 'orientationchange'; if (anyway) { clearTimeout(didUpdate); didUpdate = null; } if (!F.isOpen || didUpdate) { return; } didUpdate = setTimeout(function() { var current = F.current; if (!current || F.isClosing) { return; } F.wrap.removeClass('fancybox-tmp'); if (anyway || type === 'load' || (type === 'resize' && current.autoResize)) { F._setDimension(); } if (!(type === 'scroll' && current.canShrink)) { F.reposition(e); } F.trigger('onUpdate'); didUpdate = null; }, (anyway && !isTouch ? 0 : 300)); }, // Shrink content to fit inside viewport or restore if resized toggle: function ( action ) { if (F.isOpen) { F.current.fitToView = $.type(action) === "boolean" ? action : !F.current.fitToView; // Help browser to restore document dimensions if (isTouch) { F.wrap.removeAttr('style').addClass('fancybox-tmp'); F.trigger('onUpdate'); } F.update(); } }, hideLoading: function () { D.unbind('.loading'); $('#fancybox-loading').remove(); }, showLoading: function () { var el, viewport; F.hideLoading(); el = $('
    ').click(F.cancel).appendTo('body'); // If user will press the escape-button, the request will be canceled D.bind('keydown.loading', function(e) { if ((e.which || e.keyCode) === 27) { e.preventDefault(); F.cancel(); } }); if (!F.defaults.fixed) { viewport = F.getViewport(); el.css({ position : 'absolute', top : (viewport.h * 0.5) + viewport.y, left : (viewport.w * 0.5) + viewport.x }); } }, getViewport: function () { var locked = (F.current && F.current.locked) || false, rez = { x: W.scrollLeft(), y: W.scrollTop() }; if (locked) { rez.w = locked[0].clientWidth; rez.h = locked[0].clientHeight; } else { // See http://bugs.jquery.com/ticket/6724 rez.w = isTouch && window.innerWidth ? window.innerWidth : W.width(); rez.h = isTouch && window.innerHeight ? window.innerHeight : W.height(); } return rez; }, // Unbind the keyboard / clicking actions unbindEvents: function () { if (F.wrap && isQuery(F.wrap)) { F.wrap.unbind('.fb'); } D.unbind('.fb'); W.unbind('.fb'); }, bindEvents: function () { var current = F.current, keys; if (!current) { return; } // Changing document height on iOS devices triggers a 'resize' event, // that can change document height... repeating infinitely W.bind('orientationchange.fb' + (isTouch ? '' : ' resize.fb') + (current.autoCenter && !current.locked ? ' scroll.fb' : ''), F.update); keys = current.keys; if (keys) { D.bind('keydown.fb', function (e) { var code = e.which || e.keyCode, target = e.target || e.srcElement; // Skip esc key if loading, because showLoading will cancel preloading if (code === 27 && F.coming) { return false; } // Ignore key combinations and key events within form elements if (!e.ctrlKey && !e.altKey && !e.shiftKey && !e.metaKey && !(target && (target.type || $(target).is('[contenteditable]')))) { $.each(keys, function(i, val) { if (current.group.length > 1 && val[ code ] !== undefined) { F[ i ]( val[ code ] ); e.preventDefault(); return false; } if ($.inArray(code, val) > -1) { F[ i ] (); e.preventDefault(); return false; } }); } }); } if ($.fn.mousewheel && current.mouseWheel) { F.wrap.bind('mousewheel.fb', function (e, delta, deltaX, deltaY) { var target = e.target || null, parent = $(target), canScroll = false; while (parent.length) { if (canScroll || parent.is('.fancybox-skin') || parent.is('.fancybox-wrap')) { break; } canScroll = isScrollable( parent[0] ); parent = $(parent).parent(); } if (delta !== 0 && !canScroll) { if (F.group.length > 1 && !current.canShrink) { if (deltaY > 0 || deltaX > 0) { F.prev( deltaY > 0 ? 'down' : 'left' ); } else if (deltaY < 0 || deltaX < 0) { F.next( deltaY < 0 ? 'up' : 'right' ); } e.preventDefault(); } } }); } }, trigger: function (event, o) { var ret, obj = o || F.coming || F.current; if (!obj) { return; } if ($.isFunction( obj[event] )) { ret = obj[event].apply(obj, Array.prototype.slice.call(arguments, 1)); } if (ret === false) { return false; } if (obj.helpers) { $.each(obj.helpers, function (helper, opts) { if (opts && F.helpers[helper] && $.isFunction(F.helpers[helper][event])) { F.helpers[helper][event]($.extend(true, {}, F.helpers[helper].defaults, opts), obj); } }); } D.trigger(event); }, isImage: function (str) { return isString(str) && str.match(/(^data:image\/.*,)|(\.(jp(e|g|eg)|gif|png|bmp|webp|svg)((\?|#).*)?$)/i); }, isSWF: function (str) { return isString(str) && str.match(/\.(swf)((\?|#).*)?$/i); }, _start: function (index) { var coming = {}, obj, href, type, margin, padding; index = getScalar( index ); obj = F.group[ index ] || null; if (!obj) { return false; } coming = $.extend(true, {}, F.opts, obj); // Convert margin and padding properties to array - top, right, bottom, left margin = coming.margin; padding = coming.padding; if ($.type(margin) === 'number') { coming.margin = [margin, margin, margin, margin]; } if ($.type(padding) === 'number') { coming.padding = [padding, padding, padding, padding]; } // 'modal' propery is just a shortcut if (coming.modal) { $.extend(true, coming, { closeBtn : false, closeClick : false, nextClick : false, arrows : false, mouseWheel : false, keys : null, helpers: { overlay : { closeClick : false } } }); } // 'autoSize' property is a shortcut, too if (coming.autoSize) { coming.autoWidth = coming.autoHeight = true; } if (coming.width === 'auto') { coming.autoWidth = true; } if (coming.height === 'auto') { coming.autoHeight = true; } /* * Add reference to the group, so it`s possible to access from callbacks, example: * afterLoad : function() { * this.title = 'Image ' + (this.index + 1) + ' of ' + this.group.length + (this.title ? ' - ' + this.title : ''); * } */ coming.group = F.group; coming.index = index; // Give a chance for callback or helpers to update coming item (type, title, etc) F.coming = coming; if (false === F.trigger('beforeLoad')) { F.coming = null; return; } type = coming.type; href = coming.href; if (!type) { F.coming = null; //If we can not determine content type then drop silently or display next/prev item if looping through gallery if (F.current && F.router && F.router !== 'jumpto') { F.current.index = index; return F[ F.router ]( F.direction ); } return false; } F.isActive = true; if (type === 'image' || type === 'swf') { coming.autoHeight = coming.autoWidth = false; coming.scrolling = 'visible'; } if (type === 'image') { coming.aspectRatio = true; } if (type === 'iframe' && isTouch) { coming.scrolling = 'scroll'; } // Build the neccessary markup coming.wrap = $(coming.tpl.wrap).addClass('fancybox-' + (isTouch ? 'mobile' : 'desktop') + ' fancybox-type-' + type + ' fancybox-tmp ' + coming.wrapCSS).appendTo( coming.parent || 'body' ); $.extend(coming, { skin : $('.fancybox-skin', coming.wrap), outer : $('.fancybox-outer', coming.wrap), inner : $('.fancybox-inner', coming.wrap) }); $.each(["Top", "Right", "Bottom", "Left"], function(i, v) { coming.skin.css('padding' + v, getValue(coming.padding[ i ])); }); F.trigger('onReady'); // Check before try to load; 'inline' and 'html' types need content, others - href if (type === 'inline' || type === 'html') { if (!coming.content || !coming.content.length) { return F._error( 'content' ); } } else if (!href) { return F._error( 'href' ); } if (type === 'image') { F._loadImage(); } else if (type === 'ajax') { F._loadAjax(); } else if (type === 'iframe') { F._loadIframe(); } else { F._afterLoad(); } }, _error: function ( type ) { $.extend(F.coming, { type : 'html', autoWidth : true, autoHeight : true, minWidth : 0, minHeight : 0, scrolling : 'no', hasError : type, content : F.coming.tpl.error }); F._afterLoad(); }, _loadImage: function () { // Reset preload image so it is later possible to check "complete" property var img = F.imgPreload = new Image(); img.onload = function () { this.onload = this.onerror = null; F.coming.width = this.width / F.opts.pixelRatio; F.coming.height = this.height / F.opts.pixelRatio; F._afterLoad(); }; img.onerror = function () { this.onload = this.onerror = null; F._error( 'image' ); }; img.src = F.coming.href; if (img.complete !== true) { F.showLoading(); } }, _loadAjax: function () { var coming = F.coming; F.showLoading(); F.ajaxLoad = $.ajax($.extend({}, coming.ajax, { url: coming.href, error: function (jqXHR, textStatus) { if (F.coming && textStatus !== 'abort') { F._error( 'ajax', jqXHR ); } else { F.hideLoading(); } }, success: function (data, textStatus) { if (textStatus === 'success') { coming.content = data; F._afterLoad(); } } })); }, _loadIframe: function() { var coming = F.coming, iframe = $(coming.tpl.iframe.replace(/\{rnd\}/g, new Date().getTime())) .attr('scrolling', isTouch ? 'auto' : coming.iframe.scrolling) .attr('src', coming.href); // This helps IE $(coming.wrap).bind('onReset', function () { try { $(this).find('iframe').hide().attr('src', '//about:blank').end().empty(); } catch (e) {} }); if (coming.iframe.preload) { F.showLoading(); iframe.one('load', function() { $(this).data('ready', 1); // iOS will lose scrolling if we resize if (!isTouch) { $(this).bind('load.fb', F.update); } // Without this trick: // - iframe won't scroll on iOS devices // - IE7 sometimes displays empty iframe $(this).parents('.fancybox-wrap').width('100%').removeClass('fancybox-tmp').show(); F._afterLoad(); }); } coming.content = iframe.appendTo( coming.inner ); if (!coming.iframe.preload) { F._afterLoad(); } }, _preloadImages: function() { var group = F.group, current = F.current, len = group.length, cnt = current.preload ? Math.min(current.preload, len - 1) : 0, item, i; for (i = 1; i <= cnt; i += 1) { item = group[ (current.index + i ) % len ]; if (item.type === 'image' && item.href) { new Image().src = item.href; } } }, _afterLoad: function () { var coming = F.coming, previous = F.current, placeholder = 'fancybox-placeholder', current, content, type, scrolling, href, embed; F.hideLoading(); if (!coming || F.isActive === false) { return; } if (false === F.trigger('afterLoad', coming, previous)) { coming.wrap.stop(true).trigger('onReset').remove(); F.coming = null; return; } if (previous) { F.trigger('beforeChange', previous); previous.wrap.stop(true).removeClass('fancybox-opened') .find('.fancybox-item, .fancybox-nav') .remove(); } F.unbindEvents(); current = coming; content = coming.content; type = coming.type; scrolling = coming.scrolling; $.extend(F, { wrap : current.wrap, skin : current.skin, outer : current.outer, inner : current.inner, current : current, previous : previous }); href = current.href; switch (type) { case 'inline': case 'ajax': case 'html': if (current.selector) { content = $('
    ').html(content).find(current.selector); } else if (isQuery(content)) { if (!content.data(placeholder)) { content.data(placeholder, $('
    ').insertAfter( content ).hide() ); } content = content.show().detach(); current.wrap.bind('onReset', function () { if ($(this).find(content).length) { content.hide().replaceAll( content.data(placeholder) ).data(placeholder, false); } }); } break; case 'image': content = current.tpl.image.replace('{href}', href); break; case 'swf': content = ''; embed = ''; $.each(current.swf, function(name, val) { content += ''; embed += ' ' + name + '="' + val + '"'; }); content += ''; break; } if (!(isQuery(content) && content.parent().is(current.inner))) { current.inner.append( content ); } // Give a chance for helpers or callbacks to update elements F.trigger('beforeShow'); // Set scrolling before calculating dimensions current.inner.css('overflow', scrolling === 'yes' ? 'scroll' : (scrolling === 'no' ? 'hidden' : scrolling)); // Set initial dimensions and start position F._setDimension(); F.reposition(); F.isOpen = false; F.coming = null; F.bindEvents(); if (!F.isOpened) { $('.fancybox-wrap').not( current.wrap ).stop(true).trigger('onReset').remove(); } else if (previous.prevMethod) { F.transitions[ previous.prevMethod ](); } F.transitions[ F.isOpened ? current.nextMethod : current.openMethod ](); F._preloadImages(); }, _setDimension: function () { var viewport = F.getViewport(), steps = 0, canShrink = false, canExpand = false, wrap = F.wrap, skin = F.skin, inner = F.inner, current = F.current, width = current.width, height = current.height, minWidth = current.minWidth, minHeight = current.minHeight, maxWidth = current.maxWidth, maxHeight = current.maxHeight, scrolling = current.scrolling, scrollOut = current.scrollOutside ? current.scrollbarWidth : 0, margin = current.margin, wMargin = getScalar(margin[1] + margin[3]), hMargin = getScalar(margin[0] + margin[2]), wPadding, hPadding, wSpace, hSpace, origWidth, origHeight, origMaxWidth, origMaxHeight, ratio, width_, height_, maxWidth_, maxHeight_, iframe, body; // Reset dimensions so we could re-check actual size wrap.add(skin).add(inner).width('auto').height('auto').removeClass('fancybox-tmp'); wPadding = getScalar(skin.outerWidth(true) - skin.width()); hPadding = getScalar(skin.outerHeight(true) - skin.height()); // Any space between content and viewport (margin, padding, border, title) wSpace = wMargin + wPadding; hSpace = hMargin + hPadding; origWidth = isPercentage(width) ? (viewport.w - wSpace) * getScalar(width) / 100 : width; origHeight = isPercentage(height) ? (viewport.h - hSpace) * getScalar(height) / 100 : height; if (current.type === 'iframe') { iframe = current.content; if (current.autoHeight && iframe.data('ready') === 1) { try { if (iframe[0].contentWindow.document.location) { inner.width( origWidth ).height(9999); body = iframe.contents().find('body'); if (scrollOut) { body.css('overflow-x', 'hidden'); } origHeight = body.outerHeight(true); } } catch (e) {} } } else if (current.autoWidth || current.autoHeight) { inner.addClass( 'fancybox-tmp' ); // Set width or height in case we need to calculate only one dimension if (!current.autoWidth) { inner.width( origWidth ); } if (!current.autoHeight) { inner.height( origHeight ); } if (current.autoWidth) { origWidth = inner.width(); } if (current.autoHeight) { origHeight = inner.height(); } inner.removeClass( 'fancybox-tmp' ); } width = getScalar( origWidth ); height = getScalar( origHeight ); ratio = origWidth / origHeight; // Calculations for the content minWidth = getScalar(isPercentage(minWidth) ? getScalar(minWidth, 'w') - wSpace : minWidth); maxWidth = getScalar(isPercentage(maxWidth) ? getScalar(maxWidth, 'w') - wSpace : maxWidth); minHeight = getScalar(isPercentage(minHeight) ? getScalar(minHeight, 'h') - hSpace : minHeight); maxHeight = getScalar(isPercentage(maxHeight) ? getScalar(maxHeight, 'h') - hSpace : maxHeight); // These will be used to determine if wrap can fit in the viewport origMaxWidth = maxWidth; origMaxHeight = maxHeight; if (current.fitToView) { maxWidth = Math.min(viewport.w - wSpace, maxWidth); maxHeight = Math.min(viewport.h - hSpace, maxHeight); } maxWidth_ = viewport.w - wMargin; maxHeight_ = viewport.h - hMargin; if (current.aspectRatio) { if (width > maxWidth) { width = maxWidth; height = getScalar(width / ratio); } if (height > maxHeight) { height = maxHeight; width = getScalar(height * ratio); } if (width < minWidth) { width = minWidth; height = getScalar(width / ratio); } if (height < minHeight) { height = minHeight; width = getScalar(height * ratio); } } else { width = Math.max(minWidth, Math.min(width, maxWidth)); if (current.autoHeight && current.type !== 'iframe') { inner.width( width ); height = inner.height(); } height = Math.max(minHeight, Math.min(height, maxHeight)); } // Try to fit inside viewport (including the title) if (current.fitToView) { inner.width( width ).height( height ); wrap.width( width + wPadding ); // Real wrap dimensions width_ = wrap.width(); height_ = wrap.height(); if (current.aspectRatio) { while ((width_ > maxWidth_ || height_ > maxHeight_) && width > minWidth && height > minHeight) { if (steps++ > 19) { break; } height = Math.max(minHeight, Math.min(maxHeight, height - 10)); width = getScalar(height * ratio); if (width < minWidth) { width = minWidth; height = getScalar(width / ratio); } if (width > maxWidth) { width = maxWidth; height = getScalar(width / ratio); } inner.width( width ).height( height ); wrap.width( width + wPadding ); width_ = wrap.width(); height_ = wrap.height(); } } else { width = Math.max(minWidth, Math.min(width, width - (width_ - maxWidth_))); height = Math.max(minHeight, Math.min(height, height - (height_ - maxHeight_))); } } if (scrollOut && scrolling === 'auto' && height < origHeight && (width + wPadding + scrollOut) < maxWidth_) { width += scrollOut; } inner.width( width ).height( height ); wrap.width( width + wPadding ); width_ = wrap.width(); height_ = wrap.height(); canShrink = (width_ > maxWidth_ || height_ > maxHeight_) && width > minWidth && height > minHeight; canExpand = current.aspectRatio ? (width < origMaxWidth && height < origMaxHeight && width < origWidth && height < origHeight) : ((width < origMaxWidth || height < origMaxHeight) && (width < origWidth || height < origHeight)); $.extend(current, { dim : { width : getValue( width_ ), height : getValue( height_ ) }, origWidth : origWidth, origHeight : origHeight, canShrink : canShrink, canExpand : canExpand, wPadding : wPadding, hPadding : hPadding, wrapSpace : height_ - skin.outerHeight(true), skinSpace : skin.height() - height }); if (!iframe && current.autoHeight && height > minHeight && height < maxHeight && !canExpand) { inner.height('auto'); } }, _getPosition: function (onlyAbsolute) { var current = F.current, viewport = F.getViewport(), margin = current.margin, width = F.wrap.width() + margin[1] + margin[3], height = F.wrap.height() + margin[0] + margin[2], rez = { position: 'absolute', top : margin[0], left : margin[3] }; if (current.autoCenter && current.fixed && !onlyAbsolute && height <= viewport.h && width <= viewport.w) { rez.position = 'fixed'; } else if (!current.locked) { rez.top += viewport.y; rez.left += viewport.x; } rez.top = getValue(Math.max(rez.top, rez.top + ((viewport.h - height) * current.topRatio))); rez.left = getValue(Math.max(rez.left, rez.left + ((viewport.w - width) * current.leftRatio))); return rez; }, _afterZoomIn: function () { var current = F.current; if (!current) { return; } F.isOpen = F.isOpened = true; F.wrap.css('overflow', 'visible').addClass('fancybox-opened'); F.update(); // Assign a click event if ( current.closeClick || (current.nextClick && F.group.length > 1) ) { F.inner.css('cursor', 'pointer').bind('click.fb', function(e) { if (!$(e.target).is('a') && !$(e.target).parent().is('a')) { e.preventDefault(); F[ current.closeClick ? 'close' : 'next' ](); } }); } // Create a close button if (current.closeBtn) { $(current.tpl.closeBtn).appendTo(F.skin).bind('click.fb', function(e) { e.preventDefault(); F.close(); }); } // Create navigation arrows if (current.arrows && F.group.length > 1) { if (current.loop || current.index > 0) { $(current.tpl.prev).appendTo(F.outer).bind('click.fb', F.prev); } if (current.loop || current.index < F.group.length - 1) { $(current.tpl.next).appendTo(F.outer).bind('click.fb', F.next); } } F.trigger('afterShow'); // Stop the slideshow if this is the last item if (!current.loop && current.index === current.group.length - 1) { F.play( false ); } else if (F.opts.autoPlay && !F.player.isActive) { F.opts.autoPlay = false; F.play(); } }, _afterZoomOut: function ( obj ) { obj = obj || F.current; $('.fancybox-wrap').trigger('onReset').remove(); $.extend(F, { group : {}, opts : {}, router : false, current : null, isActive : false, isOpened : false, isOpen : false, isClosing : false, wrap : null, skin : null, outer : null, inner : null }); F.trigger('afterClose', obj); } }); /* * Default transitions */ F.transitions = { getOrigPosition: function () { var current = F.current, element = current.element, orig = current.orig, pos = {}, width = 50, height = 50, hPadding = current.hPadding, wPadding = current.wPadding, viewport = F.getViewport(); if (!orig && current.isDom && element.is(':visible')) { orig = element.find('img:first'); if (!orig.length) { orig = element; } } if (isQuery(orig)) { pos = orig.offset(); if (orig.is('img')) { width = orig.outerWidth(); height = orig.outerHeight(); } } else { pos.top = viewport.y + (viewport.h - height) * current.topRatio; pos.left = viewport.x + (viewport.w - width) * current.leftRatio; } if (F.wrap.css('position') === 'fixed' || current.locked) { pos.top -= viewport.y; pos.left -= viewport.x; } pos = { top : getValue(pos.top - hPadding * current.topRatio), left : getValue(pos.left - wPadding * current.leftRatio), width : getValue(width + wPadding), height : getValue(height + hPadding) }; return pos; }, step: function (now, fx) { var ratio, padding, value, prop = fx.prop, current = F.current, wrapSpace = current.wrapSpace, skinSpace = current.skinSpace; if (prop === 'width' || prop === 'height') { ratio = fx.end === fx.start ? 1 : (now - fx.start) / (fx.end - fx.start); if (F.isClosing) { ratio = 1 - ratio; } padding = prop === 'width' ? current.wPadding : current.hPadding; value = now - padding; F.skin[ prop ]( getScalar( prop === 'width' ? value : value - (wrapSpace * ratio) ) ); F.inner[ prop ]( getScalar( prop === 'width' ? value : value - (wrapSpace * ratio) - (skinSpace * ratio) ) ); } }, zoomIn: function () { var current = F.current, startPos = current.pos, effect = current.openEffect, elastic = effect === 'elastic', endPos = $.extend({opacity : 1}, startPos); // Remove "position" property that breaks older IE delete endPos.position; if (elastic) { startPos = this.getOrigPosition(); if (current.openOpacity) { startPos.opacity = 0.1; } } else if (effect === 'fade') { startPos.opacity = 0.1; } F.wrap.css(startPos).animate(endPos, { duration : effect === 'none' ? 0 : current.openSpeed, easing : current.openEasing, step : elastic ? this.step : null, complete : F._afterZoomIn }); }, zoomOut: function () { var current = F.current, effect = current.closeEffect, elastic = effect === 'elastic', endPos = {opacity : 0.1}; if (elastic) { endPos = this.getOrigPosition(); if (current.closeOpacity) { endPos.opacity = 0.1; } } F.wrap.animate(endPos, { duration : effect === 'none' ? 0 : current.closeSpeed, easing : current.closeEasing, step : elastic ? this.step : null, complete : F._afterZoomOut }); }, changeIn: function () { var current = F.current, effect = current.nextEffect, startPos = current.pos, endPos = { opacity : 1 }, direction = F.direction, distance = 200, field; startPos.opacity = 0.1; if (effect === 'elastic') { field = direction === 'down' || direction === 'up' ? 'top' : 'left'; if (direction === 'down' || direction === 'right') { startPos[ field ] = getValue(getScalar(startPos[ field ]) - distance); endPos[ field ] = '+=' + distance + 'px'; } else { startPos[ field ] = getValue(getScalar(startPos[ field ]) + distance); endPos[ field ] = '-=' + distance + 'px'; } } // Workaround for http://bugs.jquery.com/ticket/12273 if (effect === 'none') { F._afterZoomIn(); } else { F.wrap.css(startPos).animate(endPos, { duration : current.nextSpeed, easing : current.nextEasing, complete : F._afterZoomIn }); } }, changeOut: function () { var previous = F.previous, effect = previous.prevEffect, endPos = { opacity : 0.1 }, direction = F.direction, distance = 200; if (effect === 'elastic') { endPos[ direction === 'down' || direction === 'up' ? 'top' : 'left' ] = ( direction === 'up' || direction === 'left' ? '-' : '+' ) + '=' + distance + 'px'; } previous.wrap.animate(endPos, { duration : effect === 'none' ? 0 : previous.prevSpeed, easing : previous.prevEasing, complete : function () { $(this).trigger('onReset').remove(); } }); } }; /* * Overlay helper */ F.helpers.overlay = { defaults : { closeClick : true, // if true, fancyBox will be closed when user clicks on the overlay speedOut : 200, // duration of fadeOut animation showEarly : true, // indicates if should be opened immediately or wait until the content is ready css : {}, // custom CSS properties locked : !isTouch, // if true, the content will be locked into overlay fixed : true // if false, the overlay CSS position property will not be set to "fixed" }, overlay : null, // current handle fixed : false, // indicates if the overlay has position "fixed" el : $('html'), // element that contains "the lock" // Public methods create : function(opts) { opts = $.extend({}, this.defaults, opts); if (this.overlay) { this.close(); } this.overlay = $('
    ').appendTo( F.coming ? F.coming.parent : opts.parent ); this.fixed = false; if (opts.fixed && F.defaults.fixed) { this.overlay.addClass('fancybox-overlay-fixed'); this.fixed = true; } }, open : function(opts) { var that = this; opts = $.extend({}, this.defaults, opts); if (this.overlay) { this.overlay.unbind('.overlay').width('auto').height('auto'); } else { this.create(opts); } if (!this.fixed) { W.bind('resize.overlay', $.proxy( this.update, this) ); this.update(); } if (opts.closeClick) { this.overlay.bind('click.overlay', function(e) { if ($(e.target).hasClass('fancybox-overlay')) { if (F.isActive) { F.close(); } else { that.close(); } return false; } }); } this.overlay.css( opts.css ).show(); }, close : function() { var scrollV, scrollH; W.unbind('resize.overlay'); if (this.el.hasClass('fancybox-lock')) { $('.fancybox-margin').removeClass('fancybox-margin'); scrollV = W.scrollTop(); scrollH = W.scrollLeft(); this.el.removeClass('fancybox-lock'); W.scrollTop( scrollV ).scrollLeft( scrollH ); } $('.fancybox-overlay').remove().hide(); $.extend(this, { overlay : null, fixed : false }); }, // Private, callbacks update : function () { var width = '100%', offsetWidth; // Reset width/height so it will not mess this.overlay.width(width).height('100%'); // jQuery does not return reliable result for IE if (IE) { offsetWidth = Math.max(document.documentElement.offsetWidth, document.body.offsetWidth); if (D.width() > offsetWidth) { width = D.width(); } } else if (D.width() > W.width()) { width = D.width(); } this.overlay.width(width).height(D.height()); }, // This is where we can manipulate DOM, because later it would cause iframes to reload onReady : function (opts, obj) { var overlay = this.overlay; $('.fancybox-overlay').stop(true, true); if (!overlay) { this.create(opts); } if (opts.locked && this.fixed && obj.fixed) { if (!overlay) { this.margin = D.height() > W.height() ? $('html').css('margin-right').replace("px", "") : false; } obj.locked = this.overlay.append( obj.wrap ); obj.fixed = false; } if (opts.showEarly === true) { this.beforeShow.apply(this, arguments); } }, beforeShow : function(opts, obj) { var scrollV, scrollH; if (obj.locked) { if (this.margin !== false) { $('*').filter(function(){ return ($(this).css('position') === 'fixed' && !$(this).hasClass("fancybox-overlay") && !$(this).hasClass("fancybox-wrap") ); }).addClass('fancybox-margin'); this.el.addClass('fancybox-margin'); } scrollV = W.scrollTop(); scrollH = W.scrollLeft(); this.el.addClass('fancybox-lock'); W.scrollTop( scrollV ).scrollLeft( scrollH ); } this.open(opts); }, onUpdate : function() { if (!this.fixed) { this.update(); } }, afterClose: function (opts) { // Remove overlay if exists and fancyBox is not opening // (e.g., it is not being open using afterClose callback) //if (this.overlay && !F.isActive) { if (this.overlay && !F.coming) { this.overlay.fadeOut(opts.speedOut, $.proxy( this.close, this )); } } }; /* * Title helper */ F.helpers.title = { defaults : { type : 'float', // 'float', 'inside', 'outside' or 'over', position : 'bottom' // 'top' or 'bottom' }, beforeShow: function (opts) { var current = F.current, text = current.title, type = opts.type, title, target; if ($.isFunction(text)) { text = text.call(current.element, current); } if (!isString(text) || $.trim(text) === '') { return; } title = $('
    ' + text + '
    '); switch (type) { case 'inside': target = F.skin; break; case 'outside': target = F.wrap; break; case 'over': target = F.inner; break; default: // 'float' target = F.skin; title.appendTo('body'); if (IE) { title.width( title.width() ); } title.wrapInner(''); //Increase bottom margin so this title will also fit into viewport F.current.margin[2] += Math.abs( getScalar(title.css('margin-bottom')) ); break; } title[ (opts.position === 'top' ? 'prependTo' : 'appendTo') ](target); } }; // jQuery plugin initialization $.fn.fancybox = function (options) { var index, that = $(this), selector = this.selector || '', run = function(e) { var what = $(this).blur(), idx = index, relType, relVal; if (!(e.ctrlKey || e.altKey || e.shiftKey || e.metaKey) && !what.is('.fancybox-wrap')) { relType = options.groupAttr || 'data-fancybox-group'; relVal = what.attr(relType); if (!relVal) { relType = 'rel'; relVal = what.get(0)[ relType ]; } if (relVal && relVal !== '' && relVal !== 'nofollow') { what = selector.length ? $(selector) : that; what = what.filter('[' + relType + '="' + relVal + '"]'); idx = what.index(this); } options.index = idx; // Stop an event from bubbling if everything is fine if (F.open(what, options) !== false) { e.preventDefault(); } } }; options = options || {}; index = options.index || 0; if (!selector || options.live === false) { that.unbind('click.fb-start').bind('click.fb-start', run); } else { D.undelegate(selector, 'click.fb-start').delegate(selector + ":not('.fancybox-item, .fancybox-nav')", 'click.fb-start', run); } this.filter('[data-fancybox-start=1]').trigger('click'); return this; }; // Tests that need a body at doc ready D.ready(function() { var w1, w2; if ( $.scrollbarWidth === undefined ) { // http://benalman.com/projects/jquery-misc-plugins/#scrollbarwidth $.scrollbarWidth = function() { var parent = $('
    ').appendTo('body'), child = parent.children(), width = child.innerWidth() - child.height( 99 ).innerWidth(); parent.remove(); return width; }; } if ( $.support.fixedPosition === undefined ) { $.support.fixedPosition = (function() { var elem = $('
    ').appendTo('body'), fixed = ( elem[0].offsetTop === 20 || elem[0].offsetTop === 15 ); elem.remove(); return fixed; }()); } $.extend(F.defaults, { scrollbarWidth : $.scrollbarWidth(), fixed : $.support.fixedPosition, parent : $('body') }); //Get real width of page scroll-bar w1 = $(window).width(); H.addClass('fancybox-lock-test'); w2 = $(window).width(); H.removeClass('fancybox-lock-test'); $("").appendTo("head"); }); }(window, document, jQuery));;// END OF /scripts/fancyBox/source/jquery.fancybox.js // STARTS OF /scripts/fancyBox/source/helpers/jquery.fancybox-thumbs.js /*! * Thumbnail helper for fancyBox * version: 1.0.7 (Mon, 01 Oct 2012) * @requires fancyBox v2.0 or later * * Usage: * $(".fancybox").fancybox({ * helpers : { * thumbs: { * width : 50, * height : 50 * } * } * }); * */ (function ($) { //Shortcut for fancyBox object var F = $.fancybox; //Add helper object F.helpers.thumbs = { defaults : { width : 50, // thumbnail width height : 50, // thumbnail height position : 'bottom', // 'top' or 'bottom' source : function ( item ) { // function to obtain the URL of the thumbnail image var href; if (item.element) { href = $(item.element).find('img').attr('src'); } if (!href && item.type === 'image' && item.href) { href = item.href; } return href; } }, wrap : null, list : null, width : 0, init: function (opts, obj) { var that = this, list, thumbWidth = opts.width, thumbHeight = opts.height, thumbSource = opts.source; //Build list structure list = ''; for (var n = 0; n < obj.group.length; n++) { list += '
  1. '; } this.wrap = $('
    ').addClass(opts.position).appendTo('body'); this.list = $('
      ' + list + '
    ').appendTo(this.wrap); //Load each thumbnail $.each(obj.group, function (i) { var href = thumbSource( obj.group[ i ] ); if (!href) { return; } $("").load(function () { var width = this.width, height = this.height, widthRatio, heightRatio, parent; if (!that.list || !width || !height) { return; } //Calculate thumbnail width/height and center it widthRatio = width / thumbWidth; heightRatio = height / thumbHeight; parent = that.list.children().eq(i).find('a'); if (widthRatio >= 1 && heightRatio >= 1) { if (widthRatio > heightRatio) { width = Math.floor(width / heightRatio); height = thumbHeight; } else { width = thumbWidth; height = Math.floor(height / widthRatio); } } $(this).css({ width : width, height : height, top : Math.floor(thumbHeight / 2 - height / 2), left : Math.floor(thumbWidth / 2 - width / 2) }); parent.width(thumbWidth).height(thumbHeight); $(this).hide().appendTo(parent).fadeIn(300); }).attr('src', href); }); //Set initial width this.width = this.list.children().eq(0).outerWidth(true); this.list.width(this.width * (obj.group.length + 1)).css('left', Math.floor($(window).width() * 0.5 - (obj.index * this.width + this.width * 0.5))); }, beforeLoad: function (opts, obj) { //Remove self if gallery do not have at least two items if (obj.group.length < 2) { obj.helpers.thumbs = false; return; } //Increase bottom margin to give space for thumbs obj.margin[ opts.position === 'top' ? 0 : 2 ] += ((opts.height) + 15); }, afterShow: function (opts, obj) { //Check if exists and create or update list if (this.list) { this.onUpdate(opts, obj); } else { this.init(opts, obj); } //Set active element this.list.children().removeClass('active').eq(obj.index).addClass('active'); }, //Center list onUpdate: function (opts, obj) { if (this.list) { this.list.stop(true).animate({ 'left': Math.floor($(window).width() * 0.5 - (obj.index * this.width + this.width * 0.5)) }, 150); } }, beforeClose: function () { if (this.wrap) { this.wrap.remove(); } this.wrap = null; this.list = null; this.width = 0; } } }(jQuery));;// END OF /scripts/fancyBox/source/helpers/jquery.fancybox-thumbs.js // STARTS OF /share/imagesloaded.pkgd.min.js /*! * imagesLoaded PACKAGED v3.2.0 * JavaScript is all like "You images are done yet or what?" * MIT License */ (function(){"use strict";function e(){}function t(e,t){for(var n=e.length;n--;)if(e[n].listener===t)return n;return-1}function n(e){return function(){return this[e].apply(this,arguments)}}var i=e.prototype,r=this,s=r.EventEmitter;i.getListeners=function(e){var t,n,i=this._getEvents();if("object"==typeof e){t={};for(n in i)i.hasOwnProperty(n)&&e.test(n)&&(t[n]=i[n])}else t=i[e]||(i[e]=[]);return t},i.flattenListeners=function(e){var t,n=[];for(t=0;th;h++){var j=this[h],k=a.data(j,b);if(k)if(a.isFunction(k[e])&&"_"!==e.charAt(0)){var l=k[e].apply(k,g);if(void 0!==l)return l}else f("no such method '"+e+"' for "+b+" instance");else f("cannot call methods on "+b+" prior to initialization; attempted to call '"+e+"'")}return this}return this.each(function(){var d=a.data(this,b);d?(d.option(e),d._init()):(d=new c(this,e),a.data(this,b,d))})}}if(a){var f="undefined"==typeof console?b:function(a){console.error(a)};return a.bridget=function(a,b){c(b),e(a,b)},a.bridget}}var d=Array.prototype.slice;"function"==typeof define&&define.amd?define("jquery-bridget/jquery.bridget",["jquery"],c):c("object"==typeof exports?require("jquery"):a.jQuery)}(window),function(a){function b(b){var c=a.event;return c.target=c.target||c.srcElement||b,c}var c=document.documentElement,d=function(){};c.addEventListener?d=function(a,b,c){a.addEventListener(b,c,!1)}:c.attachEvent&&(d=function(a,c,d){a[c+d]=d.handleEvent?function(){var c=b(a);d.handleEvent.call(d,c)}:function(){var c=b(a);d.call(a,c)},a.attachEvent("on"+c,a[c+d])});var e=function(){};c.removeEventListener?e=function(a,b,c){a.removeEventListener(b,c,!1)}:c.detachEvent&&(e=function(a,b,c){a.detachEvent("on"+b,a[b+c]);try{delete a[b+c]}catch(d){a[b+c]=void 0}});var f={bind:d,unbind:e};"function"==typeof define&&define.amd?define("eventie/eventie",f):"object"==typeof exports?module.exports=f:a.eventie=f}(window),function(){function a(){}function b(a,b){for(var c=a.length;c--;)if(a[c].listener===b)return c;return-1}function c(a){return function(){return this[a].apply(this,arguments)}}var d=a.prototype,e=this,f=e.EventEmitter;d.getListeners=function(a){var b,c,d=this._getEvents();if(a instanceof RegExp){b={};for(c in d)d.hasOwnProperty(c)&&a.test(c)&&(b[c]=d[c])}else b=d[a]||(d[a]=[]);return b},d.flattenListeners=function(a){var b,c=[];for(b=0;be;e++)if(b=c[e]+a,"string"==typeof d[b])return b}}var c="Webkit Moz ms Ms O".split(" "),d=document.documentElement.style;"function"==typeof define&&define.amd?define("get-style-property/get-style-property",[],function(){return b}):"object"==typeof exports?module.exports=b:a.getStyleProperty=b}(window),function(a){function b(a){var b=parseFloat(a),c=-1===a.indexOf("%")&&!isNaN(b);return c&&b}function c(){}function d(){for(var a={width:0,height:0,innerWidth:0,innerHeight:0,outerWidth:0,outerHeight:0},b=0,c=g.length;c>b;b++){var d=g[b];a[d]=0}return a}function e(c){function e(){if(!m){m=!0;var d=a.getComputedStyle;if(j=function(){var a=d?function(a){return d(a,null)}:function(a){return a.currentStyle};return function(b){var c=a(b);return c||f("Style returned "+c+". Are you running this code in a hidden iframe on Firefox? See http://bit.ly/getsizebug1"),c}}(),k=c("boxSizing")){var e=document.createElement("div");e.style.width="200px",e.style.padding="1px 2px 3px 4px",e.style.borderStyle="solid",e.style.borderWidth="1px 2px 3px 4px",e.style[k]="border-box";var g=document.body||document.documentElement;g.appendChild(e);var h=j(e);l=200===b(h.width),g.removeChild(e)}}}function h(a){if(e(),"string"==typeof a&&(a=document.querySelector(a)),a&&"object"==typeof a&&a.nodeType){var c=j(a);if("none"===c.display)return d();var f={};f.width=a.offsetWidth,f.height=a.offsetHeight;for(var h=f.isBorderBox=!(!k||!c[k]||"border-box"!==c[k]),m=0,n=g.length;n>m;m++){var o=g[m],p=c[o];p=i(a,p);var q=parseFloat(p);f[o]=isNaN(q)?0:q}var r=f.paddingLeft+f.paddingRight,s=f.paddingTop+f.paddingBottom,t=f.marginLeft+f.marginRight,u=f.marginTop+f.marginBottom,v=f.borderLeftWidth+f.borderRightWidth,w=f.borderTopWidth+f.borderBottomWidth,x=h&&l,y=b(c.width);y!==!1&&(f.width=y+(x?0:r+v));var z=b(c.height);return z!==!1&&(f.height=z+(x?0:s+w)),f.innerWidth=f.width-(r+v),f.innerHeight=f.height-(s+w),f.outerWidth=f.width+t,f.outerHeight=f.height+u,f}}function i(b,c){if(a.getComputedStyle||-1===c.indexOf("%"))return c;var d=b.style,e=d.left,f=b.runtimeStyle,g=f&&f.left;return g&&(f.left=b.currentStyle.left),d.left=c,c=d.pixelLeft,d.left=e,g&&(f.left=g),c}var j,k,l,m=!1;return h}var f="undefined"==typeof console?c:function(a){console.error(a)},g=["paddingLeft","paddingRight","paddingTop","paddingBottom","marginLeft","marginRight","marginTop","marginBottom","borderLeftWidth","borderRightWidth","borderTopWidth","borderBottomWidth"];"function"==typeof define&&define.amd?define("get-size/get-size",["get-style-property/get-style-property"],e):"object"==typeof exports?module.exports=e(require("desandro-get-style-property")):a.getSize=e(a.getStyleProperty)}(window),function(a){function b(a){"function"==typeof a&&(b.isReady?a():g.push(a))}function c(a){var c="readystatechange"===a.type&&"complete"!==f.readyState;b.isReady||c||d()}function d(){b.isReady=!0;for(var a=0,c=g.length;c>a;a++){var d=g[a];d()}}function e(e){return"complete"===f.readyState?d():(e.bind(f,"DOMContentLoaded",c),e.bind(f,"readystatechange",c),e.bind(a,"load",c)),b}var f=a.document,g=[];b.isReady=!1,"function"==typeof define&&define.amd?define("doc-ready/doc-ready",["eventie/eventie"],e):"object"==typeof exports?module.exports=e(require("eventie")):a.docReady=e(a.eventie)}(window),function(a){function b(a,b){return a[g](b)}function c(a){if(!a.parentNode){var b=document.createDocumentFragment();b.appendChild(a)}}function d(a,b){c(a);for(var d=a.parentNode.querySelectorAll(b),e=0,f=d.length;f>e;e++)if(d[e]===a)return!0;return!1}function e(a,d){return c(a),b(a,d)}var f,g=function(){if(a.matches)return"matches";if(a.matchesSelector)return"matchesSelector";for(var b=["webkit","moz","ms","o"],c=0,d=b.length;d>c;c++){var e=b[c],f=e+"MatchesSelector";if(a[f])return f}}();if(g){var h=document.createElement("div"),i=b(h,"div");f=i?b:e}else f=d;"function"==typeof define&&define.amd?define("matches-selector/matches-selector",[],function(){return f}):"object"==typeof exports?module.exports=f:window.matchesSelector=f}(Element.prototype),function(a,b){"function"==typeof define&&define.amd?define("fizzy-ui-utils/utils",["doc-ready/doc-ready","matches-selector/matches-selector"],function(c,d){return b(a,c,d)}):"object"==typeof exports?module.exports=b(a,require("doc-ready"),require("desandro-matches-selector")):a.fizzyUIUtils=b(a,a.docReady,a.matchesSelector)}(window,function(a,b,c){var d={};d.extend=function(a,b){for(var c in b)a[c]=b[c];return a},d.modulo=function(a,b){return(a%b+b)%b};var e=Object.prototype.toString;d.isArray=function(a){return"[object Array]"==e.call(a)},d.makeArray=function(a){var b=[];if(d.isArray(a))b=a;else if(a&&"number"==typeof a.length)for(var c=0,e=a.length;e>c;c++)b.push(a[c]);else b.push(a);return b},d.indexOf=Array.prototype.indexOf?function(a,b){return a.indexOf(b)}:function(a,b){for(var c=0,d=a.length;d>c;c++)if(a[c]===b)return c;return-1},d.removeFrom=function(a,b){var c=d.indexOf(a,b);-1!=c&&a.splice(c,1)},d.isElement="function"==typeof HTMLElement||"object"==typeof HTMLElement?function(a){return a instanceof HTMLElement}:function(a){return a&&"object"==typeof a&&1==a.nodeType&&"string"==typeof a.nodeName},d.setText=function(){function a(a,c){b=b||(void 0!==document.documentElement.textContent?"textContent":"innerText"),a[b]=c}var b;return a}(),d.getParent=function(a,b){for(;a!=document.body;)if(a=a.parentNode,c(a,b))return a},d.getQueryElement=function(a){return"string"==typeof a?document.querySelector(a):a},d.handleEvent=function(a){var b="on"+a.type;this[b]&&this[b](a)},d.filterFindElements=function(a,b){a=d.makeArray(a);for(var e=[],f=0,g=a.length;g>f;f++){var h=a[f];if(d.isElement(h))if(b){c(h,b)&&e.push(h);for(var i=h.querySelectorAll(b),j=0,k=i.length;k>j;j++)e.push(i[j])}else e.push(h)}return e},d.debounceMethod=function(a,b,c){var d=a.prototype[b],e=b+"Timeout";a.prototype[b]=function(){var a=this[e];a&&clearTimeout(a);var b=arguments,f=this;this[e]=setTimeout(function(){d.apply(f,b),delete f[e]},c||100)}},d.toDashed=function(a){return a.replace(/(.)([A-Z])/g,function(a,b,c){return b+"-"+c}).toLowerCase()};var f=a.console;return d.htmlInit=function(c,e){b(function(){for(var b=d.toDashed(e),g=document.querySelectorAll(".js-"+b),h="data-"+b+"-options",i=0,j=g.length;j>i;i++){var k,l=g[i],m=l.getAttribute(h);try{k=m&&JSON.parse(m)}catch(n){f&&f.error("Error parsing "+h+" on "+l.nodeName.toLowerCase()+(l.id?"#"+l.id:"")+": "+n);continue}var o=new c(l,k),p=a.jQuery;p&&p.data(l,e,o)}})},d}),function(a,b){"function"==typeof define&&define.amd?define("outlayer/item",["eventEmitter/EventEmitter","get-size/get-size","get-style-property/get-style-property","fizzy-ui-utils/utils"],function(c,d,e,f){return b(a,c,d,e,f)}):"object"==typeof exports?module.exports=b(a,require("wolfy87-eventemitter"),require("get-size"),require("desandro-get-style-property"),require("fizzy-ui-utils")):(a.Outlayer={},a.Outlayer.Item=b(a,a.EventEmitter,a.getSize,a.getStyleProperty,a.fizzyUIUtils))}(window,function(a,b,c,d,e){function f(a){for(var b in a)return!1;return b=null,!0}function g(a,b){a&&(this.element=a,this.layout=b,this.position={x:0,y:0},this._create())}function h(a){return a.replace(/([A-Z])/g,function(a){return"-"+a.toLowerCase()})}var i=a.getComputedStyle,j=i?function(a){return i(a,null)}:function(a){return a.currentStyle},k=d("transition"),l=d("transform"),m=k&&l,n=!!d("perspective"),o={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"otransitionend",transition:"transitionend"}[k],p=["transform","transition","transitionDuration","transitionProperty"],q=function(){for(var a={},b=0,c=p.length;c>b;b++){var e=p[b],f=d(e);f&&f!==e&&(a[e]=f)}return a}();e.extend(g.prototype,b.prototype),g.prototype._create=function(){this._transn={ingProperties:{},clean:{},onEnd:{}},this.css({position:"absolute"})},g.prototype.handleEvent=function(a){var b="on"+a.type;this[b]&&this[b](a)},g.prototype.getSize=function(){this.size=c(this.element)},g.prototype.css=function(a){var b=this.element.style;for(var c in a){var d=q[c]||c;b[d]=a[c]}},g.prototype.getPosition=function(){var a=j(this.element),b=this.layout.options,c=b.isOriginLeft,d=b.isOriginTop,e=a[c?"left":"right"],f=a[d?"top":"bottom"],g=this.layout.size,h=-1!=e.indexOf("%")?parseFloat(e)/100*g.width:parseInt(e,10),i=-1!=f.indexOf("%")?parseFloat(f)/100*g.height:parseInt(f,10);h=isNaN(h)?0:h,i=isNaN(i)?0:i,h-=c?g.paddingLeft:g.paddingRight,i-=d?g.paddingTop:g.paddingBottom,this.position.x=h,this.position.y=i},g.prototype.layoutPosition=function(){var a=this.layout.size,b=this.layout.options,c={},d=b.isOriginLeft?"paddingLeft":"paddingRight",e=b.isOriginLeft?"left":"right",f=b.isOriginLeft?"right":"left",g=this.position.x+a[d];c[e]=this.getXValue(g),c[f]="";var h=b.isOriginTop?"paddingTop":"paddingBottom",i=b.isOriginTop?"top":"bottom",j=b.isOriginTop?"bottom":"top",k=this.position.y+a[h];c[i]=this.getYValue(k),c[j]="",this.css(c),this.emitEvent("layout",[this])},g.prototype.getXValue=function(a){var b=this.layout.options;return b.percentPosition&&!b.isHorizontal?a/this.layout.size.width*100+"%":a+"px"},g.prototype.getYValue=function(a){var b=this.layout.options;return b.percentPosition&&b.isHorizontal?a/this.layout.size.height*100+"%":a+"px"},g.prototype._transitionTo=function(a,b){this.getPosition();var c=this.position.x,d=this.position.y,e=parseInt(a,10),f=parseInt(b,10),g=e===this.position.x&&f===this.position.y;if(this.setPosition(a,b),g&&!this.isTransitioning)return void this.layoutPosition();var h=a-c,i=b-d,j={};j.transform=this.getTranslate(h,i),this.transition({to:j,onTransitionEnd:{transform:this.layoutPosition},isCleaning:!0})},g.prototype.getTranslate=function(a,b){var c=this.layout.options;return a=c.isOriginLeft?a:-a,b=c.isOriginTop?b:-b,n?"translate3d("+a+"px, "+b+"px, 0)":"translate("+a+"px, "+b+"px)"},g.prototype.goTo=function(a,b){this.setPosition(a,b),this.layoutPosition()},g.prototype.moveTo=m?g.prototype._transitionTo:g.prototype.goTo,g.prototype.setPosition=function(a,b){this.position.x=parseInt(a,10),this.position.y=parseInt(b,10)},g.prototype._nonTransition=function(a){this.css(a.to),a.isCleaning&&this._removeStyles(a.to);for(var b in a.onTransitionEnd)a.onTransitionEnd[b].call(this)},g.prototype._transition=function(a){if(!parseFloat(this.layout.options.transitionDuration))return void this._nonTransition(a);var b=this._transn;for(var c in a.onTransitionEnd)b.onEnd[c]=a.onTransitionEnd[c];for(c in a.to)b.ingProperties[c]=!0,a.isCleaning&&(b.clean[c]=!0);if(a.from){this.css(a.from);var d=this.element.offsetHeight;d=null}this.enableTransition(a.to),this.css(a.to),this.isTransitioning=!0};var r="opacity,"+h(q.transform||"transform");g.prototype.enableTransition=function(){this.isTransitioning||(this.css({transitionProperty:r,transitionDuration:this.layout.options.transitionDuration}),this.element.addEventListener(o,this,!1))},g.prototype.transition=g.prototype[k?"_transition":"_nonTransition"],g.prototype.onwebkitTransitionEnd=function(a){this.ontransitionend(a)},g.prototype.onotransitionend=function(a){this.ontransitionend(a)};var s={"-webkit-transform":"transform","-moz-transform":"transform","-o-transform":"transform"};g.prototype.ontransitionend=function(a){if(a.target===this.element){var b=this._transn,c=s[a.propertyName]||a.propertyName;if(delete b.ingProperties[c],f(b.ingProperties)&&this.disableTransition(),c in b.clean&&(this.element.style[a.propertyName]="",delete b.clean[c]),c in b.onEnd){var d=b.onEnd[c];d.call(this),delete b.onEnd[c]}this.emitEvent("transitionEnd",[this])}},g.prototype.disableTransition=function(){this.removeTransitionStyles(),this.element.removeEventListener(o,this,!1),this.isTransitioning=!1},g.prototype._removeStyles=function(a){var b={};for(var c in a)b[c]="";this.css(b)};var t={transitionProperty:"",transitionDuration:""};return g.prototype.removeTransitionStyles=function(){this.css(t)},g.prototype.removeElem=function(){this.element.parentNode.removeChild(this.element),this.css({display:""}),this.emitEvent("remove",[this])},g.prototype.remove=function(){if(!k||!parseFloat(this.layout.options.transitionDuration))return void this.removeElem();var a=this;this.once("transitionEnd",function(){a.removeElem()}),this.hide()},g.prototype.reveal=function(){delete this.isHidden,this.css({display:""});var a=this.layout.options,b={},c=this.getHideRevealTransitionEndProperty("visibleStyle");b[c]=this.onRevealTransitionEnd,this.transition({from:a.hiddenStyle,to:a.visibleStyle,isCleaning:!0,onTransitionEnd:b})},g.prototype.onRevealTransitionEnd=function(){this.isHidden||this.emitEvent("reveal")},g.prototype.getHideRevealTransitionEndProperty=function(a){var b=this.layout.options[a];if(b.opacity)return"opacity";for(var c in b)return c},g.prototype.hide=function(){this.isHidden=!0,this.css({display:""});var a=this.layout.options,b={},c=this.getHideRevealTransitionEndProperty("hiddenStyle");b[c]=this.onHideTransitionEnd,this.transition({from:a.visibleStyle,to:a.hiddenStyle,isCleaning:!0,onTransitionEnd:b})},g.prototype.onHideTransitionEnd=function(){this.isHidden&&(this.css({display:"none"}),this.emitEvent("hide"))},g.prototype.destroy=function(){this.css({position:"",left:"",right:"",top:"",bottom:"",transition:"",transform:""})},g}),function(a,b){"function"==typeof define&&define.amd?define("outlayer/outlayer",["eventie/eventie","eventEmitter/EventEmitter","get-size/get-size","fizzy-ui-utils/utils","./item"],function(c,d,e,f,g){return b(a,c,d,e,f,g)}):"object"==typeof exports?module.exports=b(a,require("eventie"),require("wolfy87-eventemitter"),require("get-size"),require("fizzy-ui-utils"),require("./item")):a.Outlayer=b(a,a.eventie,a.EventEmitter,a.getSize,a.fizzyUIUtils,a.Outlayer.Item)}(window,function(a,b,c,d,e,f){function g(a,b){var c=e.getQueryElement(a);if(!c)return void(h&&h.error("Bad element for "+this.constructor.namespace+": "+(c||a)));this.element=c,i&&(this.$element=i(this.element)),this.options=e.extend({},this.constructor.defaults),this.option(b);var d=++k;this.element.outlayerGUID=d,l[d]=this,this._create(),this.options.isInitLayout&&this.layout()}var h=a.console,i=a.jQuery,j=function(){},k=0,l={};return g.namespace="outlayer",g.Item=f,g.defaults={containerStyle:{position:"relative"},isInitLayout:!0,isOriginLeft:!0,isOriginTop:!0,isResizeBound:!0,isResizingContainer:!0,transitionDuration:"0.4s",hiddenStyle:{opacity:0,transform:"scale(0.001)"},visibleStyle:{opacity:1,transform:"scale(1)"}},e.extend(g.prototype,c.prototype),g.prototype.option=function(a){e.extend(this.options,a)},g.prototype._create=function(){this.reloadItems(),this.stamps=[],this.stamp(this.options.stamp),e.extend(this.element.style,this.options.containerStyle),this.options.isResizeBound&&this.bindResize()},g.prototype.reloadItems=function(){this.items=this._itemize(this.element.children)},g.prototype._itemize=function(a){for(var b=this._filterFindItemElements(a),c=this.constructor.Item,d=[],e=0,f=b.length;f>e;e++){var g=b[e],h=new c(g,this);d.push(h)}return d},g.prototype._filterFindItemElements=function(a){return e.filterFindElements(a,this.options.itemSelector)},g.prototype.getItemElements=function(){for(var a=[],b=0,c=this.items.length;c>b;b++)a.push(this.items[b].element);return a},g.prototype.layout=function(){this._resetLayout(),this._manageStamps();var a=void 0!==this.options.isLayoutInstant?this.options.isLayoutInstant:!this._isLayoutInited;this.layoutItems(this.items,a),this._isLayoutInited=!0},g.prototype._init=g.prototype.layout,g.prototype._resetLayout=function(){this.getSize()},g.prototype.getSize=function(){this.size=d(this.element)},g.prototype._getMeasurement=function(a,b){var c,f=this.options[a];f?("string"==typeof f?c=this.element.querySelector(f):e.isElement(f)&&(c=f),this[a]=c?d(c)[b]:f):this[a]=0},g.prototype.layoutItems=function(a,b){a=this._getItemsForLayout(a),this._layoutItems(a,b),this._postLayout()},g.prototype._getItemsForLayout=function(a){for(var b=[],c=0,d=a.length;d>c;c++){var e=a[c];e.isIgnored||b.push(e)}return b},g.prototype._layoutItems=function(a,b){if(this._emitCompleteOnItems("layout",a),a&&a.length){for(var c=[],d=0,e=a.length;e>d;d++){var f=a[d],g=this._getItemLayoutPosition(f);g.item=f,g.isInstant=b||f.isLayoutInstant,c.push(g)}this._processLayoutQueue(c)}},g.prototype._getItemLayoutPosition=function(){return{x:0,y:0}},g.prototype._processLayoutQueue=function(a){for(var b=0,c=a.length;c>b;b++){var d=a[b];this._positionItem(d.item,d.x,d.y,d.isInstant)}},g.prototype._positionItem=function(a,b,c,d){d?a.goTo(b,c):a.moveTo(b,c)},g.prototype._postLayout=function(){this.resizeContainer()},g.prototype.resizeContainer=function(){if(this.options.isResizingContainer){var a=this._getContainerSize();a&&(this._setContainerMeasure(a.width,!0),this._setContainerMeasure(a.height,!1))}},g.prototype._getContainerSize=j,g.prototype._setContainerMeasure=function(a,b){if(void 0!==a){var c=this.size;c.isBorderBox&&(a+=b?c.paddingLeft+c.paddingRight+c.borderLeftWidth+c.borderRightWidth:c.paddingBottom+c.paddingTop+c.borderTopWidth+c.borderBottomWidth),a=Math.max(a,0),this.element.style[b?"width":"height"]=a+"px"}},g.prototype._emitCompleteOnItems=function(a,b){function c(){e.dispatchEvent(a+"Complete",null,[b])}function d(){g++,g===f&&c()}var e=this,f=b.length;if(!b||!f)return void c();for(var g=0,h=0,i=b.length;i>h;h++){var j=b[h];j.once(a,d)}},g.prototype.dispatchEvent=function(a,b,c){var d=b?[b].concat(c):c;if(this.emitEvent(a,d),i)if(this.$element=this.$element||i(this.element),b){var e=i.Event(b);e.type=a,this.$element.trigger(e,c)}else this.$element.trigger(a,c)},g.prototype.ignore=function(a){var b=this.getItem(a);b&&(b.isIgnored=!0)},g.prototype.unignore=function(a){var b=this.getItem(a);b&&delete b.isIgnored},g.prototype.stamp=function(a){if(a=this._find(a)){this.stamps=this.stamps.concat(a);for(var b=0,c=a.length;c>b;b++){var d=a[b];this.ignore(d)}}},g.prototype.unstamp=function(a){if(a=this._find(a))for(var b=0,c=a.length;c>b;b++){var d=a[b];e.removeFrom(this.stamps,d),this.unignore(d)}},g.prototype._find=function(a){return a?("string"==typeof a&&(a=this.element.querySelectorAll(a)),a=e.makeArray(a)):void 0},g.prototype._manageStamps=function(){if(this.stamps&&this.stamps.length){this._getBoundingRect();for(var a=0,b=this.stamps.length;b>a;a++){var c=this.stamps[a];this._manageStamp(c)}}},g.prototype._getBoundingRect=function(){var a=this.element.getBoundingClientRect(),b=this.size;this._boundingRect={left:a.left+b.paddingLeft+b.borderLeftWidth,top:a.top+b.paddingTop+b.borderTopWidth,right:a.right-(b.paddingRight+b.borderRightWidth),bottom:a.bottom-(b.paddingBottom+b.borderBottomWidth)}},g.prototype._manageStamp=j,g.prototype._getElementOffset=function(a){var b=a.getBoundingClientRect(),c=this._boundingRect,e=d(a),f={left:b.left-c.left-e.marginLeft,top:b.top-c.top-e.marginTop,right:c.right-b.right-e.marginRight,bottom:c.bottom-b.bottom-e.marginBottom};return f},g.prototype.handleEvent=function(a){var b="on"+a.type;this[b]&&this[b](a)},g.prototype.bindResize=function(){this.isResizeBound||(b.bind(a,"resize",this),this.isResizeBound=!0)},g.prototype.unbindResize=function(){this.isResizeBound&&b.unbind(a,"resize",this),this.isResizeBound=!1},g.prototype.onresize=function(){function a(){b.resize(),delete b.resizeTimeout}this.resizeTimeout&&clearTimeout(this.resizeTimeout);var b=this;this.resizeTimeout=setTimeout(a,100)},g.prototype.resize=function(){this.isResizeBound&&this.needsResizeLayout()&&this.layout()},g.prototype.needsResizeLayout=function(){var a=d(this.element),b=this.size&&a;return b&&a.innerWidth!==this.size.innerWidth},g.prototype.addItems=function(a){var b=this._itemize(a);return b.length&&(this.items=this.items.concat(b)),b},g.prototype.appended=function(a){var b=this.addItems(a);b.length&&(this.layoutItems(b,!0),this.reveal(b))},g.prototype.prepended=function(a){var b=this._itemize(a);if(b.length){var c=this.items.slice(0);this.items=b.concat(c),this._resetLayout(),this._manageStamps(),this.layoutItems(b,!0),this.reveal(b),this.layoutItems(c)}},g.prototype.reveal=function(a){this._emitCompleteOnItems("reveal",a);for(var b=a&&a.length,c=0;b&&b>c;c++){var d=a[c];d.reveal()}},g.prototype.hide=function(a){this._emitCompleteOnItems("hide",a);for(var b=a&&a.length,c=0;b&&b>c;c++){var d=a[c];d.hide()}},g.prototype.revealItemElements=function(a){var b=this.getItems(a);this.reveal(b)},g.prototype.hideItemElements=function(a){var b=this.getItems(a);this.hide(b)},g.prototype.getItem=function(a){for(var b=0,c=this.items.length;c>b;b++){var d=this.items[b];if(d.element===a)return d}},g.prototype.getItems=function(a){a=e.makeArray(a);for(var b=[],c=0,d=a.length;d>c;c++){var f=a[c],g=this.getItem(f);g&&b.push(g)}return b},g.prototype.remove=function(a){var b=this.getItems(a);if(this._emitCompleteOnItems("remove",b),b&&b.length)for(var c=0,d=b.length;d>c;c++){var f=b[c];f.remove(),e.removeFrom(this.items,f)}},g.prototype.destroy=function(){var a=this.element.style;a.height="",a.position="",a.width="";for(var b=0,c=this.items.length;c>b;b++){var d=this.items[b];d.destroy()}this.unbindResize();var e=this.element.outlayerGUID;delete l[e],delete this.element.outlayerGUID,i&&i.removeData(this.element,this.constructor.namespace)},g.data=function(a){a=e.getQueryElement(a);var b=a&&a.outlayerGUID;return b&&l[b]},g.create=function(a,b){function c(){g.apply(this,arguments)}return Object.create?c.prototype=Object.create(g.prototype):e.extend(c.prototype,g.prototype),c.prototype.constructor=c,c.defaults=e.extend({},g.defaults),e.extend(c.defaults,b),c.prototype.settings={},c.namespace=a,c.data=g.data,c.Item=function(){f.apply(this,arguments)},c.Item.prototype=new f,e.htmlInit(c,a),i&&i.bridget&&i.bridget(a,c),c},g.Item=f,g}),function(a,b){"function"==typeof define&&define.amd?define(["outlayer/outlayer","get-size/get-size","fizzy-ui-utils/utils"],b):"object"==typeof exports?module.exports=b(require("outlayer"),require("get-size"),require("fizzy-ui-utils")):a.Masonry=b(a.Outlayer,a.getSize,a.fizzyUIUtils)}(window,function(a,b,c){var d=a.create("masonry");return d.prototype._resetLayout=function(){this.getSize(),this._getMeasurement("columnWidth","outerWidth"),this._getMeasurement("gutter","outerWidth"),this.measureColumns();var a=this.cols;for(this.colYs=[];a--;)this.colYs.push(0);this.maxY=0},d.prototype.measureColumns=function(){if(this.getContainerWidth(),!this.columnWidth){var a=this.items[0],c=a&&a.element;this.columnWidth=c&&b(c).outerWidth||this.containerWidth}var d=this.columnWidth+=this.gutter,e=this.containerWidth+this.gutter,f=e/d,g=d-e%d,h=g&&1>g?"round":"floor";f=Math[h](f),this.cols=Math.max(f,1)},d.prototype.getContainerWidth=function(){var a=this.options.isFitWidth?this.element.parentNode:this.element,c=b(a);this.containerWidth=c&&c.innerWidth},d.prototype._getItemLayoutPosition=function(a){a.getSize();var b=a.size.outerWidth%this.columnWidth,d=b&&1>b?"round":"ceil",e=Math[d](a.size.outerWidth/this.columnWidth);e=Math.min(e,this.cols);for(var f=this._getColGroup(e),g=Math.min.apply(Math,f),h=c.indexOf(f,g),i={x:this.columnWidth*h,y:g},j=g+a.size.outerHeight,k=this.cols+1-f.length,l=0;k>l;l++)this.colYs[h+l]=j;return i},d.prototype._getColGroup=function(a){if(2>a)return this.colYs;for(var b=[],c=this.cols+1-a,d=0;c>d;d++){var e=this.colYs.slice(d,d+a);b[d]=Math.max.apply(Math,e)}return b},d.prototype._manageStamp=function(a){var c=b(a),d=this._getElementOffset(a),e=this.options.isOriginLeft?d.left:d.right,f=e+c.outerWidth,g=Math.floor(e/this.columnWidth);g=Math.max(0,g);var h=Math.floor(f/this.columnWidth);h-=f%this.columnWidth?0:1,h=Math.min(this.cols-1,h);for(var i=(this.options.isOriginTop?d.top:d.bottom)+c.outerHeight,j=g;h>=j;j++)this.colYs[j]=Math.max(i,this.colYs[j])},d.prototype._getContainerSize=function(){this.maxY=Math.max.apply(Math,this.colYs);var a={height:this.maxY};return this.options.isFitWidth&&(a.width=this._getContainerFitWidth()),a},d.prototype._getContainerFitWidth=function(){for(var a=0,b=this.cols;--b&&0===this.colYs[b];)a++;return(this.cols-a)*this.columnWidth-this.gutter},d.prototype.needsResizeLayout=function(){var a=this.containerWidth;return this.getContainerWidth(),a!==this.containerWidth},d});;// END OF /share/masonry.pkgd.min.js // STARTS OF /scripts/imgdelayload.js //是否为ie,并读出ie版本 window.isIE = !! navigator.userAgent.match(/MSIE\b\s*([0-9]\.[0-9]);/img); window.isIE && (window.isIE = RegExp.$1); window.delayImages = []; window.delayScroll = function(){ try{ //是否为chrome var isGoo = !! navigator.userAgent.match(/AppleWebKit\b/img); //获得可以触发scroll事件的对象 var box = window.isIE ? document.documentElement : document; //读取滚动条的位置和浏览器窗口的显示大小 var doctop = document.documentElement.scrollTop || window.pageYOffset || document.body.scrollTop, left = document.documentElement.scrollLeft || window.pageXOffset || document.body.scrollLeft, width = document.documentElement.clientWidth, height = document.documentElement.clientHeight; //对所有图片进行批量判断是否在浏览器显示区域内 for (var i = 0; i < window.delayImages.length; i++) { var _top = $(window.delayImages[i]).offset().top, _left = $(window.delayImages[i]).offset().left; //判断图片是否在显示区域内,有50个像素的偏移是为了提前预加载 //(_top + 100 >= doctop && _left >= left && _top - 100 <= doctop + height && _left <= left + width) //当图片是居中对齐时,因为loading图很小,而图片的父框可能比较大,这里拿到的 _left > left + width,导致图片永远不能被加载,暂时不限制横向宽度, //这样会导致有横向滚动条时,当拖动到否一位置时,右侧的所有图片都会被加载,但很少网站有横向滚动条,先不管了 var needshow = _top == 0; //一般图片在滚动组件内的情况(如新闻,产品等的滚动显示 needshow |= (_top + 100 >= doctop && _left >= left && _top - 100 <= doctop + height); //图片在可视区域的情况 needshow |= doctop + height + 400 > $(document).height(); //拖动到页底的情况,理想情况下其实不需要这行,因为理论上 doctop + height == $(document).height(),但在手机上实际获取到的scroll好像有点问题,所以+500 if (needshow){ var _src = window.delayImages[i].getAttribute('_src'); var _images = $("img[_src='"+_src+"']"); //有些图片对象是事后通过脚本复制来的,重新获取下这个图片,保证浏览器能找到这个对象 for(var k = 0;k < _images.length;k++){ //如果图片已经显示,则取消赋值 if (_src && $(_images[k]).attr('src') !== _src && (_top == 0 || $(_images[k]).is(":visible"))) { $(_images[k]).attr('src',_src); $(_images[k]).css('background','none'); } } } } }catch(e){ console.log('imgdelayload.js',e); } } function check_webp_feature(feature, callback) { var kTestImages = { lossy: "UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA", lossless: "UklGRhoAAABXRUJQVlA4TA0AAAAvAAAAEAcQERGIiP4HAA==", alpha: "UklGRkoAAABXRUJQVlA4WAoAAAAQAAAAAAAAAAAAQUxQSAwAAAARBxAR/Q9ERP8DAABWUDggGAAAABQBAJ0BKgEAAQAAAP4AAA3AAP7mtQAAAA==", animation: "UklGRlIAAABXRUJQVlA4WAoAAAASAAAAAAAAAAAAQU5JTQYAAAD/////AABBTk1GJgAAAAAAAAAAAAAAAAAAAGQAAABWUDhMDQAAAC8AAAAQBxAREYiI/gcA" }; var img = new Image(); img.onload = function () { var result = (img.width > 0) && (img.height > 0); callback(feature, result); }; img.onerror = function () { callback(feature, false); }; img.src = "data:image/webp;base64," + kTestImages[feature]; } window.supportWebp = false; check_webp_feature('alpha',function(feature,result){ window.supportWebp = result;}); function delayload(option){ if(window.nodelayimg) return; //H5站混合静态和自由模块时,不能使用图片延时加载,因为图片延时加载会改变页面的高度 delayload2(option); } function delayload2(option){ if(window.isIE) return; //IE支持不好,IE先不启用延时加载 //图片未加载时显示的图片 var src = option.src ? option.src : ''; var bgsrc = option.bgsrc ? option.bgsrc : ''; //指定那些id下的img元素使用延迟显示 var id = option.id ? option.id : []; //获得所有的图片元素 window.delayImages = []; var top = document.documentElement.scrollTop || window.pageYOffset || document.body.scrollTop; var width = document.documentElement.clientWidth; var height = document.documentElement.clientHeight; for (var i = 0; i < id.length; i++) { var idbox = document.getElementById(id[i]),_imgs; if (idbox && (_imgs = idbox.getElementsByTagName('img'))) { for (var t = 0; t < _imgs.length; t++) { if($(_imgs[t])[0].outerHTML.indexOf(src) > -1) continue; //避免与 mod_pagespeed 冲突 //window.delayImages.push(_imgs[t]); var _top = $(_imgs[t]).offset().top; var _showed = _top + 50 >= top && _top - 50 <= top + height; if(_showed) continue; var flag = true; var m = $(_imgs[t]).closest(".ModuleItem"); if(m && (m.html() + "").toLowerCase().indexOf("slide") > -1) flag = false; //忽略幻灯片模块 if(m && m.find(".ProductList").length > 0 && m.find(".ProductList[showstyle=1]").length > 0 ) flag = false; //轮播的产品列表模块判断图片位置有问题,先忽略 if(m && m.find(".ModuleSiteGallery").length > 0 && m.find(".grid-item").length > 0 ) flag = false; //相册模块判断图片位置有问题,先忽略 if($(_imgs[t]).attr('nodelay') == '1') flag = false; //图片添加了不延时的属性 if($(_imgs[t]).attr('src').indexOf('c=validatecode') > -1) flag = false; //验证码图片不作处理 if(flag){ window.delayImages.push(_imgs[t]); } } } } //将所有的图片设置为指定的loading图片 for (var i = 0; i < window.delayImages.length; i++) { //图片本来的图片路径放入_src中 var osrc = window.delayImages[i].src; if($(window.delayImages[i]).attr('data-pagespeed-lazy-src')) osrc = $(window.delayImages[i]).attr('data-pagespeed-lazy-src'); //避免与 mod_pagespeed 冲突 if(window.supportWebp && isPlatformVersion == '1' && osrc.indexOf('?') == -1 && osrc.indexOf("comdata/") > -1 && /\.(jpg|jpeg|png)$/i.test(osrc)){ //osrc += ".webp"; //共享目录的时候,对这个支持不好(会出现 IIS 的 Rewrite Module 错误,实际上是IIS的问题) } window.delayImages[i].setAttribute('_src', osrc); window.delayImages[i].style.background = 'url('+src+') center center no-repeat'; //loading图用背景来处理 window.delayImages[i].src = bgsrc; //放个透明的图来占位 //这里要加一个onload事件处理产品模块的响应式问题和泽彬做的产品图片效果 if($.fn.masonry) $(window.delayImages[i]).on('load',function(){$('.masonry-container,.gallery-list').masonry()}); } var load = new Image(); load.src = src; load.onload = function() { delayScroll(); }; $(window).on("scroll",function (){delayScroll();}); $(window).load(function (){delayScroll();}); $('body')[0].addEventListener("DOMSubtreeModified", function (ev) { //兼容文章列表 滚动公告的效果 如果不延迟执行 chrome 会把文章列表强制滚动到可视区域的行为 if(window.delaytimer) clearTimeout(window.delaytimer); window.delaytimer = setTimeout(function(){delayScroll();},500); }, false); } /*delayload({ id: ['pagebody'], src: 'http://h560.72dns.net/images/loading2.gif' });*/;// END OF /scripts/imgdelayload.js // STARTS OF /share/RulersGuides/RulersGuides.js function RulersGuides(){ if($('#RulersGuides').length > 0){ var $this = $('#RulersGuides'); topRulers = $('.Rulers.top', $this), rightRulers = $('.Rulers.right', $this); }else{ var $this = $('
    '); topRulers = $('
    '), rightRulers = $('
    '), scaleNumberObj = $('
    '); $('body').prepend($this.prepend(topRulers).prepend(rightRulers)); var bHeight = document.body.scrollHeight, dHeight = document.documentElement.scrollHeight; rightRulers.height(Math.max(bHeight, dHeight)); var j = jj = i = scaleNumber = 0; j = topRulers.width()/100; jj = rightRulers.height()/100; for(; i < Math.max(j,jj); i++){ scaleNumber = i * 100; if(i < j) topRulers.append(scaleNumberObj.clone().css('left', scaleNumber+3).html(scaleNumber)); if(i < jj) rightRulers.append(scaleNumberObj.clone().css('top', scaleNumber+3).html(scaleNumber)); } } topRulers.click(function(event){ var y = $('
    '); $this.append(y); y.append('
    '); y.css('left', event.pageX); y.draggable({ axis: "x", drag: function(event, ui){ if(ui.offset.left >= topRulers.width() - 20){ ui.helper.remove(); } } }); y.dblclick(function(){ $(this).remove(); }); }); rightRulers.click(function(event){ var x = $('
    '); $this.append(x); x.append('
    '); x.css('top', event.pageY); x.draggable({ axis: "y", drag: function(event, ui){ if(ui.offset.top <= 20){ ui.helper.remove(); } } }); x.dblclick(function(){ $(this).remove(); }); }); this.show = function(){ $this.show(); }; this.getTopRulersHeight = function(){ if($this.css("display") != "none") return topRulers.height(); else return 0; } this.toggle = function(callback,callbackargs){ if($this.css("display") == "none") $this.show(); else $this.hide(); if(callback) callback.apply(null,callbackargs ? callbackargs : new Array()); } this.setTopRulersTop = function(val){ topRulers.css({"left":"0","position": "relative", "top": val + "px" }); } this.hide = function(){ $this.hide(); }; $this.hide(); try{ $( ".block" ).draggable( "option", "snap", ".line" ); }catch(e){ } };;// END OF /share/RulersGuides/RulersGuides.js addScript('/framework/ref/scripts/jquery.ajaxfileupload.js',null,true); addScript('/scripts/cityselect/Region.js',null,true); addScript('/share/datetimepicker/jquery.datetimepicker.js',null,true);