<div id="main"></div>
<div class="pictures">
<div class="picture" data-bg="pic1.jpg" style="background: url('pic1.jpg') 50% 50%"></div>
<div class="picture" data-bg="pic2.jpg" style="background: url('pic2.jpg') 50% 50%"></div>
<div class="picture" data-bg="pic3.jpg" style="background: url('pic3.jpg') 50% 50%"></div>
</div>
$(function(){
$(document).on('click', '.picture', function(){
var bg = $(this).data('bg');
$('.main').css('background', 'url("'+ bg +'") 50% 50% scroll no-repeat transparent');
});
});