
//function
//---------------------------------------------------------------------
function bentopop1()
{		
	$(".bentoPop1").css("display","block");
	$(".bentoPop2").css("display","none");
	$(".bentoPop3").css("display","none");
	$(".bentoPop4").css("display","none");
	$(".bentoPop5").css("display","none");
	$(".bentoPop6").css("display","none");
	$(".bentoPop7").css("display","none");
	$(".bentoPop8").css("display","none");
	$(".bentoPop9").css("display","none");
	$(".bentoPop10").css("display","none");
	$(".bentoPop11").css("display","none");
	$(".bentoPop12").css("display","none");
	$(".bentoPop13").css("display","none");
	$(".bentoPop14").css("display","none");
	$(".bentoPop15").css("display","none");
	$(".bentoPop16").css("display","none");
	$(".bentoPop17").css("display","none");
}

function bentopop2()
{		
	$(".bentoPop2").css("display","block");
	$(".bentoPop1").css("display","none");
	$(".bentoPop3").css("display","none");
	$(".bentoPop4").css("display","none");
	$(".bentoPop5").css("display","none");
	$(".bentoPop6").css("display","none");
	$(".bentoPop7").css("display","none");
	$(".bentoPop8").css("display","none");
	$(".bentoPop9").css("display","none");
	$(".bentoPop10").css("display","none");
	$(".bentoPop11").css("display","none");
	$(".bentoPop12").css("display","none");
	$(".bentoPop13").css("display","none");
	$(".bentoPop14").css("display","none");
	$(".bentoPop15").css("display","none");
	$(".bentoPop16").css("display","none");
	$(".bentoPop17").css("display","none");
}

function bentopop3()
{		
	$(".bentoPop3").css("display","block");
	$(".bentoPop1").css("display","none");
	$(".bentoPop2").css("display","none");
	$(".bentoPop4").css("display","none");
	$(".bentoPop5").css("display","none");
	$(".bentoPop6").css("display","none");
	$(".bentoPop7").css("display","none");
	$(".bentoPop8").css("display","none");
	$(".bentoPop9").css("display","none");
	$(".bentoPop10").css("display","none");
	$(".bentoPop11").css("display","none");
	$(".bentoPop12").css("display","none");
	$(".bentoPop13").css("display","none");
	$(".bentoPop14").css("display","none");
	$(".bentoPop15").css("display","none");
	$(".bentoPop16").css("display","none");
	$(".bentoPop17").css("display","none");
}

function bentopop4()
{		
	$(".bentoPop4").css("display","block");
	$(".bentoPop1").css("display","none");
	$(".bentoPop2").css("display","none");
	$(".bentoPop3").css("display","none");
	$(".bentoPop5").css("display","none");
	$(".bentoPop6").css("display","none");
	$(".bentoPop7").css("display","none");
	$(".bentoPop8").css("display","none");
	$(".bentoPop9").css("display","none");
	$(".bentoPop10").css("display","none");
	$(".bentoPop11").css("display","none");
	$(".bentoPop12").css("display","none");
	$(".bentoPop13").css("display","none");
	$(".bentoPop14").css("display","none");
	$(".bentoPop15").css("display","none");
	$(".bentoPop16").css("display","none");
	$(".bentoPop17").css("display","none");
}

function bentopop5()
{		
	$(".bentoPop5").css("display","block");
	$(".bentoPop1").css("display","none");
	$(".bentoPop2").css("display","none");
	$(".bentoPop3").css("display","none");
	$(".bentoPop4").css("display","none");
	$(".bentoPop6").css("display","none");
	$(".bentoPop7").css("display","none");
	$(".bentoPop8").css("display","none");
	$(".bentoPop9").css("display","none");
	$(".bentoPop10").css("display","none");
	$(".bentoPop11").css("display","none");
	$(".bentoPop12").css("display","none");
	$(".bentoPop13").css("display","none");
	$(".bentoPop14").css("display","none");
	$(".bentoPop15").css("display","none");
	$(".bentoPop16").css("display","none");
	$(".bentoPop17").css("display","none");
}

function bentopop6()
{		
	$(".bentoPop6").css("display","block");
	$(".bentoPop1").css("display","none");
	$(".bentoPop2").css("display","none");
	$(".bentoPop3").css("display","none");
	$(".bentoPop4").css("display","none");
	$(".bentoPop5").css("display","none");
	$(".bentoPop7").css("display","none");
	$(".bentoPop8").css("display","none");
	$(".bentoPop9").css("display","none");
	$(".bentoPop10").css("display","none");
	$(".bentoPop11").css("display","none");
	$(".bentoPop12").css("display","none");
	$(".bentoPop13").css("display","none");
	$(".bentoPop14").css("display","none");
	$(".bentoPop15").css("display","none");
	$(".bentoPop16").css("display","none");
	$(".bentoPop17").css("display","none");
}

function bentopop7()
{		
	$(".bentoPop7").css("display","block");
	$(".bentoPop1").css("display","none");
	$(".bentoPop2").css("display","none");
	$(".bentoPop3").css("display","none");
	$(".bentoPop4").css("display","none");
	$(".bentoPop5").css("display","none");
	$(".bentoPop6").css("display","none");
	$(".bentoPop8").css("display","none");
	$(".bentoPop9").css("display","none");
	$(".bentoPop10").css("display","none");
	$(".bentoPop11").css("display","none");
	$(".bentoPop12").css("display","none");
	$(".bentoPop13").css("display","none");
	$(".bentoPop14").css("display","none");
	$(".bentoPop15").css("display","none");
	$(".bentoPop16").css("display","none");
	$(".bentoPop17").css("display","none");
}

function bentopop8()
{		
	$(".bentoPop8").css("display","block");
	$(".bentoPop1").css("display","none");
	$(".bentoPop2").css("display","none");
	$(".bentoPop3").css("display","none");
	$(".bentoPop4").css("display","none");
	$(".bentoPop5").css("display","none");
	$(".bentoPop6").css("display","none");
	$(".bentoPop7").css("display","none");
	$(".bentoPop9").css("display","none");
	$(".bentoPop10").css("display","none");
	$(".bentoPop11").css("display","none");
	$(".bentoPop12").css("display","none");
	$(".bentoPop13").css("display","none");
	$(".bentoPop14").css("display","none");
	$(".bentoPop15").css("display","none");
	$(".bentoPop16").css("display","none");
	$(".bentoPop17").css("display","none");
}

function bentopop9()
{		
	$(".bentoPop9").css("display","block");
	$(".bentoPop1").css("display","none");
	$(".bentoPop2").css("display","none");
	$(".bentoPop3").css("display","none");
	$(".bentoPop4").css("display","none");
	$(".bentoPop5").css("display","none");
	$(".bentoPop6").css("display","none");
	$(".bentoPop7").css("display","none");
	$(".bentoPop8").css("display","none");
	$(".bentoPop10").css("display","none");
	$(".bentoPop11").css("display","none");
	$(".bentoPop12").css("display","none");
	$(".bentoPop13").css("display","none");
	$(".bentoPop14").css("display","none");
	$(".bentoPop15").css("display","none");
	$(".bentoPop16").css("display","none");
	$(".bentoPop17").css("display","none");
}

