jQuery(document).ready(function(){
	//Examples of how to assign the ColorBox event to elements
	jQuery("a[rel='example1']").colorbox();
	jQuery("a[rel='example2']").colorbox({transition:"fade"});
	jQuery("a[rel='example3']").colorbox({transition:"none", width:"75%", height:"75%"});
	jQuery("a[rel='example4']").colorbox({slideshow:true});
	jQuery(".single").colorbox({}, function(){
		alert('Howdy, this is an example callback.');
	});
	jQuery(".colorbox").colorbox();
	jQuery(".youtube").colorbox({iframe:true, width:650, height:550});
	jQuery(".iframe").colorbox({width:"80%", height:"80%", iframe:true});
	jQuery(".inline").colorbox({width:"50%", inline:true, href:"#inline_example1"});

	//Example of preserving a JavaScript event for inline calls.
	jQuery("#click").click(function(){ 
		jQuery('#click').css({"background-color":"#f00", "color":"#fff", "cursor":"inherit"}).text("Open this window again and this message will still be here.");
		return false;
	});
});

jQuery(function() {
    jQuery('#slideshow').cycle({
        fx:     'fade',
        speed:  'slow',
        timeout: 8000,
        pager:  '#slider_nav',
        pagerAnchorBuilder: function(idx, slide) {
            // return sel string for existing anchor
            return '#slider_nav li:eq(' + (idx) + ') a';
        }
    });
});

jQuery(function() {
    jQuery('#featured_items').cycle({
        fx:     'scrollHorz',
		easing: 'backinout',
        timeout: 0,
        pager:  '.content_nav',
        cleartypeNoBg:  true,
        pagerAnchorBuilder: function(idx, slide) {
            return '.content_nav li:eq(' + (idx) + ') a';
        }
    });
});

jQuery(function() {
    jQuery('#latest_content_items').cycle({
        fx:     'scrollHorz',
		easing: 'backinout',
        timeout: 0,
        pager:  '.content_nav1',
        cleartypeNoBg:  true,
        pagerAnchorBuilder: function(idx, slide) {
            return '.content_nav1 li:eq(' + (idx) + ') a';
        }
    });
});

jQuery(function() {
    jQuery('#popular_content_items').cycle({
        fx:     'scrollHorz',
		easing: 'backinout',
        timeout: 0,
        pager:  '.content_nav2',
        cleartypeNoBg:  true,
        pagerAnchorBuilder: function(idx, slide) {
            return '.content_nav2 li:eq(' + (idx) + ') a';
        }
    });
});

jQuery(function() {
    jQuery('#staff_content_items').cycle({
        fx:     'scrollHorz',
		easing: 'backinout',
        timeout: 0,
        pager:  '.content_nav3',
        cleartypeNoBg:  true,
        pagerAnchorBuilder: function(idx, slide) {
            return '.content_nav3 li:eq(' + (idx) + ') a';
        }
    });
});

jQuery(function() {
    jQuery('#tab_slider').cycle({
        fx:     'fade',
        speed:  'fast',
        timeout: 0,
        pager:  '#main_content_slider',
        cleartypeNoBg:  true,
        pagerAnchorBuilder: function(idx, slide) {
            return '#main_content_slider li:eq(' + (idx) + ') a';
        }
    });
});

jQuery(function() {
    jQuery('#news_rotator').cycle({
        fx:     'fade',
        speed:  'fast',
        pause: 1,
        timeout: 5000,
        containerResize: 1
    });
});
