<? global $settings;?>
<script type="text/javascript">
  jQuery(function() {    
    $( '#slider-code' ).tinycarousel({
      pager: true
    });
    
    $( "#sites-page-rank" ).slider({
      min: 1,
      max: 14,
      value: <?= (int)$settings['sites-page-rank'];?>,
      slide: function( event, ui ) {
        $( "#sites-page-rank-val" ).html( ui.value + " dni" );        
      },
      change: function( event, ui ) {
        xajax_saveSettings( 'sites-page-rank', ui.value );
      }
    }); 
    $( "#sites-page-rank-val" ).html( $( "#sites-page-rank" ).slider( "value" ) + " dni" );
    
    $( "#sites-google-site" ).slider({
      min: 1,
      max: 14,
      value: <?= (int)$settings['sites-google-site'];?>,
      slide: function( event, ui ) {
        $( "#sites-google-site-val" ).html( ui.value + " dni" );        
      },
      change: function( event, ui ) {
        xajax_saveSettings( 'sites-google-site', ui.value );
      }
    }); 
    $( "#sites-google-site-val" ).html( $( "#sites-google-site" ).slider( "value" ) + " dni" );
    
    $( "#cron-proxy-limit" ).slider({
      min: 1,
      max: 14,
      value: <?= (int)$settings['cron-proxy-limit'];?>,
      slide: function( event, ui ) {
        $( "#cron-proxy-limit-val" ).html( ui.value );        
      },
      change: function( event, ui ) {
        xajax_saveSettings( 'cron-proxy-limit', ui.value );
      }
    }); 
    $( "#cron-proxy-limit-val" ).html( $( "#cron-proxy-limit" ).slider( "value" ) );
    
    $( "#cron-proxy-php" ).slider({
      min: 1,
      max: 14,
      value: <?= (int)$settings['cron-proxy-php'];?>,
      slide: function( event, ui ) {
        $( "#cron-proxy-php-val" ).html( ui.value );        
      },
      change: function( event, ui ) {
        xajax_saveSettings( 'cron-proxy-php', ui.value );
      }
    }); 
    $( "#cron-proxy-php-val" ).html( $( "#cron-proxy-php" ).slider( "value" ) );
    
    $( "#cron-proxy-http" ).slider({
      min: 1,
      max: 14,
      value: <?= (int)$settings['cron-proxy-http'];?>,
      slide: function( event, ui ) {
        $( "#cron-proxy-http-val" ).html( ui.value );        
      },
      change: function( event, ui ) {
        xajax_saveSettings( 'cron-proxy-http', ui.value );
      }
    }); 
    $( "#cron-proxy-http-val" ).html( $( "#cron-proxy-http" ).slider( "value" ) );
    
    $( "#smonitor" ).slider({
      min: 1,
      max: 720,
      value: <?= (int)$settings['smonitor'];?>,
      slide: function( event, ui ) {
        $( "#smonitor-val" ).html( ui.value );        
      },
      change: function( event, ui ) {
        xajax_saveSettings( 'smonitor', ui.value );
      }
    }); 
    $( "#smonitor-val" ).html( $( "#smonitor" ).slider( "value" ) );
  });
</script>
<style type="text/css">
  .ui-widget-content {
    background: #e1e4e9;
    -webkit-box-shadow: inset 0 1px 2px rgba(0,0,0,0.1);
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.1);
    border: 0;
  }
  .ui-widget-content {
    height: 15px;
  }
  .ui-corner-all {
    border-radius: 0;
  }
  .ui-slider .ui-slider-handle {
    height: 23px;
    background: #5191d1;
    border: 0;
  }
</style>
<div class="edit-row">
  <form method='POST' action='./' id='formularz'>
    <input type='hidden' name='rw' value='save_settings'>
    <div id="slider-code">
      <ul class="pager">
          <li><a rel="1" class="pagenum" href="#"><span class="badge">1</span>Cron</a></li>
      </ul>
      <a class="buttons prev tip" href="#" title="Wstecz">
        <img src="../../images/system/img-left.png" />
      </a>
      <div class="viewport">
        <ul class="overview">
          <li>
            <div class="slide-title">Cron</div>
            <div id="tabs" class="tabs-container">
              <div class="group">
                <label>Liczba połączeń przez proxy:</label>
                <div class="content">
                  <div id="cron-proxy-limit" class="slider"></div>
                  <div id="cron-proxy-limit-val" class="slider-value"></div>
                </div>
              </div>
              <div class="group">
                <label>Liczba spr. proxy PHP:</label>
                <div class="content">
                  <div id="cron-proxy-php" class="slider"></div>
                  <div id="cron-proxy-php-val" class="slider-value"></div>
                </div>
              </div>
              <div class="group">
                <label>Liczba spr. proxy HTTP:</label>
                <div class="content">
                  <div id="cron-proxy-http" class="slider"></div>
                  <div id="cron-proxy-http-val" class="slider-value"></div>
                </div>
              </div>
              <div class="group">
                <label>Sprawdzaj stan stron co:</label>
                <div class="content">
                  <div id="smonitor" class="slider"></div>
                  <div id="smonitor-val" class="slider-value"></div>
                </div>
              </div>              
            </div>
          </li>
        </ul>
      </div>
    </div>
  </form>
</div>