
// slideshow settings
$(document).ready(function() {
    $('.slideshow').cycle({
		fx: 'fade' // transition type : fade, scrollUp, shuffle, etc...
	});
	var tallest = 0;
	$('.ajax_block_product').each(function() {
		var thisHeight = $(this).height();
		if(thisHeight > tallest) {
			tallest = thisHeight;
		}
	});
	$('.ajax_block_product').css("height",tallest+"px");
});


  $(function() {

var $sidebar   = $("#right_column"),
        $window    = $(window),
        offset     = $sidebar.offset(),
        topPadding = 35;

    $window.scroll(function() {
        if ($window.scrollTop() > offset.top) {
            $sidebar.stop().animate({
                marginTop: $window.scrollTop() - offset.top + topPadding
            });
        } else {
            $sidebar.stop().animate({
                marginTop: 20
            });
        }
    });

}  );


$(document).ready( function() {

   
	    
    Cufon.replace('#center_column h1', { fontFamily: 'ColaborateLight', fontSize: '18px', color:'#000000' } );
		Cufon.replace('#center_column .rte h2', { fontFamily: 'ColaborateLight', fontSize: '28px', color:'#b4c944' } );
		//Cufon.replace('#center_column .rte h3', { fontFamily: 'ColaborateLight', fontSize: '18px', color:'#000000' } );
		Cufon.replace('#subcategories h3', { fontFamily: 'ColaborateLight', fontSize: '25px', color:'#000000' } );
		Cufon.replace('#header_links li', { fontFamily: 'ColaborateLight', fontSize: '17px', color:'#000000' } );
	  Cufon.replace('#cart_block h4', { fontFamily: 'ColaborateLight', fontSize: '14px', color:'#361F0F' } );
	  Cufon.replace('.one_fourth h3', { fontFamily: 'ColaborateLight', fontSize: '18px', color:'#361F0F' } );
		Cufon.replace('#phone', { fontFamily: 'ColaborateLight', fontSize: '22px', color:'#eee' } );
		
		
	 $('.rounded').corner();
   $('#sidebar .widget').corner();
   $('#bouton_fin_commande').corner();
   
	 /*$("#wrapper").hide();
	 $("#header_right").hide();
	 $("#wrapper").slideToggle("slow");
   $("#header_right").slideToggle("slow");
	   */
	
});



$(document).ready( function() {	
	Cufon.replace('.footer-one-third h3', { fontFamily: 'ColaborateLight', fontSize: '20px', color:'#B4C944' } );	
});


$(function() {   
                
                        var theWindow        = $(window),
                            $bg              = $("#bg"),
                            aspectRatio      = $bg.width() / $bg.height();
                                                                
                        function resizeBg() {
                                
                                if ( (theWindow.width() / theWindow.height()) < aspectRatio ) {
                                    $bg
                                        .removeClass()
                                        .addClass('bgheight');
                                } else {
                                    $bg
                                        .removeClass()
                                        .addClass('bgwidth');
                                }
                                                        
                        }
                                                                
                        theWindow.resize(function() {
                                resizeBg();
                        }).trigger("resize");
                
                });

