function removeFilter() {
  $('.menu li .submenu ').removeAttr("filter");
  };
  
$(document).ready(function() {
 $('ul.menu > li  > a:not(.menu-selected)')
	.css( {backgroundPosition: "right -37px"} )
	.mouseover(function(){
		$(this).stop().animate(
			{backgroundPosition:"(right 0)"}, 
			{duration:400})
		})
	.mouseout(function(){
		$(this).stop().animate(
			{backgroundPosition:"(right -37px)"}, 
			{duration:400})
		})
	

//SOTTOMENU
$('.menu li').hover(function(){
$(this).find('ul').show(0,removeFilter());
}, function(){
$(this).find('ul').hide();
});
		

$('.slide-home').cycle({ 
   fx:     'scrollHorz', 
    timeout: 3000,
	 speed: 800,
	 fit:1,
	 prev: '#slide-prev',
	 next: '#slide-next',
	 pager: '.slide-menu',
	 pagerAnchorBuilder: function(idx, slide) { 
	return '<li><a href="#" >' + slide.title + '</a></li>'; 
    }
}); 

$('.slide-home div').hover(
			function() { $(this).data('ietool', $(this).attr('title')); $(this).attr('title','');  },
			function() {  $(this).attr('title', $(this).data('ietool'));  });




//lighbox
$("a[rel^='prettyPhoto']").prettyPhoto();


// angoli stondati
$.fn.corner.defaults.useNative = false; 
$(".edge").corner("10px"); 
$(".menu_right").corner("10px"); 

// tabs
if($("#tabs").length>0){
$("#tabs").tabs().show();
$("#tabs").tabs('select', ($("#tabs").tabs( "length" )-1)); // zero-based, i.e. 1 = tab 2 
$("#accordion").accordion();
$("#tabs").tabs('select', 0);
}

 
 
 //language  
$('#lang').change(function(){
 var lang = $('#lang').val();
 window.location.href = "http://www.sunergsolar.com/"+lang;
})

});
