var _____WB$wombat$assign$function_____=function(name){return (self._wb_wombat && self._wb_wombat.local_init && self._wb_wombat.local_init(name))||self[name];};if(!self.__WB_pmw){self.__WB_pmw=function(obj){this.__WB_source=obj;return this;}}{ let window = _____WB$wombat$assign$function_____("window"); let self = _____WB$wombat$assign$function_____("self"); let document = _____WB$wombat$assign$function_____("document"); let location = _____WB$wombat$assign$function_____("location"); let top = _____WB$wombat$assign$function_____("top"); let parent = _____WB$wombat$assign$function_____("parent"); let frames = _____WB$wombat$assign$function_____("frames"); let opens = _____WB$wombat$assign$function_____("opens"); /*! * jQuery JavaScript Library v1.4.2 * http://jquery.com/ * * Copyright 2010, John Resig * Dual licensed under the MIT or GPL Version 2 licenses. * http://jquery.org/license * * Includes Sizzle.js * http://sizzlejs.com/ * Copyright 2010, The Dojo Foundation * Released under the MIT, BSD, and GPL Licenses. * * Date: Sat Feb 13 22:33:48 2010 -0500 */ (function(A,w){function ma(){if(!c.isReady){try{s.documentElement.doScroll("left")}catch(a){setTimeout(ma,1);return}c.ready()}}function Qa(a,b){b.src?c.ajax({url:b.src,async:false,dataType:"script"}):c.globalEval(b.text||b.textContent||b.innerHTML||"");b.parentNode&&b.parentNode.removeChild(b)}function X(a,b,d,f,e,j){var i=a.length;if(typeof b==="object"){for(var o in b)X(a,o,b[o],f,e,d);return a}if(d!==w){f=!j&&f&&c.isFunction(d);for(o=0;o)[^>]*$|^#([\w-]+)$/,Ua=/^.[^:#\[\.,]*$/,Va=/\S/, Wa=/^(\s|\u00A0)+|(\s|\u00A0)+$/g,Xa=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,P=navigator.userAgent,xa=false,Q=[],L,$=Object.prototype.toString,aa=Object.prototype.hasOwnProperty,ba=Array.prototype.push,R=Array.prototype.slice,ya=Array.prototype.indexOf;c.fn=c.prototype={init:function(a,b){var d,f;if(!a)return this;if(a.nodeType){this.context=this[0]=a;this.length=1;return this}if(a==="body"&&!b){this.context=s;this[0]=s.body;this.selector="body";this.length=1;return this}if(typeof a==="string")if((d=Ta.exec(a))&& (d[1]||!b))if(d[1]){f=b?b.ownerDocument||b:s;if(a=Xa.exec(a))if(c.isPlainObject(b)){a=[s.createElement(a[1])];c.fn.attr.call(a,b,true)}else a=[f.createElement(a[1])];else{a=sa([d[1]],[f]);a=(a.cacheable?a.fragment.cloneNode(true):a.fragment).childNodes}return c.merge(this,a)}else{if(b=s.getElementById(d[2])){if(b.id!==d[2])return T.find(a);this.length=1;this[0]=b}this.context=s;this.selector=a;return this}else if(!b&&/^\w+$/.test(a)){this.selector=a;this.context=s;a=s.getElementsByTagName(a);return c.merge(this, a)}else return!b||b.jquery?(b||T).find(a):c(b).find(a);else if(c.isFunction(a))return T.ready(a);if(a.selector!==w){this.selector=a.selector;this.context=a.context}return c.makeArray(a,this)},selector:"",jquery:"1.4.2",length:0,size:function(){return this.length},toArray:function(){return R.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this.slice(a)[0]:this[a]},pushStack:function(a,b,d){var f=c();c.isArray(a)?ba.apply(f,a):c.merge(f,a);f.prevObject=this;f.context=this.context;if(b=== "find")f.selector=this.selector+(this.selector?" ":"")+d;else if(b)f.selector=this.selector+"."+b+"("+d+")";return f},each:function(a,b){return c.each(this,a,b)},ready:function(a){c.bindReady();if(c.isReady)a.call(s,c);else Q&&Q.push(a);return this},eq:function(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(R.apply(this,arguments),"slice",R.call(arguments).join(","))},map:function(a){return this.pushStack(c.map(this, function(b,d){return a.call(b,d,b)}))},end:function(){return this.prevObject||c(null)},push:ba,sort:[].sort,splice:[].splice};c.fn.init.prototype=c.fn;c.extend=c.fn.extend=function(){var a=arguments[0]||{},b=1,d=arguments.length,f=false,e,j,i,o;if(typeof a==="boolean"){f=a;a=arguments[1]||{};b=2}if(typeof a!=="object"&&!c.isFunction(a))a={};if(d===b){a=this;--b}for(;b
a"; var e=d.getElementsByTagName("*"),j=d.getElementsByTagName("a")[0];if(!(!e||!e.length||!j)){c.support={leadingWhitespace:d.firstChild.nodeType===3,tbody:!d.getElementsByTagName("tbody").length,htmlSerialize:!!d.getElementsByTagName("link").length,style:/red/.test(j.getAttribute("style")),hrefNormalized:j.getAttribute("href")==="/a",opacity:/^0.55$/.test(j.style.opacity),cssFloat:!!j.style.cssFloat,checkOn:d.getElementsByTagName("input")[0].value==="on",optSelected:s.createElement("select").appendChild(s.createElement("option")).selected, parentNode:d.removeChild(d.appendChild(s.createElement("div"))).parentNode===null,deleteExpando:true,checkClone:false,scriptEval:false,noCloneEvent:true,boxModel:null};b.type="text/javascript";try{b.appendChild(s.createTextNode("window."+f+"=1;"))}catch(i){}a.insertBefore(b,a.firstChild);if(A[f]){c.support.scriptEval=true;delete A[f]}try{delete b.test}catch(o){c.support.deleteExpando=false}a.removeChild(b);if(d.attachEvent&&d.fireEvent){d.attachEvent("onclick",function k(){c.support.noCloneEvent= false;d.detachEvent("onclick",k)});d.cloneNode(true).fireEvent("onclick")}d=s.createElement("div");d.innerHTML="";a=s.createDocumentFragment();a.appendChild(d.firstChild);c.support.checkClone=a.cloneNode(true).cloneNode(true).lastChild.checked;c(function(){var k=s.createElement("div");k.style.width=k.style.paddingLeft="1px";s.body.appendChild(k);c.boxModel=c.support.boxModel=k.offsetWidth===2;s.body.removeChild(k).style.display="none"});a=function(k){var n= s.createElement("div");k="on"+k;var r=k in n;if(!r){n.setAttribute(k,"return;");r=typeof n[k]==="function"}return r};c.support.submitBubbles=a("submit");c.support.changeBubbles=a("change");a=b=d=e=j=null}})();c.props={"for":"htmlFor","class":"className",readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing",rowspan:"rowSpan",colspan:"colSpan",tabindex:"tabIndex",usemap:"useMap",frameborder:"frameBorder"};var G="jQuery"+J(),Ya=0,za={};c.extend({cache:{},expando:G,noData:{embed:true,object:true, applet:true},data:function(a,b,d){if(!(a.nodeName&&c.noData[a.nodeName.toLowerCase()])){a=a==A?za:a;var f=a[G],e=c.cache;if(!f&&typeof b==="string"&&d===w)return null;f||(f=++Ya);if(typeof b==="object"){a[G]=f;e[f]=c.extend(true,{},b)}else if(!e[f]){a[G]=f;e[f]={}}a=e[f];if(d!==w)a[b]=d;return typeof b==="string"?a[b]:a}},removeData:function(a,b){if(!(a.nodeName&&c.noData[a.nodeName.toLowerCase()])){a=a==A?za:a;var d=a[G],f=c.cache,e=f[d];if(b){if(e){delete e[b];c.isEmptyObject(e)&&c.removeData(a)}}else{if(c.support.deleteExpando)delete a[c.expando]; else a.removeAttribute&&a.removeAttribute(c.expando);delete f[d]}}}});c.fn.extend({data:function(a,b){if(typeof a==="undefined"&&this.length)return c.data(this[0]);else if(typeof a==="object")return this.each(function(){c.data(this,a)});var d=a.split(".");d[1]=d[1]?"."+d[1]:"";if(b===w){var f=this.triggerHandler("getData"+d[1]+"!",[d[0]]);if(f===w&&this.length)f=c.data(this[0],a);return f===w&&d[1]?this.data(d[0]):f}else return this.trigger("setData"+d[1]+"!",[d[0],b]).each(function(){c.data(this, a,b)})},removeData:function(a){return this.each(function(){c.removeData(this,a)})}});c.extend({queue:function(a,b,d){if(a){b=(b||"fx")+"queue";var f=c.data(a,b);if(!d)return f||[];if(!f||c.isArray(d))f=c.data(a,b,c.makeArray(d));else f.push(d);return f}},dequeue:function(a,b){b=b||"fx";var d=c.queue(a,b),f=d.shift();if(f==="inprogress")f=d.shift();if(f){b==="fx"&&d.unshift("inprogress");f.call(a,function(){c.dequeue(a,b)})}}});c.fn.extend({queue:function(a,b){if(typeof a!=="string"){b=a;a="fx"}if(b=== w)return c.queue(this[0],a);return this.each(function(){var d=c.queue(this,a,b);a==="fx"&&d[0]!=="inprogress"&&c.dequeue(this,a)})},dequeue:function(a){return this.each(function(){c.dequeue(this,a)})},delay:function(a,b){a=c.fx?c.fx.speeds[a]||a:a;b=b||"fx";return this.queue(b,function(){var d=this;setTimeout(function(){c.dequeue(d,b)},a)})},clearQueue:function(a){return this.queue(a||"fx",[])}});var Aa=/[\n\t]/g,ca=/\s+/,Za=/\r/g,$a=/href|src|style/,ab=/(button|input)/i,bb=/(button|input|object|select|textarea)/i, cb=/^(a|area)$/i,Ba=/radio|checkbox/;c.fn.extend({attr:function(a,b){return X(this,a,b,true,c.attr)},removeAttr:function(a){return this.each(function(){c.attr(this,a,"");this.nodeType===1&&this.removeAttribute(a)})},addClass:function(a){if(c.isFunction(a))return this.each(function(n){var r=c(this);r.addClass(a.call(this,n,r.attr("class")))});if(a&&typeof a==="string")for(var b=(a||"").split(ca),d=0,f=this.length;d-1)return true;return false},val:function(a){if(a===w){var b=this[0];if(b){if(c.nodeName(b,"option"))return(b.attributes.value||{}).specified?b.value:b.text;if(c.nodeName(b,"select")){var d=b.selectedIndex,f=[],e=b.options;b=b.type==="select-one";if(d<0)return null;var j=b?d:0;for(d=b?d+1:e.length;j=0;else if(c.nodeName(this,"select")){var u=c.makeArray(r);c("option",this).each(function(){this.selected= c.inArray(c(this).val(),u)>=0});if(!u.length)this.selectedIndex=-1}else this.value=r}})}});c.extend({attrFn:{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true},attr:function(a,b,d,f){if(!a||a.nodeType===3||a.nodeType===8)return w;if(f&&b in c.attrFn)return c(a)[b](d);f=a.nodeType!==1||!c.isXMLDoc(a);var e=d!==w;b=f&&c.props[b]||b;if(a.nodeType===1){var j=$a.test(b);if(b in a&&f&&!j){if(e){b==="type"&&ab.test(a.nodeName)&&a.parentNode&&c.error("type property can't be changed"); a[b]=d}if(c.nodeName(a,"form")&&a.getAttributeNode(b))return a.getAttributeNode(b).nodeValue;if(b==="tabIndex")return(b=a.getAttributeNode("tabIndex"))&&b.specified?b.value:bb.test(a.nodeName)||cb.test(a.nodeName)&&a.href?0:w;return a[b]}if(!c.support.style&&f&&b==="style"){if(e)a.style.cssText=""+d;return a.style.cssText}e&&a.setAttribute(b,""+d);a=!c.support.hrefNormalized&&f&&j?a.getAttribute(b,2):a.getAttribute(b);return a===null?w:a}return c.style(a,b,d)}});var O=/\.(.*)$/,db=function(a){return a.replace(/[^\w\s\.\|`]/g, function(b){return"\\"+b})};c.event={add:function(a,b,d,f){if(!(a.nodeType===3||a.nodeType===8)){if(a.setInterval&&a!==A&&!a.frameElement)a=A;var e,j;if(d.handler){e=d;d=e.handler}if(!d.guid)d.guid=c.guid++;if(j=c.data(a)){var i=j.events=j.events||{},o=j.handle;if(!o)j.handle=o=function(){return typeof c!=="undefined"&&!c.event.triggered?c.event.handle.apply(o.elem,arguments):w};o.elem=a;b=b.split(" ");for(var k,n=0,r;k=b[n++];){j=e?c.extend({},e):{handler:d,data:f};if(k.indexOf(".")>-1){r=k.split("."); k=r.shift();j.namespace=r.slice(0).sort().join(".")}else{r=[];j.namespace=""}j.type=k;j.guid=d.guid;var u=i[k],z=c.event.special[k]||{};if(!u){u=i[k]=[];if(!z.setup||z.setup.call(a,f,r,o)===false)if(a.addEventListener)a.addEventListener(k,o,false);else a.attachEvent&&a.attachEvent("on"+k,o)}if(z.add){z.add.call(a,j);if(!j.handler.guid)j.handler.guid=d.guid}u.push(j);c.event.global[k]=true}a=null}}},global:{},remove:function(a,b,d,f){if(!(a.nodeType===3||a.nodeType===8)){var e,j=0,i,o,k,n,r,u,z=c.data(a), C=z&&z.events;if(z&&C){if(b&&b.type){d=b.handler;b=b.type}if(!b||typeof b==="string"&&b.charAt(0)==="."){b=b||"";for(e in C)c.event.remove(a,e+b)}else{for(b=b.split(" ");e=b[j++];){n=e;i=e.indexOf(".")<0;o=[];if(!i){o=e.split(".");e=o.shift();k=new RegExp("(^|\\.)"+c.map(o.slice(0).sort(),db).join("\\.(?:.*\\.)?")+"(\\.|$)")}if(r=C[e])if(d){n=c.event.special[e]||{};for(B=f||0;B=0){a.type= e=e.slice(0,-1);a.exclusive=true}if(!d){a.stopPropagation();c.event.global[e]&&c.each(c.cache,function(){this.events&&this.events[e]&&c.event.trigger(a,b,this.handle.elem)})}if(!d||d.nodeType===3||d.nodeType===8)return w;a.result=w;a.target=d;b=c.makeArray(b);b.unshift(a)}a.currentTarget=d;(f=c.data(d,"handle"))&&f.apply(d,b);f=d.parentNode||d.ownerDocument;try{if(!(d&&d.nodeName&&c.noData[d.nodeName.toLowerCase()]))if(d["on"+e]&&d["on"+e].apply(d,b)===false)a.result=false}catch(j){}if(!a.isPropagationStopped()&& f)c.event.trigger(a,b,f,true);else if(!a.isDefaultPrevented()){f=a.target;var i,o=c.nodeName(f,"a")&&e==="click",k=c.event.special[e]||{};if((!k._default||k._default.call(d,a)===false)&&!o&&!(f&&f.nodeName&&c.noData[f.nodeName.toLowerCase()])){try{if(f[e]){if(i=f["on"+e])f["on"+e]=null;c.event.triggered=true;f[e]()}}catch(n){}if(i)f["on"+e]=i;c.event.triggered=false}}},handle:function(a){var b,d,f,e;a=arguments[0]=c.event.fix(a||A.event);a.currentTarget=this;b=a.type.indexOf(".")<0&&!a.exclusive; if(!b){d=a.type.split(".");a.type=d.shift();f=new RegExp("(^|\\.)"+d.slice(0).sort().join("\\.(?:.*\\.)?")+"(\\.|$)")}e=c.data(this,"events");d=e[a.type];if(e&&d){d=d.slice(0);e=0;for(var j=d.length;e-1?c.map(a.options,function(f){return f.selected}).join("-"):"";else if(a.nodeName.toLowerCase()==="select")d=a.selectedIndex;return d},fa=function(a,b){var d=a.target,f,e;if(!(!da.test(d.nodeName)||d.readOnly)){f=c.data(d,"_change_data");e=Fa(d);if(a.type!=="focusout"||d.type!=="radio")c.data(d,"_change_data", e);if(!(f===w||e===f))if(f!=null||e){a.type="change";return c.event.trigger(a,b,d)}}};c.event.special.change={filters:{focusout:fa,click:function(a){var b=a.target,d=b.type;if(d==="radio"||d==="checkbox"||b.nodeName.toLowerCase()==="select")return fa.call(this,a)},keydown:function(a){var b=a.target,d=b.type;if(a.keyCode===13&&b.nodeName.toLowerCase()!=="textarea"||a.keyCode===32&&(d==="checkbox"||d==="radio")||d==="select-multiple")return fa.call(this,a)},beforeactivate:function(a){a=a.target;c.data(a, "_change_data",Fa(a))}},setup:function(){if(this.type==="file")return false;for(var a in ea)c.event.add(this,a+".specialChange",ea[a]);return da.test(this.nodeName)},teardown:function(){c.event.remove(this,".specialChange");return da.test(this.nodeName)}};ea=c.event.special.change.filters}s.addEventListener&&c.each({focus:"focusin",blur:"focusout"},function(a,b){function d(f){f=c.event.fix(f);f.type=b;return c.event.handle.call(this,f)}c.event.special[b]={setup:function(){this.addEventListener(a, d,true)},teardown:function(){this.removeEventListener(a,d,true)}}});c.each(["bind","one"],function(a,b){c.fn[b]=function(d,f,e){if(typeof d==="object"){for(var j in d)this[b](j,f,d[j],e);return this}if(c.isFunction(f)){e=f;f=w}var i=b==="one"?c.proxy(e,function(k){c(this).unbind(k,i);return e.apply(this,arguments)}):e;if(d==="unload"&&b!=="one")this.one(d,f,e);else{j=0;for(var o=this.length;j0){y=t;break}}t=t[g]}m[q]=y}}}var f=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g, e=0,j=Object.prototype.toString,i=false,o=true;[0,0].sort(function(){o=false;return 0});var k=function(g,h,l,m){l=l||[];var q=h=h||s;if(h.nodeType!==1&&h.nodeType!==9)return[];if(!g||typeof g!=="string")return l;for(var p=[],v,t,y,S,H=true,M=x(h),I=g;(f.exec(""),v=f.exec(I))!==null;){I=v[3];p.push(v[1]);if(v[2]){S=v[3];break}}if(p.length>1&&r.exec(g))if(p.length===2&&n.relative[p[0]])t=ga(p[0]+p[1],h);else for(t=n.relative[p[0]]?[h]:k(p.shift(),h);p.length;){g=p.shift();if(n.relative[g])g+=p.shift(); t=ga(g,t)}else{if(!m&&p.length>1&&h.nodeType===9&&!M&&n.match.ID.test(p[0])&&!n.match.ID.test(p[p.length-1])){v=k.find(p.shift(),h,M);h=v.expr?k.filter(v.expr,v.set)[0]:v.set[0]}if(h){v=m?{expr:p.pop(),set:z(m)}:k.find(p.pop(),p.length===1&&(p[0]==="~"||p[0]==="+")&&h.parentNode?h.parentNode:h,M);t=v.expr?k.filter(v.expr,v.set):v.set;if(p.length>0)y=z(t);else H=false;for(;p.length;){var D=p.pop();v=D;if(n.relative[D])v=p.pop();else D="";if(v==null)v=h;n.relative[D](y,v,M)}}else y=[]}y||(y=t);y||k.error(D|| g);if(j.call(y)==="[object Array]")if(H)if(h&&h.nodeType===1)for(g=0;y[g]!=null;g++){if(y[g]&&(y[g]===true||y[g].nodeType===1&&E(h,y[g])))l.push(t[g])}else for(g=0;y[g]!=null;g++)y[g]&&y[g].nodeType===1&&l.push(t[g]);else l.push.apply(l,y);else z(y,l);if(S){k(S,q,l,m);k.uniqueSort(l)}return l};k.uniqueSort=function(g){if(B){i=o;g.sort(B);if(i)for(var h=1;h":function(g,h){var l=typeof h==="string";if(l&&!/\W/.test(h)){h=h.toLowerCase();for(var m=0,q=g.length;m=0))l||m.push(v);else if(l)h[p]=false;return false},ID:function(g){return g[1].replace(/\\/g,"")},TAG:function(g){return g[1].toLowerCase()}, CHILD:function(g){if(g[1]==="nth"){var h=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(g[2]==="even"&&"2n"||g[2]==="odd"&&"2n+1"||!/\D/.test(g[2])&&"0n+"+g[2]||g[2]);g[2]=h[1]+(h[2]||1)-0;g[3]=h[3]-0}g[0]=e++;return g},ATTR:function(g,h,l,m,q,p){h=g[1].replace(/\\/g,"");if(!p&&n.attrMap[h])g[1]=n.attrMap[h];if(g[2]==="~=")g[4]=" "+g[4]+" ";return g},PSEUDO:function(g,h,l,m,q){if(g[1]==="not")if((f.exec(g[3])||"").length>1||/^\w/.test(g[3]))g[3]=k(g[3],null,null,h);else{g=k.filter(g[3],h,l,true^q);l||m.push.apply(m, g);return false}else if(n.match.POS.test(g[0])||n.match.CHILD.test(g[0]))return true;return g},POS:function(g){g.unshift(true);return g}},filters:{enabled:function(g){return g.disabled===false&&g.type!=="hidden"},disabled:function(g){return g.disabled===true},checked:function(g){return g.checked===true},selected:function(g){return g.selected===true},parent:function(g){return!!g.firstChild},empty:function(g){return!g.firstChild},has:function(g,h,l){return!!k(l[3],g).length},header:function(g){return/h\d/i.test(g.nodeName)}, text:function(g){return"text"===g.type},radio:function(g){return"radio"===g.type},checkbox:function(g){return"checkbox"===g.type},file:function(g){return"file"===g.type},password:function(g){return"password"===g.type},submit:function(g){return"submit"===g.type},image:function(g){return"image"===g.type},reset:function(g){return"reset"===g.type},button:function(g){return"button"===g.type||g.nodeName.toLowerCase()==="button"},input:function(g){return/input|select|textarea|button/i.test(g.nodeName)}}, setFilters:{first:function(g,h){return h===0},last:function(g,h,l,m){return h===m.length-1},even:function(g,h){return h%2===0},odd:function(g,h){return h%2===1},lt:function(g,h,l){return hl[3]-0},nth:function(g,h,l){return l[3]-0===h},eq:function(g,h,l){return l[3]-0===h}},filter:{PSEUDO:function(g,h,l,m){var q=h[1],p=n.filters[q];if(p)return p(g,l,h,m);else if(q==="contains")return(g.textContent||g.innerText||a([g])||"").indexOf(h[3])>=0;else if(q==="not"){h= h[3];l=0;for(m=h.length;l=0}},ID:function(g,h){return g.nodeType===1&&g.getAttribute("id")===h},TAG:function(g,h){return h==="*"&&g.nodeType===1||g.nodeName.toLowerCase()===h},CLASS:function(g,h){return(" "+(g.className||g.getAttribute("class"))+" ").indexOf(h)>-1},ATTR:function(g,h){var l=h[1];g=n.attrHandle[l]?n.attrHandle[l](g):g[l]!=null?g[l]:g.getAttribute(l);l=g+"";var m=h[2];h=h[4];return g==null?m==="!=":m=== "="?l===h:m==="*="?l.indexOf(h)>=0:m==="~="?(" "+l+" ").indexOf(h)>=0:!h?l&&g!==false:m==="!="?l!==h:m==="^="?l.indexOf(h)===0:m==="$="?l.substr(l.length-h.length)===h:m==="|="?l===h||l.substr(0,h.length+1)===h+"-":false},POS:function(g,h,l,m){var q=n.setFilters[h[2]];if(q)return q(g,l,h,m)}}},r=n.match.POS;for(var u in n.match){n.match[u]=new RegExp(n.match[u].source+/(?![^\[]*\])(?![^\(]*\))/.source);n.leftMatch[u]=new RegExp(/(^(?:.|\r|\n)*?)/.source+n.match[u].source.replace(/\\(\d+)/g,function(g, h){return"\\"+(h-0+1)}))}var z=function(g,h){g=Array.prototype.slice.call(g,0);if(h){h.push.apply(h,g);return h}return g};try{Array.prototype.slice.call(s.documentElement.childNodes,0)}catch(C){z=function(g,h){h=h||[];if(j.call(g)==="[object Array]")Array.prototype.push.apply(h,g);else if(typeof g.length==="number")for(var l=0,m=g.length;l";var l=s.documentElement;l.insertBefore(g,l.firstChild);if(s.getElementById(h)){n.find.ID=function(m,q,p){if(typeof q.getElementById!=="undefined"&&!p)return(q=q.getElementById(m[1]))?q.id===m[1]||typeof q.getAttributeNode!=="undefined"&& q.getAttributeNode("id").nodeValue===m[1]?[q]:w:[]};n.filter.ID=function(m,q){var p=typeof m.getAttributeNode!=="undefined"&&m.getAttributeNode("id");return m.nodeType===1&&p&&p.nodeValue===q}}l.removeChild(g);l=g=null})();(function(){var g=s.createElement("div");g.appendChild(s.createComment(""));if(g.getElementsByTagName("*").length>0)n.find.TAG=function(h,l){l=l.getElementsByTagName(h[1]);if(h[1]==="*"){h=[];for(var m=0;l[m];m++)l[m].nodeType===1&&h.push(l[m]);l=h}return l};g.innerHTML=""; if(g.firstChild&&typeof g.firstChild.getAttribute!=="undefined"&&g.firstChild.getAttribute("href")!=="#")n.attrHandle.href=function(h){return h.getAttribute("href",2)};g=null})();s.querySelectorAll&&function(){var g=k,h=s.createElement("div");h.innerHTML="

";if(!(h.querySelectorAll&&h.querySelectorAll(".TEST").length===0)){k=function(m,q,p,v){q=q||s;if(!v&&q.nodeType===9&&!x(q))try{return z(q.querySelectorAll(m),p)}catch(t){}return g(m,q,p,v)};for(var l in g)k[l]=g[l];h=null}}(); (function(){var g=s.createElement("div");g.innerHTML="
";if(!(!g.getElementsByClassName||g.getElementsByClassName("e").length===0)){g.lastChild.className="e";if(g.getElementsByClassName("e").length!==1){n.order.splice(1,0,"CLASS");n.find.CLASS=function(h,l,m){if(typeof l.getElementsByClassName!=="undefined"&&!m)return l.getElementsByClassName(h[1])};g=null}}})();var E=s.compareDocumentPosition?function(g,h){return!!(g.compareDocumentPosition(h)&16)}: function(g,h){return g!==h&&(g.contains?g.contains(h):true)},x=function(g){return(g=(g?g.ownerDocument||g:0).documentElement)?g.nodeName!=="HTML":false},ga=function(g,h){var l=[],m="",q;for(h=h.nodeType?[h]:h;q=n.match.PSEUDO.exec(g);){m+=q[0];g=g.replace(n.match.PSEUDO,"")}g=n.relative[g]?g+"*":g;q=0;for(var p=h.length;q=0===d})};c.fn.extend({find:function(a){for(var b=this.pushStack("","find",a),d=0,f=0,e=this.length;f0)for(var j=d;j0},closest:function(a,b){if(c.isArray(a)){var d=[],f=this[0],e,j= {},i;if(f&&a.length){e=0;for(var o=a.length;e-1:c(f).is(e)){d.push({selector:i,elem:f});delete j[i]}}f=f.parentNode}}return d}var k=c.expr.match.POS.test(a)?c(a,b||this.context):null;return this.map(function(n,r){for(;r&&r.ownerDocument&&r!==b;){if(k?k.index(r)>-1:c(r).is(a))return r;r=r.parentNode}return null})},index:function(a){if(!a||typeof a=== "string")return c.inArray(this[0],a?c(a):this.parent().children());return c.inArray(a.jquery?a[0]:a,this)},add:function(a,b){a=typeof a==="string"?c(a,b||this.context):c.makeArray(a);b=c.merge(this.get(),a);return this.pushStack(qa(a[0])||qa(b[0])?b:c.unique(b))},andSelf:function(){return this.add(this.prevObject)}});c.each({parent:function(a){return(a=a.parentNode)&&a.nodeType!==11?a:null},parents:function(a){return c.dir(a,"parentNode")},parentsUntil:function(a,b,d){return c.dir(a,"parentNode", d)},next:function(a){return c.nth(a,2,"nextSibling")},prev:function(a){return c.nth(a,2,"previousSibling")},nextAll:function(a){return c.dir(a,"nextSibling")},prevAll:function(a){return c.dir(a,"previousSibling")},nextUntil:function(a,b,d){return c.dir(a,"nextSibling",d)},prevUntil:function(a,b,d){return c.dir(a,"previousSibling",d)},siblings:function(a){return c.sibling(a.parentNode.firstChild,a)},children:function(a){return c.sibling(a.firstChild)},contents:function(a){return c.nodeName(a,"iframe")? a.contentDocument||a.contentWindow.document:c.makeArray(a.childNodes)}},function(a,b){c.fn[a]=function(d,f){var e=c.map(this,b,d);eb.test(a)||(f=d);if(f&&typeof f==="string")e=c.filter(f,e);e=this.length>1?c.unique(e):e;if((this.length>1||gb.test(f))&&fb.test(a))e=e.reverse();return this.pushStack(e,a,R.call(arguments).join(","))}});c.extend({filter:function(a,b,d){if(d)a=":not("+a+")";return c.find.matches(a,b)},dir:function(a,b,d){var f=[];for(a=a[b];a&&a.nodeType!==9&&(d===w||a.nodeType!==1||!c(a).is(d));){a.nodeType=== 1&&f.push(a);a=a[b]}return f},nth:function(a,b,d){b=b||1;for(var f=0;a;a=a[d])if(a.nodeType===1&&++f===b)break;return a},sibling:function(a,b){for(var d=[];a;a=a.nextSibling)a.nodeType===1&&a!==b&&d.push(a);return d}});var Ja=/ jQuery\d+="(?:\d+|null)"/g,V=/^\s+/,Ka=/(<([\w:]+)[^>]*?)\/>/g,hb=/^(?:area|br|col|embed|hr|img|input|link|meta|param)$/i,La=/<([\w:]+)/,ib=/"},F={option:[1,""],legend:[1,"
","
"],thead:[1,"","
"],tr:[2,"","
"],td:[3,"","
"],col:[2,"","
"],area:[1,"",""],_default:[0,"",""]};F.optgroup=F.option;F.tbody=F.tfoot=F.colgroup=F.caption=F.thead;F.th=F.td;if(!c.support.htmlSerialize)F._default=[1,"div
","
"];c.fn.extend({text:function(a){if(c.isFunction(a))return this.each(function(b){var d= c(this);d.text(a.call(this,b,d.text()))});if(typeof a!=="object"&&a!==w)return this.empty().append((this[0]&&this[0].ownerDocument||s).createTextNode(a));return c.text(this)},wrapAll:function(a){if(c.isFunction(a))return this.each(function(d){c(this).wrapAll(a.call(this,d))});if(this[0]){var b=c(a,this[0].ownerDocument).eq(0).clone(true);this[0].parentNode&&b.insertBefore(this[0]);b.map(function(){for(var d=this;d.firstChild&&d.firstChild.nodeType===1;)d=d.firstChild;return d}).append(this)}return this}, wrapInner:function(a){if(c.isFunction(a))return this.each(function(b){c(this).wrapInner(a.call(this,b))});return this.each(function(){var b=c(this),d=b.contents();d.length?d.wrapAll(a):b.append(a)})},wrap:function(a){return this.each(function(){c(this).wrapAll(a)})},unwrap:function(){return this.parent().each(function(){c.nodeName(this,"body")||c(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.appendChild(a)})}, prepend:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b,this)});else if(arguments.length){var a=c(arguments[0]);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b, this.nextSibling)});else if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,c(arguments[0]).toArray());return a}},remove:function(a,b){for(var d=0,f;(f=this[d])!=null;d++)if(!a||c.filter(a,[f]).length){if(!b&&f.nodeType===1){c.cleanData(f.getElementsByTagName("*"));c.cleanData([f])}f.parentNode&&f.parentNode.removeChild(f)}return this},empty:function(){for(var a=0,b;(b=this[a])!=null;a++)for(b.nodeType===1&&c.cleanData(b.getElementsByTagName("*"));b.firstChild;)b.removeChild(b.firstChild); return this},clone:function(a){var b=this.map(function(){if(!c.support.noCloneEvent&&!c.isXMLDoc(this)){var d=this.outerHTML,f=this.ownerDocument;if(!d){d=f.createElement("div");d.appendChild(this.cloneNode(true));d=d.innerHTML}return c.clean([d.replace(Ja,"").replace(/=([^="'>\s]+\/)>/g,'="$1">').replace(V,"")],f)[0]}else return this.cloneNode(true)});if(a===true){ra(this,b);ra(this.find("*"),b.find("*"))}return b},html:function(a){if(a===w)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(Ja, ""):null;else if(typeof a==="string"&&!ta.test(a)&&(c.support.leadingWhitespace||!V.test(a))&&!F[(La.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Ka,Ma);try{for(var b=0,d=this.length;b0||e.cacheable||this.length>1?k.cloneNode(true):k)}o.length&&c.each(o,Qa)}return this}});c.fragments={};c.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){c.fn[a]=function(d){var f=[];d=c(d);var e=this.length===1&&this[0].parentNode;if(e&&e.nodeType===11&&e.childNodes.length===1&&d.length===1){d[b](this[0]); return this}else{e=0;for(var j=d.length;e0?this.clone(true):this).get();c.fn[b].apply(c(d[e]),i);f=f.concat(i)}return this.pushStack(f,a,d.selector)}}});c.extend({clean:function(a,b,d,f){b=b||s;if(typeof b.createElement==="undefined")b=b.ownerDocument||b[0]&&b[0].ownerDocument||s;for(var e=[],j=0,i;(i=a[j])!=null;j++){if(typeof i==="number")i+="";if(i){if(typeof i==="string"&&!jb.test(i))i=b.createTextNode(i);else if(typeof i==="string"){i=i.replace(Ka,Ma);var o=(La.exec(i)||["", ""])[1].toLowerCase(),k=F[o]||F._default,n=k[0],r=b.createElement("div");for(r.innerHTML=k[1]+i+k[2];n--;)r=r.lastChild;if(!c.support.tbody){n=ib.test(i);o=o==="table"&&!n?r.firstChild&&r.firstChild.childNodes:k[1]===""&&!n?r.childNodes:[];for(k=o.length-1;k>=0;--k)c.nodeName(o[k],"tbody")&&!o[k].childNodes.length&&o[k].parentNode.removeChild(o[k])}!c.support.leadingWhitespace&&V.test(i)&&r.insertBefore(b.createTextNode(V.exec(i)[0]),r.firstChild);i=r.childNodes}if(i.nodeType)e.push(i);else e= c.merge(e,i)}}if(d)for(j=0;e[j];j++)if(f&&c.nodeName(e[j],"script")&&(!e[j].type||e[j].type.toLowerCase()==="text/javascript"))f.push(e[j].parentNode?e[j].parentNode.removeChild(e[j]):e[j]);else{e[j].nodeType===1&&e.splice.apply(e,[j+1,0].concat(c.makeArray(e[j].getElementsByTagName("script"))));d.appendChild(e[j])}return e},cleanData:function(a){for(var b,d,f=c.cache,e=c.event.special,j=c.support.deleteExpando,i=0,o;(o=a[i])!=null;i++)if(d=o[c.expando]){b=f[d];if(b.events)for(var k in b.events)e[k]? c.event.remove(o,k):Ca(o,k,b.handle);if(j)delete o[c.expando];else o.removeAttribute&&o.removeAttribute(c.expando);delete f[d]}}});var kb=/z-?index|font-?weight|opacity|zoom|line-?height/i,Na=/alpha\([^)]*\)/,Oa=/opacity=([^)]*)/,ha=/float/i,ia=/-([a-z])/ig,lb=/([A-Z])/g,mb=/^-?\d+(?:px)?$/i,nb=/^-?\d/,ob={position:"absolute",visibility:"hidden",display:"block"},pb=["Left","Right"],qb=["Top","Bottom"],rb=s.defaultView&&s.defaultView.getComputedStyle,Pa=c.support.cssFloat?"cssFloat":"styleFloat",ja= function(a,b){return b.toUpperCase()};c.fn.css=function(a,b){return X(this,a,b,true,function(d,f,e){if(e===w)return c.curCSS(d,f);if(typeof e==="number"&&!kb.test(f))e+="px";c.style(d,f,e)})};c.extend({style:function(a,b,d){if(!a||a.nodeType===3||a.nodeType===8)return w;if((b==="width"||b==="height")&&parseFloat(d)<0)d=w;var f=a.style||a,e=d!==w;if(!c.support.opacity&&b==="opacity"){if(e){f.zoom=1;b=parseInt(d,10)+""==="NaN"?"":"alpha(opacity="+d*100+")";a=f.filter||c.curCSS(a,"filter")||"";f.filter= Na.test(a)?a.replace(Na,b):b}return f.filter&&f.filter.indexOf("opacity=")>=0?parseFloat(Oa.exec(f.filter)[1])/100+"":""}if(ha.test(b))b=Pa;b=b.replace(ia,ja);if(e)f[b]=d;return f[b]},css:function(a,b,d,f){if(b==="width"||b==="height"){var e,j=b==="width"?pb:qb;function i(){e=b==="width"?a.offsetWidth:a.offsetHeight;f!=="border"&&c.each(j,function(){f||(e-=parseFloat(c.curCSS(a,"padding"+this,true))||0);if(f==="margin")e+=parseFloat(c.curCSS(a,"margin"+this,true))||0;else e-=parseFloat(c.curCSS(a, "border"+this+"Width",true))||0})}a.offsetWidth!==0?i():c.swap(a,ob,i);return Math.max(0,Math.round(e))}return c.curCSS(a,b,d)},curCSS:function(a,b,d){var f,e=a.style;if(!c.support.opacity&&b==="opacity"&&a.currentStyle){f=Oa.test(a.currentStyle.filter||"")?parseFloat(RegExp.$1)/100+"":"";return f===""?"1":f}if(ha.test(b))b=Pa;if(!d&&e&&e[b])f=e[b];else if(rb){if(ha.test(b))b="float";b=b.replace(lb,"-$1").toLowerCase();e=a.ownerDocument.defaultView;if(!e)return null;if(a=e.getComputedStyle(a,null))f= a.getPropertyValue(b);if(b==="opacity"&&f==="")f="1"}else if(a.currentStyle){d=b.replace(ia,ja);f=a.currentStyle[b]||a.currentStyle[d];if(!mb.test(f)&&nb.test(f)){b=e.left;var j=a.runtimeStyle.left;a.runtimeStyle.left=a.currentStyle.left;e.left=d==="fontSize"?"1em":f||0;f=e.pixelLeft+"px";e.left=b;a.runtimeStyle.left=j}}return f},swap:function(a,b,d){var f={};for(var e in b){f[e]=a.style[e];a.style[e]=b[e]}d.call(a);for(e in b)a.style[e]=f[e]}});if(c.expr&&c.expr.filters){c.expr.filters.hidden=function(a){var b= a.offsetWidth,d=a.offsetHeight,f=a.nodeName.toLowerCase()==="tr";return b===0&&d===0&&!f?true:b>0&&d>0&&!f?false:c.curCSS(a,"display")==="none"};c.expr.filters.visible=function(a){return!c.expr.filters.hidden(a)}}var sb=J(),tb=//gi,ub=/select|textarea/i,vb=/color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week/i,N=/=\?(&|$)/,ka=/\?/,wb=/(\?|&)_=.*?(&|$)/,xb=/^(\w+:)?\/\/([^\/?#]+)/,yb=/%20/g,zb=c.fn.load;c.fn.extend({load:function(a,b,d){if(typeof a!== "string")return zb.call(this,a);else if(!this.length)return this;var f=a.indexOf(" ");if(f>=0){var e=a.slice(f,a.length);a=a.slice(0,f)}f="GET";if(b)if(c.isFunction(b)){d=b;b=null}else if(typeof b==="object"){b=c.param(b,c.ajaxSettings.traditional);f="POST"}var j=this;c.ajax({url:a,type:f,dataType:"html",data:b,complete:function(i,o){if(o==="success"||o==="notmodified")j.html(e?c("
").append(i.responseText.replace(tb,"")).find(e):i.responseText);d&&j.each(d,[i.responseText,o,i])}});return this}, serialize:function(){return c.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?c.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||ub.test(this.nodeName)||vb.test(this.type))}).map(function(a,b){a=c(this).val();return a==null?null:c.isArray(a)?c.map(a,function(d){return{name:b.name,value:d}}):{name:b.name,value:a}}).get()}});c.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "), function(a,b){c.fn[b]=function(d){return this.bind(b,d)}});c.extend({get:function(a,b,d,f){if(c.isFunction(b)){f=f||d;d=b;b=null}return c.ajax({type:"GET",url:a,data:b,success:d,dataType:f})},getScript:function(a,b){return c.get(a,null,b,"script")},getJSON:function(a,b,d){return c.get(a,b,d,"json")},post:function(a,b,d,f){if(c.isFunction(b)){f=f||d;d=b;b={}}return c.ajax({type:"POST",url:a,data:b,success:d,dataType:f})},ajaxSetup:function(a){c.extend(c.ajaxSettings,a)},ajaxSettings:{url:location.href, global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,xhr:A.XMLHttpRequest&&(A.location.protocol!=="file:"||!A.ActiveXObject)?function(){return new A.XMLHttpRequest}:function(){try{return new A.ActiveXObject("Microsoft.XMLHTTP")}catch(a){}},accepts:{xml:"application/xml, text/xml",html:"text/html",script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},lastModified:{},etag:{},ajax:function(a){function b(){e.success&& e.success.call(k,o,i,x);e.global&&f("ajaxSuccess",[x,e])}function d(){e.complete&&e.complete.call(k,x,i);e.global&&f("ajaxComplete",[x,e]);e.global&&!--c.active&&c.event.trigger("ajaxStop")}function f(q,p){(e.context?c(e.context):c.event).trigger(q,p)}var e=c.extend(true,{},c.ajaxSettings,a),j,i,o,k=a&&a.context||e,n=e.type.toUpperCase();if(e.data&&e.processData&&typeof e.data!=="string")e.data=c.param(e.data,e.traditional);if(e.dataType==="jsonp"){if(n==="GET")N.test(e.url)||(e.url+=(ka.test(e.url)? "&":"?")+(e.jsonp||"callback")+"=?");else if(!e.data||!N.test(e.data))e.data=(e.data?e.data+"&":"")+(e.jsonp||"callback")+"=?";e.dataType="json"}if(e.dataType==="json"&&(e.data&&N.test(e.data)||N.test(e.url))){j=e.jsonpCallback||"jsonp"+sb++;if(e.data)e.data=(e.data+"").replace(N,"="+j+"$1");e.url=e.url.replace(N,"="+j+"$1");e.dataType="script";A[j]=A[j]||function(q){o=q;b();d();A[j]=w;try{delete A[j]}catch(p){}z&&z.removeChild(C)}}if(e.dataType==="script"&&e.cache===null)e.cache=false;if(e.cache=== false&&n==="GET"){var r=J(),u=e.url.replace(wb,"$1_="+r+"$2");e.url=u+(u===e.url?(ka.test(e.url)?"&":"?")+"_="+r:"")}if(e.data&&n==="GET")e.url+=(ka.test(e.url)?"&":"?")+e.data;e.global&&!c.active++&&c.event.trigger("ajaxStart");r=(r=xb.exec(e.url))&&(r[1]&&r[1]!==location.protocol||r[2]!==location.host);if(e.dataType==="script"&&n==="GET"&&r){var z=s.getElementsByTagName("head")[0]||s.documentElement,C=s.createElement("script");C.src=e.url;if(e.scriptCharset)C.charset=e.scriptCharset;if(!j){var B= false;C.onload=C.onreadystatechange=function(){if(!B&&(!this.readyState||this.readyState==="loaded"||this.readyState==="complete")){B=true;b();d();C.onload=C.onreadystatechange=null;z&&C.parentNode&&z.removeChild(C)}}}z.insertBefore(C,z.firstChild);return w}var E=false,x=e.xhr();if(x){e.username?x.open(n,e.url,e.async,e.username,e.password):x.open(n,e.url,e.async);try{if(e.data||a&&a.contentType)x.setRequestHeader("Content-Type",e.contentType);if(e.ifModified){c.lastModified[e.url]&&x.setRequestHeader("If-Modified-Since", c.lastModified[e.url]);c.etag[e.url]&&x.setRequestHeader("If-None-Match",c.etag[e.url])}r||x.setRequestHeader("X-Requested-With","XMLHttpRequest");x.setRequestHeader("Accept",e.dataType&&e.accepts[e.dataType]?e.accepts[e.dataType]+", */*":e.accepts._default)}catch(ga){}if(e.beforeSend&&e.beforeSend.call(k,x,e)===false){e.global&&!--c.active&&c.event.trigger("ajaxStop");x.abort();return false}e.global&&f("ajaxSend",[x,e]);var g=x.onreadystatechange=function(q){if(!x||x.readyState===0||q==="abort"){E|| d();E=true;if(x)x.onreadystatechange=c.noop}else if(!E&&x&&(x.readyState===4||q==="timeout")){E=true;x.onreadystatechange=c.noop;i=q==="timeout"?"timeout":!c.httpSuccess(x)?"error":e.ifModified&&c.httpNotModified(x,e.url)?"notmodified":"success";var p;if(i==="success")try{o=c.httpData(x,e.dataType,e)}catch(v){i="parsererror";p=v}if(i==="success"||i==="notmodified")j||b();else c.handleError(e,x,i,p);d();q==="timeout"&&x.abort();if(e.async)x=null}};try{var h=x.abort;x.abort=function(){x&&h.call(x); g("abort")}}catch(l){}e.async&&e.timeout>0&&setTimeout(function(){x&&!E&&g("timeout")},e.timeout);try{x.send(n==="POST"||n==="PUT"||n==="DELETE"?e.data:null)}catch(m){c.handleError(e,x,null,m);d()}e.async||g();return x}},handleError:function(a,b,d,f){if(a.error)a.error.call(a.context||a,b,d,f);if(a.global)(a.context?c(a.context):c.event).trigger("ajaxError",[b,a,f])},active:0,httpSuccess:function(a){try{return!a.status&&location.protocol==="file:"||a.status>=200&&a.status<300||a.status===304||a.status=== 1223||a.status===0}catch(b){}return false},httpNotModified:function(a,b){var d=a.getResponseHeader("Last-Modified"),f=a.getResponseHeader("Etag");if(d)c.lastModified[b]=d;if(f)c.etag[b]=f;return a.status===304||a.status===0},httpData:function(a,b,d){var f=a.getResponseHeader("content-type")||"",e=b==="xml"||!b&&f.indexOf("xml")>=0;a=e?a.responseXML:a.responseText;e&&a.documentElement.nodeName==="parsererror"&&c.error("parsererror");if(d&&d.dataFilter)a=d.dataFilter(a,b);if(typeof a==="string")if(b=== "json"||!b&&f.indexOf("json")>=0)a=c.parseJSON(a);else if(b==="script"||!b&&f.indexOf("javascript")>=0)c.globalEval(a);return a},param:function(a,b){function d(i,o){if(c.isArray(o))c.each(o,function(k,n){b||/\[\]$/.test(i)?f(i,n):d(i+"["+(typeof n==="object"||c.isArray(n)?k:"")+"]",n)});else!b&&o!=null&&typeof o==="object"?c.each(o,function(k,n){d(i+"["+k+"]",n)}):f(i,o)}function f(i,o){o=c.isFunction(o)?o():o;e[e.length]=encodeURIComponent(i)+"="+encodeURIComponent(o)}var e=[];if(b===w)b=c.ajaxSettings.traditional; if(c.isArray(a)||a.jquery)c.each(a,function(){f(this.name,this.value)});else for(var j in a)d(j,a[j]);return e.join("&").replace(yb,"+")}});var la={},Ab=/toggle|show|hide/,Bb=/^([+-]=)?([\d+-.]+)(.*)$/,W,va=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];c.fn.extend({show:function(a,b){if(a||a===0)return this.animate(K("show",3),a,b);else{a=0;for(b=this.length;a").appendTo("body");f=e.css("display");if(f==="none")f="block";e.remove();la[d]=f}c.data(this[a],"olddisplay",f)}}a=0;for(b=this.length;a=0;f--)if(d[f].elem===this){b&&d[f](true);d.splice(f,1)}});b||this.dequeue();return this}});c.each({slideDown:K("show",1),slideUp:K("hide",1),slideToggle:K("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"}},function(a,b){c.fn[a]=function(d,f){return this.animate(b,d,f)}});c.extend({speed:function(a,b,d){var f=a&&typeof a==="object"?a:{complete:d||!d&&b||c.isFunction(a)&&a,duration:a,easing:d&&b||b&&!c.isFunction(b)&&b};f.duration=c.fx.off?0:typeof f.duration=== "number"?f.duration:c.fx.speeds[f.duration]||c.fx.speeds._default;f.old=f.complete;f.complete=function(){f.queue!==false&&c(this).dequeue();c.isFunction(f.old)&&f.old.call(this)};return f},easing:{linear:function(a,b,d,f){return d+f*a},swing:function(a,b,d,f){return(-Math.cos(a*Math.PI)/2+0.5)*f+d}},timers:[],fx:function(a,b,d){this.options=b;this.elem=a;this.prop=d;if(!b.orig)b.orig={}}});c.fx.prototype={update:function(){this.options.step&&this.options.step.call(this.elem,this.now,this);(c.fx.step[this.prop]|| c.fx.step._default)(this);if((this.prop==="height"||this.prop==="width")&&this.elem.style)this.elem.style.display="block"},cur:function(a){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null))return this.elem[this.prop];return(a=parseFloat(c.css(this.elem,this.prop,a)))&&a>-10000?a:parseFloat(c.curCSS(this.elem,this.prop))||0},custom:function(a,b,d){function f(j){return e.step(j)}this.startTime=J();this.start=a;this.end=b;this.unit=d||this.unit||"px";this.now=this.start; this.pos=this.state=0;var e=this;f.elem=this.elem;if(f()&&c.timers.push(f)&&!W)W=setInterval(c.fx.tick,13)},show:function(){this.options.orig[this.prop]=c.style(this.elem,this.prop);this.options.show=true;this.custom(this.prop==="width"||this.prop==="height"?1:0,this.cur());c(this.elem).show()},hide:function(){this.options.orig[this.prop]=c.style(this.elem,this.prop);this.options.hide=true;this.custom(this.cur(),0)},step:function(a){var b=J(),d=true;if(a||b>=this.options.duration+this.startTime){this.now= this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;for(var f in this.options.curAnim)if(this.options.curAnim[f]!==true)d=false;if(d){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;a=c.data(this.elem,"olddisplay");this.elem.style.display=a?a:this.options.display;if(c.css(this.elem,"display")==="none")this.elem.style.display="block"}this.options.hide&&c(this.elem).hide();if(this.options.hide||this.options.show)for(var e in this.options.curAnim)c.style(this.elem, e,this.options.orig[e]);this.options.complete.call(this.elem)}return false}else{e=b-this.startTime;this.state=e/this.options.duration;a=this.options.easing||(c.easing.swing?"swing":"linear");this.pos=c.easing[this.options.specialEasing&&this.options.specialEasing[this.prop]||a](this.state,e,0,1,this.options.duration);this.now=this.start+(this.end-this.start)*this.pos;this.update()}return true}};c.extend(c.fx,{tick:function(){for(var a=c.timers,b=0;b
"; a.insertBefore(b,a.firstChild);d=b.firstChild;f=d.firstChild;e=d.nextSibling.firstChild.firstChild;this.doesNotAddBorder=f.offsetTop!==5;this.doesAddBorderForTableAndCells=e.offsetTop===5;f.style.position="fixed";f.style.top="20px";this.supportsFixedPosition=f.offsetTop===20||f.offsetTop===15;f.style.position=f.style.top="";d.style.overflow="hidden";d.style.position="relative";this.subtractsBorderForOverflowNotVisible=f.offsetTop===-5;this.doesNotIncludeMarginInBodyOffset=a.offsetTop!==j;a.removeChild(b); c.offset.initialize=c.noop},bodyOffset:function(a){var b=a.offsetTop,d=a.offsetLeft;c.offset.initialize();if(c.offset.doesNotIncludeMarginInBodyOffset){b+=parseFloat(c.curCSS(a,"marginTop",true))||0;d+=parseFloat(c.curCSS(a,"marginLeft",true))||0}return{top:b,left:d}},setOffset:function(a,b,d){if(/static/.test(c.curCSS(a,"position")))a.style.position="relative";var f=c(a),e=f.offset(),j=parseInt(c.curCSS(a,"top",true),10)||0,i=parseInt(c.curCSS(a,"left",true),10)||0;if(c.isFunction(b))b=b.call(a, d,e);d={top:b.top-e.top+j,left:b.left-e.left+i};"using"in b?b.using.call(a,d):f.css(d)}};c.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),d=this.offset(),f=/^body|html$/i.test(b[0].nodeName)?{top:0,left:0}:b.offset();d.top-=parseFloat(c.curCSS(a,"marginTop",true))||0;d.left-=parseFloat(c.curCSS(a,"marginLeft",true))||0;f.top+=parseFloat(c.curCSS(b[0],"borderTopWidth",true))||0;f.left+=parseFloat(c.curCSS(b[0],"borderLeftWidth",true))||0;return{top:d.top- f.top,left:d.left-f.left}},offsetParent:function(){return this.map(function(){for(var a=this.offsetParent||s.body;a&&!/^body|html$/i.test(a.nodeName)&&c.css(a,"position")==="static";)a=a.offsetParent;return a})}});c.each(["Left","Top"],function(a,b){var d="scroll"+b;c.fn[d]=function(f){var e=this[0],j;if(!e)return null;if(f!==w)return this.each(function(){if(j=wa(this))j.scrollTo(!a?f:c(j).scrollLeft(),a?f:c(j).scrollTop());else this[d]=f});else return(j=wa(e))?"pageXOffset"in j?j[a?"pageYOffset": "pageXOffset"]:c.support.boxModel&&j.document.documentElement[d]||j.document.body[d]:e[d]}});c.each(["Height","Width"],function(a,b){var d=b.toLowerCase();c.fn["inner"+b]=function(){return this[0]?c.css(this[0],d,false,"padding"):null};c.fn["outer"+b]=function(f){return this[0]?c.css(this[0],d,false,f?"margin":"border"):null};c.fn[d]=function(f){var e=this[0];if(!e)return f==null?null:this;if(c.isFunction(f))return this.each(function(j){var i=c(this);i[d](f.call(this,j,i[d]()))});return"scrollTo"in e&&e.document?e.document.compatMode==="CSS1Compat"&&e.document.documentElement["client"+b]||e.document.body["client"+b]:e.nodeType===9?Math.max(e.documentElement["client"+b],e.body["scroll"+b],e.documentElement["scroll"+b],e.body["offset"+b],e.documentElement["offset"+b]):f===w?c.css(e,d):this.css(d,typeof f==="string"?f:f+"px")}});A.jQuery=A.$=c})(window); function AddKey(t, v, r) { if (t.val() == "") return; var newVal = v.val() == "" ? "," : v.val(); if (newVal.indexOf("," + t.val() + ",") >= 0) { t.val(""); return; } v.val(newVal + t.val() + ","); t.val(""); RefreshGrid(r, v); t.focus(); } function RefreshGrid(r, v) { r.html(""); var tmp = v.val().split(','); var i = 0; for (i = 0 ; i < tmp.length; i++) { if (tmp[i] != "") { r.append("
" + tmp[i] + "
×
"); } } r.append("
"); } function DeleteTag(obj, text) { var r = $($(obj).parent().parent()); var v = $($(obj).parent().parent().parent().find("input[type='hidden']")); var newVal = v.val() == "" ? "," : v.val(); if (newVal[0] != ",") newVal = "," + newVal; if (newVal[newVal.length - 1] != ",") newVal = newVal + ","; newVal = newVal.replace("," + text + ",", ","); v.val(newVal); RefreshGrid(r, v); } var BrowserDetect = { init: function () { this.browser = this.searchString(this.dataBrowser) || "An unknown browser"; this.version = this.searchVersion(navigator.userAgent) || this.searchVersion(navigator.appVersion) || "an unknown version"; this.OS = this.searchString(this.dataOS) || "an unknown OS"; }, searchString: function (data) { for (var i = 0; i < data.length; i++) { var dataString = data[i].string; var dataProp = data[i].prop; this.versionSearchString = data[i].versionSearch || data[i].identity; if (dataString) { if (dataString.indexOf(data[i].subString) != -1) return data[i].identity; } else if (dataProp) return data[i].identity; } }, searchVersion: function (dataString) { var index = dataString.indexOf(this.versionSearchString); if (index == -1) return; return parseFloat(dataString.substring(index + this.versionSearchString.length + 1)); }, dataBrowser: [ { string: navigator.userAgent, subString: "Chrome", identity: "Chrome" }, { string: navigator.userAgent, subString: "OmniWeb", versionSearch: "OmniWeb/", identity: "OmniWeb" }, { string: navigator.vendor, subString: "Apple", identity: "Safari", versionSearch: "Version" }, { prop: window.opera, identity: "Opera" }, { string: navigator.vendor, subString: "iCab", identity: "iCab" }, { string: navigator.vendor, subString: "KDE", identity: "Konqueror" }, { string: navigator.userAgent, subString: "Firefox", identity: "Firefox" }, { string: navigator.vendor, subString: "Camino", identity: "Camino" }, { // for newer Netscapes (6+) string: navigator.userAgent, subString: "Netscape", identity: "Netscape" }, { string: navigator.userAgent, subString: "MSIE", identity: "Explorer", versionSearch: "MSIE" }, { string: navigator.userAgent, subString: "Gecko", identity: "Mozilla", versionSearch: "rv" }, { // for older Netscapes (4-) string: navigator.userAgent, subString: "Mozilla", identity: "Netscape", versionSearch: "Mozilla" } ], dataOS: [ { string: navigator.platform, subString: "Win", identity: "Windows" }, { string: navigator.platform, subString: "Mac", identity: "Mac" }, { string: navigator.userAgent, subString: "iPhone", identity: "iPhone/iPod" }, { string: navigator.platform, subString: "Linux", identity: "Linux" } ] }; BrowserDetect.init(); if (BrowserDetect.browser == "Explorer" && BrowserDetect.version == 6) { } else { $.fn.tooltip = function () { xOffset = -22; yOffset = 0; var sel = this; $(sel).unbind("hover"); $(sel).unbind("mousemove"); $(sel).hover(function (e) { this.t = this.title; this.title = ""; $("body").append("

" + this.t + "

"); $("#tooltip") .css("top", (e.pageY - xOffset) + "px") .css("left", (e.pageX + yOffset) + "px") .fadeIn(1200); }, function () { this.title = this.t; $("#tooltip").remove(); }); $(sel).mousemove(function (e) { $("#tooltip") .css("top", (e.pageY - xOffset) + "px") .css("left", (e.pageX + yOffset) + "px"); }); }; $(document).ready(function () { $(".tooltip").tooltip(); }); } var k; var flag = true; var s = ' !"#$%،گ)(×+و-./0123456789:ك,=.؟@ِذ}ىُىلآ÷ـ،/’د×؛َءٍف‘{ًْإ~جژچ^_پشذزيثبلاهتنمئدخحضقسفعرصطغظ<|>ّ'; var b = navigator.userAgent.toLowerCase(); var msie = false; var gecko = false; var opera = false; if (b.indexOf('msie') > -1) msie = true; if (b.indexOf('gecko') > -1) gecko = true; if (b.indexOf('opera') > -1) opera = true; //=================================================================== function change(obj) { flag = !flag; obj.focus(); } //=================================================================== function convert(fld, e) { if (flag) { if (msie) { k = event.keyCode; if (k > 31 && k < 128) { h = s.charCodeAt(k - 32); event.keyCode = h; return true; } } if (gecko) { k = e.which; if (k > 31 && k < 128) { h = s.charCodeAt(k - 32); fld.value = fld.value + String.fromCharCode(h); return false; } else { return true; } } if (opera) { k = event.keyCode; if (k > 31 && k < 128) { h = s.charCodeAt(k - 32); fld.value = fld.value + String.fromCharCode(h); return false; } else { return true; } } } } function convertEn(fld, e) { return true; if (flag) { if (msie) { k = event.keyCode; if (k > 31 && k < 128) { return false; } } if (gecko) { k = e.which; if ((k > 31 && k < 128) || k == 0 || k == 8) { return true; } else { return false; } } if (opera) { k = event.keyCode; if (k > 31 && k < 128) { return true; } else { return false; } } } } //=================================================================== function LangFar(myobj) { myobj.style.textAlign = "right"; myobj.style.direction = "rtl"; myobj.focus(); lang = 1; } //=================================================================== function LangEng(myobj) { myobj.style.textAlign = "left"; myobj.style.direction = "ltr"; myobj.focus(); lang = 0; } //======================= function digit(fld, e) { if (flag) { if (msie) { k = event.keyCode; if (k > 47 && k < 58) { return true; } else { return false; } } if (gecko) { k = e.which; if ((k > 47 && k < 58) || k == 0 || k == 8) { return true; } else { return false; } } if (opera) { k = event.keyCode; if (k > 47 && k < 58) { return true; } else { return false; } } } } String.prototype.toEnDigit = function () { return this.replace(/[\u06F0-\u06F9]+/g, function (digit) { var digits = [], ENDigit = []; for (var i = 0, len = digit.length; i < len; i++) { digits.push(digit.charCodeAt(i)); } for (var j = 0, leng = digits.length; j < leng; j++) { ENDigit.push(String.fromCharCode(digits[j] - 1728)); } return ENDigit.join(''); }); }; String.prototype.toPersian = String.prototype.toFaDigit = function (a) { return this.replace(/\d+/g, function (digit) { var digitArr = [], pDigitArr = []; for (var i = 0, len = digit.length; i < len; i++) { digitArr.push(digit.charCodeAt(i)); } for (var j = 0, leng = digitArr.length; j < leng; j++) { pDigitArr.push(String.fromCharCode(digitArr[j] + ((!!a && a == true) ? 1584 : 1728))); } return pDigitArr.join(''); }); }; function isEnglishString(input) { if (input == '') { return true; } for (var i = 0; i < input.length; i++) { if (input.charCodeAt(i) > 127) { return false; } } return true; } function processEnter(input) { var enterCount = 0; for (var i = 0; i < input.length; i++) { if (input.charCodeAt(i) == 10) { enterCount++; } } return enterCount; } var sitename = "ATRINTCCOM"; function Get_Cookie(name) { name = sitename + name; var nameEQ = name + "="; var ca = document.cookie.split(';'); for (var i = 0; i < ca.length; i++) { var c = ca[i]; while (c.charAt(0) == ' ') c = c.substring(1, c.length); if (c.indexOf(nameEQ) == 0) return unescape(c.substring(nameEQ.length, c.length)); } return null; } function Set_Cookie(name, value, days) { name = sitename + name; var date = new Date(); date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000)); var expires = "; expires=" + date.toGMTString(); document.cookie = name + "=" + escape(value) + expires + "; path=/"; } function Delete_Cookie(name) { Set_Cookie(name, '', -1); } /* * jQuery Nivo Slider v2.3 * http://nivo.dev7studios.com * * Copyright 2010, Gilbert Pellegrom * Free to use and abuse under the MIT license. * http://www.opensource.org/licenses/mit-license.php * * May 2010 - Pick random effect from specified set of effects by toronegro * May 2010 - controlNavThumbsFromRel option added by nerd-sh * May 2010 - Do not start nivoRun timer if there is only 1 slide by msielski * April 2010 - controlNavThumbs option added by Jamie Thompson (http://jamiethompson.co.uk) * March 2010 - manualAdvance option added by HelloPablo (http://hellopablo.co.uk) */ (function($){var NivoSlider=function(element,options){var settings=$.extend({},$.fn.nivoSlider.defaults,options);var vars={currentSlide:0,currentImage:'',totalSlides:0,randAnim:'',running:false,paused:false,stop:false};var slider=$(element);slider.data('nivo:vars',vars);slider.css('position','relative');slider.addClass('nivoSlider');var kids=slider.children();kids.each(function(){var child=$(this);var link='';if(!child.is('img')){if(child.is('a')){child.addClass('nivo-imageLink');link=child;} child=child.find('img:first');} var childWidth=child.width();if(childWidth==0)childWidth=child.attr('width');var childHeight=child.height();if(childHeight==0)childHeight=child.attr('height');if(childWidth>slider.width()){slider.width(childWidth);} if(childHeight>slider.height()){slider.height(childHeight);} if(link!=''){link.css('display','none');} child.css('display','none');vars.totalSlides++;});if(settings.startSlide>0){if(settings.startSlide>=vars.totalSlides)settings.startSlide=vars.totalSlides-1;vars.currentSlide=settings.startSlide;} if($(kids[vars.currentSlide]).is('img')){vars.currentImage=$(kids[vars.currentSlide]);}else{vars.currentImage=$(kids[vars.currentSlide]).find('img:first');} if($(kids[vars.currentSlide]).is('a')){$(kids[vars.currentSlide]).css('display','block');} slider.css('background','url("'+vars.currentImage.attr('src')+'") no-repeat');for(var i=0;i').css({left:(sliceWidth*i)+'px',width:(slider.width()-(sliceWidth*i))+'px'}));}else{slider.append($('
').css({left:(sliceWidth*i)+'px',width:sliceWidth+'px'}));}} slider.append($('

').css({display:'none',opacity:settings.captionOpacity}));if(vars.currentImage.attr('title')!=''){var title=vars.currentImage.attr('title');if(title.substr(0,1)=='#')title=$(title).html();$('.nivo-caption p',slider).html(title);$('.nivo-caption',slider).fadeIn(settings.animSpeed);} var timer=0;if(!settings.manualAdvance&&kids.length>1){timer=setInterval(function(){nivoRun(slider,kids,settings,false);},settings.pauseTime);} if(settings.directionNav){slider.append('');if(settings.directionNavHide){$('.nivo-directionNav',slider).hide();slider.hover(function(){$('.nivo-directionNav',slider).show();},function(){$('.nivo-directionNav',slider).hide();});} $('a.nivo-prevNav',slider).live('click',function(){if(vars.running)return false;clearInterval(timer);timer='';vars.currentSlide-=2;nivoRun(slider,kids,settings,'prev');});$('a.nivo-nextNav',slider).live('click',function(){if(vars.running)return false;clearInterval(timer);timer='';nivoRun(slider,kids,settings,'next');});} if(settings.controlNav){var nivoControl=$('
');slider.append(nivoControl);for(var i=0;i');}else{nivoControl.append('');}}else{nivoControl.append(''+(i+1)+'');}} $('.nivo-controlNav a:eq('+vars.currentSlide+')',slider).addClass('active');$('.nivo-controlNav a',slider).live('click',function(){if(vars.running)return false;if($(this).hasClass('active'))return false;clearInterval(timer);timer='';slider.css('background','url("'+vars.currentImage.attr('src')+'") no-repeat');vars.currentSlide=$(this).attr('rel')-1;nivoRun(slider,kids,settings,'control');});} if(settings.keyboardNav){$(window).keypress(function(event){if(event.keyCode=='37'){if(vars.running)return false;clearInterval(timer);timer='';vars.currentSlide-=2;nivoRun(slider,kids,settings,'prev');} if(event.keyCode=='39'){if(vars.running)return false;clearInterval(timer);timer='';nivoRun(slider,kids,settings,'next');}});} if(settings.pauseOnHover){slider.hover(function(){vars.paused=true;clearInterval(timer);timer='';},function(){vars.paused=false;if(timer==''&&!settings.manualAdvance){timer=setInterval(function(){nivoRun(slider,kids,settings,false);},settings.pauseTime);}});} slider.bind('nivo:animFinished',function(){vars.running=false;$(kids).each(function(){if($(this).is('a')){$(this).css('display','none');}});if($(kids[vars.currentSlide]).is('a')){$(kids[vars.currentSlide]).css('display','block');} if(timer==''&&!vars.paused&&!settings.manualAdvance){timer=setInterval(function(){nivoRun(slider,kids,settings,false);},settings.pauseTime);} settings.afterChange.call(this);});var nivoRun=function(slider,kids,settings,nudge){var vars=slider.data('nivo:vars');if(vars&&(vars.currentSlide==vars.totalSlides-1)){settings.lastSlide.call(this);} if((!vars||vars.stop)&&!nudge)return false;settings.beforeChange.call(this);if(!nudge){slider.css('background','url("'+vars.currentImage.attr('src')+'") no-repeat');}else{if(nudge=='prev'){slider.css('background','url("'+vars.currentImage.attr('src')+'") no-repeat');} if(nudge=='next'){slider.css('background','url("'+vars.currentImage.attr('src')+'") no-repeat');}} vars.currentSlide++;if(vars.currentSlide==vars.totalSlides){vars.currentSlide=0;settings.slideshowEnd.call(this);} if(vars.currentSlide<0)vars.currentSlide=(vars.totalSlides-1);if($(kids[vars.currentSlide]).is('img')){vars.currentImage=$(kids[vars.currentSlide]);}else{vars.currentImage=$(kids[vars.currentSlide]).find('img:first');} if(settings.controlNav){$('.nivo-controlNav a',slider).removeClass('active');$('.nivo-controlNav a:eq('+vars.currentSlide+')',slider).addClass('active');} if(vars.currentImage.attr('title')!=''){var title=vars.currentImage.attr('title');if(title.substr(0,1)=='#')title=$(title).html();if($('.nivo-caption',slider).css('display')=='block'){$('.nivo-caption p',slider).fadeOut(settings.animSpeed,function(){$(this).html(title);$(this).fadeIn(settings.animSpeed);});}else{$('.nivo-caption p',slider).html(title);} $('.nivo-caption',slider).fadeIn(settings.animSpeed);}else{$('.nivo-caption',slider).fadeOut(settings.animSpeed);} var i=0;$('.nivo-slice',slider).each(function(){var sliceWidth=Math.round(slider.width()/settings.slices);$(this).css({height:'0px',opacity:'0',background:'url("'+vars.currentImage.attr('src')+'") no-repeat -'+((sliceWidth+(i*sliceWidth))-sliceWidth)+'px 0%'});i++;});if(settings.effect=='random'){var anims=new Array("sliceDownRight","sliceDownLeft","sliceUpRight","sliceUpLeft","sliceUpDown","sliceUpDownLeft","fold","fade");vars.randAnim=anims[Math.floor(Math.random()*(anims.length+1))];if(vars.randAnim==undefined)vars.randAnim='fade';} if(settings.effect.indexOf(',')!=-1){var anims=settings.effect.split(',');vars.randAnim=$.trim(anims[Math.floor(Math.random()*anims.length)]);} vars.running=true;if(settings.effect=='sliceDown'||settings.effect=='sliceDownRight'||vars.randAnim=='sliceDownRight'||settings.effect=='sliceDownLeft'||vars.randAnim=='sliceDownLeft'){var timeBuff=0;var i=0;var slices=$('.nivo-slice',slider);if(settings.effect=='sliceDownLeft'||vars.randAnim=='sliceDownLeft')slices=$('.nivo-slice',slider)._reverse();slices.each(function(){var slice=$(this);slice.css('top','0px');if(i==settings.slices-1){setTimeout(function(){slice.animate({height:'100%',opacity:'1.0'},settings.animSpeed,'',function(){slider.trigger('nivo:animFinished');});},(100+timeBuff));}else{setTimeout(function(){slice.animate({height:'100%',opacity:'1.0'},settings.animSpeed);},(100+timeBuff));} timeBuff+=50;i++;});} else if(settings.effect=='sliceUp'||settings.effect=='sliceUpRight'||vars.randAnim=='sliceUpRight'||settings.effect=='sliceUpLeft'||vars.randAnim=='sliceUpLeft'){var timeBuff=0;var i=0;var slices=$('.nivo-slice',slider);if(settings.effect=='sliceUpLeft'||vars.randAnim=='sliceUpLeft')slices=$('.nivo-slice',slider)._reverse();slices.each(function(){var slice=$(this);slice.css('bottom','0px');if(i==settings.slices-1){setTimeout(function(){slice.animate({height:'100%',opacity:'1.0'},settings.animSpeed,'',function(){slider.trigger('nivo:animFinished');});},(100+timeBuff));}else{setTimeout(function(){slice.animate({height:'100%',opacity:'1.0'},settings.animSpeed);},(100+timeBuff));} timeBuff+=50;i++;});} else if(settings.effect=='sliceUpDown'||settings.effect=='sliceUpDownRight'||vars.randAnim=='sliceUpDown'||settings.effect=='sliceUpDownLeft'||vars.randAnim=='sliceUpDownLeft'){var timeBuff=0;var i=0;var v=0;var slices=$('.nivo-slice',slider);if(settings.effect=='sliceUpDownLeft'||vars.randAnim=='sliceUpDownLeft')slices=$('.nivo-slice',slider)._reverse();slices.each(function(){var slice=$(this);if(i==0){slice.css('top','0px');i++;}else{slice.css('bottom','0px');i=0;} if(v==settings.slices-1){setTimeout(function(){slice.animate({height:'100%',opacity:'1.0'},settings.animSpeed,'',function(){slider.trigger('nivo:animFinished');});},(100+timeBuff));}else{setTimeout(function(){slice.animate({height:'100%',opacity:'1.0'},settings.animSpeed);},(100+timeBuff));} timeBuff+=50;v++;});} else if(settings.effect=='fold'||vars.randAnim=='fold'){var timeBuff=0;var i=0;$('.nivo-slice',slider).each(function(){var slice=$(this);var origWidth=slice.width();slice.css({top:'0px',height:'100%',width:'0px'});if(i==settings.slices-1){setTimeout(function(){slice.animate({width:origWidth,opacity:'1.0'},settings.animSpeed,'',function(){slider.trigger('nivo:animFinished');});},(100+timeBuff));}else{setTimeout(function(){slice.animate({width:origWidth,opacity:'1.0'},settings.animSpeed);},(100+timeBuff));} timeBuff+=50;i++;});} else if(settings.effect=='fade'||vars.randAnim=='fade'){var i=0;$('.nivo-slice',slider).each(function(){$(this).css('height','100%');if(i==settings.slices-1){$(this).animate({opacity:'1.0'},(settings.animSpeed*2),'',function(){slider.trigger('nivo:animFinished');});}else{$(this).animate({opacity:'1.0'},(settings.animSpeed*2));} i++;});}} var trace=function(msg){if(this.console&&typeof console.log!="undefined") console.log(msg);} this.stop=function(){if(!$(element).data('nivo:vars').stop){$(element).data('nivo:vars').stop=true;trace('Stop Slider');}} this.start=function(){if($(element).data('nivo:vars').stop){$(element).data('nivo:vars').stop=false;trace('Start Slider');}} settings.afterLoad.call(this);};$.fn.nivoSlider=function(options){return this.each(function(){var element=$(this);if(element.data('nivoslider'))return;var nivoslider=new NivoSlider(this,options);element.data('nivoslider',nivoslider);});};$.fn.nivoSlider.defaults={effect:'random',slices:15,animSpeed:500,pauseTime:3000,startSlide:0,directionNav:true,directionNavHide:true,controlNav:true,controlNavThumbs:false,controlNavThumbsFromRel:false,controlNavThumbsSearch:'.jpg',controlNavThumbsReplace:'_thumb.jpg',keyboardNav:true,pauseOnHover:true,manualAdvance:false,captionOpacity:0.8,beforeChange:function(){},afterChange:function(){},slideshowEnd:function(){},lastSlide:function(){},afterLoad:function(){}};$.fn._reverse=[].reverse;})(jQuery);/* * jQuery Easing v1.3 - http://gsgd.co.uk/sandbox/jquery/easing/ * * Uses the built In easIng capabilities added In jQuery 1.1 * to offer multiple easIng options * * Copyright (c) 2007 George Smith * Licensed under the MIT License: * http://www.opensource.org/licenses/mit-license.php */ // t: current time, b: begInnIng value, c: change In value, d: duration jQuery.easing['jswing'] = jQuery.easing['swing']; jQuery.extend(jQuery.easing, { def: 'easeOutQuad', swing: function (x, t, b, c, d) { //alert(jQuery.easing.default); return jQuery.easing[jQuery.easing.def](x, t, b, c, d); }, easeInQuad: function (x, t, b, c, d) { return c * (t /= d) * t + b; }, easeOutQuad: function (x, t, b, c, d) { return -c * (t /= d) * (t - 2) + b; }, easeInOutQuad: function (x, t, b, c, d) { if ((t /= d / 2) < 1) return c / 2 * t * t + b; return -c / 2 * ((--t) * (t - 2) - 1) + b; }, easeInCubic: function (x, t, b, c, d) { return c * (t /= d) * t * t + b; }, easeOutCubic: function (x, t, b, c, d) { return c * ((t = t / d - 1) * t * t + 1) + b; }, easeInOutCubic: function (x, t, b, c, d) { if ((t /= d / 2) < 1) return c / 2 * t * t * t + b; return c / 2 * ((t -= 2) * t * t + 2) + b; }, easeInQuart: function (x, t, b, c, d) { return c * (t /= d) * t * t * t + b; }, easeOutQuart: function (x, t, b, c, d) { return -c * ((t = t / d - 1) * t * t * t - 1) + b; }, easeInOutQuart: function (x, t, b, c, d) { if ((t /= d / 2) < 1) return c / 2 * t * t * t * t + b; return -c / 2 * ((t -= 2) * t * t * t - 2) + b; }, easeInQuint: function (x, t, b, c, d) { return c * (t /= d) * t * t * t * t + b; }, easeOutQuint: function (x, t, b, c, d) { return c * ((t = t / d - 1) * t * t * t * t + 1) + b; }, easeInOutQuint: function (x, t, b, c, d) { if ((t /= d / 2) < 1) return c / 2 * t * t * t * t * t + b; return c / 2 * ((t -= 2) * t * t * t * t + 2) + b; }, easeInSine: function (x, t, b, c, d) { return -c * Math.cos(t / d * (Math.PI / 2)) + c + b; }, easeOutSine: function (x, t, b, c, d) { return c * Math.sin(t / d * (Math.PI / 2)) + b; }, easeInOutSine: function (x, t, b, c, d) { return -c / 2 * (Math.cos(Math.PI * t / d) - 1) + b; }, easeInExpo: function (x, t, b, c, d) { return (t == 0) ? b : c * Math.pow(2, 10 * (t / d - 1)) + b; }, easeOutExpo: function (x, t, b, c, d) { return (t == d) ? b + c : c * (-Math.pow(2, -10 * t / d) + 1) + b; }, easeInOutExpo: function (x, t, b, c, d) { if (t == 0) return b; if (t == d) return b + c; if ((t /= d / 2) < 1) return c / 2 * Math.pow(2, 10 * (t - 1)) + b; return c / 2 * (-Math.pow(2, -10 * --t) + 2) + b; }, easeInCirc: function (x, t, b, c, d) { return -c * (Math.sqrt(1 - (t /= d) * t) - 1) + b; }, easeOutCirc: function (x, t, b, c, d) { return c * Math.sqrt(1 - (t = t / d - 1) * t) + b; }, easeInOutCirc: function (x, t, b, c, d) { if ((t /= d / 2) < 1) return -c / 2 * (Math.sqrt(1 - t * t) - 1) + b; return c / 2 * (Math.sqrt(1 - (t -= 2) * t) + 1) + b; }, easeInElastic: function (x, t, b, c, d) { var s = 1.70158; var p = 0; var a = c; if (t == 0) return b; if ((t /= d) == 1) return b + c; if (!p) p = d * .3; if (a < Math.abs(c)) { a = c; var s = p / 4; } else var s = p / (2 * Math.PI) * Math.asin(c / a); return -(a * Math.pow(2, 10 * (t -= 1)) * Math.sin((t * d - s) * (2 * Math.PI) / p)) + b; }, easeOutElastic: function (x, t, b, c, d) { var s = 1.70158; var p = 0; var a = c; if (t == 0) return b; if ((t /= d) == 1) return b + c; if (!p) p = d * .3; if (a < Math.abs(c)) { a = c; var s = p / 4; } else var s = p / (2 * Math.PI) * Math.asin(c / a); return a * Math.pow(2, -10 * t) * Math.sin((t * d - s) * (2 * Math.PI) / p) + c + b; }, easeInOutElastic: function (x, t, b, c, d) { var s = 1.70158; var p = 0; var a = c; if (t == 0) return b; if ((t /= d / 2) == 2) return b + c; if (!p) p = d * (.3 * 1.5); if (a < Math.abs(c)) { a = c; var s = p / 4; } else var s = p / (2 * Math.PI) * Math.asin(c / a); if (t < 1) return -.5 * (a * Math.pow(2, 10 * (t -= 1)) * Math.sin((t * d - s) * (2 * Math.PI) / p)) + b; return a * Math.pow(2, -10 * (t -= 1)) * Math.sin((t * d - s) * (2 * Math.PI) / p) * .5 + c + b; }, easeInBack: function (x, t, b, c, d, s) { if (s == undefined) s = 1.70158; return c * (t /= d) * t * ((s + 1) * t - s) + b; }, easeOutBack: function (x, t, b, c, d, s) { if (s == undefined) s = 1.70158; return c * ((t = t / d - 1) * t * ((s + 1) * t + s) + 1) + b; }, easeInOutBack: function (x, t, b, c, d, s) { if (s == undefined) s = 1.70158; if ((t /= d / 2) < 1) return c / 2 * (t * t * (((s *= (1.525)) + 1) * t - s)) + b; return c / 2 * ((t -= 2) * t * (((s *= (1.525)) + 1) * t + s) + 2) + b; }, easeInBounce: function (x, t, b, c, d) { return c - jQuery.easing.easeOutBounce(x, d - t, 0, c, d) + b; }, easeOutBounce: function (x, t, b, c, d) { if ((t /= d) < (1 / 2.75)) { return c * (7.5625 * t * t) + b; } else if (t < (2 / 2.75)) { return c * (7.5625 * (t -= (1.5 / 2.75)) * t + .75) + b; } else if (t < (2.5 / 2.75)) { return c * (7.5625 * (t -= (2.25 / 2.75)) * t + .9375) + b; } else { return c * (7.5625 * (t -= (2.625 / 2.75)) * t + .984375) + b; } }, easeInOutBounce: function (x, t, b, c, d) { if (t < d / 2) return jQuery.easing.easeInBounce(x, t * 2, 0, c, d) * .5 + b; return jQuery.easing.easeOutBounce(x, t * 2 - d, 0, c, d) * .5 + c * .5 + b; } });(function($) { $.fn.jCarouselLite = function(o) { o = $.extend({ btnPrev: null, btnNext: null, btnGo: null, mouseWheel: false, auto: null, speed: 200, easing: null, vertical: false, circular: true, visible: 3, start: 0, scroll: 1, beforeStart: null, afterEnd: null }, o || {}); return this.each(function() { // Returns the element collection. Chainable. var running = false, animCss=o.vertical?"top":"left", sizeCss=o.vertical?"height":"width"; var div = $(this), ul = $("ul", div), tLi = $("li", ul), tl = tLi.size(), v = o.visible; if(o.circular) { ul.prepend(tLi.slice(tl-v-1+1).clone()) .append(tLi.slice(0,v).clone()); o.start += v; } var li = $("li", ul), itemLength = li.size(), curr = o.start; div.css("visibility", "visible"); li.css({overflow: "hidden", float: o.vertical ? "none" : "left"}); ul.css({margin: "0", padding: "0", position: "relative", "list-style-type": "none", "z-index": "1"}); div.css({overflow: "hidden", position: "relative", "z-index": "2", left: "0px"}); var liSize = o.vertical ? height(li) : width(li); // Full li size(incl margin)-Used for animation var ulSize = liSize * itemLength; // size of full ul(total length, not just for the visible items) var divSize = liSize * v; // size of entire div(total length for just the visible items) li.css({width: li.width(), height: li.height()}); ul.css(sizeCss, ulSize+"px").css(animCss, -(curr*liSize)); div.css(sizeCss, divSize+"px"); // Width of the DIV. length of visible images if(o.btnPrev) $(o.btnPrev).click(function() { return go(curr-o.scroll); }); if(o.btnNext) $(o.btnNext).click(function() { return go(curr+o.scroll); }); if(o.btnGo) $.each(o.btnGo, function(i, val) { $(val).click(function() { return go(o.circular ? o.visible+i : i); }); }); if(o.mouseWheel && div.mousewheel) div.mousewheel(function(e, d) { return d>0 ? go(curr-o.scroll) : go(curr+o.scroll); }); if(o.auto) setInterval(function() { go(curr+o.scroll); }, o.auto+o.speed); function vis() { return li.slice(curr).slice(0,v); }; function go(to) { if(!running) { if(o.beforeStart) o.beforeStart.call(this, vis()); if(o.circular) { // If circular we are in first or last, then goto the other end if(to<=o.start-v-1) { // If first, then goto last ul.css(animCss, -((itemLength-(v*2))*liSize)+"px"); // If "scroll" > 1, then the "to" might not be equal to the condition; it can be lesser depending on the number of elements. curr = to==o.start-v-1 ? itemLength-(v*2)-1 : itemLength-(v*2)-o.scroll; } else if(to>=itemLength-v+1) { // If last, then goto first ul.css(animCss, -( (v) * liSize ) + "px" ); // If "scroll" > 1, then the "to" might not be equal to the condition; it can be greater depending on the number of elements. curr = to==itemLength-v+1 ? v+1 : v+o.scroll; } else curr = to; } else { // If non-circular and to points to first or last, we just return. if(to<0 || to>itemLength-v) return; else curr = to; } // If neither overrides it, the curr will still be "to" and we can proceed. running = true; ul.animate( animCss == "left" ? { left: -(curr*liSize) } : { top: -(curr*liSize) } , o.speed, o.easing, function() { if(o.afterEnd) o.afterEnd.call(this, vis()); running = false; } ); // Disable buttons when the carousel reaches the last/first, and enable when not if(!o.circular) { $(o.btnPrev + "," + o.btnNext).removeClass("disabled"); $( (curr-o.scroll<0 && o.btnPrev) || (curr+o.scroll > itemLength-v && o.btnNext) || [] ).addClass("disabled"); } } return false; }; }); }; function css(el, prop) { return parseInt($.css(el[0], prop)) || 0; }; function width(el) { return el[0].offsetWidth + css(el, 'marginLeft') + css(el, 'marginRight'); }; function height(el) { return el[0].offsetHeight + css(el, 'marginTop') + css(el, 'marginBottom'); }; })(jQuery);/* Copyright (c) 2009 Brandon Aaron (http://brandonaaron.net) * Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) * and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses. * Thanks to: http://adomas.org/javascript-mouse-wheel/ for some pointers. * Thanks to: Mathias Bank(http://www.mathias-bank.de) for a scope bug fix. * * Version: 3.0.2 * * Requires: 1.2.2+ */ (function(c){var a=["DOMMouseScroll","mousewheel"];c.event.special.mousewheel={setup:function(){if(this.addEventListener){for(var d=a.length;d;){this.addEventListener(a[--d],b,false)}}else{this.onmousewheel=b}},teardown:function(){if(this.removeEventListener){for(var d=a.length;d;){this.removeEventListener(a[--d],b,false)}}else{this.onmousewheel=null}}};c.fn.extend({mousewheel:function(d){return d?this.bind("mousewheel",d):this.trigger("mousewheel")},unmousewheel:function(d){return this.unbind("mousewheel",d)}});function b(f){var d=[].slice.call(arguments,1),g=0,e=true;f=c.event.fix(f||window.event);f.type="mousewheel";if(f.wheelDelta){g=f.wheelDelta/120}if(f.detail){g=-f.detail/3}d.unshift(f,g);return c.event.handle.apply(this,d)}})(jQuery);var first_loading = new Array; function do_load(mode) { var id = 'body'; if (mode == 'on') { pageSize = new Array; pageSize['w'] = $(window).width(); pageSize['h'] = $(document).height(); pageSize['t'] = 0; pageSize['l'] = 0; m_app = 'body'; if (!first_loading[id]) { $(m_app).append(''); overlay = $('#lightbox-overlay_' + id); // overlay.click(function () { $('#lightbox-overlay_' + id).animate({ height: 'hide', opacity: 'hide' }, "slow") }) first_loading[id] = 'ok'; } else { overlay = $('#lightbox-overlay_' + id); } overlay.css({ position: 'absolute', display: 'none', top: pageSize.t, left: pageSize.l, zIndex: 1100, opacity: 0, height: pageSize.h + 'px', width: pageSize.w + 'px' }).fadeTo(1, 0.6).animate({ height: 'show' }, "slow"); } else { $('#lightbox-overlay_' + id).animate({ height: 'hide', opacity: 'hide' }, "slow"); } } /* ------------------------------------------------------------------------ Class: prettyPhoto Use: Lightbox clone for jQuery Author: Stephane Caron (http://www.no-margin-for-errors.com) Version: 3.1 ------------------------------------------------------------------------- */ (function($) { $.prettyPhoto = {version: '3.1'}; $.fn.prettyPhoto = function(pp_settings) { pp_settings = jQuery.extend({ animation_speed: 'fast', /* fast/slow/normal */ slideshow: 5000, /* false OR interval time in ms */ autoplay_slideshow: false, /* true/false */ opacity: 0.80, /* Value between 0 and 1 */ show_title: true, /* true/false */ allow_resize: true, /* Resize the photos bigger than viewport. true/false */ default_width: 500, default_height: 344, counter_separator_label: '/', /* The separator for the gallery counter 1 "of" 2 */ theme: 'pp_default', /* light_rounded / dark_rounded / light_square / dark_square / facebook */ horizontal_padding: 20, /* The padding on each side of the picture */ hideflash: false, /* Hides all the flash object on a page, set to TRUE if flash appears over prettyPhoto */ wmode: 'opaque', /* Set the flash wmode attribute */ autoplay: true, /* Automatically start videos: True/False */ modal: false, /* If set to true, only the close button will close the window */ overlay_gallery: true, /* If set to true, a gallery will overlay the fullscreen image on mouse over */ keyboard_shortcuts: true, /* Set to false if you open forms inside prettyPhoto */ changepicturecallback: function(){}, /* Called everytime an item is shown/changed */ callback: function(){}, /* Called when prettyPhoto is closed */ ie6_fallback: true, markup: '
\
 
\
\
\
\
\
\
\
\
\
\
\
\ Expand \
\ next \ previous \
\
\
\
\ Previous \

0/0

\ Next \
\

\ Close \
\
\
\
\
\
\
\
\
\
\
\
\
', gallery_markup: '', image_markup: '', flash_markup: '', quicktime_markup: '', iframe_markup: '', inline_markup: '
{content}
', custom_markup: '' }, pp_settings); // Global variables accessible only by prettyPhoto var matchedObjects = this, percentBased = false, pp_dimensions, pp_open, // prettyPhoto container specific pp_contentHeight, pp_contentWidth, pp_containerHeight, pp_containerWidth, // Window size windowHeight = $(window).height(), windowWidth = $(window).width(), // Global elements pp_slideshow; doresize = true, scroll_pos = _get_scroll(); // Window/Keyboard events $(window).unbind('resize.prettyphoto').bind('resize.prettyphoto',function(){ _center_overlay(); _resize_overlay(); }); if(pp_settings.keyboard_shortcuts) { $(document).unbind('keydown.prettyphoto').bind('keydown.prettyphoto',function(e){ if(typeof $pp_pic_holder != 'undefined'){ if($pp_pic_holder.is(':visible')){ switch(e.keyCode){ case 37: $.prettyPhoto.changePage('previous'); e.preventDefault(); break; case 39: $.prettyPhoto.changePage('next'); e.preventDefault(); break; case 27: if(!settings.modal) $.prettyPhoto.close(); e.preventDefault(); break; }; // return false; }; }; }); } /** * Initialize prettyPhoto. */ $.prettyPhoto.initialize = function() { settings = pp_settings; if(settings.theme == 'pp_default') settings.horizontal_padding = 16; if(settings.ie6_fallback && $.browser.msie && parseInt($.browser.version) == 6) settings.theme = "light_square"; // Fallback to a supported theme for IE6 // Find out if the picture is part of a set theRel = $(this).attr('rel'); galleryRegExp = /\[(?:.*)\]/; isSet = (galleryRegExp.exec(theRel)) ? true : false; // Put the SRCs, TITLEs, ALTs into an array. pp_images = (isSet) ? jQuery.map(matchedObjects, function(n, i){ if($(n).attr('rel').indexOf(theRel) != -1) return $(n).attr('href'); }) : $.makeArray($(this).attr('href')); pp_titles = (isSet) ? jQuery.map(matchedObjects, function(n, i){ if($(n).attr('rel').indexOf(theRel) != -1) return ($(n).find('img').attr('alt')) ? $(n).find('img').attr('alt') : ""; }) : $.makeArray($(this).find('img').attr('alt')); pp_descriptions = (isSet) ? jQuery.map(matchedObjects, function(n, i){ if($(n).attr('rel').indexOf(theRel) != -1) return ($(n).attr('title')) ? $(n).attr('title') : ""; }) : $.makeArray($(this).attr('title')); set_position = jQuery.inArray($(this).attr('href'), pp_images); // Define where in the array the clicked item is positionned _build_overlay(this); // Build the overlay {this} being the caller if(settings.allow_resize) $(window).bind('scroll.prettyphoto',function(){ _center_overlay(); }); $.prettyPhoto.open(); return false; } /** * Opens the prettyPhoto modal box. * @param image {String,Array} Full path to the image to be open, can also be an array containing full images paths. * @param title {String,Array} The title to be displayed with the picture, can also be an array containing all the titles. * @param description {String,Array} The description to be displayed with the picture, can also be an array containing all the descriptions. */ $.prettyPhoto.open = function(event) { if(typeof settings == "undefined"){ // Means it's an API call, need to manually get the settings and set the variables settings = pp_settings; if($.browser.msie && $.browser.version == 6) settings.theme = "light_square"; // Fallback to a supported theme for IE6 pp_images = $.makeArray(arguments[0]); pp_titles = (arguments[1]) ? $.makeArray(arguments[1]) : $.makeArray(""); pp_descriptions = (arguments[2]) ? $.makeArray(arguments[2]) : $.makeArray(""); isSet = (pp_images.length > 1) ? true : false; set_position = 0; _build_overlay(event.target); // Build the overlay {this} being the caller } if($.browser.msie && $.browser.version == 6) $('select').css('visibility','hidden'); // To fix the bug with IE select boxes if(settings.hideflash) $('object,embed').css('visibility','hidden'); // Hide the flash _checkPosition($(pp_images).size()); // Hide the next/previous links if on first or last images. $('.pp_loaderIcon').show(); // Fade the content in if($ppt.is(':hidden')) $ppt.css('opacity',0).show(); $pp_overlay.show().fadeTo(settings.animation_speed,settings.opacity); // Display the current position $pp_pic_holder.find('.currentTextHolder').text((set_position+1) + settings.counter_separator_label + $(pp_images).size()); // Set the description $pp_pic_holder.find('.pp_description').show().html(unescape(pp_descriptions[set_position])); // Get the dimensions movie_width = ( parseFloat(grab_param('width',pp_images[set_position])) ) ? grab_param('width',pp_images[set_position]) : settings.default_width.toString(); movie_height = ( parseFloat(grab_param('height',pp_images[set_position])) ) ? grab_param('height',pp_images[set_position]) : settings.default_height.toString(); // If the size is % based, calculate according to window dimensions if(movie_height.indexOf('%') != -1) { movie_height = parseFloat(($(window).height() * parseFloat(movie_height) / 100) - 150); percentBased = true; } if(movie_width.indexOf('%') != -1) { movie_width = parseFloat(($(window).width() * parseFloat(movie_width) / 100) - 150); percentBased = true; } // Fade the holder $pp_pic_holder.fadeIn(function(){ // Set the title (settings.show_title && pp_titles[set_position] != "" && typeof pp_titles[set_position] != "undefined") ? $ppt.html(unescape(pp_titles[set_position])) : $ppt.html(' '); imgPreloader = ""; skipInjection = false; // Inject the proper content switch(_getFileType(pp_images[set_position])){ case 'image': imgPreloader = new Image(); // Preload the neighbour images nextImage = new Image(); if(isSet && set_position < $(pp_images).size() -1) nextImage.src = pp_images[set_position + 1]; prevImage = new Image(); if(isSet && pp_images[set_position - 1]) prevImage.src = pp_images[set_position - 1]; $pp_pic_holder.find('#pp_full_res')[0].innerHTML = settings.image_markup.replace(/{path}/g,pp_images[set_position]); imgPreloader.onload = function(){ // Fit item to viewport pp_dimensions = _fitToViewport(imgPreloader.width,imgPreloader.height); _showContent(); }; imgPreloader.onerror = function(){ alert('Image cannot be loaded. Make sure the path is correct and image exist.'); $.prettyPhoto.close(); }; imgPreloader.src = pp_images[set_position]; break; case 'youtube': pp_dimensions = _fitToViewport(movie_width,movie_height); // Fit item to viewport movie = '/http://www.youtube.com/embed/'+grab_param('v',pp_images[set_position]); if(settings.autoplay) movie += "?autoplay=1"; toInject = settings.iframe_markup.replace(/{width}/g,pp_dimensions['width']).replace(/{height}/g,pp_dimensions['height']).replace(/{wmode}/g,settings.wmode).replace(/{path}/g,movie); break; case 'vimeo': pp_dimensions = _fitToViewport(movie_width,movie_height); // Fit item to viewport movie_id = pp_images[set_position]; var regExp = /http:\/\/(www\.)?vimeo.com\/(\d+)/; var match = movie_id.match(regExp); movie = '/http://player.vimeo.com/video/'+ match[2] +'?title=0&byline=0&portrait=0'; if(settings.autoplay) movie += "&autoplay=1;"; vimeo_width = pp_dimensions['width'] + '/embed/?moog_width='+ pp_dimensions['width']; toInject = settings.iframe_markup.replace(/{width}/g,vimeo_width).replace(/{height}/g,pp_dimensions['height']).replace(/{path}/g,movie); break; case 'quicktime': pp_dimensions = _fitToViewport(movie_width,movie_height); // Fit item to viewport pp_dimensions['height']+=15; pp_dimensions['contentHeight']+=15; pp_dimensions['containerHeight']+=15; // Add space for the control bar toInject = settings.quicktime_markup.replace(/{width}/g,pp_dimensions['width']).replace(/{height}/g,pp_dimensions['height']).replace(/{wmode}/g,settings.wmode).replace(/{path}/g,pp_images[set_position]).replace(/{autoplay}/g,settings.autoplay); break; case 'flash': pp_dimensions = _fitToViewport(movie_width,movie_height); // Fit item to viewport flash_vars = pp_images[set_position]; flash_vars = flash_vars.substring(pp_images[set_position].indexOf('flashvars') + 10,pp_images[set_position].length); filename = pp_images[set_position]; filename = filename.substring(0,filename.indexOf('?')); toInject = settings.flash_markup.replace(/{width}/g,pp_dimensions['width']).replace(/{height}/g,pp_dimensions['height']).replace(/{wmode}/g,settings.wmode).replace(/{path}/g,filename+'?'+flash_vars); break; case 'iframe': pp_dimensions = _fitToViewport(movie_width,movie_height); // Fit item to viewport frame_url = pp_images[set_position]; frame_url = frame_url.substr(0,frame_url.indexOf('iframe')-1); toInject = settings.iframe_markup.replace(/{width}/g,pp_dimensions['width']).replace(/{height}/g,pp_dimensions['height']).replace(/{path}/g,frame_url); break; case 'ajax': doresize = false; // Make sure the dimensions are not resized. pp_dimensions = _fitToViewport(movie_width,movie_height); doresize = true; // Reset the dimensions skipInjection = true; $.get(pp_images[set_position],function(responseHTML){ toInject = settings.inline_markup.replace(/{content}/g,responseHTML); $pp_pic_holder.find('#pp_full_res')[0].innerHTML = toInject; _showContent(); }); break; case 'custom': pp_dimensions = _fitToViewport(movie_width,movie_height); // Fit item to viewport toInject = settings.custom_markup; break; case 'inline': // to get the item height clone it, apply default width, wrap it in the prettyPhoto containers , then delete myClone = $(pp_images[set_position]).clone().append('
').css({'width':settings.default_width}).wrapInner('
').appendTo($('body')).show(); doresize = false; // Make sure the dimensions are not resized. pp_dimensions = _fitToViewport($(myClone).width(),$(myClone).height()); doresize = true; // Reset the dimensions $(myClone).remove(); toInject = settings.inline_markup.replace(/{content}/g,$(pp_images[set_position]).html()); break; }; if(!imgPreloader && !skipInjection){ $pp_pic_holder.find('#pp_full_res')[0].innerHTML = toInject; // Show content _showContent(); }; }); return false; }; /** * Change page in the prettyPhoto modal box * @param direction {String} Direction of the paging, previous or next. */ $.prettyPhoto.changePage = function(direction){ currentGalleryPage = 0; if(direction == 'previous') { set_position--; if (set_position < 0){ set_position = $(pp_images).size()-1; }; }else if(direction == 'next'){ set_position++; if(set_position > $(pp_images).size()-1) { set_position = 0; } }else{ set_position=direction; }; if(!doresize) doresize = true; // Allow the resizing of the images $('.pp_contract').removeClass('pp_contract').addClass('pp_expand'); _hideContent(function(){ $.prettyPhoto.open(); }); }; /** * Change gallery page in the prettyPhoto modal box * @param direction {String} Direction of the paging, previous or next. */ $.prettyPhoto.changeGalleryPage = function(direction){ if(direction=='next'){ currentGalleryPage ++; if(currentGalleryPage > totalPage){ currentGalleryPage = 0; }; slide_speed = settings.animation_speed; }else if(direction=='previous'){ currentGalleryPage --; if(currentGalleryPage < 0){ currentGalleryPage = totalPage; }; slide_speed = settings.animation_speed; }else{ currentGalleryPage = direction; slide_speed = 0; }; slide_to = currentGalleryPage * (itemsPerPage * itemWidth); // Slide the pages, if we're on the last page, find out how many items we need to slide. To make sure we don't have an empty space. itemsToSlide = (currentGalleryPage == totalPage) ? pp_images.length - ((totalPage) * itemsPerPage) : itemsPerPage; $pp_gallery.find('ul').animate({left:-slide_to},slide_speed); }; /** * Start the slideshow... */ $.prettyPhoto.startSlideshow = function(){ if(typeof pp_slideshow == 'undefined'){ $pp_pic_holder.find('.pp_play').unbind('click').removeClass('pp_play').addClass('pp_pause').click(function(){ $.prettyPhoto.stopSlideshow(); return false; }); pp_slideshow = setInterval($.prettyPhoto.startSlideshow,settings.slideshow); }else{ $.prettyPhoto.changePage('next'); }; } /** * Stop the slideshow... */ $.prettyPhoto.stopSlideshow = function(){ $pp_pic_holder.find('.pp_pause').unbind('click').removeClass('pp_pause').addClass('pp_play').click(function(){ $.prettyPhoto.startSlideshow(); return false; }); clearInterval(pp_slideshow); pp_slideshow=undefined; } /** * Closes prettyPhoto. */ $.prettyPhoto.close = function(){ if($pp_overlay.is(":animated")) return; $.prettyPhoto.stopSlideshow(); $pp_pic_holder.stop().find('object,embed').css('visibility','hidden'); $('div.pp_pic_holder,div.ppt,.pp_fade').fadeOut(settings.animation_speed,function(){ $(this).remove(); }); $pp_overlay.fadeOut(settings.animation_speed, function(){ if($.browser.msie && $.browser.version == 6) $('select').css('visibility','visible'); // To fix the bug with IE select boxes if(settings.hideflash) $('object,embed').css('visibility','visible'); // Show the flash $(this).remove(); // No more need for the prettyPhoto markup $(window).unbind('scroll.prettyphoto'); settings.callback(); doresize = true; pp_open = false; delete settings; }); }; /** * Set the proper sizes on the containers and animate the content in. */ function _showContent(){ $('.pp_loaderIcon').hide(); $ppt.fadeTo(settings.animation_speed,1); // Calculate the opened top position of the pic holder projectedTop = scroll_pos['scrollTop'] + ((windowHeight/2) - (pp_dimensions['containerHeight']/2)); if(projectedTop < 0) projectedTop = 0; // Resize the content holder $pp_pic_holder.find('.pp_content') .animate({ height:pp_dimensions['contentHeight'], width:pp_dimensions['contentWidth'] },settings.animation_speed); // Resize picture the holder $pp_pic_holder.animate({ 'top': projectedTop, 'left': (windowWidth/2) - (pp_dimensions['containerWidth']/2), width:pp_dimensions['containerWidth'] },settings.animation_speed,function(){ $pp_pic_holder.find('.pp_hoverContainer,#fullResImage').height(pp_dimensions['height']).width(pp_dimensions['width']); $pp_pic_holder.find('.pp_fade').fadeIn(settings.animation_speed); // Fade the new content // Show the nav if(isSet && _getFileType(pp_images[set_position])=="image") { $pp_pic_holder.find('.pp_hoverContainer').show(); }else{ $pp_pic_holder.find('.pp_hoverContainer').hide(); } if(pp_dimensions['resized']){ // Fade the resizing link if the image is resized $('a.pp_expand,a.pp_contract').show(); }else{ $('a.pp_expand').hide(); } if(settings.autoplay_slideshow && !pp_slideshow && !pp_open) $.prettyPhoto.startSlideshow(); settings.changepicturecallback(); // Callback! pp_open = true; }); _insert_gallery(); }; /** * Hide the content...DUH! */ function _hideContent(callback){ // Fade out the current picture $pp_pic_holder.find('#pp_full_res object,#pp_full_res embed').css('visibility','hidden'); $pp_pic_holder.find('.pp_fade').fadeOut(settings.animation_speed,function(){ $('.pp_loaderIcon').show(); callback(); }); }; /** * Check the item position in the gallery array, hide or show the navigation links * @param setCount {integer} The total number of items in the set */ function _checkPosition(setCount){ (setCount > 1) ? $('.pp_nav').show() : $('.pp_nav').hide(); // Hide the bottom nav if it's not a set. }; /** * Resize the item dimensions if it's bigger than the viewport * @param width {integer} Width of the item to be opened * @param height {integer} Height of the item to be opened * @return An array containin the "fitted" dimensions */ function _fitToViewport(width,height){ resized = false; _getDimensions(width,height); // Define them in case there's no resize needed imageWidth = width, imageHeight = height; if( ((pp_containerWidth > windowWidth) || (pp_containerHeight > windowHeight)) && doresize && settings.allow_resize && !percentBased) { resized = true, fitting = false; while (!fitting){ if((pp_containerWidth > windowWidth)){ imageWidth = (windowWidth - 200); imageHeight = (height/width) * imageWidth; }else if((pp_containerHeight > windowHeight)){ imageHeight = (windowHeight - 200); imageWidth = (width/height) * imageHeight; }else{ fitting = true; }; pp_containerHeight = imageHeight, pp_containerWidth = imageWidth; }; _getDimensions(imageWidth,imageHeight); if((pp_containerWidth > windowWidth) || (pp_containerHeight > windowHeight)){ _fitToViewport(pp_containerWidth,pp_containerHeight) }; }; return { width:Math.floor(imageWidth), height:Math.floor(imageHeight), containerHeight:Math.floor(pp_containerHeight), containerWidth:Math.floor(pp_containerWidth) + (settings.horizontal_padding * 2), contentHeight:Math.floor(pp_contentHeight), contentWidth:Math.floor(pp_contentWidth), resized:resized }; }; /** * Get the containers dimensions according to the item size * @param width {integer} Width of the item to be opened * @param height {integer} Height of the item to be opened */ function _getDimensions(width,height){ width = parseFloat(width); height = parseFloat(height); // Get the details height, to do so, I need to clone it since it's invisible $pp_details = $pp_pic_holder.find('.pp_details'); $pp_details.width(width); detailsHeight = parseFloat($pp_details.css('marginTop')) + parseFloat($pp_details.css('marginBottom')); $pp_details = $pp_details.clone().addClass(settings.theme).width(width).appendTo($('body')).css({ 'position':'absolute', 'top':-10000 }); detailsHeight += $pp_details.height(); detailsHeight = (detailsHeight <= 34) ? 36 : detailsHeight; // Min-height for the details if($.browser.msie && $.browser.version==7) detailsHeight+=8; $pp_details.remove(); // Get the titles height, to do so, I need to clone it since it's invisible $pp_title = $pp_pic_holder.find('.ppt'); $pp_title.width(width); titleHeight = parseFloat($pp_title.css('marginTop')) + parseFloat($pp_title.css('marginBottom')); $pp_title = $pp_title.clone().appendTo($('body')).css({ 'position':'absolute', 'top':-10000 }); titleHeight += $pp_title.height(); $pp_title.remove(); // Get the container size, to resize the holder to the right dimensions pp_contentHeight = height + detailsHeight; pp_contentWidth = width; pp_containerHeight = pp_contentHeight + titleHeight + $pp_pic_holder.find('.pp_top').height() + $pp_pic_holder.find('.pp_bottom').height(); pp_containerWidth = width; } function _getFileType(itemSrc){ if (itemSrc.match(/youtube\.com\/watch/i)) { return 'youtube'; }else if (itemSrc.match(/vimeo\.com/i)) { return 'vimeo'; }else if(itemSrc.match(/\b.mov\b/i)){ return 'quicktime'; }else if(itemSrc.match(/\b.swf\b/i)){ return 'flash'; }else if(itemSrc.match(/\biframe=true\b/i)){ return 'iframe'; }else if(itemSrc.match(/\bajax=true\b/i)){ return 'ajax'; }else if(itemSrc.match(/\bcustom=true\b/i)){ return 'custom'; }else if(itemSrc.substr(0,1) == '#'){ return 'inline'; }else{ return 'image'; }; }; function _center_overlay(){ if(doresize && typeof $pp_pic_holder != 'undefined') { scroll_pos = _get_scroll(); contentHeight = $pp_pic_holder.height(), contentwidth = $pp_pic_holder.width(); projectedTop = (windowHeight/2) + scroll_pos['scrollTop'] - (contentHeight/2); if(projectedTop < 0) projectedTop = 0; if(contentHeight > windowHeight) return; $pp_pic_holder.css({ 'top': projectedTop, 'left': (windowWidth/2) + scroll_pos['scrollLeft'] - (contentwidth/2) }); }; }; function _get_scroll(){ if (self.pageYOffset) { return {scrollTop:self.pageYOffset,scrollLeft:self.pageXOffset}; } else if (document.documentElement && document.documentElement.scrollTop) { // Explorer 6 Strict return {scrollTop:document.documentElement.scrollTop,scrollLeft:document.documentElement.scrollLeft}; } else if (document.body) {// all other Explorers return {scrollTop:document.body.scrollTop,scrollLeft:document.body.scrollLeft}; }; }; function _resize_overlay() { windowHeight = $(window).height(), windowWidth = $(window).width(); if(typeof $pp_overlay != "undefined") $pp_overlay.height($(document).height()).width(windowWidth); }; function _insert_gallery(){ if(isSet && settings.overlay_gallery && _getFileType(pp_images[set_position])=="image" && (settings.ie6_fallback && !($.browser.msie && parseInt($.browser.version) == 6))) { itemWidth = 52+5; // 52 beign the thumb width, 5 being the right margin. navWidth = (settings.theme == "facebook" || settings.theme == "pp_default") ? 50 : 30; // Define the arrow width depending on the theme itemsPerPage = Math.floor((pp_dimensions['containerWidth'] - 100 - navWidth) / itemWidth); itemsPerPage = (itemsPerPage < pp_images.length) ? itemsPerPage : pp_images.length; totalPage = Math.ceil(pp_images.length / itemsPerPage) - 1; // Hide the nav in the case there's no need for links if(totalPage == 0){ navWidth = 0; // No nav means no width! $pp_gallery.find('.pp_arrow_next,.pp_arrow_previous').hide(); }else{ $pp_gallery.find('.pp_arrow_next,.pp_arrow_previous').show(); }; galleryWidth = itemsPerPage * itemWidth; fullGalleryWidth = pp_images.length * itemWidth; // Set the proper width to the gallery items $pp_gallery .css('margin-left',-((galleryWidth/2) + (navWidth/2))) .find('div:first').width(galleryWidth+5) .find('ul').width(fullGalleryWidth) .find('li.selected').removeClass('selected'); goToPage = (Math.floor(set_position/itemsPerPage) < totalPage) ? Math.floor(set_position/itemsPerPage) : totalPage; $.prettyPhoto.changeGalleryPage(goToPage); $pp_gallery_li.filter(':eq('+set_position+')').addClass('selected'); }else{ $pp_pic_holder.find('.pp_content').unbind('mouseenter mouseleave'); // $pp_gallery.hide(); } } function _build_overlay(caller){ $('body').append(settings.markup); // Inject the markup $pp_pic_holder = $('.pp_pic_holder') , $ppt = $('.ppt'), $pp_overlay = $('div.pp_overlay'); // Set my global selectors // Inject the inline gallery! if(isSet && settings.overlay_gallery) { currentGalleryPage = 0; toInject = ""; for (var i=0; i < pp_images.length; i++) { if(!pp_images[i].match(/\b(jpg|jpeg|png|gif)\b/gi)){ classname = 'default'; img_src = ''; }else{ classname = ''; img_src = pp_images[i]; } toInject += "
  • "; }; toInject = settings.gallery_markup.replace(/{gallery}/g,toInject); $pp_pic_holder.find('#pp_full_res').after(toInject); $pp_gallery = $('.pp_pic_holder .pp_gallery'), $pp_gallery_li = $pp_gallery.find('li'); // Set the gallery selectors $pp_gallery.find('.pp_arrow_next').click(function(){ $.prettyPhoto.changeGalleryPage('next'); $.prettyPhoto.stopSlideshow(); return false; }); $pp_gallery.find('.pp_arrow_previous').click(function(){ $.prettyPhoto.changeGalleryPage('previous'); $.prettyPhoto.stopSlideshow(); return false; }); $pp_pic_holder.find('.pp_content').hover( function(){ $pp_pic_holder.find('.pp_gallery:not(.disabled)').fadeIn(); }, function(){ $pp_pic_holder.find('.pp_gallery:not(.disabled)').fadeOut(); }); itemWidth = 52+5; // 52 beign the thumb width, 5 being the right margin. $pp_gallery_li.each(function(i){ $(this) .find('a') .click(function(){ $.prettyPhoto.changePage(i); $.prettyPhoto.stopSlideshow(); return false; }); }); }; // Inject the play/pause if it's a slideshow if(settings.slideshow){ $pp_pic_holder.find('.pp_nav').prepend('Play') $pp_pic_holder.find('.pp_nav .pp_play').click(function(){ $.prettyPhoto.startSlideshow(); return false; }); } $pp_pic_holder.attr('class','pp_pic_holder ' + settings.theme); // Set the proper theme $pp_overlay .css({ 'opacity':0, 'height':$(document).height(), 'width':$(window).width() }) .bind('click',function(){ if(!settings.modal) $.prettyPhoto.close(); }); $('a.pp_close').bind('click',function(){ $.prettyPhoto.close(); return false; }); $('a.pp_expand').bind('click',function(e){ // Expand the image if($(this).hasClass('pp_expand')){ $(this).removeClass('pp_expand').addClass('pp_contract'); doresize = false; }else{ $(this).removeClass('pp_contract').addClass('pp_expand'); doresize = true; }; _hideContent(function(){ $.prettyPhoto.open(); }); return false; }); $pp_pic_holder.find('.pp_previous, .pp_nav .pp_arrow_previous').bind('click',function(){ $.prettyPhoto.changePage('previous'); $.prettyPhoto.stopSlideshow(); return false; }); $pp_pic_holder.find('.pp_next, .pp_nav .pp_arrow_next').bind('click',function(){ $.prettyPhoto.changePage('next'); $.prettyPhoto.stopSlideshow(); return false; }); _center_overlay(); // Center it }; return this.unbind('click.prettyphoto').bind('click.prettyphoto',$.prettyPhoto.initialize); // Return the jQuery object for chaining. The unbind method is used to avoid click conflict when the plugin is called more than once }; function grab_param(name,url){ name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]"); var regexS = "[\\?&]"+name+"=([^&#]*)"; var regex = new RegExp( regexS ); var results = regex.exec( url ); return ( results == null ) ? "" : results[1]; } })(jQuery);var inSharing, inCustomer; var helpOpened = false; var currentIndex; var getting; var CurrentPos = 0; var itemJumpHeight = "3px"; function Text_OnFocus(sender, text) { if (sender.value == text) sender.value = ""; } function Text_OnBlur(sender, text) { if (sender.value == "") sender.value = text; } function SelectAllCheckboxes(spanChk) { var xState = spanChk.checked; var theBox = spanChk; elm = theBox.form.elements; for (i = 0; i < elm.length; i++) if (elm[i].type == "checkbox" && elm[i].id != theBox.id) { if (elm[i].checked != xState) elm[i].click(); } } function SelectAll(obj) { var text_val = eval(obj); text_val.focus(); text_val.select(); } function FormHelp() { $(".FieldHelp img").click(function () { $(".FieldHelpBody").slideUp(); var b = $(this).parent().parent().find(".FieldHelpBody"); if (b.is(":visible")) { b.slideUp(); helpOpened = false; } else { b.slideDown(); helpOpened = true; } }); } var srchOpened; var inFrReq; var inCombo; function BodyClick() { $("body").click(function () { if (!helpOpened && $(".FieldHelpBody").length > 0 && $(".FieldHelpBody").is(":visible")) { $(".FieldHelpBody").slideUp(); } helpOpened = false; if (!inSharing && $(".SharingMenu").length > 0 && $(".SharingMenu").is(":visible")) { $(".SharingMenu").fadeOut(); $(".SharMnuInd").fadeOut(); } if (!inFrReq && $(".FReqList").length > 0 && $(".FReqList").is(":visible")) { $(".FReqList").fadeOut(); $(".FReqInd").fadeOut(); } if (!srchOpened) { $(".BtnSrch").removeClass("Selected"); $(".SearchBody").slideUp(); } if (!inCombo) { $(".cmbCatAll").slideUp(); } }); } function Comments() { $(".BTComment").click(function () { if ($("#yourcomment").is(":visible")) { $("#yourcomment").slideUp(); $(".UsersComment").slideDown(); } else { $("#yourcomment").slideDown(); $(".UsersComment").slideUp(); $("#Comment1_txtFullName").focus(); } }); $(".CommentReplyBtn").click(function () { $(".replyForm:visible").slideUp(); var id = $(this).attr('id').split('_')[1]; var rep = $("#reply_" + id); if (rep.is(':visible')) { rep.slideUp(); } else { $("#yourcomment").slideUp(); rep.slideDown(); $($(rep.find("input"))[0]).focus(); } }); } function SelectItem(id) { $(".LIItem").hide(); $("div[pid=" + id + "]").show(); $(".LCItem").removeClass("selected"); $("#" + id).addClass("selected"); } function Sharing() { $(".BTShare").click(function () { if ($(".SharingMenu").is(":visible")) { $(".SharingMenu").fadeOut(); $(".SharMnuInd").fadeOut(); } else { $(".SharingMenu").fadeIn(); $(".SharMnuInd").fadeIn(); } }); $(".SharingMnu").hover(function () { inSharing = true; }, function () { inSharing = false; }); } function PageTab() { if ($(".PTH").length > 0) { try { if ($("#hidCurrentTabPos").length > 0) { SelectPTab($($(".PTBtn")[parseInt($("#hidCurrentTabPos").val())])); } else { var pos = window.location.toString().indexOf("#"); if (pos > 0) { SelectPTab($($(".PTBtn")[window.location.toString().substring(pos + 1)])); } else { $(".PTH").each(function () { SelectPTab($(this).find(".PTBtn:first")); }); } } } catch (e) { $(".PTH").each(function () { SelectPTab($(this).find(".PTBtn:first")); }); } $(".PTBtn").click(function () { SelectPTab($(this)); }); } } function SelectPTab(obj) { var pth = obj.parents(".PTH"); var btns = pth.find(".PTBtn"); var btcs = pth.find(".PTC"); var indx = btns.index(obj); btns.removeClass("Selected"); $(btns[indx]).addClass("Selected"); btcs.hide(); $(btcs[indx]).fadeIn(); $(".PTBFlesh").css("right", (btns.outerWidth() * indx + (btns.outerWidth() / 2) - 8).toString() + "px"); } function QuickView(c) { $('.DialogBox').center(); do_load("on"); $('.DialogBox').show(); $(".DTitle").html($(c).attr("t").toString()); PlayCntr('PopCntr', $(c).attr("video").toString()); return false; } function CloseVideo() { $('#PopCntr').html(""); $('.DialogBox').hide(); do_load("off"); } jQuery.fn.center = function () { this.css("position", "absolute"); this.css("top", Math.max(0, (($(window).height() - this.outerHeight()) / 2) + $(window).scrollTop()) + "px"); this.css("left", Math.max(0, (($(window).width() - this.outerWidth()) / 2) + $(window).scrollLeft()) + "px"); return this; } function Search() { var key = $('#Search1_txtSrch').val(); if (key == "" || key == "جستجو") { alert("لطفا کلید جستجو را وارد کنید."); return; } window.location = $("#lblRoot").val() + "srch.htm?skey=" + key; } function PlayCntrOld(cntrID, v) { jwplayer(cntrID).setup({ flashplayer: $("#lblRoot").val() + 'Tools/media/jwplayer/5.5/player.swf', file: v, image: $("#lblRoot").val() + 'tut/00atrin-pvr.gif', autostart: true, height: 480, width: 850, backcolor: '#fff', screencolor: '#fff', skin: $("#lblRoot").val() + 'Tools/media/jwplayer/5.5/skin/whotube.zip' }); } function PlayCntr(cntrID, v) { /* if (v.toLowerCase().indexOf(".flv") > 0) { PlayCntrOld(cntrID, v); } else { alert(cntrID); alert(v);*/ jwplayer(cntrID).setup({ flashplayer: $("#lblRoot").val() + 'Tools/media/jwplayer/6.7/jwplayer.flash.swf', file: v, image: $("#lblRoot").val() + 'tut/00atrin-pvr.gif', autostart: true, height: 480, width: 850, backcolor: '#fff', screencolor: '#fff', skin: $("#lblRoot").val() + 'Tools/media/jwplayer/6.7/skin/six.xml' }); $("#PopDownload").html("دانلود"); //} } function Play(v) { PlayCntr('PlayerContainer', v) } function Vote(vID) { if (Get_Cookie("Vote_" + vID.toString()) == "1") { alert("شما قبلا به این موضوع رای داده اید!"); $(".pnlQues").slideUp(); $(".pnlRes").slideDown(); return; } var sel = false; var r; for (var i = 0 ; i < $("input[name=" + vID.toString() + "]").length ; i++) { if ($($("input[name=" + vID.toString() + "]")[i]).prop("checked")) { sel = true; r = $($("input[name=" + vID.toString() + "]")[i]); break; } } if (sel) { $.ajax({ type: "POST", url: $("#lblRoot").val() + "admin/api.aspx/Vote", data: "{vID: " + vID.toString() + ",rID:" + r.val() + "}", contentType: "application/json; charset=utf-8", dataType: "json", beforeSend: function () { do_load('on'); }, success: function (msg) { if (msg.d) { Set_Cookie("Vote_" + vID.toString(), "1", 1000); alert("با تشکر، رای شما به این موضوع ثبت گردید."); } else { alert("متاسفانه اشکالی در ثبت نظر شما پیش آمده است، لطفا بعدا سعی کنید."); } }, complete: function () { do_load('off'); } }); } else { alert("لطفا نظر خود را انتخاب فرمائید"); } } function ShowResults() { $(".pnlQues").slideUp(); $(".pnlRes").slideDown(); } function ShowRQ() { $(".pnlRes").slideUp(); $(".pnlQues").slideDown(); } function GetVideo(Pos, changeHtm) { $.ajax({ cache: false, type: "POST", url: $("#lblRoot").val() + "GetTopVideos/" + $("#ContentPlaceHolder1_TopVideos1_hidAutoVideo").val() + "/" + Pos.toString(), contentType: "application/json; charset=utf-8", dataType: "json", beforeSend: function () { getting = true; if (changeHtm) $(".TopVideos").html("
     
    "); else $(".TopVideos").addClass("Loading"); }, success: function (msg) { if ($(".TopVideos").hasClass("Loading")) $(".TopVideos").removeClass("Loading"); $(".TopVideos").html(msg.d); CurrentPos = Pos; getting = false; $(".TVImage .tooltip").tooltip(); } }); } function AutoVideoSelect() { if (getting) return; var len = $("#ContentPlaceHolder1_TopVideos1_hidAutoVideo").val().split(',').length; if (CurrentPos == len - 1) CurrentPos = 0; else CurrentPos++; GetVideo(CurrentPos, false); } function ClearTemp() { $.ajax({ type: "POST", url: $("#lblRoot").val() + "admin/api.aspx/ClearTemp", contentType: "application/json; charset=utf-8", dataType: "json" }); } function SearchFun() { $(".SrchBtn").click(function () { Search(); }); $('#Search1_txtSrch').keypress(function (e) { if (e.keyCode == 13) { Search(); return (e.keyCode != 13); } }); $(".BtnSrch").click(function () { if ($(this).hasClass("Selected")) { $(this).removeClass("Selected"); $(".SearchBody").slideUp(); } else { $(this).addClass("Selected"); $(".SearchBody").slideDown(); } }); $(".SrchClose").click(function () { $(".BtnSrch").removeClass("Selected"); $(".SearchBody").slideUp(); }); $(".SearchPane").hover(function () { srchOpened = true; }, function () { srchOpened = false; }); } function ImageGallery() { try { //$("a[rel^='prettyPhoto']").prettyPhoto(); $("a[rel^='prettyPhoto']").prettyPhoto({ animation_speed: 'normal', theme: 'facebook', slideshow: 15000, autoplay_slideshow: true }); } catch (e) { alert(e); } } function QuickViewFun() { $(window).bind('resize', function () { $('.DialogBox').center({ transition: 300 }); }); $(window).scroll(function () { $('.DialogBox').center({ transition: 300 }); }); $(".QuickView").click(function () { return QuickView(this); }); $(".DBClose").click(function () { CloseVideo(); }); } function MovableItems() { $('.MovableItem').hover(function () { $(this).animate({ marginTop: "-=" + itemJumpHeight }, 200); }, function () { $(this).animate({ marginTop: "0px" }, 200); }); } function Alexa() { $.ajax({ type: "POST", url: $("#lblRoot").val() + "admin/api.aspx/GetRank", contentType: "application/json; charset=utf-8", dataType: "json", beforeSend: function () { $("#alexa").addClass("btnLoading"); }, success: function (msg) { $("#alexa").removeClass("btnLoading"); $("#alexa").html(msg.d); } }); } function VoteViews() { $("#voteNow").click(function () { $(".pnlRes").slideUp(); $(".pnlQues").slideDown(); }); $("#voteResNow").click(function () { $(".pnlQues").slideUp(); $(".pnlRes").slideDown(); }); } function AutoDefVideo() { if ($("#ContentPlaceHolder1_TopVideos1_hidAutoVideo").length > 0) { GetVideo(CurrentPos, true); window.setInterval(AutoVideoSelect, 30000); } } function TopVideoPane() { $("#ContentPlaceHolder1_DropDownList1").change(function () { $.ajax({ type: "POST", url: $("#lblRoot").val() + "TopVisit/" + $(this).val(), contentType: "application/json; charset=utf-8", dataType: "json", beforeSend: function () { $("#cntVisit").html(""); $("#cntVisit").addClass("Loading"); }, success: function (msg) { $("#cntVisit").removeClass("Loading"); $("#cntVisit").html(msg.d); $(".VItem2").tooltip(); $('.VThumb2').hover(function () { $(this).animate({ marginTop: "-=" + itemJumpHeight }, 200); }, function () { $(this).animate({ marginTop: "0px" }, 200); }); } }); }); } function FontUpDown() { $(".FontUp").click(function () { var ourText = $('.FontBody'); var currFontSize = ourText.css('fontSize'); var finalNum = parseFloat(currFontSize, 10); var stringEnding = currFontSize.slice(-2); finalNum *= 1.2; ourText.css('fontSize', finalNum + stringEnding); ourText.css('line-height', finalNum + 10 + stringEnding); }); $(".FontDown").click(function () { var ourText = $('.FontBody'); var currFontSize = ourText.css('fontSize'); var finalNum = parseFloat(currFontSize, 10); var stringEnding = currFontSize.slice(-2); finalNum /= 1.2; ourText.css('fontSize', finalNum + stringEnding); ourText.css('line-height', finalNum + 10 + stringEnding); }); } function PersianNumber() { try { $('.PersianValue').each(function () { try { $(this).html($(this).html().toPersian()); } catch (ex1) { } }); } catch (ex) { } } function CommentLike() { $('.btnVrUp').click(function () { var name = $(this).attr("tval"); var id = $(this).parents('.VRating').attr('id'); if (Get_Cookie("Like_" + name + "_" + id.toString()) == "ok") return; var d = $(this).parents('.VRating').find(".VRUp"); var cur = $(this); $.ajax({ type: "POST", url: $("#lblRoot").val() + "admin/api.aspx/CommentLike", data: "{Name:'" + name + "', ID: " + id + ", Liked:true}", contentType: "application/json; charset=utf-8", dataType: "json", beforeSend: function () { cur.addClass("btnLoading"); }, success: function (msg) { if (msg.d != -1) { d.html(msg.d); } cur.removeClass("btnLoading"); } }); }); $('.btnVrDown').click(function () { var name = $(this).attr("tval"); var id = $(this).parents('.VRating').attr('id'); if (Get_Cookie("Like_" + name + "_" + id.toString()) == "ok") return; var d = $(this).parents('.VRating').find(".VRDown"); var cur = $(this); $.ajax({ type: "POST", url: $("#lblRoot").val() + "admin/api.aspx/CommentLike", data: "{Name:'" + name + "', ID: " + id + ", Liked:false}", contentType: "application/json; charset=utf-8", dataType: "json", beforeSend: function () { cur.addClass("btnLoading"); }, success: function (msg) { if (msg.d != -1) { d.html(msg.d); } cur.removeClass("btnLoading"); } }); }); } function ListPlay() { if ($(".ListItem").length > 0) { $($(".ListItem")[0]).addClass("Selected"); $(".ListItem").click(function () { $(".ListItem").removeClass("Selected"); $(this).addClass("Selected"); var v = $(this).attr("video"); Play(v); }); } } function VideoFav() { $("#ContentPlaceHolder1_hypFav").click(function () { $.ajax({ type: "POST", url: "admin/api.aspx/AddToFav", data: "{ID: " + $("#ContentPlaceHolder1_hidID").val() + "}", contentType: "application/json; charset=utf-8", dataType: "json", beforeSend: function () { do_load('on'); }, success: function (msg) { if (msg.d) { alert('این ویدئو به لیست علاقمندیهای شما اضافه شد'); } else { alert('لطفا قبلا به سامانه وارد شوید'); } do_load('off'); } }); }); } function VideoLinkSortIco() { $(".VLSort a").each(function () { if ($(this).attr("href").indexOf("asc") > 0) $(this).parent().addClass("ASC"); else $(this).parent().addClass("DESC"); }); } function Code() { $(".BTCode").click(function () { if ($(".pnlCode").is(":visible")) { $(".pnlCode").slideUp(); } else { $(".pnlCode").slideDown(); SelectAll($("#ContentPlaceHolder1_txtCode")); } }); $("#ContentPlaceHolder1_txtCode").click(function () { SelectAll(this); }); } function UpMethodVis() { if ($("#ContentPlaceHolder1_rdoUpload").is(":checked")) { $(".SelectBody").slideUp(); $($(".SelectBody")[0]).slideDown(); } else { $(".SelectBody").slideUp(); $($(".SelectBody")[1]).slideDown(); $("#ContentPlaceHolder1_txtUrl").focus(); } } function Stat() { $.ajax({ type: "POST", url: $("#lblRoot").val() + "admin/api.aspx/Log", data: "{url: '" + window.location + "'}", contentType: "application/json; charset=utf-8", dataType: "json", success: function (msg) { var tmp = msg.d.split('|'); if (tmp.length >= 5) { try { $("#lblAllUsers").html(tmp[0]); $("#lblOnlineUsers").html(tmp[1]); $("#lblToday").html(tmp[2]); $("#lblYesterday").html(tmp[3]); $("#lblTotal").html(tmp[4]); $("#lblUpdateDate").html(tmp[5]); } catch (e) { } } } }); } function MegaMenu() { if ($(".HL2").length <= 0) return; if ($(".HL2 a.Selected").length <= 0) { $(".HL3:first").show(); } else { $($(".HL3")[$(".HL2 a").index($(".HL2 a.Selected"))]).show(); } $(".HL2 a").hover(function () { $(".HL3").hide(); $($(".HL3")[$(".HL2 a").index($(this))]).show(); }); } function Like(id, like) { $.ajax({ type: "POST", url: $("#lblRoot").val() + "admin/api.aspx/Like", data: "{ID: " + id.toString() + ", like:" + like + "}", contentType: "application/json; charset=utf-8", dataType: "json", beforeSend: function () { $("#like_" + id.toString()).html(""); }, success: function (msg) { $("#like_" + id.toString()).html(msg.d); } }); } function CheckAgree() { if ($("#ContentPlaceHolder1_chkAgree").is(":checked")) $("#ContentPlaceHolder1_btnRegister").removeAttr("disabled"); else $("#ContentPlaceHolder1_btnRegister").attr("disabled", "disabled"); } function SVCMenu() { var timer, timer2; $(".ML1Item").hover(function () { var obj = this; canshow = true; if (timer) { clearTimeout(timer); timer = null } timer = setTimeout(function () { ShowMnu(obj); }, 500) }); $(".MenuBar").hover(function () { }, function () { var obj = this; canshow = false; if (timer2) { clearTimeout(timer2); timer2 = null } timer2 = setTimeout(function () { $(".MenuLev2").fadeOut(); $(".Flesh").fadeOut(); $(".ML1Item").removeClass("Selected"); }, 500) }); } var canshow = false; function ShowMnu(obj) { if (!canshow) return; var b = $("#ml2_" + $(obj).attr("id").split('_')[1]); if (b.is(":visible")) return; $(".MenuLev2").fadeOut(); $(".ML1Item").removeClass("Selected"); $(obj).addClass("Selected"); if (b.length <= 0) { return; } var fl = parseInt($(obj).position().left - b.outerWidth() + $(obj).outerWidth()); b.css("left", fl.toString() + "px"); b.children(".ML2Col").height(b.height().toString() + "px"); b.fadeIn(); var w = 0; $(b.children(".ML2Col")).each(function(){ w+=$(this).outerWidth(); }); w += 1; b.css("width",w.toString() + "px"); } function FAQSearch() { if ($(".FAQSearch #ContentPlaceHolder1_TextBox1").length <= 0) return; $(".FAQSearch #ContentPlaceHolder1_TextBox1").keyup(function () { $.ajax({ type: "POST", url: $("#lblRoot").val() + "admin/api.aspx/FAQSearch", data: "{key: '" + $(".FAQSearch #ContentPlaceHolder1_TextBox1").val() + "'}", contentType: "application/json; charset=utf-8", dataType: "json", beforeSend: function () { $(".FaqAjax img").show(); }, success: function (msg) { if (msg.d != '') { $(".SearchResult").html(msg.d); } else { $(".SearchResult").html(""); } }, complete: function () { $(".FaqAjax img").hide(); } }); }); } function FitWidth() { if ($(".FitWidth").length <= 0) return; $(".FitWidth").width($(window).width() <= 980 ? 980 : $(window).width()); $(window).resize(function () { $(".FitWidth").width($(window).width() <= 980 ? 980 : $(window).width()); }); } function ResizeFire() { var p = 0; if ($(".AllHide").length > 0) { if ($(window).width() >= 1489) $(".LatestItem").hide(); else $(".LatestItem").show(); if ($(".master").width() > 1246 && $(".master").width() < 1495) $(".LatestItem2").hide(); else $(".LatestItem2").show(); } if ($(".AllCenter").length > 0) { if ($(".master").width() > 995 && $(".master").width() < 1246) { p = ($(".master").width() - 995) / 2; } else if ($(".master").width() > 1246 && $(".master").width() < 1495) { p = ($(".master").width() - 1246) / 2; } else if ($(".master").width() > 1495) { p = ($(".master").width() - 1495) / 2; } else { p = 0; } $(".AllCenter").css("padding", "0px " + p.toString() + "px 0px " + p.toString() + "px"); } if ($(".AllWCenter").length > 0) { if ($(".master").width() > 995 && $(".master").width() < 1495) { p = ($(".master").width() - 995) / 2; } else { p = 0; } $(".AllWCenter").css("padding", "0px " + p.toString() + "px 0px " + p.toString() + "px"); } if ($(".MidAdd").length > 0) { if ($(".master").width() > 1246 && $(".master").width() < 1495) { if ($(".ThumbHolder").length == 24 && $(".Double").length <= 0) { $($(".ThumbHolder")[23]).after("
    " + $($(".ThumbHolder")[0]).html() + "
    "); } } else { $(".Double").remove(); } } } function SelectDH(obj) { if (obj.next().is(":visible")) { $(".DPCnt").slideUp(); $(".DPHead").removeClass("Selected"); $(".UsersComment").show(); } else { $(".DPCnt").slideUp(); obj.next().slideDown(); $(".DPHead").removeClass("Selected"); obj.addClass("Selected"); $(".UsersComment").show(); } } var qID = -1; function Question() { if ($("#pnlQuestion").length > 0) { var w = $("#pnlQuestion"); $("#btnNewQuestion").click(function () { qID = -1; CalQBox(); }); $(window).scroll(function () { if (w.is(":visible")) centerPopup(w); }); $(window).resize(function () { if (w.is(":visible")) centerPopup(w); }); $(".qAns a").click(function () { qID = $(this).attr("qid"); CalQBox(); }); $("#btnSendQuestion").click(function () { SendQA(); }); } } function CalQBox() { var w = $("#pnlQuestion"); $("body").append("
    "); if (parseInt(qID) == -1) $("#QHead").html("پرسش جدید"); else $("#QHead").html("پاسخ جدید به پرسش"); $.ajax({ type: "POST", url: $("#lblRoot").val() + "admin/api.aspx/MakeCaptcha", contentType: "application/json; charset=utf-8", dataType: "json", beforeSend: function () { $("#qCaptcha").addClass("CentralLoading"); }, success: function (msg) { if (msg.d != '') { $("#qCaptcha").removeClass("CentralLoading"); $("#qCaptcha").html(msg.d); } } }); centerPopup(w); } function SendQA() { var Captcha = $("#ContentPlaceHolder1_ProductComment1_txtQCaptcha").val(); if (Captcha == "" || Captcha.toString().length < 4) { alert("لطفا متن تصویر امنیتی را وارد کنید"); return; } var Comment = $("#ContentPlaceHolder1_ProductComment1_txtQComment").val(); if (Comment == "") { alert("لطفا سوال / پاسخ خود را وارد کنید"); return; } var FullName = $("#ContentPlaceHolder1_ProductComment1_txtQFullName").val(); if (FullName == "") { alert("لطفا نام خود را وارد کنید"); return; } var Email = $("#ContentPlaceHolder1_ProductComment1_txtQEmail").val(); if (Email == "") { alert("لطفا ایمیل خود را وارد کنید"); return; } var Mobile = $("#ContentPlaceHolder1_ProductComment1_txtQMobile").val(); $.ajax({ type: "POST", url: $("#lblRoot").val() + "admin/api.aspx/AddQuestion", data: "{CaptchaText:'" + Captcha + "', WebsiteID:1, ProductID:" + $("#ContentPlaceHolder1_ProductComment1_hidProductCode").val() + ",FullName:'" + FullName + "',Email:'" + Email + "',Mobile:'" + Mobile + "',Comment:'" + Comment + "',QuestionID:" + qID.toString() + "}", contentType: "application/json; charset=utf-8", dataType: "json", beforeSend: function () { $("#btnSendQuestion").hide(); $(".qSend").addClass("CentralLoading"); }, success: function (msg) { $(".qSend").removeClass("CentralLoading"); $("#btnSendQuestion").show(); var splt = msg.d.toString().split('|'); alert(splt[1]); if (splt[0] == "1") { $("#ContentPlaceHolder1_ProductComment1_txtQCaptcha").val(""); $("#ContentPlaceHolder1_ProductComment1_txtQComment").val(""); $("#ContentPlaceHolder1_ProductComment1_txtQFullName").val(""); $("#ContentPlaceHolder1_ProductComment1_txtFullName").val(""); $("#ContentPlaceHolder1_ProductComment1_txtQEmail").val(""); $("#ContentPlaceHolder1_ProductComment1_txtQMobile").val(""); $(document).find(".backgroundPopup").remove(); $(".pnlPopup").hide(); } $("#qCaptcha").html(splt[2]); } }); } function centerPopup(window) { var c = document.documentElement.clientWidth; var d = window.width(); $(".backgroundPopup").css({ opacity: "0.6" }); $(".backgroundPopup").fadeIn("slow"); window.fadeIn("slow"); window.css({ opacity: "1", display: "block", left: c / 2 - d / 2 }); $(".backgroundPopup").css({ height: $(document).height() }); } function WriteReview() { if ($("#pnlReview").length > 0) { var w = $("#pnlReview"); $("#btnWrite").click(function () { $.ajax({ type: "POST", url: $("#lblRoot").val() + "admin/api.aspx/MakeCaptcha", contentType: "application/json; charset=utf-8", dataType: "json", beforeSend: function () { $("#ppCaptcha").addClass("CentralLoading"); }, success: function (msg) { if (msg.d != '') { $("#ppCaptcha").removeClass("CentralLoading"); $("#ppCaptcha").html(msg.d); } } }); $("body").append("
    "); centerPopup(w); }); $(window).scroll(function () { if (w.is(":visible")) centerPopup(w); }); $(window).resize(function () { if (w.is(":visible")) centerPopup(w); }); $(".ppClose").click(function () { $(document).find(".backgroundPopup").remove(); $(".pnlPopup").hide(); }); $("#btnSendReview").click(function () { var Captcha = $("#ContentPlaceHolder1_ProductComment1_txtCaptcha").val(); if (Captcha == "" || Captcha.toString().length < 4) { alert("لطفا متن تصویر امنیتی را وارد کنید"); return; } var Rate = $("#ContentPlaceHolder1_ProductComment1_txtRate_hidRate").val(); if (Rate == "" || Rate == "0") { alert("لطفا رتبه کلی محصول را مشخص کنید"); return; } var Comment = $("#ContentPlaceHolder1_ProductComment1_txtComment").val(); if (Comment == "") { alert("لطفا نظر خود را وارد کنید"); return; } var Rec = $("#ContentPlaceHolder1_ProductComment1_txtRecommend_hidYesNo").val(); if (Rec == "") { alert("لطفا مشخص کنید، آیا این محصول را به دوستان خود پیشنهاد می دهید؟"); return; } Rec = Rec == "0" ? "false" : "true"; var Sex = $("#ContentPlaceHolder1_ProductComment1_cmbSex").val(); if (Sex == "-1") { alert("لطفا جنسیت خود را مشخص کنید"); return; } Sex = Sex == "0" ? "false" : "true"; var FullName = $("#ContentPlaceHolder1_ProductComment1_txtFullName").val(); if (FullName == "") { alert("لطفا نام / نام مستعار خود را وارد کنید"); return; } var Email = $("#ContentPlaceHolder1_ProductComment1_txtEmail").val(); if (Email == "") { alert("لطفا ایمیل خود را وارد کنید"); return; } var Mobile = $("#ContentPlaceHolder1_ProductComment1_txtMobile").val(); var AgeID = $("#ContentPlaceHolder1_ProductComment1_cmbAge").val(); if (AgeID == "" || AgeID == "-1") { alert("لطفا سن خود را مشخص کنید"); return; } var ChoosingReasonID = $("#ContentPlaceHolder1_ProductComment1_cmbReason").val(); if (ChoosingReasonID == "" || ChoosingReasonID == "-1") { alert("لطفا دلیل استفاده از این محصول را مشخص کنید"); return; } var HavingFromID = $("#ContentPlaceHolder1_ProductComment1_cmbTime").val(); if (HavingFromID == "" || HavingFromID == "-1") { alert("لطفا مشخص کنید چه مدت زمانی است که از این محصول استفاده می کنید؟"); return; } var ValueRate = $("#ContentPlaceHolder1_ProductComment1_txtValue_hidRate").val(); if (ValueRate == "" || ValueRate == "0") { alert("لطفا رتبه ارزشمندی محصول را مشخص کنید"); return; } var FeatureRate = $("#ContentPlaceHolder1_ProductComment1_txtFeature_hidRate").val(); if (FeatureRate == "" || FeatureRate == "0") { alert("لطفا رتبه امکانات محصول را مشخص کنید"); return; } var AppearanceRate = $("#ContentPlaceHolder1_ProductComment1_txtApearance_hidRate").val(); if (AppearanceRate == "" || AppearanceRate == "0") { alert("لطفا رتبه ظاهر محصول را مشخص کنید"); return; } var PerformanceRate = $("#ContentPlaceHolder1_ProductComment1_txtPerformance_hidRate").val(); if (PerformanceRate == "" || PerformanceRate == "0") { alert("لطفا رتبه کارایی محصول را مشخص کنید"); return; } var QualityRate = $("#ContentPlaceHolder1_ProductComment1_txtQuality_hidRate").val(); if (QualityRate == "" || QualityRate == "0") { alert("لطفا رتبه کیفیت محصول را مشخص کنید"); return; } $.ajax({ type: "POST", url: $("#lblRoot").val() + "admin/api.aspx/AddReview", data: "{CaptchaText:'" + Captcha + "', WebsiteID:1, ProductID:" + $("#ContentPlaceHolder1_ProductComment1_hidProductCode").val() + ", Rate:" + Rate + ", Recommand:" + Rec + ",FullName:'" + FullName + "',Email:'" + Email + "',Mobile:'" + Mobile + "',Comment:'" + Comment + "',Sex:" + Sex + ",AgeID:" + AgeID + ",ChoosingReasonID:" + ChoosingReasonID + ",HavingFromID:" + HavingFromID + ",ValueRate:" + ValueRate + ",FeatureRate:" + FeatureRate + ",AppearanceRate:" + AppearanceRate + ",PerformanceRate:" + PerformanceRate + ",QualityRate:" + QualityRate + "}", contentType: "application/json; charset=utf-8", dataType: "json", beforeSend: function () { $("#btnSendReview").hide(); $(".ppSend").addClass("CentralLoading"); }, success: function (msg) { $(".ppSend").removeClass("CentralLoading"); $("#btnSendReview").show(); var splt = msg.d.toString().split('|'); alert(splt[1]); if (splt[0] == "1") { $("#ContentPlaceHolder1_ProductComment1_txtCaptcha").val(""); $("#ContentPlaceHolder1_ProductComment1_txtRate_hidRate").val(""); $("#ContentPlaceHolder1_ProductComment1_txtRecommend_hidYesNo").val(""); $("#ContentPlaceHolder1_ProductComment1_txtFullName").val(""); $("#ContentPlaceHolder1_ProductComment1_txtEmail").val(""); $("#ContentPlaceHolder1_ProductComment1_txtMobile").val(""); $("#ContentPlaceHolder1_ProductComment1_txtComment").val(""); $("#ContentPlaceHolder1_ProductComment1_cmbSex").val(""); $("#ContentPlaceHolder1_ProductComment1_cmbAge").val("-1"); $("#ContentPlaceHolder1_ProductComment1_cmbReason").val("-1"); $("#ContentPlaceHolder1_ProductComment1_cmbTime").val("-1"); $("#ContentPlaceHolder1_ProductComment1_txtValue_hidRate").val(""); $("#ContentPlaceHolder1_ProductComment1_txtFeature_hidRate").val(""); $("#ContentPlaceHolder1_ProductComment1_txtApearance_hidRate").val(""); $("#ContentPlaceHolder1_ProductComment1_txtPerformance_hidRate").val(""); $("#ContentPlaceHolder1_ProductComment1_txtQuality_hidRate").val(""); $(document).find(".backgroundPopup").remove(); $(".pnlPopup").hide(); } $("#ppCaptcha").html(splt[2]); } }); }); } } function YesNo() { $(".YesNo a").click(function () { $($(this).parent().find("a")).removeClass("Selected"); $(this).addClass("Selected"); $($(this).parent().find("input")).val($(this).attr("val")); }); } function FindTitle(aCtrlArray, value) { var i; for (i = 0 ; i < aCtrlArray.length ; i++) if ($(aCtrlArray[i]).attr("val") == value.toString()) { return $(aCtrlArray[i]).attr("label"); } return ""; } function RefreshRate(aCtrlArray, value) { $(aCtrlArray).removeClass("Rate1Sel"); $(aCtrlArray).removeClass("Rate2Sel"); $(aCtrlArray).removeClass("Rate3Sel"); $(aCtrlArray).removeClass("Rate4Sel"); $(aCtrlArray).removeClass("Rate5Sel"); if (value <= 0) $($(aCtrlArray).parent().find("span")).html(""); else $($(aCtrlArray).parent().find("span")).html(FindTitle(aCtrlArray, value)); var i; for (i = 0 ; i < value ; i++) $(aCtrlArray[i]).addClass("Rate" + value.toString() + "Sel"); } function RateIt() { $(".RateIt a").click(function () { $($(this).parent().find("input")).val($(this).attr("val")); RefreshRate($($(this).parent().find("a")), parseInt($(this).attr("val"))); }); $(".RateIt a").hover(function () { RefreshRate($(this).parent().find("a"), parseInt($(this).attr("val"))); }, function () { RefreshRate($(this).parent().find("a"), parseInt($($(this).parent().find("input")).val() == "" ? "0" : $($(this).parent().find("input")).val())); }); } function ProductDynamicTree() { if ($(".DPCnt").length > 0) { SelectDH($($(".DPHead")[0])); $(".DPHead").click(function () { SelectDH($(this)); }); } } function Agreement() { if ($("#ContentPlaceHolder1_chkAgree").length > 0) { CheckAgree(); $("#ContentPlaceHolder1_chkAgree").click(function () { CheckAgree(); }); } } function Menu() { $(".HL3A").hover(function () { $(this).find(".HL4").slideDown(); }, function () { $(this).find(".HL4").slideUp(); }); } function ProductDetail() { if ($(".Mholder").length > 0) { $(".Mholder").click(function () { if (!$(this).hasClass("Selected")) { $(".Mholder.Selected").removeClass("Selected"); $(this).addClass("Selected"); $(".PayDetail.Selected").removeClass("Selected"); $($(".PayDetail")[$(".Mholder").index(this)]).addClass("Selected"); } }); } } function WindowSize() { ResizeFire(); $(window).resize(function () { ResizeFire(); }); } function UserMenu() { if ($(".UserMenu").length <= 0) return; $(".UserIcoHolder").hover(function () { $(".UserMenu").show(); }, function () { $(".UserMenu").hide(); }); } function ThumbLike() { $('.ThumbLike').click(function () { var name = $(this).attr("tn"); var id = $(this).attr("ti"); var cur = $(this); //alert(cur); if ($(this).hasClass("Liked")) { $.ajax({ type: "POST", url: $("#lblRoot").val() + "admin/api.aspx/CommentLike", data: "{Name:'" + name + "', ID: " + id + ", Liked:false}", contentType: "application/json; charset=utf-8", dataType: "json", beforeSend: function () { cur.removeClass("Liked") cur.addClass("btnLoading") }, success: function (msg) { cur.removeClass("btnLoading") cur.addClass("UnLiked") } }); } else { $.ajax({ type: "POST", url: $("#lblRoot").val() + "admin/api.aspx/CommentLike", data: "{Name:'" + name + "', ID: " + id + ", Liked:true}", contentType: "application/json; charset=utf-8", dataType: "json", beforeSend: function () { cur.removeClass("UnLiked") cur.addClass("btnLoading") }, success: function (msg) { cur.removeClass("btnLoading") cur.addClass("Liked") } }); } //if (Get_Cookie("Like_" + name + "_" + id.toString()) == "ok") }); } $(document).ready(function () { WindowSize(); FormHelp(); BodyClick(); Comments(); Sharing(); ClearTemp(); SearchFun(); ImageGallery(); MovableItems(); VoteViews(); PageTab(); FontUpDown(); PersianNumber(); CommentLike(); VideoFav(); VideoLinkSortIco(); Code(); Stat(); Agreement(); ProductDetail(); ProductDynamicTree(); RateIt(); YesNo(); WriteReview(); Question(); SVCMenu(); UserMenu(); ThumbLike(); QuickViewFun(); $(".HomGal a").hover(function () { $(this).find(".imgInfo").fadeIn(); }, function () { $(this).find(".imgInfo").fadeOut(); }); $("#ContentPlaceHolder1_btnFollow").click(function () { $.ajax({ type: "POST", url: $("#lblRoot").val() + "admin/api.aspx/Follow", data: "{UserID:" + $("#hidCU").val() + "}", contentType: "application/json; charset=utf-8", dataType: "json", beforeSend: function () { do_load('on'); }, success: function (msg) { $("#ContentPlaceHolder1_btnFollow").html(msg.d); }, complete: function () { do_load('off'); } }); }); $("#btnISFacebook").click(function () { var width = 600; var height = 400; var leftPosition, topPosition; //Allow for borders. leftPosition = (window.screen.width / 2) - ((width / 2) + 10); //Allow for title and status bars. topPosition = (window.screen.height / 2) - ((height / 2) + 50); var u = window.location.href; var t = window.document.title; var windowFeatures = "status=no,height=" + height + ",width=" + width + ",resizable=yes,left=" + leftPosition + ",top=" + topPosition + ",screenX=" + leftPosition + ",screenY=" + topPosition + ",toolbar=no,menubar=no,scrollbars=no,location=no,directories=no"; window.open('/http://www.facebook.com/sharer.php?u=' + encodeURIComponent(u) + '&t=' + encodeURIComponent(t), 'sharer', windowFeatures); return false; }); $("#btnISTwitter").click(function () { var width = 600; var height = 400; var leftPosition, topPosition; //Allow for borders. leftPosition = (window.screen.width / 2) - ((width / 2) + 10); //Allow for title and status bars. topPosition = (window.screen.height / 2) - ((height / 2) + 50); var u = window.location.href; var t = window.document.title; var windowFeatures = "status=no,height=" + height + ",width=" + width + ",resizable=yes,left=" + leftPosition + ",top=" + topPosition + ",screenX=" + leftPosition + ",screenY=" + topPosition + ",toolbar=no,menubar=no,scrollbars=no,location=no,directories=no"; window.open("/http://twitter.com/share?url=" + encodeURIComponent(u) + "&text=" + encodeURIComponent(t) + "&count=none/", "tweet", windowFeatures); return false; }); $("#btnISGooglePlus").click(function () { var width = 600; var height = 400; var leftPosition, topPosition; //Allow for borders. leftPosition = (window.screen.width / 2) - ((width / 2) + 10); //Allow for title and status bars. topPosition = (window.screen.height / 2) - ((height / 2) + 50); var u = window.location.href; var t = window.document.title; var windowFeatures = "status=no,height=" + height + ",width=" + width + ",resizable=yes,left=" + leftPosition + ",top=" + topPosition + ",screenX=" + leftPosition + ",screenY=" + topPosition + ",toolbar=no,menubar=no,scrollbars=no,location=no,directories=no"; window.open("/https://plus.google.com/share?url=" + encodeURIComponent(u), "share", windowFeatures); return false; }); $("#btnLike").click(function () { var name = "UserGallery"; var id = $("#hidUGID").val(); var Liked; if ($("#btnLike").text() == "Like") { Liked = "true"; } else { Liked = "false"; } $.ajax({ type: "POST", url: $("#lblRoot").val() + "admin/api.aspx/CommentLike", data: "{Name:'" + name + "', ID: " + id + ", Liked:" + Liked + "}", contentType: "application/json; charset=utf-8", dataType: "json", beforeSend: function () { do_load("on"); }, success: function (msg) { if (msg.d != -1) { $("#btnLike").html(Liked == "true" ? "Unlike" : "Like"); if (Liked == "true") { $("#pnlLikeCnt").html((parseInt($("#pnlLikeCnt").html()) + 1).toString()); } else { $("#pnlLikeCnt").html((parseInt($("#pnlLikeCnt").html()) - 1).toString()); } } }, complete: function () { do_load('off'); } }); }); $(".VLike").click(function () { var name = "Education"; var id = $("#hidEduID").val(); var Liked; if ($(".VLike").html().indexOf("Unlike") >= 0) Liked = "false"; else Liked = "true"; $.ajax({ type: "POST", url: $("#lblRoot").val() + "admin/api.aspx/CommentLike", data: "{Name:'" + name + "', ID: " + id + ", Liked:" + Liked + "}", contentType: "application/json; charset=utf-8", dataType: "json", beforeSend: function () { do_load("on"); }, success: function (msg) { if (msg.d != -1) { $(".VLike").html(Liked == "true" ? "Unlike" : "Like"); if (Liked == "true") { $(".VLike").html("Unlike"); } else { $(".VLike").html("Like (" + msg.d.toString() + ")"); } } }, complete: function () { do_load('off'); } }); }); $("#btnFav").click(function () { var favIt; if ($(this).hasClass("NoFavIt")) favIt = "false"; else favIt = "true"; $.ajax({ type: "POST", url: $("#lblRoot").val() + "admin/api.aspx/Fav", data: "{ TableName:'UserGallery', TableID:" + $("#hidUGID").val() + ", FavIt:" + favIt + "}", contentType: "application/json; charset=utf-8", dataType: "json", beforeSend: function () { do_load("on"); }, success: function (msg) { if (msg.d) { if (favIt == "true") { $("#btnFav").removeClass("FavIt"); $("#btnFav").addClass("NoFavIt"); $("#pnlFavCnt").html((parseInt($("#pnlFavCnt").html()) + 1).toString()); } else { $("#btnFav").removeClass("NoFavIt"); $("#btnFav").addClass("FavIt"); $("#pnlFavCnt").html((parseInt($("#pnlFavCnt").html()) - 1).toString()); } } }, complete: function () { do_load('off'); } }); }); $(".VFav").click(function () { var favIt; if ($(this).html().indexOf("اضافه") >= 0) favIt = "true"; else favIt = "false"; $.ajax({ type: "POST", url: $("#lblRoot").val() + "admin/api.aspx/Fav", data: "{ TableName:'Education', TableID:" + $("#hidEduID").val() + ", FavIt:" + favIt + "}", contentType: "application/json; charset=utf-8", dataType: "json", beforeSend: function () { do_load("on"); }, success: function (msg) { if (msg.d) { if (favIt == "true") { $(".VFav").html("از لیست علاقمندیهای من حذف شود"); } else { $(".VFav").html("به لیست علاقمندیهای من اضافه شود"); } } }, complete: function () { do_load('off'); } }); }); }); var selectedObj; function initMenu() { $('#faq ul').hide(); var c = Get_Cookie("SMID"); if (c != null && c != "" && $("#faq-" + c).length > 0) { $("#faq-" + c).show(); selectedObj = $("#" + c); selectedObj.addClass("current"); } else { $('#faq ul:first').show(); $('#faq a:first').addClass("current"); } $('#faq li a').click(function () { var checkElement = $(this).next(); selectedObj = $(this); $('#faq li a').removeClass("current"); $(this).addClass("current"); if ((checkElement.is('ul')) && (checkElement.is(':visible'))) { return false; } if ((checkElement.is('ul')) && (!checkElement.is(':visible'))) { $('#faq ul:visible').slideUp('normal'); checkElement.slideDown('normal'); Set_Cookie("SMID", $(this).attr("id"), 1); return false; } }); } $(document).ready(function () { initMenu(); });(function ($) { var name = 'newsTicker'; var debugMode = false; // enabling this turns on console logging for interactions function runTicker(settings) { tickerData = $(settings.newsList).data('newsTicker'); if (tickerData.currentItem > tickerData.newsItemCounter) { // if we've looped to beyond the last item in the list, start over tickerData.currentItem = 0; } else if (tickerData.currentItem < 0) { // if we've looped back before the first item, move to the last one tickerData.currentItem = tickerData.newsItemCounter; } if (tickerData.currentPosition == 0) { if (tickerData.newsLinks[tickerData.currentItem].length > 0) { $(tickerData.newsList).empty().append('
  • '); } else { $(tickerData.newsList).empty().append('
  • '); } } //only start the ticker itself if it's defined as animating: otherwise it's paused or under manual advance if (tickerData.animating) { if (tickerData.currentPosition % 2 == 0) { var placeHolder = tickerData.placeHolder1; } else { var placeHolder = tickerData.placeHolder2; } if (tickerData.currentPosition < tickerData.newsItems[tickerData.currentItem].length) { // we haven't completed ticking out the current item var tickerText = tickerData.newsItems[tickerData.currentItem].substring(0, tickerData.currentPosition); if (tickerData.newsLinks[tickerData.currentItem].length > 0) { $(tickerData.newsList + ' li a').text(tickerText + placeHolder); } else { $(tickerData.newsList + ' li').text(tickerText + placeHolder); } tickerData.currentPosition++; setTimeout(function () { runTicker(settings); settings = null; }, tickerData.tickerRate); } else { // we're on the last letter of the current item if (tickerData.newsLinks[tickerData.currentItem].length > 0) { $(tickerData.newsList + ' li a').text(tickerData.newsItems[tickerData.currentItem]); } else { $(tickerData.newsList + ' li').text(tickerData.newsItems[tickerData.currentItem]); } setTimeout(function () { if (tickerData.animating) { tickerData.currentPosition = 0; tickerData.currentItem++; runTicker(settings); settings = null; } }, tickerData.loopDelay); } } else {// settings.animating == false // display the full text of the current item var tickerText = tickerData.newsItems[tickerData.currentItem]; if (tickerData.newsLinks[tickerData.currentItem].length > 0) { $(tickerData.newsList + ' li a').text(tickerText); } else { $(tickerData.newsList + ' li').text(tickerText); } } } // Core plugin setup and config jQuery.fn[name] = function (options) { // Add or overwrite options onto defaults var settings = jQuery.extend({}, jQuery.fn.newsTicker.defaults, options); var newsItems = new Array(); var newsLinks = new Array(); var newsAttributes = new Array(); var newsItemCounter = 0; // Hide the static list items $(settings.newsList + ' li').hide(); // Store the items and links in arrays for output $(settings.newsList + ' li').each(function () { if ($(this).children('a').length) { newsItems[newsItemCounter] = $(this).children('a').text(); newsLinks[newsItemCounter] = $(this).children('a').attr('href'); var linkAttributes = new Object(); var attrs = $(this).children('a')[0].attributes; for (var i = 0; i < attrs.length; i++) { linkAttributes[attrs[i].nodeName] = attrs[i].nodeValue; } if (debugMode) { console.log(linkAttributes); } var linkAttributesProcessed = ''; for (var prop in linkAttributes) { // print out the attributes as a string ready for output within the anchor tag linkAttributesProcessed = linkAttributesProcessed + prop + '="' + linkAttributes[prop] + '" '; } if (debugMode) { console.log(linkAttributesProcessed); } newsAttributes[newsItemCounter] = linkAttributesProcessed; } else { newsItems[newsItemCounter] = $(this).text(); newsLinks[newsItemCounter] = ''; newsAttributes[newsItemCounter] = ''; } newsItemCounter++; }); var tickerElement = $(settings.newsList); // for quick reference below tickerElement.data(name, { newsList: settings.newsList, tickerRate: settings.tickerRate, startDelay: settings.startDelay, loopDelay: settings.loopDelay, placeHolder1: settings.placeHolder1, placeHolder2: settings.placeHolder2, controls: settings.controls, ownControls: settings.ownControls, stopOnHover: settings.stopOnHover, resumeOffHover: settings.resumeOffHover, newsItems: newsItems, newsLinks: newsLinks, newsAttributes: newsAttributes, newsItemCounter: newsItemCounter - 1, // -1 because we've incremented even after the last item (above) currentItem: 0, currentPosition: 0, firstRun: 1 }) .bind({ stop: function (event) { // show remainder of the current item immediately tickerData = tickerElement.data(name); if (tickerData.animating) { // only stop if not already stopped tickerData.animating = false; if (debugMode) { console.log('stop' + tickerData.currentItem + ' ' + tickerData.animating); } } }, play: function (event) { // show 1st item with startdelay tickerData = tickerElement.data(name); if (!tickerData.animating) { // if already animating, don't start animating again tickerData.animating = true; if (debugMode) { console.log('play' + tickerData.currentItem + ' ' + tickerData.animating); } setTimeout(function () { runTicker(tickerData); tickerData = null; }, tickerData.startDelay); } }, resume: function (event) { // start from next item, with no delay tickerData = tickerElement.data(name); if (!tickerData.animating) { // if already animating, don't start animating again tickerData.animating = true; // set the character position as 0 to ensure on resume we start at the right point tickerData.currentPosition = 0; tickerData.currentItem++; if (debugMode) { console.log('resume' + tickerData.currentItem + ' ' + tickerData.animating); } runTicker(tickerData); // no delay when resuming. } }, next: function (event) { // show whole of next item tickerData = tickerElement.data(name); // stop (which sets as non-animating), and call runticker $(tickerData.newsList).trigger("stop"); // set the character position as 0 to ensure on resume we start at the right point tickerData.currentPosition = 0; tickerData.currentItem++; if (debugMode) { console.log('next' + tickerData.currentItem + ' ' + tickerData.animating); } runTicker(tickerData); }, previous: function (event) { // show whole of previous item tickerData = tickerElement.data(name); // stop (which sets as non-animating), and call runticker $(tickerData.newsList).trigger("stop"); // set the character position as 0 to ensure on resume we start at the right point tickerData.currentPosition = 0; tickerData.currentItem--; if (debugMode) { console.log('previous' + tickerData.currentItem + ' ' + tickerData.animating); } runTicker(tickerData); } }); if (settings.stopOnHover) { tickerElement.bind({ mouseover: function (event) { tickerData = tickerElement.data(name); if (tickerData.animating) { // stop if not already stopped $(tickerData.newsList).trigger("stop"); if (tickerData.controls) { // ensure that the ticker can be resumed if controls are enabled $('.stop').hide(); $('.resume').show(); } } } }); if (settings.resumeOffHover) { // only allowed if stopOnHover enabled tickerElement.bind({ mouseout: function (event) { tickerData = tickerElement.data(name); if (!tickerData.animating) { // if already animating, don't start animating again $(tickerData.newsList).trigger("resume"); if (debugMode) { console.log('resumeoffhover' + tickerData.currentItem + ' ' + tickerData.animating); } } } }); } } tickerData = tickerElement.data(name); // set up control buttons if the option is on if (tickerData.controls || tickerData.ownControls) { if (!tickerData.ownControls) { $('').insertAfter($(tickerData.newsList)); } $('.play').hide(); $('.resume').hide(); $('.play').click(function (event) { $(tickerData.newsList).trigger("play"); $('.play').hide(); $('.resume').hide(); $('.stop').show(); event.preventDefault(); }); $('.resume').click(function (event) { $(tickerData.newsList).trigger("resume"); $('.play').hide(); $('.resume').hide(); $('.stop').show(); event.preventDefault(); }); $('.stop').click(function (event) { $(tickerData.newsList).trigger("stop"); $('.stop').hide(); $('.resume').show(); event.preventDefault(); }); $('.previous').click(function (event) { $(tickerData.newsList).trigger("previous"); $('.stop').hide(); $('.resume').show(); event.preventDefault(); }); $('.next').click(function (event) { $(tickerData.newsList).trigger("next"); $('.stop').hide(); $('.resume').show(); event.preventDefault(); }); }; // tell it to play $(tickerData.newsList).trigger("play"); }; // News ticker defaults jQuery.fn[name].defaults = { newsList: "#news", tickerRate: 10, startDelay: 100, loopDelay: 4000, placeHolder1: " |", placeHolder2: "_", controls: false, ownControls: false, stopOnHover: false, resumeOffHover: false } })(jQuery); $(document).ready(function () { try { $().newsTicker(); $("#news").css("visibility", "visible"); } catch (e) { } }); var slideBarStatus = "close"; function DeleteAllSc() { Delete_Cookie('ShoppingCart'); RefreshSC(); } function CommaFormatted(amount) { return amount.replace(/(\d)(?=(\d\d\d)+(?!\d))/g, "$1,") amount = amount.replace(/^0+/, ''); amount += ''; x = amount.split('.'); x1 = x[0]; x2 = x.length > 1 ? '.' + x[1] : ''; var rgx = /(\d+)(\d {3})/; while (rgx.test(x1)) { x1 = x1.replace(rgx, '$1' + ',' + '$2'); } return x1 + x2; } function RemoveCommaFormatted(amount) { amount = amount.replace(/,/g, ""); return amount; } function RefreshSC() { try { var sc = Get_Cookie('ShoppingCart'); if (sc == null) sc = ''; var RecCnt = 0; var Amount = 0; var str = "
    لیست سبد خرید
    "; if (sc == '') { document.getElementById('slideBarList').innerHTML = str; document.getElementById('sideBarTotal').innerHTML = "0"; document.getElementById('slideBar').style.display = 'none'; document.getElementById('slideBar').style.width = "0px"; } else { document.getElementById('slideBar').style.display = 'inline'; SCOpen(); var temp = new Array(); temp = sc.split('&'); if (temp.length < 2) { document.getElementById('slideBar').style.display = 'none'; Delete_Cookie('ShoppingCart'); return; } var i; str += ""; for (i = 0; i < temp.length; i++) { if (temp[i] != null && temp[i].toString() != '') { var fld = new Array(); fld = temp[i].toString().split('|'); str += ""; RecCnt += parseInt(fld[4]); Amount += parseInt(fld[4]) * parseInt(fld[5]); } str += ""; } str += "
    " + fld[3].toString() + "" + fld[2].toString() + "" + CommaFormatted(fld[4].toString()) + " عدد " + CommaFormatted(fld[5].toString()) + " ریال
    "; document.getElementById('sideBarTotal').innerHTML = CommaFormatted(Amount.toString()) + " ریال "; document.getElementById('slideBarList').innerHTML = str; } } catch (ex) { Delete_Cookie('ShoppingCart'); } } function DeleteFromSC(type, id) { var sc = Get_Cookie('ShoppingCart'); if (sc == null) sc = ''; if (sc == '') return; var str = ''; var temp = new Array(); temp = sc.split('&'); var i; for (i = 0; i < temp.length; i++) { if (temp[i] != null && temp[i].toString() != '') { var fld = new Array(); fld = temp[i].toString().split('|'); if (fld[0].toString() != type || fld[1].toString() != id) str += temp[i].toString() + '&'; } } Set_Cookie('ShoppingCart', str, 1000); RefreshSC(); } function AddToCart(Type, ID, Code, Title, Cnt, Amount, Detail) { var sc = Get_Cookie('ShoppingCart'); if (sc == null) sc = ''; var str = ''; var temp = new Array(); temp = sc.split('&'); var i; var find = false; for (i = 0; i < temp.length; i++) { if (temp[i] != null && temp[i].toString() != '') { var fld = new Array(); fld = temp[i].toString().split('|'); if (fld[0].toString() == Type && fld[1].toString() == ID) { str += Type + '|' + ID + '|' + Code + '|' + Title + '|' + (parseInt(Cnt) + parseInt(fld[4].toString())) + '|' + Amount + '|' + fld[6].toString() + '&'; find = true; } else { str += temp[i].toString() + '&'; } } } if (!find) { str += Type + '|' + ID + '|' + Code + '|' + Title + '|' + Cnt + '|' + Amount + '|' + Detail + '&'; } Set_Cookie('ShoppingCart', str, 1000); RefreshSC(); } function SCOpen() { $(function () { $("#slideBar").animate({ width: "500px" }, 500); $("#slideBarContent").show(); $("#slideBarButton").css("background", "url('" + $("#lblRoot").val() + "script/sc/images/mylist-close.png')"); slideBarStatus = "open"; $("#slideBar").height("auto"); }); } function SCClose() { $(function () { $("#slideBar").animate({ width: "0px" }, 500); $("#slideBarContent").hide(); $("#slideBarButton").css("background", "url('" + $("#lblRoot").val() + "script/sc/images/mylist-open.png')"); slideBarStatus = "close"; $("#slideBar").height("200px"); }); } $(function () { var name = "#slideBar"; var menuYloc = parseInt($(name).css("bottom").substring(0, $(name).css("bottom").indexOf("px"))); $(window).scroll(function () { var offset = menuYloc - $(document).scrollTop() + "px"; $(name).animate({ bottom: offset }, { duration: 500, queue: false }); }); $("#slideBarButton").click(function () { if (slideBarStatus == "open") { SCClose(); } else { SCOpen(); } }); $('.fadeThis').append('').each(function () { var $span = $('> span.hover', this).css('opacity', 0); $(this).hover(function () { $span.stop().fadeTo(500, 1); }, function () { $span.stop().fadeTo(500, 0); }); }); $("#sideBarCheckOut").click(function () { $.ajax({ type: "POST", url: $("#lblRoot").val() + "admin/api.aspx/IsValidUser", contentType: "application/json; charset=utf-8", dataType: "json", beforeSend: function () { do_load("on"); }, success: function (msg) { do_load("off"); if (msg.d) { window.location = $("#lblRoot").val() + "fa/sc"; } else { window.location = $("#lblRoot").val() + "fa/login"; } } }); }); var ButtonKeys = { "EnterKey": 13 }; $("#Popup1_txtUserName").keypress(function (e) { if (e.which == ButtonKeys.EnterKey) { $("#Popup1_btnLogin").click(); return false; } }); $("#Popup1_txtPassword").keypress(function (e) { if (e.which == ButtonKeys.EnterKey) { $("#Popup1_btnLogin").click(); return false; } }); }); $(document).ready(function () { RefreshSC(); });"undefined"==typeof jwplayer&&(jwplayer=function(e){if(jwplayer.api)return jwplayer.api.selectPlayer(e)},jwplayer.version="6.7.4071",jwplayer.vid=document.createElement("video"),jwplayer.audio=document.createElement("audio"),jwplayer.source=document.createElement("source"),function(e){function a(b){return function(){return c(b)}}function k(b){return function(){b("Error loading file")}}function f(m,a,c,g){return function(){try{var d=m.responseXML;if(d&&d.firstChild)return c(m)}catch(f){}(d=b.parseXML(m.responseText))&& d.firstChild?(m=b.extend({},m,{responseXML:d}),c(m)):g&&g(m.responseText?"Invalid XML":a)}}var j=document,d=window,h=navigator,b=e.utils=function(){};b.exists=function(b){switch(typeof b){case "string":return 0g||g>d)}else d=void 0;if(d)return m;d=a.substring(0,a.indexOf("://")+3);var g=a.substring(d.length,a.indexOf("/",d.length+1)),c;0===m.indexOf("/")?c=m.split("/"):(c=a.split("?")[0],c=c.substring(d.length+g.length+1,c.lastIndexOf("/")),c=c.split("/").concat(m.split("/")));for(var f=[],n=0;nc&&0>d&&(!a||!isNaN(a))?q.CDN:q.RELATIVE}};b.getPluginName=function(b){return b.replace(/^(.*\/)?([^-]*)-?.*\.(swf|js)$/,"$2")};b.getPluginVersion=function(b){return b.replace(/[^-]*-?([^\.]*).*$/,"$1")}; b.isYouTube=function(b){return/^(http|\/\/).*(youtube\.com|youtu\.be)\/.+/.test(b)};b.youTubeID=function(b){try{return/v[=\/]([^?&]*)|youtu\.be\/([^?]*)|^([\w-]*)$/i.exec(b).slice(1).join("").replace("?","")}catch(a){return""}};b.isRtmp=function(b,a){return 0==b.indexOf("rtmp")||"rtmp"==a};b.foreach=function(a,c){var d,g;for(d in a)"function"==b.typeOf(a.hasOwnProperty)?a.hasOwnProperty(d)&&(g=a[d],c(d,g)):(g=a[d],c(d,g))};b.isHTTPS=function(){return 0==d.location.href.indexOf("https")};b.repo=function(){var a= "/http://www.atrintc.com/Tools/media/jwplayer/"+e.version.split(/\W/).splice(0,2).join("/")+"/";try{b.isHTTPS()&&(a=a.replace("http://","/https://ssl."))}catch(c){}return a};b.ajax=function(a,c,h){var g;0=h.length&&(h[1]=0);for(var b=a.strToLongs(f.encode(d).slice(0,16)),c= h.length,e=h[c-1],m=h[0],p,l=Math.floor(6+52/c),g=0;0>>2&3;for(var r=0;r>>5^m<<2)+(m>>>3^e<<4)^(g^m)+(b[r&3^p]^e),e=h[r]+=e}h=a.longsToStr(h);return k.encode(h)};a.decrypt=function(j,d){if(0==j.length)return"";for(var h=a.strToLongs(k.decode(j)),b=a.strToLongs(f.encode(d).slice(0,16)),c=h.length,e=h[c-1],m=h[0],p,l=2654435769*Math.floor(6+52/c);0!=l;){p=l>>>2&3;for(var g=c-1;0<=g;g--)e=h[0>>5^m<<2)+(m>>>3^e<<4)^(l^m)+(b[g&3^p]^e), m=h[g]-=e;l-=2654435769}h=a.longsToStr(h);h=h.replace(/\0+$/,"");return f.decode(h)};a.strToLongs=function(a){for(var d=Array(Math.ceil(a.length/4)),f=0;f>>8&255,a[f]>>>16&255,a[f]>>>24&255);return d.join("")};var k={code:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\x3d", encode:function(a,d){var h,b,c,e,m=[],p="",l,g,r=k.code;g=("undefined"==typeof d?0:d)?f.encode(a):a;l=g.length%3;if(0l++;)p+="\x3d",g+="\x00";for(l=0;l>18&63,b=e>>12&63,c=e>>6&63,e&=63,m[l/3]=r.charAt(h)+r.charAt(b)+r.charAt(c)+r.charAt(e);m=m.join("");return m=m.slice(0,m.length-p.length)+p},decode:function(a,d){d="undefined"==typeof d?!1:d;var h,b,c,e,m,p=[],l,g=k.code;l=d?f.decode(a):a;for(var r= 0;r>>16&255,b=c>>>8&255,c&=255,p[r/4]=String.fromCharCode(h,b,c),64==m&&(p[r/4]=String.fromCharCode(h,b)),64==e&&(p[r/4]=String.fromCharCode(h));e=p.join("");return d?f.decode(e):e}},f={encode:function(a){a=a.replace(/[\u0080-\u07ff]/g,function(a){a=a.charCodeAt(0);return String.fromCharCode(192|a>>6,128|a&63)});return a=a.replace(/[\u0800-\uffff]/g,function(a){a= a.charCodeAt(0);return String.fromCharCode(224|a>>12,128|a>>6&63,128|a&63)})},decode:function(a){a=a.replace(/[\u00e0-\u00ef][\u0080-\u00bf][\u0080-\u00bf]/g,function(a){a=(a.charCodeAt(0)&15)<<12|(a.charCodeAt(1)&63)<<6|a.charCodeAt(2)&63;return String.fromCharCode(a)});return a=a.replace(/[\u00c0-\u00df][\u0080-\u00bf]/g,function(a){a=(a.charCodeAt(0)&31)<<6|a.charCodeAt(1)&63;return String.fromCharCode(a)})}}}(jwplayer.utils),function(e){e.events={COMPLETE:"COMPLETE",ERROR:"ERROR",API_READY:"jwplayerAPIReady", JWPLAYER_READY:"jwplayerReady",JWPLAYER_FULLSCREEN:"jwplayerFullscreen",JWPLAYER_RESIZE:"jwplayerResize",JWPLAYER_ERROR:"jwplayerError",JWPLAYER_SETUP_ERROR:"jwplayerSetupError",JWPLAYER_MEDIA_BEFOREPLAY:"jwplayerMediaBeforePlay",JWPLAYER_MEDIA_BEFORECOMPLETE:"jwplayerMediaBeforeComplete",JWPLAYER_COMPONENT_SHOW:"jwplayerComponentShow",JWPLAYER_COMPONENT_HIDE:"jwplayerComponentHide",JWPLAYER_MEDIA_BUFFER:"jwplayerMediaBuffer",JWPLAYER_MEDIA_BUFFER_FULL:"jwplayerMediaBufferFull",JWPLAYER_MEDIA_ERROR:"jwplayerMediaError", JWPLAYER_MEDIA_LOADED:"jwplayerMediaLoaded",JWPLAYER_MEDIA_COMPLETE:"jwplayerMediaComplete",JWPLAYER_MEDIA_SEEK:"jwplayerMediaSeek",JWPLAYER_MEDIA_TIME:"jwplayerMediaTime",JWPLAYER_MEDIA_VOLUME:"jwplayerMediaVolume",JWPLAYER_MEDIA_META:"jwplayerMediaMeta",JWPLAYER_MEDIA_MUTE:"jwplayerMediaMute",JWPLAYER_MEDIA_LEVELS:"jwplayerMediaLevels",JWPLAYER_MEDIA_LEVEL_CHANGED:"jwplayerMediaLevelChanged",JWPLAYER_CAPTIONS_CHANGED:"jwplayerCaptionsChanged",JWPLAYER_CAPTIONS_LIST:"jwplayerCaptionsList",JWPLAYER_PLAYER_STATE:"jwplayerPlayerState", state:{BUFFERING:"BUFFERING",IDLE:"IDLE",PAUSED:"PAUSED",PLAYING:"PLAYING"},JWPLAYER_PLAYLIST_LOADED:"jwplayerPlaylistLoaded",JWPLAYER_PLAYLIST_ITEM:"jwplayerPlaylistItem",JWPLAYER_PLAYLIST_COMPLETE:"jwplayerPlaylistComplete",JWPLAYER_DISPLAY_CLICK:"jwplayerViewClick",JWPLAYER_CONTROLS:"jwplayerViewControls",JWPLAYER_USER_ACTION:"jwplayerUserAction",JWPLAYER_INSTREAM_CLICK:"jwplayerInstreamClicked",JWPLAYER_INSTREAM_DESTROYED:"jwplayerInstreamDestroyed",JWPLAYER_AD_TIME:"jwplayerAdTime",JWPLAYER_AD_ERROR:"jwplayerAdError", JWPLAYER_AD_CLICK:"jwplayerAdClicked",JWPLAYER_AD_COMPLETE:"jwplayerAdComplete",JWPLAYER_AD_IMPRESSION:"jwplayerAdImpression",JWPLAYER_AD_COMPANIONS:"jwplayerAdCompanions",JWPLAYER_AD_SKIPPED:"jwplayerAdSkipped"}}(jwplayer),function(e){var a=jwplayer.utils;e.eventdispatcher=function(e,f){var j,d;this.resetEventListeners=function(){j={};d=[]};this.resetEventListeners();this.addEventListener=function(d,b,c){try{a.exists(j[d])||(j[d]=[]),"string"==a.typeOf(b)&&(b=(new Function("return "+b))()),j[d].push({listener:b, count:c})}catch(f){a.log("error",f)}return!1};this.removeEventListener=function(d,b){if(j[d]){try{for(var c=0;cparseFloat(e.version)))m=!0,p="Incompatible player version",h()});0==b&&h()}}var c=a.loaderstatus.NEW,q=!1,m=!1,p,l=d,g=new k.eventdispatcher;a.extend(this,g);this.setupPlugins=function(b,c,d){var g={length:0, plugins:{}},e=0,h={},m=j.getPlugins();f(c.plugins,function(f,j){var k=a.getPluginName(f),l=m[k],q=l.getFlashPath(),r=l.getJS(),p=l.getURL();q&&(g.plugins[q]=a.extend({},j),g.plugins[q].pluginmode=l.getPluginmode(),g.length++);try{if(r&&c.plugins&&c.plugins[p]){var A=document.createElement("div");A.id=b.id+"_"+k;A.style.position="absolute";A.style.top=0;A.style.zIndex=e+10;h[k]=l.getNewInstance(b,a.extend({},c.plugins[p]),A);e++;b.onReady(d(h[k],A,!0));b.onResize(d(h[k],A))}}catch(F){a.log("ERROR: Failed to load "+ k+".")}});b.plugins=h;return g};this.load=function(){if(!(a.exists(d)&&"object"!=a.typeOf(d))){c=a.loaderstatus.LOADING;f(d,function(c){a.exists(c)&&(c=j.addPlugin(c),c.addEventListener(k.COMPLETE,b),c.addEventListener(k.ERROR,r))});var g=j.getPlugins();f(g,function(a,b){b.load()})}b()};var r=this.pluginFailed=function(){m||(m=!0,p="File not found",h())};this.getStatus=function(){return c}}}(jwplayer),function(){jwplayer.parsers={localName:function(e){return e?e.localName?e.localName:e.baseName?e.baseName: "":""},textContent:function(e){return e?e.textContent?jwplayer.utils.trim(e.textContent):e.text?jwplayer.utils.trim(e.text):"":""},getChildNode:function(e,a){return e.childNodes[a]},numChildren:function(e){return e.childNodes?e.childNodes.length:0}}}(jwplayer),function(e){var a=e.parsers;(a.jwparser=function(){}).parseEntry=function(k,f){for(var j=[],d=[],h=e.utils.xmlAttribute,b=0;bn.playlist.length&&(0==n.playlist.length||!n.playlist[0].sources||0==n.playlist[0].sources.length))g();else if(!C)if("string"==k.typeOf(n.playlist)){var a=new e.playlist.loader;a.addEventListener(f.JWPLAYER_PLAYLIST_LOADED,function(a){n.playlist=a.playlist;C=d;m()}); a.addEventListener(f.JWPLAYER_ERROR,function(a){C=d;g(a)});C=j;a.load(n.playlist)}else if(w.getStatus()==k.loaderstatus.COMPLETE){for(a=0;a=h||0>=b?0:100*(b/h)+"%")}-1==d.width.toString().indexOf("%")?delete d.aspectratio:h?d.aspectratio=h:delete d.aspectratio;return d}).addConfig=function(d,e){a(e);return f.extend(d,e)}}(jwplayer),function(e){var a=e.utils,k=document;e.embed.download=function(f,e,d){function h(b,c){for(var d=k.querySelectorAll(b),f=0;fr)return g.sendEvent(k.ERROR,{message:"Flash version must be 10.0 or greater"}),!1;var e,n,j=q.config.listbar,t=a.extend({}, b);if(d.id+"_wrapper"==d.parentNode.id)e=document.getElementById(d.id+"_wrapper");else{e=document.createElement("div");n=document.createElement("div");n.style.display="none";n.id=d.id+"_aspect";e.id=d.id+"_wrapper";e.style.position="relative";e.style.display="block";e.style.width=a.styleDimension(t.width);e.style.height=a.styleDimension(t.height);if(q.config.aspectratio){var x=parseFloat(q.config.aspectratio);n.style.display="block";n.style.marginTop=q.config.aspectratio;e.style.height="auto";e.style.display= "inline-block";j&&("bottom"==j.position?n.style.paddingBottom=j.size+"px":"right"==j.position&&(n.style.marginBottom=-1*j.size*(x/100)+"px"))}d.parentNode.replaceChild(e,d);e.appendChild(d);e.appendChild(n)}e=c.setupPlugins(q,t,p);0=t.height?"transparent":"opaque";n="height width modes events primary base fallback volume".split(" "); for(j=0;jd?"0":"")+d+":"+(10>a?"0":"")+a}return"00:00"};f.bounds=function(a){var c={left:0,right:0,width:0,height:0,top:0,bottom:0};if(!a||!g.body.contains(a))return c;if(a.getBoundingClientRect){a=a.getBoundingClientRect(a); var d=window.pageYOffset,b=window.pageXOffset;if(!a.width&&!a.height&&!a.left&&!a.top)return c;c.left=a.left+b;c.right=a.right+b;c.top=a.top+d;c.bottom=a.bottom+d;c.width=a.right-a.left;c.height=a.bottom-a.top}else{c.width=a.offsetWidth|0;c.height=a.offsetHeight|0;do c.left+=a.offsetLeft|0,c.top+=a.offsetTop|0;while(a=a.offsetParent);c.right=c.left+c.width;c.bottom=c.top+c.height}return c};f.empty=function(a){if(a)for(;0d.indexOf("url")?"url("+d+")":d+j;else switch(a){case "z-index":case "opacity":b=d+j;break a;default:b=a.match(/color/i)?"#"+f.pad(d.toString(16).replace(/^0x/i,""),6)+j:0===d?0+j:Math.ceil(d)+"px"+j}}}l(e[c][a])&&!l(b)?delete e[c][a]:l(b)&&(e[c][a]=b)}); 0h?(e*=l,k*=l):(e*=h,k*=h);case g.NONE:l=h=1;case g.EXACTFIT:w=!0;break;default:l>h?0.95=x.length||(x[t].data?u.populate(x[t].data):(D=a=x[t].file,g.ajax(a,z,j)),p(!1))}function I(){var a=[];a.push({label:"Off"});for(var b=0;b=n)){a=b;break}-1==a?d(""):a!=f&&(f=a,d(l[b].text))}function k(a,b){g(b, function(b,c){a.style[b]=c})}var l,h,m,f,n,z="visible",j;this.hide=function(){k(h,{display:"none"});j&&(clearInterval(j),j=null)};this.populate=function(a){f=-1;l=a;e()};this.resize=function(){b()};h=document.createElement("div");m=document.createElement("span");h.appendChild(m);c.appendChild(h);k(h,{display:"block",height:"auto",position:"absolute",bottom:"20px",textAlign:"center",width:"100%"});k(m,{color:"#"+a.color.substr(-6),display:"inline-block",fontFamily:a.fontFamily,fontStyle:a.fontStyle, fontWeight:a.fontWeight,height:"auto",margin:"auto",position:"relative",textAlign:"center",textDecoration:a.textDecoration,wordWrap:"break-word",width:"auto"});a.back?k(m,{background:"#000"}):k(m,{textShadow:"-2px 0px 1px #000,2px 0px 1px #000,0px -2px 1px #000,0px 2px 1px #000,-1px 1px 1px #000,1px 1px 1px #000,1px -1px 1px #000,1px 1px 1px #000"});this.show=function(){k(h,{display:"block"});j||(j=setInterval(b,250));b()};this.update=function(a){n=a;l&&e()}}})(jwplayer.html5); (function(f){var g=f.html5,a=f.utils,c=f.events,d=c.state,b=a.css,e=a.transitionStyle,k=a.isMobile(),l=a.isAndroid(4)&&!a.isChrome(),h="button",m="text",w="slider",n="none",z="100%",j={display:n},r={display:"block"},p={display:q},B=!1,A=!0,I=null,q=void 0,s=window,y=document;g.controlbar=function(e,E){function t(a,b,c){return{name:a,type:b,className:c}}function x(b){var c=B,d;b.duration==Number.POSITIVE_INFINITY||!b.duration&&a.isSafari()&&!k?$.setText(M.jwGetPlaylist()[M.jwGetPlaylistIndex()].title|| "Live broadcast"):(H.elapsed&&(d=a.timeFormat(b.position),H.elapsed.innerHTML=d,c=d.length!=a.timeFormat(Ja).length),H.duration&&(d=a.timeFormat(b.duration),H.duration.innerHTML=d,c=c||d.length!=a.timeFormat(ra).length),0ua.right?b.offsetX(ua.right-c.right):c.lefta&&(a=0);0.9 S.maxwidth;d=va?0:S.margin;b(v(),{left:c?"50%":d,right:c?q:d,"margin-left":c?K.clientWidth/-2:q,width:c?z:q});c=top!==self&&a.isIE();b(v(".jwfullscreen"),{display:va||ob||c?n:q});b(v(".jwvolumeH"),{display:va?"block":n});b(v(".jwhd"),{display:!va&&ia&&1e-ka?(s.jwSetFullscreen(),ka=void 0):ka=(new Date).getTime();var j=g.bounds(y.parentNode.querySelector(".jwcontrolbar")),f=g.bounds(y),e=j.left-10-f.left,h=j.left+30-f.left,k=f.bottom-40,m=f.bottom,u=j.right- 30-f.left,j=j.right+10-f.left;if(b&&!(d.x>=e&&d.x<=h&&d.y>=k&&d.y<=m)){if(d.x>=u&&d.x<=j&&d.y>=k&&d.y<=m){s.jwSetFullscreen();return}P.sendEvent(a.JWPLAYER_DISPLAY_CLICK);if(R)return}switch(s.jwGetState()){case c.PLAYING:case c.BUFFERING:s.jwPause();break;default:s.jwPlay()}}}function z(a,b){Z.showicons&&(a||b?(O.setRotation("buffer"==a?parseInt(Z.bufferrotation):0,parseInt(Z.bufferinterval)),O.setIcon(a),O.setText(b)):O.hide())}function j(a){x!=a?(x&&q(k,h),(x=a)?(a=new Image,a.addEventListener("load", B,h),a.src=x):(d("#"+y.id+" "+k,{"background-image":void 0}),q(k,h),C=F=0)):x&&!R&&q(k,l);p(s.jwGetState())}function r(a){clearTimeout(fa);fa=setTimeout(function(){p(a.newstate)},100)}function p(a){a=X?X:s?s.jwGetState():c.IDLE;if(a!=ba)switch(ba=a,O&&O.setRotation(0),a){case c.IDLE:!Q&&!J&&(x&&!D&&q(k,l),a=!0,s._model&&!1===s._model.config.displaytitle&&(a=!1),z("play",t&&a?t.title:""));break;case c.BUFFERING:Q=h;L.error&&L.error.setText();J=h;z("buffer");break;case c.PLAYING:z();break;case c.PAUSED:z("play")}} function B(){C=this.width;F=this.height;p(s.jwGetState());I();x&&d("#"+y.id+" "+k,{"background-image":"url("+x+")"})}function A(a){Q=l;z("error",a.message)}function I(){0=L)clearInterval(D);else{L--;var c=Math.max(C.width,g.bounds(s).width-u.width-y.width);(g.isFF()||g.isIE())&&c++;g.isChrome()&&1==s.parentNode.clientWidth%2&&c++;a(w(),{"background-size":[y.width+b,c+b,u.width+b].join()},!0)}}function B(){v=(v+J)%360;g.rotate(x,v)}var A=l,I=A.skin,q=f,s,y,u,E,t,x,C,F=0,D,L;this.element=function(){return s};this.setText=function(a){var b=t.style;t.innerHTML=a?a.replace(":",":\x3cbr\x3e"):"";b.height="0";b.display= "block";if(a)for(;2d.left&&b.offsetX(e.left-d.left+8);n.show();g.foreach(s, function(a,b){a!=j&&b.hide()})},!1);k.addEventListener("mouseout",function(){p=setTimeout(n.hide,100)},!1);y.appendChild(n.element());s[j]=n}}I++;r()}};t.removeButton=function(a){if(q[a]){u.removeChild(q[a].element);u.removeChild(q[a].divider);var b=document.getElementById(""+B+"_"+a+"_tooltip");b&&y.removeChild(b);delete q[a];I--;r()}};t.numButtons=function(){return I};t.visible=!1;y=z("div","jwdock");u=z("div","jwdockbuttons");y.appendChild(u);y.id=B;var x=j("button"),C=j("buttonOver"),F=j("buttonActive"); x&&(a(n(),{height:x.height,padding:p.margin}),a(d,{height:x.height}),a(n("button"),g.extend(m(x),{width:x.width,cursor:"pointer",border:e})),a(n("button:hover"),m(C)),a(n("button:active"),m(F)),a(n("button\x3ediv"),{opacity:p.iconalpha}),a(n("button:hover\x3ediv"),{opacity:p.iconalphaover}),a(n("button:active\x3ediv"),{opacity:p.iconalphaactive}),a(n(".jwoverlay"),{top:p.margin+x.height}),w("capLeft",u),w("capRight",u),w("divider"));setTimeout(function(){c(y)})};a(".jwdock",{opacity:0,display:e}); a(".jwdock \x3e *",{height:"100%","float":"left"});a(".jwdock \x3e .jwoverlay",{height:"auto","float":e,"z-index":99});a(d+" button",{position:"relative"});a(d+" \x3e *",{height:"100%","float":"left"});a(d+" .divider",{display:e});a(d+" button ~ .divider",{display:k});a(d+" .capLeft, "+d+" .capRight",{display:e});a(d+" .capRight",{"float":"right"});a(d+" button \x3e div",{left:0,right:0,top:0,bottom:0,margin:5,position:"absolute","background-position":"center","background-repeat":"no-repeat"});g.transitionStyle(".jwdock", "background .25s, opacity .25s");g.transitionStyle(".jwdock .jwoverlay","opacity .25s");g.transitionStyle(d+" button div","opacity .25s")})(jwplayer.html5); (function(f){var g=jwplayer,a=g.utils,c=g.events,d=c.state,b=g.playlist;f.instream=function(e,g,l,h){function m(b){b.type==c.JWPLAYER_MEDIA_ERROR&&(b=a.extend({},b),b.type=c.JWPLAYER_ERROR);p(b.type,b);R=!0;v.jwInstreamDestroy(!1)}function w(){v.jwInstreamDestroy(!0)}function n(a){D&&p(a.type,a)}function z(){D&&x.play()}function j(){D&&setTimeout(function(){v.jwInstreamDestroy(!0)},10)}function r(a){a.width&&a.height&&s.resizeMedia()}function p(a,b,c){if(D||c)b=b||{},A.tag&&!b.tag&&(b.tag=A.tag), L.sendEvent(a,b)}function B(){C&&C.redraw();F&&F.redraw()}var A={controlbarseekable:"never",controlbarpausable:!0,controlbarstoppable:!0,playlistclickable:!0,skipoffset:-1,tag:null},I,q,s=l,y,u,E,t,x,C,F,D=!1,L,Q,J,v=this,R=!1,N=!0;v.load=function(l,L){a.isAndroid(2.3)?m({type:c.JWPLAYER_ERROR,message:"Error loading instream: Cannot play instream on Android 2.3"}):(R=!1,D=!0,q=a.extend(A,L),I=new b.item(l),Q=document.createElement("div"),Q.id=v.id+"_instream_container",y=h.detachMedia(),x=new f.video(y), x.addGlobalListener(n),x.addEventListener(c.JWPLAYER_MEDIA_META,r),x.addEventListener(c.JWPLAYER_MEDIA_COMPLETE,j),x.addEventListener(c.JWPLAYER_MEDIA_BUFFER_FULL,z),x.addEventListener(c.JWPLAYER_MEDIA_ERROR,m),x.attachMedia(),x.mute(g.mute),x.volume(g.volume),J=new f.model({},x),J.setVolume(g.volume),J.setMute(g.mute),J.addEventListener(c.JWPLAYER_ERROR,m),s.addEventListener(c.JWPLAYER_AD_SKIPPED,w),t=g.playlist[g.item],E=g.getVideo().checkComplete()?d.IDLE:e.jwGetState(),h.checkBeforePlay()&&(E= d.PLAYING,N=!1),u=y.currentTime,J.setPlaylist([l]),R||((E==d.BUFFERING||E==d.PLAYING)&&y.pause(),F=new f.display(v),F.setAlternateClickHandler(function(a){e.jwGetControls()?(J.state==d.PAUSED?v.jwInstreamPlay():v.jwInstreamPause(),a.hasControls=!0):a.hasControls=!1;p(c.JWPLAYER_INSTREAM_CLICK,a)}),a.isIE()&&y.parentElement.addEventListener("click",F.clickHandler),Q.appendChild(F.element()),C=new f.controlbar(v),Q.appendChild(C.element()),C.show(),e.jwGetControls()?(C.show(),F.show()):(C.hide(),F.hide()), s.setupInstream(Q,C,F,A.skipoffset),B(),x.load(J.playlist[0])))};v.jwInstreamDestroy=function(a){if(D){D=!1;E!=d.IDLE?x.load(t,!1):x.stop();L.resetEventListeners();R||F.revertAlternateClickHandler();x.detachMedia();s.destroyInstream();if(C)try{C.element().parentNode.removeChild(C.getDisplayElement())}catch(b){}p(c.JWPLAYER_INSTREAM_DESTROYED,{reason:a?"complete":"destroyed"},!0);h.attachMedia();if(E==d.BUFFERING||E==d.PLAYING)y.play(),g.playlist[g.item]==t&&N&&g.getVideo().seek(u)}};v.jwInstreamAddEventListener= function(a,b){L.addEventListener(a,b)};v.jwInstreamRemoveEventListener=function(a,b){L.removeEventListener(a,b)};v.jwInstreamPlay=function(){D&&(x.play(!0),g.state=jwplayer.events.state.PLAYING,F.show())};v.jwInstreamPause=function(){D&&(x.pause(!0),g.state=jwplayer.events.state.PAUSED,e.jwGetControls()&&F.show())};v.jwInstreamSeek=function(a){D&&x.seek(a)};v.jwInstreamSetText=function(a){C.setText(a)};v.jwInstreamUpdateSkipTime=function(a,b){s.updateSkipTime(a,b)};v.jwInstreamState=function(){if(D)return g.state}; v.jwPlay=function(){"true"==q.controlbarpausable.toString().toLowerCase()&&v.jwInstreamPlay()};v.jwPause=function(){"true"==q.controlbarpausable.toString().toLowerCase()&&v.jwInstreamPause()};v.jwStop=function(){"true"==q.controlbarstoppable.toString().toLowerCase()&&(v.jwInstreamDestroy(),e.jwStop())};v.jwSeek=function(a){switch(q.controlbarseekable.toLowerCase()){case "always":v.jwInstreamSeek(a);break;case "backwards":J.position>a&&v.jwInstreamSeek(a)}};v.jwSeekDrag=function(a){J.seekDrag(a)}; v.jwGetPosition=function(){};v.jwGetDuration=function(){};v.jwGetWidth=e.jwGetWidth;v.jwGetHeight=e.jwGetHeight;v.jwGetFullscreen=e.jwGetFullscreen;v.jwSetFullscreen=e.jwSetFullscreen;v.jwGetVolume=function(){return g.volume};v.jwSetVolume=function(a){J.setVolume(a);e.jwSetVolume(a)};v.jwGetMute=function(){return g.mute};v.jwSetMute=function(a){J.setMute(a);e.jwSetMute(a)};v.jwGetState=function(){return J.state};v.jwGetPlaylist=function(){return[I]};v.jwGetPlaylistIndex=function(){return 0};v.jwGetStretching= function(){return g.config.stretching};v.jwAddEventListener=function(a,b){L.addEventListener(a,b)};v.jwRemoveEventListener=function(a,b){L.removeEventListener(a,b)};v.jwSetCurrentQuality=function(){};v.jwGetQualityLevels=function(){return[]};v.skin=e.skin;v.id=e.id+"_instream";L=new c.eventdispatcher;e.jwAddEventListener(c.JWPLAYER_RESIZE,B);e.jwAddEventListener(c.JWPLAYER_FULLSCREEN,function(b){n(b);B();a.isIPad()&&(!b.fullscreen&&J.state==jwplayer.events.state.PAUSED)&&F.show(!0);a.isIPad()&&(!b.fullscreen&& J.state==jwplayer.events.state.PLAYING)&&F.hide()});return v}})(jwplayer.html5); (function(f){var g=f.utils,a=g.css,c=f.events.state,d=f.html5.logo=function(b,e){function k(a){g.exists(a)&&a.stopPropagation&&a.stopPropagation();if(!z||!m.link)l.jwGetState()==c.IDLE||l.jwGetState()==c.PAUSED?l.jwPlay():l.jwPause();z&&m.link&&(l.jwPause(),l.jwSetFullscreen(!1),window.open(m.link,m.linktarget))}var l=b,h=l.id+"_logo",m,w,n=d.defaults,z=!1;this.resize=function(){};this.element=function(){return w};this.offset=function(b){a("#"+h+" ",{"margin-bottom":b})};this.position=function(){return m.position}; this.margin=function(){return parseInt(m.margin)};this.hide=function(a){if(m.hide||a)z=!1,w.style.visibility="hidden",w.style.opacity=0};this.show=function(){z=!0;w.style.visibility="visible";w.style.opacity=1};var j="o";l.edition&&(j=l.edition(),j="pro"==j?"p":"premium"==j?"r":"ads"==j?"a":"free"==j?"f":"o");if("o"==j||"f"==j)n.link="/http://www.longtailvideo.com/jwpabout/?a\x3dl\x26v\x3d"+f.version+"\x26m\x3dh\x26e\x3d"+j;m=g.extend({},n,e);m.hide="true"==m.hide.toString();w=document.createElement("img"); w.className="jwlogo";w.id=h;if(m.file){var n=/(\w+)-(\w+)/.exec(m.position),j={},r=m.margin;3==n.length?(j[n[1]]=r,j[n[2]]=r):j.top=j.right=r;a("#"+h+" ",j);w.src=(m.prefix?m.prefix:"")+m.file;g.isMobile()?(new g.touch(w)).addEventListener(g.touchEvents.TAP,k):w.onclick=k}else w.style.display="none";return this};d.defaults={prefix:g.repo(),file:"logo.png",linktarget:"_top",margin:8,hide:!1,position:"top-right"};a(".jwlogo",{cursor:"pointer",position:"absolute","z-index":100,opacity:0});g.transitionStyle(".jwlogo", "visibility .25s, opacity .25s")})(jwplayer); (function(f){var g=f.html5,a=f.utils,c=a.css,d=void 0;g.menu=function(b,e,f,l){function h(a){return!a||!a.src?{}:{background:"url("+a.src+") no-repeat left","background-size":a.width+"px "+a.height+"px"}}function m(a,b){return function(){B(a);z&&z(b)}}function w(a,b){var c=document.createElement("div");a&&(c.className=a);b&&b.appendChild(c);return c}function n(a){return(a=f.getSkinElement("tooltip",a))?a:{width:0,height:0,src:d}}var z=l,j=new g.overlay(e+"_overlay",f);l=a.extend({fontcase:d,fontcolor:"#cccccc", fontsize:11,fontweight:d,activecolor:"#ffffff",overcolor:"#ffffff"},f.getComponentSettings("tooltip"));var r,p=[];this.element=function(){return j.element()};this.addOption=function(b,c){var d=w("jwoption",r);d.id=e+"_option_"+c;d.innerHTML=b;a.isMobile()?(new a.touch(d)).addEventListener(a.touchEvents.TAP,m(p.length,c)):d.addEventListener("click",m(p.length,c));p.push(d)};this.clearOptions=function(){for(;0b?(b=0,c=!0):b=-1==b||b>e.playlist.length?e.playlist.length- 1:b;if(c||b!=e.item)e.item=b,e.sendEvent(a.JWPLAYER_PLAYLIST_ITEM,{index:e.item})};e.setVolume=function(c){e.mute&&0a&&(a=0);1parseFloat(jwplayer.version))&&r("Incompatible player version"); if(0===a.length)j(z);else for(c=0;ch[b].end;)b++;b==h.length&&b--;if(h[b].text)if(a=h[b].text,0>a.indexOf("://")&&(a=m?m+"/"+a:a),0F)&&fa(F);h()}},emptied:l, ended:function(){N&&L!=c.IDLE&&(X=-1,Y=d,f(a.JWPLAYER_MEDIA_BEFORECOMPLETE),N&&(B(c.IDLE),Y=b,f(a.JWPLAYER_MEDIA_COMPLETE)))},error:function(){N&&(g.log("Error playing media: %o",u.error),R.sendEvent(a.JWPLAYER_MEDIA_ERROR,{message:"Error loading media: File could not be played"}),B(c.IDLE))},loadeddata:l,loadedmetadata:m,loadstart:l,pause:z,play:z,playing:z,progress:w,ratechange:l,readystatechange:l,seeked:function(){!D&&L!=c.PAUSED&&B(c.PLAYING)},seeking:I?j:l,stalled:l,suspend:l,timeupdate:h,volumechange:function(){f(a.JWPLAYER_MEDIA_VOLUME, {volume:Math.round(100*u.volume)});f(a.JWPLAYER_MEDIA_MUTE,{mute:u.muted})},waiting:j},s,y,u,E,t,x,C,F,D=b,L=c.IDLE,Q,J=-1,v=-1,R=new a.eventdispatcher,N=b,O,X=-1,ba=g.isAndroid(b,d),Z=g.isIOS(7),P=this,Y=b;g.extend(P,R);P.load=function(b){if(N){s=b;F=0;E=b.duration?b.duration:-1;t=0;O=s.sources;0>X&&(X=0);for(b=0;bb)&&(X=b,g.saveCookie("qualityLabel",O[b].label),f(a.JWPLAYER_MEDIA_LEVEL_CHANGED, {currentQuality:b,levels:r(O)}),b=u.currentTime,p(),P.seek(b)))};P.getCurrentQuality=function(){return X};P.getQualityLevels=function(){return r(O)};e||(e=document.createElement("video"));u=e;g.foreach(q,function(a,c){u.addEventListener(a,c,b)});Z||(u.controls=d,u.controls=b);u.setAttribute("x-webkit-airplay","allow");N=d}})(jwplayer); (function(f){var g=jwplayer.utils,a=jwplayer.events,c=a.state,d=g.css,b=g.isMobile(),e=g.isIPad(),k=g.isIPod(),l=g.isAndroid(),h=g.isIOS(),m=document,w="aspectMode",n="jwmain",z="jwvideo",j="jwplaylistcontainer",r=!0,p=!1,B="hidden",A="none",I="block",q=115,s=65;f.view=function(y,u){function E(a){a&&(a.element().addEventListener("mousemove",F,p),a.element().addEventListener("mouseout",D,p))}function t(a,b){var c=m.createElement(a);b&&(c.className=b);return c}function x(){clearTimeout(qa);qa=setTimeout(fa, Qa)}function C(){clearTimeout(qa);if(W.jwGetState()==c.PAUSED||W.jwGetState()==c.PLAYING)ga(),ja||(qa=setTimeout(fa,Qa))}function F(){clearTimeout(qa);ja=r}function D(){ja=p}function L(a){na.sendEvent(a.type,a)}function Q(b,c,e){g.exists(e)||(e=r);g.exists(b)&&g.exists(c)&&(G.width=b,G.height=c);T.style.width=isNaN(b)?b:b+"px";-1==T.className.indexOf(w)&&(T.style.height=isNaN(c)?c:c+"px");ca&&ca.redraw();U&&U.redraw(r);S&&(S.offset(U&&0<=S.position().indexOf("bottom")?U.height()+U.margin():0),setTimeout(function(){da&& da.offset("top-left"==S.position()?S.element().clientWidth+S.margin():0)},500));b=G.playlistsize;var f=G.playlistposition;J(c);if(Aa&&b&&("right"==f||"bottom"==f)){Aa.redraw();c={display:I};var h={};c[f]=0;h[f]=b;"right"==f?c.width=b:c.height=b;d(wa(j),c);d(wa(n),h)}v();e&&na.sendEvent(a.JWPLAYER_RESIZE)}function J(a){var b=g.bounds(T);K=0=b.height;U&&(K?(U.audioMode(r),ga(),ca.hidePreview(r),ca&& ca.hide(),la(p)):(U.audioMode(p),Ya(W.jwGetState())));S&&K&&Y();T.style.backgroundColor=K?"transparent":"#000"}function v(){ea&&-1==T.className.indexOf(w)&&g.stretch(G.stretching,ea,xa.clientWidth,xa.clientHeight,ea.videoWidth,ea.videoHeight)}function R(a){if(G.fullscreen)switch(a.keyCode){case 27:ua(p)}}function N(a){h||(a?(T.className+=" jwfullscreen",m.getElementsByTagName("body")[0].style["overflow-y"]=B):(T.className=T.className.replace(/\s+jwfullscreen/,""),m.getElementsByTagName("body")[0].style["overflow-y"]= ""))}function O(){var a;a=m.mozFullScreenElement||m.webkitCurrentFullScreenElement||m.msFullscreenElement||ea.webkitDisplayingFullscreen;a=!(!a||a.id&&a.id!=W.id);G.fullscreen!=a&&ua(a)}function X(){U&&(!K&&!G.getVideo().audioMode())&&U.hide()}function ba(){da&&(!K&&G.controls)&&da.show()}function Z(){da&&(!Ja&&!G.getVideo().audioMode())&&da.hide()}function P(){S&&!K&&S.show()}function Y(){S&&!G.getVideo().audioMode()&&S.hide(K)}function ka(){ca&&G.controls&&!K&&(!k||W.jwGetState()==c.IDLE)&&ca.show(); if(!b||!G.fullscreen)ea.controls=p}function fa(){clearTimeout(qa);qa=0;ra=p;var a=W.jwGetState();(!u.controls||a!=c.PAUSED)&&X();u.controls||Z();a!=c.IDLE&&a!=c.PAUSED&&(Z(),Y())}function ga(){ra=r;if((G.controls||K)&&!(k&&La==c.PAUSED))(!k||K)&&U&&U.show(),ba();Ia.hide&&P()}function la(a){(a=a&&!K)||l?d(wa(z),{visibility:"visible",opacity:1}):d(wa(z),{visibility:B,opacity:0})}function fb(){Ja=r;ua(p);G.controls&&ba()}function gb(){}function Ga(a){Ja=p;clearTimeout(Ha);Ha=setTimeout(function(){Ya(a.newstate)}, 100)}function nb(){X()}function Ya(a){La=a;switch(a){case c.PLAYING:G.getVideo().audioMode()?(la(p),ca.hidePreview(K),ca.setHiding(r),U&&(ga(),U.hideFullscreen(r)),ba(),P()):(la(r),v(),ca.hidePreview(r),U&&U.hideFullscreen(p),fa());break;case c.IDLE:la(p);K||(ca.hidePreview(p),ka(),ba(),P(),U&&U.hideFullscreen(p));break;case c.BUFFERING:ka();fa();b&&la(r);break;case c.PAUSED:ka(),ga()}}function wa(a){return"#"+W.id+(a?" ."+a:"")}function jb(a){var b=ha.getContext("2d");b.clearRect(0,0,q,s);b.fillStyle= "black";b.globalAlpha=0.5;b.fillRect(0,0,q,s);b.globalAlpha=1;b.strokeStyle="white";b.strokeRect(0,0,q,s);b.font="13px Arial";b.fillStyle="white";var c=ha.width/2,d=ha.height/2;b.textAlign="center";b.fillText("Skip ad in "+a,c,d+6)}function Oa(){na.sendEvent(a.JWPLAYER_AD_SKIPPED,{tag:Ta})}function Na(a,b){d(a,{display:b?I:A})}var W=y,G=u,T,za,ya,mb,Pa,qa=0,Qa=b?4E3:2E3,ea,xa,Sa,Da,aa,ha,V,cb,Ea=p,M=p,U,ca,da,S,Ia=g.extend({},G.componentConfig("logo")),H,Aa,K,ma=p,ra=p,Ja,ia,Ka,ja=p,La,Ta,na=new a.eventdispatcher; g.extend(this,na);this.getCurrentCaptions=function(){return H.getCurrentCaptions()};this.setCurrentCaptions=function(a){H.setCurrentCaptions(a)};this.getCaptionsList=function(){return H.getCaptionsList()};this.setup=function(e){if(!ma){W.skin=e;za=t("span",n);xa=t("span",z);ea=G.getVideo().getTag();xa.appendChild(ea);ya=t("span","jwcontrols");Da=t("span","jwinstream");Pa=t("span",j);mb=t("span","jwaspect");e=G.height;var h=G.componentConfig("controlbar"),l=G.componentConfig("display");J(e);H=new f.captions(W, G.captions);H.addEventListener(a.JWPLAYER_CAPTIONS_LIST,L);H.addEventListener(a.JWPLAYER_CAPTIONS_CHANGED,L);ya.appendChild(H.element());ca=new f.display(W,l);ca.addEventListener(a.JWPLAYER_DISPLAY_CLICK,function(a){L(a);b?ra?fa():ga():Ga(W.jwGetState());ra&&(clearTimeout(qa),qa=setTimeout(fa,Qa))});K&&ca.hidePreview(r);ya.appendChild(ca.element());S=new f.logo(W,Ia);ya.appendChild(S.element());da=new f.dock(W,G.componentConfig("dock"));ya.appendChild(da.element());W.edition&&!b?ia=new f.rightclick(W, {abouttext:G.abouttext,aboutlink:G.aboutlink}):b||(ia=new f.rightclick(W,{}));G.playlistsize&&(G.playlistposition&&G.playlistposition!=A)&&(Aa=new f.playlistcomponent(W,{}),Pa.appendChild(Aa.element()));U=new f.controlbar(W,h);U.addEventListener(a.JWPLAYER_USER_ACTION,x);ya.appendChild(U.element());k&&X();setTimeout(function(){Q(G.width,G.height,p)},0);za.appendChild(xa);za.appendChild(ya);za.appendChild(Da);T.appendChild(za);T.appendChild(mb);T.appendChild(Pa);m.addEventListener("webkitfullscreenchange", O,p);ea.addEventListener("webkitbeginfullscreen",O,p);ea.addEventListener("webkitendfullscreen",O,p);m.addEventListener("mozfullscreenchange",O,p);m.addEventListener("MSFullscreenChange",O,p);m.addEventListener("keydown",R,p);W.jwAddEventListener(a.JWPLAYER_PLAYER_READY,gb);W.jwAddEventListener(a.JWPLAYER_PLAYER_STATE,Ga);W.jwAddEventListener(a.JWPLAYER_MEDIA_ERROR,nb);W.jwAddEventListener(a.JWPLAYER_PLAYLIST_COMPLETE,fb);Ga({newstate:c.IDLE});b||(ya.addEventListener("mouseout",function(){clearTimeout(qa); qa=setTimeout(fa,10)},p),ya.addEventListener("mousemove",C,p),g.isIE()&&(xa.addEventListener("mousemove",C,p),xa.addEventListener("click",ca.clickHandler)));E(U);E(da);E(S);d("#"+T.id+"."+w+" .jwaspect",{"margin-top":G.aspectratio,display:I});e=g.exists(G.aspectratio)?parseFloat(G.aspectratio):100;h=G.playlistsize;d("#"+T.id+".playlist-right .jwaspect",{"margin-bottom":-1*h*(e/100)+"px"});d("#"+T.id+".playlist-right ."+j,{width:h+"px",right:0,top:0,height:"100%"});d("#"+T.id+".playlist-bottom .jwaspect", {"padding-bottom":h+"px"});d("#"+T.id+".playlist-bottom ."+j,{width:"100%",height:h+"px",bottom:0});d("#"+T.id+".playlist-right ."+n,{right:h+"px"});d("#"+T.id+".playlist-bottom ."+n,{bottom:h+"px"})}};var ua=this.fullscreen=function(d){g.exists(d)||(d=!G.fullscreen);if(d){if(G.getVideo().audioMode())return;b?(ea.webkitEnterFullScreen(),G.setFullscreen(r)):G.fullscreen||(N(r),T.requestFullScreen?T.requestFullScreen():T.mozRequestFullScreen?T.mozRequestFullScreen():T.webkitRequestFullScreen?T.webkitRequestFullScreen(): T.msRequestFullscreen&&T.msRequestFullscreen(),G.setFullscreen(r))}else b?(ea.webkitExitFullScreen(),G.setFullscreen(p),e&&(ea.controls=r,ea.controls=p)):G.fullscreen&&(N(p),G.setFullscreen(p),m.cancelFullScreen?m.cancelFullScreen():m.mozCancelFullScreen?m.mozCancelFullScreen():m.webkitCancelFullScreen?m.webkitCancelFullScreen():m.msExitFullscreen&&m.msExitFullscreen()),e&&W.jwGetState()==c.PAUSED&&setTimeout(ka,500);U&&U.redraw();ca&&ca.redraw();da&&da.redraw();v();G.fullscreen?Ka=setInterval(v, 200):clearInterval(Ka);setTimeout(function(){var b=g.bounds(za);G.width=b.width;G.height=b.height;na.sendEvent(a.JWPLAYER_RESIZE)},0);setTimeout(function(){if(Ea&&aa){var a=g.bounds(document.getElementById(W.id));aa.style.top=a.height/2-32+"px"}},1E3)};this.resize=Q;this.resizeMedia=v;var kb=this.completeSetup=function(){d(wa(),{opacity:1})},Ha;this.setupInstream=function(a,b,d,e){Na(wa("jwinstream"),r);Na(wa("jwcontrols"),p);Da.appendChild(a);V=b;cb=d;Ga({newstate:c.PLAYING});Ea=r;if(0<=e){aa||(aa= t("div","jwinstreamskip"),aa.id="skipContainer",ha=t("canvas"),aa.appendChild(ha));a=g.bounds(document.getElementById(W.id));aa.style.top=a.height/2-Math.floor(s/2)+"px";aa.style.width=q+"px";aa.style.height=s+"px";aa.style.visibility=G.controls?"visible":"hidden";ha.width=q;ha.height=s;Da.appendChild(aa);jb(e);var f=setInterval(function(){var a=m.getElementById(W.id),b=g.bounds(a).width;a!=T?clearInterval(f):0j&&(j=1);var k;d.beginPath();k=e+h/2;d.strokeStyle="white";d.lineWidth=j;d.moveTo(e-h/2,f);d.lineTo(k,f);d.stroke()}};this.addButton=function(a,b,d,e){da&&(da.addButton(a,b,d,e),W.jwGetState()==c.IDLE&&ba())};this.removeButton=function(a){da&&da.removeButton(a)};this.setControls= function(b){var c=G.controls,d=b?r:p;G.controls=d;d!=c&&(d?Ga({newstate:W.jwGetState()}):(fa(),ca&&ca.hide()),Ea&&(b?(V.show(),cb.show(),aa&&(aa.style.visibility="visible")):(V.hide(),cb.hide(),aa&&(aa.style.visibility="hidden"))),na.sendEvent(a.JWPLAYER_CONTROLS,{controls:d}))};this.forceState=function(a){ca.forceState(a)};this.releaseState=function(){ca.releaseState(W.jwGetState())};this.getSafeRegion=function(){var a={x:0,y:0,width:0,height:0};if(!G.controls)return a;U.showTemp();da.showTemp(); var b=g.bounds(za),c=b.top,d=Ea?g.bounds(m.getElementById(W.id+"_instream_controlbar")):g.bounds(U.element()),e=Ea?!1:0h;h++){var j=this[h],k=a.data(j,b);if(k)if(a.isFunction(k[e])&&"_"!==e.charAt(0)){var l=k[e].apply(k,g);if(void 0!==l)return l}else f("no such method '"+e+"' for "+b+" instance");else f("cannot call methods on "+b+" prior to initialization; attempted to call '"+e+"'")}return this}return this.each(function(){var d=a.data(this,b);d?(d.option(e),d._init()):(d=new c(this,e),a.data(this,b,d))})}}if(a){var f="undefined"==typeof console?b:function(a){console.error(a)};return a.bridget=function(a,b){c(b),e(a,b)},a.bridget}}var d=Array.prototype.slice;"function"==typeof define&&define.amd?define("jquery-bridget/jquery.bridget",["jquery"],c):c(a.jQuery)}(window),function(a){function b(b){var c=a.event;return c.target=c.target||c.srcElement||b,c}var c=document.documentElement,d=function(){};c.addEventListener?d=function(a,b,c){a.addEventListener(b,c,!1)}:c.attachEvent&&(d=function(a,c,d){a[c+d]=d.handleEvent?function(){var c=b(a);d.handleEvent.call(d,c)}:function(){var c=b(a);d.call(a,c)},a.attachEvent("on"+c,a[c+d])});var e=function(){};c.removeEventListener?e=function(a,b,c){a.removeEventListener(b,c,!1)}:c.detachEvent&&(e=function(a,b,c){a.detachEvent("on"+b,a[b+c]);try{delete a[b+c]}catch(d){a[b+c]=void 0}});var f={bind:d,unbind:e};"function"==typeof define&&define.amd?define("eventie/eventie",f):"object"==typeof exports?module.exports=f:a.eventie=f}(this),function(a){function b(a){"function"==typeof a&&(b.isReady?a():f.push(a))}function c(a){var c="readystatechange"===a.type&&"complete"!==e.readyState;if(!b.isReady&&!c){b.isReady=!0;for(var d=0,g=f.length;g>d;d++){var h=f[d];h()}}}function d(d){return d.bind(e,"DOMContentLoaded",c),d.bind(e,"readystatechange",c),d.bind(a,"load",c),b}var e=a.document,f=[];b.isReady=!1,"function"==typeof define&&define.amd?(b.isReady="function"==typeof requirejs,define("doc-ready/doc-ready",["eventie/eventie"],d)):a.docReady=d(a.eventie)}(this),function(){function a(){}function b(a,b){for(var c=a.length;c--;)if(a[c].listener===b)return c;return-1}function c(a){return function(){return this[a].apply(this,arguments)}}var d=a.prototype,e=this,f=e.EventEmitter;d.getListeners=function(a){var b,c,d=this._getEvents();if(a instanceof RegExp){b={};for(c in d)d.hasOwnProperty(c)&&a.test(c)&&(b[c]=d[c])}else b=d[a]||(d[a]=[]);return b},d.flattenListeners=function(a){var b,c=[];for(b=0;be;e++)if(b=c[e]+a,"string"==typeof d[b])return b}}var c="Webkit Moz ms Ms O".split(" "),d=document.documentElement.style;"function"==typeof define&&define.amd?define("get-style-property/get-style-property",[],function(){return b}):"object"==typeof exports?module.exports=b:a.getStyleProperty=b}(window),function(a){function b(a){var b=parseFloat(a),c=-1===a.indexOf("%")&&!isNaN(b);return c&&b}function c(){for(var a={width:0,height:0,innerWidth:0,innerHeight:0,outerWidth:0,outerHeight:0},b=0,c=g.length;c>b;b++){var d=g[b];a[d]=0}return a}function d(a){function d(a){if("string"==typeof a&&(a=document.querySelector(a)),a&&"object"==typeof a&&a.nodeType){var d=f(a);if("none"===d.display)return c();var e={};e.width=a.offsetWidth,e.height=a.offsetHeight;for(var k=e.isBorderBox=!(!j||!d[j]||"border-box"!==d[j]),l=0,m=g.length;m>l;l++){var n=g[l],o=d[n];o=h(a,o);var p=parseFloat(o);e[n]=isNaN(p)?0:p}var q=e.paddingLeft+e.paddingRight,r=e.paddingTop+e.paddingBottom,s=e.marginLeft+e.marginRight,t=e.marginTop+e.marginBottom,u=e.borderLeftWidth+e.borderRightWidth,v=e.borderTopWidth+e.borderBottomWidth,w=k&&i,x=b(d.width);x!==!1&&(e.width=x+(w?0:q+u));var y=b(d.height);return y!==!1&&(e.height=y+(w?0:r+v)),e.innerWidth=e.width-(q+u),e.innerHeight=e.height-(r+v),e.outerWidth=e.width+s,e.outerHeight=e.height+t,e}}function h(a,b){if(e||-1===b.indexOf("%"))return b;var c=a.style,d=c.left,f=a.runtimeStyle,g=f&&f.left;return g&&(f.left=a.currentStyle.left),c.left=b,b=c.pixelLeft,c.left=d,g&&(f.left=g),b}var i,j=a("boxSizing");return function(){if(j){var a=document.createElement("div");a.style.width="200px",a.style.padding="1px 2px 3px 4px",a.style.borderStyle="solid",a.style.borderWidth="1px 2px 3px 4px",a.style[j]="border-box";var c=document.body||document.documentElement;c.appendChild(a);var d=f(a);i=200===b(d.width),c.removeChild(a)}}(),d}var e=a.getComputedStyle,f=e?function(a){return e(a,null)}:function(a){return a.currentStyle},g=["paddingLeft","paddingRight","paddingTop","paddingBottom","marginLeft","marginRight","marginTop","marginBottom","borderLeftWidth","borderRightWidth","borderTopWidth","borderBottomWidth"];"function"==typeof define&&define.amd?define("get-size/get-size",["get-style-property/get-style-property"],d):"object"==typeof exports?module.exports=d(require("get-style-property")):a.getSize=d(a.getStyleProperty)}(window),function(a,b){function c(a,b){return a[h](b)}function d(a){if(!a.parentNode){var b=document.createDocumentFragment();b.appendChild(a)}}function e(a,b){d(a);for(var c=a.parentNode.querySelectorAll(b),e=0,f=c.length;f>e;e++)if(c[e]===a)return!0;return!1}function f(a,b){return d(a),c(a,b)}var g,h=function(){if(b.matchesSelector)return"matchesSelector";for(var a=["webkit","moz","ms","o"],c=0,d=a.length;d>c;c++){var e=a[c],f=e+"MatchesSelector";if(b[f])return f}}();if(h){var i=document.createElement("div"),j=c(i,"div");g=j?c:f}else g=e;"function"==typeof define&&define.amd?define("matches-selector/matches-selector",[],function(){return g}):window.matchesSelector=g}(this,Element.prototype),function(a){function b(a,b){for(var c in b)a[c]=b[c];return a}function c(a){for(var b in a)return!1;return b=null,!0}function d(a){return a.replace(/([A-Z])/g,function(a){return"-"+a.toLowerCase()})}function e(a,e,f){function h(a,b){a&&(this.element=a,this.layout=b,this.position={x:0,y:0},this._create())}var i=f("transition"),j=f("transform"),k=i&&j,l=!!f("perspective"),m={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"otransitionend",transition:"transitionend"}[i],n=["transform","transition","transitionDuration","transitionProperty"],o=function(){for(var a={},b=0,c=n.length;c>b;b++){var d=n[b],e=f(d);e&&e!==d&&(a[d]=e)}return a}();b(h.prototype,a.prototype),h.prototype._create=function(){this._transn={ingProperties:{},clean:{},onEnd:{}},this.css({position:"absolute"})},h.prototype.handleEvent=function(a){var b="on"+a.type;this[b]&&this[b](a)},h.prototype.getSize=function(){this.size=e(this.element)},h.prototype.css=function(a){var b=this.element.style;for(var c in a){var d=o[c]||c;b[d]=a[c]}},h.prototype.getPosition=function(){var a=g(this.element),b=this.layout.options,c=b.isOriginLeft,d=b.isOriginTop,e=parseInt(a[c?"left":"right"],10),f=parseInt(a[d?"top":"bottom"],10);e=isNaN(e)?0:e,f=isNaN(f)?0:f;var h=this.layout.size;e-=c?h.paddingLeft:h.paddingRight,f-=d?h.paddingTop:h.paddingBottom,this.position.x=e,this.position.y=f},h.prototype.layoutPosition=function(){var a=this.layout.size,b=this.layout.options,c={};b.isOriginLeft?(c.left=this.position.x+a.paddingLeft+"px",c.right=""):(c.right=this.position.x+a.paddingRight+"px",c.left=""),b.isOriginTop?(c.top=this.position.y+a.paddingTop+"px",c.bottom=""):(c.bottom=this.position.y+a.paddingBottom+"px",c.top=""),this.css(c),this.emitEvent("layout",[this])};var p=l?function(a,b){return"translate3d("+a+"px, "+b+"px, 0)"}:function(a,b){return"translate("+a+"px, "+b+"px)"};h.prototype._transitionTo=function(a,b){this.getPosition();var c=this.position.x,d=this.position.y,e=parseInt(a,10),f=parseInt(b,10),g=e===this.position.x&&f===this.position.y;if(this.setPosition(a,b),g&&!this.isTransitioning)return void this.layoutPosition();var h=a-c,i=b-d,j={},k=this.layout.options;h=k.isOriginLeft?h:-h,i=k.isOriginTop?i:-i,j.transform=p(h,i),this.transition({to:j,onTransitionEnd:{transform:this.layoutPosition},isCleaning:!0})},h.prototype.goTo=function(a,b){this.setPosition(a,b),this.layoutPosition()},h.prototype.moveTo=k?h.prototype._transitionTo:h.prototype.goTo,h.prototype.setPosition=function(a,b){this.position.x=parseInt(a,10),this.position.y=parseInt(b,10)},h.prototype._nonTransition=function(a){this.css(a.to),a.isCleaning&&this._removeStyles(a.to);for(var b in a.onTransitionEnd)a.onTransitionEnd[b].call(this)},h.prototype._transition=function(a){if(!parseFloat(this.layout.options.transitionDuration))return void this._nonTransition(a);var b=this._transn;for(var c in a.onTransitionEnd)b.onEnd[c]=a.onTransitionEnd[c];for(c in a.to)b.ingProperties[c]=!0,a.isCleaning&&(b.clean[c]=!0);if(a.from){this.css(a.from);var d=this.element.offsetHeight;d=null}this.enableTransition(a.to),this.css(a.to),this.isTransitioning=!0};var q=j&&d(j)+",opacity";h.prototype.enableTransition=function(){this.isTransitioning||(this.css({transitionProperty:q,transitionDuration:this.layout.options.transitionDuration}),this.element.addEventListener(m,this,!1))},h.prototype.transition=h.prototype[i?"_transition":"_nonTransition"],h.prototype.onwebkitTransitionEnd=function(a){this.ontransitionend(a)},h.prototype.onotransitionend=function(a){this.ontransitionend(a)};var r={"-webkit-transform":"transform","-moz-transform":"transform","-o-transform":"transform"};h.prototype.ontransitionend=function(a){if(a.target===this.element){var b=this._transn,d=r[a.propertyName]||a.propertyName;if(delete b.ingProperties[d],c(b.ingProperties)&&this.disableTransition(),d in b.clean&&(this.element.style[a.propertyName]="",delete b.clean[d]),d in b.onEnd){var e=b.onEnd[d];e.call(this),delete b.onEnd[d]}this.emitEvent("transitionEnd",[this])}},h.prototype.disableTransition=function(){this.removeTransitionStyles(),this.element.removeEventListener(m,this,!1),this.isTransitioning=!1},h.prototype._removeStyles=function(a){var b={};for(var c in a)b[c]="";this.css(b)};var s={transitionProperty:"",transitionDuration:""};return h.prototype.removeTransitionStyles=function(){this.css(s)},h.prototype.removeElem=function(){this.element.parentNode.removeChild(this.element),this.emitEvent("remove",[this])},h.prototype.remove=function(){if(!i||!parseFloat(this.layout.options.transitionDuration))return void this.removeElem();var a=this;this.on("transitionEnd",function(){return a.removeElem(),!0}),this.hide()},h.prototype.reveal=function(){delete this.isHidden,this.css({display:""});var a=this.layout.options;this.transition({from:a.hiddenStyle,to:a.visibleStyle,isCleaning:!0})},h.prototype.hide=function(){this.isHidden=!0,this.css({display:""});var a=this.layout.options;this.transition({from:a.visibleStyle,to:a.hiddenStyle,isCleaning:!0,onTransitionEnd:{opacity:function(){this.isHidden&&this.css({display:"none"})}}})},h.prototype.destroy=function(){this.css({position:"",left:"",right:"",top:"",bottom:"",transition:"",transform:""})},h}var f=a.getComputedStyle,g=f?function(a){return f(a,null)}:function(a){return a.currentStyle};"function"==typeof define&&define.amd?define("outlayer/item",["eventEmitter/EventEmitter","get-size/get-size","get-style-property/get-style-property"],e):(a.Outlayer={},a.Outlayer.Item=e(a.EventEmitter,a.getSize,a.getStyleProperty))}(window),function(a){function b(a,b){for(var c in b)a[c]=b[c];return a}function c(a){return"[object Array]"===l.call(a)}function d(a){var b=[];if(c(a))b=a;else if(a&&"number"==typeof a.length)for(var d=0,e=a.length;e>d;d++)b.push(a[d]);else b.push(a);return b}function e(a,b){var c=n(b,a);-1!==c&&b.splice(c,1)}function f(a){return a.replace(/(.)([A-Z])/g,function(a,b,c){return b+"-"+c}).toLowerCase()}function g(c,g,l,n,o,p){function q(a,c){if("string"==typeof a&&(a=h.querySelector(a)),!a||!m(a))return void(i&&i.error("Bad "+this.constructor.namespace+" element: "+a));this.element=a,this.options=b({},this.constructor.defaults),this.option(c);var d=++r;this.element.outlayerGUID=d,s[d]=this,this._create(),this.options.isInitLayout&&this.layout()}var r=0,s={};return q.namespace="outlayer",q.Item=p,q.defaults={containerStyle:{position:"relative"},isInitLayout:!0,isOriginLeft:!0,isOriginTop:!0,isResizeBound:!0,isResizingContainer:!0,transitionDuration:"0.4s",hiddenStyle:{opacity:0,transform:"scale(0.001)"},visibleStyle:{opacity:1,transform:"scale(1)"}},b(q.prototype,l.prototype),q.prototype.option=function(a){b(this.options,a)},q.prototype._create=function(){this.reloadItems(),this.stamps=[],this.stamp(this.options.stamp),b(this.element.style,this.options.containerStyle),this.options.isResizeBound&&this.bindResize()},q.prototype.reloadItems=function(){this.items=this._itemize(this.element.children)},q.prototype._itemize=function(a){for(var b=this._filterFindItemElements(a),c=this.constructor.Item,d=[],e=0,f=b.length;f>e;e++){var g=b[e],h=new c(g,this);d.push(h)}return d},q.prototype._filterFindItemElements=function(a){a=d(a);for(var b=this.options.itemSelector,c=[],e=0,f=a.length;f>e;e++){var g=a[e];if(m(g))if(b){o(g,b)&&c.push(g);for(var h=g.querySelectorAll(b),i=0,j=h.length;j>i;i++)c.push(h[i])}else c.push(g)}return c},q.prototype.getItemElements=function(){for(var a=[],b=0,c=this.items.length;c>b;b++)a.push(this.items[b].element);return a},q.prototype.layout=function(){this._resetLayout(),this._manageStamps();var a=void 0!==this.options.isLayoutInstant?this.options.isLayoutInstant:!this._isLayoutInited;this.layoutItems(this.items,a),this._isLayoutInited=!0},q.prototype._init=q.prototype.layout,q.prototype._resetLayout=function(){this.getSize()},q.prototype.getSize=function(){this.size=n(this.element)},q.prototype._getMeasurement=function(a,b){var c,d=this.options[a];d?("string"==typeof d?c=this.element.querySelector(d):m(d)&&(c=d),this[a]=c?n(c)[b]:d):this[a]=0},q.prototype.layoutItems=function(a,b){a=this._getItemsForLayout(a),this._layoutItems(a,b),this._postLayout()},q.prototype._getItemsForLayout=function(a){for(var b=[],c=0,d=a.length;d>c;c++){var e=a[c];e.isIgnored||b.push(e)}return b},q.prototype._layoutItems=function(a,b){function c(){d.emitEvent("layoutComplete",[d,a])}var d=this;if(!a||!a.length)return void c();this._itemsOn(a,"layout",c);for(var e=[],f=0,g=a.length;g>f;f++){var h=a[f],i=this._getItemLayoutPosition(h);i.item=h,i.isInstant=b||h.isLayoutInstant,e.push(i)}this._processLayoutQueue(e)},q.prototype._getItemLayoutPosition=function(){return{x:0,y:0}},q.prototype._processLayoutQueue=function(a){for(var b=0,c=a.length;c>b;b++){var d=a[b];this._positionItem(d.item,d.x,d.y,d.isInstant)}},q.prototype._positionItem=function(a,b,c,d){d?a.goTo(b,c):a.moveTo(b,c)},q.prototype._postLayout=function(){this.resizeContainer()},q.prototype.resizeContainer=function(){if(this.options.isResizingContainer){var a=this._getContainerSize();a&&(this._setContainerMeasure(a.width,!0),this._setContainerMeasure(a.height,!1))}},q.prototype._getContainerSize=k,q.prototype._setContainerMeasure=function(a,b){if(void 0!==a){var c=this.size;c.isBorderBox&&(a+=b?c.paddingLeft+c.paddingRight+c.borderLeftWidth+c.borderRightWidth:c.paddingBottom+c.paddingTop+c.borderTopWidth+c.borderBottomWidth),a=Math.max(a,0),this.element.style[b?"width":"height"]=a+"px"}},q.prototype._itemsOn=function(a,b,c){function d(){return e++,e===f&&c.call(g),!0}for(var e=0,f=a.length,g=this,h=0,i=a.length;i>h;h++){var j=a[h];j.on(b,d)}},q.prototype.ignore=function(a){var b=this.getItem(a);b&&(b.isIgnored=!0)},q.prototype.unignore=function(a){var b=this.getItem(a);b&&delete b.isIgnored},q.prototype.stamp=function(a){if(a=this._find(a)){this.stamps=this.stamps.concat(a);for(var b=0,c=a.length;c>b;b++){var d=a[b];this.ignore(d)}}},q.prototype.unstamp=function(a){if(a=this._find(a))for(var b=0,c=a.length;c>b;b++){var d=a[b];e(d,this.stamps),this.unignore(d)}},q.prototype._find=function(a){return a?("string"==typeof a&&(a=this.element.querySelectorAll(a)),a=d(a)):void 0},q.prototype._manageStamps=function(){if(this.stamps&&this.stamps.length){this._getBoundingRect();for(var a=0,b=this.stamps.length;b>a;a++){var c=this.stamps[a];this._manageStamp(c)}}},q.prototype._getBoundingRect=function(){var a=this.element.getBoundingClientRect(),b=this.size;this._boundingRect={left:a.left+b.paddingLeft+b.borderLeftWidth,top:a.top+b.paddingTop+b.borderTopWidth,right:a.right-(b.paddingRight+b.borderRightWidth),bottom:a.bottom-(b.paddingBottom+b.borderBottomWidth)}},q.prototype._manageStamp=k,q.prototype._getElementOffset=function(a){var b=a.getBoundingClientRect(),c=this._boundingRect,d=n(a),e={left:b.left-c.left-d.marginLeft,top:b.top-c.top-d.marginTop,right:c.right-b.right-d.marginRight,bottom:c.bottom-b.bottom-d.marginBottom};return e},q.prototype.handleEvent=function(a){var b="on"+a.type;this[b]&&this[b](a)},q.prototype.bindResize=function(){this.isResizeBound||(c.bind(a,"resize",this),this.isResizeBound=!0)},q.prototype.unbindResize=function(){this.isResizeBound&&c.unbind(a,"resize",this),this.isResizeBound=!1},q.prototype.onresize=function(){function a(){b.resize(),delete b.resizeTimeout}this.resizeTimeout&&clearTimeout(this.resizeTimeout);var b=this;this.resizeTimeout=setTimeout(a,100)},q.prototype.resize=function(){this.isResizeBound&&this.needsResizeLayout()&&this.layout()},q.prototype.needsResizeLayout=function(){var a=n(this.element),b=this.size&&a;return b&&a.innerWidth!==this.size.innerWidth},q.prototype.addItems=function(a){var b=this._itemize(a);return b.length&&(this.items=this.items.concat(b)),b},q.prototype.appended=function(a){var b=this.addItems(a);b.length&&(this.layoutItems(b,!0),this.reveal(b))},q.prototype.prepended=function(a){var b=this._itemize(a);if(b.length){var c=this.items.slice(0);this.items=b.concat(c),this._resetLayout(),this._manageStamps(),this.layoutItems(b,!0),this.reveal(b),this.layoutItems(c)}},q.prototype.reveal=function(a){var b=a&&a.length;if(b)for(var c=0;b>c;c++){var d=a[c];d.reveal()}},q.prototype.hide=function(a){var b=a&&a.length;if(b)for(var c=0;b>c;c++){var d=a[c];d.hide()}},q.prototype.getItem=function(a){for(var b=0,c=this.items.length;c>b;b++){var d=this.items[b];if(d.element===a)return d}},q.prototype.getItems=function(a){if(a&&a.length){for(var b=[],c=0,d=a.length;d>c;c++){var e=a[c],f=this.getItem(e);f&&b.push(f)}return b}},q.prototype.remove=function(a){a=d(a);var b=this.getItems(a);if(b&&b.length){this._itemsOn(b,"remove",function(){this.emitEvent("removeComplete",[this,b])});for(var c=0,f=b.length;f>c;c++){var g=b[c];g.remove(),e(g,this.items)}}},q.prototype.destroy=function(){var a=this.element.style;a.height="",a.position="",a.width="";for(var b=0,c=this.items.length;c>b;b++){var d=this.items[b];d.destroy()}this.unbindResize(),delete this.element.outlayerGUID,j&&j.removeData(this.element,this.constructor.namespace)},q.data=function(a){var b=a&&a.outlayerGUID;return b&&s[b]},q.create=function(a,c){function d(){q.apply(this,arguments)}return Object.create?d.prototype=Object.create(q.prototype):b(d.prototype,q.prototype),d.prototype.constructor=d,d.defaults=b({},q.defaults),b(d.defaults,c),d.prototype.settings={},d.namespace=a,d.data=q.data,d.Item=function(){p.apply(this,arguments)},d.Item.prototype=new p,g(function(){for(var b=f(a),c=h.querySelectorAll(".js-"+b),e="data-"+b+"-options",g=0,k=c.length;k>g;g++){var l,m=c[g],n=m.getAttribute(e);try{l=n&&JSON.parse(n)}catch(o){i&&i.error("Error parsing "+e+" on "+m.nodeName.toLowerCase()+(m.id?"#"+m.id:"")+": "+o);continue}var p=new d(m,l);j&&j.data(m,a,p)}}),j&&j.bridget&&j.bridget(a,d),d},q.Item=p,q}var h=a.document,i=a.console,j=a.jQuery,k=function(){},l=Object.prototype.toString,m="object"==typeof HTMLElement?function(a){return a instanceof HTMLElement}:function(a){return a&&"object"==typeof a&&1===a.nodeType&&"string"==typeof a.nodeName},n=Array.prototype.indexOf?function(a,b){return a.indexOf(b)}:function(a,b){for(var c=0,d=a.length;d>c;c++)if(a[c]===b)return c;return-1};"function"==typeof define&&define.amd?define("outlayer/outlayer",["eventie/eventie","doc-ready/doc-ready","eventEmitter/EventEmitter","get-size/get-size","matches-selector/matches-selector","./item"],g):a.Outlayer=g(a.eventie,a.docReady,a.EventEmitter,a.getSize,a.matchesSelector,a.Outlayer.Item)}(window),function(a){function b(a,b){var d=a.create("masonry");return d.prototype._resetLayout=function(){this.getSize(),this._getMeasurement("columnWidth","outerWidth"),this._getMeasurement("gutter","outerWidth"),this.measureColumns();var a=this.cols;for(this.colYs=[];a--;)this.colYs.push(0);this.maxY=0},d.prototype.measureColumns=function(){if(this.getContainerWidth(),!this.columnWidth){var a=this.items[0],c=a&&a.element;this.columnWidth=c&&b(c).outerWidth||this.containerWidth}this.columnWidth+=this.gutter,this.cols=Math.floor((this.containerWidth+this.gutter)/this.columnWidth),this.cols=Math.max(this.cols,1)},d.prototype.getContainerWidth=function(){var a=this.options.isFitWidth?this.element.parentNode:this.element,c=b(a);this.containerWidth=c&&c.innerWidth},d.prototype._getItemLayoutPosition=function(a){a.getSize();var b=a.size.outerWidth%this.columnWidth,d=b&&1>b?"round":"ceil",e=Math[d](a.size.outerWidth/this.columnWidth);e=Math.min(e,this.cols);for(var f=this._getColGroup(e),g=Math.min.apply(Math,f),h=c(f,g),i={x:this.columnWidth*h,y:g},j=g+a.size.outerHeight,k=this.cols+1-f.length,l=0;k>l;l++)this.colYs[h+l]=j;return i},d.prototype._getColGroup=function(a){if(2>a)return this.colYs;for(var b=[],c=this.cols+1-a,d=0;c>d;d++){var e=this.colYs.slice(d,d+a);b[d]=Math.max.apply(Math,e)}return b},d.prototype._manageStamp=function(a){var c=b(a),d=this._getElementOffset(a),e=this.options.isOriginLeft?d.left:d.right,f=e+c.outerWidth,g=Math.floor(e/this.columnWidth);g=Math.max(0,g);var h=Math.floor(f/this.columnWidth);h-=f%this.columnWidth?0:1,h=Math.min(this.cols-1,h);for(var i=(this.options.isOriginTop?d.top:d.bottom)+c.outerHeight,j=g;h>=j;j++)this.colYs[j]=Math.max(i,this.colYs[j])},d.prototype._getContainerSize=function(){this.maxY=Math.max.apply(Math,this.colYs);var a={height:this.maxY};return this.options.isFitWidth&&(a.width=this._getContainerFitWidth()),a},d.prototype._getContainerFitWidth=function(){for(var a=0,b=this.cols;--b&&0===this.colYs[b];)a++;return(this.cols-a)*this.columnWidth-this.gutter},d.prototype.needsResizeLayout=function(){var a=this.containerWidth;return this.getContainerWidth(),a!==this.containerWidth},d}var c=Array.prototype.indexOf?function(a,b){return a.indexOf(b)}:function(a,b){for(var c=0,d=a.length;d>c;c++){var e=a[c];if(e===b)return c}return-1};"function"==typeof define&&define.amd?define(["outlayer/outlayer","get-size/get-size"],b):a.Masonry=b(a.Outlayer,a.getSize)}(window); } /* FILE ARCHIVED ON 04:35:13 Aug 15, 2025 AND RETRIEVED FROM THE INTERNET ARCHIVE ON 08:40:23 Jan 30, 2026. JAVASCRIPT APPENDED BY WAYBACK MACHINE, COPYRIGHT INTERNET ARCHIVE. ALL OTHER CONTENT MAY ALSO BE PROTECTED BY COPYRIGHT (17 U.S.C. SECTION 108(a)(3)). */ /* playback timings (ms): captures_list: 12.856 exclusion.robots: 0.032 exclusion.robots.policy: 0.013 esindex: 0.016 cdx.remote: 20.346 LoadShardBlock: 106.341 (3) PetaboxLoader3.datanode: 159.534 (4) load_resource: 148.76 PetaboxLoader3.resolve: 50.025 */