// jQuery Variante
jQuery(document).ready(function() {
	
	jQuery('#freePagePosition1 .csc-default').show(1000);
	//jQuery("div#makeMeScrollable").smoothDivScroll({
		//autoScroll: "onstart",
		//autoScrollDirection: "backandforth",
		//autoScrollStep: 1,
		//autoScrollInterval: 15,
		//startAtElementId: "startAtMe",
		//visibleHotSpots: "always"
	//});

	
	/*jQuery("#carousel").simplyScroll({
	});*/
	

    
    
    var ul = jQuery("#carousel");
    var li = ul.children('li');
    
    counter = 0;
    
    li.each(function(i,item) {
        if ($(item).children[0].innerHTML.search(/news_div_selected.+/) != -1) return false; else counter++;
    });
    
    if (counter > 4) {
        current = counter;
        counter -= 3;
        ul.animate( {marginLeft: -1.0*counter*148}, 700);    
	}
    
    jQuery("#carousel").simplecarousel({
		//slidespeed: 700,
		//next: jQuery('.next'),
        //prev: jQuery('.prev'),
		//auto: 1000,
		//width: 118,
		//height: 118
        
        width: 118,
        height: 122,
        next: jQuery('.next'),
        prev: jQuery('.prev'),
        vertical: false,
        auto: false,
        fade: false,
        current: counter,
        items: 0,
        slidespeed: 700,
        visible: 1
        
        
	});
    
	//jQuery('#old-bgimg').fadeOut(1000);
	//jQuery('#bgimg').fadeIn(1000);
    document.getElementById('bgimg').style.display = 'block';
    Effect.Fade('old-bgimg', { duration: 1.0, from: 1, to: 0 });
    Effect.Fade('bgimg', { duration: 1.0, from: 0, to: 1 });
    
	jQuery('.page-position').fadeIn(1500);
    //Effect.Fade('.page-position', { duration: 1.5, from: 0, to: 1 });
    
	//setTimeout("jQuery('#contentWrap').show(750)", 1000);
    setTimeout("Effect.SlideDown('contentWrap', { duration: 0.75, scaleX: true, scaleY: false });",500);
	jQuery('#freePagePosition1').show(750);
    //Effect.SlideDown('freePagePosition1', { duration: 1.0, scaleX: true, scaleY: false });
	
});

// mootools Variante
//page.headerData = COA
//page.headerData.11 = TEXT
//page.headerData.11.value = <script src="fileadmin/default/templates/js/mootools/mootools-core-1.3-full-compat.js" type="text/javascript"></script>
/*window.addEvent('domready', function(){
	new Fx.Morph('old-bgimg', {duration:750}).start({'opacity':0});
	new Fx.Morph('bgimg', {duration:750}).start({'opacity':1});
});*/
