﻿var j$ = jQuery.noConflict();

j$(document).ready(function () {
    j$('.rightTab').click(function () {
        var pageNum = j$(this).attr("href").match(/#([0-9]+)/)[1];
        var categoryId = j$('input[id$=hdnCategoryID]').val()
        j$('#rightTabContent').load('/site/pages/rightTabContent.aspx', { tab: pageNum, categoryid: categoryId });

        j$('.rightTab').removeClass('tabOn');
        j$(this).addClass('tabOn');
        return false;
    });

    j$('.girlTab').click(function () {
        var pageNum = j$(this).attr("href").match(/girlTab=([0-9]+)/)[1];
        j$('#girlTabContent').load('/site/pages/girlTabContent.aspx', { girlTab: pageNum });

        j$('.girlTab').removeClass('tabOnGirl');
        j$(this).addClass('tabOnGirl');
        return false;
    });

    j$(document).ready(function () {
        j$('#widgetBody').each(function (index) {

            j$('#noStrings').hide();
        });


        j$('.wld_container_soulmates').load('/site/controls/customcolumn/getgirls.ashx?source=soulmates');
        j$('.wld_container_nostrings').load('/site/controls/customcolumn/getgirls.ashx?source=nostrings');



        j$('.noStrings').click(function () {
            j$('#soulmates').hide();
            j$('#flirtyFun').hide();
            j$('#noStrings').show();
            j$('.soulmates').removeClass('active');
            j$('.flirtyFun').removeClass('active');
            j$('.noStrings').addClass('active');
        });

        j$('.soulmates').click(function () {
            j$('#flirtyFun').hide();
            j$('#noStrings').hide();
            j$('#soulmates').show();
            j$('.flirtyFun').removeClass('active');
            j$('.noStrings').removeClass('active');
            j$('.soulmates').addClass('active');
        });

        j$('.galleryIcons').hide();

        j$('.featureImage').hover(
            function () {
                j$('.galleryIcons', this).show();
            },

            function () {
                j$('.galleryIcons', this).hide();
            }
        );


        return false;
    });


});



function getURLSoulmates() {
    window.location.href = 'http://soulmates.singlegirls.fhm.com' + '/search.cfm?type=home&gender=1&minage=' + document.getElementById('minage').options[document.getElementById('minage').selectedIndex].value + '&maxage=' + document.getElementById('maxage').options[document.getElementById('maxage').selectedIndex].value + '&region=' + document.getElementById('region').options[document.getElementById('region').selectedIndex].value;
}

function getURLFlirtyFun() {
    
    window.location.href = 'http://flirtyfun.singlegirls.fhm.com' + '/search.cfm?type=home&gender=1&minage=' + document.getElementById('minageFlirt').options[document.getElementById('minageFlirt').selectedIndex].value + '&maxage=' + document.getElementById('maxageFlirt').options[document.getElementById('maxageFlirt').selectedIndex].value + '&region=' + document.getElementById('regionFlirt').options[document.getElementById('regionFlirt').selectedIndex].value;
}

function getURLNoStrings() {
    
    window.location.href = 'http://nostrings.singlegirls.fhm.com' + '/search.cfm?type=home&gender=1&minage=' + document.getElementById('minageNoStrings').options[document.getElementById('minageNoStrings').selectedIndex].value + '&maxage=' + document.getElementById('maxageNoStrings').options[document.getElementById('maxageNoStrings').selectedIndex].value + '&region=' + document.getElementById('regionNoStrings').options[document.getElementById('regionNoStrings').selectedIndex].value;
}

j$(document).ready(function() {

    j$('#promoContainer .promoSlot')

        .hover(
            function() {
                j$(this).children('div').stop().animate({ height: 140 }, 200);
            },

            function() {
                j$(this).children('div').stop().animate({ height: '86' }, 200);
            }
        )

        });



        j$(document).ready(function () {
            base_url = document.location.href.substring(0, document.location.href.indexOf('index.html'), 0);

            






        }); 
