var p22light = {
	src: '/wp-content/themes/tpp-wordpress-template/sifr/flash/p22-light.swf'
};

sIFR.activate(p22light);



$(document).ready(function() {
	sIFR.replace(p22light, {
		selector: '.anc_nav_div div',
		wmode: 'transparent',
		// forceWidth: true,;
		fitExactly: true,
		css: {
			'.sIFR-root': {'font-size': '15px', 'color': '#ffffff'},
			'a': {'color': '#ffffff', 'text-decoration': 'none' },
			'a:hover': {'color': '#ffffff', 'text-decoration': 'none'}
		},
		onReplacement: function(obj) {
			var domobj = obj.getAncestor();
			$(domobj).parent().css('background-position', '-' + $(domobj).parent().get(0).offsetLeft + 'px');
		}
	});

	sIFR.replace(p22light, {
		selector: '.nav_div div',
		wmode: 'transparent',
		// forceWidth: true,;
		fitExactly: true,
		css: {
			'.sIFR-root': {'font-size': '15px', 'color': '#ffffff'},
			'a': {'color': '#ffffff', 'text-decoration': 'none' },
			'a:hover': {'color': '#ffffff', 'text-decoration': 'none'}
		},
		onReplacement: function(obj) {
			var domobj = obj.getAncestor();
			$(domobj).parent().css('background-position', '-' + $(domobj).parent().get(0).offsetLeft + 'px');
		}
	});
	
	
	sIFR.replace(p22light, {
		selector: 'h1',
		wmode: 'transparent',
		// forceWidth: true,;
		fitExactly: true,
		css: {
			'.sIFR-root': {'color': '#4a4a4a'},
			'a': {'color': '#4a4a4a', 'text-decoration': 'none' },
			'a:hover': {'color': '#4a4a4a', 'text-decoration': 'none'}
		}
	});
	
	$('#photo, #content').mouseover(function() { $('#anc_nav div.anc_nav_div, #nav div.nav_div').removeClass('hover')})
	
	$('div.anc_nav_div').hover(function() {
		$(this).addClass('hover');
	}, function() {
		$(this).removeClass('hover');
	});
	
	$('div.nav_div').hover(function() {
		$(this).addClass('hover');
	}, function() {
		$(this).removeClass('hover');
	});
	
});
