/* Fancybox */
$(document).ready(function() {
    $("a.fancy").fancybox({
    'padding':        6,
    'zoomSpeedIn':    1000,
    'zoomSpeedOut':   1000,
    'overlayShow':    true,
    'overlayOpacity': 0.7
    });
});

/* jQuery Cycle */
// Fix the flashing of unstyled content
$('html').addClass('js');

$(function() {
    $('#header-photo').cycle({
    timeout:       6000,  // milliseconds between slide transitions (0 to disable auto advance)
    speed:         1500,  // speed of the transition (any valid fx speed value)
    next:          null,  // id of element to use as click trigger for next slide
    prev:          null,  // id of element to use as click trigger for previous slide
    before:        null,  // transition callback (scope set to element to be shown)
    after:         null,  // transition callback (scope set to element that was shown)
    height:       '180',  // container height
    sync:          1,     // true if in/out transitions should occur simultaneously
    fit:           0,     // force slides to fit container
    pause:         0,     // true to enable "pause on hover"
    delay:         0,     // additional delay (in ms) for first transition (hint: can be negative)
    slideExpr:     null   // expression for selecting slides (if something other than all children is required)
    });
});

/* Google Analytics */
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-183448-19']);
_gaq.push(['_trackPageview']);

(function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();

