// JavaScript Document
$.accordian = function(items, first, options) {

				var active = first;
				var running = 0;

				var titles = options && options.titles || '.title';
				var contents = options && options.contents || '.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';

				$(items).not(active).children(contents).hide();
				$(items).not(active).each(onHide);
				$(active).each(onShow);

				$(items).children(titles).click(function(e){

					var p = $(contents, this.parentNode);
					$(this.parentNode).each(onClick);

					if (running || !p.is(":hidden")) return false;
					running = 2;

					$(active).children(contents).not(':hidden').slideUp(hideSpeed, function(){--running;});
					p.slideDown(showSpeed, function(){--running;});

					$(active).each(onHide);
					active = '#' + $(this.parentNode)[0].id;
					$(active).each(onShow);

					return false;
				});

			};

			function simpleLog(message) {
				$('<div>' + message + '</div>').appendTo('#log');
			}

			$(function(){

					$.accordian('#list1 > div', '#item11', {
					titles:'.mytitle',
					contents:'.mycontent',
					onClick:function(){simpleLog(this.id + ' clicked')},
					onShow:function(){simpleLog(this.id + ' shown'); $(this).removeClass('off').addClass('on');},
					onHide:function(){simpleLog(this.id + ' hidden'); $(this).removeClass('on').addClass('off');},
					showSpeed:250,
					hideSpeed:550
				});

				$.accordian('#list2 > div', '#item21', {
					titles:'.mytitle',
					contents:'.mycontent',
					onClick:function(){simpleLog(this.id + ' clicked')},
					onShow:function(){simpleLog(this.id + ' shown'); $(this).removeClass('off').addClass('on');},
					onHide:function(){simpleLog(this.id + ' hidden'); $(this).removeClass('on').addClass('off');},
					showSpeed:250,
					hideSpeed:550
				});
				$.accordian('#list3 > div', '#item31', {
					titles:'.mytitle',
					contents:'.mycontent',
					onClick:function(){simpleLog(this.id + ' clicked')},
					onShow:function(){simpleLog(this.id + ' shown'); $(this).removeClass('off').addClass('on');},
					onHide:function(){simpleLog(this.id + ' hidden'); $(this).removeClass('on').addClass('off');},
					showSpeed:250,
					hideSpeed:550
				});
				
				
				
				$.accordian('#allpacklist1 > div', '#allpackitem11', {
					titles:'.mytitle',
					contents:'.mycontent',
					onClick:function(){simpleLog(this.id + ' clicked')},
					onShow:function(){simpleLog(this.id + ' shown'); $(this).removeClass('off').addClass('on');},
					onHide:function(){simpleLog(this.id + ' hidden'); $(this).removeClass('on').addClass('off');},
					showSpeed:250,
					hideSpeed:550
				});

				$.accordian('#allpacklist2 > div', '#allpackitem21', {
					titles:'.mytitle',
					contents:'.mycontent',
					onClick:function(){simpleLog(this.id + ' clicked')},
					onShow:function(){simpleLog(this.id + ' shown'); $(this).removeClass('off').addClass('on');},
					onHide:function(){simpleLog(this.id + ' hidden'); $(this).removeClass('on').addClass('off');},
					showSpeed:250,
					hideSpeed:550
				});
				$.accordian('#allpacklist3 > div', '#allpackitem31', {
					titles:'.mytitle',
					contents:'.mycontent',
					onClick:function(){simpleLog(this.id + ' clicked')},
					onShow:function(){simpleLog(this.id + ' shown'); $(this).removeClass('off').addClass('on');},
					onHide:function(){simpleLog(this.id + ' hidden'); $(this).removeClass('on').addClass('off');},
					showSpeed:250,
					hideSpeed:550
				});
				$.accordian('#allpacklist4 > div', '#allpackitem41', {
					titles:'.mytitle',
					contents:'.mycontent',
					onClick:function(){simpleLog(this.id + ' clicked')},
					onShow:function(){simpleLog(this.id + ' shown'); $(this).removeClass('off').addClass('on');},
					onHide:function(){simpleLog(this.id + ' hidden'); $(this).removeClass('on').addClass('off');},
					showSpeed:250,
					hideSpeed:550
				});
				$.accordian('#allpacklist5 > div', '#allpackitem51', {
					titles:'.mytitle',
					contents:'.mycontent',
					onClick:function(){simpleLog(this.id + ' clicked')},
					onShow:function(){simpleLog(this.id + ' shown'); $(this).removeClass('off').addClass('on');},
					onHide:function(){simpleLog(this.id + ' hidden'); $(this).removeClass('on').addClass('off');},
					showSpeed:250,
					hideSpeed:550
				});
				$.accordian('#allpacklist6 > div', '#allpackitem61', {
					titles:'.mytitle',
					contents:'.mycontent',
					onClick:function(){simpleLog(this.id + ' clicked')},
					onShow:function(){simpleLog(this.id + ' shown'); $(this).removeClass('off').addClass('on');},
					onHide:function(){simpleLog(this.id + ' hidden'); $(this).removeClass('on').addClass('off');},
					showSpeed:250,
					hideSpeed:550
				});
				$.accordian('#allpacklist7 > div', '#allpackitem71', {
					titles:'.mytitle',
					contents:'.mycontent',
					onClick:function(){simpleLog(this.id + ' clicked')},
					onShow:function(){simpleLog(this.id + ' shown'); $(this).removeClass('off').addClass('on');},
					onHide:function(){simpleLog(this.id + ' hidden'); $(this).removeClass('on').addClass('off');},
					showSpeed:250,
					hideSpeed:550
				});
				$.accordian('#allpacklist8 > div', '#allpackitem81', {
					titles:'.mytitle',
					contents:'.mycontent',
					onClick:function(){simpleLog(this.id + ' clicked')},
					onShow:function(){simpleLog(this.id + ' shown'); $(this).removeClass('off').addClass('on');},
					onHide:function(){simpleLog(this.id + ' hidden'); $(this).removeClass('on').addClass('off');},
					showSpeed:250,
					hideSpeed:550
				});		
				$.accordian('#allpacklist9 > div', '#allpackitem91', {
					titles:'.mytitle',
					contents:'.mycontent',
					onClick:function(){simpleLog(this.id + ' clicked')},
					onShow:function(){simpleLog(this.id + ' shown'); $(this).removeClass('off').addClass('on');},
					onHide:function(){simpleLog(this.id + ' hidden'); $(this).removeClass('on').addClass('off');},
					showSpeed:250,
					hideSpeed:550
				});
				$.accordian('#allpacklist10 > div', '#allpackitem101', {
					titles:'.mytitle',
					contents:'.mycontent',
					onClick:function(){simpleLog(this.id + ' clicked')},
					onShow:function(){simpleLog(this.id + ' shown'); $(this).removeClass('off').addClass('on');},
					onHide:function(){simpleLog(this.id + ' hidden'); $(this).removeClass('on').addClass('off');},
					showSpeed:250,
					hideSpeed:550
				});
				$.accordian('#allpacklist11 > div', '#allpackitem111', {
					titles:'.mytitle',
					contents:'.mycontent',
					onClick:function(){simpleLog(this.id + ' clicked')},
					onShow:function(){simpleLog(this.id + ' shown'); $(this).removeClass('off').addClass('on');},
					onHide:function(){simpleLog(this.id + ' hidden'); $(this).removeClass('on').addClass('off');},
					showSpeed:250,
					hideSpeed:550
				});
				$.accordian('#allpacklist12 > div', '#allpackitem121', {
					titles:'.mytitle',
					contents:'.mycontent',
					onClick:function(){simpleLog(this.id + ' clicked')},
					onShow:function(){simpleLog(this.id + ' shown'); $(this).removeClass('off').addClass('on');},
					onHide:function(){simpleLog(this.id + ' hidden'); $(this).removeClass('on').addClass('off');},
					showSpeed:250,
					hideSpeed:550
				});
				$.accordian('#allpacklist13 > div', '#allpackitem131', {
					titles:'.mytitle',
					contents:'.mycontent',
					onClick:function(){simpleLog(this.id + ' clicked')},
					onShow:function(){simpleLog(this.id + ' shown'); $(this).removeClass('off').addClass('on');},
					onHide:function(){simpleLog(this.id + ' hidden'); $(this).removeClass('on').addClass('off');},
					showSpeed:250,
					hideSpeed:550
				});
				$.accordian('#allpacklist14 > div', '#allpackitem141', {
					titles:'.mytitle',
					contents:'.mycontent',
					onClick:function(){simpleLog(this.id + ' clicked')},
					onShow:function(){simpleLog(this.id + ' shown'); $(this).removeClass('off').addClass('on');},
					onHide:function(){simpleLog(this.id + ' hidden'); $(this).removeClass('on').addClass('off');},
					showSpeed:250,
					hideSpeed:550
				});
				$.accordian('#navigationboutique > div', '#nav11', {
					titles:'.mytitle2',
					contents:'.mycontent2',
					onClick:function(){simpleLog(this.id + ' clicked')},
					onShow:function(){simpleLog(this.id + ' shown'); $(this).removeClass('off').addClass('on');},
					onHide:function(){simpleLog(this.id + ' hidden'); $(this).removeClass('on').addClass('off');},
					showSpeed:250,
					hideSpeed:550
				});

			});