/* 
Flash Text replacement
http://wiki.novemberborn.net/sifr3/ 
*/

var cholla_wide = {
 src: app['base_url'] + 'assets/flash/cholla_wide.swf'
 ,ratios: [9,1.27,14,1.19,21,1.16,28,1.13,38,1.12,53,1.11,60,1.1,61,1.11,94,1.1,96,1.09,101,1.1,102,1.09,103,1.1,108,1.09,110,1.1,1.09]
 ,wmode: 'transparent'
}; 

var liquor_store = {
 src: app['base_url'] + 'assets/flash/liquor_store.swf'
 ,ratios: [9,1.16,16,1.09,24,1.06,37,1.04,74,1.02,1.01]
 ,wmode: 'transparent'
}; 

sIFR.delayCSS = true; 
sIFR.prefetch(cholla_wide); 
sIFR.activate(cholla_wide);
sIFR.replace(cholla_wide, {
    selector: 'div#content div.column h1'
    ,css: [
      '.sIFR-root { font-size: 24px; color: #3f2b16; text-transform: uppercase; letter-spacing: 1.2; }',
      '.sIFR-root a { color: #3f2b16 }',
      '.sIFR-root a:visited { color: #3f2b16 }',
      '.sIFR-root a:hover { color: #3f2b16 }',
      '.sIFR-root a:active { color: #3f2b16 }'
    ]
    ,offsetTop: 8,
    wmode: 'transparent',
    forceSingleLine: true   
});

sIFR.replace(cholla_wide, {
    selector: 'span.h1'
    ,css: [
      '.sIFR-root { font-size: 24px; color: #ffffff; text-transform: uppercase; letter-spacing: 1.2; }',
      '.sIFR-root a { color: #ffffff }', 
      '.sIFR-root a:visited { color: #ffffff }', 
      '.sIFR-root a:hover { color: #ffffff }', 
      '.sIFR-root a:active { color: #ffffff }'
    ]
    ,offsetTop: 8,
    wmode: 'transparent',
    forceSingleLine: true   
});

sIFR.replace(cholla_wide, {
    selector: 'span.h2'
    ,css: [
      '.sIFR-root { font-size: 18px; color: #ffffff; text-transform: uppercase; letter-spacing: 1.2; }',
      '.sIFR-root a { color: #ffffff }', 
      '.sIFR-root a:visited { color: #ffffff }', 
      '.sIFR-root a:hover { color: #ffffff }', 
      '.sIFR-root a:active { color: #ffffff }'
    ]
    ,offsetTop: 8,
    wmode: 'transparent',
    forceSingleLine: true   
}); 

/* defined as a method because this is called from global.js in a callback */
var bannerOverlaySifr = function(){
	sIFR.replace(cholla_wide, {
	    selector: '#bannerOverlay h4'
	    ,css: [
	      '.sIFR-root { font-size: 20px; color: #442f1b; text-transform: uppercase; }',
	      '.sIFR-root a { color: #ffffff }', 
	      '.sIFR-root a:visited { color: #ffffff }', 
	      '.sIFR-root a:hover { color: #ffffff }', 
	      '.sIFR-root a:active { color: #ffffff }'
	    ]
	    ,offsetTop: 4,
	    wmode: 'transparent',
	    forceSingleLine: true,
		fitExactly: true
	});
}
bannerOverlaySifr();

sIFR.prefetch(liquor_store); 
sIFR.activate(liquor_store); 
sIFR.replace(liquor_store, {
    selector: 'h2.videoName'
    ,css: [
      '.sIFR-root { font-size: 42px; color: #f75d01; text-transform: uppercase; }',
      '.sIFR-root a { color: #ffffff }', 
      '.sIFR-root a:visited { color: #ffffff }', 
      '.sIFR-root a:hover { color: #ffffff }', 
      '.sIFR-root a:active { color: #ffffff }'
    ]
    ,offsetTop: 0,
    wmode: 'transparent',
    forceSingleLine: true   
});   
 
// Used to get the ratios of the typeface in the swf. Comment out the .replace method above to use this. Be sure to include the debug.js file too. 
// sIFR.debug.ratios({ src: 'assets/flash/liquor_store.swf', selector: 'h2' }); 
  

