var supportChat = {
  
  isOnline : false,

  checkOnlineStatus : function() {
    
    var status = $('#psrgZdl').text();

    if(status === 'Online'){
      this.isOnline = true;
      $('#chat-pos1').addClass('online');
    }else{
      this.isOnline = false;
    }

  }

};

$(function(){
  
  if($('.ie7').length === 1 ){
    var zIndexNumber = 1000;
    $('div').each(function() {
      $(this).css('zIndex', zIndexNumber);
      zIndexNumber -= 10;
    });
  }

  if($('#pmedia-display').length === 1){
    $('#pmedia-display').cycle({ 
      fx: 'fade', 
      speed: 5000, 
      timeout: 1000 
    }); 
  }
  
  $('#main-menu').dropDownMenu({
    timer: 500, 
    parentMO: 'parent-hover', 
    childMO: 'child-hover1'
  });

  
  /** Chat Hook **/

  $('#chat-pos1').bind('click', function(e) {
    psrgZdow();
  });

});

$(window).bind('load', function(e) {
  supportChat.checkOnlineStatus();
});
