$(document).ready(function(){
    $('img').parent('a').each(function(){
        if($(this).attr('href').indexOf('cadmin') > 0)
        {
            $(this).attr('rel', 'prettyPhoto[gal]');
        }
    });

    $('a[rel^=prettyPhoto]').prettyPhoto({
        'default_width': 640,
        'default_height': 480
    });
})
