$j = jQuery.noConflict();
var animated = false;

function removeDefault(el) {
	if((!el.rel || el.value == el.rel) && (el.type == "text" || el.type == "")) {     el.rel = el.value;
		el.value = '';
		var elName = el.id;
		el.onblur = function () { if(!el.value) {addDefault(elName);}}
		return true;
	}
}
function addDefault(elName) {
	var el = document.getElementById(elName);
	el.value = el.rel;
}


$j(window).load(function(){
	document.getElementById('citil-citil').onclick = function () { removeDefault(this); }
	
	try {
	  document.execCommand("BackgroundImageCache", false, true);
	} catch(err) {}

	$j(window).resize(resize_background);

	try
	{
		var g = $j('.hangglider');
		if (g)
		{
			g.mouseover(function(){
				try
				{
					if (!animated)
					{
						animated = true;
						g.animate( {left: '-1000px'}, {queue: false, duration: 15000})
							.animate( {top: '-30px'}, 2000)
							.animate( {top: '50px'}, 4000)
							.animate( {top: '-15px'}, 3000)
							.animate( {top: '-5px'}, 1000)
							.animate( {top: '-5px'}, 3000)
							.animate( {top: '-20px'}, 2000);
					}

				}
				catch(err) {alert(err);}
			})
		}
	} catch(err) {alert(err);}


});

$j(window).resize(resize_background);

function resize_background()
{
	var winWidth = $j(window).width();

	if (winWidth < 950)
		$j('body').css('width', '950px');
	else
		$j('body').css('width', '');
}