function css() {



	$('input[type=text]').clear();
	/*
	Cufon.replace('#lang-mod a, #nav li:not(.act) a, .side-btn', {
		fontFamily: 'Arial',
		hoverable: { a: true },
		hover: true
	});
	Cufon.replace('#nav .act a', {
		fontFamily: 'Arial bold',
		hover: true
	});
	Cufon.replace('#breadcrumbs a, #footer h5', {
		fontFamily: 'Verdana',
		hover: true
	});
	Cufon.replace('#content h1, #content h2, #content h3, #side-bar-1 h4', {
		fontFamily: 'Georgia it',
		hover: true
	});
	*/
	Cufon.replace('#enter-mod em, #enter-mod strong', {
		fontFamily: 'Museo 500',
		hover: true
	});

	$('.link-fb').fancybox({
		padding				:	5,
		overlayOpacity		:	0.85,
		overlayColor		:	'#000',
		titleShow			: 	false,
		onComplete			: function(){
		/*
			Cufon.replace('.frm h2', {
				fontFamily: 'Georgia it',
				hover: true
			});
			Cufon.replace('.frm label, .frm strong', {
				fontFamily: 'Arial',
				hover: true
			});
		*/
		}
	});

//	$('#footer').wrap('<div id="footer-wrap"></div>');
	$('#news-mod .i, .gallery-mod  .i, #top-img-mod').append('<span></span>');

//	if($('.mod-menu li').size() > 8){
//		$('.mod-menu').append('<ul></ul>');
//		$('.mod-menu ul').each(function(i){ $(this).addClass('menu'+i) });
//		$('.mod-menu ul.menu0 li:gt(7)').appendTo('.menu1')
//	}
}

function ie() {
	/* go on for IE in generall */
	if($.browser.msie){


		$('div:last-child, span:last-child, li:last-child, td:last-child').addClass('last-child');

		if($.browser.version <= 7) {
			$('hr').wrap('<span class="hr"></span>').hide();

			$('input[type=submit]').wrap('<span class="submit"></span>');
			$('input[type=reset]').wrap('<span class="reset"></span>');


		}
		/* take care IE 6 only */
		if($.browser.version <= 6) {

			$(window).resize(function (){
				w = $('body').width();
				if(w<980)
					$('#footer-wrap').css('width','980px');
				else
					$('#footer-wrap').css('width','auto');
			});


			$('div:first-child, span:first-child, li:first-child, td:first-child').addClass('first-child');

			$('input').each(function(){
				t = $(this).attr('type');
				$(this).addClass(t);
			});
			$('body, li[lang]').each(function(){
				t = $(this).attr('lang');
				$(this).addClass(t);
			});

			$('input.submit').hover(function(){ $(this).addClass('submit-hover'); }, function(){ $(this).removeClass('submit-hover'); });
			$('input.reset').hover(function(){ $(this).addClass('reset-hover'); }, function(){ $(this).removeClass('reset-hover'); });

			$('img,span,a:not(.side-btn,.link-apply,.link-fail)').css('behavior','url(js/iepngfix.htc)');
		}

	}

}

$(document).ready(css);
$(document).ready(ie);


$.fn.clear = function(){
	return this.each(function(i){
		var val;

		$(this).focus(function(){
			val = $(this).val();
			$(this).attr('rel',val)
			$(this).val('');
		}); // focus

		$(this).blur(function(){
			val = $(this).attr('rel');
			if($(this).val() == ''){
				$(this).removeAttr('rel');
				$(this).val(val);
			}
		});	// blur

	}); // each
};


$.fn.fiximage = function() {

	return this.each(function(i){

		fi_src = $(this).attr('src');
		fi_src = fi_src.replace('.png','.gif');
		$(this).attr('src',fi_src);
	}); // each
}
