$(document).ready(function(){
	// $('#news-container').pajinate({ items_per_page : 10, item_container_id : '.news-list' });
	// $('#post-container').pajinate({ items_per_page : 4, item_container_id : '.posts' });
	$('.fadein').innerfade({
		speed: 1500,
		timeout: 6000,
		type: 'sequence',
		containerheight: '510px'
	});
	
	
	
	// PRINT PAGE
	$('a.print').click(function(){
		if (window.print) { window.print(); } else { alert("Sorry, your browser doesn't support this feature."); }
		return false;
	});
	
	
	// Google map colorbox
	$("a.map").colorbox({ iframe:true, width:"80%", height:"80%" });
	
	
	/* EXPAND/COLLAPSE ATTORNEY PROFILE */
	//Set default open/close settings
	$('.acc_container').hide(); //Hide/close all containers
	$('.acc_trigger').append('<div id="read_more"><a href="#">click to expand</a></div>');
	$('.acc_trigger').click(function(){
		$(this).toggleClass('active').next().slideUp(); //Add .acc_trigger class to clicked trigger and slide down the immediate next container
		$(this).find('#read_more').html('<a href="#">click to expand</a>');
		return false; //Prevent the browser jump to the link anchor
	});
	//On Click
	$('.acc_trigger').click(function(){
		if( $(this).next().is(':hidden') ) { //If immediate next container is closed...
		$('.acc_trigger').removeClass('active').next().slideUp(); //Remove all .acc_trigger classes and slide up the immediate next container
		$(this).toggleClass('active').next().slideDown(); //Add .acc_trigger class to clicked trigger and slide down the immediate next container
		$('.acc_trigger').find('#read_more').html('<a href="#">click to expand</a>');
		$(this).find('#read_more').html('<a href="#">click to collapse</a>');
	}
	return false; //Prevent the browser jump to the link anchor
	});
	

});

$(window).bind("load", function() {
	$("div#fewoptions").slideViewerPro({
		thumbs: 3,
		thumbsPercentReduction: 25,
		galBorderWidth: 0,
		galBorderColor: "aqua",
		thumbsTopMargin: 10,
		thumbsRightMargin: 10,
		thumbsBorderWidth: 5,
		thumbsActiveBorderColor: "#fff",
		thumbsActiveBorderOpacity: 0.8,
		thumbsBorderColor: "#BFA774",
		thumbsBorderOpacity: 0.9,
		buttonsTextColor: "#707070",
		leftButtonInner: "<img src='/wp-content/themes/paperstreet/images/facilities-previous.png' />",
		rightButtonInner: "<img src='/wp-content/themes/paperstreet/images/facilities-next.png' />",
		autoslide: true,
		typo: false
	});
});	


	// CLEAR FORM TEXT 
function focusTxt(field){ 
    if (field.defaultValue == field.value) field.value = ''; 
} 
function blurTxt(field){ 
    if (field.value == '') field.value = field.defaultValue; 
}
