/* <meta content="charset=UTF-8" /> */

/*========== farbtastic ==========*/
$(document).ready(function(){
	$('#picker').farbtastic('#colorbutton');
});

/*========== autoHeight ==========*/
$(document).ready(function(){
	var aHwrapwidth = $("#sideBar").width() - 5;
	var aHcolwidth = 196;
	var min = aHwrapwidth % aHcolwidth;
	var columnCount = (aHwrapwidth - min) / aHcolwidth;
	
	$("div#list .gallery_post_wrap:not(.pr)").autoHeight({column:columnCount,clear:1,reset:'reset'});
});
$(window).resize(function(){
	var aHwrapwidth = $("#sideBar").width() - 5;
	var aHcolwidth = 196;
	var min = aHwrapwidth % aHcolwidth;
	var columnCount = (aHwrapwidth - min) / aHcolwidth;
	
	$("div#list .gallery_post_wrap:not(.pr)").autoHeight({column:columnCount,clear:1,reset:'reset'});
});

/*========== capslide ==========*/
$(document).ready(function(){
	$(".gallery_post_wrap").capslide({
		caption_color	: 'white',
		caption_bgcolor	: '',
		overlay_bgcolor : 'black',
		border			: '',
		showcaption	    : false
	});
});




/*========== socialbutton ==========*/
$(document).ready(function(){
    $('#hatena_button').socialbutton('hatena', {button: 'vertical',url: 'http://cssclip.com/'});
    $('#tweet_button').socialbutton('twitter', {lang: 'en',url: 'http://cssclip.com/',text: 'CSSclip'});
	$('#facebook_share').socialbutton('facebook_share', {button: 'box_count',lang: 'en',url: 'http://cssclip.com/'});
	$('#facebook_like').socialbutton('facebook_like', {button: 'box_count',locale: 'en_US',width: 0,url: 'http://cssclip.com/'});
	$('#evernote_button').socialbutton('evernote', {button: 'article-clipper-vert',styling: 'full',lang: 'en',url: 'http://cssclip.com/'});
});

