$(document).ready(function(){
    $("#top_menu li a").mouseover(function(){
        var parent = $(this).parents("li");
        if(!parent.hasClass("m_active")){
            if(parent.hasClass("right")){
                parent.addClass("active_right");
            }else{
                parent.addClass("active");
            }
        }
    }).mouseout(function(){
        var parent = $(this).parents("li");
        if(!parent.hasClass("m_active")){
            if(parent.hasClass("right")){
                parent.removeClass("active_right");
            }else{
                parent.removeClass("active");
            }
        }
    })
    
    load_photo_site();
    setInterval("load_photo_site()", 5000);
});

function load_photo_site(){
    $("#photo_site").load("../photo_site.html?rnd=" + Math.random());
}

function open_iframe(url, width, height){
    url += "?rnd=" + Math.ceil(Math.random()*10000000);
    hs.htmlExpand(null, { objectType: 'iframe', src: url, height: height, width: width } )
    return false;
}
