		Cufon.replace('h1');
		Cufon.replace('h3.widget-title');
		Cufon.replace('.bio h2');
		Cufon.replace('.bio_single h2');
		Cufon.replace('caption');
		
	
	
	
	
	function popUp(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=500,height=400,left = 710,top = 340');");
}
	
		
$(window).load(function() {
	$('.slider').nivoSlider({
		effect:'fade', //Specify sets like: 'fold,fade,sliceDown'
		slices:15,
		animSpeed:500,
		pauseTime:4000,
		startSlide:0, //Set starting Slide (0 index)
		directionNav:false, //Next & Prev
		directionNavHide:false, //Only show on hover
		controlNav:false, //1,2,3...
		controlNavThumbs:false, //Use thumbnails for Control Nav
      controlNavThumbsFromRel:false, //Use image rel for thumbs
		controlNavThumbsSearch: '.jpg', //Replace this with...
		controlNavThumbsReplace: '_thumb.jpg', //...this in thumb Image src
		keyboardNav:true, //Use left & right arrows
		pauseOnHover:true, //Stop animation while hovering
		manualAdvance:false, //Force manual transitions
		captionOpacity:0.8, //Universal caption opacity
	});
	
	$('.postslider').nivoSlider({
		effect:'fade', //Specify sets like: 'fold,fade,sliceDown'
		slices:15,
		animSpeed:500,
		pauseTime:4000,
		startSlide:0, //Set starting Slide (0 index)
		directionNav:false, //Next & Prev
		directionNavHide:false, //Only show on hover
		controlNav:false, //1,2,3...
		controlNavThumbs:false, //Use thumbnails for Control Nav
      controlNavThumbsFromRel:false, //Use image rel for thumbs
		controlNavThumbsSearch: '.jpg', //Replace this with...
		controlNavThumbsReplace: '_thumb.jpg', //...this in thumb Image src
		keyboardNav:true, //Use left & right arrows
		pauseOnHover:true, //Stop animation while hovering
		manualAdvance:false, //Force manual transitions
		captionOpacity:0.8, //Universal caption opacity
	});

	
});


		$(document).ready(function() {
		
			
			$(".facebook").popupwindow({
				height: 400,
				width: 500,
				center: 1
			});
			
			$(".lightbox").fancybox();	
			
			$(".gallery-icon a").fancybox();	
			
			$(".post a:has(img)").fancybox({
				padding: 0
			});	
			
			
			$(".contactopen").click(function(){
			
				$("#contact").slideToggle("slow");
				
				});
				
				
			$(".postcomment").click(function(){
			
				$(".commentspostboxsingle").slideToggle("slow");
				
				});
				
			
			$(".writtenby").click(function(){
			
				$(".bio_single").slideToggle();
				
				});
				
				
			
			$(".numcomments").click(function(){
			
			if ($(this).parents("div:first").find(".commentspostbox:visible").length ) {
  				$(this).parents("div:first").find(".commentspostbox").slideUp('fast',function() { $(this).parent().find(".commentsbox").slideToggle("fast"); });
  				
  				} else {
  					$(this).parent().find(".commentsbox").slideToggle("fast");
  				}
  				
			});
			
			
			$(".postcomment").click(function(){
  				
  				
  				if ($(this).parents("div:first").find(".commentsbox:visible").length ) {
  				$(this).parents("div:first").find(".commentsbox").slideUp('fast',function() { $(this).parent().find(".commentspostbox").slideToggle("fast"); });
  				
  				} else {
  					$(this).parents("div:first").find(".commentspostbox").slideToggle("fast");
  				}
  				
			});
			
 		});	
