$(document).ready(function(){

    if(p == 'gallery' || p == 'about'){
        $().piroBox({
              my_speed: 300, //animation speed
              bg_alpha: 0.5, //background opacity
              radius: 4, //caption rounded corner
              scrollImage : false, // true == image follows the page _|_ false == image remains in the same open position
                                   // in some cases of very large images or long description could be useful.
              slideShow : true, // true == slideshow on, false == slideshow off
              slideSpeed : 3, //slideshow
              pirobox_next : 'piro_next', // Nav buttons -> piro_next == inside piroBox , piro_next_out == outside piroBox
              pirobox_prev : 'piro_prev', // Nav buttons -> piro_prev == inside piroBox , piro_prev_out == outside piroBox
              close_all : '.piro_close' // add class .piro_overlay(with comma)if you want overlay click close piroBox

        });
    }  
})

// contact ---

current_c = '#c-sofia-1';

function show_contact(div){
    if( current_c != div ){
        $(current_c).slideUp(function(){
            $(div).slideDown();
        });
        
        current_c = div;
    }
}

function show_map(address){
    window.open('http://foxbe.net/map.html?html=0&a='+address,'mywin', 'left=20,top=20,width=600,height=400,toolbar=no,resizable=0');  
}

function display_page(page){
      switch(page){
        case 'arlet-for-art-page':
            $('#arlet-for-art-page').show();
            $('#arlet-academy-page').hide();
            $('#arlet-express-page').hide(); 
        break;
        case 'arlet-academy-page':
            $('#arlet-academy-page').show();
            $('#arlet-express-page').hide();   
            $('#arlet-for-art-page').hide();      
        break;
        case 'arlet-express-page':
            $('#arlet-express-page').show();
            $('#arlet-for-art-page').hide();
            $('#arlet-academy-page').hide();   
        break;         
      }
}

function open_video(video, title, w, h) {
   
    $('#video-dialog').load("flowplayer.html?html=0&w=" + w + "&h=" + h + "&video=" + video).dialog(
        {
            bgiframe: true, 
            modal: true,
            title: title,
            width: w,
            height: h+40 
        }
    );
}
