//When the DOM tree is loaded
$(document).ready(function() {

    $('#gruppo_toggle').toggle(function(){
        //mouse over
            $('.slider').animate({"top" :"0"}, 1000);
        }, function(){
        //mouse out
            $('.slider').animate({"top" :"-185px"}, 1000);
    });
    
    $('<img alt="" src="/assets/images/white.jpg">').appendTo('.wolfsberg-questionnaire #leftcol');
    
    /*************************************/
    /***********HOME SLIDER START*********/
    /*************************************/
    
    $('.index-slider .slide-mover').animate({"left" :"183px"}, 1500);
    $('.arrow-slider').addClass('slider-active');
    
    $('.arrow-slider').toggle(function(){
        //mouse over
            
            $('.slide-mover').animate({"left" :"-380px"}, 1500, function(){$('.arrow-slider').removeClass('slider-active');});
        }, function(){
        //mouse out
            $(this).addClass('slider-active');
            $('.slide-mover').animate({"left" :"183px"}, 1500);
    });
    
    $('.index-slider .sliding-search').animate({"left" :"1px"}, 1500);
    $('.little-arrow').addClass(' search-active');
    
    $('.little-arrow').toggle(function(){
        //mouse over
            
            $('.sliding-search').animate({"left" :"-563px"}, 1500, function(){$('.little-arrow').removeClass('search-active');});
        }, function(){
        //mouse out
            $(this).addClass('search-active');
            $('.sliding-search').animate({"left" :"1px"}, 1500);
    });
    
    /*************************************/
    /***********HOME SLIDER END***********/
    /*************************************/
    
    
    
    /*************************************/
    /***********SLIDER START**************/
    /*************************************/
    
    $('.txt-arrow-slider').toggle(function(){
        //mouse over
        $(this).addClass('txt-slider-active');    
        $('.txt-slide-mover').animate({"left" :"184px"}, 1500);
        }, function(){
        //mouse out
           
            $('.txt-slide-mover').animate({"left" :"-379px"}, 1500, function(){$('.txt-arrow-slider').removeClass('txt-slider-active');});
    });
    
    
    $('.txt-little-arrow').toggle(function(){
        //mouse over
            $('.txt-little-arrow').addClass('txt-search-active');
            $('.txt-sliding-search').animate({"left" :"2px"}, 1500);
        }, function(){
        //mouse out
            
            $('.txt-sliding-search').animate({"left" :"-561px"}, 1500, function(){$('.txt-little-arrow').removeClass('txt-search-active');});
    });
    
    /*************************************/
    /***********SLIDER END****************/
    /*************************************/

    
 
    
    $("a.zoom").fancybox();
     $("a.zoom-gallery").fancybox();
    $('.accordian').accordion({header: 'h2.head', navigation: true, autoHeight: false, active: false, alwaysOpen: false,
            change: function(e,data){if (data.newHeader.length>0) $('html,body').animate({scrollTop: data.newHeader.offset().top}, 500);}
    }); 
    
    $('<iframe width="530" height="320" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://maps.google.com/maps/ms?ie=UTF8&amp;hl=en&amp;msa=0&amp;msid=114412890064990706160.00046ee7d665fc7b9365f&amp;ll=45.058001,16.303711&amp;spn=4.966813,14.084473&amp;z=6&amp;output=embed"></iframe><br /><small>View <a href="http://maps.google.com/maps/ms?ie=UTF8&amp;hl=en&amp;msa=0&amp;msid=114412890064990706160.00046ee7d665fc7b9365f&amp;ll=45.058001,16.303711&amp;spn=4.966813,14.084473&amp;z=6&amp;source=embed" style="color:#0000FF;text-align:left">Intesa Sanpaolo Card d.o.o.</a> in a larger map</small>').appendTo('.gmaps');
  
    // SLIDER START 
  
});


