var period = "year";
var GraphSize = "small";
var TickerStringNo = 1;
<!--
$(function () {
    // basic version is: $('div.demo marquee').marquee() - but we're doing some sexy extras
    $('marquee').marquee('pointer').mouseover(function () {
        //$(this).trigger('stop');
    }).mouseout(function () {
        //$(this).trigger('start');
    }).mousemove(function (event) {
        if ($(this).data('drag') == true) {
            this.scrollLeft = $(this).data('scrollX') + ($(this).data('x') - event.clientX);
        }
    }).mousedown(function (event) {
        $(this).data('drag', true).data('x', event.clientX).data('scrollX', this.scrollLeft);
    }).mouseup(function () {
        $(this).data('drag', false);
    }).bind("stop", function(){
    	$('.pointer p').load("ajax_responder.php?function=getTickerString&parameters=StartFrom="+TickerStringNo,"", function (){
    		
    		$(this).trigger('start');
    	});TickerStringNo = TickerStringNo+1;
    });
    $('.pointer p').disableSelection();
});
//-->
$(function() {
	$("#tabs").tabs({ fx: { opacity: 'toggle' } });
});
$(function() {
	$('.PajamasTable.highlight tr').mouseover(
		function (){
    		$(this).css({'background-color' : 'yellow', 'font-weight' : 'bold'});
    	}
	);
	$('.PajamasTable.highlight tr').mouseout(
		function (){
    		$(this).css({'background-color' : '', 'font-weight' : ''});
    	}
	);
	$('.PajamasTable.highlight tr:first').mouseover(
		function (){
    		$(this).css({'background-color' : '', 'font-weight' : ''});
    	}
	);
});
$(function() {
	$('.PajamasTableSearch.highlight tr').mouseover(
		function (){
    		$(this).css({'background-color' : 'yellow', 'font-weight' : 'bold'});
			alert('testingg');
    	}
	);
	$('.PajamasTableSearch.highlight tr').mouseout(
		function (){
    		$(this).css({'background-color' : '', 'font-weight' : ''});
    	}
	);
	$('.PajamasTableSearch.highlight tr:first').mouseover(
		function (){
    		$(this).css({'background-color' : '', 'font-weight' : ''});
    	}
	);
   });
$(function() {
	$('.PajamasTable tr:even').attr('class','evenRow');
	$('.PajamasTable tr:odd').attr('class','oddRow');
	$('.PajamasTable tr:first').attr('class','headerRow');
});

$(function() {
	$('.LIDate').click(
    	function (){
    		$($(this).parent()).children().slideToggle(1000);
    		$(this).slideToggle('slow');
    		//alert($(this).css('background-image'));
    		//alert($(this).children(0).className);
    		if( $(this).css('background-image').search('minusicon.jpg') == -1){
    			$(this).css('background-image','url(images/minusicon.jpg)');
    		}else{
    			$(this).css('background-image','url(images/moreicon.jpg)');
    		}
    	}
	)
});
$(function() {
	$('.NewsTD ul li .lessNews .MoreButton').click(
    	function (){
    		$(this).parent().slideToggle();
    		$($($(this).parent().parent().get(0)).children(0).get(2)).slideToggle();
    	}
	)
});
$(function() {
	$('.NewsTD ul li .moreNews .LessButton').click(
    	function (){
    		$(this).parent().slideToggle();
    		$($($(this).parent().parent().get(0)).children(0).get(1)).slideToggle();
    	}
	)
});
$(function() {
	$('table.ToolTipsRows tr').hover(
	     function(){
	    	 //alert(($($(this)).width()));
	       var p = $(this).position();
	       $(this).aqTipOne( $($($(this).children().get(0)).children().get(0)).html() ,{marginX: -($($(this)).width()) ,marginY: ($($(this)).height()) }) },
	     function(){ $(this).aqTipOne() }
	  );
});
$(function() {
	$('#minimizeGraph').click(
	     function(){
			 var Gwidth=350;
	    	 $('#chart').height(150);
	    	 $('#ie_chart').height(150);
	    	 $('#chart').width(Gwidth);
	    	 $('#ie_chart').width(Gwidth);
//	    	 $('#chart').animate({height:'150',width:'424'});
//	    	 $('#ie_chart').animate({height:'150',width:'424'});
	    	 $('#case30LastStateTD').show();
	    	 $('#case30LastStateTD').animate({opacity: 1});
	    	 $(this).hide();
	    	 $('#enlargeGraph').show();
	    	 GraphSize = "small";
	     }
	);
	$('#enlargeGraph').click(
	     function(){
			 var Gwidth=520;
	    	 $('#case30LastStateTD').animate({opacity: 0});
	    	 $('#case30LastStateTD').hide();
//	    	 $('#chart').height(400);
//	    	 $('#ie_chart').height(400);
//	    	 $('#chart').width(596);
//	    	 $('#ie_chart').width(596);
	    	 $('#chart').animate({height:'400',width:Gwidth});
	    	 $('#ie_chart').animate({height:'400',width:Gwidth});
	    	 $(this).hide();
	    	 $('#minimizeGraph').show();
	    	 GraphSize = "large";
	     }
	);
});
function setGraphSize(){
	var GwidthSml=330;
	var GwidthLarg=520;
	if(GraphSize == "large"){
		 $('#chart').height(400);
	   	 $('#ie_chart').height(400);
	   	 $('#chart').width(GwidthLarg);
	   	 $('#ie_chart').width(GwidthLarg);
	   	 $(this).hide();
	   	 $('#minimizeGraph').show();
	   	 $('#case30LastStateTD').hide();
	}else{
		$('#chart').height(150);
	   	 $('#ie_chart').height(150);
	   	 $('#chart').width(GwidthSml);
	   	 $('#ie_chart').width(GwidthSml);
	   	 $(this).hide();
	   	 $('#enlargeGraph').show();
	   	 $('#case30LastStateTD').show();
	}
}
