<style type="text/css">
div.full-active {
clear:left;
}
</style>
<div>
<img src='preview-1.jpg' class='image preview'>
</div>
<script type="text/javascript">
$('img.image').click(function(){
$(this).toggleClass('preview').toggleClass('full');
$(this).parent().toggleClass('full-active');
var a=$(this).attr('src');var b=a.replace('preview','full')
if(a==b){b=a.replace('full','preview');}
$(this).attr('src',b);
});
</script>