How can I simplify all the functions below, as they all the same but for one bit, and I have got a load more to do too.
<script>
Shadowbox.init({
skipSetup: true
});
$('.btn').click(function() {
var content = $('#sbdiv').html();
Shadowbox.open({
content: content,
player: 'html',
/*title: "Hi",*/
displayNav: false,
height: 600,
width: 700
});
});
$('.btn2').click(function() {
var content = $('#sbdiv2').html();
Shadowbox.open({
content: content,
player: 'html',
/*title: "Hi",*/
displayNav: false,
height: 600,
width: 700
});
});
$('.btn3').click(function() {
var content = $('#sbdiv3').html();
Shadowbox.open({
content: content,
player: 'html',
/*title: "Hi",*/
displayNav: false,
height: 600,
width: 700
});
});
$('.btn4').click(function() {
var content = $('#sbdiv4').html();
Shadowbox.open({
content: content,
player: 'html',
/*title: "Hi",*/
displayNav: false,
height: 600,
width: 700
});
});
$('.btn5').click(function() {
var content = $('#sbdiv5').html();
Shadowbox.open({
content: content,
player: 'html',
/*title: "Hi",*/
displayNav: false,
height: 600,
width: 700
});
});
$('.btn6').click(function() {
var content = $('#sbdiv6').html();
Shadowbox.open({
content: content,
player: 'html',
/*title: "Hi",*/
displayNav: false,
height: 600,
width: 700
});
});
$('.btn7').click(function() {
var content = $('#sbdiv7').html();
Shadowbox.open({
content: content,
player: 'html',
/*title: "Hi",*/
displayNav: false,
height: 600,
width: 700
});
});
$('.btn8').click(function() {
var content = $('#sbdiv8').html();
Shadowbox.open({
content: content,
player: 'html',
/*title: "Hi",*/
displayNav: false,
height: 600,
width: 700
});
});
</script>