Drupal Add Javascript type=text/javascript I am trying to add javascript to my page and use type="text/javascript" however when I include the following it just encloses it in script tags. How can I fix this? Also, how can I add the type="text/javascript to external files (see the second example)

drupal_add_js("$(document).ready(function() {
    // Infinite Ajax Scroll configuration
    jQuery.ias({
        container : '#itemcontainer',
        item: '.dealstable',
        pagination: '.nav',
        next: '.nav a',
    });
    });",'inline');


Here is the second example:

drupal_add_js('http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js','external');


UPDATE:
As suggested by the comments I tried the following:

$js = "(function($) {
    jQuery.ias({
        container : '#itemcontainer',
        item: '.dealstable',
        pagination: '.nav',
        next: '.nav a',
    });
    };
})
(jQuery)";
drupal_add_js($js, array('type' =&gt; 'inline','scope'=&gt;'footer'));


But that resulted in the following HTML:

&lt;script&gt;(function($) {
    jQuery.ias({
        container : '#itemcontainer',
        item: '.dealstable',
        pagination: '.nav',
        next: '.nav a',
    });
    };
})
(jQuery)&lt;/script&gt;
you can use 

$js = "(function($) {

    };
})
(jQuery)";
drupal_add_js($js, array('type' =&gt; 'inline','scope'=&gt;'footer'));


OR

drupal_add_js("(function($) {
$(document).ready(function(){
    $('.mobile-navigation').click(function(){

     });
    });
})
(jQuery)","inline");


OR

drupal_add_js('sites/all/themes/dawn/js/skrollr.js', array('scope'=&gt;'footer'));
drupal_add_js(drupal_get_path('module', 'module name') . '/js/name.js');