jQuery.noConflict();
	
jQuery(document).ready(	function()	{
var ttopjp_state = get_cookie('ttopjp');
var tsidejp_state = get_cookie('tsidejp');

	
	//if ((ttopjp_state == null) || (tsidejp_state == null)){
		//jQuery("#body1").css({display:"block"});
		//jQuery("#rightPan").css({display:"block"});
	//}
	

	jQuery(".rightpan_toggle").click(function(){
		if (tsidejp_state == 'tsidejp_cls'){
		jQuery("#mainbody").width(600);
		jQuery("#rightPan").slideDown("slow");
		jQuery(".rightpan_toggle").html('<img src="'+close2_img+'">');
		set_cookie('tsidejp', 'tsidejp_opn' ,'/');
		tsidejp_state = 'tsidejp_opn';
		}else {
		jQuery("#rightPan").slideUp("slow",function(){
		jQuery("#mainbody").width(850);
		});
		jQuery(".rightpan_toggle").html('<img src="'+open2_img+'">');
		set_cookie('tsidejp', 'tsidejp_cls' ,'/');
		tsidejp_state = 'tsidejp_cls';
		}
	});	
jQuery("#comment").before('<div id="comment_toggle"></div><div id="comloading_msg"></div>');
	jQuery("#comment_toggle").html('<img src="'+commento_img+'"> Comments');	
	jQuery("#comment").slideUp("fast");
	jQuery("#comment_toggle").toggle(function(){
	jQuery("#comloading_msg").html("loading....").slideDown("fast",function(){
	jQuery("#comment").slideDown("slow",function(){
	jQuery("#comloading_msg").slideUp("fast");
	jQuery("#comment_toggle").html('<img src="'+commentc_img+'"> Comments');
	});
	});
	},function(){
	jQuery("#comment").slideUp("slow");
	jQuery("#comment_toggle").html('<img src="'+commento_img+'"> Comments');
	});
	
jQuery(".login_link").toggle(function(){
		jQuery("#top").slideDown("slow");
		},function(){
		jQuery("#top").slideUp("slow");
		});
});

function set_cookie ( name, value, path){
  var cookie_string = name + "=" + escape ( value );
  
  if ( path )
        cookie_string += "; path=" + escape ( path );
  
  document.cookie = cookie_string;
}

function get_cookie ( cookie_name ){
  var results = document.cookie.match ( cookie_name + '=(.*?)(;|$)' );

  if ( results )
    return ( unescape ( results[1] ) );
  else
    return null;
}




jQuery.noConflict();
	 jQuery(document).ready(function() {
			jQuery.accordian = function(items, first, options) {
			
				var active = first;
				var running = 0;

				var titles = options && options.titles || '.sliderjp_title';
				var contents = options && options.contents || '.sliderjp_content';
				var onClick = options && options.onClick || function(){};
				var onShow = options && options.onShow || function(){};
				var onHide = options && options.onHide || function(){};
				var showSpeed = options && options.showSpeed || 'slow';
				var hideSpeed = options && options.hideSpeed || 'fast';

				jQuery(items).not(active).children(contents).hide();
				jQuery(items).each(onHide);
				jQuery(active).each(onShow);

				jQuery(items).children(titles).click(function(e){

					var p = jQuery(contents, this.parentNode);
					jQuery(this.parentNode).each(onClick);

					jQuery(active).children(contents).not(':hidden').slideUp(hideSpeed, function(){
					jQuery(this.parentNode).removeClass('on').addClass('off');
					});
					var check = jQuery(this.parentNode).attr("id");
				
					if ("#"+check != active){
					p.slideDown(showSpeed, function(){});
					jQuery(active).each(onHide);
					active = '#' + jQuery(this.parentNode)[0].id;
					jQuery(active).each(onShow);

					}else{
					active = "#null";
					}
									
					return false;
				});

			};

			
			jQuery(function(){
			
var jqsliderjp_cookie = "#"+get_cookie('sjp_cookie');
if (jqsliderjp_cookie == '#null'){
var jqsliderjp_cookie = '#eve0';
}
			
				jQuery.accordian('#sliderjp_event > div', jqsliderjp_cookie,{
					onClick:function(){set_cookie('sjp_cookie', this.id ,'/')},
					onShow:function(){jQuery(this).removeClass('off').addClass('on');},
					onHide:function(){jQuery(this).removeClass('on').addClass('off');},
					showSpeed:400,
					hideSpeed:400});
});
});
	 
	 
