function csstween(jqueryPath, prop, value, conf) {
	var ele = jQuery(jqueryPath)
	if(!ele) {
		return
	}
	conf = (!conf) ? {time:2} : conf
	conf.endValue = value
var s
var ou
if(conf.onUpdate)
	ou = conf.onUpdate

	conf.onUpdate = function(e) {
			ele.css(prop, this.target.endValue)
			if(ou) {
				ou(this)
			}
	}
	var ev = (!ele.css(prop)) ? 0 : ele.css(prop)
	JSTweener.addTween({endValue:ev}, conf)
}
function showColumn(path, conf) {
	conf = !conf ? {} : conf
	opt = {time:.6, transition: 'easeInQuart'}
	if(conf.delay)
		opt.delay = conf.delay
	if(conf.time)
		opt.time = conf.time
	if(conf.transition)
		opt.time = conf.transition

	var ele = jQuery(path)
	var orgHeight = ele.height()
	ele.css('overflow','hidden')
	ele.css('height','0px')
	ele.show()
	csstween(path, 'height', orgHeight, opt)
}

var orgMargHeight = 0
var orgTextHeight = 0

function hideMarginalColumn(path) {

	jQuery(path).prepend('<div class="maske"></div>')
	jQuery(path).children().not('.maske').appendTo(path+' .maske')
	var orgH = jQuery(path+' .maske').height()
	jQuery(path+' .maske').css('height',0)
	return orgH
}

/** **/
function showMarginalColumn(path, height, conf) {
	conf = (!conf) ? {} : conf
	var opt = {time:1.6, delay:1.2, transition: 'easeOutExpo', onComplete:function(){}}
	for(var key in opt) {
		if(conf[key]) {
			opt[key] = conf[key]
		}
	}
	csstween(path+' .maske', 'height', height, opt)
}

jQuery(document).ready(function() {

return;

//		jz('#main-menu ul li.submenu').hide()
	//	var e=jQuery('.middle .csi-textpic .csi-text').transbg({alpha:.2, background: "#FFFFFF"})
		//e.clone().hide()
//		e = jQuery('#leftColumn').transbg({alpha:.3, background: "#FFFFFF"})

//		$('#main-menu ul li.submenu').show()
		//e = $('.extra :not(.transbg-emptybox) .text').transbg({alpha:.3, background: "#FFFFFF"})

		//jQuery('.transbg-emptybox').ready(function() {
//	$('.extra .teaser .text').transbg({alpha:.8, background: "#FFFFFF"})


//		jQuery('#rightColumn .transbg-clone').css('overflow','hidden')

//jQuery('#rightColumn .transbg-').children().opacity(0)

	function initEle(path, tweenConf) {
		var ele = jQuery(path)
		if(!ele.get(0))
			return
		var eleHeight =ele.height()
		var pad = [
			Number(ele.css('paddingLeft').replace('px','')),
			Number(ele.css('paddingTop').replace('px','')),
			Number(ele.css('paddingRight').replace('px','')),
			Number(ele.css('paddingBottom').replace('px',''))
			]
		eleHeight += pad[1] + pad[3]

		var oldy = 0

		if(ele.css('margin-top'))
			oldy = ele.css('margin-top').replace('px','')

		ele.css('margin-top', -eleHeight)
		csstween(path, 'marginTop',oldy, tweenConf)
	}
	//
	//	Texte verstecken
	//
	jQuery('#rightColumn .csi-text p').css('opacity',0)
	jQuery('#rightColumn .text p').css('opacity',0)

	jQuery('#rightColumn').css('overflow','hidden')

 	initEle('#rightColumn .csi-imagewrap', {transition:'easeOutQuad', time:.6,delay:.5})
 	initEle('#rightColumn .csi-text', {transition:'easeOutQuad',delay:.4,time:.8})
 	initEle('#rightColumn .text', {transition:'easeOutQuad',delay:.4,time:.8})

 	initEle('#rightColumn .extra .teaser', {transition:'easeOutQuad',delay:.4,time:.8})
//initEle('#rightColumn .content .text:eq(0)', {transition:'easeOutQuad',delay:.9,time:.2})
// 	initEle('#rightColumn .extra .text:eq(0)', {transition:'easeOutQuad',delay:.9,time:.2})
// 	initEle('#rightColumn .extra .text:eq(1)', {transition:'easeOutQuad',delay:1.2,time:.4})

	csstween('#rightColumn .csi-text p', 'opacity', 1, {transition:'easeOutExpo',delay:1.1,time:.6})
	csstween('#rightColumn .text p', 'opacity', 1, {transition:'easeOutExpo',delay:1.3,time:.6})

/*
 var pathEle = '#rightColumn .csi-text'
 var ele = jQuery(pathEle)
		ele.css('overflow','hidden')
		ele.css('height','1')
		ele.css('paddingTop','1')
		ele.css('paddingBottom','1')


		csstween(pathEle, 'height', orgHeight+pad[1]+pad[3], {delay:.5, time:2})
 */
		/*
		csstween('#rightColumn .transbg-clone', 'paddingTop', pad[1], {delay:.5, time:2})
		csstween('#rightColumn .transbg-clone', 'paddingBottom', pad[3], {delay:.5, time:2})

		csstween('#rightColumn .transbg-clone', 'height', orgHeight, {delay:.5, time:2, onComplete:function() {
			csstween('#rightColumn .transbg-clone *', 'opacity', 1, {delay:0})
		}})
		*/
//		csstween('#rightColumn .csi-text', 'paddingBottom', pad[3])

//		jQuery('#rightColumn .transbg-clone').css('height','0')
//		jQuery('#rightColumn .middle').css('width',1)
		//jQuery('#rightColumn .middle').css('height',1)

//JSTweener.addTween(eleLogo.style, {height: logoHeight, opacity: 1, time: .8, delay: .5, transition: 'easeOutCubic'})

});