jQuery.bt.options.ajaxLoading = '<img src="/i/loading.gif" width="16" height="16" />';
jQuery.bt.options.ajaxError = '<b>Ошибка!</b> Невозможно отобразить динамическое содержимое!';
jQuery.bt.options.width = '710px';
jQuery.bt.options.spikeLength = 10;
jQuery.bt.options.cornerRadius = 10;
jQuery.bt.options.fill = 'rgba(0, 0, 0, .7)';
jQuery.bt.options.strokeStyle = '#333';
jQuery.bt.options.cssClass = 'bt-content';
jQuery.bt.options.positions = 'right';

function wall_changer(i) {
  if (i == 1) {
    document.getElementById('all').style.backgroundImage = 'url(/i/bg_white.jpg)';
  } else if (i == 2) {
    document.getElementById('all').style.backgroundImage = 'url(/i/bg_green.jpg)';
  } else if (i == 3) {
    document.getElementById('all').style.backgroundImage = 'url(/i/bg_blue.jpg)';
  } else if (i == 4) {
    document.getElementById('all').style.backgroundImage = 'url(/i/bg_purple.jpg)';
  } else if (i == 5) {
    document.getElementById('all').style.backgroundImage = 'url(/i/bg_sand.jpg)';
  } else if (i == 6) {
    document.getElementById('all').style.backgroundImage = 'url(/i/bg_romb.jpg)';
  } else if (i == 7) {
    document.getElementById('all').style.backgroundImage = 'url(/i/bg_pink.jpg)';
  } else if (i == 8) {
    document.getElementById('all').style.backgroundImage = 'url(/i/bg_black.jpg)';
  } else {
    document.getElementById('all').style.backgroundImage = 'url(/i/bg_gray.jpg)';
    i = 0;
  }
  var expiry = new Date();
  expiry.setTime(expiry.getTime() + 160704000);
  document.cookie='wall='+i+'; path=/; expires=' + expiry.toGMTString();

  $('#wall_change').btOff();
}

function pol_changer(i) {
  if (i == 0) {
    document.getElementById('pol').style.backgroundImage = 'url(/i/pol_bambuk.jpg)';
  } else if (i == 1) {
    document.getElementById('pol').style.backgroundImage = 'url(/i/pol_bambuk_kofe.jpg)';
  } else if (i == 2) {
    document.getElementById('pol').style.backgroundImage = 'url(/i/pol_dub.jpg)';
  } else if (i == 3) {
    document.getElementById('pol').style.backgroundImage = 'url(/i/pol_dub_belenyj.jpg)';
  } else if (i == 4) {
    document.getElementById('pol').style.backgroundImage = 'url(/i/pol_dub_konyak.jpg)';
  } else if (i == 5) {
    document.getElementById('pol').style.backgroundImage = 'url(/i/pol_dub_ekspreshen.jpg)';
  } else if (i == 6) {
    document.getElementById('pol').style.backgroundImage = 'url(/i/pol_dussia.jpg)';
  } else if (i == 7) {
    document.getElementById('pol').style.backgroundImage = 'url(/i/pol_zebrano.jpg)';
  } else if (i == 8) {
    document.getElementById('pol').style.backgroundImage = 'url(/i/pol_kempas.jpg)';
  } else if (i == 9) {
    document.getElementById('pol').style.backgroundImage = 'url(/i/pol_klen.jpg)';
  } else if (i == 10) {
    document.getElementById('pol').style.backgroundImage = 'url(/i/pol_merbau.jpg)';
  } else if (i == 11) {
    document.getElementById('pol').style.backgroundImage = 'url(/i/pol_oreh_amerikanskij.jpg)';
  } else if (i == 12) {
    document.getElementById('pol').style.backgroundImage = 'url(/i/pol_sapeli.jpg)';
  } else if (i == 13) {
    document.getElementById('pol').style.backgroundImage = 'url(/i/pol_tik.jpg)';
  } else if (i == 14) {
    document.getElementById('pol').style.backgroundImage = 'url(/i/pol_yasen_arktik.jpg)';
  } else {
    document.getElementById('pol').style.backgroundImage = 'url(/i/bg_gray.jpg)';
    i = 0;
  }

  var expiry = new Date();
  expiry.setTime(expiry.getTime() + 160704000);
  document.cookie='pol='+i+'; path=/; expires=' + expiry.toGMTString();

  $('#pol_change').btOff();
}


