
$(function() {
				var itemWidth = 1002;
				$('#carousel2').carouFredSel({
					width: itemWidth*2,
					align: true,
					items: 3,
					scroll: {
						items: 1,
						duration: 1000,
						pauseDuration: 9000
					},
					prev: '#prev',
					next: '#next'
				});

				$(window).resize(function() {
					var totalWidth = $(window).width();
					var margin = (totalWidth - (itemWidth*3)) / 2;
					$('#carousel2').parent().css({
						'marginLeft': margin,
						'width': totalWidth-margin
					});
					$('#prev, #next').width(itemWidth+margin);
				}).resize();
			});
$(function() {
        $('.wideitem .foto a').lightBox();
       $("#categorii").selectbox();
       $("#autori").selectbox();
    var navTimers = [];  
    $( "#menu li.top" ).hover(  
        function () {  
            var id = jQuery.data( this );  
            var $this = $( this );  
            navTimers[id] = setTimeout( function() {  
                $this.children( 'div' ).slideToggle( 300 );  
                navTimers[id] = "";  
            }, 300 );  
        },  
        function () {  
            var id = jQuery.data( this );  
            if ( navTimers[id] != "" ) {  
                clearTimeout( navTimers[id] );  
            } else {  
                $( this ).children( "div" ).slideToggle( 200 );  
            }  
        }  
    ); 
    
    $(".diplome-wrapper a").lightBox();
        
    $(".button-down").click(function() {
        
        
        $(this).parent().next('.diplome-wrapper').slideDown(400);
        $(this).hide();
        $(this).parent().removeClass('full').addClass('half');
    });   
    $('.diplome-header p').click(function() {
        $(this).parent().next('.diplome-wrapper').slideDown(400);
        $(this).siblings('.button-down').hide();
        $(this).parent().removeClass('full').addClass('half');
    });
    $(".button-up").click(function(){
        $(this).parent().parent().slideUp(400);
        var button = $(this);
        setTimeout(function(){
            button.parent().parent().siblings('.diplome-header').removeClass('half').addClass('full');
            button.parent().parent().siblings('.diplome-header').children('.button-down').show();
        }, 400);
        
        
    });
});
var map_active = false;

jQuery(document).ready(function() {
    jQuery('#carousel').jcarousel();
  
     
});

