$(document).ready(function(){
	$(function() {
		$('.fade').mosaic();
	});

	$(function(){
		$('img.lazy').jail();
	});

	$(".goTop").click(function () {
		$.scrollTo('#top',800);
	});
});

/*
Open Centered Popup Window Script-(c) DHTMLShock (www.dhtmlshock.com)
To add more shock to your site, visit www.DHTMLShock.com
*/

function OpenBrWindow(theURL,winName,features, myWidth, myHeight, isCenter) { //v3.0
	if(window.screen)if(isCenter)if(isCenter=="true"){
		var myLeft = (screen.width-myWidth)/2;
		var myTop = (screen.height-myHeight)/2;
		features+=(features!='')?',':'';
		features+=',left='+myLeft+',top='+myTop;
	}
	window.open(theURL,winName,features+((features!='')?',':'')+'width='+myWidth+',height='+myHeight);
}

function shareOnFacebook(url) {
	OpenBrWindow('https://www.facebook.com/sharer/sharer.php?u=' + url, 'shareOnFacebook', 'resizable=1,status=no,menubar=no,scrollbars=yes,toolbar=no,titlebar=no,location=no','620','425','true');
}

function shareOnTwitter(url, text, via) {
	OpenBrWindow('https://twitter.com/share?original_referer=' + url + '&text=' + text + '&url=' + url + '&via=' + via, 'shareOnTwitter', 'resizable=1,status=no,menubar=no,scrollbars=yes,toolbar=no,titlebar=no,location=no','620','425','true');
}
