function changea(linkid, ileb) {

               if(linkid == 1 && ileb ==2){
               document.getElementById("1").style.color = "#C79900";
               document.getElementById("2").style.color = "white";
               }

               else if(linkid == 1 && ileb ==3){
               document.getElementById("1").style.color = "#C79900";
               document.getElementById("2").style.color = "white";
               document.getElementById("3").style.color = "white";
               }
               else if(linkid == 1 && ileb ==4){
               document.getElementById("1").style.color = "#C79900";
               document.getElementById("2").style.color = "white";
               document.getElementById("3").style.color = "white";
               document.getElementById("4").style.color = "white";
               }
               else if(linkid == 2 && ileb ==2){
               document.getElementById("1").style.color = "white";
               document.getElementById("2").style.color = "#C79900";

               }
               else if(linkid == 2 && ileb ==3){
               document.getElementById("1").style.color = "white";
               document.getElementById("2").style.color = "#C79900";
               document.getElementById("3").style.color = "white";
               }
               else if(linkid == 2 && ileb ==4){
               document.getElementById("1").style.color = "white";
               document.getElementById("2").style.color = "#C79900";
               document.getElementById("3").style.color = "white";
               document.getElementById("4").style.color = "white";
               }
               else if(linkid == 3 && ileb ==3){
               document.getElementById("1").style.color = "white";
               document.getElementById("2").style.color = "white";
               document.getElementById("3").style.color = "#C79900";
               }
               else if(linkid == 3 && ileb ==4){
               document.getElementById("1").style.color = "white";
               document.getElementById("2").style.color = "white";
               document.getElementById("3").style.color = "#C79900";
               document.getElementById("4").style.color = "white";
               }
               else if(linkid == 4 && ileb ==4){
               document.getElementById("1").style.color = "white";
               document.getElementById("2").style.color = "white";
               document.getElementById("3").style.color = "white";
               document.getElementById("4").style.color = "#C79900";
               }
}

function change(img, imgbase, gid, ile, ktore, idpret) {

               if(ile == 2 && ktore ==2){

                   $('#image_'+gid).html('<a href="products/max/'+imgbase+'.jpg" rel="prettyPhoto['+idpret+']"></a><a href="products/max/'+imgbase+'-2.jpg" rel="prettyPhoto['+idpret+']"><img width="180px" height="265px" src="products/'+imgbase+'-2.jpg" alt="" /></a>');
                   $('#image_'+gid+" a[rel^='prettyPhoto']").prettyPhoto({theme:'dark_rounded'});

               }
               if(ile == 2 && ktore ==1){

                   $('#image_'+gid).html('<a href="products/max/'+img+'" rel="prettyPhoto['+idpret+']"><img width="180px" height="265px" src="products/'+img+'" alt="" /></a><a href="products/max/'+imgbase+'-2.jpg" rel="prettyPhoto['+idpret+']"></a>');
                   $('#image_'+gid+" a[rel^='prettyPhoto']").prettyPhoto({theme:'dark_rounded'});

               }

               if(ile == 3 && ktore ==3){

                   $('#image_'+gid).html('<a href="products/max/'+imgbase+'.jpg" rel="prettyPhoto['+idpret+']"></a><a href="products/max/'+imgbase+'-2.jpg" rel="prettyPhoto['+idpret+']"></a><a href="products/max/'+img+'" rel="prettyPhoto['+idpret+']"><img src="products/'+img+'" alt="" /></a>');
                   $('#image_'+gid+" a[rel^='prettyPhoto']").prettyPhoto({theme:'dark_rounded'});

               }
               if(ile == 3 && ktore ==2){

                   $('#image_'+gid).html('<a href="products/max/'+imgbase+'.jpg" rel="prettyPhoto['+idpret+']"></a><a href="products/max/'+img+'" rel="prettyPhoto['+idpret+']"><img src="products/'+img+'" alt="" /></a><a href="products/max/'+imgbase+'-3.jpg" rel="prettyPhoto['+idpret+']"></a>');
                   $('#image_'+gid+" a[rel^='prettyPhoto']").prettyPhoto({theme:'dark_rounded'});

               }
               if(ile == 3 && ktore ==1){

                   $('#image_'+gid).html('<a href="products/max/'+img+'" rel="prettyPhoto['+idpret+']"><img src="products/'+img+'" alt="" /></a><a href="products/max/'+imgbase+'-2.jpg" rel="prettyPhoto['+idpret+']"></a><a href="products/max/'+imgbase+'-3.jpg" rel="prettyPhoto['+idpret+']"></a>');
                   $('#image_'+gid+" a[rel^='prettyPhoto']").prettyPhoto({theme:'dark_rounded'});

               }
               if(ile == 4 && ktore ==4){

                   $('#image_'+gid).html('<a href="products/max/'+imgbase+'.jpg" rel="prettyPhoto['+idpret+']"></a><a href="products/max/'+imgbase+'-2.jpg" rel="prettyPhoto['+idpret+']"></a><a href="products/max/'+imgbase+'-3.jpg" rel="prettyPhoto['+idpret+']"></a><a href="products/max/'+img+'" rel="prettyPhoto['+idpret+']"><img src="products/'+img+'" alt="" /></a>');
                   $('#image_'+gid+" a[rel^='prettyPhoto']").prettyPhoto({theme:'dark_rounded'});

               }
               if(ile == 4 && ktore ==3){

                   $('#image_'+gid).html('<a href="products/max/'+imgbase+'.jpg" rel="prettyPhoto['+idpret+']"></a><a href="products/max/'+imgbase+'-2.jpg" rel="prettyPhoto['+idpret+']"></a><a href="products/max/'+img+'" rel="prettyPhoto['+idpret+']"><img src="products/'+img+'" alt="" /></a><a href="products/max/'+imgbase+'-4.jpg" rel="prettyPhoto['+idpret+']"></a>');
                   $('#image_'+gid+" a[rel^='prettyPhoto']").prettyPhoto({theme:'dark_rounded'});

               }
               if(ile == 4 && ktore ==2){

                   $('#image_'+gid).html('<a href="products/max/'+imgbase+'.jpg" rel="prettyPhoto['+idpret+']"></a><a href="products/max/'+img+'" rel="prettyPhoto['+idpret+']"><img src="products/'+img+'" alt="" /></a><a href="products/max/'+imgbase+'-3.jpg" rel="prettyPhoto['+idpret+']"></a><a href="products/max/'+imgbase+'-4.jpg" rel="prettyPhoto['+idpret+']"></a>');
                   $('#image_'+gid+" a[rel^='prettyPhoto']").prettyPhoto({theme:'dark_rounded'});

               }
               if(ile == 4 && ktore ==1){

                   $('#image_'+gid).html('<a href="products/max/'+img+'" rel="prettyPhoto['+idpret+']"><img src="products/'+img+'" alt="" /></a><a href="products/max/'+imgbase+'-2.jpg" rel="prettyPhoto['+idpret+']"></a><a href="products/max/'+imgbase+'-3.jpg" rel="prettyPhoto['+idpret+']"></a><a href="products/max/'+imgbase+'-4.jpg" rel="prettyPhoto['+idpret+']"></a>');
                   $('#image_'+gid+" a[rel^='prettyPhoto']").prettyPhoto({theme:'dark_rounded'});

               }
}

