
    /* container for items */
    var items_container = [];
    
    /* show appropriated div */
    var showBox = function(id) {
        for(i=0;items_container.length>i;i++) {
            $('#'+items_container[i]).hide();  
        }
        try {
            $('#'+id).show();
        } catch(e) {}
    };
    
    $(function() {
        
        /* carousel: info: http://flowplayer.org/tools/scrollable.html */
        try {
			var carousel = $("div.carousel").scrollable({
				api:        true,
				size:       3, 
				clickable:  false, 
				loop:       true,
				speed:      300, 
				onBeforeSeek: function() { 
					this.getItems().fadeTo(200, 0.2);         
				}, 
				onSeek: function() { 
					this.getItems().fadeTo(200, 1); 
				} 
			});
		} catch(err) {}
		
        try {
			var carousel = $("div.carousel-js").scrollable({
				api:        true,
				size:       3, 
				clickable:  false, 
				loop:       true,
				speed:      300, 
				onBeforeSeek: function() { 
					this.getItems().fadeTo(200, 0.2);         
				}, 
				onSeek: function() { 
					this.getItems().fadeTo(200, 1); 
				} 
			});
		} catch(err) {}
		
        /* random camapaign image */
		try{
		$.create('img', {
		    'src': "http://www.lichtzeichen.de/fileadmin/templates/gfx/cmp/cmp-" + Math.floor ( Math.random ( ) * 4 + 1 ) + ".jpg",
		    'style': 'position: absolute; left: 943px; top: 80px;',
		    'alt': 'kampangen Image',
		}).appendTo($('body'));
		} catch(e) {}


        
        /* hide all items */
        try{
            for(i=0;items_container.length>i;i++) {
                $('#'+items_container[i]).hide();  
            }
        } catch(e) {}
        
        /* show div by hash */
        try{
            if( window.location.hash.substring(1) != 0 ) {
                try {
                    $('#'+window.location.hash.substring(1)).show();
                    window.scrollTo(0,0);
                    carousel.move(window.location.hash.substring(9));
                } catch(err) {}
            }
        } catch(e) {}

    });
