// JavaScript Document
$(document).ready(function(){
//start doc ready		

//create a function that hides
function hideit(joint){
//hide elements
				
                var $elem = joint;             // The element or elements with the text to hide
                var $limit = 45;                // The number of characters to show
                var $str = $elem.html();        // Getting the text
                var $strtemp = $str.substr(0,$limit);   // Get the visible part of the string
                $str = $strtemp + '<span class="hide">' + $str.substr($limit,$str.length) + '</span>';  // Recompose the string with the span tag wrapped around the hidden part of it
                $elem.html($str);               // Write the string to the DOM 

};


//this simple script created to allow coreposition visitors to view job listing with out the page becoming increasingly long.
	//talk to all tumblr p elements
	$(".tumblr_body p").each(function(){
				$(this).addClass('plus');
				//make cursor into little finger
				$(this).css('cursor','pointer');
				
				//change background on hover to iterate
				$(this).mouseover(function(){
										   
					$(this).css('background-color','#EAEAEA');					   
										   
				});
				
				$(this).mouseout(function(){
										   
					$(this).css('background-color','#FFFFFF');					   
										   
				});
				
				hideit($(this));
				
				
									  
		$(".hide").css('display','none');							  
			
		$(this).toggle(function(){

				
				$(this).removeClass('plus').addClass('minus');
				$(this).children('.hide').fadeIn(2000);	
				
								
		},function(){
			

			$(this).children('.hide').hide();
			$(this).removeClass('minus').addClass('plus');
			
		});
			
	});					   
					
					
//end doc read		  
});