function bentopop10()
{		
	$(".bentoPop10").css("display","block");
	$(".bentoPop1").css("display","none");
	$(".bentoPop2").css("display","none");
	$(".bentoPop3").css("display","none");
	$(".bentoPop4").css("display","none");
	$(".bentoPop5").css("display","none");
	$(".bentoPop6").css("display","none");
	$(".bentoPop7").css("display","none");
	$(".bentoPop8").css("display","none");
	$(".bentoPop9").css("display","none");
	$(".bentoPop11").css("display","none");
	$(".bentoPop12").css("display","none");
	$(".bentoPop13").css("display","none");
	$(".bentoPop14").css("display","none");
	$(".bentoPop15").css("display","none");
	$(".bentoPop16").css("display","none");
	$(".bentoPop17").css("display","none");
}

function bentopop11()
{		
	$(".bentoPop11").css("display","block");
	$(".bentoPop1").css("display","none");
	$(".bentoPop2").css("display","none");
	$(".bentoPop3").css("display","none");
	$(".bentoPop4").css("display","none");
	$(".bentoPop5").css("display","none");
	$(".bentoPop6").css("display","none");
	$(".bentoPop7").css("display","none");
	$(".bentoPop8").css("display","none");
	$(".bentoPop9").css("display","none");
	$(".bentoPop10").css("display","none");
	$(".bentoPop12").css("display","none");
	$(".bentoPop13").css("display","none");
	$(".bentoPop14").css("display","none");
	$(".bentoPop15").css("display","none");
	$(".bentoPop16").css("display","none");
	$(".bentoPop17").css("display","none");
}

function bentopop12()
{		
	$(".bentoPop12").css("display","block");
	$(".bentoPop1").css("display","none");
	$(".bentoPop2").css("display","none");
	$(".bentoPop3").css("display","none");
	$(".bentoPop4").css("display","none");
	$(".bentoPop5").css("display","none");
	$(".bentoPop6").css("display","none");
	$(".bentoPop7").css("display","none");
	$(".bentoPop8").css("display","none");
	$(".bentoPop9").css("display","none");
	$(".bentoPop10").css("display","none");
	$(".bentoPop11").css("display","none");
	$(".bentoPop13").css("display","none");
	$(".bentoPop14").css("display","none");
	$(".bentoPop15").css("display","none");
	$(".bentoPop16").css("display","none");
	$(".bentoPop17").css("display","none");
}

function bentopop13()
{		
	$(".bentoPop13").css("display","block");
	$(".bentoPop1").css("display","none");
	$(".bentoPop2").css("display","none");
	$(".bentoPop3").css("display","none");
	$(".bentoPop4").css("display","none");
	$(".bentoPop5").css("display","none");
	$(".bentoPop6").css("display","none");
	$(".bentoPop7").css("display","none");
	$(".bentoPop8").css("display","none");
	$(".bentoPop9").css("display","none");
	$(".bentoPop10").css("display","none");
	$(".bentoPop11").css("display","none");
	$(".bentoPop12").css("display","none");
	$(".bentoPop14").css("display","none");
	$(".bentoPop15").css("display","none");
	$(".bentoPop16").css("display","none");
	$(".bentoPop17").css("display","none");
}

function bentopop14()
{		
	$(".bentoPop14").css("display","block");
	$(".bentoPop1").css("display","none");
	$(".bentoPop2").css("display","none");
	$(".bentoPop3").css("display","none");
	$(".bentoPop4").css("display","none");
	$(".bentoPop5").css("display","none");
	$(".bentoPop6").css("display","none");
	$(".bentoPop7").css("display","none");
	$(".bentoPop8").css("display","none");
	$(".bentoPop9").css("display","none");
	$(".bentoPop10").css("display","none");
	$(".bentoPop11").css("display","none");
	$(".bentoPop12").css("display","none");
	$(".bentoPop13").css("display","none");
	$(".bentoPop15").css("display","none");
	$(".bentoPop16").css("display","none");
	$(".bentoPop17").css("display","none");
}

function bentopop15()
{		
	$(".bentoPop15").css("display","block");
	$(".bentoPop1").css("display","none");
	$(".bentoPop2").css("display","none");
	$(".bentoPop3").css("display","none");
	$(".bentoPop4").css("display","none");
	$(".bentoPop5").css("display","none");
	$(".bentoPop6").css("display","none");
	$(".bentoPop7").css("display","none");
	$(".bentoPop8").css("display","none");
	$(".bentoPop9").css("display","none");
	$(".bentoPop10").css("display","none");
	$(".bentoPop11").css("display","none");
	$(".bentoPop12").css("display","none");
	$(".bentoPop13").css("display","none");
	$(".bentoPop14").css("display","none");
	$(".bentoPop16").css("display","none");
	$(".bentoPop17").css("display","none");
}

function bentopop16()
{		
	$(".bentoPop16").css("display","block");
	$(".bentoPop1").css("display","none");
	$(".bentoPop2").css("display","none");
	$(".bentoPop3").css("display","none");
	$(".bentoPop4").css("display","none");
	$(".bentoPop5").css("display","none");
	$(".bentoPop6").css("display","none");
	$(".bentoPop7").css("display","none");
	$(".bentoPop8").css("display","none");
	$(".bentoPop9").css("display","none");
	$(".bentoPop10").css("display","none");
	$(".bentoPop11").css("display","none");
	$(".bentoPop12").css("display","none");
	$(".bentoPop13").css("display","none");
	$(".bentoPop14").css("display","none");
	$(".bentoPop15").css("display","none");
	$(".bentoPop17").css("display","none");
}

function bentopop17()
{		
	$(".bentoPop17").css("display","block");
	$(".bentoPop1").css("display","none");
	$(".bentoPop2").css("display","none");
	$(".bentoPop3").css("display","none");
	$(".bentoPop4").css("display","none");
	$(".bentoPop5").css("display","none");
	$(".bentoPop6").css("display","none");
	$(".bentoPop7").css("display","none");
	$(".bentoPop8").css("display","none");
	$(".bentoPop9").css("display","none");
	$(".bentoPop10").css("display","none");
	$(".bentoPop11").css("display","none");
	$(".bentoPop12").css("display","none");
	$(".bentoPop13").css("display","none");
	$(".bentoPop14").css("display","none");
	$(".bentoPop15").css("display","none");
	$(".bentoPop16").css("display","none");
}





