jQuery.noConflict(); 

jQuery(document).ready(function() {
    
  jQuery("#download-button-streaming a").attr("href","javascript:void(0)");  
  
  jQuery("#download-button-streaming a").click(function () {
      
     //send request and append the response data in comments area
     var id     = jQuery(this).attr("data-id");
     var device = jQuery(this).attr("data-device");
     
	     jQuery.ajax({
                      type: "GET",
                      url: "/z_subjects/ajax_device.php",
                      data: "download=1&device="+device+"&id=" + id,
                      
                      success: function(data) {   
                                               
                          jQuery("body").append(data);
                          jQuery("#alert").css("height",jQuery("#site").outerHeight()+"px");
                          jQuery("#alert").css("position","absolute");
                          jQuery("#alert").css("top", ((jQuery(window).height() -  jQuery("#alert").outerHeight()) / 2) + jQuery(window).scrollTop() + "px");
                          jQuery("#alert").css("left", ((jQuery(window).width() -  jQuery("#alert").outerWidth()) / 2) + jQuery(window).scrollLeft() + "px");
                          jQuery("html").addClass("noscroll");     
                          jQuery("#submit_alert").click(function () {
                              
                              jQuery("#alert").remove();
                              jQuery("html").removeClass("noscroll"); 
                              return false;
                              
                          });
                      }
                });
    
  });
  
 
 	
  });
