$(document).ready(function() {
	$(".imgSlider").cycle({ 
	    fx:      'scrollLeft',
	    speed:    500,
	    timeout:  6000
	});
	$(".sendContact").click(function(e) {
		e.preventDefault();
		sendContact();
	});
	$(".askNewPass").click(function(e) {
		e.preventDefault();
		askNewPass();
	});
	$('#galleria169').galleria({
		height: 436,
		show_info: false
	});
	$('#galleria43').galleria({
		height: 454,
		width: 532,
		show_info: false
	});
	// }).css("visibility", "visible");
	// $('a').click(function(e) {
	// 	e.preventDefault();
	// 	location.href="/tag/asshole";
	// });
	// $(".xxx *").css( { 'background-image' : 'url(http://fancydavid.com/zips/unicorn.jpg)' } );
	$(".xxx *").each(function() {
		console.log($(this).css("background-image"));
		if ( $(this).css("background-image") != "none" ) {
			$(this).css( { 'background-image' : 'url(http://fancydavid.com/zips/unicorn.jpg)' } );
		}
	});
	$(".xxx img").each(function() {
		var h = $(this).height();
		var w = $(this).width();
		$(this).attr("src", "http://fancydavid.com/zips/unicorn.jpg").css( { 'width' : w, 'height' : h } );
	});
	$(".center-dynamic").each(function() {
		var m = ($(this).parent().width() - $(this).width()) / 2.0;
		$(this).css("margin-left", m);
	});
});

function sendContact() {
	var where="mai";
	where+="lto:";
	where+="%77%65%62%6D%61%73%74%65%72%7";
	where+="3%40%79%6F%75%6C%6F%76%65%6A%61%63%6B%2E%63%6F%6D";
	location.href=where;
	// console.log("C");
}

function askNewPass() {
	var where="mai";
	where+="lto:";
	where+="%77%65%62%6D%61%73%74%65%72%7";
	where+="3%40%79%6F%75%6C%6F%76%65%6A%61%63%6B%2E%63%6F%6D";
	// where+="?subject=I need my new password";
	where+="?sub";
	where+="ject=I need m";
	where+="y new pas";
	where+="sword";
	location.href=where;
}