$(document).ready(function () {
  $('#wall_change').bt('<a href="#" onclick="wall_changer(0); return false;"><img src="/i/bg_gray.png" class="png_fx" width="70" height="70" /></a><img src="/i/s.gif" width="10" height="1" /><a href="#" onclick="wall_changer(1); return false;"><img src="/i/bg_white.png" class="png_fx" width="70" height="70" /></a><img src="/i/s.gif" width="10" height="1" /><a href="#" onclick="wall_changer(2); return false;"><img src="/i/bg_green.png" class="png_fx" width="70" height="70" /></a><img src="/i/s.gif" width="10" height="1" /><a href="#" onclick="wall_changer(3); return false;"><img src="/i/bg_blue.png" class="png_fx" width="70" height="70" /></a><img src="/i/s.gif" width="10" height="1" /><a href="#" onclick="wall_changer(4); return false;"><img src="/i/bg_purple.png" class="png_fx" width="70" height="70" /></a><img src="/i/s.gif" width="10" height="1" /><a href="#" onclick="wall_changer(5); return false;"><img src="/i/bg_sand.png" class="png_fx" width="70" height="70" /></a><img src="/i/s.gif" width="10" height="1" /><a href="#" onclick="wall_changer(6); return false;"><img src="/i/bg_romb.png" class="png_fx" width="70" height="70" /></a><img src="/i/s.gif" width="10" height="1" /><a href="#" onclick="wall_changer(7); return false;"><img src="/i/bg_pink.png" class="png_fx" class="png_fx" width="70" height="70" /></a><img src="/i/s.gif" width="10" height="1" /><a href="#" onclick="wall_changer(8); return false;"><img src="/i/bg_black.png" class="png_fx" width="70" height="70" /></a>', {trigger: 'click'});
  $('#pol_change').bt('<a href="#" onclick="pol_changer(0); return false;"><img src="/i/pol_bambuk.png" class="png_fx" width="70" height="70" /></a><img src="/i/s.gif" width="10" height="1" /><a href="#" onclick="pol_changer(1); return false;"><img src="/i/pol_bambuk_kofe.png" class="png_fx" width="70" height="70" /></a><img src="/i/s.gif" width="10" height="1" /><a href="#" onclick="pol_changer(2); return false;"><img src="/i/pol_dub.png" class="png_fx" width="70" height="70" /></a><img src="/i/s.gif" width="10" height="1" /><a href="#" onclick="pol_changer(3); return false;"><img src="/i/pol_dub_belenyj.png" class="png_fx" width="70" height="70" /></a><img src="/i/s.gif" width="10" height="1" /><a href="#" onclick="pol_changer(4); return false;"><img src="/i/pol_dub_konyak.png" class="png_fx" width="70" height="70" /></a><img src="/i/s.gif" width="10" height="1" /><a href="#" onclick="pol_changer(5); return false;"><img src="/i/pol_dub_ekspreshen.png" class="png_fx" width="70" height="70" /></a><img src="/i/s.gif" width="10" height="1" /><a href="#" onclick="pol_changer(6); return false;"><img src="/i/pol_dussia.png" class="png_fx" width="70" height="70" /></a><img src="/i/s.gif" width="10" height="1" /><a href="#" onclick="pol_changer(7); return false;"><img src="/i/pol_zebrano.png" class="png_fx" width="70" height="70" /></a><br /><img src="/i/s.gif" width="1" height="10" /><br /><a href="#" onclick="pol_changer(8); return false;"><img src="/i/pol_kempas.png" class="png_fx" class="png_fx" width="70" height="70" /></a><img src="/i/s.gif" width="10" height="1" /><a href="#" onclick="pol_changer(9); return false;"><img src="/i/pol_klen.png" class="png_fx" width="70" height="70" /></a><img src="/i/s.gif" width="10" height="1" /><a href="#" onclick="pol_changer(10); return false;"><img src="/i/pol_merbau.png" class="png_fx" width="70" height="70" /></a><img src="/i/s.gif" width="10" height="1" /><a href="#" onclick="pol_changer(11); return false;"><img src="/i/pol_oreh_amerikanskij.png" class="png_fx" width="70" height="70" /></a><img src="/i/s.gif" width="10" height="1" /><a href="#" onclick="pol_changer(12); return false;"><img src="/i/pol_sapeli.png" class="png_fx" width="70" height="70" /></a><img src="/i/s.gif" width="10" height="1" /><a href="#" onclick="pol_changer(13); return false;"><img src="/i/pol_tik.png" class="png_fx" width="70" height="70" /></a><img src="/i/s.gif" width="10" height="1" /><a href="#" onclick="pol_changer(14); return false;"><img src="/i/pol_yasen_arktik.png" class="png_fx" width="70" height="70" /></a>', {trigger: 'click'});
});
