//Configure bookmarking properties
share.url = "http://www.sonypictures.com/homevideo/30daysofnightdarkdays";
share.title = "30 Days of Night: Dark Days - On Blu-ray & DVD Oct 5th - Check it out!";
share.description = "This blood-curdling sequel is coming to Blu-ray & DVD!";
share.tweet = "This blood-curdling sequel is coming to Blu-ray & DVD! http://sonypictures.com/u.php?a=25714";
share.digg.title = "30 Days of Night: Dark Days - On Blu-ray & DVD Oct 5th - Check it out!";
share.tracking = true;

var displayScrollBars = function () {
	$('.scroll-pane').jScrollPane({ showArrows: false, scrollbarWidth: 10, dragMinHeight: 1, dragMaxHeight: 12 });
	$('.scroll').jScrollPane({ showArrows: false, scrollbarWidth: 10, dragMinHeight: 1, dragMaxHeight: 12 });
};

function popitup(url) {
	newwindow=window.open(url,'name','height = 545,width = 435,screenX=400,screenY=200');
	if (window.focus) {newwindow.focus();}
	return false;
}


function popitupFull(url) {
	newwindow=window.open(url,'name','height = 800,width = 1200,screenX=40,screenY=20');
	if (window.focus) {newwindow.focus();}
	return false;
}


// Social bookmarking function
function sharethis() {
	/*
	if(document.getElementById('share')) {
		var links = document.getElementById('share').getElementsByTagName('a');
		for (var i=0; i<links.length; i++) {
			var link = links[i];
			link.onclick= function() {
				share.send(this.getAttribute('rel'));	
				return false;
			}
		}
	} else {
		return false;
	}
	*/
		$('#share a').bind('click',function(){
		share.send($(this).attr('rel'));	
		return false;
	});
}

/*
addLoadEvent(function (){sharethis()});


$(function(){
	displayScrollBars();
	sharethis();
});
*/
$(document).ready(function(){
	displayScrollBars();
	sharethis();
});
