$(document).ready(function(){
    // loads rollover script
    SwapImage.rollover.init();
	

    if ($('.fancy').length > 0) {
        $("a.fancy").fancybox({
            'zoomSpeedIn': 200,
            'zoomSpeedOut': 200,
            'overlayShow': true,
            'overlayOpacity': 0
        });
    }
	
	

});


// image rollovers

SwapImage = {};

SwapImage.rollover =
{
   init: function()
   {
      this.preload();

      $('.hover').css('cursor', 'pointer').hover(function () { 
          $(this).attr( 'src', SwapImage.rollover.newimage($(this).attr('src')) ); 
      }, function () { 
          $(this).attr( 'src', SwapImage.rollover.oldimage($(this).attr('src')) ); 
      });
   },

   preload: function()
   {
      $(window).bind('load', function() {
         $('.hover').each( function( key, elm ) { $('<img>').attr( 'src', SwapImage.rollover.newimage( $(this).attr('src') ) ); });
      });
   },

   newimage: function( src ) { return src.replace(/\.(\w{3})/g, "Hover.$1"); },
   oldimage: function( src ){ return src.replace(/Hover\.(\w{3})/g, ".$1"); }
};
 
/* VERSION FOR DYNAMIC IMAGE
    SwapImage = {};
    
    SwapImage.rollover =
    {
    	init: function() {
    		this.preload();

    		$("img.hover,input.hover").hover(function() { 
    		    $(this).attr('src', SwapImage.rollover.newimage($(this))); 
    		}, function() { 
    		    $(this).attr('src', SwapImage.rollover.oldimage($(this)));
    		});
    		// this is just a children version of the above
    		$("a.hover").hover(function() { 
    		    $(this).children('img').attr('src', SwapImage.rollover.newimage($(this).children('img'))); },
    	     function() { 
    	         $(this).children('img').attr('src', SwapImage.rollover.oldimage($(this).children('img'))); 
    	    });

    	},

    	preload: function() {
    		$(window).bind('load', function() {
    		    
    			$('img.hover,input.hover').each(function(key, elm) { 
    			    $('<img>').attr('src', SwapImage.rollover.newimage($(this))); 
    			});
    			
    			$('a.hover').each(function(key, elm) { 
    			    $('<img>').attr('src', SwapImage.rollover.newimage($(this).children('img'))); 
    			});
    		});
    	},

    	newimage: function(img) { return img.attr('data-srcRollover'); },
    	oldimage: function(img) { return img.attr('data-srcOriginal'); }	
    };
*/

// fonts we're using

var din = {
   src: '/assets/swf/DINLight.swf',
   selectable: true
 };
 


//activate them

sIFR.activate(din);

//target elements to replace





sIFR.replace(din, {
   selector: '#contentInner h1, #titleWrapInner h1'
   ,css: [
     '.sIFR-root { color: #1d2c60; font-size: 27px}'
     
   ],
   wmode: 'transparent'
});

sIFR.replace(din, {
   selector: '#left h2, #left h3'
   ,css: [
     '.sIFR-root { color: #1d2c60; font-size: 20px}'
     
   ],
   wmode: 'transparent',
   thickness: 100
});




