/*
WinOpen
----------------------------------------------------
<a href="popup.html" target="_blank" onClick="WinOpen(this.href,550,600); return false;"></a>
*/
function WinOpen(src,width,height){
   if(! WinOpen.arguments[1]) width  = 500;
   if(! WinOpen.arguments[2]) height = 500;
   var wo = window.open(src,"_blank","toolbar=yes,location=no,directories=no,status=yes,menubar=no,scrollbars=yes,resizable=yes,width=" + width + ",height=" + height);
   wo.window.focus();
}

/*
WinClose
----------------------------------------------------
<a href="javascript:void(0)" onClick="WinClose()"></a>
*/
function WinClose(){
   self.window.close();
}

/*
Organic Tabs
----------------------------------------------------*/
$(function() {
	$("#switch-tab").organicTabs({
		"speed": 200
	});
});

/*
Scroll to Pagetop
----------------------------------------------------*/
(function($) {

	//=====================================Main Routine
	$(function() {
		setRollovers();
		initSearchExample();
		initScrollLinkPagetop();
		initScrollLinkInternalAnchor();
	});

	var initSearchExample = function() {
		$('').example(function() {
			return $(this).attr('title');
		});
	};
 
	var initScrollLinkPagetop = function() {
		$("").localScroll({speed: 950, easing: "easeOutExpo"});
	};

	var initScrollLinkInternalAnchor = function() {
		$(".back-to-top").localScroll({speed: 950, easing: "easeOutExpo"});
		$(".wp-link").localScroll({speed: 950, easing: "easeOutExpo"});
	};

})(jQuery)

