$(function (){
	
	// INPUT PLACEHOLDER
	$('input[type=text].placeholder')
	.focus(function(){ 
		if($(this).val() == $(this).attr('title'))
		{
			$(this).val('').removeClass("placeholder");
		}
	})
	.blur(function(){
		if($(this).val() == '')
		{
			$(this).val($(this).attr('title')).addClass("placeholder");
		} 
	})
	.trigger('blur');
	
	// if IE6: PNG fix
	if($.fn.pngFix) {
		$('.illustration').pngFix({ blankgif:'layout/blank.gif' });
	}
	
});



$(document).ready(function() {

	var heightFlash = 0;
	var heightFlashMiddle = 0;
	if($('#flash-header').height() > 0)
		heightFlash = $('#flash-header').height();
		
	if (heightFlash > 0)
		heightFlashMiddle = heightFlash - 44;


	// Content background image scaling
	if($('#navcontent').length > 0) {
		var height = $('#main').height()-80 + heightFlash;
		//$('#navcontent').attr('style', 'height:'+height+'px');
	}
	
	// Content background image scaling
	
	if ($('#main-content').length > 0) {
		var contentHeight= $('#main-content').height();

		//window.console.log(contentHeight);

		if (contentHeight < 551) {
			contentHeight = 551;
			if ($('#main-content').length > 0) {
				$('#main-content').attr('style', 'height:'+(contentHeight)+'px');
			}
		}
		
		if($('#navcontent').length > 0) {
			$('#navcontent').attr('style', 'height:'+(contentHeight+57)+'px');
		}
		
	}
	
	if($('div.content').length > 0) {
		var height = $('#main').height()-140 - heightFlashMiddle;
		//$('div.content').attr('style', 'height:'+height+'px');
	}
	
}); 
