if($cufon_active == 1){
	/* begin cufon replacer */
	Cufon.replace('h1, h2, h3, h4, h5, h6, .custom_title, .firstLetter span, .slider_text_more');
	Cufon.replace('.intro_text, .intro_image', { textShadow: '1px 1px #fff'});
	Cufon.replace('.page_top_title, .page_top_desc', { textShadow: '1px 1px #444'});
	/* end cufon replacer */
}

$(document).ready(function() {

	if ($('#langChooser ul li.active')) {
		$("#langChooser ul li:not(.active)").hide();
	}

	$("#langChooser ul").hover(
		function () {
			var cssObj = {
				'z-index' : '999'
			}
			$('#langChooser ul li.active a').addClass('sHover');

			$("#langChooser ul").css(cssObj);

			$("#langChooser ul li").slideDown(500); 
		}, function () {
			$("#langChooser ul li:gt(0)").hide();
			$('#langChooser ul li.active a').removeClass('sHover');
		}
	);

	if ($('#langChooser ul li.active')) {

		$('#langChooser ul li.en').removeClass('first');

		$('#langChooser ul li.active').prependTo('#langChooser ul'); // make active first
  
		$('#langChooser ul li.active').addClass('first');

		$("#langChooser ul li:last-child").addClass('last');
	}

        // Footer

	if ($('#langChooser_footer ul li.active')) {
		$("#langChooser_footer ul li:not(.active)").hide();
	}

	$("#langChooser_footer ul").hover(
		function () {
			var cssObj = {
				'z-index' : '999'
			}
			$('#langChooser_footer ul li.active a').addClass('sHover');

			$("#langChooser_footer ul").css(cssObj);

			$("#langChooser_footer ul li").slideDown(500); 
		}, function () {
			$("#langChooser_footer ul li:gt(0)").hide();
			$('#langChooser_footer ul li.active a').removeClass('sHover');
		}
	);

	if ($('#langChooser_footer ul li.active')) {

		$('#langChooser_footer ul li.en').removeClass('first');

		$('#langChooser_footer ul li.active').prependTo('#langChooser_footer ul'); // make active first
  
		$('#langChooser_footer ul li.active').addClass('first');

		$("#langChooser_footer ul li:last-child").addClass('last');
	}

});

function tweetpopup( url ) {
	window.open( url, "tweet", "height=450,width=550,resizable=1" )
}

