﻿jQuery(function() {
	/* ********************************************************************** */
	/* BeautyTips [http://plugins.jquery.com/project/bt]                      */
	/* ********************************************************************** */
	// avatarBadge
	jQuery('.avatarBadge').bt({
		contentSelector: '$(this).next(".avatarBadgeContents").html();',    // get text of inner content of hidden div
		clickAnywhereToClose: true,                                  // clicking anywhere outside of the tip will close it
		closeWhenOthersOpen: true,                                   // tip will be closed before another opens - stop >= 2 tips being on
		cornerRadius: 0,                                            // radius of corners (px), set to 0 for square corners
		fill: 'white',                                             // fill color for the tooltip box, you can use any CSS-style color definition method
		noShadowOpts: {strokeStyle: '#ccc', strokeWidth: 1},         // use this to define 'fall-back' options for browsers which don't support drop shadows
		positions: ['top', 'right'],                                       // preference of positions for tip (will use first with available space)
		shadow: true,                                                // use drop shadow? (only displays in Safari and FF 3.1) - experimental
		shadowBlur: 8,                                               // shadow blur (px)
		shadowColor: 'rgba(0,0,0,.9)',                               // shadow color/alpha
		shadowOffsetX: 3,                                            // shadow offset x (px)
		shadowOffsetY: 3,                                            // shadow offset y (px)
		shadowOverlap: false,                                        // when shadows overlap the target element it can cause problem with hovering
		spikeGirth: 30,                    // width of spike
		spikeLength: 20,                    // length of spike
		overlap: 0,                     // spike overlap (px) onto target (can cause problems with 'hover' trigger)
		strokeWidth: 0,                                              // width of stroke around box, **set to 0 for no stroke**
		width: 500
	});

	jQuery("a[rel='pp_modal']").prettyPhoto({
		animationSpeed: 'normal', /* fast/slow/normal */
		opacity: 0.5, /* Value between 0 and 1 */
		showTitle: false, /* true/false */
		allowresize: false, /* true/false */
		//theme: 'light_square', /* light_rounded / dark_rounded / light_square / dark_square / facebook */
		iframe_markup: '<iframe src="{path}" width="{width}" height="{height}" frameborder="no" scrolling="no" allowtransparency="true" ></iframe>',
		markup: ' \
		<div class="pp_pic_holder"> \
			<a class="pp_close" href="##">Close</a> \
			<div class="pp_content_container"> \
						<div class="pp_content"> \
							<div class="pp_loaderIcon"></div> \
							<div class="pp_fade"> \
								<div id="pp_full_res"></div> \
								<div class="pp_details clearfix"></div> \
							</div> \
						</div> \
			</div> \
		</div> \
		<div class="pp_overlay"></div>'
	});
	
	// Clearreplace on search
	jQuery("#search-field").clearreplace();

	// Fancy Scrollbars
	jQuery(".scroll-pane").jScrollPane({
		verticalDragMinHeight: 49,
		verticalDragMaxHeight: 49,
		horizontalDragMinWidth: 0,
		horizontalDragMaxWidth: 0,
		autoReinitialise: true
	});


});

