
function insertMedia()
{
for( var k = 0, l = arguments.length; k < l; k++ )
{
document.write( arguments[k] );
}
}
(function($){
jQuery.fn.checkboxToggle = function(opt){
var check = jQuery(this).next()[0].checked == true;
jQuery(this)
.attr({ src: check ? opt.unchecked : opt.checked })
.next()[0].checked = !check;
var c = jQuery(this).next()[0]; jQuery(c).change();
}
jQuery.fn.checkboxDisable = function(opt){
jQuery(this)
.attr({ src: opt.unchecked })
.next()[0].checked = false;
}
jQuery.fn.checkboxEnable = function(opt){
jQuery(this)
.attr({ src: opt.checked })
.next()[0].checked = true;
}
jQuery.fn.checkbox = function(opt){
jQuery(":checkbox", this)
.hide()
.each(function (){
jQuery("<img>")
.attr({src: this.checked ? opt.checked : opt.unchecked, alt: "" })
.click(function() {
jQuery(this).checkboxToggle(opt);
})
.insertBefore(this);
});
}
jQuery.fn.cssCheckboxToggle = function(){
this.toggleClass("checked");
var check = jQuery(":checkbox[@name='"+this.attr("for")+"']")[0];
check.checked = !check.checked;
}
jQuery.fn.cssCheckbox = function(){
jQuery(":checkbox", this)
.hide()
.each(function(){
var check = this;
var jlabel = jQuery("label[@for='"+jQuery(check).attr("name")+"']");
if (check.checked) {
jlabel.addClass("checked");
}
jlabel
.hover(
function() { jQuery(this).addClass("over"); },
function() { jQuery(this).removeClass("over"); }
)
.click(function(){
jQuery(this).cssCheckboxToggle();
});
});
}
})(jQuery);
;(function(d){var k=d.scrollTo=function(a,i,e){d(window).scrollTo(a,i,e)};k.defaults={axis:'xy',duration:parseFloat(d.fn.jquery)>=1.3?0:1};k.window=function(a){return d(window)._scrollable()};d.fn._scrollable=function(){return this.map(function(){var a=this,i=!a.nodeName||d.inArray(a.nodeName.toLowerCase(),['iframe','#document','html','body'])!=-1;if(!i)return a;var e=(a.contentWindow||a).document||a.ownerDocument||a;return d.browser.safari||e.compatMode=='BackCompat'?e.body:e.documentElement})};d.fn.scrollTo=function(n,j,b){if(typeof j=='object'){b=j;j=0}if(typeof b=='function')b={onAfter:b};if(n=='max')n=9e9;b=d.extend({},k.defaults,b);j=j||b.speed||b.duration;b.queue=b.queue&&b.axis.length>1;if(b.queue)j/=2;b.offset=p(b.offset);b.over=p(b.over);return this._scrollable().each(function(){var q=this,r=d(q),f=n,s,g={},u=r.is('html,body');switch(typeof f){case'number':case'string':if(/^([+-]=)?\d+(\.\d+)?(px|%)?$/.test(f)){f=p(f);break}f=d(f,this);case'object':if(f.is||f.style)s=(f=d(f)).offset()}d.each(b.axis.split(''),function(a,i){var e=i=='x'?'Left':'Top',h=e.toLowerCase(),c='scroll'+e,l=q[c],m=k.max(q,i);if(s){g[c]=s[h]+(u?0:l-r.offset()[h]);if(b.margin){g[c]-=parseInt(f.css('margin'+e))||0;g[c]-=parseInt(f.css('border'+e+'Width'))||0}g[c]+=b.offset[h]||0;if(b.over[h])g[c]+=f[i=='x'?'width':'height']()*b.over[h]}else{var o=f[h];g[c]=o.slice&&o.slice(-1)=='%'?parseFloat(o)/100*m:o}if(/^\d+$/.test(g[c]))g[c]=g[c]<=0?0:Math.min(g[c],m);if(!a&&b.queue){if(l!=g[c])t(b.onAfterFirst);delete g[c]}});t(b.onAfter);function t(a){r.animate(g,j,b.easing,a&&function(){a.call(this,n,b)})}}).end()};k.max=function(a,i){var e=i=='x'?'Width':'Height',h='scroll'+e;if(!d(a).is('html,body'))return a[h]-d(a)[e.toLowerCase()]();var c='client'+e,l=a.ownerDocument.documentElement,m=a.ownerDocument.body;return Math.max(l[h],m[h])-Math.min(l[c],m[c])};function p(a){return typeof a=='object'?a:{top:a,left:a}}})(jQuery);
(function(d){d.fn.orbit=function(a){a=d.extend({animation:"horizontal-push",animationSpeed:600,timer:!0,advanceSpeed:4E3,pauseOnHover:!1,startClockOnMouseOut:!1,startClockOnMouseOutAfter:1E3,directionalNav:!0,captions:!0,captionAnimation:"fade",captionAnimationSpeed:600,bullets:!1,bulletThumbs:!1,bulletThumbLocation:"",afterSlideChange:function(){}},a);return this.each(function(){function q(){if(!a.timer||"false"==a.timer)return!1;r.is(":hidden")?s=setInterval(function(){m("next")},a.advanceSpeed): (o=!0,x.removeClass("active"),s=setInterval(function(){var a="rotate("+l+"deg)";l+=2;t.css({"-webkit-transform":a,"-moz-transform":a,"-o-transform":a});180<l&&(t.addClass("move"),y.addClass("move"));360<l&&(t.removeClass("move"),y.removeClass("move"),l=0,m("next"))},a.advanceSpeed/180))}function n(){if(!a.timer||"false"==a.timer)return!1;o=!1;clearInterval(s);x.addClass("active")}function z(){if(!a.captions||"false"==a.captions)return!1;var b=e.eq(c).data("caption");(_captionHTML=d(b).html())?(j.attr("id", b).html(_captionHTML),"none"==a.captionAnimation&&j.show(),"fade"==a.captionAnimation&&j.fadeIn(a.captionAnimationSpeed),"slideOpen"==a.captionAnimation&&j.slideDown(a.captionAnimationSpeed)):("none"==a.captionAnimation&&j.hide(),"fade"==a.captionAnimation&&j.fadeOut(a.captionAnimationSpeed),"slideOpen"==a.captionAnimation&&j.slideUp(a.captionAnimationSpeed))}function A(){if(a.bullets)C.children("li").removeClass("active").eq(c).addClass("active");else return!1}function m(b){function d(){e.eq(f).removeClass("current").css({"z-index":1}); u=!1;a.afterSlideChange.call(this)}var f=c,g=b;if(f==g)return!1;if("1"==e.length)return!1;u||(u=!0,"next"==b?(c++,c==p&&(c=0)):"prev"==b?(c--,0>c&&(c=p-1)):(c=b,f<c?g="next":f>c&&(g="prev")),A(),e.eq(f).removeClass("current").css({"z-index":2}),"fade"==a.animation&&e.eq(c).addClass("current").css({opacity:0,"z-index":3}).animate({opacity:1},a.animationSpeed,d),"horizontal-slide"==a.animation&&("next"==g&&e.eq(c).addClass("current").css({left:h,"z-index":3}).animate({left:0},a.animationSpeed,d),"prev"== g&&e.eq(c).addClass("current").css({left:-h,"z-index":3}).animate({left:0},a.animationSpeed,d)),"vertical-slide"==a.animation&&("prev"==g&&e.eq(c).addClass("current").css({top:v,"z-index":3}).animate({top:0},a.animationSpeed,d),"next"==g&&e.eq(c).addClass("current").css({top:-v,"z-index":3}).animate({top:0},a.animationSpeed,d)),"horizontal-push"==a.animation&&("next"==g&&(e.eq(c).addClass("current").css({left:h,"z-index":3}).animate({left:0},a.animationSpeed,d),e.eq(f).removeClass("current").animate({left:-h}, a.animationSpeed)),"prev"==g&&(e.eq(c).addClass("current").css({left:-h,"z-index":3}).animate({left:0},a.animationSpeed,d),e.eq(f).removeClass("current").animate({left:h},a.animationSpeed))),z())}var c=0,p=0,h,v,u,f=d(this).addClass("orbit"),b=f.wrap('<div class="orbit-wrapper" />').parent();f.add(h).width("1px").height("1px");var e=f.children("img, a, div");e.each(function(){d(this);898>f.width()&&(f.add(b).width(898),h=f.width());330>f.height()&&(f.add(b).height(330),v=f.height());p++});if(1==e.length)a.directionalNav= !1,a.timer=!1,a.bullets=!1;e.eq(c).css({"z-index":3}).addClass("current").fadeIn(function(){e.css({display:"block"})});if(a.timer){b.append('<div class="timer"><span class="mask"><span class="rotator"></span></span><span class="pause"></span></div>');var r=b.children("div.timer"),o;if(0!=r.length){var t=d("div.timer span.rotator"),y=d("div.timer span.mask"),x=d("div.timer span.pause"),l=0,s;q();r.click(function(){o?n():q()});if(a.startClockOnMouseOut){var B;b.mouseleave(function(){B=setTimeout(function(){o|| q()},a.startClockOnMouseOutAfter)});b.mouseenter(function(){clearTimeout(B)})}}}a.pauseOnHover&&b.mouseenter(function(){n()});if(a.captions){b.append('<div class="orbit-caption"></div>');var j=b.children(".orbit-caption");z()}if(a.directionalNav){if("false"==a.directionalNav)return!1;b.append('<div class="slider-nav"><span class="right">Right</span><span class="left">Left</span></div>');var k=b.children("div.slider-nav").children("span.left"),w=b.children("div.slider-nav").children("span.right"); k.click(function(){n();m("prev")});w.click(function(){n();m("next")})}if(a.bullets){b.append('<ul class="orbit-bullets"></ul>');var C=b.children("ul.orbit-bullets");for(i=0;i<p;i++){k=d("<li>"+(i+1)+"</li>");if(a.bulletThumbs&&(w=e.eq(i).data("thumb")))k=d('<li class="has-thumb">'+i+"</li>"),k.css({background:"url("+a.bulletThumbLocation+w+") no-repeat"});b.children("ul.orbit-bullets").append(k);k.data("index",i);k.click(function(){n();m(d(this).data("index"))})}A()}})}})(jQuery);
(function($){
function getFlashMovieObject(movieName){
if (window.document[movieName]){
return window.document[movieName];
}
if (navigator.appName.indexOf("Microsoft Internet")==-1){
if (document.embeds && document.embeds[movieName])
return document.embeds[movieName];
}
else{
return document.getElementById(movieName);
}
}
function SendDataToFlashMovie(val){
var flashMovie=getFlashMovieObject("flash");
flashMovie.key_down(val);
}
jQuery.fn.topLink = function(settings) {
settings = jQuery.extend({
min: 1,
fadeSpeed: 200,
ieOffset: 50
}, settings);
return this.each(function() {
var el = $(this);
el.css('display','none'); //in case the user forgot
$(window).scroll(function() {
if(!jQuery.support.hrefNormalized) {
el.css({
'position': 'absolute',
'top': $(window).scrollTop() + $(window).height() - settings.ieOffset
});
}
if($(window).scrollTop() >= settings.min) {
el.fadeIn(settings.fadeSpeed);
} else {
el.fadeOut(settings.fadeSpeed);
}
});
});
};
jQuery.fn.center = function () {
this.css("position","relative");
this.css("left", (($(window).width() - this.outerWidth()) / 2) + $(window).scrollLeft() + "px");
return this;
}
$(function(){
$("article.box-b, article.box-bc").hover(function(){
$(this).find("*").addClass("hover");
var img = $(this).find("img:first");
img.data("src",$(img).attr("src"))
.attr("src",$(img).attr("data-hover"));
},function(){
$(this).find("*").removeClass("hover");
var img = $(this).find("img:first");
img.attr("src",$(img).data("src"));
});
$("#share").live('click',function(){
$(this).siblings(".condividi").toggle();
$(".condividi").find('a').click(function(){
$(this).parent().parent().toggle();
});
return false;
});
$(".in  img[title]").tooltip({
offset: [10, 2],
effect: 'slide'
}).dynamic({ bottom: { direction: 'down', bounce: true } });
var opt = {
checked: "http://n.anteastudio.com/extension/ezdesign/design/ezdesign/images/spunta.png",
unchecked: "http://n.anteastudio.com/extension/ezdesign/design/ezdesign/images/nospunta.png"
};
$(".checkbox").checkbox(opt);
$("#accordion").accordion({
collapsible: false,
autoHeight: false,
animated: false
});
var radio = $('#budgetform .blo img').click(function(){
radio.each(function(){$(this).checkboxDisable(opt);});
$(this).checkboxEnable(opt);
});
$('#newsletterform').submit(function(){
if( !$('#form_privacy').is(':checked') ) {
$('.alert').slideDown(500, 'easeOutBack').delay(3000).slideUp(500, 'easeInBack');
return false;
}
});
$('#newsletterGroups input[type=checkbox], #allsolutions').change(function(){
if( $(this).attr('value') == '0' ) {
var value = $(this).is(':checked');
$('input[name^=nvNewsletterGroupID]').attr('checked', value);
$('#newsletterGroups img, #solutionsform img, #allfigures img').each(function(){
$(this).checkboxDisable(opt);
if( value ) {
$(this).checkboxEnable(opt);
}
});
} else {
var value = $(this).is(':checked');
$('input#group_' + $(this).attr('value')).attr('checked', value);
}
});
var SITE = SITE || {};
SITE.fileInputs = function() {
var $this = $(this),
$val = $this.val(),
valArray = $val.split('\\'),
newVal = valArray[valArray.length-1],
$button = $this.siblings('.button'),
$fakeFile = $this.siblings('.file-holder');
if(newVal !== '') {
$button.text('File: ');
if($fakeFile.length === 0) {
$button.after('<span class="file-holder">' + newVal + '</span>');
} else {
$fakeFile.text(newVal);
}
}
};
$('.file-wrapper input[type=file]').bind('change focus click', SITE.fileInputs);
$(".portfolio-close").live('click',function(){
$(this).parent('.portfolio-gallery').slideUp();
return false;
});
$(".zoom").live('mouseover',function(){
$(this).find('.zoomhover').stop().animate({
bottom: '0'
},750);
}).live('mouseout',function(){
$(this).find('.zoomhover').stop().animate({
bottom: '-=50'
},750);
}).live('click',function(){
var gallery = $(this).parent().siblings('.portfolio-gallery');
if( gallery.is(':hidden') ) {
var top = $(this).parents('.box-f-left').offset().top;
$('html,body').animate({scrollTop: top },2000);
gallery.find('.orbit_slider img').each(function(i){
var src     = $(this).attr('src');
var dataSrc = $(this).attr('data-src');
if( src.indexOf('cccccc.gif') ) {
$(this).attr('src', dataSrc);
}
});
if( gallery.find('.orbit-wrapper').length <= 0 ) {
gallery.find('.orbit_slider').orbit({
timer: false,
bullets: true,
afterSlideChange: function(){
$(this).parents('.orbit-wrapper').siblings('.image-caption').text( $(this).attr('alt') );
}
});
}
gallery.slideDown();
} else {
gallery.slideUp();
}
return false;
});
$('#toplink').topLink({
min: 100,
fadeSpeed: 500
}).click(function(e) {
e.preventDefault();
$.scrollTo(0,300);
});
$('.gp').live('click',function(){
var w=480;
var h=380;
var x=Number((window.screen.width-w)/2);
var y=Number((window.screen.height-h)/2);
window.open('https://plusone.google.com/_/+1/confirm?hl=en&url='+encodeURIComponent(location.href)+'&title='+encodeURIComponent(document.title),'','width='+w+',height='+h+',left='+x+',top='+y+',scrollbars=no')
return false;
});
$('.gpp').live('click',function(){
var w=480;
var h=380;
var x=Number((window.screen.width-w)/2);
var y=Number((window.screen.height-h)/2);
var title = $(this).attr('title');
var url = $(this).attr('href');
window.open('https://plusone.google.com/_/+1/confirm?hl=en&url='+encodeURIComponent(url)+'&title='+encodeURIComponent(title),'','width='+w+',height='+h+',left='+x+',top='+y+',scrollbars=no')
return false;
});
$('.portfolio-social a, .share a').live('mouseenter', function(){
img = $(this).children('img');
img.data("src",$(img).attr("src"))
.attr("src",$(img).attr("data-src"));
});
$('.portfolio-social a, .share a').live('mouseleave', function(){
img = $(this).children('img');
img.attr("src",$(img).data("src"));
});
});
})(jQuery);

