function addItemToBasket(itemid, currentCount, obj)
{
if (!document.forms[0]) return;
var tmp = obj;
var count = null;
while (tmp.previousSibling)
{
tmp = tmp.previousSibling;
if (tmp.nodeName == "INPUT" && parseInt(tmp.value, 10) != NaN && tmp.value > 0)
{
count = parseInt(tmp.value);
break;
}
}
// if (count == null) { alert("Bitte geben Sie eine g\xFCltige Anzahl an."); return; }
obj.disabled = true;
var field = document.createElement("input");
field.type = "hidden";
field.id = "additem" + itemid;
field.name = "additem" + itemid;
field.value = count + currentCount;
document.forms[0].appendChild(field);
document.forms[0].submit();
}

/* FLV Player */
jQuery(document).ready(function() {
var imageArray = jQuery(".contentpane a[href$='.flv']");
var i=0;
jQuery.each(imageArray, function() {
    var href = jQuery(this).attr("href");
    var title = jQuery(this).attr("title");
    var  text= jQuery(this).text();

    jQuery(this).attr("title", title);
    jQuery(this).attr("href", "PortalData/1/Resources/player.swf?width=470&amp;height=320&backcolor=#0D2A66&autostart=true&screencolor=#FFFFFF&frontcolor=#FFFFFF&lightcolor=#EC7C16&controlbar=over&file="+href);
    jQuery(this).attr("rel", "prettyPhoto"+i+"");
    i++;
});
jQuery("a[rel^='prettyPhoto']").prettyPhoto({ theme: 'light_square' });

});

jQuery(function() {
        jQuery('.downloadlink').hover(
            function() {
		var downloadA = jQuery(this).children('a');
		var imgsrc = jQuery(downloadA).children('img').attr('src');
		jQuery(downloadA).children('img').attr(
			'src',
			imgsrc.replace( /\.gif$/, '_over.gif' )
		);
            },
            function() {
		var downloadA = jQuery(this).children('a');
		var imgsrc = jQuery(downloadA).children('img').attr('src');
		jQuery(downloadA).children('img').attr(
			'src',
			imgsrc.replace( /_over\.gif$/, '.gif' )
		);
            }
        );
    }); 
	
	jQuery(document).ready(function() {


var el = jQuery(".homepage-column").html();
if (el <= 0) {
var el2 = jQuery(".homepage-column").attr("id");
jQuery("#"+el2).attr({style:'display:none'});
return(false);
}
});
