$(document).ready(function(){
	
	$("#slider-wrap").easySlider({
		auto: true,
		speed: 620,
		pause: 8200,
		continuous: true,
		prevId: 'slider-prev',
		prevText: '◄',
		nextId: 'slider-next',	
		nextText: '►'
	});

	$("#gmap").gMap({ 
		markers: [{ 
			latitude: 40.478227,
			longitude: -104.990566,
			html: '<p><strong>In Harmony Wellness</strong><br />4630 Royal Vista Circle #12<br /> Windsor, CO<br />970-222-5555 &nbsp; <a href="/map/"><strong>Get Directions</strong></a></p>',
			popup: false,
		}],
		icon: {
			image: "http://www.inharmonywellness.net/wp-content/themes/ihw/images/pin.png",
			shadow: false,
			iconsize: [30, 35],
			shadowsize: false,
			iconanchor: [25, 30],
			infowindowanchor: [30, 30]
		},	
		zoom:9,
	});
	
	$("#s").val("Search the site…");  
		textReplacement($('#s').css("color", "#999"));  
	function textReplacement(input){
		var originalvalue = input.val();  
		input.focus( function(){  
			if( $.trim(input.val()) == originalvalue ){ input.val('').css("color", "#000"); }  
		});  
		input.blur( function(){  
			if( $.trim(input.val()) == '' ){ input.val(originalvalue).css("color", "#999"); }  
		});	
	}
	
	$("body.store div.item").click(function(){
			location.href = $(this).find("a").attr("href");
	});
	
	$("#update").tweet({
		username: "inharmonyco",
		join_text: "auto",
		avatar_size: 0,
		count: 1,
		auto_join_text_default: "",
		auto_join_text_ed: "",
		auto_join_text_ing: "",
		auto_join_text_reply: "",
		auto_join_text_url: "",
		loading_text: "<ul class='tweet_list'><li>Loading...</li></ul>"
	});
	
	$('.gallery a').attr('rel','gallery');
	$('.gallery a[rel="gallery"]').colorbox({
		scalePhotos: true,
		maxWidth: "80%",
		maxHeight: "80%"
	});
		
	
	$("div.item").click(function(){
		window.location=$(this).find("a").attr("href"); return false;
	});
	
});