var current_up = '';
var img_src = 'http://www.kekari.lv/wp-content/plugins/kekari.lv/images/t_';
function tabulamove(img) {
  id = jQuery(img).attr('id');
  if (id != 'non') {
    if (current_up == '') {
  	  current_up = id;
  	  jQuery(img).attr('id','non');
      jQuery(img).attr('src',img_src+'non.jpg');
    }
  } else {
    if (current_up != '') {
  	  jQuery(img).attr('id',current_up);
      jQuery(img).attr('src',img_src+current_up+'.jpg');
  	  current_up = '';

      var kek=jQuery('#kek').attr('class');
      var opn=jQuery('#opn').attr('class');
      var opnl=jQuery('#opnl').attr('class');

      jQuery.ajax({
      	type: "POST",
      	cache: true,
      	url: "http://www.kekari.lv/wp-content/plugins/kekari.lv/ajax_page_dal.php",
      	data: "kek="+kek+"&opn="+opn+"&opnl="+opnl,
	      complete: function(data){
		      jQuery('#bilde_tabula').html(data.responseText);
	      }
      });
    }
  }

}

jQuery.ajax({
	type: "POST", url: "http://www.kekari.lv/wp-content/plugins/kekari.lv/ajax_page_dal.php",
	complete: function(data){
		jQuery('#bilde_tabula').html(data.responseText);
	}
});

jQuery(function() {
 for (var i=1;i<13;i++) {
 jQuery('.line_'+i).sparkline(js_spark[i], {maxSpotColor:'',minSpotColor:'',spotColor:'',lineColor:'#800000',width:'30px',chartRangeMin:1,fillColor:false});


 }
});

