Cufon.replace('#Logo',{hover: true});
Cufon.replace('#BodyText h4',{hover: true});
Cufon.replace('#navigation li',{hover: true});
Cufon.replace('#navigation li.selected',{hover: true});
Cufon.replace('label',{hover: true});
Cufon.replace('.wp-pagenavi',{hover: true});


$(function () {
	
	$("#1210129727").validate();

	$('#NewQuestion img').show();
	$('#PhotoGuidelines img').show();
	$('#SamplePhoto img').show();
	
});

var i = 0;//initialize
var int=0;//Internet Explorer Fix
$(window).bind("load", function() {//The load event will only fire if the entire page or document is fully loaded
	var int = setInterval("doThis(i)",200);//500 is the fade in speed in milliseconds
});

function doThis1() {
	var images = $('img').length;//count the number of images on the page
	if (i >= images) {// Loop the images
		clearInterval(int);//When it reaches the last image the loop ends
	}
	$('img:hidden').eq(0).fadeIn(200);//fades in the hidden images one by one
	i++;//add 1 to the count
}

$(function() {
    $('#SubmitChanger').cycle({ 
		fx: 'fade',
        speed: 1000,
		timeout: 0,
		next: '#NewQuestionButton',
		pager:  '#nav',
		random: 1,
		pagerAnchorBuilder: function(idx, slide) { 
		        return '<a href="#"></a>'; 
		    }
    });

	$('#ShopSlideshow').cycle({ 
		fx: 'fade',
        speed: 2000,
		timeout: 3000,
		pagerAnchorBuilder: function(idx, slide) { 
		        return '<a href="#"></a>'; 
		    }
    });
});

$().ready(function() {
  $('#dialog').jqm();
$('#dialog2').jqm({trigger: '#AboutTheModels'}); 
  
});


$(document).ready(function(){

/**
 * Character Counter for inputs and text areas
 */
$('#q13').each(function(){
	// get current number of characters
	var length = $(this).val().length;
	// get current number of words
	//var length = $(this).val().split(/\b[\s,\.-:;]*/).length;
	// update characters
	$(this).parent().find('.counter').html( length + ' characters');
	// bind on key up event
	$(this).keyup(function(){
		// get new length of characters
		var new_length = $(this).val().length;
		// get new length of words
		//var new_length = $(this).val().split(/\b[\s,\.-:;]*/).length;
		// update
		$(this).parent().find('.counter').html( new_length + ' characters ');
	});
});

});
