$(document).ready(function(){  
    $("a.textslink").mouseover(function () {
        $("ul.media").hide();
        $("ul.texts").fadeIn("slow");
    });
    
    // I know it's not solution. BUT how can I do this otherwise?
    $("body").mousemove(function (e) {
        if(e.pageY > $("#navigation").height() + 10) {
            $("ul.texts").hide();
            $("ul.media").fadeIn("slow");
        }
    });
    
    // Remove underline from images
    $("a:has(img)").addClass("imglink");    
    
    var randomPictures = 
        ['2886484107_bc57310b4e.jpg',
        '2886489189_ee7481d95d.jpg',
        '2990119448_ce1d7af833.jpg',
        '2990144188_4d9999d48d.jpg',
        '3287904451_cae4a89aaf.jpg',
        '3343191609_0fe3b78806.jpg'];
    var randomTitles = 
        ['Sovetskaya square', 
        'The Volga Bridge',
        'Shoe repair',
        'The sign of Yaroslavl',
        'Kirova Street',
        'Svoboda Street']
    var randomNum = Math.floor(Math.random() * randomPictures.length);
    $("#photo").html('<img src="http://static.yarfor.me/pic/polaroid/'+randomPictures[randomNum]+'" alt="'+randomTitles[randomNum]+'"/><h4>'+randomTitles[randomNum]+'</h4>');
});

// SIFR
var chiller = { src: 'http://static.yarfor.me/swf/chiller.swf' };
sIFR.activate(chiller);
sIFR.replace(chiller, {
wmode: 'transparent',
  selector: 'h4',
  ratios: [7, 1.32, 11, 1.31, 13, 1.24, 14, 1.25, 19, 1.23, 20, 1.22, 26, 1.21, 33, 1.2, 40, 1.19, 60, 1.18, 64, 1.17, 65, 1.18, 70, 1.17, 71, 1.18, 102, 1.17, 103, 1.16, 108, 1.17, 109, 1.16, 113, 1.17, 115, 1.16, 118, 1.17, 122, 1.16, 124, 1.17, 1.16],
  css: [ '.sIFR-root { color: #000000; text-align: center; }' ]
});
//sIFR.debug.ratios({ src: 'chiller.swf', selector: 'h4' });

// Audio Player
//AudioPlayer.setup("http://static.yarfor.me/swf/player.swf", {  
//    width: 290,
//    initialvolume: 100,  
//    transparentpagebg: "yes",  
//    left: "000000",  
//    lefticon: "FFFFFF",
//    animation: "no"
//});  


