/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */


$(document).ready(function(){
    $('#navigation-left div').first().css('margin-top','-50px');
    $('#navigation-right div').first().css('margin-top','-50px');

    $('#navigation-left div').first().next().css('margin-top','150px');
    $('#navigation-right div').first().next().css('margin-top','150px');
    $('#cover').cycle({
        'timeout': 0,
        'delay' : 500
    });
    if(!(navigator.platform == 'iPad' || navigator.platform == 'iPhone' || navigator.platform == 'iPod')){
        $("#navigation-left div, #navigation-right div").hover(function(){
            $("#bg-right").addClass($(this).attr('name'));
            $("#bg-left").addClass($(this).attr('name'));
            $("#bg-top").addClass($(this).attr('name'));
            $("#bg-bottom").addClass($(this).attr('name'));

            $('#cover').cycle(parseInt($(this).attr('cover')));
        },function(){
            $("#bg-top").attr('class','');
            $("#bg-left").attr('class','');
            $("#bg-bottom").attr('class','');
            $("#bg-right").attr('class','');

        });
    }
});
