         
         $(document).ready(function() { 
         //slideShow begins
        $('#slideshowHolder').css('position', 'relative');
        var childs = $('#slideshowHolder > div.image');
        var first = $('#slideshowHolder > div.image:first-child');
        childs.css('display', 'none');
        childs.css('position', 'absolute');
        childs.css('top', '0');
        childs.css('left', '0');
        first.css('display', 'block');
        
        var menu_items = $('#ms-stage-menu > ul > li');
        menu_items.each(function(i){
            $(this).bind('click', function(){
                rotate(i);
            });
        });
        var interval = setInterval(function(){rotate();},8000);
        
        function rotate(){
            var menu_items = $('#ms-stage-menu > ul > li');
            menu_items.removeClass('sel');
            var index = arguments[0];
            var childs = $('#slideshowHolder > div.image');
            if(typeof(index) != 'undefined'){
                if(typeof(childs[index]) != 'undefined'){
                    clearInterval(interval);
                    childs.each(function(i){
                        if($(this).css('display') != 'none'){
                            //alert(index + ': ' +childs[index]);
                            
                            $(this).fadeOut(1000, function(){
                                $(childs[index]).fadeIn(1000);
                                });
                            $(menu_items[index]).addClass('sel');
                            interval = setInterval(function(){rotate();},8000);
                            return false;
                        }
                    });    
                }
            }else{               
                childs.each(function(i){
                    if($(this).css('display') != 'none'){
                        if(typeof(childs[i + 1]) != 'undefined'){
                            index = i + 1;
                        }else{
                            index = 0;
                        }
                        //alert(index + ': ' +childs[index]);
                        
                        $(this).fadeOut(1000, function(){
                            $(childs[index]).fadeIn(1000);
                            });
                        $(menu_items[index]).addClass('sel');
                        return false;
                    }
                });
            }
            
        }
        // Slideshow ends
        
        // Classes comparison
        
         $("#comp-0").bind('mouseover', function(event){
             if($('#fl-comp').css('display') == 'none'){
                 $('#fl-comp').show('drop',{ direction: "left" },300);
                 $('#fl-comp').html($('#comp-pic-0').html());              
             }
             
             //$('#comp-1').unbind();
         });
         $("#comp-1").bind('mouseover', function(event){
             if($('#fl-comp').css('display') == 'none'){
                 $('#fl-comp').show('drop',{ direction: "left" },300);
                $('#fl-comp').html($('#comp-pic-1').html());
             }
             
             //$('#comp-1').unbind();
         });
         $("#comp-2").bind('mouseover', function(event){
             if($('#fl-comp').css('display') == 'none'){
                 $('#fl-comp').show('drop',{ direction: "left" },300);
                $('#fl-comp').html($('#comp-pic-2').html());             
             }
             
             //$('#comp-1').unbind();
         });
         $('#sec-1 > .floating').bind('mouseout', function(){             
             if($(this).css('left') == '0px' && $(this).css('display') != 'none'){
             $(this).hide('drop',{ direction: "left" },300);             
             }
         });
                
       });
        

