/*****************************************************************************************************************/
/*****************************************************************************************************************/ 
/*****************************Code By mdx Specials JS  Coding || mbs Tasarim ------*******************************/
/*****************************************************************************************************************/
/*****************************************************************************************************************/
var a_s1 =0;
var maximum=0;
 var s1,s2,s3,s4,s5,s6;
var rint =1000
////////////////////////////////
function r_degis(bl) {
    var $active = $('#'+bl+' li.active');
	var lit = $('#'+bl+' li');
	if (lit.length>1)
	{
    if ( $active.length == 0 ) $active = $('#'+bl+' li:last');
    var $next =  $active.next().length ? $active.next()
        : $('#'+bl+' li:first');
    $active.addClass('last-active');
    $next.css({opacity: 1.0})
        .addClass('active')
        .animate({opacity: 1.0}, 1000, function() {
            $active.removeClass('active last-active');
        });
	}
	{
	// coding 	
	}
 }
 
////////////////////////////////////////
function r6_d (art)
{
	a_s1 = a_s1+art;
	if (maximum==0)
	{

s1=$('#r1 li.active img').attr("kal"); 
s2=$('#r2 li.active img').attr("kal");
s3=$('#r3 li.active img').attr("kal");
s4=$('#r4 li.active img').attr("kal"); 
s5=$('#r5 li.active img').attr("kal");
s6=$('#r6 li.active img').attr("kal");
 maximum= Math.max(Math.max(Math.max(Math.max(Math.max(s1,s2),s3),s4),s5),s6);
 maximum = isNaN(Number(maximum)) ? 0 : Number(maximum)
	}
else{
if (a_s1<=maximum) {
if (a_s1==s1){r_degis('r1')};
  if (a_s1==s2){r_degis('r2')};
   if (a_s1==s3){r_degis('r3')};
   if (a_s1==s4){r_degis('r4')};
  if (a_s1==s5){r_degis('r5')};
   if (a_s1==s6){r_degis('r6')};
} else {
a_s1=0;	
maximum=0;
}

}
 }
///////////////////////////////////////