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

";if(!b.querySelectorAll||b.querySelectorAll(".TEST").length!==0){m=function(b,e,f,g){e=e||c;if(!g&&!m.isXML(e)){var h=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(b);if(h&&(e.nodeType===1||e.nodeType===9)){if(h[1])return s(e.getElementsByTagName(b),f);if(h[2]&&o.find.CLASS&&e.getElementsByClassName)return s(e.getElementsByClassName(h[2]),f)}if(e.nodeType===9){if(b==="body"&&e.body)return s([e.body],f);if(h&&h[3]){var i=e.getElementById(h[3]);if(!i||!i.parentNode)return s([],f);if(i.id===h[3])return s([i],f)}try{return s(e.querySelectorAll(b),f)}catch(j){}}else if(e.nodeType===1&&e.nodeName.toLowerCase()!=="object"){var k=e,l=e.getAttribute("id"),n=l||d,p=e.parentNode,q=/^\s*[+~]/.test(b);l?n=n.replace(/'/g,"\\$&"):e.setAttribute("id",n),q&&p&&(e=e.parentNode);try{if(!q||p)return s(e.querySelectorAll("[id='"+n+"'] "+b),f)}catch(r){}finally{l||k.removeAttribute("id")}}}return a(b,e,f,g)};for(var e in a)m[e]=a[e];b=null}}(),function(){var a=c.documentElement,b=a.matchesSelector||a.mozMatchesSelector||a.webkitMatchesSelector||a.msMatchesSelector;if(b){var d=!b.call(c.createElement("div"),"div"),e=!1;try{b.call(c.documentElement,"[test!='']:sizzle")}catch(f){e=!0}m.matchesSelector=function(a,c){c=c.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!m.isXML(a))try{if(e||!o.match.PSEUDO.test(c)&&!/!=/.test(c)){var f=b.call(a,c);if(f||!d||a.document&&a.document.nodeType!==11)return f}}catch(g){}return m(c,null,null,[a]).length>0}}}(),function(){var a=c.createElement("div");a.innerHTML="
";if(!!a.getElementsByClassName&&a.getElementsByClassName("e").length!==0){a.lastChild.className="e";if(a.getElementsByClassName("e").length===1)return;o.order.splice(1,0,"CLASS"),o.find.CLASS=function(a,b,c){if(typeof b.getElementsByClassName!="undefined"&&!c)return b.getElementsByClassName(a[1])},a=null}}(),c.documentElement.contains?m.contains=function(a,b){return a!==b&&(a.contains?a.contains(b):!0)}:c.documentElement.compareDocumentPosition?m.contains=function(a,b){return!!(a.compareDocumentPosition(b)&16)}:m.contains=function(){return!1},m.isXML=function(a){var b=(a?a.ownerDocument||a:0).documentElement;return b?b.nodeName!=="HTML":!1};var y=function(a,b,c){var d,e=[],f="",g=b.nodeType?[b]:b;while(d=o.match.PSEUDO.exec(a))f+=d[0],a=a.replace(o.match.PSEUDO,"");a=o.relative[a]?a+"*":a;for(var h=0,i=g.length;h0)for(h=g;h=0:f.filter(a,this).length>0:this.filter(a).length>0)},closest:function(a,b){var c=[],d,e,g=this[0];if(f.isArray(a)){var h=1;while(g&&g.ownerDocument&&g!==b){for(d=0;d-1:f.find.matchesSelector(g,a)){c.push(g);break}g=g.parentNode;if(!g||!g.ownerDocument||g===b||g.nodeType===11)break}}c=c.length>1?f.unique(c):c;return this.pushStack(c,"closest",a)},index:function(a){if(!a)return this[0]&&this[0].parentNode?this.prevAll().length:-1;if(typeof a=="string")return f.inArray(this[0],f(a));return f.inArray(a.jquery?a[0]:a,this)},add:function(a,b){var c=typeof a=="string"?f(a,b):f.makeArray(a&&a.nodeType?[a]:a),d=f.merge(this.get(),c);return this.pushStack(S(c[0])||S(d[0])?d:f.unique(d))},andSelf:function(){return this.add(this.prevObject)}}),f.each({parent:function(a){var b=a.parentNode;return b&&b.nodeType!==11?b:null},parents:function(a){return f.dir(a,"parentNode")},parentsUntil:function(a,b,c){return f.dir(a,"parentNode",c)},next:function(a){return f.nth(a,2,"nextSibling")},prev:function(a){return f.nth(a,2,"previousSibling")},nextAll:function(a){return f.dir(a,"nextSibling")},prevAll:function(a){return f.dir(a,"previousSibling")},nextUntil:function(a,b,c){return f.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return f.dir(a,"previousSibling",c)},siblings:function(a){return f.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return f.sibling(a.firstChild)},contents:function(a){return f.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:f.makeArray(a.childNodes)}},function(a,b){f.fn[a]=function(c,d){var e=f.map(this,b,c);L.test(a)||(d=c),d&&typeof d=="string"&&(e=f.filter(d,e)),e=this.length>1&&!R[a]?f.unique(e):e,(this.length>1||N.test(d))&&M.test(a)&&(e=e.reverse());return this.pushStack(e,a,P.call(arguments).join(","))}}),f.extend({filter:function(a,b,c){c&&(a=":not("+a+")");return b.length===1?f.find.matchesSelector(b[0],a)?[b[0]]:[]:f.find.matches(a,b)},dir:function(a,c,d){var e=[],g=a[c];while(g&&g.nodeType!==9&&(d===b||g.nodeType!==1||!f(g).is(d)))g.nodeType===1&&e.push(g),g=g[c];return e},nth:function(a,b,c,d){b=b||1;var e=0;for(;a;a=a[c])if(a.nodeType===1&&++e===b)break;return a},sibling:function(a,b){var c=[];for(;a;a=a.nextSibling)a.nodeType===1&&a!==b&&c.push(a);return c}});var V="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",W=/ jQuery\d+="(?:\d+|null)"/g,X=/^\s+/,Y=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,Z=/<([\w:]+)/,$=/]","i"),bd=/checked\s*(?:[^=]|=\s*.checked.)/i,be=/\/(java|ecma)script/i,bf=/^\s*",""],legend:[1,"
","
"],thead:[1,"","
"],tr:[2,"","
"],td:[3,"","
"],col:[2,"","
"],area:[1,"",""],_default:[0,"",""]},bh=U(c);bg.optgroup=bg.option,bg.tbody=bg.tfoot=bg.colgroup=bg.caption=bg.thead,bg.th=bg.td,f.support.htmlSerialize||(bg._default=[1,"div
","
"]),f.fn.extend({text:function(a){return f.access(this,function(a){return a===b?f.text(this):this.empty().append((this[0]&&this[0].ownerDocument||c).createTextNode(a))},null,a,arguments.length)},wrapAll:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapAll(a.call(this,b))});if(this[0]){var b=f(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&a.firstChild.nodeType===1)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapInner(a.call(this,b))});return this.each(function(){var b=f(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=f.isFunction(a);return this.each(function(c){f(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){f.nodeName(this,"body")||f(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this)});if(arguments.length){var a=f .clean(arguments);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this.nextSibling)});if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,f.clean(arguments));return a}},remove:function(a,b){for(var c=0,d;(d=this[c])!=null;c++)if(!a||f.filter(a,[d]).length)!b&&d.nodeType===1&&(f.cleanData(d.getElementsByTagName("*")),f.cleanData([d])),d.parentNode&&d.parentNode.removeChild(d);return this},empty:function(){for(var a=0,b;(b=this[a])!=null;a++){b.nodeType===1&&f.cleanData(b.getElementsByTagName("*"));while(b.firstChild)b.removeChild(b.firstChild)}return this},clone:function(a,b){a=a==null?!1:a,b=b==null?a:b;return this.map(function(){return f.clone(this,a,b)})},html:function(a){return f.access(this,function(a){var c=this[0]||{},d=0,e=this.length;if(a===b)return c.nodeType===1?c.innerHTML.replace(W,""):null;if(typeof a=="string"&&!ba.test(a)&&(f.support.leadingWhitespace||!X.test(a))&&!bg[(Z.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Y,"<$1>");try{for(;d1&&l0?this.clone(!0):this).get();f(e[h])[b](j),d=d.concat(j)}return this.pushStack(d,a,e.selector)}}),f.extend({clone:function(a,b,c){var d,e,g,h=f.support.html5Clone||f.isXMLDoc(a)||!bc.test("<"+a.nodeName+">")?a.cloneNode(!0):bo(a);if((!f.support.noCloneEvent||!f.support.noCloneChecked)&&(a.nodeType===1||a.nodeType===11)&&!f.isXMLDoc(a)){bk(a,h),d=bl(a),e=bl(h);for(g=0;d[g];++g)e[g]&&bk(d[g],e[g])}if(b){bj(a,h);if(c){d=bl(a),e=bl(h);for(g=0;d[g];++g)bj(d[g],e[g])}}d=e=null;return h},clean:function(a,b,d,e){var g,h,i,j=[];b=b||c,typeof b.createElement=="undefined"&&(b=b.ownerDocument||b[0]&&b[0].ownerDocument||c);for(var k=0,l;(l=a[k])!=null;k++){typeof l=="number"&&(l+="");if(!l)continue;if(typeof l=="string")if(!_.test(l))l=b.createTextNode(l);else{l=l.replace(Y,"<$1>");var m=(Z.exec(l)||["",""])[1].toLowerCase(),n=bg[m]||bg._default,o=n[0],p=b.createElement("div"),q=bh.childNodes,r;b===c?bh.appendChild(p):U(b).appendChild(p),p.innerHTML=n[1]+l+n[2];while(o--)p=p.lastChild;if(!f.support.tbody){var s=$.test(l),t=m==="table"&&!s?p.firstChild&&p.firstChild.childNodes:n[1]===""&&!s?p.childNodes:[];for(i=t.length-1;i>=0;--i)f.nodeName(t[i],"tbody")&&!t[i].childNodes.length&&t[i].parentNode.removeChild(t[i])}!f.support.leadingWhitespace&&X.test(l)&&p.insertBefore(b.createTextNode(X.exec(l)[0]),p.firstChild),l=p.childNodes,p&&(p.parentNode.removeChild(p),q.length>0&&(r=q[q.length-1],r&&r.parentNode&&r.parentNode.removeChild(r)))}var u;if(!f.support.appendChecked)if(l[0]&&typeof (u=l.length)=="number")for(i=0;i1)},f.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=by(a,"opacity");return c===""?"1":c}return a.style.opacity}}},cssNumber:{fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":f.support.cssFloat?"cssFloat":"styleFloat"},style:function(a,c,d,e){if(!!a&&a.nodeType!==3&&a.nodeType!==8&&!!a.style){var g,h,i=f.camelCase(c),j=a.style,k=f.cssHooks[i];c=f.cssProps[i]||i;if(d===b){if(k&&"get"in k&&(g=k.get(a,!1,e))!==b)return g;return j[c]}h=typeof d,h==="string"&&(g=bu.exec(d))&&(d=+(g[1]+1)*+g[2]+parseFloat(f.css(a,c)),h="number");if(d==null||h==="number"&&isNaN(d))return;h==="number"&&!f.cssNumber[i]&&(d+="px");if(!k||!("set"in k)||(d=k.set(a,d))!==b)try{j[c]=d}catch(l){}}},css:function(a,c,d){var e,g;c=f.camelCase(c),g=f.cssHooks[c],c=f.cssProps[c]||c,c==="cssFloat"&&(c="float");if(g&&"get"in g&&(e=g.get(a,!0,d))!==b)return e;if(by)return by(a,c)},swap:function(a,b,c){var d={},e,f;for(f in b)d[f]=a.style[f],a.style[f]=b[f];e=c.call(a);for(f in b)a.style[f]=d[f];return e}}),f.curCSS=f.css,c.defaultView&&c.defaultView.getComputedStyle&&(bz=function(a,b){var c,d,e,g,h=a.style;b=b.replace(br,"-$1").toLowerCase(),(d=a.ownerDocument.defaultView)&&(e=d.getComputedStyle(a,null))&&(c=e.getPropertyValue(b),c===""&&!f.contains(a.ownerDocument.documentElement,a)&&(c=f.style(a,b))),!f.support.pixelMargin&&e&&bv.test(b)&&bt.test(c)&&(g=h.width,h.width=c,c=e.width,h.width=g);return c}),c.documentElement.currentStyle&&(bA=function(a,b){var c,d,e,f=a.currentStyle&&a.currentStyle[b],g=a.style;f==null&&g&&(e=g[b])&&(f=e),bt.test(f)&&(c=g.left,d=a.runtimeStyle&&a.runtimeStyle.left,d&&(a.runtimeStyle.left=a.currentStyle.left),g.left=b==="fontSize"?"1em":f,f=g.pixelLeft+"px",g.left=c,d&&(a.runtimeStyle.left=d));return f===""?"auto":f}),by=bz||bA,f.each(["height","width"],function(a,b){f.cssHooks[b]={get:function(a,c,d){if(c)return a.offsetWidth!==0?bB(a,b,d):f.swap(a,bw,function(){return bB(a,b,d)})},set:function(a,b){return bs.test(b)?b+"px":b}}}),f.support.opacity||(f.cssHooks.opacity={get:function(a,b){return bq.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=f.isNumeric(b)?"alpha(opacity="+b*100+")":"",g=d&&d.filter||c.filter||"";c.zoom=1;if(b>=1&&f.trim(g.replace(bp,""))===""){c.removeAttribute("filter");if(d&&!d.filter)return}c.filter=bp.test(g)?g.replace(bp,e):g+" "+e}}),f(function(){f.support.reliableMarginRight||(f.cssHooks.marginRight={get:function(a,b){return f.swap(a,{display:"inline-block"},function(){return b?by(a,"margin-right"):a.style.marginRight})}})}),f.expr&&f.expr.filters&&(f.expr.filters.hidden=function(a){var b=a.offsetWidth,c=a.offsetHeight;return b===0&&c===0||!f.support.reliableHiddenOffsets&&(a.style&&a.style.display||f.css(a,"display"))==="none"},f.expr.filters.visible=function(a){return!f.expr.filters.hidden(a)}),f.each({margin:"",padding:"",border:"Width"},function(a,b){f.cssHooks[a+b]={expand:function(c){var d,e=typeof c=="string"?c.split(" "):[c],f={};for(d=0;d<4;d++)f[a+bx[d]+b]=e[d]||e[d-2]||e[0];return f}}});var bC=/%20/g,bD=/\[\]$/,bE=/\r?\n/g,bF=/#.*$/,bG=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,bH=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,bI=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,bJ=/^(?:GET|HEAD)$/,bK=/^\/\//,bL=/\?/,bM=/)<[^<]*)*<\/script>/gi,bN=/^(?:select|textarea)/i,bO=/\s+/,bP=/([?&])_=[^&]*/,bQ=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,bR=f.fn.load,bS={},bT={},bU,bV,bW=["*/"]+["*"];try{bU=e.href}catch(bX){bU=c.createElement("a"),bU.href="",bU=bU.href}bV=bQ.exec(bU.toLowerCase())||[],f.fn.extend({load:function(a,c,d){if(typeof a!="string"&&bR)return bR.apply(this,arguments);if(!this.length)return this;var e=a.indexOf(" ");if(e>=0){var g=a.slice(e,a.length);a=a.slice(0,e)}var h="GET";c&&(f.isFunction(c)?(d=c,c=b):typeof c=="object"&&(c=f.param(c,f.ajaxSettings.traditional),h="POST"));var i=this;f.ajax({url:a,type:h,dataType:"html",data:c,complete:function(a,b,c){c=a.responseText,a.isResolved()&&(a.done(function(a){c=a}),i.html(g?f("
").append(c.replace(bM,"")).find(g):c)),d&&i.each(d,[c,b,a])}});return this},serialize:function(){return f.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?f.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||bN.test(this.nodeName)||bH.test(this.type))}).map(function(a,b){var c=f(this).val();return c==null?null:f.isArray(c)?f.map(c,function(a,c){return{name:b.name,value:a.replace(bE,"\r\n")}}):{name:b.name,value:c.replace(bE,"\r\n")}}).get()}}),f.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){f.fn[b]=function(a){return this.on(b,a)}}),f.each(["get","post"],function(a,c){f[c]=function(a,d,e,g){f.isFunction(d)&&(g=g||e,e=d,d=b);return f.ajax({type:c,url:a,data:d,success:e,dataType:g})}}),f.extend({getScript:function(a,c){return f.get(a,b,c,"script")},getJSON:function(a,b,c){return f.get(a,b,c,"json")},ajaxSetup:function(a,b){b?b$(a,f.ajaxSettings):(b=a,a=f.ajaxSettings),b$(a,b);return a},ajaxSettings:{url:bU,isLocal:bI.test(bV[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded; charset=UTF-8",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":bW},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":a.String,"text html":!0,"text json":f.parseJSON,"text xml":f.parseXML},flatOptions:{context:!0,url:!0}},ajaxPrefilter:bY(bS),ajaxTransport:bY(bT),ajax:function(a,c){function w(a,c,l,m){if(s!==2){s=2,q&&clearTimeout(q),p=b,n=m||"",v.readyState=a>0?4:0;var o,r,u,w=c,x=l?ca(d,v,l):b,y,z;if(a>=200&&a<300||a===304){if(d.ifModified){if(y=v.getResponseHeader("Last-Modified"))f.lastModified[k]=y;if(z=v.getResponseHeader("Etag"))f.etag[k]=z}if(a===304)w="notmodified",o=!0;else try{r=cb(d,x),w="success",o=!0}catch(A){w="parsererror",u=A}}else{u=w;if(!w||a)w="error",a<0&&(a=0)}v.status=a,v.statusText=""+(c||w),o?h.resolveWith(e,[r,w,v]):h.rejectWith(e,[v,w,u]),v.statusCode(j),j=b,t&&g.trigger("ajax"+(o?"Success":"Error"),[v,d,o?r:u]),i.fireWith(e,[v,w]),t&&(g.trigger("ajaxComplete",[v,d]),--f.active||f.event.trigger("ajaxStop"))}}typeof a=="object"&&(c=a,a=b),c=c||{};var d=f.ajaxSetup({},c),e=d.context||d,g=e!==d&&(e.nodeType||e instanceof f)?f(e):f.event,h=f.Deferred(),i=f.Callbacks("once memory"),j=d.statusCode||{},k,l={},m={},n,o,p,q,r,s=0,t,u,v={readyState:0,setRequestHeader:function(a,b){if(!s){var c=a.toLowerCase();a=m[c]=m[c]||a,l[a]=b}return this},getAllResponseHeaders:function(){return s===2?n:null},getResponseHeader:function(a){var c;if(s===2){if(!o){o={};while(c=bG.exec(n))o[c[1].toLowerCase()]=c[2]}c=o[a.toLowerCase()]}return c===b?null:c},overrideMimeType:function(a){s||(d.mimeType=a);return this},abort:function(a){a=a||"abort",p&&p.abort(a),w(0,a);return this}};h.promise(v),v.success=v.done,v.error=v.fail,v.complete=i.add,v.statusCode=function(a){if(a){var b;if(s<2)for(b in a)j[b]=[j[b],a[b]];else b=a[v.status],v.then(b,b)}return this},d.url=((a||d.url)+"").replace(bF,"").replace(bK,bV[1]+"//"),d.dataTypes=f.trim(d.dataType||"*").toLowerCase().split(bO),d.crossDomain==null&&(r=bQ.exec(d.url.toLowerCase()),d.crossDomain=!(!r||r[1]==bV[1]&&r[2]==bV[2]&&(r[3]||(r[1]==="http:"?80:443))==(bV[3]||(bV[1]==="http:"?80:443)))),d.data&&d.processData&&typeof d.data!="string"&&(d.data=f.param(d.data,d.traditional)),bZ(bS,d,c,v);if(s===2)return!1;t=d.global,d.type=d.type.toUpperCase(),d.hasContent=!bJ.test(d.type),t&&f.active++===0&&f.event.trigger("ajaxStart");if(!d.hasContent){d.data&&(d.url+=(bL.test(d.url)?"&":"?")+d.data,delete d.data),k=d.url;if(d.cache===!1){var x=f.now(),y=d.url.replace(bP,"$1_="+x);d.url=y+(y===d.url?(bL.test(d.url)?"&":"?")+"_="+x:"")}}(d.data&&d.hasContent&&d.contentType!==!1||c.contentType)&&v.setRequestHeader("Content-Type",d.contentType),d.ifModified&&(k=k||d.url,f.lastModified[k]&&v.setRequestHeader("If-Modified-Since",f.lastModified[k]),f.etag[k]&&v.setRequestHeader("If-None-Match",f.etag[k])),v.setRequestHeader("Accept",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+(d.dataTypes[0]!=="*"?", "+bW+"; q=0.01":""):d.accepts["*"]);for(u in d.headers)v.setRequestHeader(u,d.headers[u]);if(d.beforeSend&&(d.beforeSend.call(e,v,d)===!1||s===2)){v.abort();return!1}for(u in{success:1,error:1,complete:1})v[u](d[u]);p=bZ(bT,d,c,v);if(!p)w(-1,"No Transport");else{v.readyState=1,t&&g.trigger("ajaxSend",[v,d]),d.async&&d.timeout>0&&(q=setTimeout(function(){v.abort("timeout")},d.timeout));try{s=1,p.send(l,w)}catch(z){if(s<2)w(-1,z);else throw z}}return v},param:function(a,c){var d=[],e=function(a,b){b=f.isFunction(b)?b():b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};c===b&&(c=f.ajaxSettings.traditional);if(f.isArray(a)||a.jquery&&!f.isPlainObject(a))f.each(a,function(){e(this.name,this.value)});else for(var g in a)b_(g,a[g],c,e);return d.join("&").replace(bC,"+")}}),f.extend({active:0,lastModified:{},etag:{}});var cc=f.now(),cd=/(\=)\?(&|$)|\?\?/i;f.ajaxSetup({jsonp:"callback",jsonpCallback:function(){return f.expando+"_"+cc++}}),f.ajaxPrefilter("json jsonp",function(b,c,d){var e=typeof b.data=="string"&&/^application\/x\-www\-form\-urlencoded/.test(b.contentType);if(b.dataTypes[0]==="jsonp"||b.jsonp!==!1&&(cd.test(b.url)||e&&cd.test(b.data))){var g,h=b.jsonpCallback=f.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,i=a[h],j=b.url,k=b.data,l="$1"+h+"$2";b.jsonp!==!1&&(j=j.replace(cd,l),b.url===j&&(e&&(k=k.replace(cd,l)),b.data===k&&(j+=(/\?/.test(j)?"&":"?")+b.jsonp+"="+h))),b.url=j,b.data=k,a[h]=function(a){g=[a]},d.always(function(){a[h]=i,g&&f.isFunction(i)&&a[h](g[0])}),b.converters["script json"]=function(){g||f.error(h+" was not called");return g[0]},b.dataTypes[0]="json";return"script"}}),f.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(a){f.globalEval(a);return a}}}),f.ajaxPrefilter("script",function(a){a.cache===b&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),f.ajaxTransport("script",function(a){if(a.crossDomain){var d,e=c.head||c.getElementsByTagName("head")[0]||c.documentElement;return{send:function(f,g){d=c.createElement("script"),d.async="async",a.scriptCharset&&(d.charset=a.scriptCharset),d.src=/ppr/ppr/a.url,d.onload=d.onreadystatechange=function(a,c){if(c||!d.readyState||/loaded|complete/.test(d.readyState))d.onload=d.onreadystatechange=null,e&&d.parentNode&&e.removeChild(d),d=b,c||g(200,"success")},e.insertBefore(d,e.firstChild)},abort:function(){d&&d.onload(0,1)}}}});var ce=a.ActiveXObject?function(){for(var a in cg)cg[a](0,1)}:!1,cf=0,cg;f.ajaxSettings.xhr=a.ActiveXObject?function(){return!this.isLocal&&ch()||ci()}:ch,function(a){f.extend(f.support,{ajax:!!a,cors:!!a&&"withCredentials"in a})}(f.ajaxSettings.xhr()),f.support.ajax&&f.ajaxTransport(function(c){if(!c.crossDomain||f.support.cors){var d;return{send:function(e,g){var h=c.xhr(),i,j;c.username?h.open(c.type,c.url,c.async,c.username,c.password):h.open(c.type,c.url,c.async);if(c.xhrFields)for(j in c.xhrFields)h[j]=c.xhrFields[j];c.mimeType&&h.overrideMimeType&&h.overrideMimeType(c.mimeType),!c.crossDomain&&!e["X-Requested-With"]&&(e["X-Requested-With"]="XMLHttpRequest");try{for(j in e)h.setRequestHeader(j,e[j])}catch(k){}h.send(c.hasContent&&c.data||null),d=function(a,e){var j,k,l,m,n;try{if(d&&(e||h.readyState===4)){d=b,i&&(h.onreadystatechange=f.noop,ce&&delete cg[i]);if(e)h.readyState!==4&&h.abort();else{j=h.status,l=h.getAllResponseHeaders(),m={},n=h.responseXML,n&&n.documentElement&&(m.xml=n);try{m.text=h.responseText}catch(a){}try{k=h.statusText}catch(o){k=""}!j&&c.isLocal&&!c.crossDomain?j=m.text?200:404:j===1223&&(j=204)}}}catch(p){e||g(-1,p)}m&&g(j,k,m,l)},!c.async||h.readyState===4?d():(i=++cf,ce&&(cg||(cg={},f(a).unload(ce)),cg[i]=d),h.onreadystatechange=d)},abort:function(){d&&d(0,1)}}}});var cj={},ck,cl,cm=/^(?:toggle|show|hide)$/,cn=/^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,co,cp=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]],cq;f.fn.extend({show:function(a,b,c){var d,e;if(a||a===0)return this.animate(ct("show",3),a,b,c);for(var g=0,h=this.length;g=i.duration+this.startTime){this.now=this.end,this.pos=this.state=1,this.update(),i.animatedProperties[this.prop]=!0;for(b in i.animatedProperties)i.animatedProperties[b]!==!0&&(g=!1);if(g){i.overflow!=null&&!f.support.shrinkWrapBlocks&&f.each(["","X","Y"],function(a,b){h.style["overflow"+b]=i.overflow[a]}),i.hide&&f(h).hide();if(i.hide||i.show)for(b in i.animatedProperties)f.style(h,b,i.orig[b]),f.removeData(h,"fxshow"+b,!0),f.removeData(h,"toggle"+b,!0);d=i.complete,d&&(i.complete=!1,d.call(h))}return!1}i.duration==Infinity?this.now=e:(c=e-this.startTime,this.state=c/i.duration,this.pos=f.easing[i.animatedProperties[this.prop]](this.state,c,0,1,i.duration),this.now=this.start+(this.end-this.start)*this.pos),this.update();return!0}},f.extend(f.fx,{tick:function(){var a,b=f.timers,c=0;for(;c-1,k={},l={},m,n;j?(l=e.position(),m=l.top,n=l.left):(m=parseFloat(h)||0,n=parseFloat(i)||0),f.isFunction(b)&&(b=b.call(a,c,g)),b.top!=null&&(k.top=b.top-g.top+m),b.left!=null&&(k.left=b.left-g.left+n),"using"in b?b.using.call(a,k):e.css(k)}},f.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),c=this.offset(),d=cx.test(b[0].nodeName)?{top:0,left:0}:b.offset();c.top-=parseFloat(f.css(a,"marginTop"))||0,c.left-=parseFloat(f.css(a,"marginLeft"))||0,d.top+=parseFloat(f.css(b[0],"borderTopWidth"))||0,d.left+=parseFloat(f.css(b[0],"borderLeftWidth"))||0;return{top:c.top-d.top,left:c.left-d.left}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||c.body;while(a&&!cx.test(a.nodeName)&&f.css(a,"position")==="static")a=a.offsetParent;return a})}}),f.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(a,c){var d=/Y/.test(c);f.fn[a]=function(e){return f.access(this,function(a,e,g){var h=cy(a);if(g===b)return h?c in h?h[c]:f.support.boxModel&&h.document.documentElement[e]||h.document.body[e]:a[e];h?h.scrollTo(d?f(h).scrollLeft():g,d?g:f(h).scrollTop()):a[e]=g},a,e,arguments.length,null)}}),f.each({Height:"height",Width:"width"},function(a,c){var d="client"+a,e="scroll"+a,g="offset"+a;f.fn["inner"+a]=function(){var a=this[0];return a?a.style?parseFloat(f.css(a,c,"padding")):this[c]():null},f.fn["outer"+a]=function(a){var b=this[0];return b?b.style?parseFloat(f.css(b,c,a?"margin":"border")):this[c]():null},f.fn[c]=function(a){return f.access(this,function(a,c,h){var i,j,k,l;if(f.isWindow(a)){i=a.document,j=i.documentElement[d];return f.support.boxModel&&j||i.body&&i.body[d]||j}if(a.nodeType===9){i=a.documentElement;if(i[d]>=i[e])return i[d];return Math.max(a.body[e],i[e],a.body[g],i[g])}if(h===b){k=f.css(a,c),l=parseFloat(k);return f.isNumeric(l)?l:k}f(a).css(c,h)},c,a,arguments.length,null)}}),a.jQuery=a.$=f,typeof define=="function"&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return f})})(window);; /* * jQuery UI 1.8.17 * * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) * Dual licensed under the MIT or GPL Version 2 licenses. * http://jquery.org/license * * http://docs.jquery.com/UI */ (function(D,B){function A(E){return !D(E).parents().andSelf().filter(function(){return D.curCSS(this,"visibility")==="hidden"||D.expr.filters.hidden(this)}).length}function C(H,I){var G=H.nodeName.toLowerCase();if("area"===G){var J=H.parentNode,E=J.name,F;if(!H.href||!E||J.nodeName.toLowerCase()!=="map"){return !1}F=D("img[usemap=#"+E+"]")[0];return !!F&&A(F)}return(/input|select|textarea|button|object/.test(G)?!H.disabled:"a"==G?H.href||I:I)&&A(H)}D.ui=D.ui||{};D.ui.version||(D.extend(D.ui,{version:"1.8.17",keyCode:{ALT:18,BACKSPACE:8,CAPS_LOCK:20,COMMA:188,COMMAND:91,COMMAND_LEFT:91,COMMAND_RIGHT:93,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,MENU:93,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38,WINDOWS:91}}),D.fn.extend({propAttr:D.fn.prop||D.fn.attr,_focus:D.fn.focus,focus:function(E,F){return typeof E=="number"?this.each(function(){var G=this;setTimeout(function(){D(G).focus(),F&&F.call(G)},E)}):this._focus.apply(this,arguments)},scrollParent:function(){var E;D.browser.msie&&/(static|relative)/.test(this.css("position"))||/absolute/.test(this.css("position"))?E=this.parents().filter(function(){return/(relative|absolute|fixed)/.test(D.curCSS(this,"position",1))&&/(auto|scroll)/.test(D.curCSS(this,"overflow",1)+D.curCSS(this,"overflow-y",1)+D.curCSS(this,"overflow-x",1))}).eq(0):E=this.parents().filter(function(){return/(auto|scroll)/.test(D.curCSS(this,"overflow",1)+D.curCSS(this,"overflow-y",1)+D.curCSS(this,"overflow-x",1))}).eq(0);return/fixed/.test(this.css("position"))||!E.length?D(document):E},zIndex:function(G){if(G!==B){return this.css("zIndex",G)}if(this.length){var E=D(this[0]),F,H;while(E.length&&E[0]!==document){F=E.css("position");if(F==="absolute"||F==="relative"||F==="fixed"){H=parseInt(E.css("zIndex"),10);if(!isNaN(H)&&H!==0){return H}}E=E.parent()}}return 0},disableSelection:function(){return this.bind((D.support.selectstart?"selectstart":"mousedown")+".ui-disableSelection",function(E){E.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")}}),D.each(["Width","Height"],function(I,F){function E(L,M,K,N){D.each(G,function(){M-=parseFloat(D.curCSS(L,"padding"+this,!0))||0,K&&(M-=parseFloat(D.curCSS(L,"border"+this+"Width",!0))||0),N&&(M-=parseFloat(D.curCSS(L,"margin"+this,!0))||0)});return M}var G=F==="Width"?["Left","Right"]:["Top","Bottom"],J=F.toLowerCase(),H={innerWidth:D.fn.innerWidth,innerHeight:D.fn.innerHeight,outerWidth:D.fn.outerWidth,outerHeight:D.fn.outerHeight};D.fn["inner"+F]=function(K){if(K===B){return H["inner"+F].call(this)}return this.each(function(){D(this).css(J,E(this,K)+"px")})},D.fn["outer"+F]=function(K,L){if(typeof K!="number"){return H["outer"+F].call(this,K)}return this.each(function(){D(this).css(J,E(this,K,!0,L)+"px")})}}),D.extend(D.expr[":"],{data:function(F,G,E){return !!D.data(F,E[3])},focusable:function(E){return C(E,!isNaN(D.attr(E,"tabindex")))},tabbable:function(G){var E=D.attr(G,"tabindex"),F=isNaN(E);return(F||E>=0)&&C(G,!F)}}),D(function(){var E=document.body,F=E.appendChild(F=document.createElement("div"));D.extend(F.style,{minHeight:"100px",height:"auto",padding:0,borderWidth:0}),D.support.minHeight=F.offsetHeight===100,D.support.selectstart="onselectstart" in F,E.removeChild(F).style.display="none"}),D.extend(D.ui,{plugin:{add:function(G,H,E){var F=D.ui[G].prototype;for(var I in E){F.plugins[I]=F.plugins[I]||[],F.plugins[I].push([H,E[I]])}},call:function(I,G,H){var E=I.plugins[G];if(!!E&&!!I.element[0].parentNode){for(var F=0;F0){return !0}G[E]=1,F=G[E]>0,G[E]=0;return F},isOverAxis:function(G,E,F){return G>E&&G=9)&&!D.button){return this._mouseUp(D)}if(this._mouseStarted){this._mouseDrag(D);return D.preventDefault()}this._mouseDistanceMet(D)&&this._mouseDelayMet(D)&&(this._mouseStarted=this._mouseStart(this._mouseDownEvent,D)!==!1,this._mouseStarted?this._mouseDrag(D):this._mouseUp(D));return !this._mouseStarted},_mouseUp:function(D){C(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,D.target==this._mouseDownEvent.target&&C.data(D.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(D));return !1},_mouseDistanceMet:function(D){return Math.max(Math.abs(this._mouseDownEvent.pageX-D.pageX),Math.abs(this._mouseDownEvent.pageY-D.pageY))>=this.options.distance},_mouseDelayMet:function(D){return this.mouseDelayMet},_mouseStart:function(D){},_mouseDrag:function(D){},_mouseStop:function(D){},_mouseCapture:function(D){return !0}})})(jQuery);(function(B,A){B.widget("ui.draggable",B.ui.mouse,{widgetEventPrefix:"drag",options:{addClasses:true,appendTo:"parent",axis:false,connectToSortable:false,containment:false,cursor:"auto",cursorAt:false,grid:false,handle:false,helper:"original",iframeFix:false,opacity:false,refreshPositions:false,revert:false,revertDuration:500,scope:"default",scroll:true,scrollSensitivity:20,scrollSpeed:20,snap:false,snapMode:"both",snapTolerance:20,stack:false,zIndex:false,concernAngle:false},_create:function(){if(this.options.helper=="original"&&!(/^(?:r|a|f)/).test(this.element.css("position"))){this.element[0].style.position="relative"}(this.options.addClasses&&this.element.addClass("ui-draggable"));(this.options.disabled&&this.element.addClass("ui-draggable-disabled"));this._mouseInit()},destroy:function(){if(!this.element.data("draggable")){return}this.element.removeData("draggable").unbind(".draggable").removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled");this._mouseDestroy();return this},_mouseCapture:function(D){var C=this.options;if(this.helper||C.disabled||B(D.target).is(".ui-resizable-handle,.ui-resizable-handle>.knob")){return false}this.handle=this._getHandle(D);if(!this.handle){return false}if(C.iframeFix){B(C.iframeFix===true?"iframe":C.iframeFix).each(function(){B('
').css({width:this.offsetWidth+"px",height:this.offsetHeight+"px",position:"absolute",opacity:"0.001",zIndex:1000}).css(B(this).offset()).appendTo("body")})}return true},_mouseStart:function(E){var D=this.options;this.helper=this._createHelper(E);this._cacheHelperProportions();if(B.ui.ddmanager){B.ui.ddmanager.current=this}this._cacheMargins();this.cssPosition=this.helper.css("position");this.scrollParent=this.helper.scrollParent();this.offset=this.positionAbs=this.element.offset();if(D.concernAngle){var C=this.element.parent().offset();this.offset=this.positionAbs={left:C.left+B.parseInteger(this.element.css("left")),top:C.top+B.parseInteger(this.element.css("top"))}}this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left};B.extend(this.offset,{click:{left:E.pageX-this.offset.left,top:E.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()});this.originalPosition=this.position=this._generatePosition(E);if(D.concernAngle){this.originalPosition.left=B.parseInteger(this.element.css("left"))}this.originalPageX=E.pageX;this.originalPageY=E.pageY;(D.cursorAt&&this._adjustOffsetFromHelper(D.cursorAt));if(D.containment){this._setContainment()}if(this._trigger("start",E)===false){this._clear();return false}this._cacheHelperProportions();if(B.ui.ddmanager&&!D.dropBehaviour){B.ui.ddmanager.prepareOffsets(this,E)}this.helper.addClass("ui-draggable-dragging");this._mouseDrag(E,true);if(B.ui.ddmanager){B.ui.ddmanager.dragStart(this,E)}return true},_mouseDrag:function(E,D){this.position=this._generatePosition(E);this.positionAbs=this._convertPositionTo("absolute");if(!D){var C=this._uiHash();if(this._trigger("drag",E,C)===false){this._mouseUp({});return false}this.position=C.position}if(!this.options.axis||this.options.axis!="y"){this.helper[0].style.left=this.position.left+"px"}if(!this.options.axis||this.options.axis!="x"){this.helper[0].style.top=this.position.top+"px"}if(B.ui.ddmanager){B.ui.ddmanager.drag(this,E)}return false},_mouseStop:function(E){var D=false;if(B.ui.ddmanager&&!this.options.dropBehaviour){D=B.ui.ddmanager.drop(this,E)}if(this.dropped){D=this.dropped;this.dropped=false}if((!this.element[0]||!this.element[0].parentNode)&&this.options.helper=="original"){return false}if((this.options.revert=="invalid"&&!D)||(this.options.revert=="valid"&&D)||this.options.revert===true||(B.isFunction(this.options.revert)&&this.options.revert.call(this.element,D))){var C=this;B(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){if(C._trigger("stop",E)!==false){C._clear()}})}else{if(this._trigger("stop",E)!==false){this._clear()}}return false},_mouseUp:function(C){if(this.options.iframeFix===true){B("div.ui-draggable-iframeFix").each(function(){this.parentNode.removeChild(this)})}if(B.ui.ddmanager){B.ui.ddmanager.dragStop(this,C)}return B.ui.mouse.prototype._mouseUp.call(this,C)},cancel:function(){if(this.helper.is(".ui-draggable-dragging")){this._mouseUp({})}else{this._clear()}return this},_getHandle:function(D){var C=!this.options.handle||!B(this.options.handle,this.element).length?true:false;B(this.options.handle,this.element).find("*").andSelf().each(function(){if(this==D.target){C=true}});return C},_createHelper:function(D){var C=this.options;var E=B.isFunction(C.helper)?B(C.helper.apply(this.element[0],[D])):(C.helper=="clone"?this.element.clone().removeAttr("id"):this.element);if(!E.parents("body").length){E.appendTo((C.appendTo=="parent"?this.element[0].parentNode:C.appendTo))}if(E[0]!=this.element[0]&&!(/(fixed|absolute)/).test(E.css("position"))){E.css("position","absolute")}return E},_adjustOffsetFromHelper:function(C){if(typeof C=="string"){C=C.split(" ")}if(B.isArray(C)){C={left:+C[0],top:+C[1]||0}}if("left" in C){this.offset.click.left=C.left+this.margins.left}if("right" in C){this.offset.click.left=this.helperProportions.width-C.right+this.margins.left}if("top" in C){this.offset.click.top=C.top+this.margins.top}if("bottom" in C){this.offset.click.top=this.helperProportions.height-C.bottom+this.margins.top}},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var C=this.offsetParent.offset();if(this.cssPosition=="absolute"&&this.scrollParent[0]!=document&&B.ui.contains(this.scrollParent[0],this.offsetParent[0])){C.left+=this.scrollParent.scrollLeft();C.top+=this.scrollParent.scrollTop()}if((this.offsetParent[0]==document.body)||(this.offsetParent[0].tagName&&this.offsetParent[0].tagName.toLowerCase()=="html"&&B.browser.msie)){C={top:0,left:0}}return{top:C.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:C.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if(this.cssPosition=="relative"){var C=this.element.position();return{top:C.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:C.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}else{return{top:0,left:0}}},_cacheMargins:function(){this.margins={left:(parseInt(this.element.css("marginLeft"),10)||0),top:(parseInt(this.element.css("marginTop"),10)||0),right:(parseInt(this.element.css("marginRight"),10)||0),bottom:(parseInt(this.element.css("marginBottom"),10)||0)}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var D=this.options;if(D.containment=="parent"){D.containment=this.helper[0].parentNode}if(D.containment=="document"||D.containment=="window"){this.containment=[D.containment=="document"?0:B(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,D.containment=="document"?0:B(window).scrollTop()-this.offset.relative.top-this.offset.parent.top,(D.containment=="document"?0:B(window).scrollLeft())+B(D.containment=="document"?document:window).width()-this.helperProportions.width-this.margins.left,(D.containment=="document"?0:B(window).scrollTop())+(B(D.containment=="document"?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]}if(!(/^(document|window|parent)$/).test(D.containment)&&D.containment.constructor!=Array){var F=B(D.containment);var G=F[0];if(!G){return}var C=F.offset();var E=(B(G).css("overflow")!="hidden");this.containment=[(parseInt(B(G).css("borderLeftWidth"),10)||0)+(parseInt(B(G).css("paddingLeft"),10)||0),(parseInt(B(G).css("borderTopWidth"),10)||0)+(parseInt(B(G).css("paddingTop"),10)||0),(E?Math.max(G.scrollWidth,G.offsetWidth):G.offsetWidth)-(parseInt(B(G).css("borderLeftWidth"),10)||0)-(parseInt(B(G).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(E?Math.max(G.scrollHeight,G.offsetHeight):G.offsetHeight)-(parseInt(B(G).css("borderTopWidth"),10)||0)-(parseInt(B(G).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom];this.relative_container=F}else{if(D.containment.constructor==Array){this.containment=D.containment}}},_convertPositionTo:function(C,E){if(!E){E=this.position}var H=C=="absolute"?1:-1;var D=this.options,G=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&B.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,F=(/(html|body)/i).test(G[0].tagName);return{top:(E.top+this.offset.relative.top*H+this.offset.parent.top*H-(B.browser.safari&&B.browser.version<526&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():(F?0:G.scrollTop()))*H)),left:(E.left+this.offset.relative.left*H+this.offset.parent.left*H-(B.browser.safari&&B.browser.version<526&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():F?0:G.scrollLeft())*H))}},_generatePosition:function(G){var K=this.options,L=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&B.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,C=(/(html|body)/i).test(L[0].tagName);var I=G.pageX;var H=G.pageY;if(this.originalPosition){var J;if(this.containment){if(this.relative_container){var F=this.relative_container.offset();J=[this.containment[0]+F.left,this.containment[1]+F.top,this.containment[2]+F.left,this.containment[3]+F.top]}else{J=this.containment}if(G.pageX-this.offset.click.leftJ[2]){I=J[2]+this.offset.click.left}if(G.pageY-this.offset.click.top>J[3]){H=J[3]+this.offset.click.top}}if(K.grid){var D=K.grid[1]?this.originalPageY+Math.round((H-this.originalPageY)/K.grid[1])*K.grid[1]:this.originalPageY;H=J?(!(D-this.offset.click.topJ[3])?D:(!(D-this.offset.click.topJ[2])?E:(!(E-this.offset.click.left=0;H--){var K=L.snapElements[H].left,C=K+L.snapElements[H].width,F=L.snapElements[H].top,M=F+L.snapElements[H].height;if(!((K-N=0;H--){var U=G.position.left;if(U<0){U=0}var X=U+L.helperProportions.width,V=G.position.top+R,Y=V+L.helperProportions.height;var J=L.snapElements[H].left,Q=J+L.snapElements[H].width,F=L.snapElements[H].top,P=F+L.snapElements[H].height;var T=Math.abs(J-U)<=O;var Z=Math.abs(J-X)<=O;var E=Math.abs(F-V)<=O;var K=Math.abs(F-Y)<=O;if(B(L.snapElements[H].item).closest(".rulerh").length){E=false;K=false}else{T=false;Z=false}if(T){G.position.left=G.position.left+J-U}if(Z){G.position.left=G.position.left+(J-X)}if(E){G.position.top=G.position.top+F-V}if(K){G.position.top=G.position.top+F-Y}var D=(E||K||T||Z);if((E||K||T||Z||D)){if(B(L.snapElements[H].item).closest(".rulerh").length){B(".rulerh .rulerguide.showline").each(function(){var c=B(this).data("snapel");var b=c.left;var d=G.position.left,a=d+L.helperProportions.width;if(!(Math.abs(b-d)<0.5||Math.abs(b-a)<0.5)){B(this).removeClass("showline")}})}else{B(".rulerv .rulerguide.showline").each(function(){var b=B(this).data("snapel");var c=b.top;var d=G.position.top+R,a=d+L.helperProportions.height;if(!(Math.abs(c-d)<0.5||Math.abs(c-a)<0.5)){B(this).removeClass("showline")}})}B(L.snapElements[H].item).addClass("showline")}else{L.snapElements[H].snapping=false;B(L.snapElements[H].item).removeClass("showline");continue}L.snapElements[H].snapping=(E||K||T||Z||D)}},stop:function(D,C){B(".rulerguide").removeClass("showline");B(this).unbind("layersnapstart")}});B.ui.plugin.add("draggable","wopop_snap2",{start:function(H,D){return;var J=B(this).data("draggable"),L=J.options;var K=L.wopop_snap;if(!K){return}if(B(this).data("deg")){return}if(!B(this).is(".cstlayer")){return}var E=false;B(".ui-modselected").each(function(){B(this).data("left",B(this).css("left"));B(this).data("top",B(this).css("top"));B(this).data("width",B(this).css("width"));B(this).data("height",B(this).css("height"));if(B(this).data("cstlayerstatus")=="unlock"){E=true}});if(E){return}if(B(this).closest(".fullpagesection").length){return}J.snapElements=[];var G=B(this).ab_pos_cnter("top")-J.originalPosition.top;J.wopop_ab_top=G;var M=[];var N=[];function C(P,R){for(var O=0;O
";B("#scroll_container").append(W)}if(C(U,N)==-1){N.push(U);var W="
";B("#scroll_container").append(W)}if(C(T,M)==-1){M.push(T);var W="
";B("#scroll_container").append(W)}if(C(O,M)==-1){M.push(O);var W="
";B("#scroll_container").append(W)}}B(this).unbind("layersnapstart").bind("layersnapstart",function(){F();if(B.getElementAreaInf(B(this))=="canvas"){B("#canvas .cstlayer:not(.ui-modselected)").each(function(){I(B(this))})}else{B("#scroll_container .cstlayer:not(.ui-modselected)").each(function(){I(B(this))})}J.snapElements=[];var P=B("#scroll_container").scrollTop();var O=B("#canvas").offset().left;B(".wopop_snap").each(function(){var S=B(this);var R=S.offset();if(S.is(".wopop_snap_vertical")){var Q={item:this,width:0,height:S.outerHeight(),top:0,left:R.left-O};J.snapElements.push(Q);B(this).data("snapel",Q)}else{var Q={item:this,width:S.outerWidth(),height:0,top:parseInt(S.css("top"))||0,left:0};J.snapElements.push(Q);B(this).data("snapel",Q)}})});B(this).trigger("layersnapstart")},drag:function(S,G){return;var L=B(this).data("draggable"),I=L.options;var C=I.wopop_snap;if(!C){return}if(B(this).data("deg")){return}if(!B(this).is(".cstlayer")){return}var M="outer";var O=3;var N=B("#scroll_container").scrollTop();var W=L.ori_scct;if(N!=W){B(this).trigger("layersnapstart")}var R=L.wopop_ab_top;for(var H=L.snapElements.length-1;H>=0;H--){var U=G.position.left,X=U+L.helperProportions.width,V=G.position.top+R,Y=V+L.helperProportions.height;var J=L.snapElements[H].left,Q=J+L.snapElements[H].width,F=L.snapElements[H].top,P=F+L.snapElements[H].height;var T=Math.abs(J-U)<=O;var Z=Math.abs(J-X)<=O;var E=Math.abs(F-V)<=O;var K=Math.abs(F-Y)<=O;if(T){G.position.left=G.position.left+J-U}if(Z){G.position.left=G.position.left+(J-X)}if(E){G.position.top=G.position.top+F-V}if(K){G.position.top=G.position.top+F-Y}var D=(E||K||T||Z);if((E||K||T||Z||D)){if(B(L.snapElements[H].item).is(".wopop_snap_vertical")){B(".wopop_snap_vertical.showline").each(function(){var c=B(this).data("snapel");var b=c.left;var d=G.position.left,a=d+L.helperProportions.width;if(!(Math.abs(b-d)<0.5||Math.abs(b-a)<0.5)){B(this).removeClass("showline")}})}else{B(".wopop_snap_horizon.showline").each(function(){var b=B(this).data("snapel");var c=b.top;var d=G.position.top+R,a=d+L.helperProportions.height;if(!(Math.abs(c-d)<0.5||Math.abs(c-a)<0.5)){B(this).removeClass("showline")}})}B(L.snapElements[H].item).addClass("showline")}else{L.snapElements[H].snapping=false;B(L.snapElements[H].item).removeClass("showline");continue}L.snapElements[H].snapping=(E||K||T||Z||D)}},stop:function(D,C){return;B(".wopop_snap").remove();B(this).unbind("layersnapstart")}});B.ui.plugin.add("draggable","stack",{start:function(F,C){var E=B(this).data("draggable").options;var D=B.makeArray(B(E.stack)).sort(function(I,H){return(parseInt(B(I).css("zIndex"),10)||0)-(parseInt(B(H).css("zIndex"),10)||0)});if(!D.length){return}var G=parseInt(D[0].style.zIndex)||0;B(D).each(function(H){this.style.zIndex=G+H});this[0].style.zIndex=G+D.length}});B.ui.plugin.add("draggable","zIndex",{start:function(E,C){var F=B(C.helper),D=B(this).data("draggable").options;if(F.css("zIndex")){D._zIndex=F.css("zIndex")}F.css("zIndex",D.zIndex)},stop:function(E,C){var D=B(this).data("draggable").options;if(D._zIndex){B(C.helper).css("zIndex",D._zIndex)}}})})(jQuery);(function(B,A){B.widget("ui.droppable",{widgetEventPrefix:"drop",options:{accept:"*",activeClass:!1,addClasses:!0,greedy:!1,hoverClass:!1,scope:"default",tolerance:"intersect"},_create:function(){var C=this.options,D=C.accept;this.isover=0,this.isout=1,this.accept=B.isFunction(D)?D:function(E){return E.is(D)},this.proportions={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight},B.ui.ddmanager.droppables[C.scope]=B.ui.ddmanager.droppables[C.scope]||[],B.ui.ddmanager.droppables[C.scope].push(this),C.addClasses&&this.element.addClass("ui-droppable")},destroy:function(){var C=B.ui.ddmanager.droppables[this.options.scope];for(var D=0;D=E&&O<=J||F>=E&&F<=J||OJ)&&(C>=G&&C<=D||N>=G&&N<=D||CD);default:return !1}},B.ui.ddmanager={current:null,droppables:{"default":[]},prepareOffsets:function(G,H){var D=B.ui.ddmanager.droppables[G.options.scope]||[],E=H?H.type:null,I=(G.currentItem||G.element).find(":data(droppable)").andSelf();droppablesLoop:for(var C=0;C').css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")}));this.element=this.element.parent().data("resizable",this.element.data("resizable"));this.elementIsWrapper=true;this.element.css({marginLeft:this.originalElement.css("marginLeft"),marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom")});this.originalElement.css({marginLeft:0,marginTop:0,marginRight:0,marginBottom:0});this.originalResizeStyle=this.originalElement.css("resize");this.originalElement.css("resize","none");this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"}));this.originalElement.css({margin:this.originalElement.css("margin")});this._proportionallyResize()}this.handles=H.handles||(!D(".ui-resizable-handle",this.element).length?"e,s,se":{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"});if(this.handles.constructor==String){if(this.handles=="all"){this.handles="n,e,s,w,se,sw,ne,nw"}var I=this.handles.split(",");this.handles={};for(var F=0;F');if(/sw|se|ne|nw/.test(E)){K.css({zIndex:++H.zIndex})}if("se"==E){K.addClass("ui-icon ui-icon-gripsmall-diagonal-se")}this.handles[E]=".ui-resizable-"+E;this.element.append(K)}}this._renderAxis=function(O){O=O||this.element;for(var L in this.handles){if(this.handles[L].constructor==String){this.handles[L]=D(this.handles[L],this.element).show()}if(this.elementIsWrapper&&this.originalElement[0].nodeName.match(/textarea|input|select|button/i)){var P=D(this.handles[L],this.element),N=0;N=/sw|ne|nw|se|n|s/.test(L)?P.outerHeight():P.outerWidth();var M=["padding",/ne|nw|n/.test(L)?"Top":/se|sw|s/.test(L)?"Bottom":/^e$/.test(L)?"Right":"Left"].join("");O.css(M,N);this._proportionallyResize()}if(!D(this.handles[L]).length){continue}}};this._renderAxis(this.element);this._handles=D(".ui-resizable-handle",this.element).disableSelection();this._handles.mouseover(function(){if(!G.resizing){if(this.className){var L=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)}G.axis=L&&L[1]?L[1]:"se"}});if(H.autoHide){this._handles.hide();D(this.element).addClass("ui-resizable-autohide").hover(function(){if(H.disabled){return}D(this).removeClass("ui-resizable-autohide");G._handles.show()},function(){if(H.disabled){return}if(!G.resizing){D(this).addClass("ui-resizable-autohide");G._handles.hide()}})}this._mouseInit()},destroy:function(){this._mouseDestroy();var F=function(G){D(G).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").unbind(".resizable").find(".ui-resizable-handle").remove()};if(this.elementIsWrapper){F(this.element);var E=this.element;E.after(this.originalElement.css({position:E.css("position"),width:E.outerWidth(),height:E.outerHeight(),top:E.css("top"),left:E.css("left")})).remove()}this.originalElement.css("resize",this.originalResizeStyle);F(this.originalElement);return this},_mouseCapture:function(G){var E=false;for(var F in this.handles){if(D(G.target).is(".down_arrow,.up_arrow")){return false}if(D(this.handles[F])[0]==G.target||D(this.handles[F])[0]==G.target.parentNode){E=true}}var H=true;if(this.options.concernLock&&this.element.data("cstlayerstatus")=="unlock"){H=false}return !this.options.disabled&&E&&H},_mouseStart:function(I){var G=this.options,H=this.element.position(),E=this.element;this.resizing=true;this.documentScroll={top:D(document).scrollTop(),left:D(document).scrollLeft()};if(!G.concernAngle&&!G.noinit){if(E.is(".ui-draggable")||(/absolute/).test(E.css("position"))){E.css({position:"absolute",top:H.top,left:H.left})}}if(D.browser.opera&&(/relative/).test(E.css("position"))){E.css({position:"relative",top:"auto",left:"auto"})}this._renderProxy();var K=C(this.helper.css("left")),J=C(this.helper.css("top"));if(G.containment){K+=D(G.containment).scrollLeft()||0;J+=D(G.containment).scrollTop()||0}this.offset=this.helper.offset();this.position={left:K,top:J};if(D.browser.msie&&D.browser.version<9&&E.data("deg")%360!=0){this.size={width:E.data("IEWidth"),height:E.data("IEHeight")}}else{this.size=this._helper?{width:E.outerWidth(),height:E.outerHeight()}:{width:E.width(),height:E.height()}}this.originalSize=this._helper?{width:E.outerWidth(),height:E.outerHeight()}:{width:E.width(),height:E.height()};this.originalPosition={left:K,top:J};this.sizeDiff={width:E.outerWidth()-E.width(),height:E.outerHeight()-E.height()};this.originalMousePosition={left:I.pageX,top:I.pageY};if(G.scroll&&(!G.concernAngle||G.concernAngle&&!this.element.data("deg"))){this.scrollParent=this.element.scrollParent();this.originalMousePosition.top+=this.scrollParent.scrollTop()}this.aspectRatio=(typeof G.aspectRatio=="number")?G.aspectRatio:((this.originalSize.width/this.originalSize.height)||1);if(G.concernAngle){D.divrotate.getDegreeResizeCursor(this.element)}var F=this.element.find(".ui-resizable-"+this.axis).css("cursor");D("body").css("cursor",F=="auto"?this.axis+"-resize":F);E.addClass("ui-resizable-resizing");this._propagate("start",I);return true},_mouseDrag:function(H){var J=this.helper,L=this.options,I={},O=this,R=this.originalMousePosition,Q=this.axis;var K=H.pageY;if(L.scroll&&(!L.concernAngle||L.concernAngle&&!this.element.data("deg"))){K+=this.scrollParent.scrollTop()}var N=(H.pageX-R.left)||0,M=(K-R.top)||0;var E=this._change[Q];if(!E){return false}var G=E.apply(this,[H,N,M]),F=D.browser.msie&&D.browser.version<7,P=this.sizeDiff;this._updateVirtualBoundaries(H.shiftKey);if(!D.isFunction(L.aspectFunc)&&(this._aspectRatio||H.shiftKey)){G=this._updateRatio(G,H)}else{if(D.isFunction(L.aspectFunc)){G=this._updateAFunc(G,H)}}G=this._respectSize(G,H);this._propagate("resize",H);J.css({top:this.position.top+"px",left:this.position.left+"px",width:this.size.width+"px",height:this.size.height+"px"});if(!this._helper&&this._proportionallyResizeElements.length){this._proportionallyResize()}this._updateCache(G);this._trigger("resize",H,this.ui());return false},_mouseStop:function(I){this.resizing=false;var M=this.options,K=this;if(this._helper){var F=this._proportionallyResizeElements,E=F.length&&(/textarea/i).test(F[0].nodeName),L=E&&D.ui.hasScroll(F[0],"left")?0:K.sizeDiff.height,N=E?0:K.sizeDiff.width;var G={width:(K.helper.width()-N),height:(K.helper.height()-L)},H=(parseInt(K.element.css("left"),10)+(K.position.left-K.originalPosition.left))||null,J=(parseInt(K.element.css("top"),10)+(K.position.top-K.originalPosition.top))||null;if(!M.animate){this.element.css(D.extend(G,{top:J,left:H}))}K.helper.height(K.size.height);K.helper.width(K.size.width);if(this._helper&&!M.animate){this._proportionallyResize()}}D("body").css("cursor","auto");this.element.removeClass("ui-resizable-resizing");this._propagate("stop",I);if(this._helper){this.helper.remove()}return false},_updateVirtualBoundaries:function(H){var E=this.options,I,J,G,F,K;K={minWidth:A(E.minWidth)?E.minWidth:0,maxWidth:A(E.maxWidth)?E.maxWidth:Infinity,minHeight:A(E.minHeight)?E.minHeight:0,maxHeight:A(E.maxHeight)?E.maxHeight:Infinity};if(this._aspectRatio||H){I=K.minHeight*this.aspectRatio;G=K.minWidth/this.aspectRatio;J=K.maxHeight*this.aspectRatio;F=K.maxWidth/this.aspectRatio;if(I>K.minWidth){K.minWidth=I}if(G>K.minHeight){K.minHeight=G}if(JI.width),G=A(I.height)&&O.minHeight&&(O.minHeight>I.height);if(H){I.width=O.minWidth}if(G){I.height=O.minHeight}if(L){I.width=O.maxWidth}if(F){I.height=O.maxHeight}var J=this.originalPosition.left+this.originalSize.width,P=this.position.top+this.size.height;var E=/sw|nw|w/.test(S),R=/nw|ne|n/.test(S);if(H&&E){I.left=J-O.minWidth}if(L&&E){I.left=J-O.maxWidth}if(G&&R){I.top=P-O.minHeight}if(F&&R){I.top=P-O.maxHeight}var Q=!I.width&&!I.height;if(Q&&!I.left&&I.top){I.top=null}else{if(Q&&!I.top&&I.left){I.left=null}}return I},_proportionallyResize:function(){var F=this.options;if(!this._proportionallyResizeElements.length){return}var I=this.helper||this.element;for(var E=0;E');var G=D.browser.msie&&D.browser.version<7,I=(G?1:0),H=(G?2:-1);this.helper.addClass(this._helper).css({width:this.element.outerWidth()+H,height:this.element.outerHeight()+H,position:"absolute",left:this.elementOffset.left-I+"px",top:this.elementOffset.top-I+"px",zIndex:++F.zIndex});this.helper.appendTo("body").disableSelection()}else{this.helper=this.element}},_change:{e:function(I,G,E){var F=this.options,J=this.originalSize,H=this.originalPosition;if(F.concernAngle&&this.element.data("deg")){return D.divrotate.getDegreeResizeChange(this.element,[G,E],H,J,"e")}return{width:this.originalSize.width+G}},w:function(I,G,E){var F=this.options,J=this.originalSize,H=this.originalPosition;if(F.concernAngle&&this.element.data("deg")){return D.divrotate.getDegreeResizeChange(this.element,[G,E],H,J,"w")}return{left:H.left+G,width:J.width-G}},n:function(I,G,E){var F=this.options,J=this.originalSize,H=this.originalPosition;if(F.concernAngle&&this.element.data("deg")){return D.divrotate.getDegreeResizeChange(this.element,[G,E],H,J,"n")}else{return{top:H.top+E,height:J.height-E}}},s:function(I,G,E){var F=this.options,J=this.originalSize,H=this.originalPosition;if(F.concernAngle&&this.element.data("deg")){return D.divrotate.getDegreeResizeChange(this.element,[G,E],H,J,"s")}return{height:this.originalSize.height+E}},se:function(G,F,E){return D.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[G,F,E]))},sw:function(G,F,E){return D.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[G,F,E]))},ne:function(G,F,E){return D.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[G,F,E]))},nw:function(G,M,L){var J=this.options,E=this.originalSize,F=this.originalPosition;if(J.concernAngle&&this.element.data("deg")){var K=F.left,H=F.top;var I=this._change.n.apply(this,arguments);var N=this._change.w.apply(this,arguments);var O=D.extend({},I,N);O.left=I.left+N.left-K;O.top=I.top+N.top-H;return O}return D.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[G,M,L]))}},_propagate:function(E,F){D.ui.plugin.call(this,E,[F,this.ui()]);(E!="resize"&&this._trigger(E,F,this.ui()))},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}});D.extend(D.ui.resizable,{version:"1.8.17"});D.ui.plugin.add("resizable","alsoResize",{start:function(H,E){var F=D(this).data("resizable"),G=F.options;var I=function(J){D(J).each(function(){var K=D(this);K.data("resizable-alsoresize",{width:parseInt(K.width(),10),height:parseInt(K.height(),10),left:parseInt(K.css("left"),10),top:parseInt(K.css("top"),10),position:K.css("position")})})};if(typeof(G.alsoResize)=="object"&&!G.alsoResize.parentNode){if(G.alsoResize.length){G.alsoResize=G.alsoResize[0];I(G.alsoResize)}else{D.each(G.alsoResize,function(J){I(J)})}}else{I(G.alsoResize)}},resize:function(G,E){var H=D(this).data("resizable"),I=H.options,L=H.originalSize,K=H.originalPosition;var J={height:(H.size.height-L.height)||0,width:(H.size.width-L.width)||0,top:(H.position.top-K.top)||0,left:(H.position.left-K.left)||0},F=function(M,N){D(M).each(function(){var O=D(this),R=D(this).data("resizable-alsoresize"),P={},Q=N&&N.length?N:O.parents(E.originalElement[0]).length?["width","height"]:["width","height","top","left"];D.each(Q,function(S,T){var U=(R[T]||0)+(J[T]||0);if(U&&U>=0){P[T]=U||null}});if(D.browser.opera&&/relative/.test(O.css("position"))){H._revertToRelativePosition=true;O.css({position:"absolute",top:"auto",left:"auto"})}O.css(P)})};if(typeof(I.alsoResize)=="object"&&!I.alsoResize.nodeType){D.each(I.alsoResize,function(M,N){F(M,N)})}else{F(I.alsoResize)}},stop:function(H,E){var F=D(this).data("resizable"),G=F.options;var I=function(J){D(J).each(function(){var K=D(this);K.css({position:K.data("resizable-alsoresize").position})})};if(F._revertToRelativePosition){F._revertToRelativePosition=false;if(typeof(G.alsoResize)=="object"&&!G.alsoResize.nodeType){D.each(G.alsoResize,function(J){I(J)})}else{I(G.alsoResize)}}D(this).removeData("resizable-alsoresize")}});D.ui.plugin.add("resizable","animate",{stop:function(H,G){var N=D(this).data("resizable"),M=N.options;var F=N._proportionallyResizeElements,E=F.length&&(/textarea/i).test(F[0].nodeName),L=E&&D.ui.hasScroll(F[0],"left")?0:N.sizeDiff.height,O=E?0:N.sizeDiff.width;var K={width:(N.size.width-O),height:(N.size.height-L)},J=(parseInt(N.element.css("left"),10)+(N.position.left-N.originalPosition.left))||null,I=(parseInt(N.element.css("top"),10)+(N.position.top-N.originalPosition.top))||null;N.element.animate(D.extend(K,I&&J?{top:I,left:J}:{}),{duration:M.animateDuration,easing:M.animateEasing,step:function(){var P={width:parseInt(N.element.css("width"),10),height:parseInt(N.element.css("height"),10),top:parseInt(N.element.css("top"),10),left:parseInt(N.element.css("left"),10)};if(F&&F.length){D(F[0]).css({width:P.width,height:P.height})}N._updateCache(P);N._propagate("resize",H)}})}});D.ui.plugin.add("resizable","containment",{start:function(J,G){var N=D(this).data("resizable"),L=N.options,K=N.element;var Q=L.containment,O=(Q instanceof D)?Q.get(0):(/parent/.test(Q))?K.parent().get(0):Q;if(!O){return}N.containerElement=D(O);if(/document/.test(Q)||Q==document){N.containerOffset={left:0,top:0};N.containerPosition={left:0,top:0};N.parentData={element:D(document),left:0,top:0,width:D(document).width(),height:D(document).height()||document.body.parentNode.scrollHeight}}else{var F=D(O),H=[];D(["Top","Right","Left","Bottom"]).each(function(S,T){H[S]=C(F.css("padding"+T))});N.containerOffset=F.offset();N.containerPosition=F.position();N.containerSize={height:(F.innerHeight()-H[3]),width:(F.innerWidth()-H[1])};var I=N.containerOffset,E=N.containerSize.height,P=N.containerSize.width,M=(D.ui.hasScroll(O,"left")?O.scrollWidth:P),R=(D.ui.hasScroll(O)?O.scrollHeight:E);N.parentData={element:O,left:I.left,top:I.top,width:M,height:R}}},resize:function(K,H){var P=D(this).data("resizable"),O=P.options,M=P.containerSize,J=P.containerOffset,G=P.size,S=P.position,N=P._aspectRatio||K.shiftKey,L={top:0,left:0},Q=P.containerElement;if(Q[0]!=document&&(/static/).test(Q.css("position"))){L=J}if(S.left<(P._helper?J.left:0)){P.size.width=P.size.width+(P._helper?(P.position.left-J.left):(P.position.left-L.left));if(N){P.size.height=P.size.width/O.aspectRatio}P.position.left=O.helper?J.left:0}if(S.top<(P._helper?J.top:0)){P.size.height=P.size.height+(P._helper?(P.position.top-J.top):P.position.top);if(N){P.size.width=P.size.height*O.aspectRatio}P.position.top=P._helper?J.top:0}P.offset.left=P.parentData.left+P.position.left;P.offset.top=P.parentData.top+P.position.top;var I=Math.abs((P._helper?P.offset.left-L.left:(P.offset.left-L.left))+P.sizeDiff.width),E=Math.abs((P._helper?P.offset.top-L.top:(P.offset.top-J.top))+P.sizeDiff.height);var F=P.containerElement.get(0)==P.element.parent().get(0),R=/relative|absolute/.test(P.containerElement.css("position"));if(F&&R){I-=P.parentData.left}if(I+P.size.width>=P.parentData.width){P.size.width=P.parentData.width-I;if(N){P.size.height=P.size.width/P.aspectRatio}}if(E+P.size.height>=P.parentData.height){P.size.height=P.parentData.height-E;if(N){P.size.width=P.size.height*P.aspectRatio}}},stop:function(I,F){var M=D(this).data("resizable"),K=M.options,P=M.position,H=M.containerOffset,J=M.containerPosition,N=M.containerElement;var O=D(M.helper),E=O.offset(),G=O.outerWidth()-M.sizeDiff.width,L=O.outerHeight()-M.sizeDiff.height;if(M._helper&&!K.animate&&(/relative/).test(N.css("position"))){D(this).css({left:E.left-J.left-H.left,width:G,height:L})}if(M._helper&&!K.animate&&(/static/).test(N.css("position"))){D(this).css({left:E.left-J.left-H.left,width:G,height:L})}}});D.ui.plugin.add("resizable","scroll",{start:function(G,E){var F=D(this).data("resizable");o=F.options;if(o.scroll&&(!o.concernAngle||o.concernAngle&&!F.element.data("deg"))){F.scrollout=1;if(F.scrollParent[0]!=document&&F.scrollParent[0].tagName!="HTML"){F.overflowOffset=F.scrollParent.offset()}}},resize:function(G,F){var J=D(this).data("resizable"),I=J.options,E=false;if(I.scroll&&(!I.concernAngle||I.concernAngle&&!J.element.data("deg"))){if(J.scrollParent[0]!=document&&J.scrollParent[0].tagName!="HTML"){var L=J.scrollParent[0].scrollTop;J.element.data("resize_oriscrolltop",L);var H=J.lastheightval||0;if((J.axis=="s"||J.axis=="n")&&H-J.size.height!=0){J.lastheightval=J.size.height;var K=0;var M=function(N){K=J.scrollParent[0].scrollTop-L;if(J.axis=="s"){if(J.scrollout==1){J.size.height+=K;J.scrollout=N}else{J.size.height+=K*2}}else{if(J.scrollout==1){J.size.height-=K;J.position.top+=K;J.scrollout=N}else{J.size.height-=K*2;J.position.top+=K*2}}};if((J.overflowOffset.top+J.scrollParent[0].offsetHeight)-G.pageY=0;K--){var N=P.snapElements[K].left,k=N+0,G=P.snapElements[K].top,X=G+0;var I=D(P.snapElements[K].item);var Y=false;if(R=="e"||R=="w"){if(!D(P.snapElements[K].item).closest(".rulerh").length){P.snapElements[K].snapping=false;I.removeClass("showline");continue}if(R=="e"){var V=g.left+n.size.width;var p=Math.abs(N-V)<=U;if(p){n.size.width=n.size.width+(N-V)-Z;Y=true}}else{var h=n.position.left;var J=Math.abs(N-h)<=U;if(J){n.size.width=n.size.width-(N-h)+Z;n.position.left=n.position.left+(N-h)-Z;Y=true}}}else{if(R=="n"||R=="s"){if(!D(P.snapElements[K].item).closest(".rulerv").length){P.snapElements[K].snapping=false;I.removeClass("showline");continue}if(R=="n"){var V=n.position.top+c;var F=Math.abs(G-V)<=U;if(F){n.size.height=n.size.height-(G-V);n.position.top=n.position.top+(G-V);Y=true}}else{var V=n.position.top+c+n.size.height;var O=Math.abs(X-V)<=U;if(O){n.size.height=n.size.height+(X-V);Y=true}}}else{var W=R.match(/./g);for(var f=0;f";D("#scroll_container").append(X)}if(E(V,O)==-1){O.push(V);var X="
";D("#scroll_container").append(X)}if(E(U,N)==-1){N.push(U);var X="
";D("#scroll_container").append(X)}if(E(P,N)==-1){N.push(P);var X="
";D("#scroll_container").append(X)}}D(this).unbind("layersnapstart").bind("layersnapstart",function(){G();if(D.getElementAreaInf(D(this))=="canvas"){D("#canvas .cstlayer:not(.ui-modselected)").each(function(){J(D(this))})}else{D("#scroll_container .cstlayer:not(.ui-modselected)").each(function(){J(D(this))})}K.snapElements=[];var Q=D("#scroll_container").scrollTop();var P=D("#canvas").offset().left;D(".wopop_snap").each(function(){var S=D(this);var R=S.offset();if(S.is(".wopop_snap_vertical")){K.snapElements.push({item:this,width:0,height:S.outerHeight(),top:0,left:R.left-P})}else{K.snapElements.push({item:this,width:S.outerWidth(),height:0,top:parseInt(S.css("top"))||0,left:0})}})});D(this).trigger("layersnapstart")},resize:function(e,H){return;var P=D(this).data("resizable"),M=P.options;var E=M.wopop_snap;if(!E){return}if(D(this).data("deg")){return}if(!D(this).is(".cstlayer")){return}var S="outer";var U=3;var T=D("#scroll_container").scrollTop();var m=P.ori_scct;if(T!=m){D(this).trigger("layersnapstart")}var n=P;var Z=0;var j=n.size,L=n.originalSize,g=n.originalPosition,R=n.axis;var c=P.wopop_ab_top;for(var K=P.snapElements.length-1;K>=0;K--){var N=P.snapElements[K].left,k=N+P.snapElements[K].width,G=P.snapElements[K].top,X=G+P.snapElements[K].height;var I=D(P.snapElements[K].item);var Y=false;if(R=="e"||R=="w"){if(!I.is(".wopop_snap_vertical")){P.snapElements[K].snapping=false;I.removeClass("showline");continue}if(R=="e"){var V=g.left+n.size.width;var p=Math.abs(N-V)<=U;if(p){n.size.width=n.size.width+(N-V)-Z;Y=true}}else{var h=n.position.left;var J=Math.abs(N-h)<=U;if(J){n.size.width=n.size.width-(N-h)+Z;n.position.left=n.position.left+(N-h)-Z;Y=true}}}else{if(R=="n"||R=="s"){if(!I.is(".wopop_snap_horizon")){P.snapElements[K].snapping=false;I.removeClass("showline");continue}if(R=="n"){var V=n.position.top+c;var F=Math.abs(G-V)<=U;if(F){n.size.height=n.size.height-(G-V);n.position.top=n.position.top+(G-V);Y=true}}else{var V=n.position.top+c+n.size.height;var O=Math.abs(X-V)<=U;if(O){n.size.height=n.size.height+(X-V);Y=true}}}else{var W=R.match(/./g);for(var f=0;f").appendTo(this.element).addClass("ui-slider-range ui-widget-header"+(E.range==="min"||E.range==="max"?" ui-slider-range-"+E.range:"")));for(var H=F.length;HP&&(L=P,M=C(this),H=O)}),K.range===!0&&this.values(1)===K.min&&(H+=1,M=C(this.handles[H])),E=this._start(J,H);if(E===!1){return !1}this._mouseSliding=!0,G._handleIndex=H,M.addClass("ui-state-active").focus(),F=M.offset(),I=!C(J.target).parents().andSelf().is(".ui-slider-handle"),this._clickOffset=I?{left:0,top:0}:{left:J.pageX-F.left-M.width()/2,top:J.pageY-F.top-M.height()/2-(parseInt(M.css("borderTopWidth"),10)||0)-(parseInt(M.css("borderBottomWidth"),10)||0)+(parseInt(M.css("marginTop"),10)||0)},this.handles.hasClass("ui-state-hover")||this._slide(J,H,D),this._animateOff=!0;return !0},_mouseStart:function(D){return !0},_mouseDrag:function(F){var D={x:F.pageX,y:F.pageY},E=this._normValueFromMouse(D);this._slide(F,this._handleIndex,E);return !1},_mouseStop:function(D){this.handles.removeClass("ui-state-active"),this._mouseSliding=!1,this._stop(D,this._handleIndex),this._change(D,this._handleIndex),this._handleIndex=null,this._clickOffset=null,this._animateOff=!1;return !1},_detectOrientation:function(){this.orientation=this.options.orientation==="vertical"?"vertical":"horizontal"},_normValueFromMouse:function(H){var F,G,D,E,I;this.orientation==="horizontal"?(F=this.elementSize.width,G=H.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)):(F=this.elementSize.height,G=H.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)),D=G/F,D>1&&(D=1),D<0&&(D=0),this.orientation==="vertical"&&(D=1-D),E=this._valueMax()-this._valueMin(),I=this._valueMin()+D*E;return this._trimAlignValue(I)},_start:function(F,D){var E={handle:this.handles[D],value:this.value()};this.options.values&&this.options.values.length&&(E.value=this.values(D),E.values=this.values());return this._trigger("start",F,E)},_slide:function(H,F,G){var D,E,I;this.options.values&&this.options.values.length?(D=this.values(F?0:1),this.options.values.length===2&&this.options.range===!0&&(F===0&&G>D||F===1&&G1){this.options.values[F]=this._trimAlignValue(G),this._refreshValue(),this._change(null,F)}else{if(!arguments.length){return this._values()}if(!C.isArray(arguments[0])){return this.options.values&&this.options.values.length?this._values(F):this.value()}D=this.options.values,E=arguments[0];for(H=0;H=this._valueMax()){return this._valueMax()}var E=this.options.step>0?this.options.step:1,F=(G-this._valueMin())%E,D=G-F;Math.abs(F)*2>=E&&(D+=F>0?E:-E);return parseFloat(D.toFixed(5))},_valueMin:function(){return this.options.min},_valueMax:function(){return this.options.max},_refreshValue:function(){var I=this.options.range,J=this.options,M=this,D=this._animateOff?!1:J.animate,K,L={},G,H,E,F;this.options.values&&this.options.values.length?this.handles.each(function(O,N){K=(M.values(O)-M._valueMin())/(M._valueMax()-M._valueMin())*100,L[M.orientation==="horizontal"?"left":"bottom"]=K+"%",C(this).stop(1,1)[D?"animate":"css"](L,J.animate),M.options.range===!0&&(M.orientation==="horizontal"?(O===0&&M.range.stop(1,1)[D?"animate":"css"]({left:K+"%"},J.animate),O===1&&M.range[D?"animate":"css"]({width:K-G+"%"},{queue:!1,duration:J.animate})):(O===0&&M.range.stop(1,1)[D?"animate":"css"]({bottom:K+"%"},J.animate),O===1&&M.range[D?"animate":"css"]({height:K-G+"%"},{queue:!1,duration:J.animate}))),G=K}):(H=this.value(),E=this._valueMin(),F=this._valueMax(),K=F!==E?(H-E)/(F-E)*100:0,L[M.orientation==="horizontal"?"left":"bottom"]=K+"%",this.handle.stop(1,1)[D?"animate":"css"](L,J.animate),I==="min"&&this.orientation==="horizontal"&&this.range.stop(1,1)[D?"animate":"css"]({width:K+"%"},J.animate),I==="max"&&this.orientation==="horizontal"&&this.range[D?"animate":"css"]({width:100-K+"%"},{queue:!1,duration:J.animate}),I==="min"&&this.orientation==="vertical"&&this.range.stop(1,1)[D?"animate":"css"]({height:K+"%"},J.animate),I==="max"&&this.orientation==="vertical"&&this.range[D?"animate":"css"]({height:100-K+"%"},{queue:!1,duration:J.animate}))}}),C.extend(C.ui.slider,{version:"1.8.17"})})(jQuery);(function(E,C){E.ui=E.ui||{};var D=/left|center|right/,H=/top|center|bottom/,A="center",F={},G=E.fn.position,B=E.fn.offset;E.fn.position=function(P){if(!P||!P.of){return G.apply(this,arguments)}P=E.extend({},P);var K=E(P.of),L=K[0],I=(P.collision||"flip").split(" "),J=P.offset?P.offset.split(" "):[0,0],N,O,M;L.nodeType===9?(N=K.width(),O=K.height(),M={top:0,left:0}):L.setTimeout?(N=K.width(),O=K.height(),M={top:K.scrollTop(),left:K.scrollLeft()}):L.preventDefault?(P.at="left top",N=O=0,M={top:P.of.pageY,left:P.of.pageX}):(N=K.outerWidth(),O=K.outerHeight(),M=K.offset()),E.each(["my","at"],function(){var Q=(P[this]||"").split(" ");Q.length===1&&(Q=D.test(Q[0])?Q.concat([A]):H.test(Q[0])?[A].concat(Q):[A,A]),Q[0]=D.test(Q[0])?Q[0]:A,Q[1]=H.test(Q[1])?Q[1]:A,P[this]=Q}),I.length===1&&(I[1]=I[0]),J[0]=parseInt(J[0],10)||0,J.length===1&&(J[1]=J[0]),J[1]=parseInt(J[1],10)||0,P.at[0]==="right"?M.left+=N:P.at[0]===A&&(M.left+=N/2),P.at[1]==="bottom"?M.top+=O:P.at[1]===A&&(M.top+=O/2),M.left+=J[0],M.top+=J[1];return this.each(function(){var W=E(this),Y=W.outerWidth(),X=W.outerHeight(),T=parseInt(E.curCSS(this,"marginLeft",!0))||0,U=parseInt(E.curCSS(this,"marginTop",!0))||0,V=Y+T+(parseInt(E.curCSS(this,"marginRight",!0))||0),R=X+U+(parseInt(E.curCSS(this,"marginBottom",!0))||0),S=E.extend({},M),Q;P.my[0]==="right"?S.left-=Y:P.my[0]===A&&(S.left-=Y/2),P.my[1]==="bottom"?S.top-=X:P.my[1]===A&&(S.top-=X/2),F.fractions||(S.left=Math.round(S.left),S.top=Math.round(S.top)),Q={left:S.left-T,top:S.top-U},E.each(["left","top"],function(a,Z){E.ui.position[I[a]]&&E.ui.position[I[a]][Z](S,{targetWidth:N,targetHeight:O,elemWidth:Y,elemHeight:X,collisionPosition:Q,collisionWidth:V,collisionHeight:R,offset:J,my:P.my,at:P.at})}),E.fn.bgiframe&&W.bgiframe(),W.offset(E.extend(S,{using:P.using}))})},E.ui.position={fit:{left:function(K,L){var I=E(window),J=L.collisionPosition.left+L.collisionWidth-I.width()-I.scrollLeft();K.left=J>0?K.left-J:Math.max(K.left-L.collisionPosition.left,K.left)},top:function(K,L){var I=E(window),J=L.collisionPosition.top+L.collisionHeight-I.height()-I.scrollTop();K.top=J>0?K.top-J:Math.max(K.top-L.collisionPosition.top,K.top)}},flip:{left:function(M,N){if(N.at[0]!==A){var J=E(window),O=N.collisionPosition.left+N.collisionWidth-J.width()-J.scrollLeft(),I=N.my[0]==="left"?-N.elemWidth:N.my[0]==="right"?N.elemWidth:0,K=N.at[0]==="left"?N.targetWidth:-N.targetWidth,L=-2*N.offset[0];M.left+=N.collisionPosition.left<0?I+K+L:O>0?I+K+L:0}},top:function(M,N){if(N.at[1]!==A){var J=E(window),O=N.collisionPosition.top+N.collisionHeight-J.height()-J.scrollTop(),I=N.my[1]==="top"?-N.elemHeight:N.my[1]==="bottom"?N.elemHeight:0,K=N.at[1]==="top"?N.targetHeight:-N.targetHeight,L=-2*N.offset[1];M.top+=N.collisionPosition.top<0?I+K+L:O>0?I+K+L:0}}}},E.offset.setOffset||(E.offset.setOffset=function(M,N){/static/.test(E.curCSS(M,"position"))&&(M.style.position="relative");var J=E(M),K=J.offset(),O=parseInt(E.curCSS(M,"top",!0),10)||0,I=parseInt(E.curCSS(M,"left",!0),10)||0,L={top:N.top-K.top+O,left:N.left-K.left+I};"using" in N?N.using.call(M,L):J.css(L)},E.fn.offset=function(I){var J=this[0];if(!J||!J.ownerDocument){return null}if(I){return this.each(function(){E.offset.setOffset(this,I)})}return B.call(this)}),function(){var M=document.getElementsByTagName("body")[0],N=document.createElement("div"),P,I,O,K,L;P=document.createElement(M?"div":"body"),O={visibility:"hidden",width:0,height:0,border:0,margin:0,background:"none"},M&&jQuery.extend(O,{position:"absolute",left:"-1000px",top:"-1000px"});for(var J in O){P.style[J]=O[J]}P.appendChild(N),I=M||document.documentElement,I.insertBefore(P,I.firstChild),N.style.cssText="position: absolute; left: 10.7432222px; top: 10.432325px; height: 30px; width: 201px;",K=E(N).offset(function(R,Q){return Q}).offset(),P.innerHTML="",I.removeChild(P),L=K.top+K.left+(M?2000:0),F.fractions=L>21&&L<22}()})(jQuery);(function(D,E){var F=0;D.widget("ui.autocomplete",{options:{appendTo:"body",autoFocus:false,delay:300,minLength:1,width:"auto",position:{my:"left top",at:"left bottom",collision:"none"},source:null},pending:0,_create:function(){var A=this,B=this.element[0].ownerDocument,C;this.element.addClass("ui-autocomplete-input").attr("autocomplete","off").attr({role:"textbox","aria-autocomplete":"list","aria-haspopup":"true"}).bind("keydown.autocomplete",function(I){if(A.options.disabled||A.element.propAttr("readOnly")){return}C=false;var J=D.ui.keyCode;switch(I.keyCode){case J.PAGE_UP:A._move("previousPage",I);break;case J.PAGE_DOWN:A._move("nextPage",I);break;case J.UP:A._move("previous",I);I.preventDefault();break;case J.DOWN:A._move("next",I);I.preventDefault();break;case J.ENTER:case J.NUMPAD_ENTER:if(A.menu.active){C=true;I.preventDefault()}case J.TAB:if(!A.menu.active){return}A.menu.select(I);break;case J.ESCAPE:A.element.val(A.term);A.close(I);break;default:clearTimeout(A.searching);A.searching=setTimeout(function(){if(A.term!=A.element.val()){A.selectedItem=null;A.search(null,I)}},A.options.delay);break}}).bind("keypress.autocomplete",function(H){if(C){C=false;H.preventDefault()}}).bind("focus.autocomplete",function(){if(A.options.disabled){return}A.selectedItem=null;A.previous=A.element.val()}).bind("blur.autocomplete",function(H){if(A.options.disabled){return}clearTimeout(A.searching);A.closing=setTimeout(function(){A.close(H);A._change(H)},150)});this._initSource();this.response=function(){return A._response.apply(A,arguments)};this.menu=D("
    ").addClass("ui-autocomplete").appendTo(D(this.options.appendTo||"body",B)[0]).mousedown(function(J){var I=A.menu.element[0];if(!D(J.target).closest(".ui-menu-item").length){setTimeout(function(){D(document).one("mousedown",function(G){if(G.target!==A.element[0]&&G.target!==I&&!D.ui.contains(I,G.target)){A.close()}})},1)}setTimeout(function(){clearTimeout(A.closing)},13)}).menu({focus:function(K,L){var J=L.item.data("item.autocomplete");if(false!==A._trigger("focus",K,{item:J})){if(/^key/.test(K.originalEvent.type)){A.element.val(J.value)}}},selected:function(L,M){var N=M.item.data("item.autocomplete"),K=A.previous;if(A.element[0]!==B.activeElement){A.element.focus();A.previous=K;setTimeout(function(){A.previous=K;A.selectedItem=N},1)}if(false!==A._trigger("select",L,{item:N})){A.element.val(N.value)}A.term=A.element.val();A.close(L);A.selectedItem=N},blur:function(I,J){if(A.menu.element.is(":visible")&&(A.element.val()!==A.term)){A.element.val(A.term)}}}).zIndex(this.element.zIndex()+1).css({top:0,left:0}).hide().data("menu");if(D.fn.bgiframe){this.menu.element.bgiframe()}A.beforeunloadHandler=function(){A.element.removeAttr("autocomplete")};D(window).bind("beforeunload",A.beforeunloadHandler)},destroy:function(){this.element.removeClass("ui-autocomplete-input").removeAttr("autocomplete").removeAttr("role").removeAttr("aria-autocomplete").removeAttr("aria-haspopup");this.menu.element.remove();D(window).unbind("beforeunload",this.beforeunloadHandler);D.Widget.prototype.destroy.call(this)},_setOption:function(B,A){D.Widget.prototype._setOption.apply(this,arguments);if(B==="source"){this._initSource()}if(B==="appendTo"){this.menu.element.appendTo(D(A||"body",this.element[0].ownerDocument)[0])}if(B==="disabled"&&A&&this.xhr){this.xhr.abort()}},_initSource:function(){var C=this,A,B;if(D.isArray(this.options.source)){A=this.options.source;this.source=function(I,J){J(D.ui.autocomplete.filter(A,I.term))}}else{if(typeof this.options.source==="string"){B=this.options.source;this.source=function(I,J){if(C.xhr){C.xhr.abort()}C.xhr=D.ajax({url:B,data:I,dataType:"json",autocompleteRequest:++F,success:function(H,G){if(this.autocompleteRequest===F){J(H)}},error:function(){if(this.autocompleteRequest===F){J([])}}})}}else{this.source=this.options.source}}},search:function(A,B){A=A!=null?A:this.element.val();this.term=this.element.val();if(A.length").data("item.autocomplete",A).append(D("").text(A.label)).appendTo(B)},_move:function(A,B){if(!this.menu.element.is(":visible")){this.search(null,B);return}if(this.menu.first()&&/^previous/.test(A)||this.menu.last()&&/^next/.test(A)){this.element.val(this.term);this.menu.deactivate();return}this.menu[A](B)},widget:function(){return this.menu.element}});D.extend(D.ui.autocomplete,{escapeRegex:function(A){return A.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")},filter:function(A,C){var B=new RegExp(D.ui.autocomplete.escapeRegex(C),"i");return D.grep(A,function(H){return B.test(H.label||H.value||H)})}})}(jQuery));(function(B){B.widget("ui.menu",{_create:function(){var A=this;this.element.addClass("ui-menu ui-widget ui-widget-content ui-corner-all").attr({role:"listbox","aria-activedescendant":"ui-active-menuitem"}).click(function(D){if(!B(D.target).closest(".ui-menu-item a").length){return}D.preventDefault();A.select(D)});this.refresh()},refresh:function(){var D=this;var A=this.element.children("li:not(.ui-menu-item):has(a)").addClass("ui-menu-item").attr("role","menuitem");A.children("a").addClass("ui-corner-all").attr("tabindex",-1).mouseenter(function(C){D.activate(C,B(this).parent())}).mouseleave(function(){D.deactivate()})},activate:function(J,A){this.deactivate();if(this.hasScroll()){var G=A.offset().top-this.element.offset().top,H=this.element.scrollTop(),I=this.element.height();if(G<0){this.element.scrollTop(H+G)}else{if(G>=I){this.element.scrollTop(H+G-I+A.height())}}}this.active=A.eq(0).children("a").addClass("ui-state-hover").attr("id","ui-active-menuitem").end();this._trigger("focus",J,{item:A})},deactivate:function(){if(!this.active){return}this.active.children("a").removeClass("ui-state-hover").removeAttr("id");this._trigger("blur");this.active=null},next:function(A){this.move("next",".ui-menu-item:first",A)},previous:function(A){this.move("prev",".ui-menu-item:last",A)},first:function(){return this.active&&!this.active.prevAll(".ui-menu-item").length},last:function(){return this.active&&!this.active.nextAll(".ui-menu-item").length},move:function(H,G,A){if(!this.active){this.activate(A,this.element.children(G));return}var F=this.active[H+"All"](".ui-menu-item").eq(0);if(F.length){this.activate(A,F)}else{this.activate(A,this.element.children(G))}},nextPage:function(F){if(this.hasScroll()){if(!this.active||this.last()){this.activate(F,this.element.children(".ui-menu-item:first"));return}var G=this.active.offset().top,A=this.element.height(),H=this.element.children(".ui-menu-item").filter(function(){var C=B(this).offset().top-G-A+B(this).height();return C<10&&C>-10});if(!H.length){H=this.element.children(".ui-menu-item:last")}this.activate(F,H)}else{this.activate(F,this.element.children(".ui-menu-item").filter(!this.active||this.last()?":first":":last"))}},previousPage:function(A){if(this.hasScroll()){if(!this.active||this.first()){this.activate(A,this.element.children(".ui-menu-item:last"));return}var E=this.active.offset().top,F=this.element.height();result=this.element.children(".ui-menu-item").filter(function(){var C=B(this).offset().top-E+F-B(this).height();return C<10&&C>-10});if(!result.length){result=this.element.children(".ui-menu-item:first")}this.activate(A,result)}else{this.activate(A,this.element.children(".ui-menu-item").filter(!this.active||this.first()?":last":":first"))}},hasScroll:function(){return this.element.height()")},destroy:function(){this.selectees.removeClass("ui-selectee").removeData("selectable-item");this.element.removeClass("ui-selectable ui-selectable-disabled").removeData("selectable").unbind(".selectable");this._mouseDestroy();return this},_mouseStart:function(E){var C=this;this.opos=[E.pageX,E.pageY];if(this.options.disabled){return}var D=this.options;this.selectees=B(D.filter,this.element[0]);this._trigger("start",E);B(D.appendTo).append(this.helper);this.helper.css({"left":E.clientX,"top":E.clientY,"width":0,"height":0});if(D.autoRefresh){this.refresh()}this.selectees.filter(".ui-selected").each(function(){var F=B.data(this,"selectable-item");F.startselected=true;if(!E.metaKey&&!E.ctrlKey){F.$element.removeClass("ui-selected");F.selected=false;F.$element.addClass("ui-unselecting");F.unselecting=true;C._trigger("unselecting",E,{unselecting:F.element})}});B(E.target).parents().andSelf().each(function(){var F=B.data(this,"selectable-item");if(F){var G=(!E.metaKey&&!E.ctrlKey)||!F.$element.hasClass("ui-selected");F.$element.removeClass(G?"ui-unselecting":"ui-selected").addClass(G?"ui-selecting":"ui-unselecting");F.unselecting=!G;F.selecting=G;F.selected=G;if(G){C._trigger("selecting",E,{selecting:F.element})}else{C._trigger("unselecting",E,{unselecting:F.element})}return false}})},_mouseDrag:function(F){var J=this;this.dragged=true;if(this.options.disabled){return}var I=this.options;var C=this.opos[0],D=this.opos[1],E=F.pageX,H=F.pageY;if(C>E){var G=E;E=C;C=G}if(D>H){var G=H;H=D;D=G}this.helper.css({left:C,top:D,width:E-C,height:H-D});this.selectees.each(function(){var K=B.data(this,"selectable-item");if(!K||K.element==J.element[0]){return}var L=false;if(I.tolerance=="touch"){L=(!(K.left>E||K.rightH||K.bottomC&&K.rightD&&K.bottomK.failure_limit){return false}}}}}})}if(J){if(D!==J.failurelimit){J.failure_limit=J.failurelimit;delete J.failurelimit}if(D!==J.effectspeed){J.effect_speed=J.effectspeed;delete J.effectspeed}E.extend(K,J)}L=(K.container===D||K.container===A)?C:E(K.container);if(0===K.event.indexOf("scroll")){var F=true;var I;L.bind(K.event,function(){if(I){clearTimeout(I)}I=setTimeout(function(){F=G()},200);return F})}this.each(function(){var M=this;var N=E(M);M.loaded=false;if(N.attr("src")===D||N.attr("src")===false){if(N.is("img")){N.attr("src",K.placeholder)}}N.one("appear",function(){var P=arguments.callee;if(!this.loaded){if(K.appear){var O=H.length;K.appear.call(M,O,K)}E("").bind("load",function(){var R=N.attr("data-"+K.data_attribute);N.hide();if(N.is("img")){N.attr("src",R)}else{N.css("background-image","url('"+R+"')")}N[K.effect](K.effect_speed);M.loaded=true;var S=E.grep(H,function(T){return !T.loaded});H=E(S);if(K.load){var Q=H.length;K.load.call(M,Q,K)}}).bind("error",function(){if(P){var Q=N.data("lazy_load_error_times");var S=N.data("lazy_load_error_firsttime");if(!Q){Q=0}if(!S){S=new Date();N.data("lazy_load_error_firsttime",S)}else{var R=new Date();if(R-S<=100){return}}if(Q>1){return}N.data("lazy_load_error_times",Q+1);setTimeout(function(){P()},1000)}}).attr("src",N.attr("data-"+K.data_attribute))}});if(0!==K.event.indexOf("scroll")){N.bind(K.event,function(){if(!M.loaded){N.trigger("appear")}})}});C.bind("resize",function(){G()});if((/(?:iphone|ipod|ipad).*os 5/gi).test(navigator.appVersion)){C.bind("pageshow",function(M){if(M.originalEvent&&M.originalEvent.persisted){H.each(function(){E(this).trigger("appear")})}})}G();E(B).ready(function(){G()});return this};E.belowthefold=function(G,F){var H;if(F.container===D||F.container===A){H=(A.innerHeight?A.innerHeight:C.height())+C.scrollTop()}else{H=E(F.container).offset().top+E(F.container).height()}return H<=E(G).offset().top-F.threshold};E.rightoffold=function(G,F){var H;if(F.container===D||F.container===A){H=C.width()+C.scrollLeft()}else{H=E(F.container).offset().left+E(F.container).width()}return H<=E(G).offset().left-F.threshold};E.abovethetop=function(H,G){var I;if(G.container===D||G.container===A){I=C.scrollTop()}else{I=E(G.container).offset().top}var F=E(H).height();if(F==0&&E(H).parents().parents().attr("class")=="img_over"){var F=E(H).parents().parents().height()}return I>=E(H).offset().top+G.threshold+F};E.leftofbegin=function(G,F){var H;if(F.container===D||F.container===A){H=C.scrollLeft()}else{H=E(F.container).offset().left}return H>=Math.max(E(G).offset().left+E(G).width(),2)+F.threshold};E.inviewport=function(G,F){return !E.rightoffold(G,F)&&!E.leftofbegin(G,F)&&!E.belowthefold(G,F)&&!E.abovethetop(G,F)};E.extend(E.expr[":"],{"below-the-fold":function(F){return E.belowthefold(F,{threshold:0})},"above-the-top":function(F){return !E.belowthefold(F,{threshold:0})},"right-of-screen":function(F){return E.rightoffold(F,{threshold:0})},"left-of-screen":function(F){return !E.rightoffold(F,{threshold:0})},"in-viewport":function(F){return E.inviewport(F,{threshold:0})},"above-the-fold":function(F){return !E.belowthefold(F,{threshold:0})},"right-of-fold":function(F){return E.rightoffold(F,{threshold:0})},"left-of-fold":function(F){return !E.rightoffold(F,{threshold:0})}})})(jQuery,window,document);; (function(E,C){var B={0:0};var A={0:1};var D={0:0};E.math={};E.math.sin=function(G){if(G<0){G=G+360}if(G>=360){G=G%360}if(B[G]==C){var F=Math.sin(G*Math.PI/180);B[G]=F}return B[G]};E.math.cos=function(G){if(G<0){G=G+360}if(G>=360){G=G%360}if(A[G]==C){var F=Math.cos(G*Math.PI/180);A[G]=F}return A[G]};E.math.tan=function(G){if(G<0){G=G+360}if(G>=360){G=G%360}if(D[G]==C){var F=Math.tan(G*Math.PI/180);D[G]=F}return D[G]};E.math.acos=function(F){var G=Math.acos(F);return Math.round(G*180/Math.PI)};E.parseInteger=function(G){var F=parseInt(G);if(isNaN(F)){return 0}return F};E.divrotate=function(L,G,M,F){L=E(L);var H=L.width();var K=L.height();if(F){H=F[0];K=F[1]}if(M){var J=M[0];var I=M[1];if(E.browser.msie&&E.browser.version<9){H=parseInt(L.data("IEWidth"));K=parseInt(L.data("IEHeight"));J=L.data("IELeft");if(J==C){J=M[0];L.data("IELeft",J)}I=L.data("IETop");if(I==C){I=M[1];L.data("IETop",I)}ieRotate({degree:G,left:J,top:I,width:H,height:K,dom:L})}else{L[0].style.left=Math.round(J)+"px";L[0].style.top=Math.round(I)+"px"}}if(E.browser.safari||E.browser.mozilla||E.browser.opera||(E.browser.msie&&E.browser.version=="9.0")){ieRotate({degree:G,dom:L})}};E.fn.modattr=function(F,G){if(F=="leftpos"){var H=this.data("prop_leftpos");if(!H){H=[parseInt(this.css("left")),parseInt(this.css("top"))]}if(G!=C){this.data("prop_leftpos",G)}return H}if(F=="degree"){var H=this.data("deg");if(!H){H=0}if(G!=C){this.data("deg",G)}return H}if(F=="size"){var H=this.data("prop_size");if(!H){H=[this.width(),this.height()]}if(G!=C){this.data("prop_size",G)}return H}};E.divrotate.reversePos=function(N,H,I,M){var K=N[0];var J=N[1];var O=E.math.cos(H);var L=E.math.sin(H);if(E.browser.msie&&E.browser.version<9){var F=K;if(H<90){F=K+M*L}else{if(H<180){F=K+M*L-I*O}else{if(H<270){F=K-I*O}else{F=K}}}var G=J;if(H<90){G=J}else{if(H<180){G=J-M*O}else{if(H<270){G=J-M*O-I*L}else{G=J-I*L}}}return[F,G]}else{return N}};E.divrotate.getMaxDistance=function(N){var G=N.data("deg");var K=parseInt(N.css("left"));var J=parseInt(N.css("top"));var H=N.width();var M=N.height();var L=canv.width();var P,I,F;if(!G){P=K;I=L-H-K;F=J}else{if(G>360){G=G%360}var O=E.math.cos(G);var Q=E.math.sin(G);if(G<=90){P=K-M*Q;I=L-K-H*O;F=J}else{if(G>90&&G<=180){P=K-M*Q+H*O;I=L-K;F=J+M*O}else{if(G>180&&G<=270){P=K+H*O;I=L-K+M*Q;F=J+M*O+H*Q}else{if(G>270&&G<=360){P=K;I=L-K+M*Q-H*O;F=J+H*Q}}}}}return{left:P,right:I,top:F}};E.divrotate.getDegreeModMaxPointOrigin=function(P,H,O,I,S){var M=E.getElementFatherid(P);var F=E("#"+M).ab_pos_cnter("top");var R=E("#"+M).ab_pos_cnter("left")||0;var H=H;if(!H){var N=0;var K=I[0];var L=I[1];switch(S){case"left":N=O[0]+R;break;case"right":N=O[0]+K+R;break;case"top":N=O[1]+F;break;case"buttom":N=O[1]+L+F;break}return N}else{if(E.browser.msie&&E.browser.version<9){var N=0;switch(S){case"left":N=P.position().left;break;case"right":N=P.position().left+P.width();break;case"top":N=P.position().top;break;case"buttom":N=P.position().top+P.height();break}return N}var N=0;var K=I[0];var L=I[1];var Q=O[0];var J=O[1];if(H>360){H=H%360}var G=E.math.cos(H);var T=E.math.sin(H);switch(S){case"left":if(H<=90){N=Q-L*T}else{if(H>90&&H<=180){N=Q-L*T+K*G}else{if(H>180&&H<=270){N=Q+K*G}else{if(H>270&&H<=360){N=Q}}}}N+=R;break;case"right":if(H<=90){N=Q+K*G}else{if(H>90&&H<=180){N=Q}else{if(H>180&&H<=270){N=Q-L*T}else{if(H>270&&H<=360){N=Q-L*T+K*G}}}}N+=R;break;case"top":if(H<=90){N=J}else{if(H>90&&H<=180){N=J+L*G}else{if(H>180&&H<=270){N=J+L*G+K*T}else{if(H>270&&H<=360){N=J+K*T}}}}N=N+F;break;case"buttom":if(H<=90){N=J+L*G+K*T}else{if(H>90&&H<=180){N=J+K*T}else{if(H>180&&H<=270){N=J}else{if(H>270&&H<=360){N=J+L*G}}}}N=N+F;break}return N}};E.divrotate.getDegreeModMaxPoint=function(F,H,J){var K=F.data("deg");if(H==null){H=[E.parseInteger(F.css("left")),E.parseInteger(F.css("top"))]}var I=F.width();var G=F.height();return E.divrotate.getDegreeModMaxPointOrigin(F,K,H,[I,G],J)};E.divrotate.getDegreeModMaxPointForRotate=function(F,K,H,J){var I=F.width();var G=F.height();return E.divrotate.getDegreeModMaxPointOrigin(F,K,H,[I,G],J)};E.divrotate.getDegreeResizeCursor=function(F){var G=F.data("deg");if(G==null){G=0}if(G>360){G=G%360}if(G<=22||G>=338){F.find(".ui-resizable-n").css("cursor","n-resize");F.find(".ui-resizable-e").css("cursor","e-resize");F.find(".ui-resizable-w").css("cursor","w-resize");F.find(".ui-resizable-s").css("cursor","s-resize");F.find(".ui-resizable-ne").css("cursor","ne-resize");F.find(".ui-resizable-se").css("cursor","se-resize");F.find(".ui-resizable-nw").css("cursor","nw-resize");F.find(".ui-resizable-sw").css("cursor","sw-resize")}else{if(G>22&&G<=67){F.find(".ui-resizable-n").css("cursor","ne-resize");F.find(".ui-resizable-e").css("cursor","se-resize");F.find(".ui-resizable-w").css("cursor","nw-resize");F.find(".ui-resizable-s").css("cursor","sw-resize");F.find(".ui-resizable-ne").css("cursor","e-resize");F.find(".ui-resizable-se").css("cursor","s-resize");F.find(".ui-resizable-nw").css("cursor","n-resize");F.find(".ui-resizable-sw").css("cursor","w-resize")}else{if(G>67&&G<=112){F.find(".ui-resizable-n").css("cursor","e-resize");F.find(".ui-resizable-e").css("cursor","s-resize");F.find(".ui-resizable-w").css("cursor","n-resize");F.find(".ui-resizable-s").css("cursor","w-resize");F.find(".ui-resizable-ne").css("cursor","se-resize");F.find(".ui-resizable-se").css("cursor","sw-resize");F.find(".ui-resizable-nw").css("cursor","ne-resize");F.find(".ui-resizable-sw").css("cursor","nw-resize")}else{if(G>112&&G<=157){F.find(".ui-resizable-n").css("cursor","se-resize");F.find(".ui-resizable-e").css("cursor","sw-resize");F.find(".ui-resizable-w").css("cursor","ne-resize");F.find(".ui-resizable-s").css("cursor","nw-resize");F.find(".ui-resizable-ne").css("cursor","s-resize");F.find(".ui-resizable-se").css("cursor","w-resize");F.find(".ui-resizable-nw").css("cursor","e-resize");F.find(".ui-resizable-sw").css("cursor","n-resize")}else{if(G>157&&G<=202){F.find(".ui-resizable-n").css("cursor","s-resize");F.find(".ui-resizable-e").css("cursor","w-resize");F.find(".ui-resizable-w").css("cursor","e-resize");F.find(".ui-resizable-s").css("cursor","n-resize");F.find(".ui-resizable-ne").css("cursor","sw-resize");F.find(".ui-resizable-se").css("cursor","nw-resize");F.find(".ui-resizable-nw").css("cursor","se-resize");F.find(".ui-resizable-sw").css("cursor","ne-resize")}else{if(G>202&&G<=247){F.find(".ui-resizable-n").css("cursor","sw-resize");F.find(".ui-resizable-e").css("cursor","nw-resize");F.find(".ui-resizable-w").css("cursor","se-resize");F.find(".ui-resizable-s").css("cursor","ne-resize");F.find(".ui-resizable-ne").css("cursor","w-resize");F.find(".ui-resizable-se").css("cursor","n-resize");F.find(".ui-resizable-nw").css("cursor","s-resize");F.find(".ui-resizable-sw").css("cursor","e-resize")}else{if(G>247&&G<=292){F.find(".ui-resizable-n").css("cursor","w-resize");F.find(".ui-resizable-e").css("cursor","n-resize");F.find(".ui-resizable-w").css("cursor","s-resize");F.find(".ui-resizable-s").css("cursor","e-resize");F.find(".ui-resizable-ne").css("cursor","nw-resize");F.find(".ui-resizable-se").css("cursor","ne-resize");F.find(".ui-resizable-nw").css("cursor","sw-resize");F.find(".ui-resizable-sw").css("cursor","se-resize")}else{if(G>292&&G<=337){F.find(".ui-resizable-n").css("cursor","nw-resize");F.find(".ui-resizable-e").css("cursor","ne-resize");F.find(".ui-resizable-w").css("cursor","sw-resize");F.find(".ui-resizable-s").css("cursor","se-resize");F.find(".ui-resizable-ne").css("cursor","n-resize");F.find(".ui-resizable-se").css("cursor","e-resize");F.find(".ui-resizable-nw").css("cursor","w-resize");F.find(".ui-resizable-sw").css("cursor","s-resize")}}}}}}}}};E.divrotate.getDegreeResizeChange=function(N,Y,S,K,M){var R=N.data("deg");if(R>360){R=R%360}var O=Math.sin(R*Math.PI/180);var V=Math.cos(R*Math.PI/180);if(E.browser.msie&&E.browser.version<9){var G=N.data("IEWidth");var J=N.data("IEHeight");if(R>=0&&R<90){var Z=S.left+J*O,H=S.top}else{if(R>=90&&R<180){var Z=J*O-G*V+S.left,H=S.top-J*V}else{if(R>180&&R<=270){var Z=S.left-G*V,H=S.top-G*O-J*V}else{if(R>270&&R<360){var Z=S.left,H=G*V+S.top}}}}}else{var G=K.width;var J=K.height;var Z=S.left,H=S.top}var L=Y[0];var U=Y[1];var Q=E.math.tan(R);var T,P,X;var I=function(a){T=E.math.acos((L+a*U)/(Math.sqrt(L*L+U*U)*Math.sqrt(1+a*a)));P=Math.sqrt(L*L+U*U)*E.math.sin(T);X=L*a-U};var W=function(a){T=E.math.acos((L-a*U)/(Math.sqrt(L*L+U*U)*Math.sqrt(1+a*a)));P=Math.sqrt(L*L+U*U)*E.math.sin(T);X=0-(L*a+U)};if(E.browser.msie&&E.browser.version<9){var F=null;switch(M){case"n":I(Q);if(X==0){return{}}if(R<=90){if(X>0){F={height:Math.round(J+P),left:Math.round(Z+P*E.math.sin(R)-(J+P)*E.math.sin(R)),top:Math.round(H-P*E.math.cos(R))}}else{if(X<0){F={height:Math.round(J-P),left:Math.round(Z-P*E.math.sin(R)-(J-P)*E.math.sin(R)),top:Math.round(H+P*E.math.cos(R))}}}}else{if(R>270&&R<360){if(X>0){F={height:Math.round(J+P),left:Math.round(Z+P*E.math.sin(R)),top:Math.round(H-P*E.math.cos(R)-G*E.math.cos(R))}}else{if(X<0){F={height:Math.round(J-P),left:Math.round(Z-P*E.math.sin(R)),top:Math.round(H+P*E.math.cos(R)-G*E.math.cos(R))}}}}else{if(R>90&&R<=180){if(X>0){F={height:Math.round(J-P),left:Math.round(Z-P*E.math.sin(R)-(J-P)*E.math.sin(R)+G*E.math.cos(R)),top:Math.round(H+P*E.math.cos(R)+(J-P)*E.math.cos(R))}}else{if(X<0){F={height:Math.round(J+P),left:Math.round(Z+P*E.math.sin(R)-(J+P)*E.math.sin(R)+G*E.math.cos(R)),top:Math.round(H-P*E.math.cos(R)+(J+P)*E.math.cos(R))}}}}else{if(R>180&&R<=270){if(X>0){F={height:Math.round(J-P),left:Math.round(Z-P*E.math.sin(R)+G*E.math.cos(R)),top:Math.round(H+P*E.math.cos(R)+(J-P)*E.math.cos(R)+G*E.math.sin(R))}}else{if(X<0){F={height:Math.round(J+P),left:Math.round(Z+P*E.math.sin(R)+G*E.math.cos(R)),top:Math.round(H-P*E.math.cos(R)+(J+P)*E.math.cos(R)+G*E.math.sin(R))}}}}}}}break;case"s":I(Q);if(X==0){return{}}if(R<=90){if(X>0){F={width:G,height:Math.round(J-P),left:Math.round(Z-(J-P)*E.math.sin(R)),top:H}}else{if(X<0){F={width:G,height:Math.round(J+P),left:Math.round(Z-(J+P)*E.math.sin(R)),top:H}}}}else{if(R>90&&R<=180){if(X>0){F={width:G,height:Math.round(J+P),left:Math.round(Z-(J+P)*E.math.sin(R)+G*E.math.cos(R)),top:Math.round(H+(J+P)*E.math.cos(R))}}else{if(X<0){F={width:G,height:Math.round(J-P),left:Math.round(Z-(J-P)*E.math.sin(R)+G*E.math.cos(R)),top:Math.round(H+(J-P)*E.math.cos(R))}}}}else{if(R>180&&R<=270){if(X>0){F={width:G,height:Math.round(J+P),left:Math.round(Z+G*E.math.cos(R)),top:Math.round(H+(J+P)*E.math.cos(R)+G*E.math.sin(R))}}else{if(X<0){F={width:G,height:Math.round(J-P),left:Math.round(Z+G*E.math.cos(R)),top:Math.round(H+(J-P)*E.math.cos(R)+G*E.math.sin(R))}}}}else{if(R>270&&R<360){if(X>0){F={width:G,height:Math.round(J-P),left:Z,top:Math.round(H-G*E.math.cos(R))}}else{if(X<0){F={width:G,height:Math.round(J+P),left:Z,top:Math.round(H-G*E.math.cos(R))}}}}}}}break;case"w":W(1/Q);if(X==0){return{}}if(R<=90){if(X>0){F={width:Math.round(G+P),height:J,left:Math.round(Z-P*E.math.cos(R)-J*E.math.sin(R)),top:Math.round(H-P*E.math.sin(R))}}else{if(X<0){F={width:Math.round(G-P),height:J,left:Math.round(Z+P*E.math.cos(R)-J*E.math.sin(R)),top:Math.round(H+P*E.math.sin(R))}}}}else{if(R>90&&R<=180){if(X>0){F={width:Math.round(G+P),height:J,left:Math.round(Z-P*E.math.cos(R)-J*E.math.sin(R)+(G+P)*E.math.cos(R)),top:Math.round(H-P*E.math.sin(R)+J*E.math.cos(R))}}else{if(X<0){F={width:Math.round(G-P),height:J,left:Math.round(Z+P*E.math.cos(R)-J*E.math.sin(R)+(G-P)*E.math.cos(R)),top:Math.round(H+P*E.math.sin(R)+J*E.math.cos(R))}}}}else{if(R>180&&R<=270){if(X>0){F={width:Math.round(G-P),height:J,left:Math.round(Z+P*E.math.cos(R)+(G-P)*E.math.cos(R)),top:Math.round(H+P*E.math.sin(R)+(G-P)*E.math.sin(R)+J*E.math.cos(R))}}else{if(X<0){F={width:Math.round(G+P),height:J,left:Math.round(Z-P*E.math.cos(R)+(G+P)*E.math.cos(R)),top:Math.round(H-P*E.math.sin(R)+(G+P)*E.math.sin(R)+J*E.math.cos(R))}}}}else{if(R>270&&R<360){if(X>0){F={width:Math.round(G-P),height:J,left:Math.round(Z+P*E.math.cos(R)),top:Math.round(H+P*E.math.sin(R)-(G-P)*E.math.cos(R))}}else{if(X<0){F={width:Math.round(G+P),height:J,left:Math.round(Z-P*E.math.cos(R)),top:Math.round(H-P*E.math.sin(R)-(G+P)*E.math.cos(R))}}}}}}}break;case"e":W(1/Q);if(X==0){return{}}if(R<=90){if(X>0){F={width:Math.round(G-P),height:J,left:Z-J*E.math.sin(R),top:H}}else{if(X<0){F={width:Math.round(G+P),height:J,left:Z-J*E.math.sin(R),top:H}}}}else{if(R>90&&R<=180){if(X>0){F={width:Math.round(G-P),height:J,left:Z-J*E.math.sin(R)+(G-P)*E.math.cos(R),top:H+J*E.math.cos(R)}}else{if(X<0){F={width:Math.round(G+P),height:J,left:Z-J*E.math.sin(R)+(G+P)*E.math.cos(R),top:H+J*E.math.cos(R)}}}}else{if(R>180&&R<=270){if(X>0){F={width:Math.round(G+P),height:J,left:Z+(G+P)*E.math.cos(R),top:H+(G+P)*E.math.sin(R)+J*E.math.cos(R)}}else{if(X<0){F={width:Math.round(G-P),height:J,left:Z+(G-P)*E.math.cos(R),top:H+(G-P)*E.math.sin(R)+J*E.math.cos(R)}}}}else{if(R>270&&R<360){if(X>0){F={width:Math.round(G+P),height:J,left:Z,top:H-(G+P)*E.math.cos(R)}}else{if(X<0){F={width:Math.round(G-P),height:J,left:Z,top:H-(G-P)*E.math.cos(R)}}}}}}}break}N.data("IEWidth_tmp",F.width||G).data("IEHeight_tmp",F.height||J);E(".propblk,.posblk").remove();return F}else{switch(M){case"n":I(Q);if(X==0){return{}}if(R<=90||(R>270&&R<=360)){if(X>0){return{height:Math.round(J+P),left:Math.round(Z+P*E.math.sin(R)),top:Math.round(H-P*E.math.cos(R))}}else{if(X<0){return{height:Math.round(J-P),left:Math.round(Z-P*E.math.sin(R)),top:Math.round(H+P*E.math.cos(R))}}}}else{if(R>90&&R<=270){if(X>0){return{height:Math.round(J-P),left:Math.round(Z-P*E.math.sin(R)),top:Math.round(H+P*E.math.cos(R))}}else{if(X<0){return{height:Math.round(J+P),left:Math.round(Z+P*E.math.sin(R)),top:Math.round(H-P*E.math.cos(R))}}}}}break;case"s":I(Q);if(X==0){return{}}if(R<=90||(R>270&&R<=360)){if(X>0){return{height:Math.round(J-P)}}else{if(X<0){return{height:Math.round(J+P)}}}}else{if(R>90&&R<=270){if(X>0){return{height:Math.round(J+P)}}else{if(X<0){return{height:Math.round(J-P)}}}}}break;case"w":W(1/Q);if(X==0){return{}}if(R<=180){if(X>0){return{width:Math.round(G+P),left:Math.round(Z-P*E.math.cos(R)),top:Math.round(H-P*E.math.sin(R))}}else{if(X<0){return{width:Math.round(G-P),left:Math.round(Z+P*E.math.cos(R)),top:Math.round(H+P*E.math.sin(R))}}}}else{if(R>180&&R<=360){if(X>0){return{width:Math.round(G-P),left:Math.round(Z+P*E.math.cos(R)),top:Math.round(H+P*E.math.sin(R))}}else{if(X<0){return{width:Math.round(G+P),left:Math.round(Z-P*E.math.cos(R)),top:Math.round(H-P*E.math.sin(R))}}}}}break;case"e":W(1/Q);if(X==0){return{}}if(R<=180){if(X>0){return{width:Math.round(G-P)}}else{if(X<0){return{width:Math.round(G+P)}}}}else{if(R>180&&R<=360){if(X>0){return{width:Math.round(G+P)}}else{if(X<0){return{width:Math.round(G-P)}}}}}break}}}})(jQuery);function rotateWithCenter(L,E){L=$(L);var B=L.modattr("leftpos");var O=B[0];var M=B[1];var D=L.modattr("degree");var F=L.width();var I=L.height();var K=$.math.sin(D);var N=$.math.cos(D);var G=[O+F/2*N-I/2*K,M+I/2*N+F/2*K];var A=$.math.sin(E);var J=$.math.cos(E);var C=G[0]+I/2*A-F/2*J;var H=G[1]-F/2*A-I/2*J;$.divrotate(L,E,[C,H]);toolbarRotate(L,E,{w:F,h:I})}function toolbarRotate(M,T,A,P){if(!P){P=$(".propblk")}if(P.length==0){return}M=$(M);if(P.is(".propblk")){var Q=M.data("toolbarsize")}else{Q=M.data("posizeblksize");if(T){P.data("rotatedegree",T)}}if(!Q){Q=[P.width(),P.height()];M.data("toolbarsize",Q)}if($.browser.msie&&$.browser.version<9){var K=Q[0];var D=Q[1];var C=$("#"+M.attr("id")).width();var G=$("#"+M.attr("id")).height();var F=$.resetModToolbarLeft($("#"+M.attr("id")).position().left);var U=$("#"+M.attr("id")).position().top;var J=T%360;var E=M.data("IEWidth");var N=M.data("IEHeight");if(M.data("sinx")==undefined){var L=Math.PI*J/180;var V=Math.cos(L);var O=Math.sin(L);M.data("sinx",O);M.data("cosx",V)}else{var V=M.data("cosx");var O=M.data("sinx")}if(J>0&&J<=90){var B=(C+F)-D*O;var X=U+(G-N*V)}else{if(J>90&&J<=180){var B=C+F-(D*O-K*V)-(-1*V*E);var X=G+U+D*V}else{if(J>180&&J<=270){var B=F+K*V;var X=U-N*V+D*V+K*O}else{if(J>270&&J<360){var B=F+E*V;var X=U+K*O}}}}P.css({filter:"progid:DXImageTransform.Microsoft.Matrix(M11="+V+",M12="+(-O)+",M21="+O+",M22="+V+",SizingMethod='auto expand')","left":B+"px","top":X+"px"})}else{var Y=M.data("prop_size");var C=0;if(Y){C=Y[0]}else{C=M.width()}if(!T){T=0}var Z=M.data("prop_leftpos");var R=parseInt(M.css("left"));var S=$.resetModToolbarLeft(parseInt(R));if(M.attr("fatherid")&&M.attr("fatherid")!=""&&$("#"+M.attr("fatherid")).is(".cstlayer")){S=R}var W=parseInt(M.css("top"));if(Z){R=Z[0];W=Z[1]}var G=35;var I=$.math.sin(T)*G+S+canv.offset().left-(window.MobileOffsetLeft||0)+$("#"+$.getElementFatherid(M)).ab_pos_cnter("left");var H=parseInt(W)-$.math.cos(T)*G+$("#"+$.getElementFatherid(M)).ab_pos_cnter("top");$.divrotate(P,T,[I,H],Q)}}function modPosRotate(K,R,B){if($(".posblk").length==0){return}K=$(K);var S=K.data("modpossize");if(!S){S=[$(".posblk").width(),$(".posblk").height()];K.data("modpossize",S)}if(!R){R=0}var W=K.data("prop_leftpos");var U=parseInt(K.css("left"));var Q=parseInt(K.css("top"));if(W){U=W[0];Q=W[1]}K.data("deg",R);$(".posblk").find(".posblk-position").html(Math.round(U)+","+Math.round(Q)).andSelf().find(".posblk-deg").html(K.data("deg")%360);if($.browser.msie&&$.browser.version<9){var X=S[0];var L=S[1];var D=$("#"+K.attr("id")).width();var F=$("#"+K.attr("id")).height();var O=$("#"+K.attr("id")).position().left;var T=$("#"+K.attr("id")).position().top;var I=R%360;var E=K.data("IEWidth");var M=K.data("IEHeight");if(K.data("sinx")==undefined){var J=Math.PI*I/180;var A=Math.cos(J);var N=Math.sin(J);K.data("sinx",N);K.data("cosx",A)}else{var A=K.data("cosx");var N=K.data("sinx")}if(I>=0&&I<=90){var P=O+M*N;var C=T-L*A}else{if(I>90&&I<=180){var P=O+D+X*A;var C=T-M*A}else{if(I>180&&I<=270){var P=O-E*A+X*A+L*N;var C=T+F+X*N}else{if(I>270&&I<360){var P=O+L*N;var C=T-E*N-L*A+X*N}}}}$(".posblk").css({filter:"progid:DXImageTransform.Microsoft.Matrix(M11="+A+",M12="+(-N)+",M21="+N+",M22="+A+",SizingMethod='auto expand')","left":P+"px","top":C+"px"})}else{var V=K.data("prop_size");var D=0;if(V){D=V[0]+10}else{D=K.width()+10}var H=$.math.cos(R)*D+parseInt(U)+canv.offset().left-(window.MobileOffsetLeft||0)+$("#"+$.getElementFatherid(K)).ab_pos_cnter("left");var G=$.math.sin(R)*D+parseInt(Q)+$("#"+$.getElementFatherid(K)).ab_pos_cnter("top");$.divrotate($(".posblk"),R,[H,G],S)}}function getOldProxyFromSize(J,C,D,F){var I=C%360;var A=$("#"+J.attr("id")).position().left;var L=$("#"+J.attr("id")).position().top;var K=$("#"+J.attr("id"));if(J.data("sinx")==undefined){var E=Math.PI*I/180;var H=Math.cos(E);var G=Math.sin(E);J.data("sinx",G);J.data("cosx",H)}else{var G=J.data("sinx");var H=J.data("cosx")}if(I==0){var B=A;var M=L}else{if(I>=0&&I<=90){var B=(F*G+D*H-D)/2+A;var M=(D*G+F*H-F)/2+L}else{if(I>90&&I<=180){var B=(F*G-D*H-D)/2+A;var M=(D*G-F*H-F)/2+L}else{if(I>180&&I<=270){var B=(-1*F*G-D*H-D)/2+A;var M=(-1*D*G-F*H-F)/2+L}else{if(I>270&&I<360){var B=(-1*F*G+D*H-D)/2+A;var M=(-1*D*G+F*H-F)/2+L}}}}}return[B,M]}function getLeftPointProxy(B,A){var I=A%360;var C=B.position().left,D=B.position().top;var J=Math.PI*I/180;var G=Math.sin(J),H=Math.cos(J);var F=B.data("IEWidth"),E=B.data("IEHeight");if(I>=0&&I<90){return[Math.round(C+E*G),Math.round(D)]}else{if(I>=90&&I<180){return[Math.round(C+E*G-F*H),Math.round(D-E*H)]}else{if(I>=180&&I<270){return[Math.round(C-F*H),Math.round(D-E*H-F*G)]}else{if(I>=270&&I<360){return[Math.round(C),Math.round(D-F*G)]}}}}};; /*! LAB.js (LABjs :: Loading And Blocking JavaScript) v2.0.3 (c) Kyle Simpson MIT License */ (function(o){var K=o.$LAB,y="UseLocalXHR",z="AlwaysPreserveOrder",u="AllowDuplicates",A="CacheBust",B="BasePath",C=/^[^?#]*\//.exec(location.href)[0],D=/^\w+\:\/\/\/?[^\/]+/.exec(C)[0],i=document.head||document.getElementsByTagName("head"),L=(o.opera&&Object.prototype.toString.call(o.opera)=="[object Opera]")||("MozAppearance"in document.documentElement.style),q=document.createElement("script"),E=typeof q.preload=="boolean",r=E||(q.readyState&&q.readyState=="uninitialized"),F=!r&&q.async===true,M=!r&&!F&&!L;function G(a){return Object.prototype.toString.call(a)=="[object Function]"}function H(a){return Object.prototype.toString.call(a)=="[object Array]"}function N(a,c){var b=/^\w+\:\/\//;if(/^\/\/\/?/.test(a)){a=location.protocol+a}else if(!b.test(a)&&a.charAt(0)!="/"){a=(c||"")+a}return b.test(a)?a:((a.charAt(0)=="/"?D:C)+a)}function s(a,c){for(var b in a){if(a.hasOwnProperty(b)){c[b]=a[b]}}return c}function O(a){var c=false;for(var b=0;b0){for(var a=0;a=0;){d=n.shift();a=a[d.type].apply(null,d.args)}return a},noConflict:function(){o.$LAB=K;return m},sandbox:function(){return J()}};return m}o.$LAB=J();(function(a,c,b){if(document.readyState==null&&document[a]){document.readyState="loading";document[a](c,b=function(){document.removeEventListener(c,b,false);document.readyState="complete"},false)}})("addEventListener","DOMContentLoaded")})(this);; var mclick = 'click',mtouchstart = 'mousedown',mtouchend = 'mouseup',mtouchmove = 'mousemove'; if (window.ontouchstart !== undefined) { mclick = 'click';mtouchstart = 'touchstart';mtouchend = 'touchend';mtouchmove = 'touchmove'; } /**Global Function**/ function getSessionExpiredUrl() { $(window).unbind('beforeunload'); alert(translate('page.sessionTimeout')); window.close(); return null; } function wp_heightAdapt(dom,oldHeight){} function is_website_mobile(){ var type=getWebSiteType(); return type=='mobile'; } function layer_img_lzld(layerid){ var imgcontainer=$('#scroll_container'); var ismobile=is_website_mobile(); if(!ismobile){ var chromebug=$('#scroll_container').data('chrome_bug'); if(chromebug){ imgcontainer=window; } }else imgcontainer=window; $('#'+layerid+' img.img_lazy_load').lazyload({ threshold : 200, failure_limit : $('#'+layerid+' img.img_lazy_load').length, container : imgcontainer, placeholder:relativeToAbsoluteURL('/ppr/ppr/template/default/images/blank.gif'), load:function(){ var self=$(this); var id=self.closest('.cstlayer').prop('id'); if(window['set_thumb_'+id]) window['set_thumb_'+id](this); } }); } function initScrollcontainerHeight(){ var container=$('#scroll_container'); var cvhgt = window.innerHeight || window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight; container.height(cvhgt); $('#scroll_container_bg').css('height',cvhgt); } function noRightClick(){ //禁用鼠标右键 CTRL+C 复制 CTRL+V 粘贴 CTRL+S 保存 $(function(){ document.body.oncontextmenu=function(){return false;} $(document).keydown(function(event) { if ((event.ctrlKey&&event.which==67) || (event.ctrlKey&&event.which==86)) { return false; } }) $(document).keydown(function(event) { if ((event.ctrlKey&&event.which==67) || (event.ctrlKey&&event.which==86) || (event.ctrlKey&&event.which==83)) { return false; } }) }) } function doc_end_exec(){ $(function(){ $(document).triggerHandler('lastexec'); }) $('#scroll_container').css("visibility", 'visible'); $('.mloading-mask').remove(); $(window).load(function(){ var heightadaptel=$("#canvas").find(".cstlayer[type='article_detail'],.cstlayer[type='product_detail'],.cstlayer[type='wzl'],.cstlayer[type='fxdp'],.cstlayer[type='tb_product_detail'],.cstlayer[type='tb_product_list'],.cstlayer[type='product_list'],.cstlayer[type='wkj'],.cstlayer[type='crowdfunding'],.cstlayer[type='btag'],.cstlayer[type='greetingcard'],.cstlayer[type='weiredpack'],.cstlayer[type='mseckill_detail'],.cstlayer[type='mgroupon_detail'],.cstlayer[type='mgroupons_detail'],.cstlayer[type='groupon_detail'],.cstlayer[type='jfpro_detail'],.cstlayer[type='mjfpro_detail']"); if(heightadaptel.length){ heightadaptel.each(function(){ if($(this).data('not_need_heightadapt')) return; wp_heightAdapt($(this)); }) window.scroll_container_adjust(); } }); var imgcontainer=$('#scroll_container'); var ismobile=is_website_mobile(); if(!ismobile){ var chromebug=$('#scroll_container').data('chrome_bug'); if(chromebug){ imgcontainer=window; } }else imgcontainer=window; $('img.img_lazy_load').lazyload({ threshold : 0, failure_limit : $('img.img_lazy_load').length, container : imgcontainer, placeholder:relativeToAbsoluteURL('/ppr/ppr/template/default/images/blank.gif'), load:function(){ var self=$(this); var id=self.closest('.cstlayer').prop('id'); if(window['set_thumb_'+id]) window['set_thumb_'+id](this); } }); $(window).load(function(){ $('.cstlayer').showEffects(); }) } function wpfullcolumn_float(){ var wp_ibody = $('#scroll_container'),wp_icontent = $('#canvas'),wp_icontent_foot = $('#site_footer #footer_content'); $('.full_column,.cstlayer').filter('[infixed=1]').each(function(){ var fc_lid = '#'+$(this).attr('id'); var $fc_lid = $(this); var wp_layer_abs = $('#canvas '+fc_lid),wp_layer_abs_footer = $('#site_footer #footer_content '+fc_lid),wp_layer_fix= $('#scroll_container '+fc_lid); var currpoor = ($('.full_width').width() - $('.full_content').width())/2; var isinfixed = $fc_lid.attr('infixed'); if(isinfixed==1) { var nPos = $('#scroll_container').scrollTop() ; var container=$('#scroll_container'); var is_mobile_preview=false; if(is_website_mobile()){ nPos = $(window).scrollTop() ; } if($('.wp-mobile-device-premask').length){ is_mobile_preview=true; } //oPos get第一次正确的值,以后不再获得 var oPos_tmp = $(document).data("fixed_"+$(this).attr('id')+"_oPos"); var inbuttom=$(document).data("fixed_"+$(this).attr('id')+"_inbuttom"); if(!oPos_tmp){ oPos_tmp = $fc_lid.ab_pos_cnter('top'); $(document).data("fixed_"+$(this).attr('id')+"_oPos",oPos_tmp); } if(inbuttom==null){ inbuttom = $fc_lid.attr('inbuttom'); $(document).data("fixed_"+$(this).attr('id')+"_inbuttom",inbuttom); } var oPos = $(document).data("fixed_"+$(this).attr('id')+"_oPos"); if(oPos==0 && $fc_lid.parent().is('#canvas')) return; if(oPos==0){ var oldsty = $fc_lid.attr('oldstyle')||''; if(oldsty.match(/top:\d+px/)){ var oldtop = oldsty.match(/top:\d+px/); oldtop = oldtop[0].match(/\d+/); oPos = oldtop[0]; } } if(inbuttom>0){ //存在页脚中 if(nPos > oPos){ var newleft = $('.full_column').ab_pos('left') + currpoor ; if(wp_layer_abs_footer.is('.cstlayer')){ newleft =wp_layer_abs_footer.offset().left+$(container).scrollLeft(); if(is_mobile_preview){ newleft =wp_layer_abs_footer .ab_pos_cnter('left'); } } if(wp_layer_abs_footer.length>0){ var oldstyle = wp_layer_abs_footer.attr('style'); wp_layer_fix = wp_layer_abs_footer.clone(true).appendTo(container) .attr('oldstyle',oldstyle).attr('inbuttom','1') .addClass('full_column-fixed'); if(wp_layer_abs_footer.attr('fatherid')) wp_layer_fix.attr('fatherid',wp_layer_abs.attr('fatherid')); wp_layer_fix.show();wp_layer_fix.css({'position':'fixed','top':'','left':newleft,'z-index':'999'}); if(is_mobile_preview){ wp_layer_fix.css({top:nPos+'px'}); } wp_layer_abs_footer.remove(); }else{ if(is_mobile_preview){ wp_layer_fix.css({top:nPos+'px'}); } } }else{ oldstyle = wp_layer_fix.attr('oldstyle'); if(wp_layer_abs_footer.length==0){ wp_icontent_foot=$('#site_footer #footer_content'); if(wp_layer_fix.attr('fatherid')){ wp_icontent_foot=$('#'+wp_layer_fix.attr('fatherid')); } wp_layer_abs_footer = wp_layer_fix.clone(true).appendTo(wp_icontent_foot) .attr('style',oldstyle).attr('inbuttom','1').removeClass('full_column-fixed'); if(wp_layer_fix.attr('fatherid')){ wp_layer_abs_footer.attr('fatherid',wp_layer_fix.attr('fatherid')); } wp_layer_abs_footer.show();wp_layer_fix.remove(); } } }else{ var infixed_html = $('#canvas').data('infixed_content'); if(!infixed_html){ infixed_html =wp_layer_abs.html(); $('#canvas').data('infixed_content',infixed_html); } if(nPos > oPos){ var newleft = Math.abs(parseFloat($('.full_column').find('.full_width').css('left'))); if(wp_layer_abs.is('.cstlayer')){ newleft =wp_layer_abs.offset().left+$(container).scrollLeft(); if(is_mobile_preview){ newleft =wp_layer_abs.ab_pos_cnter('left'); } } var fatherid=$.getElementFatherid(wp_layer_abs); $(document).data("fixed_"+wp_layer_abs.attr('id')+"_father",$('#'+fatherid)); //clone(true) has true 可以存储data if(wp_layer_abs.length>0){ ////////////////////// var oldstyle = wp_layer_abs.attr('style'); var func=function(){ //未加载 完拖拽滚动条为空异常处理 var success=true; var newleft = Math.abs(parseFloat($(fc_lid).find('.full_width').css('left'))); if(!(newleft)){success=false;} if(success){ $(fc_lid).css('left',newleft); }else { setTimeout(func,100); } } func(); var layerdiv=$("
    ").attr({ 'id':wp_layer_abs.attr('id'),'class':wp_layer_abs.attr('class'),'infixed':1,'style':wp_layer_abs.attr('style')}); if(wp_layer_abs.attr('fatherid')) layerdiv.attr('fatherid',wp_layer_abs.attr('fatherid')); container.append(layerdiv); wp_layer_abs.remove(); var wp_layer_fix =$(fc_lid).html(infixed_html) .attr('oldstyle',oldstyle) .addClass('full_column-fixed'); wp_layer_fix.show();wp_layer_fix.css({'position':'fixed','top':'','left':newleft,'z-index':'999'}); if(is_mobile_preview){ wp_layer_fix.css({top:nPos+'px'}); } ////fix时 full_width宽为空异常处理 var funco=function(){ var full_width_val = Math.abs(parseFloat($(fc_lid).find('.full_width').css('left'))); if(!full_width_val){ $(fc_lid).children('.full_width').css({left:0-$('#canvas').offset().left-$.parseInteger($('#canvas').css("borderLeftWidth")),width:$('#scroll_container_bg').width()}); if(!(Math.abs(parseFloat($(fc_lid).find('.full_width').css('left'))))){ setTimeout(funco,100); } } } funco(); ////////// var imgcontainer=$('#scroll_container'); var ismobile=is_website_mobile(); if(!ismobile){ var chromebug=$('#scroll_container').data('chrome_bug'); if(chromebug){ imgcontainer=window; } }else imgcontainer=window; $('.full_content img.img_lazy_load').lazyload({ threshold : 0, failure_limit : $('img.img_lazy_load').length, container : imgcontainer, placeholder:relativeToAbsoluteURL('/ppr/ppr/template/default/images/blank.gif'), load:function(){ var self=$(this); var id=self.closest('.cstlayer').prop('id'); if(window['set_thumb_'+id]) window['set_thumb_'+id](this); } }); }else{ if(is_mobile_preview){ wp_layer_fix.css({top:nPos+'px'}); } } }else{ if( wp_layer_fix.data('always_fix')){ if(is_mobile_preview){ wp_layer_fix.css({top:nPos+'px'}); } return; } oldstyle = wp_layer_fix.attr('oldstyle'); if(!wp_layer_abs.length>0){ ////////////////////////////// var layerdiv=$("
    ").attr({ 'id':wp_layer_fix.attr('id'),'class':wp_layer_fix.attr('class'),'infixed':1,'style':wp_layer_fix.attr('oldstyle')}); if(wp_layer_fix.attr('fatherid')) layerdiv.attr('fatherid',wp_layer_fix.attr('fatherid')); wp_icontent = $(document).data("fixed_"+wp_layer_fix.attr('id')+"_father"); if(!wp_icontent.length) wp_icontent=$('#canvas'); wp_icontent.append(layerdiv); wp_layer_fix.remove(); wp_layer_abs =$(fc_lid).html(infixed_html) .attr('oldstyle',oldstyle) .removeClass('full_column-fixed'); wp_layer_abs.show(); //为空异常处理 var funco=function(){ var full_width_val = Math.abs(parseFloat($(fc_lid).find('.full_width').css('left'))); if(!(full_width_val)){ $(fc_lid).children('.full_width').css({left:0-$('#canvas').offset().left-$.parseInteger($('#canvas').css("borderLeftWidth")),width:$('#scroll_container_bg').width()}); if(!(Math.abs(parseFloat($(fc_lid).find('.full_width').css('left'))))){ setTimeout(funco,100); } } } funco(); ////////////////////////////// var imgcontainer=$('#scroll_container'); var ismobile=is_website_mobile(); if(!ismobile){ var chromebug=$('#scroll_container').data('chrome_bug'); if(chromebug){ imgcontainer=window; } }else imgcontainer=window; $('.full_content img.img_lazy_load').lazyload({ threshold : 0, failure_limit : $('img.img_lazy_load').length, container : imgcontainer, placeholder:relativeToAbsoluteURL('/ppr/ppr/template/default/images/blank.gif'), load:function(){ var self=$(this); var id=self.closest('.cstlayer').prop('id'); if(window['set_thumb_'+id]) window['set_thumb_'+id](this); } }); } } } } }); } function getTop(){//for ie6 css hack return document.documentElement.scrollTop; } function init_fullcolumn_bottomfixed_code(){ var bottomel=$('.full_column,.cstlayer').filter('.full_column-bottomfixed'); bottomel.each(function(){ var self=$(this); var container=$('#scroll_container'); var newleft=$('#canvas').offset().left; self.css({'position':'fixed','top':'',bottom:'0','left':newleft+'px','z-index':'999',visibility:'visible'}); }) $(function(){ var is_mobile_preview=false; if($('.wp-mobile-device-placeholder').length){ is_mobile_preview=true; } if(is_mobile_preview){ setInterval(function(){ var oritop=$('#scroll_container').scrollTop(); bottomel.css('bottom',(0-oritop)+'px'); },60) } }) } function init_fullcolumn_fixed_code(){ $(function(){ setTimeout(function(){ $('.full_column,.cstlayer').filter('[infixed=1]').each(function(){ var self=$(this); var container=$('#scroll_container'); var is_mobile_preview=false; if($('.wp-mobile-device-premask').length){ is_mobile_preview=true; } if(self.parent().is('#canvas')&&parseInt(self.css('top'))==0){ var currpoor = ($('.full_width').width() - $('.full_content').width())/2; var newleft = self.ab_pos('left') + currpoor ; if(self.is('.cstlayer')){ newleft =self.offset().left+$('#scroll_container').scrollLeft(); if(is_mobile_preview){ newleft =self.ab_pos_cnter('left'); } } var wp_layer_abs=self; var layerid=wp_layer_abs.attr('id'); var oldstyle = wp_layer_abs.attr('style'); var layerhtml=wp_layer_abs.html(); var layerdiv=$("
    ").attr({ id:wp_layer_abs.attr('id'), 'class':wp_layer_abs.attr('class'), infixed:1, style:wp_layer_abs.attr('style'), }); wp_layer_abs.remove(); container.append(layerdiv); var wp_layer_fix =$('#'+layerid).html(layerhtml) .attr('oldstyle',oldstyle) .addClass('full_column-fixed'); wp_layer_fix.data('always_fix',true); wp_layer_fix.show();wp_layer_fix.css({'position':'fixed','top':'','left':newleft,'z-index':'999'}) if($.browser.msie && ($.browser.version < 9)){ wp_layer_fix.css({'top':'0px'}); wp_layer_fix.find('.full_width').css({'top':'0px'}); } var ismobile=is_website_mobile(); var imgcontainer=window; if(!ismobile) imgcontainer=$('#scroll_container').add(window); wp_layer_fix.find('img.img_lazy_load').lazyload({ threshold : 0, failure_limit : wp_layer_fix.find('img.img_lazy_load').length, container : imgcontainer, placeholder:relativeToAbsoluteURL('/ppr/ppr/template/default/images/blank.gif'), load:function(){ var self=$(this); var id=self.closest('.cstlayer').prop('id'); if(window['set_thumb_'+id]) window['set_thumb_'+id](this); } }); // 固定通栏里显示动画 wp_layer_fix.find('.cstlayer:not(.now_effecting)').showEffects(); //explain:修复bug(2282多语言 模块放置固定的通栏后异常),author:fpf,date:2015/03/30,action:add; var $multilingual = $(document).find('.wp-multilingual_content'); if($multilingual.get(0) != 'undefined'){ var $multilingual_content = $multilingual.find('.wp-content > .overz'); if(parseInt($multilingual_content.length) > 1){ $multilingual.find('.wp-content > .overz:last').remove(); } } wp_layer_fix.find('.cstlayer[type=twitter]').each(function(){ var code=$(this).data('wpcode'); if(code){ $(this).find('.wp-twitter_content').html(code); } }) } }); // 修复“通栏设置‘固定显示’后导致‘鼠标滚轮’事件异常(bug#4230)” $(document).bind("mousewheel DomMouseScroll MozMousePixelScroll", function(e){ e = e || window.event; var $target = $(e.target).closest('.full_column[infixed="1"],.cstlayer[infixed="1"]'); if ($target.length > 0) { var wheeldelta=e.wheelDelta; var detail=e.detail||e.originalEvent.detail; if(e.type=='mousewheel'){ var wheeldelta=e.deltaY || e.originalEvent.deltaY; wheeldelta=(wheeldelta>0)?1:-1; }else{ var wheeldelta=e.wheelDelta || e.originalEvent.wheelDelta; if(!wheeldelta) wheeldelta=detail; } var $win = $(window),$stainer = $('#scroll_container'), $scroll = $stainer.height() <= $win.height() ? $stainer : $win, movey = wheeldelta * -(Math.abs(detail) > 3 ? 1 : 40); $scroll.scrollTop($scroll.scrollTop() - movey); $win = $stainer = $scroll = movey = null; } $target = null; }); //explain:修复flash模块在360安全浏 览器极速模式下鼠标:hover后无法触发滚动效果,该事件在采用Webkit内核的 浏览器下都会触发,author:fpf,date:2015-01-15,action:add; $('div.wp-flash_content').each(function(){ $(this).unbind('mousewheel').bind('mousewheel',function(event){ var scrolltop=$('#scroll_container').scrollTop(); if(event.wheelDelta>0){ $('#scroll_container').scrollTop(scrolltop-50); } else{ $('#scroll_container').scrollTop(scrolltop+50); } }); }); },300); }) if(is_website_mobile()){ $(window).scroll(function(){ wpfullcolumn_float(); }); }else{ $('#scroll_container').scroll(function(){ wpfullcolumn_float(); }); } } function initCanvasHeight(){ var maxheight=0; var helperfunc=function(dom){ var degree=dom.data('deg')||dom.attr('deg'); var pos=[parseInt(dom.css('left')),parseInt(dom.css('top'))] var w=dom.width(); var h=dom.height(); if(dom.hasClass('cstlayer')){ var buttompos=$.divrotate.getDegreeModMaxPointOrigin(dom,degree,pos,[w,h],'buttom'); }else{ var buttompos=dom.ab_pos_cnter('top')+parseInt(dom.css('height')); } return buttompos; } var filterfunc=function(){ return $(this).is(":not(div[deleted='deleted'])") && $(this).attr('childdel') != 'del'; } $('#canvas .cstlayer,#canvas .full_column').filter(filterfunc).each(function(){ var canvheight=helperfunc($(this)); if(canvheight>maxheight) maxheight=canvheight; }) $("#canvas").data('layermaxheight',maxheight); //#5460 setTimeout(function(){ $('#site_footer').find('.cstlayer').each(function(){ var sitetop = parseInt($('#site_footer').css('top')); var thistop = parseInt($(this).css('top')) if(thistop<0&&sitetop<-thistop) {$(this).css('top',-sitetop);} }) },100) } function fullcolumn_bgvideo_init_func(videoParams){ var domid=videoParams.id,dom=$(domid),$bauto=videoParams.bgauto,$ctauto=videoParams.ctauto,$buse=videoParams.bVideouse, $cuse=videoParams.cVideouse,videoH = videoParams.bgvHeight,videoW = videoParams.bgvWidth; var $fullwidth=$('#'+domid+' .full_width'),fheight=$fullwidth.height(),$contentwidth=$('#'+domid+' .full_content'); var dheight=dom.height(); if($buse=='usevideo'){ var $fullDiv=dom.find('.fullwidth_vdiv'), $fullBg=dom.find('.fullwidth_bg'), vwidht=$('.fullwidth_vdiv').width(); var videoRatio = videoH / videoW; var theight=$.parseInteger(vwidht*videoRatio); var newWidth=$.parseInteger(fheight/videoRatio); if (theight!='0') { var ntheight=theight; }else{ var ntheight=dheight; } $fullDiv.height(dheight); $fullDiv.find('.fullwidth_video').height(dheight); $fullDiv.find('.fullwidth_bg').height(dheight); } if($bauto=='noautoplay' && $buse=='usevideo'){ var $bvideo=$fullwidth.find('.fullwidth_video'); $('#'+domid).click(function(){ $bvideo[0].play(); }); } if($ctauto=='noautoplay' && $cuse=='usevideo'){ var $cvideo=$contentwidth.find('.content_video'); $('#'+domid).click(function(){ $cvideo[0].play(); }); } } $.fn.layer_ready=function(func){ var is_exec=false; var execfunc=function(){ if(is_exec) return; try{ func(); }catch(e){} is_exec=true; } $(this).bind('layer_ready',function(){ execfunc(); }) $(function(){ execfunc(); }) }; (function(){ var is_init=false; var init_pageinfo={} var is_layer_add={}; var PageHistory={ init:function(layerid,pageid){ if(history && history.pushState){ init_pageinfo[layerid]=pageid; if(is_init) return; window.onpopstate=function(e){ var state=e.state; if(state && state.action=='page'){ var layerid=state.layerid; $('#'+layerid).trigger('to_page',state.page); } } is_init=true; } }, add_page:function(layerid,pageid){ if(history && history.pushState){ var loc=window.location.href; var layerend=layerid.replace(/.+(\w{5})$/,'$1'); var paramregexp=new RegExp(layerend+'_p=[^&]+'); var newloc=''; if(loc.match(paramregexp)){ newloc=loc.replace(paramregexp,layerend+'_p='+pageid); }else{ if(loc.indexOf('?')>0){ newloc=loc+'&'+layerend+"_p="+pageid }else{ newloc=loc+'?'+layerend+"_p="+pageid } } newloc=newloc.replace(/.+?\?/,'?'); if(!is_layer_add[layerid] && pageid != init_pageinfo[layerid]){ history.replaceState({action:'page',layerid:layerid,page:init_pageinfo[layerid]}, document.title, loc); is_layer_add[layerid]=true; } history.pushState({action:'page',layerid:layerid,page:pageid}, document.title, newloc); } } }; window.PageHistory=PageHistory; })(); /**document ready js**/ $(document).bind('lastexec',function(){ // Mobile device 2014/01/06 if (window.MobileModel) { var $scontainer = $('#scroll_container'),canvaswidth = $('#canvas').width(); $scontainer.unbind(".mbprevredhat.tmpredhat"); if ($('#wp-mobile-device-header').length > 0) { // 手机模型定位 var screenWidth = window.innerWidth||self.innerWidth||document.documentElement.clientWidth||document.body.clientWidth, deviceOtherHeight = $('#wp-mobile-device-header').closest('.wp-new-manage-toolbar-position').height() + $('#wp-mobile-device-footer').height(); var onlyOnce_resize_width = false; $(window).bind("resize.mbeditor", function(e, status){ var screenHeight = window.innerHeight||self.innerHeight||document.documentElement.clientHeight||document.body.clientHeight; $('#wp-mobile-device-sides').height(screenHeight - deviceOtherHeight).children('.mwrapper').height(screenHeight - deviceOtherHeight - 2); // 自定义滚动条样式 var sidewidth = 14;/* 手机模型边缘宽度 */ var mbtimer = setTimeout(function(){ var newleft = ($._parseFloat($('#wp-mobile-device-header').css("left"))||0) + sidewidth; $scontainer.css({"left": (newleft - 10)+'px',"width": function(){/*-10是为了修复"缩放句柄被遮"问题*/ if( onlyOnce_resize_width == false ){ onlyOnce_resize_width = true; return ($(this).width() + (status?(sidewidth + 15 + 10):0))+'px'; }else{ return ; } },"margin": '0',"padding-left": '11px',"top": '-6px',"overflow-y": 'scroll'}); $('#site_footer').css("left", '11px');/*11px是为了修复"缩放句柄被遮"问题*/ if (status == undefined) $scontainer.mscroll("destroy"); $scontainer.mscroll({difleft: 10,maskbg: '#ccc'});clearTimeout(mbtimer); }, 100); }).triggerHandler("resize.mbeditor", ['init']); $('#wp-mobile-device-header,#wp-mobile-device-sides,#wp-mobile-device-footer').css({"left": function(){ return ((screenWidth - $(this).width()) / 2)+'px'; }, "visibility": 'visible'}); // 保存布局 $('#wp-mobile-device-footer > span').click(function(){ wp_floatpanel(parseToURL('wp_widgets','save_page'),{ title: translate('page.saveLayout'),width: 418,overlay: true,isCenter: true, contentClass: 'wp-site-set_panel_c',id: 'wp-page_save',zIndex: 9999 }); }); } else {/* 预览模式 */ $scontainer.css("visibility", 'visible'); $(window).load(function(){ var $win = $(this),frmwidth = $win.width(),frmheight = window.getdeviceheight||565; $scontainer.height(frmheight); var mprevtimer = setTimeout(function(){ $scontainer.mscroll({"maskcname": 'wp-mobile-device-premask',"difleft": -6, "height": frmheight,"barcname": 'wp-mobile-prescrollbar',"maskleft": frmwidth,"barleft": frmwidth}); $win.triggerHandler("pageloaded");clearTimeout(mprevtimer); // 模拟“触屏”模式 var maxtop = frmheight - $('.wp-mobile-prescrollbar > span.pane').height(); $scontainer.bind("mousedown.mbprevredhat", function(e){ e.preventDefault(); var $prebar = $('.wp-mobile-prescrollbar'),pagey = e.pageY; $scontainer.bind("mousemove.tmpredhat", function(e){ e.preventDefault(); var scrltop = $scontainer.scrollTop(),movey = e.pageY - pagey; if (scrltop < 0) scrltop = 0; $scontainer.scrollTop(scrltop - movey); }).bind("mouseup.tmpredhat", function(e){ e.preventDefault();$scontainer.unbind(".tmpredhat"); $(parent.document).unbind(".rmredhat"); }); $(parent.document).bind("mouseup.rmredhat",function(){$scontainer.unbind(".tmpredhat")}); }); }, 150); }); } $('#site_footer,#footer_content').width(canvaswidth); } function resizeCanvasHeight(){ window.canv = $("#canvas"); var container=$('#scroll_container'); // 画布高度 var cvhgt = window.getdeviceheight || window.innerHeight || self.innerHeight || document.documentElement.clientHeight || document.body.clientHeight;//$(window).height(); var ua = /micromessenger/i.test(navigator.userAgent.toLowerCase()); if (window.isHandheld&&!ua) cvhgt = Math.min(cvhgt, MobileUtils.getScreenHeight()); cvhgt -= container.offset().top,mfooterheight = $('#wp-mobile-device-footer').height()||0; container.height(cvhgt - mfooterheight); if($('#site_footer').length>0){ var canvheight=Math.max($("#canvas").data('layermaxheight'),cvhgt-$('#site_footer').height()-mfooterheight); if($('#site_footer:not(.only_copyright)').length>0){ canvheight=Math.max(canvheight,$("#canvas").height()); } }else{ var canvheight=Math.max($("#canvas").data('layermaxheight'),cvhgt); canvheight=Math.max($("#canvas").data('layermaxheight'),cvhgt-mfooterheight);//没有页 脚时去设备底部高度,防没有 任何模块时有滚动条bug/4574 } // 重置bSlider模块高度 2013/03/25 $('.cstlayer[type="bslider"]:not(.isplate)').each(function(i, dom){ $(dom).triggerHandler('resetbsliderheight', [canvheight]); }); if(!canv) var canv = $("#canvas"); canv.css('height',canvheight+'px'); var footermargintop=parseInt($('#site_footer').css('margin-top'))||0; var bottomfixedheight=0; if($('.full_column-bottomfixed').length){ bottomfixedheight=$('.full_column-bottomfixed').height(); } $('#scroll_container_bg').css('height',(canvheight+$('#site_footer').height()+footermargintop+bottomfixedheight)+'px'); if($(window).width()-canv.width()<0) $('#scroll_container_bg').width(canv.width()); else $('#scroll_container_bg').css('width','100%'); // 更新标尺位置Start 2012/3/2 var canvleft = canv.offset().left; if (typeof $.fn.ruler_locate != 'undefined') { $.fn.ruler_locate({ x : {left:canvleft+'px'}, y : {height:canvheight+'px', left:(canvleft>17?canvleft-17:0)+'px'} }); $('.line_y').height(canvheight);// 辅助线高度 } // 在手机设备上访问 2014/02/08 if (window.isHandheld) { var $container = $('#scroll_container'),$footer = $('#site_footer'), maxheight = $('#scroll_container_bg').height() + $('>.mblank_placeholder',$container).height(); $container.css({"height": maxheight+'px',"overflow-x": 'hidden',"overflow-y": 'auto'}); if($footer.length) { if (/micromessenger/i.test(navigator.userAgent.toLowerCase())) { $footer.css({'position':'absolute','top':$('#canvas').height()}); } $footer.find('#footer_content').andSelf().width($('#canvas').width()); } /*adpHandheld();*/$('.mloading-mask').remove(); $container.css("visibility", 'visible');$(window).triggerHandler("pageloaded"); // 修复ipad中iframe touchmove冲突问题(bug#97) 2014/09/16 if (/ipad/.test(navigator.userAgent.toLowerCase())) { $(document.body).parent().andSelf().css({"overflow-x": 'hidden',"overflow-y": 'auto'}); container.css({"height": 'auto',"overflow-y": 'auto'}); } } } function correctFooterPos(){ var canv = $("#canvas"); var canvheight=canv.height(); var canvwidth=canv.width(); $('#site_footer').children('.full_content').andSelf().css('width',$('#canvas').width()+'px'); var containerOffsetLeft = $('#scroll_container').offset().left; $('#site_footer').css({left:canv.offset().left-containerOffsetLeft+$('#scroll_container').scrollLeft()+$.parseInteger($('#canvas').css("borderLeftWidth")),top:canvheight}); $('#site_footer >.full_width').css({left:0-canv.offset().left+containerOffsetLeft-$('#scroll_container').scrollLeft()-$.parseInteger($('#canvas').css("borderLeftWidth")),width:$(window.MobileModel?'#canvas':'#scroll_container_bg').width()}); if($('#wp-mobile-device-header').length) $('#site_footer >.full_width').css("left", '0px'); } window.correctFooterPos=correctFooterPos; window.scroll_container_adjust=function(){ initCanvasHeight(); //resizeCanvasHeight(); //微信下初始化加载cvans高度过大出现滚动条。bug/4574 if (/micromessenger/i.test(navigator.userAgent.toLowerCase())) { setTimeout(function(){ // fixed bug#1107 var fxdpstr = $(window).data("fxdp_scrollpage")||'',_scrtop = $(window).scrollTop(); resizeCanvasHeight(); if(fxdpstr == 'fxdp') $(window).scrollTop(_scrtop); correctFooterPos(); // 修复"微信浏 览器中锚点异常(bug#1059)"问题 var hstr = location.hash||''; if(hstr.length > 0){location.href = location.href;location.hash = hstr.substr(1)} },600) }else { resizeCanvasHeight(); correctFooterPos(); } } window.scroll_container_adjust(); if(!canv) var canv = $("#canvas"); $('.full_column').children('.full_content').andSelf().css('width',$('#canvas').width()+'px'); $('.full_column>.full_width').css({left:0-canv.offset().left+$('#scroll_container').offset().left-$('#scroll_container').scrollLeft()-$.parseInteger($('#canvas').css("borderLeftWidth")),width:$('#scroll_container_bg').width()}); //浏览器 缩放是自动调整高度 var me = "orientation" in window && "onorientationchange" in window ? "orientationchange" : "resize" $(window).bind(me, function(e){ if(e.target==window||e.target==document){ resizeCanvasHeight(); correctFooterPos(); $('.full_column>.full_width').css({left:0-canv.offset().left+$('#scroll_container').offset().left-$('#scroll_container').scrollLeft()-$.parseInteger($('#canvas').css("borderLeftWidth")),width:$('#scroll_container_bg').width()}); if($('.full_column-fixed').length){ var full_column_left = 0-$('.full_column-fixed>.full_width').position().left; $('.full_column-fixed').css("left",full_column_left+"px"); } } }) if (!window.isHandheld) rotateDom($('.cstlayer')); //Preview need resize window if(window.opener){ var winH = screen.availHeight || 768,winW = screen.availWidth || 1024; window.resizeTo(winW, winH); } // 新窗口打开超链接 $.extend({ openNewWin: function(URI){ var win = window.open(URI,'_blank'); win.focus; } }); }) function getImageProcessType(){ return 1; } function wp_pages_global_func(params){ var uname = params.domain, sessid = params.phpsessionid; window['parseToURL'] = function(module,action,anotherparams){ if (params.isedit == '1') { var defaultparams = {"_m": module,"_a": action,"domain": uname,"SessionID": sessid}; } else if (params.islogin == '1') { var defaultparams = {"_m": module,"_a": action,"domain": uname,"_v": 'preview',"SessionID": sessid}; } else { webmodel = {}; var defaultparams = {"_m": module,"_a": action}; } var urlparams=$.extend({}, anotherparams, defaultparams, webmodel); var paramstr=$.param(urlparams); return params.punyurl+"/index.php?"+paramstr; }; window['parseToAdminURL'] = function(module,action,anotherparams){ var defaultparams = {'_m': module,'_a': action,'domain': uname,"SessionID": sessid}; var urlparams = $.extend({}, anotherparams, defaultparams, webmodel); var paramstr = $.param(urlparams); return params['p_rooturl']+"/admin/index.php?"+paramstr; }; window['getSiteCurLang'] = function(){return params['interface_locale']}; window['getPreviewSiteCurLang'] = function(){return params['curr_locale']}; window['getSystemCurrentDomain'] = function(){return uname}; window['relativeToAbsoluteURL'] = function(relativeurl, nostatic){ if (nostatic == '1') return params['p_rooturl']+"/"+relativeurl; else return params['static_rooturl']+"/"+relativeurl; }; window['getWebSiteType'] = function(){return $.trim(params['mscript_name']||'').length > 0 ? 'mobile' : 'pc'}; window['getSystemSession'] = function(){return params.getsession}; if ((params.isedit == '1') && params.converted) { if($.browser.msie && ($.browser.version < 9)) location.href = parseToURL("wp_frontpage","browser"); } if ($.browser.msie && ($.browser.version < 7)) { location.href = parseToURL("wp_frontpage","browser"); } }; /* * jQuery Cookie Plugin v1.4.1 * https://github.com/carhartl/jquery-cookie * * Copyright 2013 Klaus Hartl * Released under the MIT license */ (function(A){if(typeof define==="function"&&define.amd){define(["jquery"],A)}else{if(typeof exports==="object"){A(require("jquery"))}else{A(jQuery)}}}(function(F){var G=/\+/g;function D(I){return B.raw?I:encodeURIComponent(I)}function E(I){return B.raw?I:decodeURIComponent(I)}function H(I){return D(B.json?JSON.stringify(I):String(I))}function C(I){if(I.indexOf('"')===0){I=I.slice(1,-1).replace(/\\"/g,'"').replace(/\\\\/g,"\\")}try{I=decodeURIComponent(I.replace(G," "));return B.json?JSON.parse(I):I}catch(J){}}function A(I,J){var K=B.raw?I:C(I);return F.isFunction(J)?J(K):K}var B=F.cookie=function(R,M,O){if(M!==undefined&&!F.isFunction(M)){O=F.extend({},B.defaults,O);if(typeof O.expires==="number"){var K=O.expires,L=O.expires=new Date();L.setTime(+L+K*86400000)}return(document.cookie=[D(R),"=",H(M),O.expires?"; expires="+O.expires.toUTCString():"",O.path?"; path="+O.path:"",O.domain?"; domain="+O.domain:"",O.secure?"; secure":""].join(""))}var J=R?undefined:{};var I=document.cookie?document.cookie.split("; "):[];for(var N=0,P=I.length;N',closeClass:"simplemodal-close",escClose:!0,overlayClose:!1,fixed:!0,position:null,persist:!1,modal:!0,onOpen:null,onShow:null,onClose:null};H.modal.impl={d:{},init:function(J,I){if(this.d.data){return !1}D=H.browser.msie&&!H.support.boxModel;this.o=H.extend({},H.modal.defaults,I);this.zIndex=this.o.zIndex;this.occb=!1;if("object"===typeof J){if(J=J instanceof H?J:H(J),this.d.placeholder=!1,0").attr("id","simplemodal-placeholder").css({display:"none"})),this.d.placeholder=!0,this.display=J.css("display"),!this.o.persist)){this.d.orig=J.clone(!0)}}else{if("string"===typeof J||"number"===typeof J){J=H("
    ").html(J)}else{return alert("SimpleModal Error: Unsupported data type: "+typeof J),this}}this.create(J);this.open();H.isFunction(this.o.onShow)&&this.o.onShow.apply(this,[this.d]);return this},create:function(I){this.getDimensions();if(this.o.modal&&G){this.d.iframe=H('').css(H.extend(this.o.iframeCss,{display:"none",opacity:0,position:"fixed",height:C[0],width:C[1],zIndex:this.o.zIndex,top:0,left:0})).appendTo(this.o.appendTo)}this.d.overlay=H("
    ").attr("id",this.o.overlayId).addClass("simplemodal-overlay").css(H.extend(this.o.overlayCss,{display:"none",opacity:this.o.opacity/100,height:this.o.modal?A[0]:0,width:this.o.modal?A[1]:0,position:"fixed",left:0,top:0,zIndex:this.o.zIndex+1})).appendTo(this.o.appendTo);this.d.container=H("
    ").attr("id",this.o.containerId).addClass("simplemodal-container").css(H.extend({position:this.o.fixed?"fixed":"absolute"},this.o.containerCss,{display:"none",zIndex:this.o.zIndex+2})).append(this.o.close&&this.o.closeHTML?H(this.o.closeHTML).addClass(this.o.closeClass):"").appendTo(this.o.appendTo);this.d.wrap=H("
    ").attr("tabIndex",-1).addClass("simplemodal-wrap").css({height:"100%",outline:0,width:"100%"}).appendTo(this.d.container);this.d.data=I.attr("id",I.attr("id")||this.o.dataId).addClass("simplemodal-data").css(H.extend(this.o.dataCss,{display:"none"})).appendTo("body");this.setContainerDimensions();this.d.data.appendTo(this.d.wrap);(G||D)&&this.fixIE()},bindEvents:function(){var I=this;H("."+I.o.closeClass).bind("click.simplemodal",function(J){J.preventDefault();I.close()});I.o.modal&&I.o.close&&I.o.overlayClose&&I.d.overlay.bind("click.simplemodal",function(J){J.preventDefault();I.close()});F.bind("keydown.simplemodal",function(J){I.o.modal&&9===J.keyCode?I.watchTab(J):I.o.close&&I.o.escClose&&27===J.keyCode&&(J.preventDefault(),I.close())});B.bind("resize.simplemodal orientationchange.simplemodal",function(){I.getDimensions();I.o.autoResize?I.setContainerDimensions():I.o.autoPosition&&I.setPosition();G||D?I.fixIE():I.o.modal&&(I.d.iframe&&I.d.iframe.css({height:C[0],width:C[1]}),I.d.overlay.css({height:A[0],width:A[1]}))})},unbindEvents:function(){H("."+this.o.closeClass).unbind("click.simplemodal");F.unbind("keydown.simplemodal");B.unbind(".simplemodal");this.d.overlay.unbind("click.simplemodal")},fixIE:function(){var I=this.o.position;H.each([this.d.iframe||null,!this.o.modal?null:this.d.overlay,"fixed"===this.d.container.css("position")?this.d.container:null],function(L,N){if(N){var J=N[0].style;J.position="absolute";if(2>L){J.removeExpression("height"),J.removeExpression("width"),J.setExpression("height",'document.body.scrollHeight > document.body.clientHeight ? document.body.scrollHeight : document.body.clientHeight + "px"'),J.setExpression("width",'document.body.scrollWidth > document.body.clientWidth ? document.body.scrollWidth : document.body.clientWidth + "px"')}else{var M,K;I&&I.constructor===Array?(M=I[0]?"number"===typeof I[0]?I[0].toString():I[0].replace(/px/,""):N.css("top").replace(/px/,""),M=-1===M.indexOf("%")?M+' + (t = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + "px"':parseInt(M.replace(/%/,""))+' * ((document.documentElement.clientHeight || document.body.clientHeight) / 100) + (t = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + "px"',I[1]&&(K="number"===typeof I[1]?I[1].toString():I[1].replace(/px/,""),K=-1===K.indexOf("%")?K+' + (t = document.documentElement.scrollLeft ? document.documentElement.scrollLeft : document.body.scrollLeft) + "px"':parseInt(K.replace(/%/,""))+' * ((document.documentElement.clientWidth || document.body.clientWidth) / 100) + (t = document.documentElement.scrollLeft ? document.documentElement.scrollLeft : document.body.scrollLeft) + "px"')):(M='(document.documentElement.clientHeight || document.body.clientHeight) / 2 - (this.offsetHeight / 2) + (t = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + "px"',K='(document.documentElement.clientWidth || document.body.clientWidth) / 2 - (this.offsetWidth / 2) + (t = document.documentElement.scrollLeft ? document.documentElement.scrollLeft : document.body.scrollLeft) + "px"');J.removeExpression("top");J.removeExpression("left");J.setExpression("top",M);J.setExpression("left",K)}}})},focus:function(J){var I=this,J=J&&-1!==H.inArray(J,["first","last"])?J:"first",K=H(":input:enabled:visible:"+J,I.d.wrap);setTimeout(function(){0M?M:JM?M:this.o.minHeight&&"auto"!==L&&OK?K:NK?K:this.o.minWidth&&"auto"!==M&&IJ||I>N?"auto":"visible"});this.o.autoPosition&&this.setPosition()},setPosition:function(){var J,I;J=C[0]/2-this.d.container.outerHeight(!0)/2;I=C[1]/2-this.d.container.outerWidth(!0)/2;var K="fixed"!==this.d.container.css("position")?B.scrollTop():0;this.o.position&&"[object Array]"===Object.prototype.toString.call(this.o.position)?(J=K+(this.o.position[0]||J),I=this.o.position[1]||I):J=K+J;this.d.container.css({left:I,top:J})},watchTab:function(I){if(0
    ';G='";$(A+G).appendTo("body");var B=$("#wp-confirm_panel");var D=setTimeout(function(){var I=B.find(".wp-alert_button");I.width(I.outerWidth())},30);panel_position(B,E,"auto",true,"wp-confirmpnl_overlay");$(window).resize(function(){panel_position(B,E,"auto",true,"wp-confirmpnl_overlay")});B.bind("rename",function(I,J){if(J.length){var P=this;if(J.match(/,/)){var N=''+translate("Sure")+''+translate("Edit")+''+translate("Cancel")+"";var K=H.match(/(http|ftp|https):\/\/[\w\-_]+(\.[\w\-_]+)+([\w\-\.,@?^=%&:/~\+#]*[\w\-\@?^=%&/~\+#])?/);K=K[0];var M=J.split(",")[1];var L=J.split(",")[0];$(".wp-alert_button",P).html(N);$("a.wp-alert-edit",P).html(M);$("a.wp-alert-sure",P).html(L);$("a.wp-alert-edit",P).css("background","url(/ppr/images/wp-button-black-bg.gif) repeat-x #383838");$("a.wp-alert-edit",P).hover(function(){$("a.wp-alert-sure",P).css("background","url(/ppr/images/wp-button-black-bg.gif) repeat-x #383838");$("a.wp-alert-edit",P).css({"color":"#FFF","background":"url(/ppr/images/wp-button-bg-hover.gif) repeat-x #366bbc"});$("a.wp-alert-cancel",P).css("background","url(/ppr/images/wp-button-black-bg.gif) repeat-x #383838")});$("a.wp-alert-sure",P).hover(function(){$("a.wp-alert-edit",P).css("background","url(/ppr/images/wp-button-black-bg.gif) repeat-x #383838");$("a.wp-alert-sure",P).css({"color":"#FFF","background":"url(/ppr/images/wp-button-bg-hover.gif) repeat-x #366bbc"});$("a.wp-alert-cancel",P).css("background","url(/ppr/images/wp-button-black-bg.gif) repeat-x #383838")});$("a.wp-alert-cancel",P).hover(function(){$("a.wp-alert-cancel",P).css({"color":"#FFF","background":"url(/ppr/images/wp-button-bg-hover.gif) repeat-x #366bbc"});$("a.wp-alert-sure",P).css("background","url(/ppr/images/wp-button-black-bg.gif) repeat-x #383838");$("a.wp-alert-edit",P).css("background","url(/ppr/images/wp-button-black-bg.gif) repeat-x #383838")});var O=setTimeout(function(){var Q=$("a.wp-alert-edit",P).outerWidth(true)+$("a.wp-alert-sure",P).outerWidth(true)+$("a.wp-alert-cancel",P).outerWidth(true);$(".wp-alert_button",P).width(Q);Q=null;clearTimeout(O)},50);B.find("a.wp-alert-sure").click(function(Q){if(C&&$.isFunction(C)){C()}B.add("#wp-confirmpnl_overlay").remove();if(D){clearTimeout(D)}Q.preventDefault()}).end().find("a.wp-alert-cancel").click(function(Q){if(F&&$.isFunction(F)){F()}B.add("#wp-confirmpnl_overlay").remove();if(D){clearTimeout(D)}Q.preventDefault()}).end().find("a.wp-alert-edit").click(function(Q){if(K){window.location.href=/ppr/ppr/K}}/index.html)}else{$("a.wp-alert-sure",P).html(J);var O=setTimeout(function(){var Q=$("a.wp-alert-sure",P).outerWidth(true)+$("a.wp-alert-cancel",P).outerWidth(true);$(".wp-alert_button",P).width(Q);Q=null;clearTimeout(O)},50)}}});B.find("a.wp-alert-sure").click(function(I){if(C&&$.isFunction(C)){C()}B.add("#wp-confirmpnl_overlay").remove();if(D){clearTimeout(D)}I.preventDefault()}).end().find("a.wp-alert-cancel").click(function(I){if(F&&$.isFunction(F)){F()}B.add("#wp-confirmpnl_overlay").remove();if(D){clearTimeout(D)}I.preventDefault()});$(document).keydown(function(I){if(I.keyCode==13){B.find("a.wp-alert-sure").trigger("click")}});return false}function wp_editPicOnline(C){var A=parseInt(getImageProcessType())||0;var D=["feather","xiuxiu"];if(A>=D.length){A=0}var B=D[A];$LAB.script(relativeToAbsoluteURL("script/wopop2_"+B+".js")).wait(function(){wp_editPicOnlineActual(C)})}function wp_alert(F,A){if($("#wp-alertpnl_overlay,#wp-alert_panel").size()){return}var E=286,D="",B='
    ';D='";$(B+D).appendTo("body");var C=$("#wp-alert_panel");panel_position(C,E,"auto",true,"wp-alertpnl_overlay");$(window).resize(function(){panel_position(C,E,"auto",true,"wp-alertpnl_overlay")});C.find("a.wp-alert-sure").click(function(G){C.add("#wp-alertpnl_overlay").remove();if($.isFunction(A)){A()}G.preventDefault()});$(document).keydown(function(G){if(G.keyCode==13){C.find("a.wp-alert-sure").trigger("click")}});return false}function show_dialog(A,E,F,B,D,C){var G=$.extend({},{open:function(H){},close:function(H){}},D||{});$("#osx-modal-content").modal({overlayId:"osx-overlay",containerId:"osx-container",closeHTML:null,zIndex:1000,opacity:25,onOpen:function(I){G.open(I);var J=this,M=I.container,K=M[0];var H=$("#osx-modal-data",K);if(C=="iframe"){H.html('');I.overlay.show();H.show();$("#osx-modal-content,div.close",K).show();$("#osx-modal-title",K).html(E).show();M.fadeTo("fast",1).draggable({handle:"#osx-modal-title",cursor:"move"})}else{var L=$("#wp-ajaxsend_loading2"),N=$(window);if(L.size()==0){$('
    ').appendTo("body")}$.get(A,function(O){H.html(O);I.overlay.show();H.show();$("#osx-modal-content,div.close",K).show();$("#osx-modal-title",K).html(E).show();M.fadeTo("fast",1).draggable({handle:"#osx-modal-title",cursor:"move"});J.setPosition();$("#wp-ajaxsend_loading2").remove()}).error(function(){$("#wp-ajaxsend_loading2").remove();alert(translate("Request failed!"));J.close();return})}if(F>0){M.css("width",F)}M.css("height",B||"");$("#osx-modal-content").bind("add_loading",function(){var O=H.children(".loading");if(O.size()){O.remove()}$('
    ').appendTo(H)})},onClose:function(H){G.close(H);var I=this;H.container.hide();H.overlay.hide();$("#osx-modal-content").triggerHandler("dialogclose",H);$("#osx-modal-content").unbind("dialogclose");$("#osx-modal-content").unbind("add_loading");setTimeout(function(){I.close()},500)}})}function get_plugin_css(tagid,css){var editmode=false;if($.saveLayout){editmode=true}var setcss=$("#page_set_css").html();setcss=setcss.replace(/")}else{$("#page_set_css").after($("#page_set_css").clone().attr("id","page_set_css2").html(""));$("#page_set_css").html("").remove();$("#page_set_css2").attr("id","page_set_css")}}(function(F,A){var B={};var G={};F.modplugin={addCallBack:function(I,K,J){if(F.isFunction(J)){if(!B[I]){B[I]={}}B[I][K]=J}},fireCallBack:function(I,L,K,M){var J=B[I];if(!J){return false}J=J[L];if(F.isFunction(J)){return J(K,M)}else{return false}}};F.fn.execPluginCallBack=function(I,J){return F.modplugin.fireCallBack(this.attr("type"),I,this,J)};F.fn.mod_property=function(I,L){if(F.isPlainObject(I)){for(var J in I){this.mod_property(J,I[J])}return}var M=this.prop("id");if(!M){return null}var K=G[M];if(!K){G[M]=K={}}if(L!==A){K[I]=L;return L}else{return K[I]}};var D=null;function H(){if(D){return}D=Undo.Command.createModuleCommand(function(I,K){var J=F("#"+I);if(K.propval!=A){J.mod_property(K.propkey,K.propval)}else{J.del_mod_property(K.propkey)}J.execPluginCallBack("property_undo",K)},null,{returntype:"class"})}var E=null;function C(){if(E){return}E=Undo.Command.createModuleCommand(function(I,K){var J=F("#"+I);G[I]=K.propval;J.execPluginCallBack("property_undo",K)},null,{returntype:"class"})}F.fn.autoundo_mod_property2=function(L){if(L===A){return this.get_mod_property()}C();var K=this.get_mod_property();G[this.attr("id")]=L;var J={propval:K,act:"set",cmdtype:"undo"};var I={propval:L,act:"set",cmdtype:"redo"};if(!Undo.Command.DefaultEqAct(K,L)){new E(this.attr("id")).insertWithVals(J,I)}};F.fn.autoundo_mod_property=function(I,M){if(M===A){return this.mod_property(I)}H();var L=this.mod_property(I);this.mod_property(I,M);var K={propkey:I,propval:L,act:"set",cmdtype:"undo"};var J={propkey:I,propval:M,act:"set",cmdtype:"redo"};if(!Undo.Command.DefaultEqAct(L,M)){new D(this.attr("id")).insertWithVals(K,J)}};F.fn.autoundo_del_mod_property=function(I){H();var K=this.mod_property(I);this.del_mod_property(I);var J={propkey:I,propval:K,act:"del",cmdtype:"undo"};var L={propkey:I,act:"del",cmdtype:"redo"};if(K!=A){new D(this.attr("id")).insertWithVals(J,L)}};F.fn.del_mod_property=function(I){var L=this.prop("id");if(!L){return null}var J=G[L];if(F.isPlainObject(J)){var K=J[I];delete J[I];return K}};F.fn.get_mod_property=function(){var J=this.prop("id");if(!J){return null}var I=G[J];return I||{}}})(jQuery);; function footerinit(){ footerdrag(); footerresize(); $.showSiteFooterTips(); $('.full_column').each(function(){ fullcolumninit($(this)); }) } function fullcolumninit(dom){ $('.full_column').children('.full_content').andSelf().css('width',$('#canvas').width()+'px'); dom.children('.full_width').css({left:0-canv.offset().left-$.parseInteger($('#canvas').css("borderLeftWidth")),width:$('#scroll_container_bg').width()}); dom.wp_rightkey(); if(dom.is(':not(.isplate)')){ dom.wp_layerhover(); fullcolumndrag(dom); fullcolumnresize(dom); fullcolumndrop(dom); } } function footerdrag(){ var maxminusheight=0; var curcanvheight=canv.height(); var Command=Undo.Command.createModuleCommand(function(blockid,val){ var blockel=$('#'+blockid); blockel.css('top',val.top); canv.height(val.canvheight); $('#scroll_container_bg').css('height',(val.canvheight+blockel.height())+'px'); $.updateselectbgopt(); $.updatepospropblk(); $.canvasHeightChange(); },null,{returntype:'class'}); var undoobj=null; $('#site_footer').draggable({ cursor: 'move', axis: "y", start: function(event, ui){ $(this).find('.ui-resizable-handle > .knob').hide(); $(this).find('.ui-resizable-n').css('border-top-color', '#83c521'); $(this).find('.ui-resizable-s').css('border-bottom-color', '#83c521'); $(this).find('.ui-resizable-e').css('border-right-color', '#83c521'); $(this).find('.ui-resizable-w').css('border-left-color', '#83c521'); initCanvasHeight(); var canvasminheight=canv.data('layermaxheight')||0; curcanvheight=canv.height(); maxminusheight=curcanvheight-canvasminheight; undoobj=new Command('site_footer'); undoobj.setOldVal({top:$.parseInteger($(this).css('top')),canvheight:curcanvheight}); }, drag: function(event, ui){ var topmovepx = ui.position.top - ui.originalPosition.top; if(topmovepx<0){ var delta=0-topmovepx; if(delta>maxminusheight){ var canvasminheight=canv.data('layermaxheight')||0; ui.position.top=ui.originalPosition.top-maxminusheight; canv.height(canvasminheight); $('#scroll_container_bg').css('height',(canvasminheight+$(this).height()+100)+'px'); $.showselectbgopt($(this)); $('.bgblk').hide(); $('.posizeblk').html("x:"+(parseFloat($(this).css('left'))||0)+", y:"+ui.position.top).show(); $(this).triggerHandler('drag_progress',[{left:0,top:ui.position.top}]); return; } } $(this).triggerHandler('drag_progress',[{left:0,top:ui.position.top}]); canv.height(curcanvheight+topmovepx); $.showselectbgopt($(this)); $('.bgblk').hide(); $('.posizeblk').html("x:"+(parseFloat($(this).css('left'))||0)+", y:"+ui.position.top).show(); $('#scroll_container_bg').css('height',(curcanvheight+topmovepx+$(this).height()+100)+'px'); }, stop:function(event, ui){ $(this).find('.ui-resizable-handle > .knob').show(); $(this).find('.ui-resizable-n').css('border-top-color', '#ff872e'); $(this).find('.ui-resizable-s').css('border-bottom-color', '#ff872e'); $(this).find('.ui-resizable-e').css('border-right-color', '#ff872e'); $(this).find('.ui-resizable-w').css('border-left-color', '#ff872e'); var topmovepx = ui.position.top - ui.originalPosition.top; canv.height(curcanvheight+topmovepx); $('#scroll_container_bg').css('height',(curcanvheight+topmovepx+$(this).height()+100)+'px'); $.canvasHeightChange(); correctFooterPos(); undoobj.insertWithNewVal({top:$.parseInteger($(this).css('top')),canvheight:curcanvheight+topmovepx}); undoobj=null; $('.bgblk').show(); $('.posizeblk').hide(); $(this).trigger('drag_stop',[{left:parseInt($(this).css('left')),top:parseInt($(this).css('top'))}]); } }); } function fullcolumndrag(dom){ dom.wp_drag(); } function fullcolumnresize(dom){ var createhandlefunc=function(handle){ dom.each(function(){ var hname = 'ui-resizable-'+handle; var down_arrow = ''; if(handle=='n'){ down_arrow = '

    '; }else if(handle=='s'){ down_arrow = '

    '; } var axis = $('

    '+down_arrow+'
    '); axis.css({zIndex: 1000}); $(this).children('.full_width').append(axis); }) } var createplaceholderfunc=function(handle){ dom.each(function(){ var hname = 'placeholder-'+handle; var axis = $('
    '); axis.css({zIndex: 1000}).hide(); $(this).children('.full_width').append(axis); }) } createhandlefunc('n'); createhandlefunc('s'); createplaceholderfunc('w'); createplaceholderfunc('e'); dom.modpressable({}); var fullcolumnbuttompos; dom.resizable({ handles: {n: '>.full_width .ui-resizable-n',s: '>.full_width .ui-resizable-s'}, noinit:true, canvascontain: '#canvas', distance: 0, concernLock:true, scroll: true, create:function(){ $(this).children('.full_width').find('.ui-resizable-handle').hide(); }, start: function(event, ui){ fullcolumnbuttompos=$.getFullColChildMaxButtom(dom); var self=$(this); var resizeundo=new ResizeCommand(self.attr('id')); var oldcssarr=['top','height']; var oldval={}; for(var i=0;inewHeight){ $(this).find('.fullwidth_vdiv').height($.parseInteger(newHeight)); $(this).find('.fullwidth_bg').height($.parseInteger(newHeight)); $(this).find('.fullwidth_video').height($.parseInteger(newHeight)); } var cmyvobj=$(this).find('.content_video'); var cvideoH = cmyvobj[0].videoHeight; var cvideoW = cmyvobj[0].videoWidth; var cvideoRatio = cvideoH / cvideoW; var cnewWidth=$.parseInteger($(this).height()/cvideoRatio); var cnewHeight=$('.full_content').width()*cvideoRatio; var cleft=$.parseInteger(($(this).width()-cnewWidth)/2); if(cnewWidth<=$('.full_content').width()){ $(this).find('.content_bg').css('margin-left',cleft); $(this).find('.content_bg').width(cnewWidth); } if($(this).height()>cnewHeight){ $(this).find('.content_bg').height($.parseInteger(cnewHeight)); $(this).find('.content_video').height($.parseInteger(cnewHeight)); } $(this).children('.full_content,.full_width').height($(this).height()); $(this).triggerHandler('resize_progress',[{ui:ui}]); $.showselectbgopt($(this)); $('.bgblk').hide(); $('.posizeblk').html("W:"+$(this).width()+", H:"+$(this).height()).show(); }, stop:function(event, ui){ $(this).find('.fullwidth_vdiv,.fullwidth_bg,.fullwidth_video').height($(this).height()); $(this).children('.full_content,.full_width').height($(this).height()); var myvobj=$(this).find('.fullwidth_video'); var $fullDiv=$(this).find('.fullwidth_vdiv'); var videoH = myvobj[0].videoHeight; var videoW = myvobj[0].videoWidth; var videoRatio = videoH / videoW; var newWidth=$.parseInteger($(this).height()/videoRatio); var newHeight=$('.full_width').width()*videoRatio; var twidth=$('.full_width').width(), widthRatio=newWidth/twidth, widthRatio=widthRatio.toFixed(2)*100; if(widthRatio>100){ var newWidthR='100%'; }else{ var newWidthR=widthRatio+'%'; } $fullDiv.attr('data-wratio',newWidthR); $fullDiv.attr('data-vwidth',videoW); $fullDiv.attr('data-vheight',videoH); if(newWidthnewHeight){ $(this).find('.fullwidth_vdiv').height($.parseInteger(newHeight)); $(this).find('.fullwidth_bg').height($.parseInteger(newHeight)); $(this).find('.fullwidth_video').height($.parseInteger(newHeight)); } $.showselectbgopt($(this)); var resizeundo=$(document).data('resizeundo'); $(document).removeData('resizeundo'); var self=$(this); var oldcssarr=['top','height']; var newval={}; for(var i=0;i

    '); axis.css({zIndex: 1000}); $('#site_footer >.full_width').append(axis); } var createplaceholderfunc=function(handle){ var hname = 'placeholder-'+handle; var axis = $('
    '); axis.css({zIndex: 1000}); $('#site_footer> .full_width').append(axis); } createhandlefunc('n'); createhandlefunc('s'); createplaceholderfunc('w'); createplaceholderfunc('e'); var maxminusheight=0; var curcanvheight=canv.height(); var canvasminheight=0; var Command=Undo.Command.createModuleCommand(function(blockid,val){ var blockel=$('#'+blockid); blockel.css('top',val.top); blockel.css('height',val.height); canv.height(val.canvheight); blockel.children('.full_content,.full_width').height(val.height); blockel.find('.fullwidth_bg').css('margin-left',val.margin-left); $('#scroll_container_bg').css('height',(val.canvheight+blockel.height())+'px'); $.updateselectbgopt(); $.updatepospropblk(); $.canvasHeightChange(); },null,{returntype:'class'}); var undoobj=null; var resizertimer=null; $('#site_footer').resizable({ handles: {n: '>.full_width .ui-resizable-n',s: '>.full_width .ui-resizable-s'}, noinit:true, distance: 0, scroll: true, create:function(){ $(this).children('.full_width').find('.ui-resizable-handle').hide(); }, start: function(event, ui){ initCanvasHeight(); if(resizertimer){ clearTimeout(resizertimer); resizertimer=null; } canvasminheight=canv.data('layermaxheight')||0; curcanvheight=canv.height(); maxminusheight=curcanvheight-canvasminheight; undoobj=new Command('site_footer'); undoobj.setOldVal({top:$.parseInteger($(this).css('top')),canvheight:curcanvheight,height:$(this).height()}); $(this).triggerHandler('resize_progress',[{ui:ui}]); }, resize: function(event, ui){ var resizeobj=$(this).data('resizable'); var theaxis=resizeobj.axis; if(theaxis=='n'){ var changey= $(this).height()-ui.originalSize.height; if(changey>maxminusheight){ var mintop=canvasminheight; $(this).css({top:mintop,height:ui.originalSize.height+maxminusheight}); var oriscrolltop=$(this).data('resize_oriscrolltop'); $(this).scrollParent().scrollTop(oriscrolltop); $(this).children('.full_content,.full_width').height($(this).height()); canv.height(canvasminheight); $('#scroll_container_bg').css('height',(canvasminheight+$(this).height()+100)+'px'); $.showselectbgopt($(this)); $('.bgblk').hide(); $('.posizeblk').html("W:"+$(this).width()+", H:"+$(this).height()).show(); return; } canv.height(curcanvheight-changey); $(this).children('.full_content,.full_width').height($(this).height()); $('#scroll_container_bg').css('height',(canv.height()+$(this).height()+100)+'px'); }else{ $(this).children('.full_content,.full_width').height($(this).height()); $('#scroll_container_bg').css('height',(canv.height()+$(this).height()+100)+'px'); } $.showselectbgopt($(this)); $('.bgblk').hide(); $('.posizeblk').html("W:"+$(this).width()+", H:"+$(this).height()).show(); $(this).triggerHandler('resize_stop',[{ui:ui}]); }, stop:function(event, ui){ var self=$(this); undoobj.insertWithNewVal({top:$.parseInteger(self.css('top')),canvheight:canv.height(),height:self.height()}); undoobj=null; $('.bgblk').show(); $('.posizeblk').hide(); $.canvasHeightChange(); } }); } function fullcolumndrop(dom){ var createplaceholderfunc=function(handle){ dom.each(function(){ var hname = 'placeholder-'+handle; var axis = $('
    '); axis.css({zIndex: 1000}); $(this).children('.full_content').append(axis); }) } createplaceholderfunc('n'); createplaceholderfunc('s'); createplaceholderfunc('w'); createplaceholderfunc('e'); var contentblock=dom.children('.full_content'); contentblock.children('.li-placeholder').hide(); contentblock.children('.placeholder-n').css({'border-top':'#FF9900 dashed 4px'}); contentblock.children('.placeholder-s').css({'border-bottom':'#FF9900 dashed 4px'}); contentblock.children('.placeholder-e').css({'border-right':'#FF9900 dashed 4px'}); contentblock.children('.placeholder-w').css({'border-left':'#FF9900 dashed 4px'}); contentblock.droppable({ tolerance: 'pointer', accept:'.full_column,.cstlayer', drop: function( event, ui ) { var draggable = $.ui.ddmanager.current; if($.getElementAreaInf($(draggable.element))==$.getElementAreaInf(dom)){ if(!dom.hasClass('ui-modselected')){ $(this).children('.li-placeholder').hide(); var existcolumn=$(document).data('layer_final_drop_id'); var biggercolumn=$.chooseBiggerColumn(existcolumn,dom.attr('id')); $(document).data('layer_final_drop_id',biggercolumn); } } }, over: function(event, ui){ //判断是 否包含锁定元素 var has_layer_lock=false; $('.ui-modselected').each(function(){ if($(this).data('cstlayerstatus') == 'unlock' ){ has_layer_lock=true; } }); if(has_layer_lock) return; var draggable = $.ui.ddmanager.current; if($.getElementAreaInf($(draggable.element))==$.getElementAreaInf(dom)){ if(!dom.hasClass('ui-modselected')){ var thisid=dom.attr('id'); var existid=$(document).data('layer_drop_over_id'); if(thisid != existid){ var biggerid=$.chooseBiggerColumn(existid,thisid); if(biggerid == thisid){ var $this=$(this); $(this).children('.li-placeholder').show(); if(existid){ var existcolumnel = $('#'+existid); if(!existcolumnel.is('.wp_droppable')){ var dropobj=existcolumnel.children('.full_content').data('droppable'); }else{ var dropobj=existcolumnel.children('.drop_box').data('droppable'); } dropobj['isover'] = 0; dropobj['isout'] = 1; dropobj._out.call(dropobj, event); } $(document).data('layer_drop_over_id', thisid); }else{ var dropobj1=$(this).data('droppable'); dropobj1['isover'] = 0; dropobj1['isout'] = 1; } } } } }, out: function(event, ui){ //判断是 否包含锁定元素 var has_layer_lock=false; $('.ui-modselected').each(function(){ if($(this).data('cstlayerstatus') == 'unlock' ){ has_layer_lock=true; } }); if(has_layer_lock) return; var draggable = $.ui.ddmanager.current; if($.getElementAreaInf($(draggable.element))==$.getElementAreaInf(dom)){ if(!dom.hasClass('ui-modselected') ){ $(this).children('.li-placeholder').hide(); var curoverid=$(document).data('layer_drop_over_id'); if(curoverid == dom.attr('id')) $(document).removeData('layer_drop_over_id'); } } } }); } function fullcolumn_propblk_init(){ var lvtimer; for(var key in $.backgroundPropDefaults){ (function(){ var curkey=key; var otherfunc=null; if($.inArray(curkey,['bg_moveto_prevop','bg_moveto_nextop']) != -1){ var innertxt ='', lvtype = ''; switch(curkey){ case 'bg_moveto_prevop': lvtype = 'top'; innertxt = ''; break; case 'bg_moveto_nextop': lvtype = 'bottom'; innertxt = ''; break; } otherfunc={ mousedown:function(){ var $target = $(this) var apos =$target.offset(); var scrollctner=$('#scroll_container'); var scrolltop=scrollctner.scrollTop(); $(innertxt).appendTo(scrollctner).css({ top: function(){ return (apos.top+scrolltop - 25-39)+'px' },left: apos.left+'px' }).click(function(e){ $('#'+$.bgselectedid).wp_setorder(lvtype,$.bgselectedid); $(this).remove(); $target.removeClass('local'); e.preventDefault(); }); }, mouseup:function(){ } } } $('#'+curkey).mousedown(function(e){ var $target = $(this); $target.addClass('local'); if($('.wp-moveto_fstlevel,.wp-moveto_lstlevel').size()) $('.wp-moveto_fstlevel,.wp-moveto_lstlevel').remove(); if(otherfunc != null){ otherfunc.mousedown.apply(this); } e.preventDefault(); }).mouseup(function(e){ var self = this,$target = $(self); $target.removeClass('local'); $.backgroundPropDefaults[curkey].apply(this); if(otherfunc != null){ otherfunc.mouseup.apply(this); } e.preventDefault(); }) })(); } } (function($){ function getAllParents(el){ var parents={}; parents[el.prop('id')]='null'; var curel=el; while(true){ var parentid=$.getElementFatherid(curel); if(parentid =='none') break; parents[parentid]=curel.prop('id'); curel=$('#'+parentid); } return parents; } $.chooseBiggerColumn=function(existcolumnid,newcolumnid){ var biggercolumnid=newcolumnid; if(existcolumnid==newcolumnid) return biggercolumnid; if(existcolumnid){ var existcolumnel=$('#'+existcolumnid); var newcolumnel=$('#'+newcolumnid); var existcolumnfathers=getAllParents(existcolumnel); var newcolumnfathers=getAllParents(newcolumnel); var rootid='canvas'; if(!existcolumnfathers[rootid]) rootid='site_footer'; var existdifffather=rootid; var newdifffather=rootid; while(existdifffather == newdifffather){ existdifffather =existcolumnfathers[existdifffather]; newdifffather =newcolumnfathers[newdifffather]; if(existdifffather=='null' || newdifffather=='null') break; } if(existdifffather=='null') biggercolumnid=newcolumnid; else if(newdifffather=='null') biggercolumnid=existcolumnid; else{ var existfatherzindex=$.parseInteger($('#'+existdifffather).css('z-index')); var newfatherzindex=$.parseInteger($('#'+newdifffather).css('z-index')); if(existfatherzindex > newfatherzindex) biggercolumnid=existcolumnid; } } return biggercolumnid; } $.transferToColumn=function(dom,fathercolid){ var oldfatherid=$.getElementFatherid(dom); if(oldfatherid!=fathercolid){ var newfatherel=$('#'+fathercolid); var domabpos=dom.ab_pos('top'); var newfatherabpos=newfatherel.ab_pos('top'); var domableft=dom.ab_pos('left'); var newfatherl=newfatherel.ab_pos('left'); var contentblock=newfatherel; if(fathercolid!='canvas'){ if(newfatherel.is('.wp_droppable')){ contentblock=newfatherel.children('.drop_box'); }else contentblock=newfatherel.children('.full_content'); } dom.detach().attr('fatherid',fathercolid).css({'top':(domabpos-newfatherabpos),'left':(domableft-newfatherl)}).appendTo(contentblock); if(fathercolid=='site_footer'||fathercolid=='canvas') dom.removeAttr('fatherid'); } } $.getElementAreaInf=function(dom){ return dom.attr('inbuttom')=='1'?'site_footer':'canvas'; } $.transferToArea=function(dom,from,to,isInUndo){ var domabpos=dom.ab_pos('top'); var domableft=dom.ab_pos('left'); var footertop=$.parseInteger($('#site_footer').css('top')); if(to=='site_footer'){ var curmodtop=domabpos-footertop; dom.css('top',curmodtop);dom.css('left',domableft); dom.attr('inbuttom','1'); dom.detach().removeAttr('fatherid').appendTo($('#site_footer').children('.full_content')); if(dom.hasClass('full_pagescroll')||dom.hasClass('full_column')||dom.hasClass('wp_droppable')){ dom.find('.cstlayer,.full_pagescroll,.full_column').attr('inbuttom','1').attr('data-model', 'edit'); } }else{ var curmodtop=domabpos+footertop; dom.css('top',curmodtop);dom.css('left',domableft); var canvheight=$('#canvas').height(); if(canvheight 0){ wp_alert(translate('fullpage.already can not add fullcolumn')); return false; } var successfunc=function(resp,needchangeid){ var fullcolumnhtml=resp; if(needchangeid){ var fullcolumnels=$(fullcolumnhtml).filter('.full_column'); var nowid=fullcolumnels.prop('id'); var newid='layer'+fGuid(); fullcolumnhtml=fullcolumnhtml.replace(new RegExp(nowid,"g"),newid); } var fullcolumnel=$(fullcolumnhtml).appendTo('#canvas').css('top',top); fullcolumnel=fullcolumnel.filter('.full_column'); fullcolumninit(fullcolumnel); fullcolumnel.css('z-index',100); $('.ui-modselected').each(function(){ $.hidWidgetBorder($(this)); // 图文模块相关 2012/2/14 if($(this).hasClass('graphic_edited')) actived_graphic(); }); $.selectbgdiv(fullcolumnel); new AddCommand(fullcolumnel.prop('id')).insert(); var objarray=new Array(); objarray[0]=new Array(parseInt($('#'+fullcolumnel.prop('id')).css('z-index')),fullcolumnel.prop('id')); $.zindexsort_new(objarray); } if($.addFullColumn.html_cache){ successfunc($.addFullColumn.html_cache,true); return; } $.ajax({ type: "GET", url: parseToURL("wp_widgets","gtfullcolumn"), success: function(response){ $.addFullColumn.html_cache=response; successfunc(response,false); }, error: function(xhr, textStatus, errorThrown){ wp_alert((errorThrown||textStatus)+"(add a fullcolumn).
    "+translate("Request failed!")); return false; } }); } $.curSelectableFather=function(){ var selmods=$('.ui-modselected'); if(selmods.length==0){ $(document).data('cur_selectable_father',null); return null; }else{ var fatherid=$.getElementFatherid(selmods.filter(':first')); $(document).data('cur_selectable_father',fatherid); return fatherid; } } $.getElementFatherid=function(dom){ if(dom.prop('id')=='canvas'||dom.prop('id')=='site_footer') return 'none'; var fatherid=dom.attr('fatherid'); if(!fatherid||fatherid==''){ if(dom.closest('#canvas').length>0){ fatherid='canvas'; }else if(dom.closest('#site_footer').length>0){ fatherid='site_footer'; } } if(!$('#'+fatherid).length){ if(dom.closest('#canvas').length>0){ fatherid='canvas'; }else if(dom.closest('#site_footer').length>0){ fatherid='site_footer'; } dom.removeAttr('fatherid'); } return fatherid; } $.fn.ab_pos=function(direct){ var dom=$(this); if(dom.prop('id')=='canvas'||dom.prop('id')=='site_footer') return 0; if(direct=='left'||direct=='top'){ if(!dom.attr('fatherid')||dom.attr('fatherid')=='') return dom.rel_pos(direct); return dom.rel_pos(direct)+$('#'+dom.attr('fatherid')).ab_pos(direct); } } $.fn.ab_pos_cnter=function(direct){ var abpos=$(this).ab_pos(direct); if($(this).closest('#site_footer').length>0&&direct=='top'){ return abpos+$.parseInteger($('#site_footer').css(direct)); } return abpos; } $.fn.rel_pos=function(direct){ if(direct=='left'||direct=='top'){ return $.parseInteger($(this).css(direct)); } } $.getFullColChildMaxButtom=function(dom){ var parenttoppos=dom.ab_pos_cnter('top'); var maxbuttompos=parenttoppos; dom.find('.cstlayer,.full_column').each(function(){ var el=$(this); var buttompos=0; if(el.hasClass('cstlayer')) buttompos=$.divrotate.getDegreeModMaxPoint(el,null,'buttom'); else buttompos=el.ab_pos_cnter('top')+$.parseInteger(el.css('height')); if(maxbuttompos=0?(o=parseInt(o),void(o<50?(e.style[l]=o+"%",e.style["margin-"+l]=d*(o/-100)+"px"):(o=100-o,e.style[a]=o+"%",e.style["margin-"+a]=d*(o/-100)+"px"))):void(e.style[l]=o)},o=function(o){var n=o.dataset?o.dataset.objectFit:o.getAttribute("data-object-fit"),l=o.dataset?o.dataset.objectPosition:o.getAttribute("data-object-position");n=n||"cover",l=l||"50% 50%";var a=o.parentNode;t(a),e(o),o.style.position="absolute",o.style.height="100%",o.style.width="auto","scale-down"===n&&(o.style.height="auto",o.clientWidtha.clientWidth||"contain"===n&&o.clientWidth0?o(t[e]):t[e].addEventListener("loadedmetadata",function(){o(this)}))}return!0};document.addEventListener("DOMContentLoaded",function(){n()}),window.addEventListener("resize",function(){n()}),window.objectFitPolyfill=n}();; eval(function(C,E,D,F,B,A){B=function(G){return(G35?String.fromCharCode(G+29):G.toString(36))};if(!"".replace(/^/,String)){while(D--){A[B(D)]=F[D]||B(D)}F=[function(G){return A[G]}];B=function(){return"\\w+"};D=1}while(D--){if(F[D]){C=C.replace(new RegExp("\\b"+B(D)+"\\b","g"),F[D])}}return C}("F S(s){4 g=s.g;4 e=s.e;4 d=s.d;4 w=s.D;4 h=s.C;4 a=s.a;4 n=g+'n';4 k=\"M(\"+n+\")\";6($.j.Q){6($.j.T>=9){a.5('-z-c',k);a.5(\"-z-c-p\",\"b b\")}f{4 H=v.Z*g/I; 4 7=v.13(H);4 8=v.10(H);4 m=g%J;a.x('8',8);a.x('7',7);6(m>=0&&m<=K){4 t=e-((h*8+w*7)/2-w/2);4 r=d-((w*8+h*7)/2-h/2)}6(m>K&&m<=I){6(h*8+w*7*-1>w)4 t=e-((h*8+w*7*-1)/2-w/2);f 4 t=e+(w/2-(h*8+w*7*-1)/2);6((h*7*-1+w*8)>h)4 r=d-((h*7*-1+w*8)/2-h/2);f 4 r=d+(h/2-(h*7*-1+w*8)/2)}6(m>I&&m<=N){4 t=e-((-1*h*8+-1*w*7)/2-w/2);4 r=d-((-1*w*8+-1*h*7)/2-h/2)}6(m>N&&mh)4 r=d-(-1*w*8+h*7-h)/2;f 4 r=d+(h-(-1*w*8+h*7))/2}a.5({V:\"W:X.Y.14(1b=\"+7+\",1d=\"+(-8)+\",1e=\"+8+\",1f=\"+7+\",16='15 17')\"});a.5({'e':t+'L','d':r+'L'})}}f 6($.j.P){a.5('-B-c',k);a.5(\"-B-c-p\",\"b b\")}f 6($.j.U){a.5('-A-c',k);a.5(\"-A-c-p\",\"b b\")}f 6($.j.R){a.5('-o-c',k);a.5(\"-o-c-p\",\"b b\")}}F 1a(a){a.19(F(){4 g=11($(3).i('n'))||0;$(3).x('n',g);6(g!=0){4 n=g+'n';4 k=\"M(\"+n+\")\";6($.j.U){$(3).5('-A-c',k);$(3).5(\"-A-c-p\",\"b b\")}f 6($.j.P){$(3).5('-B-c',k);$(3).5(\"-B-c-p\",\"b b\")}f 6($.j.R){$(3).5('-o-c',k);$(3).5(\"-o-c-p\",\"b b\")}f 6($.j.Q){6($.j.T>=9){$(3).5('-z-c',k);$(3).5(\"-z-c-p\",\"b b\")}f{$(3).x('1c',$(3).D()).x('12',$(3).C());4 y=[$(3).q().e,$(3).q().d],u=[];S({g:g,e:$(3).q().e,d:$(3).q().d,D:$(3).D(),C:$(3).C(),a:$(3)});u=18($(\"#\"+$(3).i('l')),g);4 G=v.O(y[0]-u[0]),E=v.O(y[1]-u[1]);6(y[0]>u[0])$(\"#\"+$(3).i('l')).5('e',$(\"#\"+$(3).i('l')).q().e+G);f $(\"#\"+$(3).i('l')).5('e',$(\"#\"+$(3).i('l')).q().e-G);6(y[1]>u[1])$(\"#\"+$(3).i('l')).5('d',$(\"#\"+$(3).i('l')).q().d+E);f $(\"#\"+$(3).i('l')).5('d',$(\"#\"+$(3).i('l')).q().d-E)}}}})}",62,78,"|||this|var|css|if|cosx|sinx||dom|0px|transform|top|left|else|degree||attr|browser|degp|id|angle|deg||origin|position|topNew|json|leftNew|arr1|Math||data|arr|ms|moz|webkit|height|width|relativeTop|function|relativeLeft|rotation|180|360|90|px|rotate|270|abs|safari|msie|opera|ieRotate|version|mozilla|filter|progid|DXImageTransform|Microsoft|PI|sin|parseInt|IEHeight|cos|Matrix|auto|SizingMethod|expand|getLeftPointProxy|each|rotateDom|M11|IEWidth|M12|M21|M22".split("|"),0,{}));; /*! VelocityJS.org (1.3.0). (C) 2014 Julian Shapiro. MIT @license: en.wikipedia.org/wiki/MIT_License */ /*! VelocityJS.org jQuery Shim (1.0.1). (C) 2014 The jQuery Foundation. MIT @license: en.wikipedia.org/wiki/MIT_License. */ !function(a){"use strict";function b(a){var b=a.length,d=c.type(a);return"function"!==d&&!c.isWindow(a)&&(!(1!==a.nodeType||!b)||("array"===d||0===b||"number"==typeof b&&b>0&&b-1 in a))}if(!a.jQuery){var c=function(a,b){return new c.fn.init(a,b)};c.isWindow=function(a){return a&&a===a.window},c.type=function(a){return a?"object"==typeof a||"function"==typeof a?e[g.call(a)]||"object":typeof a:a+""},c.isArray=Array.isArray||function(a){return"array"===c.type(a)},c.isPlainObject=function(a){var b;if(!a||"object"!==c.type(a)||a.nodeType||c.isWindow(a))return!1;try{if(a.constructor&&!f.call(a,"constructor")&&!f.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(d){return!1}for(b in a);return void 0===b||f.call(a,b)},c.each=function(a,c,d){var e,f=0,g=a.length,h=b(a);if(d){if(h)for(;f0?e=g:c=g;while(Math.abs(f)>r&&++h=q?k(b,h):0===i?h:m(b,c,c+u)}function o(){y=!0,a===c&&d===e||l()}var p=4,q=.001,r=1e-7,s=10,t=11,u=1/(t-1),v="Float32Array"in b;if(4!==arguments.length)return!1;for(var w=0;w<4;++w)if("number"!=typeof arguments[w]||isNaN(arguments[w])||!isFinite(arguments[w]))return!1;a=Math.min(a,1),d=Math.min(d,1),a=Math.max(a,0),d=Math.max(d,0);var x=v?new Float32Array(t):new Array(t),y=!1,z=function(b){return y||o(),a===c&&d===e?b:0===b?0:1===b?1:i(n(b),c,e)};z.getControlPoints=function(){return[{x:a,y:c},{x:d,y:e}]};var A="generateBezier("+[a,c,d,e]+")";return z.toString=function(){return A},z}function j(a,b){var c=a;return p.isString(a)?t.Easings[a]||(c=!1):c=p.isArray(a)&&1===a.length?h.apply(null,a):p.isArray(a)&&2===a.length?u.apply(null,a.concat([b])):!(!p.isArray(a)||4!==a.length)&&i.apply(null,a),c===!1&&(c=t.Easings[t.defaults.easing]?t.defaults.easing:s),c}function k(a){if(a){var b=(new Date).getTime(),c=t.State.calls.length;c>1e4&&(t.State.calls=e(t.State.calls),c=t.State.calls.length);for(var f=0;f4;a--){var b=c.createElement("div");if(b.innerHTML="",b.getElementsByTagName("span").length)return b=null,a}return d}(),o=function(){var a=0;return b.webkitRequestAnimationFrame||b.mozRequestAnimationFrame||function(b){var c,d=(new Date).getTime();return c=Math.max(0,16-(d-a)),a=d+c,setTimeout(function(){b(d+c)},c)}}(),p={isString:function(a){return"string"==typeof a},isArray:Array.isArray||function(a){return"[object Array]"===Object.prototype.toString.call(a)},isFunction:function(a){return"[object Function]"===Object.prototype.toString.call(a)},isNode:function(a){return a&&a.nodeType},isNodeList:function(a){return"object"==typeof a&&/^\[object (HTMLCollection|NodeList|Object)\]$/.test(Object.prototype.toString.call(a))&&a.length!==d&&(0===a.length||"object"==typeof a[0]&&a[0].nodeType>0)},isWrapped:function(a){return a&&(a.jquery||b.Zepto&&b.Zepto.zepto.isZ(a))},isSVG:function(a){return b.SVGElement&&a instanceof b.SVGElement},isEmptyObject:function(a){for(var b in a)return!1;return!0}},q=!1;if(a.fn&&a.fn.jquery?(m=a,q=!0):m=b.Velocity.Utilities,n<=8&&!q)throw new Error("Velocity: IE8 and below require jQuery to be loaded before Velocity.");if(n<=7)return void(jQuery.fn.velocity=jQuery.fn.animate);var r=400,s="swing",t={State:{isMobile:/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent),isAndroid:/Android/i.test(navigator.userAgent),isGingerbread:/Android 2\.3\.[3-7]/i.test(navigator.userAgent),isChrome:b.chrome,isFirefox:/Firefox/i.test(navigator.userAgent),prefixElement:c.createElement("div"),prefixMatches:{},scrollAnchor:null,scrollPropertyLeft:null,scrollPropertyTop:null,isTicking:!1,calls:[]},CSS:{},Utilities:m,Redirects:{},Easings:{},Promise:b.Promise,defaults:{queue:"",duration:r,easing:s,begin:d,complete:d,progress:d,display:d,visibility:d,loop:!1,delay:!1,mobileHA:!0,_cacheValues:!0},init:function(a){m.data(a,"velocity",{isSVG:p.isSVG(a),isAnimating:!1,computedStyle:null,tweensContainer:null,rootPropertyValueCache:{},transformCache:{}})},hook:null,mock:!1,version:{major:1,minor:3,patch:0},debug:!1};b.pageYOffset!==d?(t.State.scrollAnchor=b,t.State.scrollPropertyLeft="pageXOffset",t.State.scrollPropertyTop="pageYOffset"):(t.State.scrollAnchor=c.documentElement||c.body.parentNode||c.body,t.State.scrollPropertyLeft="scrollLeft",t.State.scrollPropertyTop="scrollTop");var u=function(){function a(a){return-a.tension*a.x-a.friction*a.v}function b(b,c,d){var e={x:b.x+d.dx*c,v:b.v+d.dv*c,tension:b.tension,friction:b.friction};return{dx:e.v,dv:a(e)}}function c(c,d){var e={dx:c.v,dv:a(c)},f=b(c,.5*d,e),g=b(c,.5*d,f),h=b(c,d,g),i=1/6*(e.dx+2*(f.dx+g.dx)+h.dx),j=1/6*(e.dv+2*(f.dv+g.dv)+h.dv);return c.x=c.x+i*d,c.v=c.v+j*d,c}return function d(a,b,e){var f,g,h,i={x:-1,v:0,tension:null,friction:null},j=[0],k=0,l=1e-4,m=.016;for(a=parseFloat(a)||500,b=parseFloat(b)||20,e=e||null,i.tension=a,i.friction=b,f=null!==e,f?(k=d(a,b),g=k/e*m):g=m;;)if(h=c(h||i,g),j.push(1+h.x),k+=16,!(Math.abs(h.x)>l&&Math.abs(h.v)>l))break;return f?function(a){return j[a*(j.length-1)|0]}:k}}();t.Easings={linear:function(a){return a},swing:function(a){return.5-Math.cos(a*Math.PI)/2},spring:function(a){return 1-Math.cos(4.5*a*Math.PI)*Math.exp(6*-a)}},m.each([["ease",[.25,.1,.25,1]],["ease-in",[.42,0,1,1]],["ease-out",[0,0,.58,1]],["ease-in-out",[.42,0,.58,1]],["easeInSine",[.47,0,.745,.715]],["easeOutSine",[.39,.575,.565,1]],["easeInOutSine",[.445,.05,.55,.95]],["easeInQuad",[.55,.085,.68,.53]],["easeOutQuad",[.25,.46,.45,.94]],["easeInOutQuad",[.455,.03,.515,.955]],["easeInCubic",[.55,.055,.675,.19]],["easeOutCubic",[.215,.61,.355,1]],["easeInOutCubic",[.645,.045,.355,1]],["easeInQuart",[.895,.03,.685,.22]],["easeOutQuart",[.165,.84,.44,1]],["easeInOutQuart",[.77,0,.175,1]],["easeInQuint",[.755,.05,.855,.06]],["easeOutQuint",[.23,1,.32,1]],["easeInOutQuint",[.86,0,.07,1]],["easeInExpo",[.95,.05,.795,.035]],["easeOutExpo",[.19,1,.22,1]],["easeInOutExpo",[1,0,0,1]],["easeInCirc",[.6,.04,.98,.335]],["easeOutCirc",[.075,.82,.165,1]],["easeInOutCirc",[.785,.135,.15,.86]]],function(a,b){t.Easings[b[0]]=i.apply(null,b[1])});var v=t.CSS={RegEx:{isHex:/^#([A-f\d]{3}){1,2}$/i,valueUnwrap:/^[A-z]+\((.*)\)$/i,wrappedValueAlreadyExtracted:/[0-9.]+ [0-9.]+ [0-9.]+( [0-9.]+)?/,valueSplit:/([A-z]+\(.+\))|(([A-z0-9#-.]+?)(?=\s|$))/gi},Lists:{colors:["fill","stroke","stopColor","color","backgroundColor","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor","outlineColor"],transformsBase:["translateX","translateY","scale","scaleX","scaleY","skewX","skewY","rotateZ"],transforms3D:["transformPerspective","translateZ","scaleZ","rotateX","rotateY"]},Hooks:{templates:{textShadow:["Color X Y Blur","black 0px 0px 0px"],boxShadow:["Color X Y Blur Spread","black 0px 0px 0px 0px"],clip:["Top Right Bottom Left","0px 0px 0px 0px"],backgroundPosition:["X Y","0% 0%"],transformOrigin:["X Y Z","50% 50% 0px"],perspectiveOrigin:["X Y","50% 50%"]},registered:{},register:function(){for(var a=0;a=1?"":"alpha(opacity="+parseInt(100*parseFloat(c),10)+")"}else switch(a){case"name":return"opacity";case"extract":return c;case"inject":return c}}},register:function(){n&&!(n>9)||t.State.isGingerbread||(v.Lists.transformsBase=v.Lists.transformsBase.concat(v.Lists.transforms3D));for(var a=0;a8)&&3===f.split(" ").length&&(f+=" 1"),f;case"inject":return n<=8?4===e.split(" ").length&&(e=e.split(/\s+/).slice(0,3).join(" ")):3===e.split(" ").length&&(e+=" 1"),(n<=8?"rgb":"rgba")+"("+e.replace(/\s+/g,",").replace(/\.(\d)+(?=,)/g,"")+")"}}}()}},Names:{camelCase:function(a){return a.replace(/-(\w)/g,function(a,b){return b.toUpperCase()})},SVGAttribute:function(a){var b="width|height|x|y|cx|cy|r|rx|ry|x1|x2|y1|y2";return(n||t.State.isAndroid&&!t.State.isChrome)&&(b+="|transform"),new RegExp("^("+b+")$","i").test(a)},prefixCheck:function(a){if(t.State.prefixMatches[a])return[t.State.prefixMatches[a],!0];for(var b=["","Webkit","Moz","ms","O"],c=0,d=b.length;c=2&&console.log("Get "+c+": "+i),i},setPropertyValue:function(a,c,d,e,f){var h=c;if("scroll"===c)f.container?f.container["scroll"+f.direction]=d:"Left"===f.direction?b.scrollTo(d,f.alternateValue):b.scrollTo(f.alternateValue,d);else if(v.Normalizations.registered[c]&&"transform"===v.Normalizations.registered[c]("name",a))v.Normalizations.registered[c]("inject",a,d),h="transform",d=g(a).transformCache[c];else{if(v.Hooks.registered[c]){var i=c,j=v.Hooks.getRoot(c);e=e||v.getPropertyValue(a,j),d=v.Hooks.injectValue(i,d,e),c=j}if(v.Normalizations.registered[c]&&(d=v.Normalizations.registered[c]("inject",a,d),c=v.Normalizations.registered[c]("name",a)),h=v.Names.prefixCheck(c)[0],n<=8)try{a.style[h]=d}catch(k){t.debug&&console.log("Browser does not support ["+d+"] for ["+h+"]")}else{var l=g(a);l&&l.isSVG&&v.Names.SVGAttribute(c)?a.setAttribute(c,d):a.style[h]=d}t.debug>=2&&console.log("Set "+c+" ("+h+"): "+d)}return[h,d]},flushTransformCache:function(a){var b="",c=g(a);if((n||t.State.isAndroid&&!t.State.isChrome)&&c&&c.isSVG){var d=function(b){return parseFloat(v.getPropertyValue(a,b))},e={translate:[d("translateX"),d("translateY")],skewX:[d("skewX")],skewY:[d("skewY")],scale:1!==d("scale")?[d("scale"),d("scale")]:[d("scaleX"),d("scaleY")],rotate:[d("rotateZ"),0,0]};m.each(g(a).transformCache,function(a){/^translate/i.test(a)?a="translate":/^scale/i.test(a)?a="scale":/^rotate/i.test(a)&&(a="rotate"),e[a]&&(b+=a+"("+e[a].join(" ")+") ",delete e[a])})}else{var f,h;m.each(g(a).transformCache,function(c){return f=g(a).transformCache[c],"transformPerspective"===c?(h=f,!0):(9===n&&"rotateZ"===c&&(c="rotate"),void(b+=c+f+" "))}),h&&(b="perspective"+h+" "+b)}v.setPropertyValue(a,"transform",b)}};v.Hooks.register(),v.Normalizations.register(),t.hook=function(a,b,c){var e;return a=f(a),m.each(a,function(a,f){if(g(f)===d&&t.init(f),c===d)e===d&&(e=t.CSS.getPropertyValue(f,b));else{var h=t.CSS.setPropertyValue(f,b,c);"transform"===h[0]&&t.CSS.flushTransformCache(f),e=h}}),e};var w=function(){function a(){return i?C.promise||null:n}function e(a,e){function f(f){var n,o;if(i.begin&&0===z)try{i.begin.call(q,q)}catch(r){setTimeout(function(){throw r},1)}if("scroll"===D){var w,x,A,B=/^x$/i.test(i.axis)?"Left":"Top",E=parseFloat(i.offset)||0;i.container?p.isWrapped(i.container)||p.isNode(i.container)?(i.container=i.container[0]||i.container,w=i.container["scroll"+B],A=w+m(a).position()[B.toLowerCase()]+E):i.container=null:(w=t.State.scrollAnchor[t.State["scrollProperty"+B]],x=t.State.scrollAnchor[t.State["scrollProperty"+("Left"===B?"Top":"Left")]],A=m(a).offset()[B.toLowerCase()]+E),l={scroll:{rootPropertyValue:!1,startValue:w,currentValue:w,endValue:A,unitType:"",easing:i.easing,scrollData:{container:i.container,direction:B,alternateValue:x}},element:a},t.debug&&console.log("tweensContainer (scroll): ",l.scroll,a)}else if("reverse"===D){if(n=g(a),!n)return;if(!n.tweensContainer)return void m.dequeue(a,i.queue);"none"===n.opts.display&&(n.opts.display="auto"),"hidden"===n.opts.visibility&&(n.opts.visibility="visible"),n.opts.loop=!1,n.opts.begin=null,n.opts.complete=null,u.easing||delete i.easing,u.duration||delete i.duration,i=m.extend({},n.opts,i),o=m.extend(!0,{},n?n.tweensContainer:null);for(var F in o)if("element"!==F){var G=o[F].startValue;o[F].startValue=o[F].currentValue=o[F].endValue,o[F].endValue=G,p.isEmptyObject(u)||(o[F].easing=i.easing),t.debug&&console.log("reverse tweensContainer ("+F+"): "+JSON.stringify(o[F]),a)}l=o}else if("start"===D){n=g(a),n&&n.tweensContainer&&n.isAnimating===!0&&(o=n.tweensContainer);var H=function(b,c){var f,g,h;return p.isArray(b)?(f=b[0],!p.isArray(b[1])&&/^[\d-]/.test(b[1])||p.isFunction(b[1])||v.RegEx.isHex.test(b[1])?h=b[1]:(p.isString(b[1])&&!v.RegEx.isHex.test(b[1])||p.isArray(b[1]))&&(g=c?b[1]:j(b[1],i.duration),b[2]!==d&&(h=b[2]))):f=b,c||(g=g||i.easing),p.isFunction(f)&&(f=f.call(a,e,y)),p.isFunction(h)&&(h=h.call(a,e,y)),[f||0,g,h]};m.each(s,function(a,b){if(RegExp("^"+v.Lists.colors.join("$|^")+"$").test(v.Names.camelCase(a))){var c=H(b,!0),e=c[0],f=c[1],g=c[2];if(v.RegEx.isHex.test(e)){for(var h=["Red","Green","Blue"],i=v.Values.hexToRgb(e),j=g?v.Values.hexToRgb(g):d,k=0;k=1&&console.log("Unit ratios: "+JSON.stringify(h),a),h};if(/[\/*]/.test(U))S=T;else if(T!==S&&0!==O)if(0===M)S=T;else{h=h||W();var X=/margin|padding|left|right|width|text|word|letter/i.test(K)||/X$/.test(K)||"x"===K?"x":"y";switch(T){case"%":O*="x"===X?h.percentToPxWidth:h.percentToPxHeight;break;case"px":break;default:O*=h[T+"ToPx"]}switch(S){case"%":O*=1/("x"===X?h.percentToPxWidth:h.percentToPxHeight);break;case"px":break;default:O*=1/h[S+"ToPx"]}}switch(U){case"+":M=O+M;break;case"-":M=O-M;break;case"*":M=O*M;break;case"/":M=O/M}l[K]={rootPropertyValue:Q,startValue:O,currentValue:O,endValue:M,unitType:S,easing:N},t.debug&&console.log("tweensContainer ("+K+"): "+JSON.stringify(l[K]),a)}else t.debug&&console.log("Skipping ["+P+"] due to a lack of browser support.")}l.element=a}l.element&&(v.Values.addClass(a,"velocity-animating"),J.push(l),n=g(a),n&&(""===i.queue&&(n.tweensContainer=l,n.opts=i),n.isAnimating=!0),z===y-1?(t.State.calls.push([J,q,i,null,C.resolver]),t.State.isTicking===!1&&(t.State.isTicking=!0,k())):z++)}var h,i=m.extend({},t.defaults,u),l={};switch(g(a)===d&&t.init(a),parseFloat(i.delay)&&i.queue!==!1&&m.queue(a,i.queue,function(b){t.velocityQueueEntryFlag=!0,g(a).delayTimer={setTimeout:setTimeout(b,parseFloat(i.delay)),next:b}}),i.duration.toString().toLowerCase()){case"fast":i.duration=200;break;case"normal":i.duration=r;break;case"slow":i.duration=600;break;default:i.duration=parseFloat(i.duration)||1}t.mock!==!1&&(t.mock===!0?i.duration=i.delay=1:(i.duration*=parseFloat(t.mock)||1,i.delay*=parseFloat(t.mock)||1)),i.easing=j(i.easing,i.duration),i.begin&&!p.isFunction(i.begin)&&(i.begin=null),i.progress&&!p.isFunction(i.progress)&&(i.progress=null),i.complete&&!p.isFunction(i.complete)&&(i.complete=null),i.display!==d&&null!==i.display&&(i.display=i.display.toString().toLowerCase(),"auto"===i.display&&(i.display=t.CSS.Values.getDisplayType(a))),i.visibility!==d&&null!==i.visibility&&(i.visibility=i.visibility.toString().toLowerCase()),i.mobileHA=i.mobileHA&&t.State.isMobile&&!t.State.isGingerbread,i.queue===!1?i.delay?setTimeout(f,i.delay):f():m.queue(a,i.queue,function(a,b){return b===!0?(C.promise&&C.resolver(q),!0):(t.velocityQueueEntryFlag=!0,void f(a))}),""!==i.queue&&"fx"!==i.queue||"inprogress"===m.queue(a)[0]||m.dequeue(a)}var h,i,n,o,q,s,u,x=arguments[0]&&(arguments[0].p||m.isPlainObject(arguments[0].properties)&&!arguments[0].properties.names||p.isString(arguments[0].properties));if(p.isWrapped(this)?(i=!1,o=0,q=this,n=this):(i=!0,o=1,q=x?arguments[0].elements||arguments[0].e:arguments[0]),q=f(q)){x?(s=arguments[0].properties||arguments[0].p,u=arguments[0].options||arguments[0].o):(s=arguments[o],u=arguments[o+1]);var y=q.length,z=0;if(!/^(stop|finish|finishAll)$/i.test(s)&&!m.isPlainObject(u)){var A=o+1;u={};for(var B=A;BparseFloat(N[1]))}if(C(K,H)){var D="Velocity UI Pack: You need to update Velocity (jquery.velocity.js) to a newer version. Visit http://github.com/julianshapiro/velocity.";alert(D);throw new Error(D)}B.RegisterEffect=B.RegisterUI=function(M,L){function N(Q,T,P,R){var S=0,O;J.each(Q.nodeType?[Q]:Q,function(U,V){if(R){P+=U*R}O=V.parentNode;J.each(["height","paddingTop","paddingBottom","marginTop","marginBottom"],function(W,X){S+=parseFloat(B.CSS.getPropertyValue(V,X))})});B.animate(O,{height:(T==="In"?"+":"-")+"="+S},{queue:false,easing:"ease-in-out",duration:P*(T==="In"?0.6:1)})}B.Redirects[M]=function(O,Q,T,d,P,a){var U=(T===d-1);if(typeof L.defaultDuration==="function"){L.defaultDuration=L.defaultDuration.call(P,P)}else{L.defaultDuration=parseFloat(L.defaultDuration)}for(var X=0;X1){J.each(L.reverse(),function(N,R){var Q=L[N+1];if(Q){var O=(R.options&&R.options.sequenceQueue===false)?"begin":"complete",S=Q.options&&Q.options[O],P={};P[O]=function(){var T=Q.elements||Q.e;var U=T.nodeType?[T]:T;S&&S.call(U,U);B(R)};Q.options=J.extend({},Q.options,P)}});L.reverse()}B(L[0])}}((window.jQuery||window.Zepto||window),window,document)}));; ;(function (window) { $.WOPOP_EFFECTS={}; $.WOPOP_EFFECTS['fromleft']=function(dom,options){ var orileft=parseInt($(dom).css('left'))||0; var delay=$.WOPOP_EFFECTS._parseNum(options['delay'],1); var duration=$.WOPOP_EFFECTS._parseNum(options['duration'],1); _getEffectDom(dom).done(function(dom){ $(dom).css('left',0-$(dom).width()); dom.velocity({left:orileft+'px'}, {delay:(delay*1000),duration: (duration*1000),display: "block",easing:'ease',complete:create_complete(options)}) }) } $.WOPOP_EFFECTS['frombottom']=function(dom,options){ var oritop=parseInt($(dom).css('top'))||0; var delay=$.WOPOP_EFFECTS._parseNum(options['delay'],1); var duration=$.WOPOP_EFFECTS._parseNum(options['duration'],1); if(!$.wismobile||$.WOPOP_EFFECTS._isEditMode()){ var container=$('#scroll_container'); }else{ var container=$(window); } _getEffectDom(dom).done(function(dom){ $(dom).css('top',container.scrollTop()+container.height()+$(dom).height()); dom.velocity({top:oritop+'px'}, {delay:(delay*1000),duration: (duration*1000),display: "block",easing:'ease',complete:create_complete(options)}) }) } $.WOPOP_EFFECTS['fromright']=function(dom,options){ var orileft=parseInt($(dom).css('left'))||0; var delay=$.WOPOP_EFFECTS._parseNum(options['delay'],1); var duration=$.WOPOP_EFFECTS._parseNum(options['duration'],1); if(!$.wismobile||$.WOPOP_EFFECTS._isEditMode()){ var container=$('#scroll_container'); }else{ var container=$(window); } _getEffectDom(dom).done(function(dom){ $(dom).css('left',container.width()-$(dom).width()); dom.velocity({left:orileft+'px'}, {delay:(delay*1000),duration: (duration*1000),display: "block",easing:'ease',complete:create_complete(options)}) }) } $.WOPOP_EFFECTS['fromtop']=function(dom,options){ var oritop=parseInt($(dom).css('top'))||0; var delay=$.WOPOP_EFFECTS._parseNum(options['delay'],1); var duration=$.WOPOP_EFFECTS._parseNum(options['duration'],1); if(!$.wismobile||$.WOPOP_EFFECTS._isEditMode()){ var container=$('#scroll_container'); }else{ var container=$(window); } _getEffectDom(dom).done(function(dom){ // 考虑「通栏」元素(bug#4284) var $layer = $(dom), initop = ($layer.attr("fatherid")||"").length ? 0 : (container.scrollTop() - $(dom).height()); $layer.css("top", initop); //$(dom).css('top',container.scrollTop()-$(dom).height()); dom.velocity({top:oritop+'px'}, {delay:(delay*1000),duration: (duration*1000),display: "block",easing:'ease',complete:create_complete(options)}) }) } $.WOPOP_EFFECTS['fade']=function(dom,options){ var orival=parseInt($(dom).css('opacity'))||1; var delay=$.WOPOP_EFFECTS._parseNum(options['delay'],1); var duration=$.WOPOP_EFFECTS._parseNum(options['duration'],1); _getEffectDom(dom).done(function(dom){ $(dom).css('opacity',0); dom.velocity({opacity:orival}, {delay:(delay*1000),duration: (duration*1000),display: "block",easing:'ease-out',complete:create_complete(options)}) }) } $.WOPOP_EFFECTS['rotation']=function(dom,options){ var delay=$.WOPOP_EFFECTS._parseNum(options['delay'],1); var duration=$.WOPOP_EFFECTS._parseNum(options['duration'],1); $.Velocity.hook($(dom), "rotateY", "180deg"); $(dom).show(); _getEffectDom(dom).done(function(dom){ dom.velocity({rotateY:["0deg","180deg"]}, {delay:(delay*1000),duration: (duration*1000),display: "block",easing:'ease',complete:create_complete(options)}) }) } $.WOPOP_EFFECTS['rotation2d']=function(dom,options){ var delay=$.WOPOP_EFFECTS._parseNum(options['delay'],1); var duration=$.WOPOP_EFFECTS._parseNum(options['duration'],1); $(dom).show(); _getEffectDom(dom).done(function(dom){ dom.velocity({rotateZ:["360deg","0deg"]}, {delay:(delay*1000),duration: (duration*1000),display: "block",easing:'linear'}) .velocity({rotateZ:["360deg","0deg"]}, {delay:0,duration: (duration*1000),display: "block",loop:true,easing:'linear',complete:create_complete(options)}) }) } $.WOPOP_EFFECTS['bounceIn']=function(dom,options){ var delay=$.WOPOP_EFFECTS._parseNum(options['delay'],1); var duration=$.WOPOP_EFFECTS._parseNum(options['duration'],1); $.Velocity.hook($(dom), "scale", "0.3"); $(dom).css('opacity',0); _getEffectDom(dom).done(function(dom){ dom .velocity({scale:[1.05,0.3],opacity:[1,0]},{delay:(delay*1000),duration: (duration*333),display: "block"}) .velocity({scale:[0.7,1.05]},{delay:0,duration: (duration*333),display: "block"}) .velocity({scale:[1,0.7]},{delay:0,duration: (duration*333),display: "block",complete:create_complete(options)}) }) } $.WOPOP_EFFECTS['big2small']=function(dom,options){ var delay=$.WOPOP_EFFECTS._parseNum(options['delay'],1); var duration=$.WOPOP_EFFECTS._parseNum(options['duration'],1); $.Velocity.hook($(dom), "scale", "2"); _getEffectDom(dom).done(function(dom){ dom.velocity({scale:[1,2],opacity:[1,0]}, {delay:(delay*1000),duration: (duration*1000),display: "block",easing:'ease-in',complete:create_complete(options)}) }) } $.WOPOP_EFFECTS['small2big']=function(dom,options){ var delay=$.WOPOP_EFFECTS._parseNum(options['delay'],1); var duration=$.WOPOP_EFFECTS._parseNum(options['duration'],1); $.Velocity.hook($(dom), "scale", "0.5"); _getEffectDom(dom).done(function(dom){ dom.velocity({scale:[1,0.5],opacity:[1,0]}, {delay:(delay*1000),duration: (duration*1000),display: "block",easing:'ease-in',complete:create_complete(options)}) }) } $.WOPOP_EFFECTS['fadeFromLeft']=function(dom,options){ var orileft=parseInt($(dom).css('left'))||0; var orival=parseInt($(dom).css('opacity'))||1; var delay=$.WOPOP_EFFECTS._parseNum(options['delay'],1); var duration=$.WOPOP_EFFECTS._parseNum(options['duration'],1); _getEffectDom(dom).done(function(dom){ $(dom).css('left',0-$(dom).width()); $(dom).css('opacity',0); dom.velocity({left:orileft+'px',opacity:orival}, {delay:(delay*1000),duration: (duration*1000),display: "block",easing:'ease',complete:create_complete(options)}) }) } $.WOPOP_EFFECTS['fadeFromBottom']=function(dom,options){ var oritop=parseInt($(dom).css('top'))||0; var orival=parseInt($(dom).css('opacity'))||1; var delay=$.WOPOP_EFFECTS._parseNum(options['delay'],1); var duration=$.WOPOP_EFFECTS._parseNum(options['duration'],1); if(!$.wismobile||$.WOPOP_EFFECTS._isEditMode()){ var container=$('#scroll_container'); }else{ var container=$(window); } _getEffectDom(dom).done(function(dom){ $(dom).css('top',container.scrollTop()+container.height()+$(dom).height()); $(dom).css('opacity',0); dom.velocity({top:oritop+'px',opacity:orival}, {delay:(delay*1000),duration: (duration*1000),display: "block",easing:'ease',complete:create_complete(options)}) }) } $.WOPOP_EFFECTS['fadeFromRight']=function(dom,options){ var orileft=parseInt($(dom).css('left'))||0; var orival=parseInt($(dom).css('opacity'))||1; var delay=$.WOPOP_EFFECTS._parseNum(options['delay'],1); var duration=$.WOPOP_EFFECTS._parseNum(options['duration'],1); if(!$.wismobile||$.WOPOP_EFFECTS._isEditMode()){ var container=$('#scroll_container'); }else{ var container=$(window); } _getEffectDom(dom).done(function(dom){ $(dom).css('left',container.width()-$(dom).width()); dom.velocity({left:orileft+'px',opacity:orival}, {delay:(delay*1000),duration: (duration*1000),display: "block",easing:'ease',complete:create_complete(options)}) }) } $.WOPOP_EFFECTS['fadeFromTop']=function(dom,options){ var oritop=parseInt($(dom).css('top'))||0; var orival=parseInt($(dom).css('opacity'))||1; var delay=$.WOPOP_EFFECTS._parseNum(options['delay'],1); var duration=$.WOPOP_EFFECTS._parseNum(options['duration'],1); if(!$.wismobile||$.WOPOP_EFFECTS._isEditMode()){ var container=$('#scroll_container'); }else{ var container=$(window); } _getEffectDom(dom).done(function(dom){ $(dom).css('top',0-(container.scrollTop()+$(dom).height()+container.height())); dom.velocity({top:oritop+'px',opacity:orival}, {delay:(delay*1000),duration: (duration*1000),display: "block",easing:'ease',complete:create_complete(options)}) }) } $.WOPOP_EFFECTS['light']=function(dom,options){ var delay=$.WOPOP_EFFECTS._parseNum(options['delay'],1); var duration=$.WOPOP_EFFECTS._parseNum(options['duration'],1); _getEffectDom(dom).done(function(dom){ dom.velocity({opacity: 1}, {delay:(delay*1000),duration:(duration*500),display: "block",easing:'ease-in-out'}) .velocity({opacity:[0,1]}, {delay:0,duration: (duration*500),display: "block",loop:true,easing:'ease-in-out',complete:create_complete(options)}) }) } $.WOPOP_EFFECTS['effect.frombottom']=function(dom,options){ var reverse_effect=options['effect']+'reverse'; var oritop=parseInt($(dom).css('top'))||0; var delay=$.WOPOP_EFFECTS._parseNum(options['delay'],1); var duration=$.WOPOP_EFFECTS._parseNum(options['duration'],1); var type=options['type']; if(!$.wismobile||$.WOPOP_EFFECTS._isEditMode()){ var container=$('#scroll_container'); }else{ var container=$(window); } _getEffectDom(dom).done(function(dom){ var initop=container.scrollTop()+container.height()+$(dom).height(); if(type=='jfpro_list' || type=='groupon_list' || type=='seckill_list' || type=='product_list' || type=='tb_product_list' || type=='graphic' || type=='article_list'){ initop = $(dom).height(); } initop=parseInt(initop); oritop=parseInt(oritop); $(dom).css('top',initop+'px'); dom.velocity({top:oritop+'px'}, {delay:0,duration: duration,display: "block",easing:'ease',begin:create_begin(),complete:create_complete(options)}).velocity("reverse", { queue: reverse_effect }) }) } $.WOPOP_EFFECTS['effect.fromtop']=function(dom,options){ var reverse_effect=options['effect']+'reverse'; var oritop=parseInt($(dom).css('top'))||0; var type=options['type']; var delay=$.WOPOP_EFFECTS._parseNum(options['delay'],1); var duration=$.WOPOP_EFFECTS._parseNum(options['duration'],1); if(!$.wismobile||$.WOPOP_EFFECTS._isEditMode()){ var container=$('#scroll_container'); }else{ var container=$(window); } _getEffectDom(dom).done(function(dom){ // 考虑「通栏」元素(bug#4284) var $layer = $(dom), initop = ($layer.attr("fatherid")||"").length ? 0 : (container.scrollTop() - $(dom).height()); if(type=='jfpro_list' || type=='groupon_list' || type=='seckill_list' || type=='product_list' || type=='tb_product_list' || type=='graphic' || type=='article_list'){ initop = $(dom).height(); initop='-'+initop; } initop=parseInt(initop); oritop=parseInt(oritop); $layer.css("top", initop+'px'); // $(dom).css('top',container.scrollTop()-$(dom).height()); dom.velocity({top:oritop+'px'}, {delay:0,duration: duration,display: "block",easing:'ease',begin:create_begin(),complete:create_complete(options)}).velocity("reverse", { queue: reverse_effect }) }) } //放大 $.WOPOP_EFFECTS['effect.zoomin']=function(dom,options,hover){ var reverse_effect=options['effect']+'reverse'; var delay=$.WOPOP_EFFECTS._parseNum(options['delay'],1); var duration=$.WOPOP_EFFECTS._parseNum(options['duration'],1); _getEffectDom(dom).done(function(dom){ if(hover==1){ dom.velocity({scale:[1.1]}, {delay:0,duration: duration,display: "block",easing:'ease',begin:create_begin(),complete:create_complete(options)}) .velocity({scale:[1]}, { queue: reverse_effect,duration: duration }) }else{ dom.velocity({scale:[1.1]}, {delay:0,duration: duration,display: "block",easing:'ease',begin:create_begin(),complete:create_complete(options)}) .velocity({scale:[1]}, {duration: duration }) } }) } //从小到大 $.WOPOP_EFFECTS['effect.small2big']=function(dom,options,hover){ var reverse_effect=options['effect']+'reverse'; var delay=$.WOPOP_EFFECTS._parseNum(options['delay'],1); var duration=$.WOPOP_EFFECTS._parseNum(options['duration'],1); $.Velocity.hook($(dom), "scale", [0]); _getEffectDom(dom).done(function(dom){ if(hover==1){ dom.velocity({scale:[1.1]}, {delay:0,duration: duration,display: "block",easing:'ease',begin:create_begin(),complete:create_complete(options)}) .velocity({scale:[0]}, { queue: reverse_effect,duration: duration }) }else{ dom.velocity({scale:[1.1]}, {delay:0,duration: duration,display: "block",easing:'ease',begin:create_begin(),complete:create_complete(options)}) .velocity({scale:[0]}) } }) } //缩小 $.WOPOP_EFFECTS['effect.zoomout']=function(dom,options,hover){ var delay=$.WOPOP_EFFECTS._parseNum(options['delay'],1); var duration=$.WOPOP_EFFECTS._parseNum(options['duration'],1); var reverse_effect=options['effect']+'reverse'; _getEffectDom(dom).done(function(dom){ if(hover==1){ dom.velocity({scale:[.9]}, {delay:0,duration: duration,display: "block",easing:'ease-in',begin:create_begin(),complete:create_complete(options)}) .velocity({scale:[1]}, { queue: reverse_effect,duration: duration}) }else{ dom.velocity({scale:[.9]}, {delay:0,duration: duration,display: "block",easing:'ease-in',begin:create_begin(),complete:create_complete(options)}) .velocity("reverse") } }) } //从大到小 $.WOPOP_EFFECTS['effect.big2small']=function(dom,options,hover){ var delay=$.WOPOP_EFFECTS._parseNum(options['delay'],1); var duration=$.WOPOP_EFFECTS._parseNum(options['duration'],1); var reverse_effect=options['effect']+'reverse'; // $.Velocity.hook($(dom), "scale", [1.3]); _getEffectDom(dom).done(function(dom){ if(hover==1){ dom.velocity({scale:[.9]}, {delay:0,duration: duration,display: "block",easing:'ease-in',begin:create_begin(),complete:create_complete(options)}) .velocity({scale:[1.1]}, { queue: reverse_effect,duration: duration,display: "none"}) }else{ dom.velocity({scale:[.9]}, {delay:0,duration: duration,display: "block",easing:'ease-in',begin:create_begin(),complete:create_complete(options)}) .velocity({scale:[1.1]}, {duration: duration,display: "none"}) } }) } $.WOPOP_EFFECTS['effect.moveleft']=function(dom,options,hover){ var delay=$.WOPOP_EFFECTS._parseNum(options['delay'],1); var duration=$.WOPOP_EFFECTS._parseNum(options['duration'],1); var reverse_effect=options['effect']+'reverse'; _getEffectDom(dom).done(function(dom){ if(hover==1){ dom.velocity({translateX:'-5%'}, {delay:0,duration: duration,display: "block",easing:'ease-in',begin:create_begin(),complete:create_complete(options)}) .velocity({translateX:'0'}, { queue: reverse_effect,duration: duration }) }else{ dom.velocity({translateX:'-5%'}, {delay:0,duration: duration,display: "block",easing:'ease-in',begin:create_begin(),complete:create_complete(options)}) .velocity("reverse") } }) } $.WOPOP_EFFECTS['effect.moveright']=function(dom,options,hover){ var delay=$.WOPOP_EFFECTS._parseNum(options['delay'],1); var duration=$.WOPOP_EFFECTS._parseNum(options['duration'],1); var reverse_effect=options['effect']+'reverse'; _getEffectDom(dom).done(function(dom){ if(hover==1){ dom.velocity({translateX:'5%'}, {delay:0,duration: duration,display: "block",easing:'ease-in',begin:create_begin(),complete:create_complete(options)}) .velocity({translateX:"0"}, { queue: reverse_effect,duration: duration }) }else{ dom.velocity({translateX:'5%'}, {delay:0,duration: duration,display: "block",easing:'ease-in',begin:create_begin(),complete:create_complete(options)}) .velocity("reverse") } }) } $.WOPOP_EFFECTS['effect.movetop']=function(dom,options,hover){ var delay=$.WOPOP_EFFECTS._parseNum(options['delay'],1); var duration=$.WOPOP_EFFECTS._parseNum(options['duration'],1); var reverse_effect=options['effect']+'reverse'; _getEffectDom(dom).done(function(dom){ if(hover==1){ dom.velocity({translateY:'-5%'}, {delay:0,duration: duration,display: "block",easing:'ease-in',begin:create_begin(),complete:create_complete(options)}) .velocity({translateY:'0'}, { queue: reverse_effect,duration: duration }) }else{ dom.velocity({translateY:'-5%'}, {delay:0,duration: duration,display: "block",easing:'ease-in',begin:create_begin(),complete:create_complete(options)}) .velocity("reverse") } }) } $.WOPOP_EFFECTS['effect.movebottom']=function(dom,options,hover){ var delay=$.WOPOP_EFFECTS._parseNum(options['delay'],1); var duration=$.WOPOP_EFFECTS._parseNum(options['duration'],1); var reverse_effect=options['effect']+'reverse'; _getEffectDom(dom).done(function(dom){ if(hover==1){ dom.velocity({translateY:'5%'}, {delay:0,duration: duration,display: "block",easing:'ease-in',begin:create_begin(),complete:create_complete(options)}) .velocity({translateY:'0'}, { queue: reverse_effect,duration: duration }) }else{ dom.velocity({translateY:'5%'}, {delay:0,duration: duration,display: "block",easing:'ease-in',begin:create_begin(),complete:create_complete(options)}) .velocity("reverse") } }) } $.WOPOP_EFFECTS['effect.rotation']=function(dom,options){ var delay=$.WOPOP_EFFECTS._parseNum(options['delay'],1); var duration=$.WOPOP_EFFECTS._parseNum(options['duration'],1); $.Velocity.hook($(dom), "rotateY", "180deg"); _getEffectDom(dom).done(function(dom){ dom.velocity({rotateY:["0deg","180deg"]}, {delay:0,duration: duration,display: "block",easing:'ease',begin:create_begin(),complete:create_complete(options)}) }) } $.WOPOP_EFFECTS['effect.bounce']=function(dom,options){ var delay=$.WOPOP_EFFECTS._parseNum(options['delay'],1); var duration=$.WOPOP_EFFECTS._parseNum(options['duration'],1); $(dom).show(); _getEffectDom(dom).done(function(dom){ dom.velocity("callout.bounce", {delay:0,duration: duration,display: "block",easing:'ease',begin:create_begin(),complete:create_complete(options)}) }) } $.WOPOP_EFFECTS['effect.shake']=function(dom,options){ var delay=$.WOPOP_EFFECTS._parseNum(options['delay'],1); var duration=$.WOPOP_EFFECTS._parseNum(options['duration'],1); _getEffectDom(dom).done(function(dom){ dom.velocity("callout.shake", {delay:0,duration: duration,display: "block",easing:'ease',begin:create_begin(),complete:create_complete(options)}) }) } $.WOPOP_EFFECTS['effect.flash']=function(dom,options){ var delay=$.WOPOP_EFFECTS._parseNum(options['delay'],1); var duration=$.WOPOP_EFFECTS._parseNum(options['duration'],1); _getEffectDom(dom).done(function(dom){ dom.velocity("callout.flash", {delay:0,duration: duration,display: "block",easing:'ease',begin:create_begin(),complete:create_complete(options)}) }) } $.WOPOP_EFFECTS['effect.pulse']=function(dom,options){ var delay=$.WOPOP_EFFECTS._parseNum(options['delay'],1); var duration=$.WOPOP_EFFECTS._parseNum(options['duration'],1); _getEffectDom(dom).done(function(dom){ dom.velocity("callout.pulse", {delay:0,duration: duration,display: "block",easing:'ease',begin:create_begin(),complete:create_complete(options)}) }) } $.WOPOP_EFFECTS['effect.swing']=function(dom,options){ var delay=$.WOPOP_EFFECTS._parseNum(options['delay'],1); var duration=$.WOPOP_EFFECTS._parseNum(options['duration'],1); _getEffectDom(dom).done(function(dom){ dom.velocity("callout.swing", {delay:0,duration: duration,display: "block",easing:'ease',begin:create_begin(),complete:create_complete(options)}) }) } $.WOPOP_EFFECTS['effect.tada']=function(dom,options){ var delay=$.WOPOP_EFFECTS._parseNum(options['delay'],1); var duration=$.WOPOP_EFFECTS._parseNum(options['duration'],1); _getEffectDom(dom).done(function(dom){ dom.velocity("callout.tada", {delay:0,duration: duration,display: "block",easing:'ease',begin:create_begin(),complete:create_complete(options)}) }) } //transition.fadeIn $.WOPOP_EFFECTS['effect.fade']=function(dom,options,hover){ var reverse_effect=options['effect']+'reverse'; var delay=$.WOPOP_EFFECTS._parseNum(options['delay'],1); var duration=$.WOPOP_EFFECTS._parseNum(options['duration'],1); _getEffectDom(dom).done(function(dom){ if(hover==1){ dom.velocity("transition.fadeIn", { duration: duration }) .velocity("transition.fadeOut", { queue: reverse_effect,duration: duration }) }else{ dom.velocity("transition.fadeIn", { duration: duration }).velocity("reverse",{delay:500}); } }) } $.WOPOP_EFFECTS['effect.slidedown']=function(dom,options,hover){ var delay=$.WOPOP_EFFECTS._parseNum(options['delay'],1); var duration=$.WOPOP_EFFECTS._parseNum(options['duration'],1); var reverse_effect=options['effect']+'reverse'; _getEffectDom(dom).done(function(dom){ var domtop=parseInt(dom.css('top')); var lasttop=''; if(domtop){ lasttop=domtop; }else{ lasttop=0; } var $top=$(dom).height(); $(dom).css('top','-'+$top+'px'); if(hover==1){ dom.velocity({top:0}, {delay:0,duration: duration,display: "block",easing:'ease-in',begin:create_begin(),complete:create_complete(options)}) .velocity({top:-$top}, { queue: reverse_effect,duration: duration }) }else{ dom.velocity({top:0}, {delay:0,duration: duration,display: "block",easing:'ease-in',begin:create_begin(),complete:create_complete(options)}) .velocity({top:-$top},{delay:600} ) } }) } $.WOPOP_EFFECTS['effect.slidetop']=function(dom,options,hover){ var delay=$.WOPOP_EFFECTS._parseNum(options['delay'],1); var duration=$.WOPOP_EFFECTS._parseNum(options['duration'],1); var reverse_effect=options['effect']+'reverse'; _getEffectDom(dom).done(function(dom){ var $top=$(dom).height(); if(hover==1){ $(dom).css('top',$top+'px'); dom.velocity({top:0}, {delay:0,duration: duration,display: "block",easing:'ease-in',begin:create_begin(),complete:create_complete(options)}) .velocity({top:$top}, { queue: reverse_effect }) }else{ $(dom).css('top',$top+'px'); dom.velocity({top:0}, {delay:0,duration: duration,display: "block",easing:'ease-in',begin:create_begin(),complete:create_complete(options)}) .velocity({top:$top},{delay:600}) } }) } $.WOPOP_EFFECTS['effect.slideleft']=function(dom,options){ var delay=$.WOPOP_EFFECTS._parseNum(options['delay'],1); var duration=$.WOPOP_EFFECTS._parseNum(options['duration'],1); var reverse_effect=options['effect']+'reverse'; _getEffectDom(dom).done(function(dom){ var $left=$(dom).width(); $(dom).css('left','-'+$left+'px'); dom.velocity({left:0}, {delay:0,duration: duration,display: "block",easing:'ease-in',begin:create_begin(),complete:create_complete(options)}) .velocity({left:-$left}, { queue: reverse_effect }) }) } $.WOPOP_EFFECTS['effect.slideright']=function(dom,options){ var delay=$.WOPOP_EFFECTS._parseNum(options['delay'],1); var duration=$.WOPOP_EFFECTS._parseNum(options['duration'],1); var reverse_effect=options['effect']+'reverse'; _getEffectDom(dom).done(function(dom){ var $left=$(dom).width(); $(dom).css('left',$left+'px'); dom.velocity({left:0}, {delay:0,duration: duration,display: "block",easing:'ease-in',begin:create_begin(),complete:create_complete(options)}) .velocity({left:$left}, { queue: reverse_effect }) }) } $.WOPOP_EFFECTS['shutter.horizontal']=function(dom,options){ var delay=$.WOPOP_EFFECTS._parseNum(options['delay'],1); var duration=$.WOPOP_EFFECTS._parseNum(options['duration'],1); var reverse_effect=options['effect']+'reverse'; $.Velocity.hook($(dom), "transformOriginX", [ "50%", "50%" ]); $.Velocity.hook($(dom), "scaleX", 0); _getEffectDom(dom).done(function(dom){ dom.velocity({scaleX: 1}, {delay:0,duration: duration,display: "block",easing:'ease-out',begin:create_begin(),complete:create_complete(options)}) .velocity({scaleX:0}, { queue: reverse_effect }) }) } $.WOPOP_EFFECTS['shutter.vertical']=function(dom,options){ var delay=$.WOPOP_EFFECTS._parseNum(options['delay'],1); var duration=$.WOPOP_EFFECTS._parseNum(options['duration'],1); var reverse_effect=options['effect']+'reverse'; $.Velocity.hook($(dom), "transformOriginY", [ "50%", "50%" ]); $.Velocity.hook($(dom), "scaleY", 0); _getEffectDom(dom).done(function(dom){ dom.velocity({scaleY: 1}, {delay:0,duration: duration,display: "block",easing:'ease-out',begin:create_begin(),complete:create_complete(options)}) .velocity({scaleY: 0}, { queue: reverse_effect }) }) } var effect_map = 'callout.bounce,callout.shake,callout.flash,callout.pulse,callout.swing,callout.tada,'; effect_map += 'transition.flipBounceXOut,transition.flipBounceYOut,transition.whirlOut,transition.shrinkOut,transition.perspectiveLeftOut,'; effect_map += 'transition.expandOut,transition.bounceOut,transition.slideUpBigOut,transition.slideDownBigOut,transition.perspectiveRightOut,'; effect_map += 'transition.slideLeftBigOut,transition.slideRightBigOut,transition.perspectiveUpOut,transition.perspectiveDownOut'; $.each(effect_map.split(','), function(i, effect_name){ $.WOPOP_EFFECTS[effect_name] = function(dom, options){ var delay = $.WOPOP_EFFECTS._parseNum(options['delay'], 1); var duration = $.WOPOP_EFFECTS._parseNum(options['duration'], 1); var l = 0,loop = $.WOPOP_EFFECTS._parseNum(options['loop'], 0), loop_infinite = $.WOPOP_EFFECTS._parseNum(options['loop_infinite'], 0); _getEffectDom(dom).done(function(dom){ (function(){ var self = arguments.callee; dom.velocity(effect_name, { delay: (delay * 1000),duration: (duration * 1000), display: 'block',complete: function(){ if (loop_infinite ? true : l < loop) self(); else create_complete(options).call(this); l++; } }); })(); }); }; }); function create_complete(effects){ //返回conplete函数 return function(){ var dom=$(this); $(dom).data('run',0); if(dom.data('wopop_effect_oristyle')){ dom.attr('style',dom.data('wopop_effect_oristyle')).show(); dom.removeData('wopop_effect_oristyle'); } dom.trigger('effect_complete'); dom.removeClass('now_effecting'); var cancontainer=$('#overflow_canvas_container'); if(cancontainer.length){ var stacks=cancontainer.data('stacks'); if(stacks && stacks.length){ var newstacks=[]; for(var i=0;i' + '
    '); } self = self.siblings('#imgmask'); } if(imgeffects.effectrole=='content'){ var opacity=(1-(imgeffects.opacity)/100).toFixed(2); var colorval=imgeffects.popcolor,colorrgb=$.WOPOP_EFFECTS.colorRgb(colorval); var bgcolor='rgba('+colorrgb[0]+','+colorrgb[1]+','+colorrgb[2]+','+opacity+')'; var t_top=imgeffects.top,c_top=imgeffects.ctop; var t_align=imgeffects['text-align'],c_align=imgeffects['ctext-align']; var t_weight=imgeffects['font-weight'],c_weight=imgeffects['cfont-weight']; var t_decoration=imgeffects['text-decoration'],c_decoration=imgeffects['ctext-decoration']; var t_family=imgeffects['font-family'],c_family=imgeffects['cfont-family']; var t_fontsize=imgeffects['font-size'],c_fontsize=imgeffects['cfont-size']; var cfontcolor=imgeffects['ccolor'],tfontcolor=imgeffects['color']; var twordcount=imgeffects['titlecount'],cwordcount=imgeffects['contentcount']; if(imgeffects.type=="tb_product_list" || imgeffects.type=="product_list" || imgeffects.type=="seckill_list" || imgeffects.type=="groupon_list" || imgeffects.type=="jfpro_list"){ self.each(function(){ var width = self.width()+2,height=self.height()+2; var imgparent = $(this).closest('li'); var effecttitle = $(this).attr('alt'); var effectcontent = imgparent.find('.product_desc').data('desc'); if(twordcount){ effecttitle=subString(effecttitle,twordcount); } if(cwordcount){ effectcontent=subString(effectcontent,cwordcount); } if(!$(this).siblings('#imgmask').length) { $(this).after('
    ' + '
    '+effecttitle+'
    ' + '
    '+effectcontent+'
    '); } }); } if(imgeffects.type=='article_list'){ self.each(function(){ var imgparent = $(this).closest('li'); var effecttitle = imgparent.find("input[class=articleid]").data('title'); var effectcontent = imgparent.find("input[class=abstract]").data('desc'); if(twordcount){ effecttitle=subString(effecttitle,twordcount); } if(cwordcount){ effectcontent=subString(effectcontent,cwordcount); } if(!$(this).siblings('#imgmask').length) { $(this).after('
    ' + '
    '+effecttitle+'
    ' + '
    '+effectcontent+'
    '); } }); } if(imgeffects.type=='media' || imgeffects.type=='graphic'){ var effecttitle=imgeffects.titledesc,effectcontent=imgeffects.contentdesc; if(!self.siblings('#imgmask').length){ self.after('
    ' + '
    '+effecttitle+'
    ' + '
    '+effectcontent+'
    '); } } self = self.siblings('#imgmask'); } if(imgeffects.effectrole=='title'){ var opacity=(1-(imgeffects.opacity)/100).toFixed(2); var colorval=imgeffects.popcolor,colorrgb=$.WOPOP_EFFECTS.colorRgb(colorval); var bgcolor='rgba('+colorrgb[0]+','+colorrgb[1]+','+colorrgb[2]+','+opacity+')'; var t_align=imgeffects['text-align'],t_weight=imgeffects['font-weight'],t_decoration=imgeffects['text-decoration'],t_fontsize=imgeffects['font-size'],t_family=imgeffects['font-family']; var tfontcolor=imgeffects['color']; var titlecount=imgeffects['titlecount']; if(imgeffects.type=="tb_product_list" || imgeffects.type=="product_list" || imgeffects.type=="seckill_list" || imgeffects.type=="groupon_list" || imgeffects.type=="jfpro_list"){ self.each(function(){ var imgparent = $(this).closest('li'); var effecttitle = $(this).attr('alt'); if(titlecount){ effecttitle=subString(effecttitle,titlecount); } if(imgeffects.type=="tb_product_list"){var marginLeft=1}else{marginLeft=0} var heigth=$(this).height()+1; var width=$(this).width(); var popheight=imgeffects.popheight; var margintop=heigth-popheight; if(!$(this).siblings('#imgmask').length) { $(this).after('
    ' + '
    '+effecttitle+'
    '); } }); } if(imgeffects.type=='article_list'){ self.each(function(){ var heigth=$(this).height(); var popheight=imgeffects.popheight; var margintop=heigth-popheight; var imgparent = $(this).closest('li'); var effecttitle = imgparent.find("input[class=articleid]").data('title'); if(titlecount){ effecttitle=subString(effecttitle,titlecount); } if(!$(this).siblings('#imgmask').length) { $(this).after('
    ' + '
    '+effecttitle+'
    '); } }); } if(imgeffects.type=='media' || imgeffects.type=='graphic'){ var effecttitle=imgeffects.contentdesc; if(!self.siblings('#imgmask').length){ var heigth=self.closest("div.img_over").height()+4; var width=self.width(); var popheight=imgeffects.popheight; var margintop=heigth-popheight; self.after('
    ' + '
    '+effecttitle+'
    '); } } self = self.siblings('#imgmask'); } if(infixedparentel.length){ if(infixedparentel.parent().is('#canvas')&&parseInt(infixedparentel.css('top'))==0){ return; } if(self.is('.now_effecting')) return; } if($.WOPOP_EFFECTS[imgeffects.effect] && browsersupport){ self.addClass('now_effecting'); if(!$.wismobile&&self.closest('#canvas').length ){ _getEffectDom(self).done(function(){ var cancontainer=$('#overflow_canvas_container'); if(cancontainer.length){ var stacks=cancontainer.data('stacks'); if(!stacks) stacks=[]; if(!cancontainer.data('is_overflow')){ var canh=$('#canvas').outerHeight(); cancontainer.css('overflow-y','hidden').css('height',canh+'px').data('is_overflow',true); var timer=setInterval(function(){ if(cancontainer.data('is_overflow')){ var nowcanh=$('#canvas').outerHeight(); if(nowcanh != canh){ canh=nowcanh; cancontainer.css('height',canh+'px'); } }else{ clearInterval(timer); } },1000); } stacks.push(self); cancontainer.data('stacks',stacks); } }) } $.WOPOP_EFFECTS[imgeffects.effect](self,imgeffects,hover); }else{ self.show(); } if(imgeffects.type=='media' && imgeffects.effectrole =='dantu'){ var leavedom=self; }else{ var leavedom=self.parent(); } // if(imgeffects.type=='media' && imgeffects.effectrole=='title'){ // var leavedom=self.parent(); // } // if(imgeffects.type=='media' && imgeffects.effect=='effect.big2small'){ // var leavedom=self.parent(); // } leavedom.mouseleave(function(){ var queue=imgeffects.effect+'reverse'; // self.velocity("stop"); self.velocity("finish"); self.data('run',0); self.dequeue(queue); if(imgeffects.effectrole !='dantu'){ setTimeout(function () { self.remove(); }, imgeffects.duration); }else{ self.data('over',''); } }); } } } $.fn.wopop_effect_command=function(command,args){ if(command=='stop'){ return this.each(function() { stop_effect($(this)); }); } } $.WOPOP_EFFECTS._parseNum=function(num,orival){ if(num==0) return 0; return num || orival; } function stop_effect(dom){ dom.velocity("stop", true); if(dom.data('wopop_effect_oristyle')) { $.Velocity.hook($(dom), "scale", "1"); $.Velocity.hook($(dom), "rotateY", "0deg"); var deg=dom.data('deg')||0; $.Velocity.hook($(dom), "rotateZ", deg+"deg"); dom.attr('style',dom.data('wopop_effect_oristyle')); } // if(dom.data('wopop_effect_oristyle')) console.log(dom,dom.data('wopop_effect_oristyle')) dom.removeData('wopop_effect_oristyle'); dom.removeClass('now_effecting'); dom.trigger('effect_complete'); var cancontainer=$('#overflow_canvas_container'); if(cancontainer.length){ var stacks=cancontainer.data('stacks'); if(stacks && stacks.length){ var newstacks=[]; for(var i=0;i dom.ab_pos('top');//parseInt(dom.css('top')); } function subString(str, len, hasDot) { var newLength = 0; var hasDot=1; var newStr = ""; var chineseRegex = /[^\x00-\xff]/g; var singleChar = ""; var strLength = str.replace(chineseRegex,"**").length; for(var i = 0;i < strLength;i++) { singleChar = str.charAt(i).toString(); if(singleChar.match(chineseRegex) != null) { newLength += 1; } else { newLength++; } if(newLength > len) { break; } newStr += singleChar; } if(hasDot && strLength > len) { newStr += "..."; } return newStr; } $.WOPOP_EFFECTS.colorRgb=function(orival){ var reg = /^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/; var sColor = orival.toLowerCase(); if(sColor && reg.test(sColor)){ if(sColor.length === 4){ var sColorNew = "#"; for(var i=1; i<4; i+=1){ sColorNew += sColor.slice(i,i+1).concat(sColor.slice(i,i+1)); } sColor = sColorNew; } //处理六位的颜色值 var sColorChange = []; for(var i=1; i<7; i+=2){ sColorChange.push(parseInt("0x"+sColor.slice(i,i+2))); } return sColorChange; }else{ return sColor; } } $.WOPOP_EFFECTS._hasEffectFilter=function(){ var self=$(this); if(self.attr('deleted')=='deleted') return false; var effects=self.data('wopop_effects'); if(effects&&effects.effect){ return true; } return false; } $.WOPOP_EFFECTS._isEditMode=function(){ if($.saveLayout&&$.isFunction($.saveLayout.save)) return true; return false; } var curfullpageindex; $.WOPOP_EFFECTS._setindex=function(index){ curfullpageindex=index; } $.WOPOP_EFFECTS._getindex=function(){ return curfullpageindex; } var effectparams={ fromleft:{delay:0,duration:1.20}, frombottom:{delay:0,duration:1.20}, fromright:{delay:0,duration:1.20}, fromtop:{delay:0,duration:1.20}, fade:{delay:0,duration:0.90}, rotation:{delay:0,duration:1.20}, rotation2d:{delay:0,duration:1.20}, bounceIn:{delay:0,duration:2.20}, big2small:{delay:0,duration:1.20}, small2big:{delay:0,duration:1.20}, fadeFromLeft:{delay:0,duration:1.20}, fadeFromBottom:{delay:0,duration:1.20}, fadeFromRight:{delay:0,duration:1.20}, fadeFromTop:{delay:0,duration:1.20}, light:{delay:0,duration:1.20} } $.WOPOP_EFFECTS._getDefaultParam=function(effectname){ var opts=effectparams[effectname]; if(!opts) opts={delay:0,duration:1.20} return opts; } })(window); ; function fullpagefooterinit(){$(".fullpage_alllist").each(function(){if($('.full_column:not([deleted="deleted"])').length>0){wp_alert(translate("full_column.already in backplane"))}});$(".full_pagescroll").each(function(){fullpagescrollinit($(this))});$(document).bind("fullpage_scroll_pro",function(A,B){setTimeout(function(){if($("#wp-property_settings2").length){var C="";$("#canvas #fullPage-nav li").each(function(D){});$(".fullpage_alllist .section").each(function(D){if($(this).hasClass("active")){C=D+1}});if(C>0){$("#all_extra_img_div .wp-manage-panel-album-img").each(function(D){var E=D+1;if(E==C){$(this).addClass("action")}else{$(this).removeClass("action")}})}}},100)})}function fullpagescrollinit(A){A.children(".full_width").css({left:0-canv.offset().left-$.parseInteger($("#canvas").css("borderLeftWidth")),width:$("#scroll_container_bg").width()});A.wp_rightkey();if(A.is(":not(.isplate)")){fullpagescrollresize(A);setTimeout(function(){fullpagescrolldrop(A)},1300)}}function fullpagescrolldrag(A){A.wp_drag()}function fullpagescrollresize(A){var B=function(E){A.each(function(){var F="ui-resizable-"+E;var G=$('

    ');G.css({zIndex:1000});$(this).children(".full_width").append(G)})};var C=function(E){A.each(function(){var F="placeholder-"+E;var G=$('
    ');G.css({zIndex:1000}).hide();$(this).children(".full_width").append(G)})};B("n");B("s");C("w");C("e");var D;A.resizable({handles:{n:">.full_width .ui-resizable-n",s:">.full_width .ui-resizable-s"},noinit:true,canvascontain:"#canvas",distance:0,concernLock:true,scroll:true,create:function(){$(this).children(".full_width").find(".ui-resizable-handle").hide()},start:function(I,E){D=$.getFullColChildMaxButtomfullpage(A);var G=$(this);var H=new ResizeCommand(G.attr("id"));var K=["top","height"];var J={};for(var F=0;F');F.css({zIndex:1000});$(this).children(".full_content").append(F)})};C("n");C("s");C("w");C("e");var B=A.children(".full_content");B.children(".li-placeholder").hide();B.children(".placeholder-n").css({"border-top":"#FF9900 dashed 4px"});B.children(".placeholder-s").css({"border-bottom":"#FF9900 dashed 4px"});B.children(".placeholder-e").css({"border-right":"#FF9900 dashed 4px"});B.children(".placeholder-w").css({"border-left":"#FF9900 dashed 4px"});B.droppable({tolerance:"pointer",accept:".full_pagescroll,.cstlayer,.wp-new-tool-second-link,.wp-manage-plugin-block",drop:function(G,D){var E=$.ui.ddmanager.current;if($.getElementAreaInf($(E.element))==$.getElementAreaInf(A)){if(!A.hasClass("ui-modselected")||$(E.element).is(".wp-new-tool-second-link")||$(E.element).is(".wp-manage-plugin-block")){$(this).children(".li-placeholder").hide();var H=$(document).data("layer_final_drop_id");var F=$.chooseBiggerColumn(H,A.attr("id"));$(document).data("layer_final_drop_id",F)}}},over:function(J,N){var H=false;$(".ui-modselected").each(function(){if($(this).data("cstlayerstatus")=="unlock"){H=true}});if(H){return}var I=$.ui.ddmanager.current;if($.getElementAreaInf($(I.element))==$.getElementAreaInf(A)||$(I.element).is(".wp-new-tool-second-link")||$(I.element).is(".wp-manage-plugin-block")){if(!A.hasClass("ui-modselected")||$(I.element).is(".wp-new-tool-second-link")||$(I.element).is(".wp-manage-plugin-block")){var D=A.attr("id");var F=$(document).data("layer_drop_over_id");if(D!=F){var K=$.chooseBiggerColumn(F,D);if(K==D){var M=$(this);$(this).children(".li-placeholder").show();if(F){var G=$("#"+F);var E=G.children(".full_content").data("droppable");E["isover"]=0;E["isout"]=1;E._out.call(E,J)}$(document).data("layer_drop_over_id",D)}else{var L=$(this).data("droppable");L["isover"]=0;L["isout"]=1}}}}},out:function(G,D){var H=false;$(".ui-modselected").each(function(){if($(this).data("cstlayerstatus")=="unlock"){H=true}});if(H){return}var E=$.ui.ddmanager.current;if($.getElementAreaInf($(E.element))==$.getElementAreaInf(A)){if(!A.hasClass("ui-modselected")||$(E.element).is(".wp-new-tool-second-link")||$(E.element).is(".wp-manage-plugin-block")){$(this).children(".li-placeholder").hide();var F=$(document).data("layer_drop_over_id");if(F==A.attr("id")){$(document).removeData("layer_drop_over_id")}}}}})}function full_page_block_drop(B){var A=B.closest(".full_pagescroll");B.droppable({tolerance:"pointer",accept:".full_pagescroll,.cstlayer,.wp-new-tool-second-link,.wp-manage-plugin-block",drop:function(F,C){var D=$.ui.ddmanager.current;if($.getElementAreaInf($(D.element))==$.getElementAreaInf(A)){if(!A.hasClass("ui-modselected")||$(D.element).is(".wp-new-tool-second-link")||$(D.element).is(".wp-manage-plugin-block")){$(this).children(".li-placeholder").hide();var G=$(document).data("layer_final_drop_id");var E=$.chooseBiggerColumn(G,A.attr("id"));$(document).data("layer_final_drop_id",E)}}},over:function(I,M){var G=false;$(".ui-modselected").each(function(){if($(this).data("cstlayerstatus")=="unlock"){G=true}});if(G){return}var H=$.ui.ddmanager.current;if($.getElementAreaInf($(H.element))==$.getElementAreaInf(A)||$(H.element).is(".wp-new-tool-second-link")||$(H.element).is(".wp-manage-plugin-block")){if(!A.hasClass("ui-modselected")||$(H.element).is(".wp-new-tool-second-link")||$(H.element).is(".wp-manage-plugin-block")){var C=A.attr("id");var E=$(document).data("layer_drop_over_id");if(C!=E){var J=$.chooseBiggerColumn(E,C);if(J==C){var L=$(this);$(this).children(".li-placeholder").show();if(E){var F=$("#"+E);if(!F.is(".wp_droppable")){var D=F.children(".full_content").data("droppable")}else{var D=F.children(".drop_box").data("droppable")}D["isover"]=0;D["isout"]=1;D._out.call(D,I)}$(document).data("layer_drop_over_id",C)}else{var K=$(this).data("droppable");K["isover"]=0;K["isout"]=1}}}}},out:function(F,C){var G=false;$(".ui-modselected").each(function(){if($(this).data("cstlayerstatus")=="unlock"){G=true}});if(G){return}var D=$.ui.ddmanager.current;if($.getElementAreaInf($(D.element))==$.getElementAreaInf(A)){if(!A.hasClass("ui-modselected")||$(D.element).is(".wp-new-tool-second-link")||$(D.element).is(".wp-manage-plugin-block")){$(this).children(".li-placeholder").hide();var E=$(document).data("layer_drop_over_id");if(E==A.attr("id")){$(document).removeData("layer_drop_over_id")}}}}})}function fullpagescroll_propblk_init(){var B;for(var A in $.fullpagebackgroundPropDefaults){(function(){var F=A;var D=null;if($.inArray(F,["fullpage_moveto_prevop","fullpage_moveto_nextop"])!=-1){var C="",E="";switch(F){case"fullpage_moveto_prevop":E="top";C='';break;case"fullpage_moveto_nextop":E="bottom";C='';break}D={mousedown:function(){var I=$(this);var G=I.offset();var J=$("#scroll_container");var H=J.scrollTop();$(C).appendTo(J).css({top:function(){return(G.top+H-25-39)+"px"},left:G.left+"px"}).click(function(K){$("#"+$.bgselectedid).wp_setorder(E,$.bgselectedid);$(this).remove();I.removeClass("local");K.preventDefault()})},mouseup:function(){}}}$("#"+F).mousedown(function(G){var H=$(this);H.addClass("local");if($(".wp-moveto_fstlevel,.wp-moveto_lstlevel").size()){$(".wp-moveto_fstlevel,.wp-moveto_lstlevel").remove()}if(D!=null){D.mousedown.apply(this)}G.preventDefault()}).mouseup(function(G){var I=this,H=$(I);H.removeClass("local");$.fullpagebackgroundPropDefaults[F].apply(this);if(D!=null){D.mouseup.apply(this)}G.preventDefault()})})()}}(function(B){function A(C){var D={};D[C.prop("id")]="null";var F=C;while(true){var E=B.getElementFatherid(F);if(E=="none"){break}D[E]=F.prop("id");F=B("#"+E)}return D}B.chooseBiggerColumn=function(J,E){var L=E;if(J==E){return L}if(J){var K=B("#"+J);var F=B("#"+E);var N=A(K);var G=A(F);var M="canvas";if(!N[M]){M="site_footer"}var H=M;var I=M;while(H==I){H=N[H];I=G[I];if(H=="null"||I=="null"){break}}if(H=="null"){L=E}else{if(I=="null"){L=J}else{var D=B.parseInteger(B("#"+H).css("z-index"));var C=B.parseInteger(B("#"+I).css("z-index"));if(D>C){L=J}}}}return L};B.transferToColumn=function(C,E){var K=B.getElementFatherid(C);if(K!=E){var D=B("#"+E);var G=C.ab_pos("top");var F=D.ab_pos("top");var I=C.ab_pos("left");var J=D.ab_pos("left");var H=D;if(E!="canvas"){if(D.is(".wp_droppable")){H=D.children(".drop_box")}else{H=D.children(".full_content")}}C.detach().attr("fatherid",E).css({"top":(G-F),"left":(I-J)}).appendTo(H);if(E=="site_footer"||E=="canvas"){C.removeAttr("fatherid")}}};B.getElementAreaInf=function(C){return C.attr("inbuttom")=="1"?"site_footer":"canvas"};B.addFullPagescroll=function(D){if(B.wisplate){wp_alert(translate("fullpage.plate do not support add"));return false}if(B('.fullpage_alllist:not([deleted="deleted"])').length>0){wp_alert(translate("fullpage.already plugin"));return false}if(B('.cstlayer[type="mads"]:not([deleted="deleted"])').length>0){wp_alert(translate("Multi-filter and fullpage.already plugin"));return false}if(B('.full_column:not([deleted="deleted"])').length>0){wp_alert(translate("full_column.already Please remove"));return false}setTimeout(function(){if(B("#site_footer").length>0){var E="fullpage";if(B.wismobile){E="mfullpage"}if(confirm(translate("fullpage.Please hide site_footer"))){B.post(parseToURL(E,"prosf"),{pid:B.page_id},function(G){var F=B.parseJSON(G);if(F.result=="OK"){B("#site_footer").remove()}else{location.reload();return false}}).error(function(){location.reload();return false})}else{return false}}},500);var C=function(J,E){var F=J;if(E){var K=B(F).filter(".full_pagescroll");var M=K.prop("id");var L="layer"+fGuid();F=F.replace(new RegExp(M,"g"),L)}var G=B(F).appendTo("#canvas");G.find(".full_pagescroll").each(function(){fullpagescrollinit(B(this))});G.css("z-index",100);var H=relativeToAbsoluteURL("/ppr/ppr/plugin/title/css/title.css");if(B("body").data("title")!=H){B("body").data("title",H);var O=document.getElementsByTagName("head").item(0);var I=document.createElement("link");I.href=/ppr/ppr/H;I.rel="stylesheet";I.type="text/css";O.appendChild(I)}B(".ui-modselected").each(function(){B.hidWidgetBorder(B(this));if(B(this).hasClass("graphic_edited")){actived_graphic()}});B.fullpageunselectbgdiv(G);B.fullpageselectbgdiv(G.find(".full_pagescroll:eq(0)"));new AddCommand(G.prop("id")).insert();var N=new Array();N[0]=new Array(parseInt(B("#"+G.prop("id")).css("z-index")),G.prop("id"));B.zindexsort_new(N)};if(B.addFullPagescroll.html_cache){C(B.addFullPagescroll.html_cache,true);return}B.ajax({type:"GET",url:parseToURL("wp_widgets","gtfullpagescroll"),success:function(E){C(E,false)},error:function(F,E,G){wp_alert((G||E)+"(add a fullpagescroll).
    "+translate("Request failed!"));return false}})};B.curSelectableFather=function(){var C=B(".ui-modselected");if(C.length==0){B(document).data("cur_selectable_father",null);return null}else{var D=B.getElementFatherid(C.filter(":first"));B(document).data("cur_selectable_father",D);return D}};B.getElementFatherid=function(C){if(C.prop("id")=="canvas"||C.prop("id")=="site_footer"){return"none"}var D=C.attr("fatherid");if(!D||D==""){if(C.closest("#canvas").length>0){D="canvas"}else{if(C.closest("#site_footer").length>0){D="site_footer"}}}if(!B("#"+D).length){if(C.closest("#canvas").length>0){D="canvas"}else{if(C.closest("#site_footer").length>0){D="site_footer"}}C.removeAttr("fatherid")}return D};B.getFullColChildMaxButtomfullpage=function(C){var E=C.ab_pos_cnter("top");var D=E;C.find(".cstlayer,.full_pagescroll").each(function(){var F=B(this);var G=0;if(F.hasClass("cstlayer")){G=B.divrotate.getDegreeModMaxPoint(F,null,"buttom")}else{G=F.ab_pos_cnter("top")+B.parseInteger(F.css("height"))}if(DD)){C.width(R).height("auto");I=M-C.height();if(I<0){C.css({top:Math.ceil(I/2)+"px",left:"0px"})}else{if(I>0){C.height(M).width("auto");Q=R-C.width();C.css({top:"0px",left:Math.ceil(Q/2)+"px"})}else{C.css({top:"",left:"",position:""})}}}else{if(D||(H0){C.width(R).height("auto");I=M-C.height();C.css({top:Math.ceil(I/2)+"px",left:"0px"})}else{C.css({top:"",left:"",position:""})}}}}};B.wp_fullpag_mobile=function(){return(/iphone|ipod|ipad|Macintosh|android|Windows phone/i.test(navigator.userAgent.toLowerCase()))};setTimeout(function(){if(B.wismobile&&B.wisviewmode){}else{var C={width:320,height:B(window).height()};if(!B.wiseditmode){C={width:B(window).width(),height:B(window).height()};var F=B(".fullpage_alllist");var D=F.find(".section.active .bg > img");var E={width:0,height:0};B.wp_fullpagezoom(F,C,E,"noresize")}}},800)})(jQuery);; /* * To change this template, choose Tools | Templates * and open the template in the editor. */ function openImageChooserDialog(options){ window._imageChooserDefered=new $.Deferred(); options=$.extend({},options); var title=options.title||translate('fileManager.selectImage'); var width=options.width||883; var filetype=options.filetype||'pic'; var dialogid=options.id||'wp-picmanage_panel'; var zindex=options.zIndex||1003; var multi=options.multi||0; var mask = options.overlay; if (typeof mask === 'undefined') mask = true; //show_dialog(parseToURL("wp_widgets","common_pic_chooser",{filetype:filetype}), title,width, 0); wp_floatpanel(parseToURL('wp_widgets','common_pic_chooser',{filetype:filetype,multi:multi}),{ title: title, id: dialogid, width: width, overlay: mask, isCenter: true, swfFix: true, zIndex: zindex }); if(!options.cancelNotCloseDialog){ window._imageChooserDefered.fail(function(){ $.modal.close(); }) } return window._imageChooserDefered.promise(); } // Add 'link to file' function 2013/02/25 function openMyDocChooserDialog(options){ window._myDocChooserDefered = new $.Deferred();options = $.extend({},options); var title = options.title||translate('fileManager.myFile'),dwidth = options.width||883,icenter = options.isCenter||true, dialogid = options.id||'wp-file_explore',zindex = options.zIndex||1003,mask = options.overlay; if (typeof mask === 'undefined') mask = true; wp_floatpanel(parseToURL('wp_fileexplore', 'file_explore', {"geturl": '1'}), {swfFix: true, title: title,width: dwidth,isCenter: icenter,id: dialogid,zIndex: zindex,overlay: mask }); return window._myDocChooserDefered.promise(); } function transferToPageSetDialog(showdiv,hidediv,options){ window._pagesetDefered=new $.Deferred(); options=$.extend({},options); var dialogwin=window; if(options.iframe) dialogwin=parent; var title=options.title||translate('page.add'); var mode=options.mode||'create'; var url =''; if(mode=='edit'){ var pageid=options.pageid; url =parseToURL("wp_page","editpage",{id:pageid}); }else{ var additionparam=options.createparam||{}; url =parseToURL("wp_page","addpage",additionparam); } $.get(url, function(data) { $(showdiv).html(data).show(); $(hidediv).hide(); wp_update_floatpanel($('#wp-manage_menu'),title,376,function(dom){ dom.find('.wp-panel_button').hide(); dom.find('#page_set_prop_div .wp-panel_button').show(); }); }).error(function(xhr, textStatus, errorThrown) { wp_alert((errorThrown||textStatus)+"(edit/add a page).
    "+translate("Request failed!")); }) return window._pagesetDefered.promise(); } function transferToPageSetDialogcur(showdiv,hidediv,options){ window._pagesetDefered=new $.Deferred(); options=$.extend({},options); var dialogwin=window; if(options.iframe) dialogwin=parent; var title=options.title||translate('page.add'); var mode=options.mode||'create'; var url =''; var pageid=options.pageid; var modact=options.modact||'navigation'; var page_id=options.page_id; var supid=options.blockid; if(mode=='edit'){ url =parseToURL(modact,"editpage",{id:pageid,page_id:page_id,blockid:supid}); }else{ var additionparam=options.createparam||{}; url =parseToURL(modact,"addpage",{page_id:page_id,blockid:supid,parentid:pageid}); } $.post(url, {menudata:$("#"+supid).data("menudata")}, function(data) { $(showdiv).html(data).show(); $(hidediv).hide(); /* dialogwin.$('#osx-container').css('width',500); if(options.iframe) dialogwin.$('#osx-modal-data').find('iframe').width(500).height(480); dialogwin.$("#osx-modal-title").data('origin_title',dialogwin.$("#osx-modal-title").html()); dialogwin.$("#osx-modal-title").html(title); dialogwin.$.modal.setPosition(); */ }).error(function(xhr, textStatus, errorThrown) { wp_alert((errorThrown||textStatus)+"(edit/add a navigation page).
    "+translate("Request failed!")); }) return window._pagesetDefered.promise(); } function openPageSetDialog(options){ window._pagesetDefered=new $.Deferred(); options=$.extend({},options); var title=options.title||translate('page.add'); var width=options.width||400; var mode=options.mode||'create'; var url =''; if(mode=='edit'){ var pageid=options.pageid; url =parseToURL("wp_page","editpage",{id:pageid}); }else{ width = 400; var opts={}; if(options.mtype) opts._mtype=options.mtype; if(options.parentid) opts.parentid=options.parentid; url =parseToURL("wp_page","addpage",opts); } //show_dialog(url, title,width, 0); wp_floatpanel(url,{ title: title, contentClass: 'wp-site-set_panel_c', id: 'wp-add_page', overlay: true, isCenter: true, width: width, zIndex: 1002, cache:false, open: function(dom){ if(options.callback && $.isFunction(options.callback)){ $(dom).bind('addPageLink',function(e,url){ options.callback(url); }); } } }); if(!options.cancelDefaultOp){ window._pagesetDefered.done(function(data){ if(data.refresh){ $.saveLayout.save(true); window.location.reload(); $('#wp-add_page').triggerHandler('wpdialogclose'); }else{ setTimeout(function(){ $.saveLayout.save(true); window.location.href=/ppr/ppr/data.forward; },100); } }) window._pagesetDefered.fail(function(){ $('#wp-add_page').triggerHandler('wpdialogclose'); }) } return window._pagesetDefered.promise(); } // 创建“文章/产品分类、列表”链接相关 2012/07/16 function setModuleLink(mtype,callback){ openPageSetDialog({"mtype":mtype,"callback":callback}); } // IFRAME自适应高度 2012/07/12 function initFrame(frame,contentClass,height){ var self = frame,bh = self.contentWindow.document.body.scrollHeight, dh = self.contentWindow.document.documentElement.scrollHeight,max = Math.max; var $parent = $(self).closest('.wp-floatpanel_dialog'),otherh = 0,temph = max(bh,dh); temph+=1; if($.browser.msie){ temph = temph+25; } $parent.find('.'+contentClass).siblings().each(function(i,dom){ otherh += $(dom).outerHeight(true); }); var _float = function(numString){ var number = parseFloat(numString); if(isNaN(number)) return 0; return number; }; var seth = _float(height),maxh = seth ? seth : $(document).height(), difw = maxh - otherh - 10;// 上下间隔5像素 if(difw < temph) temph = difw; frame.height = max(temph,200); $(self).closest('.wp-floatpanel_dialog').triggerHandler('wpdialogsetpos'); } (function($){ var cachedtimer={}; $.multi_exec_once=function(key,func,interval){ var timer=cachedtimer[key]; if(timer != null){ clearTimeout(timer); delete cachedtimer[key]; } timer=setTimeout(func, interval); cachedtimer[key]=timer; } // 注册beforeLoaded方法 2012/07/11 var loadedhash = {}; $.beforeLoaded = { add: function(type, event, func){ if ($.isFunction(func)) { if(!loadedhash[type]) loadedhash[type] = {}; loadedhash[type][event] = func; } }, run: function(type, event, data){ var func = loadedhash[type]; if(typeof func == 'undefined') return false; func = func[event]; if($.isFunction(func)) return func(data); return false; } }; })(jQuery); // 更新并定位浮动窗口 function wp_update_floatpanel(dom, title, width, callback){ var $title = dom.find('.wp-title > h2'),curtitle = $title.html(); dom.width(width); if(title) $title.data('origin_title',curtitle); else title = curtitle; $title.html(title); if(callback && $.isFunction(callback)) callback(dom); // setPosition var win = window,winw = $(win).width(),winh = $(win).height(), floor = Math.floor,newh = dom.outerHeight(true); dom.css({'left': floor((winw-width)/2),'top': floor((winh-newh)/2)}); } /** * 个性化下拉框 */ ;(function($,undefined){ var namespace = '.wpcstselect'; $.widget('wp.cstselect',{ options : { selectclass:'wp-diy-selected'//样式 }, // 配置项 _create : function(){ var self = this; var selectclass=self.options.selectclass; if(selectclass.length==0){ selectclass='wp-diy-selected';} // 忽略多选的SELECT控件 if(self.element.prop("multiple")) return; self._doinit(self).done(function(dom,selopts){ var $ctarget = dom,$diysel = $ctarget.next('.'+selectclass+'-outside').find('.'+selectclass+''); // 设置默认值 setTimeout(function(){ var $cursel = $diysel.children('.'+selectclass+'-left'),difw = $cursel.siblings('.'+selectclass+'-button').outerWidth() + 2, pad = self._int($cursel.css("paddingLeft")) + self._int($cursel.css("paddingRight")),finalw = $diysel.width() - difw - pad + 1; if (finalw <= 0) finalw = Math.max(65, $ctarget.width()) - pad - 16; $cursel.width(finalw).attr("val",$ctarget.val()).html($ctarget.find('option:selected').html());$cursel = difw = finalw = null; },50); // 绑定CLICK事件 $diysel.bind('click'+namespace,function(e){ if(self.options.disabled || !selopts.length) return; var $selectedcnt = $(selopts).appendTo('body'),maxheight = $selectedcnt.outerHeight(true); self._selected($selectedcnt, $ctarget.val()); // 设置默认值 // 绑定LI:HOVER及CLICK事件 if ($selectedcnt.is(':hidden')) { var $target = $(this); $selectedcnt.find('li').bind('mouseenter'+namespace, function(e){ $(this).addClass('local').siblings().removeClass('local'); }).bind('mouseleave'+namespace, function(e){ $(this).removeClass('local'); }).bind('click'+namespace, function(e){ var $li = $(this),selval = $li.attr("val"); $target.children('.'+selectclass+'-left').html($li.html()).attr("val", selval); $ctarget.val(selval).trigger('change');// 捕获已绑定SELECT事件 }).end().slideDown('slow',function(){ var $selcnt = $(this); // 定位滚动条 2012/11/09 var selcnt = $selcnt[0],clienth = selcnt.clientHeight,$selected = $selcnt.find('li.local'); if ($selected.size() > 0) { var seltop = $._parseFloat($selcnt.css("top")), litop = seltop + $selected[0].offsetTop - selcnt.offsetTop + $selected.height(); if(clienth < litop) selcnt.scrollTop = litop - clienth; } // End $(document).one('click'+namespace,function(e){ $selcnt.slideUp().remove(); return false; }); }); $selectedcnt.find('input.searchable_txt').click(function(e){ e.stopPropagation(); }).bind('keyup',function(e){ if(e.keyCode==13) search_select_options($selectedcnt); }) $selectedcnt.find('.searchable_button').click(function(e){ e.stopPropagation(); search_select_options($selectedcnt); }) var txtw=$selectedcnt.find('.searchable_div').width()-10; $selectedcnt.find('input.searchable_txt').css('width',txtw+'px'); setSeloptsPos($target,$selectedcnt,maxheight); // 绑定RESIZE事件 $(window).resize(function(){ setSeloptsPos($target,$selectedcnt,maxheight); }); } }); function setSeloptsPos(target,dom,maxh){ var $target = target,pos = $target.offset(); dom.css({ "top": function(i,val){ var wnh = window.innerHeight||self.innerHeight||document.documentElement.clientHeight||document.body.clientHeight, _top = self._int(pos.top),_oh = $target.outerHeight(true),newtop = 0; if (wnh < _top + maxh + _oh) { newtop = Math.max(0, _top - maxh - 1); $(this).css({"border-bottom": 'none',"border-top": '1px solid #B5B5B5'}); } else newtop = _top + _oh + 1; wnh = _top = _oh = null; return newtop+'px'; },"left": function(i,val){ return self._int(pos.left)+'px'; } }); } function search_select_options($selectedcnt){ var search_value=$selectedcnt.find('input.searchable_txt').val(); $selectedcnt.find('li').each(function(){ var li_lel=$(this); var li_val= li_lel.html(); if(li_val.indexOf(search_value)===-1){ li_lel.hide(); }else{ li_lel.show(); } }) } }); }, value : function(value){ var self = this; var selectclass=self.options.selectclass; if(selectclass.length==0){ selectclass='wp-diy-selected';} var $target = self.element,$select = $target.next('.'+selectclass+'-outside'); $target.val(value); $select.find('.'+selectclass+'-left').attr("val",value).html($target.children('option:selected').html()); }, _doinit : function(dom){ var dtd = $.Deferred(),self = dom,$target = self.element; var isSearchable=self.element.hasClass('wp_hassearchable'); var selectclass=self.options.selectclass,_stripslashes = function(str){ return (str + '').replace(/\\(.?)/g, function(s, $1){ switch ($1) { case '\\': return '\\'; case '0': return '\u0000'; case '': return ''; default: return $1; } }); }; if(selectclass.length==0){ selectclass='wp-diy-selected';} $target.hide();// 隐藏SELECT控件 // 自定义类SELECT var selopt = '',selw = Math.max($target.width(), 65); var selhtm = '
    '; var search_html='';var search_class=''; if(isSearchable){ var imgsrc=/ppr/ppr/relativeToAbsoluteURL/index.html('template/default/images/searchico.png'); search_html ='
    '; search_class=' hassearchable '; } $target.children('option').each(function(i,c){ var self = c; selopt += '
  • '+_stripslashes(self.innerHTML)+'
  • '; }); selhtm += '
     
    '; $target.after(selhtm); dtd.resolve($target,'
    '+search_html+'
      '+selopt+'
    '); return dtd.promise(); }, _int : function(numstr){ var number = parseInt(numstr); if(isNaN(number)) return 0; return number; }, _selected : function(dom,value){ dom.find('li').each(function(i,c){ var $target = $(c),ent = ''; ent = ($target.attr("val") == value)?'addClass':'removeClass'; $target[ent]('local'); }); return true; }, enable : function(){ var self = this; var selectclass=self.options.selectclass; if(selectclass.length==0){ selectclass='wp-diy-selected';} var $select = self.element.next('.'+selectclass+'-outside'); $select.find('.'+selectclass+'-left').css("color","#5A5A5A"); $select.find('.'+selectclass+'-button > a').removeClass('disabled'); $.Widget.prototype.enable.call(self); }, disable : function(){ var self = this; var selectclass=self.options.selectclass; if(selectclass.length==0){ selectclass='wp-diy-selected';} var $target = self.element,$select = $target.next('.'+selectclass+'-outside'); // 还原SELECT控件默认值 var firstopt = $target.find('option')[0]; $target[0].selectedIndex = 0; $select.find('.'+selectclass+'-left').css("color","#7C7C7C").attr("val",firstopt.value).html(firstopt.innerHTML); $select.find('.'+selectclass+'-button > a').addClass('disabled'); $.Widget.prototype.disable.call(self); }, destroy : function(){ var self = this; var selectclass=self.options.selectclass; if(selectclass.length==0){ selectclass='wp-diy-selected';} $(document).unbind(namespace); self.element.next('.'+selectclass+'-outside').unbind(namespace).remove(); $.Widget.prototype.destroy.call(self); } }); })(jQuery); /** * 文本框绑定的事件 * event(参数) - 触发回 调的本地事件对象 * -> onkeydown: function(event){ * -> // do something * -> } * -> onkeyup: function(event){ * -> // do something * -> } * -> onchange: function(event){ * -> // do something * -> } * -> onfocus: function(event){ * -> // do something * -> } * -> onblur: function(event){ * -> // do something * -> } */ ;(function($,undefined){ var readyToOnBlur = true, eventNamespace = '.wpcstinput'; $.widget('wp.cstinput',{ options : { value : '', // 文本默认值, regexp : /^\d+(\.\d+)?$/, // 输入值验证正则 range : [0], // 可输入值范围[min,max](大于0) maxlength : 4, // 可输入值长度 unit : 'px', // 可输入值单位(像素) step : 1, // 递增/减步长 style : '', // 显示区域样式 nmnode_style : '', // 文本框父节点样式 btnnode_style : '', // 箭头父节点样式 upbtn_style : '', // 上箭头节点样式 downbtn_style : '', // 下箭头节点样式 complete : function(){} // 方向键的回调函数(第一个 参数为当前对象,第二个参数为递增/减的值) }, _create : function(){ var $this = this, $input = $this.element, options = $this.options; var uistyle = (options.hasOwnProperty('style') && options.style.length) ? ' style="'+options.style+'"' : '', nmstyle = (options.hasOwnProperty('nmnode_style') && options.nmnode_style.length) ? ' style="'+options.nmnode_style+'"' : '', btnstyle = (options.hasOwnProperty('btnnode_style') && options.btnnode_style.length) ? ' style="'+options.btnnode_style+'"' : '', upstyle = (options.hasOwnProperty('upbtn_style') && options.upbtn_style.length) ? ' style="'+options.upbtn_style+'"' : '', downstyle = (options.hasOwnProperty('downbtn_style') && options.downbtn_style.length) ? ' style="'+options.downbtn_style+'"' : ''; $input.wrap('
    ' +'
    '); // Default value if(options.hasOwnProperty('value') && options.regexp.test(options.value)) $input.focus().val(options.value); // Maxlength if(options.hasOwnProperty('maxlength') && /^[1-9]{1}\d*$/.test(options.maxlength)) $input.attr('maxlength',options.maxlength); // Unit(像素) if(options.hasOwnProperty('unit') && options.unit.length) $input.closest('.wp_cstinput_helper').after('
    '+options.unit+'
    '); // Bind input events $.each(['keydown','keyup','change','focus','blur'],function(i,event){ $input.bind(event+eventNamespace,function(e){ if(!readyToOnBlur && (event == 'blur')) return false; $this._trigger('on'+event, e, null); }); }); // Bind buttons events var $buttons, upbtn, downbtn; $buttons = $this.buttons = $input.closest('.wp_cstinput_helper').find('.minplus_helper > span'); upbtn = $buttons[0]; downbtn = $buttons[1]; $buttons.mousedown(mouseDown).mouseup(mouseUp).mouseout(mouseUp); function mouseDown(){ if(options.disabled) return; var step = (this === upbtn) ? options.step : -options.step; $input.focus(); $input.select(); readyToOnBlur = false; $this._doCount(step); return false; } function mouseUp(){ if (!readyToOnBlur) { // $this._stopCount(); readyToOnBlur = true; } return false; } }, _doCount : function(step){ var newval, range = this.options.range, curval = this.element[0].value; if(!curval.length){ // input值为空时,点击值变为0 leiminglin 2014/4/22 curval = this.element[0].value = 0; } newval = this._parseValue(curval) + step; if($.isFunction(range)){ range=range.apply(this.element[0]) } // 范围限定 if ($.isArray(range) && (range.length > 0)) { var min,max; if(typeof range[0] != 'undefined') min = range[0]; if(typeof range[1] != 'undefined') max = range[1]; // 溢出判断 if((step < 0) && (typeof min === 'number') && (newval < min)) newval = min; if((step > 0) && (typeof max === 'number') && (newval > max)) newval = max; } this.element[0].value = newval; // 绑定方 向键的回调函数 if($.isFunction(this.options.complete)) this.options.complete(this.element,newval); }, _parseValue : function(numString){ var number = parseFloat(numString); if(isNaN(number)) return 0; return number; }, enable : function(){ this.buttons.removeClass('cstinput_disabled'); $.Widget.prototype.enable.call(this); }, disable : function(){ this.buttons.addClass('cstinput_disabled'); $.Widget.prototype.disable.call(this); }, destroy : function(){ var $this = this.element, $cstinput_helper = $this.closest('.wp_cstinput_helper'); $this.removeAttr('maxlength').unbind(eventNamespace); $cstinput_helper.before($this[0]); $cstinput_helper.siblings('.wp_cstunit_helper').remove().end().remove(); $.Widget.prototype.destroy.call(this); } }); })(jQuery); // 自定义垂直滚动条 2014/02/07 ;(function($, undefined){ var namespace = 'simroll', getMscrollWidth = function(){ var noScroll,scroll,oDiv = document.createElement("DIV"); oDiv.style.cssText = "position:absolute;top:-1000px;width:100px;height:100px;overflow:hidden;"; noScroll = document.body.appendChild(oDiv).clientWidth; oDiv.style.overflowY = "scroll"; scroll = oDiv.clientWidth; document.body.removeChild(oDiv); return noScroll - scroll; }; $.widget('wp.mscroll', { options : { difleft: 0,/*滚动条自定义偏移量*/ maskleft: 0,/*滚动条遮罩层left*/ barleft: 0,/*滚动条滑块left*/ height: 0,/*滚动条height*/ maskbg: '#fff', maskcname: 'wp-mobile-device-mask',/*滚动条遮罩层class*/ barcname: 'wp-mobile-scrollbar'/*滚动条滑块class*/ }, _create : function(){ var self = this,creatid = '-'+self._getRandomStr(),maskbg = (self.options.maskbg||'').length?'background:'+self.options.maskbg:'', barstr = '
    '; barstr += '
    '; self.options.creatid = creatid; self.element.before(barstr); self._setScrollPos(creatid); self._bindScroll(creatid); }, _setScrollPos : function(id){ var prefid = namespace+id,barleft = 0,self = this,$target = self.element, $mask = $target.prevAll('#'+prefid+'-mask'),$bar = $target.prevAll('#'+prefid+'-bar'); $mask.add($bar).css({"left": function(){ var curtype = $(this).attr("id").replace(prefid+'-', ''); if (self.options[curtype+'left']) barleft = self.options[curtype+'left']; else { var swidth = getMscrollWidth() || 16; barleft = self._parseFloat($target.css("left")) + $target.width() - swidth; } return barleft+'px'; },"height": ($target.height() + 1)+'px',"visibility": 'visible'}); $bar.css("left", function(){return (barleft + self._parseFloat(self.options.difleft||0))+'px'}); }, _bindScroll : function(id){ var self = this,$target = self.element,$bar = $target.prevAll('#'+namespace+id+'-bar'),paneH = 0, $spane = $bar.children('span.pane'),containerH = $target.height(),paneContainerH = 0; $target.bind("scroll."+namespace, function(e){ var contentH = this.scrollHeight;$bar.height(self.options.height||containerH); if (containerH < contentH) paneH = self._parseFloat(containerH*containerH / contentH); $spane.height(paneH); var maxtop = containerH - paneH, movey = self._parseFloat(this.scrollTop * containerH / contentH); $spane.css("top", Math.min(movey, maxtop)+'px'); }).triggerHandler("scroll."+namespace); // Pane Handler (function(){ var curtop,curpagey; $spane.bind("mousedown."+namespace, function(e){ e.preventDefault();curpagey = e.pageY; curtop = self._parseFloat($spane.css("top")); $spane.addClass("scrolling"); $(document).bind("mousemove."+namespace, function(e){ if (! $spane.hasClass("scrolling")) return; var newtop = curtop + e.pageY - curpagey,panetop = Math.max(0, newtop), target = $target.get(0),contentH = target.scrollHeight; // Reset pane-top var scrltop = self._parseFloat(panetop * contentH / containerH), maxtop = containerH - $spane.height(); if (panetop >= maxtop) scrltop = contentH - target.clientHeight; $target.scrollTop(scrltop);return false; }).bind("mouseup."+namespace, function(e){ e.preventDefault();$(document).unbind("."+namespace); $(parent.document).unbind(".rmscroll"); if (! $spane.hasClass("scrolling")) return; $spane.removeClass("scrolling"); }); $(parent.document).bind("mouseup.rmscroll",function(){$(document).unbind("."+namespace)}); }).bind("mouseup."+namespace, function(e){ $(document).unbind("."+namespace); $(parent.document).unbind(".rmscroll");return false; }); })(); }, _getRandomStr : function(len){ len = len || 16; var chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789', maxlen = chars.length,result = ''; for(var i = 0; i < len; i++){ result += chars.charAt(Math.floor(Math.random() * maxlen)); } return result; }, _parseFloat : function(numstr){ var number = parseFloat(numstr); if (isNaN(number)) return 0; return number; }, destroy : function(){ var self = this,prefid = '#'+namespace+self.options.creatid; $(document).add(self.element).unbind("."+namespace); self.element.prevAll(prefid+'-mask,'+prefid+'-bar').remove(); $.Widget.prototype.destroy.call(self); } }); })(jQuery); //js生成guid function fGuid(bOrg) { // try // { // var sGuid=new ActiveXObject('scriptlet.typelib').GUID // } // catch(e) // { // var sGuid=fGuidCst(); // } var sGuid=fGuidCst(); if(bOrg) return sGuid; return (sGuid+'').replace(/\{|\}|-/g,''); function fGuidCst() { var sGuid=''; for(var i=1; i<=32; i++) { var nNum=0; nNum=parseInt(Math.random()*16); sGuid+=nNum.toString(16); if(i==8||i==12||i==16||i==20)sGuid+='-'; } return '{'+sGuid.toUpperCase()+'}'; } } (function(window){ /** * 对话框缓存ajax请求 */ var html_caches={}; // 对话框ID var dialog_ids = []; /** * Float对话框 * (String)load_url - 加载的地址 * (Object)option - 配置项(title|titlebg|contentClass|id|width|height|left|top|isCenter|overlay|showBottom|zIndex|open|close) */ function wp_floatpanel(load_url,option){ var config = $.extend({},{ title: 'Title', titlebg: true, contentClass: 'wp-panel_outpadding', id: 'wp-float_panel', width: 286, height: 'auto', left: 5, top: 60, isCenter: false, overlay: false, isIframe: false, contain:$('body'), zIndex: 1000, showBottom: false, cache: true, postbody:false, swfFix: false, open: function(){ var id = this.id; id && dialog_ids.push(id); }, close: function(){}, data: option['data']||"{}", },option||{}); // Remove old panel var pnl,$pnl,wp_timer,id = config.id,$target = id?$('#'+id):$('.wp-floatpanel_dialog'),$contain=config.contain; // Init parameters var rgx = /^\d+$/i,plw = config.width,plh = config.height,pllt = config.left,pltp = config.top,cc = config.contentClass, ct = config.isCenter,ol = config.overlay,z = config.zIndex,sm = config.showBottom,isfrm = config.isIframe; if (!$target.size()) { // Init overlay var ols = ''; if (ol) { var $overlay = $('#wp-floatpanel_overlay'); if($overlay.size() > 0) $overlay.remove(); ols = '
    '; z += 1; } // Show or not bottom var sms = ''; if (sm) { sms += '
    '+translate('property.showInBottom')+'
    ' + '
    x:' + 'y:' + 'w:' + 'h:' + '
    '; } // Loading area var $tmpwin = $(window),$load = $('#wp-floatpanel_loading'),loadstr = '
    '; if($load.size() > 0) $load.remove(); // Create panel var superid = $.options ? $.options.superid : 0; // var $ap = $(''+ols+loadstr).appendTo($contain); pnl = $ap[0];$pnl = $(pnl); // Loading position var winWidth = $tmpwin.width(),pnlWidth = $pnl.width(); $('#wp-floatpanel_loading').width(winWidth).height($tmpwin.height()); // Events $pnl.draggable({handle: '.wp-title',cancel: '.wp-icon',cursor: 'move',scroll: false,iframeFix: true,start: function(e,ui){ var $target = $(this),titleH = $target.find('.wp-title').outerHeight(); $('.wp-diy-selected-content').slideUp().remove();// 拖拽弹窗时注销“自定义SELECT下拉框” 2012/11/09 // SWF object ghost lines if (config.swfFix) { var $swf = $target.find('object'); if ($swf.length > 0) { $swf.parent().data("wpswfsize",{"width": $swf.width(),"height": $swf.height()}); $swf.css({"height": '0',"width": '0',"visibility": 'hidden'}); } $swf = null; } if ($target.find('iframe').length > 0) { var $innerfrm = $target.find('.ui-resizable-innerIframeFix'); ($innerfrm.length > 0) && $innerfrm.remove(); $('
    ').css({ left: 0,top: titleH+'px',position: 'absolute',opacity: '0.001',zIndex: 1000, width: $target.width()+'px', height: ($target.height() - titleH)+'px' }).appendTo($target); } },drag: function(e,ui){ var pos = ui.position;// 防溢出 2012/10/29 if(pos.top < 0) pos.top = 0; if(pos.left <0) pos.left = 0; if(winWidth < pnlWidth + pos.left) pos.left = winWidth - pnlWidth; },stop: function(){ var $innerfrm = $('.ui-resizable-innerIframeFix', this); ($innerfrm.length > 0) && $innerfrm.remove(); // SWF object ghost lines if (config.swfFix) { var $swf = $(this).find('object'); if ($swf.length > 0) { var $swfprt = $swf.parent(),swfsize = $swfprt.data('wpswfsize'); $swf.css({"height": (swfsize.height||24)+'px',"width": (swfsize.width||82)+'px',"visibility": 'visible'}); $swfprt.removeData('wpswfsize');$swfprt = swfsize = null; } $swf = null; } }}).bind('wpdialogclose',function(e){ $pnl = {};// 注销$pnl对象 clearTimeout(wp_timer); var dom = $(e.target); var dialogid = dom.attr("id")||'', cancelarr = ['wp-add_page','wp-page-obj-chooser','wp-file_explore','wp_settemplate', 'wp-filecategory_panel','wp-manage_plugins','wp_multilang_setting','wp-backup', 'wp-page_setting','wp-seo_setting','wp-watermark_setting','wp-mobile_setting', 'wp-add_template','wp-ask_page_name','wp-page_save']; if(ol) dom = dom.add('#wp-floatpanel_overlay'); if($.isFunction(config.close)) config.close(dom[0]); $(document).trigger('click');//IE8中无法移除cstselect插件的div.wp-diy-selected-content // Set storage-data for(var i = 0,l = dialog_ids.length;i < l;i++){ if (dialog_ids[i] == dialogid) { dialog_ids.splice(i, 1); break; } } if (! dialog_ids.length && ($.inArray(dialogid, cancelarr) < 0) && (typeof breakpoint_save != 'undefined')) { breakpoint_save.setObj({});/*for 'breakpoint save'*/ } return dom.add('#wp-floatpanel_loading').remove(); }); } else { $pnl = $target; pnl = $target[0]; } // Load content $.Deferred(function(dtd){ // Modal setting if (isfrm == false) { if(config.cache && html_caches[load_url]){ var data=html_caches[load_url]; dtd.resolve(data); }else{ var ajaxopts={}; if(config.postbody) ajaxopts={data:config.postbody}; $.ajax($.extend({ type: "POST",url: load_url, data: config.data, beforeSend: function(){ // 取消全 局设置属性以修复IE“闪屏”问题 2012/10/30 },success: function(data){ if(data.length > 0){ if(data == 'Session expired') window.location.href = getSessionExpiredUrl(); dtd.resolve(data); if(config.cache) html_caches[load_url]=data; } else dtd.reject(); },error: function(xhr, textStatus, errorThrown){ wp_alert((errorThrown||textStatus)+'('+config.title+')'+".
    "+translate('Request failed!')); $pnl.triggerHandler('wpdialogclose'); return false; } },ajaxopts)); } } else { var frmw = plw - 26/*左右padding值为2*13px*/,frame = '
    ' +''; dtd.resolve(frame); } return dtd.promise(); }).done(function(data){ $('#wp-floatpanel_loading').remove(); // Append innerHTML var ocs = {}; $('.'+cc,pnl).html(data); if(rgx.test(plw)) ocs['width'] = plw+'px'; if(rgx.test(plh)) ocs['height'] = plh+'px'; // Reset position if (ct || ol) { $pnl.show().css(ocs); wp_timer = setTimeout(function(){ $pnl.triggerHandler('wpdialogsetpos'); },30); // Bind window resize $(window).resize(function(){ panel_position($pnl,plw,plh,ol,'wp-floatpanel_overlay'); }); $pnl.bind('wpdialogsetpos',function(e){ panel_position($pnl,plw,plh,ol,'wp-floatpanel_overlay'); }); } else { if(rgx.test(pllt)) ocs['left'] = pllt+'px'; if(rgx.test(pltp)) ocs['top'] = pltp+'px'; $pnl.css(ocs).show();//.animate(ocs,'slow'); } config.open(pnl); }).fail(function(){ wp_alert(config.title+"(deferred fail).
    "+translate('Request failed!')); $pnl.triggerHandler('wpdialogclose'); return false; }); // Bind close events $('.wp-title a.close',pnl).bind('click',function(e){ $pnl.triggerHandler('wpdialogclose'); // IE下禁止触发onbeforeunload e.preventDefault(); }); return null; } window.wp_floatpanel=wp_floatpanel; })(window); // Dialog定位 function panel_position(dom,width,height,isoverlay,overlayid){ if(dom instanceof jQuery == false) return; var $target = dom,/*$win = $(window),*/tpw = $target.outerWidth(true),tph = $target.outerHeight(true), floor = Math.floor,rgx = /^\d+$/i,ocs = {}; var scrolltop=$(document).scrollTop(); // Parse if(rgx.test(height)) tph = height; tpw = Math.max(tpw,width); // var wnw = $win.width(),wnh = $win.height(); var wnw = window.innerWidth || self.innerWidth || document.documentElement.clientWidth || document.body.clientWidth, wnh = window.innerHeight || self.innerHeight || document.documentElement.clientHeight || document.body.clientHeight; pltp = floor((wnh - tph)/2); pllt = floor((wnw - tpw)/2); // Overlay if(isoverlay) $('#'+overlayid).width(wnw).height(wnh); // Panel ocs['left'] = pllt+'px'; ocs['top'] = ((pltp>0?pltp:0)+scrolltop)+'px'; $target.css(ocs);//animate(ocs,'slow'); // return ocs; } $._parseFloat = function(numString){ var number = parseFloat(numString); if(isNaN(number)) return 0; return number; } function fix_img_url_path(imgurl){ var escapeRegExp = (function () { var specials = [ '-','[',']', '/','{', '}', '(',')', '*','+','?', '.','\\', '^','$', '|' ]; var regex = new RegExp('[' + specials.join('\\') + ']', 'g'); return function escapeRegExp(str) { return str.replace(regex, '\\$&'); }; })(); var imgfilenameregxp=/\/([^\/]+)$/; var matches=imgurl.match(imgfilenameregxp); var codedimgurl=''; if(matches){ var oldfilename=matches[1]; var newfilename=encodeURIComponent(oldfilename); var oldfileregexp=new RegExp(escapeRegExp(oldfilename)+'$'); codedimgurl=imgurl.replace(oldfileregexp,newfilename); }else{ codedimgurl=encodeURIComponent(imgurl); } return codedimgurl; } /** * 图片自适应 居中显示 */ function set_pic(obj) { var img = new Image(); img.src =$(obj).attr("src"); var width=img.width; var height=img.height; if(width==0){ width=107; } if(height==0){ height=107; } var W=107; var H=107; var _width=107; var _height=107; var _top=0; if(width>height){ _height=(height*H)/width; _top= (W-_height)/2; $(obj).attr('style','width: ' + _width + 'px;height:'+_height+'px;'); $(obj).parent().css('top', _top); }else{ _width=(width*H)/height; _top= (W-_width)/2; $(obj).attr('style','width: ' + _width + 'px;height:'+_height+'px;left:'+_top+'px;'); $(obj).parent().css({'top':0,'left':_top}); } } /** * 手机站弹窗(模拟新窗口打开) 2014/06/09 */ function msite_popup(url){ var $container = $('#scroll_container'),maxh = $(window).height(), bgimg = relativeToAbsoluteURL('template/default/images/loading.gif'), css = 'position:absolute;top:0;left:0;width:320px;overflow:hidden;z-index:10000', ihtml = '
    '; var $mask = $container.children('.mspopup_mask'); if(! $mask.length) $container.append(ihtml).attr("data-height", $container.height()).height(maxh); } function mspopup_onload(win){ win.height = 'auto'; var bodh = win.contentWindow.document.body.scrollHeight, doch = win.contentWindow.document.documentElement.scrollHeight, maxheight = Math.max(bodh, doch); // Reset height win.height = maxheight; $(win).parent('.mspopup_mask').height(maxheight) .parent('#scroll_container').height(maxheight); } function create_pc_media_set_pic(layer_id,editmode){ var func=function(obj) { var callback=function(img){ img.show(); img.closest('.img_over').children('.imgloading').remove(); if(!editmode){ $(function(){ var super_id=layer_id; var dom_img=$("#"+super_id).find('.paragraph_image'); var left_img=parseInt(dom_img.css('left')); var top_img=parseInt(dom_img.css('top')); var width_img=parseInt(dom_img.css("width")); var height_img=parseInt(dom_img.css("height")); if(isNaN(left_img)){ left_img=0; } if(isNaN(top_img)){ top_img=0; } var ii=0; $("#"+super_id).find(".wp_mapclass").each(function(){ var shape="rect"; shape=$(this).attr('shape'); if(shape != "circle"){ shape="rect"; } var leftz=parseInt($(this).css("left")); var topz=parseInt($(this).css("top")); var widthz=parseInt($(this).css("width")); var heightz=parseInt($(this).css("height")); if(shape != "circle"){ var coords='0,0,0,0'; }else{ var coords='0,0,0'; } if( (leftz+widthz) < left_img || (topz+heightz)< top_img){ }else{ var cleft=0; var ctop=0; var r=0; if(shape != "circle"){ cleft=leftz-left_img; ctop=topz-top_img; coords=cleft+','+ctop+','+(cleft+widthz)+','+(ctop+heightz); }else{ r=widthz/2; cleft=leftz-left_img+r; ctop=topz-top_img+r; coords=cleft+','+ctop+','+r; } } //var classid=$(this).attr('id'); var classid="map_arear_"+ii; ii++; var mapd=$(this).parent().find("."+classid); mapd.attr('coords',coords); $(this).remove(); }); }) } } $(obj).each(function() { var img=$(this); callback(img); }); } window['set_thumb_'+layer_id]=func; }; /* * 模块高度自适应,对外接口,功能待扩展 * */ /** * 高度自适应模块,预览模式下触发 TODO:面向对象写法 */ function wp_heightAdapt(dom,oldHeight) { if(dom== undefined) return false; if ($.inArray(dom.attr("type"), ['bslider']) != -1) return; var heightfunc=function(){ var before=dom.data('oriheight'); if(!before){ before=dom.children('div').eq(0).height(); dom.data('oriheight',before); } return before; } var resetPos=function(el){ var oritop=el.data('adaptoritop'); var oriheight=el.data('adaptoriheight'); var pressArr=el.data('adaptpress'); var wrapArr=el.data('adaptwrap'); var id=dom.prop('id'); var toppos=$.parseInteger(el.css('top')); if(!oritop&&oritop !==0){ el.data('adaptoritop',toppos); el.data('adaptoriheight',el.height()); return; } if(pressArr && pressArr.length){ for(var i=0;i0){ adaptModuleAfter=adaptModuleAfter-borderwidth; } dom.children('div').eq(0).css('height',adaptModuleAfter+'px'); if(adaptModuleAfter==actualContentHeight) return; } var domPadding = parseInt(dom.children('div').eq(0).css('padding-top')) + parseInt(dom.children('div').eq(0).css('padding-bottom')); var domBorder = parseInt(dom.children('div').eq(0).css('border-top-width')) + parseInt(dom.children('div').eq(0).css('border-bottom-width')); var moduleLayerHeight = oldHeight || adaptModuleBefore+domPadding+domBorder; var moduleHeight = dom.children('div').eq(0).outerHeight();//模块取 wp-模块名_content层的高度 var moduleWidth = dom.outerWidth(); var moduleTop = dom.ab_pos_cnter('top');//获取画布坐标系y值 var left_boundray = dom.ab_pos_cnter('left');//左右边界 var right_boundray = left_boundray + dom.outerWidth(); var offsetY = 0;//发生重 合后往下压位置与高度自适应模块空出原有高度 var pressList = new Array();//记录往 下压的模块列表 var wrapList = new Array();//包在高 度自适应外层模块列表 var minTop = 0,minId = 0; //页面上 的模块可能有不同坐标系,但往下 压多少像素的相对偏移量都相同的,获取这些偏移量 var diffY = 0;//向下移动偏移量 $("#canvas").find('.cstlayer,.full_column').each(function(){ //判断页 面模块是不是在高度自适应模块左右边界中,通栏模块肯定在,不需要判断 resetPos($(this)); var tmp_left = $(this).ab_pos_cnter('left'),tmp_top =$(this).ab_pos_cnter('top'),tmp_width = $(this).outerWidth(),tmp_height = $(this).outerHeight(); if($(this).hasClass('cstlayer')) { if(tmp_left + tmp_width < left_boundray) return true; if(tmp_left > right_boundray) return true; if(dom.attr('id') == $(this).attr('id')) return true;//自己除外 //包在高 度自适应模块外面的模块也要改变高度 if((tmp_left <= left_boundray && tmp_left+tmp_width >= right_boundray) && (tmp_top <= moduleTop && tmp_top+tmp_height >= moduleTop+moduleLayerHeight)) { wrapList.push($(this).attr('id')); return true; } if($(this).parent().hasClass('full_content') || $(this).parent().hasClass('footer_content') || $(this).parent().hasClass('drop_box')) return true;//通栏和 底部元素暂时不考虑 } if(tmp_top >= (moduleTop + moduleLayerHeight)) { pressList.push($(this).attr('id')); if(minTop == 0) {minTop = tmp_top;minId = $(this).attr('id');} else { if(minTop > tmp_top) {minTop = tmp_top;minId = $(this).attr('id');} } } }); //ceshi offsetY = $("#"+minId).ab_pos_cnter('top') - (moduleTop + moduleLayerHeight); if(pressList.length > 0 && (moduleTop + moduleHeight) >= minTop) { diffY = moduleTop + moduleHeight + offsetY - minTop; for(var i = 0;i < pressList.length;i++) { var theel=$("#"+pressList[i]); theel.css('top',(parseInt(theel.ab_pos_cnter('top'))+diffY)+'px'); var pressArrOld=theel.data('adaptpress'); if(!pressArrOld) pressArrOld=[]; var pressArr=[]; for(var j=0;j 0) { for(var i = 0;i < wrapList.length;i++) { var diffH=moduleHeight-moduleLayerHeight; var theel=$("#"+wrapList[i]); theel.height($("#"+wrapList[i]).height()+(diffH)); var wrapListPadding = parseInt(theel.children('div').eq(0).css('padding-top')) + parseInt($("#"+wrapList[i]).children('div').eq(0).css('padding-bottom')); var wrapListBorder = parseInt(theel.children('div').eq(0).css('border-top-width')) + parseInt($("#"+wrapList[i]).children('div').eq(0).css('border-bottom-width')); theel.children('div').eq(0).height(theel.height() - wrapListPadding - wrapListBorder); var wrapArrOld=theel.data('adaptwrap'); if(!wrapArrOld) wrapArrOld=[]; var wrapArr=[]; for(var j=0;j