 $(document).ready(function()
{
    $("#uzytkownicy_video_r").change(function(){

        value = $("#wersja_video_r").attr("value"); //id wersji
        ryczaltid = $("#uzytkownicy_video_r :selected").attr("value");
        months = $("#okres_korzystania_video_r :selected").text();
        users = $("#uzytkownicy_video_r :selected").text();
        currency = $("#walutaR :selected").attr("value");
        $("#cenadisp").replaceWith('<img id="loader" src="/index_images/ajax-loader.gif" style="width">');

           $.ajax({
           type: "POST",
	   url: "/wyswietlanie/produkty/zakup_systemu/costVideo.php",
	   data: "value=" + value  + "&type=" +'video_r_koszt' + "&months=" + months + "&users=" + users + "&currency=" + currency +"&ryczaltid=" + ryczaltid,
	   success: function(msg){
	     $("#kosztAllR").html(msg);
	   }

         })
    })

     $("#okres_korzystania_video_r").change(function(){

        value = $("#wersja_video_r").attr("value"); //id wersji
        ryczaltid = $("#uzytkownicy_video_r :selected").attr("value");
        months = $("#okres_korzystania_video_r :selected").text();
        users = $("#uzytkownicy_video_r :selected").text();
        currency = $("#walutaR :selected").attr("value");
         $("#cenadisp").replaceWith('<img id="loader" src="/index_images/ajax-loader.gif" style="width">');


           $.ajax({
           type: "POST",
	   url: "/wyswietlanie/produkty/zakup_systemu/costVideo.php",
	   data: "value=" + value  + "&type=" +'video_r_koszt' + "&months=" + months + "&users=" + users + "&currency=" + currency + "&ryczaltid=" + ryczaltid,
	   success: function(msg){
	     $("#kosztAllR").html(msg);
	   }

         })
    })

     $("#wersja_video_r").change(function(){

        value = $("#wersja_video_r").attr("value"); //id wersji
        currency = $("#walutaR :selected").attr("value");
         $("#cenadisp").replaceWith('<img id="loader" src="/index_images/ajax-loader.gif" style="width">');


           $.ajax({
           type: "POST",
	   url: "/wyswietlanie/produkty/zakup_systemu/costVideo.php",
	   data: "value=" + value  + "&type=" +'video_r_koszt1'+ "&currency=" + currency,
	   success: function(msg){
	     $("#kosztAllR").html(msg);
	   }

         })

          $.ajax({
           type: "POST",
	   url: "/wyswietlanie/produkty/zakup_systemu/costVideo.php",
	   data: "value=" + value  + "&type=" +'videoRW_waluta',
	   success: function(msg){
	     $("#walutaR").html(msg);
	   }

         })
    })

       $("#walutaR").change(function(){ //e-contact center

        value = $("#wersja_video_r").attr("value"); //id wersji
        months = $("#okres_korzystania_video_r :selected").text();
        users = $("#uzytkownicy_video_r :selected").text();
        currency = $("#walutaR :selected").attr("value");
        ryczaltid = $("#uzytkownicy_video_r :selected").attr("value");
         $("#cenadisp").replaceWith('<img id="loader" src="/index_images/ajax-loader.gif" style="width">');


           $.ajax({
           type: "POST",
	   url: "/wyswietlanie/produkty/zakup_systemu/costVideo.php",
	   data: "value=" + value  + "&type=" +'video_r_koszt' + "&months=" + months + "&users=" + users + "&currency=" + currency+"&ryczaltid=" + ryczaltid,
	   success: function(msg){
	     $("#kosztAllR").html(msg);
	   }

         })




    })

/////////////////////////////////////////////////////////////////////////////////
    $("#uzytkownicy_video_g").change(function(){

        value = $("#wersja_video_g").attr("value"); //id wersji
        months = $("#okres_korzystania_video_g :selected").text();
        users = $("#uzytkownicy_video_g :selected").text();
        hours = $("#godziny :selected").text();
        currency = $("#walutaG :selected").attr("value");
        godzid = $("#uzytkownicy_video_g :selected").attr("value");
         $("#cenadispg").replaceWith('<img id="loader" src="/index_images/ajax-loader.gif" style="width">');


         
         $.ajax({
           type: "POST",
	   url: "/wyswietlanie/produkty/zakup_systemu/costVideo.php",
	   data: "value=" + value  + "&type=" +'video_g_koszt1'+ "&currency=" + currency,
	   success: function(msg){
	     $("#kosztAllG").html(msg);
	   }

         })
    })

     $("#okres_korzystania_video_g").change(function(){

        value = $("#wersja_video_g").attr("value"); //id wersji
        months = $("#okres_korzystania_video_g :selected").text();
        users = $("#uzytkownicy_video_g :selected").text();
        hours = $("#godziny :selected").text();
        currency = $("#walutaG :selected").attr("value");
        godzid = $("#uzytkownicy_video_g :selected").attr("value");
        $("#cenadispg").replaceWith('<img id="loader" src="/index_images/ajax-loader.gif" style="width">');


           $.ajax({
           type: "POST",
	   url: "/wyswietlanie/produkty/zakup_systemu/costVideo.php",
	   data: "value=" + value  + "&type=" +'video_g_koszt' + "&months=" + months + "&users=" + users + "&currency=" + currency + "&hours=" + hours+ "&godzid=" + godzid,
	   success: function(msg){
	     $("#kosztAllG").html(msg);
	   }

         })
    })

     $("#godziny").change(function(){

        value = $("#wersja_video_g").attr("value"); //id wersji
        months = $("#okres_korzystania_video_g :selected").text();
        users = $("#uzytkownicy_video_g :selected").text();
        hours = $("#godziny :selected").text();
        currency = $("#walutaG :selected").attr("value");
        godzid = $("#uzytkownicy_video_g :selected").attr("value");
        $("#cenadispg").replaceWith('<img id="loader" src="/index_images/ajax-loader.gif" style="width">');


           $.ajax({
           type: "POST",
	   url: "/wyswietlanie/produkty/zakup_systemu/costVideo.php",
	   data: "value=" + value  + "&type=" +'video_g_koszt' + "&months=" + months + "&users=" + users + "&currency=" + currency + "&hours=" + hours+ "&godzid=" + godzid,
	   success: function(msg){
	     $("#kosztAllG").html(msg);
	   }

         })
    })


     $("#wersja_video_g").change(function(){

        value = $("#wersja_video_g").attr("value"); //id wersji
        currency = $("#walutaG :selected").attr("value");
        $("#cenadispg").replaceWith('<img id="loader" src="/index_images/ajax-loader.gif" style="width">');


           $.ajax({
           type: "POST",
	   url: "/wyswietlanie/produkty/zakup_systemu/costVideo.php",
	   data: "value=" + value  + "&type=" +'video_g_koszt1'+ "&currency=" + currency,
	   success: function(msg){
	     $("#kosztAllG").html(msg);
	   }

         })

          $.ajax({
           type: "POST",
	   url: "/wyswietlanie/produkty/zakup_systemu/costVideo.php",
	   data: "value=" + value  + "&type=" +'videoGW_waluta',
	   success: function(msg){
	     $("#walutaG").html(msg);
	   }

         })
    })

        $("#walutaG").change(function(){ //e-contact center

        value = $("#wersja_video_g").attr("value"); //id wersji
        months = $("#okres_korzystania_video_g :selected").text();
        users = $("#uzytkownicy_video_g :selected").text();
        hours = $("#godziny :selected").text();
        currency = $("#walutaG :selected").attr("value");
        godzid = $("#uzytkownicy_video_g :selected").attr("value");
        $("#cenadispg").replaceWith('<img id="loader" src="/index_images/ajax-loader.gif" style="width">');

        $.ajax({
           type: "POST",
	   url: "/wyswietlanie/produkty/zakup_systemu/costVideo.php",
	   data: "value=" + value  + "&type=" +'video_g_koszt' + "&months=" + months + "&users=" + users + "&currency=" + currency + "&hours=" + hours+ "&godzid=" + godzid,
	   success: function(msg){
	     $("#kosztAllG").html(msg);
	   }

         })




    })

})

