");return =
n.inlineElement=3Dr,r}return =
t.updateStatus("ready"),t._parseMarkup(i,{},n),i}}});var =
F,H=3D"ajax",L=3Dfunction(){F&&i.removeClass(F)},A=3Dfunction(){L(),t.req=
&&t.req.abort()};e.magnificPopup.registerModule(H,{options:{settings:null=
,cursor:"mfp-ajax-cur",tError:'
The content could =
not be =
loaded.'},proto:{initAjax:function(){t.types.push(H),F=3Dt.st.ajax.cursor=
,x(l+"."+H,A),x("BeforeChange."+H,A)},getAjax:function(n){F&&i.addClass(F=
),t.updateStatus("loading");var =
o=3De.extend({url:n.src,success:function(i,o,r){var =
a=3D{data:i,xhr:r};T("ParseAjax",a),t.appendContent(e(a.data),H),n.finish=
ed=3D!0,L(),t._setFocus(),setTimeout(function(){t.wrap.addClass(v)},16),t=
.updateStatus("ready"),T("AjaxContentAdded")},error:function(){L(),n.fini=
shed=3Dn.loadError=3D!0,t.updateStatus("error",t.st.ajax.tError.replace("=
%url%",n.src))}},t.st.ajax.settings);return t.req=3De.ajax(o),""}}});var =
j,N=3Dfunction(n){if(n.data&&void 0!=3D=3Dn.data.title)return =
n.data.title;var i=3Dt.st.image.titleSrc;if(i){if(e.isFunction(i))return =
i.call(t,n);if(n.el)return =
n.el.attr(i)||""}return""};e.magnificPopup.registerModule("image",{option=
s:{markup:'
',cursor:"m=
fp-zoom-out-cur",titleSrc:"title",verticalFit:!0,tError:'
The image could not be =
loaded.'},proto:{initImage:function(){var =
e=3Dt.st.image,n=3D".image";t.types.push("image"),x(f+n,function(){"image=
"=3D=3D=3Dt.currItem.type&&e.cursor&&i.addClass(e.cursor)}),x(l+n,functio=
n(){e.cursor&&i.removeClass(e.cursor),I.off("resize"+h)}),x("Resize"+n,t.=
resizeImage),t.isLowIE&&x("AfterChange",t.resizeImage)},resizeImage:funct=
ion(){var e=3Dt.currItem;if(e&&e.img&&t.st.image.verticalFit){var =
n=3D0;t.isLowIE&&(n=3DparseInt(e.img.css("padding-top"),10)+parseInt(e.im=
g.css("padding-bottom"),10)),e.img.css("max-height",t.wH-n)}},_onImageHas=
Size:function(e){e.img&&(e.hasSize=3D!0,j&&clearInterval(j),e.isCheckingI=
mgSize=3D!1,T("ImageHasSize",e),e.imgHidden&&(t.content&&t.content.remove=
Class("mfp-loading"),e.imgHidden=3D!1))},findImageSize:function(e){var =
n=3D0,i=3De.img[0],o=3Dfunction(r){j&&clearInterval(j),j=3DsetInterval(fu=
nction(){return i.naturalWidth>0?(t._onImageHasSize(e),void =
0):(n>200&&clearInterval(j),n++,3=3D=3D=3Dn?o(10):40=3D=3D=3Dn?o(50):100=3D=
=3D=3Dn&&o(500),void 0)},r)};o(1)},getImage:function(n,i){var =
o=3D0,r=3Dfunction(){n&&(n.img[0].complete?(n.img.off(".mfploader"),n=3D=3D=
=3Dt.currItem&&(t._onImageHasSize(n),t.updateStatus("ready")),n.hasSize=3D=
!0,n.loaded=3D!0,T("ImageLoadComplete")):(o++,200>o?setTimeout(r,100):a()=
))},a=3Dfunction(){n&&(n.img.off(".mfploader"),n=3D=3D=3Dt.currItem&&(t._=
onImageHasSize(n),t.updateStatus("error",s.tError.replace("%url%",n.src))=
),n.hasSize=3D!0,n.loaded=3D!0,n.loadError=3D!0)},s=3Dt.st.image,l=3Di.fi=
nd(".mfp-img");if(l.length){var =
c=3Ddocument.createElement("img");c.className=3D"mfp-img",n.img=3De(c).on=
("load.mfploader",r).on("error.mfploader",a),c.src=3Dn.src,l.is("img")&&(=
n.img=3Dn.img.clone()),c=3Dn.img[0],c.naturalWidth>0?n.hasSize=3D!0:c.wid=
th||(n.hasSize=3D!1)}return =
t._parseMarkup(i,{title:N(n),img_replaceWith:n.img},n),t.resizeImage(),n.=
hasSize?(j&&clearInterval(j),n.loadError?(i.addClass("mfp-loading"),t.upd=
ateStatus("error",s.tError.replace("%url%",n.src))):(i.removeClass("mfp-l=
oading"),t.updateStatus("ready")),i):(t.updateStatus("loading"),n.loading=
=3D!0,n.hasSize||(n.imgHidden=3D!0,i.addClass("mfp-loading"),t.findImageS=
ize(n)),i)}}});var W,R=3Dfunction(){return void 0=3D=3D=3DW&&(W=3Dvoid =
0!=3D=3Ddocument.createElement("p").style.MozTransform),W};e.magnificPopu=
p.registerModule("zoom",{options:{enabled:!1,easing:"ease-in-out",duratio=
n:300,opener:function(e){return =
e.is("img")?e:e.find("img")}},proto:{initZoom:function(){var =
e,n=3Dt.st.zoom,i=3D".zoom";if(n.enabled&&t.supportsTransition){var =
o,r,a=3Dn.duration,s=3Dfunction(e){var =
t=3De.clone().removeAttr("style").removeAttr("class").addClass("mfp-anima=
ted-image"),i=3D"all "+n.duration/1e3+"s =
"+n.easing,o=3D{position:"fixed",zIndex:9999,left:0,top:0,"-webkit-backfa=
ce-visibility":"hidden"},r=3D"transition";return =
o["-webkit-"+r]=3Do["-moz-"+r]=3Do["-o-"+r]=3Do[r]=3Di,t.css(o),t},d=3Dfu=
nction(){t.content.css("visibility","visible")};x("BuildControls"+i,funct=
ion(){if(t._allowZoom()){if(clearTimeout(o),t.content.css("visibility","h=
idden"),e=3Dt._getItemToZoom(),!e)return d(),void =
0;r=3Ds(e),r.css(t._getOffset()),t.wrap.append(r),o=3DsetTimeout(function=
(){r.css(t._getOffset(!0)),o=3DsetTimeout(function(){d(),setTimeout(funct=
ion(){r.remove(),e=3Dr=3Dnull,T("ZoomAnimationEnded")},16)},a)},16)}}),x(=
c+i,function(){if(t._allowZoom()){if(clearTimeout(o),t.st.removalDelay=3D=
a,!e){if(e=3Dt._getItemToZoom(),!e)return;r=3Ds(e)}r.css(t._getOffset(!0)=
),t.wrap.append(r),t.content.css("visibility","hidden"),setTimeout(functi=
on(){r.css(t._getOffset())},16)}}),x(l+i,function(){t._allowZoom()&&(d(),=
r&&r.remove(),e=3Dnull)})}},_allowZoom:function(){return"image"=3D=3D=3Dt=
.currItem.type},_getItemToZoom:function(){return =
t.currItem.hasSize?t.currItem.img:!1},_getOffset:function(n){var =
i;i=3Dn?t.currItem.img:t.st.zoom.opener(t.currItem.el||t.currItem);var =
o=3Di.offset(),r=3DparseInt(i.css("padding-top"),10),a=3DparseInt(i.css("=
padding-bottom"),10);o.top-=3De(window).scrollTop()-r;var =
s=3D{width:i.width(),height:(b?i.innerHeight():i[0].offsetHeight)-a-r};re=
turn =
R()?s["-moz-transform"]=3Ds.transform=3D"translate("+o.left+"px,"+o.top+"=
px)":(s.left=3Do.left,s.top=3Do.top),s}}});var =
Z=3D"iframe",q=3D"//about:blank",D=3Dfunction(e){if(t.currTemplate[Z]){va=
r =
n=3Dt.currTemplate[Z].find("iframe");n.length&&(e||(n[0].src=3Dq),t.isIE8=
&&n.css("display",e?"block":"none"))}};e.magnificPopup.registerModule(Z,{=
options:{markup:'
',srcAction:"iframe_src",patterns:{youtube=
:{index:"youtube.com",id:"v=3D",src:"//www.youtube.com/embed/%id%?autopla=
y=3D1"},vimeo:{index:"vimeo.com/",id:"/",src:"//player.vimeo.com/video/%i=
d%?autoplay=3D1"},gmaps:{index:"//maps.google.",src:"%id%&output=3Dembed"=
}}},proto:{initIframe:function(){t.types.push(Z),x("BeforeChange",functio=
n(e,t,n){t!=3D=3Dn&&(t=3D=3D=3DZ?D():n=3D=3D=3DZ&&D(!0))}),x(l+"."+Z,func=
tion(){D()})},getIframe:function(n,i){var =
o=3Dn.src,r=3Dt.st.iframe;e.each(r.patterns,function(){return =
o.indexOf(this.index)>-1?(this.id&&(o=3D"string"=3D=3Dtypeof =
this.id?o.substr(o.lastIndexOf(this.id)+this.id.length,o.length):this.id.=
call(this,o)),o=3Dthis.src.replace("%id%",o),!1):void 0});var =
a=3D{};return =
r.srcAction&&(a[r.srcAction]=3Do),t._parseMarkup(i,a,n),t.updateStatus("r=
eady"),i}}});var K=3Dfunction(e){var n=3Dt.items.length;return =
e>n-1?e-n:0>e?n+e:e},Y=3Dfunction(e,t,n){return =
e.replace(/%curr%/gi,t+1).replace(/%total%/gi,n)};e.magnificPopup.registe=
rModule("gallery",{options:{enabled:!1,arrowMarkup:'
',preload:[0,2],navigateByImgClick:!0,arrows:!0=
,tPrev:"Previous (Left arrow key)",tNext:"Next (Right arrow =
key)",tCounter:"%curr% of %total%"},proto:{initGallery:function(){var =
n=3Dt.st.gallery,i=3D".mfp-gallery",r=3DBoolean(e.fn.mfpFastClick);return=
t.direction=3D!0,n&&n.enabled?(a+=3D" =
mfp-gallery",x(f+i,function(){n.navigateByImgClick&&t.wrap.on("click"+i,"=
.mfp-img",function(){return t.items.length>1?(t.next(),!1):void =
0}),o.on("keydown"+i,function(e){37=3D=3D=3De.keyCode?t.prev():39=3D=3D=3D=
e.keyCode&&t.next()})}),x("UpdateStatus"+i,function(e,n){n.text&&(n.text=3D=
Y(n.text,t.currItem.index,t.items.length))}),x(p+i,function(e,i,o,r){var =
a=3Dt.items.length;o.counter=3Da>1?Y(n.tCounter,r.index,a):""}),x("BuildC=
ontrols"+i,function(){if(t.items.length>1&&n.arrows&&!t.arrowLeft){var =
i=3Dn.arrowMarkup,o=3Dt.arrowLeft=3De(i.replace(/%title%/gi,n.tPrev).repl=
ace(/%dir%/gi,"left")).addClass(y),a=3Dt.arrowRight=3De(i.replace(/%title=
%/gi,n.tNext).replace(/%dir%/gi,"right")).addClass(y),s=3Dr?"mfpFastClick=
":"click";o[s](function(){t.prev()}),a[s](function(){t.next()}),t.isIE7&&=
(k("b",o[0],!1,!0),k("a",o[0],!1,!0),k("b",a[0],!1,!0),k("a",a[0],!1,!0))=
,t.container.append(o.add(a))}}),x(m+i,function(){t._preloadTimeout&&clea=
rTimeout(t._preloadTimeout),t._preloadTimeout=3DsetTimeout(function(){t.p=
reloadNearbyImages(),t._preloadTimeout=3Dnull},16)}),x(l+i,function(){o.o=
ff(i),t.wrap.off("click"+i),t.arrowLeft&&r&&t.arrowLeft.add(t.arrowRight)=
.destroyMfpFastClick(),t.arrowRight=3Dt.arrowLeft=3Dnull}),void =
0):!1},next:function(){t.direction=3D!0,t.index=3DK(t.index+1),t.updateIt=
emHTML()},prev:function(){t.direction=3D!1,t.index=3DK(t.index-1),t.updat=
eItemHTML()},goTo:function(e){t.direction=3De>=3Dt.index,t.index=3De,t.up=
dateItemHTML()},preloadNearbyImages:function(){var =
e,n=3Dt.st.gallery.preload,i=3DMath.min(n[0],t.items.length),o=3DMath.min=
(n[1],t.items.length);for(e=3D1;(t.direction?o:i)>=3De;e++)t._preloadItem=
(t.index+e);for(e=3D1;(t.direction?i:o)>=3De;e++)t._preloadItem(t.index-e=
)},_preloadItem:function(n){if(n=3DK(n),!t.items[n].preloaded){var =
i=3Dt.items[n];i.parsed||(i=3Dt.parseEl(n)),T("LazyLoad",i),"image"=3D=3D=
=3Di.type&&(i.img=3De('
').on("load.mfploader",function(){i.hasSize=3D!0}).on("error.mfploader"=
,function(){i.hasSize=3D!0,i.loadError=3D!0,T("LazyLoadError",i)}).attr("=
src",i.src)),i.preloaded=3D!0}}}});var =
U=3D"retina";e.magnificPopup.registerModule(U,{options:{replaceSrc:functi=
on(e){return =
e.src.replace(/\.\w+$/,function(e){return"@2x"+e})},ratio:1},proto:{initR=
etina:function(){if(window.devicePixelRatio>1){var =
e=3Dt.st.retina,n=3De.ratio;n=3DisNaN(n)?n():n,n>1&&(x("ImageHasSize."+U,=
function(e,t){t.img.css({"max-width":t.img[0].naturalWidth/n,width:"100%"=
})}),x("ElementParse."+U,function(t,i){i.src=3De.replaceSrc(i,n)}))}}}}),=
function(){var t=3D1e3,n=3D"ontouchstart"in =
window,i=3Dfunction(){I.off("touchmove"+r+" =
touchend"+r)},o=3D"mfpFastClick",r=3D"."+o;e.fn.mfpFastClick=3Dfunction(o=
){return e(this).each(function(){var a,s=3De(this);if(n){var =
l,c,d,u,p,f;s.on("touchstart"+r,function(e){u=3D!1,f=3D1,p=3De.originalEv=
ent?e.originalEvent.touches[0]:e.touches[0],c=3Dp.clientX,d=3Dp.clientY,I=
.on("touchmove"+r,function(e){p=3De.originalEvent?e.originalEvent.touches=
:e.touches,f=3Dp.length,p=3Dp[0],(Math.abs(p.clientX-c)>10||Math.abs(p.cl=
ientY-d)>10)&&(u=3D!0,i())}).on("touchend"+r,function(e){i(),u||f>1||(a=3D=
!0,e.preventDefault(),clearTimeout(l),l=3DsetTimeout(function(){a=3D!1},t=
),o())})})}s.on("click"+r,function(){a||o()})})},e.fn.destroyMfpFastClick=
=3Dfunction(){e(this).off("touchstart"+r+" =
click"+r),n&&I.off("touchmove"+r+" =
touchend"+r)}}(),_()})(window.jQuery||window.Zepto);=0A=
=0A=
=0A=
/**=0A=
* placeholder=0A=
*/=0A=
(function(q,f,d){function r(b){var =
a=3D{},c=3D/^jQuery\d+$/;d.each(b.attributes,function(b,d){d.specified&&!=
c.test(d.name)&&(a[d.name]=3Dd.value)});return a}function g(b,a){var =
c=3Dd(this);if(this.value=3D=3Dc.attr("placeholder")&&c.hasClass("placeho=
lder"))if(c.data("placeholder-password")){c=3Dc.hide().next().show().attr=
("id",c.removeAttr("id").data("placeholder-id"));if(!0=3D=3D=3Db)return =
c[0].value=3Da;c.focus()}else =
this.value=3D"",c.removeClass("placeholder"),this=3D=3Dm()&&this.select()=
}function k(){var b,a=3Dd(this),c=3D=0A=
=
this.id;if(""=3D=3Dthis.value){if("password"=3D=3Dthis.type){if(!a.data("=
placeholder-textinput")){try{b=3Da.clone().attr({type:"text"})}catch(e){b=
=3Dd("
").attr(d.extend(r(this),{type:"text"}))}b.removeAttr("name"=
).data({"placeholder-password":a,"placeholder-id":c}).bind("focus.placeho=
lder",g);a.data({"placeholder-textinput":b,"placeholder-id":c}).before(b)=
}a=3Da.removeAttr("id").hide().prev().attr("id",c).show()}a.addClass("pla=
ceholder");a[0].value=3Da.attr("placeholder")}else =
a.removeClass("placeholder")}=0A=
function m(){try{return f.activeElement}catch(b){}}var =
h=3D"placeholder"in f.createElement("input"),l=3D"placeholder"in =
f.createElement("textarea"),e=3Dd.fn,n=3Dd.valHooks,p=3Dd.propHooks;h&&l?=
(e=3De.placeholder=3Dfunction(){return =
this},e.input=3De.textarea=3D!0):(e=3De.placeholder=3Dfunction(){this.fil=
ter((h?"textarea":":input")+"[placeholder]").not(".placeholder").bind({"f=
ocus.placeholder":g,"blur.placeholder":k}).data("placeholder-enabled",!0)=
.trigger("blur.placeholder");return =
this},e.input=3Dh,e.textarea=3Dl,e=3D{get:function(b){var a=3D=0A=
d(b),c=3Da.data("placeholder-password");return =
c?c[0].value:a.data("placeholder-enabled")&&a.hasClass("placeholder")?"":=
b.value},set:function(b,a){var =
c=3Dd(b),e=3Dc.data("placeholder-password");if(e)return =
e[0].value=3Da;if(!c.data("placeholder-enabled"))return =
b.value=3Da;""=3D=3Da?(b.value=3Da,b!=3Dm()&&k.call(b)):c.hasClass("place=
holder")?g.call(b,!0,a)||(b.value=3Da):b.value=3Da;return =
c}},h||(n.input=3De,p.value=3De),l||(n.textarea=3De,p.value=3De),d(functi=
on(){d(f).delegate("form","submit.placeholder",function(){var b=3D=0A=
=
d(".placeholder",this).each(g);setTimeout(function(){b.each(k)},10)})}),d=
(q).bind("beforeunload.placeholder",function(){d(".placeholder").each(fun=
ction(){this.value=3D""})}))})(this,document,jQuery);=0A=
=0A=
=0A=
=0A=
=0A=
=0A=
//fgnass.github.com/spin.js#v2.0.1=0A=
!function(a,b){"object"=3D=3Dtypeof =
exports?module.exports=3Db():"function"=3D=3Dtypeof =
define&&define.amd?define(b):a.Spinner=3Db()}(this,function(){"use =
strict";function a(a,b){var c,d=3Ddocument.createElement(a||"div");for(c =
in b)d[c]=3Db[c];return d}function b(a){for(var =
b=3D1,c=3Darguments.length;c>b;b++)a.appendChild(arguments[b]);return =
a}function c(a,b,c,d){var =
e=3D["opacity",b,~~(100*a),c,d].join("-"),f=3D.01+c/d*100,g=3DMath.max(1-=
(1-a)/b*(100-f),a),h=3Dj.substring(0,j.indexOf("Animation")).toLowerCase(=
),i=3Dh&&"-"+h+"-"||"";return l[e]||(m.insertRule("@"+i+"keyframes =
"+e+"{0%{opacity:"+g+"}"+f+"%{opacity:"+a+"}"+(f+.01)+"%{opacity:1}"+(f+b=
)%100+"%{opacity:"+a+"}100%{opacity:"+g+"}}",m.cssRules.length),l[e]=3D1)=
,e}function d(a,b){var =
c,d,e=3Da.style;for(b=3Db.charAt(0).toUpperCase()+b.slice(1),d=3D0;d
',c)}m.addRule(".spin-vml","behavior:url(#default#VML)=
"),h.prototype.lines=3Dfunction(a,d){function f(){return =
e(c("group",{coordsize:k+" "+k,coordorigin:-j+" =
"+-j}),{width:k,height:k})}function =
h(a,h,i){b(m,b(e(f(),{rotation:360/d.lines*a+"deg",left:~~h}),b(e(c("roun=
drect",{arcsize:d.corners}),{width:j,height:d.width,left:d.radius,top:-d.=
width>>1,filter:i}),c("fill",{color:g(d.color,a),opacity:d.opacity}),c("s=
troke",{opacity:0}))))}var =
i,j=3Dd.length+d.width,k=3D2*j,l=3D2*-(d.width+d.length)+"px",m=3De(f(),{=
position:"absolute",top:l,left:l});if(d.shadow)for(i=3D1;i<=3Dd.lines;i++=
)h(i,-2,"progid:DXImageTransform.Microsoft.Blur(pixelradius=3D2,makeshado=
w=3D1,shadowopacity=3D.3)");for(i=3D1;i<=3Dd.lines;i++)h(i);return =
b(a,m)},h.prototype.opacity=3Dfunction(a,b,c,d){var =
e=3Da.firstChild;d=3Dd.shadow&&d.lines||0,e&&b+d>1)+"px"})}f=
or(var =
i,k=3D0,l=3D(f.lines-1)*(1-f.direction)/2;k -1) {=0A=
disableKeyboard =3D true;=0A=
}=0A=
=0A=
// disable everything if the page is blacklisted=0A=
if (options.excluded) {=0A=
var domains =3D options.excluded.split(/[,\n] ?/);=0A=
domains.push("mail.google.com"); // exclude Gmail for now=0A=
for (var i =3D domains.length; i--;) {=0A=
if (document.URL.indexOf(domains[i]) > -1) {=0A=
observer && observer.disconnect();=0A=
removeEvent("mousewheel", wheel);=0A=
disableKeyboard =3D true;=0A=
isExcluded =3D true;=0A=
break;=0A=
}=0A=
}=0A=
}=0A=
=0A=
// disable keyboard support if anything above requested it=0A=
if (disableKeyboard) {=0A=
removeEvent("keydown", keydown);=0A=
}=0A=
=0A=
if (options.keyboardSupport && !disableKeyboard) {=0A=
addEvent("keydown", keydown);=0A=
}=0A=
}=0A=
=0A=
/**=0A=
* Sets up scrolls array, determines if frames are involved.=0A=
*/=0A=
function init() {=0A=
=0A=
if (!document.body) return;=0A=
=0A=
var body =3D document.body;=0A=
var html =3D document.documentElement;=0A=
var windowHeight =3D window.innerHeight;=0A=
var scrollHeight =3D body.scrollHeight;=0A=
=0A=
// check compat mode for root element=0A=
root =3D (document.compatMode.indexOf('CSS') >=3D 0) ? html : =
body;=0A=
activeElement =3D body;=0A=
=0A=
initTest();=0A=
initDone =3D true;=0A=
=0A=
// Checks if this script is running in a frame=0A=
if (top !=3D self) {=0A=
isFrame =3D true;=0A=
}=0A=
=0A=
/**=0A=
* This fixes a bug where the areas left and right to=0A=
* the content does not trigger the onmousewheel event=0A=
* on some pages. e.g.: html, body { height: 100% }=0A=
*/=0A=
else if (scrollHeight > windowHeight &&=0A=
(body.offsetHeight <=3D windowHeight ||=0A=
html.offsetHeight <=3D windowHeight)) {=0A=
=0A=
// DOMChange (throttle): fix height=0A=
var pending =3D false;=0A=
var refresh =3D function () {=0A=
if (!pending && html.scrollHeight !=3D document.height) {=0A=
pending =3D true; // add a new pending action=0A=
setTimeout(function () {=0A=
html.style.height =3D document.height + 'px';=0A=
pending =3D false;=0A=
}, 500); // act rarely to stay fast=0A=
}=0A=
};=0A=
html.style.height =3D 'auto';=0A=
setTimeout(refresh, 10);=0A=
=0A=
var config =3D {=0A=
attributes: true,=0A=
childList: true,=0A=
characterData: false=0A=
};=0A=
=0A=
observer =3D new MutationObserver(refresh);=0A=
observer.observe(body, config);=0A=
=0A=
// clearfix=0A=
if (root.offsetHeight <=3D windowHeight) {=0A=
var underlay =3D document.createElement("div");=0A=
underlay.style.clear =3D "both";=0A=
body.appendChild(underlay);=0A=
}=0A=
}=0A=
=0A=
// gmail performance fix=0A=
if (document.URL.indexOf("mail.google.com") > -1) {=0A=
var s =3D document.createElement("style");=0A=
s.innerHTML =3D ".iu { visibility: hidden }";=0A=
(document.getElementsByTagName("head")[0] || =
html).appendChild(s);=0A=
}=0A=
// facebook better home timeline performance=0A=
// all the HTML resized images make rendering CPU intensive=0A=
else if (document.URL.indexOf("www.facebook.com") > -1) {=0A=
var home_stream =3D document.getElementById("home_stream");=0A=
home_stream && (home_stream.style.webkitTransform =3D =
"translateZ(0)");=0A=
}=0A=
// disable fixed background=0A=
if (!options.fixedBackground && !isExcluded) {=0A=
body.style.backgroundAttachment =3D "scroll";=0A=
html.style.backgroundAttachment =3D "scroll";=0A=
}=0A=
}=0A=
=0A=
=0A=
/************************************************=0A=
* SCROLLING=0A=
************************************************/=0A=
=0A=
var que =3D [];=0A=
var pending =3D false;=0A=
var lastScroll =3D +new Date;=0A=
=0A=
/**=0A=
* Pushes scroll actions to the scrolling queue.=0A=
*/=0A=
function scrollArray(elem, left, top, delay) {=0A=
=0A=
delay || (delay =3D 1000);=0A=
directionCheck(left, top);=0A=
=0A=
if (options.accelerationMax !=3D 1) {=0A=
var now =3D +new Date;=0A=
var elapsed =3D now - lastScroll;=0A=
if (elapsed < options.accelerationDelta) {=0A=
var factor =3D (1 + (30 / elapsed)) / 2;=0A=
if (factor > 1) {=0A=
factor =3D Math.min(factor, options.accelerationMax);=0A=
left *=3D factor;=0A=
top *=3D factor;=0A=
}=0A=
}=0A=
lastScroll =3D +new Date;=0A=
}=0A=
=0A=
// push a scroll command=0A=
que.push({=0A=
x: left,=0A=
y: top,=0A=
lastX: (left < 0) ? 0.99 : -0.99,=0A=
lastY: (top < 0) ? 0.99 : -0.99,=0A=
start: +new Date=0A=
});=0A=
=0A=
// don't act if there's a pending queue=0A=
if (pending) {=0A=
return;=0A=
}=0A=
=0A=
var scrollWindow =3D (elem =3D=3D=3D document.body);=0A=
=0A=
var step =3D function (time) {=0A=
=0A=
var now =3D +new Date;=0A=
var scrollX =3D 0;=0A=
var scrollY =3D 0;=0A=
=0A=
for (var i =3D 0; i < que.length; i++) {=0A=
=0A=
var item =3D que[i];=0A=
var elapsed =3D now - item.start;=0A=
var finished =3D (elapsed >=3D options.animationTime);=0A=
=0A=
// scroll position: [0, 1]=0A=
var position =3D (finished) ? 1 : elapsed / =
options.animationTime;=0A=
=0A=
// easing [optional]=0A=
if (options.pulseAlgorithm) {=0A=
position =3D pulse(position);=0A=
}=0A=
=0A=
// only need the difference=0A=
var x =3D (item.x * position - item.lastX) >> 0;=0A=
var y =3D (item.y * position - item.lastY) >> 0;=0A=
=0A=
// add this to the total scrolling=0A=
scrollX +=3D x;=0A=
scrollY +=3D y;=0A=
=0A=
// update last values=0A=
item.lastX +=3D x;=0A=
item.lastY +=3D y;=0A=
=0A=
// delete and step back if it's over=0A=
if (finished) {=0A=
que.splice(i, 1); i--;=0A=
}=0A=
}=0A=
=0A=
// scroll left and top=0A=
if (scrollWindow) {=0A=
window.scrollBy(scrollX, scrollY);=0A=
}=0A=
else {=0A=
if (scrollX) elem.scrollLeft +=3D scrollX;=0A=
if (scrollY) elem.scrollTop +=3D scrollY;=0A=
}=0A=
=0A=
// clean up if there's nothing left to do=0A=
if (!left && !top) {=0A=
que =3D [];=0A=
}=0A=
=0A=
if (que.length) {=0A=
requestFrame(step, elem, (delay / options.frameRate + =
1));=0A=
} else {=0A=
pending =3D false;=0A=
}=0A=
};=0A=
=0A=
// start a new queue of actions=0A=
requestFrame(step, elem, 0);=0A=
pending =3D true;=0A=
}=0A=
=0A=
=0A=
/***********************************************=0A=
* EVENTS=0A=
***********************************************/=0A=
=0A=
/**=0A=
* Mouse wheel handler.=0A=
* @param {Object} event=0A=
*/=0A=
function wheel(event) {=0A=
=0A=
if (!initDone) {=0A=
init();=0A=
}=0A=
=0A=
var target =3D event.target;=0A=
var overflowing =3D overflowingAncestor(target);=0A=
=0A=
// use default if there's no overflowing=0A=
// element or default action is prevented=0A=
if (!overflowing || event.defaultPrevented ||=0A=
isNodeName(activeElement, "embed") ||=0A=
(isNodeName(target, "embed") && /\.pdf/i.test(target.src))) {=0A=
return true;=0A=
}=0A=
=0A=
var deltaX =3D event.wheelDeltaX || 0;=0A=
var deltaY =3D event.wheelDeltaY || 0;=0A=
=0A=
// use wheelDelta if deltaX/Y is not available=0A=
if (!deltaX && !deltaY) {=0A=
deltaY =3D event.wheelDelta || 0;=0A=
}=0A=
=0A=
// check if it's a touchpad scroll that should be ignored=0A=
if (!options.touchpadSupport && isTouchpad(deltaY)) {=0A=
return true;=0A=
}=0A=
=0A=
// scale by step size=0A=
// delta is 120 most of the time=0A=
// synaptics seems to send 1 sometimes=0A=
if (Math.abs(deltaX) > 1.2) {=0A=
deltaX *=3D options.stepSize / 120;=0A=
}=0A=
if (Math.abs(deltaY) > 1.2) {=0A=
deltaY *=3D options.stepSize / 120;=0A=
}=0A=
=0A=
scrollArray(overflowing, -deltaX, -deltaY);=0A=
event.preventDefault();=0A=
}=0A=
=0A=
/**=0A=
* Keydown event handler.=0A=
* @param {Object} event=0A=
*/=0A=
function keydown(event) {=0A=
=0A=
var target =3D event.target;=0A=
var modifier =3D event.ctrlKey || event.altKey || event.metaKey =
||=0A=
(event.shiftKey && event.keyCode !=3D=3D key.spacebar);=0A=
=0A=
// do nothing if user is editing text=0A=
// or using a modifier key (except shift)=0A=
// or in a dropdown=0A=
if ( /input|textarea|select|embed/i.test(target.nodeName) ||=0A=
target.isContentEditable ||=0A=
event.defaultPrevented ||=0A=
modifier ) {=0A=
return true;=0A=
}=0A=
// spacebar should trigger button press=0A=
if (isNodeName(target, "button") &&=0A=
event.keyCode =3D=3D=3D key.spacebar) {=0A=
return true;=0A=
}=0A=
=0A=
var shift, x =3D 0, y =3D 0;=0A=
var elem =3D overflowingAncestor(activeElement);=0A=
var clientHeight =3D elem.clientHeight;=0A=
=0A=
if (elem =3D=3D document.body) {=0A=
clientHeight =3D window.innerHeight;=0A=
}=0A=
=0A=
switch (event.keyCode) {=0A=
case key.up:=0A=
y =3D -options.arrowScroll;=0A=
break;=0A=
case key.down:=0A=
y =3D options.arrowScroll;=0A=
break;=0A=
case key.spacebar: // (+ shift)=0A=
shift =3D event.shiftKey ? 1 : -1;=0A=
y =3D -shift * clientHeight * 0.9;=0A=
break;=0A=
case key.pageup:=0A=
y =3D -clientHeight * 0.9;=0A=
break;=0A=
case key.pagedown:=0A=
y =3D clientHeight * 0.9;=0A=
break;=0A=
case key.home:=0A=
y =3D -elem.scrollTop;=0A=
break;=0A=
case key.end:=0A=
var damt =3D elem.scrollHeight - elem.scrollTop - =
clientHeight;=0A=
y =3D (damt > 0) ? damt+10 : 0;=0A=
break;=0A=
case key.left:=0A=
x =3D -options.arrowScroll;=0A=
break;=0A=
case key.right:=0A=
x =3D options.arrowScroll;=0A=
break;=0A=
default:=0A=
return true; // a key we don't care about=0A=
}=0A=
=0A=
scrollArray(elem, x, y);=0A=
event.preventDefault();=0A=
}=0A=
=0A=
/**=0A=
* Mousedown event only for updating activeElement=0A=
*/=0A=
function mousedown(event) {=0A=
activeElement =3D event.target;=0A=
}=0A=
=0A=
=0A=
/***********************************************=0A=
* OVERFLOW=0A=
***********************************************/=0A=
=0A=
var cache =3D {}; // cleared out every once in while=0A=
setInterval(function () { cache =3D {}; }, 10 * 1000);=0A=
=0A=
var uniqueID =3D (function () {=0A=
var i =3D 0;=0A=
return function (el) {=0A=
return el.uniqueID || (el.uniqueID =3D i++);=0A=
};=0A=
})();=0A=
=0A=
function setCache(elems, overflowing) {=0A=
for (var i =3D elems.length; i--;)=0A=
cache[uniqueID(elems[i])] =3D overflowing;=0A=
return overflowing;=0A=
}=0A=
=0A=
function overflowingAncestor(el) {=0A=
var elems =3D [];=0A=
var rootScrollHeight =3D root.scrollHeight;=0A=
do {=0A=
var cached =3D cache[uniqueID(el)];=0A=
if (cached) {=0A=
return setCache(elems, cached);=0A=
}=0A=
elems.push(el);=0A=
if (rootScrollHeight =3D=3D=3D el.scrollHeight) {=0A=
if (!isFrame || root.clientHeight + 10 < =
rootScrollHeight) {=0A=
return setCache(elems, document.body); // scrolling =
root in WebKit=0A=
}=0A=
} else if (el.clientHeight + 10 < el.scrollHeight) {=0A=
overflow =3D getComputedStyle(el, =
"").getPropertyValue("overflow-y");=0A=
if (overflow =3D=3D=3D "scroll" || overflow =3D=3D=3D =
"auto") {=0A=
return setCache(elems, el);=0A=
}=0A=
}=0A=
} while (el =3D el.parentNode);=0A=
}=0A=
=0A=
=0A=
/***********************************************=0A=
* HELPERS=0A=
***********************************************/=0A=
=0A=
function addEvent(type, fn, bubble) {=0A=
window.addEventListener(type, fn, (bubble||false));=0A=
}=0A=
=0A=
function removeEvent(type, fn, bubble) {=0A=
window.removeEventListener(type, fn, (bubble||false));=0A=
}=0A=
=0A=
function isNodeName(el, tag) {=0A=
return (el.nodeName||"").toLowerCase() =3D=3D=3D =
tag.toLowerCase();=0A=
}=0A=
=0A=
function directionCheck(x, y) {=0A=
x =3D (x > 0) ? 1 : -1;=0A=
y =3D (y > 0) ? 1 : -1;=0A=
if (direction.x !=3D=3D x || direction.y !=3D=3D y) {=0A=
direction.x =3D x;=0A=
direction.y =3D y;=0A=
que =3D [];=0A=
lastScroll =3D 0;=0A=
}=0A=
}=0A=
=0A=
var deltaBufferTimer;=0A=
=0A=
function isTouchpad(deltaY) {=0A=
if (!deltaY) return;=0A=
deltaY =3D Math.abs(deltaY)=0A=
deltaBuffer.push(deltaY);=0A=
deltaBuffer.shift();=0A=
clearTimeout(deltaBufferTimer);=0A=
deltaBufferTimer =3D setTimeout(function () {=0A=
chrome.storage.local.set({ deltaBuffer: deltaBuffer });=0A=
}, 1000);=0A=
var allEquals =3D (deltaBuffer[0] =3D=3D deltaBuffer[1] &&=0A=
deltaBuffer[1] =3D=3D deltaBuffer[2]);=0A=
var allDivisable =3D (isDivisible(deltaBuffer[0], 120) &&=0A=
isDivisible(deltaBuffer[1], 120) &&=0A=
isDivisible(deltaBuffer[2], 120));=0A=
return !(allEquals || allDivisable);=0A=
}=0A=
=0A=
function isDivisible(n, divisor) {=0A=
return (Math.floor(n / divisor) =3D=3D n / divisor);=0A=
}=0A=
=0A=
if(typeof(chrome) !=3D=3D 'undefined' && typeof(chrome.storage) =
!=3D=3D 'undefined') {=0A=
chrome.storage.local.get('deltaBuffer', function (stored) {=0A=
if (stored.deltaBuffer) {=0A=
deltaBuffer =3D stored.deltaBuffer;=0A=
}=0A=
});=0A=
}=0A=
=0A=
var requestFrame =3D (function () {=0A=
return window.requestAnimationFrame ||=0A=
window.webkitRequestAnimationFrame ||=0A=
function (callback, element, delay) {=0A=
window.setTimeout(callback, delay || (1000/60));=0A=
};=0A=
})();=0A=
=0A=
var MutationObserver =3D window.MutationObserver || =
window.WebKitMutationObserver;=0A=
=0A=
=0A=
/***********************************************=0A=
* PULSE=0A=
***********************************************/=0A=
=0A=
/**=0A=
* Viscous fluid with a pulse for part and decay for the rest.=0A=
* - Applies a fixed force over an interval (a damped acceleration), =
and=0A=
* - Lets the exponential bleed away the velocity over a longer =
interval=0A=
* - Michael Herf, http://stereopsis.com/stopping/=0A=
*/=0A=
function pulse_(x) {=0A=
var val, start, expx;=0A=
// test=0A=
x =3D x * options.pulseScale;=0A=
if (x < 1) { // acceleartion=0A=
val =3D x - (1 - Math.exp(-x));=0A=
} else { // tail=0A=
// the previous animation ended here:=0A=
start =3D Math.exp(-1);=0A=
// simple viscous drag=0A=
x -=3D 1;=0A=
expx =3D 1 - Math.exp(-x);=0A=
val =3D start + (expx * (1 - start));=0A=
}=0A=
return val * options.pulseNormalize;=0A=
}=0A=
=0A=
function pulse(x) {=0A=
if (x >=3D 1) return 1;=0A=
if (x <=3D 0) return 0;=0A=
=0A=
if (options.pulseNormalize =3D=3D 1) {=0A=
options.pulseNormalize /=3D pulse_(1);=0A=
}=0A=
return pulse_(x);=0A=
}=0A=
=0A=
addEvent("mousedown", mousedown);=0A=
addEvent("mousewheel", wheel);=0A=
addEvent("load", init);=0A=
} //end smooth scroll=0A=
=0A=
------=_NextPart_000_0000_01D35A73.CC4047E0
Content-Type: application/octet-stream
Content-Transfer-Encoding: quoted-printable
Content-Location: http://www.alquds.co.uk/wp-content/themes/Newspaper/js/full_compact/site.js?ver=4.2
"use strict";=0A=
=0A=
/* =
-------------------------------------------------------------------------=
---=0A=
td_detect - browser detection object (instance)=0A=
v1.1=0A=
*/=0A=
=0A=
var td_detect =3D new function () {=0A=
=0A=
//constructor=0A=
this.is_ie8 =3D false;=0A=
this.is_ie9 =3D false;=0A=
this.is_ie10 =3D false;=0A=
this.is_ie11 =3D false;=0A=
this.is_ie =3D false;=0A=
this.is_safary =3D false;=0A=
this.is_chrome =3D false;=0A=
this.is_ipad =3D false;=0A=
=0A=
this.is_touch_device =3D false;=0A=
=0A=
this.has_history =3D false;=0A=
=0A=
this.is_phone_screen =3D false;=0A=
=0A=
this.is_ios =3D false;=0A=
=0A=
// is touch device ?=0A=
this.is_touch_device =3D !!('ontouchstart' in window);=0A=
=0A=
this.is_mobile_device =3D false;=0A=
=0A=
// detect ie8=0A=
if (jQuery('html').is('.ie8')) {=0A=
this.is_ie8 =3D true;=0A=
this.is_ie =3D true;=0A=
}=0A=
=0A=
=0A=
=0A=
// detect ie9=0A=
if (jQuery('html').is('.ie9')) {=0A=
this.is_ie9 =3D true;=0A=
this.is_ie =3D true;=0A=
}=0A=
=0A=
// detect ie10 - also adds the ie10 class //it also detects windows =
mobile IE as IE10=0A=
if(navigator.userAgent.indexOf("MSIE 10.0") > -1){=0A=
jQuery("html").addClass("ie10");=0A=
this.is_ie10 =3D true;=0A=
this.is_ie =3D true;=0A=
//alert('10');=0A=
}=0A=
=0A=
//ie 11 check - also adds the ie11 class - it may detect ie on =
windows mobile=0A=
if(!!navigator.userAgent.match(/Trident.*rv\:11\./)){=0A=
jQuery("html").addClass("ie11");=0A=
this.is_ie11 =3D true;=0A=
//this.is_ie =3D true; //do not flag ie11 as is_ie=0A=
//alert('11');=0A=
}=0A=
=0A=
=0A=
//do we have html5 history support?=0A=
if (window.history && window.history.pushState) {=0A=
this.has_history =3D true;=0A=
}=0A=
=0A=
//check for safary=0A=
if (navigator.userAgent.indexOf('Safari') !=3D -1 && =
navigator.userAgent.indexOf('Chrome') =3D=3D -1) {=0A=
this.is_safary =3D true;=0A=
}=0A=
=0A=
//chrome and chrome-ium check=0A=
this.is_chrome =3D =
/chrom(e|ium)/.test(navigator.userAgent.toLowerCase());=0A=
=0A=
this.is_ipad =3D navigator.userAgent.match(/iPad/i) !=3D null;=0A=
=0A=
=0A=
=0A=
this.is_ios =3D /(iPad|iPhone|iPod)/g.test( navigator.userAgent );=0A=
=0A=
=0A=
//detect if we run on a mobile device - ipad included - used by the =
modal / scroll to @see scroll_into_view=0A=
if( /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera =
Mini/i.test(navigator.userAgent) ) {=0A=
this.is_mobile_device =3D true;=0A=
}=0A=
=0A=
/**=0A=
* function to check the phone screen=0A=
* @see td_events=0A=
* The jQuery windows width is not reliable cross browser!=0A=
*/=0A=
this.run_is_phone_screen =3D function () {=0A=
if ((jQuery(window).width() < 768 || jQuery(window).height() < =
768) && this.is_ipad =3D=3D=3D false) {=0A=
this.is_phone_screen =3D true;=0A=
=0A=
} else {=0A=
this.is_phone_screen =3D false;=0A=
}=0A=
=0A=
//console.log(this.is_phone_screen + ' ' + =
jQuery(window).width() + ' ' + jQuery(window).height());=0A=
}=0A=
=0A=
=0A=
=0A=
this.run_is_phone_screen();=0A=
=0A=
=0A=
=0A=
};=0A=
=0A=
=0A=
=0A=
=0A=
/* =
-------------------------------------------------------------------------=
---=0A=
tagDiv magic cache=0A=
v1.0=0A=
*/=0A=
var td_local_cache =3D {=0A=
data: {},=0A=
remove: function (resurce_id) {=0A=
delete td_local_cache.data[resurce_id];=0A=
},=0A=
exist: function (resurce_id) {=0A=
return td_local_cache.data.hasOwnProperty(resurce_id) && =
td_local_cache.data[resurce_id] !=3D=3D null;=0A=
},=0A=
get: function (resurce_id) {=0A=
return td_local_cache.data[resurce_id];=0A=
},=0A=
set: function (resurce_id, cachedData) {=0A=
td_local_cache.remove(resurce_id);=0A=
td_local_cache.data[resurce_id] =3D cachedData;=0A=
}=0A=
};=0A=
=0A=
/*=0A=
td_util.js=0A=
v1.1=0A=
*/=0A=
=0A=
"use strict";=0A=
=0A=
=0A=
=0A=
/* =
-------------------------------------------------------------------------=
---=0A=
tagDiv utility class=0A=
*/=0A=
var td_util =3D {=0A=
=0A=
=0A=
/**=0A=
* utility function, used by td_post_images.js=0A=
* @param class_selector=0A=
*/=0A=
image_move_class_to_figure: function (class_selector) {=0A=
jQuery('figure .' + class_selector).each(function() {=0A=
jQuery(this).parent().parent().addClass(class_selector);=0A=
jQuery(this).removeClass(class_selector);=0A=
});=0A=
},=0A=
=0A=
=0A=
=0A=
/**=0A=
* safe function to read variables passed by the theme via the js =
buffer. If by some kind of error the variable is missing from the global =
scope, this function will return false=0A=
* @param variable_name=0A=
* @returns {*}=0A=
*/=0A=
get_backend_var: function(variable_name) {=0A=
if (typeof window[variable_name] =3D=3D=3D 'undefined') {=0A=
return '';=0A=
}=0A=
return window[variable_name];=0A=
},=0A=
=0A=
=0A=
=0A=
/**=0A=
* scrolls to a dom element=0A=
* @param dom_element=0A=
*/=0A=
scroll_to_element: function(dom_element, duration) {=0A=
td_is_scrolling_animation =3D true;=0A=
jQuery("html, body").stop();=0A=
=0A=
=0A=
var dest;=0A=
=0A=
//calculate destination place=0A=
if (dom_element.offset().top > jQuery(document).height() - =
jQuery(window).height()) {=0A=
dest =3D jQuery(document).height() - jQuery(window).height();=0A=
} else {=0A=
dest =3D dom_element.offset().top;=0A=
}=0A=
//go to destination=0A=
jQuery("html, body").animate({ scrollTop: dest }, {=0A=
duration: duration,=0A=
easing:'easeInOutQuart',=0A=
complete: function(){=0A=
td_is_scrolling_animation =3D false;=0A=
}=0A=
}=0A=
);=0A=
},=0A=
=0A=
=0A=
/**=0A=
* scrolls to a dom element - the element will be close to the =
center of the screen=0A=
* !!! compensates for long distances !!!=0A=
*/=0A=
scroll_into_view: function (dom_element) {=0A=
=0A=
if (td_detect.is_mobile_device =3D=3D=3D true) {=0A=
return; //do not run on any mobile device=0A=
}=0A=
=0A=
td_is_scrolling_animation =3D true;=0A=
jQuery("html, body").stop();=0A=
=0A=
=0A=
var destination =3D dom_element.offset().top;=0A=
destination =3D destination - 150;=0A=
=0A=
var distance =3D Math.abs(jQuery(window).scrollTop() - =
destination);=0A=
var computed_time =3D distance / 5;=0A=
//console.log(distance + ' -> ' + computed_time + ' -> ' + =
(1100+computed_time));=0A=
=0A=
//go to destination=0A=
jQuery("html, body").animate({ scrollTop: destination }, {=0A=
duration: 1100 + computed_time,=0A=
easing:'easeInOutQuart',=0A=
complete: function(){=0A=
td_is_scrolling_animation =3D false;=0A=
}=0A=
}=0A=
);=0A=
},=0A=
=0A=
/**=0A=
* scrolls to a position=0A=
* @param px_from_top - pixels from top=0A=
*/=0A=
scroll_to_position: function(px_from_top, duration) {=0A=
td_is_scrolling_animation =3D true;=0A=
jQuery("html, body").stop();=0A=
=0A=
//go to destination=0A=
jQuery("html, body").animate({ scrollTop: px_from_top }, {=0A=
duration: duration,=0A=
easing:'easeInOutQuart',=0A=
complete: function(){=0A=
td_is_scrolling_animation =3D false;=0A=
}=0A=
}=0A=
);=0A=
},=0A=
td_move_y: function td_move_Y (elm, value) {=0A=
var translate =3D 'translate3d(0px,' + value + 'px, 0px)';=0A=
elm.style['-webkit-transform'] =3D translate;=0A=
elm.style['-moz-transform'] =3D translate;=0A=
elm.style['-ms-transform'] =3D translate;=0A=
elm.style['-o-transform'] =3D translate;=0A=
elm.style.transform =3D translate;=0A=
}=0A=
=0A=
=0A=
};=0A=
=0A=
=0A=
/**=0A=
* Created by ra on 6/27/14.=0A=
* copyright tagDiv 2014=0A=
*/=0A=
=0A=
=0A=
var td_affix =3D {=0A=
=0A=
//settings, obtained from ext=0A=
menu_selector: '', //the affix menu (this element will get the =
td-affix)=0A=
menu_wrap_selector: '', //the menu wrapper / placeholder=0A=
tds_snap_menu: '', //the panel setting=0A=
=0A=
=0A=
top_offset: 0, //how much the menu is moved from the original =
position when it's affixed=0A=
menu_offset: 0, //used to hide the menu on scroll=0A=
is_requestAnimationFrame_running:false, //prevent multiple calls to =
requestAnimationFrame=0A=
is_menu_affix: false, //the current state of the menu, true if the =
menu is affix=0A=
is_top_menu:false, //true when the menu is at the top of the screen =
(0px topScroll)=0A=
=0A=
//menu offset boundaries - so we do not fire the animation event =
when the boundary is hit=0A=
menu_offset_max_hit: false,=0A=
menu_offset_min_hit: true,=0A=
=0A=
=0A=
scroll_window_scrollTop_last: 0, //last scrollTop position, used to =
calculate the scroll direction=0A=
=0A=
/**=0A=
* run the affix, we use the menu wrap selector to compute the menu =
position from top=0A=
*=0A=
{=0A=
menu_selector: '.td-header-main-menu',=0A=
menu_wrap_selector: '.td-header-menu-wrap',=0A=
tds_snap_menu: td_util.get_backend_var('tds_snap_menu')=0A=
}=0A=
*/=0A=
init : function init (atts) {=0A=
=0A=
//read the settings=0A=
td_affix.menu_selector =3D atts.menu_selector;=0A=
td_affix.menu_wrap_selector =3D atts.menu_wrap_selector;=0A=
td_affix.tds_snap_menu =3D atts.tds_snap_menu;=0A=
=0A=
//the snap menu is disabled from the panel=0A=
if (!td_affix.tds_snap_menu) {=0A=
return;=0A=
}=0A=
=0A=
//compute on semi dom ready=0A=
td_affix.compute_top();=0A=
=0A=
=0A=
//recompute when all the page + logos are loaded=0A=
jQuery(window).load(function() {=0A=
td_affix.compute_top();=0A=
=0A=
//recompute after 1 sec for retarded phones=0A=
setTimeout(function(){=0A=
td_affix.compute_top();=0A=
}, 1000);=0A=
});=0A=
=0A=
=0A=
=0A=
=0A=
},=0A=
=0A=
/**=0A=
* called by td_events.js on scroll=0A=
*/=0A=
td_events_scroll: function td_events_scroll(scrollTop) {=0A=
=0A=
//do not run if we don't have a snap menu=0A=
if (!td_affix.tds_snap_menu) {=0A=
return;=0A=
}=0A=
=0A=
=0A=
/* =
-------------------------------------------------------------------------=
---=0A=
scroll direction + delta (used by affix for now)=0A=
to run thios code:=0A=
- td_affix.tds_snap_menu !=3D '' (from above)=0A=
- td_affix.tds_snap_menu !=3D 'snap'=0A=
*/=0A=
if (td_affix.tds_snap_menu !=3D 'snap') { //do not run on snap=0A=
if ((td_affix.tds_snap_menu !=3D 'smart_snap_mobile' || =
td_detect.is_phone_screen =3D=3D=3D true)) { // different from =
smart_snap_mobile or td_detect.is_phone_screen =3D=3D=3D true=0A=
//console.log('rrr');=0A=
var scroll_direction =3D '';=0A=
var scrollDelta =3D 0;=0A=
=0A=
//check the direction=0A=
if (scrollTop !=3D =
td_affix.scroll_window_scrollTop_last) { //compute direction only if we =
have different last scroll top=0A=
// compute the direction of the scroll=0A=
if (scrollTop > =
td_affix.scroll_window_scrollTop_last) {=0A=
scroll_direction =3D 'down';=0A=
} else {=0A=
scroll_direction =3D 'up';=0A=
}=0A=
//calculate the scroll delta=0A=
scrollDelta =3D Math.abs(scrollTop - =
td_affix.scroll_window_scrollTop_last);=0A=
}=0A=
=0A=
td_affix.scroll_window_scrollTop_last =3D scrollTop;=0A=
}=0A=
}=0A=
=0A=
/* =
-------------------------------------------------------------------------=
--- */=0A=
=0A=
=0A=
=0A=
//if the menu is in the affix state=0A=
if (scrollTop > td_affix.top_offset || td_affix.is_top_menu =
=3D=3D=3D true) {=0A=
=0A=
//get the menu element=0A=
var td_affix_menu_element =3D jQuery(td_affix.menu_selector);=0A=
=0A=
//turn affix on for it=0A=
td_affix._affix_on(td_affix_menu_element);=0A=
=0A=
=0A=
//if the menu is only with snap or we are on =
smart_snap_mobile + mobile, our job here in this function is done, return=0A=
if (td_affix.tds_snap_menu =3D=3D 'snap' || =
(td_affix.tds_snap_menu =3D=3D'smart_snap_mobile' && =
td_detect.is_phone_screen =3D=3D=3D false)) {=0A=
return;=0A=
}=0A=
=0A=
/* --- end simple snap --- */=0A=
=0A=
=0A=
/* =
-------------------------------------------------------------------------=
---=0A=
check scroll directions (we may also have =
scroll_direction =3D '', that's why we have to check for the specific =
state (up or down))=0A=
*/=0A=
=0A=
=0A=
=0A=
// boundary check - to not run the position on each scroll =
event=0A=
if ((td_affix.menu_offset_max_hit =3D=3D=3D false && =
scroll_direction=3D=3D'down') || (td_affix.menu_offset_min_hit =3D=3D=3D =
false && scroll_direction=3D=3D'up')) {=0A=
//request animation frame=0A=
if (td_affix.is_requestAnimationFrame_running =3D=3D=3D =
false) {=0A=
window.requestAnimationFrame(function(){=0A=
=0A=
var offset =3D 0;=0A=
=0A=
if (scroll_direction =3D=3D 'down') {=0A=
//compute the offset=0A=
offset =3D td_affix.menu_offset-scrollDelta;=0A=
if (offset < -80) {=0A=
offset =3D -80;=0A=
}=0A=
} else if (scroll_direction =3D=3D 'up') {=0A=
//compute the offset=0A=
offset =3D td_affix.menu_offset+scrollDelta;=0A=
if (offset > 0) {=0A=
offset =3D 0;=0A=
}=0A=
}=0A=
=0A=
=0A=
td_affix.is_requestAnimationFrame_running =3D =
true;=0A=
=0A=
//move the menu=0A=
td_util.td_move_y(td_affix_menu_element[0], =
offset);=0A=
//td_affix_menu_element.css({top: (offset) + =
'px'}); //legacy menu move code=0A=
=0A=
//check boundaries=0A=
if (offset =3D=3D 0) {=0A=
td_affix.menu_offset_min_hit =3D true;=0A=
} else {=0A=
td_affix.menu_offset_min_hit =3D false;=0A=
}=0A=
=0A=
if (offset =3D=3D -80) {=0A=
td_affix.menu_offset_max_hit =3D true;=0A=
//also hide the menu when it's 100% out of =
view on ios - the safari header is transparent and we can see the menu=0A=
if(td_detect.is_ios =3D=3D=3D true) {=0A=
td_affix_menu_element.hide();=0A=
}=0A=
} else {=0A=
td_affix.menu_offset_max_hit =3D false;=0A=
=0A=
if(td_detect.is_ios =3D=3D=3D true) { //ios =
safari fix=0A=
td_affix_menu_element.show();=0A=
}=0A=
}=0A=
=0A=
=0A=
td_affix.is_requestAnimationFrame_running =3D =
false;=0A=
=0A=
=0A=
=0A=
=0A=
td_affix.menu_offset =3D offset; //update the =
current offset of the menu=0A=
=0A=
=0A=
},td_affix_menu_element[0]);=0A=
=0A=
}=0A=
//console.log(offset + ' ' + scroll_direction);=0A=
=0A=
} //end boundary check=0A=
=0A=
=0A=
=0A=
} else {=0A=
td_affix._affix_off(jQuery(td_affix.menu_selector));=0A=
}=0A=
=0A=
},=0A=
=0A=
=0A=
/**=0A=
* calculates the affix point (the distance from the top when affix =
should be enabled)=0A=
* @see td_affix.init()=0A=
* @see td_events=0A=
*/=0A=
compute_top: function compute_top() {=0A=
td_affix.top_offset =3D =
jQuery(td_affix.menu_wrap_selector).offset().top;=0A=
=0A=
//check to see if the menu is at the top of the screen=0A=
if (td_affix.top_offset =3D=3D 1) {=0A=
//switch to affix - because the menu is at the top of the =
page=0A=
//td_affix._affix_on(jQuery(td_affix.menu_selector));=0A=
td_affix.is_top_menu =3D true;=0A=
} else {=0A=
//check to see the current top offset=0A=
td_affix.is_top_menu =3D false;=0A=
=0A=
}=0A=
td_affix.td_events_scroll(jQuery(window).scrollTop());=0A=
=0A=
//alert(td_affix.top_offset);=0A=
//console.log('computed: ' + td_affix.top_offset);=0A=
},=0A=
=0A=
=0A=
=0A=
/**=0A=
* turns affix on for the menu element=0A=
* @param td_affix_menu_element=0A=
* @private=0A=
*/=0A=
_affix_on: function _affix_on(td_affix_menu_element) {=0A=
if (td_affix.is_menu_affix =3D=3D=3D false) {=0A=
//make the menu fixed=0A=
td_affix_menu_element.addClass('td-affix');=0A=
=0A=
//add body-td-affix class on body for header style 8 -> when =
scrolling down the window jumps 76px up when the menu is changing from =
header style 8 default to header style 8 affix=0A=
jQuery('body').addClass('body-td-affix');=0A=
=0A=
td_affix.is_menu_affix =3D true;=0A=
}=0A=
},=0A=
=0A=
=0A=
=0A=
/**=0A=
* Turns affix off for the menu element=0A=
* @param td_affix_menu_element=0A=
* @private=0A=
*/=0A=
_affix_off: function _affix_on(td_affix_menu_element) {=0A=
if (td_affix.is_menu_affix =3D=3D=3D true) {=0A=
//make the menu normal=0A=
jQuery(td_affix.menu_selector).removeClass('td-affix');=0A=
=0A=
//remove body-td-affix class on body for header style 8 -> =
when scrolling down the window jumps 76px up when the menu is changing =
from header style 8 default to header style 8 affix=0A=
jQuery('body').removeClass('body-td-affix');=0A=
=0A=
td_affix.is_menu_affix =3D false;=0A=
=0A=
//move the menu to 0 (ios seems to skip animation frames)=0A=
td_util.td_move_y(td_affix_menu_element[0], 0);=0A=
=0A=
if(td_detect.is_ios =3D=3D=3D true) {=0A=
td_affix_menu_element.show();=0A=
}=0A=
=0A=
}=0A=
}=0A=
=0A=
=0A=
=0A=
}=0A=
=0A=
=0A=
=0A=
/* =
-------------------------------------------------------------------------=
---=0A=
Affix menu=0A=
*/=0A=
td_affix.init({=0A=
menu_selector: '.td-menu-background',=0A=
menu_wrap_selector: '.td-menu-placeholder',=0A=
tds_snap_menu: td_util.get_backend_var('tds_snap_menu')=0A=
});=0A=
=0A=
=0A=
=0A=
=0A=
/*=0A=
tagDiv - 2014 - Newspaper WordPress theme v4.0=0A=
Our portfolio: http://themeforest.net/user/tagDiv/portfolio=0A=
=0A=
Thanks for using our theme! :)=0A=
*/=0A=
=0A=
=0A=
=0A=
=0A=
=0A=
var td_is_slide_moving =3D false; //disable touch when the touch sliders =
are moving=0A=
=0A=
=0A=
=0A=
=0A=
/* =
-------------------------------------------------------------------------=
---=0A=
Menu script=0A=
*/=0A=
=0A=
jQuery('#td-top-menu .sf-menu').supersubs({=0A=
minWidth: 10, // minimum width of sub-menus in em units=0A=
maxWidth: 40, // maximum width of sub-menus in em units=0A=
extraWidth: 1 // extra width can ensure lines don't sometimes turn =
over=0A=
});=0A=
=0A=
if (td_detect.is_touch_device) {=0A=
//touch=0A=
jQuery('#td-top-menu .sf-menu').superfish({=0A=
delay:300,=0A=
speed:'fast',=0A=
useClick:true=0A=
});=0A=
} else {=0A=
//not touch=0A=
jQuery('#td-top-menu .sf-menu').superfish({=0A=
delay:500,=0A=
speed:200,=0A=
useClick:false=0A=
});=0A=
}=0A=
=0A=
/* =
-------------------------------------------------------------------------=
---=0A=
On load=0A=
*/=0A=
jQuery().ready(function jQuery_ready() {=0A=
=0A=
=0A=
=0A=
//resize all the videos if we have them=0A=
td_resize_videos();=0A=
=0A=
=0A=
=0A=
=0A=
=0A=
=0A=
=0A=
=0A=
=0A=
//put focus on search box in blog header=0A=
jQuery('#search-button').click(function(){=0A=
jQuery(this).delay(200).queue(function(){=0A=
document.getElementById("td-header-search").focus();=0A=
jQuery(this).dequeue();=0A=
});=0A=
});=0A=
=0A=
=0A=
//retina images=0A=
td_retina();=0A=
=0A=
//colorbox=0A=
jQuery('.td-featured-img').colorbox({=0A=
maxWidth:"95%",=0A=
maxHeight:"95%",=0A=
fixed:true=0A=
});=0A=
=0A=
=0A=
=0A=
=0A=
=0A=
td_ajax_search();=0A=
=0A=
=0A=
//srun the mobile menu on phones and on desktop (no ipad or big =
tablets with touch)=0A=
if (td_detect.is_phone_screen || td_detect.is_touch_device =3D=3D=3D =
false) {=0A=
//alert('mobile menu');=0A=
td_mobile_menu2();=0A=
}=0A=
=0A=
=0A=
=0A=
=0A=
=0A=
=0A=
=0A=
td_fake_clicks();=0A=
=0A=
=0A=
=0A=
=0A=
=0A=
=0A=
=0A=
//fake placeholder for ie=0A=
jQuery('input, textarea').placeholder();=0A=
=0A=
=0A=
=0A=
//more stories box=0A=
td_more_articles_box.init();=0A=
=0A=
=0A=
=0A=
if (td_detect.is_chrome =3D=3D=3D true || td_detect.is_ie10 || =
td_detect.is_ie11) {=0A=
td_smooth_scroll();=0A=
}=0A=
=0A=
=0A=
setTimeout(function(){=0A=
td_resize_page_sliders()=0A=
}, 1500);=0A=
=0A=
}); //end on load=0A=
=0A=
=0A=
/**=0A=
* windlow.load=0A=
*/=0A=
jQuery(window).load(function() {=0A=
td_resize_page_sliders();=0A=
});=0A=
=0A=
=0A=
=0A=
/* =
-------------------------------------------------------------------------=
---=0A=
Scroll to top + animation stop=0A=
*/=0A=
=0A=
var td_is_scrolling_animation =3D false;=0A=
var td_mouse_wheel_or_touch_moved =3D false; //we want to know if the =
user stopped the animation via touch or mouse move=0A=
=0A=
//stop the animation on mouse wheel=0A=
jQuery(document).bind('mousewheel DOMMouseScroll MozMousePixelScroll', =
function(e){=0A=
if (td_is_scrolling_animation =3D=3D=3D false) {=0A=
return;=0A=
} else {=0A=
td_is_scrolling_animation =3D false;=0A=
td_mouse_wheel_or_touch_moved =3D true;=0A=
=0A=
jQuery("html, body").stop();=0A=
}=0A=
});=0A=
=0A=
//stop the animation on touch=0A=
if (document.addEventListener){=0A=
document.addEventListener('touchmove', function(e) {=0A=
if (td_is_scrolling_animation =3D=3D=3D false) {=0A=
return;=0A=
} else {=0A=
td_is_scrolling_animation =3D false;=0A=
td_mouse_wheel_or_touch_moved =3D true;=0A=
jQuery("html, body").stop();=0A=
}=0A=
}, false);=0A=
}=0A=
=0A=
/**=0A=
* called by td_events.js on scroll - back to top=0A=
*/=0A=
var td_scroll_to_top_is_visible =3D false;=0A=
function td_events_scroll_scroll_to_top(scrollTop) {=0A=
if(td_is_scrolling_animation) { //do not fire the event on =
animations=0A=
return;=0A=
}=0A=
if (scrollTop > 400) {=0A=
if (td_scroll_to_top_is_visible =3D=3D=3D false) { //only add =
class if needed=0A=
td_scroll_to_top_is_visible =3D true;=0A=
jQuery('.td-scroll-up').addClass('td-scroll-up-visible');=0A=
}=0A=
} else {=0A=
if (td_scroll_to_top_is_visible =3D=3D=3D true) { //only add =
class if needed=0A=
td_scroll_to_top_is_visible =3D false;=0A=
jQuery('.td-scroll-up').removeClass('td-scroll-up-visible');=0A=
}=0A=
}=0A=
}=0A=
=0A=
=0A=
jQuery('.td-scroll-up').click(function(){=0A=
if(td_is_scrolling_animation) { //double check - because when we =
remove the class, the button is still visible for a while=0A=
return;=0A=
}=0A=
=0A=
//hide the button=0A=
td_scroll_to_top_is_visible =3D false;=0A=
jQuery('.td-scroll-up').removeClass('td-scroll-up-visible');=0A=
=0A=
//hide more articles box=0A=
td_more_articles_box.is_box_visible =3D false;=0A=
=
jQuery('.td-more-articles-box').removeClass('td-front-end-display-block')=
;=0A=
=0A=
//scroll to top=0A=
td_util.scroll_to_position(0, 1200);=0A=
=0A=
return false;=0A=
});=0A=
=0A=
=0A=
/**=0A=
* More stories box=0A=
*/=0A=
var td_more_articles_box =3D {=0A=
is_box_visible:false,=0A=
cookie:'',=0A=
distance_from_top:400,=0A=
=0A=
init: function init() {=0A=
=0A=
=0A=
//read the cookie=0A=
td_more_articles_box.cookie =3D =
td_read_site_cookie('td-cookie-more-articles');=0A=
=0A=
=0A=
//setting distance from the top=0A=
=
if(!isNaN(parseInt(tds_more_articles_on_post_pages_distance_from_top)) =
&& isFinite(tds_more_articles_on_post_pages_distance_from_top) && =
parseInt(tds_more_articles_on_post_pages_distance_from_top) > 0){=0A=
td_more_articles_box.distance_from_top =3D =
parseInt(tds_more_articles_on_post_pages_distance_from_top);=0A=
} else {=0A=
td_more_articles_box.distance_from_top =3D 400;=0A=
}=0A=
=0A=
//adding event to hide the box=0A=
jQuery('.td-close-more-articles-box').click(function(){=0A=
=0A=
//hiding the box=0A=
=
jQuery('.td-more-articles-box').removeClass('td-front-end-display-block')=
;=0A=
jQuery('.td-more-articles-box').hide();=0A=
=0A=
//cookie life=0A=
if(!isNaN(parseInt(tds_more_articles_on_post_time_to_wait)) =
&& isFinite(tds_more_articles_on_post_time_to_wait)){=0A=
//setting cookie=0A=
td_create_cookie('td-cookie-more-articles', =
'hide-more-articles-box', =
parseInt(tds_more_articles_on_post_time_to_wait));=0A=
}=0A=
});=0A=
},=0A=
=0A=
/**=0A=
* called by td_events.js on scroll=0A=
*/=0A=
td_events_scroll: function td_events_scroll(scrollTop) {=0A=
=0A=
if(td_is_scrolling_animation) { //do not fire the event on =
animations=0A=
return;=0A=
}=0A=
=0A=
//check to see if it's enable form panel and also from cookie=0A=
if(td_util.get_backend_var('tds_more_articles_on_post_enable') =
=3D=3D "show" && td_more_articles_box.cookie !=3D =
'hide-more-articles-box') {=0A=
=0A=
if (scrollTop > td_more_articles_box.distance_from_top ) {=0A=
if (td_more_articles_box.is_box_visible =3D=3D=3D false) =
{=0A=
=
jQuery('.td-more-articles-box').addClass('td-front-end-display-block');=0A=
td_more_articles_box.is_box_visible =3D true;=0A=
}=0A=
} else {=0A=
if (td_more_articles_box.is_box_visible =3D=3D=3D true) {=0A=
=
jQuery('.td-more-articles-box').removeClass('td-front-end-display-block')=
;=0A=
td_more_articles_box.is_box_visible =3D false;=0A=
}=0A=
}=0A=
}=0A=
}=0A=
};=0A=
=0A=
=0A=
=0A=
//click on a div -> go to a url=0A=
function td_fake_clicks() {=0A=
jQuery('.td-fake-click').click(function(){=0A=
window.location =3D jQuery(this).data("fake-click");=0A=
});=0A=
}=0A=
=0A=
=0A=
=0A=
=0A=
var td_resize_timer_id;=0A=
jQuery(window).resize(function() {=0A=
clearTimeout(td_resize_timer_id);=0A=
td_resize_timer_id =3D setTimeout(td_done_resizing, 500);=0A=
=0A=
});=0A=
=0A=
function td_done_resizing(){=0A=
td_resize_videos();=0A=
}=0A=
=0A=
=0A=
=0A=
/* =
-------------------------------------------------------------------------=
---=0A=
Resize the videos=0A=
*/=0A=
function td_resize_videos() {=0A=
//youtube in content=0A=
=
jQuery(document).find('iframe[src*=3D"youtube.com"]').each(function() {=0A=
var td_video =3D jQuery(this);=0A=
td_video.attr('width', '100%');=0A=
var td_video_width =3D td_video.width();=0A=
td_video.css('height', td_video_width * 0.6, 'important');=0A=
});=0A=
=0A=
=0A=
//vimeo in content=0A=
jQuery(document).find('iframe[src*=3D"vimeo.com"]').each(function() {=0A=
var td_video =3D jQuery(this);=0A=
td_video.attr('width', '100%');=0A=
var td_video_width =3D td_video.width();=0A=
td_video.css('height', td_video_width * 0.6, 'important');=0A=
})=0A=
=0A=
=0A=
//daily motion in content=0A=
=
jQuery(document).find('iframe[src*=3D"dailymotion.com"]').each(function()=
{=0A=
var td_video =3D jQuery(this);=0A=
td_video.attr('width', '100%');=0A=
var td_video_width =3D td_video.width();=0A=
td_video.css('height', td_video_width * 0.6, 'important');=0A=
})=0A=
}=0A=
=0A=
=0A=
=0A=
=0A=
/* =
-------------------------------------------------------------------------=
---=0A=
Ajax search=0A=
*/=0A=
var td_aj_search_cur_sel =3D 0;=0A=
var td_aj_search_results =3D 0;=0A=
var td_aj_first_down_up =3D true;=0A=
function td_ajax_search() {=0A=
=0A=
=0A=
=0A=
=0A=
jQuery('#td-header-search').keydown(function(event) {=0A=
=0A=
//console.log(event.keyCode);=0A=
=0A=
=0A=
if ((event.which && event.which =3D=3D 39) || (event.keyCode && =
event.keyCode =3D=3D 39) || (event.which && event.which =3D=3D 37) || =
(event.keyCode && event.keyCode =3D=3D 37)) {=0A=
//do nothing on left and right arrows=0A=
td_aj_search_input_focus();=0A=
return;=0A=
}=0A=
=0A=
if ((event.which && event.which =3D=3D 13) || (event.keyCode && =
event.keyCode =3D=3D 13)) {=0A=
=0A=
//redirectSearch('q');=0A=
var td_aj_cur_element =3D jQuery('.td-aj-cur-element');=0A=
if (td_aj_cur_element.length > 0) {=0A=
//alert('ra');=0A=
var td_go_to_url =3D =
td_aj_cur_element.find('.entry-title a').attr('href');=0A=
window.location =3D td_go_to_url;=0A=
} else {=0A=
jQuery(this).parent().parent().submit();=0A=
}=0A=
=0A=
return false; //redirect for search on enter=0A=
} else {=0A=
=0A=
if ((event.which && event.which =3D=3D 40) || (event.keyCode =
&& event.keyCode =3D=3D 40)) {=0A=
// down=0A=
td_aj_search_move_prompt_down();=0A=
return false; //disable the envent=0A=
=0A=
} else if((event.which && event.which =3D=3D 38) || =
(event.keyCode && event.keyCode =3D=3D 38)) {=0A=
//up=0A=
td_aj_search_move_prompt_up();=0A=
return false; //disable the envent=0A=
} else {=0A=
=0A=
//for backspace we have to check if the search query is =
empty and if so, clear the list=0A=
if ((event.which && event.which =3D=3D 8) || =
(event.keyCode && event.keyCode =3D=3D 8)) {=0A=
//if we have just one character left, that means it =
will be deleted now and we also have to clear the search results list=0A=
var search_query =3D jQuery(this).val();=0A=
if (search_query.length =3D=3D 1) {=0A=
jQuery('#td-aj-search').empty();=0A=
}=0A=
=0A=
}=0A=
=0A=
//various keys=0A=
td_aj_search_input_focus();=0A=
setTimeout("td_ajax_search_do_request()",100);=0A=
}=0A=
return true;=0A=
}=0A=
=0A=
});=0A=
=0A=
=0A=
=0A=
}=0A=
=0A=
//moves the select up=0A=
function td_aj_search_move_prompt_up() {=0A=
=0A=
=0A=
if (td_aj_first_down_up =3D=3D=3D true) {=0A=
td_aj_first_down_up =3D false;=0A=
if (td_aj_search_cur_sel =3D=3D=3D 0) {=0A=
td_aj_search_cur_sel =3D td_aj_search_results - 1;=0A=
} else {=0A=
td_aj_search_cur_sel--;=0A=
}=0A=
} else {=0A=
if (td_aj_search_cur_sel =3D=3D=3D 0) {=0A=
td_aj_search_cur_sel =3D td_aj_search_results;=0A=
} else {=0A=
td_aj_search_cur_sel--;=0A=
}=0A=
}=0A=
=0A=
=0A=
jQuery('.td_mod_aj_search').removeClass('td-aj-cur-element');=0A=
=0A=
=0A=
=0A=
if (td_aj_search_cur_sel > td_aj_search_results -1) {=0A=
//the input is selected=0A=
jQuery('.td-search-form').fadeTo(100, 1);=0A=
} else {=0A=
td_aj_search_input_remove_focus();=0A=
=
jQuery('.td_mod_aj_search').eq(td_aj_search_cur_sel).addClass('td-aj-cur-=
element');=0A=
}=0A=
=0A=
=0A=
=0A=
}=0A=
=0A=
//moves the select prompt down=0A=
function td_aj_search_move_prompt_down() {=0A=
=0A=
if (td_aj_first_down_up =3D=3D=3D true) {=0A=
td_aj_first_down_up =3D false;=0A=
} else {=0A=
if (td_aj_search_cur_sel =3D=3D=3D td_aj_search_results) {=0A=
td_aj_search_cur_sel =3D 0;=0A=
} else {=0A=
td_aj_search_cur_sel++;=0A=
}=0A=
}=0A=
=0A=
=0A=
jQuery('.td_mod_aj_search').removeClass('td-aj-cur-element');=0A=
=0A=
if (td_aj_search_cur_sel > td_aj_search_results - 1 ) {=0A=
//the input is selected=0A=
jQuery('.td-search-form').fadeTo(100, 1);=0A=
} else {=0A=
td_aj_search_input_remove_focus();=0A=
=
jQuery('.td_mod_aj_search').eq(td_aj_search_cur_sel).addClass('td-aj-cur-=
element');=0A=
}=0A=
=0A=
=0A=
}=0A=
=0A=
=0A=
// puts the focus on the input box=0A=
function td_aj_search_input_focus() {=0A=
td_aj_search_cur_sel =3D 0;=0A=
td_aj_first_down_up =3D true;=0A=
jQuery('.td-search-form').fadeTo(100, 1);=0A=
jQuery('.td_mod_aj_search').removeClass('td-aj-cur-element');=0A=
}=0A=
=0A=
//removes the focus from the input box=0A=
function td_aj_search_input_remove_focus() {=0A=
if (td_aj_search_results !=3D=3D 0) {=0A=
jQuery('.td-search-form').css('opacity', 0.5);=0A=
}=0A=
}=0A=
=0A=
//makes an ajax request=0A=
function td_ajax_search_do_request() {=0A=
=0A=
if (jQuery('#td-header-search').val() =3D=3D '') {=0A=
td_aj_search_input_focus();=0A=
return;=0A=
}=0A=
=0A=
=0A=
var search_query =3D jQuery('#td-header-search').val();=0A=
=0A=
=0A=
//do we have a cache hit=0A=
if (td_local_cache.exist(search_query)) {=0A=
td_ajax_search_process_request(td_local_cache.get(search_query));=0A=
return; //cache HIT=0A=
}=0A=
=0A=
=0A=
//fk no cache hit - do the real request=0A=
=0A=
=0A=
=0A=
jQuery.ajax({=0A=
type: 'POST',=0A=
url: td_ajax_url,=0A=
data: {=0A=
action: 'td_ajax_search',=0A=
td_string: search_query=0A=
},=0A=
success: function(data, textStatus, XMLHttpRequest){=0A=
td_local_cache.set(search_query, data);=0A=
td_ajax_search_process_request(data);=0A=
},=0A=
error: function(MLHttpRequest, textStatus, errorThrown){=0A=
//console.log(errorThrown);=0A=
}=0A=
});=0A=
}=0A=
=0A=
function td_ajax_search_process_request(data) {=0A=
var current_query =3D jQuery('#td-header-search').val();=0A=
=0A=
//the search is empty - drop results=0A=
if (current_query =3D=3D '') {=0A=
jQuery('#td-aj-search').empty();=0A=
return;=0A=
}=0A=
=0A=
var td_data_object =3D jQuery.parseJSON(data); //get the data object=0A=
//drop the result - it's from a old query=0A=
if (td_data_object.td_search_query !=3D=3D current_query) {=0A=
return;=0A=
}=0A=
=0A=
//reset the current selection and total posts=0A=
td_aj_search_cur_sel =3D 0;=0A=
td_aj_search_results =3D td_data_object.td_total_in_list;=0A=
td_aj_first_down_up =3D true;=0A=
=0A=
=0A=
//update the query=0A=
jQuery('#td-aj-search').html(td_data_object.td_data);=0A=
=0A=
/*=0A=
td_data_object.td_data=0A=
td_data_object.td_total_results=0A=
td_data_object.td_total_in_list=0A=
*/=0A=
}=0A=
=0A=
=0A=
=0A=
=0A=
=0A=
=0A=
function td_mobile_menu2() {=0A=
//return;=0A=
//alert('mobile menu');=0A=
//******************************************************************=0A=
//MOBILE MENU new=0A=
=0A=
// helper functions=0A=
=0A=
var trim =3D function(str)=0A=
{=0A=
return str.trim ? str.trim() : str.replace(/^\s+|\s+$/g,'');=0A=
};=0A=
=0A=
var hasClass =3D function(el, cn)=0A=
{=0A=
return (' ' + el.className + ' ').indexOf(' ' + cn + ' ') =
!=3D=3D -1;=0A=
};=0A=
=0A=
var addClass =3D function(el, cn)=0A=
{=0A=
if (!hasClass(el, cn)) {=0A=
el.className =3D (el.className =3D=3D=3D '') ? cn : =
el.className + ' ' + cn;=0A=
}=0A=
};=0A=
=0A=
var removeClass =3D function(el, cn)=0A=
{=0A=
el.className =3D trim((' ' + el.className + ' ').replace(' ' + =
cn + ' ', ' '));=0A=
};=0A=
=0A=
var hasParent =3D function(el, id)=0A=
{=0A=
if (el) {=0A=
do {=0A=
if (el.id =3D=3D=3D id) {=0A=
return true;=0A=
}=0A=
if (el.nodeType =3D=3D=3D 9) {=0A=
break;=0A=
}=0A=
}=0A=
while((el =3D el.parentNode));=0A=
}=0A=
return false;=0A=
};=0A=
=0A=
// normalize vendor prefixes=0A=
=0A=
var doc =3D document.documentElement;=0A=
=0A=
var transform_prop =3D window.Modernizr.prefixed('transform'),=0A=
transition_prop =3D window.Modernizr.prefixed('transition'),=0A=
transition_end =3D (function() {=0A=
var props =3D {=0A=
'WebkitTransition' : 'webkitTransitionEnd',=0A=
'MozTransition' : 'transitionend',=0A=
'OTransition' : 'oTransitionEnd otransitionend',=0A=
'msTransition' : 'MSTransitionEnd',=0A=
'transition' : 'transitionend'=0A=
};=0A=
return props.hasOwnProperty(transition_prop) ? =
props[transition_prop] : false;=0A=
})();=0A=
=0A=
window.App =3D (function()=0A=
{=0A=
=0A=
var _init =3D false;=0A=
var app =3D { };=0A=
=0A=
var inner_nav_td =3D document.getElementById('inner-wrap');=0A=
var nav_open =3D false;=0A=
var nav_class =3D 'js-nav';=0A=
=0A=
//console.log(inner_nav_td);=0A=
app.init =3D function()=0A=
{=0A=
if (_init) {=0A=
return;=0A=
}=0A=
_init =3D true;=0A=
=0A=
var closeNavEnd =3D function(e)=0A=
{=0A=
if (e && e.target =3D=3D=3D inner_nav_td) {=0A=
document.removeEventListener(transition_end, =
closeNavEnd, false);=0A=
}=0A=
nav_open =3D false;=0A=
};=0A=
=0A=
app.closeNav =3Dfunction()=0A=
{=0A=
if (nav_open) {=0A=
// close navigation after transition or immediately=0A=
//console.log(inner_nav_td);=0A=
=0A=
jQuery('#inner-wrap').css('minHeight', 'auto');=0A=
var duration =3D (transition_end && transition_prop) =
? parseFloat(window.getComputedStyle(inner_nav_td, '')[transition_prop + =
'Duration']) : 0;=0A=
if (duration > 0) {=0A=
document.addEventListener(transition_end, =
closeNavEnd, false);=0A=
} else {=0A=
closeNavEnd(null);=0A=
}=0A=
}=0A=
removeClass(doc, nav_class);=0A=
};=0A=
=0A=
app.openNav =3D function()=0A=
{=0A=
if (nav_open) {=0A=
return;=0A=
}=0A=
=0A=
=0A=
//var td_cur_innerwrap_height =3D =
jQuery('#inner-wrap').height();=0A=
=0A=
// if (td_cur_innerwrap_height !=3D =
td_cur_mobile_nav_height) {=0A=
//=0A=
// }=0A=
// alert(td_cur_mobile_nav_height);=0A=
var td_cur_mobile_nav_height =3D =
jQuery('.td-menu-animate').height();=0A=
jQuery('#inner-wrap').css('minHeight', =
td_cur_mobile_nav_height);=0A=
addClass(doc, nav_class);=0A=
=0A=
=0A=
/*=0A=
jQuery(this).delay(1000).queue(function(){=0A=
if (td_detect.is_phone_screen) {=0A=
jQuery("html, body").animate({ scrollTop: 0 }, {=0A=
duration: 1000,=0A=
easing:'easeInOutQuart',=0A=
complete: function(){=0A=
td_is_scrolling_animation =3D false;=0A=
}=0A=
}=0A=
);=0A=
}=0A=
=0A=
jQuery(this).dequeue();=0A=
});=0A=
*/=0A=
=0A=
=0A=
nav_open =3D true;=0A=
};=0A=
=0A=
app.toggleNav =3D function(e)=0A=
{=0A=
=0A=
if (nav_open && hasClass(doc, nav_class)) {=0A=
app.closeNav();=0A=
} else {=0A=
app.openNav();=0A=
}=0A=
if (e) {=0A=
e.preventDefault();=0A=
}=0A=
};=0A=
=0A=
// open nav with main "nav" button=0A=
=
//document.getElementById('nav-open-btn').addEventListener('click', =
app.toggleNav, false);=0A=
=0A=
jQuery('#td-top-mobile-toggle a, .td-mobile-close =
a').click(function(){=0A=
app.toggleNav();=0A=
});=0A=
=0A=
=0A=
=0A=
=0A=
// close nav with main "close" button=0A=
=
//document.getElementById('nav-close-btn').addEventListener('click', =
app.toggleNav, false);=0A=
=0A=
=0A=
=0A=
addClass(doc, 'js-ready');=0A=
=0A=
};=0A=
=0A=
return app;=0A=
=0A=
})();=0A=
=0A=
if (window.addEventListener) {=0A=
window.addEventListener('DOMContentLoaded', window.App.init, =
false);=0A=
}=0A=
=0A=
=0A=
=0A=
=0A=
=0A=
=0A=
=0A=
}=0A=
=0A=
=0A=
=0A=
=0A=
/* =
-------------------------------------------------------------------------=
---=0A=
Slider callbacks=0A=
*/=0A=
function slideStartedMoving(args) {=0A=
td_is_slide_moving =3D true; //used on touch screens + mobile menu 2=0A=
}=0A=
=0A=
function slideContentComplete(args) {=0A=
td_is_slide_moving =3D false;=0A=
if(!args.slideChanged) return false;=0A=
=
jQuery(args.currentSlideObject).parent().find('.slide-info-wrap').removeC=
lass('slide-wrap-active');=0A=
=
jQuery(args.currentSlideObject).children('.slide-info-wrap').addClass('sl=
ide-wrap-active');=0A=
}=0A=
=0A=
function slideContentLoaded(args) {=0A=
if(!args.slideChanged) return false;=0A=
// console.log('loaded');=0A=
=
jQuery(args.currentSlideObject).parent().find('.slide-info-wrap').removeC=
lass('slide-wrap-active');=0A=
=
jQuery(args.currentSlideObject).children('.slide-info-wrap').addClass('sl=
ide-wrap-active');=0A=
}=0A=
=0A=
=0A=
=0A=
=0A=
/* =
-------------------------------------------------------------------------=
---=0A=
Add retina support=0A=
*/=0A=
=0A=
function td_retina() {=0A=
if (window.devicePixelRatio > 1) {=0A=
jQuery('.td-retina').each(function(i) {=0A=
var lowres =3D jQuery(this).attr('src');=0A=
var highres =3D lowres.replace(".png", "@2x.png");=0A=
highres =3D highres.replace(".jpg", "@2x.jpg");=0A=
jQuery(this).attr('src', highres);=0A=
=0A=
});=0A=
=0A=
=0A=
//custom logo support=0A=
jQuery('.td-retina-data').each(function(i) {=0A=
jQuery(this).attr('src', jQuery(this).data('retina'));=0A=
//fix logo aligment on retina devices=0A=
jQuery(this).addClass('td-retina-version');=0A=
});=0A=
=0A=
}=0A=
}=0A=
=0A=
/*=0A=
jQuery('body').click(function(e){=0A=
if(! jQuery(e.target).hasClass('custom-background')){=0A=
alert('clicked on something that has not the class theDIV');=0A=
}=0A=
=0A=
});*/=0A=
=0A=
//click only on BACKGROUND, for devices that don't have touch (ex: =
phone, tablets)=0A=
if(!td_detect.is_touch_device && td_ad_background_click_link !=3D '') {=0A=
=0A=
//var ev =3D ev || window.event;=0A=
//var target =3D ev.target || ev.srcElement;=0A=
jQuery('body').click(function(event) {=0A=
=0A=
//getting the target element that the user clicks - for W3C and =
MSIE=0A=
var target =3D (event.target) ? event.target : event.srcElement;=0A=
=0A=
//only if the background has background image=0A=
if(jQuery('body').hasClass('td-boxed-layout')) {=0A=
if(target.id =3D=3D 'inner-wrap' || target.className =3D=3D =
'td-header-menu-wrap' || target.className =3D=3D 'td-header-bg' || =
target.className =3D=3D 'td-menu-background affix-top') {=0A=
=0A=
//open the link ad page=0A=
if(td_ad_background_click_target =3D=3D '_blank') {=0A=
//open in a new window=0A=
window.open(td_ad_background_click_link)=0A=
} else {=0A=
//open in the same window=0A=
location.href =3D td_ad_background_click_link;=0A=
}=0A=
}=0A=
}=0A=
=0A=
//e.stopPropagation();=0A=
//stopBubble(event);=0A=
});=0A=
}=0A=
=0A=
=0A=
function stopBubble(e){=0A=
if(e && e.stopPropagation) {=0A=
e.stopPropagation();=0A=
} else {=0A=
window.event.cancelBubble=3Dtrue;=0A=
}=0A=
}=0A=
=0A=
=0A=
=0A=
/**=0A=
* reading cookies=0A=
* @param name=0A=
* @returns {*}=0A=
*/=0A=
function td_read_site_cookie(name) {=0A=
var nameEQ =3D escape(name) + "=3D";=0A=
var ca =3D document.cookie.split(';');=0A=
for (var i =3D 0; i < ca.length; i++) {=0A=
var c =3D ca[i];=0A=
while (c.charAt(0) =3D=3D ' ') c =3D c.substring(1, c.length);=0A=
if (c.indexOf(nameEQ) =3D=3D 0) return =
unescape(c.substring(nameEQ.length, c.length));=0A=
}=0A=
return null;=0A=
}=0A=
=0A=
=0A=
/**=0A=
*=0A=
* @param td_time_cookie_array=0A=
*=0A=
* @param[0]: name of the cookie=0A=
* @param[1]: value of the cookie=0A=
* @param[2]: expiration time=0A=
*/=0A=
function td_set_cookies_life(td_time_cookie_array) {=0A=
var expiry =3D new Date();=0A=
expiry.setTime(expiry.getTime() + td_time_cookie_array[2]);=0A=
=0A=
// Date()'s toGMTSting() method will format the date correctly for a =
cookie=0A=
document.cookie =3D td_time_cookie_array[0] + "=3D" + =
td_time_cookie_array[1] + "; expires=3D" + expiry.toGMTString() + "; =
path=3D/";=0A=
}=0A=
=0A=
=0A=
=0A=
//get page width=0A=
function td_get_page_width() {=0A=
var x =3D 0;=0A=
=0A=
if (self.innerHeight) {=0A=
x =3D self.innerWidth;=0A=
=0A=
} else if (document.documentElement && =
document.documentElement.clientHeight) {=0A=
x =3D document.documentElement.clientWidth;=0A=
=0A=
} else if (document.body) {=0A=
x =3D document.body.clientWidth;=0A=
}=0A=
=0A=
return x;=0A=
}=0A=
=0A=
=0A=
=0A=
//function to resize the height of the slide=0A=
function td_resize_slide(args) {=0A=
if(td_get_page_width() < 768) {=0A=
var slide_displayd =3D args.currentSlideNumber;=0A=
=0A=
=0A=
//console.log(args.sliderObject[0]);=0A=
//console.log(args.data.obj[0]);=0A=
=0A=
var current_slider =3D jQuery(args.data.obj[0]).attr("id");=0A=
=0A=
if(td_detect.is_ie8 =3D=3D=3D false) {=0A=
jQuery("#" + current_slider).css("overflow", "none");=0A=
jQuery("#" + current_slider + " .item").css("overflow", =
"visible");=0A=
}=0A=
=0A=
=0A=
=0A=
var setHeight =3D 0;=0A=
setHeight =3D jQuery("#" + current_slider + "_item_" + =
slide_displayd).outerHeight(true);=0A=
=0A=
=0A=
jQuery("#" + current_slider + ", #" + current_slider + " =
.slider").css({=0A=
height: setHeight=0A=
});=0A=
}=0A=
}=0A=
=0A=
=0A=
//function to resize the height of the slide with jQuery.each() function=0A=
function td_resize_page_sliders() {=0A=
=
jQuery(document).find('.iosSlider.td_block_big_grid').each(function() {=0A=
var current_slider =3D jQuery(this).attr("id");=0A=
=0A=
if(!td_detect.is_ie8) {=0A=
jQuery("#" + current_slider).css("overflow", "none");=0A=
jQuery("#" + current_slider + " .item").css("overflow", =
"visible");=0A=
}=0A=
=0A=
var setHeight =3D 0;=0A=
setHeight =3D jQuery("#" + current_slider + =
"_item_1").outerHeight(true);=0A=
=0A=
jQuery("#" + current_slider + ", #" + current_slider + " =
.slider").css({=0A=
height: setHeight=0A=
});=0A=
});=0A=
}=0A=
=0A=
var td_loading_box =3D {=0A=
=0A=
//array_colors: ['#ffffff', '#fafafa', '#ececec', '#dddddd', =
'#bfbfbf', '#9a9a9a', '#7e7e7e', '#636363'],//whiter -> darker=0A=
=0A=
array_colors_temp: ['rgba(99, 99, 99, 0)', 'rgba(99, 99, 99, 0.05)', =
'rgba(99, 99, 99, 0.08)', 'rgba(99, 99, 99, 0.2)', 'rgba(99, 99, 99, =
0.3)', 'rgba(99, 99, 99, 0.5)', 'rgba(99, 99, 99, 0.6)', 'rgba(99, 99, =
99, 1)'],//whiter -> darker=0A=
=0A=
array_colors: [],=0A=
=0A=
status_animation: 'stop',=0A=
=0A=
//stop loading box=0A=
stop : function stop () {=0A=
td_loading_box.status_animation =3D 'stop';=0A=
//jQuery('.td-loader-gif').html("");=0A=
},=0A=
=0A=
=0A=
//init loading box=0A=
init : function init (color) {=0A=
=0A=
var td_color_reg_exp =3D /^#[a-zA-Z0-9]{3,6}$/;=0A=
if(color && td_color_reg_exp.test(color)) {=0A=
=0A=
var col_rgba =3D td_loading_box.hexToRgb(color);=0A=
=0A=
var rgba_string =3D "rgba(" + col_rgba.r + ", " + col_rgba.g =
+ ", " + col_rgba.b + ", ";=0A=
=0A=
td_loading_box.array_colors[7] =3D rgba_string + " 1)";=0A=
td_loading_box.array_colors[6] =3D rgba_string + " 0.6)";=0A=
td_loading_box.array_colors[5] =3D rgba_string + " 0.5)";=0A=
td_loading_box.array_colors[4] =3D rgba_string + " 0.3)";=0A=
td_loading_box.array_colors[3] =3D rgba_string + " 0.2)";=0A=
td_loading_box.array_colors[2] =3D rgba_string + " 0.08)";=0A=
td_loading_box.array_colors[1] =3D rgba_string + " 0.05)";=0A=
td_loading_box.array_colors[0] =3D rgba_string + " 0)";=0A=
=0A=
} else {=0A=
//default array=0A=
td_loading_box.array_colors =3D =
td_loading_box.array_colors_temp.slice(0);=0A=
=0A=
}=0A=
=0A=
if(td_loading_box.status_animation =3D=3D 'stop') {=0A=
td_loading_box.status_animation =3D 'display';=0A=
this.render();=0A=
}=0A=
},=0A=
=0A=
=0A=
//create the animation=0A=
render: function render (color) {=0A=
=0A=
//call the animation_display function=0A=
td_loading_box.animation_display('');=0A=
=0A=
//direction right=0A=
var temp_color_array =3D [td_loading_box.array_colors[0], =
td_loading_box.array_colors[1], td_loading_box.array_colors[2], =
td_loading_box.array_colors[3], td_loading_box.array_colors[4], =
td_loading_box.array_colors[5], td_loading_box.array_colors[6], =
td_loading_box.array_colors[7]];=0A=
=0A=
td_loading_box.array_colors[0] =3D temp_color_array[7];=0A=
td_loading_box.array_colors[1] =3D temp_color_array[0];=0A=
td_loading_box.array_colors[2] =3D temp_color_array[1];=0A=
td_loading_box.array_colors[3] =3D temp_color_array[2];=0A=
td_loading_box.array_colors[4] =3D temp_color_array[3];=0A=
td_loading_box.array_colors[5] =3D temp_color_array[4];=0A=
td_loading_box.array_colors[6] =3D temp_color_array[5];=0A=
td_loading_box.array_colors[7] =3D temp_color_array[6];=0A=
=0A=
if(td_loading_box.status_animation =3D=3D 'display') {=0A=
=0A=
=0A=
setTimeout(td_loading_box.render, 40);=0A=
} else {=0A=
td_loading_box.animation_display('');=0A=
}=0A=
},=0A=
=0A=
=0A=
//display the animation=0A=
animation_display: function animation_display (animation_str) {=0A=
jQuery('.td-loader-gif').html(animation_str);=0A=
},=0A=
=0A=
=0A=
//converts hex to rgba=0A=
hexToRgb: function hexToRgb(hex) {=0A=
var result =3D =
/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex);=0A=
=0A=
return result ? {=0A=
r: parseInt(result[1], 16),=0A=
g: parseInt(result[2], 16),=0A=
b: parseInt(result[3], 16)=0A=
} : null;=0A=
}=0A=
}//td_loading_box.init();//td_loading_box.stop();=0A=
=0A=
"use strict";=0A=
=0A=
/* =
-------------------------------------------------------------------------=
---=0A=
blocks.js=0A=
=
-------------------------------------------------------------------------=
-- */=0A=
=0A=
=0A=
=0A=
/* =
-------------------------------------------------------------------------=
---=0A=
On load=0A=
*/=0A=
jQuery().ready(function() {=0A=
td_on_ready_ajax_blocks();=0A=
});=0A=
=0A=
=0A=
=0A=
=0A=
=0A=
function td_on_ready_ajax_blocks() {=0A=
=0A=
=0A=
/* =
-------------------------------------------------------------------------=
---=0A=
AJAX pagination next=0A=
*/=0A=
jQuery(".td-ajax-next-page").click(function(event){=0A=
event.preventDefault();=0A=
=0A=
var current_block_obj =3D =
td_getBlockObjById(jQuery(this).data('td_block_id'));=0A=
=0A=
if(jQuery(this).hasClass('ajax-page-disabled') || =
current_block_obj.is_ajax_running =3D=3D=3D true) {=0A=
return;=0A=
}=0A=
=0A=
current_block_obj.is_ajax_running =3D true; // ajax is running =
and we're wayting for a reply from server=0A=
=0A=
current_block_obj.td_current_page++;=0A=
td_ajax_do_block_request(current_block_obj, 'next');=0A=
});=0A=
=0A=
=0A=
/* =
-------------------------------------------------------------------------=
---=0A=
AJAX pagination prev=0A=
*/=0A=
jQuery(".td_ajax-prev-page").click(function(event){=0A=
event.preventDefault();=0A=
=0A=
var current_block_obj =3D =
td_getBlockObjById(jQuery(this).data('td_block_id'));=0A=
=0A=
if(jQuery(this).hasClass('ajax-page-disabled') || =
current_block_obj.is_ajax_running =3D=3D=3D true) {=0A=
return;=0A=
}=0A=
=0A=
current_block_obj.is_ajax_running =3D true; // ajax is running =
and we're wayting for a reply from server=0A=
=0A=
current_block_obj.td_current_page--;=0A=
td_ajax_do_block_request(current_block_obj, 'back');=0A=
});=0A=
=0A=
=0A=
/* =
-------------------------------------------------------------------------=
---=0A=
AJAX pagination load more=0A=
*/=0A=
jQuery(".td_ajax_load_more").click(function(event){=0A=
event.preventDefault();=0A=
if(jQuery(this).hasClass('ajax-page-disabled')) {=0A=
return;=0A=
}=0A=
=0A=
var current_block_obj =3D =
td_getBlockObjById(jQuery(this).data('td_block_id'));=0A=
=0A=
current_block_obj.td_current_page++;=0A=
td_ajax_do_block_request(current_block_obj, 'load_more');=0A=
});=0A=
=0A=
=0A=
/* =
-------------------------------------------------------------------------=
---=0A=
AJAX pagination infinite load=0A=
*/=0A=
jQuery('.td_ajax_infinite').waypoint(function(direction) {=0A=
if (direction =3D=3D=3D 'down') {=0A=
//console.log('loading');=0A=
var current_block_obj =3D =
td_getBlockObjById(jQuery(this).data('td_block_id'));=0A=
=0A=
current_block_obj.td_current_page++;=0A=
td_ajax_do_block_request(current_block_obj, 'infinite_load');=0A=
}=0A=
=0A=
}, { offset: '110%' });=0A=
=0A=
=0A=
=0A=
=0A=
=0A=
/* =
-------------------------------------------------------------------------=
---=0A=
AJAX sub cat filter=0A=
*/=0A=
jQuery(".ajax-sub-cat").click(function(event){ //click on an ajax =
category filter=0A=
event.preventDefault();=0A=
=0A=
=0A=
//get the current block id=0A=
var current_block_id =3D jQuery(this).data('td_block_id');=0A=
=0A=
=0A=
//destroy any iossliders to avoid bugs=0A=
jQuery('#' + =
current_block_id).find('.iosSlider').iosSlider('destroy');;=0A=
=0A=
//get current block=0A=
var current_block_obj =3D td_getBlockObjById(current_block_id);=0A=
=0A=
//change cur cat=0A=
current_block_obj.td_cur_cat =3D jQuery(this).data('cat_id');=0A=
=0A=
current_block_obj.td_current_page =3D 1;=0A=
=0A=
=0A=
//console.log(current_block_obj);=0A=
=0A=
//do request=0A=
td_ajax_do_block_request(current_block_obj, 'pull_down');=0A=
});=0A=
=0A=
=0A=
=0A=
=0A=
/* =
-------------------------------------------------------------------------=
---=0A=
AJAX MEGA MENU=0A=
*/=0A=
=0A=
=0A=
=0A=
var td_mega_menu_last_link =3D '';=0A=
=0A=
//it used to hook the mega menu categories=0A=
function td_ajax_sub_cat_mega_run(event) {=0A=
=0A=
if (td_mega_menu_last_link !=3D jQuery(this).attr('href')) {=0A=
event.preventDefault();=0A=
td_mega_menu_last_link =3D jQuery(this).attr('href');=0A=
} else {=0A=
td_mega_menu_last_link =3D '';=0A=
}=0A=
=0A=
=0A=
//get the current block id=0A=
var current_block_id =3D jQuery(this).data('td_block_id');=0A=
=0A=
//get current block=0A=
var current_block_obj =3D td_getBlockObjById(current_block_id);=0A=
=0A=
=0A=
//change cur cat=0A=
current_block_obj.td_cur_cat =3D jQuery(this).data('cat_id');=0A=
=0A=
current_block_obj.td_current_page =3D 1;=0A=
=0A=
//do request - no append, no animation=0A=
td_ajax_do_block_request(current_block_obj, 'pull_down');=0A=
}=0A=
=0A=
//on touch devices use click=0A=
if (td_detect.is_touch_device) {=0A=
jQuery(".ajax-sub-cat-mega").click(td_ajax_sub_cat_mega_run);=0A=
} else {=0A=
jQuery(".ajax-sub-cat-mega").hover(td_ajax_sub_cat_mega_run, =
function (event) {} );=0A=
}=0A=
=0A=
=0A=
} // end td_on_ready_ajax_blocks()=0A=
=0A=
=0A=
=0A=
/**=0A=
* makes a ajax block request=0A=
* @param current_block_obj=0A=
* @param td_append - append the return content?=0A=
* @returns {string}=0A=
*/=0A=
function td_ajax_do_block_request(current_block_obj, td_user_action) {=0A=
=0A=
//console.log(current_block_obj);=0A=
=0A=
//search the cache=0A=
var current_block_obj_signature =3D =
JSON.stringify(current_block_obj);=0A=
if (td_local_cache.exist(current_block_obj_signature)) {=0A=
//do the animation with cache hit =3D true=0A=
td_block_ajax_loading_start(current_block_obj, true);=0A=
=
td_ajax_block_process_response(td_local_cache.get(current_block_obj_signa=
ture), td_user_action);=0A=
return 'cache_hit'; //cache HIT=0A=
}=0A=
=0A=
=0A=
//cache miss - we make a full request! - cache hit - false=0A=
td_block_ajax_loading_start(current_block_obj, false);=0A=
=0A=
=0A=
jQuery.ajax({=0A=
type: 'POST',=0A=
url: td_ajax_url,=0A=
cache:true,=0A=
=0A=
data: {=0A=
action: 'td_ajax_block',=0A=
td_atts: current_block_obj.atts,=0A=
td_cur_cat:current_block_obj.td_cur_cat,=0A=
td_block_id:current_block_obj.id,=0A=
td_column_number:current_block_obj.td_column_number,=0A=
td_current_page:current_block_obj.td_current_page,=0A=
block_type:current_block_obj.block_type,=0A=
td_user_action:current_block_obj.td_user_action=0A=
},=0A=
success: function(data, textStatus, XMLHttpRequest){=0A=
td_local_cache.set(current_block_obj_signature, data);=0A=
td_ajax_block_process_response(data, td_user_action);=0A=
},=0A=
error: function(MLHttpRequest, textStatus, errorThrown){=0A=
//console.log(errorThrown);=0A=
}=0A=
});=0A=
}=0A=
=0A=
=0A=
/**=0A=
* process the response from the ajax query (it also processes the =
responses stored in the cache)=0A=
* @param data=0A=
* @param td_user_action=0A=
*/=0A=
function td_ajax_block_process_response(data, td_user_action) {=0A=
=0A=
//read the server response=0A=
var td_reply_obj =3D jQuery.parseJSON(data); //get the data object=0A=
=0A=
=0A=
//console.log(td_reply_obj);=0A=
/*=0A=
td_data_object.td_block_id=0A=
td_data_object.td_data=0A=
td_data_object.td_cur_cat=0A=
*/=0A=
=0A=
jQuery('.sub-cat-' + =
td_reply_obj.td_block_id).removeClass('cur-sub-cat');=0A=
jQuery('#sub-cat-' + td_reply_obj.td_block_id + '-' + =
td_reply_obj.td_cur_cat).addClass('cur-sub-cat');=0A=
=0A=
=0A=
//load the content (in place or append)=0A=
if (td_user_action =3D=3D 'load_more' || td_user_action =3D=3D =
'infinite_load') {=0A=
jQuery('#' + =
td_reply_obj.td_block_id).append(td_reply_obj.td_data); //append=0A=
} else {=0A=
jQuery('#' + =
td_reply_obj.td_block_id).html(td_reply_obj.td_data); //in place=0A=
}=0A=
=0A=
=0A=
//hide or show prev=0A=
if (td_reply_obj.td_hide_prev =3D=3D=3D true) {=0A=
jQuery('#prev-page-' + =
td_reply_obj.td_block_id).addClass('ajax-page-disabled');=0A=
} else {=0A=
jQuery('#prev-page-' + =
td_reply_obj.td_block_id).removeClass('ajax-page-disabled');=0A=
}=0A=
=0A=
//hide or show next=0A=
if (td_reply_obj.td_hide_next =3D=3D=3D true) {=0A=
jQuery('#next-page-' + =
td_reply_obj.td_block_id).addClass('ajax-page-disabled');=0A=
} else {=0A=
jQuery('#next-page-' + =
td_reply_obj.td_block_id).removeClass('ajax-page-disabled');=0A=
}=0A=
=0A=
=0A=
var current_block_obj =3D =
td_getBlockObjById(td_reply_obj.td_block_id);=0A=
if (current_block_obj.block_type =3D=3D=3D 'slide') {=0A=
//make the first slide active (to have caption)=0A=
jQuery('#' + td_reply_obj.td_block_id + ' =
.slide-wrap-active-first').addClass('slide-wrap-active');=0A=
}=0A=
=0A=
current_block_obj.is_ajax_running =3D false; // finish the loading =
for this block=0A=
=0A=
=0A=
//loading effects=0A=
td_block_ajax_loading_end(current_block_obj, td_user_action);=0A=
}=0A=
=0A=
=0A=
/**=0A=
* loading start=0A=
* @param current_block_obj=0A=
* @param cache_hit=0A=
*/=0A=
function td_block_ajax_loading_start(current_block_obj, cache_hit) {=0A=
=0A=
//get the element=0A=
var el_cur_td_block_inner =3D jQuery('#' + current_block_obj.id);=0A=
=0A=
//remove the loader=0A=
jQuery('.td-loader-gif').remove(); //remove any remaining loaders=0A=
=0A=
//remove animation classes=0A=
el_cur_td_block_inner.removeClass('fadeInRight fadeInLeft fadeInDown =
fadeInUp animated fadeIn');=0A=
=0A=
//add overflow + fixed height=0A=
el_cur_td_block_inner.addClass('td_block_inner_overflow');=0A=
var td_tmp_block_height =3D el_cur_td_block_inner.height();=0A=
el_cur_td_block_inner.css('height', td_tmp_block_height);=0A=
=0A=
=0A=
//show the loader only if it's needed=0A=
if (cache_hit =3D=3D=3D true) {=0A=
el_cur_td_block_inner.stop();=0A=
} else {=0A=
//el_cur_td_block_inner.parent().append('');=0A=
el_cur_td_block_inner.parent().append('');=0A=
=0A=
//init the loading box=0A=
td_loading_box.init(current_block_obj.header_color);=0A=
=0A=
setTimeout(function(){=0A=
=
jQuery('.td-loader-gif').removeClass('td-loader-animation-start');=0A=
jQuery('.td-loader-gif').addClass('td-loader-animation-mid');=0A=
},50);=0A=
=0A=
el_cur_td_block_inner.stop();=0A=
el_cur_td_block_inner.fadeTo('500',0.1, 'easeInOutCubic');=0A=
}=0A=
=0A=
=0A=
=0A=
//auto height =3D> fixed height=0A=
var td_tmp_block_height =3D el_cur_td_block_inner.height();=0A=
el_cur_td_block_inner.css('height', td_tmp_block_height);=0A=
=0A=
=0A=
=0A=
}=0A=
=0A=
=0A=
/**=0A=
* we have a reply from the ajax request=0A=
* @param current_block_obj=0A=
* @param td_user_action=0A=
*/=0A=
function td_block_ajax_loading_end(current_block_obj, td_user_action) {=0A=
=0A=
// remove the loader=0A=
jQuery('.td-loader-gif').removeClass('td-loader-animation-mid');=0A=
jQuery('.td-loader-gif').addClass('td-loader-animation-end');=0A=
setTimeout(function(){=0A=
jQuery('.td-loader-gif').remove();=0A=
//stop the loading box=0A=
td_loading_box.stop();=0A=
},400);=0A=
=0A=
=0A=
=0A=
=0A=
//get the current inner=0A=
var el_cur_td_block_inner =3D jQuery('#' + current_block_obj.id);=0A=
=0A=
=0A=
el_cur_td_block_inner.stop();=0A=
=0A=
=0A=
=0A=
switch(td_user_action) {=0A=
case 'next':=0A=
el_cur_td_block_inner.addClass('animated fadeInRight');=0A=
break;=0A=
case 'back':=0A=
el_cur_td_block_inner.addClass('animated fadeInLeft');=0A=
break;=0A=
=0A=
case 'pull_down':=0A=
el_cur_td_block_inner.addClass('animated fadeInDown');=0A=
break;=0A=
=0A=
case 'mega_menu':=0A=
el_cur_td_block_inner.addClass('animated fadeInUp');=0A=
break;=0A=
=0A=
=0A=
case 'load_more':=0A=
el_cur_td_block_inner.addClass('animated fadeIn');=0A=
break;=0A=
=0A=
=0A=
case 'infinite_load':=0A=
el_cur_td_block_inner.addClass('animated fadeIn');=0A=
break;=0A=
}=0A=
=0A=
if (td_detect.is_ie9 || td_detect.is_ie8) {=0A=
=0A=
el_cur_td_block_inner.css('opacity', 1);=0A=
}=0A=
=0A=
setTimeout(function(){=0A=
=
jQuery('.td_block_inner_overflow').removeClass('td_block_inner_overflow')=
;=0A=
el_cur_td_block_inner.css('height', 'auto');=0A=
=0A=
},300);=0A=
=0A=
=0A=
//refresh waypoints for infinit scroll=0A=
jQuery.waypoints('refresh');=0A=
}=0A=
=0A=
=0A=
/**=0A=
* search by block _id=0A=
* @param myID - block id=0A=
* @returns {number} the index=0A=
*/=0A=
function td_getBlockIndex(myID) {=0A=
var cnt =3D 0;=0A=
var tmpReturn =3D 0;=0A=
jQuery.each(td_blocks, function(index, td_block) {=0A=
if (td_block.id =3D=3D=3D myID) {=0A=
tmpReturn =3D cnt;=0A=
return false; //brake jquery each=0A=
} else {=0A=
cnt++;=0A=
}=0A=
});=0A=
return tmpReturn;=0A=
}=0A=
=0A=
/**=0A=
* gets the block object using a block ID=0A=
* @param myID=0A=
* @returns {*} block object=0A=
*/=0A=
function td_getBlockObjById(myID) {=0A=
return td_blocks[td_getBlockIndex(myID)];=0A=
}=0A=
=0A=
=0A=
=0A=
/*=0A=
* Sprite3D.js - v2.0.2=0A=
* https://github.com/boblemarin/Sprite3D.js=0A=
*=0A=
* Copyright (c) 2010 boblemarin emeric@minimal.be http://www.minimal.be=0A=
* =0A=
* Permission is hereby granted, free of charge, to any person=0A=
* obtaining a copy of this software and associated documentation=0A=
* files (the "Software"), to deal in the Software without=0A=
* restriction, including without limitation the rights to use,=0A=
* copy, modify, merge, publish, distribute, sublicense, and/or sell=0A=
* copies of the Software, and to permit persons to whom the=0A=
* Software is furnished to do so, subject to the following=0A=
* conditions:=0A=
* =0A=
* The above copyright notice and this permission notice shall be=0A=
* included in all copies or substantial portions of the Software.=0A=
* =0A=
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,=0A=
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES=0A=
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND=0A=
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT=0A=
* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,=0A=
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING=0A=
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR=0A=
* OTHER DEALINGS IN THE SOFTWARE.=0A=
*/=0A=
=0A=
=0A=
/*=0A=
Modified by tagDiv 2014 - modifications are Copyright tagDiv=0A=
*/=0A=
=0A=
=0A=
"use strict";=0A=
=0A=
var Sprite3D =3D Sprite3D || {=0A=
=0A=
=0A=
/********* [PUBLIC STATIC] isSupported() ***********/=0A=
/*=0A=
returns: Boolean=0A=
This method is automatically called when we create the first element, =0A=
but you can call it earlier if you want to provide an alternative =
content =0A=
to unsupported browsers.=0A=
*/=0A=
isSupported: function(){=0A=
// init if needed=0A=
if ( !this._isInit ) this._init();=0A=
// return support value=0A=
return this._isSupported;=0A=
},=0A=
=0A=
/********* [PUBLIC STATIC] stage() ***********/=0A=
/*=0A=
Creates a root container for your 3D content.=0A=
=0A=
Usage 1 : =0A=
Sprite3D.stage()=0A=
=0A=
Creates and returns a new element that is added to the page.=0A=
The stage is centered, so the position (0,0,0) is in the center of the =
window.=0A=
This is the easiest and most common way to start a project=0A=
=0A=
Usage 2 : =0A=
Sprite3D.stage( document.querySelector("#myContainer") )=0A=
=0A=
Uses an existing HTML element as root container. The element is only =
tweaked a bit,=0A=
adjusting a few transform-related CSS properties, as well as setting =
the CSS "position"=0A=
property to "relative" if it is "static".=0A=
This method gives you more freedom, but more responsabilities :)=0A=
=0A=
*/=0A=
stage: function(element) {=0A=
// init if needed=0A=
if ( !this._isInit ) this._init();=0A=
// tweak or create root element=0A=
var c,s;=0A=
if (element){=0A=
c =3D element;=0A=
s =3D element.style;=0A=
if(s.position =3D=3D=3D "static" ) s.position =3D "relative";=0A=
} else {=0A=
c =3D document.createElement("div");=0A=
s =3D c.style;=0A=
s[this._browserPrefix+"PerspectiveOrigin"] =3D "0 0";=0A=
s[this._browserPrefix+"TransformOrigin"] =3D "0 0";=0A=
s.position =3D "absolute";=0A=
s.top =3D "50%";=0A=
s.left =3D "50%";=0A=
s.margin =3D "0px";=0A=
s.padding =3D "0px";=0A=
document.body.appendChild(c);=0A=
}=0A=
s[this._browserPrefix+"Perspective"] =3D "800px";=0A=
s[this._browserPrefix+"Transform"] =3D "translateZ(0px)";=0A=
c =3D this.create(c);=0A=
// fix for the glitch problems under Safari6 / Mountain Lion=0A=
// (root container must NOT have its transform-style property set to =
"preserve-3d")=0A=
s[this._browserPrefix+"TransformStyle"] =3D "flat";=0A=
// end fix=0A=
return c;=0A=
},=0A=
=0A=
/********* [PUBLIC STATIC] create() ***********/=0A=
/*=0A=
Creates a new Sprite3D element=0A=
=0A=
Usage 1 :=0A=
Sprite3D.create()=0A=
=0A=
Creates a
element and turn it into a =0A=
=0A=
Usage 2 :=0A=
Sprite3D.create( document.querySelector("#myElement") )=0A=
=0A=
Usage 3 :=0A=
Sprite3D.create( "#id" )=0A=
Sprite3D.create( "id" )=0A=
=0A=
Usage 4 : =0A=
Sprite3D.create( ".class" )=0A=
Sprite3D.create( ".class1 class2" )=0A=
=0A=
*/=0A=
create: function(element){=0A=
// init Sprite3D if needed=0A=
if ( !this._isInit ) this._init();=0A=
=0A=
// create or tweak html element=0A=
if ( arguments.length =3D=3D=3D 0 ) {=0A=
element =3D document.createElement("div");=0A=
element.style.margin =3D "0px";=0A=
element.style.padding =3D "0px";=0A=
element.style.position =3D "absolute";=0A=
} else if ( typeof(element) =3D=3D=3D "string" ) {=0A=
var str =3D element;=0A=
element =3D document.createElement("div");=0A=
element.style.margin =3D "0px";=0A=
element.style.padding =3D "0px";=0A=
element.style.position =3D "absolute";=0A=
this._handleStringArgument(element,str);=0A=
} else if ( element.style.position =3D=3D "static" ) {=0A=
element.style.position =3D "relative";=0A=
}=0A=
element.style[ this._browserPrefix + "TransformStyle" ] =3D =
"preserve-3d";=0A=
element.style[ this._transformProperty ] =3D "translateZ(0px)";=0A=
=0A=
// extend element with 3D methods=0A=
for(var prop in this._props) {=0A=
if (this._props.hasOwnProperty(prop)){=0A=
element[prop] =3D this._props[prop];=0A=
}=0A=
}=0A=
=0A=
// add private properties=0A=
element._string =3D [=0A=
"translate3d(", 0, "px,", 0, "px,", 0, "px) ", =0A=
"rotateX(", 0, "deg) ", =0A=
"rotateY(", 0, "deg) ", =0A=
"rotateZ(", 0, "deg) ", =0A=
"scale3d(", 1, ", ", 1, ", ", 1, ") "=0A=
];=0A=
element._positions =3D [=0A=
1, 3, 5, // x, y, z=0A=
8, 11, 14, // rotationX, rotationY, rotationZ=0A=
17, 19, 21 // scaleX, scaleY, scaleZ=0A=
];=0A=
element._ox =3D 0;=0A=
element._oy =3D 0;=0A=
element._oz =3D 0;=0A=
=0A=
// return=0A=
return element;=0A=
},=0A=
=0A=
/********* [PUBLIC STATIC] box() ***********/=0A=
box: function(width,height,depth,idOrClassName) {=0A=
// init if needed=0A=
if ( !this._isInit ) this._init();=0A=
=0A=
// create container element=0A=
var box =3D this.create();=0A=
=0A=
if ( arguments.length =3D=3D=3D 1 ) {=0A=
height =3D width;=0A=
depth =3D width;=0A=
} else if ( arguments.length =3D=3D=3D 2 && typeof(arguments[1]) =
=3D=3D=3D "string" ) { =0A=
this._handleStringArgument(box,arguments[1]);=0A=
height =3D width;=0A=
depth =3D width;=0A=
} else if ( idOrClassName && typeof(idOrClassName) =3D=3D=3D "string" =
) {=0A=
this._handleStringArgument(box,idOrClassName);=0A=
}=0A=
=0A=
// add faces=0A=
var hwidth =3D width*.5,=0A=
hheight =3D height*.5,=0A=
hdepth =3D depth*.5;=0A=
=0A=
box.appendChild( Sprite3D.create(".front").position( -hwidth, =
-hheight, hdepth).size(width,height).update() );=0A=
box.appendChild( Sprite3D.create(".back").position( -hwidth, -hheight, =
-hdepth).size(width,height).rotationY(180).update() );=0A=
box.appendChild( Sprite3D.create(".left").position( -hwidth-hdepth, =
-hheight, 0).size(depth,height).rotationY(-90).update() );=0A=
box.appendChild( Sprite3D.create(".right").position( hwidth-hdepth, =
-hheight, 0).size(depth,height).rotationY(90).update() );=0A=
box.appendChild( Sprite3D.create(".bottom").position( -hwidth, =
hheight-hdepth, 0).size(width,depth).rotationX(-90).update() );=0A=
box.appendChild( Sprite3D.create(".top").position( -hwidth, =
-hheight-hdepth, 0).size(width,depth).rotationX(90).update() );=0A=
=0A=
return box;=0A=
},=0A=
=0A=
/********* [PUBLIC STATIC] prefix() ***********/=0A=
prefix: function(cssPropertyName) {=0A=
return Sprite3D._browserPrefix + cssPropertyName;=0A=
},=0A=
=0A=
/********* [PRIVATE STATIC] library's global properties ***********/=0A=
_isInit: false,=0A=
_isSupported: false,=0A=
_browserPrefix: "webkit",=0A=
_transformProperty: "webkitTransform",=0A=
=0A=
/********* [PRIVATE STATIC] _init() ***********/ =0A=
_init: function(){=0A=
var d =3D document.createElement("div"), =0A=
prefixes =3D ["", "webkit", "Moz", "O", "ms" ],=0A=
n =3D prefixes.length, i;=0A=
=0A=
Sprite3D._isInit =3D true;=0A=
// check for 3D transforms=0A=
for( i =3D 0; i < n; i++ ) {=0A=
if ( ( prefixes[i] + "Perspective" ) in d.style ) {=0A=
Sprite3D._transformProperty =3D prefixes[i] + "Transform";=0A=
Sprite3D._isSupported =3D true;=0A=
Sprite3D._browserPrefix =3D prefixes[i];=0A=
if ( i=3D=3D2 ) Sprite3D._props.update =3D =
Sprite3D._props.updateJoin;=0A=
//console.log( "Sprite3D found support for 3D transforms using =
prefix: " + prefixes[i] );=0A=
return true;=0A=
}=0A=
}=0A=
=0A=
// no transform support=0A=
alert("Sorry, but your browser does not support CSS 3D transfroms.");=0A=
return false;=0A=
},=0A=
=0A=
/********* [PRIVATE STATIC] _handleStringArgument() ***********/=0A=
_handleStringArgument: function( element, str ){=0A=
switch( str[0] ) {=0A=
case ".":=0A=
element.className =3D str.substr(1);=0A=
break;=0A=
case "#":=0A=
element.id =3D str.substr(1);=0A=
break;=0A=
default:=0A=
element.id =3D str;=0A=
break;=0A=
}=0A=
},=0A=
=0A=
/********* Sprite3D objects properties ***********/=0A=
_props: {=0A=
=0A=
/////////////////////////////////////////////=0A=
//////////// Position / absolute ////////////=0A=
/////////////////////////////////////////////=0A=
x : function(px) {=0A=
if ( arguments.length ) {=0A=
this._string[this._positions[0]] =3D px - this._ox;=0A=
return this;=0A=
} else {=0A=
return this._string[this._positions[0]] + this._ox;=0A=
}=0A=
},=0A=
y : function(py) {=0A=
if ( arguments.length ) {=0A=
this._string[this._positions[1]] =3D py - this._oy;=0A=
return this;=0A=
} else {=0A=
return this._string[this._positions[1]] + this._oy;=0A=
}=0A=
},=0A=
z : function(pz) {=0A=
if ( arguments.length ) {=0A=
this._string[this._positions[2]] =3D pz - this._oz;=0A=
return this;=0A=
} else {=0A=
return this._string[this._positions[2]] + this._oz;=0A=
}=0A=
},=0A=
position : function( px, py, pz) {=0A=
this._string[this._positions[0]] =3D px - this._ox;=0A=
this._string[this._positions[1]] =3D py - this._oy;=0A=
if ( arguments.length >=3D 3 ) this._string[this._positions[2]] =3D =
pz - this._oz;=0A=
return this;=0A=
},=0A=
=0A=
/////////////////////////////////////////////=0A=
//////////// Position / relative ////////////=0A=
/////////////////////////////////////////////=0A=
move : function(px,py,pz) {=0A=
this._string[this._positions[0]] +=3D px;=0A=
this._string[this._positions[1]] +=3D py;=0A=
if ( arguments.length >=3D 3 ) this._string[this._positions[2]] +=3D =
pz;=0A=
return this;=0A=
},=0A=
=0A=
/////////////////////////////////////////////=0A=
//////////// Rotation / absolute ////////////=0A=
/////////////////////////////////////////////=0A=
rotationX : function(rx) {=0A=
if ( arguments.length ) {=0A=
this._string[this._positions[3]] =3D rx;=0A=
return this;=0A=
} else {=0A=
return this._string[this._positions[3]];=0A=
}=0A=
},=0A=
rotationY : function(ry) {=0A=
if ( arguments.length ) {=0A=
this._string[this._positions[4]] =3D ry;=0A=
return this;=0A=
} else {=0A=
return this._string[this._positions[4]];=0A=
}=0A=
},=0A=
rotationZ : function(rz) {=0A=
if ( arguments.length ) {=0A=
this._string[this._positions[5]] =3D rz;=0A=
return this;=0A=
} else {=0A=
return this._string[this._positions[5]];=0A=
}=0A=
},=0A=
rotation : function(rx,ry,rz) {=0A=
this._string[this._positions[3]] =3D rx;=0A=
this._string[this._positions[4]] =3D ry;=0A=
this._string[this._positions[5]] =3D rz;=0A=
return this;=0A=
},=0A=
=0A=
/////////////////////////////////////////////=0A=
//////////// Rotation / relative ////////////=0A=
/////////////////////////////////////////////=0A=
rotate : function(rx,ry,rz) {=0A=
this._string[this._positions[3]] +=3D rx;=0A=
this._string[this._positions[4]] +=3D ry;=0A=
this._string[this._positions[5]] +=3D rz;=0A=
return this;=0A=
},=0A=
=0A=
/////////////////////////////////////////////=0A=
///////////////// Scale //////////////////=0A=
/////////////////////////////////////////////=0A=
scaleX : function(sx) {=0A=
if ( arguments.length ) {=0A=
this._string[this._positions[6]] =3D sx;=0A=
return this;=0A=
} else {=0A=
return this._string[this._positions[6]];=0A=
}=0A=
},=0A=
scaleY : function(sy) {=0A=
if ( arguments.length ) {=0A=
this._string[this._positions[7]] =3D sy;=0A=
return this;=0A=
} else {=0A=
return this._string[this._positions[7]];=0A=
}=0A=
},=0A=
scaleZ : function(sz) {=0A=
if ( arguments.length ) {=0A=
this._string[this._positions[8]] =3D sz;=0A=
return this;=0A=
} else {=0A=
return this._string[this._positions[8]];=0A=
}=0A=
},=0A=
scale : function(sx,sy,sz) {=0A=
switch(arguments.length){=0A=
case 0:=0A=
return this._string[this._positions[6]];=0A=
case 1: =0A=
this._string[this._positions[6]] =3D sx;=0A=
this._string[this._positions[7]] =3D sx;=0A=
this._string[this._positions[8]] =3D sx;=0A=
return this;=0A=
case 2:=0A=
this._string[this._positions[6]] =3D sx;=0A=
this._string[this._positions[7]] =3D sy;=0A=
//this._string[this._positions[8]] =3D 1;=0A=
return this;=0A=
case 3:=0A=
this._string[this._positions[6]] =3D sx;=0A=
this._string[this._positions[7]] =3D sy;=0A=
this._string[this._positions[8]] =3D sz;=0A=
return this;=0A=
}=0A=
return this;=0A=
},=0A=
=0A=
/////////////////////////////////////////////=0A=
///////////////// Origin //////////////////=0A=
/////////////////////////////////////////////=0A=
origin : function(ox,oy,oz) {=0A=
// failed attempt at auto-centering the registration point of the =
object=0A=
if ( typeof(ox) =3D=3D=3D "string" ) {=0A=
/*=0A=
switch(ox){=0A=
case "center":=0A=
this._string[this._positions[0]] =3D -this.offsetWidth>>1;=0A=
this._string[this._positions[1]] =3D -this.offsetHeight>>1;=0A=
debugger=0A=
console.log("centering");=0A=
break;=0A=
}=0A=
*/=0A=
var cs =3D window.getComputedStyle(this,null);=0A=
console.log(cs);=0A=
console.log("w:"+ cs.getPropertyValue("width") + " || h: " + =
cs.height );=0A=
} else {=0A=
if (arguments.length<3) oz =3D 0;=0A=
this._string[this._positions[0]] +=3D this._ox - ox;=0A=
this._string[this._positions[1]] +=3D this._oy - oy;=0A=
this._string[this._positions[2]] +=3D this._oz - oz;=0A=
this._ox =3D ox;=0A=
this._oy =3D oy;=0A=
this._oz =3D oz;=0A=
}=0A=
return this;=0A=
},=0A=
=0A=
/////////////////////////////////////////////=0A=
//////////// Transform Origin /////////////=0A=
/////////////////////////////////////////////=0A=
transformOrigin : function(tx,ty) {=0A=
this.style[ Sprite3D._browserPrefix + "TransformOrigin" ] =3D =
(Number(tx)?tx+"px":tx) + " " + (Number(ty)?ty+"px":ty);=0A=
return this;=0A=
},=0A=
=0A=
/////////////////////////////////////////////=0A=
//////////// Transform String /////////////=0A=
/////////////////////////////////////////////=0A=
transformString : function(s) {=0A=
var parts =3D s.toLowerCase().split(" "),=0A=
numParts =3D parts.length,=0A=
i =3D 0,=0A=
strings =3D [],=0A=
positions =3D [ 0,0,0, 0,0,0, 0,0,0 ],=0A=
n =3D 0;=0A=
=0A=
for(i;i
The image #%curr% could not =
be loaded.",=0A=
titleSrc: function(item) {//console.log(item.el);=0A=
//alert(jQuery(item.el).data("caption"));=0A=
var td_current_caption =3D =
jQuery(item.el).data('caption');=0A=
if (typeof td_current_caption !=3D "undefined") {=0A=
return td_current_caption;=0A=
} else {=0A=
return '';=0A=
}=0A=
=0A=
=0A=
}=0A=
},=0A=
zoom: {=0A=
enabled: true,=0A=
duration: 300,=0A=
opener: function(element) {=0A=
return element.find("img");=0A=
}=0A=
},=0A=
callbacks: {=0A=
change: function(item) {=0A=
td_modal_image_last_el =3D item.el;=0A=
//setTimeout(function(){=0A=
td_util.scroll_into_view(item.el);=0A=
//}, 100);=0A=
=0A=
},=0A=
beforeClose: function() {=0A=
td_util.scroll_into_view(td_modal_image_last_el);=0A=
}=0A=
=0A=
}=0A=
=0A=
=0A=
=0A=
});=0A=
=0A=
=0A=
=0A=
=0A=
=0A=
//gallery popup=0A=
//detect jetpack carousel and disable the theme popup=0A=
if (typeof jetpackCarouselStrings =3D=3D=3D 'undefined') {=0A=
=0A=
// copy gallery caption from figcaption to data-caption =
attribute of the link to the full image, in this way the modal can read =
the caption=0A=
jQuery('figure.gallery-item').each(function() {=0A=
var caption_text =3D =
jQuery(this).children('figcaption').html();=0A=
jQuery(this).find('a').data('caption', caption_text);=0A=
});=0A=
=0A=
=0A=
=0A=
//jquery tiled gallery=0A=
jQuery('.tiled-gallery').magnificPopup({=0A=
type:'image',=0A=
delegate: "a",=0A=
gallery:{=0A=
enabled:true=0A=
},=0A=
image: {=0A=
tError: "The image #%curr% could =
not be loaded.",=0A=
titleSrc: function(item) {//console.log(item.el);=0A=
var td_current_caption =3D =
jQuery(item.el).parent().find('.tiled-gallery-caption').text();=0A=
if (typeof td_current_caption !=3D "undefined") {=0A=
return td_current_caption;=0A=
} else {=0A=
return '';=0A=
}=0A=
}=0A=
},=0A=
zoom: {=0A=
enabled: true,=0A=
duration: 300,=0A=
opener: function(element) {=0A=
return element.find("img");=0A=
}=0A=
},=0A=
callbacks: {=0A=
change: function(item) {=0A=
td_modal_image_last_el =3D item.el;=0A=
td_util.scroll_into_view(item.el);=0A=
},=0A=
beforeClose: function() {=0A=
td_util.scroll_into_view(td_modal_image_last_el);=0A=
}=0A=
=0A=
}=0A=
});=0A=
=0A=
=0A=
=0A=
jQuery('.gallery').magnificPopup({=0A=
type:'image',=0A=
delegate: ".gallery-icon > a",=0A=
gallery:{=0A=
enabled:true=0A=
},=0A=
image: {=0A=
tError: "The image #%curr% could =
not be loaded.",=0A=
titleSrc: function(item) {//console.log(item.el);=0A=
var td_current_caption =3D =
jQuery(item.el).data('caption');=0A=
if (typeof td_current_caption !=3D "undefined") {=0A=
return td_current_caption;=0A=
} else {=0A=
return '';=0A=
}=0A=
}=0A=
},=0A=
zoom: {=0A=
enabled: true,=0A=
duration: 300,=0A=
opener: function(element) {=0A=
return element.find("img");=0A=
}=0A=
},=0A=
callbacks: {=0A=
change: function(item) {=0A=
td_modal_image_last_el =3D item.el;=0A=
td_util.scroll_into_view(item.el);=0A=
},=0A=
beforeClose: function() {=0A=
td_util.scroll_into_view(td_modal_image_last_el);=0A=
}=0A=
=0A=
}=0A=
});=0A=
=0A=
=0A=
}=0A=
=0A=
} //end modal=0A=
=0A=
/**=0A=
* Created by ra on 7/9/14.=0A=
*/=0A=
=0A=
=0A=
/*=0A=
* tagDiv mods:=0A=
* - added the td-backstrach class=0A=
* - changed the backstretch.after event so that it dosn't wait for fade=0A=
*/=0A=
=0A=
/*=0A=
* Backstretch=0A=
* http://srobbin.com/jquery-plugins/backstretch/=0A=
*=0A=
* Copyright (c) 2013 Scott Robbin=0A=
* Licensed under the MIT license.=0A=
*/=0A=
=0A=
;(function ($, window, undefined) {=0A=
'use strict';=0A=
=0A=
/* PLUGIN DEFINITION=0A=
* =
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
*/=0A=
=0A=
$.fn.backstretch =3D function (images, options) {=0A=
// We need at least one image or method name=0A=
if (images =3D=3D=3D undefined || images.length =3D=3D=3D 0) {=0A=
$.error("No images were supplied for Backstretch");=0A=
}=0A=
=0A=
/*=0A=
* Scroll the page one pixel to get the right window height on =
iOS=0A=
* Pretty harmless for everyone else=0A=
*/=0A=
if ($(window).scrollTop() =3D=3D=3D 0 ) {=0A=
window.scrollTo(0, 0);=0A=
}=0A=
=0A=
return this.each(function () {=0A=
var $this =3D $(this)=0A=
, obj =3D $this.data('backstretch');=0A=
=0A=
// Do we already have an instance attached to this element?=0A=
if (obj) {=0A=
=0A=
// Is this a method they're trying to execute?=0A=
if (typeof images =3D=3D 'string' && typeof obj[images] =
=3D=3D 'function') {=0A=
// Call the method=0A=
obj[images](options);=0A=
=0A=
// No need to do anything further=0A=
return;=0A=
}=0A=
=0A=
// Merge the old options with the new=0A=
options =3D $.extend(obj.options, options);=0A=
=0A=
// Remove the old instance=0A=
obj.destroy(true);=0A=
}=0A=
=0A=
obj =3D new Backstretch(this, images, options);=0A=
$this.data('backstretch', obj);=0A=
});=0A=
};=0A=
=0A=
// If no element is supplied, we'll attach to body=0A=
$.backstretch =3D function (images, options) {=0A=
// Return the instance=0A=
return $('body')=0A=
.backstretch(images, options)=0A=
.data('backstretch');=0A=
};=0A=
=0A=
// Custom selector=0A=
$.expr[':'].backstretch =3D function(elem) {=0A=
return $(elem).data('backstretch') !=3D=3D undefined;=0A=
};=0A=
=0A=
/* DEFAULTS=0A=
* =
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
*/=0A=
=0A=
$.fn.backstretch.defaults =3D {=0A=
centeredX: true // Should we center the image on the X axis?=0A=
, centeredY: true // Should we center the image on the Y axis?=0A=
, duration: 5000 // Amount of time in between slides (if =
slideshow)=0A=
, fade: 0 // Speed of fade transition between slides=0A=
};=0A=
=0A=
/* STYLES=0A=
*=0A=
* Baked-in styles that we'll apply to our elements.=0A=
* In an effort to keep the plugin simple, these are not exposed as =
options.=0A=
* That said, anyone can override these in their own stylesheet.=0A=
* =
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
*/=0A=
var styles =3D {=0A=
wrap: {=0A=
left: 0=0A=
, top: 0=0A=
, overflow: 'hidden'=0A=
, margin: 0=0A=
, padding: 0=0A=
, height: '100%'=0A=
, width: '100%'=0A=
, zIndex: -999999=0A=
}=0A=
, img: {=0A=
position: 'absolute'=0A=
, display: 'none'=0A=
, margin: 0=0A=
, padding: 0=0A=
, border: 'none'=0A=
, width: 'auto'=0A=
, height: 'auto'=0A=
, maxHeight: 'none'=0A=
, maxWidth: 'none'=0A=
, zIndex: -999999=0A=
}=0A=
};=0A=
=0A=
/* CLASS DEFINITION=0A=
* =
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
*/=0A=
var Backstretch =3D function (container, images, options) {=0A=
this.options =3D $.extend({}, $.fn.backstretch.defaults, options =
|| {});=0A=
=0A=
/* In its simplest form, we allow Backstretch to be called on an =
image path.=0A=
* e.g. $.backstretch('/path/to/image.jpg')=0A=
* So, we need to turn this back into an array.=0A=
*/=0A=
this.images =3D $.isArray(images) ? images : [images];=0A=
=0A=
// Preload images=0A=
$.each(this.images, function () {=0A=
$('')[0].src =3D this;=0A=
});=0A=
=0A=
// Convenience reference to know if the container is body.=0A=
this.isBody =3D container =3D=3D=3D document.body;=0A=
=0A=
/* We're keeping track of a few different elements=0A=
*=0A=
* Container: the element that Backstretch was called on.=0A=
* Wrap: a DIV that we place the image into, so we can hide the =
overflow.=0A=
* Root: Convenience reference to help calculate the correct =
height.=0A=
*/=0A=
this.$container =3D $(container);=0A=
this.$root =3D this.isBody ? supportsFixedPosition ? $(window) : =
$(document) : this.$container;=0A=
=0A=
// Don't create a new wrap if one already exists (from a =
previous instance of Backstretch)=0A=
var $existing =3D =
this.$container.children(".backstretch").first();=0A=
this.$wrap =3D $existing.length ? $existing : $('').css(styles.wrap).appendTo(this.$container)=
;=0A=
=0A=
// Non-body elements need some style adjustments=0A=
if (!this.isBody) {=0A=
// If the container is statically positioned, we need to =
make it relative,=0A=
// and if no zIndex is defined, we should set it to zero.=0A=
var position =3D this.$container.css('position')=0A=
, zIndex =3D this.$container.css('zIndex');=0A=
=0A=
this.$container.css({=0A=
position: position =3D=3D=3D 'static' ? 'relative' : =
position=0A=
, zIndex: zIndex =3D=3D=3D 'auto' ? 0 : zIndex=0A=
, background: 'none'=0A=
});=0A=
=0A=
// Needs a higher z-index=0A=
this.$wrap.css({zIndex: -999998});=0A=
}=0A=
=0A=
// Fixed or absolute positioning?=0A=
this.$wrap.css({=0A=
position: this.isBody && supportsFixedPosition ? 'fixed' : =
'absolute'=0A=
});=0A=
=0A=
// Set the first image=0A=
this.index =3D 0;=0A=
this.show(this.index);=0A=
=0A=
// Listen for resize=0A=
$(window).on('resize.backstretch', $.proxy(this.resize, this))=0A=
.on('orientationchange.backstretch', $.proxy(function () {=0A=
// Need to do this in order to get the right window =
height=0A=
if (this.isBody && window.pageYOffset =3D=3D=3D 0) {=0A=
window.scrollTo(0, 1);=0A=
this.resize();=0A=
}=0A=
}, this));=0A=
};=0A=
=0A=
/* PUBLIC METHODS=0A=
* =
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
*/=0A=
Backstretch.prototype =3D {=0A=
resize: function () {=0A=
try {=0A=
var bgCSS =3D {left: 0, top: 0}=0A=
, rootWidth =3D this.isBody ? this.$root.width() : =
this.$root.innerWidth()=0A=
, bgWidth =3D rootWidth=0A=
, rootHeight =3D this.isBody ? ( window.innerHeight =
? window.innerHeight : this.$root.height() ) : this.$root.innerHeight()=0A=
, bgHeight =3D bgWidth / this.$img.data('ratio')=0A=
, bgOffset;=0A=
=0A=
// Make adjustments based on image ratio=0A=
if (bgHeight >=3D rootHeight) {=0A=
bgOffset =3D (bgHeight - rootHeight) / 2;=0A=
if(this.options.centeredY) {=0A=
bgCSS.top =3D '-' + bgOffset + 'px';=0A=
}=0A=
} else {=0A=
bgHeight =3D rootHeight;=0A=
bgWidth =3D bgHeight * this.$img.data('ratio');=0A=
bgOffset =3D (bgWidth - rootWidth) / 2;=0A=
if(this.options.centeredX) {=0A=
bgCSS.left =3D '-' + bgOffset + 'px';=0A=
}=0A=
}=0A=
=0A=
this.$wrap.css({width: rootWidth, height: rootHeight})=0A=
.find('img:not(.deleteable)').css({width: bgWidth, =
height: bgHeight}).css(bgCSS);=0A=
} catch(err) {=0A=
// IE7 seems to trigger resize before the image is =
loaded.=0A=
// This try/catch block is a hack to let it fail =
gracefully.=0A=
}=0A=
=0A=
return this;=0A=
}=0A=
=0A=
// Show the slide at a certain position=0A=
, show: function (newIndex) {=0A=
=0A=
// Validate index=0A=
if (Math.abs(newIndex) > this.images.length - 1) {=0A=
return;=0A=
}=0A=
=0A=
// Vars=0A=
var self =3D this=0A=
, oldImage =3D =
self.$wrap.find('img').addClass('deleteable')=0A=
, evtOptions =3D { relatedTarget: self.$container[0] };=0A=
=0A=
// Trigger the "before" event=0A=
self.$container.trigger($.Event('backstretch.before', =
evtOptions), [self, newIndex]);=0A=
=0A=
// Set the new index=0A=
this.index =3D newIndex;=0A=
=0A=
// Pause the slideshow=0A=
clearInterval(self.interval);=0A=
=0A=
// New image=0A=
self.$img =3D $('')=0A=
.css(styles.img)=0A=
.addClass('td-backstretch')=0A=
.bind('load', function (e) {=0A=
var imgWidth =3D this.width || $(e.target).width()=0A=
, imgHeight =3D this.height || =
$(e.target).height();=0A=
=0A=
// Save the ratio=0A=
$(this).data('ratio', imgWidth / imgHeight);=0A=
=0A=
// Show the image, then delete the old one=0A=
// "speed" option has been deprecated, but we want =
backwards compatibilty=0A=
$(this).fadeIn(self.options.speed || =
self.options.fade, function () {=0A=
oldImage.remove();=0A=
=0A=
// Resume the slideshow=0A=
if (!self.paused) {=0A=
self.cycle();=0A=
}=0A=
=0A=
=0A=
});=0A=
=0A=
// Trigger the "after" and "show" events=0A=
// "show" is being deprecated=0A=
$(['after', 'show']).each(function () {=0A=
self.$container.trigger($.Event('backstretch.' + =
this, evtOptions), [self, newIndex]);=0A=
});=0A=
=0A=
// Resize=0A=
self.resize();=0A=
})=0A=
.appendTo(self.$wrap);=0A=
=0A=
// Hack for IE img onload event=0A=
self.$img.attr('src', self.images[newIndex]);=0A=
return self;=0A=
}=0A=
=0A=
, next: function () {=0A=
// Next slide=0A=
return this.show(this.index < this.images.length - 1 ? =
this.index + 1 : 0);=0A=
}=0A=
=0A=
, prev: function () {=0A=
// Previous slide=0A=
return this.show(this.index =3D=3D=3D 0 ? this.images.length =
- 1 : this.index - 1);=0A=
}=0A=
=0A=
, pause: function () {=0A=
// Pause the slideshow=0A=
this.paused =3D true;=0A=
return this;=0A=
}=0A=
=0A=
, resume: function () {=0A=
// Resume the slideshow=0A=
this.paused =3D false;=0A=
this.next();=0A=
return this;=0A=
}=0A=
=0A=
, cycle: function () {=0A=
// Start/resume the slideshow=0A=
if(this.images.length > 1) {=0A=
// Clear the interval, just in case=0A=
clearInterval(this.interval);=0A=
=0A=
this.interval =3D setInterval($.proxy(function () {=0A=
// Check for paused slideshow=0A=
if (!this.paused) {=0A=
this.next();=0A=
}=0A=
}, this), this.options.duration);=0A=
}=0A=
return this;=0A=
}=0A=
=0A=
, destroy: function (preserveBackground) {=0A=
// Stop the resize events=0A=
$(window).off('resize.backstretch =
orientationchange.backstretch');=0A=
=0A=
// Clear the interval=0A=
clearInterval(this.interval);=0A=
=0A=
// Remove Backstretch=0A=
if(!preserveBackground) {=0A=
this.$wrap.remove();=0A=
}=0A=
this.$container.removeData('backstretch');=0A=
}=0A=
};=0A=
=0A=
/* SUPPORTS FIXED POSITION?=0A=
*=0A=
* Based on code from jQuery Mobile 1.1.0=0A=
* http://jquerymobile.com/=0A=
*=0A=
* In a nutshell, we need to figure out if fixed positioning is =
supported.=0A=
* Unfortunately, this is very difficult to do on iOS, and usually =
involves=0A=
* injecting content, scrolling the page, etc.. It's ugly.=0A=
* jQuery Mobile uses this workaround. It's not ideal, but works.=0A=
*=0A=
* Modified to detect IE6=0A=
* =
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
*/=0A=
=0A=
var supportsFixedPosition =3D (function () {=0A=
var ua =3D navigator.userAgent=0A=
, platform =3D navigator.platform=0A=
// Rendering engine is Webkit, and capture major version=0A=
, wkmatch =3D ua.match( /AppleWebKit\/([0-9]+)/ )=0A=
, wkversion =3D !!wkmatch && wkmatch[ 1 ]=0A=
, ffmatch =3D ua.match( /Fennec\/([0-9]+)/ )=0A=
, ffversion =3D !!ffmatch && ffmatch[ 1 ]=0A=
, operammobilematch =3D ua.match( /Opera Mobi\/([0-9]+)/ )=0A=
, omversion =3D !!operammobilematch && operammobilematch[ 1 ]=0A=
, iematch =3D ua.match( /MSIE ([0-9]+)/ )=0A=
, ieversion =3D !!iematch && iematch[ 1 ];=0A=
=0A=
return !(=0A=
// iOS 4.3 and older : Platform is iPhone/Pad/Touch and =
Webkit version is less than 534 (ios5)=0A=
((platform.indexOf( "iPhone" ) > -1 || platform.indexOf( =
"iPad" ) > -1 || platform.indexOf( "iPod" ) > -1 ) && wkversion && =
wkversion < 534) ||=0A=
=0A=
// Opera Mini=0A=
(window.operamini && ({}).toString.call( =
window.operamini ) =3D=3D=3D "[object OperaMini]") ||=0A=
(operammobilematch && omversion < 7458) ||=0A=
=0A=
//Android lte 2.1: Platform is Android and Webkit =
version is less than 533 (Android 2.2)=0A=
(ua.indexOf( "Android" ) > -1 && wkversion && wkversion =
< 533) ||=0A=
=0A=
// Firefox Mobile before 6.0 -=0A=
(ffversion && ffversion < 6) ||=0A=
=0A=
// WebOS less than 3=0A=
("palmGetResource" in window && wkversion && wkversion < =
534) ||=0A=
=0A=
// MeeGo=0A=
(ua.indexOf( "MeeGo" ) > -1 && ua.indexOf( =
"NokiaBrowser/8.5.0" ) > -1) ||=0A=
=0A=
// IE6=0A=
(ieversion && ieversion <=3D 6)=0A=
);=0A=
}());=0A=
=0A=
}(jQuery, window));=0A=
=0A=
/**=0A=
* Created by ra on 7/8/14.=0A=
*/=0A=
=0A=
jQuery().ready(function() {=0A=
=0A=
=0A=
=0A=
=0A=
jQuery(window).on("backstretch.after", function (e, instance, index) =
{=0A=
td_template_single_1();=0A=
});=0A=
});=0A=
=0A=
=0A=
/**=0A=
* make td-post-template-6 title move down and blurry=0A=
*/=0A=
function td_template_single_1() {=0A=
//run only on a post with template 6 on it=0A=
if(jQuery("#td-full-screen-header-image").length > 0) {=0A=
=0A=
=0A=
//define all the variables - for better performance ?=0A=
//var td_parallax_el =3D =
document.getElementById('td_parallax_header_6');=0A=
=0A=
var td_parallax_bg_el =3D jQuery(".td-backstretch")[0];=0A=
=0A=
=0A=
//console.log(td_parallax_bg_el);=0A=
var scroll_from_top =3D '';=0A=
var distance_from_bottom;=0A=
=0A=
//attach the animation tick on scroll=0A=
jQuery(window).scroll(function(){=0A=
// with each scroll event request an animation frame (we =
have a polyfill for animation frame)=0A=
// the requestAnimationFrame is called only once and after =
that we wait=0A=
td_request_tick();=0A=
});=0A=
}=0A=
=0A=
=0A=
var td_animation_running =3D false; //if the tick is running, we set =
this to true=0A=
=0A=
function td_request_tick() {=0A=
if (td_animation_running =3D=3D=3D false) {=0A=
window.requestAnimationFrame(td_do_animation);=0A=
}=0A=
td_animation_running =3D true;=0A=
}=0A=
=0A=
/**=0A=
* the animation loop=0A=
*/=0A=
function td_do_animation() {=0A=
scroll_from_top =3D jQuery(document).scrollTop();=0A=
if (scroll_from_top <=3D 950) { //stop the animation after =
scroll from top=0A=
=0A=
var blur_value =3D 1 - (scroll_from_top / 800); // @todo =
trebuie verificata formula??=0A=
if (td_detect.is_ie8 =3D=3D=3D true) {=0A=
blur_value =3D 1;=0A=
}=0A=
=0A=
=0A=
blur_value =3D Math.round(blur_value * 100) / 100;=0A=
=0A=
//opacity=0A=
//td_parallax_el.style.opacity =3D blur_value;=0A=
=0A=
//move the bg=0A=
var parallax_move =3D -Math.round(scroll_from_top / 4);=0A=
td_move_Y(td_parallax_bg_el,-parallax_move);=0A=
=0A=
=0A=
//move the title + cat=0A=
distance_from_bottom =3D -Math.round(scroll_from_top / 8);=0A=
//td_move_Y(td_parallax_el,-distance_from_bottom);=0A=
//td_parallax_el.style.bottom =3D distance_from_bottom + =
"px"; //un accelerated version=0A=
=0A=
=0A=
}=0A=
=0A=
td_animation_running =3D false;=0A=
}=0A=
=0A=
=0A=
function td_move_Y (elm, value) {=0A=
var translate =3D 'translate3d(0px,' + value + 'px, 0px)';=0A=
elm.style['-webkit-transform'] =3D translate;=0A=
elm.style['-moz-transform'] =3D translate;=0A=
elm.style['-ms-transform'] =3D translate;=0A=
elm.style['-o-transform'] =3D translate;=0A=
elm.style.transform =3D translate;=0A=
}=0A=
=0A=
}=0A=
=0A=
/*=0A=
td_util.js=0A=
v1.1=0A=
*/=0A=
=0A=
"use strict";=0A=
=0A=
=0A=
/* =
-------------------------------------------------------------------------=
---=0A=
On load=0A=
*/=0A=
jQuery().ready(function() {=0A=
=0A=
/**=0A=
* Modal window js code=0A=
*/=0A=
jQuery('.td-login-modal-js').magnificPopup({=0A=
type: 'inline',=0A=
preloader: false,=0A=
focus: '#name',=0A=
removalDelay: 500,=0A=
=0A=
// When elemened is focused, some mobile browsers in some cases =
zoom in=0A=
// It looks not nice, so we disable it:=0A=
callbacks: {=0A=
beforeOpen: function() {=0A=
=0A=
=0A=
this.st.mainClass =3D this.st.el.attr('data-effect');=0A=
=0A=
=0A=
//empty all fields=0A=
td_modala_empty_all_fields();=0A=
=0A=
//empty error display div=0A=
td_modala_empty_err_div();=0A=
=0A=
if(jQuery(window).width() < 700) {=0A=
this.st.focus =3D false;=0A=
} else {=0A=
if (td_detect.is_ie =3D=3D=3D false) {=0A=
//do not focus on ie 10=0A=
this.st.focus =3D '#login_email';=0A=
}=0A=
=0A=
}=0A=
},=0A=
=0A=
beforeClose: function() {=0A=
}=0A=
}=0A=
});=0A=
=0A=
=0A=
//login=0A=
jQuery('#login-link').on( "click", function() {=0A=
//hides or shows the divs with inputs=0A=
show_hide_content_modala([['#td-login-div', 1], =
['#td-register-div', 0], ['#td-forgot-pass-div', 0]]);=0A=
=0A=
//moves focus on the tab=0A=
modala_swich_tabs([['#login-link', 1], ['#register-link', 0]]);=0A=
=0A=
if(jQuery(window).width() > 700 && td_detect.is_ie =3D=3D=3D =
false) {=0A=
jQuery('#login_email').focus();=0A=
}=0A=
=0A=
//empty all fields=0A=
//td_modala_empty_all_fields();=0A=
=0A=
//empty error display div=0A=
td_modala_empty_err_div();=0A=
});=0A=
//login button=0A=
jQuery('#login_button').on( "click", function() {=0A=
handle_login_for_modal_window();=0A=
});=0A=
//enter key on #login_pass=0A=
jQuery('#login_pass').keydown(function(event) {=0A=
if ((event.which && event.which =3D=3D 13) || (event.keyCode && =
event.keyCode =3D=3D 13)) {=0A=
handle_login_for_modal_window();=0A=
}=0A=
});=0A=
=0A=
//register=0A=
jQuery('#register-link').on( "click", function() {=0A=
//hides or shows the divs with inputs=0A=
show_hide_content_modala([['#td-login-div', 0], =
['#td-register-div', 1], ['#td-forgot-pass-div', 0]]);=0A=
=0A=
//moves focus on the tab=0A=
modala_swich_tabs([['#login-link', 0], ['#register-link', 1]]);=0A=
=0A=
if(jQuery(window).width() > 700 && td_detect.is_ie =3D=3D=3D =
false) {=0A=
jQuery('#register_email').focus();=0A=
}=0A=
=0A=
//empty all fields=0A=
//td_modala_empty_all_fields();=0A=
=0A=
//empty error display div=0A=
td_modala_empty_err_div();=0A=
});=0A=
//register button=0A=
jQuery('#register_button').on( "click", function() {=0A=
handle_register_for_modal_window();=0A=
});=0A=
//enter key on #register_user=0A=
jQuery('#register_user').keydown(function(event) {=0A=
if ((event.which && event.which =3D=3D 13) || (event.keyCode && =
event.keyCode =3D=3D 13)) {=0A=
handle_register_for_modal_window();=0A=
}=0A=
});=0A=
=0A=
//forgot pass=0A=
jQuery('#forgot-pass-link').on( "click", function() {=0A=
//hides or shows the divs with inputs=0A=
show_hide_content_modala([['#td-login-div', 0], =
['#td-register-div', 0], ['#td-forgot-pass-div', 1]]);=0A=
=0A=
//moves focus on the tab=0A=
modala_swich_tabs([['#login-link', 0], ['#register-link', 0]]);=0A=
=0A=
if(jQuery(window).width() > 700 && td_detect.is_ie =3D=3D=3D =
false) {=0A=
jQuery('#forgot_email').focus();=0A=
}=0A=
=0A=
//empty all fields=0A=
//td_modala_empty_all_fields();=0A=
=0A=
//empty error display div=0A=
td_modala_empty_err_div();=0A=
});=0A=
//forgot button=0A=
jQuery('#forgot_button').on( "click", function() {=0A=
handle_forgot_password_for_modal_window();=0A=
});=0A=
//enter key on #forgot_email=0A=
jQuery('#forgot_email').keydown(function(event) {=0A=
if ((event.which && event.which =3D=3D 13) || (event.keyCode && =
event.keyCode =3D=3D 13)) {=0A=
handle_forgot_password_for_modal_window();=0A=
}=0A=
});=0A=
=0A=
=0A=
});//end jquery ready=0A=
=0A=
=0A=
=0A=
//patern to check emails=0A=
var td_mod_pattern_email =3D =
/^[a-zA-Z0-9][a-zA-Z0-9_\.-]{0,}[a-zA-Z0-9]@[a-zA-Z0-9][a-zA-Z0-9_\.-]{0,=
}[a-z0-9][\.][a-z0-9]{2,4}$/;=0A=
=0A=
/**=0A=
* handle all request made from login tab=0A=
*/=0A=
function handle_login_for_modal_window() {=0A=
var login_email =3D jQuery('#login_email').val();=0A=
var login_pass =3D jQuery('#login_pass').val();=0A=
=0A=
if(login_email && login_pass){=0A=
//empty error display div=0A=
//td_modala_empty_err_div();=0A=
=0A=
modala_add_remove_class(['.td_display_err', 1, =
"td_display_msg_ok"]);=0A=
jQuery('.td_display_err').show();=0A=
td_modala_write_err_div(td_please_wait);=0A=
=0A=
//call ajax for log in=0A=
td_modala_call_ajax('td_mod_login', login_email, '', login_pass);=0A=
} else {=0A=
jQuery('.td_display_err').show();=0A=
td_modala_write_err_div(td_email_user_pass_incorrect);=0A=
}=0A=
}=0A=
=0A=
/**=0A=
* handle all request made from register tab=0A=
*/=0A=
function handle_register_for_modal_window() {=0A=
var register_email =3D jQuery('#register_email').val();=0A=
var register_user =3D jQuery('#register_user').val();=0A=
=0A=
if(td_mod_pattern_email.test(register_email) && register_user){=0A=
//empty error display div=0A=
//td_modala_empty_err_div();=0A=
=0A=
modala_add_remove_class(['.td_display_err', 1, =
"td_display_msg_ok"]);=0A=
jQuery('.td_display_err').show();=0A=
td_modala_write_err_div(td_please_wait);=0A=
=0A=
//call ajax=0A=
td_modala_call_ajax('td_mod_register', register_email, =
register_user, '');=0A=
} else {=0A=
jQuery('.td_display_err').show();=0A=
td_modala_write_err_div(td_email_user_incorrect);=0A=
}=0A=
}=0A=
=0A=
/**=0A=
* handle all request made from forgot password tab=0A=
*/=0A=
function handle_forgot_password_for_modal_window() {=0A=
var forgot_email =3D jQuery('#forgot_email').val();=0A=
=0A=
if(td_mod_pattern_email.test(forgot_email)){=0A=
//empty error display div=0A=
//td_modala_empty_err_div();=0A=
=0A=
modala_add_remove_class(['.td_display_err', 1, =
"td_display_msg_ok"]);=0A=
jQuery('.td_display_err').show();=0A=
td_modala_write_err_div(td_please_wait);=0A=
=0A=
//call ajax=0A=
td_modala_call_ajax('td_mod_remember_pass', forgot_email, '', =
'');=0A=
} else {=0A=
jQuery('.td_display_err').show();=0A=
td_modala_write_err_div(td_email_incorrect);=0A=
}=0A=
}=0A=
=0A=
/**=0A=
* swhich the div's acordingly to the user action (Log In, Register, =
Remember Password)=0A=
*=0A=
* ids_array : array of ids that have to be showed or hidden=0A=
*/=0A=
function show_hide_content_modala(ids_array) {=0A=
var length =3D ids_array.length;=0A=
=0A=
for (var i =3D 0; i < length; i++) {=0A=
var element_id =3D ids_array[i][0];=0A=
var element_visibility =3D ids_array[i][1];=0A=
=0A=
if (element_visibility =3D=3D 1) {=0A=
=
jQuery(element_id).removeClass('td-dispaly-none').addClass('td-dispaly-bl=
ock');=0A=
} else {=0A=
=
jQuery(element_id).removeClass('td-dispaly-block').addClass('td-dispaly-n=
one');=0A=
}=0A=
}=0A=
}=0A=
=0A=
=0A=
/**=0A=
* swhich the tab's acordingly to the user action (Log In, Register, =
Remember Password)=0A=
*=0A=
* ids_array : array of ids that have to be focus on or unfocus=0A=
*/=0A=
function modala_swich_tabs(ids_array) {=0A=
var length =3D ids_array.length;=0A=
=0A=
for (var i =3D 0; i < length; i++) {=0A=
var element_id =3D ids_array[i][0];=0A=
var element_visibility =3D ids_array[i][1];=0A=
=0A=
if (element_visibility =3D=3D 1) {=0A=
jQuery(element_id).addClass('td_login_tab_focus');=0A=
} else {=0A=
jQuery(element_id).removeClass('td_login_tab_focus');=0A=
}=0A=
}=0A=
}=0A=
=0A=
=0A=
/**=0A=
* adds or remove a class from an html object=0A=
*=0A=
* param : array with object identifier (id - # or class - .)=0A=
* ex: ['.class_indetifier', 1, 'class_to_add'] or ['.class_indetifier', =
0, 'class_to_remove']=0A=
*/=0A=
function modala_add_remove_class(param) {=0A=
=0A=
//add class=0A=
if (param[1] =3D=3D 1) {=0A=
jQuery(param[0]).addClass(param[2]);=0A=
=0A=
//remove class=0A=
} else {=0A=
jQuery(param[0]).removeClass(param[2]);=0A=
}=0A=
}=0A=
=0A=
=0A=
/**=0A=
* empty the error div=0A=
*/=0A=
function td_modala_empty_err_div() {=0A=
jQuery('.td_display_err').html('');=0A=
jQuery('.td_display_err').hide();=0A=
}=0A=
=0A=
=0A=
/**=0A=
* write text to error div=0A=
*/=0A=
function td_modala_write_err_div(message) {=0A=
jQuery('.td_display_err').html(message);=0A=
}=0A=
=0A=
/**=0A=
* empty all fields in modal window=0A=
*/=0A=
function td_modala_empty_all_fields() {=0A=
//login fields=0A=
jQuery('#login_email').val('');=0A=
jQuery('#login_pass').val('');=0A=
=0A=
//register fields=0A=
jQuery('#register_email').val('');=0A=
jQuery('#register_user').val('');=0A=
=0A=
//forgot pass=0A=
jQuery('#forgot_email').val('');=0A=
}=0A=
=0A=
=0A=
/**=0A=
* call to server from modal window=0A=
*=0A=
* @param $action : what action (log in, register, forgot email)=0A=
* @param $email : the email beening sent=0A=
* @param $user : the user name beening sent=0A=
*/=0A=
function td_modala_call_ajax(sent_action, sent_email, sent_user, =
sent_pass) {=0A=
jQuery.ajax({=0A=
type: 'POST',=0A=
url: td_ajax_url,=0A=
data: {=0A=
action: sent_action,=0A=
email: sent_email,=0A=
user: sent_user,=0A=
pass: sent_pass=0A=
},=0A=
success: function(data, textStatus, XMLHttpRequest){=0A=
var td_data_object =3D jQuery.parseJSON(data); //get the =
data object=0A=
=0A=
//check the response from server=0A=
switch(td_data_object[0]) {=0A=
case 'login':=0A=
if(td_data_object[1] =3D=3D 1) {=0A=
location.reload(true);=0A=
} else {=0A=
modala_add_remove_class(['.td_display_err', 0, =
'td_display_msg_ok']);=0A=
jQuery('.td_display_err').show();=0A=
td_modala_write_err_div(td_data_object[2]);=0A=
}=0A=
break;=0A=
=0A=
case 'register':=0A=
if(td_data_object[1] =3D=3D 1) {=0A=
modala_add_remove_class(['.td_display_err', 1, =
"td_display_msg_ok"]);=0A=
jQuery('.td_display_err').show();=0A=
} else {=0A=
modala_add_remove_class(['.td_display_err', 0, =
"td_display_msg_ok"]);=0A=
jQuery('.td_display_err').show();=0A=
}=0A=
td_modala_write_err_div(td_data_object[2]);=0A=
break;=0A=
=0A=
case 'remember_pass':=0A=
if(td_data_object[1] =3D=3D 1) {=0A=
modala_add_remove_class(['.td_display_err', 1, =
"td_display_msg_ok"]);=0A=
jQuery('.td_display_err').show();=0A=
} else {=0A=
modala_add_remove_class(['.td_display_err', 0, =
"td_display_msg_ok"]);=0A=
jQuery('.td_display_err').show();=0A=
}=0A=
td_modala_write_err_div(td_data_object[2]);=0A=
break;=0A=
=0A=
}=0A=
=0A=
=0A=
},=0A=
error: function(MLHttpRequest, textStatus, errorThrown){=0A=
//console.log(errorThrown);=0A=
}=0A=
});=0A=
}=0A=
=0A=
/* =
-------------------------------------------------------------------------=
---=0A=
tagDiv live css compiler ( 2013 )=0A=
- this script is used on our demo site to customize the theme live=0A=
- not used on production sites=0A=
*/=0A=
=0A=
=0A=
var td_style_buffer =3D=0A=
'';=0A=
=0A=
=0A=
var td_bg_boxed_imgs =3D [=0A=
'http://demo.tagdiv.com/newspaper/bg_images/1.jpg',=0A=
'http://demo.tagdiv.com/newspaper/bg_images/2.jpg',=0A=
'http://demo.tagdiv.com/newspaper/bg_images/3.jpg'=0A=
];=0A=
=0A=
=0A=
var td_current_panel_stat =3D td_read_cookie('td_show_panel');=0A=
if (td_current_panel_stat =3D=3D 'show' || td_current_panel_stat =3D=3D =
null) {=0A=
=
jQuery('.td-theme-settings-small').addClass('td-theme-settings-no-transit=
ion');=0A=
=
jQuery('.td-theme-settings-small').removeClass('td-theme-settings-small')=
;=0A=
}=0A=
=0A=
=0A=
=0A=
=0A=
/* =
-------------------------------------------------------------------------=
---=0A=
On load=0A=
*/=0A=
jQuery().ready(function() {=0A=
=0A=
//hide panel=0A=
jQuery("#td-theme-set-hide").click(function(event){=0A=
event.preventDefault();=0A=
event.stopPropagation();=0A=
//hide=0A=
td_create_cookie('td_show_panel', 'hide', 1);=0A=
=
jQuery('#td-theme-settings').removeClass('td-theme-settings-no-transition=
');=0A=
jQuery('#td-theme-settings').addClass('td-theme-settings-small');=0A=
=0A=
=0A=
jQuery('.td-set-theme-style-link').removeClass('fadeInLeft');=0A=
=0A=
=0A=
});=0A=
=0A=
=0A=
//show panel=0A=
jQuery("#td-theme-settings").click(function(){=0A=
if (jQuery(this).hasClass('td-theme-settings-small')) {=0A=
=0A=
jQuery('.td-set-theme-style-link').addClass('animated_xlong =
fadeInLeft');=0A=
=0A=
//show full=0A=
td_create_cookie('td_show_panel', 'show', 1);=0A=
=
jQuery('.td-theme-settings-small').removeClass('td-theme-settings-small')=
;=0A=
}=0A=
});=0A=
=0A=
=0A=
=0A=
=0A=
=0A=
}); //end on load=0A=
=0A=
=0A=
=0A=
=0A=
=0A=
=0A=
/* =
-------------------------------------------------------------------------=
---=0A=
Support functions=0A=
*/=0A=
//add trim for ie8=0A=
if (!String.prototype.trim) {=0A=
String.prototype.trim=3Dfunction(){return this.replace(/^\s+|\s+$/g, =
'');};=0A=
}=0A=
=0A=
=0A=
function td_create_cookie(name, value, days) {=0A=
if (days) {=0A=
var date =3D new Date();=0A=
date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000));=0A=
var expires =3D "; expires=3D" + date.toGMTString();=0A=
} else var expires =3D "";=0A=
document.cookie =3D escape(name) + "=3D" + escape(value) + expires + =
"; path=3D/";=0A=
}=0A=
=0A=
function td_read_cookie(name) {=0A=
var nameEQ =3D escape(name) + "=3D";=0A=
var ca =3D document.cookie.split(';');=0A=
for (var i =3D 0; i < ca.length; i++) {=0A=
var c =3D ca[i];=0A=
while (c.charAt(0) =3D=3D ' ') c =3D c.substring(1, c.length);=0A=
if (c.indexOf(nameEQ) =3D=3D 0) return =
unescape(c.substring(nameEQ.length, c.length));=0A=
}=0A=
return null;=0A=
}=0A=
=0A=
function td_erase_cookie(name) {=0A=
td_create_cookie(name, "", -1);=0A=
}=0A=
=0A=
=0A=
=0A=
=0A=
=0A=
/* =
-------------------------------------------------------------------------=
---=0A=
live css compiler @tagDiv 2013=0A=
*/=0A=
=0A=
//the settings object=0A=
function td_customizer_setting () {=0A=
this.name =3D '';=0A=
this.value =3D '';=0A=
}=0A=
=0A=
//the sections object=0A=
function td_customizer_css_section() {=0A=
this.name =3D '';=0A=
this.raw_css =3D '';=0A=
this.compiled_css =3D '';=0A=
}=0A=
=0A=
//css parser class=0A=
function td_custom_css_parser(raw_css) {=0A=
this.raw_css =3D raw_css;=0A=
this.settings =3D [];=0A=
this.css_sections =3D [];=0A=
this.style_element_id =3D '';=0A=
this.compiled_css =3D ''; //compiled css=0A=
}=0A=
=0A=
//load the settings=0A=
td_custom_css_parser.prototype.load_setting_raw =3D function(name, =
value){=0A=
if (this.get_css_section(name) =3D=3D=3D false) {=0A=
var new_setting =3D new td_customizer_setting();=0A=
new_setting.name =3D name;=0A=
new_setting.value =3D value;=0A=
this.settings.push(new_setting);=0A=
} else {=0A=
this.update_setting_value(name, value);=0A=
}=0A=
};=0A=
=0A=
//split the css in sections=0A=
td_custom_css_parser.prototype.split_into_sections =3D function(){=0A=
//remove style wrapping=0A=
this.raw_css =3D this.raw_css.replace(/");else b.styleSheet.cssText=3Da;else =
if(navigator.appVersion.indexOf("MSIE 5")!=3D-1)document.write("");else{a=3Ddocument.createTextNode(a);b.a=
ppendChild(a)}Recaptcha._get_script_area().appendChild(b)},_set_style:fun=
ction(a){if(!Recaptcha.style_set){Recaptcha.style_set=3Dtrue;Recaptcha._a=
dd_css(a+=0A=
"\n\n.recaptcha_is_showing_audio =
.recaptcha_only_if_image,.recaptcha_isnot_showing_audio =
.recaptcha_only_if_audio,.recaptcha_had_incorrect_sol =
.recaptcha_only_if_no_incorrect_sol,.recaptcha_nothad_incorrect_sol =
.recaptcha_only_if_incorrect_sol{display:none =
!important}")}},_init_builtin_theme:function(){var =
a=3DRecaptcha.$,b=3DRecaptchaStr,c=3DRecaptchaState,d,e;c=3Dc.server;if(c=
[c.length-1]=3D=3D"/")c=3Dc.substring(0,c.length-1);var =
f=3Dc+"/img/"+Recaptcha.theme;if(Recaptcha.theme=3D=3D"clean"){c=3DRecapt=
chaTemplates.CleanCss;=0A=
d=3DRecaptchaTemplates.CleanHtml;e=3D"png"}else{if(Recaptcha.theme=3D=3D"=
context"){c=3DRecaptchaTemplates.VertCss;d=3DRecaptchaTemplates.ContextHt=
ml}else{c=3DRecaptchaTemplates.VertCss;d=3DRecaptchaTemplates.VertHtml}e=3D=
"gif"}c=3Dc.replace(/IMGROOT/g,f);Recaptcha._set_style(c);Recaptcha.widge=
t.innerHTML=3D""+d+"
";a("recaptcha_reload").src=3Df+"/refres=
h."+e;a("recaptcha_switch_audio").src=3Df+"/audio."+e;a("recaptcha_switch=
_img").src=3Df+"/text."+e;a("recaptcha_whatsthis").src=3Df+"/help."+e;if(=
Recaptcha.theme=3D=3D=0A=
"clean"){a("recaptcha_logo").src=3Df+"/logo."+e;a("recaptcha_tagline").sr=
c=3Df+"/tagline."+e}a("recaptcha_reload").alt=3Db.refresh_btn;a("recaptch=
a_switch_audio").alt=3Db.audio_challenge;a("recaptcha_switch_img").alt=3D=
b.visual_challenge;a("recaptcha_whatsthis").alt=3Db.help_btn;a("recaptcha=
_reload_btn").href=3D"javascript:Recaptcha.reload =
();";a("recaptcha_reload_btn").title=3Db.refresh_btn;a("recaptcha_switch_=
audio_btn").href=3D"javascript:Recaptcha.switch_type('audio');";a("recapt=
cha_switch_audio_btn").title=3Db.audio_challenge;=0A=
a("recaptcha_switch_img_btn").href=3D"javascript:Recaptcha.switch_type('i=
mage');";a("recaptcha_switch_img_btn").title=3Db.visual_challenge;a("reca=
ptcha_whatsthis_btn").href=3DRecaptcha._get_help_link();a("recaptcha_what=
sthis_btn").target=3D"_blank";a("recaptcha_whatsthis_btn").title=3Db.help=
_btn;a("recaptcha_whatsthis_btn").onclick=3Dfunction(){Recaptcha.showhelp=
();return false};a("recaptcha_table").className=3D"recaptchatable =
recaptcha_theme_"+Recaptcha.theme;a("recaptcha_instructions_image")&&a("r=
ecaptcha_instructions_image").appendChild(document.createTextNode(b.instr=
uctions_visual));=0A=
a("recaptcha_instructions_context")&&a("recaptcha_instructions_context").=
appendChild(document.createTextNode(b.instructions_context));a("recaptcha=
_instructions_audio")&&a("recaptcha_instructions_audio").appendChild(docu=
ment.createTextNode(b.instructions_audio));a("recaptcha_instructions_erro=
r")&&a("recaptcha_instructions_error").appendChild(document.createTextNod=
e(b.incorrect_try_again))},_finish_widget:function(){var =
a=3DRecaptcha.$,b=3DRecaptchaState,c=3DRecaptchaOptions,d=3Dc.theme;switc=
h(d){case "red":case "white":case "blackglass":case "clean":case =
"custom":case "context":break;=0A=
default:d=3D"red";break}if(!Recaptcha.theme)Recaptcha.theme=3Dd;Recaptcha=
.theme!=3D"custom"?Recaptcha._init_builtin_theme():Recaptcha._set_style("=
");d=3Ddocument.createElement("span");d.id=3D"recaptcha_challenge_field_h=
older";d.style.display=3D"none";a("recaptcha_response_field").parentNode.=
insertBefore(d,a("recaptcha_response_field"));a("recaptcha_response_field=
").setAttribute("autocomplete","off");a("recaptcha_image").style.width=3D=
"300px";a("recaptcha_image").style.height=3D"57px";Recaptcha.should_focus=
=3Dfalse;=0A=
Recaptcha._set_challenge(b.challenge,"image");if(c.tabindex){a("recaptcha=
_response_field").tabIndex=3Dc.tabindex;if(Recaptcha.theme!=3D"custom"){a=
("recaptcha_whatsthis_btn").tabIndex=3Dc.tabindex;a("recaptcha_switch_img=
_btn").tabIndex=3Dc.tabindex;a("recaptcha_switch_audio_btn").tabIndex=3Dc=
.tabindex;a("recaptcha_reload_btn").tabIndex=3Dc.tabindex}}if(Recaptcha.w=
idget)Recaptcha.widget.style.display=3D"";c.callback&&c.callback()},switc=
h_type:function(a){var =
b=3DRecaptcha;b.type=3Da;b.reload(b.type=3D=3D"audio"?"a":"v")},=0A=
reload:function(a){var b=3DRecaptcha,c=3DRecaptchaState;if(typeof =
a=3D=3D"undefined")a=3D"r";c=3Dc.server+"reload?c=3D"+c.challenge+"&k=3D"=
+c.site+"&reason=3D"+a+"&type=3D"+b.type+"&lang=3D"+RecaptchaOptions.lang=
;if(RecaptchaOptions.includeContext)c+=3D"&includeContext=3D1";if(typeof =
RecaptchaOptions.extra_challenge_params!=3D"undefined")c+=3D"&"+Recaptcha=
Options.extra_challenge_params;if(b.type=3D=3D"audio")c+=3DRecaptchaOptio=
ns.audio_beta_12_08?"&audio_beta_12_08=3D1":"&new_audio_default=3D1";b.sh=
ould_focus=3Da!=3D"t";b._add_script(c)},finish_reload:function(a,=0A=
b){RecaptchaState.is_incorrect=3Dfalse;Recaptcha._set_challenge(a,b)},_se=
t_challenge:function(a,b){var =
c=3DRecaptcha,d=3DRecaptchaState,e=3Dc.$;d.challenge=3Da;c.type=3Db;e("re=
captcha_challenge_field_holder").innerHTML=3D"";if(b=3D=3D"audio")e("recaptcha_image").inner=
HTML=3DRecaptcha.getAudioCaptchaHtml();else if(b=3D=3D"image"){var =
f=3Dd.server+"image?c=3D"+d.challenge;e("recaptcha_image").innerHTML=3D"<=
img style=3D'display:block;' height=3D'57' width=3D'300' src=3D'"+=0A=
f+"'/>"}Recaptcha._css_toggle("recaptcha_had_incorrect_sol","recaptcha_no=
thad_incorrect_sol",d.is_incorrect);Recaptcha._css_toggle("recaptcha_is_s=
howing_audio","recaptcha_isnot_showing_audio",b=3D=3D"audio");c._clear_in=
put();c.should_focus&&c.focus_response_field();c._reset_timer()},_reset_t=
imer:function(){var =
a=3DRecaptchaState;clearInterval(Recaptcha.timer_id);Recaptcha.timer_id=3D=
setInterval("Recaptcha.reload('t');",(a.timeout-300)*1E3)},showhelp:funct=
ion(){window.open(Recaptcha._get_help_link(),"recaptcha_popup",=0A=
"width=3D460,height=3D570,location=3Dno,menubar=3Dno,status=3Dno,toolbar=3D=
no,scrollbars=3Dyes,resizable=3Dyes")},_clear_input:function(){var =
a=3DRecaptcha.$("recaptcha_response_field");a.value=3D""},_displayerror:f=
unction(a){var =
b=3DRecaptcha.$;b("recaptcha_image").innerHTML=3D"";b("recaptcha_image").=
appendChild(document.createTextNode(a))},reloaderror:function(a){Recaptch=
a._displayerror(a)},_is_ie:function(){return =
navigator.userAgent.indexOf("MSIE")>0&&!window.opera},_css_toggle:functio=
n(a,b,c){var d=3DRecaptcha.widget;=0A=
if(!d)d=3Ddocument.body;var =
e=3Dd.className;e=3De.replace(RegExp("(^|\\s+)"+a+"(\\s+|$)")," =
");e=3De.replace(RegExp("(^|\\s+)"+b+"(\\s+|$)")," ");e+=3D" =
"+(c?a:b);d.className=3De},_get_help_link:function(){var =
a=3DRecaptchaOptions.lang;return"http://recaptcha.net/popuphelp/"+(a=3D=3D=
"en"?"":a+".html")},playAgain:function(){var =
a=3DRecaptcha.$;a("recaptcha_image").innerHTML=3DRecaptcha.getAudioCaptch=
aHtml()},getAudioCaptchaHtml:function(){var =
a=3DRecaptcha,b=3DRecaptchaState,c=3Db.server+"image?c=3D"+b.challenge;if=
(c.indexOf("https://")=3D=3D=0A=
0)c=3D"http://"+c.substring(8);b=3Db.server+"/img/audiocaptcha.swf?v2";a=3D=
a._is_ie()?'
':' ';=0A=
c=3D(Recaptcha.checkFlashVer()?'
'+RecaptchaStr.play_again+"":"")+'
'+RecaptchaStr.cant_hear_this+"";return =
a+c},gethttpwavurl:function(){var =
a=3DRecaptchaState;if(Recaptcha.type=3D=3D"audio"){a=3Da.server+"image?c=3D=
"+a.challenge;if(a.indexOf("https://")=3D=3D0)a=3D"http://"+a.substring(8=
);return a}return""},checkFlashVer:function(){var a=3D=0A=
navigator.appVersion.indexOf("MSIE")!=3D-1?true:false,b=3Dnavigator.appVe=
rsion.toLowerCase().indexOf("win")!=3D-1?true:false,c=3Dnavigator.userAge=
nt.indexOf("Opera")!=3D-1?true:false,d=3D-1;if(navigator.plugins!=3Dnull&=
&navigator.plugins.length>0){if(navigator.plugins["Shockwave Flash =
2.0"]||navigator.plugins["Shockwave =
Flash"]){a=3Dnavigator.plugins["Shockwave Flash 2.0"]?" =
2.0":"";a=3Dnavigator.plugins["Shockwave =
Flash"+a].description;a=3Da.split(" =
");a=3Da[2].split(".");d=3Da[0]}}else if(a&&b&&!c)try{var e=3Dnew =
ActiveXObject("ShockwaveFlash.ShockwaveFlash.7"),=0A=
f=3De.GetVariable("$version");d=3Df.split(" =
")[1].split(",")[0]}catch(g){}return d>=3D9},getlang:function(){return =
RecaptchaOptions.lang}};=0A=
------=_NextPart_000_0000_01D35A73.CC4047E0
Content-Type: application/octet-stream
Content-Transfer-Encoding: quoted-printable
Content-Location: http://stats.wp.com/e-201745.js
window.wpcom=3Dwindow.wpcom||{};window._stq=3Dwindow._stq||[];function =
st_go(a){window._stq.push(['view',a]);};function =
linktracker_init(b,p){window._stq.push(['clickTrackerInit',b,p]);};window=
.wpcom.stats=3D(function(){var _clickTracker=3D(function(){var =
_blog,_post;var =
_addEvent=3Dfunction(el,t,cb){if('function'=3D=3D=3Dtypeof =
el.addEventListener){el.addEventListener(t,cb);}else =
if('object'=3D=3D=3Dtypeof =
el.attachEvent){el.attachEvent('on'+t,cb);}};var =
_getClickTarget=3Dfunction(e){if('object'=3D=3D=3Dtypeof =
e&&e.target){return e.target;}else{return window.event.srcElement;}};var =
_clickTrack=3Dfunction(e){var d=3D0;if('object'=3D=3D=3Dtypeof =
InstallTrigger)d=3D100;if(7=3D=3D=3D_getIEVer())d=3D100;_processLink(_get=
ClickTarget(e),d);};var =
_contextTrack=3Dfunction(e){_processLink(_getClickTarget(e),0);};var =
_isSameHost=3Dfunction(a){var =
l=3Ddocument.location;if(l.host=3D=3D=3Da.host)return =
true;if(''=3D=3D=3Da.host)return =
true;if(l.protocol=3D=3D=3Da.protocol&&l.host=3D=3D=3Da.hostname){if('htt=
p:'=3D=3D=3Dl.protocol&&l.host+':80'=3D=3D=3Da.host)return =
true;if('https:'=3D=3D=3Dl.protocol&&l.host+':443'=3D=3D=3Da.host)return =
true;};return false;};var =
_processLink=3Dfunction(a,d){try{if('object'!=3D=3Dtypeof =
a)return;while('A'!=3D=3Da.nodeName){if('undefined'=3D=3D=3Dtypeof =
a.nodeName)return;if('object'!=3D=3Dtypeof =
a.parentNode)return;a=3Da.parentNode;};if(_isSameHost(a))return;if('javas=
cript:'=3D=3D=3Da.protocol)return;window._stq.push(['click',{s:'2',u:a.hr=
ef,r:('undefined'!=3D=3Dtypeof =
a.rel)?a.rel:'0',b:('undefined'!=3D=3Dtypeof =
_blog)?_blog:'0',p:('undefined'!=3D=3Dtypeof =
_post)?_post:'0'}]);if(d){var now=3Dnew Date();var =
end=3Dnow.getTime()+d;while(true){now=3Dnew =
Date();if(now.getTime()>end){break}}}}catch(e){}};var =
API=3D{init:function(b,p){_blog=3Db;_post=3Dp;if(document.body){_addEvent=
(document.body,'click',_clickTrack);_addEvent(document.body,'contextmenu'=
,_contextTrack);}else =
if(document){_addEvent(document,'click',_clickTrack);_addEvent(document,'=
contextmenu',_contextTrack);}}};return API;})();var =
_getIEVer=3Dfunction(){var v=3D0;if('object'=3D=3D=3Dtypeof =
navigator&&navigator.appName=3D=3D'Microsoft Internet Explorer'){var =
m=3Dnavigator.userAgent.match(/MSIE =
([0-9]{1,})[\.0-9]{0,}/);if(null!=3D=3Dm){v=3DparseInt(m[1]);}};return =
v;};var _serialize=3Dfunction(o){var p,q=3D[];for(p in =
o){if(o.hasOwnProperty(p)){q.push(encodeURIComponent(p)+'=3D'+encodeURICo=
mponent(o[p]));}};return q.join('&');};var =
_loadGif=3Dfunction(t,q,id){var i=3Dnew =
Image();i.src=3Ddocument.location.protocol+'//pixel.wp.com/'+t+'?'+q+'&ra=
nd=3D'+Math.random();i.alt=3D":)";i.width=3D'6';i.height=3D'5';if('string=
'=3D=3D=3Dtypeof =
id&&document.body){i.id=3Did;document.body.appendChild(i);}};var =
STQ=3Dfunction(q){this.a=3D1;if(q&&q.length){for(var =
i=3D0;i