/*******************************************************************************

  CSS on Sails Framework
  Title: Enrisol
  Author: XHTMLized (http://www.xhtmlized.com/)
  Date: December 2010

*******************************************************************************/

$(document).ready(function() {

	//
	$('input[type="text"]').each(function() {
		var defaultValue = this.value;
		$(this).focus(function() {
			if(this.value == defaultValue) {
				this.value = '';
			}
		});
		$(this).blur(function() {
			if(this.value == '') {
				this.value = defaultValue;
			}
		});
	});

	//
	Cufon.replace('#navigation > li > a', { fontFamily: 'Eurostile', hover: true });
	Cufon.replace('.contact2 strong', { fontFamily: 'Eurostile' });
	Cufon.replace('#footer form h3', { fontFamily: 'Eurostile' });
	Cufon.replace('#content h3', { fontFamily: 'Eurostile' });
	Cufon.replace('#header h2', { fontFamily: 'Eurostile', textShadow: '1px 1px rgba(0, 0, 0, 0.5)' });

	//
	$('#navigation li').has("ul").addClass('sub');

	$('#navigation li ul').hover(
		function() {
		},function() {
			Cufon.replace('#navigation > li.sub > a', { color: '#004c6f' });
		}

	);


	//
	if (($.browser.mozilla)){
		//
		$('html').addClass('firefox');
	}

	//
	if (($.browser.opera)){
		//
		$('html').addClass('opera');
	}

	if (($.browser.msie) && ($.browser.version <= "8.0")){

		// CSS3PIE
		var CSS3PIE_selectors = [
			'#sidebar .menu',
			'#header .contact2 strong',
			'#navigation > li > ul',
			'#navigation > li',
			'.container'
		];
		$( CSS3PIE_selectors.join(',') ).each(function() {
			PIE.attach(this);
		});
	}

	//
	if (($.browser.msie) && ($.browser.version == "8.0")){
		//
		$('html').addClass('ie8');
	}

	//
	if (($.browser.msie) && ($.browser.version == "7.0")){
		//
		$('html').addClass('ie7');
	}

});

$(window).load(function() {
});
