/**
 * EUVS
 * Javascript file for Discover category
 */

$(document).ready(function() {
						   
	base_url = $("#logo").attr("href");
	
	
	
    // FLASH
    /*$('#splash').flash(
        { 
		  src: '/flash/discover-splash.swf',
          width: 935,
          height: 365
		},
        { version: 8 }
    );    
	$('#nav-bottles').flash(
        { 
		  wmode : "transparent",
		  src: '/flash/collection-nav-bottles.swf',
          width: '100%',
          height: 478 
		  },
        { version: 8 }
    );*/
    
    // IMAGE REPLACEMENT
    FLIR.init( { path: '/facelift/' } );
    $('#subnav ul li').each( function() {
        FLIR.replace(this, new FLIRStyle({
            cFont: 'vonnesmediumcond',
            realFontHeight: true,
            resizeBox: true
        }));
    });
    $('.book h1').each( function() {
        FLIR.replace(this, new FLIRStyle({
            cFont: 'vonnesbold',
            mode: 'wrap',
            realFontHeight: true,
            resizeBox: true
        }));
    });
    /*$('.spirits h1 strong').each( function() {
        FLIR.replace(this, new FLIRStyle({
            cFont: 'vonnesbold',
            realFontHeight: true,
            resizeBox: true
        }));
    });*/
   $('.spirits h1').each( function() {
        FLIR.replace(this, new FLIRStyle({
            cFont: 'vonneslight',
            mode: 'wrap',
            realFontHeight: true,
            resizeBox: true
        }));
    });
   $('.wine h1').each( function() {
        FLIR.replace(this, new FLIRStyle({
            cFont: 'vonneslight',
            mode: 'wrap',
            realFontHeight: true,
            resizeBox: true
        }));
    });
    $('.book h2,.spirits h2').each( function() {
        FLIR.replace(this, new FLIRStyle({
            cFont: 'vonneslight',
            mode: 'wrap',
            realFontHeight: true,
            resizeBox: true
        }));
    });
    $('.books h3, .spirits h3').each( function() {
        FLIR.replace(this, new FLIRStyle({
            cFont: 'vonnesbold',
            mode: 'wrap',
            realFontHeight: true,
            resizeBox: true
        }));
    });
    $('.books h4, .spirits h4').each( function() {
        FLIR.replace(this, new FLIRStyle({
            cFont: 'vonneslight',
            mode: 'wrap',
            realFontHeight: true,
            resizeBox: true
        }));
    });
    $('.book h5,.spirits h5').each( function() {
        FLIR.replace(this, new FLIRStyle({
            cFont: 'vonnesbold',
            realFontHeight: true,
            resizeBox: true
        }));
    });
	$('.paginesingle h6').each( function() {
        FLIR.replace(this, new FLIRStyle({
            cFont: 'vonneslight',
			mode: 'wrap',
            realFontHeight: true,
            resizeBox: true
        }));
    });
	
	$('.paginesingle h4').each( function() {
        FLIR.replace(this, new FLIRStyle({
            cFont: 'vonneslight',
			mode: 'wrap',
            realFontHeight: true,
            resizeBox: true
        }));
    });
	
    $('.books h6, .spirits h6').each( function() {
        FLIR.replace(this, new FLIRStyle({
            cFont: 'vonnesbook',
            mode: 'wrap',
            realFontHeight: true,
            resizeBox: true
        }));
    });
    $('#footmore h6').each( function() {
        FLIR.replace(this, new FLIRStyle({
            cFont: 'vonnesbook',
            realFontHeight: true,
            resizeBox: true
        }));
    });
	$('.bottle #populaire h2').each( function() {
        FLIR.replace(this, new FLIRStyle({
            cFont: 'vonnesbook',
            realFontHeight: true,
            resizeBox: true
        }));
    });
	
    $('.bottle h1').each( function() {
        FLIR.replace(this, new FLIRStyle({
            cFont: 'vonnesbold',
            mode: 'wrap',
            realFontHeight: true,
            resizeBox: true
        }));
    });
	
	
	//$(".wine.index #footer").css( "position",'absolute' );
	//$(".wine.index #footer").css( "bottom",(0) );
	
	$(".glassware.index #footer").css( "position",'absolute' );
	$(".glassware.index #footer").css( "bottom",(0) );
	
	$(".menus.index #footer").css( "position",'absolute' );
	$(".menus.index #footer").css( "bottom",(0) );
	
	
	if($('.collection.books')) {
		$('.collection a[href$=pdf]').click(function() {
			pageTracker._trackPageview($(this).attr('href'));
		});
	}
});


