window.log=function(){log.history=log.history||[];log.history.push(arguments);if(this.console){arguments.callee=arguments.callee.caller;var a=[].slice.call(arguments);(typeof console.log==="object"?log.apply.call(console.log,console,a):console.log.apply(console,a))}};(function(e){function h(){}for(var g="assert,count,debug,dir,dirxml,error,exception,group,groupCollapsed,groupEnd,info,log,timeStamp,profile,profileEnd,time,timeEnd,trace,warn".split(","),f;f=g.pop();){e[f]=e[f]||h}})((function(){try{console.log();return window.console}catch(a){return window.console={}}})());jQuery.easing.jswing=jQuery.easing.swing;jQuery.extend(jQuery.easing,{def:"easeOutQuad",swing:function(e,f,a,h,g){return jQuery.easing[jQuery.easing.def](e,f,a,h,g)},easeInQuad:function(e,f,a,h,g){return h*(f/=g)*f+a},easeOutQuad:function(e,f,a,h,g){return -h*(f/=g)*(f-2)+a},easeInOutQuad:function(e,f,a,h,g){if((f/=g/2)<1){return h/2*f*f+a}return -h/2*((--f)*(f-2)-1)+a},easeInCubic:function(e,f,a,h,g){return h*(f/=g)*f*f+a},easeOutCubic:function(e,f,a,h,g){return h*((f=f/g-1)*f*f+1)+a},easeInOutCubic:function(e,f,a,h,g){if((f/=g/2)<1){return h/2*f*f*f+a}return h/2*((f-=2)*f*f+2)+a},easeInQuart:function(e,f,a,h,g){return h*(f/=g)*f*f*f+a},easeOutQuart:function(e,f,a,h,g){return -h*((f=f/g-1)*f*f*f-1)+a},easeInOutQuart:function(e,f,a,h,g){if((f/=g/2)<1){return h/2*f*f*f*f+a}return -h/2*((f-=2)*f*f*f-2)+a},easeInQuint:function(e,f,a,h,g){return h*(f/=g)*f*f*f*f+a},easeOutQuint:function(e,f,a,h,g){return h*((f=f/g-1)*f*f*f*f+1)+a},easeInOutQuint:function(e,f,a,h,g){if((f/=g/2)<1){return h/2*f*f*f*f*f+a}return h/2*((f-=2)*f*f*f*f+2)+a},easeInSine:function(e,f,a,h,g){return -h*Math.cos(f/g*(Math.PI/2))+h+a},easeOutSine:function(e,f,a,h,g){return h*Math.sin(f/g*(Math.PI/2))+a},easeInOutSine:function(e,f,a,h,g){return -h/2*(Math.cos(Math.PI*f/g)-1)+a},easeInExpo:function(e,f,a,h,g){return(f==0)?a:h*Math.pow(2,10*(f/g-1))+a},easeOutExpo:function(e,f,a,h,g){return(f==g)?a+h:h*(-Math.pow(2,-10*f/g)+1)+a},easeInOutExpo:function(e,f,a,h,g){if(f==0){return a}if(f==g){return a+h}if((f/=g/2)<1){return h/2*Math.pow(2,10*(f-1))+a}return h/2*(-Math.pow(2,-10*--f)+2)+a},easeInCirc:function(e,f,a,h,g){return -h*(Math.sqrt(1-(f/=g)*f)-1)+a},easeOutCirc:function(e,f,a,h,g){return h*Math.sqrt(1-(f=f/g-1)*f)+a},easeInOutCirc:function(e,f,a,h,g){if((f/=g/2)<1){return -h/2*(Math.sqrt(1-f*f)-1)+a}return h/2*(Math.sqrt(1-(f-=2)*f)+1)+a},easeInElastic:function(f,h,e,l,k){var i=1.70158;var j=0;var g=l;if(h==0){return e}if((h/=k)==1){return e+l}if(!j){j=k*0.3}if(g<Math.abs(l)){g=l;var i=j/4}else{var i=j/(2*Math.PI)*Math.asin(l/g)}return -(g*Math.pow(2,10*(h-=1))*Math.sin((h*k-i)*(2*Math.PI)/j))+e},easeOutElastic:function(f,h,e,l,k){var i=1.70158;var j=0;var g=l;if(h==0){return e}if((h/=k)==1){return e+l}if(!j){j=k*0.3}if(g<Math.abs(l)){g=l;var i=j/4}else{var i=j/(2*Math.PI)*Math.asin(l/g)}return g*Math.pow(2,-10*h)*Math.sin((h*k-i)*(2*Math.PI)/j)+l+e},easeInOutElastic:function(f,h,e,l,k){var i=1.70158;var j=0;var g=l;if(h==0){return e}if((h/=k/2)==2){return e+l}if(!j){j=k*(0.3*1.5)}if(g<Math.abs(l)){g=l;var i=j/4}else{var i=j/(2*Math.PI)*Math.asin(l/g)}if(h<1){return -0.5*(g*Math.pow(2,10*(h-=1))*Math.sin((h*k-i)*(2*Math.PI)/j))+e}return g*Math.pow(2,-10*(h-=1))*Math.sin((h*k-i)*(2*Math.PI)/j)*0.5+l+e},easeInBack:function(e,f,a,i,h,g){if(g==undefined){g=1.70158}return i*(f/=h)*f*((g+1)*f-g)+a},easeOutBack:function(e,f,a,i,h,g){if(g==undefined){g=1.70158}return i*((f=f/h-1)*f*((g+1)*f+g)+1)+a},easeInOutBack:function(e,f,a,i,h,g){if(g==undefined){g=1.70158}if((f/=h/2)<1){return i/2*(f*f*(((g*=(1.525))+1)*f-g))+a}return i/2*((f-=2)*f*(((g*=(1.525))+1)*f+g)+2)+a},easeInBounce:function(e,f,a,h,g){return h-jQuery.easing.easeOutBounce(e,g-f,0,h,g)+a},easeOutBounce:function(e,f,a,h,g){if((f/=g)<(1/2.75)){return h*(7.5625*f*f)+a}else{if(f<(2/2.75)){return h*(7.5625*(f-=(1.5/2.75))*f+0.75)+a}else{if(f<(2.5/2.75)){return h*(7.5625*(f-=(2.25/2.75))*f+0.9375)+a}else{return h*(7.5625*(f-=(2.625/2.75))*f+0.984375)+a
}}}},easeInOutBounce:function(e,f,a,h,g){if(f<g/2){return jQuery.easing.easeInBounce(e,f*2,0,h,g)*0.5+a}return jQuery.easing.easeOutBounce(e,f*2-g,0,h,g)*0.5+h*0.5+a}});(function(c){var a=c.scrollTo=function(f,e,d){c(window).scrollTo(f,e,d)};a.defaults={axis:"xy",duration:parseFloat(c.fn.jquery)>=1.3?0:1};a.window=function(d){return c(window)._scrollable()};c.fn._scrollable=function(){return this.map(function(){var e=this,d=!e.nodeName||c.inArray(e.nodeName.toLowerCase(),["iframe","#document","html","body"])!=-1;if(!d){return e}var f=(e.contentWindow||e).document||e.ownerDocument||e;return c.browser.safari||f.compatMode=="BackCompat"?f.body:f.documentElement})};c.fn.scrollTo=function(f,e,d){if(typeof e=="object"){d=e;e=0}if(typeof d=="function"){d={onAfter:d}}if(f=="max"){f=9000000000}d=c.extend({},a.defaults,d);e=e||d.speed||d.duration;d.queue=d.queue&&d.axis.length>1;if(d.queue){e/=2}d.offset=b(d.offset);d.over=b(d.over);return this._scrollable().each(function(){var l=this,j=c(l),k=f,i,g={},m=j.is("html,body");switch(typeof k){case"number":case"string":if(/^([+-]=)?\d+(\.\d+)?(px|%)?$/.test(k)){k=b(k);break}k=c(k,this);case"object":if(k.is||k.style){i=(k=c(k)).offset()}}c.each(d.axis.split(""),function(q,r){var s=r=="x"?"Left":"Top",u=s.toLowerCase(),p="scroll"+s,o=l[p],n=a.max(l,r);if(i){g[p]=i[u]+(m?0:o-j.offset()[u]);if(d.margin){g[p]-=parseInt(k.css("margin"+s))||0;g[p]-=parseInt(k.css("border"+s+"Width"))||0}g[p]+=d.offset[u]||0;if(d.over[u]){g[p]+=k[r=="x"?"width":"height"]()*d.over[u]}}else{var t=k[u];g[p]=t.slice&&t.slice(-1)=="%"?parseFloat(t)/100*n:t}if(/^\d+$/.test(g[p])){g[p]=g[p]<=0?0:Math.min(g[p],n)}if(!q&&d.queue){if(o!=g[p]){h(d.onAfterFirst)}delete g[p]}});h(d.onAfter);function h(n){j.animate(g,e,d.easing,n&&function(){n.call(this,f,d)})}}).end()};a.max=function(j,i){var h=i=="x"?"Width":"Height",e="scroll"+h;if(!c(j).is("html,body")){return j[e]-c(j)[h.toLowerCase()]()}var g="client"+h,f=j.ownerDocument.documentElement,d=j.ownerDocument.body;return Math.max(f[e],d[e])-Math.min(f[g],d[g])};function b(d){return typeof d=="object"?d:{top:d,left:d}}})(jQuery);(function(a){a.fn.hoverIntent=function(k,j){var l={sensitivity:7,interval:100,timeout:0};l=a.extend(l,j?{over:k,out:j}:k);var n,m,h,d;var e=function(f){n=f.pageX;m=f.pageY};var c=function(g,f){f.hoverIntent_t=clearTimeout(f.hoverIntent_t);if((Math.abs(h-n)+Math.abs(d-m))<l.sensitivity){a(f).unbind("mousemove",e);f.hoverIntent_s=1;return l.over.apply(f,[g])}else{h=n;d=m;f.hoverIntent_t=setTimeout(function(){c(g,f)},l.interval)}};var i=function(g,f){f.hoverIntent_t=clearTimeout(f.hoverIntent_t);f.hoverIntent_s=0;return l.out.apply(f,[g])};var b=function(o){var g=jQuery.extend({},o);var f=this;if(f.hoverIntent_t){f.hoverIntent_t=clearTimeout(f.hoverIntent_t)}if(o.type=="mouseenter"){h=g.pageX;d=g.pageY;a(f).bind("mousemove",e);if(f.hoverIntent_s!=1){f.hoverIntent_t=setTimeout(function(){c(g,f)},l.interval)}}else{a(f).unbind("mousemove",e);if(f.hoverIntent_s==1){f.hoverIntent_t=setTimeout(function(){i(g,f)},l.timeout)}}};return this.bind("mouseenter",b).bind("mouseleave",b)}})(jQuery);(function(b){b.fn.diapo=function(al,ak){function K(az){ah.addClass("diaposliding");var ay=parseFloat(b("> "+al.selector+".diapocurrent",ah).not("#pix_canvas").not("#pix_canvas_wrap").not("#pix_next").not("#pix_prev").not("#pix_commands").index());if(az>0){var ax=az-1}else{if(ay==T-1){var ax=0}else{var ax=ay+1}}var aw=al.rows,av=al.cols,au=1,aq=0,ao,an,F,at,ar=new Array("simpleFade","curtainTopLeft","curtainTopRight","curtainBottomLeft","curtainBottomRight","curtainSliceLeft","curtainSliceRight","blindCurtainTopLeft","blindCurtainTopRight","blindCurtainBottomLeft","blindCurtainBottomRight","blindCurtainSliceBottom","blindCurtainSliceTop","stampede","mosaic","mosaicReverse","mosaicRandom","mosaicSpiral","mosaicSpiralReverse","topLeftBottomRight","bottomRightTopLeft","bottomLeftTopRight","bottomLeftTopRight","scrollLeft","scrollRight","scrollTop","scrollBottom","scrollHorz");marginLeft=0,marginTop=0;
if(ai()){var ap=V.eq(ax).attr("data-fx")}else{var ap=V.eq(ax).attr("data-mobileFx")}if(typeof ap!=="undefined"&&ap!==false){F=ap}else{if(ai()&&al.mobileFx!=""){F=al.mobileFx}else{F=al.fx}if(F=="random"){F=L(ar);F=F[0]}else{F=F;if(F.indexOf(",")>0){F=F.replace(/ /g,"");F=F.split(",");F=L(F);F=F[0]}}}if(ai()&&al.mobileEasing!=""){at=al.mobileEasing}else{at=al.easing}ao=V.eq(ax).attr("data-slideOn");if(typeof ao!=="undefined"&&ao!==false){am=ao}else{if(al.slideOn=="random"){var am=new Array("next","prev");am=L(am);am=am[0]}else{am=al.slideOn}}an=V.eq(ax).attr("data-time");if(typeof an!=="undefined"&&an!==false){an=an}else{an=al.time}if(!b(ah).hasClass("diapostarted")){F="simpleFade";am="next";b(ah).addClass("diapostarted")}switch(F){case"simpleFade":av=1;aw=1;break;case"curtainTopLeft":if(al.slicedCols==0){av=al.cols}else{av=al.slicedCols}aw=1;break;case"curtainTopRight":if(al.slicedCols==0){av=al.cols}else{av=al.slicedCols}aw=1;break;case"curtainBottomLeft":if(al.slicedCols==0){av=al.cols}else{av=al.slicedCols}aw=1;break;case"curtainBottomRight":if(al.slicedCols==0){av=al.cols}else{av=al.slicedCols}aw=1;break;case"curtainSliceLeft":if(al.slicedCols==0){av=al.cols}else{av=al.slicedCols}aw=1;break;case"curtainSliceRight":if(al.slicedCols==0){av=al.cols}else{av=al.slicedCols}aw=1;break;case"blindCurtainTopLeft":if(al.slicedRows==0){aw=al.rows}else{aw=al.slicedRows}av=1;break;case"blindCurtainTopRight":if(al.slicedRows==0){aw=al.rows}else{aw=al.slicedRows}av=1;break;case"blindCurtainBottomLeft":if(al.slicedRows==0){aw=al.rows}else{aw=al.slicedRows}av=1;break;case"blindCurtainBottomRight":if(al.slicedRows==0){aw=al.rows}else{aw=al.slicedRows}av=1;break;case"blindCurtainSliceTop":if(al.slicedRows==0){aw=al.rows}else{aw=al.slicedRows}av=1;break;case"blindCurtainSliceBottom":if(al.slicedRows==0){aw=al.rows}else{aw=al.slicedRows}av=1;break;case"stampede":aq="-"+al.transPeriod;break;case"mosaic":aq=al.gridDifference;break;case"mosaicReverse":aq=al.gridDifference;break;case"mosaicRandom":break;case"mosaicSpiral":aq=al.gridDifference;au=1.7;break;case"mosaicSpiralReverse":aq=al.gridDifference;au=1.7;break;case"topLeftBottomRight":aq=al.gridDifference;au=6;break;case"bottomRightTopLeft":aq=al.gridDifference;au=6;break;case"bottomLeftTopRight":aq=al.gridDifference;au=6;break;case"topRightBottomLeft":aq=al.gridDifference;au=6;break;case"scrollLeft":av=1;aw=1;break;case"scrollRight":av=1;aw=1;break;case"scrollTop":av=1;aw=1;break;case"scrollBottom":av=1;aw=1;break;case"scrollHorz":av=1;aw=1;break}var G=0;var B=aw*av;var A=af-Math.floor(af/av)*av;var z=ag-Math.floor(ag/aw)*aw;var x;var v;var t=0;var r=0;var q=new Array;var o=new Array;var l=new Array;while(G<B){q.push(G);o.push(G);ah.append('<div class="diapoappended" style="display:none; overflow:hidden; position:absolute; z-index:1000" />');var j=b(".diapoappended:eq("+G+")");j.find("iframe").remove();if(F=="scrollLeft"||F=="scrollRight"||F=="scrollTop"||F=="scrollBottom"||F=="scrollHorz"){V.eq(ax).clone().show().appendTo(j)}else{if(am=="next"){V.eq(ax).clone().show().appendTo(j)}else{V.eq(ay).clone().show().appendTo(j)}}if(G%av<A){x=1}else{x=0}if(G%av==0){t=0}if(Math.floor(G/av)<z){v=1}else{v=0}j.css({height:Math.floor(ag/aw+v+1),left:t,top:r,width:Math.floor(af/av+x+1)});b("> "+al.selector,j).not("#pix_canvas").not("#pix_canvas_wrap").not("#pix_next").not("#pix_prev").not("#pix_commands").css({height:ag,"margin-left":"-"+t+"px","margin-top":"-"+r+"px",width:af});t=t+j.width()-1;if(G%av==av-1){r=r+j.height()-1}G++}switch(F){case"curtainTopLeft":break;case"curtainBottomLeft":break;case"curtainSliceLeft":break;case"curtainTopRight":q=q.reverse();break;case"curtainBottomRight":q=q.reverse();break;case"curtainSliceRight":q=q.reverse();break;case"blindCurtainTopLeft":break;case"blindCurtainBottomLeft":q=q.reverse();break;case"blindCurtainSliceTop":break;case"blindCurtainTopRight":break;case"blindCurtainBottomRight":q=q.reverse();break;case"blindCurtainSliceBottom":q=q.reverse();break;case"stampede":q=L(q);
break;case"mosaic":break;case"mosaicReverse":q=q.reverse();break;case"mosaicRandom":q=L(q);break;case"mosaicSpiral":var i=aw/2,h,g,f,e=0;for(f=0;f<i;f++){g=f;for(h=f;h<av-f-1;h++){l[e++]=g*av+h}h=av-f-1;for(g=f;g<aw-f-1;g++){l[e++]=g*av+h}g=aw-f-1;for(h=av-f-1;h>f;h--){l[e++]=g*av+h}h=f;for(g=aw-f-1;g>f;g--){l[e++]=g*av+h}}q=l;break;case"mosaicSpiralReverse":var i=aw/2,h,g,f,e=B-1;for(f=0;f<i;f++){g=f;for(h=f;h<av-f-1;h++){l[e--]=g*av+h}h=av-f-1;for(g=f;g<aw-f-1;g++){l[e--]=g*av+h}g=aw-f-1;for(h=av-f-1;h>f;h--){l[e--]=g*av+h}h=f;for(g=aw-f-1;g>f;g--){l[e--]=g*av+h}}q=l;break;case"topLeftBottomRight":for(var g=0;g<aw;g++){for(var h=0;h<av;h++){l.push(h+g)}}o=l;break;case"bottomRightTopLeft":for(var g=0;g<aw;g++){for(var h=0;h<av;h++){l.push(h+g)}}o=l.reverse();break;case"bottomLeftTopRight":for(var g=aw;g>0;g--){for(var h=0;h<av;h++){l.push(h+g)}}o=l;break;case"topRightBottomLeft":for(var g=0;g<aw;g++){for(var h=av;h>0;h--){l.push(h+g)}}o=l;break}b.each(q,function(n,k){function m(){b(this).addClass("diapoeased");if(b(".diapoeased").length==B){al.onEnterSlide.call(this);b(".fromLeft, .fromRight, .fromTop, .fromBottom, .fadeIn").each(function(){b(this).css("visibility","hidden")});V.eq(ax).show().css("z-index","999").addClass("diapocurrent");V.eq(ay).css("z-index","1").removeClass("diapocurrent");var p=V.eq(ax).find(".fromLeft, .fromRight, .fromTop, .fromBottom, .fadeIn").length;if(p!=0){b(".diapocurrent .fromLeft, .diapocurrent .fromRight, .diapocurrent .fromTop, .diapocurrent .fromBottom, .diapocurrent .fadeIn").each(function(){if(b(this).attr("data-easing")!=""){var aC=b(this).attr("data-easing")}else{var aC=at}var aB=b(this);var aA=aB.width();var E=aB.outerHeight();aB.css("width",aA);var D=aB.position();var C=D.left;var y=D.top;var w=aB.attr("class");var u=aB.index();var s=aB.parents(".pix_relativize").height();var c=aB.parents(".pix_relativize").width();if(w.indexOf("fromLeft")!=-1){aB.css({left:"-"+c+"px",right:"auto"});aB.css("visibility","visible").delay(an/p*0.1*(u-1)).animate({left:D.left},an/p*0.2,aC)}else{if(w.indexOf("fromRight")!=-1){aB.css({left:c+"px",right:"auto"});aB.css("visibility","visible").delay(an/p*0.1*(u-1)).animate({left:D.left},an/p*0.2,aC)}else{if(w.indexOf("fromTop")!=-1){aB.css({top:"-"+s+"px",bottom:"auto"});aB.css("visibility","visible").delay(an/p*0.1*(u-1)).animate({top:D.top},an/p*0.2,aC)}else{if(w.indexOf("fromBottom")!=-1){aB.css({top:s+"px",bottom:"auto"});aB.css("visibility","visible").delay(an/p*0.1*(u-1)).animate({top:D.top},an/p*0.2,aC)}else{if(w.indexOf("fadeIn")!=-1){aB.animate({opacity:0},0).css("visibility","visible").delay(an/p*0.1*(u-1)).animate({opacity:1},an/p*0.2,aC)}}}}}})}b(".diapoappended").remove();ah.removeClass("diaposliding");V.eq(ay).hide();b("#pix_canvas").animate({opacity:al.loaderOpacity},400);ae=setInterval(function(){if(b.browser.msie&&b.browser.version<9||al.loader=="bar"){if(a<=1&&!ah.hasClass("stopped")){a=a+0.01}else{if(a<=1&&ah.hasClass("stopped")){a=a}else{if(!ah.hasClass("stopped")){P()}clearInterval(ae);b("#pix_canvas").animate({opacity:0},200,function(){setTimeout(N,al.transPeriod+aq);K()})}}I.css({width:af*a})}else{W=a;U.clearRect(0,0,al.pieDiameter,al.pieDiameter);U.globalCompositeOperation="destination-over";U.beginPath();U.arc(al.pieDiameter/2,al.pieDiameter/2,al.pieDiameter/2-al.pieStroke,0,Math.PI*2,false);U.lineWidth=al.pieStroke;U.strokeStyle=al.loaderBgColor;U.stroke();U.closePath();U.globalCompositeOperation="source-over";U.beginPath();U.arc(al.pieDiameter/2,al.pieDiameter/2,al.pieDiameter/2-al.pieStroke,0,Math.PI*2*W,false);U.lineWidth=al.pieStroke-4;U.strokeStyle=al.loaderColor;U.stroke();U.closePath();if(a<=1&&!ah.hasClass("stopped")){a=a+0.01}else{if(a<=1&&ah.hasClass("stopped")){a=a}else{if(!ah.hasClass("stopped")){P()}clearInterval(ae);b("#pix_canvas, #pix_canvas_wrap").animate({opacity:0},200,function(){setTimeout(N,al.transPeriod+aq);K()})}}}},an*0.01)}}if(k%av<A){x=1}else{x=0}if(k%av==0){t=0}if(Math.floor(k/av)<z){v=1}else{v=0}b(".interval").text(F);
switch(F){case"simpleFade":height=ag;width=af;break;case"curtainTopLeft":height=0,width=Math.floor(af/av+x+1),marginTop="-"+Math.floor(ag/aw+v+1)+"px";break;case"curtainTopRight":height=0,width=Math.floor(af/av+x+1),marginTop="-"+Math.floor(ag/aw+v+1)+"px";break;case"curtainBottomLeft":height=0,width=Math.floor(af/av+x+1),marginTop=Math.floor(ag/aw+v+1)+"px";break;case"curtainBottomRight":height=0,width=Math.floor(af/av+x+1),marginTop=Math.floor(ag/aw+v+1)+"px";break;case"curtainSliceLeft":height=0,width=Math.floor(af/av+x+1);if(k%2==0){marginTop=Math.floor(ag/aw+v+1)+"px"}else{marginTop="-"+Math.floor(ag/aw+v+1)+"px"}break;case"curtainSliceRight":height=0,width=Math.floor(af/av+x+1);if(k%2==0){marginTop=Math.floor(ag/aw+v+1)+"px"}else{marginTop="-"+Math.floor(ag/aw+v+1)+"px"}break;case"blindCurtainTopLeft":height=Math.floor(ag/aw+v+1),width=0,marginLeft="-"+Math.floor(af/av+x+1)+"px";break;case"blindCurtainTopRight":height=Math.floor(ag/aw+v+1),width=0,marginLeft=Math.floor(af/av+x+1)+"px";break;case"blindCurtainBottomLeft":height=Math.floor(ag/aw+v+1),width=0,marginLeft="-"+Math.floor(af/av+x+1)+"px";break;case"blindCurtainBottomRight":height=Math.floor(ag/aw+v+1),width=0,marginLeft=Math.floor(af/av+x+1)+"px";break;case"blindCurtainSliceBottom":height=Math.floor(ag/aw+v+1),width=0;if(k%2==0){marginLeft="-"+Math.floor(af/av+x+1)+"px"}else{marginLeft=Math.floor(af/av+x+1)+"px"}break;case"blindCurtainSliceTop":height=Math.floor(ag/aw+v+1),width=0;if(k%2==0){marginLeft="-"+Math.floor(af/av+x+1)+"px"}else{marginLeft=Math.floor(af/av+x+1)+"px"}break;case"stampede":height=0;width=0;marginLeft=af*0.2*(n%av-(av-Math.floor(av/2)))+"px";marginTop=ag*0.2*(Math.floor(n/av)+1-(aw-Math.floor(aw/2)))+"px";break;case"mosaic":height=0;width=0;break;case"mosaicReverse":height=0;width=0;marginLeft=Math.floor(af/av+x+1)+"px";marginTop=Math.floor(ag/aw+v+1)+"px";break;case"mosaicRandom":height=0;width=0;marginLeft=Math.floor(af/av+x+1)*0.5+"px";marginTop=Math.floor(ag/aw+v+1)*0.5+"px";break;case"mosaicSpiral":height=0;width=0;marginLeft=Math.floor(af/av+x+1)*0.5+"px";marginTop=Math.floor(ag/aw+v+1)*0.5+"px";break;case"mosaicSpiralReverse":height=0;width=0;marginLeft=Math.floor(af/av+x+1)*0.5+"px";marginTop=Math.floor(ag/aw+v+1)*0.5+"px";break;case"topLeftBottomRight":height=0;width=0;break;case"bottomRightTopLeft":height=0;width=0;marginLeft=Math.floor(af/av+x+1)+"px";marginTop=Math.floor(ag/aw+v+1)+"px";break;case"bottomLeftTopRight":height=0;width=0;marginLeft=0;marginTop=Math.floor(ag/aw+v+1)+"px";break;case"topRightBottomLeft":height=0;width=0;marginLeft=Math.floor(af/av+x+1)+"px";marginTop="-"+Math.floor(ag/aw+v+1)+"px";break;case"scrollRight":height=ag;width=af;marginLeft=-af;break;case"scrollLeft":height=ag;width=af;marginLeft=af;break;case"scrollTop":height=ag;width=af;marginTop=ag;break;case"scrollBottom":height=ag;width=af;marginTop=-ag;break;case"scrollHorz":height=ag;width=af;if(ay==0&&ax==T-1){marginLeft=-af}else{if(ay<ax||ay==T-1&&ax==0){marginLeft=af}else{marginLeft=-af}}break}var d=b(".diapoappended:eq("+k+")");if(typeof ae!=="undefined"){clearInterval(ae);setTimeout(N,al.transPeriod+aq)}if(Y==true){b("#pix_pag li").removeClass("diapocurrent");b("#pix_pag li").eq(ax).addClass("diapocurrent")}if(F=="scrollLeft"||F=="scrollRight"||F=="scrollTop"||F=="scrollBottom"||F=="scrollHorz"){d.delay((al.transPeriod+aq)/B*o[n]*au*0.5).css({display:"block",height:height,"margin-left":marginLeft,"margin-top":marginTop,width:width}).animate({height:Math.floor(ag/aw+v+1),"margin-top":0,"margin-left":0,width:Math.floor(af/av+x+1)},al.transPeriod-aq,at,m);V.eq(ay).delay((al.transPeriod+aq)/B*o[n]*au*0.5).animate({"margin-left":marginLeft*-1,"margin-top":marginTop*-1},al.transPeriod-aq,at,function(){jQuery(this).css({"margin-top":0,"margin-left":0})})}else{if(am=="next"){d.delay((al.transPeriod+aq)/B*o[n]*au*0.5).css({display:"block",height:height,"margin-left":marginLeft,"margin-top":marginTop,width:width,opacity:0}).animate({height:Math.floor(ag/aw+v+1),"margin-top":0,"margin-left":0,opacity:1,width:Math.floor(af/av+x+1)},al.transPeriod-aq,at,m)
}else{V.eq(ax).show().css("z-index","999").addClass("diapocurrent");V.eq(ay).css("z-index","1").removeClass("diapocurrent");d.delay((al.transPeriod+aq)/B*o[n]*au*0.5).css({display:"block",height:Math.floor(ag/aw+v+1),"margin-top":0,"margin-left":0,opacity:1,width:Math.floor(af/av+x+1)}).animate({height:height,"margin-left":marginLeft,"margin-top":marginTop,width:width,opacity:0},al.transPeriod-aq,at,m)}}if(ab==true){b("#pix_prev")[ad](function(){if(!ah.hasClass("diaposliding")){var c=parseFloat(b("div.diapocurrent",ah).index());clearInterval(ae);P();b("#pix_canvas, #pix_canvas_wrap").animate({opacity:0},0);N();if(c!=0){K(c)}else{K(T)}}});b("#pix_next")[ad](function(){if(!ah.hasClass("diaposliding")){var c=parseFloat(b("div.diapocurrent",ah).index());clearInterval(ae);P();b("#pix_canvas, #pix_canvas_wrap").animate({opacity:0},0);N();if(c==T-1){K(1)}else{K(c+2)}}})}if(ai()){ah.live("swipeleft",function(p){if(!ah.hasClass("diaposliding")){var s=parseFloat(b("div.diapocurrent",ah).index());clearInterval(ae);P();b("#pix_canvas, #pix_canvas_wrap").animate({opacity:0},0);N();if(s==T-1){K(1)}else{K(s+2)}}});ah.live("swiperight",function(p){if(!ah.hasClass("diaposliding")){var s=parseFloat(b("div.diapocurrent",ah).index());clearInterval(ae);P();b("#pix_canvas, #pix_canvas_wrap").animate({opacity:0},0);N();if(s!=0){K(s)}else{K(T)}}})}if(Y==true){b("#pix_pag li")[ad](function(){if(!ah.hasClass("diaposliding")){var p=parseFloat(b(this).index());var s=parseFloat(b("div.diapocurrent",ah).index());if(p!=s){clearInterval(ae);P();b("#pix_canvas, #pix_canvas_wrap").animate({opacity:0},0);N();K(p+1)}}})}if(al.thumbs==true){b("#pix_pag li .pix_thumb")[ad](function(){if(!ah.hasClass("diaposliding")){var p=parseFloat(b(this).parents("li").index());var s=parseFloat(b("div.diapocurrent",ah).index());if(p!=s){clearInterval(ae);P();b("#pix_canvas, #pix_canvas_wrap").animate({opacity:0},0);N();K(p+1)}}})}})}function N(){al.onStartTransition.call(this);a=0;if(b.browser.msie&&b.browser.version<9||al.loader=="bar"){b("#pix_canvas").css({width:0})}else{U.clearRect(0,0,al.pieDiameter,al.pieDiameter)}}function J(c){return Math.ceil(c)==Math.floor(c)}function L(f){for(var e,h,g=f.length;g;e=parseInt(Math.random()*g),h=f[--g],f[g]=f[e],f[e]=h){}return f}function X(h,g){if(!b.browser.msie||b.browser.msie&&b.browser.version==9){var f=0;al.onStartLoading.call(this);b.each(h,function(c,e){var d=new Image;d.onload=function(){f++;if(f==h.length){al.onLoaded.call(this);g()}};d.src=e})}else{g()}}function ai(){if(navigator.userAgent.match(/Android/i)||navigator.userAgent.match(/webOS/i)||navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/iPhone/i)||navigator.userAgent.match(/iPod/i)){return true}}var aj={selector:"div",fx:"random",mobileFx:"",slideOn:"random",gridDifference:250,easing:"easeInOutExpo",mobileEasing:"",loader:"pie",loaderOpacity:0.8,loaderColor:"#ffff00",loaderBgColor:"#222222",pieDiameter:50,piePosition:"top:5px; right:5px",pieStroke:8,barPosition:"bottom",barStroke:5,navigation:true,mobileNavigation:true,navigationHover:true,mobileNavHover:true,commands:true,mobileCommands:true,pagination:true,mobilePagination:true,thumbs:true,hover:true,pauseOnClick:true,rows:4,cols:6,slicedRows:8,slicedCols:12,time:3000,transPeriod:1500,autoAdvance:true,mobileAutoAdvance:true,onStartLoading:function(){},onLoaded:function(){},onEnterSlide:function(){},onStartTransition:function(){}};var al=b.extend({},aj,al);var ah=this;var ag=ah.height();var af=ah.width();var ae;var ad,ac,ab,aa,Z,Y;if(ai()){ad="tap"}else{ad="click"}if(ai()){ac=al.mobileAutoAdvance}else{ac=al.autoAdvance}if(ac==false){ah.addClass("stopped")}if(ai()){ab=al.mobileNavigation}else{ab=al.navigation}if(ai()){aa=al.mobileNavHover}else{aa=al.navigationHover}if(ai()){Z=al.mobileCommands}else{Z=al.commands}if(ai()){Y=al.mobilePagination}else{Y=al.pagination}if(ah.length!=0){var V=b("> "+al.selector,ah).not("#pix_canvas").not("#pix_canvas_wrap").not("#pix_next").not("#pix_prev").not("#pix_commands");V.wrapInner('<div class="pix_relativize" style="width:'+af+"px; height:"+ag+'px" />');
var T=V.length;var R;function P(){b("*[data-fake]",ah).each(function(){var f=b(this);var i=f.attr("data-fake");var h=new Image;h.src=i;f.after(b(h).attr("class","imgFake"));var g=f.clone();f.remove();b(".elemToHide").show();b(h)[ad](function(){b(this).hide().after(g);b(".elemToHide").hide()})})}P();if(al.hover==true){if(!ai()){ah.hoverIntent({over:function(){ah.addClass("stopped")},out:function(){if(ac!=false){ah.removeClass("stopped")}},timeout:0})}}if(aa==true){if(ai()){ah.live("vmouseover",function(){b("#pix_prev, #pix_next").animate({opacity:1},200)});ah.live("vmouseout",function(){b("#pix_prev, #pix_next").delay(500).animate({opacity:0},200)})}else{ah.hover(function(){b("#pix_prev, #pix_next").stop(true,false).animate({opacity:1},200)},function(){b("#pix_prev, #pix_next").stop(true,false).animate({opacity:0},200)})}}b.fn.diapoStop=function(){ac=false;ah.addClass("stopped");if(b("#pix_stop").length){b("#pix_stop").fadeOut(100,function(){b("#pix_play").fadeIn(100);if(al.loader!="none"){b("#pix_canvas").fadeOut(100)}})}else{if(al.loader!="none"){b("#pix_canvas").fadeOut(100)}}};b("#pix_stop").live("click",function(){ah.diapoStop()});b.fn.diapoPlay=function(){ac=true;ah.removeClass("stopped");if(b("#pix_play").length){b("#pix_play").fadeOut(100,function(){b("#pix_stop").fadeIn(100);if(al.loader!="none"){b("#pix_canvas").fadeIn(100)}})}else{if(al.loader!="none"){b("#pix_canvas").fadeIn(100)}}};b("#pix_play").live("click",function(){ah.diapoPlay()});if(al.pauseOnClick==true){V[ad](function(){ac=false;ah.addClass("stopped");b("#pix_stop").fadeOut(100,function(){b("#pix_play").fadeIn(100);b("#pix_canvas").fadeOut(100)})})}var M=new Array;b("img",ah).each(function(){M.push(b(this).attr("src"))});if(!b.browser.msie){b("div, span, a",ah).each(function(){var h=b(this).css("background");var m=b(this).attr("style");if(typeof h!=="undefined"&&h!==false&&h.indexOf("url")!=-1){var l=h.lastIndexOf("url(")+4;var k=h.lastIndexOf(")");h=h.substring(l,k);h=h.replace(/'/g,"");h=h.replace(/"/g,"");M.push(h)}else{if(typeof m!=="undefined"&&m!==false&&m.indexOf("url")!=-1){var j=m.lastIndexOf("url(")+4;var i=m.lastIndexOf(")");m=m.substring(j,i);m=m.replace(/'/g,"");m=m.replace(/"/g,"");M.push(m)}}})}X(M,K)}if(b.browser.msie&&b.browser.version<9||al.loader=="bar"){ah.append('<span id="pix_canvas" />');var I=b("#pix_canvas");if(al.barPosition=="top"){I.css({top:0})}else{I.css({bottom:0})}I.css({position:"absolute",left:0,"z-index":1001,height:al.barStroke,width:0,"background-color":al.loaderColor})}else{ah.append('<canvas id="pix_canvas"></canvas>');var H;var I=document.getElementById("pix_canvas");I.setAttribute("width",al.pieDiameter);I.setAttribute("height",al.pieDiameter);I.setAttribute("style","position:absolute; z-index:1002; "+al.piePosition);var a;var W;if(I&&I.getContext){var U=I.getContext("2d");U.rotate(Math.PI*(3/2));U.translate(-al.pieDiameter,0)}}if(al.loader=="none"||ac==false){b("#pix_canvas, #pix_canvas_wrap").hide()}if(ab==true){ah.append('<div id="pix_prev" />').append('<div id="pix_next" />');b("#pix_prev").animate({opacity:0},200)}ah.after('<div id="pix_pag" />');if(Y==true){b("#pix_pag").append('<ul id="pix_pag_ul" />');var S;for(S=0;S<T;S++){b("#pix_pag_ul").append('<li id="pag_nav_'+S+'" style="position:relative; z-index:1002"><span><span>'+S+"</span></span></li>");if(al.thumbs==true){var Q=V.eq(S).attr("data-thumb");var O=new Image;O.src=Q;b("li#pag_nav_"+S).append(b(O).attr("class","pix_thumb").css("position","absolute").animate({opacity:0},0));b("li#pag_nav_"+S+" > img").after('<div class="thumb_arrow" />');b("li#pag_nav_"+S+" > .thumb_arrow").animate({opacity:0},0);if(!ai()){b("#pix_pag li").hover(function(){b(".pix_thumb, .thumb_arrow",this).addClass("visible").stop(true,false).animate({"margin-top":-15,opacity:1},300,"easeOutQuad")},function(){b(".pix_thumb, .thumb_arrow",this).removeClass("visible").stop(true,false).animate({"margin-top":0,opacity:0},150)})}}}}if(Z==true){b("#pix_pag").append('<div id="pix_commands" />');
b("#pix_pag").find("#pix_commands").append('<div id="pix_play" />').append('<div id="pix_stop" />');if(ac==true){b("#pix_play").hide();b("#pix_stop").show()}else{b("#pix_stop").hide();b("#pix_play").show()}}if(aa==true){b("#pix_prev, #pix_next").animate({opacity:0},0)}N();b(".fromLeft, .fromRight, .fromTop, .fromBottom, .fadeIn").each(function(){b(this).css("visibility","hidden")})}})(jQuery);function doAnimation(a){a.css({bottom:"-100px"});var b=0;var c=0;a.each(function(d){var e=2500*d;$(this).delay(e).animate({bottom:"0",opacity:100},1000,function(){$(this).delay(1500).animate({bottom:"600px",opacity:0},1000,function(){var f=a.length-1;if(d==f){doAnimation(a)}})})})}$(document).ready(function(){console.log("hola mundo");var d=$("#animatrix li");doAnimation(d);$("a.construccion").click(function(g){g.preventDefault;alert("Sitio en construcción");return false});var b=$('#contactform input[type="text"], #contactform textarea');b.click(function(){if($(this).hasClass("magic")){$(this).val("").removeClass("magic")}});$('#contactform input[type="submit"]').click(function(){if(b.hasClass("magic")){return false}});$("#thisistheslider").diapo({thumbs:false,pagination:false,time:"1000"});var f=$(window);var e=$("article");var a=$("nav a");var c=false;$("#fix-empty-box").hide();f.bind("scroll load",function(){var g=$("header");var h=$("#fix-empty-box");e.each(function(){var i=$(this).attr("id");if(f.scrollTop()>=$(this).position().top-$("header").height()-100){if(!c){a.removeClass("selected");$("#header-nav-bar a[href*="+i+"]").addClass("selected")}}});if(f.scrollTop()>g.position().top){g.addClass("header-fixed");g.css({position:"fixed"});h.show()}else{if(h.is(":visible")){if(f.scrollTop()<h.position().top){g.removeClass("header-fixed");g.css({position:"relative"});h.hide();a.removeClass("selected")}}}});a.click(function(i){i.preventDefault();var g=$(this);console.log(g);var h=g.attr("href");h=h.substring(h.indexOf("#"));a.removeClass("selected");g.addClass("selected");c=true;console.log($(h).position().top);console.log($(h).position().top-$("header").height()-150);$("html, body").animate({scrollTop:$(h).position().top-$("header").height()},{easing:"easeInOutExpo",duration:600,complete:function(){c=false}})})});
