
// <script type="text/javascript"> // js highlight

function SkaDateDemoToolbar()
{
	this.theme_list = {"dp":"Dark Passion","black":"Black","sparks":"Sparkles","dw":"Dance Wild","sky":"Sky","gh":"Golden Heart","rr":"Rosen Red","fb":"A Book of Faces","bn":"Business Network","cr":"Colorful Rings","victory":"Victory","sunrise":"Sunrise","ud":"Usual Date","adult":"Tenderness","ds":"Dating Shine","ct":"Color Touch II","emotion":"Emotion","gold":"Gold","natural":"Natural"};
	this.active_theme = 'ds';
	
	var options_html;
	for (var key in this.theme_list) {
		options_html +=
			'<option value="'+key+'"'+(
				(key != this.active_theme) ? '' : ' selected="selected"'
			)+'>'+this.theme_list[key]+'</options>';
	}
	
	jQuery('body').prepend(
		'<div id="demo_toolbar" style="'+
			'position: fixed;'+
			'top: '+SkaDateDemoToolbar.initial_pos+';'+
			'left: 0px;'+
			'z-index: 1000;'+
			'width: 200px;'+
			'border: 1px solid #545454;'+
			'background: url(http://www.thepartyline.ca/layout/img/macFFBgHack.png);'+
			'font-size: 10px;'+
			'padding: 4px;'+
			'">'+
				'<div>'+
					'<b style="color: #EFEFEF">Please Select Your Favorite Theme</b><br />'+
					'<select id="demo_toolbar_theme_switcher">'+options_html+'</select>'+
				'</div>'+
		'</div>'
	);
	
	
	var handler = this;
	
	this.expanded = false;
	
	/*jQuery('#demo_toolbar_expand')
		.click(function() {
			if (handler.expanded) {
				handler.collapse();
			}
			else {
				handler.expand();
			}
			return false;
		}
	);*/
	
	jQuery('#demo_toolbar_theme_switcher')
		.change(function() {
			var search = window.location.search;
			window.location.search = (search ? search+'&' : '?')+'layout='+this.value;
		});
}

if (jQuery.browser.msie) {
	SkaDateDemoToolbar.initial_pos = '0';
}
else { // other
	SkaDateDemoToolbar.initial_pos = '0';
}

SkaDateDemoToolbar.prototype =
{
	expand: function() {
		jQuery('#demo_toolbar').animate({top: '0px'}, 'fast', function() {
			jQuery('#demo_toolbar_expand').css('background-image', 'url(http://www.thepartyline.ca/layout/img/block_collapse.png)');
		});
		this.expanded = true;
	},
	
	collapse: function() {
		jQuery('#demo_toolbar').animate({top: SkaDateDemoToolbar.initial_pos}, 'fast', function() {
			jQuery('#demo_toolbar_expand').css('background-image', 'url(http://www.thepartyline.ca/layout/img/block_expand.png)');
		});
		this.expanded = false;
	}
}

jQuery(function() {
	window.sk_demo_toolbar = new SkaDateDemoToolbar();
});
