sIFR.isEnabled = true;
sIFR.useStyleCheck = true;
sIFR.forceTextTransform = true;

var newsgoth = {
    src: '/media/site/fonts/NewsGothicSHOP-BoldCon.swf'
};
var clarendon = {
    src: '/media/site/fonts/Clarendon.swf'
};

sIFR.activate(newsgoth, clarendon);

// HOME PAGE PRODUCT VIEWER
sIFR.replace(newsgoth, {
	selector: '.main.home #models #harley li',
	css: [
		'.sIFR-root { font-weight: bold; text-transform: uppercase; letter-spacing: 1; }',		
		'a { text-decoration: none; }',
		'a:link { color: #FFFFFF; }',
		'a:hover { color: #FF6600; }'
	],
	wmode: 'transparent',
	onRollOver: function(obj){
		var alt = obj.getAlternate();
		var targetClass = alt.parentNode.className;
		targetClass = targetClass.split(' ')[0];
		
		productViewer.stopAnimation();
		productViewer.displaySpecificPicture(targetClass);
	},
	onRollOut: function(){
		productViewer.stopAnimation();
		productViewer.startAnimation();
	},
	tuneHeight: -5,
	ratios: [7,1.32,11,1.31,13,1.24,14,1.25,19,1.23,27,1.2,34,1.19,42,1.18,47,1.17,48,1.18,69,1.17,74,1.16,75,1.17,1.16]
});

sIFR.replace(newsgoth, {
	selector: '.main.home #models #buell li',
	css: [
		'.sIFR-root { font-weight: bold; text-transform: uppercase; letter-spacing: 1; }',		
		'a { text-decoration: none; }',
		'a:link { color: #FFFFFF; }',
		'a:hover { color: #FF6600; }'
	],
	wmode: 'transparent',
	onRollOver: function(obj){
		var alt = obj.getAlternate();
		var targetClass = alt.parentNode.className;
		targetClass = targetClass.split(' ')[0];
		
		productViewer.stopAnimation();
		productViewer.displaySpecificPicture(targetClass);
	},
	onRollOut: function(){
		productViewer.stopAnimation();
		productViewer.startAnimation();
	},
	tuneHeight: -5,
	ratios: [7,1.32,11,1.31,13,1.24,14,1.25,19,1.23,27,1.2,34,1.19,42,1.18,47,1.17,48,1.18,69,1.17,74,1.16,75,1.17,1.16]
});


// PROFILE PAGE
sIFR.replace(newsgoth, {
	selector: '.profile #content h2',
	css: [
		'.sIFR-root { font-weight: bold; text-transform: uppercase; letter-spacing: 2; color: #FF6600; }'
	],
	wmode: 'transparent',
	tuneHeight: -8,
	ratios: [7,1.32,11,1.31,13,1.24,14,1.25,19,1.23,27,1.2,34,1.19,42,1.18,47,1.17,48,1.18,69,1.17,74,1.16,75,1.17,1.16]
});


// COMMUNITY HOME
sIFR.replace(clarendon, {
	selector: '.community.home .contentBlock h3',
	css: [
		'.sIFR-root { font-weight: bold; text-transform: uppercase; letter-spacing: 1; color: #FFFFFF; }'
	],
	wmode: 'transparent',
	tuneHeight: -6,
	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]
});


// NEW BIKES HOME SUBNAVIGATION
sIFR.replace(newsgoth, {
	selector: '.newbikes.home.hd #subnavigation li h3, .newbikes.home.buell #subnavigation li h3',
	css: [
		'.sIFR-root { font-weight: bold; text-transform: uppercase; letter-spacing: 1; text-indent: 1; color: #FFFFFF; }',
	],
	wmode: 'transparent',
	//tuneHeight: 10,
	tuneHeight: -7,
	onRelease: function(obj){
		var el = obj.getFlashElement();
		var alt = obj.getAlternate();
		
		var targetClass = el.parentNode.parentNode.className;
		var range = targetClass.split(' ')[0];
		
		if($('div#'+range+' ul').css('display') == 'none') {
			showRange(range);
		} else {
			hideRange(range);
		}
		
	},
	ratios: [11,1.13,14,1.05,18,1.03,24,1.02,45,1,67,0.98,113,0.97,116,0.96,124,0.97,0.96]
});


