//global
var gObj;

//should start print out thumbs with a hover effect
function setupThumbs(){
	
	$('.ruta').mouseenter(function(e) {
        $(this).children('a').children('img').animate({ height: '121', left: '-10', top: '-10', width: '121'}, 75);
		
		$(this).children('a').children('img').css('z-index','2');
		
		//get the alt omg image	
		//var alt = $(this).children('img').attr('alt');
	
    }).mouseleave(function(e) {
        $(this).children('a').children('img').animate({ height: '99', left: '0', top: '0', width: '99'}, 75);
        $(this).children('a').children('img').css('z-index','1');
        
    });
    	
}

//roll diffrent text in textBox
function setupCarusell(obj){
	//alert( obj.count );
	gObj = obj;
	
	var times = obj.count;
	
	$(document).everyTime(obj.timer, function(i) {
  		slideDown(i);
	}, times);

}

function slideDown(i){

	var slider = $('.slider');
	var pos = -(108*i);
	
	slider.animate( {top: pos+'' },850 );
	
	if( i == gObj.count ){
		
		slider.delay(gObj.stopAtEnd).animate( {top: '0' },250 );
		
		//restart
		$(document).everyTime(gObj.timer, function(i) {
  		slideDown(i);
		}, gObj.count);

	}
	
}

function showVideo(id){
	var vid = $('#videoBox');
	
	if( vid.height() == 0 ){
		$('html').css('overflow','auto');
		$('body').css('overflow','auto');
		vid.animate( {height: '540' },850 );
		
	} else {
		$('html').css('overflow','hidden');
		$('body').css('overflow','hidden');
		vid.animate( {height: '0' },850 );
	}
	
}






