$(document).ready(function(){

	$("#nav_global").superfish({
		delay:0,
		speed:'fast',
		autoArrows:false,
		dropShadows:false
	});

	$('input[type="text"]').clearField();

	$('ul#nav_global li').hover(function(){
		$(this).find('a:first').addClass('hover');
	},
	function(){
		$(this).find('a:first').removeClass('hover');
	});

});

var calibri = {
	src: '/interface/flash/calibri.swf'
	,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.activate(calibri);

sIFR.replace(calibri,{
	selector: 'h1'
	,wmode: 'transparent'
	,css: [
	'.sIFR-root {color:#B3A06F;letter-spacing:-1;leading:-12;}'
	]
});

sIFR.replace(calibri,{
	selector: '#comments h2'
	,wmode: 'transparent'
	,css: [
	'.sIFR-root {color:#B3A06F;letter-spacing:-1;leading:-12;}'
	]
});

sIFR.replace(calibri,{
	selector: '#thanks_message h2'
	,wmode: 'transparent'
	,css: [
	'.sIFR-root {color:#B3A06F;letter-spacing:-1;leading:-12;}'
	]
});

sIFR.replace(calibri,{
	selector: '#main #list_standard h2'
	,wmode: 'transparent'
	,css: [
	'.sIFR-root {color:#B3A06F;letter-spacing:-1;leading:-12;},a{color:#B3A06F;text-decoration:none;},a:hover{color:#ffffff;}'
	]
});

sIFR.replace(calibri,{
	selector: '#contact .col h2'
	,wmode: 'transparent'
	,css: [
	'.sIFR-root {color:#B3A06F;leading:-12;}'
	]
});

sIFR.replace(calibri,{
	selector: '.col h2'
	,wmode: 'transparent'
	,css: [
	'.sIFR-root {color:#AAAAAA;font-weight:bold;leading:-12;}'
	]
});

sIFR.replace(calibri,{
	selector: 'blockquote p.quote'
	,wmode: 'transparent'
	,css: [
	'.sIFR-root {color:#B1A171;font-style:italic;}'
	]
});
sIFR.replace(calibri,{
	selector: 'blockquote .cite'
	,wmode: 'transparent'
	,css: [
	'.sIFR-root {color:#CCCCCC;font-style:italic;}'
	]
});
sIFR.replace(calibri,{
	selector: '#share p'
	,wmode: 'transparent'
	,css: [
	'.sIFR-root {color:#ffffff;text-transform:uppercase;font-weight:bold}'
	]
});

$.fn.clearField = function(){
	return this.focus(function() {
		if( this.value == this.defaultValue){
			this.value = "";
		}
	}).blur(function(){
		if( !this.value.length){
			this.value = this.defaultValue;
		}
	});
};
