I have created following code, using stackoverflow code editor. 

```js
$(document).ready(function(e) {
 $(".btnclink").click(function(e) {
        $(".btnclink").removeClass("btn-danger");
        $(this).addClass("btn-danger");
     var acpanels = $("#accordion-home").find(".panel-collapse.in");
  acpanels.collapse("hide");
    });
});
```

```html
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.0/css/bootstrap.min.css" rel="stylesheet"/>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.0/js/bootstrap.min.js"></script>

<div class="container"> 
    <br /><br />
    <div class="text-center">
    <button class="btn btnclink" data-toggle="collapse" data-target="#youtube">Open Youtube</button>&nbsp;&nbsp;
    <button class="btn btnclink" data-toggle="collapse" data-target="#google">Open Google</button>&nbsp;&nbsp;
    <button class="btn btnclink" data-toggle="collapse" data-target="#twitter">Open Twitter</button>
    <button class="btn btnclink" data-toggle="collapse" data-target="#google">Open Google</button>
    </div>
    <br /><br />

    <h2 class="h1 text-center">Bootstrap Collapse</h2>
    <div class="mt50">
        <div class="panel-group" id="accordion-home">
            <div class="panel panel-default">
                <div class="panel-heading">
                    <h4 class="panel-title">
                        <a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion-home" href="#youtube">
                            Youtube
                        </a>
                    </h4>
                </div>
                <div id="youtube" class="panel-collapse collapse">
                    <div class="panel-body">
                        Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.
                    </div>
                </div>
            </div>

            <div class="panel panel-default">
                <div class="panel-heading">
                    <h4 class="panel-title">
                        <a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion-home" href="#google">
                            Google
                        </a>
                    </h4>
                </div>
                <div id="google" class="panel-collapse collapse">
                    <div class="panel-body">
                        Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.
                    </div>
                </div>
            </div>

            <div class="panel panel-default">
                <div class="panel-heading">
                    <h4 class="panel-title">
                        <a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion-home" href="#twitter">
                            Twitter
                        </a>
                    </h4>
                </div>
                <div id="twitter" class="panel-collapse collapse">
                    <div class="panel-body">
                        Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
```

In this code I have two "Google" buttons, when I click on first "Google button" it will open Google collapse panel. And when I click on second "Google button" (while Google panel is open), then Google Panel shouldn't hide, instead it should be open. But at the moment it is hiding.

Please check and advise what could be the solution to fix this issue?