jQuery.noConflict();
jQuery(document).ready(function($){
    $('ul.sf-menu').superfish();	
    
    $('a[@rel*=lightbox]').lightBox({
			imageLoading:			'/fileadmin/layout/default/img/lightbox/lightbox-ico-loading.gif',		// (string) Path and the name of the loading icon
			imageBtnPrev:			'/fileadmin/layout/default/img/lightbox/lightbox-btn-prev.gif',			// (string) Path and the name of the prev button image
			imageBtnNext:			'/fileadmin/layout/default/img/lightbox/lightbox-btn-next.gif',			// (string) Path and the name of the next button image
			imageBtnClose:			'/fileadmin/layout/default/img/lightbox/lightbox-btn-close.gif',		// (string) Path and the name of the close btn
			imageBlank:				'/fileadmin/layout/default/img/lightbox/lightbox-blank.gif'			// (string) Path and the name of a blank image (one pixel)        
    });
    
    $("div.csc-textpic-imagewrap").before('<img src="/fileadmin/layout/default/img/cms/text-image-header.gif" />');
    $("div.csc-textpic-imagewrap").after('<img src="/fileadmin/layout/default/img/cms/text-image-footer.gif" />');
    
    // get all a.anchor into array, iterate, and create linked li elemnents to the page. Append these to the ul#gallery-index - dynamic li
    var anchors = $('a.anchor');
    var max = anchors.length;
    var galleryIndex = $('ul#gallery-index');
    for (i=0;i< max; i++ ) {
        galleryIndex.append('<li><a href="' + this.location.pathname + '#' + anchors[i].id + '">' + anchors[i].title + '</a></li>');
    }
    
    $("#ttNews-latestTicker").simpleTicker();
});