$(function() { fSplash(); }); // crea html splash function fSplash() { $.ajax({ type: "POST", async: false, dataType: "json", url: "/tpl/default/ajax/getSplashImpianto.php", data: "action=getSplash" + "&pstrID_Lingua=it" + "&pstrID_Key=RE000005" + "&pstrID_Sezione=impianti", success: function(data) { $('#splash_area').removeClass('splash_loader'); if ( data.status == 'ok' ) { if ( data.html_splash != '' ) { $('#splash_area').html( data.html_splash ); $('#splash').bxSlider({ mode: 'horizontal', auto: true, captions: false, controls: true, autoControls: false, displaySlideQty: 1, moveSlideQty: 1, autoHover: true, easing: 'swing' }); } } } }); }