if(typeof Object.create!=="function"){Object.create=function(b){function a(){}a.prototype=b;return new a()}}var ua={toString:function(){return navigator.userAgent},test:function(a){return this.toString().toLowerCase().indexOf(a.toLowerCase())>-1}};ua.version=(ua.toString().toLowerCase().match(/[\s\S]+(?:rv|it|ra|ie)[\/: ]([\d.]+)/)||[])[1];ua.webkit=ua.test("webkit");ua.gecko=ua.test("gecko")&&!ua.webkit;ua.opera=ua.test("opera");ua.ie=ua.test("msie")&&!ua.opera;ua.ie6=ua.ie&&document.compatMode&&typeof document.documentElement.style.maxHeight==="undefined";ua.ie7=ua.ie&&document.documentElement&&typeof document.documentElement.style.maxHeight!=="undefined"&&typeof XDomainRequest==="undefined";ua.ie8=ua.ie&&typeof XDomainRequest!=="undefined";var domReady=function(){var b=[];var a=function(){if(!arguments.callee.done){arguments.callee.done=true;for(var c=0;c<b.length;c++){b[c]()}}};if(document.addEventListener){document.addEventListener("DOMContentLoaded",a,false)}if(ua.ie){(function(){try{document.documentElement.doScroll("left")}catch(c){setTimeout(arguments.callee,50);return}a()})();document.onreadystatechange=function(){if(document.readyState==="complete"){document.onreadystatechange=null;a()}}}if(ua.webkit&&document.readyState){(function(){if(document.readyState!=="loading"){a()}else{setTimeout(arguments.callee,10)}})()}window.onload=a;return function(c){if(typeof c==="function"){b[b.length]=c}return c}}();var cssHelper=function(){var o={BLOCKS:/[^\s{][^{]*\{(?:[^{}]*\{[^{}]*\}[^{}]*|[^{}]*)*\}/g,BLOCKS_INSIDE:/[^\s{][^{]*\{[^{}]*\}/g,DECLARATIONS:/[a-zA-Z\-]+[^;]*:[^;]+;/g,RELATIVE_URLS:/url\(['"]?([^\/\)'"][^:\)'"]+)['"]?\)/g,REDUNDANT_COMPONENTS:/(?:\/\*([^*\\\\]|\*(?!\/))+\*\/|@import[^;]+;)/g,REDUNDANT_WHITESPACE:/\s*(,|:|;|\{|\})\s*/g,MORE_WHITESPACE:/\s{2,}/g,FINAL_SEMICOLONS:/;\}/g,NOT_WHITESPACE:/\S+/g};var m,l=false;var j=[];var h=function(v){if(typeof v==="function"){j[j.length]=v}};var f=function(){for(var v=0;v<j.length;v++){j[v](m)}};var d={};var p=function(z,w){if(d[z]){var x=d[z].listeners;if(x){for(var y=0;y<x.length;y++){x[y](w)}}}};var n=function(w,v,A){if(ua.ie&&!window.XMLHttpRequest){window.XMLHttpRequest=function(){return new ActiveXObject("Microsoft.XMLHTTP")}}if(!XMLHttpRequest){return""}var x=new XMLHttpRequest();try{x.open("get",w,true);x.setRequestHeader("X_REQUESTED_WITH","XMLHttpRequest")}catch(y){A();return}var z=false;setTimeout(function(){z=true},5000);document.documentElement.style.cursor="progress";x.onreadystatechange=function(){if(x.readyState===4&&!z){if(!x.status&&location.protocol==="file:"||(x.status>=200&&x.status<300)||x.status===304||navigator.userAgent.indexOf("Safari")>-1&&typeof x.status==="undefined"){v(x.responseText)}else{A()}document.documentElement.style.cursor="";x=null}};x.send("")};var k=function(v){v=v.replace(o.REDUNDANT_COMPONENTS,"");v=v.replace(o.REDUNDANT_WHITESPACE,"$1");v=v.replace(o.MORE_WHITESPACE," ");v=v.replace(o.FINAL_SEMICOLONS,"}");return v};var g={mediaQueryList:function(D){var v={};var C=D.indexOf("{");var z=D.substring(0,C);D=D.substring(C+1,D.length-1);var y=[],x=[];var w=z.toLowerCase().substring(7).split(",");for(var B=0;B<w.length;B++){y[y.length]=g.mediaQuery(w[B],v)}var A=D.match(o.BLOCKS_INSIDE);if(A!==null){for(B=0;B<A.length;B++){x[x.length]=g.rule(A[B],v)}}v.getMediaQueries=function(){return y};v.getRules=function(){return x};v.getListText=function(){return z};v.getCssText=function(){return D};return v},mediaQuery:function(E,D){E=E||"";var x=false,B;var A=[];var z=true;var y=E.match(o.NOT_WHITESPACE);for(var C=0;C<y.length;C++){var w=y[C];if(!B&&(w==="not"||w==="only")){if(w==="not"){x=true}}else{if(!B){B=w}else{if(w.charAt(0)==="("){var v=w.substring(1,w.length-1).split(":");A[A.length]={mediaFeature:v[0],value:v[1]||null}}}}}return{getList:function(){return D||null},getValid:function(){return z},getNot:function(){return x},getMediaType:function(){return B},getExpressions:function(){return A}}},rule:function(C,z){var v={};var A=C.indexOf("{");var B=C.substring(0,A);var D=B.split(",");var w=[];var x=C.substring(A+1,C.length-1).split(";");for(var y=0;y<x.length;y++){w[w.length]=g.declaration(x[y],v)}v.getMediaQueryList=function(){return z||null};v.getSelectors=function(){return D};v.getSelectorText=function(){return B};v.getDeclarations=function(){return w};v.getPropertyValue=function(F){for(var E=0;E<w.length;E++){if(w[E].getProperty()===F){return w[E].getValue()}}return null};return v},declaration:function(y,z){var w=y.indexOf(":");var A=y.substring(0,w);var x=y.substring(w+1);return{getRule:function(){return z||null},getProperty:function(){return A},getValue:function(){return x}}}};var a=function(y){if(typeof y.cssHelperText!=="string"){return}var x={mediaQueryLists:[],rules:[],selectors:{},declarations:[],properties:{}};var D=x.mediaQueryLists;var F=x.rules;var C=y.cssHelperText.match(o.BLOCKS);if(C!==null){for(var E=0;E<C.length;E++){if(C[E].substring(0,7)==="@media "){D[D.length]=g.mediaQueryList(C[E]);F=x.rules=F.concat(D[D.length-1].getRules())}else{F[F.length]=g.rule(C[E])}}}var v=x.selectors;var A=function(I){var H=I.getSelectors();for(var G=0;G<H.length;G++){var J=H[G];if(!v[J]){v[J]=[]}v[J][v[J].length]=I}};for(E=0;E<F.length;E++){A(F[E])}var B=x.declarations;for(E=0;E<F.length;E++){B=x.declarations=B.concat(F[E].getDeclarations())}var w=x.properties;for(E=0;E<B.length;E++){var z=B[E].getProperty();if(!w[z]){w[z]=[]}w[z][w[z].length]=B[E]}y.cssHelperParsed=x;m[m.length]=y;return x};var c=function(w,v){w.cssHelperText=k(v||w.innerHTML);return a(w)};var b=function(){l=true;m=[];var v=[];var w=function(){for(var E=0;E<v.length;E++){a(v[E])}var D=document.getElementsByTagName("style");for(E=0;E<D.length;E++){c(D[E])}l=false;f()};var C=document.getElementsByTagName("link");for(var x=0;x<C.length;x++){var A=C[x];if(A.getAttribute("rel").indexOf("style")>-1&&A.href&&A.href.length!==0&&!A.disabled){v[v.length]=A}}if(v.length>0){var B=0;var z=function(){B++;if(B===v.length){w()}};var y=function(E){var D=E.href;n(D,function(F){F=k(F).replace(o.RELATIVE_URLS,"url("+D.substring(0,D.lastIndexOf("/"))+"/$1)");E.cssHelperText=F;z()},z)};for(x=0;x<v.length;x++){y(v[x])}}else{w()}};var q={mediaQueryLists:"array",rules:"array",selectors:"object",declarations:"array",properties:"object"};var u={mediaQueryLists:null,rules:null,selectors:null,declarations:null,properties:null};var t=function(x,w){if(u[x]!==null){if(q[x]==="array"){return(u[x]=u[x].concat(w))}else{var z=u[x];for(var y in w){if(w.hasOwnProperty(y)){if(!z[y]){z[y]=w[y]}else{z[y]=z[y].concat(w[y])}}}return z}}};var s=function(v){u[v]=(q[v]==="array")?[]:{};for(var w=0;w<m.length;w++){t(v,m[w].cssHelperParsed[v])}return u[v]};domReady(function(){var w=document.body.getElementsByTagName("*");for(var v=0;v<w.length;v++){w[v].checkedByCssHelper=true}if(document.implementation.hasFeature("MutationEvents","2.0")||window.MutationEvent){document.body.addEventListener("DOMNodeInserted",function(y){var x=y.target;if(x.nodeType===1){p("DOMElementInserted",x);x.checkedByCssHelper=true}},false)}else{setInterval(function(){var y=document.body.getElementsByTagName("*");for(var x=0;x<y.length;x++){if(!y[x].checkedByCssHelper){p("DOMElementInserted",y[x]);y[x].checkedByCssHelper=true}}},1000)}});var r=function(v){if(typeof window.innerWidth!="undefined"){return window["inner"+v]}else{if(typeof document.documentElement!="undefined"&&typeof document.documentElement.clientWidth!="undefined"&&document.documentElement.clientWidth!=0){return document.documentElement["client"+v]}}};return{addStyle:function(x,v){var w=document.createElement("style");w.setAttribute("type","text/css");document.getElementsByTagName("head")[0].appendChild(w);if(w.styleSheet){w.styleSheet.cssText=x}else{w.appendChild(document.createTextNode(x))}w.addedWithCssHelper=true;if(typeof v==="undefined"||v===true){cssHelper.parsed(function(y){var z=c(w,x);for(var A in z){if(z.hasOwnProperty(A)){t(A,z[A])}}p("newStyleParsed",w)})}else{w.parsingDisallowed=true}return w},removeStyle:function(v){return v.parentNode.removeChild(v)},parsed:function(v){if(l){h(v)}else{if(typeof m!=="undefined"){if(typeof v==="function"){v(m)}}else{h(v);b()}}},mediaQueryLists:function(v){cssHelper.parsed(function(w){v(u.mediaQueryLists||s("mediaQueryLists"))})},rules:function(v){cssHelper.parsed(function(w){v(u.rules||s("rules"))})},selectors:function(v){cssHelper.parsed(function(w){v(u.selectors||s("selectors"))})},declarations:function(v){cssHelper.parsed(function(w){v(u.declarations||s("declarations"))})},properties:function(v){cssHelper.parsed(function(w){v(u.properties||s("properties"))})},broadcast:p,addListener:function(w,v){if(typeof v==="function"){if(!d[w]){d[w]={listeners:[]}}d[w].listeners[d[w].listeners.length]=v}},removeListener:function(y,x){if(typeof x==="function"&&d[y]){var v=d[y].listeners;for(var w=0;w<v.length;w++){if(v[w]===x){v.splice(w,1);w-=1}}}},getViewportWidth:function(){return r("Width")},getViewportHeight:function(){return r("Height")}}}();domReady(function enableCssMediaQueries(){var l;var j={LENGTH_UNIT:/[0-9]+(em|ex|px|in|cm|mm|pt|pc)$/,RESOLUTION_UNIT:/[0-9]+(dpi|dpcm)$/,ASPECT_RATIO:/^[0-9]+\/[0-9]+$/,ABSOLUTE_VALUE:/^[0-9]*(\.[0-9]+)*$/};var h=[];var o=function(){var t="css3-mediaqueries-test";var r=document.createElement("div");r.id=t;var s=cssHelper.addStyle("@media all and (width) { #"+t+" { width: 1px !important; } }",false);document.body.appendChild(r);var q=r.offsetWidth===1;s.parentNode.removeChild(s);r.parentNode.removeChild(r);o=function(){return q};return q};var n=function(){l=document.createElement("div");l.style.cssText="position:absolute;top:-9999em;left:-9999em;margin:0;border:none;padding:0;width:1em;font-size:1em;";document.body.appendChild(l);if(l.offsetWidth!==16){l.style.fontSize=16/l.offsetWidth+"em"}l.style.width=""};var m=function(r){l.style.width=r;var q=l.offsetWidth;l.style.width="";return q};var k=function(A,z){var v=A.length;var y=(A.substring(0,4)==="min-");var C=(!y&&A.substring(0,4)==="max-");if(z!==null){var x;var w;if(j.LENGTH_UNIT.exec(z)){x="length";w=m(z)}else{if(j.RESOLUTION_UNIT.exec(z)){x="resolution";w=parseInt(z,10);var u=z.substring((w+"").length)}else{if(j.ASPECT_RATIO.exec(z)){x="aspect-ratio";w=z.split("/")}else{if(j.ABSOLUTE_VALUE){x="absolute";w=z}else{x="unknown"}}}}}var t,s;if("device-width"===A.substring(v-12,v)){t=screen.width;if(z!==null){if(x==="length"){return((y&&t>=w)||(C&&t<w)||(!y&&!C&&t===w))}else{return false}}else{return t>0}}else{if("device-height"===A.substring(v-13,v)){s=screen.height;if(z!==null){if(x==="length"){return((y&&s>=w)||(C&&s<w)||(!y&&!C&&s===w))}else{return false}}else{return s>0}}else{if("width"===A.substring(v-5,v)){t=document.documentElement.clientWidth||document.body.clientWidth;if(z!==null){if(x==="length"){return((y&&t>=w)||(C&&t<w)||(!y&&!C&&t===w))}else{return false}}else{return t>0}}else{if("height"===A.substring(v-6,v)){s=document.documentElement.clientHeight||document.body.clientHeight;if(z!==null){if(x==="length"){return((y&&s>=w)||(C&&s<w)||(!y&&!C&&s===w))}else{return false}}else{return s>0}}else{if("device-aspect-ratio"===A.substring(v-19,v)){return x==="aspect-ratio"&&screen.width*w[1]===screen.height*w[0]}else{if("color-index"===A.substring(v-11,v)){var r=Math.pow(2,screen.colorDepth);if(z!==null){if(x==="absolute"){return((y&&r>=w)||(C&&r<w)||(!y&&!C&&r===w))}else{return false}}else{return r>0}}else{if("color"===A.substring(v-5,v)){var q=screen.colorDepth;if(z!==null){if(x==="absolute"){return((y&&q>=w)||(C&&q<w)||(!y&&!C&&q===w))}else{return false}}else{return q>0}}else{if("resolution"===A.substring(v-10,v)){var B;if(u==="dpcm"){B=m("1cm")}else{B=m("1in")}if(z!==null){if(x==="resolution"){return((y&&B>=w)||(C&&B<w)||(!y&&!C&&B===w))}else{return false}}else{return B>0}}else{return false}}}}}}}}};var g=function(s){var v=s.getValid();var u=s.getExpressions();var q=u.length;if(q>0){for(var r=0;r<q&&v;r++){v=k(u[r].mediaFeature,u[r].value)}var t=s.getNot();return(v&&!t||t&&!v)}};var f=function(q){var v=q.getMediaQueries();var u={};for(var r=0;r<v.length;r++){if(g(v[r])){u[v[r].getMediaType()]=true}}var w=[],y=0;for(var x in u){if(u.hasOwnProperty(x)){if(y>0){w[y++]=","}w[y++]=x}}if(w.length>0){h[h.length]=cssHelper.addStyle("@media "+w.join("")+"{"+q.getCssText()+"}",false)}};var d=function(r){for(var q=0;q<r.length;q++){f(r[q])}if(ua.ie){document.documentElement.style.display="block";setTimeout(function(){document.documentElement.style.display=""},0);setTimeout(function(){cssHelper.broadcast("cssMediaQueriesTested")},100)}else{cssHelper.broadcast("cssMediaQueriesTested")}};var c=function(){for(var q=0;q<h.length;q++){cssHelper.removeStyle(h[q])}h=[];cssHelper.mediaQueryLists(d)};var b=0;var a=function(){var t=cssHelper.getViewportWidth();var s=cssHelper.getViewportHeight();if(ua.ie){var u=document.createElement("div");u.style.position="absolute";u.style.top="-9999em";u.style.overflow="scroll";document.body.appendChild(u);b=u.offsetWidth-u.clientWidth;document.body.removeChild(u)}var r;var q=function(){var v=cssHelper.getViewportWidth();var w=cssHelper.getViewportHeight();if(Math.abs(v-t)>b||Math.abs(w-s)>b){t=v;s=w;clearTimeout(r);r=setTimeout(function(){if(!o()){c()}else{cssHelper.broadcast("cssMediaQueriesTested")}},500)}};window.onresize=function(){var v=window.onresize||function(){};return function(){v();q()}}()};var p=document.documentElement;p.style.marginLeft="-32767px";setTimeout(function(){p.style.marginTop=""},20000);return function(){if(!o()){cssHelper.addListener("newStyleParsed",function(q){d(q.cssHelperParsed.mediaQueryLists)});cssHelper.addListener("cssMediaQueriesTested",function(){if(ua.ie){p.style.width="1px"}setTimeout(function(){p.style.width="";p.style.marginLeft=""},0);cssHelper.removeListener("cssMediaQueriesTested",arguments.callee)});n();c()}else{p.style.marginLeft=""}a()}}());try{document.execCommand("BackgroundImageCache",false,true)}catch(e){}(function(c){var a=c.scrollTo=function(d,f,g){c(window).scrollTo(d,f,g)};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 d=this,f=!d.nodeName||c.inArray(d.nodeName.toLowerCase(),["iframe","#document","html","body"])!=-1;if(!f){return d}var g=(d.contentWindow||d).document||d.ownerDocument||d;return c.browser.safari||g.compatMode=="BackCompat"?g.body:g.documentElement})};c.fn.scrollTo=function(g,f,d){if(typeof f=="object"){d=f;f=0}if(typeof d=="function"){d={onAfter:d}}if(g=="max"){g=9000000000}d=c.extend({},a.defaults,d);f=f||d.speed||d.duration;d.queue=d.queue&&d.axis.length>1;if(d.queue){f/=2}d.offset=b(d.offset);d.over=b(d.over);return this._scrollable().each(function(){var o=this,m=c(o),n=g,k,l={},h=m.is("html,body");switch(typeof n){case"number":case"string":if(/^([+-]=)?\d+(\.\d+)?(px|%)?$/.test(n)){n=b(n);break}n=c(n,this);case"object":if(n.is||n.style){k=(n=c(n)).offset()}}c.each(d.axis.split(""),function(r,s){var u=s=="x"?"Left":"Top",t=u.toLowerCase(),w="scroll"+u,q=o[w],p=a.max(o,s);if(k){l[w]=k[t]+(h?0:q-m.offset()[t]);if(d.margin){l[w]-=parseInt(n.css("margin"+u))||0;l[w]-=parseInt(n.css("border"+u+"Width"))||0}l[w]+=d.offset[t]||0;if(d.over[t]){l[w]+=n[s=="x"?"width":"height"]()*d.over[t]}}else{var v=n[t];l[w]=v.slice&&v.slice(-1)=="%"?parseFloat(v)/100*p:v}if(/^\d+$/.test(l[w])){l[w]=l[w]<=0?0:Math.min(l[w],p)}if(!r&&d.queue){if(q!=l[w]){j(d.onAfterFirst)}delete l[w]}});j(d.onAfter);function j(p){m.animate(l,f,d.easing,p&&function(){p.call(this,g,d)})}}).end()};a.max=function(g,j){var n=j=="x"?"Width":"Height",k="scroll"+n;if(!c(g).is("html,body")){return g[k]-c(g)[n.toLowerCase()]()}var o="client"+n,f=g.ownerDocument.documentElement,d=g.ownerDocument.body;return Math.max(f[k],d[k])-Math.min(f[o],d[o])};function b(d){return typeof d=="object"?d:{top:d,left:d}}})(jQuery);(function(d){var a=location.href.replace(/#.*/,"");var c=d.localScroll=function(f){d("body").localScroll(f)};c.defaults={duration:1000,axis:"y",event:"click",stop:true,target:window,reset:true};c.hash=function(f){if(location.hash){f=d.extend({},c.defaults,f);f.hash=false;if(f.reset){var g=f.duration;delete f.duration;d(f.target).scrollTo(0,f);f.duration=g}b(0,location,f)}};d.fn.localScroll=function(f){f=d.extend({},c.defaults,f);return f.lazy?this.bind(f.event,function(h){var j=d([h.target,h.target.parentNode]).filter(g)[0];if(j){b(h,j,f)}}):this.find("a,area").filter(g).bind(f.event,function(h){b(h,this,f)}).end().end();function g(){return !!this.href&&!!this.hash&&this.href.replace(this.hash,"")==a&&(!f.filter||d(this).is(f.filter))}};function b(l,q,g){var r=q.hash.slice(1),p=document.getElementById(r)||document.getElementsByName(r)[0];if(!p){return}if(l){l.preventDefault()}var o=d(g.target);if(g.lock&&o.is(":animated")||g.onBefore&&g.onBefore.call(g,l,p,o)===false){return}if(g.stop){o.stop(true)}if(g.hash){var n=p.id==r?"id":"name",m=d("<a> </a>").attr(n,r).css({position:"absolute",top:d(window).scrollTop(),left:d(window).scrollLeft()});p[n]="";d("body").prepend(m);location=q.hash;m.remove();p[n]=r}o.scrollTo(p,g).trigger("notify.serialScroll",[p])}})(jQuery);(function(c){var d=function(w,H){var z=c.extend({},c.fn.nivoSlider.defaults,H);var b={currentSlide:0,currentImage:"",totalSlides:0,randAnim:"",running:false,paused:false,stop:false};var F=c(w);var A=F.height();F.data("nivo:vars",b);F.css("position","relative");F.addClass("nivoSlider");var E=F.children();E.each(function(){var f=c(this);var g="";if(!f.is("img")){if(f.is("a")){f.addClass("nivo-imageLink");g=f}f=f.find("img:first")}var h=f.width();if(h==0){h=f.attr("width")}var j=f.height();if(j==0){j=f.attr("height")}if(h>F.width()){F.width(h)}if(j>F.height()){F.height(j)}if(g!=""){g.css("display","none")}f.css("display","none");b.totalSlides++});if(z.startSlide>0){if(z.startSlide>=b.totalSlides){z.startSlide=b.totalSlides-1}b.currentSlide=z.startSlide}if(c(E[b.currentSlide]).is("img")){b.currentImage=c(E[b.currentSlide])}else{b.currentImage=c(E[b.currentSlide]).find("img:first")}if(c(E[b.currentSlide]).is("a")){c(E[b.currentSlide]).css("display","block")}c(E[b.currentSlide]).addClass("seleccionada");F.css("background",'url("'+b.currentImage.attr("src")+'") no-repeat');F.append(c('<div class="nivo-caption"><p></p></div>').css({display:"none",opacity:z.captionOpacity}));var a=function(h){var f=c(".nivo-caption",F);if(b.currentImage.attr("title")!=""&&b.currentImage.attr("title")!=undefined){var g=b.currentImage.attr("title");if(g.substr(0,1)=="#"){g=c(g).html()}if(f.css("display")=="block"){f.find("p").fadeOut(h.animSpeed,function(){c(this).html(g);c(this).fadeIn(h.animSpeed)})}else{f.find("p").html(g)}f.fadeIn(h.animSpeed)}else{f.fadeOut(h.animSpeed)}};a(z);var G=0;if(!z.manualAdvance&&E.length>1){G=setInterval(function(){I(F,E,z,false)},z.pauseTime)}if(z.directionNav){F.append('<div class="nivo-directionNav"><a class="nivo-prevNav">'+z.prevText+'</a><a class="nivo-nextNav">'+z.nextText+"</a></div>");if(z.directionNavHide){c(".nivo-directionNav",F).hide();F.hover(function(){c(".nivo-directionNav",F).show()},function(){c(".nivo-directionNav",F).hide()})}c("a.nivo-prevNav",F).live("click",function(){if(b.running){return false}clearInterval(G);G="";b.currentSlide-=2;I(F,E,z,"prev")});c("a.nivo-nextNav",F).live("click",function(){if(b.running){return false}clearInterval(G);G="";I(F,E,z,"next")})}if(z.controlNav){var v=c('<div class="nivo-controlNav"></div>');F.append(v);for(var x=0;x<E.length;x++){if(z.controlNavThumbs){var D=E.eq(x);if(!D.is("img")){D=D.find("img:first")}if(z.controlNavThumbsFromRel){v.append('<a class="nivo-control" rel="'+x+'"><img src="'+D.attr("rel")+'" alt="" /></a>')}else{v.append('<a class="nivo-control" rel="'+x+'"><img src="'+D.attr("src").replace(z.controlNavThumbsSearch,z.controlNavThumbsReplace)+'" alt="" /></a>')}}else{v.append('<a class="nivo-control" rel="'+x+'">'+(x+1)+"</a>")}}c(".nivo-controlNav a:eq("+b.currentSlide+")",F).addClass("active");c(".nivo-controlNav a",F).live("click",function(){if(b.running){return false}if(c(this).hasClass("active")){return false}clearInterval(G);G="";F.css("background",'url("'+b.currentImage.attr("src")+'") no-repeat');b.currentSlide=c(this).attr("rel")-1;I(F,E,z,"control")})}if(z.keyboardNav){c(window).keypress(function(f){if(f.keyCode=="37"){if(b.running){return false}clearInterval(G);G="";b.currentSlide-=2;I(F,E,z,"prev")}if(f.keyCode=="39"){if(b.running){return false}clearInterval(G);G="";I(F,E,z,"next")}})}if(z.pauseOnHover){F.hover(function(){b.paused=true;clearInterval(G);G=""},function(){b.paused=false;if(G==""&&!z.manualAdvance){G=setInterval(function(){I(F,E,z,false)},z.pauseTime)}})}F.bind("nivo:animFinished",function(){b.running=false;c(E).each(function(){if(c(this).is("a")){c(this).css("display","none")}});c("#imagecontainer > a").removeClass("seleccionada");if(c(E[b.currentSlide]).is("a")){c(E[b.currentSlide]).addClass("seleccionada");c(E[b.currentSlide]).css("display","block")}if(G==""&&!b.paused&&!z.manualAdvance){G=setInterval(function(){I(F,E,z,false)},z.pauseTime)}z.afterChange.call(this)});var C=function(g,h,k){for(var j=0;j<h.slices;j++){var f=Math.round(g.width()/h.slices);if(j==h.slices-1){g.append(c('<div class="nivo-slice"></div>').css({left:(f*j)+"px",width:(g.width()-(f*j))+"px",height:"0px",opacity:"0",background:'url("'+k.currentImage.attr("src")+'") no-repeat -'+((f+(j*f))-f)+"px 0%"}))}else{g.append(c('<div class="nivo-slice"></div>').css({left:(f*j)+"px",width:f+"px",height:"0px",opacity:"0",background:'url("'+k.currentImage.attr("src")+'") no-repeat -'+((f+(j*f))-f)+"px 0%"}))}}};var B=function(h,k,m){var j=Math.round(h.width()/k.boxCols);var l=Math.round(h.height()/k.boxRows);for(var g=0;g<k.boxRows;g++){for(var f=0;f<k.boxCols;f++){if(f==k.boxCols-1){h.append(c('<div class="nivo-box"></div>').css({opacity:0,left:(j*f)+"px",top:(l*g)+"px",width:(h.width()-(j*f))+"px",height:l+"px",background:'url("'+m.currentImage.attr("src")+'") no-repeat -'+((j+(f*j))-j)+"px -"+((l+(g*l))-l)+"px"}))}else{h.append(c('<div class="nivo-box"></div>').css({opacity:0,left:(j*f)+"px",top:(l*g)+"px",width:j+"px",height:l+"px",background:'url("'+m.currentImage.attr("src")+'") no-repeat -'+((j+(f*j))-j)+"px -"+((l+(g*l))-l)+"px"}))}}}};var I=function(n,q,h,O){var r=n.data("nivo:vars");if(r&&(r.currentSlide==r.totalSlides-1)){h.lastSlide.call(this)}if((!r||r.stop)&&!O){return false}h.beforeChange.call(this);if(!O){n.css("background",'url("'+r.currentImage.attr("src")+'") no-repeat')}else{if(O=="prev"){n.css("background",'url("'+r.currentImage.attr("src")+'") no-repeat')}if(O=="next"){n.css("background",'url("'+r.currentImage.attr("src")+'") no-repeat')}}r.currentSlide++;if(r.currentSlide==r.totalSlides){r.currentSlide=0;h.slideshowEnd.call(this)}if(r.currentSlide<0){r.currentSlide=(r.totalSlides-1)}if(c(q[r.currentSlide]).is("img")){r.currentImage=c(q[r.currentSlide])}else{r.currentImage=c(q[r.currentSlide]).find("img:first")}if(h.controlNav){c(".nivo-controlNav a",n).removeClass("active");c(".nivo-controlNav a:eq("+r.currentSlide+")",n).addClass("active")}a(h);c(".nivo-slice",n).remove();c(".nivo-box",n).remove();if(h.effect=="random"){var f=new Array("sliceDownRight","sliceDownLeft","sliceUpRight","sliceUpLeft","sliceUpDown","sliceUpDownLeft","fold","fade","boxRandom","boxRain","boxRainReverse","boxRainGrow","boxRainGrowReverse");r.randAnim=f[Math.floor(Math.random()*(f.length+1))];if(r.randAnim==undefined){r.randAnim="fade"}}if(h.effect.indexOf(",")!=-1){var f=h.effect.split(",");r.randAnim=f[Math.floor(Math.random()*(f.length))];if(r.randAnim==undefined){r.randAnim="fade"}}r.running=true;if(h.effect=="sliceDown"||h.effect=="sliceDownRight"||r.randAnim=="sliceDownRight"||h.effect=="sliceDownLeft"||r.randAnim=="sliceDownLeft"){C(n,h,r);var g=0;var m=0;var t=c(".nivo-slice",n);if(h.effect=="sliceDownLeft"||r.randAnim=="sliceDownLeft"){t=c(".nivo-slice",n)._reverse()}t.each(function(){var J=c(this);J.css({top:"0px"});if(m==h.slices-1){setTimeout(function(){J.animate({height:A,opacity:1},h.animSpeed,"",function(){n.trigger("nivo:animFinished")})},(100+g))}else{setTimeout(function(){J.animate({height:A,opacity:1},h.animSpeed)},(100+g))}g+=50;m++})}else{if(h.effect=="sliceUp"||h.effect=="sliceUpRight"||r.randAnim=="sliceUpRight"||h.effect=="sliceUpLeft"||r.randAnim=="sliceUpLeft"){C(n,h,r);var g=0;var m=0;var t=c(".nivo-slice",n);if(h.effect=="sliceUpLeft"||r.randAnim=="sliceUpLeft"){t=c(".nivo-slice",n)._reverse()}t.each(function(){var J=c(this);J.css({bottom:"0px"});if(m==h.slices-1){setTimeout(function(){J.animate({height:A,opacity:1},h.animSpeed,"",function(){n.trigger("nivo:animFinished")})},(100+g))}else{setTimeout(function(){J.animate({height:A,opacity:1},h.animSpeed)},(100+g))}g+=50;m++})}else{if(h.effect=="sliceUpDown"||h.effect=="sliceUpDownRight"||r.randAnim=="sliceUpDown"||h.effect=="sliceUpDownLeft"||r.randAnim=="sliceUpDownLeft"){C(n,h,r);var g=0;var m=0;var Q=0;var t=c(".nivo-slice",n);if(h.effect=="sliceUpDownLeft"||r.randAnim=="sliceUpDownLeft"){t=c(".nivo-slice",n)._reverse()}t.each(function(){var J=c(this);if(m==0){J.css("top","0px");m++}else{J.css("bottom","0px");m=0}if(Q==h.slices-1){setTimeout(function(){J.animate({height:A,opacity:1},h.animSpeed,"",function(){n.trigger("nivo:animFinished")})},(100+g))}else{setTimeout(function(){J.animate({height:A,opacity:1},h.animSpeed)},(100+g))}g+=50;Q++})}else{if(h.effect=="fold"||r.randAnim=="fold"){C(n,h,r);var g=0;var m=0;c(".nivo-slice",n).each(function(){var K=c(this);var J=K.width();K.css({top:"0px",height:"100%",width:"0px"});if(m==h.slices-1){setTimeout(function(){K.animate({width:J,opacity:"1.0"},h.animSpeed,"",function(){n.trigger("nivo:animFinished")})},(100+g))}else{setTimeout(function(){K.animate({width:J,opacity:"1.0"},h.animSpeed)},(100+g))}g+=50;m++})}else{if(h.effect=="fade"||r.randAnim=="fade"){C(n,h,r);var S=c(".nivo-slice:first",n);S.css({height:"100%",width:n.width()+"px"});S.animate({opacity:"1.0"},(h.animSpeed*2),"",function(){n.trigger("nivo:animFinished")})}else{if(h.effect=="slideInRight"||r.randAnim=="slideInRight"){C(n,h,r);var S=c(".nivo-slice:first",n);S.css({height:"100%",width:"0px",opacity:"1"});S.animate({width:n.width()+"px"},(h.animSpeed*2),"",function(){n.trigger("nivo:animFinished")})}else{if(h.effect=="slideInLeft"||r.randAnim=="slideInLeft"){C(n,h,r);var S=c(".nivo-slice:first",n);S.css({height:"100%",width:"0px",opacity:"1",left:"",right:"0px"});S.animate({width:n.width()+"px"},(h.animSpeed*2),"",function(){S.css({left:"0px",right:""});n.trigger("nivo:animFinished")})}else{if(h.effect=="boxRandom"||r.randAnim=="boxRandom"){B(n,h,r);var j=h.boxCols*h.boxRows;var m=0;var g=0;var o=u(c(".nivo-box",n));o.each(function(){var J=c(this);if(m==j-1){setTimeout(function(){J.animate({opacity:"1"},h.animSpeed,"",function(){n.trigger("nivo:animFinished")})},(100+g))}else{setTimeout(function(){J.animate({opacity:"1"},h.animSpeed)},(100+g))}g+=20;m++})}else{if(h.effect=="boxRain"||r.randAnim=="boxRain"||h.effect=="boxRainReverse"||r.randAnim=="boxRainReverse"||h.effect=="boxRainGrow"||r.randAnim=="boxRainGrow"||h.effect=="boxRainGrowReverse"||r.randAnim=="boxRainGrowReverse"){B(n,h,r);var j=h.boxCols*h.boxRows;var m=0;var g=0;var k=0;var s=0;var P=new Array();P[k]=new Array();var o=c(".nivo-box",n);if(h.effect=="boxRainReverse"||r.randAnim=="boxRainReverse"||h.effect=="boxRainGrowReverse"||r.randAnim=="boxRainGrowReverse"){o=c(".nivo-box",n)._reverse()}o.each(function(){P[k][s]=c(this);s++;if(s==h.boxCols){k++;s=0;P[k]=new Array()}});for(var R=0;R<(h.boxCols*2);R++){var p=R;for(var l=0;l<h.boxRows;l++){if(p>=0&&p<h.boxCols){(function(L,X,M,W,K){var N=c(P[L][X]);var J=N.width();var V=N.height();if(h.effect=="boxRainGrow"||r.randAnim=="boxRainGrow"||h.effect=="boxRainGrowReverse"||r.randAnim=="boxRainGrowReverse"){N.width(0).height(0)}if(W==K-1){setTimeout(function(){N.animate({opacity:"1",width:J,height:V},h.animSpeed/1.3,"",function(){n.trigger("nivo:animFinished")})},(100+M))}else{setTimeout(function(){N.animate({opacity:"1",width:J,height:V},h.animSpeed/1.3)},(100+M))}})(l,p,g,m,j);m++}p--}g+=100}}}}}}}}}}};var u=function(g){for(var f,h,j=g.length;j;f=parseInt(Math.random()*j),h=g[--j],g[j]=g[f],g[f]=h){}return g};var y=function(f){if(this.console&&typeof console.log!="undefined"){console.log(f)}};this.stop=function(){if(!c(w).data("nivo:vars").stop){c(w).data("nivo:vars").stop=true;y("Stop Slider")}};this.start=function(){if(c(w).data("nivo:vars").stop){c(w).data("nivo:vars").stop=false;y("Start Slider")}};z.afterLoad.call(this);return this};c.fn.nivoSlider=function(a){return this.each(function(j,b){var k=c(this);if(k.data("nivoslider")){return k.data("nivoslider")}var h=new d(this,a);k.data("nivoslider",h)})};c.fn.nivoSlider.defaults={effect:"random",slices:15,boxCols:8,boxRows:4,animSpeed:500,pauseTime:3000,startSlide:0,directionNav:true,directionNavHide:true,controlNav:true,controlNavThumbs:false,controlNavThumbsFromRel:false,controlNavThumbsSearch:".jpg",controlNavThumbsReplace:"_thumb.jpg",keyboardNav:true,pauseOnHover:true,manualAdvance:false,captionOpacity:0.8,prevText:"Prev",nextText:"Next",beforeChange:function(){},afterChange:function(){},slideshowEnd:function(){},lastSlide:function(){},afterLoad:function(){}};c.fn._reverse=[].reverse})(jQuery);function placeHoldMe(b){addEvent(b,"focus",function(){if(b.value==b.getAttribute("placeholder")){b.value=""}},false);addEvent(b,"blur",function(){if(b.value==""){b.value=b.getAttribute("placeholder")}},false)}function addEvent(f,d,g){if(f==null||f==undefined){return}if(f.addEventListener){f.addEventListener(d,g,false)}else{if(f.attachEvent){f.attachEvent("on"+d,g)}}}addEvent(window,"load",function(){if(!("placeholder" in document.createElement("input"))){var f=document.getElementsByTagName("input");var d=f.length;for(var g=0;g<d;g++){if(f[g].type!="submit"&&f[g].type!="radio"&&f[g].type!="checkbox"){placeHoldMe(f[g])}}f=d=null}});function initialize(){var d=new google.maps.LatLng(41.151021,-8.600101);var b={zoom:16,center:d,mapTypeId:google.maps.MapTypeId.ROADMAP};var c=new google.maps.Map(document.getElementById("map_canvas"),b);var a=new google.maps.Marker({position:d,map:c,title:"Here we are!"})}function sendMail(){$.ajax({url:"sendMail.php",type:"POST",async:"false",data:$("#contactform").serialize(),success:function(a){if(parseInt(a)!=0&&a!=""){$("#contactform")[0].reset();alert("Your email was sent!")}else{alert("Error! Please fill all the fields and try again. You can also mail us directly to info{at]planetariumgames.com")}}})}function sendMailPartner(){$.ajax({url:"sendMail.php?action=1",type:"POST",async:"false",data:$("#partner-form").serialize(),success:function(a){if(parseInt(a)!=0&&a!=""){$("#partner-form")[0].reset();alert("Your email was sent!")}else{alert("Error! Please fill all the fields and try again. You can also mail us directly to info{at]planetariumgames.com")}}})}$(document).ready(function(){for(i in news){$(".section").append('<div id="section'+news[i].id+'" class="sub"><div class="grid_6 news"><div><h4>'+news[i].title+'</h4><div class="taglinenews">"'+news[i].tagline+'"</div><img src="../admin/'+news[i].image_url+'" height="75" width="75"/>'+news[i].news_content+'<br/><br/><span  class="newsdate">'+news[i].insertion_date+"</span></div></div></div>");if(i<(news.length-1)){$("#navigation").append('<li ><a href="#section'+news[i].id+'" class="unselectednewsbullet"></a></li>')}}$("#navigation li a").first().removeClass("unselectednewsbullet").addClass("selectednewsbullet");for(i in media){$("#mediawrapper").append('<div style="height:250px"><div class="grid_5"><div class="media-image-wrapper"><img src=admin/'+media[i].urlimage+' alt="" height="271" width="200"/></div></div><div class="grid_7"><div class="mediatitle"><a href="'+media[i].journallink+'">'+media[i].journal+"</a></div>"+media[i].mediacontent+'<br/><br/><a target="_blank" href="'+media[i].medialink+'">'+readmore+"</a></div></div>")}$.localScroll.defaults.axis="xy";$.localScroll.hash({target:"#content",queue:true,duration:1500});$("#navigation").localScroll({target:"#content",queue:true,duration:1000,onBefore:function(h,g,f){},onAfter:function(f,g){}});$("#navigation li a").click(function(f){f.preventDefault();$("#navigation li a").removeClass("selectednewsbullet");$("#navigation li a").addClass("unselectednewsbullet");$(this).addClass("selectednewsbullet")});$("#lang-selected").html('<a href="javascript:void(0)" class="langselected"><span>'+$("#lang-option li a#"+language).html()+"</span></a>");$("#"+language).parent().addClass("language-selected");$("#lang-selected").click(function(){if($("#lang-option-container").is(":visible")){$("#lang-option-container").slideUp("slow",function(){})}else{$("#lang-option-container").slideDown("slow",function(){})}});$("#lang-option li a").click(function(){$("#lang-option-container").slideUp("slow",function(){})});$("#imagecontainer").nivoSlider({effect:"fade",pauseTime:5000});$("nav > a, .mask > a").click(function(f){f.preventDefault()});$("nav").append("<span id='magic-line'></span>");var b,a,d;var c=$("#magic-line");c.width($(".current_page_item").width()).css("left",$(".current_page_item").position().left).data("origLeft",c.position().left).data("origWidth",c.width());$("nav a").hover(function(){b=$(this);a=b.position().left;d=b.width();c.stop().animate({left:a,width:d})},function(){c.stop().animate({left:c.data("origLeft"),width:c.data("origWidth")})});$("#logo").click(function(){if($("#contactwrapper").hasClass("visible")){$("#contactwrapper").fadeOut("slow",function(){$("#contactwrapper").removeClass("visible")})}$.scrollTo(0,1000,{offset:-50})});$("nav > a").click(function(){$clicked=$(this).data("section");$(this).siblings().removeClass("current_page_item");$(this).addClass("current_page_item");c.width($(".current_page_item").width()).css("left",$(".current_page_item").position().left).data("origLeft",c.position().left).data("origWidth",c.width());if($clicked!="contactsection"){if($("#contactwrapper").hasClass("visible")){$("#contactwrapper").fadeOut("slow",function(){$("#contactwrapper").removeClass("visible")})}$.scrollTo($("#"+$clicked),1000,{offset:-80})}else{$("#contactwrapper").fadeIn("slow");$("#contactwrapper").addClass("visible");initialize()}});$(".moreinfowrapper > a").click(function(){$game=$(this).attr("id");$(".gamess").css("display","none");var f=$(this).parent().parent();var g=$("#gameinfowrapper");if(g.css("display")=="block"){g.animate({height:"toggle"},500)}$("#"+$game+"-container").css("display","block");g.animate({height:"toggle"},500,function(){$.scrollTo($("#gameinfo"),1000,{offset:-80,easing:"easeOutQuad"})});$(".view").removeClass("selected",300);f.addClass("selected",300)});$(".close").live("click",function(){$("#gameinfowrapper").animate({height:"toggle"},500,function(){});$(".view").removeClass("selected",300);$.scrollTo($("#gamessection"),1000,{offset:-80})});$("#signupbm").live("click",function(){window.open("http://www.ballmanager.abola.pt/default.asp")});$("#signupfs").live("click",function(){window.open("http://www.footstar.org/")});$("#signuppm").live("click",function(){window.open("http://www.pmanager.org/default.asp")});$("#mainregister").click(function(){window.location.href="http://planetariumgames.com/register.php"});$(".closecontactdiv").live("click",function(){$("#contactwrapper").fadeOut("slow")});(language=="en")?closebtnwidth="70px":closebtnwidth="80px";$(".icon").live({mouseover:function(){$(".closetext").animate({width:closebtnwidth,opacity:1},200)},mouseout:function(){$(".closetext").stop().animate({width:"50px",opacity:0},200)}})});


