$(
  function() {
    //$('div#content').corner('round bottom 10px') ;
    $('div#page').corner('round 10px') ;
				
				$('div#stop').corner('round 10px') ;
				
    $('div#homepage').corner('round 10px') ;
				
				$('div#historique').corner('round 10px') ;
				$('div#vignoble').corner('round 10px') ;
				
				$('div#qualite').corner('round 10px') ;
				$('div#elaboration').corner('round 10px') ;
				$('div#letemps').corner('round 10px') ;
				$('div#viticulture').corner('round 10px') ;
				$('div#rose').corner('round 10px') ;
				$('div#etoiles').corner('round 10px') ;			
				
				$('div#cuvees').corner('round 10px') ;
				
				$('div#guides').corner('round 10px') ;
	   			$('div#diplomes').corner('round 10px') ;
			
				$('div#conservation').corner('round 10px') ;
				$('div#consommation').corner('round 10px') ;
				$('div#accord').corner('round 10px') ;				
				$('div#recette1').corner('round 10px') ;
				$('div#recette2').corner('round 10px') ;			
				$('div#recette3').corner('round 10px') ;			
				$('div#recette4').corner('round 10px') ;			
				$('div#recette5').corner('round 10px') ;			
				$('div#recette6').corner('round 10px') ;			
				$('div#recette7').corner('round 10px') ;			
				$('div#recette8').corner('round 10px') ;			
				$('div#recette9').corner('round 10px') ;			
				$('div#recette10').corner('round 10px') ;
				$('div#recette11').corner('round 10px') ;
				$('div#recette12').corner('round 10px') ;
				$('div#recette13').corner('round 10px') ;			
				$('div#recette14').corner('round 10px') ;
				$('div#recette15').corner('round 10px') ;			
			
		
				$('div#actualites').corner('round 10px') ;
				$('div#actualitesanges').corner('round 10px') ;
				
				$('div#boutique').corner('round 10px') ;

				
	
    //$('div#homepage').dropShadow({left: 8, top: 10, opacity: 0.8, blur: 4});
				
				
    $('div#text').jScrollPane({scrollbarMargin:30});
    $('textarea').jScrollPane({scrollbarMargin:5});
    $('div#s'+$('div#menu a.on').attr('id')).show() ;

    
    
   if (document.getElementById('mycarousel')) {
      function initCarousel (carousel) {
        carousel.clip.hover( function() {
          carousel.stopAuto();
        }, function() {
            carousel.startAuto();
        });
      }
      
      $('#mycarousel').jcarousel({
        auto: 1,
        scroll:1,
        wrap:'both',
        animation:8000,
        initCallback: initCarousel
      });
    }
    
    if (document.getElementById('dock2')) {
			$('#dock2').Fisheye(
				{
					maxWidth: 20,
					items: 'a',
					itemsText: 'span',
					container: '.dock-container2',
					itemWidth: 40,
					proximity: 80,
					alignment : 'left',
					valign: 'bottom',
					halign : 'center'
				}
			);
			
			$('a.dock-item2, div#smenu2 a').click(
        function () {
          $('div.smenu a').removeClass('on') ;
          $(this).addClass('on');
          $('div#bouteille img').attr('src','img/' + this.rel + '.png') ;
          $('div#text div').hide() ;
          $('div#'+this.rel).show() ;
          $text = $('div#text') ;
          $text[0].scrollTo(0);
        }
      );
    }
					
    $('div#contact form div').mouseover(
      function () {
        $(this).children('input, textarea').css('background','#467896') ;
        $(this).children('input, textarea').css('color','white') ;
        $(this).children('input, textarea').focus() ;
      }
    );

    $('div#contact form div').mouseout(
      function () {
        $(this).children('input, textarea').css('background','transparent') ;
        $(this).children('input, textarea').css('color','#467896') ;
        $(this).children('input, textarea').blur() ;
      }
    );
    
    $('div#menu a').mouseover(
      function () {
        $('div.smenu').hide() ;
        $('div#s'+this.id).show() ;
      }
    );
    
    // Fix PNG
    if(document.all != null && window.opera == null){
    	// test IE 6
    	if(window.XMLHttpRequest == null && document.implementation != null && document.compatMode != null){
    		var imgs = document.getElementsByTagName('img');
    		for(var i = 0, img; img = imgs[i]; i++){
    			if(/png$/i.test(img.src)){
    				var src = img.src;
    				img.src = '/img/dot.gif';
    				img.runtimeStyle.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+src+"',sizingMethod='image');";
    			}
    		}
    	}
    }
    
  }
)



