// JavaScript Document


// toggle search box value/text
function toggleSearchText(obj) {
	var el = document.getElementById(obj);
	
	if (el.value == 'Search website...') {
		el.value = '';
		el.style.color = '#666666';
		el.style.fontStyle = 'normal';
	}
	else if (el.value == '') {
		el.value = 'Search website...';
	}
}

// INITIALISE JQUERY PLUGINS
$(document).ready(function(){ 
						   
// superfish drop-down menus
	$("ul#menu-main-menu").supersubs({ 
		minWidth:    12,   // minimum width of sub-menus in em units 
		maxWidth:    27,   // maximum width of sub-menus in em units 
		extraWidth:  1     // extra width can ensure lines don't sometimes turn over 
						   // due to slight rounding differences and font-family 
	}).superfish();  // call supersubs first, then superfish, so that subs are 
					 // not display:none when measuring. Call before initialising 
					 // containing tabs for same reason. 

	// fancybox modal
	$(".fbIframe").fancybox({
			'width'				: '90%',
			'height'			: '90%',
			'autoScale'			: false,
			'transitionIn'		: 'elastic',
			'transitionOut'		: 'elastic',
			'type'				: 'iframe'
		});
	
	// accordion panels	
	$('div.accordionButton').click(function() {
		$('div.accordionContent').slideUp('normal');	
		$(this).next().slideDown('normal');
	});
 
	// hide accordion divs	
	$("div.accordionContent").hide();
		
	$(".toggleShowHide").click(function(){
  		$(".showHide").slideToggle("slow");
        $(this).html(function(i,html) {
            if (html.indexOf('+') != -1 ){
               html = html.replace('+','-');
            } else {
               html = html.replace('-','+');
            }
            return html;
        })
	});

}); 


$(function(){
	$('#opps-ticker').vTicker({ 
		speed: 1000,
		pause: 10000,
		animation: 'fade',
		mousePause: true,
		height: 260,
		showItems: 3
	});
});

