// JavaScript Document
var curSolBox = 0;
var totSolBoxLen = 0;
var preSolBox = 0;
var InterIDSolBox;
jQuery(document).ready(function() {
		
		totSolBoxLen = jQuery(".cont div.thumb-txt-blk").length;					
		
		jQuery(".cont div.thumb-txt-blk").children('.thumbtop').animate( { height:"100px" }, { queue:false, duration:100 });
		jQuery(".cont div.thumb-txt-blk").eq(defaultSolBox).children('.thumbtop').animate( { height:"140px" }, { queue:false, duration:250 });
		jQuery(".cont div.thumb-txt-blk").eq(defaultSolBox).children('.thumbtop').children('p').fadeIn('fast');
		
		
		jQuery('.thumb-txt-blk').hover(function() 
			{
				clearInterval(InterIDSolBox);
				curSolBox = jQuery(".cont div.thumb-txt-blk").index(this);
				//moveUpSolBox(curSolBox);
				for(i=0;i<=totSolBoxLen;i++){
					if(i==curSolBox){
						//if(defaultSolBox!=curSolBox){
							jQuery(".cont div.thumb-txt-blk").eq(i).children('.thumbtop').animate( { height:"140px" }, { queue:false, duration:250 });
							jQuery(".cont div.thumb-txt-blk").eq(i).children('.thumbtop').children('p').fadeIn('fast');
						//}
					}
					else{
						
						jQuery(".cont div.thumb-txt-blk").eq(i).children('.thumbtop').animate( { height:"100px" }, { queue:false, duration:250 });
						jQuery(".cont div.thumb-txt-blk").eq(i).children('.thumbtop').children('p').fadeOut('fast');
						
					}
				}
				//var hoverClick = jQuery(this).attr("rel");			
				//var goTo = jQuery(hoverClick).offset().top;
				//jQuery("html:not(:animated),body:not(:animated)").animate({ scrollTop: goTo}, 1000);
				//$('div').animate({height : '500px', top : '+=500px'}, 2000);
			},
			function()
			{
				jQuery(".cont div.thumb-txt-blk").eq(curSolBox).children('.thumbtop').animate( { height:"100px" }, { queue:false, duration:250 });
				jQuery(".cont div.thumb-txt-blk").eq(curSolBox).children('.thumbtop').children('p').fadeOut('fast');
				InterIDSolBox = setInterval(resetSolBox,2000)
			}
		);
		
		
});


function resetSolBox(){
				clearInterval(InterIDSolBox);
				jQuery(".cont div.thumb-txt-blk").eq(defaultSolBox).children('.thumbtop').animate( { height:"140px" }, { queue:false, duration:250 });
				jQuery(".cont div.thumb-txt-blk").eq(defaultSolBox).children('.thumbtop').children('p').fadeIn('fast');
				
}

// This script for Help Me Understand Section //

var curHelpScrl = 1;
jQuery(document).ready(function(){

	jQuery(".slider").css("height","225px");
	jQuery(".sliderSingle").css("height","252px");
	jQuery(".slider-content").css("height","225px");
	jQuery(".sliderSingle-content").css("height","252px");
	jQuery(".in-top-cont").css("height","251px")
		totHelpScrlLen = jQuery(".help-container li").length;
		jQuery(".help-out-cont").css("height","176px");
		jQuery("#helpScrlDown").click(function(){
			if(curHelpScrl!=totHelpScrlLen-1 && totHelpScrlLen>2){
				curHelpScrl = curHelpScrl+1;
				jQuery(".help-container").stop().animate({marginTop:-((curHelpScrl-1)*88)+"px"},500)
			}
		});
		
		jQuery("#helpScrlUp").click(function(){
			if(curHelpScrl!=1 && totHelpScrlLen>2){
				curHelpScrl = curHelpScrl-1;
				jQuery(".help-container").stop().animate({marginTop:-((curHelpScrl-1)*88)+"px"},500)
			}
		});
		
});

// This script for Help Me Understand Section End Here //