function change_lang(lang)
{                               
    top.location.href = "?lang="+lang;
}

function load_links()
{      
    if(get_object("footer-links"))              
        get_object("footer-links").innerHTML = get_object("top-links").innerHTML; 
}

function get_object(id) {
    var object = null;
    if( document.layers ) {   
    object = document.layers[id];
    } else if( document.all ) {
    object = document.all[id];
    } else if( document.getElementById ) {
    object = document.getElementById(id);
    }
    return object;
}      

function show(obj)
{
    if(get_object(obj)) get_object(obj).style.display = "";
}

function hide(obj)
{
    if(get_object(obj)) get_object(obj).style.display = "none";
}

function toggle(obj)
{
    if(get_object(obj))
    {
        if(get_object(obj).style.display == "none")
            show(obj);
        else
            hide(obj);
    }
}

function enable(obj)
{
    if(get_object(obj)) get_object(obj).disabled = false;
}

function disable(obj)
{
    if(get_object(obj)) get_object(obj).disabled = true;
}

function show_slider()
{                                                               
    setTimeout("show('slide_left');show('slide_right');",4000);
    if(screen.width>1280 && screen.height>800)
        setTimeout("show('play_main1280');",5000);
    else
        setTimeout("show('play_main1000');",5000);
}
               
               
$(document).ready(function() {
    /*$('a.tooltip_up').live('mouseover', function() {  
    $('#' + this.id).bubbletip($('#tip_' + this.id));
    }); */
    
    $('.tooltip_up').live('mouseover', function() {
        if ($('table.bubbletip #tip_' + this.id).length == 0) {
            $('#' + this.id).bubbletip($('#tip_' + this.id)).trigger('mouseover');
        }
    });
    
    $('.tooltip_down').live('mouseover', function() {
        if ($('table.bubbletip #tip_' + this.id).length == 0) {
            $('#' + this.id).bubbletip($('#tip_' + this.id),{deltaDirection: 'down',deltaPosition: 50,offsetTop: 20}).trigger('mouseover');
        }
    });
    
    $('.tooltip_left').live('mouseover', function() {
        if ($('table.bubbletip #tip_' + this.id).length == 0) {
            $('#' + this.id).bubbletip($('#tip_' + this.id),{deltaDirection: 'left',deltaPosition: 100,offsetTop: -20}).trigger('mouseover');
        }
    });
    
    $('.tooltip_right').live('mouseover', function() {
        if ($('table.bubbletip #tip_' + this.id).length == 0) {
            $('#' + this.id).bubbletip($('#tip_' + this.id),{deltaDirection: 'right'}).trigger('mouseover');
        }
    });  

    /*
    $('#a1_up').bubbletip($('#tip1_up'));

    $('#a1_down').bubbletip($('#tip1_down'), {
        deltaDirection: 'down',
        deltaPosition: 50,
        offsetTop: 20
    });
    $('#a1_left').bubbletip($('#tip1_left'), {
        deltaDirection: 'left',
        animationDuration: 100,
        offsetLeft: -20
    });
    $('#a1_right').bubbletip($('#tip1_right'), { deltaDirection: 'right' });
    $('#a1_trigger').bubbletip($('#tip1_trigger1'), { positionAtElement: $('#a1_target') });

    $('#a_unbind').bubbletip($('#tip1_trigger2_unbind'));
    $('#a_unbind').bind('click', function(event) {
        $('#a1_trigger').removeBubbletip($('#tip1_trigger2'));
        event.preventDefault();
    });
    $('#a_bind').bubbletip($('#tip1_trigger2_bind'));
    $('#a_bind').bind('click', function(event) {
        $('#a1_trigger').bubbletip($('#tip1_trigger2'), {
            positionAtElement: $('#a1_target'),
            deltaDirection: 'down',
            delayShow: 500,
            delayHide: 1000
        });
        event.preventDefault();
    });

    $('#inpText').bubbletip($('#tip1_focusblur'), {
        deltaDirection: 'right',
        bindShow: 'focus',
        bindHide: 'blur'
    });
    */  
});   
    
$(document).ready(function(){
    $("a[rel^='prettyPhoto']").prettyPhoto({
        opacity: 0.40, /* Value between 0 and 1 */
        show_title: false, /* true/false */
        allow_resize: true, /* Resize the photos bigger than viewport. true/false */ 
        counter_separator_label: '/', /* The separator for the gallery counter 1 "of" 2 */
        theme: 'facebook', /* light_rounded / dark_rounded / light_square / dark_square / facebook */
        hideflash: true,
        iframe_markup: '<iframe src ="{path}" width="{width}" height="{height}" frameborder="no"></iframe>'
    });
});

$(document).ready(function(e) {
try {
$("#country_select").msDropDown();                    
$("#country_select").msDropDown({showIcon:true});                                        
} catch(e) {
//alert(e.message);
}
}); 
