$(function() {

   $('.sync-slides').each(function(index) {
        $(this).cycle({
			fx:     'fade',
			timeout: 6000,
			speed:   'fast',
		//	sync:    false,
			pager:  '#pager',
			pagerAnchorBuilder: function(i) {
				if (index == 0)
					// for first slideshow, return a new anchro
					return '<a href="#">'+(i+1)+'</a>';
				// for 2nd slideshow, select the anchor created previously
				return '#pager a:eq('+i+')';
        	}
		});
    });


$('#slideshow').cycle({ 
//    fx:     'fade', 
    speed:  'fast', 
    timeout: 0, 
    next:   '#next', 
    prev:   '#prev', 
    pager:  '#slides', 
    pagerAnchorBuilder: function(idx, slide) { 
        // return selector string for existing anchor 
        return '#slides li:eq(' + idx + ') a'; 
    } 
});



$("a[href^='http']").not("[href*='bhandariplater.com']").click(function(){
	window.open(this.href);
	return false;
});

$("a[href*=.pdf]").click(function(){
	window.open(this.href);
	return false;
});

$("a[href$='.pdf']").addClass("pdf");
$("a[href$='.doc']").addClass("doc");


});



