jQuery(document).ready(function() {

	jQuery("#content .csc-default:first-child").css("border-top", "none");
	
	var myHeight = jQuery(".content_main").height();
	var navHeight = jQuery("#navigation").height();
	
	if (myHeight < navHeight && myHeight != null) {
		jQuery(".content_main").height(navHeight + 10);
		jQuery("#content").height(navHeight - 130);
	}
	
	jQuery("#content .tx-mmforum-pi1-listpost-odd.post:first").addClass('firstpost');
	jQuery("#content .tx-mmforum-pi1-listpost-odd.bottom:first").addClass('firstpost');
	jQuery("#tx-ttproducts-pi1-listcat .tt_products_item_catlist ul li:last").css("border", "none");
	jQuery(".shop-item-border:last").css("border", "none");

	jQuery("#tx-ttproducts-pi1-listoffers div:last").css("border", "none");
	jQuery("#tx-ttproducts-pi1-list div:last").css("border", "none");
	jQuery(".grey_roundcorner div:last-child").css("border", "none");
	
	jQuery(".toBasketBtn").hover(function() {
		this.src = "/fileadmin/template/images/basketBtnHover.gif";
	}, function() {
		this.src = "/fileadmin/template/images/basketBtn.gif";
	});
	
	var xml = "<xml>\n";
	var inputElements = jQuery("input[type='text'], textarea");
	var labelElements = [];
	var label = "";
	for (var i=0; i < inputElements.length; i++) {
		if (inputElements[i].id) {
			xml += "   <node id=" + '"' + inputElements[i].id + '"' + ">";
			label = jQuery("label[for='"+inputElements[i].id+"']");
			if (label.html())
				xml += label.html().replace(/<\/?[^>]+>/gi, '');
			else
				xml += inputElements[i].id;
			
			xml += "</node>\n";
		}
	}
	
	xml += "</xml>";
//	jQuery.post('fileadmin/data/form_element_presets.php', {xml: xml});

});
