jQuery(document).ready(function(){

jQuery('#ext-gen28').live('click',function() {
jQuery('.x-combo-list-item').each(function(i) {
var qtip = jQuery(this).attr("ext:qtip")
switch (qtip) {
 case "h1":
jQuery(this).text('Ueberschrift 1');
break;
case "h2":
jQuery(this).text('Ueberschrift 2');
break;
case "h3":
jQuery(this).text('Ueberschrift 3');
break;
}
});

});


jQuery('.x-combo-list-item').each(function(i) {
var qtip = jQuery(this).attr("ext:qtip")
switch (qtip) {
 case "h1":
jQuery(this).text('Überschrift 1');
break;
case "h2":
jQuery(this).text('Überschrift 2');
break;
case "h3":
jQuery(this).text('Überschrift 3');
break;
}
});


// ### was ###
jQuery("#Content_Right").children(".tx-timtabtwitter-pi1").children(".entry").css("display","none");

jQuery("#Content_Right").children(".tx-timtabtwitter-pi1").click(function(){
  jQuery(this).children(".entry").slideToggle('normal');
});


// ### was Nr2 ###
jQuery("#Content_Right").children(".tx-wttwitter-pi1").children("#wt_twitter_newsticker").css("display","none");

jQuery("#Content_Right").children(".tx-wttwitter-pi1").click(function(){
  jQuery(this).children("#wt_twitter_newsticker").slideToggle('normal');
});

// ### was Nr3 Einbindung als HTML ###
jQuery("#Content_Right").children("#widgetbox_widget_parent_0").children("#widgetbox_widget_div_0").css("display","none");

jQuery("#Content_Right").children("#widgetbox_widget_parent_0").click(function(){
  jQuery(this).children("#widgetbox_widget_div_0").slideToggle('normal');
});


// ### wann ###
jQuery(".tx-evcal-pi1").children(".hidemecal").css("display","none");

jQuery(".tx-evcal-pi1").click(function(){
  jQuery(this).children(".hidemecal").slideToggle('normal');
});

// ### wann Nr2 ###
/*
jQuery(".tx-evcal-pi1").children(".tx-evcal-pi1").css("display","none");

jQuery(".tx-evcal-pi1").click(function(){
  jQuery(this).children(".tx-evcal-pi1").slideToggle('normal');
});
*/

// ### w0 ###
jQuery(".wokartekomplett").children(".wokarte").css("display","none");

jQuery(".wokartekomplett").click(function(){
  jQuery(this).children(".wokarte").slideToggle('normal');
});


// ### quicknav ###
jQuery("#Quick_Nav").children("ul").css("display","none");

jQuery("#Quick_Nav").click(function(){
  jQuery(this).children("ul").slideToggle('normal');
});


// RP 
jQuery("#newscat").change(function(){
  var catid = jQuery("#newscat :selected").val();
  if (catid != "") {
    jQuery.ajax({
type: "POST",
timeout: 7000,
data: {
  catid :catid
  },
url: "typo3conf/ext/jss/res/subcategories.php",
success: function(result) {
	
	jQuery("#keywordselect").html(result);
	}
});
} else {
jQuery("#keywordselect").html("Bitte Newskategorie ausw&auml;hlen");

}
});							



});

function deleteFile(type,pos,nid,fid) {
check = confirm("Wollen Sie die Datei wirklich loeschen?");
if (check) {
jQuery.ajax({
type: "POST",
timeout: 7000,
data: {
  type:type,pos :pos,nid:nid,fid:fid
  },
url: "typo3conf/ext/jss/res/deletefiles.php",
success: function(result) {
	
	jQuery("#" + type + pos).html(result);

	}
});
}

}

function deletePic(id) {
check = confirm("Wollen Sie die Datei wirklich loeschen?");
if (check) {
jQuery.ajax({
type: "POST",
timeout: 7000,
data: {
  id:id
  },
url: "typo3conf/ext/jss/res/deletepic.php",
success: function(result) {
	
	jQuery("#pic1").html(result);

	}
});
}

}

