// swfobject code with flash wmode transparancy



var flashvars = {};

var params = {wmode:"transparent"};

var attributes = {};

swfobject.embedSWF("images/header011912.swf", "flash", "680", "300", "8.0.0","expressInstall.swf", flashvars, params, attributes); 



var flashvars = {};

var params = {wmode:"transparent"};

var attributes = {};

swfobject.embedSWF("images/police.swf", "criminal-arrest", "280", "70", "8.0.0","expressInstall.swf", flashvars, params, attributes);





// Recent cases jcarousel initialization

function mycarousel_initCallback(carousel) {

	// Pause autoscrolling if the user moves with the cursor over the clip.

    carousel.clip.hover(function() {

        carousel.stopAuto();

    }, function() {

        carousel.startAuto();

    });

};



jQuery(document).ready(function() {

    jQuery('#mycarousel').jcarousel({

        vertical: true,

        scroll: 1,

		auto: 5,

		animation: 1500,

		wrap: 'circular',

        initCallback: mycarousel_initCallback,

        // This tells jCarousel NOT to autobuild prev/next buttons

        buttonNextHTML: null,

        buttonPrevHTML: null

    });

});



function mask(mtype) {

	mmask = document.getElementById('mask');

	if (mtype == 'cc') { mmask.style.background = 'url("images/mask.png") no-repeat left bottom'; }

	if (mtype == 'dui') { mmask.style.background = 'url("images/mask.png") no-repeat 91px -100px'; }

	if (mtype == 'dc') { mmask.style.background = 'url("images/mask.png") no-repeat 182px -100px'; }

	if (mtype == 'dv') { mmask.style.background = 'url("images/mask.png") no-repeat 273px -100px'; }

	if (mtype == 'jc') { mmask.style.background = 'url("images/mask.png") no-repeat 364px -100px'; }

	if (mtype == 'tc') { mmask.style.background = 'url("images/mask.png") no-repeat 455px -100px'; }

	if (mtype == 'vc') { mmask.style.background = 'url("images/mask.png") no-repeat right top'; }

	if (mtype == 'clall') { mmask.style.background = 'url("images/spacer.png") no-repeat left top'; }

}


function goToByScroll(id){
	$('html,body').animate({scrollTop: $("#"+id).offset().top},'slow');
}
