	DD_belatedPNG.fix('.pngfix,.tablecontainer');
//	DD_roundies.addRule('.pngfix','0px',true);
//	DD_roundies.addRule('.tablecontainer');
	DD_roundies.addRule('#client_login', '0px 0px 0px 10px', true);
	DD_roundies.addRule('.tablecontainer.round10', '10px', true);

	
	
	
	(function($) {
		$.fn.fullBg = function(){
			var bgImg = $(this);
			
			bgImg.addClass('fullBg');
			
			function resizeImg() {
				var imgwidth = bgImg.width();
				var imgheight = bgImg.height();
				
				var winwidth = $(window).width();
				var winheight = $(window).height();
				
				var widthratio = winwidth / imgwidth;
				var heightratio = winheight / imgheight;
				
				var widthdiff = heightratio * imgwidth;
				var heightdiff = widthratio * imgheight;
			
				if(heightdiff>winheight) {
					bgImg.css({
						width: winwidth+'px',
						height: heightdiff+'px'
					});
				} else {
					bgImg.css({
						width: widthdiff+'px',
						height: winheight+'px'
					});		
				}
			} 
			resizeImg();
			$(window).resize(function() {
				resizeImg();
			}); 
		};
	})(jQuery)
	
	jQuery(function($) {
		$('#contact_us input, #contact_us textarea, #contact_us select, #login_form input').bind('focus',function(){
			$(this).parent().parent().find('p').removeClass('selectedformentry');
			$(this).parent().addClass('selectedformentry');
		}).bind('blur',function(){
			$(this).parent().parent().find('p').removeClass('selectedformentry');
		});
				
		
//		$("#background").fullBg();
		
//		$('#coin-slider').coinslider({
//			width: 960, // width of slider panel
//			height: 410, // height of slider panel
//			spw: 12, // squares per width
//			sph: 6, // squares per height
//			delay: 8000, // delay between images in ms
//			sDelay: 0, // delay beetwen squares in ms
//			opacity: 0.7, // opacity of title and navigation
//			titleSpeed: 500, // speed of title appereance in ms
//			effect: '', // random, swirl, rain, straight
//			navigation: false, // prev next and buttons
//			links : false, // show images as links 
//			hoverPause: false // pause on hover			
//		});
		
		if ($('#login_form input').length) {
			setTimeout("$('#login_form input:nth(0)').focus()",500);
		}
		if ($('#contact_us select').length) {
			setTimeout("$('#contact_us select:nth(0)').focus()",500);
		}
		
	});
	function loadImg(imgname) {
		$('#rearimagecontainer').css('background-image','url(/' + imgname + ')'); 
	};



		//Cufon.replace('#topmenu li a', { hover: true, fontSize:'14px' });
	Cufon.set('fontFamily', 'ErgoeLight').replace('h1');
//	Cufon.set('fontFamily', 'Cantarell').replace('h2');
	Cufon.set('fontFamily', 'Cantarell').replace('#rearimagecontaineroverlay h3');
	Cufon.set('fontFamily', 'Cantarell').replace('#rearimagecontaineroverlay h4');
	Cufon.set('fontFamily', 'Cantarell').replace('#logo');


