window.onload = function () {
    ph = $("#photoPM");
    if(ph != ''){
        ph.css("display", "block");
    }
    /*var img = document.getElementById("photo");
    //alert(img.src);
    img.style.display = "none";
    var r = Raphael("holder", 122, 71);
    //var r = Raphael(document.getElementById("photo"), 122, 71);
    var wid = img.width;
    var hei = img.height;
    //alert(wid);
    
    //r.ellipse(170, 130, 170, 2).attr({fill: "#000", gradient: "0-#FFF-#FFF", opacity: .5});
    r.image(img.src, 0, 0, wid, hei*0.7);
    r.ellipse(wid/2, hei*0.7, wid/2, 1).attr({fill: "#000", opacity: 0.5});
    r.image(img.src, 0, (hei*0.7)+2, wid, hei/3).scale(1, -1).attr({opacity: .5});
    r.rect(0, hei*0.7+2, wid, hei-hei*0.7).attr({gradient: "90-#FFF-#FFF", stroke: "#FFF", opacity: .5});*/
    
    
    //var img = $('.photoJS:even');
    //alert(img.src);
    /*var img = document.getElementById("photoJS_0");
    //img.css("display", "none");
    img.style.display = "none";
    var width = $("#photoJS_0").width();
    var height = $("#photoJS_0").height();
    
    var r = Raphael("holder_0", 122, 71);
    var x = width*0.7;
    var y = height*0.7;
    
    
    r.image(img.src, (width-x)/2, 0, x, y);
    r.ellipse(width/2, y, x/2, 1).attr({fill: "#000", opacity: 0.5});
    r.image(img.src, (width-x)/2, y+2, x, y/3).scale(1, -1).attr({opacity: .5});
    r.rect((width-x)/2, y+2, x, y/3).attr({gradient: "90-#FFF-#FFF", stroke: "#FFF", opacity: .5});*/
    
    var e = 2;
    for (var i=0; i<=e; i++){
        span = $("span #holder_" + i + " #photoJS_" + i);
        src = span.attr("src");
        //span.css("display", "none");
        //alert(src);
        var width = $("#photoJS_" + i).width();
        var height = $("#photoJS_" + i).height();
        
        var x = width*0.7;
        var y = height*0.7;
        //alert("Width: " + width + " Height: " + height)
        if(src){
            var r = Raphael("holder_" + i, width, height);
            r.image(src, (width-x)/2, 0, x, y);
            r.ellipse(width/2, y, x/2, 1).attr({fill: "#000", opacity: 0.5});
            r.image(src, (width-x)/2, y+2, x, y/3).scale(1, -1).attr({opacity: .5});
            r.rect((width-x)/2, y+2, x, y/3).attr({gradient: "90-#FFF-#FFF", stroke: "#FFF", opacity: .5});
        }
    }
    /*div = document.getElementsByTagName("span");
    for (var i=0;i<div.length;i++)
            if(div[i].className == "photoJS"){
            //var img = document.getElementById("photoJS");
            //img.css("display", "none");
            img = div[i].firstChild;
            img.style.display = "none";
            var width = img.width;
            var height = img.height;
            
            //alert(i);
            if(i == 16){
               var r = Raphael("holder_0", width, height);
            } else if(i == 20) {
                var r = Raphael("holder_1", width, height);
            } else if(i == 24) {
                var r = Raphael("holder_2", width, height);
            }
            
            var x = width*0.7;
            var y = height*0.7;
            //alert(img.attr("src"));
            
            r.image(div[i].firstChild.src, (width-x)/2, 0, x, y);
            r.ellipse(width/2, y, x/2, 1).attr({fill: "#000", opacity: 0.5});
            r.image(div[i].firstChild.src, (width-x)/2, y+2, x, y/3).scale(1, -1).attr({opacity: .5});
            r.rect((width-x)/2, y+2, x, y/3).attr({gradient: "90-#FFF-#FFF", stroke: "#FFF", opacity: .5});
            //alert(r);
    }*/
};

