Is It Possible You Use An IF statement like this?
Using Jamroom
Your welcome!
{if jrCore_is_mobile_device()}
{assign var="boxwidth" value="320"}
{else}
{assign var="boxwidth" value="450"}
{/if}
this._boxWidth = {$boxwidth};
{literal}
the beginning of your code here up to
this._boxWidth = {/literal}{$boxwidth}{literal};
the rest of your code here...
{/literal}