// BCC jquery.cluetip customized settings

$(document).ready(function() {
   /* Global augmentation of form submit field with 'ovalButton' anchors.
    * Input element is moved off screen and replaced with an ovalButton,
    * poviding better styling/hover effects but retaining enter key behavior.
    */
    $(':submit').each(function() {
        var $this = $(this);
        var f = this.form;
        var link = $('<a href="#" class="ovalButton">' + $this.val() + '</a>')
                .bind('click', function() {
                     $(f).trigger('submit');
                     return false;
                  });
        $this.after(link).css({position:'absolute', top:'-2000px'});
    });

    $('td.name a').cluetip({
        width: '310',
        height: '350',
        cluezIndex: 200,
        positionBy: 'auto',
        topOffset: 0,
        //leftOffset: -350,
        titleAttribute: 'rev',
        atttribute: 'rel',
        cluetipClass: 'sendMessage',
        dropShadow: true,
        dropShadowSteps:  6,
        cursor: 'hand',
        activation: 'click',
        sticky: true,
        closeText: 'or Cancel',
        // closeText: 'Send message',
        closePosition: 'bottom',
        mouseOutClose: false,
        fx: {             
           open: 'fadeIn',
           openSpeed: '10'
            },
        onActivate: function() {
         $('#tintLayer').show();
         return true;
         }          
    });
    
    $('td a.emailTeam').cluetip({
        width: '310',
        height: '350',
        cluezIndex: 200,
        positionBy: 'auto',
        topOffset: 0,
        //leftOffset: -350,
        titleAttribute: 'rev',
        atttribute: 'rel',
        cluetipClass: 'sendMessage',
        dropShadow: true,
        cursor: 'hand',
        activation: 'click',
        sticky: true,
        closeText: 'or Cancel',
        // closeText: 'Send message',
        closePosition: 'bottom',
        mouseOutClose: false,
        fx: {             
           open: 'fadeIn',
           openSpeed: '10'
            },
        onActivate: function() {
         $('#tintLayer').show();
         return true;
         }          
    });

    $('td a.inviteFriend').cluetip({
        width: '310',
        height: '350',
        cluezIndex: 200,
        positionBy: 'auto',
        topOffset: 0,
        //leftOffset: -350,
        titleAttribute: 'rev',
        atttribute: 'rel',
        cluetipClass: 'sendMessage',
        dropShadow: false,
        cursor: 'hand',
        activation: 'click',
        sticky: true,
        closeText: 'or Cancel',
        // closeText: 'Send message',
        closePosition: 'bottom',
        mouseOutClose: false,
        fx: {             
           open: 'fadeIn',
           openSpeed: '10'
            },
        onActivate: function() {
         $('#tintLayer').show();
         return true;
         }          
    });
			
    $('ul.sf-menu').superfish({
    	autoArrows	: false,
		dropShadows : false,
    	speed: 10,
    	delay: 500    
    }); 

// new BCC09 jquery formatting functions

	$('.newsFeed h3').eq(0).css("background-image", "none");
	
 });

