$(document).ready(function(){
	 $(".roundedTop").corner("round top 10px");
	 $(".roundedBottom").corner("round bottom 10px");
	 
	 
	/* Horizontal Seperator for Pressebilder FCE */
	/*if( $('div.pressebilder').length > 0 ) {
		var dmPressCounter = 0;
		$('div.pressebilder').each(function(){
			var dmPressCounter = 0;	
			$(this).find('div.item').each(function(){
				dmPressCounter = dmPressCounter + 1;
				if(dmPressCounter % 4 == 0) {
					$(this).parent().before('<div class="horizontal_row"></div>');
				}
			});
		});
	}*/

	/* Sitemap Enlargement */
	$('div.tx-flseositemap-pi1 ul.deep3').hide().parent().addClass('hasChildren');
	$('div.tx-flseositemap-pi1 li.hasChildren > a').addClass('showBorder');
	$('div.tx-flseositemap-pi1 li.hasChildren').each(function(){
		$(this).append('<a href="#" class="expand">+</a>');
	});
	$('div.tx-flseositemap-pi1 li.hasChildren a.expand').live('click', function(){
		$(this).text('–');
		$(this).removeClass('expand').addClass('collapse');
		$(this).prev().show();
		return false;
	});
	$('div.tx-flseositemap-pi1 li.hasChildren a.collapse').live('click', function(){
		$(this).text('+');
		$(this).removeClass('collapse').addClass('expand');
		$(this).prev().hide();
		return false;
	});
});
$(document).ready(function(){
	 try{
		if($('#tx-indexedsearch-searchbox-sword-x').eq(0).val() == ""){			
			$('#tx-indexedsearch-searchbox-sword-x').eq(0).val("Suche");
		}		
		$('#tx-indexedsearch-searchbox-sword-x').eq(0).focus(
			function(){
				if($('#tx-indexedsearch-searchbox-sword-x').eq(0).val() == "Suche"){	
					$('#tx-indexedsearch-searchbox-sword-x').val('');
				}
			}
		);
		$('#tx-indexedsearch-searchbox-sword-x').eq(0).blur(
			function(){
				if($('#tx-indexedsearch-searchbox-sword-x').eq(0).val() == ""){
					$('#tx-indexedsearch-searchbox-sword-x').eq(0).val("Suche");
				}
			}
		);
		$('#tx_indexedsearch_x .submitbutton').click(function(){
			if($('#tx-indexedsearch-searchbox-sword-x').eq(0).val() == "Suche"){	
				$('#tx-indexedsearch-searchbox-sword-x').val(' ');
			}
			return true;
		});
	} catch(e){
		//console.log(e);
	}
	

});



$(document).ready(function(){
	if($('#uid34_0').attr('checked') == 1) {
		$('#fieldid_35').show();
	}
	
	$('#uid34_0').click(function(){
		if( $(this).attr('checked') == 1 ) {
			$('#fieldid_35').show();
		}
	});
		
	$('#uid34_1').click(function(){
			$('#fieldid_35').hide();
			$('#fieldid_35 input').attr('checked', 0);
	});

});



//eine fuktion, die dem seite drucken button die nötigen parameter gibt...

$(document).ready(function(){
	strGET=document.location.search.substr(1,document.location.search.length);
	if(strGET!='')
    	{
        	//Printbutton wird dynamisch nachgebaut
       		var addParams = '&print=1&no_cache=1';
       		var nURL = window.location.protocol + '//' + window.location.host + window.location.pathname + window.location.search + addParams;
       		
        	var newPrint = $('<a />').attr({href:nURL}).text($('#print').text()).insertAfter('#print');
        	$('#print').remove();
        	
        	$(newPrint).attr('id', 'print'); // Nur nötig für CSS Klassen ggf.

        	$(newPrint).click(function(){
        		vHWin=window.open(nURL,'FEopenLink','status=0,menubar=0,scrollbars=1,location=0,toolbar=0,width=710,height=600');
        		vHWin.focus();
        		return false;
        	});
    	}
});















