Subversion Repositories SmartDukaan

Rev

Rev 7867 | Rev 7872 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
6967 kshitij.so 1
function toggle(containerId){
2
        var divC = document.getElementById(containerId);
3
        if (divC.style.display == 'none') {
4
            divC.style.display = 'block';
5
        } else if (divC.style.display == 'block'){
6
            divC.style.display = 'none';
7
        }
8
        else {
9
        	divC.style.display = 'none';
10
        }
11
    }
12
 
4126 varun.gupt 13
$(function(){
4984 varun.gupt 14
	function CollapsibleWidget(container)	{
15
 
16
		this.widgetContainer = container;
17
		this.collapsbiles = $(container).children('.common-widget-control-bar, .common-widget-content-area');
18
		this.isCollapsed = null;
19
 
20
		this.collapse = function()	{
21
			$(this.collapsbiles).each(function()	{
22
				$(this).slideUp();
23
			});
24
			this.isCollapsed = true;
25
		};
26
 
27
		this.open = function()	{
28
			$(this.collapsbiles).each(function()	{
29
				$(this).slideDown();
30
			});
31
			this.isCollapsed = false;
32
		};
33
 
34
		this.test = function()	{
35
		};
36
	}
4798 varun.gupt 37
 
4984 varun.gupt 38
	ResearchWidget.prototype = new CollapsibleWidget();
39
	ResearchWidget.prototype.constructor = CollapsibleWidget;
40
 
41
	function ResearchWidget(container)	{
42
		CollapsibleWidget.call(this, container);
43
	}
44
 
4798 varun.gupt 45
	function updateCompareCount()	{
46
		$('#research_compare_count').html($('#myresearch input[type="checkbox"]:checked').length);
47
	}
48
 
4126 varun.gupt 49
	/** Sidebar Widgets **/
4237 varun.gupt 50
 
6840 kshitij.so 51
	$('#otg_know_more,.otg_know_more').click(function(){
6552 kshitij.so 52
		$.colorbox({
53
    		width: "490px",
6772 kshitij.so 54
    		height: "420px",
6552 kshitij.so 55
    		inline: true,
56
    		href: "<h3 style='text-align: center; margin: 18px; font-size: 14px;'>On Time Guarantee, We Pay if we Delay</h3>" +
57
		"<p style='text-align: justify; margin-left: 12px; margin-right: 12px; margin-bottom: 9px; line-height: 22px;'>Saholic stands for 100% on time delivery. We ensure all your orders reach your doorstep on or "+
58
        "before the promised delivery date. In the rare case that we deliver an order later than promised "+
59
        "we will compensate you.This Guarantee is Valid on"+
60
        "</p>" +
61
        "<ul style='list-style: disc none none; margin-left: 25px; text-align: justify; margin-right:12px; line-height: 22px;'><li>All Mobiles, Cameras, Laptops, Tablets and Accessories above Rs. 2000 in value."+
62
        "</li>"+
63
        "<li>Orders Placed using Credit/Debit Card, Net Banking, EMI, Prepaid Cash Cards."+
64
        "</li>"+
65
        "</ul>"+
6772 kshitij.so 66
        "<p style='text-align: justify; line-height: 22px; margin: 12px;'>Compensation for delay is in the form of Gift Vouchers at the rate of Rs. 50 per business day. " +
67
        "GV can be applied to ANY product on Saholic.com without limitation.</p>"+
7063 kshitij.so 68
        "<span class='right'><a target='_blank' href='/static/on-time-guarantee' style='margin-right: 12px; color: #006699';>Detailed Terms & Conditions</a></span>",
6552 kshitij.so 69
        onComplete: function(){
70
		trackEventWithGA('Widget', 'OTG Know More is clicked', '');
71
			}
72
    	});
73
	});
7680 rajveer 74
 
7809 rajveer 75
	$('#cod_know_more,.cod_know_more').click(function(){
7680 rajveer 76
		$.colorbox({
7867 rajveer 77
    		width: "450px",
7868 rajveer 78
    		height: "120px",
7680 rajveer 79
    		inline: true,
7809 rajveer 80
    		href: "<ul style='list-style: disc none none; margin-left: 25px; text-align: justify; margin-right:12px; line-height: 22px;'>"
7865 rajveer 81
    			+"<li>Expected delivery date for Prepaid orders is " + $("#shipping_time .red").html() + "</li>"+
7810 rajveer 82
    			"<li>" + $("#shipping_time .cod").html() + "</li>"+
7809 rajveer 83
        "</ul>",
7680 rajveer 84
        onComplete: function(){
7809 rajveer 85
		trackEventWithGA('Widget', 'COD Know More is clicked', '');
7680 rajveer 86
			}
87
    	});
88
	});
89
 
7846 rajveer 90
 
4237 varun.gupt 91
	$('#shoppingExpInfo').click(function(){
92
		$.colorbox({
4284 varun.gupt 93
    		width: "550px",
94
    		height: "320px",
4237 varun.gupt 95
    		inline: true,
96
    		href: "<h3>Shopping with Saholic.com is completely safe</h3><br />" +
4284 varun.gupt 97
		"<b>1.</b> We are part of Spice Group - India's # 1 Mobile retailer.<br /><br />" +
98
		"<b>2.</b> We procure directly from the Manufacturers - Hence we only sell genuine products with full Manufacturer Warranty.<br /><br />" +
99
		"<b>3.</b> We provide free Next Day Delivery to most locations - You can check the delivery time to your location by entering your pin code on the product page.<br /><br />" +
6173 kshitij.so 100
		"<b>4.</b> We use the best Internet Security technology - Your payment is 100% secure.<br />",
4372 varun.gupt 101
			onComplete: function(){
6261 amit.gupta 102
				trackEventWithGA('Widget', 'Safe shopping sticky banner is clicked', '');
4372 varun.gupt 103
			}
4237 varun.gupt 104
    	});
105
	});
6245 kshitij.so 106
 
6552 kshitij.so 107
 
6970 kshitij.so 108
	$('.insuranceInfo').click(function(){
109
		$.colorbox({
110
    		width: "520px",
111
    		height: "280px",
112
    		inline: true,
113
    		href: "<h3 style='font-size:15px; text-align:center; font-weight:bold; margin-left:15px; margin-top:5px;margin-bottom:10px'>Exclusively at Saholic</h3>" +
114
    		"<ul style='text-align: justify; padding-right: 10px; width: 93%; padding-left: 16px; line-height: 25px;'>"+
115
    		"<li>Only Saholic brings to you an option to protect your smartphone against theft and burglary.</li>"+
116
    		"<li>While buying your favourite mobile from Saholic, you can opt for 1 year WorldWide theft insurance.</li>"+
117
    		"<li>Introductory offer - You can opt for insurance by paying an all inclusive nominal fee of 1.5% of price of your mobile.</li>"+
7062 kshitij.so 118
    		"<a target='_blank' href='/static/insurance-terms' style='float: right; text-decoration: none;color:#006699';>Detailed Terms and Conditions</a>"+
6970 kshitij.so 119
    		"</ul>",
120
			onComplete: function(){
121
				trackEventWithGA('Widget', 'Insurance sticky banner is clicked', '');
122
			}
123
    	});
124
	});
125
 
126
 
6959 kshitij.so 127
	$('.emiInfo').click(function(){
6453 kshitij.so 128
		$.colorbox({
6967 kshitij.so 129
    		width: "590px",
130
    		height: "480px",
6453 kshitij.so 131
    		inline: true,
7051 kshitij.so 132
    		href: "<h3 style='font-size: 15px; text-align: center; font-weight: bold; margin-left: 15px; margin-bottom: 10px; margin-top: 7px;'>Completely Free EMI For 3 Months</h3>" +
6967 kshitij.so 133
    		"<div style='display: inline-block; padding-left: 5px;' class='bank-logo'><img src='/images/hdfc-icon.png' style='vertical-align: middle;'></div>"+
7062 kshitij.so 134
    		"<div class='emi-text' style='text-align: justify; height: 49px; padding-left: 3px; width: 397px; display: inline-block; vertical-align: top;'><p style='height: 38px; width: 420px;'>Available for 3, 6, 9, 12 and 18 months.Completely free for 3 months<br><a onclick='toggle(\"emi-table-hdfc\");' style='cursor: pointer; text-decoration: none;color:#006699;'>See Full Details</a></p></div>"+
6967 kshitij.so 135
    		"<div id='emi-table-hdfc' style='padding-left: 5px; display: none;'>"+
136
    		"<table width='85%' cellspacing='0' cellpadding='0' border='0' id='emiwidget' style='padding-top: 2px; padding-bottom: 2px; border-top-width: 0px; border-left-width: 0px;padding-left: 5px'>"+
137
    		"<thead>"+
138
            "<th style='border:1px solid gray;text-align: center;background-color: #F1F1F1;' colspan='5'>All Inclusive Processing Fee*</th>"+
139
            "</thead>"+
140
            "<tbody>"+
141
            "<tr>"+
142
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>3 Months</th>"+
143
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>6 Months</th>"+
144
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>9 Months</th>"+
7011 kshitij.so 145
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>12 Months</th>"+
146
            "<td style='border-width: 0px 1px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>18 Months</th>"+
6967 kshitij.so 147
            "</tr>"+
148
            "<tr>"+
149
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>Free</td>"+
150
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>4.22%</td>"+
151
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>7.04%</td>"+
7011 kshitij.so 152
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>9.67%</td>"+
153
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 1px solid gray;text-align: center;'>15.36%</td>"+
6967 kshitij.so 154
            "</tr>"+
155
            "</tbody>"+
156
            "</table>"+
157
            "<br>"+
158
    		"<ul style='list-style : disc none none; padding-left: 20px; text-align:justify; line-height: 13px; padding-right: 10px; width: 83%;'>"+
159
    		"<li>Select EMI on Make Payment Page to see Monthly EMI payable and Total Amount Payable.</li>"+
6772 kshitij.so 160
    		"<br>"+
6967 kshitij.so 161
    		"<li>No charges will be levied by the bank.</li><br><li>Credit limit of full amount is needed and blocked at the time of buying on EMI.</li><br><li>As you pay the installments, correspondingly your credit limit increases.</li>"+
162
    		"</ul>"+
6959 kshitij.so 163
    		"<br>"+
6967 kshitij.so 164
    		"</div>"+
165
    		"<div style='display: inline-block; padding-left: 5px;' class='bank-logo'><img src='/images/citi-icon.png' style='vertical-align: middle;'></div>"+
7062 kshitij.so 166
    		"<div class='emi-text' style='text-align: justify; height: 49px; padding-left: 3px; width: 397px; display: inline-block; vertical-align: top;'><p style='height: 38px; width: 420px;'>Available for 3 and 6 months.Completely free for 3 months<br><a onclick='javascript:toggle(\"emi-table-citi\");' style='cursor: pointer; text-decoration: none;color:#006699;'>See Full Details</a></p></div>"+
6967 kshitij.so 167
    		"<div id='emi-table-citi' style='padding-left: 5px;display: none;'>"+
6970 kshitij.so 168
    		"<table width='70%' cellspacing='0' cellpadding='0' border='0' id='emiwidget' style='padding-top: 2px; padding-bottom: 2px; border-top-width: 0px; border-left-width: 0px;padding-left: 5px'>"+
6967 kshitij.so 169
    		"<thead>"+
170
            "<th style='border:1px solid gray;text-align: center;background-color: #F1F1F1;' colspan='2'>All Inclusive Processing Fee*</th>"+
6772 kshitij.so 171
            "</thead>"+
172
            "<tbody>"+
173
            "<tr>"+
6970 kshitij.so 174
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 35%;'>3 Months</th>"+
175
            "<td style='border-width: 0px 1px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 35%;'>6 Months</th>"+
6967 kshitij.so 176
            "</tr>"+
177
            "<tr>"+
178
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>Free</td>"+
179
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 1px solid gray; text-align: center;'>4.22%</td>"+
180
            "</tr>"+
181
            "</tbody>"+
182
            "</table>"+
183
            "<br>"+
184
    		"<ul style='list-style : disc none none; padding-left: 20px; text-align:justify; line-height: 13px; padding-right: 10px; width: 83%;'>"+
185
    		"<li>Select EMI on Make Payment Page to see Monthly EMI payable and Total Amount Payable.</li>"+
186
    		"<br>"+
187
    		"<li>No charges will be levied by the bank.</li><br><li>Credit limit of full amount is needed and blocked at the time of buying on EMI.</li><br><li>As you pay the installments, correspondingly your credit limit increases.</li>"+
188
    		"</ul>"+
189
    		"<br>"+
190
    		"</div>"+
191
    		"<div style='display: inline-block; padding-left: 5px;' class='bank-logo'><img src='/images/icici-icon.png' style='vertical-align: middle;'></div>"+
7062 kshitij.so 192
    		"<div class='emi-text' style='text-align: justify; height: 49px; padding-left: 3px; width: 397px; display: inline-block; vertical-align: top;'><p style='height: 38px; width: 420px;'>Available for 3, 6, 9 ,12 and 18 months.Completely free for 3 months<br><a  onclick='javascript:toggle(\"emi-table-icici\");' style='cursor: pointer; text-decoration: none;color:#006699;'>See Full Details</a></p></div>"+
6967 kshitij.so 193
    		"<div id='emi-table-icici' style='padding-left: 5px;display: none;'>"+
194
    		"<table width='85%' cellspacing='0' cellpadding='0' border='0' id='emiwidget' style='padding-top: 2px; padding-bottom: 2px; border-top-width: 0px; border-left-width: 0px;padding-left: 5px'>"+
195
    		"<thead>"+
6970 kshitij.so 196
            "<th style='border:1px solid gray;text-align: center;background-color: #F1F1F1;' colspan='5'>All Inclusive Processing Fee*</th>"+
6967 kshitij.so 197
            "</thead>"+
198
            "<tbody>"+
199
            "<tr>"+
200
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>3 Months</th>"+
6959 kshitij.so 201
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>6 Months</th>"+
202
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>9 Months</th>"+
203
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>12 Months</th>"+
204
            "<td style='border-width: 0px 1px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>18 Months</th>"+
205
            "</tr>"+
6772 kshitij.so 206
            "<tr>"+
7051 kshitij.so 207
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>Free</td>"+
6967 kshitij.so 208
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>5.58%</td>"+
209
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>8.47%</td>"+
210
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>11.53%</td>"+
211
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 1px solid gray;text-align: center;'>16.72%</td>"+
6772 kshitij.so 212
            "</tr>"+
6967 kshitij.so 213
            "</tbody>"+
214
            "</table>"+
215
            "<br>"+
216
    		"<ul style='list-style : disc none none; padding-left: 20px; text-align:justify; line-height: 13px; padding-right: 10px; width: 83%;'>"+
217
    		"<li>Select EMI on Make Payment Page to see Monthly EMI payable and Total Amount Payable.</li>"+
218
    		"<br>"+
6970 kshitij.so 219
    		"<li>No charges will be levied by the bank.</li><br><li>Credit limit of full amount is needed and blocked at the time of buying on EMI.</li><br><li>As you pay the installments, correspondingly your credit limit increases.</li><br><li>Minimum payment amount required to convert into EMI is Rs 1500.</li>"+
6967 kshitij.so 220
    		"</ul>"+
221
    		"<br>"+
222
    		"</div>"+
223
    		"<div style='display: inline-block; padding-left: 5px;' class='bank-logo'><img src='/images/sbi-icon.png' style='vertical-align: middle;'></div>"+
7062 kshitij.so 224
    		"<div class='emi-text' style='text-align: justify; height: 49px; padding-left: 3px; width: 397px; display: inline-block; vertical-align: top;'><p style='height: 38px; width: 420px;'>Available for 3, 6, 9 ,12 and 18 months.Completely free for 3 months<br><a onclick='javascript:toggle(\"emi-table-sbi\");' style='cursor: pointer; text-decoration: none;color:#006699;'>See Full Details</a></p></div>"+
6967 kshitij.so 225
    		"<div id='emi-table-sbi' style='padding-left: 5px;display: none;'>"+
226
    		"<table width='85%' cellspacing='0' cellpadding='0' border='0' id='emiwidget' style='padding-top: 2px; padding-bottom: 2px; border-top-width: 0px; border-left-width: 0px;padding-left: 5px'>"+
227
    		"<thead>"+
6970 kshitij.so 228
            "<th style='border:1px solid gray;text-align: center;background-color: #F1F1F1;' colspan='5'>All Inclusive Processing Fee*</th>"+
6967 kshitij.so 229
            "</thead>"+
230
            "<tbody>"+
6772 kshitij.so 231
            "<tr>"+
6967 kshitij.so 232
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>3 Months</th>"+
233
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>6 Months</th>"+
234
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>9 Months</th>"+
235
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>12 Months</th>"+
236
            "<td style='border-width: 0px 1px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>18 Months</th>"+
6772 kshitij.so 237
            "</tr>"+
238
            "<tr>"+
7051 kshitij.so 239
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>Free</td>"+
6967 kshitij.so 240
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>5.58%</td>"+
241
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>8.47%</td>"+
242
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>11.53%</td>"+
243
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 1px solid gray;text-align: center;'>16.72%</td>"+
244
            "</tr>"+
245
            "</tbody>"+
246
            "</table>"+
247
            "<br>"+
248
    		"<ul style='list-style : disc none none; padding-left: 20px; text-align:justify; line-height: 13px; padding-right: 10px; width: 83%;'>"+
249
    		"<li>Select EMI on Make Payment Page to see Monthly EMI payable and Total Amount Payable.</li>"+
250
    		"<br>"+
6970 kshitij.so 251
    		"<li>No charges will be levied by the bank.</li><br><li>Credit limit of full amount is needed and blocked at the time of buying on EMI.</li><br><li>As you pay the installments, correspondingly your credit limit increases.</li><br><li>Minimum payment amount required to convert into EMI is Rs 1000.</li>"+
6967 kshitij.so 252
    		"</ul>"+
253
    		"<br>"+
254
    		"</div>"+
255
    		"<div style='display: inline-block; padding-left: 5px;' class='bank-logo'><img src='/images/hsbc-icon.png' style='vertical-align: middle;'></div>"+
7062 kshitij.so 256
    		"<div class='emi-text' style='text-align: justify; height: 49px; padding-left: 3px; width: 397px; display: inline-block; vertical-align: top;'><p style='height: 38px; width: 420px;'>Available for 3, 6, 9 and 12 months.Completely free for 3 months<br><a onclick='javascript:toggle(\"emi-table-hsbc\");' style='cursor: pointer; text-decoration: none;color:#006699;'>See Full Details</a></p></div>"+
6967 kshitij.so 257
    		"<div id='emi-table-hsbc' style='padding-left: 5px;display:none;'>"+
6970 kshitij.so 258
    		"<table width='70%' cellspacing='0' cellpadding='0' border='0' id='emiwidget' style='padding-top: 2px; padding-bottom: 2px; border-top-width: 0px; border-left-width: 0px;padding-left: 5px'>"+
6967 kshitij.so 259
    		"<thead>"+
6970 kshitij.so 260
            "<th style='border:1px solid gray;text-align: center;background-color: #F1F1F1;' colspan='5'>All Inclusive Processing Fee*</th>"+
6967 kshitij.so 261
            "</thead>"+
262
            "<tbody>"+
263
            "<tr>"+
7017 kshitij.so 264
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>3 Months</th>"+
265
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>6 Months</th>"+
266
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>9 Months</th>"+
267
            "<td style='border-width: 0px 1px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>12 Months</th>"+
6967 kshitij.so 268
            "</tr>"+
269
            "<tr>"+
7051 kshitij.so 270
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>Free</td>"+
7017 kshitij.so 271
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>5.58%</td>"+
272
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>8.47%</td>"+
273
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 1px solid gray;text-align: center;'>11.53%</td>"+
6772 kshitij.so 274
            "</tr>"+
6967 kshitij.so 275
            "</tbody>"+
276
            "</table>"+
277
            "<br>"+
278
    		"<ul style='list-style : disc none none; padding-left: 20px; text-align:justify; line-height: 13px; padding-right: 10px; width: 83%;'>"+
279
    		"<li>Select EMI on Make Payment Page to see Monthly EMI payable and Total Amount Payable.</li>"+
280
    		"<br>"+
6970 kshitij.so 281
    		"<li>No charges will be levied by the bank.</li><br><li>Credit limit of full amount is needed and blocked at the time of buying on EMI.</li><br><li>As you pay the installments, correspondingly your credit limit increases.</li><br><li>Minimum payment amount required to convert into EMI is Rs 1500.</li>"+
6967 kshitij.so 282
    		"</ul>"+
283
    		"<br>"+
284
    		"</div>"+
285
    		"<div style='display: inline-block; padding-left: 5px;' class='bank-logo'><img src='/images/std-chartered-icon.png' style='vertical-align: middle;'></div>"+
7062 kshitij.so 286
    		"<div class='emi-text' style='text-align: justify; height: 49px; padding-left: 3px; width: 397px; display: inline-block; vertical-align: top;'><p style='height: 38px; width: 420px;'>Available for 3, 6, 9 and 12 months.Completely free for 3 months<br><a onclick='javascript:toggle(\"emi-table-std-chart\");' style='cursor: pointer; text-decoration: none;color:#006699;'>See Full Details</a></p></div>"+
6967 kshitij.so 287
    		"<div id='emi-table-std-chart' style='padding-left: 5px;display: none;'>"+
288
    		"<table width='85%' cellspacing='0' cellpadding='0' border='0' id='emiwidget' style='padding-top: 2px; padding-bottom: 2px; border-top-width: 0px; border-left-width: 0px;padding-left: 5px'>"+
289
    		"<thead>"+
6970 kshitij.so 290
            "<th style='border:1px solid gray;text-align: center;background-color: #F1F1F1;' colspan='5'>All Inclusive Processing Fee*</th>"+
6967 kshitij.so 291
            "</thead>"+
292
            "<tbody>"+
6772 kshitij.so 293
            "<tr>"+
6970 kshitij.so 294
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%%;'>3 Months</th>"+
6967 kshitij.so 295
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>6 Months</th>"+
296
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>9 Months</th>"+
297
            "<td style='border-width: 0px 1px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>12 Months</th>"+
6772 kshitij.so 298
            "</tr>"+
299
            "<tr>"+
7051 kshitij.so 300
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>Free</td>"+
6967 kshitij.so 301
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>5.58%</td>"+
302
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>8.47%</td>"+
303
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 1px solid gray;text-align: center;'>11.53%</td>"+
6772 kshitij.so 304
            "</tr>"+
6967 kshitij.so 305
            "</tbody>"+
306
            "</table>"+
307
            "<br>"+
308
    		"<ul style='list-style : disc none none; padding-left: 20px; text-align:justify; line-height: 13px; padding-right: 10px; width: 83%;'>"+
309
    		"<li>Select EMI on Make Payment Page to see Monthly EMI payable and Total Amount Payable.</li>"+
310
    		"<br>"+
6970 kshitij.so 311
    		"<li>No charges will be levied by the bank.</li><br><li>Credit limit of full amount is needed and blocked at the time of buying on EMI.</li><br><li>As you pay the installments, correspondingly your credit limit increases.</li><br><li>Minimum payment amount required to convert into EMI is Rs 500.</li>"+
6967 kshitij.so 312
    		"</ul>"+
313
    		"<br>"+
314
    		"</div>"+
315
    		"<div style='display: inline-block; padding-left: 5px;' class='bank-logo'><img src='/images/axis-icon.png' style='vertical-align: middle;'></div>"+
7783 rajveer 316
    		"<div class='emi-text' style='text-align: justify; height: 49px; padding-left: 3px; width: 397px; display: inline-block; vertical-align: top;'><p style='height: 38px; width: 420px;'>Available for 3, 6, 9 and 12 months.Completely free for 3 months<br><a onclick='javascript:toggle(\"emi-table-axis\");' style='cursor: pointer; text-decoration: none;color:#006699;'>See Full Details</a></p></div>"+
6967 kshitij.so 317
    		"<div id='emi-table-axis' style='padding-left: 5px;display: none;'>"+
318
    		"<table width='85%' cellspacing='0' cellpadding='0' border='0' id='emiwidget' style='padding-top: 2px; padding-bottom: 2px; border-top-width: 0px; border-left-width: 0px;padding-left: 5px'>"+
319
    		"<thead>"+
6970 kshitij.so 320
            "<th style='border:1px solid gray;text-align: center;background-color: #F1F1F1;' colspan='5'>All Inclusive Processing Fee*</th>"+
6967 kshitij.so 321
            "</thead>"+
322
            "<tbody>"+
323
            "<tr>"+
324
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>3 Months</th>"+
325
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>6 Months</th>"+
326
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>9 Months</th>"+
327
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>12 Months</th>"+
328
            "</tr>"+
329
            "<tr>"+
7051 kshitij.so 330
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>Free</td>"+
6967 kshitij.so 331
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>5.58%</td>"+
332
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>8.47%</td>"+
333
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>11.53%</td>"+
6959 kshitij.so 334
            "</tr>"+
6967 kshitij.so 335
            "</tbody>"+
336
            "</table>"+
337
            "<br>"+
338
    		"<ul style='list-style : disc none none; padding-left: 20px; text-align:justify; line-height: 13px; padding-right: 10px; width: 83%;'>"+
339
    		"<li>Select EMI on Make Payment Page to see Monthly EMI payable and Total Amount Payable.</li>"+
340
    		"<br>"+
6970 kshitij.so 341
    		"<li>No charges will be levied by the bank.</li><br><li>Credit limit of full amount is needed and blocked at the time of buying on EMI.</li><br><li>As you pay the installments, correspondingly your credit limit increases.</li><br><li>Minimum payment amount required to convert into EMI is Rs 2500.</li>"+
6967 kshitij.so 342
    		"</ul>"+
343
    		"<br>"+
344
    		"</div>"+
345
    		"<div style='display: inline-block; padding-left: 5px;' class='bank-logo'><img src='/images/indusind-icon.png' style='vertical-align: middle;'></div>"+
7062 kshitij.so 346
    		"<div class='emi-text' style='text-align: justify; height: 49px; padding-left: 3px; width: 397px; display: inline-block; vertical-align: top;'><p style='height: 38px; width: 420px;'>Available for 6, 9 and 12 months. <br><a onclick='javascript:toggle(\"emi-table-indus\");' style='cursor: pointer; text-decoration: none;color:#006699;'>See Full Details</a></p></div>"+
6967 kshitij.so 347
    		"<div id='emi-table-indus' style='padding-left: 5px;display: none;'>"+
348
    		"<table width='85%' cellspacing='0' cellpadding='0' border='0' id='emiwidget' style='padding-top: 2px; padding-bottom: 2px; border-top-width: 0px; border-left-width: 0px;padding-left: 5px'>"+
349
    		"<thead>"+
350
            "<th style='border:1px solid gray;text-align: center;background-color: #F1F1F1;' colspan='5'>All Inclusive Processing Fee*</th>"+
351
            "</thead>"+
352
            "<tbody>"+
6959 kshitij.so 353
            "<tr>"+
6967 kshitij.so 354
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>6 Months</th>"+
355
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>9 Months</th>"+
356
            "<td style='border-width: 0px 1px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>12 Months</th>"+
6959 kshitij.so 357
            "</tr>"+
358
            "<tr>"+
7051 kshitij.so 359
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>5.58%%</td>"+
6967 kshitij.so 360
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>8.47%</td>"+
361
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 1px solid gray;text-align: center;'>11.53%</td>"+
6959 kshitij.so 362
            "</tr>"+
6772 kshitij.so 363
            "</tbody>"+
364
            "</table>"+
365
            "<br>"+
6967 kshitij.so 366
    		"<ul style='list-style : disc none none; padding-left: 20px; text-align:justify; line-height: 13px; padding-right: 10px; width: 83%;'>"+
367
    		"<li>Select EMI on Make Payment Page to see Monthly EMI payable and Total Amount Payable.</li>"+
368
    		"<br>"+
369
    		"<li>No charges will be levied by the bank.</li><br><li>Credit limit of full amount is needed and blocked at the time of buying on EMI.</li><br><li>As you pay the installments, correspondingly your credit limit increases.</li>"+
370
    		"</ul>"+
371
    		"<br>"+
372
    		"</div>"+
373
    		"<br><br>",
6453 kshitij.so 374
			onComplete: function(){
375
				trackEventWithGA('Widget', 'Emi info widget is clicked', '');
376
			}
377
    	});
378
	});
6245 kshitij.so 379
 
6792 vikram.rag 380
	$('a.mk_best_deal_detail').live('click', function(){
381
		var offerLinkHtml = '';
382
		if(OFFER_HELP_LINK!='$OFFER_DETAIL_LINK') {
6795 vikram.rag 383
			offerLinkHtml = '<a target="_blank" href="' +OFFER_HELP_LINK + '" style="z-index: 1; float: right; bottom: 0px; right: 0px; margin: 15px; position: relative;">More</a></span>';
6792 vikram.rag 384
		}
385
		$.colorbox({
386
			width: "550px",
387
    		height: "300px",
388
    		inline: true,
389
    		href: '<h3 style="text-align: left; padding: 10px;">Offer Details</h3>' +
390
    			'<p style="text-align: justify; line-height: 22px; margin: 12px;">' + OFFER_HELP_TEXT +
391
    			'</p><span class="right">' + offerLinkHtml 
392
		});
393
	});
6453 kshitij.so 394
 
6792 vikram.rag 395
 
6245 kshitij.so 396
	$('#pickupstoreInfo').click(function(){
397
		$.colorbox({
398
    		width: "550px",
399
    		height: "370px",
400
    		inline: true,
401
    		href: "<h3>Frequently Asked Questions</h3><br />" +
7062 kshitij.so 402
		"<b style='color: black; cursor: default;'>Q)</b> What is 'Buy Online & Pickup in Store' ?<br /><br />" +
403
		"<b style='color: black; cursor: default;'>A)</b> Buy Online from Saholic.Com and pickup your product from the nearest Spice Hotspot Retail Store.<br /><br />" +
404
		"<b style='color: black; cursor: default;'>Q)</b> How do i avail this facility ?<br /><br />" +
405
		"<b style='color: black; cursor: default;'>A)</b> Simply select Pickup In Store On the Shipping Page and select your nearest store. Please note this facility is available only in Delhi/NCR.</a><br /><br />"+
406
		"<b style='color: black; cursor: default;'>Q)</b> When will the product be available for pickup ?<br /><br />" +
407
		"<b style='color: black; cursor: default;'>A)</b> You can enter your pin code on the Product Page to find estimated time to deliver. After placing the order we will also give you the estimated date for pickup.</a><br /><br />",
6245 kshitij.so 408
 
409
			onComplete: function(){
6262 amit.gupta 410
				var ev = "Product Page";
6303 amit.gupta 411
				var label = window.location.pathname;
6264 amit.gupta 412
				if (label=="" || label=="#")
6261 amit.gupta 413
				{
6303 amit.gupta 414
					label = "";
6262 amit.gupta 415
					ev = "Home Page";
6261 amit.gupta 416
				}
6262 amit.gupta 417
				else if (label.indexOf("shipping") != -1){
418
					ev = "Shipping Page";
419
					var blkstr = [];
6263 amit.gupta 420
					jQuery("#cartDetail").find("span.cart-item-name").each(function(key,str){
6262 amit.gupta 421
						blkstr.push(str);
422
					});
6303 amit.gupta 423
					label = blkstr.join(", ");
424
				} else if (label.substr(label.lastIndexOf('/') + 1).length==5 && typeof label.substr(label.lastIndexOf('/') + 1) =="number") {
425
					ev = "Category Page";
426
				} else if (label.substr(label.lastIndexOf('-') + 1).length==7  && typeof label.substr(label.lastIndexOf('-') + 1) =="number") {
427
					ev = "Product Page";
6262 amit.gupta 428
				}
6261 amit.gupta 429
				trackEventWithGA('Pickup in Store LightBox', ev, label);
6245 kshitij.so 430
			}
431
    	});
432
	});
4126 varun.gupt 433
 
5420 amit.gupta 434
	$('.common-widget-top-bar').live('click', function(e, callback){
4126 varun.gupt 435
		var isColapsed = $(this).data('is_colapsed') == true ? true : false;
436
		var widgetBox = $(this).siblings('.common-widget-content-area');
437
		var controlBox = $(this).siblings('.common-widget-control-bar');
438
		var controlBoxArrowImg = $(this).find('img');
4210 varun.gupt 439
 
4126 varun.gupt 440
		if (isColapsed)	{
441
			if(controlBox.length > 0)	{
442
				$(controlBox).slideDown('fast', function(){
5420 amit.gupta 443
					$(widgetBox).slideDown('fast', callback);
4126 varun.gupt 444
					$(controlBoxArrowImg).attr('src', '/images/IconDownArrow_UnselectedTab.png');
445
				});
446
			} else	{
447
				$(widgetBox).slideDown();
448
				$(controlBoxArrowImg).attr('src', '/images/IconDownArrow_UnselectedTab.png');
449
			}
450
		} else	{
451
			$(widgetBox).slideUp(function(){
452
				$(controlBox).slideUp('fast');
453
				$(controlBoxArrowImg).attr('src', '/images/IconRightArrow_UnselectedTab.png');
454
			});
455
		}
456
		$(this).data('is_colapsed', !isColapsed);
457
	});
458
 
459
	/**
460
	 * Update count of products checked for comparison
461
	 **/
462
	$('#myresearch input[type="checkbox"]').live('click', function(){
4798 varun.gupt 463
		updateCompareCount();
4126 varun.gupt 464
	});
465
 
466
	$("#research_compare").live('click', function(){
467
		var seldata = "";
5322 amit.gupta 468
		var prodnames = "";
4126 varun.gupt 469
		var tot = 1;
470
		var saprt = "";
471
		var par = $('#myresearch').find('input[type=checkbox]:checked');
4926 varun.gupt 472
		var haveSameProductType = true;
473
		var productType = null;
474
 
4126 varun.gupt 475
		$(par).each(function(){
4926 varun.gupt 476
 
477
			if(productType != null && productType != $(this).attr('producttype'))	{
478
				haveSameProductType = false;
479
			}
480
			productType = $(this).attr('producttype');
481
 
4126 varun.gupt 482
			if(tot == 1)	{
5358 amit.gupta 483
				prodnames += $(this).attr("title").replace(/ +/g, '-').replace(/\/+/g,'-').replace(/-+/g,'-').toLowerCase();
4126 varun.gupt 484
				seldata += "p" + tot + "=" + $(this).val();
485
			} else	{
486
				seldata += "&p" + tot + "=" + $(this).val();
5358 amit.gupta 487
				prodnames += "-vs-" + $(this).attr("title").replace(/ +/g, '-').replace(/\/+/g,'-').replace(/-+/g,'-').toLowerCase();
4126 varun.gupt 488
			}
489
			tot ++;
490
		});
4984 varun.gupt 491
 
4926 varun.gupt 492
		if(! haveSameProductType)	{
493
			alert("Only products of same category can be compared");
494
		} else if(tot > 6)	{
4126 varun.gupt 495
			alert("Can compare upto five products only.");
496
		} else if(tot > 2)	{
5552 phani.kuma 497
			window.location = "/compare-" + productType.replace(/ +/g, '-').toLowerCase() + "/" + prodnames + "?" + seldata+"&fromsrc=comparison_widget";
4126 varun.gupt 498
		} else	{
499
			alert("Please select atleast two products");
500
		}
501
	});
502
 
503
	$("#research_delete").live('click', function(){
504
		var research_tot = $("#research_total").val();
505
		var seldata = [];
506
		var tot = 0;
507
		var saprt = "";
508
		var par = $('#myresearch').find('input[type=checkbox]:checked');
509
 
510
		$(par).each(function(){
511
			seldata.unshift($(this).val());
512
			tot ++;
513
		});
514
 
515
		if(tot > 0)	{
516
			var t = (research_tot * 1) - (tot * 1);
517
			$("#research_total").val(t);
518
 
519
			jQuery.ajax({
520
				type: "GET",
521
				url: "/deletefromresearch/[" + seldata + "]?_method=delete",
522
				success: function(msg)	{
523
					jQuery.each(seldata, function(intIndex, objValue){
524
						delete_from_storage_set("resitems", objValue);
525
						$("#myresearch").find("#" + objValue).fadeOut('slow', function() {
526
							$(this).remove();
527
							if(t === 0)	{
528
								$("#research_default").css("display", "block");
529
							}
530
						});
531
					});
4984 varun.gupt 532
 
4922 varun.gupt 533
					//Updating the count
534
					$('#research_compare_count').html($('#myresearch input[type="checkbox"]:checked').length - seldata.length);
4984 varun.gupt 535
 
536
					if ($('#myresearch input[type="checkbox"]').length - seldata.length <= 0)	{
537
						$("#myresearch").children(".common-widget-top-bar").trigger('click');
538
					}
4126 varun.gupt 539
				}
540
			});
541
		} else	{
542
			alert("Please select atleast one product");
543
		}
544
	});
545
 
546
	// No uid cookie
547
	if (!$.cookie("uid"))	{
548
		// No uid in storage
549
		if (!$.Storage.get("uid"))	{
550
			if (!$.Storage.get("resitems"))	{
551
				$.Storage.set("resitems", "[]");
552
			}
553
			if (!$.Storage.get("histitems"))	{
554
				$.Storage.set("histitems", "[]");
555
			}
556
		}
557
		else	{			// uid in storage : logout
558
			$.Storage.remove("uid");
559
			$.Storage.set("resitems", "[]");
560
			$.Storage.set("histitems", "[]");
561
		}
562
		load_research_widget();
563
		load_history_widget();
564
	}
565
	else	{				// With uid cookie
566
		var cookie = $.cookie("uid");
567
		// Just logged in merge storage items
568
		if (!$.Storage.get("uid"))	{
569
			$.Storage.set("uid", cookie);
570
			merge_history_items();
571
			load_research_items();
572
		}
573
		else	{
574
			// UID changed
575
			if ( cookie != $.Storage.get("uid"))	{
576
				$.Storage.set("uid", cookie);
577
				$.Storage.set("resitems", "[]");
578
				$.Storage.set("histitems", "[]");
579
				merge_history_items();
580
				load_research_items();
581
			}
582
			else	{		// Uid is same
583
				if (!$.Storage.get("resitems"))	{
584
					$.Storage.set("resitems", "[]");
585
					load_research_items();
586
				}
587
				else	{
588
					load_research_widget();
589
				}
590
 
591
				if (!$.Storage.get("histitems"))	{
592
					$.Storage.set("histitems", "[]");
593
					merge_history_items();
594
				}
595
				else	{
596
					load_history_widget();
597
				}
598
			}
599
		}
600
	}
4798 varun.gupt 601
 
602
	function load_research_items(){
603
		jQuery.ajax({
604
			type: "GET",
605
			url: "/myresearch",
606
			cache: false,
607
			success: function(json) {
608
			    $.Storage.set("resitems", json);
609
			    load_research_widget();
610
		    }
611
		});
612
	}
613
 
614
	function load_research_widget(){
615
		var myResearchWidgetContainer = $("#myresearch");
616
 
617
		if($(myResearchWidgetContainer).length == 0) {
618
			return;
619
		}
620
		var resitems = $.Storage.get("resitems");
621
 
622
		if (resitems == "[]") {
623
			var emptyResWidgetHtml = '<table border="0" width="100%" cellspacing="1" cellpadding="0" id="research_default">\
624
		      <tbody>\
625
		        <tr><td align="center"><b>Add items to compare list</b></td></tr>\
626
		       </tbody>\
627
		      </table>';
628
			$(myResearchWidgetContainer).find(".common-widget-content-area").html(emptyResWidgetHtml);
629
			$(myResearchWidgetContainer).children(".common-widget-top-bar").trigger('click');
630
			return;
631
		}
632
		var params = "/" + resitems;
633
 
634
		jQuery.ajax({
635
			type : "GET",
636
			url : "/myresearch" + params,
637
			cache: true,
638
			success : function(html) {
639
	   		    $("#myresearch").html(html);
640
	   			updateCompareCount();
641
 
642
			    // Product Title
643
			    $("#myresearch table td div a.truncate").each(function() {
644
						$(this).truncate({addtitle : true});
645
			    });
646
 
647
			    // Product Price
648
			    $("#myresearch table td div div.price").each(function() {
649
						$(this).truncate({addtitle : true});
650
				});
651
 
652
			    // Product Details
653
			    $("#myresearch table td div div.text").each(function() {
654
						$(this).truncate( {addtitle : true});
655
				});
656
		    }
657
		});
658
	}
7846 rajveer 659
});
660
 
7849 rajveer 661
function displayCod(item_id)	{
7846 rajveer 662
	$.colorbox({
7867 rajveer 663
		width: "450px",
7868 rajveer 664
		height: "120px",
7846 rajveer 665
		inline: true,
666
		href: "<ul style='list-style: disc none none; margin-left: 25px; text-align: justify; margin-right:12px; line-height: 22px;'>"
7865 rajveer 667
			+"<li>Expected delivery date for Prepaid orders is " + $('#days_' + item_id).html() + "</li>"+
7850 rajveer 668
			"<li>" + $('#coddays_' + item_id).html() + "</li>"+
7846 rajveer 669
    "</ul>",
670
    onComplete: function(){
671
	trackEventWithGA('Widget', 'COD Know More is clicked', '');
672
		}
673
	});
674
}