function timerStart(){
$.timer(4000, function (timer) {

$("div.top_bg_box1").fadeOut("slow");
timer.reset(5000);
timer.stop();


$.timer(1000, function (timer) {
$("div.top_bg_box2").fadeIn("slow");
timer.reset(1000);
timer.stop();


$.timer(5000, function (timer) {
$("div.top_bg_box2").fadeOut("slow");
timer.reset(5000);
timer.stop();


$.timer(1000, function (timer) {
$("div.top_bg_box3").fadeIn("slow");
timer.reset(1000);
timer.stop();


$.timer(5000, function (timer) {
$("div.top_bg_box3").fadeOut("slow");
timer.reset(5000);
timer.stop();


$.timer(1000, function (timer) {
$("div.top_bg_box4").fadeIn("slow");
timer.reset(1000);
timer.stop();


$.timer(5000, function (timer) {
$("div.top_bg_box4").fadeOut("slow");
timer.reset(5000);
timer.stop();


$.timer(1000, function (timer) {
$("div.top_bg_box5").fadeIn("slow");
timer.reset(1000);
timer.stop();


$.timer(5000, function (timer) {
$("div.top_bg_box5").fadeOut("slow");
timer.reset(5000);
timer.stop();


$.timer(1000, function (timer) {
$("div.top_bg_box6").fadeIn("slow");
timer.reset(1000);
timer.stop();



$.timer(5000, function (timer) {
$("div.top_bg_box6").fadeOut("slow");
timer.reset(5000);
timer.stop();


$.timer(1000, function (timer) {
$("div.top_bg_box7").fadeIn("slow");
timer.reset(1000);
timer.stop();



$.timer(5000, function (timer) {
$("div.top_bg_box7").fadeOut("slow");
timer.reset(5000);
timer.stop();




$.timer(1000, function (timer) {
$("div.top_bg_box1").fadeIn("slow");
timer.reset(1000);
timer.stop();


timerStart();


});
});
});
});
});
});
});
});
});
});
});
});
});
});
};
timerStart();








//function
//---------------------------------------------------------------------
function qrpop(a)
{		
	$(".qrcordPop"+a).css("display","block");
}

