$().ready(function(){
    
    // haxxor popup links
    
    $('a').each(function(){
        if($(this).attr("href").match(/popup/)) {
            $(this).attr("rel", "prettyPhoto");
            $(this).attr("href", $(this).attr("href") + "?iframe=true&width=1000&height=500");
        }
    });
    
    // set up prettyphoto
    $("a[rel^='prettyPhoto']").prettyPhoto({
        animationSpeed: 'normal', /* fast/slow/normal */
        padding: 30, /* padding for each side of the picture */
        opacity: 0.35, /* Value betwee 0 and 1 */
        showTitle: true, /* true/false */
        allowresize: true, /* true/false */
        counter_separator_label: '/', /* The separator for the gallery counter 1 "of" 2 */
        theme: 'light_rounded', /* light_rounded / dark_rounded / light_square / dark_square */
        callback: function(){
        }
    });
});
