/*
 * easing
*/
jQuery.easing['jswing'] = jQuery.easing['swing']; jQuery.extend( jQuery.easing, { def: 'easeOutQuad', swing: function (x, t, b, c, d) { return jQuery.easing[jQuery.easing.def](x, t, b, c, d);}, easeInQuad: function (x, t, b, c, d) { return c*(t/=d)*t + b;}, easeOutQuad: function (x, t, b, c, d) { return -c *(t/=d)*(t-2) + b;}, easeInOutQuad: function (x, t, b, c, d) { if ((t/=d/2) < 1) return c/2*t*t + b; return -c/2 * ((--t)*(t-2) - 1) + b;}, easeInCubic: function (x, t, b, c, d) { return c*(t/=d)*t*t + b;}, easeOutCubic: function (x, t, b, c, d) { return c*((t=t/d-1)*t*t + 1) + b;}, easeInOutCubic: function (x, t, b, c, d) { if ((t/=d/2) < 1) return c/2*t*t*t + b; return c/2*((t-=2)*t*t + 2) + b;}, easeInQuart: function (x, t, b, c, d) { return c*(t/=d)*t*t*t + b;}, easeOutQuart: function (x, t, b, c, d) { return -c * ((t=t/d-1)*t*t*t - 1) + b;}, easeInOutQuart: function (x, t, b, c, d) { if ((t/=d/2) < 1) return c/2*t*t*t*t + b; return -c/2 * ((t-=2)*t*t*t - 2) + b;}, easeInQuint: function (x, t, b, c, d) { return c*(t/=d)*t*t*t*t + b;}, easeOutQuint: function (x, t, b, c, d) { return c*((t=t/d-1)*t*t*t*t + 1) + b;}, easeInOutQuint: function (x, t, b, c, d) { if ((t/=d/2) < 1) return c/2*t*t*t*t*t + b; return c/2*((t-=2)*t*t*t*t + 2) + b;}, easeInSine: function (x, t, b, c, d) { return -c * Math.cos(t/d * (Math.PI/2)) + c + b;}, easeOutSine: function (x, t, b, c, d) { return c * Math.sin(t/d * (Math.PI/2)) + b;}, easeInOutSine: function (x, t, b, c, d) { return -c/2 * (Math.cos(Math.PI*t/d) - 1) + b;}, easeInExpo: function (x, t, b, c, d) { return (t==0) ? b : c * Math.pow(2, 10 * (t/d - 1)) + b;}, easeOutExpo: function (x, t, b, c, d) { return (t==d) ? b+c : c * (-Math.pow(2, -10 * t/d) + 1) + b;}, easeInOutExpo: function (x, t, b, c, d) { if (t==0) return b; if (t==d) return b+c; if ((t/=d/2) < 1) return c/2 * Math.pow(2, 10 * (t - 1)) + b; return c/2 * (-Math.pow(2, -10 * --t) + 2) + b;}, easeInCirc: function (x, t, b, c, d) { return -c * (Math.sqrt(1 - (t/=d)*t) - 1) + b;}, easeOutCirc: function (x, t, b, c, d) { return c * Math.sqrt(1 - (t=t/d-1)*t) + b;}, easeInOutCirc: function (x, t, b, c, d) { if ((t/=d/2) < 1) return -c/2 * (Math.sqrt(1 - t*t) - 1) + b; return c/2 * (Math.sqrt(1 - (t-=2)*t) + 1) + b;}, easeInElastic: function (x, t, b, c, d) { var s=1.70158;var p=0;var a=c; if (t==0) return b; if ((t/=d)==1) return b+c; if (!p) p=d*.3; if (a < Math.abs(c)) { a=c; var s=p/4;}
else var s = p/(2*Math.PI) * Math.asin (c/a); return -(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b;}, easeOutElastic: function (x, t, b, c, d) { var s=1.70158;var p=0;var a=c; if (t==0) return b; if ((t/=d)==1) return b+c; if (!p) p=d*.3; if (a < Math.abs(c)) { a=c; var s=p/4;}
else var s = p/(2*Math.PI) * Math.asin (c/a); return a*Math.pow(2,-10*t) * Math.sin( (t*d-s)*(2*Math.PI)/p ) + c + b;}, easeInOutElastic: function (x, t, b, c, d) { var s=1.70158;var p=0;var a=c; if (t==0) return b; if ((t/=d/2)==2) return b+c; if (!p) p=d*(.3*1.5); if (a < Math.abs(c)) { a=c; var s=p/4;}
else var s = p/(2*Math.PI) * Math.asin (c/a); if (t < 1) return -.5*(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b; return a*Math.pow(2,-10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )*.5 + c + b;}, easeInBack: function (x, t, b, c, d, s) { if (s == undefined) s = 1.70158; return c*(t/=d)*t*((s+1)*t - s) + b;}, easeOutBack: function (x, t, b, c, d, s) { if (s == undefined) s = 1.70158; return c*((t=t/d-1)*t*((s+1)*t + s) + 1) + b;}, easeInOutBack: function (x, t, b, c, d, s) { if (s == undefined) s = 1.70158; if ((t/=d/2) < 1) return c/2*(t*t*(((s*=(1.525))+1)*t - s)) + b; return c/2*((t-=2)*t*(((s*=(1.525))+1)*t + s) + 2) + b;}, easeInBounce: function (x, t, b, c, d) { return c - jQuery.easing.easeOutBounce (x, d-t, 0, c, d) + b;}, easeOutBounce: function (x, t, b, c, d) { if ((t/=d) < (1/2.75)) { return c*(7.5625*t*t) + b;} else if (t < (2/2.75)) { return c*(7.5625*(t-=(1.5/2.75))*t + .75) + b;} else if (t < (2.5/2.75)) { return c*(7.5625*(t-=(2.25/2.75))*t + .9375) + b;} else { return c*(7.5625*(t-=(2.625/2.75))*t + .984375) + b;}
}, easeInOutBounce: function (x, t, b, c, d) { if (t < d/2) return jQuery.easing.easeInBounce (x, t*2, 0, c, d) * .5 + b; return jQuery.easing.easeOutBounce (x, t*2-d, 0, c, d) * .5 + c*.5 + b;}
}); 

/*
 * timeago
*/
(function($) { $.timeago = function(timestamp) { if (timestamp instanceof Date) return inWords(timestamp); else if (typeof timestamp == "string") return inWords($.timeago.parse(timestamp)); else return inWords($.timeago.parse($(timestamp).attr("title")));}; var $t = $.timeago; $.extend($.timeago, { settings: { refreshMillis: 60000, allowFuture: false, strings: { prefixAgo: null, prefixFromNow: null, suffixAgo: "fa", suffixFromNow: "da ora", ago: null, fromNow: null, seconds: "poco", minute: "un minuto", minutes: "%d minuti", hour: "circa un'ora", hours: "circa %d ore", day: "un giorno", days: "%d giorni", month: "circa un mese", months: "%d mesi", year: "circa un anno", years: "%d anni"
}
}, inWords: function(distanceMillis) { var $l = this.settings.strings; var prefix = $l.prefixAgo; var suffix = $l.suffixAgo || $l.ago; if (this.settings.allowFuture) { if (distanceMillis < 0) { prefix = $l.prefixFromNow; suffix = $l.suffixFromNow || $l.fromNow;}
distanceMillis = Math.abs(distanceMillis);}
var seconds = distanceMillis / 1000; var minutes = seconds / 60; var hours = minutes / 60; var days = hours / 24; var years = days / 365; var words = seconds < 45 && substitute($l.seconds, Math.round(seconds)) || seconds < 90 && substitute($l.minute, 1) || minutes < 45 && substitute($l.minutes, Math.round(minutes)) || minutes < 90 && substitute($l.hour, 1) || hours < 24 && substitute($l.hours, Math.round(hours)) || hours < 48 && substitute($l.day, 1) || days < 30 && substitute($l.days, Math.floor(days)) || days < 60 && substitute($l.month, 1) || days < 365 && substitute($l.months, Math.floor(days / 30)) || years < 2 && substitute($l.year, 1) || substitute($l.years, Math.floor(years)); return $.trim([prefix, words, suffix].join(" "));}, parse: function(iso8601) { var s = $.trim(iso8601); s = s.replace(/-/,"/").replace(/-/,"/"); s = s.replace(/T/," ").replace(/Z/," UTC"); s = s.replace(/([\+-]\d\d)\:?(\d\d)/," $1$2"); return new Date(s);}
}); $.fn.timeago = function() { var self = this; self.each(refresh); var $s = $t.settings; if ($s.refreshMillis > 0) { setInterval(function() { self.each(refresh);}, $s.refreshMillis);}
return self;}; function refresh() { var date = $t.parse(this.title); if (!isNaN(date)) { $(this).text(inWords(date));}
return this;}
function inWords(date) { return $t.inWords(distance(date));}
function distance(date) { return (new Date().getTime() - date.getTime());}
function substitute(stringOrFunction, value) { var string = $.isFunction(stringOrFunction) ? stringOrFunction(value) : stringOrFunction; return string.replace(/%d/i, value);}
if ($.browser.msie && $.browser.version < 7.0) { document.createElement('abbr');}
})(jQuery); 
/*
 * dimensions
*/
(function($){ var height = $.fn.height, width = $.fn.width; $.fn.extend({ height: function() { if ( !this[0] ) error(); if ( this[0] == window )
if ( $.browser.opera || ($.browser.safari && parseInt($.browser.version) > 520) )
return self.innerHeight - (($(document).height() > self.innerHeight) ? getScrollbarWidth() : 0); else if ( $.browser.safari )
return self.innerHeight; else
return $.boxModel && document.documentElement.clientHeight || document.body.clientHeight; if ( this[0] == document )
return Math.max( ($.boxModel && document.documentElement.scrollHeight || document.body.scrollHeight), document.body.offsetHeight ); return height.apply(this, arguments);}, width: function() { if (!this[0]) error(); if ( this[0] == window )
if ( $.browser.opera || ($.browser.safari && parseInt($.browser.version) > 520) )
return self.innerWidth - (($(document).width() > self.innerWidth) ? getScrollbarWidth() : 0); else if ( $.browser.safari )
return self.innerWidth; else
return $.boxModel && document.documentElement.clientWidth || document.body.clientWidth; if ( this[0] == document )
if ($.browser.mozilla) { var scrollLeft = self.pageXOffset; self.scrollTo(99999999, self.pageYOffset); var scrollWidth = self.pageXOffset; self.scrollTo(scrollLeft, self.pageYOffset); return document.body.offsetWidth + scrollWidth;}
else
return Math.max( (($.boxModel && !$.browser.safari) && document.documentElement.scrollWidth || document.body.scrollWidth), document.body.offsetWidth ); return width.apply(this, arguments);}, innerHeight: function() { if (!this[0]) error(); return this[0] == window || this[0] == document ?
this.height() :
this.is(':visible') ?
this[0].offsetHeight - num(this, 'borderTopWidth') - num(this, 'borderBottomWidth') :
this.height() + num(this, 'paddingTop') + num(this, 'paddingBottom');}, innerWidth: function() { if (!this[0]) error(); return this[0] == window || this[0] == document ?
this.width() :
this.is(':visible') ?
this[0].offsetWidth - num(this, 'borderLeftWidth') - num(this, 'borderRightWidth') :
this.width() + num(this, 'paddingLeft') + num(this, 'paddingRight');}, outerHeight: function(options) { if (!this[0]) error(); options = $.extend({ margin: false }, options || {}); return this[0] == window || this[0] == document ?
this.height() :
this.is(':visible') ?
this[0].offsetHeight + (options.margin ? (num(this, 'marginTop') + num(this, 'marginBottom')) : 0) :
this.height() + num(this,'borderTopWidth') + num(this, 'borderBottomWidth') + num(this, 'paddingTop') + num(this, 'paddingBottom') + (options.margin ? (num(this, 'marginTop') + num(this, 'marginBottom')) : 0);}, outerWidth: function(options) { if (!this[0]) error(); options = $.extend({ margin: false }, options || {}); return this[0] == window || this[0] == document ?
this.width() :
this.is(':visible') ?
this[0].offsetWidth + (options.margin ? (num(this, 'marginLeft') + num(this, 'marginRight')) : 0) :
this.width() + num(this, 'borderLeftWidth') + num(this, 'borderRightWidth') + num(this, 'paddingLeft') + num(this, 'paddingRight') + (options.margin ? (num(this, 'marginLeft') + num(this, 'marginRight')) : 0);}, scrollLeft: function(val) { if (!this[0]) error(); if ( val != undefined )
return this.each(function() { if (this == window || this == document)
window.scrollTo( val, $(window).scrollTop() ); else
this.scrollLeft = val;}); if ( this[0] == window || this[0] == document )
return self.pageXOffset || $.boxModel && document.documentElement.scrollLeft || document.body.scrollLeft; return this[0].scrollLeft;}, scrollTop: function(val) { if (!this[0]) error(); if ( val != undefined )
return this.each(function() { if (this == window || this == document)
window.scrollTo( $(window).scrollLeft(), val ); else
this.scrollTop = val;}); if ( this[0] == window || this[0] == document )
return self.pageYOffset || $.boxModel && document.documentElement.scrollTop || document.body.scrollTop; return this[0].scrollTop;}, position: function(returnObject) { return this.offset({ margin: false, scroll: false, relativeTo: this.offsetParent() }, returnObject);}, offset: function(options, returnObject) { if (!this[0]) error(); var x = 0, y = 0, sl = 0, st = 0, elem = this[0], parent = this[0], op, parPos, elemPos = $.css(elem, 'position'), mo = $.browser.mozilla, ie = $.browser.msie, oa = $.browser.opera, sf = $.browser.safari, sf3 = $.browser.safari && parseInt($.browser.version) > 520, absparent = false, relparent = false, options = $.extend({ margin: true, border: false, padding: false, scroll: true, lite: false, relativeTo: document.body }, options || {}); if (options.lite) return this.offsetLite(options, returnObject); if (options.relativeTo.jquery) options.relativeTo = options.relativeTo[0]; if (elem.tagName == 'BODY') { x = elem.offsetLeft; y = elem.offsetTop; if (mo) { x += num(elem, 'marginLeft') + (num(elem, 'borderLeftWidth')*2); y += num(elem, 'marginTop') + (num(elem, 'borderTopWidth') *2);} else
if (oa) { x += num(elem, 'marginLeft'); y += num(elem, 'marginTop');} else
if ((ie && jQuery.boxModel)) { x += num(elem, 'borderLeftWidth'); y += num(elem, 'borderTopWidth');} else
if (sf3) { x += num(elem, 'marginLeft') + num(elem, 'borderLeftWidth'); y += num(elem, 'marginTop') + num(elem, 'borderTopWidth');}
} else { do { parPos = $.css(parent, 'position'); x += parent.offsetLeft; y += parent.offsetTop; if ((mo && !parent.tagName.match(/^t[d|h]$/i)) || ie || sf3) { x += num(parent, 'borderLeftWidth'); y += num(parent, 'borderTopWidth'); if (mo && parPos == 'absolute') absparent = true; if (ie && parPos == 'relative') relparent = true;}
op = parent.offsetParent || document.body; if (options.scroll || mo) { do { if (options.scroll) { sl += parent.scrollLeft; st += parent.scrollTop;}
if (oa && ($.css(parent, 'display') || '').match(/table-row|inline/)) { sl = sl - ((parent.scrollLeft == parent.offsetLeft) ? parent.scrollLeft : 0); st = st - ((parent.scrollTop == parent.offsetTop) ? parent.scrollTop : 0);}
if (mo && parent != elem && $.css(parent, 'overflow') != 'visible') { x += num(parent, 'borderLeftWidth'); y += num(parent, 'borderTopWidth');}
parent = parent.parentNode;} while (parent != op);}
parent = op; if (parent == options.relativeTo && !(parent.tagName == 'BODY' || parent.tagName == 'HTML')) { if (mo && parent != elem && $.css(parent, 'overflow') != 'visible') { x += num(parent, 'borderLeftWidth'); y += num(parent, 'borderTopWidth');}
if ( ((sf && !sf3) || oa) && parPos != 'static' ) { x -= num(op, 'borderLeftWidth'); y -= num(op, 'borderTopWidth');}
break;}
if (parent.tagName == 'BODY' || parent.tagName == 'HTML') { if (((sf && !sf3) || (ie && $.boxModel)) && elemPos != 'absolute' && elemPos != 'fixed') { x += num(parent, 'marginLeft'); y += num(parent, 'marginTop');}
if ( sf3 || (mo && !absparent && elemPos != 'fixed') || (ie && elemPos == 'static' && !relparent) ) { x += num(parent, 'borderLeftWidth'); y += num(parent, 'borderTopWidth');}
break;}
} while (parent);}
var returnValue = handleOffsetReturn(elem, options, x, y, sl, st); if (returnObject) { $.extend(returnObject, returnValue); return this;}
else { return returnValue;}
}, offsetLite: function(options, returnObject) { if (!this[0]) error(); var x = 0, y = 0, sl = 0, st = 0, parent = this[0], offsetParent, options = $.extend({ margin: true, border: false, padding: false, scroll: true, relativeTo: document.body }, options || {}); if (options.relativeTo.jquery) options.relativeTo = options.relativeTo[0]; do { x += parent.offsetLeft; y += parent.offsetTop; offsetParent = parent.offsetParent || document.body; if (options.scroll) { do { sl += parent.scrollLeft; st += parent.scrollTop; parent = parent.parentNode;} while(parent != offsetParent);}
parent = offsetParent;} while (parent && parent.tagName != 'BODY' && parent.tagName != 'HTML' && parent != options.relativeTo); var returnValue = handleOffsetReturn(this[0], options, x, y, sl, st); if (returnObject) { $.extend(returnObject, returnValue); return this;}
else { return returnValue;}
}, offsetParent: function() { if (!this[0]) error(); var offsetParent = this[0].offsetParent; while ( offsetParent && (offsetParent.tagName != 'BODY' && $.css(offsetParent, 'position') == 'static') )
offsetParent = offsetParent.offsetParent; return $(offsetParent);}
}); var error = function() { throw "Dimensions: jQuery collection is empty";}; var num = function(el, prop) { return parseInt($.css(el.jquery?el[0]:el,prop))||0;}; var handleOffsetReturn = function(elem, options, x, y, sl, st) { if ( !options.margin ) { x -= num(elem, 'marginLeft'); y -= num(elem, 'marginTop');}
if ( options.border && (($.browser.safari && parseInt($.browser.version) < 520) || $.browser.opera) ) { x += num(elem, 'borderLeftWidth'); y += num(elem, 'borderTopWidth');} else if ( !options.border && !(($.browser.safari && parseInt($.browser.version) < 520) || $.browser.opera) ) { x -= num(elem, 'borderLeftWidth'); y -= num(elem, 'borderTopWidth');}
if ( options.padding ) { x += num(elem, 'paddingLeft'); y += num(elem, 'paddingTop');}
if ( options.scroll && (!$.browser.opera || elem.offsetLeft != elem.scrollLeft && elem.offsetTop != elem.scrollLeft) ) { sl -= elem.scrollLeft; st -= elem.scrollTop;}
return options.scroll ? { top: y - st, left: x - sl, scrollTop: st, scrollLeft: sl }
: { top: y, left: x };}; var scrollbarWidth = 0; var getScrollbarWidth = function() { if (!scrollbarWidth) { var testEl = $('<div>')
.css({ width: 100, height: 100, overflow: 'auto', position: 'absolute', top: -1000, left: -1000
})
.appendTo('body'); scrollbarWidth = 100 - testEl
.append('<div>')
.find('div')
.css({ width: '100%', height: 200
})
.width(); testEl.remove();}
return scrollbarWidth;};})(jQuery); 
/*
 * scrollTo
*/
;(function(h){var m=h.scrollTo=function(b,c,g){h(window).scrollTo(b,c,g)};m.defaults={axis:'y',duration:1};m.window=function(b){return h(window).scrollable()};h.fn.scrollable=function(){return this.map(function(){var b=this.parentWindow||this.defaultView,c=this.nodeName=='#document'?b.frameElement||b:this,g=c.contentDocument||(c.contentWindow||c).document,i=c.setInterval;return c.nodeName=='IFRAME'||i&&h.browser.safari?g.body:i?g.documentElement:this})};h.fn.scrollTo=function(r,j,a){if(typeof j=='object'){a=j;j=0}if(typeof a=='function')a={onAfter:a};a=h.extend({},m.defaults,a);j=j||a.speed||a.duration;a.queue=a.queue&&a.axis.length>1;if(a.queue)j/=2;a.offset=n(a.offset);a.over=n(a.over);return this.scrollable().each(function(){var k=this,o=h(k),d=r,l,e={},p=o.is('html,body');switch(typeof d){case'number':case'string':if(/^([+-]=)?\d+(px)?$/.test(d)){d=n(d);break}d=h(d,this);case'object':if(d.is||d.style)l=(d=h(d)).offset()}h.each(a.axis.split(''),function(b,c){var g=c=='x'?'Left':'Top',i=g.toLowerCase(),f='scroll'+g,s=k[f],t=c=='x'?'Width':'Height',v=t.toLowerCase();if(l){e[f]=l[i]+(p?0:s-o.offset()[i]);if(a.margin){e[f]-=parseInt(d.css('margin'+g))||0;e[f]-=parseInt(d.css('border'+g+'Width'))||0}e[f]+=a.offset[i]||0;if(a.over[i])e[f]+=d[v]()*a.over[i]}else e[f]=d[i];if(/^\d+$/.test(e[f]))e[f]=e[f]<=0?0:Math.min(e[f],u(t));if(!b&&a.queue){if(s!=e[f])q(a.onAfterFirst);delete e[f]}});q(a.onAfter);function q(b){o.animate(e,j,a.easing,b&&function(){b.call(this,r,a)})};function u(b){var c='scroll'+b,g=k.ownerDocument;return p?Math.max(g.documentElement[c],g.body[c]):k[c]}}).end()};function n(b){return typeof b=='object'?b:{top:b,left:b}}})(jQuery);