//jquery
//---------------------------------------------------------------------
(function($) {
	
	$(function() {
		/*$.yuga.selflink();*/
		$.yuga.rollover();
		$.yuga.externalLink();
		/*$.yuga.thickbox();*/
		/*$.yuga.scroll();*/
		/*$.yuga.tab();*/
		/*$.yuga.stripe();*/
		
		/*$.yuga.css3class();*/
		$(".externalLink2").click
		(
			function()
			{
				window.open(this.href,'_blank');
				return false;
			}
		);	
		
		$('#scrollBox').jScrollPane({showArrows:true,scrollbarWidth:10});
		$('#scrollBox2').jScrollPane({showArrows:true,scrollbarWidth:10});
		
		$(".displayHide").click
		(
			function ()//-----action
			{
					$("span",this).css("display","none")
		   }
		)
		$(".displayHide").mouseover
		(
			function ()//-----action
			{
					$(this).css("cursor","pointer")
		   }
		)
		
	});
	
//jquery.mousewheel.js
//---------------------------------------------------------------------
	
	
var types = ['DOMMouseScroll', 'mousewheel'];

$.event.special.mousewheel = {
	setup: function() {
		if ( this.addEventListener )
			for ( var i=types.length; i; )
				this.addEventListener( types[--i], handler, false );
		else
			this.onmousewheel = handler;
	},
	
	teardown: function() {
		if ( this.removeEventListener )
			for ( var i=types.length; i; )
				this.removeEventListener( types[--i], handler, false );
		else
			this.onmousewheel = null;
	}
};

$.fn.extend({
	mousewheel: function(fn) {
		return fn ? this.bind("mousewheel", fn) : this.trigger("mousewheel");
	},
	
	unmousewheel: function(fn) {
		return this.unbind("mousewheel", fn);
	}
});


function handler(event) {
	var args = [].slice.call( arguments, 1 ), delta = 0, returnValue = true;
	
	event = $.event.fix(event || window.event);
	event.type = "mousewheel";
	
	if ( event.wheelDelta ) delta = event.wheelDelta/120;
	if ( event.detail     ) delta = -event.detail/3;
	
	// Add events and delta to the front of the arguments
	args.unshift(event, delta);

	return $.event.handle.apply(this, args);
}


//jScrollPane.js
//---------------------------------------------------------------------
	
	
	/* Copyright (c) 2009 Kelvin Luck (kelvin AT kelvinluck DOT com || http://www.kelvinluck.com)
 * Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) 
 * and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.
 * 
 * See http://kelvinluck.com/assets/jquery/jScrollPane/
 * $Id: jScrollPane.js 90 2010-01-25 03:52:10Z kelvin.luck $
 */

/**
 * Replace the vertical scroll bars on any matched elements with a fancy
 * styleable (via CSS) version. With JS disabled the elements will
 * gracefully degrade to the browsers own implementation of overflow:auto.
 * If the mousewheel plugin has been included on the page then the scrollable areas will also
 * respond to the mouse wheel.
 *
 * @example jQuery(".scroll-pane").jScrollPane();
 *
 * @name jScrollPane
 * @type jQuery
 * @param Object	settings	hash with options, described below.
 *								scrollbarWidth	-	The width of the generated scrollbar in pixels
 *								scrollbarMargin	-	The amount of space to leave on the side of the scrollbar in pixels
 *								wheelSpeed		-	The speed the pane will scroll in response to the mouse wheel in pixels
 *								showArrows		-	Whether to display arrows for the user to scroll with
 *								arrowSize		-	The height of the arrow buttons if showArrows=true
 *								animateTo		-	Whether to animate when calling scrollTo and scrollBy
 *								dragMinHeight	-	The minimum height to allow the drag bar to be
 *								dragMaxHeight	-	The maximum height to allow the drag bar to be
 *								animateInterval	-	The interval in milliseconds to update an animating scrollPane (default 100)
 *								animateStep		-	The amount to divide the remaining scroll distance by when animating (default 3)
 *								maintainPosition-	Whether you want the contents of the scroll pane to maintain it's position when you re-initialise it - so it doesn't scroll as you add more content (default true)
 *								tabIndex		-	The tabindex for this jScrollPane to control when it is tabbed to when navigating via keyboard (default 0)
 *								enableKeyboardNavigation - Whether to allow keyboard scrolling of this jScrollPane when it is focused (default true)
 *								animateToInternalLinks - Whether the move to an internal link (e.g. when it's focused by tabbing or by a hash change in the URL) should be animated or instant (default false)
 *								scrollbarOnLeft	-	Display the scrollbar on the left side?  (needs stylesheet changes, see examples.html)
 *								reinitialiseOnImageLoad - Whether the jScrollPane should automatically re-initialise itself when any contained images are loaded (default false)
 *								topCapHeight	-	The height of the "cap" area between the top of the jScrollPane and the top of the track/ buttons
 *								bottomCapHeight	-	The height of the "cap" area between the bottom of the jScrollPane and the bottom of the track/ buttons
 *								observeHash		-	Whether jScrollPane should attempt to automagically scroll to the correct place when an anchor inside the scrollpane is linked to (default true)
 * @return jQuery
 * @cat Plugins/jScrollPane
 * @author Kelvin Luck (kelvin AT kelvinluck DOT com || http://www.kelvinluck.com)
 */


$.jScrollPane = {
	active : []
};
$.fn.jScrollPane = function(settings)
{
	settings = $.extend({}, $.fn.jScrollPane.defaults, settings);

	var rf = function() { return false; };
	
	return this.each(
		function()
		{
			var $this = $(this);
			var paneEle = this;
			var currentScrollPosition = 0;
			var paneWidth;
			var paneHeight;
			var trackHeight;
			var trackOffset = settings.topCapHeight;
			var $container;
			
			if ($(this).parent().is('.jScrollPaneContainer')) {
				$container = $(this).parent();
				currentScrollPosition = settings.maintainPosition ? $this.position().top : 0;
				var $c = $(this).parent();
				paneWidth = $c.innerWidth();
				paneHeight = $c.outerHeight();
				$('>.jScrollPaneTrack, >.jScrollArrowUp, >.jScrollArrowDown, >.jScrollCap', $c).remove();
				$this.css({'top':0});
			} else {
				$this.data('originalStyleTag', $this.attr('style'));
				// Switch the element's overflow to hidden to ensure we get the size of the element without the scrollbars [http://plugins.jquery.com/node/1208]
				$this.css('overflow', 'hidden');
				this.originalPadding = $this.css('paddingTop') + ' ' + $this.css('paddingRight') + ' ' + $this.css('paddingBottom') + ' ' + $this.css('paddingLeft');
				this.originalSidePaddingTotal = (parseInt($this.css('paddingLeft')) || 0) + (parseInt($this.css('paddingRight')) || 0);
				paneWidth = $this.innerWidth();
				paneHeight = $this.innerHeight();
				$container = $('<div></div>')
					.attr({'className':'jScrollPaneContainer'})
					.css(
						{
							'height':paneHeight+'px', 
							'width':paneWidth+'px'
						}
					);
				if (settings.enableKeyboardNavigation) {
					$container.attr(
						'tabindex', 
						settings.tabIndex
					);
				}
				$this.wrap($container);
				$container = $this.parent();
				// deal with text size changes (if the jquery.em plugin is included)
				// and re-initialise the scrollPane so the track maintains the
				// correct size
				$(document).bind(
					'emchange', 
					function(e, cur, prev)
					{
						$this.jScrollPane(settings);
					}
				);
				
			}
			trackHeight = paneHeight;
			
			if (settings.reinitialiseOnImageLoad) {
				// code inspired by jquery.onImagesLoad: http://plugins.jquery.com/project/onImagesLoad
				// except we re-initialise the scroll pane when each image loads so that the scroll pane is always up to size...
				// TODO: Do I even need to store it in $.data? Is a local variable here the same since I don't pass the reinitialiseOnImageLoad when I re-initialise?
				var $imagesToLoad = $.data(paneEle, 'jScrollPaneImagesToLoad') || $('img', $this);
				var loadedImages = [];
				
				if ($imagesToLoad.length) {
					$imagesToLoad.each(function(i, val)	{
						$(this).bind('load readystatechange', function() {
							if($.inArray(i, loadedImages) == -1){ //don't double count images
								loadedImages.push(val); //keep a record of images we've seen
								$imagesToLoad = $.grep($imagesToLoad, function(n, i) {
									return n != val;
								});
								$.data(paneEle, 'jScrollPaneImagesToLoad', $imagesToLoad);
								var s2 = $.extend(settings, {reinitialiseOnImageLoad:false});
								$this.jScrollPane(s2); // re-initialise
							}
						}).each(function(i, val) {
							if(this.complete || this.complete===undefined) { 
								//needed for potential cached images
								this.src = this.src; 
							} 
						});
					});
				};
			}

			var p = this.originalSidePaddingTotal;
			var realPaneWidth = paneWidth - settings.scrollbarWidth - settings.scrollbarMargin - p;

			var cssToApply = {
				'height':'auto',
				'width': realPaneWidth + 'px'
			}

			if(settings.scrollbarOnLeft) {
				cssToApply.paddingLeft = settings.scrollbarMargin + settings.scrollbarWidth + 'px';
			} else {
				cssToApply.paddingRight = settings.scrollbarMargin + 'px';
			}

			$this.css(cssToApply);

			var contentHeight = $this.outerHeight();
			var percentInView = paneHeight / contentHeight;
			
			var isScrollable = percentInView < .99;
			$container[isScrollable ? 'addClass' : 'removeClass']('jScrollPaneScrollable');

			if (isScrollable) {
				$container.append(
					$('<div></div>').addClass('jScrollCap jScrollCapTop').css({height:settings.topCapHeight}),
					$('<div></div>').attr({'className':'jScrollPaneTrack'}).css({'width':settings.scrollbarWidth+'px'}).append(
						$('<div></div>').attr({'className':'jScrollPaneDrag'}).css({'width':settings.scrollbarWidth+'px'}).append(
							$('<div></div>').attr({'className':'jScrollPaneDragTop'}).css({'width':settings.scrollbarWidth+'px'}),
							$('<div></div>').attr({'className':'jScrollPaneDragBottom'}).css({'width':settings.scrollbarWidth+'px'})
						)
					),
					$('<div></div>').addClass('jScrollCap jScrollCapBottom').css({height:settings.bottomCapHeight})
				);
				
				var $track = $('>.jScrollPaneTrack', $container);
				var $drag = $('>.jScrollPaneTrack .jScrollPaneDrag', $container);
				
				
				var currentArrowDirection;
				var currentArrowTimerArr = [];// Array is used to store timers since they can stack up when dealing with keyboard events. This ensures all timers are cleaned up in the end, preventing an acceleration bug.
				var currentArrowInc;
				var whileArrowButtonDown = function() 
				{
					if (currentArrowInc > 4 || currentArrowInc % 4 == 0) {
						positionDrag(dragPosition + currentArrowDirection * mouseWheelMultiplier);
					}
					currentArrowInc++;
				};

				if (settings.enableKeyboardNavigation) {
					$container.bind(
						'keydown.jscrollpane',
						function(e) 
						{
							switch (e.keyCode) {
								case 38: //up
									currentArrowDirection = -1;
									currentArrowInc = 0;
									whileArrowButtonDown();
									currentArrowTimerArr[currentArrowTimerArr.length] = setInterval(whileArrowButtonDown, 100);
									return false;
								case 40: //down
									currentArrowDirection = 1;
									currentArrowInc = 0;
									whileArrowButtonDown();
									currentArrowTimerArr[currentArrowTimerArr.length] = setInterval(whileArrowButtonDown, 100);
									return false;
								case 33: // page up
								case 34: // page down
									// TODO
									return false;
								default:
							}
						}
					).bind(
						'keyup.jscrollpane',
						function(e) 
						{
							if (e.keyCode == 38 || e.keyCode == 40) {
								for (var i = 0; i < currentArrowTimerArr.length; i++) {
									clearInterval(currentArrowTimerArr[i]);
								}
								return false;
							}
						}
					);
				}

				if (settings.showArrows) {
					
					var currentArrowButton;
					var currentArrowInterval;

					var onArrowMouseUp = function(event)
					{
						$('html').unbind('mouseup', onArrowMouseUp);
						currentArrowButton.removeClass('jScrollActiveArrowButton');
						clearInterval(currentArrowInterval);
					};
					var onArrowMouseDown = function() {
						$('html').bind('mouseup', onArrowMouseUp);
						currentArrowButton.addClass('jScrollActiveArrowButton');
						currentArrowInc = 0;
						whileArrowButtonDown();
						currentArrowInterval = setInterval(whileArrowButtonDown, 100);
					};
					$container
						.append(
							$('<a></a>')
								.attr(
									{
										'href':'javascript:;', 
										'className':'jScrollArrowUp', 
										'tabindex':-1
									}
								)
								.css(
									{
										'width':settings.scrollbarWidth+'px',
										'top':settings.topCapHeight + 'px'
									}
								)
								.html('Scroll up')
								.bind('mousedown', function()
								{
									currentArrowButton = $(this);
									currentArrowDirection = -1;
									onArrowMouseDown();
									this.blur();
									return false;
								})
								.bind('click', rf),
							$('<a></a>')
								.attr(
									{
										'href':'javascript:;', 
										'className':'jScrollArrowDown', 
										'tabindex':-1
									}
								)
								.css(
									{
										'width':settings.scrollbarWidth+'px',
										'bottom':settings.bottomCapHeight + 'px'
									}
								)
								.html('Scroll down')
								.bind('mousedown', function()
								{
									currentArrowButton = $(this);
									currentArrowDirection = 1;
									onArrowMouseDown();
									this.blur();
									return false;
								})
								.bind('click', rf)
						);
					var $upArrow = $('>.jScrollArrowUp', $container);
					var $downArrow = $('>.jScrollArrowDown', $container);
				}
				
				if (settings.arrowSize) {
					trackHeight = paneHeight - settings.arrowSize - settings.arrowSize;
					trackOffset += settings.arrowSize;
				} else if ($upArrow) {
					var topArrowHeight = $upArrow.height();
					settings.arrowSize = topArrowHeight;
					trackHeight = paneHeight - topArrowHeight - $downArrow.height();
					trackOffset += topArrowHeight;
				}
				trackHeight -= settings.topCapHeight + settings.bottomCapHeight;
				$track.css({'height': trackHeight+'px', top:trackOffset+'px'})
				
				var $pane = $(this).css({'position':'absolute', 'overflow':'visible'});
				
				var currentOffset;
				var maxY;
				var mouseWheelMultiplier;
				// store this in a seperate variable so we can keep track more accurately than just updating the css property..
				var dragPosition = 0;
				var dragMiddle = percentInView*paneHeight/2;
				
				// pos function borrowed from tooltip plugin and adapted...
				var getPos = function (event, c) {
					var p = c == 'X' ? 'Left' : 'Top';
					return event['page' + c] || (event['client' + c] + (document.documentElement['scroll' + p] || document.body['scroll' + p])) || 0;
				};
				
				var ignoreNativeDrag = function() {	return false; };
				
				var initDrag = function()
				{
					ceaseAnimation();
					currentOffset = $drag.offset(false);
					currentOffset.top -= dragPosition;
					maxY = trackHeight - $drag[0].offsetHeight;
					mouseWheelMultiplier = 2 * settings.wheelSpeed * maxY / contentHeight;
				};
				
				var onStartDrag = function(event)
				{
					initDrag();
					dragMiddle = getPos(event, 'Y') - dragPosition - currentOffset.top;
					$('html').bind('mouseup', onStopDrag).bind('mousemove', updateScroll);
					if ($.browser.msie) {
						$('html').bind('dragstart', ignoreNativeDrag).bind('selectstart', ignoreNativeDrag);
					}
					return false;
				};
				var onStopDrag = function()
				{
					$('html').unbind('mouseup', onStopDrag).unbind('mousemove', updateScroll);
					dragMiddle = percentInView*paneHeight/2;
					if ($.browser.msie) {
						$('html').unbind('dragstart', ignoreNativeDrag).unbind('selectstart', ignoreNativeDrag);
					}
				};
				var positionDrag = function(destY)
				{
					$container.scrollTop(0);
					destY = destY < 0 ? 0 : (destY > maxY ? maxY : destY);
					dragPosition = destY;
					$drag.css({'top':destY+'px'});
					var p = destY / maxY;
					$this.data('jScrollPanePosition', (paneHeight-contentHeight)*-p);
					$pane.css({'top':((paneHeight-contentHeight)*p) + 'px'});
					$this.trigger('scroll');
					if (settings.showArrows) {
						$upArrow[destY == 0 ? 'addClass' : 'removeClass']('disabled');
						$downArrow[destY == maxY ? 'addClass' : 'removeClass']('disabled');
					}
				};
				var updateScroll = function(e)
				{
					positionDrag(getPos(e, 'Y') - currentOffset.top - dragMiddle);
				};
				
				var dragH = Math.max(Math.min(percentInView*(paneHeight-settings.arrowSize*2), settings.dragMaxHeight), settings.dragMinHeight);
				
				$drag.css(
					{'height':dragH+'px'}
				).bind('mousedown', onStartDrag);
				
				var trackScrollInterval;
				var trackScrollInc;
				var trackScrollMousePos;
				var doTrackScroll = function()
				{
					if (trackScrollInc > 8 || trackScrollInc%4==0) {
						positionDrag((dragPosition - ((dragPosition - trackScrollMousePos) / 2)));
					}
					trackScrollInc ++;
				};
				var onStopTrackClick = function()
				{
					clearInterval(trackScrollInterval);
					$('html').unbind('mouseup', onStopTrackClick).unbind('mousemove', onTrackMouseMove);
				};
				var onTrackMouseMove = function(event)
				{
					trackScrollMousePos = getPos(event, 'Y') - currentOffset.top - dragMiddle;
				};
				var onTrackClick = function(event)
				{
					initDrag();
					onTrackMouseMove(event);
					trackScrollInc = 0;
					$('html').bind('mouseup', onStopTrackClick).bind('mousemove', onTrackMouseMove);
					trackScrollInterval = setInterval(doTrackScroll, 100);
					doTrackScroll();
					return false;
				};
				
				$track.bind('mousedown', onTrackClick);
				
				$container.bind(
					'mousewheel',
					function (event, delta) {
						delta = delta || (event.wheelDelta ? event.wheelDelta / 120 : (event.detail) ?
-event.detail/3 : 0);
						initDrag();
						ceaseAnimation();
						var d = dragPosition;
						positionDrag(dragPosition - delta * mouseWheelMultiplier);
						var dragOccured = d != dragPosition;
						return !dragOccured;
					}
				);

				var _animateToPosition;
				var _animateToInterval;
				function animateToPosition()
				{
					var diff = (_animateToPosition - dragPosition) / settings.animateStep;
					if (diff > 1 || diff < -1) {
						positionDrag(dragPosition + diff);
					} else {
						positionDrag(_animateToPosition);
						ceaseAnimation();
					}
				}
				var ceaseAnimation = function()
				{
					if (_animateToInterval) {
						clearInterval(_animateToInterval);
						delete _animateToPosition;
					}
				};
				var scrollTo = function(pos, preventAni)
				{
					if (typeof pos == "string") {
						// Legal hash values aren't necessarily legal jQuery selectors so we need to catch any
						// errors from the lookup...
						try {
							$e = $(pos, $this);
						} catch (err) {
							return;
						}
						if (!$e.length) return;
						pos = $e.offset().top - $this.offset().top;
					}
					ceaseAnimation();
					var maxScroll = contentHeight - paneHeight;
					pos = pos > maxScroll ? maxScroll : pos;
					$this.data('jScrollPaneMaxScroll', maxScroll);
					var destDragPosition = pos/maxScroll * maxY;
					if (preventAni || !settings.animateTo) {
						positionDrag(destDragPosition);
					} else {
						$container.scrollTop(0);
						_animateToPosition = destDragPosition;
						_animateToInterval = setInterval(animateToPosition, settings.animateInterval);
					}
				};
				$this[0].scrollTo = scrollTo;
				
				$this[0].scrollBy = function(delta)
				{
					var currentPos = -parseInt($pane.css('top')) || 0;
					scrollTo(currentPos + delta);
				};
				
				initDrag();
				
				scrollTo(-currentScrollPosition, true);
			
				// Deal with it when the user tabs to a link or form element within this scrollpane
				$('*', this).bind(
					'focus',
					function(event)
					{
						var $e = $(this);
						
						// loop through parents adding the offset top of any elements that are relatively positioned between
						// the focused element and the jScrollPaneContainer so we can get the true distance from the top
						// of the focused element to the top of the scrollpane...
						var eleTop = 0;
						
						while ($e[0] != $this[0]) {
							eleTop += $e.position().top;
							$e = $e.offsetParent();
						}
						
						var viewportTop = -parseInt($pane.css('top')) || 0;
						var maxVisibleEleTop = viewportTop + paneHeight;
						var eleInView = eleTop > viewportTop && eleTop < maxVisibleEleTop;
						if (!eleInView) {
							var destPos = eleTop - settings.scrollbarMargin;
							if (eleTop > viewportTop) { // element is below viewport - scroll so it is at bottom.
								destPos += $(this).height() + 15 + settings.scrollbarMargin - paneHeight;
							}
							scrollTo(destPos);
						}
					}
				)
				
				
				if (settings.observeHash) {
					if (location.hash && location.hash.length > 1) {
						setTimeout(function(){
							scrollTo(location.hash);
						}, $.browser.safari ? 100 : 0);
					}
					
					// use event delegation to listen for all clicks on links and hijack them if they are links to
					// anchors within our content...
					$(document).bind('click', function(e){
						$target = $(e.target);
						if ($target.is('a')) {
							var h = $target.attr('href');
							if (h && h.substr(0, 1) == '#' && h.length > 1) {
								setTimeout(function(){
									scrollTo(h, !settings.animateToInternalLinks);
								}, $.browser.safari ? 100 : 0);
							}
						}
					});
				}
				
				// Deal with dragging and selecting text to make the scrollpane scroll...
				function onSelectScrollMouseDown(e)
				{
				   $(document).bind('mousemove.jScrollPaneDragging', onTextSelectionScrollMouseMove);
				   $(document).bind('mouseup.jScrollPaneDragging',   onSelectScrollMouseUp);
				  
				}
				
				var textDragDistanceAway;
				var textSelectionInterval;
				
				function onTextSelectionInterval()
				{
					direction = textDragDistanceAway < 0 ? -1 : 1;
					$this[0].scrollBy(textDragDistanceAway / 2);
				}

				function clearTextSelectionInterval()
				{
					if (textSelectionInterval) {
						clearInterval(textSelectionInterval);
						textSelectionInterval = undefined;
					}
				}
				
				function onTextSelectionScrollMouseMove(e)
				{
					var offset = $this.parent().offset().top;
					var maxOffset = offset + paneHeight;
					var mouseOffset = getPos(e, 'Y');
					textDragDistanceAway = mouseOffset < offset ? mouseOffset - offset : (mouseOffset > maxOffset ? mouseOffset - maxOffset : 0);
					if (textDragDistanceAway == 0) {
						clearTextSelectionInterval();
					} else {
						if (!textSelectionInterval) {
							textSelectionInterval  = setInterval(onTextSelectionInterval, 100);
						}
					}
				}

				function onSelectScrollMouseUp(e)
				{
				   $(document)
					  .unbind('mousemove.jScrollPaneDragging')
					  .unbind('mouseup.jScrollPaneDragging');
				   clearTextSelectionInterval();
				}

				$container.bind('mousedown.jScrollPane', onSelectScrollMouseDown);

				
				$.jScrollPane.active.push($this[0]);
				
			} else {
				$this.css(
					{
						'height':paneHeight+'px',
						'width':paneWidth-this.originalSidePaddingTotal+'px',
						'padding':this.originalPadding
					}
				);
				$this[0].scrollTo = $this[0].scrollBy = function() {};
				// clean up listeners
				$this.parent().unbind('mousewheel').unbind('mousedown.jScrollPane').unbind('keydown.jscrollpane').unbind('keyup.jscrollpane');
			}
			
		}
	)
};

$.fn.jScrollPaneRemove = function()
{
	$(this).each(function()
	{
		$this = $(this);
		var $c = $this.parent();
		if ($c.is('.jScrollPaneContainer')) {
			$this.css(
				{
					'top':'',
					'height':'',
					'width':'',
					'padding':'',
					'overflow':'',
					'position':''
				}
			);
			$this.attr('style', $this.data('originalStyleTag'));
			$c.after($this).remove();
		}
	});
}

$.fn.jScrollPane.defaults = {
	scrollbarWidth : 10,
	scrollbarMargin : 5,
	wheelSpeed : 18,
	showArrows : false,
	arrowSize : 0,
	animateTo : false,
	dragMinHeight : 1,
	dragMaxHeight : 99999,
	animateInterval : 100,
	animateStep: 3,
	maintainPosition: true,
	scrollbarOnLeft: false,
	reinitialiseOnImageLoad: false,
	tabIndex : 0,
	enableKeyboardNavigation: true,
	animateToInternalLinks: false,
	topCapHeight: 0,
	bottomCapHeight: 0,
	observeHash: true
};

// clean up the scrollTo expandos
$(window)
	.bind('unload', function() {
		var els = $.jScrollPane.active; 
		for (var i=0; i<els.length; i++) {
			els[i].scrollTo = els[i].scrollBy = null;
		}
	}
);



	//---------------------------------------------------------------------

	$.yuga = {
		Uri: function(path){
			var self = this;
			this.originalPath = path;
			this.absolutePath = (function(){
				var e = document.createElement('span');
				e.innerHTML = '<a href="../../js/' + path + '" />';
				return e.firstChild.href;
			})();
			var fields = {'schema' : 2, 'username' : 5, 'password' : 6, 'host' : 7, 'path' : 9, 'query' : 10, 'fragment' : 11};
			var r = /^((\w+):)?(\/\/)?((\w+):?(\w+)?@)?([^\/\?:]+):?(\d+)?(\/?[^\?#]+)?\??([^#]+)?#?(\w*)/.exec(this.absolutePath);
			for (var field in fields) {
				this[field] = r[fields[field]];
			}
			this.querys = {};
			if(this.query){
				$.each(self.query.split('&'), function(){
					var a = this.split('=');
					if (a.length == 2) self.querys[a[0]] = a[1];
				});
			}
		},
		selflink: function (options) {
			var c = $.extend({
				selfLinkAreaSelector:'body',
				selfLinkClass:'current',
				parentsLinkClass:'parentsLink',
				postfix: '_cr',
				changeImgSelf:true,
				changeImgParents:true
			}, options);
			$(c.selfLinkAreaSelector+((c.selfLinkAreaSelector)?' ':'')+'a[href]').each(function(){
				var href = new $.yuga.Uri(this.getAttribute('href'));
				var setImgFlg = false;
				if ((href.absolutePath == location.href) && !href.fragment) {
					$(this).addClass(c.selfLinkClass);
					setImgFlg = c.changeImgSelf;
				} else if (0 <= location.href.search(href.absolutePath)) {
					$(this).addClass(c.parentsLinkClass);
					setImgFlg = c.changeImgParents;
				}
				if (setImgFlg){
					$(this).find('img').each(function(){
						this.originalSrc = $(this).attr('src');
						this.currentSrc = this.originalSrc.replace(new RegExp('('+c.postfix+')?(\.gif|\.jpg|\.png)$'), c.postfix+"$2");
						$(this).attr('src',this.currentSrc);
					});
				}
			});
		},
		rollover: function(options) {
			var c = $.extend({
				hoverSelector: '.btn, .allbtn img',
				groupSelector: '.btngroup',
				postfix: '_on'
			}, options);
			var rolloverImgs = $(c.hoverSelector).filter(isNotCurrent);
			rolloverImgs.each(function(){
				this.originalSrc = $(this).attr('src');
				this.rolloverSrc = this.originalSrc.replace(new RegExp('('+c.postfix+')?(\.gif|\.jpg|\.png)$'), c.postfix+"$2");
				this.rolloverImg = new Image;
				this.rolloverImg.src = this.rolloverSrc;
			});
			var groupingImgs = $(c.groupSelector).find('img').filter(isRolloverImg);

			rolloverImgs.not(groupingImgs).hover(function(){
				$(this).attr('src',this.rolloverSrc);
			},function(){
				$(this).attr('src',this.originalSrc);
			});
			$(c.groupSelector).hover(function(){
				$(this).find('img').filter(isRolloverImg).each(function(){
					$(this).attr('src',this.rolloverSrc);
				});
			},function(){
				$(this).find('img').filter(isRolloverImg).each(function(){
					$(this).attr('src',this.originalSrc);
				});
			});
			function isNotCurrent(i){
				return Boolean(!this.currentSrc);
			}
			function isRolloverImg(i){
				return Boolean(this.rolloverSrc);
			}

		},
		externalLink: function(options) {
			var c = $.extend({
				windowOpen:true,
				externalClass: 'externalLink',
				addIconSrc: ''
			}, options);
			var uri = new $.yuga.Uri(location.href);
			var e = $('a[href^="http://"]').not('a[href^="' + uri.schema + '://' + uri.host + '/' + '"]');
			if (c.windowOpen) {
				e.click(function(){
					window.open(this.href, '_blank');
					return false;
				});
			}
			if (c.addIconSrc) e.not(':has(img)').after($('<img src="../../js/'+c.addIconSrc+'" class="externalIcon" />'));
			e.addClass(c.externalClass);
		},
		thickbox: function() {
			try {
				tb_init('a[href$=".jpg"]:not(.thickbox, a[href*="?"]), a[href$=".gif"][href!="?"]:not(.thickbox, a[href*="?"]), a[href$=".png"][href!="?"]:not(.thickbox, a[href*="?"])');
			} catch(e) {
			}	
		},
		scroll: function(options) {
			var scroller = (function() {
				var c = $.extend({
					easing:100,
					step:30,
					fps:60,
					fragment:''
				}, options);
				c.ms = Math.floor(1000/c.fps);
				var timerId;
				var param = {
					stepCount:0,
					startY:0,
					endY:0,
					lastY:0
				};
				function move() {
					if (param.stepCount == c.step) {
						setFragment(param.hrefdata.absolutePath);
						window.scrollTo(getCurrentX(), param.endY);
					} else if (param.lastY == getCurrentY()) {
						param.stepCount++;
						window.scrollTo(getCurrentX(), getEasingY());
						param.lastY = getEasingY();
						timerId = setTimeout(move, c.ms); 
					} else {
						if (getCurrentY()+getViewportHeight() == getDocumentHeight()) {
							setFragment(param.hrefdata.absolutePath);
						}
					}
				}
				function setFragment(path){
					location.href = path
				}
				function getCurrentY() {
					return document.body.scrollTop  || document.documentElement.scrollTop;
				}
				function getCurrentX() {
					return document.body.scrollLeft  || document.documentElement.scrollLeft;
				}
				function getDocumentHeight(){
					return document.documentElement.scrollHeight || document.body.scrollHeight;
				}
				function getViewportHeight(){
					return (!$.browser.safari && !$.browser.opera) ? document.documentElement.clientHeight || document.body.clientHeight || document.body.scrollHeight : window.innerHeight;
				}
				function getEasingY() {
					return Math.floor(getEasing(param.startY, param.endY, param.stepCount, c.step, c.easing));
				}
				function getEasing(start, end, stepCount, step, easing) {
					var s = stepCount / step;
					return (end - start) * (s + easing / (100 * Math.PI) * Math.sin(Math.PI * s)) + start;
				}
				return {
					set: function(options) {
						this.stop();
						if (options.startY == undefined) options.startY = getCurrentY();
						param = $.extend(param, options);
						param.lastY = param.startY;
						timerId = setTimeout(move, c.ms); 
					},
					stop: function(){
						clearTimeout(timerId);
						param.stepCount = 0;
					}
				};
			})();
			$('a[href^=#], area[href^=#]').not('a[href=#], area[href=#]').each(function(){
				this.hrefdata = new $.yuga.Uri(this.getAttribute('href'));
			}).click(function(){
				var target = $('#'+this.hrefdata.fragment);
				if (target.length == 0) target = $('a[name='+this.hrefdata.fragment+']');
				if (target.length) {
					scroller.set({
						endY: target.offset().top,
						hrefdata: this.hrefdata
					});
					return false;
				}
			});
		},
		tab: function(options) {
			var c = $.extend({
				tabNavSelector:'.tabNav',
				activeTabClass:'active'
			}, options);
			$(c.tabNavSelector).each(function(){
				var tabNavList = $(this).find('a[href^=#], area[href^=#]');
				var tabBodyList;
				tabNavList.each(function(){
					this.hrefdata = new $.yuga.Uri(this.getAttribute('href'));
					var selecter = '#'+this.hrefdata.fragment;
					if (tabBodyList) {
						tabBodyList = tabBodyList.add(selecter);
					} else {
						tabBodyList = $(selecter);
					}
					$(this).unbind('click');
					$(this).click(function(){
						tabNavList.removeClass(c.activeTabClass);
						$(this).addClass(c.activeTabClass);
						tabBodyList.hide();
						$(selecter).show();
						return false;
					});
				});
				tabBodyList.hide()
				tabNavList.filter(':first').trigger('click');
			});
		},
		stripe: function(options) {
			var c = $.extend({
				oddClass:'odd',
				evenClass:'even'
			}, options);
			$('ul, ol').each(function(){
				$(this).children('li:odd').addClass(c.evenClass);
				$(this).children('li:even').addClass(c.oddClass);
			});
			$('table, tbody').each(function(){
				$(this).children('tr:odd').addClass(c.evenClass);
				$(this).children('tr:even').addClass(c.oddClass);
			});
		},
		css3class: function() {
			$('body :first-child').addClass('firstChild');
			$('body :last-child').addClass('lastChild');
			$('body :empty').addClass('empty');
		}
	};
})(jQuery);


//for toppage open close system
//---------------------------------------------------------------------


	function closeWinLeft(){
		/*toppage btn close*/
			$(".leftBox1").css("height","68px");
			$(".hideLeft").css("display","none");
			$(".leftBox1").css("margin-top","420px");
			$(".leftBox1 #closeBtn1").css("display","none");
			$(".leftBox1 #openBtn1").css("display","block");

	}

	function openWinLeft(){
		/*toppage btn open*/
			$(".leftBox1").css("height","auto");
			$(".hideLeft").css("display","block");
			$(".leftBox1").css("margin-top","120px");
			$(".leftBox1 #closeBtn1").css("display","block");
			$(".leftBox1 #openBtn1").css("display","none");

	}
	
	function closeWinRight(){
		/*toppage btn close*/
			$(".rightBox1").css("height","68px");
			$(".hideRight").css("display","none");
			$(".rightBox1").css("margin-top","420px");
			$(".rightBox1 #closeBtn2").css("display","none");
			$(".rightBox1 #openBtn2").css("display","block");

	}

	function openWinRight(){
		/*toppage btn open*/
			$(".rightBox1").css("height","auto");
			$(".hideRight").css("display","block");
			$(".rightBox1").css("margin-top","120px");
			$(".rightBox1 #closeBtn2").css("display","block");
			$(".rightBox1 #openBtn2").css("display","none");

	}


//smoothscroll.js
//---------------------------------------------------------------------


/* Smooth scrolling
   Changes links that link to other parts of this page to scroll
   smoothly to those links rather than jump to them directly, which
   can be a little disorienting.
   
   sil, http://www.kryogenix.org/
   
   v1.0 2003-11-11
   v1.1 2005-06-16 wrap it up in an object
*/

var ss = {
  fixAllLinks: function() {
    // Get a list of all links in the page
    var allLinks = document.getElementsByTagName('a');
    // Walk through the list
    for (var i=0;i<allLinks.length;i++) {
      var lnk = allLinks[i];
      if ((lnk.href && lnk.href.indexOf('#') != -1) && 
          ( (lnk.pathname == location.pathname) ||
	    ('/'+lnk.pathname == location.pathname) ) && 
          (lnk.search == location.search)) {
        // If the link is internal to the page (begins in #)
        // then attach the smoothScroll function as an onclick
        // event handler
        ss.addEvent(lnk,'click',ss.smoothScroll);
      }
    }
  },

  smoothScroll: function(e) {
    // This is an event handler; get the clicked on element,
    // in a cross-browser fashion
    if (window.event) {
      target = window.event.srcElement;
    } else if (e) {
      target = e.target;
    } else return;

    // Make sure that the target is an element, not a text node
    // within an element
    if (target.nodeName.toLowerCase() != 'a') {
      target = target.parentNode;
    }
  
    // Paranoia; check this is an A tag
    if (target.nodeName.toLowerCase() != 'a') return;
  
    // Find the <a name> tag corresponding to this href
    // First strip off the hash (first character)
    anchor = target.hash.substr(1);
    // Now loop all A tags until we find one with that name
    var allLinks = document.getElementsByTagName('a');
    var destinationLink = null;
    for (var i=0;i<allLinks.length;i++) {
      var lnk = allLinks[i];
      if (lnk.name && (lnk.name == anchor)) {
        destinationLink = lnk;
        break;
      }
    }
    if (!destinationLink) destinationLink = document.getElementById(anchor);

    // If we didn't find a destination, give up and let the browser do
    // its thing
    if (!destinationLink) return true;
  
    // Find the destination's position
    var destx = destinationLink.offsetLeft; 
    var desty = destinationLink.offsetTop;
    var thisNode = destinationLink;
    while (thisNode.offsetParent && 
          (thisNode.offsetParent != document.body)) {
      thisNode = thisNode.offsetParent;
      destx += thisNode.offsetLeft;
      desty += thisNode.offsetTop;
    }
  
    // Stop any current scrolling
    clearInterval(ss.INTERVAL);
  
    cypos = ss.getCurrentYPos();
  
    ss_stepsize = parseInt((desty-cypos)/ss.STEPS);
    ss.INTERVAL =
setInterval('ss.scrollWindow('+ss_stepsize+','+desty+',"'+anchor+'")',10);
  
    // And stop the actual click happening
    if (window.event) {
      window.event.cancelBubble = true;
      window.event.returnValue = false;
    }
    if (e && e.preventDefault && e.stopPropagation) {
      e.preventDefault();
      e.stopPropagation();
    }
  },

  scrollWindow: function(scramount,dest,anchor) {
    wascypos = ss.getCurrentYPos();
    isAbove = (wascypos < dest);
    window.scrollTo(0,wascypos + scramount);
    iscypos = ss.getCurrentYPos();
    isAboveNow = (iscypos < dest);
    if ((isAbove != isAboveNow) || (wascypos == iscypos)) {
      // if we've just scrolled past the destination, or
      // we haven't moved from the last scroll (i.e., we're at the
      // bottom of the page) then scroll exactly to the link
      window.scrollTo(0,dest);
      // cancel the repeating timer
      clearInterval(ss.INTERVAL);
      // and jump to the link directly so the URL's right
      location.hash = anchor;
    }
  },

  getCurrentYPos: function() {
    if (document.body && document.body.scrollTop)
      return document.body.scrollTop;
    if (document.documentElement && document.documentElement.scrollTop)
      return document.documentElement.scrollTop;
    if (window.pageYOffset)
      return window.pageYOffset;
    return 0;
  },

  addEvent: function(elm, evType, fn, useCapture) {
    // addEvent and removeEvent
    // cross-browser event handling for IE5+,  NS6 and Mozilla
    // By Scott Andrew
    if (elm.addEventListener){
      elm.addEventListener(evType, fn, useCapture);
      return true;
    } else if (elm.attachEvent){
      var r = elm.attachEvent("on"+evType, fn);
      return r;
    } else {
      alert("Handler could not be removed");
    }
  } 
}

ss.STEPS = 25;

ss.addEvent(window,"load",ss.fixAllLinks);





