jQuery.noConflict();

var menState = false;

jQuery(document).ready(function(){

	// calendar
	jQuery('#nq_root ul.calendar-list').newsticker(6000);
	jQuery('#intern_welcome ul.calendar-list').newsticker(6000);

	jQuery('.mainmenu li ul').css('display','none');
		jQuery('.mainmenu li span').hover(
			function() {
				if(!jQuery(this).parent().hasClass('jqact')) {
					jQuery(this).children('ul').fadeIn(500); 
					jQuery(this).parent().addClass('jqact');
				}
			},
			function() {
				if(jQuery(this).parent().hasClass('jqact')) {
					jQuery(this).children('ul').fadeOut(200);
					jQuery(this).parent().removeClass('jqact');
				}
			});

	// autoselect blog category
	jQuery('.tx-newsfeedit-pi1-form-row-category  select option:first').attr('selected','selected');



var decoded = decHTMLifEnc(jQuery(".tx-newsfeedit-pi1-preview-value-bodytext input").attr("value"));  jQuery(".tx-newsfeedit-pi1-preview-value-bodytext input").attr("value", decoded);

function isEncHTML(str) {

if(str.search(/&amp;/g) != -1 || str.search(/&lt;/g) != -1 || str.search(/&gt;/g) != -1)

    return true;
  else
    return false;
}

function decHTMLifEnc(str){
    if(isEncHTML(str))

return str.replace(/&amp;/g, '&').replace(/&lt;/g, '<').replace(/&gt;/g, '>');

    return str;
}

});

