$(document).ready(function(){    
        
     Cufon.replace('#menu-topmenu a',{textShadow:"none", hover: true});     
     Cufon.replace('h2, .detalii');
     
     Cufon.replace('#sidebar a', {hover: true});
     Cufon.set('fontFamily',"HelveticaNeueLT Com 25 UltLt").replace('h1', {textShadow: '1px 1px 1px #fff'});
     Cufon.now();
    
     $("#carousel").cycle({
		fx: 'scrollHorz',
        speed:    1500, 
        timeout:  8000,
        easing:   'easeInOutQuint',
        prev:     '#prevSlide', 
        next:     '#nextSlide'                   
	});        
    
    
    var images = $('.galerie-contact img');
    if(images.size() < 5){
	$('.galerie-contact').css('height', '150');
    }else if(images.size() < 10){
	$('.galerie-contact').css('height', '260');
    }else if(images.size() < 15){
	$('.galerie-contact').css('height', '375');
    }else if(images.size() < 20){
	$('.galerie-contact').css('height', '490');
    }
    
    
    
    
    $('#pane, .pane').jScrollPane();
    
        

    $("a.fancy-box").fancybox({speedIn: 400, speedOut: 200});
    $('#head li:first').css('margin-left',0);   
    $('#sidebar li:last').addClass('last');    
	$('a[rel~=external]').attr({ 'target': '_blank'});
    
    $('#cadou').hover(
        function(){
            $(this).animate({'width':275, 'height': 254, 'bottom': '-30px', 'left': '-65px'});
        }, 
        function(){
            $(this).animate({'width':200, 'height': 184, 'bottom': '0', 'left': '-23px'});
        }
    );
    
    if($('.promotie').length){
       $('#fancybox-left, #fancybox-right').css('display', 'none !important');        
    }
    
    if($('.page-item-1042').length){
       $('.page-item-1042 a').attr('href', $('#price-list').html()).attr('target', '_blank');          
    }
    
    
});

