function getQueryVariable (variable) { 
	var query = window.location.search.substring(1); 
	var vars = query.split("&"); 
	for (var i=0;i<vars.length;i++) { 
		var pair = vars[i].split("="); 
		if (pair[0] == variable) { 
			return pair[1]; 
		} 
	}
	//alert('Query Variable ' + variable + ' not found'); 
}

function sliderAfter() {
	void(0);
}

$(document).ready(function() {
	imgFix = '.hb_c_tl, .hb_c_tr, .hb_c_bl, .hb_c_br';
	$('#stoerer, div.hb_wrap, div#content_wrap').pngFix();
	
	$('ul#menu li:last').css('border-width','0');
	
	if ($('.tx-lcbproducts-pi1').html() == null || $('.tx-lcbstandorte-pi1').html() == null) {
		//$('#content_scrollwrap').jScrollPane({showArrows:true});
	}
	if ($('.tx-lcbstandorte-pi1').html() != null) {
		$('#scroll-content').jScrollPane({showArrows:true});
	}
	if ($('.tx-lcbjobs-pi1').html() != null) {
		$('#scroll-content').jScrollPane({showArrows:true});
	}
		$('#scroll-content').jScrollPane({showArrows:true});
	
	$('#menu li').hover(
		function() {
			$(this).find('dd').css('display','block');
		},
		function() {
			$(this).find('dd').css('display','none');
		}
	);
	
	if ($('.tx-lcbproducts-pi1-listrow').html() != null) {
		$('#bg_pic').html('');
			$('.tx-lcbproducts-pi1-listrow').jcarousel({scroll:4,animation:1200});
		if ((showUid = getQueryVariable('tx_lcbproducts_pi1[showUid]')) != null) {
			getIndex = $('li[id=prodListItem'+showUid+']').attr('jcarouselindex');
			if (getIndex > 5) {
				$('.tx-lcbproducts-pi1-listrow').jcarousel({scroll:4,animation:1200,start:getIndex});
			} else {
				$('.tx-lcbproducts-pi1-listrow').jcarousel({scroll:4,animation:1200});
			}
		} else {
			$('.tx-lcbproducts-pi1-listrow').jcarousel({scroll:4,animation:1200});
		}
	}
	
	
//alert(getQueryVariable('tx_lcbstandorte_pi1[showUid]'));

	if (getQueryVariable('tx_lcbstandorte_pi1[showUid]') != null) {
		$('#bg_pic img').attr('src','typo3conf/ext/lcbstandorte/pi1/List_BG.jpg');
	}

	if (getQueryVariable('tx_lcbjobs_pi1[showUid]') != null) {
		$('#bg_pic img').attr('src','typo3conf/ext/lcbjobs/pi1/List_BG.jpg');
	}

	$('.tx-lcbstandorte-pi1 #imagebox img:last, #xtra img:last').css('border-width','0');

});