
function noTeaser () {

  jQuery("#front-text div.teaser").each(function (i){
        // use the loop counter argument to locate its paired match
        
        

       if (i<4) {
       	// attach a toggle effect to the "a.author" element
        jQuery(this).fadeOut(300);
        
               }
         
        
    });

}


function noHover () {

  jQuery('.slider').each(function (i){
        // use the loop counter argument to locate its paired match
        
        jQuery(this).removeClass('slider-hover');
        
    });
}

jQuery(document).ready(function ($){

    $("#teasers > div").each(function (i){
        // use the loop counter argument to locate its paired match
        
        var $match = $("#front-text div.teaser").eq(i);
	$match.hide();
        

       if (i>=0) {
       	// attach a toggle effect to the "a.author" element
        $(this).bind ("mouseenter",   function (){
				      // $match.slideDown(); 
				      //$("div.teaser:lt(4)").hide(0);
				      //  $match.animate({width: 'show'},1);
				        noTeaser();
				        noHover();
				        $(this).addClass('slider-hover'); 
				        $match.fadeIn(300,function(){ 
  								  if ($.browser.msie){this.style.removeAttribute('filter')};
  							} 
  					)
  					
				    }
           );
       /* $(this).bind("mouseleave", function (){
					 // slide down the matching "div.author_bio" element
					 //$match.slideUp(); 
					// $match.animate({width: 'hide'}, 500);
					  $match.fadeOut(300);
				     }
           );*/
        }
         
        
    });
    
    $("#main").bind ("mouseleave", function () {noTeaser();noHover();});


 /*   $("#teaser-container div.teaser").each(function (i){
        // use the loop counter argument to locate its paired match
                
	if (i<4) {
       
       	// attach a toggle effect to the "a.author" element
        $(this).hover (   function (){
        			$(this).fadeIn(400,function(){ 
  								  if ($.browser.msie){this.style.removeAttribute('filter')};
  							} 
  					)

				    }
				    ,
				    function () {$(this).fadeOut(300);
				    }
				    
				    
				    
	     );
          }   
         
        
    });
    */


    
    
   /*
   $('*').hover(  
	     function() {  
	      $(this).addClass('hover');  
	      },  
	     function() {  
	      $(this).removeClass('hover'); 
	      }
     ); 
     */

    /*
    $('.slider').hover(  
	     function() {  
	      $(this).addClass('slider-hover');  
	      },  
	     function() {  
	      $(this).removeClass('slider-hover'); 
	      }
     );
     
     */


});



 function bindOnClickPostBack($) {
                $(".slider").each(function () { 
                $(this).bind('click', function () {
                			 var anchor = $(this).find("a");
                			 document.location=anchor.attr('href')
                			});
               
            	//var clickEvent = function () {document.location=anchor.attr('href')};

            });
                return false;
    }

    jQuery(document).ready(function($) {
        bindOnClickPostBack($);
    });


