var http_host = '';

function strpos (haystack, needle, offset) {
    // Finds position of first occurrence of a string within another 
    //
    // version: 909.322
    // discuss at: http://phpjs.org/functions/strpos
    // +   original by: Kevin van Zonneveld (http://kevin.vanzonneveld.net)
    // +   improved by: Onno Marsman   
    // +   bugfixed by: Daniel Esteban
    // *     example 1: strpos('Kevin van Zonneveld', 'e', 5);
    // *     returns 1: 14
    var i = (haystack+'').indexOf(needle, (offset ? offset : 0));
    return i === -1 ? false : i;
}

jQuery(document).ready(function(){
	jQuery('a[href^=http]').click( function() {
		if(strpos(this.href,http_host) == false){
	   	window.open(this.href);
        return false;
		}
    });

});

$(document).ready(function()
{
	$('.text').each(function()
	{
		document['def_'+$(this).attr('name')] = $(this).attr('value');
		$(this).focus(function()
		{
			if($(this).attr('value') == document['def_'+$(this).attr('name')]) $(this).attr('value','');
		});
		$(this).blur(function()
		{
			if($(this).attr('value') == '') $(this).attr('value',document['def_'+$(this).attr('name')]);
		});
	});
	
	$('#nav li').hover(function()
	{
		$(this).addClass('over');
	},function()
	{
		$(this).removeClass('over');
	});
	
	$(".rewt").css("z-index","100000");
	
	$(".thumb_slideshow").cycle()

})/**/
