
$(document).ready(function() {
	// shows the text area boxes when radio button is selected
	$("div.positioner").css("marginLeft",358 - ($("div.positioner a.button").width()/2) )  ;
	$("#toolbarButton").css("marginLeft",395 - ($("#toolbarButton a.button").width()/2) )  ;
	if ($('#offerDescription').text().length < 124 ) {
		if	($('#offerDescription').text().length > 85 ) {
			$('#offerDescription').addClass('offerDescMedText')
		} else {
			$('#offerDescription').addClass('offerDescLgText')
		}
	}
	// displays the sifr text if flash is installed (needs sifr.js)
//	if(typeof sIFR == "function"){
//		sIFR.replaceElement("#offerDescription", named({sFlashSrc: "/swf/sifr/tradegothic.swf", sColor: "#ffffff", sBgColor:"#ff3300", sFlashVars:"textalign=center", sWmode: "transparent"}));
//	};

	// onShow : display correct translation
	var showTranslation=function(hash){
		hash.w.css('display','block');
		var className = hash.t.className;
		$('div.'+className).show();
	};

	// onClose : hide translation
		var hideTranslation=function(hash){ hash.w.fadeOut('fast',function(){
			var className = hash.t.className;
			$('div.'+className).hide();
			hash.o.remove();
		});
	};

	if ($.fn.jqm) {
		$('#translatedPitch').jqm({onShow: showTranslation, onHide: hideTranslation}).jqmAddTrigger('#countryLinks li');
	}


});
