//Global JS
//SIFR IT UP
var currentpage = window.location.hostname.toString();

if (currentpage.indexOf("cms.omedix.com") >= 0)
{
    // DON'T RUN SIFR
} else {
	// SIFR
	var baskerville 	= 	{ src: '../_swf/baskerville.swf' };
	var lucida 			= 	{ src: '../_swf/lucida_bright.swf' };
	var helvetica		= 	{ src: '../_swf/helvetica_cy.swf' };
	
	sIFR.activate(baskerville);
	sIFR.activate(lucida);
	sIFR.activate(helvetica);
	
	sIFR.replace(lucida, {
		selector: '#content h1, #contentfull h1',
		wmode : 'transparent'
		,css: {
			'.sIFR-root': { 'font-size' : '52px' , 'color' : '#000000'}
		}
	});
	
	sIFR.replace(lucida, {
		selector: '#introSpot p',
		wmode : 'transparent'
		,css: {
			'.sIFR-root': { 'font-size' : '52px' , 'color' : '#191d23', 'leading' : '20'}
		}
	});
	
	sIFR.replace(baskerville, {
		selector: '#sidebar h2',
		wmode : 'transparent'
		,css: {
			'.sIFR-root': { 'font-size' : '24px' , 'color' : '#000000'}
		}
	});
	
	sIFR.replace(helvetica, {
		selector: '#homepage h2',
		wmode : 'transparent'
		,css: {
			'.sIFR-root': { 'font-size' : '24px' , 'color' : '#000000'}
		}
	});
	
	/*sIFR.replace(palatino, {
		selector: '#content h3',
		wmode : 'transparent'
		,css: {
			.sIFR-root': { 'font-size' : '20px' , 'color' : '#161616', 'font-weight' : 'bold'}
		}
	});
	
	sIFR.replace(palatino, {
		selector: '#content h4',
		wmode : 'transparent',
		css: [
			.sIFR-root { font-size:16px; color: #000000;}'
			,'a { text-decoration: underline; font-size: 18px; color: #000000;  }'
			,'a:link { color: #000000; }'
			,'a:hover { color: #333333; }'
		] 	
	});*/
}

//RESIZE 'EM IFRAMES!
function calcHeight(){
  var the_height= document.getElementById('iXviewer').contentWindow.document.body.scrollHeight;

  document.getElementById('iXviewer').height = the_height;
}

//OTHER STUFF
$(function(){
	/* ZEBRAAAA */
	$(".zebra tr:nth-child(odd)").addClass("odd");
	
	/* Searchbar fixin' */
	$(".librarysearch").click(function(){
		$(this).attr("value","");
	});
});
