<script type="text/javascript">
  $(document).ready(function(){
    $("select[name='xoops_theme_select']").addClass("col-sm-12");
    $("input[name='query']").addClass("col-sm-12");
    $("input[name='uname']").addClass("col-sm-12");
    $("input[name='pass']").addClass("col-sm-12");

    <{php}>
      if(file_exists(XOOPS_ROOT_PATH."/modules/tadtools/mobile_device_detect.php")){
        include_once XOOPS_ROOT_PATH."/modules/tadtools/mobile_device_detect.php";
        $device=mobile_device_detect(true,false,true,true,true,true,true);
        echo "var mobile_device='{$device[0]}';";
      }else{
        echo "var mobile_device='';";
      }
    <{/php}>

    if(mobile_device==''){
      var leftBlock=$("#xoops_theme_left_zone").height();
      var centerBlock=$("#xoops_theme_center_zone").height();
      var rightBlock=$("#xoops_theme_right_zone").height();
      var maxheight=leftBlock;

      if(rightBlock > maxheight){
        maxheight=rightBlock;
      }

      if(centerBlock > maxheight){
        maxheight=centerBlock;
      }

      <{if $theme_type=="theme_type_5" || $theme_type=="theme_type_6" || $theme_type=="theme_type_7"}>
        $("#xoops_theme_left_zone").height(maxheight);
        $("#xoops_theme_right_zone").height(maxheight);
      <{elseif $theme_type=="theme_type_3" || $theme_type=="theme_type_4"}>
        $("#xoops_theme_left_zone").height(maxheight);
      <{elseif $theme_type=="theme_type_1"}>
        $("#xoops_theme_left_zone").height(maxheight);
      <{elseif $theme_type=="theme_type_2"}>
        $("#xoops_theme_right_zone").height(maxheight);
      <{/if}>
    }

  });
</script>
