        var slidesFolder="/css/images/slideshow/";
        var slideImgs=new Array("city-image-1.jpg",
                                "city-image-2.jpg",
                                "city-image-3.jpg",
                                "city-image-4.jpg");
        var slideLabels=new Array("<a href='/hotels/washington/united-states/dc/'>Washington</a>",
                                  "<a href='/hotels/new-york/united-states/new-york/'>New York</a>",
                                  "<a href='/hotels/london/united-kingdom/'>London</a>",
                                  "<a href='/hotels/niagara-falls/canada/ontario/'>Niagara Falls</a>");
        var slideIndex=0;
        var slideHolder="#city-image";
        var waitTime=7000;
        var timer;
        
        function initTimer(){
            //alert("Start: "+timer);
            stopTimer();
            timer=setTimeout ( 'nextImg()', waitTime);
             
        }
        function stopTimer(){
            //alert("Stop: "+timer);
            clearTimeout(timer);
        } 
        
        function nextImg(){
            $(slideHolder+" img:eq("+slideIndex+")").fadeOut(1000);
            hideLabel();
            slideIndex++;
            if(slideIndex>=slideImgs.length){
                slideIndex=0;
            }
            $(slideHolder+" img:eq("+slideIndex+")").fadeIn(1500, function(){
                setLabel();
                initTimer();
            });
            
           
            if($(slideHolder+" > img").size()<=slideImgs.length){
                var slideImg='<img src="'+slidesFolder+slideImgs[(slideIndex+1)]+'" width="695" height="220" alt="Hotels in best cities worldwide. Top hotels in US and any other coutnry." style="display:none;" />';
                $(slideHolder).append(slideImg);
            }
        }
        function hideLabel(){
            $("#slide-label").fadeOut(100);
            $("#slide-label-shadow").fadeOut(100);
        }
        
        function setLabel(){
            $("#slide-label").html("<span>"+slideLabels[slideIndex]+"<span>►</span></span>");
            $("#slide-label-shadow").html("<span>"+slideLabels[slideIndex]+"<span>►</span></span>");
            $("#slide-label").fadeIn(500);
            $("#slide-label-shadow").fadeIn(500,function(){ $("#slide-label-shadow").css("opacity", "0.6"); });
        }
        
        $(document).ready(function(){
            
            document.getElementById('main-nav-tab-1').className="active";   //activate home tab
            
            $( ".accordion" ).accordion({
                autoHeight: false,
                header:"h2"
            });
            //$( "#left-column .accordion" ).accordion( "option", "active", 2 ); 
            //$( "#right-column .accordion" ).accordion( "option", "active", 2 );
            
            // load second img //
            var slideImg='<img src="'+slidesFolder+slideImgs[(slideIndex+1)]+'" width="695" height="220" alt="Hotels in best cities worldwide. Top hotels in US and any other coutnry." style="display:none;"/>';
            $(slideHolder).append(slideImg);
            // --------------- //
            setLabel();
            initTimer();

        });
