/*
Name: PTO helper scripts
Date: October 2010
Version: 1.0
Author: Nick Cernis
Author URI: http://modernerd.com
*/

$(document).ready(function(){

	//SEMI AUTOMATIC HEADER REPLACEMENT
	//Replace headers with CSS background 
	//images based on their titles.
	/*$('h2').each(function(index) {
    	    	
    	var title = $(this).text();
    	var imagename = title.replace(/\s/g, "-");
    	var imagename = imagename.replace(/\./g, "");
    	var imagename = imagename.replace(/\?/g, "");
    	var imagename = imagename.toLowerCase() + ".png";
    	
    	var imagepath = "url(img/headings/"+imagename+")";
    	
    	$(this).css("background-image", imagepath);  
    	$(this).css("text-indent", "-10000px");  
	
  	});*/
  	
  	//$("img").lazyload({ threshold : 200, effect: "fadeIn", failurelimit : 10 });
  	

	if (jQuery.browser.qtime){
		$('#pto2-movie').css("background-image", "url(http://putthingsoff.com/img/put-things-off-2-vid.png)");
		$('#pto2-movie').css("cursor","pointer"); 
		
		$('#pto2-movie').bind('click', function() {
		  $('#pto2-movie').html('<embed src="http://putthingsoff.com/video/pto2-demo.mov" width="250" height="375" autoplay="true" controller="false" loop="false" style="margin:101px 0 0 25px;" />');
		});
		
	}

	/*if (jQuery.browser.qtime){
		$('#pto2-movie').html('<embed src="http://putthingsoff.com/video/pto2-demo.mov" width="250" height="375" autoplay="false" controller="false" loop="false" style="margin:101px 0 0 25px;" />');
	}*/
	


});
