//Global JS
var currentpage = window.location.hostname.toString();

if (currentpage.indexOf("cms.omedix.com") >= 0)
{
    // DON'T RUN SIFR
} else {
	// SIFR
	//SIFR IT UP
	var gothammedium 		= 	{ src: '../_swf/gotham-medium.swf' };
	var gothambold 		= 	{ src: '../_swf/gotham-bold.swf' };
	
	sIFR.activate(gothammedium);
	sIFR.activate(gothambold);
	
	sIFR.replace(gothammedium, {
		selector: '#content h2, #contentfull h2',
		wmode : 'transparent'
		,css: {
			'.sIFR-root': { 'font-size' : '24px' , 'color' : '#87321b'}
		}
	});
	
	sIFR.replace(gothammedium, {
		selector: '#content h3',
		wmode : 'transparent',
		css: [
			'.sIFR-root { font-size:20px; color: #000000;}'
			,'a { text-decoration: underline; font-size: 18px; color: #000000;  }'
			,'a:link { color: #000000; }'
			,'a:hover { color: #333333; }'
		] 	
	});
	
	sIFR.replace(gothammedium, {
		selector: '#content h4, #contentfull 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; }'
		] 	
	});
	
	sIFR.replace(gothammedium, {
		selector: '.columns3 div h3',
		wmode : 'transparent'
		,css: {
			'.sIFR-root': { 'font-size' : '24px' , 'color' : '#000000', 'text-align' : 'center', 'letter-spacing' : '-1'}
		}
	});
	
	sIFR.replace(gothambold, {
		selector: '#scrollbox h2, #resourcebox h3',
		wmode : 'transparent'
		,css: {
			'.sIFR-root': { 'font-size' : '22px' , 'color' : '#ffffff', 'text-align' : 'center'}
		}
	});
	
	sIFR.replace(gothambold, {
		selector: '.sifrme',
		wmode : 'transparent'
		,css: {
			'.sIFR-root': { 'font-size' : '22px' , 'color' : '#eae7c4', 'text-align' : 'center'}
		}
	});
}

$(function(){
	/* ZEBRAAAA */
	$(".zebra tr:nth-child(odd)").addClass("odd");
	
	/* Searchbar fixin' */
	$(".librarysearch").click(function(){
		$(this).attr("value","");
	});
	
	$(".newpatient").click(function(){
		$("#div1").animate({ marginTop: "-390px" }, 750 );
	});
	
	$(".returningpatient").click(function(){
		$("#div1").animate({ marginTop: "-780px" }, 750 );
	});
	
	$(".tothetop").click(function(){
		$("#div1").animate({ marginTop: "0" }, 750 );
	});

});