﻿var ol_bgclass = "ol_bgclass";
var ol_fgclass="ol_fgclass";
var ol_fgclass="ol_fgclass";
var ol_textfontclass="ol_textfontclass";
var ol_captionfontclass="ol_captionfontclass";
var ol_closefontclass="ol_closefontclass";

$(document).ready(function(){ 
    $("ul.sf-menu").supersubs({minWidth:10,maxWidth:20,extraWidth:1}).superfish({speed: 'fast'}).find('ul').bgIframe({opacity:false}); 

    if ( $("#pageAlert").length > 0 )
	{
		tb_show("Rockford Public Schools Alert", "#TB_inline?height=300&width=400&inlineId=pageAlert", null);
	}    
   
   var sliderHeight = "107px";    
   //Get height of each expandable item
   $('.expandable').each(function () {
        $(this).attr('box_h',$(this).height());
        $(this).css('height', sliderHeight);
        var htm = $(this).html();
        htm = htm + '<span class="expandTag">Read More</span>';
        $(this).html(htm);
   });

   $('.expandTag').click(function() { 
        
        var panel = $(this).parent();
        var bPad = $(this).css('padding-bottom').replace('px','') * 1;        
        
        if(panel.css('height') == sliderHeight)
        {
            var openHeight = (panel.attr('box_h') * 1) + 20;
            openHeight = openHeight.toString() + 'px';
            
            panel.animate({'height': openHeight }, {duration: 'fast' });
            $(this).html('Less');
        }        
        else
        {
            panel.animate({ 'height': sliderHeight }, {duration: 'fast' });
            $(this).html('Read More');
        }   
   });
});