// NEW BIKES PRODUCT VIEW SUBNAVIGATION
sIFR.replace(newsgoth, {
	selector: '.newbikes.product.hd #subnavigation li h3, .newbikes.product.buell #subnavigation li h3',
	css: [
		'.sIFR-root { font-weight: bold; text-transform: uppercase; letter-spacing: 1; text-indent: 1; color: #FFFFFF; }',
		'a { text-decoration: none; }',
      	'a:link { color: #FFFFFF; }',
      	'a:hover { color: #FFFFFF; }'
	],
	wmode: 'transparent',
	tuneHeight: -7,
	ratios: [11,1.13,14,1.05,18,1.03,24,1.02,45,1,67,0.98,113,0.97,116,0.96,124,0.97,0.96]
});

// NEW BIKES HOME RANGE - HARLEY DAVIDSON
sIFR.replace(newsgoth, {
	selector: '.newbikes.home.hd .range h3',
	css: [
		'.sIFR-root { font-weight: bold; text-transform: uppercase; letter-spacing: 1; color: #FF6600; }'
	],
	tuneHeight: -6,
	offsetTop: 3,
	fitExactly: true,
	wmode: 'transparent',
	ratios: [11,1.13,14,1.05,18,1.03,24,1.02,45,1,67,0.98,113,0.97,116,0.96,124,0.97,0.96]
});

// NEW BIKES HOME RANGE - BUELL
sIFR.replace(newsgoth, {
	selector: '.newbikes.home.buell .range h3',
	css: [
		'.sIFR-root { font-weight: bold; text-transform: uppercase; letter-spacing: 1; color: #FFFFFF; }'
	],
	tuneHeight: -6,
	tuneWidth: 5,
	offsetTop: 3,
	fitExactly: true,
	wmode: 'transparent',
	ratios: [11,1.13,14,1.05,18,1.03,24,1.02,45,1,67,0.98,113,0.97,116,0.96,124,0.97,0.96]
});

// NEW & USED BIKES H2 HEADINGS
sIFR.replace(newsgoth, {
	selector: '.newbikes.product.hd .col2 h2.sifr, .newbikes.product.buell .col2 h2.sifr, .usedbikes.product.hd .col1 h2.sifr, .usedbikes.product.buell .col1 h2.sifr, .testride h3.sifr, .contactus .contentBlock h3.sifr',
	css: [
		'.sIFR-root { font-weight: bold; text-transform: uppercase; letter-spacing: 1; color: #FFFFFF; }'
	],
	offsetTop: 2,
	wmode: 'transparent',
	ratios: [11,1.13,14,1.05,18,1.03,24,1.02,45,1,67,0.98,113,0.97,116,0.96,124,0.97,0.96]
});

// NEW & USED BIKES H3 HEADINGS - HARLEY DAVIDSON
sIFR.replace(newsgoth, {
	selector: '.newbikes.product.hd .col2 h3.sifr, .usedbikes.product.hd .col1 h3.sifr, .testride h2.sifr, .contactus .contentBlock h2.sifr',
	css: [
		'.sIFR-root { font-weight: bold; text-transform: uppercase; letter-spacing: 1; color: #FF6600; }'
	],
	tuneHeight: -5,
	wmode: 'transparent',
	ratios: [11,1.13,14,1.05,18,1.03,24,1.02,45,1,67,0.98,113,0.97,116,0.96,124,0.97,0.96]
});

// NEW & USED BIKES H3 HEADINGS - BUELL
sIFR.replace(newsgoth, {
	selector: '.newbikes.product.buell .col2 h3.sifr,  .usedbikes.product.buell .col1 h3.sifr',
	css: [
		'.sIFR-root { font-weight: bold; text-transform: uppercase; letter-spacing: 1; color: #376AAE; }'
	],
	tuneHeight: -5,
	wmode: 'transparent',
	ratios: [11,1.13,14,1.05,18,1.03,24,1.02,45,1,67,0.98,113,0.97,116,0.96,124,0.97,0.96]
});

// DEBUGGER - USE TO CALCULATE RATIOS
/*sIFR.debug.ratios(newsgoth, {
	selector: '.newbikes.home .range h3'
});*/