$(function()
{
	$('#head_search select, #research select').selectmenu({
		style:'popup', 
		width: 210
	});
	$('select.uiselect').selectmenu({
		style:'popup',
		width: 150
	});
    
    $('#sidebar-inner ul.onglets a.sendtoafriend').fancybox({
        scrolling : false,
        autoDimensions : true,
        autoScale : false,
        centerOnScroll : true,
        ajax: {data:{popup:'1'}}
    });
    
    $('.showmorelink').each(function()
    {
        $(this).click(function()
        {
            if($(this).hasClass('active'))
            {
                $('#'+$(this).attr('rel')+'_small').show();
                $('#'+$(this).attr('rel')+'_full').hide();
                $(this).removeClass('active').text('Afficher le descriptif technique');
            }
            else
            {
                $('#'+$(this).attr('rel')+'_small').hide();
                $('#'+$(this).attr('rel')+'_full').show();
                $(this).addClass('active').text('Masquer');
            }
        })
    })
});

function enableHeadSlideshow()
{
    $(function()
    {
        $('#head_slideshow_content').jqFancyTransitions({effect:'curtain', width: 470, height: 350, links: true });
    });
}

function enableMango()
{
    /*
    $('#mango_utils a').fancybox({
        scrolling : false,
        autoDimensions : true,
        autoScale : false,
        centerOnScroll : true
    });
    */
}
