// JavaScript Document
//Mypod Pod page init

$(document).ready(function() {
			
  	//accordion
			$('#accordion').accordion({
				header: ".ui-accordion-header",
				clearStyle: true
			});

 
	// open window
	$('a.newwin').click(function() {
    var href = $(this).attr('href');
    window.open(href, 'livestock Transport',
    'height=600,width=600,scrollbars=yes,toolbar=no');
    return false;
  });

$("#TripTicket").tablesorter( 
			  {widgets: ['zebra']
    }); 
$("#MyTickets").tablesorter( 
			  {widgets: ['zebra']
    }); 
$("#Haulerlst").tablesorter( 
			  {headers :{4:{sorter: false}} ,widgets: ['zebra']
    }).tablesorterPager({container: $("#pager"), size:30,positionFixed: false});;
$("#Triplst").tablesorter( 
			  {widgets: ['zebra'],sortList: [[3,1]] 
    }).tablesorterPager({container: $("#pager"),size:30,positionFixed: false});;
$("#Requestlst").tablesorter( 
			  {widgets: ['zebra'],sortList: [[3,1]] 
    }).tablesorterPager({container: $("#pager"),size: 30, positionFixed: false});;

   $("#haulerchk").each( function() {
	if (this.checked) {
		 $("#displayh").show();
	 }else {
     $("#displayh").hide();
	 };			   
  });

   $("#haulerchk").click(function() {
	 if (this.checked) {
		 $("#displayh").show("slow");
	 }else {
     $("#displayh").hide("slow");
	 };
   });

//hover states on the static widgets
	$('#dialog_link, ul#icons li').hover(
		function() { $(this).addClass('ui-state-hover'); }, 
		function() { $(this).removeClass('ui-state-hover'); }
	);


// Comments
$("#commentform").hide();
$(".comment").click(function() {
		 $("#commentform").toggle("slow");

 });

$(".replyform").hide();
$(".replylnk").click(
		function() { $(this).next(".replyform").toggle("slow");	}	 
 );		 
		 
$("#tabs").tabs();


$("#starsfeedback").children().not(":radio, span").hide();
$("#starsfeedback").stars();
		 
		 
		 
});// end ready


function submit_search() {	
		$('#searchcri').submit();
	}