jQuery(document).ready(function($) {




	
	// Tabs
    $("#h-tabs").tabs("#tabssidebar > div"); 
    $("#accordion").tabs("#accordion > div", {tabs: 'h3', effect: 'slide', initialIndex: null});
    $("#tabvanilla .tabnav").tabs("#tabvanilla > div"); 
    $("#tabvanilla_1 .tabnav-1").tabs("#tabvanilla_1 > div"); 
    
    

    
	/*
    var currentHTab = 0;

    $("#h-tabs li:eq(" + currentHTab + ")").addClass("active");
    $(".h-tabs_content:eq(" + currentHTab + ")").show();
    $(".v-tabs_content div").hide();

    $(".v-tabs a").each( function() {
        if ($(this).hasClass("active")) {
            currentVTab = $(".v-tabs a").index(this);
            $(".v-tabs_content div:eq(" + currentVTab + ")").show();
        }
    });

    $("#h-tabs li").click( function() {
        $("#h-tabs li").removeClass("active");
        $(".h-tabs_content").hide();
        currentHTab = $("#h-tabs li").index(this);
        $("#h-tabs li:eq(" + currentHTab + ")").addClass("active");
        $(".h-tabs_content:eq(" + currentHTab + ")").show();
    });

	
	
	
    $(".v-tabs a").click( function() {
        $(this).parent().parent().parent().find(".v-tabs a").removeClass("active");
        $(this).parent().parent().parent().find(".v-tabs_content div").hide();
        currentVTab = $(".v-tabs a").index(this);
        $(".v-tabs a:eq(" + currentVTab + ")").addClass("active");
        $(".v_inside:eq(" + currentVTab + ")").show();
    });
*/




    
});


(function($) {
    $(function() {
        $(".threaded-comments").toggle(
        function () {
$(this).next().css( {'display':'none'});
        },
        function () {
$(this).next().css( {'display':'block'});
        }
        );
    });

    // Clear Input Text
    $.fn.clearDefault = function() {
        return this.each(function() {
            var default_value = $(this).val();
            $(this).focus(function() {
                if ($(this).val() == default_value) $(this).val("");
            });
            $(this).blur(function() {
                if ($(this).val() == "") $(this).val(default_value);
            });
        });
    };

    jQuery('input#input_4_12,input#input_4_9,textarea#input_4_5,#s,.user_Name,.user_Email').clearDefault();


// Comment Tabs
    


    $("#show_reply_checkbox").click(function () {

        if ($(this).attr('checked')) {
            $("#comments ul.children").css("display","");
        } else {
            $("#comments ul.children").css("display","none");
        }

    });

    $("#comments_toggle").click(function () {

        $("#comments_list_bracket").css("display","");
        $("#pings_list_bracket").css("display","none");

    });

    $("#pings_toggle").click(function () {

        $("#comments_list_bracket").css("display","none");
        $("#pings_list_bracket").css("display","");

    });


    


	
	   
    
    
    
    
    
    
    
 // initialize scrollable and return the programming API
  $("#aside-bar-top, #aside-healthy-dels, #aside-hunter").scrollable({
      items: '.tools',
      size: 1,
      clickable: false

    // use the navigator plugin
    }).navigator();
    
    
    var api = $("#aside-rugged-women-new").scrollable({
      items: '.tools',
      size: 1,
      clickable: false      

    // use the navigator plugin
    }).navigator({api: true});
    
    api.begin();


    $("#coda-slider-quotes").scrollable({
        items: '.tools',
        size: 1,
        clickable: false

      // use the navigator plugin
      }).navigator("#coda-slider-quotes .coda-nav ul");
    
    

    
    
     toolsHeight  = $('#aside-rugged-women-new .tools').height();
     thumbsHeight = $('#aside-rugged-women-new .t').height();
     totalHeight  = 	toolsHeight + thumbsHeight + 10 ;	
     $("#aside-rugged-women-new").css({ height: totalHeight });

     toolsHeight  = $('#aside-bar-top .tools').height();
     thumbsHeight = $('#aside-bar-top .t').height();
     totalHeight  =   toolsHeight + thumbsHeight + 10 ; 
     $("#aside-bar-top").css({ height: totalHeight });

     toolsHeight  = $('#aside-hunter .tools').height();
     thumbsHeight = $('#aside-hunter .t').height();
     totalHeight  =   toolsHeight + thumbsHeight + 10 ; 
     $("#aside-hunter").css({ height: totalHeight });

     toolsHeight  = $('#aside-healthy-dels .tools').height();
     thumbsHeight = $('#aside-healthy-dels .t').height();
     totalHeight  =   toolsHeight + thumbsHeight + 10 ; 
     $("#aside-healthy-dels").css({ height: totalHeight });
     
     toolsHeight  = $('#coda-slider-quotes .tools').height();
     thumbsHeight = $('#coda-slider-quotes .t').height();
     totalHeight  =   toolsHeight + thumbsHeight + 10 ; 
     
})(jQuery);



(function($) {

	var $modelthumb = $("#modelthumb a");
	
	if($modelthumb.length != 0 ){
		// select the thumbnails and make them trigger our overlay 
		$modelthumb.overlay({ 
		 
		    // each trigger uses the same overlay with the id "gallery" 
		    target: '#gallery', 
		 
		    // optional exposing effect 
		    expose: '#f1f1f1',
		    
		    effect: 'apple'

		// let the gallery plugin do its magic! 
		}).gallery({ 
		 
		    // the plugin accepts its own set of configuration options 
		    speed: 300
		    
		});
		}
	
})(jQuery);

