var tabsandslides = {};

//
// GALLERY
//
tabsandslides.gallery = {};
tabsandslides.gallery.config_boxscrollable = {horizontal:true,
//                                            number_items:4, 
                                              minheight:120, 
                                              minwidth:200,
                                              easing:'easeInOutCirc'}

//
// IMAGE TABS
//
tabsandslides.image_tabs = {};
tabsandslides.image_tabs.config = {};
tabsandslides.image_tabs.config_boxscrollable = {horizontal:true,
//                                               number_items:5, 
                                                 minheight:120, 
                                                 minwidth:130,
                                                 easing:'easeInOutCirc'};

//
// TABS
//
tabsandslides.tabs = {};

tabsandslides.tabs.config = {};

//
// SLIDESHOW
//

tabsandslides.slideshow = {};

tabsandslides.slideshow.config = {
    // enable "cross-fading" effect
    effect: 'fade',
    fadeOutSpeed: "slow",
    rotate: true
};

tabsandslides.slideshow.slideshow_config = {clickable:false};


//
// SLIDESHOW
//

tabsandslides.slideshowpreview = {};

tabsandslides.slideshowpreview.config = {
    // enable "cross-fading" effect
    effect: 'fade',
    fadeOutSpeed: "slow",
    rotate: true,
    onClick: function (event, index){
        this.getTabs().parents('li').removeClass('selected_tab').stop(true).width(60).children('div').stop(true).width(55);;
        this.getTabs().filter('.current').parents('li').addClass('selected_tab').stop(true).width(69).children('div').stop(true).width(70);
        
    }

};

tabsandslides.slideshowpreview.slideshow_config = {clickable:false};

$(document).ready(function (){
    $('.slideshow_preview_tabs li').hover(function (evt){
        if($(this).hasClass('selected_tab')){
            return;
        }
        //handle in 
        $(this)
        .stop(true).animate({width:69},'fast')
        .find('div').stop(true).animate({width:70},'fast');
    },
    function (evt){
        if($(this).hasClass('selected_tab')){
            return;
        }
        //handle out
        $(this)
        .stop(true).animate({width:60},'fast')
        .find('div').stop(true).animate({width:55},'fast');
    });

    // tooltips
    $('.slideshow_preview_tabs img').tooltip({delay:0,
        position:"center left",
        offset:[2,30],
        tipClass:"tooltip intro",
        layout:'<div><span><span class="body"></span></span></div>',
        bodyClass:"body"});

});




