//var forTimer = FALSE;
$(document).ready(function(){
    $(".fancy").fancybox({});
    $('.showPhoto').fancybox({});


    $('.follow-link').click(function(){
        var link = $(this).attr('alt');
        location.href=link;
    });
    
    $('.getDetails').click(function(){
        var id = $(this).attr('id').split('exhibitorId')[1];
        $('#modalDetails').html('<img src="styles/src/admin/ajax-loader.gif" style="position:absolute; top:50%; left:50%; margin-left:-50px;"/>');
        $('#modalDetails').dialog({
            title:'Exhibitor details',
            width: 500,
            height: 350
        });
        $.ajax({
            type: "POST",
            url: 'area/getdetails/id/'+id,
            async: false,
            success:function(resp){
                $('#modalDetails').html(resp);
            }
        });

    });

    $('.exId').hover(function(){
        $('.exSel'+$(this).attr('rel')).css('background-color', 'red');
    }, function() {
        $('.exSel'+$(this).attr('rel')).css('background-color', '#FCC');
    });


    $('#platinum-banners, #gold-banners, #silver-banners').movingBoxes({
            startPanel   : 3,      // start with this panel
            width        : 420,    // overall width of movingBoxes (not including navigation arrows)
            height          :170,
            panelWidth   : 0.3,     // current panel width adjusted to 70% of overall width
            buildNav     : true,   // if true, navigation links will be added
            navFormatter : function(index, panel){ return "&#9679;"; /*panel.find('h2 span').text();*/ } // function which gets nav text from span inside the panel header
    });
});

function getExhibitorInfo(id)
{
        $('#modalExhibitor').html('<img src="styles/src/admin/ajax-loader.gif" style="position:absolute; top:50%; left:50%; margin-left:-50px;"/>');
        $('#modalExhibitor').dialog({
            title:'Exhibitor details',
            width: 500,
            height: 350
        });
        $.ajax({
            type: "POST",
            url: 'area/getexhibitorinfo/id/'+id,
            async: false,
            success:function(resp){
                $('#modalExhibitor').html(resp);
            }
        });
}


