jQuery(document).ready(function(){
	var rttheme_effect_options = jQuery("meta[name=rttheme_effect_options]").attr('content');
	var rttheme_slider_time_out = jQuery("meta[name=rttheme_slider_time_out]").attr('content');
	var rttheme_slider_numbers = jQuery("meta[name=rttheme_slider_numbers]").attr('content');
	if(rttheme_slider_numbers=='true') 	{
		var numbers="#numbers";
	}	
	$('#slider_area').cycle({ 
		fx:    rttheme_effect_options,
		easing: 'backout', 
		cleartype:  1,		
		timeout: rttheme_slider_time_out ,
		pager:  numbers, 		
			pagerAnchorBuilder: function(idx) { 
				return '<li><a href="#" title="">' + (idx+1) + '</a></li>'; 
			} 
	});
});


//porffolio box texts
	$(document).ready(function(){
		$('.portfolio_con').hover(function(){
			$(".portfolio_text", this).stop().animate({left:'0px',opacity:0.9},{queue:false,duration:160});
		}, function() {
			$(".portfolio_text", this).stop().animate({left:'-360px'},{queue:false,duration:160});
		});
	});
//photo gallery - photo desc.
	$(document).ready(function(){
		$('.photo_gallery_con').hover(function(){
			$(".photo_gallery_text", this).stop().animate({left:'0px',opacity:0.9},{queue:false,duration:160});
		}, function() {
			$(".photo_gallery_text", this).stop().animate({left:'-360px'},{queue:false,duration:160});
		});
	});
//pretty photo
	$(document).ready(function(){
		$("a[rel^='prettyPhoto']").prettyPhoto();
	});
//cufon fonts
	var rttheme_disable_cufon= jQuery("meta[name=rttheme_disable_cufon]").attr('content');
	if(rttheme_disable_cufon!='true') {
		$(document).ready(function(){
			Cufon.replace('h1,h2,h3,h4,h5,h6', {hover: true});
		});
	}

$(function(){	
	
	$('.submit-btn').each(function() {
		var btn_class = ($(this).hasClass('btn'))?'btn':'btn-alt';
		$('<a class="form-submit"><span>'+$(this).val()+'</span></a>').addClass(btn_class).attr('title', $(this).val()).attr('tabindex', $(this).attr('tabindex')).insertBefore($(this));
		$(this).wrap('<span class="hide"></span>');
	});

	$('.form-submit').each(function() {
		$(this).css('cursor', 'pointer')
		.click(function() {
			$(this).siblings('span').children('.submit-btn').click();
		})
		.keypress(function (e) {
			var code = (e.keyCode ? e.keyCode : e.which);
			if(code == 13)	
				$(this).siblings('span').children('.submit-btn').click();
		});										
	});

	$('a.external').click(function(){
		window.open(this.href);
		return false;
	});

	$(".notice, input[type='text'], select, textarea").css({
		'-moz-border-radius'	:'5px',
		'-khtml-border-radius'	:'5px',
		'-webkit-border-radius'	:'5px',
		'border-radius'			:'5px'
	});
	
	$('input.btn, input.btn-alt').css({
		'-moz-border-radius'	:'15px',
		'-khtml-border-radius'	:'15px',
		'-webkit-border-radius'	:'15px',
		'border-radius'			:'15px'
	});
	
});	