<!-- Global Hide and Show Function -- >
function hideDiv(element)
         {
            var el;
            el = document.getElementById(element);
            el.style.display = 'none';
         }

function showDiv(element)
         {
            var el;
            el = document.getElementById(element);
            el.style.display = 'block';
         }
		 

$(document).ready(function(){
	
	// Table Row Color
	
	/* Scroll */
	
	$(function()
	{
		// this initialises the demo scollpanes on the page.
		//$('.analystwecovertablebox,.stockcovertablebox,.stockcovertablebox1,.analystwecovertablebox1').jScrollPane();
	
		//$('.stockcovertablebox').jScrollPane();
		
	});
	
	// Index Slide
	$(function(){
			$('#slides').slides({
				preload: true,
				preloadImage: getImgUrl('loading.gif'),
				play: 5000,
				pause: 5000,
				hoverPause: true,
				effect: "fade", fadespeed: 500, crossfade: true, autoHeight:true, autoHeightSpeed:1000,
				animationStart: function(current){
					$('.caption').animate({
						bottom:-35
					},100);
					if (window.console && console.log) {
						// example return of current slide number
						console.log('animationStart on slide: ', current);
					};
				},
				animationComplete: function(current){
					$('.caption').animate({
						bottom:0
					},200);
					if (window.console && console.log) {
						// example return of current slide number
						console.log('animationComplete on slide: ', current);
					};
				},
				slidesLoaded: function() {
					$('.caption').animate({
						bottom:0
					},200);
				}
			});
		});
});

// Light Box
	$(document).ready(function() {
	});

		$(document).ready(function() {
			$(".tellFrlight").fancybox({
				'titlePosition'		: 'inside',
				'autoScale'			: 'ture',
				'transitionIn'		: 'none',
				'transitionOut'		: 'none'
			});
		});
		
		$(document).ready(function() {
			$("#sdis").fancybox({
				'titlePosition'		: 'inside',
				'autoScale'			: 'ture',
				'transitionIn'		: 'none',
				'transitionOut'		: 'none'
			});
		});
		
		$(document).ready(function() {
			$("#share").fancybox({
				'titlePosition'		: 'inside',
				'autoScale'			: 'ture',
				'transitionIn'		: 'none',
				'transitionOut'		: 'none'
			});
		});
		

$(document).ready(function(){

/*	$(".vo_title").click(function(){
		$(".optiontablelist").slideToggle("slow");
		$(this).toggleClass("vo_titleactive"); return false;
	});
*/	
	 
});

// discussion expand and collapse


$(document).ready(function(){
	
	$(".ddeboxs:not(:first)").hide();

	$(".discuss2").click(function(){
		$(this).next(".ddeboxs").slideToggle("slow")
		.siblings(".ddeboxs:visible").slideUp("slow");
		
	});

});

//Discussions Map
$(document).ready(function(){
	$(".recommendationsinfo").hide();
	$('.compnameanchore').click(function(){
	$('.recommendationsinfo').toggle(400);
    return false;
	});
});

$(document).ready(function(){
	$('a.feedbacklight').click(function() {
		$('#feedLocation').html(window.location.pathname);
		
		$('.myfeed').toggle(function() {
			$('.myfeed').animate({ 
		        width: "400px",
				disply:"block"
		      },500 );
		return false;
		});
	});
	

/*	$('a.tellfrlight').click(function() {
		
		$('.tellfriend').toggle(function() {
			$('.tellfriend').animate({ 
		        width: "400px",
				disply:"block"
		      },500 );
		return false;
		});
	});
*/	
	
});

$(document).ready(function(){
	
	// FAQ Scroll 
	$('.faqs h3 a').bind('click',function(event){
	var $anchor = $(this);
	
	$('html, body').stop().animate({
		scrollTop: $($anchor.attr('href')).offset().top
	}, 1500,'easeInOutExpo');
	event.preventDefault();
});
		
});

