$(document).ready(function(){

  $(".rounded-img, .rounded-img2").load(function() {
    $(this).wrap(function(){
      return '<span class="' + $(this).attr('class') + '" style="background:url(' + $(this).attr('src') + ') no-repeat center center; width: ' + $(this).width() + 'px; height: ' + $(this).height() + 'px;" />';
    });
    $(this).css("opacity","0");
  });


$(function () {
$('.dropdown').each(function() {
$(this).parent().eq(0).hoverIntent({
timeout: 100,
over: function() {
var current = $('.dropdown:eq(0)', this);
current.slideDown(100);
},
out: function() {
var current = $('.dropdown:eq(0)', this);
current.fadeOut(200);
}
});
});
$('.dropdown a').hover(function() {
$(this).stop(true).animate({paddingLeft: '4px'}, {speed: 100, easing: 'easeOutBack'});
}, function () {
$(this).stop(true).animate({paddingLeft: '4px'}, {speed: 100, easing: 'easeOutBounce'});
});
});
	

$('#container, #container2').fadeTo(2000, 1);



$('#lang_eng_butt').click(function(){$('.lang_ita_block').css('display', 'none'), $('.lang_eng_block').fadeTo(1000, 1), $.cookie('lang','eng'); return false;  });
$('#lang_ita_butt').click(function(){$('.lang_eng_block').css('display', 'none'), $('.lang_ita_block').fadeTo(1000, 1), $.cookie('lang', null); return false;  });

if($.cookie('lang') == 'eng'){$(".lang_eng_block").css('display', 'block'), $(".lang_ita_block").css('display', 'none')}
if($.cookie('lang') == null){$(".lang_ita_block").css('display', 'block'), $(".lang_eng_block").css('display', 'none')}




$('#slideshow').cycle({
fx: 'scrollRight',
speed: 600,
timeout:  4000

});


$('#brandslide').cycle({
fx: 'scrollHorz',
speed: 500,
timeout: 0,
next: '#next2',
prev: '#prev2'
});

$("#jan2012button").click(function () {
$("#jan2012").fadeTo(1000, 1);
$("#oct2011").hide();  
$("#nov2011").hide(); 
$("#sept2011").hide(); 
$("#dec2011").hide(); 
});

$("#dec2011button").click(function () {
$("#dec2011").fadeTo(1000, 1);
$("#oct2011").hide();  
$("#nov2011").hide(); 
$("#sept2011").hide(); 
$("#jan2012").hide(); 
});

$("#sept2011button").click(function () {
$("#sept2011").fadeTo(1000, 1);
$("#oct2011").hide();  
$("#nov2011").hide();   
$("#dec2011").hide(); 
$("#jan2012").hide();  
});

$("#oct2011button").click(function () {
$("#oct2011").fadeTo(1000, 1);
$("#sept2011").hide();
$("#nov2011").hide();  
$("#dec2011").hide(); 
$("#jan2012").hide(); 
  
});

$("#nov2011button").click(function () {
$("#nov2011").fadeTo(1000, 1);
$("#sept2011").hide();   
$("#oct2011").hide(); 
$("#dec2011").hide();  
$("#jan2012").hide(); 
});

$(function() {
$('.newsblock a').lightBox();
});



});  
