// JavaScript Document

$(document).ready(function(){
	globalScripts.init();			
});


globalScripts = {

	init: function() {	

		if (navigator.platform == "iPhone") {
			$("head").append('<link rel="stylesheet" href="/wp-content/themes/stcworks/styles/iphone.css" media="all" />');
		}



		//image pop up
		
		$(".popupTrigger").click(function(){
			
			var classSet = $(this).attr("class");
			var classArray = classSet.split(" ");	
			
			var popWidth = classArray[1].slice(1);
			var popHeight = classArray[2].slice(1);
			var imagePath = $(this).attr("src");
			var popupParameters = "resizable=yes, scrollbars=yes, location=no, toolbar=no, status=no, width="+ popWidth + ", height=" + popHeight;
		
			
			window.open("/wp-content/themes/stcworks/popup/popup.php?imagePath="+imagePath, "imagePopup", popupParameters);
		
		});
	
	
		//cleans the search bar
		$("#footer #s").attr("value","SEARCH");

		$("#s").click(function(){
			$(this).attr("value","");					   
		})
		
		
		//arb 

	$("a:contains('-ARB-')").hide();	
	$("a:contains('-ARB-') + span").hide();		
	 



	}
	//e:init
}
//e:globalScripts



