/**
 * EUVS
 * Javascript file for Visit category
 */

$(document).ready(function() {

	if($('.nul-bien-sans-peine').length) $('.nul-bien-sans-peine').flash(
	    { src: '/flash/mini-player.swf',
	      width: 299,
	      height: 224,
	      flashvars: {
				path: '/video/visit/bendor.mov',
				image: '/video/visit/nul-bien-sans-peine.jpg'
			}
		  },
	    { version: 8 }
	);

	if($('.euvs-video').length) $('.euvs-video').flash(
	    { src: '/flash/mini-player.swf',
	      width: 299,
	      height: 224,
	      flashvars: {
				path: '/video/visit/about_euvs.mov',
				image: '/video/visit/euvs-video.png'
			}
		  },
	    { version: 8 }
	);

	if($(".link-diapo").length) $(".link-diapo").lightbox({
		prevLinkTitle : '/css/img/prevlabel.gif',
		nextLinkTitle : '/css/img/nextlabel.gif',
		fileBottomNavCloseImage : '/css/img/closelabel.gif',
		fileLoadingImage : '/css/img/loader.gif'
	});

    // IMAGE REPLACEMENT
    FLIR.init( { path: '/facelift/' } );
    $('#subnav ul li').each( function() {
        FLIR.replace(this, new FLIRStyle({
            cFont: 'vonnesmediumcond',
            realFontHeight: true,
            resizeBox: true
        }));
    });
    
    $('#wrapper h1').not('.error h1').each( function() {
        FLIR.replace(this, new FLIRStyle({
            cFont: 'vonnesmedium',
            realFontHeight: true,
            resizeBox: true
        }));
    });
    
    $('#wrapper h2').each( function() {
        FLIR.replace(this, new FLIRStyle({
            cFont: 'vonneslight',
            mode: 'wrap',
            realFontHeight: true,
            resizeBox: true
        }));
    });
    
    $('#wrapper h3').each( function() {
        FLIR.replace(this, new FLIRStyle({
            cFont: 'vonnesbold',
            mode: 'wrap',
            resizeBox: true
        }));
    });
    
    $('#wrapper h4').each( function() {
        FLIR.replace(this, new FLIRStyle({
            cFont: 'vonnesbold',
            mode: 'wrap',
            realFontHeight: true,
            resizeBox: true
        }));
    });
    
    $('#wrapper h5').each( function() {
        FLIR.replace(this, new FLIRStyle({
            cFont: 'vonneslight',
            realFontHeight: true,
            resizeBox: true
        }));
    });
});
