$(document).ready(function(){
	var browser = navigator.userAgent.toLowerCase();
	var mobile = false;
	if(browser.search('iphone') > -1 || browser.search('ipod') > -1 || browser.search('ipad') > -1 || browser.search('android') > -1)
		mobile = true;
			
	
	if(!mobile)
	{
		$('.colorbox-profile').each(function(i){
			//$(this).attr('class','cool-colorbox-profile');
			$(this).attr('class','prettyPhoto-profile');
			$(this).attr('rel','prettyPhoto');
			$(this).attr('href', $(this).attr('href').replace('/About','/service') + '&ajax=true'  );
		})
		
		$('.has-tooltip *[title],.has-tooltip[title]').tipTip({maxWidth: '700px', defaultPosition: 'bottom'	});
		$('#site-top-navigation li[title]').tipTip({	maxWith: '500px', defaultPosition: 'top'	});
		
		$('.prettyPhoto').prettyPhoto({ theme: 'dark_rounded', social_tools: '' });
		$('.prettyPhoto-profile').prettyPhoto({
			theme: 'dark_rounded',
			social_tools: '',
			allow_resize: true,
			default_width: 550,
			default_height: 225,
			callback: function(){
				window.history.back();
			}
		});
		
		$('.prettyVideo').prettyPhoto({
			theme: 'dark_rounded',
			social_tools: '',
			allow_resize: true,
			default_width: 700,
			default_height: 450,
			callback: function(){
				window.history.back();
			}
		});
		
		/*$("#photo-gallery a[rel^='prettyPhoto']").prettyPhoto({
			theme: 'dark_rounded',
			slideshow:5000,
			social_tools: '',
			autoplay_slideshow:true,
			callback: function(){
				window.history.back();
			}
		});*/
		
		$('a.fancy').fancybox({
			'titlePosition': 'over'
		});
		
	}

	//Stuff that work for mobile and non mobile platforms
	$(".tablesorter-table").tablesorter(); 
	
	//$('.hover-zoom img').hoverZoom();
	
	
}); 
