// initiate summarize...
$(document).ready(function() {
  $('.expandable').summarize({summaryElements: 2});
});

// initiate superfish...
    $(document).ready(function(){ 
        $("#header ul#navList").superfish({ 
            delay:     5               // delay on mouseout 
        }); 
    });
    
// hover for login submit and sort submit
$(document).ready(function() {
		$(".wolfe #loginSubmit").mouseover(function(){
			imgsrc = $(this).attr("src");
			matches = imgsrc.match(/_on/);
			
			// don't do the rollover if state is already ON
			if (!matches) {
			imgsrcON = imgsrc.replace(/.gif$/ig,"_wolfe_on.gif"); // strip off extension
			$(this).attr("src", imgsrcON);
			}
		});
		$(".wolfe #loginSubmit").mouseout(function(){
			$(this).attr("src", imgsrc);
		});
		
		$(".wolfe #sortSubmit").mouseover(function(){
			imgsrc = $(this).attr("src");
			matches = imgsrc.match(/_on/);
			
			// don't do the rollover if state is already ON
			if (!matches) {
			imgsrcON = imgsrc.replace(/.gif$/ig,"_wolfe_on.gif"); // strip off extension
			$(this).attr("src", imgsrcON);
			}
		});
		$(".wolfe #sortSubmit").mouseout(function(){
			$(this).attr("src", imgsrc);
		});
		
		$(".lang #loginSubmit").mouseover(function(){
			imgsrc = $(this).attr("src");
			matches = imgsrc.match(/_on/);
			
			// don't do the rollover if state is already ON
			if (!matches) {
			imgsrcON = imgsrc.replace(/.gif$/ig,"_lang_on.gif"); // strip off extension
			$(this).attr("src", imgsrcON);
			}
		});
		$(".lang #loginSubmit").mouseout(function(){
			$(this).attr("src", imgsrc);
		});
		
		$(".lang #sortSubmit").mouseover(function(){
			imgsrc = $(this).attr("src");
			matches = imgsrc.match(/_on/);
			
			// don't do the rollover if state is already ON
			if (!matches) {
			imgsrcON = imgsrc.replace(/.gif$/ig,"_lang_on.gif"); // strip off extension
			$(this).attr("src", imgsrcON);
			}
		});
		$(".lang #sortSubmit").mouseout(function(){
			$(this).attr("src", imgsrc);
		});
		
		$(".gordon #loginSubmit").mouseover(function(){
			imgsrc = $(this).attr("src");
			matches = imgsrc.match(/_on/);
			
			// don't do the rollover if state is already ON
			if (!matches) {
			imgsrcON = imgsrc.replace(/.gif$/ig,"_gordon_on.gif"); // strip off extension
			$(this).attr("src", imgsrcON);
			}
		});
		$(".gordon #loginSubmit").mouseout(function(){
			$(this).attr("src", imgsrc);
		});
		
		$(".gordon #sortSubmit").mouseover(function(){
			imgsrc = $(this).attr("src");
			matches = imgsrc.match(/_on/);
			
			// don't do the rollover if state is already ON
			if (!matches) {
			imgsrcON = imgsrc.replace(/.gif$/ig,"_gordon_on.gif"); // strip off extension
			$(this).attr("src", imgsrcON);
			}
		});
		$(".gordon #sortSubmit").mouseout(function(){
			$(this).attr("src", imgsrc);
		});
});