jQuery script crashing web page
<p>I have a page with a carousel on using the infinite-carousel plugin. </p>

<p>When I run the page it crashes my browser and asks if I want to stop the unresponsive script.</p>

<p>In my JS file to call the action I have...</p>

<pre><code>$(document).ready(function(){
    $('#viewport').carousel('#simplePrevious', '#simpleNext');
    $('.gallery-viewport-ext').carousel('.gallery-viewport-ext #simplePrevious', '.gallery-viewport-ext #simpleNext');
    $('.gallery-viewport-int').carousel('.gallery-viewport-int #simplePrevious', '.gallery-viewport-int #simpleNext');
    $('.gallery-viewport-gw').carousel('.gallery-viewport-gw #simplePrevious', '.gallery-viewport-gw #simpleNext');
    $('.gallery-viewport-theroofterrace').carousel('.gallery-viewport-theroofterrace #simplePrevious', '.gallery-viewport-theroofterrace #simpleNext');
    $('.gallery-viewport-photos').carousel('.gallery-viewport-photos #simplePrevious', '.gallery-viewport-photos #simpleNext');
    $('.gallery-viewport-onebedroomapartment').carousel('.gallery-viewport-onebedroomapartment #simplePrevious', '.gallery-viewport-onebedroomapartment #simpleNext');
    $('.gallery-viewport-twobedroomapartment').carousel('.gallery-viewport-twobedroomapartment #simplePrevious', '.gallery-viewport-twobedroomapartment #simpleNext');
    $('.gallery-viewport-externals').carousel('.gallery-viewport-externals #simplePrevious', '.gallery-viewport-externals #simpleNext');

    $('#slider-stage').carousel('#previous', '#next');  
    $('#tab-container').easytabs();

                //Examples of how to assign the ColorBox event to elements
                $(".group1").colorbox({rel:'group1'});
                $(".group2").colorbox({rel:'group2', transition:"fade"});
                $(".group3").colorbox({rel:'group3', transition:"none", width:"75%", height:"75%"});

    // Dropdown, show more text
    $('.useful-links ul li a').on('click', function () {
        $(this).next('p').toggle();   
        return false;  
    });
});
</code></pre>

<p>If I remove the </p>

<pre><code>$('.gallery-viewport-int').carousel('.gallery-viewport-int #simplePrevious', '.gallery-viewport-int #simpleNext');
</code></pre>

<p>which starts the action for that page the page then loads. </p>

<p>Has anybody an idea on what could be going wrong? or how I can debug it? </p>

<hr>

<pre><code>&lt;section class="gallery-viewport-int"&gt;
            &lt;ul style=""&gt;
                &lt;li style=""&gt;&lt;img alt="image" src="_includes/images/slide-1.jpg"&gt;&lt;/li&gt;
                &lt;li style=""&gt;&lt;img alt="image" src="_includes/images/slide-2.jpg"&gt;&lt;/li&gt;
                &lt;li style=""&gt;&lt;img alt="image" src="_includes/images/slide-3.jpg"&gt;&lt;/li&gt;
                &lt;li style=""&gt;&lt;img alt="image" src="_includes/images/slide-1.jpg"&gt;&lt;/li&gt;
                &lt;li style=""&gt;&lt;img alt="image" src="_includes/images/slide-2.jpg"&gt;&lt;/li&gt;
                &lt;li style=""&gt;&lt;img alt="image" src="_includes/images/slide-3.jpg"&gt;&lt;/li&gt;
            &lt;/ul&gt;
            &lt;a id="simplePrevious"&gt;&lt;img alt="Left Arrow" src="_includes/images/larr.png"&gt;&lt;/a&gt;
            &lt;a id="simpleNext"&gt;&lt;img alt="Right Arrow" src="_includes/images/rarr.png"&gt;&lt;/a&gt;
        &lt;/section&gt;
</code></pre>
