$j(".swatch-link").click(function(){
var id = this.id;
if($j('#attribute134').val() ){
var sizechoice = $j('#attribute134').val();
if(id == "swatch13"){
$j( "#configurable_swatch_design img" ).each(function( index ) {
index++;
jQuery(this).attr('src',index+".jpg");
});
} else if(id == "swatch12"){
$j( "#configurable_swatch_design img" ).each(function( index ) {
index++;
jQuery(this).attr('src',index+"/_"+"/"+index+".jpg");
});
}
}
});
This code iv'e written will on swatch click, store the clicked swatches Id. Then making sure the hidden select magento uses has a value. If so: check which Size chosen and accordingly loop through all of the Design option swatches and change Image.